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,GAAE,WAAY,CAAC,EAAG,CAChB,AAAA,EAAA,GAAE,OAAQ,CAAC,EAAG,CACZ,AAAA,EAAA,GAAE,IACF,AAAA,EAAA,GAAE,EAAA,KACH,EACD,AAAA,EAAA,GAAE,aAAc,CAAC,EAAG,CAClB,AAAA,EAAA,GAAE,IACF,AAAA,EAAA,GAAE,SAAU,CAAC,EAAG,CACd,AAAA,EAAA,GAAE,IACH,EACF,EACD,AAAA,EAAA,GAAE,IACH,EACF,EACD,AAAA,EAAA,GAAE,IACF,AAAA,EAAA,GAAE,UAAW,CAAC,MAAM,CAAC,OAAO,KAAK,CAAC,EAAG,EAAE,EACvC,AAAA,EAAA,GIwCS,IJvCV,AAEL,EvCCE,QAAS,CAAE,OAAQ,IAAM,AAAA,EAAA,GAAE,GAAQ,AAAA,EAAA,GAAE,IAAa,EAClD,UAAW,CAAE,OAAQ,IAAM,AAAA,EAAA,GAAE,GAAQ,AAAA,EAAA,GAAE,IAAiB,EACxD,SAAU,CAAE,OAAQ,IAAM,AAAA,EAAA,GAAE,GAAQ,AAAA,EAAA,GAAE,IAAQ,EAC9C,UAAW,CAAE,OAAQ,IAAM,AAAA,EAAA,GAAE,GAAQ,AAAA,EAAA,GAAE,IAAS,CAClD","sources":["","node_modules/mithril/render/vnode.js","node_modules/mithril/render/trust.js","node_modules/mithril/render/fragment.js","node_modules/mithril/render/hyperscriptVnode.js","node_modules/mithril/promise/polyfill.js","node_modules/mithril/render.js","node_modules/mithril/render/render.js","node_modules/mithril/api/mount-redraw.js","node_modules/mithril/request/request.js","node_modules/mithril/pathname/build.js","node_modules/mithril/querystring/build.js","node_modules/mithril/util/assign.js","node_modules/mithril/util/hasOwn.js","node_modules/mithril/route.js","node_modules/mithril/mount-redraw.js","node_modules/mithril/api/router.js","node_modules/mithril/render/hyperscript.js","node_modules/mithril/promise/promise.js","node_modules/mithril/pathname/parse.js","node_modules/mithril/querystring/parse.js","node_modules/mithril/pathname/compileTemplate.js","node_modules/mithril/util/censor.js","node_modules/mithril/stream/stream.js","node_modules/interactjs/dist/interact.min.js","node_modules/@interactjs/utils/isWindow.ts","node_modules/@interactjs/utils/window.ts","node_modules/@interactjs/utils/is.ts","node_modules/@interactjs/actions/drag/plugin.ts","node_modules/@interactjs/utils/domObjects.ts","node_modules/@interactjs/utils/browser.ts","node_modules/@interactjs/utils/domUtils.ts","node_modules/@interactjs/utils/extend.ts","node_modules/@interactjs/utils/rect.ts","node_modules/@interactjs/utils/getOriginXY.ts","node_modules/@interactjs/utils/normalizeListeners.ts","node_modules/@interactjs/utils/hypot.ts","node_modules/@interactjs/utils/pointerExtend.ts","node_modules/@interactjs/utils/pointerUtils.ts","node_modules/@interactjs/core/BaseEvent.ts","node_modules/@interactjs/utils/arr.ts","node_modules/@interactjs/actions/drop/DropEvent.ts","node_modules/@interactjs/actions/drop/plugin.ts","node_modules/@interactjs/actions/gesture/plugin.ts","node_modules/@interactjs/actions/resize/plugin.ts","node_modules/@interactjs/utils/raf.ts","node_modules/@interactjs/actions/plugin.ts","node_modules/@interactjs/auto-scroll/plugin.ts","node_modules/@interactjs/utils/misc.ts","node_modules/@interactjs/auto-start/InteractableMethods.ts","node_modules/@interactjs/auto-start/base.ts","node_modules/@interactjs/auto-start/dragAxis.ts","node_modules/@interactjs/auto-start/hold.ts","node_modules/@interactjs/auto-start/plugin.ts","node_modules/@interactjs/core/interactablePreventDefault.ts","node_modules/@interactjs/utils/isNonNativeEvent.ts","node_modules/@interactjs/utils/clone.ts","node_modules/@interactjs/modifiers/Modification.ts","node_modules/@interactjs/modifiers/base.ts","node_modules/@interactjs/core/options.ts","node_modules/@interactjs/core/InteractEvent.ts","node_modules/@interactjs/core/PointerInfo.ts","node_modules/@interactjs/core/Interaction.ts","node_modules/@interactjs/offset/plugin.ts","node_modules/@interactjs/inertia/plugin.ts","node_modules/@interactjs/core/Eventable.ts","node_modules/@interactjs/core/events.ts","node_modules/@interactjs/core/interactionFinder.ts","node_modules/@interactjs/core/interactions.ts","node_modules/@interactjs/core/Interactable.ts","node_modules/@interactjs/core/InteractableSet.ts","node_modules/@interactjs/core/scope.ts","node_modules/@interactjs/core/InteractStatic.ts","node_modules/@interactjs/interact/index.ts","node_modules/@interactjs/snappers/edgeTarget.ts","node_modules/@interactjs/snappers/elements.ts","node_modules/@interactjs/snappers/grid.ts","node_modules/@interactjs/snappers/plugin.ts","node_modules/@interactjs/modifiers/aspectRatio.ts","node_modules/@interactjs/modifiers/noop.ts","node_modules/@interactjs/modifiers/restrict/pointer.ts","node_modules/@interactjs/modifiers/restrict/edges.ts","node_modules/@interactjs/modifiers/restrict/rect.ts","node_modules/@interactjs/modifiers/restrict/size.ts","node_modules/@interactjs/modifiers/snap/pointer.ts","node_modules/@interactjs/modifiers/snap/size.ts","node_modules/@interactjs/modifiers/snap/edges.ts","node_modules/@interactjs/modifiers/all.ts","node_modules/@interactjs/modifiers/plugin.ts","node_modules/@interactjs/pointer-events/PointerEvent.ts","node_modules/@interactjs/pointer-events/base.ts","node_modules/@interactjs/pointer-events/holdRepeat.ts","node_modules/@interactjs/pointer-events/interactableTargets.ts","node_modules/@interactjs/pointer-events/plugin.ts","node_modules/@interactjs/reflow/plugin.ts","node_modules/interactjs/index.ts","node_modules/@interactjs/interactjs/index.ts","src/index.js","node_modules/mithril/index.js","node_modules/mithril/hyperscript.js","node_modules/mithril/request.js","src/Project.js","src/Video.js","node_modules/mithril/stream.js","src/Globals.js","src/Timeline.js","node_modules/sortablejs/modular/sortable.esm.js","src/Clip.js","src/Monitor.js","src/CSVToArray.js","src/Slider.js","src/Home.js","src/Projects.js","src/User.js","node_modules/jwt-decode/build/jwt-decode.esm.js","node_modules/jwt-decode/lib/atob.js","node_modules/jwt-decode/lib/base64_url_decode.js","node_modules/jwt-decode/lib/index.js","src/Login.js","node_modules/alertifyjs/build/alertify.js","src/Documents.js","src/Renders.js","src/Tools.js","src/Resolution.js","src/Magnussens.js","src/Preview.js","src/Components.js","src/Menu.js","node_modules/@parcel/runtime-js/lib/runtime-8e964e2fca74bfb2.js","src/Footer.js","src/Form.js","node_modules/regenerator-runtime/runtime.js","node_modules/mithril-range/index.js","node_modules/json-logic-engine/dist/esm/index.js","src/TemplateEditor.js","node_modules/mithril-json-viewer/index.js","src/Otto.js","src/Head.js","src/OttoTimeline.js","node_modules/mithril-contenteditable/dist/index.js","src/Bin.js","src/Timecode.js","src/TimelineTools.js","src/Scale.js","node_modules/@parcel/runtime-js/lib/runtime-01a6a3d1f2791247.js"],"sourcesContent":["\n var $parcel$global = globalThis;\n \nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire8b75\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire8b75\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"dBs8J\", function(module, exports) {\n\"use strict\";\nfunction $9e748f0e7cb702a5$var$Vnode(tag, key, attrs, children, text, dom) {\n return {\n tag: tag,\n key: key,\n attrs: attrs,\n children: children,\n text: text,\n dom: dom,\n domSize: undefined,\n state: undefined,\n events: undefined,\n instance: undefined\n };\n}\n$9e748f0e7cb702a5$var$Vnode.normalize = function(node) {\n if (Array.isArray(node)) return $9e748f0e7cb702a5$var$Vnode(\"[\", undefined, undefined, $9e748f0e7cb702a5$var$Vnode.normalizeChildren(node), undefined, undefined);\n if (node == null || typeof node === \"boolean\") return null;\n if (typeof node === \"object\") return node;\n return $9e748f0e7cb702a5$var$Vnode(\"#\", undefined, undefined, String(node), undefined, undefined);\n};\n$9e748f0e7cb702a5$var$Vnode.normalizeChildren = function(input) {\n var children = [];\n if (input.length) {\n var isKeyed = input[0] != null && input[0].key != null;\n // Note: this is a *very* perf-sensitive check.\n // Fun fact: merging the loop like this is somehow faster than splitting\n // it, noticeably so.\n for(var i = 1; i < input.length; i++){\n if ((input[i] != null && input[i].key != null) !== isKeyed) throw new TypeError(isKeyed && (input[i] != null || typeof input[i] === \"boolean\") ? \"In fragments, vnodes must either all have keys or none have keys. You may wish to consider using an explicit keyed empty fragment, m.fragment({key: ...}), instead of a hole.\" : \"In fragments, vnodes must either all have keys or none have keys.\");\n }\n for(var i = 0; i < input.length; i++)children[i] = $9e748f0e7cb702a5$var$Vnode.normalize(input[i]);\n }\n return children;\n};\nmodule.exports = $9e748f0e7cb702a5$var$Vnode;\n\n});\n\nparcelRegister(\"e2F9W\", function(module, exports) {\n\"use strict\";\n\nvar $dBs8J = parcelRequire(\"dBs8J\");\nmodule.exports = function(html) {\n if (html == null) html = \"\";\n return $dBs8J(\"<\", undefined, undefined, html, undefined, undefined);\n};\n\n});\n\nparcelRegister(\"7PZrX\", function(module, exports) {\n\"use strict\";\n\nvar $dBs8J = parcelRequire(\"dBs8J\");\n\nvar $5sRXF = parcelRequire(\"5sRXF\");\nmodule.exports = function() {\n var vnode = $5sRXF.apply(0, arguments);\n vnode.tag = \"[\";\n vnode.children = $dBs8J.normalizeChildren(vnode.children);\n return vnode;\n};\n\n});\nparcelRegister(\"5sRXF\", function(module, exports) {\n\"use strict\";\n\nvar $dBs8J = parcelRequire(\"dBs8J\");\n// Call via `hyperscriptVnode.apply(startOffset, arguments)`\n//\n// The reason I do it this way, forwarding the arguments and passing the start\n// offset in `this`, is so I don't have to create a temporary array in a\n// performance-critical path.\n//\n// In native ES6, I'd instead add a final `...args` parameter to the\n// `hyperscript` and `fragment` factories and define this as\n// `hyperscriptVnode(...args)`, since modern engines do optimize that away. But\n// ES5 (what Mithril.js requires thanks to IE support) doesn't give me that luxury,\n// and engines aren't nearly intelligent enough to do either of these:\n//\n// 1. Elide the allocation for `[].slice.call(arguments, 1)` when it's passed to\n// another function only to be indexed.\n// 2. Elide an `arguments` allocation when it's passed to any function other\n// than `Function.prototype.apply` or `Reflect.apply`.\n//\n// In ES6, it'd probably look closer to this (I'd need to profile it, though):\n// module.exports = function(attrs, ...children) {\n// if (attrs == null || typeof attrs === \"object\" && attrs.tag == null && !Array.isArray(attrs)) {\n// if (children.length === 1 && Array.isArray(children[0])) children = children[0]\n// } else {\n// children = children.length === 0 && Array.isArray(attrs) ? attrs : [attrs, ...children]\n// attrs = undefined\n// }\n//\n// if (attrs == null) attrs = {}\n// return Vnode(\"\", attrs.key, attrs, children)\n// }\nmodule.exports = function() {\n var attrs = arguments[this], start = this + 1, children;\n if (attrs == null) attrs = {};\n else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n attrs = {};\n start = this;\n }\n if (arguments.length === start + 1) {\n children = arguments[start];\n if (!Array.isArray(children)) children = [\n children\n ];\n } else {\n children = [];\n while(start < arguments.length)children.push(arguments[start++]);\n }\n return $dBs8J(\"\", attrs.key, attrs, children);\n};\n\n});\n\n\nparcelRegister(\"k7iQv\", function(module, exports) {\n\"use strict\";\n/** @constructor */ var $ea53147a45dc1bd2$var$PromisePolyfill = function(executor) {\n if (!(this instanceof $ea53147a45dc1bd2$var$PromisePolyfill)) throw new Error(\"Promise must be called with 'new'.\");\n if (typeof executor !== \"function\") throw new TypeError(\"executor must be a function.\");\n var self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false);\n var instance = self._instance = {\n resolvers: resolvers,\n rejectors: rejectors\n };\n var callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout;\n function handler(list, shouldAbsorb) {\n return function execute(value) {\n var then;\n try {\n if (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n if (value === self) throw new TypeError(\"Promise can't be resolved with itself.\");\n executeOnce(then.bind(value));\n } else callAsync(function() {\n if (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value);\n for(var i = 0; i < list.length; i++)list[i](value);\n resolvers.length = 0, rejectors.length = 0;\n instance.state = shouldAbsorb;\n instance.retry = function() {\n execute(value);\n };\n });\n } catch (e) {\n rejectCurrent(e);\n }\n };\n }\n function executeOnce(then) {\n var runs = 0;\n function run(fn) {\n return function(value) {\n if (runs++ > 0) return;\n fn(value);\n };\n }\n var onerror = run(rejectCurrent);\n try {\n then(run(resolveCurrent), onerror);\n } catch (e) {\n onerror(e);\n }\n }\n executeOnce(executor);\n};\n$ea53147a45dc1bd2$var$PromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n var self = this, instance = self._instance;\n function handle(callback, list, next, state) {\n list.push(function(value) {\n if (typeof callback !== \"function\") next(value);\n else try {\n resolveNext(callback(value));\n } catch (e) {\n if (rejectNext) rejectNext(e);\n }\n });\n if (typeof instance.retry === \"function\" && state === instance.state) instance.retry();\n }\n var resolveNext, rejectNext;\n var promise = new $ea53147a45dc1bd2$var$PromisePolyfill(function(resolve, reject) {\n resolveNext = resolve, rejectNext = reject;\n });\n handle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false);\n return promise;\n};\n$ea53147a45dc1bd2$var$PromisePolyfill.prototype.catch = function(onRejection) {\n return this.then(null, onRejection);\n};\n$ea53147a45dc1bd2$var$PromisePolyfill.prototype.finally = function(callback) {\n return this.then(function(value) {\n return $ea53147a45dc1bd2$var$PromisePolyfill.resolve(callback()).then(function() {\n return value;\n });\n }, function(reason) {\n return $ea53147a45dc1bd2$var$PromisePolyfill.resolve(callback()).then(function() {\n return $ea53147a45dc1bd2$var$PromisePolyfill.reject(reason);\n });\n });\n};\n$ea53147a45dc1bd2$var$PromisePolyfill.resolve = function(value) {\n if (value instanceof $ea53147a45dc1bd2$var$PromisePolyfill) return value;\n return new $ea53147a45dc1bd2$var$PromisePolyfill(function(resolve) {\n resolve(value);\n });\n};\n$ea53147a45dc1bd2$var$PromisePolyfill.reject = function(value) {\n return new $ea53147a45dc1bd2$var$PromisePolyfill(function(resolve, reject) {\n reject(value);\n });\n};\n$ea53147a45dc1bd2$var$PromisePolyfill.all = function(list) {\n return new $ea53147a45dc1bd2$var$PromisePolyfill(function(resolve, reject) {\n var total = list.length, count = 0, values = [];\n if (list.length === 0) resolve([]);\n else for(var i = 0; i < list.length; i++)(function(i) {\n function consume(value) {\n count++;\n values[i] = value;\n if (count === total) resolve(values);\n }\n if (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") list[i].then(consume, reject);\n else consume(list[i]);\n })(i);\n });\n};\n$ea53147a45dc1bd2$var$PromisePolyfill.race = function(list) {\n return new $ea53147a45dc1bd2$var$PromisePolyfill(function(resolve, reject) {\n for(var i = 0; i < list.length; i++)list[i].then(resolve, reject);\n });\n};\nmodule.exports = $ea53147a45dc1bd2$var$PromisePolyfill;\n\n});\n\nparcelRegister(\"j25vk\", function(module, exports) {\n\"use strict\";\n\nmodule.exports = (parcelRequire(\"6JDlc\"))(typeof window !== \"undefined\" ? window : null);\n\n});\nparcelRegister(\"6JDlc\", function(module, exports) {\n\"use strict\";\n\nvar $dBs8J = parcelRequire(\"dBs8J\");\nmodule.exports = function($window) {\n var $doc = $window && $window.document;\n var currentRedraw;\n var nameSpace = {\n svg: \"http://www.w3.org/2000/svg\",\n math: \"http://www.w3.org/1998/Math/MathML\"\n };\n function getNameSpace(vnode) {\n return vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag];\n }\n //sanity check to discourage people from doing `vnode.state = ...`\n function checkState(vnode, original) {\n if (vnode.state !== original) throw new Error(\"'vnode.state' must not be modified.\");\n }\n //Note: the hook is passed as the `this` argument to allow proxying the\n //arguments without requiring a full array allocation to do so. It also\n //takes advantage of the fact the current `vnode` is the first argument in\n //all lifecycle methods.\n function callHook(vnode) {\n var original = vnode.state;\n try {\n return this.apply(original, arguments);\n } finally{\n checkState(vnode, original);\n }\n }\n // IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when\n // inside an iframe. Catch and swallow this error, and heavy-handidly return null.\n function activeElement() {\n try {\n return $doc.activeElement;\n } catch (e) {\n return null;\n }\n }\n //create\n function createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n for(var i = start; i < end; i++){\n var vnode = vnodes[i];\n if (vnode != null) createNode(parent, vnode, hooks, ns, nextSibling);\n }\n }\n function createNode(parent, vnode, hooks, ns, nextSibling) {\n var tag = vnode.tag;\n if (typeof tag === \"string\") {\n vnode.state = {};\n if (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks);\n switch(tag){\n case \"#\":\n createText(parent, vnode, nextSibling);\n break;\n case \"<\":\n createHTML(parent, vnode, ns, nextSibling);\n break;\n case \"[\":\n createFragment(parent, vnode, hooks, ns, nextSibling);\n break;\n default:\n createElement(parent, vnode, hooks, ns, nextSibling);\n }\n } else createComponent(parent, vnode, hooks, ns, nextSibling);\n }\n function createText(parent, vnode, nextSibling) {\n vnode.dom = $doc.createTextNode(vnode.children);\n insertNode(parent, vnode.dom, nextSibling);\n }\n var possibleParents = {\n caption: \"table\",\n thead: \"table\",\n tbody: \"table\",\n tfoot: \"table\",\n tr: \"tbody\",\n th: \"tr\",\n td: \"tr\",\n colgroup: \"table\",\n col: \"colgroup\"\n };\n function createHTML(parent, vnode, ns, nextSibling) {\n var match = vnode.children.match(/^\\s*?<(\\w+)/im) || [];\n // not using the proper parent makes the child element(s) vanish.\n // var div = document.createElement(\"div\")\n // div.innerHTML = \"ij\"\n // console.log(div.innerHTML)\n // --> \"ij\", no in sight.\n var temp = $doc.createElement(possibleParents[match[1]] || \"div\");\n if (ns === \"http://www.w3.org/2000/svg\") {\n temp.innerHTML = '' + vnode.children + \"\";\n temp = temp.firstChild;\n } else temp.innerHTML = vnode.children;\n vnode.dom = temp.firstChild;\n vnode.domSize = temp.childNodes.length;\n // Capture nodes to remove, so we don't confuse them.\n vnode.instance = [];\n var fragment = $doc.createDocumentFragment();\n var child;\n while(child = temp.firstChild){\n vnode.instance.push(child);\n fragment.appendChild(child);\n }\n insertNode(parent, fragment, nextSibling);\n }\n function createFragment(parent, vnode, hooks, ns, nextSibling) {\n var fragment = $doc.createDocumentFragment();\n if (vnode.children != null) {\n var children = vnode.children;\n createNodes(fragment, children, 0, children.length, hooks, null, ns);\n }\n vnode.dom = fragment.firstChild;\n vnode.domSize = fragment.childNodes.length;\n insertNode(parent, fragment, nextSibling);\n }\n function createElement(parent, vnode, hooks, ns, nextSibling) {\n var tag = vnode.tag;\n var attrs = vnode.attrs;\n var is = attrs && attrs.is;\n ns = getNameSpace(vnode) || ns;\n var element = ns ? is ? $doc.createElementNS(ns, tag, {\n is: is\n }) : $doc.createElementNS(ns, tag) : is ? $doc.createElement(tag, {\n is: is\n }) : $doc.createElement(tag);\n vnode.dom = element;\n if (attrs != null) setAttrs(vnode, attrs, ns);\n insertNode(parent, element, nextSibling);\n if (!maybeSetContentEditable(vnode)) {\n if (vnode.children != null) {\n var children = vnode.children;\n createNodes(element, children, 0, children.length, hooks, null, ns);\n if (vnode.tag === \"select\" && attrs != null) setLateSelectAttrs(vnode, attrs);\n }\n }\n }\n function initComponent(vnode, hooks) {\n var sentinel;\n if (typeof vnode.tag.view === \"function\") {\n vnode.state = Object.create(vnode.tag);\n sentinel = vnode.state.view;\n if (sentinel.$$reentrantLock$$ != null) return;\n sentinel.$$reentrantLock$$ = true;\n } else {\n vnode.state = void 0;\n sentinel = vnode.tag;\n if (sentinel.$$reentrantLock$$ != null) return;\n sentinel.$$reentrantLock$$ = true;\n vnode.state = vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\" ? new vnode.tag(vnode) : vnode.tag(vnode);\n }\n initLifecycle(vnode.state, vnode, hooks);\n if (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks);\n vnode.instance = $dBs8J.normalize(callHook.call(vnode.state.view, vnode));\n if (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\");\n sentinel.$$reentrantLock$$ = null;\n }\n function createComponent(parent, vnode, hooks, ns, nextSibling) {\n initComponent(vnode, hooks);\n if (vnode.instance != null) {\n createNode(parent, vnode.instance, hooks, ns, nextSibling);\n vnode.dom = vnode.instance.dom;\n vnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0;\n } else vnode.domSize = 0;\n }\n //update\n /**\n\t * @param {Element|Fragment} parent - the parent element\n\t * @param {Vnode[] | null} old - the list of vnodes of the last `render()` call for\n\t * this part of the tree\n\t * @param {Vnode[] | null} vnodes - as above, but for the current `render()` call.\n\t * @param {Function[]} hooks - an accumulator of post-render hooks (oncreate/onupdate)\n\t * @param {Element | null} nextSibling - the next DOM node if we're dealing with a\n\t * fragment that is not the last item in its\n\t * parent\n\t * @param {'svg' | 'math' | String | null} ns) - the current XML namespace, if any\n\t * @returns void\n\t */ // This function diffs and patches lists of vnodes, both keyed and unkeyed.\n //\n // We will:\n //\n // 1. describe its general structure\n // 2. focus on the diff algorithm optimizations\n // 3. discuss DOM node operations.\n // ## Overview:\n //\n // The updateNodes() function:\n // - deals with trivial cases\n // - determines whether the lists are keyed or unkeyed based on the first non-null node\n // of each list.\n // - diffs them and patches the DOM if needed (that's the brunt of the code)\n // - manages the leftovers: after diffing, are there:\n // - old nodes left to remove?\n // \t - new nodes to insert?\n // \t deal with them!\n //\n // The lists are only iterated over once, with an exception for the nodes in `old` that\n // are visited in the fourth part of the diff and in the `removeNodes` loop.\n // ## Diffing\n //\n // Reading https://github.com/localvoid/ivi/blob/ddc09d06abaef45248e6133f7040d00d3c6be853/packages/ivi/src/vdom/implementation.ts#L617-L837\n // may be good for context on longest increasing subsequence-based logic for moving nodes.\n //\n // In order to diff keyed lists, one has to\n //\n // 1) match nodes in both lists, per key, and update them accordingly\n // 2) create the nodes present in the new list, but absent in the old one\n // 3) remove the nodes present in the old list, but absent in the new one\n // 4) figure out what nodes in 1) to move in order to minimize the DOM operations.\n //\n // To achieve 1) one can create a dictionary of keys => index (for the old list), then iterate\n // over the new list and for each new vnode, find the corresponding vnode in the old list using\n // the map.\n // 2) is achieved in the same step: if a new node has no corresponding entry in the map, it is new\n // and must be created.\n // For the removals, we actually remove the nodes that have been updated from the old list.\n // The nodes that remain in that list after 1) and 2) have been performed can be safely removed.\n // The fourth step is a bit more complex and relies on the longest increasing subsequence (LIS)\n // algorithm.\n //\n // the longest increasing subsequence is the list of nodes that can remain in place. Imagine going\n // from `1,2,3,4,5` to `4,5,1,2,3` where the numbers are not necessarily the keys, but the indices\n // corresponding to the keyed nodes in the old list (keyed nodes `e,d,c,b,a` => `b,a,e,d,c` would\n // match the above lists, for example).\n //\n // In there are two increasing subsequences: `4,5` and `1,2,3`, the latter being the longest. We\n // can update those nodes without moving them, and only call `insertNode` on `4` and `5`.\n //\n // @localvoid adapted the algo to also support node deletions and insertions (the `lis` is actually\n // the longest increasing subsequence *of old nodes still present in the new list*).\n //\n // It is a general algorithm that is fireproof in all circumstances, but it requires the allocation\n // and the construction of a `key => oldIndex` map, and three arrays (one with `newIndex => oldIndex`,\n // the `LIS` and a temporary one to create the LIS).\n //\n // So we cheat where we can: if the tails of the lists are identical, they are guaranteed to be part of\n // the LIS and can be updated without moving them.\n //\n // If two nodes are swapped, they are guaranteed not to be part of the LIS, and must be moved (with\n // the exception of the last node if the list is fully reversed).\n //\n // ## Finding the next sibling.\n //\n // `updateNode()` and `createNode()` expect a nextSibling parameter to perform DOM operations.\n // When the list is being traversed top-down, at any index, the DOM nodes up to the previous\n // vnode reflect the content of the new list, whereas the rest of the DOM nodes reflect the old\n // list. The next sibling must be looked for in the old list using `getNextSibling(... oldStart + 1 ...)`.\n //\n // In the other scenarios (swaps, upwards traversal, map-based diff),\n // the new vnodes list is traversed upwards. The DOM nodes at the bottom of the list reflect the\n // bottom part of the new vnodes list, and we can use the `v.dom` value of the previous node\n // as the next sibling (cached in the `nextSibling` variable).\n // ## DOM node moves\n //\n // In most scenarios `updateNode()` and `createNode()` perform the DOM operations. However,\n // this is not the case if the node moved (second and fourth part of the diff algo). We move\n // the old DOM nodes before updateNode runs because it enables us to use the cached `nextSibling`\n // variable rather than fetching it using `getNextSibling()`.\n //\n // The fourth part of the diff currently inserts nodes unconditionally, leading to issues\n // like #1791 and #1999. We need to be smarter about those situations where adjascent old\n // nodes remain together in the new list in a way that isn't covered by parts one and\n // three of the diff algo.\n function updateNodes(parent, old, vnodes, hooks, nextSibling, ns) {\n if (old === vnodes || old == null && vnodes == null) return;\n else if (old == null || old.length === 0) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns);\n else if (vnodes == null || vnodes.length === 0) removeNodes(parent, old, 0, old.length);\n else {\n var isOldKeyed = old[0] != null && old[0].key != null;\n var isKeyed = vnodes[0] != null && vnodes[0].key != null;\n var start = 0, oldStart = 0;\n if (!isOldKeyed) while(oldStart < old.length && old[oldStart] == null)oldStart++;\n if (!isKeyed) while(start < vnodes.length && vnodes[start] == null)start++;\n if (isOldKeyed !== isKeyed) {\n removeNodes(parent, old, oldStart, old.length);\n createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns);\n } else if (!isKeyed) {\n // Don't index past the end of either list (causes deopts).\n var commonLength = old.length < vnodes.length ? old.length : vnodes.length;\n // Rewind if necessary to the first non-null index on either side.\n // We could alternatively either explicitly create or remove nodes when `start !== oldStart`\n // but that would be optimizing for sparse lists which are more rare than dense ones.\n start = start < oldStart ? start : oldStart;\n for(; start < commonLength; start++){\n o = old[start];\n v = vnodes[start];\n if (o === v || o == null && v == null) continue;\n else if (o == null) createNode(parent, v, hooks, ns, getNextSibling(old, start + 1, nextSibling));\n else if (v == null) removeNode(parent, o);\n else updateNode(parent, o, v, hooks, getNextSibling(old, start + 1, nextSibling), ns);\n }\n if (old.length > commonLength) removeNodes(parent, old, start, old.length);\n if (vnodes.length > commonLength) createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns);\n } else {\n // keyed diff\n var oldEnd = old.length - 1, end = vnodes.length - 1, map, o, v, oe, ve, topSibling;\n // bottom-up\n while(oldEnd >= oldStart && end >= start){\n oe = old[oldEnd];\n ve = vnodes[end];\n if (oe.key !== ve.key) break;\n if (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns);\n if (ve.dom != null) nextSibling = ve.dom;\n oldEnd--, end--;\n }\n // top-down\n while(oldEnd >= oldStart && end >= start){\n o = old[oldStart];\n v = vnodes[start];\n if (o.key !== v.key) break;\n oldStart++, start++;\n if (o !== v) updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), ns);\n }\n // swaps and list reversals\n while(oldEnd >= oldStart && end >= start){\n if (start === end) break;\n if (o.key !== ve.key || oe.key !== v.key) break;\n topSibling = getNextSibling(old, oldStart, nextSibling);\n moveNodes(parent, oe, topSibling);\n if (oe !== v) updateNode(parent, oe, v, hooks, topSibling, ns);\n if (++start <= --end) moveNodes(parent, o, nextSibling);\n if (o !== ve) updateNode(parent, o, ve, hooks, nextSibling, ns);\n if (ve.dom != null) nextSibling = ve.dom;\n oldStart++;\n oldEnd--;\n oe = old[oldEnd];\n ve = vnodes[end];\n o = old[oldStart];\n v = vnodes[start];\n }\n // bottom up once again\n while(oldEnd >= oldStart && end >= start){\n if (oe.key !== ve.key) break;\n if (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns);\n if (ve.dom != null) nextSibling = ve.dom;\n oldEnd--, end--;\n oe = old[oldEnd];\n ve = vnodes[end];\n }\n if (start > end) removeNodes(parent, old, oldStart, oldEnd + 1);\n else if (oldStart > oldEnd) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns);\n else {\n // inspired by ivi https://github.com/ivijs/ivi/ by Boris Kaul\n var originalNextSibling = nextSibling, vnodesLength = end - start + 1, oldIndices = new Array(vnodesLength), li = 0, i = 0, pos = 2147483647, matched = 0, map, lisIndices;\n for(i = 0; i < vnodesLength; i++)oldIndices[i] = -1;\n for(i = end; i >= start; i--){\n if (map == null) map = getKeyMap(old, oldStart, oldEnd + 1);\n ve = vnodes[i];\n var oldIndex = map[ve.key];\n if (oldIndex != null) {\n pos = oldIndex < pos ? oldIndex : -1 // becomes -1 if nodes were re-ordered\n ;\n oldIndices[i - start] = oldIndex;\n oe = old[oldIndex];\n old[oldIndex] = null;\n if (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns);\n if (ve.dom != null) nextSibling = ve.dom;\n matched++;\n }\n }\n nextSibling = originalNextSibling;\n if (matched !== oldEnd - oldStart + 1) removeNodes(parent, old, oldStart, oldEnd + 1);\n if (matched === 0) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns);\n else {\n if (pos === -1) {\n // the indices of the indices of the items that are part of the\n // longest increasing subsequence in the oldIndices list\n lisIndices = makeLisIndices(oldIndices);\n li = lisIndices.length - 1;\n for(i = end; i >= start; i--){\n v = vnodes[i];\n if (oldIndices[i - start] === -1) createNode(parent, v, hooks, ns, nextSibling);\n else if (lisIndices[li] === i - start) li--;\n else moveNodes(parent, v, nextSibling);\n if (v.dom != null) nextSibling = vnodes[i].dom;\n }\n } else for(i = end; i >= start; i--){\n v = vnodes[i];\n if (oldIndices[i - start] === -1) createNode(parent, v, hooks, ns, nextSibling);\n if (v.dom != null) nextSibling = vnodes[i].dom;\n }\n }\n }\n }\n }\n }\n function updateNode(parent, old, vnode, hooks, nextSibling, ns) {\n var oldTag = old.tag, tag = vnode.tag;\n if (oldTag === tag) {\n vnode.state = old.state;\n vnode.events = old.events;\n if (shouldNotUpdate(vnode, old)) return;\n if (typeof oldTag === \"string\") {\n if (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks);\n switch(oldTag){\n case \"#\":\n updateText(old, vnode);\n break;\n case \"<\":\n updateHTML(parent, old, vnode, ns, nextSibling);\n break;\n case \"[\":\n updateFragment(parent, old, vnode, hooks, nextSibling, ns);\n break;\n default:\n updateElement(old, vnode, hooks, ns);\n }\n } else updateComponent(parent, old, vnode, hooks, nextSibling, ns);\n } else {\n removeNode(parent, old);\n createNode(parent, vnode, hooks, ns, nextSibling);\n }\n }\n function updateText(old, vnode) {\n if (old.children.toString() !== vnode.children.toString()) old.dom.nodeValue = vnode.children;\n vnode.dom = old.dom;\n }\n function updateHTML(parent, old, vnode, ns, nextSibling) {\n if (old.children !== vnode.children) {\n removeHTML(parent, old);\n createHTML(parent, vnode, ns, nextSibling);\n } else {\n vnode.dom = old.dom;\n vnode.domSize = old.domSize;\n vnode.instance = old.instance;\n }\n }\n function updateFragment(parent, old, vnode, hooks, nextSibling, ns) {\n updateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns);\n var domSize = 0, children = vnode.children;\n vnode.dom = null;\n if (children != null) {\n for(var i = 0; i < children.length; i++){\n var child = children[i];\n if (child != null && child.dom != null) {\n if (vnode.dom == null) vnode.dom = child.dom;\n domSize += child.domSize || 1;\n }\n }\n if (domSize !== 1) vnode.domSize = domSize;\n }\n }\n function updateElement(old, vnode, hooks, ns) {\n var element = vnode.dom = old.dom;\n ns = getNameSpace(vnode) || ns;\n if (vnode.tag === \"textarea\") {\n if (vnode.attrs == null) vnode.attrs = {};\n }\n updateAttrs(vnode, old.attrs, vnode.attrs, ns);\n if (!maybeSetContentEditable(vnode)) updateNodes(element, old.children, vnode.children, hooks, null, ns);\n }\n function updateComponent(parent, old, vnode, hooks, nextSibling, ns) {\n vnode.instance = $dBs8J.normalize(callHook.call(vnode.state.view, vnode));\n if (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\");\n updateLifecycle(vnode.state, vnode, hooks);\n if (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks);\n if (vnode.instance != null) {\n if (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling);\n else updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, ns);\n vnode.dom = vnode.instance.dom;\n vnode.domSize = vnode.instance.domSize;\n } else if (old.instance != null) {\n removeNode(parent, old.instance);\n vnode.dom = undefined;\n vnode.domSize = 0;\n } else {\n vnode.dom = old.dom;\n vnode.domSize = old.domSize;\n }\n }\n function getKeyMap(vnodes, start, end) {\n var map = Object.create(null);\n for(; start < end; start++){\n var vnode = vnodes[start];\n if (vnode != null) {\n var key = vnode.key;\n if (key != null) map[key] = start;\n }\n }\n return map;\n }\n // Lifted from ivi https://github.com/ivijs/ivi/\n // takes a list of unique numbers (-1 is special and can\n // occur multiple times) and returns an array with the indices\n // of the items that are part of the longest increasing\n // subsequence\n var lisTemp = [];\n function makeLisIndices(a) {\n var result = [\n 0\n ];\n var u = 0, v = 0, i = 0;\n var il = lisTemp.length = a.length;\n for(var i = 0; i < il; i++)lisTemp[i] = a[i];\n for(var i = 0; i < il; ++i){\n if (a[i] === -1) continue;\n var j = result[result.length - 1];\n if (a[j] < a[i]) {\n lisTemp[i] = j;\n result.push(i);\n continue;\n }\n u = 0;\n v = result.length - 1;\n while(u < v){\n // Fast integer average without overflow.\n // eslint-disable-next-line no-bitwise\n var c = (u >>> 1) + (v >>> 1) + (u & v & 1);\n if (a[result[c]] < a[i]) u = c + 1;\n else v = c;\n }\n if (a[i] < a[result[u]]) {\n if (u > 0) lisTemp[i] = result[u - 1];\n result[u] = i;\n }\n }\n u = result.length;\n v = result[u - 1];\n while(u-- > 0){\n result[u] = v;\n v = lisTemp[v];\n }\n lisTemp.length = 0;\n return result;\n }\n function getNextSibling(vnodes, i, nextSibling) {\n for(; i < vnodes.length; i++){\n if (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom;\n }\n return nextSibling;\n }\n // This covers a really specific edge case:\n // - Parent node is keyed and contains child\n // - Child is removed, returns unresolved promise in `onbeforeremove`\n // - Parent node is moved in keyed diff\n // - Remaining children still need moved appropriately\n //\n // Ideally, I'd track removed nodes as well, but that introduces a lot more\n // complexity and I'm not exactly interested in doing that.\n function moveNodes(parent, vnode, nextSibling) {\n var frag = $doc.createDocumentFragment();\n moveChildToFrag(parent, frag, vnode);\n insertNode(parent, frag, nextSibling);\n }\n function moveChildToFrag(parent, frag, vnode) {\n // Dodge the recursion overhead in a few of the most common cases.\n while(vnode.dom != null && vnode.dom.parentNode === parent){\n if (typeof vnode.tag !== \"string\") {\n vnode = vnode.instance;\n if (vnode != null) continue;\n } else if (vnode.tag === \"<\") for(var i = 0; i < vnode.instance.length; i++)frag.appendChild(vnode.instance[i]);\n else if (vnode.tag !== \"[\") // Don't recurse for text nodes *or* elements, just fragments\n frag.appendChild(vnode.dom);\n else if (vnode.children.length === 1) {\n vnode = vnode.children[0];\n if (vnode != null) continue;\n } else for(var i = 0; i < vnode.children.length; i++){\n var child = vnode.children[i];\n if (child != null) moveChildToFrag(parent, frag, child);\n }\n break;\n }\n }\n function insertNode(parent, dom, nextSibling) {\n if (nextSibling != null) parent.insertBefore(dom, nextSibling);\n else parent.appendChild(dom);\n }\n function maybeSetContentEditable(vnode) {\n if (vnode.attrs == null || vnode.attrs.contenteditable == null && // attribute\n vnode.attrs.contentEditable == null // property\n ) return false;\n var children = vnode.children;\n if (children != null && children.length === 1 && children[0].tag === \"<\") {\n var content = children[0].children;\n if (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content;\n } else if (children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted.\");\n return true;\n }\n //remove\n function removeNodes(parent, vnodes, start, end) {\n for(var i = start; i < end; i++){\n var vnode = vnodes[i];\n if (vnode != null) removeNode(parent, vnode);\n }\n }\n function removeNode(parent, vnode) {\n var mask = 0;\n var original = vnode.state;\n var stateResult, attrsResult;\n if (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeremove === \"function\") {\n var result = callHook.call(vnode.state.onbeforeremove, vnode);\n if (result != null && typeof result.then === \"function\") {\n mask = 1;\n stateResult = result;\n }\n }\n if (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n var result = callHook.call(vnode.attrs.onbeforeremove, vnode);\n if (result != null && typeof result.then === \"function\") {\n // eslint-disable-next-line no-bitwise\n mask |= 2;\n attrsResult = result;\n }\n }\n checkState(vnode, original);\n // If we can, try to fast-path it and avoid all the overhead of awaiting\n if (!mask) {\n onremove(vnode);\n removeChild(parent, vnode);\n } else {\n if (stateResult != null) {\n var next = function() {\n // eslint-disable-next-line no-bitwise\n if (mask & 1) {\n mask &= 2;\n if (!mask) reallyRemove();\n }\n };\n stateResult.then(next, next);\n }\n if (attrsResult != null) {\n var next = function() {\n // eslint-disable-next-line no-bitwise\n if (mask & 2) {\n mask &= 1;\n if (!mask) reallyRemove();\n }\n };\n attrsResult.then(next, next);\n }\n }\n function reallyRemove() {\n checkState(vnode, original);\n onremove(vnode);\n removeChild(parent, vnode);\n }\n }\n function removeHTML(parent, vnode) {\n for(var i = 0; i < vnode.instance.length; i++)parent.removeChild(vnode.instance[i]);\n }\n function removeChild(parent, vnode) {\n // Dodge the recursion overhead in a few of the most common cases.\n while(vnode.dom != null && vnode.dom.parentNode === parent){\n if (typeof vnode.tag !== \"string\") {\n vnode = vnode.instance;\n if (vnode != null) continue;\n } else if (vnode.tag === \"<\") removeHTML(parent, vnode);\n else {\n if (vnode.tag !== \"[\") {\n parent.removeChild(vnode.dom);\n if (!Array.isArray(vnode.children)) break;\n }\n if (vnode.children.length === 1) {\n vnode = vnode.children[0];\n if (vnode != null) continue;\n } else for(var i = 0; i < vnode.children.length; i++){\n var child = vnode.children[i];\n if (child != null) removeChild(parent, child);\n }\n }\n break;\n }\n }\n function onremove(vnode) {\n if (typeof vnode.tag !== \"string\" && typeof vnode.state.onremove === \"function\") callHook.call(vnode.state.onremove, vnode);\n if (vnode.attrs && typeof vnode.attrs.onremove === \"function\") callHook.call(vnode.attrs.onremove, vnode);\n if (typeof vnode.tag !== \"string\") {\n if (vnode.instance != null) onremove(vnode.instance);\n } else {\n var children = vnode.children;\n if (Array.isArray(children)) for(var i = 0; i < children.length; i++){\n var child = children[i];\n if (child != null) onremove(child);\n }\n }\n }\n //attrs\n function setAttrs(vnode, attrs, ns) {\n // If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n //\n // Also, the DOM does things to inputs based on the value, so it needs set first.\n // See: https://github.com/MithrilJS/mithril.js/issues/2622\n if (vnode.tag === \"input\" && attrs.type != null) vnode.dom.setAttribute(\"type\", attrs.type);\n var isFileInput = attrs != null && vnode.tag === \"input\" && attrs.type === \"file\";\n for(var key in attrs)setAttr(vnode, key, null, attrs[key], ns, isFileInput);\n }\n function setAttr(vnode, key, old, value, ns, isFileInput) {\n if (key === \"key\" || key === \"is\" || value == null || isLifecycleMethod(key) || old === value && !isFormAttribute(vnode, key) && typeof value !== \"object\" || key === \"type\" && vnode.tag === \"input\") return;\n if (key[0] === \"o\" && key[1] === \"n\") return updateEvent(vnode, key, value);\n if (key.slice(0, 6) === \"xlink:\") vnode.dom.setAttributeNS(\"http://www.w3.org/1999/xlink\", key.slice(6), value);\n else if (key === \"style\") updateStyle(vnode.dom, old, value);\n else if (hasPropertyKey(vnode, key, ns)) {\n if (key === \"value\") {\n // Only do the coercion if we're actually going to check the value.\n /* eslint-disable no-implicit-coercion */ //setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n //setting input[type=file][value] to same value causes an error to be generated if it's non-empty\n if ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === \"\" + value && (isFileInput || vnode.dom === activeElement())) return;\n //setting select[value] to same value while having select open blinks select dropdown in Chrome\n if (vnode.tag === \"select\" && old !== null && vnode.dom.value === \"\" + value) return;\n //setting option[value] to same value while having select open blinks select dropdown in Chrome\n if (vnode.tag === \"option\" && old !== null && vnode.dom.value === \"\" + value) return;\n //setting input[type=file][value] to different value is an error if it's non-empty\n // Not ideal, but it at least works around the most common source of uncaught exceptions for now.\n if (isFileInput && \"\" + value !== \"\") {\n console.error(\"`value` is read-only on file inputs!\");\n return;\n }\n /* eslint-enable no-implicit-coercion */ }\n vnode.dom[key] = value;\n } else if (typeof value === \"boolean\") {\n if (value) vnode.dom.setAttribute(key, \"\");\n else vnode.dom.removeAttribute(key);\n } else vnode.dom.setAttribute(key === \"className\" ? \"class\" : key, value);\n }\n function removeAttr(vnode, key, old, ns) {\n if (key === \"key\" || key === \"is\" || old == null || isLifecycleMethod(key)) return;\n if (key[0] === \"o\" && key[1] === \"n\") updateEvent(vnode, key, undefined);\n else if (key === \"style\") updateStyle(vnode.dom, old, null);\n else if (hasPropertyKey(vnode, key, ns) && key !== \"className\" && key !== \"title\" // creates \"null\" as title\n && !(key === \"value\" && (vnode.tag === \"option\" || vnode.tag === \"select\" && vnode.dom.selectedIndex === -1 && vnode.dom === activeElement())) && !(vnode.tag === \"input\" && key === \"type\")) vnode.dom[key] = null;\n else {\n var nsLastIndex = key.indexOf(\":\");\n if (nsLastIndex !== -1) key = key.slice(nsLastIndex + 1);\n if (old !== false) vnode.dom.removeAttribute(key === \"className\" ? \"class\" : key);\n }\n }\n function setLateSelectAttrs(vnode, attrs) {\n if (\"value\" in attrs) {\n if (attrs.value === null) {\n if (vnode.dom.selectedIndex !== -1) vnode.dom.value = null;\n } else {\n var normalized = \"\" + attrs.value // eslint-disable-line no-implicit-coercion\n ;\n if (vnode.dom.value !== normalized || vnode.dom.selectedIndex === -1) vnode.dom.value = normalized;\n }\n }\n if (\"selectedIndex\" in attrs) setAttr(vnode, \"selectedIndex\", null, attrs.selectedIndex, undefined);\n }\n function updateAttrs(vnode, old, attrs, ns) {\n if (old && old === attrs) console.warn(\"Don't reuse attrs object, use new object for every redraw, this will throw in next major\");\n if (attrs != null) {\n // If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n //\n // Also, the DOM does things to inputs based on the value, so it needs set first.\n // See: https://github.com/MithrilJS/mithril.js/issues/2622\n if (vnode.tag === \"input\" && attrs.type != null) vnode.dom.setAttribute(\"type\", attrs.type);\n var isFileInput = vnode.tag === \"input\" && attrs.type === \"file\";\n for(var key in attrs)setAttr(vnode, key, old && old[key], attrs[key], ns, isFileInput);\n }\n var val;\n if (old != null) {\n for(var key in old)if ((val = old[key]) != null && (attrs == null || attrs[key] == null)) removeAttr(vnode, key, val, ns);\n }\n }\n function isFormAttribute(vnode, attr) {\n return attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === activeElement() || vnode.tag === \"option\" && vnode.dom.parentNode === $doc.activeElement;\n }\n function isLifecycleMethod(attr) {\n return attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\";\n }\n function hasPropertyKey(vnode, key, ns) {\n // Filter out namespaced keys\n return ns === undefined && // If it's a custom element, just keep it.\n (vnode.tag.indexOf(\"-\") > -1 || vnode.attrs != null && vnode.attrs.is || // If it's a normal element, let's try to avoid a few browser bugs.\n key !== \"href\" && key !== \"list\" && key !== \"form\" && key !== \"width\" && key !== \"height\" // && key !== \"type\"\n ) && key in vnode.dom;\n }\n //style\n var uppercaseRegex = /[A-Z]/g;\n function toLowerCase(capital) {\n return \"-\" + capital.toLowerCase();\n }\n function normalizeKey(key) {\n return key[0] === \"-\" && key[1] === \"-\" ? key : key === \"cssFloat\" ? \"float\" : key.replace(uppercaseRegex, toLowerCase);\n }\n function updateStyle(element, old, style) {\n if (old === style) ;\n else if (style == null) // New style is missing, just clear it.\n element.style.cssText = \"\";\n else if (typeof style !== \"object\") // New style is a string, let engine deal with patching.\n element.style.cssText = style;\n else if (old == null || typeof old !== \"object\") {\n // `old` is missing or a string, `style` is an object.\n element.style.cssText = \"\";\n // Add new style properties\n for(var key in style){\n var value = style[key];\n if (value != null) element.style.setProperty(normalizeKey(key), String(value));\n }\n } else {\n // Both old & new are (different) objects.\n // Update style properties that have changed\n for(var key in style){\n var value = style[key];\n if (value != null && (value = String(value)) !== String(old[key])) element.style.setProperty(normalizeKey(key), value);\n }\n // Remove style properties that no longer exist\n for(var key in old)if (old[key] != null && style[key] == null) element.style.removeProperty(normalizeKey(key));\n }\n }\n // Here's an explanation of how this works:\n // 1. The event names are always (by design) prefixed by `on`.\n // 2. The EventListener interface accepts either a function or an object\n // with a `handleEvent` method.\n // 3. The object does not inherit from `Object.prototype`, to avoid\n // any potential interference with that (e.g. setters).\n // 4. The event name is remapped to the handler before calling it.\n // 5. In function-based event handlers, `ev.target === this`. We replicate\n // that below.\n // 6. In function-based event handlers, `return false` prevents the default\n // action and stops event propagation. We replicate that below.\n function EventDict() {\n // Save this, so the current redraw is correctly tracked.\n this._ = currentRedraw;\n }\n EventDict.prototype = Object.create(null);\n EventDict.prototype.handleEvent = function(ev) {\n var handler = this[\"on\" + ev.type];\n var result;\n if (typeof handler === \"function\") result = handler.call(ev.currentTarget, ev);\n else if (typeof handler.handleEvent === \"function\") handler.handleEvent(ev);\n if (this._ && ev.redraw !== false) (0, this._)();\n if (result === false) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n };\n //event\n function updateEvent(vnode, key, value) {\n if (vnode.events != null) {\n vnode.events._ = currentRedraw;\n if (vnode.events[key] === value) return;\n if (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n if (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false);\n vnode.events[key] = value;\n } else {\n if (vnode.events[key] != null) vnode.dom.removeEventListener(key.slice(2), vnode.events, false);\n vnode.events[key] = undefined;\n }\n } else if (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n vnode.events = new EventDict();\n vnode.dom.addEventListener(key.slice(2), vnode.events, false);\n vnode.events[key] = value;\n }\n }\n //lifecycle\n function initLifecycle(source, vnode, hooks) {\n if (typeof source.oninit === \"function\") callHook.call(source.oninit, vnode);\n if (typeof source.oncreate === \"function\") hooks.push(callHook.bind(source.oncreate, vnode));\n }\n function updateLifecycle(source, vnode, hooks) {\n if (typeof source.onupdate === \"function\") hooks.push(callHook.bind(source.onupdate, vnode));\n }\n function shouldNotUpdate(vnode, old) {\n do {\n if (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") {\n var force = callHook.call(vnode.attrs.onbeforeupdate, vnode, old);\n if (force !== undefined && !force) break;\n }\n if (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeupdate === \"function\") {\n var force = callHook.call(vnode.state.onbeforeupdate, vnode, old);\n if (force !== undefined && !force) break;\n }\n return false;\n }while (false); // eslint-disable-line no-constant-condition\n vnode.dom = old.dom;\n vnode.domSize = old.domSize;\n vnode.instance = old.instance;\n // One would think having the actual latest attributes would be ideal,\n // but it doesn't let us properly diff based on our current internal\n // representation. We have to save not only the old DOM info, but also\n // the attributes used to create it, as we diff *that*, not against the\n // DOM directly (with a few exceptions in `setAttr`). And, of course, we\n // need to save the children and text as they are conceptually not\n // unlike special \"attributes\" internally.\n vnode.attrs = old.attrs;\n vnode.children = old.children;\n vnode.text = old.text;\n return true;\n }\n var currentDOM;\n return function(dom, vnodes, redraw) {\n if (!dom) throw new TypeError(\"DOM element being rendered to does not exist.\");\n if (currentDOM != null && dom.contains(currentDOM)) throw new TypeError(\"Node is currently being rendered to and thus is locked.\");\n var prevRedraw = currentRedraw;\n var prevDOM = currentDOM;\n var hooks = [];\n var active = activeElement();\n var namespace = dom.namespaceURI;\n currentDOM = dom;\n currentRedraw = typeof redraw === \"function\" ? redraw : undefined;\n try {\n // First time rendering into a node clears it out\n if (dom.vnodes == null) dom.textContent = \"\";\n vnodes = $dBs8J.normalizeChildren(Array.isArray(vnodes) ? vnodes : [\n vnodes\n ]);\n updateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace);\n dom.vnodes = vnodes;\n // `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement\n if (active != null && activeElement() !== active && typeof active.focus === \"function\") active.focus();\n for(var i = 0; i < hooks.length; i++)hooks[i]();\n } finally{\n currentRedraw = prevRedraw;\n currentDOM = prevDOM;\n }\n };\n};\n\n});\n\n\nparcelRegister(\"iZais\", function(module, exports) {\n\"use strict\";\n\nvar $dBs8J = parcelRequire(\"dBs8J\");\nmodule.exports = function(render, schedule, console) {\n var subscriptions = [];\n var pending = false;\n var offset = -1;\n function sync() {\n for(offset = 0; offset < subscriptions.length; offset += 2)try {\n render(subscriptions[offset], $dBs8J(subscriptions[offset + 1]), redraw);\n } catch (e) {\n console.error(e);\n }\n offset = -1;\n }\n function redraw() {\n if (!pending) {\n pending = true;\n schedule(function() {\n pending = false;\n sync();\n });\n }\n }\n redraw.sync = sync;\n function mount(root, component) {\n if (component != null && component.view == null && typeof component !== \"function\") throw new TypeError(\"m.mount expects a component, not a vnode.\");\n var index = subscriptions.indexOf(root);\n if (index >= 0) {\n subscriptions.splice(index, 2);\n if (index <= offset) offset -= 2;\n render(root, []);\n }\n if (component != null) {\n subscriptions.push(root, component);\n render(root, $dBs8J(component), redraw);\n }\n }\n return {\n mount: mount,\n redraw: redraw\n };\n};\n\n});\n\nparcelRegister(\"5y2KI\", function(module, exports) {\n\"use strict\";\n\nvar $cITMw = parcelRequire(\"cITMw\");\n\nvar $9eOch = parcelRequire(\"9eOch\");\nmodule.exports = function($window, Promise, oncompletion) {\n var callbackCount = 0;\n function PromiseProxy(executor) {\n return new Promise(executor);\n }\n // In case the global Promise is some userland library's where they rely on\n // `foo instanceof this.constructor`, `this.constructor.resolve(value)`, or\n // similar. Let's *not* break them.\n PromiseProxy.prototype = Promise.prototype;\n PromiseProxy.__proto__ = Promise // eslint-disable-line no-proto\n ;\n function makeRequest(factory) {\n return function(url, args) {\n if (typeof url !== \"string\") {\n args = url;\n url = url.url;\n } else if (args == null) args = {};\n var promise = new Promise(function(resolve, reject) {\n factory($cITMw(url, args.params), args, function(data) {\n if (typeof args.type === \"function\") {\n if (Array.isArray(data)) for(var i = 0; i < data.length; i++)data[i] = new args.type(data[i]);\n else data = new args.type(data);\n }\n resolve(data);\n }, reject);\n });\n if (args.background === true) return promise;\n var count = 0;\n function complete() {\n if (--count === 0 && typeof oncompletion === \"function\") oncompletion();\n }\n return wrap(promise);\n function wrap(promise) {\n var then = promise.then;\n // Set the constructor, so engines know to not await or resolve\n // this as a native promise. At the time of writing, this is\n // only necessary for V8, but their behavior is the correct\n // behavior per spec. See this spec issue for more details:\n // https://github.com/tc39/ecma262/issues/1577. Also, see the\n // corresponding comment in `request/tests/test-request.js` for\n // a bit more background on the issue at hand.\n promise.constructor = PromiseProxy;\n promise.then = function() {\n count++;\n var next = then.apply(promise, arguments);\n next.then(complete, function(e) {\n complete();\n if (count === 0) throw e;\n });\n return wrap(next);\n };\n return promise;\n }\n };\n }\n function hasHeader(args, name) {\n for(var key in args.headers){\n if ($9eOch.call(args.headers, key) && key.toLowerCase() === name) return true;\n }\n return false;\n }\n return {\n request: makeRequest(function(url, args, resolve, reject) {\n var method = args.method != null ? args.method.toUpperCase() : \"GET\";\n var body = args.body;\n var assumeJSON = (args.serialize == null || args.serialize === JSON.serialize) && !(body instanceof $window.FormData || body instanceof $window.URLSearchParams);\n var responseType = args.responseType || (typeof args.extract === \"function\" ? \"\" : \"json\");\n var xhr = new $window.XMLHttpRequest(), aborted = false, isTimeout = false;\n var original = xhr, replacedAbort;\n var abort = xhr.abort;\n xhr.abort = function() {\n aborted = true;\n abort.call(this);\n };\n xhr.open(method, url, args.async !== false, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined);\n if (assumeJSON && body != null && !hasHeader(args, \"content-type\")) xhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\");\n if (typeof args.deserialize !== \"function\" && !hasHeader(args, \"accept\")) xhr.setRequestHeader(\"Accept\", \"application/json, text/*\");\n if (args.withCredentials) xhr.withCredentials = args.withCredentials;\n if (args.timeout) xhr.timeout = args.timeout;\n xhr.responseType = responseType;\n for(var key in args.headers)if ($9eOch.call(args.headers, key)) xhr.setRequestHeader(key, args.headers[key]);\n xhr.onreadystatechange = function(ev) {\n // Don't throw errors on xhr.abort().\n if (aborted) return;\n if (ev.target.readyState === 4) try {\n var success = ev.target.status >= 200 && ev.target.status < 300 || ev.target.status === 304 || /^file:\\/\\//i.test(url);\n // When the response type isn't \"\" or \"text\",\n // `xhr.responseText` is the wrong thing to use.\n // Browsers do the right thing and throw here, and we\n // should honor that and do the right thing by\n // preferring `xhr.response` where possible/practical.\n var response = ev.target.response, message;\n if (responseType === \"json\") {\n // For IE and Edge, which don't implement\n // `responseType: \"json\"`.\n if (!ev.target.responseType && typeof args.extract !== \"function\") // Handle no-content which will not parse.\n try {\n response = JSON.parse(ev.target.responseText);\n } catch (e) {\n response = null;\n }\n } else if (!responseType || responseType === \"text\") // Only use this default if it's text. If a parsed\n // document is needed on old IE and friends (all\n // unsupported), the user should use a custom\n // `config` instead. They're already using this at\n // their own risk.\n {\n if (response == null) response = ev.target.responseText;\n }\n if (typeof args.extract === \"function\") {\n response = args.extract(ev.target, args);\n success = true;\n } else if (typeof args.deserialize === \"function\") response = args.deserialize(response);\n if (success) resolve(response);\n else {\n var completeErrorResponse = function() {\n try {\n message = ev.target.responseText;\n } catch (e) {\n message = response;\n }\n var error = new Error(message);\n error.code = ev.target.status;\n error.response = response;\n reject(error);\n };\n if (xhr.status === 0) // Use setTimeout to push this code block onto the event queue\n // This allows `xhr.ontimeout` to run in the case that there is a timeout\n // Without this setTimeout, `xhr.ontimeout` doesn't have a chance to reject\n // as `xhr.onreadystatechange` will run before it\n setTimeout(function() {\n if (isTimeout) return;\n completeErrorResponse();\n });\n else completeErrorResponse();\n }\n } catch (e) {\n reject(e);\n }\n };\n xhr.ontimeout = function(ev) {\n isTimeout = true;\n var error = new Error(\"Request timed out\");\n error.code = ev.target.status;\n reject(error);\n };\n if (typeof args.config === \"function\") {\n xhr = args.config(xhr, args, url) || xhr;\n // Propagate the `abort` to any replacement XHR as well.\n if (xhr !== original) {\n replacedAbort = xhr.abort;\n xhr.abort = function() {\n aborted = true;\n replacedAbort.call(this);\n };\n }\n }\n if (body == null) xhr.send();\n else if (typeof args.serialize === \"function\") xhr.send(args.serialize(body));\n else if (body instanceof $window.FormData || body instanceof $window.URLSearchParams) xhr.send(body);\n else xhr.send(JSON.stringify(body));\n }),\n jsonp: makeRequest(function(url, args, resolve, reject) {\n var callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++;\n var script = $window.document.createElement(\"script\");\n $window[callbackName] = function(data) {\n delete $window[callbackName];\n script.parentNode.removeChild(script);\n resolve(data);\n };\n script.onerror = function() {\n delete $window[callbackName];\n script.parentNode.removeChild(script);\n reject(new Error(\"JSONP request failed\"));\n };\n script.src = url + (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") + encodeURIComponent(args.callbackKey || \"callback\") + \"=\" + encodeURIComponent(callbackName);\n $window.document.documentElement.appendChild(script);\n })\n };\n};\n\n});\nparcelRegister(\"cITMw\", function(module, exports) {\n\"use strict\";\n\nvar $iRA82 = parcelRequire(\"iRA82\");\n\nvar $enXzN = parcelRequire(\"enXzN\");\n// Returns `path` from `template` + `params`\nmodule.exports = function(template, params) {\n if (/:([^\\/\\.-]+)(\\.{3})?:/.test(template)) throw new SyntaxError(\"Template parameter names must be separated by either a '/', '-', or '.'.\");\n if (params == null) return template;\n var queryIndex = template.indexOf(\"?\");\n var hashIndex = template.indexOf(\"#\");\n var queryEnd = hashIndex < 0 ? template.length : hashIndex;\n var pathEnd = queryIndex < 0 ? queryEnd : queryIndex;\n var path = template.slice(0, pathEnd);\n var query = {};\n $enXzN(query, params);\n var resolved = path.replace(/:([^\\/\\.-]+)(\\.{3})?/g, function(m, key, variadic) {\n delete query[key];\n // If no such parameter exists, don't interpolate it.\n if (params[key] == null) return m;\n // Escape normal parameters, but not variadic ones.\n return variadic ? params[key] : encodeURIComponent(String(params[key]));\n });\n // In case the template substitution adds new query/hash parameters.\n var newQueryIndex = resolved.indexOf(\"?\");\n var newHashIndex = resolved.indexOf(\"#\");\n var newQueryEnd = newHashIndex < 0 ? resolved.length : newHashIndex;\n var newPathEnd = newQueryIndex < 0 ? newQueryEnd : newQueryIndex;\n var result = resolved.slice(0, newPathEnd);\n if (queryIndex >= 0) result += template.slice(queryIndex, queryEnd);\n if (newQueryIndex >= 0) result += (queryIndex < 0 ? \"?\" : \"&\") + resolved.slice(newQueryIndex, newQueryEnd);\n var querystring = $iRA82(query);\n if (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? \"?\" : \"&\") + querystring;\n if (hashIndex >= 0) result += template.slice(hashIndex);\n if (newHashIndex >= 0) result += (hashIndex < 0 ? \"\" : \"&\") + resolved.slice(newHashIndex);\n return result;\n};\n\n});\nparcelRegister(\"iRA82\", function(module, exports) {\n\"use strict\";\nmodule.exports = function(object) {\n if (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\";\n var args = [];\n for(var key in object)destructure(key, object[key]);\n return args.join(\"&\");\n function destructure(key, value) {\n if (Array.isArray(value)) for(var i = 0; i < value.length; i++)destructure(key + \"[\" + i + \"]\", value[i]);\n else if (Object.prototype.toString.call(value) === \"[object Object]\") for(var i in value)destructure(key + \"[\" + i + \"]\", value[i]);\n else args.push(encodeURIComponent(key) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"));\n }\n};\n\n});\n\nparcelRegister(\"enXzN\", function(module, exports) {\n// This exists so I'm only saving it once.\n\"use strict\";\n\nvar $9eOch = parcelRequire(\"9eOch\");\nmodule.exports = Object.assign || function(target, source) {\n for(var key in source)if ($9eOch.call(source, key)) target[key] = source[key];\n};\n\n});\nparcelRegister(\"9eOch\", function(module, exports) {\n// This exists so I'm only saving it once.\n\"use strict\";\nmodule.exports = ({}).hasOwnProperty;\n\n});\n\n\n\n\nparcelRegister(\"4Ppi2\", function(module, exports) {\n\"use strict\";\n\nvar $7EF0O = parcelRequire(\"7EF0O\");\n\nmodule.exports = (parcelRequire(\"eFHZ8\"))(typeof window !== \"undefined\" ? window : null, $7EF0O);\n\n});\nparcelRegister(\"7EF0O\", function(module, exports) {\n\"use strict\";\n\nvar $j25vk = parcelRequire(\"j25vk\");\n\nmodule.exports = (parcelRequire(\"iZais\"))($j25vk, typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : null, typeof console !== \"undefined\" ? console : null);\n\n});\n\nparcelRegister(\"eFHZ8\", function(module, exports) {\n\"use strict\";\n\nvar $dBs8J = parcelRequire(\"dBs8J\");\n\nvar $iVcuU = parcelRequire(\"iVcuU\");\n\nvar $2uPnQ = parcelRequire(\"2uPnQ\");\n\nvar $cITMw = parcelRequire(\"cITMw\");\n\nvar $7lWrV = parcelRequire(\"7lWrV\");\n\nvar $8KlxE = parcelRequire(\"8KlxE\");\n\nvar $enXzN = parcelRequire(\"enXzN\");\n\nvar $e9o88 = parcelRequire(\"e9o88\");\nvar $aae70388e69e8325$var$sentinel = {};\nfunction $aae70388e69e8325$var$decodeURIComponentSave(component) {\n try {\n return decodeURIComponent(component);\n } catch (e) {\n return component;\n }\n}\nmodule.exports = function($window, mountRedraw) {\n var callAsync = $window == null ? null : typeof $window.setImmediate === \"function\" ? $window.setImmediate : $window.setTimeout;\n var p = $2uPnQ.resolve();\n var scheduled = false;\n // state === 0: init\n // state === 1: scheduled\n // state === 2: done\n var ready = false;\n var state = 0;\n var compiled, fallbackRoute;\n var currentResolver = $aae70388e69e8325$var$sentinel, component, attrs, currentPath, lastUpdate;\n var RouterRoot = {\n onbeforeupdate: function() {\n state = state ? 2 : 1;\n return !(!state || $aae70388e69e8325$var$sentinel === currentResolver);\n },\n onremove: function() {\n $window.removeEventListener(\"popstate\", fireAsync, false);\n $window.removeEventListener(\"hashchange\", resolveRoute, false);\n },\n view: function() {\n if (!state || $aae70388e69e8325$var$sentinel === currentResolver) return;\n // Wrap in a fragment to preserve existing key semantics\n var vnode = [\n $dBs8J(component, attrs.key, attrs)\n ];\n if (currentResolver) vnode = currentResolver.render(vnode[0]);\n return vnode;\n }\n };\n var SKIP = route.SKIP = {};\n function resolveRoute() {\n scheduled = false;\n // Consider the pathname holistically. The prefix might even be invalid,\n // but that's not our problem.\n var prefix = $window.location.hash;\n if (route.prefix[0] !== \"#\") {\n prefix = $window.location.search + prefix;\n if (route.prefix[0] !== \"?\") {\n prefix = $window.location.pathname + prefix;\n if (prefix[0] !== \"/\") prefix = \"/\" + prefix;\n }\n }\n // This seemingly useless `.concat()` speeds up the tests quite a bit,\n // since the representation is consistently a relatively poorly\n // optimized cons string.\n var path = prefix.concat().replace(/(?:%[a-f89][a-f0-9])+/gim, $aae70388e69e8325$var$decodeURIComponentSave).slice(route.prefix.length);\n var data = $7lWrV(path);\n $enXzN(data.params, $window.history.state);\n function reject(e) {\n console.error(e);\n setPath(fallbackRoute, null, {\n replace: true\n });\n }\n loop(0);\n function loop(i) {\n // state === 0: init\n // state === 1: scheduled\n // state === 2: done\n for(; i < compiled.length; i++)if (compiled[i].check(data)) {\n var payload = compiled[i].component;\n var matchedRoute = compiled[i].route;\n var localComp = payload;\n var update = lastUpdate = function(comp) {\n if (update !== lastUpdate) return;\n if (comp === SKIP) return loop(i + 1);\n component = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\") ? comp : \"div\";\n attrs = data.params, currentPath = path, lastUpdate = null;\n currentResolver = payload.render ? payload : null;\n if (state === 2) mountRedraw.redraw();\n else {\n state = 2;\n mountRedraw.redraw.sync();\n }\n };\n // There's no understating how much I *wish* I could\n // use `async`/`await` here...\n if (payload.view || typeof payload === \"function\") {\n payload = {};\n update(localComp);\n } else if (payload.onmatch) p.then(function() {\n return payload.onmatch(data.params, path, matchedRoute);\n }).then(update, path === fallbackRoute ? null : reject);\n else update(\"div\");\n return;\n }\n if (path === fallbackRoute) throw new Error(\"Could not resolve default route \" + fallbackRoute + \".\");\n setPath(fallbackRoute, null, {\n replace: true\n });\n }\n }\n // Set it unconditionally so `m.route.set` and `m.route.Link` both work,\n // even if neither `pushState` nor `hashchange` are supported. It's\n // cleared if `hashchange` is used, since that makes it automatically\n // async.\n function fireAsync() {\n if (!scheduled) {\n scheduled = true;\n // TODO: just do `mountRedraw.redraw()` here and elide the timer\n // dependency. Note that this will muck with tests a *lot*, so it's\n // not as easy of a change as it sounds.\n callAsync(resolveRoute);\n }\n }\n function setPath(path, data, options) {\n path = $cITMw(path, data);\n if (ready) {\n fireAsync();\n var state = options ? options.state : null;\n var title = options ? options.title : null;\n if (options && options.replace) $window.history.replaceState(state, title, route.prefix + path);\n else $window.history.pushState(state, title, route.prefix + path);\n } else $window.location.href = route.prefix + path;\n }\n function route(root, defaultRoute, routes) {\n if (!root) throw new TypeError(\"DOM element being rendered to does not exist.\");\n compiled = Object.keys(routes).map(function(route) {\n if (route[0] !== \"/\") throw new SyntaxError(\"Routes must start with a '/'.\");\n if (/:([^\\/\\.-]+)(\\.{3})?:/.test(route)) throw new SyntaxError(\"Route parameter names must be separated with either '/', '.', or '-'.\");\n return {\n route: route,\n component: routes[route],\n check: $8KlxE(route)\n };\n });\n fallbackRoute = defaultRoute;\n if (defaultRoute != null) {\n var defaultData = $7lWrV(defaultRoute);\n if (!compiled.some(function(i) {\n return i.check(defaultData);\n })) throw new ReferenceError(\"Default route doesn't match any known routes.\");\n }\n if (typeof $window.history.pushState === \"function\") $window.addEventListener(\"popstate\", fireAsync, false);\n else if (route.prefix[0] === \"#\") $window.addEventListener(\"hashchange\", resolveRoute, false);\n ready = true;\n mountRedraw.mount(root, RouterRoot);\n resolveRoute();\n }\n route.set = function(path, data, options) {\n if (lastUpdate != null) {\n options = options || {};\n options.replace = true;\n }\n lastUpdate = null;\n setPath(path, data, options);\n };\n route.get = function() {\n return currentPath;\n };\n route.prefix = \"#!\";\n route.Link = {\n view: function(vnode) {\n // Omit the used parameters from the rendered element - they are\n // internal. Also, censor the various lifecycle methods.\n //\n // We don't strip the other parameters because for convenience we\n // let them be specified in the selector as well.\n var child = $iVcuU(vnode.attrs.selector || \"a\", $e9o88(vnode.attrs, [\n \"options\",\n \"params\",\n \"selector\",\n \"onclick\"\n ]), vnode.children);\n var options, onclick, href;\n // Let's provide a *right* way to disable a route link, rather than\n // letting people screw up accessibility on accident.\n //\n // The attribute is coerced so users don't get surprised over\n // `disabled: 0` resulting in a button that's somehow routable\n // despite being visibly disabled.\n if (child.attrs.disabled = Boolean(child.attrs.disabled)) {\n child.attrs.href = null;\n child.attrs[\"aria-disabled\"] = \"true\";\n // If you *really* do want add `onclick` on a disabled link, use\n // an `oncreate` hook to add it.\n } else {\n options = vnode.attrs.options;\n onclick = vnode.attrs.onclick;\n // Easier to build it now to keep it isomorphic.\n href = $cITMw(child.attrs.href, vnode.attrs.params);\n child.attrs.href = route.prefix + href;\n child.attrs.onclick = function(e) {\n var result;\n if (typeof onclick === \"function\") result = onclick.call(e.currentTarget, e);\n else if (onclick == null || typeof onclick !== \"object\") ;\n else if (typeof onclick.handleEvent === \"function\") onclick.handleEvent(e);\n // Adapted from React Router's implementation:\n // https://github.com/ReactTraining/react-router/blob/520a0acd48ae1b066eb0b07d6d4d1790a1d02482/packages/react-router-dom/modules/Link.js\n //\n // Try to be flexible and intuitive in how we handle links.\n // Fun fact: links aren't as obvious to get right as you\n // would expect. There's a lot more valid ways to click a\n // link than this, and one might want to not simply click a\n // link, but right click or command-click it to copy the\n // link target, etc. Nope, this isn't just for blind people.\n if (// Skip if `onclick` prevented default\n result !== false && !e.defaultPrevented && // Ignore everything but left clicks\n (e.button === 0 || e.which === 0 || e.which === 1) && // Let the browser handle `target=_blank`, etc.\n (!e.currentTarget.target || e.currentTarget.target === \"_self\") && // No modifier keys\n !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey) {\n e.preventDefault();\n e.redraw = false;\n route.set(href, null, options);\n }\n };\n }\n return child;\n }\n };\n route.param = function(key) {\n return attrs && key != null ? attrs[key] : attrs;\n };\n return route;\n};\n\n});\nparcelRegister(\"iVcuU\", function(module, exports) {\n\"use strict\";\n\nvar $dBs8J = parcelRequire(\"dBs8J\");\n\nvar $5sRXF = parcelRequire(\"5sRXF\");\n\nvar $9eOch = parcelRequire(\"9eOch\");\nvar $dc673ea23ab51a3f$var$selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g;\nvar $dc673ea23ab51a3f$var$selectorCache = {};\nfunction $dc673ea23ab51a3f$var$isEmpty(object) {\n for(var key in object)if ($9eOch.call(object, key)) return false;\n return true;\n}\nfunction $dc673ea23ab51a3f$var$compileSelector(selector) {\n var match, tag = \"div\", classes = [], attrs = {};\n while(match = $dc673ea23ab51a3f$var$selectorParser.exec(selector)){\n var type = match[1], value = match[2];\n if (type === \"\" && value !== \"\") tag = value;\n else if (type === \"#\") attrs.id = value;\n else if (type === \".\") classes.push(value);\n else if (match[3][0] === \"[\") {\n var attrValue = match[6];\n if (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\");\n if (match[4] === \"class\") classes.push(attrValue);\n else attrs[match[4]] = attrValue === \"\" ? attrValue : attrValue || true;\n }\n }\n if (classes.length > 0) attrs.className = classes.join(\" \");\n return $dc673ea23ab51a3f$var$selectorCache[selector] = {\n tag: tag,\n attrs: attrs\n };\n}\nfunction $dc673ea23ab51a3f$var$execSelector(state, vnode) {\n var attrs = vnode.attrs;\n var hasClass = $9eOch.call(attrs, \"class\");\n var className = hasClass ? attrs.class : attrs.className;\n vnode.tag = state.tag;\n vnode.attrs = {};\n if (!$dc673ea23ab51a3f$var$isEmpty(state.attrs) && !$dc673ea23ab51a3f$var$isEmpty(attrs)) {\n var newAttrs = {};\n for(var key in attrs)if ($9eOch.call(attrs, key)) newAttrs[key] = attrs[key];\n attrs = newAttrs;\n }\n for(var key in state.attrs)if ($9eOch.call(state.attrs, key) && key !== \"className\" && !$9eOch.call(attrs, key)) attrs[key] = state.attrs[key];\n if (className != null || state.attrs.className != null) attrs.className = className != null ? state.attrs.className != null ? String(state.attrs.className) + \" \" + String(className) : className : state.attrs.className != null ? state.attrs.className : null;\n if (hasClass) attrs.class = null;\n for(var key in attrs)if ($9eOch.call(attrs, key) && key !== \"key\") {\n vnode.attrs = attrs;\n break;\n }\n return vnode;\n}\nfunction $dc673ea23ab51a3f$var$hyperscript(selector) {\n if (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") throw Error(\"The selector must be either a string or a component.\");\n var vnode = $5sRXF.apply(1, arguments);\n if (typeof selector === \"string\") {\n vnode.children = $dBs8J.normalizeChildren(vnode.children);\n if (selector !== \"[\") return $dc673ea23ab51a3f$var$execSelector($dc673ea23ab51a3f$var$selectorCache[selector] || $dc673ea23ab51a3f$var$compileSelector(selector), vnode);\n }\n vnode.tag = selector;\n return vnode;\n}\nmodule.exports = $dc673ea23ab51a3f$var$hyperscript;\n\n});\n\nparcelRegister(\"2uPnQ\", function(module, exports) {\n/* global window */ \"use strict\";\n\nvar $k7iQv = parcelRequire(\"k7iQv\");\nif (typeof window !== \"undefined\") {\n if (typeof window.Promise === \"undefined\") window.Promise = $k7iQv;\n else if (!window.Promise.prototype.finally) window.Promise.prototype.finally = $k7iQv.prototype.finally;\n module.exports = window.Promise;\n} else if (typeof $parcel$global !== \"undefined\") {\n if (typeof $parcel$global.Promise === \"undefined\") $parcel$global.Promise = $k7iQv;\n else if (!$parcel$global.Promise.prototype.finally) $parcel$global.Promise.prototype.finally = $k7iQv.prototype.finally;\n module.exports = $parcel$global.Promise;\n} else module.exports = $k7iQv;\n\n});\n\nparcelRegister(\"7lWrV\", function(module, exports) {\n\"use strict\";\n\nvar $gZZfO = parcelRequire(\"gZZfO\");\n// Returns `{path, params}` from `url`\nmodule.exports = function(url) {\n var queryIndex = url.indexOf(\"?\");\n var hashIndex = url.indexOf(\"#\");\n var queryEnd = hashIndex < 0 ? url.length : hashIndex;\n var pathEnd = queryIndex < 0 ? queryEnd : queryIndex;\n var path = url.slice(0, pathEnd).replace(/\\/{2,}/g, \"/\");\n if (!path) path = \"/\";\n else {\n if (path[0] !== \"/\") path = \"/\" + path;\n if (path.length > 1 && path[path.length - 1] === \"/\") path = path.slice(0, -1);\n }\n return {\n path: path,\n params: queryIndex < 0 ? {} : $gZZfO(url.slice(queryIndex + 1, queryEnd))\n };\n};\n\n});\nparcelRegister(\"gZZfO\", function(module, exports) {\n\"use strict\";\nfunction $c601dba597649f5e$var$decodeURIComponentSave(str) {\n try {\n return decodeURIComponent(str);\n } catch (err) {\n return str;\n }\n}\nmodule.exports = function(string) {\n if (string === \"\" || string == null) return {};\n if (string.charAt(0) === \"?\") string = string.slice(1);\n var entries = string.split(\"&\"), counters = {}, data = {};\n for(var i = 0; i < entries.length; i++){\n var entry = entries[i].split(\"=\");\n var key = $c601dba597649f5e$var$decodeURIComponentSave(entry[0]);\n var value = entry.length === 2 ? $c601dba597649f5e$var$decodeURIComponentSave(entry[1]) : \"\";\n if (value === \"true\") value = true;\n else if (value === \"false\") value = false;\n var levels = key.split(/\\]\\[?|\\[/);\n var cursor = data;\n if (key.indexOf(\"[\") > -1) levels.pop();\n for(var j = 0; j < levels.length; j++){\n var level = levels[j], nextLevel = levels[j + 1];\n var isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10));\n if (level === \"\") {\n var key = levels.slice(0, j).join();\n if (counters[key] == null) counters[key] = Array.isArray(cursor) ? cursor.length : 0;\n level = counters[key]++;\n } else if (level === \"__proto__\") break;\n if (j === levels.length - 1) cursor[level] = value;\n else {\n // Read own properties exclusively to disallow indirect\n // prototype pollution\n var desc = Object.getOwnPropertyDescriptor(cursor, level);\n if (desc != null) desc = desc.value;\n if (desc == null) cursor[level] = desc = isNumber ? [] : {};\n cursor = desc;\n }\n }\n }\n return data;\n};\n\n});\n\n\nparcelRegister(\"8KlxE\", function(module, exports) {\n\"use strict\";\n\nvar $7lWrV = parcelRequire(\"7lWrV\");\n// Compiles a template into a function that takes a resolved path (without query\n// strings) and returns an object containing the template parameters with their\n// parsed values. This expects the input of the compiled template to be the\n// output of `parsePathname`. Note that it does *not* remove query parameters\n// specified in the template.\nmodule.exports = function(template) {\n var templateData = $7lWrV(template);\n var templateKeys = Object.keys(templateData.params);\n var keys = [];\n var regexp = new RegExp(\"^\" + templateData.path.replace(// I escape literal text so people can use things like `:file.:ext` or\n // `:lang-:locale` in routes. This is all merged into one pass so I\n // don't also accidentally escape `-` and make it harder to detect it to\n // ban it from template parameters.\n /:([^\\/.-]+)(\\.{3}|\\.(?!\\.)|-)?|[\\\\^$*+.()|\\[\\]{}]/g, function(m, key, extra) {\n if (key == null) return \"\\\\\" + m;\n keys.push({\n k: key,\n r: extra === \"...\"\n });\n if (extra === \"...\") return \"(.*)\";\n if (extra === \".\") return \"([^/]+)\\\\.\";\n return \"([^/]+)\" + (extra || \"\");\n }) + \"$\");\n return function(data) {\n // First, check the params. Usually, there isn't any, and it's just\n // checking a static set.\n for(var i = 0; i < templateKeys.length; i++){\n if (templateData.params[templateKeys[i]] !== data.params[templateKeys[i]]) return false;\n }\n // If no interpolations exist, let's skip all the ceremony\n if (!keys.length) return regexp.test(data.path);\n var values = regexp.exec(data.path);\n if (values == null) return false;\n for(var i = 0; i < keys.length; i++)data.params[keys[i].k] = keys[i].r ? values[i + 1] : decodeURIComponent(values[i + 1]);\n return true;\n };\n};\n\n});\n\nparcelRegister(\"e9o88\", function(module, exports) {\n\"use strict\";\n\nvar $9eOch = parcelRequire(\"9eOch\");\n// Words in RegExp literals are sometimes mangled incorrectly by the internal bundler, so use RegExp().\nvar $a4d49fb46380177c$var$magic = new RegExp(\"^(?:key|oninit|oncreate|onbeforeupdate|onupdate|onbeforeremove|onremove)$\");\nmodule.exports = function(attrs, extras) {\n var result = {};\n if (extras != null) {\n for(var key in attrs)if ($9eOch.call(attrs, key) && !$a4d49fb46380177c$var$magic.test(key) && extras.indexOf(key) < 0) result[key] = attrs[key];\n } else {\n for(var key in attrs)if ($9eOch.call(attrs, key) && !$a4d49fb46380177c$var$magic.test(key)) result[key] = attrs[key];\n }\n return result;\n};\n\n});\n\n\n\nparcelRegister(\"9erhh\", function(module, exports) {\n(function() {\n \"use strict\";\n /* eslint-enable */ Stream.SKIP = {};\n Stream.lift = lift;\n Stream.scan = scan;\n Stream.merge = merge;\n Stream.combine = combine;\n Stream.scanMerge = scanMerge;\n Stream[\"fantasy-land/of\"] = Stream;\n var warnedHalt = false;\n Object.defineProperty(Stream, \"HALT\", {\n get: function() {\n warnedHalt || console.log(\"HALT is deprecated and has been renamed to SKIP\");\n warnedHalt = true;\n return Stream.SKIP;\n }\n });\n function Stream(value) {\n var dependentStreams = [];\n var dependentFns = [];\n function stream(v) {\n if (arguments.length && v !== Stream.SKIP) {\n value = v;\n if (open(stream)) {\n stream._changing();\n stream._state = \"active\";\n // Cloning the list to ensure it's still iterated in intended\n // order\n dependentStreams.slice().forEach(function(s, i) {\n if (open(s)) s(this[i](value));\n }, dependentFns.slice());\n }\n }\n return value;\n }\n stream.constructor = Stream;\n stream._state = arguments.length && value !== Stream.SKIP ? \"active\" : \"pending\";\n stream._parents = [];\n stream._changing = function() {\n if (open(stream)) stream._state = \"changing\";\n dependentStreams.forEach(function(s) {\n s._changing();\n });\n };\n stream._map = function(fn, ignoreInitial) {\n var target = ignoreInitial ? Stream() : Stream(fn(value));\n target._parents.push(stream);\n dependentStreams.push(target);\n dependentFns.push(fn);\n return target;\n };\n stream.map = function(fn) {\n return stream._map(fn, stream._state !== \"active\");\n };\n var end;\n function createEnd() {\n end = Stream();\n end.map(function(value) {\n if (value === true) {\n stream._parents.forEach(function(p) {\n p._unregisterChild(stream);\n });\n stream._state = \"ended\";\n stream._parents.length = dependentStreams.length = dependentFns.length = 0;\n }\n return value;\n });\n return end;\n }\n stream.toJSON = function() {\n return value != null && typeof value.toJSON === \"function\" ? value.toJSON() : value;\n };\n stream[\"fantasy-land/map\"] = stream.map;\n stream[\"fantasy-land/ap\"] = function(x) {\n return combine(function(s1, s2) {\n return s1()(s2());\n }, [\n x,\n stream\n ]);\n };\n stream._unregisterChild = function(child) {\n var childIndex = dependentStreams.indexOf(child);\n if (childIndex !== -1) {\n dependentStreams.splice(childIndex, 1);\n dependentFns.splice(childIndex, 1);\n }\n };\n Object.defineProperty(stream, \"end\", {\n get: function() {\n return end || createEnd();\n }\n });\n return stream;\n }\n function combine(fn, streams) {\n var ready = streams.every(function(s) {\n if (s.constructor !== Stream) throw new Error(\"Ensure that each item passed to stream.combine/stream.merge/lift is a stream.\");\n return s._state === \"active\";\n });\n var stream = ready ? Stream(fn.apply(null, streams.concat([\n streams\n ]))) : Stream();\n var changed = [];\n var mappers = streams.map(function(s) {\n return s._map(function(value) {\n changed.push(s);\n if (ready || streams.every(function(s) {\n return s._state !== \"pending\";\n })) {\n ready = true;\n stream(fn.apply(null, streams.concat([\n changed\n ])));\n changed = [];\n }\n return value;\n }, true);\n });\n var endStream = stream.end.map(function(value) {\n if (value === true) {\n mappers.forEach(function(mapper) {\n mapper.end(true);\n });\n endStream.end(true);\n }\n return undefined;\n });\n return stream;\n }\n function merge(streams) {\n return combine(function() {\n return streams.map(function(s) {\n return s();\n });\n }, streams);\n }\n function scan(fn, acc, origin) {\n var stream = origin.map(function(v) {\n var next = fn(acc, v);\n if (next !== Stream.SKIP) acc = next;\n return next;\n });\n stream(acc);\n return stream;\n }\n function scanMerge(tuples, seed) {\n var streams = tuples.map(function(tuple) {\n return tuple[0];\n });\n var stream = combine(function() {\n var changed = arguments[arguments.length - 1];\n streams.forEach(function(stream, i) {\n if (changed.indexOf(stream) > -1) seed = tuples[i][1](seed, stream());\n });\n return seed;\n }, streams);\n stream(seed);\n return stream;\n }\n function lift() {\n var fn = arguments[0];\n var streams = Array.prototype.slice.call(arguments, 1);\n return merge(streams).map(function(streams) {\n return fn.apply(undefined, streams);\n });\n }\n function open(s) {\n return s._state === \"pending\" || s._state === \"active\" || s._state === \"changing\";\n }\n module.exports = Stream;\n})();\n\n});\n\nparcelRegister(\"65AEs\", function(module, exports) {\n/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */ !function(t1, e) {\n module.exports = e();\n}(this, function() {\n \"use strict\";\n function t1(t1, e) {\n var n = Object.keys(t1);\n if (Object.getOwnPropertySymbols) {\n var r = Object.getOwnPropertySymbols(t1);\n e && (r = r.filter(function(e) {\n return Object.getOwnPropertyDescriptor(t1, e).enumerable;\n })), n.push.apply(n, r);\n }\n return n;\n }\n function e(e) {\n for(var n = 1; n < arguments.length; n++){\n var r = null != arguments[n] ? arguments[n] : {};\n n % 2 ? t1(Object(r), !0).forEach(function(t1) {\n a(e, t1, r[t1]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : t1(Object(r)).forEach(function(t1) {\n Object.defineProperty(e, t1, Object.getOwnPropertyDescriptor(r, t1));\n });\n }\n return e;\n }\n function n(t1) {\n return n = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(t1) {\n return typeof t1;\n } : function(t1) {\n return t1 && \"function\" == typeof Symbol && t1.constructor === Symbol && t1 !== Symbol.prototype ? \"symbol\" : typeof t1;\n }, n(t1);\n }\n function r(t1, e) {\n if (!(t1 instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }\n function i(t1, e) {\n for(var n = 0; n < e.length; n++){\n var r = e[n];\n r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(t1, d(r.key), r);\n }\n }\n function o(t1, e, n) {\n return e && i(t1.prototype, e), n && i(t1, n), Object.defineProperty(t1, \"prototype\", {\n writable: !1\n }), t1;\n }\n function a(t1, e, n) {\n return (e = d(e)) in t1 ? Object.defineProperty(t1, e, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : t1[e] = n, t1;\n }\n function s(t1, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t1.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t1,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t1, \"prototype\", {\n writable: !1\n }), e && l(t1, e);\n }\n function c(t1) {\n return c = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t1) {\n return t1.__proto__ || Object.getPrototypeOf(t1);\n }, c(t1);\n }\n function l(t1, e) {\n return l = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t1, e) {\n return t1.__proto__ = e, t1;\n }, l(t1, e);\n }\n function u(t1) {\n if (void 0 === t1) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return t1;\n }\n function p(t1) {\n var e = function() {\n if (\"undefined\" == typeof Reflect || !Reflect.construct) return !1;\n if (Reflect.construct.sham) return !1;\n if (\"function\" == typeof Proxy) return !0;\n try {\n return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})), !0;\n } catch (t1) {\n return !1;\n }\n }();\n return function() {\n var n, r = c(t1);\n if (e) {\n var i = c(this).constructor;\n n = Reflect.construct(r, arguments, i);\n } else n = r.apply(this, arguments);\n return function(t1, e) {\n if (e && (\"object\" == typeof e || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return u(t1);\n }(this, n);\n };\n }\n function f() {\n return f = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(t1, e, n) {\n var r = function(t1, e) {\n for(; !Object.prototype.hasOwnProperty.call(t1, e) && null !== (t1 = c(t1)););\n return t1;\n }(t1, e);\n if (r) {\n var i = Object.getOwnPropertyDescriptor(r, e);\n return i.get ? i.get.call(arguments.length < 3 ? t1 : n) : i.value;\n }\n }, f.apply(this, arguments);\n }\n function d(t1) {\n var e = function(t1, e) {\n if (\"object\" != typeof t1 || null === t1) return t1;\n var n = t1[Symbol.toPrimitive];\n if (void 0 !== n) {\n var r = n.call(t1, e || \"default\");\n if (\"object\" != typeof r) return r;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === e ? String : Number)(t1);\n }(t1, \"string\");\n return \"symbol\" == typeof e ? e : e + \"\";\n }\n var h = function(t1) {\n return !(!t1 || !t1.Window) && t1 instanceof t1.Window;\n }, v = void 0, g = void 0;\n function m(t1) {\n v = t1;\n var e = t1.document.createTextNode(\"\");\n e.ownerDocument !== t1.document && \"function\" == typeof t1.wrap && t1.wrap(e) === e && (t1 = t1.wrap(t1)), g = t1;\n }\n function y(t1) {\n return h(t1) ? t1 : (t1.ownerDocument || t1).defaultView || g.window;\n }\n \"undefined\" != typeof window && window && m(window);\n var b = function(t1) {\n return !!t1 && \"object\" === n(t1);\n }, x = function(t1) {\n return \"function\" == typeof t1;\n }, w = {\n window: function(t1) {\n return t1 === g || h(t1);\n },\n docFrag: function(t1) {\n return b(t1) && 11 === t1.nodeType;\n },\n object: b,\n func: x,\n number: function(t1) {\n return \"number\" == typeof t1;\n },\n bool: function(t1) {\n return \"boolean\" == typeof t1;\n },\n string: function(t1) {\n return \"string\" == typeof t1;\n },\n element: function(t1) {\n if (!t1 || \"object\" !== n(t1)) return !1;\n var e = y(t1) || g;\n return /object|function/.test(\"undefined\" == typeof Element ? \"undefined\" : n(Element)) ? t1 instanceof Element || t1 instanceof e.Element : 1 === t1.nodeType && \"string\" == typeof t1.nodeName;\n },\n plainObject: function(t1) {\n return b(t1) && !!t1.constructor && /function Object\\b/.test(t1.constructor.toString());\n },\n array: function(t1) {\n return b(t1) && void 0 !== t1.length && x(t1.splice);\n }\n };\n function E(t1) {\n var e = t1.interaction;\n if (\"drag\" === e.prepared.name) {\n var n = e.prepared.axis;\n \"x\" === n ? (e.coords.cur.page.y = e.coords.start.page.y, e.coords.cur.client.y = e.coords.start.client.y, e.coords.velocity.client.y = 0, e.coords.velocity.page.y = 0) : \"y\" === n && (e.coords.cur.page.x = e.coords.start.page.x, e.coords.cur.client.x = e.coords.start.client.x, e.coords.velocity.client.x = 0, e.coords.velocity.page.x = 0);\n }\n }\n function T(t1) {\n var e = t1.iEvent, n = t1.interaction;\n if (\"drag\" === n.prepared.name) {\n var r = n.prepared.axis;\n if (\"x\" === r || \"y\" === r) {\n var i = \"x\" === r ? \"y\" : \"x\";\n e.page[i] = n.coords.start.page[i], e.client[i] = n.coords.start.client[i], e.delta[i] = 0;\n }\n }\n }\n var S = {\n id: \"actions/drag\",\n install: function(t1) {\n var e = t1.actions, n = t1.Interactable, r = t1.defaults;\n n.prototype.draggable = S.draggable, e.map.drag = S, e.methodDict.drag = \"draggable\", r.actions.drag = S.defaults;\n },\n listeners: {\n \"interactions:before-action-move\": E,\n \"interactions:action-resume\": E,\n \"interactions:action-move\": T,\n \"auto-start:check\": function(t1) {\n var e = t1.interaction, n = t1.interactable, r = t1.buttons, i = n.options.drag;\n if (i && i.enabled && (!e.pointerIsDown || !/mouse|pointer/.test(e.pointerType) || 0 != (r & n.options.drag.mouseButtons))) return t1.action = {\n name: \"drag\",\n axis: \"start\" === i.lockAxis ? i.startAxis : i.lockAxis\n }, !1;\n }\n },\n draggable: function(t1) {\n return w.object(t1) ? (this.options.drag.enabled = !1 !== t1.enabled, this.setPerAction(\"drag\", t1), this.setOnEvents(\"drag\", t1), /^(xy|x|y|start)$/.test(t1.lockAxis) && (this.options.drag.lockAxis = t1.lockAxis), /^(xy|x|y)$/.test(t1.startAxis) && (this.options.drag.startAxis = t1.startAxis), this) : w.bool(t1) ? (this.options.drag.enabled = t1, this) : this.options.drag;\n },\n beforeMove: E,\n move: T,\n defaults: {\n startAxis: \"xy\",\n lockAxis: \"xy\"\n },\n getCursor: function() {\n return \"move\";\n },\n filterEventType: function(t1) {\n return 0 === t1.search(\"drag\");\n }\n }, _ = S, P = {\n init: function(t1) {\n var e = t1;\n P.document = e.document, P.DocumentFragment = e.DocumentFragment || O, P.SVGElement = e.SVGElement || O, P.SVGSVGElement = e.SVGSVGElement || O, P.SVGElementInstance = e.SVGElementInstance || O, P.Element = e.Element || O, P.HTMLElement = e.HTMLElement || P.Element, P.Event = e.Event, P.Touch = e.Touch || O, P.PointerEvent = e.PointerEvent || e.MSPointerEvent;\n },\n document: null,\n DocumentFragment: null,\n SVGElement: null,\n SVGSVGElement: null,\n SVGElementInstance: null,\n Element: null,\n HTMLElement: null,\n Event: null,\n Touch: null,\n PointerEvent: null\n };\n function O() {}\n var k = P;\n var D = {\n init: function(t1) {\n var e = k.Element, n = t1.navigator || {};\n D.supportsTouch = \"ontouchstart\" in t1 || w.func(t1.DocumentTouch) && k.document instanceof t1.DocumentTouch, D.supportsPointerEvent = !1 !== n.pointerEnabled && !!k.PointerEvent, D.isIOS = /iP(hone|od|ad)/.test(n.platform), D.isIOS7 = /iP(hone|od|ad)/.test(n.platform) && /OS 7[^\\d]/.test(n.appVersion), D.isIe9 = /MSIE 9/.test(n.userAgent), D.isOperaMobile = \"Opera\" === n.appName && D.supportsTouch && /Presto/.test(n.userAgent), D.prefixedMatchesSelector = \"matches\" in e.prototype ? \"matches\" : \"webkitMatchesSelector\" in e.prototype ? \"webkitMatchesSelector\" : \"mozMatchesSelector\" in e.prototype ? \"mozMatchesSelector\" : \"oMatchesSelector\" in e.prototype ? \"oMatchesSelector\" : \"msMatchesSelector\", D.pEventTypes = D.supportsPointerEvent ? k.PointerEvent === t1.MSPointerEvent ? {\n up: \"MSPointerUp\",\n down: \"MSPointerDown\",\n over: \"mouseover\",\n out: \"mouseout\",\n move: \"MSPointerMove\",\n cancel: \"MSPointerCancel\"\n } : {\n up: \"pointerup\",\n down: \"pointerdown\",\n over: \"pointerover\",\n out: \"pointerout\",\n move: \"pointermove\",\n cancel: \"pointercancel\"\n } : null, D.wheelEvent = k.document && \"onmousewheel\" in k.document ? \"mousewheel\" : \"wheel\";\n },\n supportsTouch: null,\n supportsPointerEvent: null,\n isIOS7: null,\n isIOS: null,\n isIe9: null,\n isOperaMobile: null,\n prefixedMatchesSelector: null,\n pEventTypes: null,\n wheelEvent: null\n };\n var I = D;\n function M(t1, e) {\n if (t1.contains) return t1.contains(e);\n for(; e;){\n if (e === t1) return !0;\n e = e.parentNode;\n }\n return !1;\n }\n function z(t1, e) {\n for(; w.element(t1);){\n if (R(t1, e)) return t1;\n t1 = A(t1);\n }\n return null;\n }\n function A(t1) {\n var e = t1.parentNode;\n if (w.docFrag(e)) {\n for(; (e = e.host) && w.docFrag(e););\n return e;\n }\n return e;\n }\n function R(t1, e) {\n return g !== v && (e = e.replace(/\\/deep\\//g, \" \")), t1[I.prefixedMatchesSelector](e);\n }\n var C = function(t1) {\n return t1.parentNode || t1.host;\n };\n function j(t1, e) {\n for(var n, r = [], i = t1; (n = C(i)) && i !== e && n !== i.ownerDocument;)r.unshift(i), i = n;\n return r;\n }\n function F(t1, e, n) {\n for(; w.element(t1);){\n if (R(t1, e)) return !0;\n if ((t1 = A(t1)) === n) return R(t1, e);\n }\n return !1;\n }\n function X(t1) {\n return t1.correspondingUseElement || t1;\n }\n function Y(t1) {\n var e = t1 instanceof k.SVGElement ? t1.getBoundingClientRect() : t1.getClientRects()[0];\n return e && {\n left: e.left,\n right: e.right,\n top: e.top,\n bottom: e.bottom,\n width: e.width || e.right - e.left,\n height: e.height || e.bottom - e.top\n };\n }\n function L(t1) {\n var e, n = Y(t1);\n if (!I.isIOS7 && n) {\n var r = {\n x: (e = (e = y(t1)) || g).scrollX || e.document.documentElement.scrollLeft,\n y: e.scrollY || e.document.documentElement.scrollTop\n };\n n.left += r.x, n.right += r.x, n.top += r.y, n.bottom += r.y;\n }\n return n;\n }\n function q(t1) {\n for(var e = []; t1;)e.push(t1), t1 = A(t1);\n return e;\n }\n function B(t1) {\n return !!w.string(t1) && (k.document.querySelector(t1), !0);\n }\n function V(t1, e) {\n for(var n in e)t1[n] = e[n];\n return t1;\n }\n function W(t1, e, n) {\n return \"parent\" === t1 ? A(n) : \"self\" === t1 ? e.getRect(n) : z(n, t1);\n }\n function G(t1, e, n, r) {\n var i = t1;\n return w.string(i) ? i = W(i, e, n) : w.func(i) && (i = i.apply(void 0, r)), w.element(i) && (i = L(i)), i;\n }\n function N(t1) {\n return t1 && {\n x: \"x\" in t1 ? t1.x : t1.left,\n y: \"y\" in t1 ? t1.y : t1.top\n };\n }\n function U(t1) {\n return !t1 || \"x\" in t1 && \"y\" in t1 || ((t1 = V({}, t1)).x = t1.left || 0, t1.y = t1.top || 0, t1.width = t1.width || (t1.right || 0) - t1.x, t1.height = t1.height || (t1.bottom || 0) - t1.y), t1;\n }\n function H(t1, e, n) {\n t1.left && (e.left += n.x), t1.right && (e.right += n.x), t1.top && (e.top += n.y), t1.bottom && (e.bottom += n.y), e.width = e.right - e.left, e.height = e.bottom - e.top;\n }\n function K(t1, e, n) {\n var r = n && t1.options[n];\n return N(G(r && r.origin || t1.options.origin, t1, e, [\n t1 && e\n ])) || {\n x: 0,\n y: 0\n };\n }\n function $(t1, e) {\n var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function(t1) {\n return !0;\n }, r = arguments.length > 3 ? arguments[3] : void 0;\n if (r = r || {}, w.string(t1) && -1 !== t1.search(\" \") && (t1 = J(t1)), w.array(t1)) return t1.forEach(function(t1) {\n return $(t1, e, n, r);\n }), r;\n if (w.object(t1) && (e = t1, t1 = \"\"), w.func(e) && n(t1)) r[t1] = r[t1] || [], r[t1].push(e);\n else if (w.array(e)) for(var i = 0, o = e; i < o.length; i++){\n var a = o[i];\n $(t1, a, n, r);\n }\n else if (w.object(e)) for(var s in e)$(J(s).map(function(e) {\n return \"\".concat(t1).concat(e);\n }), e[s], n, r);\n return r;\n }\n function J(t1) {\n return t1.trim().split(/ +/);\n }\n var Q = function(t1, e) {\n return Math.sqrt(t1 * t1 + e * e);\n }, Z = [\n \"webkit\",\n \"moz\"\n ];\n function tt(t1, e) {\n t1.__set || (t1.__set = {});\n var n = function(n) {\n if (Z.some(function(t1) {\n return 0 === n.indexOf(t1);\n })) return 1;\n \"function\" != typeof t1[n] && \"__set\" !== n && Object.defineProperty(t1, n, {\n get: function() {\n return n in t1.__set ? t1.__set[n] : t1.__set[n] = e[n];\n },\n set: function(e) {\n t1.__set[n] = e;\n },\n configurable: !0\n });\n };\n for(var r in e)n(r);\n return t1;\n }\n function et(t1, e) {\n t1.page = t1.page || {}, t1.page.x = e.page.x, t1.page.y = e.page.y, t1.client = t1.client || {}, t1.client.x = e.client.x, t1.client.y = e.client.y, t1.timeStamp = e.timeStamp;\n }\n function nt(t1) {\n t1.page.x = 0, t1.page.y = 0, t1.client.x = 0, t1.client.y = 0;\n }\n function rt(t1) {\n return t1 instanceof k.Event || t1 instanceof k.Touch;\n }\n function it(t1, e, n) {\n return t1 = t1 || \"page\", (n = n || {}).x = e[t1 + \"X\"], n.y = e[t1 + \"Y\"], n;\n }\n function ot(t1, e) {\n return e = e || {\n x: 0,\n y: 0\n }, I.isOperaMobile && rt(t1) ? (it(\"screen\", t1, e), e.x += window.scrollX, e.y += window.scrollY) : it(\"page\", t1, e), e;\n }\n function at(t1) {\n return w.number(t1.pointerId) ? t1.pointerId : t1.identifier;\n }\n function st(t1, e, n) {\n var r = e.length > 1 ? lt(e) : e[0];\n ot(r, t1.page), function(t1, e) {\n e = e || {}, I.isOperaMobile && rt(t1) ? it(\"screen\", t1, e) : it(\"client\", t1, e);\n }(r, t1.client), t1.timeStamp = n;\n }\n function ct(t1) {\n var e = [];\n return w.array(t1) ? (e[0] = t1[0], e[1] = t1[1]) : \"touchend\" === t1.type ? 1 === t1.touches.length ? (e[0] = t1.touches[0], e[1] = t1.changedTouches[0]) : 0 === t1.touches.length && (e[0] = t1.changedTouches[0], e[1] = t1.changedTouches[1]) : (e[0] = t1.touches[0], e[1] = t1.touches[1]), e;\n }\n function lt(t1) {\n for(var e = {\n pageX: 0,\n pageY: 0,\n clientX: 0,\n clientY: 0,\n screenX: 0,\n screenY: 0\n }, n = 0; n < t1.length; n++){\n var r = t1[n];\n for(var i in e)e[i] += r[i];\n }\n for(var o in e)e[o] /= t1.length;\n return e;\n }\n function ut(t1) {\n if (!t1.length) return null;\n var e = ct(t1), n = Math.min(e[0].pageX, e[1].pageX), r = Math.min(e[0].pageY, e[1].pageY), i = Math.max(e[0].pageX, e[1].pageX), o = Math.max(e[0].pageY, e[1].pageY);\n return {\n x: n,\n y: r,\n left: n,\n top: r,\n right: i,\n bottom: o,\n width: i - n,\n height: o - r\n };\n }\n function pt(t1, e) {\n var n = e + \"X\", r = e + \"Y\", i = ct(t1), o = i[0][n] - i[1][n], a = i[0][r] - i[1][r];\n return Q(o, a);\n }\n function ft(t1, e) {\n var n = e + \"X\", r = e + \"Y\", i = ct(t1), o = i[1][n] - i[0][n], a = i[1][r] - i[0][r];\n return 180 * Math.atan2(a, o) / Math.PI;\n }\n function dt(t1) {\n return w.string(t1.pointerType) ? t1.pointerType : w.number(t1.pointerType) ? [\n void 0,\n void 0,\n \"touch\",\n \"pen\",\n \"mouse\"\n ][t1.pointerType] : /touch/.test(t1.type || \"\") || t1 instanceof k.Touch ? \"touch\" : \"mouse\";\n }\n function ht(t1) {\n var e = w.func(t1.composedPath) ? t1.composedPath() : t1.path;\n return [\n X(e ? e[0] : t1.target),\n X(t1.currentTarget)\n ];\n }\n var vt = function() {\n function t1(e) {\n r(this, t1), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = e;\n }\n return o(t1, [\n {\n key: \"preventDefault\",\n value: function() {}\n },\n {\n key: \"stopPropagation\",\n value: function() {\n this.propagationStopped = !0;\n }\n },\n {\n key: \"stopImmediatePropagation\",\n value: function() {\n this.immediatePropagationStopped = this.propagationStopped = !0;\n }\n }\n ]), t1;\n }();\n Object.defineProperty(vt.prototype, \"interaction\", {\n get: function() {\n return this._interaction._proxy;\n },\n set: function() {}\n });\n var gt = function(t1, e) {\n for(var n = 0; n < e.length; n++){\n var r = e[n];\n t1.push(r);\n }\n return t1;\n }, mt = function(t1) {\n return gt([], t1);\n }, yt = function(t1, e) {\n for(var n = 0; n < t1.length; n++)if (e(t1[n], n, t1)) return n;\n return -1;\n }, bt = function(t1, e) {\n return t1[yt(t1, e)];\n }, xt = function(t1) {\n s(n, t1);\n var e = p(n);\n function n(t1, i, o) {\n var a;\n r(this, n), (a = e.call(this, i._interaction)).dropzone = void 0, a.dragEvent = void 0, a.relatedTarget = void 0, a.draggable = void 0, a.propagationStopped = !1, a.immediatePropagationStopped = !1;\n var s = \"dragleave\" === o ? t1.prev : t1.cur, c = s.element, l = s.dropzone;\n return a.type = o, a.target = c, a.currentTarget = c, a.dropzone = l, a.dragEvent = i, a.relatedTarget = i.target, a.draggable = i.interactable, a.timeStamp = i.timeStamp, a;\n }\n return o(n, [\n {\n key: \"reject\",\n value: function() {\n var t1 = this, e = this._interaction.dropState;\n if (\"dropactivate\" === this.type || this.dropzone && e.cur.dropzone === this.dropzone && e.cur.element === this.target) {\n if (e.prev.dropzone = this.dropzone, e.prev.element = this.target, e.rejected = !0, e.events.enter = null, this.stopImmediatePropagation(), \"dropactivate\" === this.type) {\n var r = e.activeDrops, i = yt(r, function(e) {\n var n = e.dropzone, r = e.element;\n return n === t1.dropzone && r === t1.target;\n });\n e.activeDrops.splice(i, 1);\n var o = new n(e, this.dragEvent, \"dropdeactivate\");\n o.dropzone = this.dropzone, o.target = this.target, this.dropzone.fire(o);\n } else this.dropzone.fire(new n(e, this.dragEvent, \"dragleave\"));\n }\n }\n },\n {\n key: \"preventDefault\",\n value: function() {}\n },\n {\n key: \"stopPropagation\",\n value: function() {\n this.propagationStopped = !0;\n }\n },\n {\n key: \"stopImmediatePropagation\",\n value: function() {\n this.immediatePropagationStopped = this.propagationStopped = !0;\n }\n }\n ]), n;\n }(vt);\n function wt(t1, e) {\n for(var n = 0, r = t1.slice(); n < r.length; n++){\n var i = r[n], o = i.dropzone, a = i.element;\n e.dropzone = o, e.target = a, o.fire(e), e.propagationStopped = e.immediatePropagationStopped = !1;\n }\n }\n function Et(t1, e) {\n for(var n = function(t1, e) {\n for(var n = [], r = 0, i = t1.interactables.list; r < i.length; r++){\n var o = i[r];\n if (o.options.drop.enabled) {\n var a = o.options.drop.accept;\n if (!(w.element(a) && a !== e || w.string(a) && !R(e, a) || w.func(a) && !a({\n dropzone: o,\n draggableElement: e\n }))) for(var s = 0, c = o.getAllElements(); s < c.length; s++){\n var l = c[s];\n l !== e && n.push({\n dropzone: o,\n element: l,\n rect: o.getRect(l)\n });\n }\n }\n }\n return n;\n }(t1, e), r = 0; r < n.length; r++){\n var i = n[r];\n i.rect = i.dropzone.getRect(i.element);\n }\n return n;\n }\n function Tt(t1, e, n) {\n for(var r = t1.dropState, i = t1.interactable, o = t1.element, a = [], s = 0, c = r.activeDrops; s < c.length; s++){\n var l = c[s], u = l.dropzone, p = l.element, f = l.rect, d = u.dropCheck(e, n, i, o, p, f);\n a.push(d ? p : null);\n }\n var h = function(t1) {\n for(var e, n, r, i = [], o = 0; o < t1.length; o++){\n var a = t1[o], s = t1[e];\n if (a && o !== e) {\n if (s) {\n var c = C(a), l = C(s);\n if (c !== a.ownerDocument) {\n if (l !== a.ownerDocument) {\n if (c !== l) {\n i = i.length ? i : j(s);\n var u = void 0;\n if (s instanceof k.HTMLElement && a instanceof k.SVGElement && !(a instanceof k.SVGSVGElement)) {\n if (a === l) continue;\n u = a.ownerSVGElement;\n } else u = a;\n for(var p = j(u, s.ownerDocument), f = 0; p[f] && p[f] === i[f];)f++;\n var d = [\n p[f - 1],\n p[f],\n i[f]\n ];\n if (d[0]) for(var h = d[0].lastChild; h;){\n if (h === d[1]) {\n e = o, i = p;\n break;\n }\n if (h === d[2]) break;\n h = h.previousSibling;\n }\n } else r = s, (parseInt(y(n = a).getComputedStyle(n).zIndex, 10) || 0) >= (parseInt(y(r).getComputedStyle(r).zIndex, 10) || 0) && (e = o);\n } else e = o;\n }\n } else e = o;\n }\n }\n return e;\n }(a);\n return r.activeDrops[h] || null;\n }\n function St(t1, e, n) {\n var r = t1.dropState, i = {\n enter: null,\n leave: null,\n activate: null,\n deactivate: null,\n move: null,\n drop: null\n };\n return \"dragstart\" === n.type && (i.activate = new xt(r, n, \"dropactivate\"), i.activate.target = null, i.activate.dropzone = null), \"dragend\" === n.type && (i.deactivate = new xt(r, n, \"dropdeactivate\"), i.deactivate.target = null, i.deactivate.dropzone = null), r.rejected || (r.cur.element !== r.prev.element && (r.prev.dropzone && (i.leave = new xt(r, n, \"dragleave\"), n.dragLeave = i.leave.target = r.prev.element, n.prevDropzone = i.leave.dropzone = r.prev.dropzone), r.cur.dropzone && (i.enter = new xt(r, n, \"dragenter\"), n.dragEnter = r.cur.element, n.dropzone = r.cur.dropzone)), \"dragend\" === n.type && r.cur.dropzone && (i.drop = new xt(r, n, \"drop\"), n.dropzone = r.cur.dropzone, n.relatedTarget = r.cur.element), \"dragmove\" === n.type && r.cur.dropzone && (i.move = new xt(r, n, \"dropmove\"), n.dropzone = r.cur.dropzone)), i;\n }\n function _t(t1, e) {\n var n = t1.dropState, r = n.activeDrops, i = n.cur, o = n.prev;\n e.leave && o.dropzone.fire(e.leave), e.enter && i.dropzone.fire(e.enter), e.move && i.dropzone.fire(e.move), e.drop && i.dropzone.fire(e.drop), e.deactivate && wt(r, e.deactivate), n.prev.dropzone = i.dropzone, n.prev.element = i.element;\n }\n function Pt(t1, e) {\n var n = t1.interaction, r = t1.iEvent, i = t1.event;\n if (\"dragmove\" === r.type || \"dragend\" === r.type) {\n var o = n.dropState;\n e.dynamicDrop && (o.activeDrops = Et(e, n.element));\n var a = r, s = Tt(n, a, i);\n o.rejected = o.rejected && !!s && s.dropzone === o.cur.dropzone && s.element === o.cur.element, o.cur.dropzone = s && s.dropzone, o.cur.element = s && s.element, o.events = St(n, 0, a);\n }\n }\n var Ot = {\n id: \"actions/drop\",\n install: function(t1) {\n var e = t1.actions, n = t1.interactStatic, r = t1.Interactable, i = t1.defaults;\n t1.usePlugin(_), r.prototype.dropzone = function(t1) {\n return function(t1, e) {\n if (w.object(e)) {\n if (t1.options.drop.enabled = !1 !== e.enabled, e.listeners) {\n var n = $(e.listeners), r = Object.keys(n).reduce(function(t1, e) {\n return t1[/^(enter|leave)/.test(e) ? \"drag\".concat(e) : /^(activate|deactivate|move)/.test(e) ? \"drop\".concat(e) : e] = n[e], t1;\n }, {}), i = t1.options.drop.listeners;\n i && t1.off(i), t1.on(r), t1.options.drop.listeners = r;\n }\n return w.func(e.ondrop) && t1.on(\"drop\", e.ondrop), w.func(e.ondropactivate) && t1.on(\"dropactivate\", e.ondropactivate), w.func(e.ondropdeactivate) && t1.on(\"dropdeactivate\", e.ondropdeactivate), w.func(e.ondragenter) && t1.on(\"dragenter\", e.ondragenter), w.func(e.ondragleave) && t1.on(\"dragleave\", e.ondragleave), w.func(e.ondropmove) && t1.on(\"dropmove\", e.ondropmove), /^(pointer|center)$/.test(e.overlap) ? t1.options.drop.overlap = e.overlap : w.number(e.overlap) && (t1.options.drop.overlap = Math.max(Math.min(1, e.overlap), 0)), \"accept\" in e && (t1.options.drop.accept = e.accept), \"checker\" in e && (t1.options.drop.checker = e.checker), t1;\n }\n if (w.bool(e)) return t1.options.drop.enabled = e, t1;\n return t1.options.drop;\n }(this, t1);\n }, r.prototype.dropCheck = function(t1, e, n, r, i, o) {\n return function(t1, e, n, r, i, o, a) {\n var s = !1;\n if (!(a = a || t1.getRect(o))) return !!t1.options.drop.checker && t1.options.drop.checker(e, n, s, t1, o, r, i);\n var c = t1.options.drop.overlap;\n if (\"pointer\" === c) {\n var l = K(r, i, \"drag\"), u = ot(e);\n u.x += l.x, u.y += l.y;\n var p = u.x > a.left && u.x < a.right, f = u.y > a.top && u.y < a.bottom;\n s = p && f;\n }\n var d = r.getRect(i);\n if (d && \"center\" === c) {\n var h = d.left + d.width / 2, v = d.top + d.height / 2;\n s = h >= a.left && h <= a.right && v >= a.top && v <= a.bottom;\n }\n if (d && w.number(c)) s = Math.max(0, Math.min(a.right, d.right) - Math.max(a.left, d.left)) * Math.max(0, Math.min(a.bottom, d.bottom) - Math.max(a.top, d.top)) / (d.width * d.height) >= c;\n t1.options.drop.checker && (s = t1.options.drop.checker(e, n, s, t1, o, r, i));\n return s;\n }(this, t1, e, n, r, i, o);\n }, n.dynamicDrop = function(e) {\n return w.bool(e) ? (t1.dynamicDrop = e, n) : t1.dynamicDrop;\n }, V(e.phaselessTypes, {\n dragenter: !0,\n dragleave: !0,\n dropactivate: !0,\n dropdeactivate: !0,\n dropmove: !0,\n drop: !0\n }), e.methodDict.drop = \"dropzone\", t1.dynamicDrop = !1, i.actions.drop = Ot.defaults;\n },\n listeners: {\n \"interactions:before-action-start\": function(t1) {\n var e = t1.interaction;\n \"drag\" === e.prepared.name && (e.dropState = {\n cur: {\n dropzone: null,\n element: null\n },\n prev: {\n dropzone: null,\n element: null\n },\n rejected: null,\n events: null,\n activeDrops: []\n });\n },\n \"interactions:after-action-start\": function(t1, e) {\n var n = t1.interaction, r = (t1.event, t1.iEvent);\n if (\"drag\" === n.prepared.name) {\n var i = n.dropState;\n i.activeDrops = [], i.events = {}, i.activeDrops = Et(e, n.element), i.events = St(n, 0, r), i.events.activate && (wt(i.activeDrops, i.events.activate), e.fire(\"actions/drop:start\", {\n interaction: n,\n dragEvent: r\n }));\n }\n },\n \"interactions:action-move\": Pt,\n \"interactions:after-action-move\": function(t1, e) {\n var n = t1.interaction, r = t1.iEvent;\n if (\"drag\" === n.prepared.name) {\n var i = n.dropState;\n _t(n, i.events), e.fire(\"actions/drop:move\", {\n interaction: n,\n dragEvent: r\n }), i.events = {};\n }\n },\n \"interactions:action-end\": function(t1, e) {\n if (\"drag\" === t1.interaction.prepared.name) {\n var n = t1.interaction, r = t1.iEvent;\n Pt(t1, e), _t(n, n.dropState.events), e.fire(\"actions/drop:end\", {\n interaction: n,\n dragEvent: r\n });\n }\n },\n \"interactions:stop\": function(t1) {\n var e = t1.interaction;\n if (\"drag\" === e.prepared.name) {\n var n = e.dropState;\n n && (n.activeDrops = null, n.events = null, n.cur.dropzone = null, n.cur.element = null, n.prev.dropzone = null, n.prev.element = null, n.rejected = !1);\n }\n }\n },\n getActiveDrops: Et,\n getDrop: Tt,\n getDropEvents: St,\n fireDropEvents: _t,\n filterEventType: function(t1) {\n return 0 === t1.search(\"drag\") || 0 === t1.search(\"drop\");\n },\n defaults: {\n enabled: !1,\n accept: null,\n overlap: \"pointer\"\n }\n }, kt = Ot;\n function Dt(t1) {\n var e = t1.interaction, n = t1.iEvent, r = t1.phase;\n if (\"gesture\" === e.prepared.name) {\n var i = e.pointers.map(function(t1) {\n return t1.pointer;\n }), o = \"start\" === r, a = \"end\" === r, s = e.interactable.options.deltaSource;\n if (n.touches = [\n i[0],\n i[1]\n ], o) n.distance = pt(i, s), n.box = ut(i), n.scale = 1, n.ds = 0, n.angle = ft(i, s), n.da = 0, e.gesture.startDistance = n.distance, e.gesture.startAngle = n.angle;\n else if (a || e.pointers.length < 2) {\n var c = e.prevEvent;\n n.distance = c.distance, n.box = c.box, n.scale = c.scale, n.ds = 0, n.angle = c.angle, n.da = 0;\n } else n.distance = pt(i, s), n.box = ut(i), n.scale = n.distance / e.gesture.startDistance, n.angle = ft(i, s), n.ds = n.scale - e.gesture.scale, n.da = n.angle - e.gesture.angle;\n e.gesture.distance = n.distance, e.gesture.angle = n.angle, w.number(n.scale) && n.scale !== 1 / 0 && !isNaN(n.scale) && (e.gesture.scale = n.scale);\n }\n }\n var It = {\n id: \"actions/gesture\",\n before: [\n \"actions/drag\",\n \"actions/resize\"\n ],\n install: function(t1) {\n var e = t1.actions, n = t1.Interactable, r = t1.defaults;\n n.prototype.gesturable = function(t1) {\n return w.object(t1) ? (this.options.gesture.enabled = !1 !== t1.enabled, this.setPerAction(\"gesture\", t1), this.setOnEvents(\"gesture\", t1), this) : w.bool(t1) ? (this.options.gesture.enabled = t1, this) : this.options.gesture;\n }, e.map.gesture = It, e.methodDict.gesture = \"gesturable\", r.actions.gesture = It.defaults;\n },\n listeners: {\n \"interactions:action-start\": Dt,\n \"interactions:action-move\": Dt,\n \"interactions:action-end\": Dt,\n \"interactions:new\": function(t1) {\n t1.interaction.gesture = {\n angle: 0,\n distance: 0,\n scale: 1,\n startAngle: 0,\n startDistance: 0\n };\n },\n \"auto-start:check\": function(t1) {\n if (!(t1.interaction.pointers.length < 2)) {\n var e = t1.interactable.options.gesture;\n if (e && e.enabled) return t1.action = {\n name: \"gesture\"\n }, !1;\n }\n }\n },\n defaults: {},\n getCursor: function() {\n return \"\";\n },\n filterEventType: function(t1) {\n return 0 === t1.search(\"gesture\");\n }\n }, Mt = It;\n function zt(t1, e, n, r, i, o, a) {\n if (!e) return !1;\n if (!0 === e) {\n var s = w.number(o.width) ? o.width : o.right - o.left, c = w.number(o.height) ? o.height : o.bottom - o.top;\n if (a = Math.min(a, Math.abs((\"left\" === t1 || \"right\" === t1 ? s : c) / 2)), s < 0 && (\"left\" === t1 ? t1 = \"right\" : \"right\" === t1 && (t1 = \"left\")), c < 0 && (\"top\" === t1 ? t1 = \"bottom\" : \"bottom\" === t1 && (t1 = \"top\")), \"left\" === t1) {\n var l = s >= 0 ? o.left : o.right;\n return n.x < l + a;\n }\n if (\"top\" === t1) {\n var u = c >= 0 ? o.top : o.bottom;\n return n.y < u + a;\n }\n if (\"right\" === t1) return n.x > (s >= 0 ? o.right : o.left) - a;\n if (\"bottom\" === t1) return n.y > (c >= 0 ? o.bottom : o.top) - a;\n }\n return !!w.element(r) && (w.element(e) ? e === r : F(r, e, i));\n }\n function At(t1) {\n var e = t1.iEvent, n = t1.interaction;\n if (\"resize\" === n.prepared.name && n.resizeAxes) {\n var r = e;\n n.interactable.options.resize.square ? (\"y\" === n.resizeAxes ? r.delta.x = r.delta.y : r.delta.y = r.delta.x, r.axes = \"xy\") : (r.axes = n.resizeAxes, \"x\" === n.resizeAxes ? r.delta.y = 0 : \"y\" === n.resizeAxes && (r.delta.x = 0));\n }\n }\n var Rt, Ct, jt = {\n id: \"actions/resize\",\n before: [\n \"actions/drag\"\n ],\n install: function(t1) {\n var e = t1.actions, n = t1.browser, r = t1.Interactable, i = t1.defaults;\n jt.cursors = function(t1) {\n return t1.isIe9 ? {\n x: \"e-resize\",\n y: \"s-resize\",\n xy: \"se-resize\",\n top: \"n-resize\",\n left: \"w-resize\",\n bottom: \"s-resize\",\n right: \"e-resize\",\n topleft: \"se-resize\",\n bottomright: \"se-resize\",\n topright: \"ne-resize\",\n bottomleft: \"ne-resize\"\n } : {\n x: \"ew-resize\",\n y: \"ns-resize\",\n xy: \"nwse-resize\",\n top: \"ns-resize\",\n left: \"ew-resize\",\n bottom: \"ns-resize\",\n right: \"ew-resize\",\n topleft: \"nwse-resize\",\n bottomright: \"nwse-resize\",\n topright: \"nesw-resize\",\n bottomleft: \"nesw-resize\"\n };\n }(n), jt.defaultMargin = n.supportsTouch || n.supportsPointerEvent ? 20 : 10, r.prototype.resizable = function(e) {\n return function(t1, e, n) {\n if (w.object(e)) return t1.options.resize.enabled = !1 !== e.enabled, t1.setPerAction(\"resize\", e), t1.setOnEvents(\"resize\", e), w.string(e.axis) && /^x$|^y$|^xy$/.test(e.axis) ? t1.options.resize.axis = e.axis : null === e.axis && (t1.options.resize.axis = n.defaults.actions.resize.axis), w.bool(e.preserveAspectRatio) ? t1.options.resize.preserveAspectRatio = e.preserveAspectRatio : w.bool(e.square) && (t1.options.resize.square = e.square), t1;\n if (w.bool(e)) return t1.options.resize.enabled = e, t1;\n return t1.options.resize;\n }(this, e, t1);\n }, e.map.resize = jt, e.methodDict.resize = \"resizable\", i.actions.resize = jt.defaults;\n },\n listeners: {\n \"interactions:new\": function(t1) {\n t1.interaction.resizeAxes = \"xy\";\n },\n \"interactions:action-start\": function(t1) {\n !function(t1) {\n var e = t1.iEvent, n = t1.interaction;\n if (\"resize\" === n.prepared.name && n.prepared.edges) {\n var r = e, i = n.rect;\n n._rects = {\n start: V({}, i),\n corrected: V({}, i),\n previous: V({}, i),\n delta: {\n left: 0,\n right: 0,\n width: 0,\n top: 0,\n bottom: 0,\n height: 0\n }\n }, r.edges = n.prepared.edges, r.rect = n._rects.corrected, r.deltaRect = n._rects.delta;\n }\n }(t1), At(t1);\n },\n \"interactions:action-move\": function(t1) {\n !function(t1) {\n var e = t1.iEvent, n = t1.interaction;\n if (\"resize\" === n.prepared.name && n.prepared.edges) {\n var r = e, i = n.interactable.options.resize.invert, o = \"reposition\" === i || \"negate\" === i, a = n.rect, s = n._rects, c = s.start, l = s.corrected, u = s.delta, p = s.previous;\n if (V(p, l), o) {\n if (V(l, a), \"reposition\" === i) {\n if (l.top > l.bottom) {\n var f = l.top;\n l.top = l.bottom, l.bottom = f;\n }\n if (l.left > l.right) {\n var d = l.left;\n l.left = l.right, l.right = d;\n }\n }\n } else l.top = Math.min(a.top, c.bottom), l.bottom = Math.max(a.bottom, c.top), l.left = Math.min(a.left, c.right), l.right = Math.max(a.right, c.left);\n for(var h in l.width = l.right - l.left, l.height = l.bottom - l.top, l)u[h] = l[h] - p[h];\n r.edges = n.prepared.edges, r.rect = l, r.deltaRect = u;\n }\n }(t1), At(t1);\n },\n \"interactions:action-end\": function(t1) {\n var e = t1.iEvent, n = t1.interaction;\n if (\"resize\" === n.prepared.name && n.prepared.edges) {\n var r = e;\n r.edges = n.prepared.edges, r.rect = n._rects.corrected, r.deltaRect = n._rects.delta;\n }\n },\n \"auto-start:check\": function(t1) {\n var e = t1.interaction, n = t1.interactable, r = t1.element, i = t1.rect, o = t1.buttons;\n if (i) {\n var a = V({}, e.coords.cur.page), s = n.options.resize;\n if (s && s.enabled && (!e.pointerIsDown || !/mouse|pointer/.test(e.pointerType) || 0 != (o & s.mouseButtons))) {\n if (w.object(s.edges)) {\n var c = {\n left: !1,\n right: !1,\n top: !1,\n bottom: !1\n };\n for(var l in c)c[l] = zt(l, s.edges[l], a, e._latestPointer.eventTarget, r, i, s.margin || jt.defaultMargin);\n c.left = c.left && !c.right, c.top = c.top && !c.bottom, (c.left || c.right || c.top || c.bottom) && (t1.action = {\n name: \"resize\",\n edges: c\n });\n } else {\n var u = \"y\" !== s.axis && a.x > i.right - jt.defaultMargin, p = \"x\" !== s.axis && a.y > i.bottom - jt.defaultMargin;\n (u || p) && (t1.action = {\n name: \"resize\",\n axes: (u ? \"x\" : \"\") + (p ? \"y\" : \"\")\n });\n }\n return !t1.action && void 0;\n }\n }\n }\n },\n defaults: {\n square: !1,\n preserveAspectRatio: !1,\n axis: \"xy\",\n margin: NaN,\n edges: null,\n invert: \"none\"\n },\n cursors: null,\n getCursor: function(t1) {\n var e = t1.edges, n = t1.axis, r = t1.name, i = jt.cursors, o = null;\n if (n) o = i[r + n];\n else if (e) {\n for(var a = \"\", s = 0, c = [\n \"top\",\n \"bottom\",\n \"left\",\n \"right\"\n ]; s < c.length; s++){\n var l = c[s];\n e[l] && (a += l);\n }\n o = i[a];\n }\n return o;\n },\n filterEventType: function(t1) {\n return 0 === t1.search(\"resize\");\n },\n defaultMargin: null\n }, Ft = jt, Xt = {\n id: \"actions\",\n install: function(t1) {\n t1.usePlugin(Mt), t1.usePlugin(Ft), t1.usePlugin(_), t1.usePlugin(kt);\n }\n }, Yt = 0;\n var Lt = {\n request: function(t1) {\n return Rt(t1);\n },\n cancel: function(t1) {\n return Ct(t1);\n },\n init: function(t1) {\n if (Rt = t1.requestAnimationFrame, Ct = t1.cancelAnimationFrame, !Rt) for(var e = [\n \"ms\",\n \"moz\",\n \"webkit\",\n \"o\"\n ], n = 0; n < e.length; n++){\n var r = e[n];\n Rt = t1[\"\".concat(r, \"RequestAnimationFrame\")], Ct = t1[\"\".concat(r, \"CancelAnimationFrame\")] || t1[\"\".concat(r, \"CancelRequestAnimationFrame\")];\n }\n Rt = Rt && Rt.bind(t1), Ct = Ct && Ct.bind(t1), Rt || (Rt = function(e) {\n var n = Date.now(), r = Math.max(0, 16 - (n - Yt)), i = t1.setTimeout(function() {\n e(n + r);\n }, r);\n return Yt = n + r, i;\n }, Ct = function(t1) {\n return clearTimeout(t1);\n });\n }\n };\n var qt = {\n defaults: {\n enabled: !1,\n margin: 60,\n container: null,\n speed: 300\n },\n now: Date.now,\n interaction: null,\n i: 0,\n x: 0,\n y: 0,\n isScrolling: !1,\n prevTime: 0,\n margin: 0,\n speed: 0,\n start: function(t1) {\n qt.isScrolling = !0, Lt.cancel(qt.i), t1.autoScroll = qt, qt.interaction = t1, qt.prevTime = qt.now(), qt.i = Lt.request(qt.scroll);\n },\n stop: function() {\n qt.isScrolling = !1, qt.interaction && (qt.interaction.autoScroll = null), Lt.cancel(qt.i);\n },\n scroll: function() {\n var t1 = qt.interaction, e = t1.interactable, n = t1.element, r = t1.prepared.name, i = e.options[r].autoScroll, o = Bt(i.container, e, n), a = qt.now(), s = (a - qt.prevTime) / 1e3, c = i.speed * s;\n if (c >= 1) {\n var l = {\n x: qt.x * c,\n y: qt.y * c\n };\n if (l.x || l.y) {\n var u = Vt(o);\n w.window(o) ? o.scrollBy(l.x, l.y) : o && (o.scrollLeft += l.x, o.scrollTop += l.y);\n var p = Vt(o), f = {\n x: p.x - u.x,\n y: p.y - u.y\n };\n (f.x || f.y) && e.fire({\n type: \"autoscroll\",\n target: n,\n interactable: e,\n delta: f,\n interaction: t1,\n container: o\n });\n }\n qt.prevTime = a;\n }\n qt.isScrolling && (Lt.cancel(qt.i), qt.i = Lt.request(qt.scroll));\n },\n check: function(t1, e) {\n var n;\n return null == (n = t1.options[e].autoScroll) ? void 0 : n.enabled;\n },\n onInteractionMove: function(t1) {\n var e = t1.interaction, n = t1.pointer;\n if (e.interacting() && qt.check(e.interactable, e.prepared.name)) {\n if (e.simulation) qt.x = qt.y = 0;\n else {\n var r, i, o, a, s = e.interactable, c = e.element, l = e.prepared.name, u = s.options[l].autoScroll, p = Bt(u.container, s, c);\n if (w.window(p)) a = n.clientX < qt.margin, r = n.clientY < qt.margin, i = n.clientX > p.innerWidth - qt.margin, o = n.clientY > p.innerHeight - qt.margin;\n else {\n var f = Y(p);\n a = n.clientX < f.left + qt.margin, r = n.clientY < f.top + qt.margin, i = n.clientX > f.right - qt.margin, o = n.clientY > f.bottom - qt.margin;\n }\n qt.x = i ? 1 : a ? -1 : 0, qt.y = o ? 1 : r ? -1 : 0, qt.isScrolling || (qt.margin = u.margin, qt.speed = u.speed, qt.start(e));\n }\n }\n }\n };\n function Bt(t1, e, n) {\n return (w.string(t1) ? W(t1, e, n) : t1) || y(n);\n }\n function Vt(t1) {\n return w.window(t1) && (t1 = window.document.body), {\n x: t1.scrollLeft,\n y: t1.scrollTop\n };\n }\n var Wt = {\n id: \"auto-scroll\",\n install: function(t1) {\n var e = t1.defaults, n = t1.actions;\n t1.autoScroll = qt, qt.now = function() {\n return t1.now();\n }, n.phaselessTypes.autoscroll = !0, e.perAction.autoScroll = qt.defaults;\n },\n listeners: {\n \"interactions:new\": function(t1) {\n t1.interaction.autoScroll = null;\n },\n \"interactions:destroy\": function(t1) {\n t1.interaction.autoScroll = null, qt.stop(), qt.interaction && (qt.interaction = null);\n },\n \"interactions:stop\": qt.stop,\n \"interactions:action-move\": function(t1) {\n return qt.onInteractionMove(t1);\n }\n }\n }, Gt = Wt;\n function Nt(t1, e) {\n var n = !1;\n return function() {\n return n || (g.console.warn(e), n = !0), t1.apply(this, arguments);\n };\n }\n function Ut(t1, e) {\n return t1.name = e.name, t1.axis = e.axis, t1.edges = e.edges, t1;\n }\n function Ht(t1) {\n return w.bool(t1) ? (this.options.styleCursor = t1, this) : null === t1 ? (delete this.options.styleCursor, this) : this.options.styleCursor;\n }\n function Kt(t1) {\n return w.func(t1) ? (this.options.actionChecker = t1, this) : null === t1 ? (delete this.options.actionChecker, this) : this.options.actionChecker;\n }\n var $t = {\n id: \"auto-start/interactableMethods\",\n install: function(t1) {\n var e = t1.Interactable;\n e.prototype.getAction = function(e, n, r, i) {\n var o = function(t1, e, n, r, i) {\n var o = t1.getRect(r), a = e.buttons || ({\n 0: 1,\n 1: 4,\n 3: 8,\n 4: 16\n })[e.button], s = {\n action: null,\n interactable: t1,\n interaction: n,\n element: r,\n rect: o,\n buttons: a\n };\n return i.fire(\"auto-start:check\", s), s.action;\n }(this, n, r, i, t1);\n return this.options.actionChecker ? this.options.actionChecker(e, n, o, this, i, r) : o;\n }, e.prototype.ignoreFrom = Nt(function(t1) {\n return this._backCompatOption(\"ignoreFrom\", t1);\n }, \"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue}).\"), e.prototype.allowFrom = Nt(function(t1) {\n return this._backCompatOption(\"allowFrom\", t1);\n }, \"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue}).\"), e.prototype.actionChecker = Kt, e.prototype.styleCursor = Ht;\n }\n };\n function Jt(t1, e, n, r, i) {\n return e.testIgnoreAllow(e.options[t1.name], n, r) && e.options[t1.name].enabled && ee(e, n, t1, i) ? t1 : null;\n }\n function Qt(t1, e, n, r, i, o, a) {\n for(var s = 0, c = r.length; s < c; s++){\n var l = r[s], u = i[s], p = l.getAction(e, n, t1, u);\n if (p) {\n var f = Jt(p, l, u, o, a);\n if (f) return {\n action: f,\n interactable: l,\n element: u\n };\n }\n }\n return {\n action: null,\n interactable: null,\n element: null\n };\n }\n function Zt(t1, e, n, r, i) {\n var o = [], a = [], s = r;\n function c(t1) {\n o.push(t1), a.push(s);\n }\n for(; w.element(s);){\n o = [], a = [], i.interactables.forEachMatch(s, c);\n var l = Qt(t1, e, n, o, a, r, i);\n if (l.action && !l.interactable.options[l.action.name].manualStart) return l;\n s = A(s);\n }\n return {\n action: null,\n interactable: null,\n element: null\n };\n }\n function te(t1, e, n) {\n var r = e.action, i = e.interactable, o = e.element;\n r = r || {\n name: null\n }, t1.interactable = i, t1.element = o, Ut(t1.prepared, r), t1.rect = i && r.name ? i.getRect(o) : null, ie(t1, n), n.fire(\"autoStart:prepared\", {\n interaction: t1\n });\n }\n function ee(t1, e, n, r) {\n var i = t1.options, o = i[n.name].max, a = i[n.name].maxPerElement, s = r.autoStart.maxInteractions, c = 0, l = 0, u = 0;\n if (!(o && a && s)) return !1;\n for(var p = 0, f = r.interactions.list; p < f.length; p++){\n var d = f[p], h = d.prepared.name;\n if (d.interacting()) {\n if (++c >= s) return !1;\n if (d.interactable === t1) {\n if ((l += h === n.name ? 1 : 0) >= o) return !1;\n if (d.element === e && (u++, h === n.name && u >= a)) return !1;\n }\n }\n }\n return s > 0;\n }\n function ne(t1, e) {\n return w.number(t1) ? (e.autoStart.maxInteractions = t1, this) : e.autoStart.maxInteractions;\n }\n function re(t1, e, n) {\n var r = n.autoStart.cursorElement;\n r && r !== t1 && (r.style.cursor = \"\"), t1.ownerDocument.documentElement.style.cursor = e, t1.style.cursor = e, n.autoStart.cursorElement = e ? t1 : null;\n }\n function ie(t1, e) {\n var n = t1.interactable, r = t1.element, i = t1.prepared;\n if (\"mouse\" === t1.pointerType && n && n.options.styleCursor) {\n var o = \"\";\n if (i.name) {\n var a = n.options[i.name].cursorChecker;\n o = w.func(a) ? a(i, n, r, t1._interacting) : e.actions.map[i.name].getCursor(i);\n }\n re(t1.element, o || \"\", e);\n } else e.autoStart.cursorElement && re(e.autoStart.cursorElement, \"\", e);\n }\n var oe = {\n id: \"auto-start/base\",\n before: [\n \"actions\"\n ],\n install: function(t1) {\n var e = t1.interactStatic, n = t1.defaults;\n t1.usePlugin($t), n.base.actionChecker = null, n.base.styleCursor = !0, V(n.perAction, {\n manualStart: !1,\n max: 1 / 0,\n maxPerElement: 1,\n allowFrom: null,\n ignoreFrom: null,\n mouseButtons: 1\n }), e.maxInteractions = function(e) {\n return ne(e, t1);\n }, t1.autoStart = {\n maxInteractions: 1 / 0,\n withinInteractionLimit: ee,\n cursorElement: null\n };\n },\n listeners: {\n \"interactions:down\": function(t1, e) {\n var n = t1.interaction, r = t1.pointer, i = t1.event, o = t1.eventTarget;\n n.interacting() || te(n, Zt(n, r, i, o, e), e);\n },\n \"interactions:move\": function(t1, e) {\n !function(t1, e) {\n var n = t1.interaction, r = t1.pointer, i = t1.event, o = t1.eventTarget;\n \"mouse\" !== n.pointerType || n.pointerIsDown || n.interacting() || te(n, Zt(n, r, i, o, e), e);\n }(t1, e), function(t1, e) {\n var n = t1.interaction;\n if (n.pointerIsDown && !n.interacting() && n.pointerWasMoved && n.prepared.name) {\n e.fire(\"autoStart:before-start\", t1);\n var r = n.interactable, i = n.prepared.name;\n i && r && (r.options[i].manualStart || !ee(r, n.element, n.prepared, e) ? n.stop() : (n.start(n.prepared, r, n.element), ie(n, e)));\n }\n }(t1, e);\n },\n \"interactions:stop\": function(t1, e) {\n var n = t1.interaction, r = n.interactable;\n r && r.options.styleCursor && re(n.element, \"\", e);\n }\n },\n maxInteractions: ne,\n withinInteractionLimit: ee,\n validateAction: Jt\n }, ae = oe;\n var se = {\n id: \"auto-start/dragAxis\",\n listeners: {\n \"autoStart:before-start\": function(t1, e) {\n var n = t1.interaction, r = t1.eventTarget, i = t1.dx, o = t1.dy;\n if (\"drag\" === n.prepared.name) {\n var a = Math.abs(i), s = Math.abs(o), c = n.interactable.options.drag, l = c.startAxis, u = a > s ? \"x\" : a < s ? \"y\" : \"xy\";\n if (n.prepared.axis = \"start\" === c.lockAxis ? u[0] : c.lockAxis, \"xy\" !== u && \"xy\" !== l && l !== u) {\n n.prepared.name = null;\n for(var p = r, f = function(t1) {\n if (t1 !== n.interactable) {\n var i = n.interactable.options.drag;\n if (!i.manualStart && t1.testIgnoreAllow(i, p, r)) {\n var o = t1.getAction(n.downPointer, n.downEvent, n, p);\n if (o && \"drag\" === o.name && function(t1, e) {\n if (!e) return !1;\n var n = e.options.drag.startAxis;\n return \"xy\" === t1 || \"xy\" === n || n === t1;\n }(u, t1) && ae.validateAction(o, t1, p, r, e)) return t1;\n }\n }\n }; w.element(p);){\n var d = e.interactables.forEachMatch(p, f);\n if (d) {\n n.prepared.name = \"drag\", n.interactable = d, n.element = p;\n break;\n }\n p = A(p);\n }\n }\n }\n }\n }\n };\n function ce(t1) {\n var e = t1.prepared && t1.prepared.name;\n if (!e) return null;\n var n = t1.interactable.options;\n return n[e].hold || n[e].delay;\n }\n var le = {\n id: \"auto-start/hold\",\n install: function(t1) {\n var e = t1.defaults;\n t1.usePlugin(ae), e.perAction.hold = 0, e.perAction.delay = 0;\n },\n listeners: {\n \"interactions:new\": function(t1) {\n t1.interaction.autoStartHoldTimer = null;\n },\n \"autoStart:prepared\": function(t1) {\n var e = t1.interaction, n = ce(e);\n n > 0 && (e.autoStartHoldTimer = setTimeout(function() {\n e.start(e.prepared, e.interactable, e.element);\n }, n));\n },\n \"interactions:move\": function(t1) {\n var e = t1.interaction, n = t1.duplicate;\n e.autoStartHoldTimer && e.pointerWasMoved && !n && (clearTimeout(e.autoStartHoldTimer), e.autoStartHoldTimer = null);\n },\n \"autoStart:before-start\": function(t1) {\n var e = t1.interaction;\n ce(e) > 0 && (e.prepared.name = null);\n }\n },\n getHoldDuration: ce\n }, ue = le, pe = {\n id: \"auto-start\",\n install: function(t1) {\n t1.usePlugin(ae), t1.usePlugin(ue), t1.usePlugin(se);\n }\n }, fe = function(t1) {\n return /^(always|never|auto)$/.test(t1) ? (this.options.preventDefault = t1, this) : w.bool(t1) ? (this.options.preventDefault = t1 ? \"always\" : \"never\", this) : this.options.preventDefault;\n };\n function de(t1) {\n var e = t1.interaction, n = t1.event;\n e.interactable && e.interactable.checkAndPreventDefault(n);\n }\n var he = {\n id: \"core/interactablePreventDefault\",\n install: function(t1) {\n var e = t1.Interactable;\n e.prototype.preventDefault = fe, e.prototype.checkAndPreventDefault = function(e) {\n return function(t1, e, n) {\n var r = t1.options.preventDefault;\n if (\"never\" !== r) {\n if (\"always\" !== r) {\n if (e.events.supportsPassive && /^touch(start|move)$/.test(n.type)) {\n var i = y(n.target).document, o = e.getDocOptions(i);\n if (!o || !o.events || !1 !== o.events.passive) return;\n }\n /^(mouse|pointer|touch)*(down|start)/i.test(n.type) || w.element(n.target) && R(n.target, \"input,select,textarea,[contenteditable=true],[contenteditable=true] *\") || n.preventDefault();\n } else n.preventDefault();\n }\n }(this, t1, e);\n }, t1.interactions.docEvents.push({\n type: \"dragstart\",\n listener: function(e) {\n for(var n = 0, r = t1.interactions.list; n < r.length; n++){\n var i = r[n];\n if (i.element && (i.element === e.target || M(i.element, e.target))) return void i.interactable.checkAndPreventDefault(e);\n }\n }\n });\n },\n listeners: [\n \"down\",\n \"move\",\n \"up\",\n \"cancel\"\n ].reduce(function(t1, e) {\n return t1[\"interactions:\".concat(e)] = de, t1;\n }, {})\n };\n function ve(t1, e) {\n if (e.phaselessTypes[t1]) return !0;\n for(var n in e.map)if (0 === t1.indexOf(n) && t1.substr(n.length) in e.phases) return !0;\n return !1;\n }\n function ge(t1) {\n var e = {};\n for(var n in t1){\n var r = t1[n];\n w.plainObject(r) ? e[n] = ge(r) : w.array(r) ? e[n] = mt(r) : e[n] = r;\n }\n return e;\n }\n var me = function() {\n function t1(e) {\n r(this, t1), this.states = [], this.startOffset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n }, this.startDelta = void 0, this.result = void 0, this.endResult = void 0, this.startEdges = void 0, this.edges = void 0, this.interaction = void 0, this.interaction = e, this.result = ye(), this.edges = {\n left: !1,\n right: !1,\n top: !1,\n bottom: !1\n };\n }\n return o(t1, [\n {\n key: \"start\",\n value: function(t1, e) {\n var n, r, i = t1.phase, o = this.interaction, a = function(t1) {\n var e = t1.interactable.options[t1.prepared.name], n = e.modifiers;\n if (n && n.length) return n;\n return [\n \"snap\",\n \"snapSize\",\n \"snapEdges\",\n \"restrict\",\n \"restrictEdges\",\n \"restrictSize\"\n ].map(function(t1) {\n var n = e[t1];\n return n && n.enabled && {\n options: n,\n methods: n._methods\n };\n }).filter(function(t1) {\n return !!t1;\n });\n }(o);\n this.prepareStates(a), this.startEdges = V({}, o.edges), this.edges = V({}, this.startEdges), this.startOffset = (n = o.rect, r = e, n ? {\n left: r.x - n.left,\n top: r.y - n.top,\n right: n.right - r.x,\n bottom: n.bottom - r.y\n } : {\n left: 0,\n top: 0,\n right: 0,\n bottom: 0\n }), this.startDelta = {\n x: 0,\n y: 0\n };\n var s = this.fillArg({\n phase: i,\n pageCoords: e,\n preEnd: !1\n });\n return this.result = ye(), this.startAll(s), this.result = this.setAll(s);\n }\n },\n {\n key: \"fillArg\",\n value: function(t1) {\n var e = this.interaction;\n return t1.interaction = e, t1.interactable = e.interactable, t1.element = e.element, t1.rect || (t1.rect = e.rect), t1.edges || (t1.edges = this.startEdges), t1.startOffset = this.startOffset, t1;\n }\n },\n {\n key: \"startAll\",\n value: function(t1) {\n for(var e = 0, n = this.states; e < n.length; e++){\n var r = n[e];\n r.methods.start && (t1.state = r, r.methods.start(t1));\n }\n }\n },\n {\n key: \"setAll\",\n value: function(t1) {\n var e = t1.phase, n = t1.preEnd, r = t1.skipModifiers, i = t1.rect, o = t1.edges;\n t1.coords = V({}, t1.pageCoords), t1.rect = V({}, i), t1.edges = V({}, o);\n for(var a = r ? this.states.slice(r) : this.states, s = ye(t1.coords, t1.rect), c = 0; c < a.length; c++){\n var l, u = a[c], p = u.options, f = V({}, t1.coords), d = null;\n null != (l = u.methods) && l.set && this.shouldDo(p, n, e) && (t1.state = u, d = u.methods.set(t1), H(t1.edges, t1.rect, {\n x: t1.coords.x - f.x,\n y: t1.coords.y - f.y\n })), s.eventProps.push(d);\n }\n V(this.edges, t1.edges), s.delta.x = t1.coords.x - t1.pageCoords.x, s.delta.y = t1.coords.y - t1.pageCoords.y, s.rectDelta.left = t1.rect.left - i.left, s.rectDelta.right = t1.rect.right - i.right, s.rectDelta.top = t1.rect.top - i.top, s.rectDelta.bottom = t1.rect.bottom - i.bottom;\n var h = this.result.coords, v = this.result.rect;\n if (h && v) {\n var g = s.rect.left !== v.left || s.rect.right !== v.right || s.rect.top !== v.top || s.rect.bottom !== v.bottom;\n s.changed = g || h.x !== s.coords.x || h.y !== s.coords.y;\n }\n return s;\n }\n },\n {\n key: \"applyToInteraction\",\n value: function(t1) {\n var e = this.interaction, n = t1.phase, r = e.coords.cur, i = e.coords.start, o = this.result, a = this.startDelta, s = o.delta;\n \"start\" === n && V(this.startDelta, o.delta);\n for(var c = 0, l = [\n [\n i,\n a\n ],\n [\n r,\n s\n ]\n ]; c < l.length; c++){\n var u = l[c], p = u[0], f = u[1];\n p.page.x += f.x, p.page.y += f.y, p.client.x += f.x, p.client.y += f.y;\n }\n var d = this.result.rectDelta, h = t1.rect || e.rect;\n h.left += d.left, h.right += d.right, h.top += d.top, h.bottom += d.bottom, h.width = h.right - h.left, h.height = h.bottom - h.top;\n }\n },\n {\n key: \"setAndApply\",\n value: function(t1) {\n var e = this.interaction, n = t1.phase, r = t1.preEnd, i = t1.skipModifiers, o = this.setAll(this.fillArg({\n preEnd: r,\n phase: n,\n pageCoords: t1.modifiedCoords || e.coords.cur.page\n }));\n if (this.result = o, !o.changed && (!i || i < this.states.length) && e.interacting()) return !1;\n if (t1.modifiedCoords) {\n var a = e.coords.cur.page, s = {\n x: t1.modifiedCoords.x - a.x,\n y: t1.modifiedCoords.y - a.y\n };\n o.coords.x += s.x, o.coords.y += s.y, o.delta.x += s.x, o.delta.y += s.y;\n }\n this.applyToInteraction(t1);\n }\n },\n {\n key: \"beforeEnd\",\n value: function(t1) {\n var e = t1.interaction, n = t1.event, r = this.states;\n if (r && r.length) {\n for(var i = !1, o = 0; o < r.length; o++){\n var a = r[o];\n t1.state = a;\n var s = a.options, c = a.methods, l = c.beforeEnd && c.beforeEnd(t1);\n if (l) return this.endResult = l, !1;\n i = i || !i && this.shouldDo(s, !0, t1.phase, !0);\n }\n i && e.move({\n event: n,\n preEnd: !0\n });\n }\n }\n },\n {\n key: \"stop\",\n value: function(t1) {\n var e = t1.interaction;\n if (this.states && this.states.length) {\n var n = V({\n states: this.states,\n interactable: e.interactable,\n element: e.element,\n rect: null\n }, t1);\n this.fillArg(n);\n for(var r = 0, i = this.states; r < i.length; r++){\n var o = i[r];\n n.state = o, o.methods.stop && o.methods.stop(n);\n }\n this.states = null, this.endResult = null;\n }\n }\n },\n {\n key: \"prepareStates\",\n value: function(t1) {\n this.states = [];\n for(var e = 0; e < t1.length; e++){\n var n = t1[e], r = n.options, i = n.methods, o = n.name;\n this.states.push({\n options: r,\n methods: i,\n index: e,\n name: o\n });\n }\n return this.states;\n }\n },\n {\n key: \"restoreInteractionCoords\",\n value: function(t1) {\n var e = t1.interaction, n = e.coords, r = e.rect, i = e.modification;\n if (i.result) {\n for(var o = i.startDelta, a = i.result, s = a.delta, c = a.rectDelta, l = 0, u = [\n [\n n.start,\n o\n ],\n [\n n.cur,\n s\n ]\n ]; l < u.length; l++){\n var p = u[l], f = p[0], d = p[1];\n f.page.x -= d.x, f.page.y -= d.y, f.client.x -= d.x, f.client.y -= d.y;\n }\n r.left -= c.left, r.right -= c.right, r.top -= c.top, r.bottom -= c.bottom;\n }\n }\n },\n {\n key: \"shouldDo\",\n value: function(t1, e, n, r) {\n return !(!t1 || !1 === t1.enabled || r && !t1.endOnly || t1.endOnly && !e || \"start\" === n && !t1.setStart);\n }\n },\n {\n key: \"copyFrom\",\n value: function(t1) {\n this.startOffset = t1.startOffset, this.startDelta = t1.startDelta, this.startEdges = t1.startEdges, this.edges = t1.edges, this.states = t1.states.map(function(t1) {\n return ge(t1);\n }), this.result = ye(V({}, t1.result.coords), V({}, t1.result.rect));\n }\n },\n {\n key: \"destroy\",\n value: function() {\n for(var t1 in this)this[t1] = null;\n }\n }\n ]), t1;\n }();\n function ye(t1, e) {\n return {\n rect: e,\n coords: t1,\n delta: {\n x: 0,\n y: 0\n },\n rectDelta: {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventProps: [],\n changed: !0\n };\n }\n function be(t1, e) {\n var n = t1.defaults, r = {\n start: t1.start,\n set: t1.set,\n beforeEnd: t1.beforeEnd,\n stop: t1.stop\n }, i = function(t1) {\n var i = t1 || {};\n for(var o in i.enabled = !1 !== i.enabled, n)o in i || (i[o] = n[o]);\n var a = {\n options: i,\n methods: r,\n name: e,\n enable: function() {\n return i.enabled = !0, a;\n },\n disable: function() {\n return i.enabled = !1, a;\n }\n };\n return a;\n };\n return e && \"string\" == typeof e && (i._defaults = n, i._methods = r), i;\n }\n function xe(t1) {\n var e = t1.iEvent, n = t1.interaction.modification.result;\n n && (e.modifiers = n.eventProps);\n }\n var we = {\n id: \"modifiers/base\",\n before: [\n \"actions\"\n ],\n install: function(t1) {\n t1.defaults.perAction.modifiers = [];\n },\n listeners: {\n \"interactions:new\": function(t1) {\n var e = t1.interaction;\n e.modification = new me(e);\n },\n \"interactions:before-action-start\": function(t1) {\n var e = t1.interaction, n = t1.interaction.modification;\n n.start(t1, e.coords.start.page), e.edges = n.edges, n.applyToInteraction(t1);\n },\n \"interactions:before-action-move\": function(t1) {\n var e = t1.interaction, n = e.modification, r = n.setAndApply(t1);\n return e.edges = n.edges, r;\n },\n \"interactions:before-action-end\": function(t1) {\n var e = t1.interaction, n = e.modification, r = n.beforeEnd(t1);\n return e.edges = n.startEdges, r;\n },\n \"interactions:action-start\": xe,\n \"interactions:action-move\": xe,\n \"interactions:action-end\": xe,\n \"interactions:after-action-start\": function(t1) {\n return t1.interaction.modification.restoreInteractionCoords(t1);\n },\n \"interactions:after-action-move\": function(t1) {\n return t1.interaction.modification.restoreInteractionCoords(t1);\n },\n \"interactions:stop\": function(t1) {\n return t1.interaction.modification.stop(t1);\n }\n }\n }, Ee = we, Te = {\n base: {\n preventDefault: \"auto\",\n deltaSource: \"page\"\n },\n perAction: {\n enabled: !1,\n origin: {\n x: 0,\n y: 0\n }\n },\n actions: {}\n }, Se = function(t1) {\n s(n, t1);\n var e = p(n);\n function n(t1, i, o, a, s, c, l) {\n var p;\n r(this, n), (p = e.call(this, t1)).relatedTarget = null, p.screenX = void 0, p.screenY = void 0, p.button = void 0, p.buttons = void 0, p.ctrlKey = void 0, p.shiftKey = void 0, p.altKey = void 0, p.metaKey = void 0, p.page = void 0, p.client = void 0, p.delta = void 0, p.rect = void 0, p.x0 = void 0, p.y0 = void 0, p.t0 = void 0, p.dt = void 0, p.duration = void 0, p.clientX0 = void 0, p.clientY0 = void 0, p.velocity = void 0, p.speed = void 0, p.swipe = void 0, p.axes = void 0, p.preEnd = void 0, s = s || t1.element;\n var f = t1.interactable, d = (f && f.options || Te).deltaSource, h = K(f, s, o), v = \"start\" === a, g = \"end\" === a, m = v ? u(p) : t1.prevEvent, y = v ? t1.coords.start : g ? {\n page: m.page,\n client: m.client,\n timeStamp: t1.coords.cur.timeStamp\n } : t1.coords.cur;\n return p.page = V({}, y.page), p.client = V({}, y.client), p.rect = V({}, t1.rect), p.timeStamp = y.timeStamp, g || (p.page.x -= h.x, p.page.y -= h.y, p.client.x -= h.x, p.client.y -= h.y), p.ctrlKey = i.ctrlKey, p.altKey = i.altKey, p.shiftKey = i.shiftKey, p.metaKey = i.metaKey, p.button = i.button, p.buttons = i.buttons, p.target = s, p.currentTarget = s, p.preEnd = c, p.type = l || o + (a || \"\"), p.interactable = f, p.t0 = v ? t1.pointers[t1.pointers.length - 1].downTime : m.t0, p.x0 = t1.coords.start.page.x - h.x, p.y0 = t1.coords.start.page.y - h.y, p.clientX0 = t1.coords.start.client.x - h.x, p.clientY0 = t1.coords.start.client.y - h.y, p.delta = v || g ? {\n x: 0,\n y: 0\n } : {\n x: p[d].x - m[d].x,\n y: p[d].y - m[d].y\n }, p.dt = t1.coords.delta.timeStamp, p.duration = p.timeStamp - p.t0, p.velocity = V({}, t1.coords.velocity[d]), p.speed = Q(p.velocity.x, p.velocity.y), p.swipe = g || \"inertiastart\" === a ? p.getSwipe() : null, p;\n }\n return o(n, [\n {\n key: \"getSwipe\",\n value: function() {\n var t1 = this._interaction;\n if (t1.prevEvent.speed < 600 || this.timeStamp - t1.prevEvent.timeStamp > 150) return null;\n var e = 180 * Math.atan2(t1.prevEvent.velocityY, t1.prevEvent.velocityX) / Math.PI;\n e < 0 && (e += 360);\n var n = 112.5 <= e && e < 247.5, r = 202.5 <= e && e < 337.5;\n return {\n up: r,\n down: !r && 22.5 <= e && e < 157.5,\n left: n,\n right: !n && (292.5 <= e || e < 67.5),\n angle: e,\n speed: t1.prevEvent.speed,\n velocity: {\n x: t1.prevEvent.velocityX,\n y: t1.prevEvent.velocityY\n }\n };\n }\n },\n {\n key: \"preventDefault\",\n value: function() {}\n },\n {\n key: \"stopImmediatePropagation\",\n value: function() {\n this.immediatePropagationStopped = this.propagationStopped = !0;\n }\n },\n {\n key: \"stopPropagation\",\n value: function() {\n this.propagationStopped = !0;\n }\n }\n ]), n;\n }(vt);\n Object.defineProperties(Se.prototype, {\n pageX: {\n get: function() {\n return this.page.x;\n },\n set: function(t1) {\n this.page.x = t1;\n }\n },\n pageY: {\n get: function() {\n return this.page.y;\n },\n set: function(t1) {\n this.page.y = t1;\n }\n },\n clientX: {\n get: function() {\n return this.client.x;\n },\n set: function(t1) {\n this.client.x = t1;\n }\n },\n clientY: {\n get: function() {\n return this.client.y;\n },\n set: function(t1) {\n this.client.y = t1;\n }\n },\n dx: {\n get: function() {\n return this.delta.x;\n },\n set: function(t1) {\n this.delta.x = t1;\n }\n },\n dy: {\n get: function() {\n return this.delta.y;\n },\n set: function(t1) {\n this.delta.y = t1;\n }\n },\n velocityX: {\n get: function() {\n return this.velocity.x;\n },\n set: function(t1) {\n this.velocity.x = t1;\n }\n },\n velocityY: {\n get: function() {\n return this.velocity.y;\n },\n set: function(t1) {\n this.velocity.y = t1;\n }\n }\n });\n var _e = o(function t1(e, n, i, o, a) {\n r(this, t1), this.id = void 0, this.pointer = void 0, this.event = void 0, this.downTime = void 0, this.downTarget = void 0, this.id = e, this.pointer = n, this.event = i, this.downTime = o, this.downTarget = a;\n }), Pe = function(t1) {\n return t1.interactable = \"\", t1.element = \"\", t1.prepared = \"\", t1.pointerIsDown = \"\", t1.pointerWasMoved = \"\", t1._proxy = \"\", t1;\n }({}), Oe = function(t1) {\n return t1.start = \"\", t1.move = \"\", t1.end = \"\", t1.stop = \"\", t1.interacting = \"\", t1;\n }({}), ke = 0, De = function() {\n function t1(e) {\n var n = this, i = e.pointerType, o = e.scopeFire;\n r(this, t1), this.interactable = null, this.element = null, this.rect = null, this._rects = void 0, this.edges = null, this._scopeFire = void 0, this.prepared = {\n name: null,\n axis: null,\n edges: null\n }, this.pointerType = void 0, this.pointers = [], this.downEvent = null, this.downPointer = {}, this._latestPointer = {\n pointer: null,\n event: null,\n eventTarget: null\n }, this.prevEvent = null, this.pointerIsDown = !1, this.pointerWasMoved = !1, this._interacting = !1, this._ending = !1, this._stopped = !0, this._proxy = void 0, this.simulation = null, this.doMove = Nt(function(t1) {\n this.move(t1);\n }, \"The interaction.doMove() method has been renamed to interaction.move()\"), this.coords = {\n start: {\n page: {\n x: 0,\n y: 0\n },\n client: {\n x: 0,\n y: 0\n },\n timeStamp: 0\n },\n prev: {\n page: {\n x: 0,\n y: 0\n },\n client: {\n x: 0,\n y: 0\n },\n timeStamp: 0\n },\n cur: {\n page: {\n x: 0,\n y: 0\n },\n client: {\n x: 0,\n y: 0\n },\n timeStamp: 0\n },\n delta: {\n page: {\n x: 0,\n y: 0\n },\n client: {\n x: 0,\n y: 0\n },\n timeStamp: 0\n },\n velocity: {\n page: {\n x: 0,\n y: 0\n },\n client: {\n x: 0,\n y: 0\n },\n timeStamp: 0\n }\n }, this._id = ke++, this._scopeFire = o, this.pointerType = i;\n var a = this;\n this._proxy = {};\n var s = function(t1) {\n Object.defineProperty(n._proxy, t1, {\n get: function() {\n return a[t1];\n }\n });\n };\n for(var c in Pe)s(c);\n var l = function(t1) {\n Object.defineProperty(n._proxy, t1, {\n value: function() {\n return a[t1].apply(a, arguments);\n }\n });\n };\n for(var u in Oe)l(u);\n this._scopeFire(\"interactions:new\", {\n interaction: this\n });\n }\n return o(t1, [\n {\n key: \"pointerMoveTolerance\",\n get: function() {\n return 1;\n }\n },\n {\n key: \"pointerDown\",\n value: function(t1, e, n) {\n var r = this.updatePointer(t1, e, n, !0), i = this.pointers[r];\n this._scopeFire(\"interactions:down\", {\n pointer: t1,\n event: e,\n eventTarget: n,\n pointerIndex: r,\n pointerInfo: i,\n type: \"down\",\n interaction: this\n });\n }\n },\n {\n key: \"start\",\n value: function(t1, e, n) {\n return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (\"gesture\" === t1.name ? 2 : 1) || !e.options[t1.name].enabled) && (Ut(this.prepared, t1), this.interactable = e, this.element = n, this.rect = e.getRect(n), this.edges = this.prepared.edges ? V({}, this.prepared.edges) : {\n left: !0,\n right: !0,\n top: !0,\n bottom: !0\n }, this._stopped = !1, this._interacting = this._doPhase({\n interaction: this,\n event: this.downEvent,\n phase: \"start\"\n }) && !this._stopped, this._interacting);\n }\n },\n {\n key: \"pointerMove\",\n value: function(t1, e, n) {\n this.simulation || this.modification && this.modification.endResult || this.updatePointer(t1, e, n, !1);\n var r, i, o = this.coords.cur.page.x === this.coords.prev.page.x && this.coords.cur.page.y === this.coords.prev.page.y && this.coords.cur.client.x === this.coords.prev.client.x && this.coords.cur.client.y === this.coords.prev.client.y;\n this.pointerIsDown && !this.pointerWasMoved && (r = this.coords.cur.client.x - this.coords.start.client.x, i = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = Q(r, i) > this.pointerMoveTolerance);\n var a, s, c, l = this.getPointerIndex(t1), u = {\n pointer: t1,\n pointerIndex: l,\n pointerInfo: this.pointers[l],\n event: e,\n type: \"move\",\n eventTarget: n,\n dx: r,\n dy: i,\n duplicate: o,\n interaction: this\n };\n o || (a = this.coords.velocity, s = this.coords.delta, c = Math.max(s.timeStamp / 1e3, .001), a.page.x = s.page.x / c, a.page.y = s.page.y / c, a.client.x = s.client.x / c, a.client.y = s.client.y / c, a.timeStamp = c), this._scopeFire(\"interactions:move\", u), o || this.simulation || (this.interacting() && (u.type = null, this.move(u)), this.pointerWasMoved && et(this.coords.prev, this.coords.cur));\n }\n },\n {\n key: \"move\",\n value: function(t1) {\n t1 && t1.event || nt(this.coords.delta), (t1 = V({\n pointer: this._latestPointer.pointer,\n event: this._latestPointer.event,\n eventTarget: this._latestPointer.eventTarget,\n interaction: this\n }, t1 || {})).phase = \"move\", this._doPhase(t1);\n }\n },\n {\n key: \"pointerUp\",\n value: function(t1, e, n, r) {\n var i = this.getPointerIndex(t1);\n -1 === i && (i = this.updatePointer(t1, e, n, !1));\n var o = /cancel$/i.test(e.type) ? \"cancel\" : \"up\";\n this._scopeFire(\"interactions:\".concat(o), {\n pointer: t1,\n pointerIndex: i,\n pointerInfo: this.pointers[i],\n event: e,\n eventTarget: n,\n type: o,\n curEventTarget: r,\n interaction: this\n }), this.simulation || this.end(e), this.removePointer(t1, e);\n }\n },\n {\n key: \"documentBlur\",\n value: function(t1) {\n this.end(t1), this._scopeFire(\"interactions:blur\", {\n event: t1,\n type: \"blur\",\n interaction: this\n });\n }\n },\n {\n key: \"end\",\n value: function(t1) {\n var e;\n this._ending = !0, t1 = t1 || this._latestPointer.event, this.interacting() && (e = this._doPhase({\n event: t1,\n interaction: this,\n phase: \"end\"\n })), this._ending = !1, !0 === e && this.stop();\n }\n },\n {\n key: \"currentAction\",\n value: function() {\n return this._interacting ? this.prepared.name : null;\n }\n },\n {\n key: \"interacting\",\n value: function() {\n return this._interacting;\n }\n },\n {\n key: \"stop\",\n value: function() {\n this._scopeFire(\"interactions:stop\", {\n interaction: this\n }), this.interactable = this.element = null, this._interacting = !1, this._stopped = !0, this.prepared.name = this.prevEvent = null;\n }\n },\n {\n key: \"getPointerIndex\",\n value: function(t1) {\n var e = at(t1);\n return \"mouse\" === this.pointerType || \"pen\" === this.pointerType ? this.pointers.length - 1 : yt(this.pointers, function(t1) {\n return t1.id === e;\n });\n }\n },\n {\n key: \"getPointerInfo\",\n value: function(t1) {\n return this.pointers[this.getPointerIndex(t1)];\n }\n },\n {\n key: \"updatePointer\",\n value: function(t1, e, n, r) {\n var i, o, a, s = at(t1), c = this.getPointerIndex(t1), l = this.pointers[c];\n return r = !1 !== r && (r || /(down|start)$/i.test(e.type)), l ? l.pointer = t1 : (l = new _e(s, t1, e, null, null), c = this.pointers.length, this.pointers.push(l)), st(this.coords.cur, this.pointers.map(function(t1) {\n return t1.pointer;\n }), this._now()), i = this.coords.delta, o = this.coords.prev, a = this.coords.cur, i.page.x = a.page.x - o.page.x, i.page.y = a.page.y - o.page.y, i.client.x = a.client.x - o.client.x, i.client.y = a.client.y - o.client.y, i.timeStamp = a.timeStamp - o.timeStamp, r && (this.pointerIsDown = !0, l.downTime = this.coords.cur.timeStamp, l.downTarget = n, tt(this.downPointer, t1), this.interacting() || (et(this.coords.start, this.coords.cur), et(this.coords.prev, this.coords.cur), this.downEvent = e, this.pointerWasMoved = !1)), this._updateLatestPointer(t1, e, n), this._scopeFire(\"interactions:update-pointer\", {\n pointer: t1,\n event: e,\n eventTarget: n,\n down: r,\n pointerInfo: l,\n pointerIndex: c,\n interaction: this\n }), c;\n }\n },\n {\n key: \"removePointer\",\n value: function(t1, e) {\n var n = this.getPointerIndex(t1);\n if (-1 !== n) {\n var r = this.pointers[n];\n this._scopeFire(\"interactions:remove-pointer\", {\n pointer: t1,\n event: e,\n eventTarget: null,\n pointerIndex: n,\n pointerInfo: r,\n interaction: this\n }), this.pointers.splice(n, 1), this.pointerIsDown = !1;\n }\n }\n },\n {\n key: \"_updateLatestPointer\",\n value: function(t1, e, n) {\n this._latestPointer.pointer = t1, this._latestPointer.event = e, this._latestPointer.eventTarget = n;\n }\n },\n {\n key: \"destroy\",\n value: function() {\n this._latestPointer.pointer = null, this._latestPointer.event = null, this._latestPointer.eventTarget = null;\n }\n },\n {\n key: \"_createPreparedEvent\",\n value: function(t1, e, n, r) {\n return new Se(this, t1, this.prepared.name, e, this.element, n, r);\n }\n },\n {\n key: \"_fireEvent\",\n value: function(t1) {\n var e;\n null == (e = this.interactable) || e.fire(t1), (!this.prevEvent || t1.timeStamp >= this.prevEvent.timeStamp) && (this.prevEvent = t1);\n }\n },\n {\n key: \"_doPhase\",\n value: function(t1) {\n var e = t1.event, n = t1.phase, r = t1.preEnd, i = t1.type, o = this.rect;\n if (o && \"move\" === n && (H(this.edges, o, this.coords.delta[this.interactable.options.deltaSource]), o.width = o.right - o.left, o.height = o.bottom - o.top), !1 === this._scopeFire(\"interactions:before-action-\".concat(n), t1)) return !1;\n var a = t1.iEvent = this._createPreparedEvent(e, n, r, i);\n return this._scopeFire(\"interactions:action-\".concat(n), t1), \"start\" === n && (this.prevEvent = a), this._fireEvent(a), this._scopeFire(\"interactions:after-action-\".concat(n), t1), !0;\n }\n },\n {\n key: \"_now\",\n value: function() {\n return Date.now();\n }\n }\n ]), t1;\n }();\n function Ie(t1) {\n Me(t1.interaction);\n }\n function Me(t1) {\n if (!function(t1) {\n return !(!t1.offset.pending.x && !t1.offset.pending.y);\n }(t1)) return !1;\n var e = t1.offset.pending;\n return Ae(t1.coords.cur, e), Ae(t1.coords.delta, e), H(t1.edges, t1.rect, e), e.x = 0, e.y = 0, !0;\n }\n function ze(t1) {\n var e = t1.x, n = t1.y;\n this.offset.pending.x += e, this.offset.pending.y += n, this.offset.total.x += e, this.offset.total.y += n;\n }\n function Ae(t1, e) {\n var n = t1.page, r = t1.client, i = e.x, o = e.y;\n n.x += i, n.y += o, r.x += i, r.y += o;\n }\n Oe.offsetBy = \"\";\n var Re = {\n id: \"offset\",\n before: [\n \"modifiers\",\n \"pointer-events\",\n \"actions\",\n \"inertia\"\n ],\n install: function(t1) {\n t1.Interaction.prototype.offsetBy = ze;\n },\n listeners: {\n \"interactions:new\": function(t1) {\n t1.interaction.offset = {\n total: {\n x: 0,\n y: 0\n },\n pending: {\n x: 0,\n y: 0\n }\n };\n },\n \"interactions:update-pointer\": function(t1) {\n return function(t1) {\n t1.pointerIsDown && (Ae(t1.coords.cur, t1.offset.total), t1.offset.pending.x = 0, t1.offset.pending.y = 0);\n }(t1.interaction);\n },\n \"interactions:before-action-start\": Ie,\n \"interactions:before-action-move\": Ie,\n \"interactions:before-action-end\": function(t1) {\n var e = t1.interaction;\n if (Me(e)) return e.move({\n offset: !0\n }), e.end(), !1;\n },\n \"interactions:stop\": function(t1) {\n var e = t1.interaction;\n e.offset.total.x = 0, e.offset.total.y = 0, e.offset.pending.x = 0, e.offset.pending.y = 0;\n }\n }\n }, Ce = Re;\n var je = function() {\n function t1(e) {\n r(this, t1), this.active = !1, this.isModified = !1, this.smoothEnd = !1, this.allowResume = !1, this.modification = void 0, this.modifierCount = 0, this.modifierArg = void 0, this.startCoords = void 0, this.t0 = 0, this.v0 = 0, this.te = 0, this.targetOffset = void 0, this.modifiedOffset = void 0, this.currentOffset = void 0, this.lambda_v0 = 0, this.one_ve_v0 = 0, this.timeout = void 0, this.interaction = void 0, this.interaction = e;\n }\n return o(t1, [\n {\n key: \"start\",\n value: function(t1) {\n var e = this.interaction, n = Fe(e);\n if (!n || !n.enabled) return !1;\n var r = e.coords.velocity.client, i = Q(r.x, r.y), o = this.modification || (this.modification = new me(e));\n if (o.copyFrom(e.modification), this.t0 = e._now(), this.allowResume = n.allowResume, this.v0 = i, this.currentOffset = {\n x: 0,\n y: 0\n }, this.startCoords = e.coords.cur.page, this.modifierArg = o.fillArg({\n pageCoords: this.startCoords,\n preEnd: !0,\n phase: \"inertiastart\"\n }), this.t0 - e.coords.cur.timeStamp < 50 && i > n.minSpeed && i > n.endSpeed) this.startInertia();\n else {\n if (o.result = o.setAll(this.modifierArg), !o.result.changed) return !1;\n this.startSmoothEnd();\n }\n return e.modification.result.rect = null, e.offsetBy(this.targetOffset), e._doPhase({\n interaction: e,\n event: t1,\n phase: \"inertiastart\"\n }), e.offsetBy({\n x: -this.targetOffset.x,\n y: -this.targetOffset.y\n }), e.modification.result.rect = null, this.active = !0, e.simulation = this, !0;\n }\n },\n {\n key: \"startInertia\",\n value: function() {\n var t1 = this, e = this.interaction.coords.velocity.client, n = Fe(this.interaction), r = n.resistance, i = -Math.log(n.endSpeed / this.v0) / r;\n this.targetOffset = {\n x: (e.x - i) / r,\n y: (e.y - i) / r\n }, this.te = i, this.lambda_v0 = r / this.v0, this.one_ve_v0 = 1 - n.endSpeed / this.v0;\n var o = this.modification, a = this.modifierArg;\n a.pageCoords = {\n x: this.startCoords.x + this.targetOffset.x,\n y: this.startCoords.y + this.targetOffset.y\n }, o.result = o.setAll(a), o.result.changed && (this.isModified = !0, this.modifiedOffset = {\n x: this.targetOffset.x + o.result.delta.x,\n y: this.targetOffset.y + o.result.delta.y\n }), this.onNextFrame(function() {\n return t1.inertiaTick();\n });\n }\n },\n {\n key: \"startSmoothEnd\",\n value: function() {\n var t1 = this;\n this.smoothEnd = !0, this.isModified = !0, this.targetOffset = {\n x: this.modification.result.delta.x,\n y: this.modification.result.delta.y\n }, this.onNextFrame(function() {\n return t1.smoothEndTick();\n });\n }\n },\n {\n key: \"onNextFrame\",\n value: function(t1) {\n var e = this;\n this.timeout = Lt.request(function() {\n e.active && t1();\n });\n }\n },\n {\n key: \"inertiaTick\",\n value: function() {\n var t1, e, n, r, i, o, a, s = this, c = this.interaction, l = Fe(c).resistance, u = (c._now() - this.t0) / 1e3;\n if (u < this.te) {\n var p, f = 1 - (Math.exp(-l * u) - this.lambda_v0) / this.one_ve_v0;\n this.isModified ? (t1 = 0, e = 0, n = this.targetOffset.x, r = this.targetOffset.y, i = this.modifiedOffset.x, o = this.modifiedOffset.y, p = {\n x: Ye(a = f, t1, n, i),\n y: Ye(a, e, r, o)\n }) : p = {\n x: this.targetOffset.x * f,\n y: this.targetOffset.y * f\n };\n var d = {\n x: p.x - this.currentOffset.x,\n y: p.y - this.currentOffset.y\n };\n this.currentOffset.x += d.x, this.currentOffset.y += d.y, c.offsetBy(d), c.move(), this.onNextFrame(function() {\n return s.inertiaTick();\n });\n } else c.offsetBy({\n x: this.modifiedOffset.x - this.currentOffset.x,\n y: this.modifiedOffset.y - this.currentOffset.y\n }), this.end();\n }\n },\n {\n key: \"smoothEndTick\",\n value: function() {\n var t1 = this, e = this.interaction, n = e._now() - this.t0, r = Fe(e).smoothEndDuration;\n if (n < r) {\n var i = {\n x: Le(n, 0, this.targetOffset.x, r),\n y: Le(n, 0, this.targetOffset.y, r)\n }, o = {\n x: i.x - this.currentOffset.x,\n y: i.y - this.currentOffset.y\n };\n this.currentOffset.x += o.x, this.currentOffset.y += o.y, e.offsetBy(o), e.move({\n skipModifiers: this.modifierCount\n }), this.onNextFrame(function() {\n return t1.smoothEndTick();\n });\n } else e.offsetBy({\n x: this.targetOffset.x - this.currentOffset.x,\n y: this.targetOffset.y - this.currentOffset.y\n }), this.end();\n }\n },\n {\n key: \"resume\",\n value: function(t1) {\n var e = t1.pointer, n = t1.event, r = t1.eventTarget, i = this.interaction;\n i.offsetBy({\n x: -this.currentOffset.x,\n y: -this.currentOffset.y\n }), i.updatePointer(e, n, r, !0), i._doPhase({\n interaction: i,\n event: n,\n phase: \"resume\"\n }), et(i.coords.prev, i.coords.cur), this.stop();\n }\n },\n {\n key: \"end\",\n value: function() {\n this.interaction.move(), this.interaction.end(), this.stop();\n }\n },\n {\n key: \"stop\",\n value: function() {\n this.active = this.smoothEnd = !1, this.interaction.simulation = null, Lt.cancel(this.timeout);\n }\n }\n ]), t1;\n }();\n function Fe(t1) {\n var e = t1.interactable, n = t1.prepared;\n return e && e.options && n.name && e.options[n.name].inertia;\n }\n var Xe = {\n id: \"inertia\",\n before: [\n \"modifiers\",\n \"actions\"\n ],\n install: function(t1) {\n var e = t1.defaults;\n t1.usePlugin(Ce), t1.usePlugin(Ee), t1.actions.phases.inertiastart = !0, t1.actions.phases.resume = !0, e.perAction.inertia = {\n enabled: !1,\n resistance: 10,\n minSpeed: 100,\n endSpeed: 10,\n allowResume: !0,\n smoothEndDuration: 300\n };\n },\n listeners: {\n \"interactions:new\": function(t1) {\n var e = t1.interaction;\n e.inertia = new je(e);\n },\n \"interactions:before-action-end\": function(t1) {\n var e = t1.interaction, n = t1.event;\n return (!e._interacting || e.simulation || !e.inertia.start(n)) && null;\n },\n \"interactions:down\": function(t1) {\n var e = t1.interaction, n = t1.eventTarget, r = e.inertia;\n if (r.active) for(var i = n; w.element(i);){\n if (i === e.element) {\n r.resume(t1);\n break;\n }\n i = A(i);\n }\n },\n \"interactions:stop\": function(t1) {\n var e = t1.interaction.inertia;\n e.active && e.stop();\n },\n \"interactions:before-action-resume\": function(t1) {\n var e = t1.interaction.modification;\n e.stop(t1), e.start(t1, t1.interaction.coords.cur.page), e.applyToInteraction(t1);\n },\n \"interactions:before-action-inertiastart\": function(t1) {\n return t1.interaction.modification.setAndApply(t1);\n },\n \"interactions:action-resume\": xe,\n \"interactions:action-inertiastart\": xe,\n \"interactions:after-action-inertiastart\": function(t1) {\n return t1.interaction.modification.restoreInteractionCoords(t1);\n },\n \"interactions:after-action-resume\": function(t1) {\n return t1.interaction.modification.restoreInteractionCoords(t1);\n }\n }\n };\n function Ye(t1, e, n, r) {\n var i = 1 - t1;\n return i * i * e + 2 * i * t1 * n + t1 * t1 * r;\n }\n function Le(t1, e, n, r) {\n return -n * (t1 /= r) * (t1 - 2) + e;\n }\n var qe = Xe;\n function Be(t1, e) {\n for(var n = 0; n < e.length; n++){\n var r = e[n];\n if (t1.immediatePropagationStopped) break;\n r(t1);\n }\n }\n var Ve = function() {\n function t1(e) {\n r(this, t1), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = V({}, e || {});\n }\n return o(t1, [\n {\n key: \"fire\",\n value: function(t1) {\n var e, n = this.global;\n (e = this.types[t1.type]) && Be(t1, e), !t1.propagationStopped && n && (e = n[t1.type]) && Be(t1, e);\n }\n },\n {\n key: \"on\",\n value: function(t1, e) {\n var n = $(t1, e);\n for(t1 in n)this.types[t1] = gt(this.types[t1] || [], n[t1]);\n }\n },\n {\n key: \"off\",\n value: function(t1, e) {\n var n = $(t1, e);\n for(t1 in n){\n var r = this.types[t1];\n if (r && r.length) for(var i = 0, o = n[t1]; i < o.length; i++){\n var a = o[i], s = r.indexOf(a);\n -1 !== s && r.splice(s, 1);\n }\n }\n }\n },\n {\n key: \"getRect\",\n value: function(t1) {\n return null;\n }\n }\n ]), t1;\n }();\n var We = function() {\n function t1(e) {\n r(this, t1), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = e, tt(this, e);\n }\n return o(t1, [\n {\n key: \"preventOriginalDefault\",\n value: function() {\n this.originalEvent.preventDefault();\n }\n },\n {\n key: \"stopPropagation\",\n value: function() {\n this.originalEvent.stopPropagation();\n }\n },\n {\n key: \"stopImmediatePropagation\",\n value: function() {\n this.originalEvent.stopImmediatePropagation();\n }\n }\n ]), t1;\n }();\n function Ge(t1) {\n return w.object(t1) ? {\n capture: !!t1.capture,\n passive: !!t1.passive\n } : {\n capture: !!t1,\n passive: !1\n };\n }\n function Ne(t1, e) {\n return t1 === e || (\"boolean\" == typeof t1 ? !!e.capture === t1 && !1 == !!e.passive : !!t1.capture == !!e.capture && !!t1.passive == !!e.passive);\n }\n var Ue = {\n id: \"events\",\n install: function(t1) {\n var e, n = [], r = {}, i = [], o = {\n add: a,\n remove: s,\n addDelegate: function(t1, e, n, o, s) {\n var u = Ge(s);\n if (!r[n]) {\n r[n] = [];\n for(var p = 0; p < i.length; p++){\n var f = i[p];\n a(f, n, c), a(f, n, l, !0);\n }\n }\n var d = r[n], h = bt(d, function(n) {\n return n.selector === t1 && n.context === e;\n });\n h || (h = {\n selector: t1,\n context: e,\n listeners: []\n }, d.push(h));\n h.listeners.push({\n func: o,\n options: u\n });\n },\n removeDelegate: function(t1, e, n, i, o) {\n var a, u = Ge(o), p = r[n], f = !1;\n if (!p) return;\n for(a = p.length - 1; a >= 0; a--){\n var d = p[a];\n if (d.selector === t1 && d.context === e) {\n for(var h = d.listeners, v = h.length - 1; v >= 0; v--){\n var g = h[v];\n if (g.func === i && Ne(g.options, u)) {\n h.splice(v, 1), h.length || (p.splice(a, 1), s(e, n, c), s(e, n, l, !0)), f = !0;\n break;\n }\n }\n if (f) break;\n }\n }\n },\n delegateListener: c,\n delegateUseCapture: l,\n delegatedEvents: r,\n documents: i,\n targets: n,\n supportsOptions: !1,\n supportsPassive: !1\n };\n function a(t1, e, r, i) {\n if (t1.addEventListener) {\n var a = Ge(i), s = bt(n, function(e) {\n return e.eventTarget === t1;\n });\n s || (s = {\n eventTarget: t1,\n events: {}\n }, n.push(s)), s.events[e] || (s.events[e] = []), bt(s.events[e], function(t1) {\n return t1.func === r && Ne(t1.options, a);\n }) || (t1.addEventListener(e, r, o.supportsOptions ? a : a.capture), s.events[e].push({\n func: r,\n options: a\n }));\n }\n }\n function s(t1, e, r, i) {\n if (t1.addEventListener && t1.removeEventListener) {\n var a = yt(n, function(e) {\n return e.eventTarget === t1;\n }), c = n[a];\n if (c && c.events) {\n if (\"all\" !== e) {\n var l = !1, u = c.events[e];\n if (u) {\n if (\"all\" === r) {\n for(var p = u.length - 1; p >= 0; p--){\n var f = u[p];\n s(t1, e, f.func, f.options);\n }\n return;\n }\n for(var d = Ge(i), h = 0; h < u.length; h++){\n var v = u[h];\n if (v.func === r && Ne(v.options, d)) {\n t1.removeEventListener(e, r, o.supportsOptions ? d : d.capture), u.splice(h, 1), 0 === u.length && (delete c.events[e], l = !0);\n break;\n }\n }\n }\n l && !Object.keys(c.events).length && n.splice(a, 1);\n } else for(e in c.events)c.events.hasOwnProperty(e) && s(t1, e, \"all\");\n }\n }\n }\n function c(t1, e) {\n for(var n = Ge(e), i = new We(t1), o = r[t1.type], a = ht(t1)[0], s = a; w.element(s);){\n for(var c = 0; c < o.length; c++){\n var l = o[c], u = l.selector, p = l.context;\n if (R(s, u) && M(p, a) && M(p, s)) {\n var f = l.listeners;\n i.currentTarget = s;\n for(var d = 0; d < f.length; d++){\n var h = f[d];\n Ne(h.options, n) && h.func(i);\n }\n }\n }\n s = A(s);\n }\n }\n function l(t1) {\n return c(t1, !0);\n }\n return null == (e = t1.document) || e.createElement(\"div\").addEventListener(\"test\", null, {\n get capture () {\n return o.supportsOptions = !0;\n },\n get passive () {\n return o.supportsPassive = !0;\n }\n }), t1.events = o, o;\n }\n }, He = {\n methodOrder: [\n \"simulationResume\",\n \"mouseOrPen\",\n \"hasPointer\",\n \"idle\"\n ],\n search: function(t1) {\n for(var e = 0, n = He.methodOrder; e < n.length; e++){\n var r = n[e], i = He[r](t1);\n if (i) return i;\n }\n return null;\n },\n simulationResume: function(t1) {\n var e = t1.pointerType, n = t1.eventType, r = t1.eventTarget, i = t1.scope;\n if (!/down|start/i.test(n)) return null;\n for(var o = 0, a = i.interactions.list; o < a.length; o++){\n var s = a[o], c = r;\n if (s.simulation && s.simulation.allowResume && s.pointerType === e) for(; c;){\n if (c === s.element) return s;\n c = A(c);\n }\n }\n return null;\n },\n mouseOrPen: function(t1) {\n var e, n = t1.pointerId, r = t1.pointerType, i = t1.eventType, o = t1.scope;\n if (\"mouse\" !== r && \"pen\" !== r) return null;\n for(var a = 0, s = o.interactions.list; a < s.length; a++){\n var c = s[a];\n if (c.pointerType === r) {\n if (c.simulation && !Ke(c, n)) continue;\n if (c.interacting()) return c;\n e || (e = c);\n }\n }\n if (e) return e;\n for(var l = 0, u = o.interactions.list; l < u.length; l++){\n var p = u[l];\n if (!(p.pointerType !== r || /down/i.test(i) && p.simulation)) return p;\n }\n return null;\n },\n hasPointer: function(t1) {\n for(var e = t1.pointerId, n = 0, r = t1.scope.interactions.list; n < r.length; n++){\n var i = r[n];\n if (Ke(i, e)) return i;\n }\n return null;\n },\n idle: function(t1) {\n for(var e = t1.pointerType, n = 0, r = t1.scope.interactions.list; n < r.length; n++){\n var i = r[n];\n if (1 === i.pointers.length) {\n var o = i.interactable;\n if (o && (!o.options.gesture || !o.options.gesture.enabled)) continue;\n } else if (i.pointers.length >= 2) continue;\n if (!i.interacting() && e === i.pointerType) return i;\n }\n return null;\n }\n };\n function Ke(t1, e) {\n return t1.pointers.some(function(t1) {\n return t1.id === e;\n });\n }\n var $e = He, Je = [\n \"pointerDown\",\n \"pointerMove\",\n \"pointerUp\",\n \"updatePointer\",\n \"removePointer\",\n \"windowBlur\"\n ];\n function Qe(t1, e) {\n return function(n) {\n var r = e.interactions.list, i = dt(n), o = ht(n), a = o[0], s = o[1], c = [];\n if (/^touch/.test(n.type)) {\n e.prevTouchTime = e.now();\n for(var l = 0, u = n.changedTouches; l < u.length; l++){\n var p = u[l], f = {\n pointer: p,\n pointerId: at(p),\n pointerType: i,\n eventType: n.type,\n eventTarget: a,\n curEventTarget: s,\n scope: e\n }, d = Ze(f);\n c.push([\n f.pointer,\n f.eventTarget,\n f.curEventTarget,\n d\n ]);\n }\n } else {\n var h = !1;\n if (!I.supportsPointerEvent && /mouse/.test(n.type)) {\n for(var v = 0; v < r.length && !h; v++)h = \"mouse\" !== r[v].pointerType && r[v].pointerIsDown;\n h = h || e.now() - e.prevTouchTime < 500 || 0 === n.timeStamp;\n }\n if (!h) {\n var g = {\n pointer: n,\n pointerId: at(n),\n pointerType: i,\n eventType: n.type,\n curEventTarget: s,\n eventTarget: a,\n scope: e\n }, m = Ze(g);\n c.push([\n g.pointer,\n g.eventTarget,\n g.curEventTarget,\n m\n ]);\n }\n }\n for(var y = 0; y < c.length; y++){\n var b = c[y], x = b[0], w = b[1], E = b[2];\n b[3][t1](x, n, w, E);\n }\n };\n }\n function Ze(t1) {\n var e = t1.pointerType, n = t1.scope, r = {\n interaction: $e.search(t1),\n searchDetails: t1\n };\n return n.fire(\"interactions:find\", r), r.interaction || n.interactions.new({\n pointerType: e\n });\n }\n function tn(t1, e) {\n var n = t1.doc, r = t1.scope, i = t1.options, o = r.interactions.docEvents, a = r.events, s = a[e];\n for(var c in r.browser.isIOS && !i.events && (i.events = {\n passive: !1\n }), a.delegatedEvents)s(n, c, a.delegateListener), s(n, c, a.delegateUseCapture, !0);\n for(var l = i && i.events, u = 0; u < o.length; u++){\n var p = o[u];\n s(n, p.type, p.listener, l);\n }\n }\n var en = {\n id: \"core/interactions\",\n install: function(t1) {\n for(var e = {}, n = 0; n < Je.length; n++){\n var i = Je[n];\n e[i] = Qe(i, t1);\n }\n var a, c = I.pEventTypes;\n function l() {\n for(var e = 0, n = t1.interactions.list; e < n.length; e++){\n var r = n[e];\n if (r.pointerIsDown && \"touch\" === r.pointerType && !r._interacting) for(var i = function() {\n var e = a[o];\n t1.documents.some(function(t1) {\n return M(t1.doc, e.downTarget);\n }) || r.removePointer(e.pointer, e.event);\n }, o = 0, a = r.pointers; o < a.length; o++)i();\n }\n }\n (a = k.PointerEvent ? [\n {\n type: c.down,\n listener: l\n },\n {\n type: c.down,\n listener: e.pointerDown\n },\n {\n type: c.move,\n listener: e.pointerMove\n },\n {\n type: c.up,\n listener: e.pointerUp\n },\n {\n type: c.cancel,\n listener: e.pointerUp\n }\n ] : [\n {\n type: \"mousedown\",\n listener: e.pointerDown\n },\n {\n type: \"mousemove\",\n listener: e.pointerMove\n },\n {\n type: \"mouseup\",\n listener: e.pointerUp\n },\n {\n type: \"touchstart\",\n listener: l\n },\n {\n type: \"touchstart\",\n listener: e.pointerDown\n },\n {\n type: \"touchmove\",\n listener: e.pointerMove\n },\n {\n type: \"touchend\",\n listener: e.pointerUp\n },\n {\n type: \"touchcancel\",\n listener: e.pointerUp\n }\n ]).push({\n type: \"blur\",\n listener: function(e) {\n for(var n = 0, r = t1.interactions.list; n < r.length; n++)r[n].documentBlur(e);\n }\n }), t1.prevTouchTime = 0, t1.Interaction = function(e) {\n s(i, e);\n var n = p(i);\n function i() {\n return r(this, i), n.apply(this, arguments);\n }\n return o(i, [\n {\n key: \"pointerMoveTolerance\",\n get: function() {\n return t1.interactions.pointerMoveTolerance;\n },\n set: function(e) {\n t1.interactions.pointerMoveTolerance = e;\n }\n },\n {\n key: \"_now\",\n value: function() {\n return t1.now();\n }\n }\n ]), i;\n }(De), t1.interactions = {\n list: [],\n new: function(e) {\n e.scopeFire = function(e, n) {\n return t1.fire(e, n);\n };\n var n = new t1.Interaction(e);\n return t1.interactions.list.push(n), n;\n },\n listeners: e,\n docEvents: a,\n pointerMoveTolerance: 1\n }, t1.usePlugin(he);\n },\n listeners: {\n \"scope:add-document\": function(t1) {\n return tn(t1, \"add\");\n },\n \"scope:remove-document\": function(t1) {\n return tn(t1, \"remove\");\n },\n \"interactable:unset\": function(t1, e) {\n for(var n = t1.interactable, r = e.interactions.list.length - 1; r >= 0; r--){\n var i = e.interactions.list[r];\n i.interactable === n && (i.stop(), e.fire(\"interactions:destroy\", {\n interaction: i\n }), i.destroy(), e.interactions.list.length > 2 && e.interactions.list.splice(r, 1));\n }\n }\n },\n onDocSignal: tn,\n doOnInteractions: Qe,\n methodNames: Je\n }, nn = en, rn = function(t1) {\n return t1[t1.On = 0] = \"On\", t1[t1.Off = 1] = \"Off\", t1;\n }(rn || {}), on = function() {\n function t1(e, n, i, o) {\n r(this, t1), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new Ve, this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = n.actions, this.target = e, this._context = n.context || i, this._win = y(B(e) ? this._context : e), this._doc = this._win.document, this._scopeEvents = o, this.set(n);\n }\n return o(t1, [\n {\n key: \"_defaults\",\n get: function() {\n return {\n base: {},\n perAction: {},\n actions: {}\n };\n }\n },\n {\n key: \"setOnEvents\",\n value: function(t1, e) {\n return w.func(e.onstart) && this.on(\"\".concat(t1, \"start\"), e.onstart), w.func(e.onmove) && this.on(\"\".concat(t1, \"move\"), e.onmove), w.func(e.onend) && this.on(\"\".concat(t1, \"end\"), e.onend), w.func(e.oninertiastart) && this.on(\"\".concat(t1, \"inertiastart\"), e.oninertiastart), this;\n }\n },\n {\n key: \"updatePerActionListeners\",\n value: function(t1, e, n) {\n var r, i = this, o = null == (r = this._actions.map[t1]) ? void 0 : r.filterEventType, a = function(t1) {\n return (null == o || o(t1)) && ve(t1, i._actions);\n };\n (w.array(e) || w.object(e)) && this._onOff(rn.Off, t1, e, void 0, a), (w.array(n) || w.object(n)) && this._onOff(rn.On, t1, n, void 0, a);\n }\n },\n {\n key: \"setPerAction\",\n value: function(t1, e) {\n var n = this._defaults;\n for(var r in e){\n var i = r, o = this.options[t1], a = e[i];\n \"listeners\" === i && this.updatePerActionListeners(t1, o.listeners, a), w.array(a) ? o[i] = mt(a) : w.plainObject(a) ? (o[i] = V(o[i] || {}, ge(a)), w.object(n.perAction[i]) && \"enabled\" in n.perAction[i] && (o[i].enabled = !1 !== a.enabled)) : w.bool(a) && w.object(n.perAction[i]) ? o[i].enabled = a : o[i] = a;\n }\n }\n },\n {\n key: \"getRect\",\n value: function(t1) {\n return t1 = t1 || (w.element(this.target) ? this.target : null), w.string(this.target) && (t1 = t1 || this._context.querySelector(this.target)), L(t1);\n }\n },\n {\n key: \"rectChecker\",\n value: function(t1) {\n var e = this;\n return w.func(t1) ? (this.getRect = function(n) {\n var r = V({}, t1.apply(e, n));\n return \"width\" in r || (r.width = r.right - r.left, r.height = r.bottom - r.top), r;\n }, this) : null === t1 ? (delete this.getRect, this) : this.getRect;\n }\n },\n {\n key: \"_backCompatOption\",\n value: function(t1, e) {\n if (B(e) || w.object(e)) {\n for(var n in this.options[t1] = e, this._actions.map)this.options[n][t1] = e;\n return this;\n }\n return this.options[t1];\n }\n },\n {\n key: \"origin\",\n value: function(t1) {\n return this._backCompatOption(\"origin\", t1);\n }\n },\n {\n key: \"deltaSource\",\n value: function(t1) {\n return \"page\" === t1 || \"client\" === t1 ? (this.options.deltaSource = t1, this) : this.options.deltaSource;\n }\n },\n {\n key: \"getAllElements\",\n value: function() {\n var t1 = this.target;\n return w.string(t1) ? Array.from(this._context.querySelectorAll(t1)) : w.func(t1) && t1.getAllElements ? t1.getAllElements() : w.element(t1) ? [\n t1\n ] : [];\n }\n },\n {\n key: \"context\",\n value: function() {\n return this._context;\n }\n },\n {\n key: \"inContext\",\n value: function(t1) {\n return this._context === t1.ownerDocument || M(this._context, t1);\n }\n },\n {\n key: \"testIgnoreAllow\",\n value: function(t1, e, n) {\n return !this.testIgnore(t1.ignoreFrom, e, n) && this.testAllow(t1.allowFrom, e, n);\n }\n },\n {\n key: \"testAllow\",\n value: function(t1, e, n) {\n return !t1 || !!w.element(n) && (w.string(t1) ? F(n, t1, e) : !!w.element(t1) && M(t1, n));\n }\n },\n {\n key: \"testIgnore\",\n value: function(t1, e, n) {\n return !(!t1 || !w.element(n)) && (w.string(t1) ? F(n, t1, e) : !!w.element(t1) && M(t1, n));\n }\n },\n {\n key: \"fire\",\n value: function(t1) {\n return this.events.fire(t1), this;\n }\n },\n {\n key: \"_onOff\",\n value: function(t1, e, n, r, i) {\n w.object(e) && !w.array(e) && (r = n, n = null);\n var o = $(e, n, i);\n for(var a in o){\n \"wheel\" === a && (a = I.wheelEvent);\n for(var s = 0, c = o[a]; s < c.length; s++){\n var l = c[s];\n ve(a, this._actions) ? this.events[t1 === rn.On ? \"on\" : \"off\"](a, l) : w.string(this.target) ? this._scopeEvents[t1 === rn.On ? \"addDelegate\" : \"removeDelegate\"](this.target, this._context, a, l, r) : this._scopeEvents[t1 === rn.On ? \"add\" : \"remove\"](this.target, a, l, r);\n }\n }\n return this;\n }\n },\n {\n key: \"on\",\n value: function(t1, e, n) {\n return this._onOff(rn.On, t1, e, n);\n }\n },\n {\n key: \"off\",\n value: function(t1, e, n) {\n return this._onOff(rn.Off, t1, e, n);\n }\n },\n {\n key: \"set\",\n value: function(t1) {\n var e = this._defaults;\n for(var n in w.object(t1) || (t1 = {}), this.options = ge(e.base), this._actions.methodDict){\n var r = n, i = this._actions.methodDict[r];\n this.options[r] = {}, this.setPerAction(r, V(V({}, e.perAction), e.actions[r])), this[i](t1[r]);\n }\n for(var o in t1)\"getRect\" !== o ? w.func(this[o]) && this[o](t1[o]) : this.rectChecker(t1.getRect);\n return this;\n }\n },\n {\n key: \"unset\",\n value: function() {\n if (w.string(this.target)) for(var t1 in this._scopeEvents.delegatedEvents)for(var e = this._scopeEvents.delegatedEvents[t1], n = e.length - 1; n >= 0; n--){\n var r = e[n], i = r.selector, o = r.context, a = r.listeners;\n i === this.target && o === this._context && e.splice(n, 1);\n for(var s = a.length - 1; s >= 0; s--)this._scopeEvents.removeDelegate(this.target, this._context, t1, a[s][0], a[s][1]);\n }\n else this._scopeEvents.remove(this.target, \"all\");\n }\n }\n ]), t1;\n }(), an = function() {\n function t1(e) {\n var n = this;\n r(this, t1), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = e, e.addListeners({\n \"interactable:unset\": function(t1) {\n var e = t1.interactable, r = e.target, i = w.string(r) ? n.selectorMap[r] : r[n.scope.id], o = yt(i, function(t1) {\n return t1 === e;\n });\n i.splice(o, 1);\n }\n });\n }\n return o(t1, [\n {\n key: \"new\",\n value: function(t1, e) {\n e = V(e || {}, {\n actions: this.scope.actions\n });\n var n = new this.scope.Interactable(t1, e, this.scope.document, this.scope.events);\n return this.scope.addDocument(n._doc), this.list.push(n), w.string(t1) ? (this.selectorMap[t1] || (this.selectorMap[t1] = []), this.selectorMap[t1].push(n)) : (n.target[this.scope.id] || Object.defineProperty(t1, this.scope.id, {\n value: [],\n configurable: !0\n }), t1[this.scope.id].push(n)), this.scope.fire(\"interactable:new\", {\n target: t1,\n options: e,\n interactable: n,\n win: this.scope._win\n }), n;\n }\n },\n {\n key: \"getExisting\",\n value: function(t1, e) {\n var n = e && e.context || this.scope.document, r = w.string(t1), i = r ? this.selectorMap[t1] : t1[this.scope.id];\n if (i) return bt(i, function(e) {\n return e._context === n && (r || e.inContext(t1));\n });\n }\n },\n {\n key: \"forEachMatch\",\n value: function(t1, e) {\n for(var n = 0, r = this.list; n < r.length; n++){\n var i = r[n], o = void 0;\n if ((w.string(i.target) ? w.element(t1) && R(t1, i.target) : t1 === i.target) && i.inContext(t1) && (o = e(i)), void 0 !== o) return o;\n }\n }\n }\n ]), t1;\n }();\n var sn = function() {\n function t1() {\n var e = this;\n r(this, t1), this.id = \"__interact_scope_\".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = I, this.defaults = ge(Te), this.Eventable = Ve, this.actions = {\n map: {},\n phases: {\n start: !0,\n move: !0,\n end: !0\n },\n methodDict: {},\n phaselessTypes: {}\n }, this.interactStatic = function(t1) {\n var e = function e(n, r) {\n var i = t1.interactables.getExisting(n, r);\n return i || ((i = t1.interactables.new(n, r)).events.global = e.globalEvents), i;\n };\n return e.getPointerAverage = lt, e.getTouchBBox = ut, e.getTouchDistance = pt, e.getTouchAngle = ft, e.getElementRect = L, e.getElementClientRect = Y, e.matchesSelector = R, e.closest = z, e.globalEvents = {}, e.version = \"1.10.26\", e.scope = t1, e.use = function(t1, e) {\n return this.scope.usePlugin(t1, e), this;\n }, e.isSet = function(t1, e) {\n return !!this.scope.interactables.get(t1, e && e.context);\n }, e.on = Nt(function(t1, e, n) {\n if (w.string(t1) && -1 !== t1.search(\" \") && (t1 = t1.trim().split(/ +/)), w.array(t1)) {\n for(var r = 0, i = t1; r < i.length; r++){\n var o = i[r];\n this.on(o, e, n);\n }\n return this;\n }\n if (w.object(t1)) {\n for(var a in t1)this.on(a, t1[a], e);\n return this;\n }\n return ve(t1, this.scope.actions) ? this.globalEvents[t1] ? this.globalEvents[t1].push(e) : this.globalEvents[t1] = [\n e\n ] : this.scope.events.add(this.scope.document, t1, e, {\n options: n\n }), this;\n }, \"The interact.on() method is being deprecated\"), e.off = Nt(function(t1, e, n) {\n if (w.string(t1) && -1 !== t1.search(\" \") && (t1 = t1.trim().split(/ +/)), w.array(t1)) {\n for(var r = 0, i = t1; r < i.length; r++){\n var o = i[r];\n this.off(o, e, n);\n }\n return this;\n }\n if (w.object(t1)) {\n for(var a in t1)this.off(a, t1[a], e);\n return this;\n }\n var s;\n return ve(t1, this.scope.actions) ? t1 in this.globalEvents && -1 !== (s = this.globalEvents[t1].indexOf(e)) && this.globalEvents[t1].splice(s, 1) : this.scope.events.remove(this.scope.document, t1, e, n), this;\n }, \"The interact.off() method is being deprecated\"), e.debug = function() {\n return this.scope;\n }, e.supportsTouch = function() {\n return I.supportsTouch;\n }, e.supportsPointerEvent = function() {\n return I.supportsPointerEvent;\n }, e.stop = function() {\n for(var t1 = 0, e = this.scope.interactions.list; t1 < e.length; t1++)e[t1].stop();\n return this;\n }, e.pointerMoveTolerance = function(t1) {\n return w.number(t1) ? (this.scope.interactions.pointerMoveTolerance = t1, this) : this.scope.interactions.pointerMoveTolerance;\n }, e.addDocument = function(t1, e) {\n this.scope.addDocument(t1, e);\n }, e.removeDocument = function(t1) {\n this.scope.removeDocument(t1);\n }, e;\n }(this), this.InteractEvent = Se, this.Interactable = void 0, this.interactables = new an(this), this._win = void 0, this.document = void 0, this.window = void 0, this.documents = [], this._plugins = {\n list: [],\n map: {}\n }, this.onWindowUnload = function(t1) {\n return e.removeDocument(t1.target);\n };\n var n = this;\n this.Interactable = function(t1) {\n s(i, t1);\n var e = p(i);\n function i() {\n return r(this, i), e.apply(this, arguments);\n }\n return o(i, [\n {\n key: \"_defaults\",\n get: function() {\n return n.defaults;\n }\n },\n {\n key: \"set\",\n value: function(t1) {\n return f(c(i.prototype), \"set\", this).call(this, t1), n.fire(\"interactable:set\", {\n options: t1,\n interactable: this\n }), this;\n }\n },\n {\n key: \"unset\",\n value: function() {\n f(c(i.prototype), \"unset\", this).call(this);\n var t1 = n.interactables.list.indexOf(this);\n t1 < 0 || (n.interactables.list.splice(t1, 1), n.fire(\"interactable:unset\", {\n interactable: this\n }));\n }\n }\n ]), i;\n }(on);\n }\n return o(t1, [\n {\n key: \"addListeners\",\n value: function(t1, e) {\n this.listenerMaps.push({\n id: e,\n map: t1\n });\n }\n },\n {\n key: \"fire\",\n value: function(t1, e) {\n for(var n = 0, r = this.listenerMaps; n < r.length; n++){\n var i = r[n].map[t1];\n if (i && !1 === i(e, this, t1)) return !1;\n }\n }\n },\n {\n key: \"init\",\n value: function(t1) {\n return this.isInitialized ? this : function(t1, e) {\n t1.isInitialized = !0, w.window(e) && m(e);\n return k.init(e), I.init(e), Lt.init(e), t1.window = e, t1.document = e.document, t1.usePlugin(nn), t1.usePlugin(Ue), t1;\n }(this, t1);\n }\n },\n {\n key: \"pluginIsInstalled\",\n value: function(t1) {\n var e = t1.id;\n return e ? !!this._plugins.map[e] : -1 !== this._plugins.list.indexOf(t1);\n }\n },\n {\n key: \"usePlugin\",\n value: function(t1, e) {\n if (!this.isInitialized) return this;\n if (this.pluginIsInstalled(t1)) return this;\n if (t1.id && (this._plugins.map[t1.id] = t1), this._plugins.list.push(t1), t1.install && t1.install(this, e), t1.listeners && t1.before) {\n for(var n = 0, r = this.listenerMaps.length, i = t1.before.reduce(function(t1, e) {\n return t1[e] = !0, t1[cn(e)] = !0, t1;\n }, {}); n < r; n++){\n var o = this.listenerMaps[n].id;\n if (o && (i[o] || i[cn(o)])) break;\n }\n this.listenerMaps.splice(n, 0, {\n id: t1.id,\n map: t1.listeners\n });\n } else t1.listeners && this.listenerMaps.push({\n id: t1.id,\n map: t1.listeners\n });\n return this;\n }\n },\n {\n key: \"addDocument\",\n value: function(t1, e) {\n if (-1 !== this.getDocIndex(t1)) return !1;\n var n = y(t1);\n e = e ? V({}, e) : {}, this.documents.push({\n doc: t1,\n options: e\n }), this.events.documents.push(t1), t1 !== this.document && this.events.add(n, \"unload\", this.onWindowUnload), this.fire(\"scope:add-document\", {\n doc: t1,\n window: n,\n scope: this,\n options: e\n });\n }\n },\n {\n key: \"removeDocument\",\n value: function(t1) {\n var e = this.getDocIndex(t1), n = y(t1), r = this.documents[e].options;\n this.events.remove(n, \"unload\", this.onWindowUnload), this.documents.splice(e, 1), this.events.documents.splice(e, 1), this.fire(\"scope:remove-document\", {\n doc: t1,\n window: n,\n scope: this,\n options: r\n });\n }\n },\n {\n key: \"getDocIndex\",\n value: function(t1) {\n for(var e = 0; e < this.documents.length; e++)if (this.documents[e].doc === t1) return e;\n return -1;\n }\n },\n {\n key: \"getDocOptions\",\n value: function(t1) {\n var e = this.getDocIndex(t1);\n return -1 === e ? null : this.documents[e].options;\n }\n },\n {\n key: \"now\",\n value: function() {\n return (this.window.Date || Date).now();\n }\n }\n ]), t1;\n }();\n function cn(t1) {\n return t1 && t1.replace(/\\/.*$/, \"\");\n }\n var ln = new sn, un = ln.interactStatic, pn = \"undefined\" != typeof globalThis ? globalThis : window;\n ln.init(pn);\n var fn = Object.freeze({\n __proto__: null,\n edgeTarget: function() {},\n elements: function() {},\n grid: function(t1) {\n var e = [\n [\n \"x\",\n \"y\"\n ],\n [\n \"left\",\n \"top\"\n ],\n [\n \"right\",\n \"bottom\"\n ],\n [\n \"width\",\n \"height\"\n ]\n ].filter(function(e) {\n var n = e[0], r = e[1];\n return n in t1 || r in t1;\n }), n = function(n, r) {\n for(var i = t1.range, o = t1.limits, a = void 0 === o ? {\n left: -1 / 0,\n right: 1 / 0,\n top: -1 / 0,\n bottom: 1 / 0\n } : o, s = t1.offset, c = void 0 === s ? {\n x: 0,\n y: 0\n } : s, l = {\n range: i,\n grid: t1,\n x: null,\n y: null\n }, u = 0; u < e.length; u++){\n var p = e[u], f = p[0], d = p[1], h = Math.round((n - c.x) / t1[f]), v = Math.round((r - c.y) / t1[d]);\n l[f] = Math.max(a.left, Math.min(a.right, h * t1[f] + c.x)), l[d] = Math.max(a.top, Math.min(a.bottom, v * t1[d] + c.y));\n }\n return l;\n };\n return n.grid = t1, n.coordFields = e, n;\n }\n }), dn = {\n id: \"snappers\",\n install: function(t1) {\n var e = t1.interactStatic;\n e.snappers = V(e.snappers || {}, fn), e.createSnapGrid = e.snappers.grid;\n }\n }, hn = dn, vn = {\n start: function(t1) {\n var n = t1.state, r = t1.rect, i = t1.edges, o = t1.pageCoords, a = n.options, s = a.ratio, c = a.enabled, l = n.options, u = l.equalDelta, p = l.modifiers;\n \"preserve\" === s && (s = r.width / r.height), n.startCoords = V({}, o), n.startRect = V({}, r), n.ratio = s, n.equalDelta = u;\n var f = n.linkedEdges = {\n top: i.top || i.left && !i.bottom,\n left: i.left || i.top && !i.right,\n bottom: i.bottom || i.right && !i.top,\n right: i.right || i.bottom && !i.left\n };\n if (n.xIsPrimaryAxis = !(!i.left && !i.right), n.equalDelta) {\n var d = (f.left ? 1 : -1) * (f.top ? 1 : -1);\n n.edgeSign = {\n x: d,\n y: d\n };\n } else n.edgeSign = {\n x: f.left ? -1 : 1,\n y: f.top ? -1 : 1\n };\n if (!1 !== c && V(i, f), null != p && p.length) {\n var h = new me(t1.interaction);\n h.copyFrom(t1.interaction.modification), h.prepareStates(p), n.subModification = h, h.startAll(e({}, t1));\n }\n },\n set: function(t1) {\n var n = t1.state, r = t1.rect, i = t1.coords, o = n.linkedEdges, a = V({}, i), s = n.equalDelta ? gn : mn;\n if (V(t1.edges, o), s(n, n.xIsPrimaryAxis, i, r), !n.subModification) return null;\n var c = V({}, r);\n H(o, c, {\n x: i.x - a.x,\n y: i.y - a.y\n });\n var l = n.subModification.setAll(e(e({}, t1), {}, {\n rect: c,\n edges: o,\n pageCoords: i,\n prevCoords: i,\n prevRect: c\n })), u = l.delta;\n l.changed && (s(n, Math.abs(u.x) > Math.abs(u.y), l.coords, l.rect), V(i, l.coords));\n return l.eventProps;\n },\n defaults: {\n ratio: \"preserve\",\n equalDelta: !1,\n modifiers: [],\n enabled: !1\n }\n };\n function gn(t1, e, n) {\n var r = t1.startCoords, i = t1.edgeSign;\n e ? n.y = r.y + (n.x - r.x) * i.y : n.x = r.x + (n.y - r.y) * i.x;\n }\n function mn(t1, e, n, r) {\n var i = t1.startRect, o = t1.startCoords, a = t1.ratio, s = t1.edgeSign;\n if (e) {\n var c = r.width / a;\n n.y = o.y + (c - i.height) * s.y;\n } else {\n var l = r.height * a;\n n.x = o.x + (l - i.width) * s.x;\n }\n }\n var yn = be(vn, \"aspectRatio\"), bn = function() {};\n bn._defaults = {};\n var xn = bn;\n function wn(t1, e, n) {\n return w.func(t1) ? G(t1, e.interactable, e.element, [\n n.x,\n n.y,\n e\n ]) : G(t1, e.interactable, e.element);\n }\n var En = {\n start: function(t1) {\n var e = t1.rect, n = t1.startOffset, r = t1.state, i = t1.interaction, o = t1.pageCoords, a = r.options, s = a.elementRect, c = V({\n left: 0,\n top: 0,\n right: 0,\n bottom: 0\n }, a.offset || {});\n if (e && s) {\n var l = wn(a.restriction, i, o);\n if (l) {\n var u = l.right - l.left - e.width, p = l.bottom - l.top - e.height;\n u < 0 && (c.left += u, c.right += u), p < 0 && (c.top += p, c.bottom += p);\n }\n c.left += n.left - e.width * s.left, c.top += n.top - e.height * s.top, c.right += n.right - e.width * (1 - s.right), c.bottom += n.bottom - e.height * (1 - s.bottom);\n }\n r.offset = c;\n },\n set: function(t1) {\n var e = t1.coords, n = t1.interaction, r = t1.state, i = r.options, o = r.offset, a = wn(i.restriction, n, e);\n if (a) {\n var s = function(t1) {\n return !t1 || \"left\" in t1 && \"top\" in t1 || ((t1 = V({}, t1)).left = t1.x || 0, t1.top = t1.y || 0, t1.right = t1.right || t1.left + t1.width, t1.bottom = t1.bottom || t1.top + t1.height), t1;\n }(a);\n e.x = Math.max(Math.min(s.right - o.right, e.x), s.left + o.left), e.y = Math.max(Math.min(s.bottom - o.bottom, e.y), s.top + o.top);\n }\n },\n defaults: {\n restriction: null,\n elementRect: null,\n offset: null,\n endOnly: !1,\n enabled: !1\n }\n }, Tn = be(En, \"restrict\"), Sn = {\n top: 1 / 0,\n left: 1 / 0,\n bottom: -1 / 0,\n right: -1 / 0\n }, _n = {\n top: -1 / 0,\n left: -1 / 0,\n bottom: 1 / 0,\n right: 1 / 0\n };\n function Pn(t1, e) {\n for(var n = 0, r = [\n \"top\",\n \"left\",\n \"bottom\",\n \"right\"\n ]; n < r.length; n++){\n var i = r[n];\n i in t1 || (t1[i] = e[i]);\n }\n return t1;\n }\n var On = {\n noInner: Sn,\n noOuter: _n,\n start: function(t1) {\n var e, n = t1.interaction, r = t1.startOffset, i = t1.state, o = i.options;\n o && (e = N(wn(o.offset, n, n.coords.start.page))), e = e || {\n x: 0,\n y: 0\n }, i.offset = {\n top: e.y + r.top,\n left: e.x + r.left,\n bottom: e.y - r.bottom,\n right: e.x - r.right\n };\n },\n set: function(t1) {\n var e = t1.coords, n = t1.edges, r = t1.interaction, i = t1.state, o = i.offset, a = i.options;\n if (n) {\n var s = V({}, e), c = wn(a.inner, r, s) || {}, l = wn(a.outer, r, s) || {};\n Pn(c, Sn), Pn(l, _n), n.top ? e.y = Math.min(Math.max(l.top + o.top, s.y), c.top + o.top) : n.bottom && (e.y = Math.max(Math.min(l.bottom + o.bottom, s.y), c.bottom + o.bottom)), n.left ? e.x = Math.min(Math.max(l.left + o.left, s.x), c.left + o.left) : n.right && (e.x = Math.max(Math.min(l.right + o.right, s.x), c.right + o.right));\n }\n },\n defaults: {\n inner: null,\n outer: null,\n offset: null,\n endOnly: !1,\n enabled: !1\n }\n }, kn = be(On, \"restrictEdges\"), Dn = V({\n get elementRect () {\n return {\n top: 0,\n left: 0,\n bottom: 1,\n right: 1\n };\n },\n set elementRect (t){}\n }, En.defaults), In = be({\n start: En.start,\n set: En.set,\n defaults: Dn\n }, \"restrictRect\"), Mn = {\n width: -1 / 0,\n height: -1 / 0\n }, zn = {\n width: 1 / 0,\n height: 1 / 0\n };\n var An = be({\n start: function(t1) {\n return On.start(t1);\n },\n set: function(t1) {\n var e = t1.interaction, n = t1.state, r = t1.rect, i = t1.edges, o = n.options;\n if (i) {\n var a = U(wn(o.min, e, t1.coords)) || Mn, s = U(wn(o.max, e, t1.coords)) || zn;\n n.options = {\n endOnly: o.endOnly,\n inner: V({}, On.noInner),\n outer: V({}, On.noOuter)\n }, i.top ? (n.options.inner.top = r.bottom - a.height, n.options.outer.top = r.bottom - s.height) : i.bottom && (n.options.inner.bottom = r.top + a.height, n.options.outer.bottom = r.top + s.height), i.left ? (n.options.inner.left = r.right - a.width, n.options.outer.left = r.right - s.width) : i.right && (n.options.inner.right = r.left + a.width, n.options.outer.right = r.left + s.width), On.set(t1), n.options = o;\n }\n },\n defaults: {\n min: null,\n max: null,\n endOnly: !1,\n enabled: !1\n }\n }, \"restrictSize\");\n var Rn = {\n start: function(t1) {\n var e, n = t1.interaction, r = t1.interactable, i = t1.element, o = t1.rect, a = t1.state, s = t1.startOffset, c = a.options, l = c.offsetWithOrigin ? function(t1) {\n var e = t1.interaction.element, n = N(G(t1.state.options.origin, null, null, [\n e\n ])), r = n || K(t1.interactable, e, t1.interaction.prepared.name);\n return r;\n }(t1) : {\n x: 0,\n y: 0\n };\n if (\"startCoords\" === c.offset) e = {\n x: n.coords.start.page.x,\n y: n.coords.start.page.y\n };\n else {\n var u = G(c.offset, r, i, [\n n\n ]);\n (e = N(u) || {\n x: 0,\n y: 0\n }).x += l.x, e.y += l.y;\n }\n var p = c.relativePoints;\n a.offsets = o && p && p.length ? p.map(function(t1, n) {\n return {\n index: n,\n relativePoint: t1,\n x: s.left - o.width * t1.x + e.x,\n y: s.top - o.height * t1.y + e.y\n };\n }) : [\n {\n index: 0,\n relativePoint: null,\n x: e.x,\n y: e.y\n }\n ];\n },\n set: function(t1) {\n var e = t1.interaction, n = t1.coords, r = t1.state, i = r.options, o = r.offsets, a = K(e.interactable, e.element, e.prepared.name), s = V({}, n), c = [];\n i.offsetWithOrigin || (s.x -= a.x, s.y -= a.y);\n for(var l = 0, u = o; l < u.length; l++)for(var p = u[l], f = s.x - p.x, d = s.y - p.y, h = 0, v = i.targets.length; h < v; h++){\n var g = i.targets[h], m = void 0;\n (m = w.func(g) ? g(f, d, e._proxy, p, h) : g) && c.push({\n x: (w.number(m.x) ? m.x : f) + p.x,\n y: (w.number(m.y) ? m.y : d) + p.y,\n range: w.number(m.range) ? m.range : i.range,\n source: g,\n index: h,\n offset: p\n });\n }\n for(var y = {\n target: null,\n inRange: !1,\n distance: 0,\n range: 0,\n delta: {\n x: 0,\n y: 0\n }\n }, b = 0; b < c.length; b++){\n var x = c[b], E = x.range, T = x.x - s.x, S = x.y - s.y, _ = Q(T, S), P = _ <= E;\n E === 1 / 0 && y.inRange && y.range !== 1 / 0 && (P = !1), y.target && !(P ? y.inRange && E !== 1 / 0 ? _ / E < y.distance / y.range : E === 1 / 0 && y.range !== 1 / 0 || _ < y.distance : !y.inRange && _ < y.distance) || (y.target = x, y.distance = _, y.range = E, y.inRange = P, y.delta.x = T, y.delta.y = S);\n }\n return y.inRange && (n.x = y.target.x, n.y = y.target.y), r.closest = y, y;\n },\n defaults: {\n range: 1 / 0,\n targets: null,\n offset: null,\n offsetWithOrigin: !0,\n origin: null,\n relativePoints: null,\n endOnly: !1,\n enabled: !1\n }\n }, Cn = be(Rn, \"snap\");\n var jn = {\n start: function(t1) {\n var e = t1.state, n = t1.edges, r = e.options;\n if (!n) return null;\n t1.state = {\n options: {\n targets: null,\n relativePoints: [\n {\n x: n.left ? 0 : 1,\n y: n.top ? 0 : 1\n }\n ],\n offset: r.offset || \"self\",\n origin: {\n x: 0,\n y: 0\n },\n range: r.range\n }\n }, e.targetFields = e.targetFields || [\n [\n \"width\",\n \"height\"\n ],\n [\n \"x\",\n \"y\"\n ]\n ], Rn.start(t1), e.offsets = t1.state.offsets, t1.state = e;\n },\n set: function(t1) {\n var e = t1.interaction, n = t1.state, r = t1.coords, i = n.options, o = n.offsets, a = {\n x: r.x - o[0].x,\n y: r.y - o[0].y\n };\n n.options = V({}, i), n.options.targets = [];\n for(var s = 0, c = i.targets || []; s < c.length; s++){\n var l = c[s], u = void 0;\n if (u = w.func(l) ? l(a.x, a.y, e) : l) {\n for(var p = 0, f = n.targetFields; p < f.length; p++){\n var d = f[p], h = d[0], v = d[1];\n if (h in u || v in u) {\n u.x = u[h], u.y = u[v];\n break;\n }\n }\n n.options.targets.push(u);\n }\n }\n var g = Rn.set(t1);\n return n.options = i, g;\n },\n defaults: {\n range: 1 / 0,\n targets: null,\n offset: null,\n endOnly: !1,\n enabled: !1\n }\n }, Fn = be(jn, \"snapSize\");\n var Xn = {\n aspectRatio: yn,\n restrictEdges: kn,\n restrict: Tn,\n restrictRect: In,\n restrictSize: An,\n snapEdges: be({\n start: function(t1) {\n var e = t1.edges;\n return e ? (t1.state.targetFields = t1.state.targetFields || [\n [\n e.left ? \"left\" : \"right\",\n e.top ? \"top\" : \"bottom\"\n ]\n ], jn.start(t1)) : null;\n },\n set: jn.set,\n defaults: V(ge(jn.defaults), {\n targets: void 0,\n range: void 0,\n offset: {\n x: 0,\n y: 0\n }\n })\n }, \"snapEdges\"),\n snap: Cn,\n snapSize: Fn,\n spring: xn,\n avoid: xn,\n transform: xn,\n rubberband: xn\n }, Yn = {\n id: \"modifiers\",\n install: function(t1) {\n var e = t1.interactStatic;\n for(var n in t1.usePlugin(Ee), t1.usePlugin(hn), e.modifiers = Xn, Xn){\n var r = Xn[n], i = r._defaults, o = r._methods;\n i._methods = o, t1.defaults.perAction[n] = i;\n }\n }\n }, Ln = Yn, qn = function(t1) {\n s(n, t1);\n var e = p(n);\n function n(t1, i, o, a, s, c) {\n var l;\n if (r(this, n), tt(u(l = e.call(this, s)), o), o !== i && tt(u(l), i), l.timeStamp = c, l.originalEvent = o, l.type = t1, l.pointerId = at(i), l.pointerType = dt(i), l.target = a, l.currentTarget = null, \"tap\" === t1) {\n var p = s.getPointerIndex(i);\n l.dt = l.timeStamp - s.pointers[p].downTime;\n var f = l.timeStamp - s.tapTime;\n l.double = !!s.prevTap && \"doubletap\" !== s.prevTap.type && s.prevTap.target === l.target && f < 500;\n } else \"doubletap\" === t1 && (l.dt = i.timeStamp - s.tapTime, l.double = !0);\n return l;\n }\n return o(n, [\n {\n key: \"_subtractOrigin\",\n value: function(t1) {\n var e = t1.x, n = t1.y;\n return this.pageX -= e, this.pageY -= n, this.clientX -= e, this.clientY -= n, this;\n }\n },\n {\n key: \"_addOrigin\",\n value: function(t1) {\n var e = t1.x, n = t1.y;\n return this.pageX += e, this.pageY += n, this.clientX += e, this.clientY += n, this;\n }\n },\n {\n key: \"preventDefault\",\n value: function() {\n this.originalEvent.preventDefault();\n }\n }\n ]), n;\n }(vt), Bn = {\n id: \"pointer-events/base\",\n before: [\n \"inertia\",\n \"modifiers\",\n \"auto-start\",\n \"actions\"\n ],\n install: function(t1) {\n t1.pointerEvents = Bn, t1.defaults.actions.pointerEvents = Bn.defaults, V(t1.actions.phaselessTypes, Bn.types);\n },\n listeners: {\n \"interactions:new\": function(t1) {\n var e = t1.interaction;\n e.prevTap = null, e.tapTime = 0;\n },\n \"interactions:update-pointer\": function(t1) {\n var e = t1.down, n = t1.pointerInfo;\n if (!e && n.hold) return;\n n.hold = {\n duration: 1 / 0,\n timeout: null\n };\n },\n \"interactions:move\": function(t1, e) {\n var n = t1.interaction, r = t1.pointer, i = t1.event, o = t1.eventTarget;\n t1.duplicate || n.pointerIsDown && !n.pointerWasMoved || (n.pointerIsDown && Gn(t1), Vn({\n interaction: n,\n pointer: r,\n event: i,\n eventTarget: o,\n type: \"move\"\n }, e));\n },\n \"interactions:down\": function(t1, e) {\n !function(t1, e) {\n for(var n = t1.interaction, r = t1.pointer, i = t1.event, o = t1.eventTarget, a = t1.pointerIndex, s = n.pointers[a].hold, c = q(o), l = {\n interaction: n,\n pointer: r,\n event: i,\n eventTarget: o,\n type: \"hold\",\n targets: [],\n path: c,\n node: null\n }, u = 0; u < c.length; u++){\n var p = c[u];\n l.node = p, e.fire(\"pointerEvents:collect-targets\", l);\n }\n if (!l.targets.length) return;\n for(var f = 1 / 0, d = 0, h = l.targets; d < h.length; d++){\n var v = h[d].eventable.options.holdDuration;\n v < f && (f = v);\n }\n s.duration = f, s.timeout = setTimeout(function() {\n Vn({\n interaction: n,\n eventTarget: o,\n pointer: r,\n event: i,\n type: \"hold\"\n }, e);\n }, f);\n }(t1, e), Vn(t1, e);\n },\n \"interactions:up\": function(t1, e) {\n Gn(t1), Vn(t1, e), function(t1, e) {\n var n = t1.interaction, r = t1.pointer, i = t1.event, o = t1.eventTarget;\n n.pointerWasMoved || Vn({\n interaction: n,\n eventTarget: o,\n pointer: r,\n event: i,\n type: \"tap\"\n }, e);\n }(t1, e);\n },\n \"interactions:cancel\": function(t1, e) {\n Gn(t1), Vn(t1, e);\n }\n },\n PointerEvent: qn,\n fire: Vn,\n collectEventTargets: Wn,\n defaults: {\n holdDuration: 600,\n ignoreFrom: null,\n allowFrom: null,\n origin: {\n x: 0,\n y: 0\n }\n },\n types: {\n down: !0,\n move: !0,\n up: !0,\n cancel: !0,\n tap: !0,\n doubletap: !0,\n hold: !0\n }\n };\n function Vn(t1, e) {\n var n = t1.interaction, r = t1.pointer, i = t1.event, o = t1.eventTarget, a = t1.type, s = t1.targets, c = void 0 === s ? Wn(t1, e) : s, l = new qn(a, r, i, o, n, e.now());\n e.fire(\"pointerEvents:new\", {\n pointerEvent: l\n });\n for(var u = {\n interaction: n,\n pointer: r,\n event: i,\n eventTarget: o,\n targets: c,\n type: a,\n pointerEvent: l\n }, p = 0; p < c.length; p++){\n var f = c[p];\n for(var d in f.props || {})l[d] = f.props[d];\n var h = K(f.eventable, f.node);\n if (l._subtractOrigin(h), l.eventable = f.eventable, l.currentTarget = f.node, f.eventable.fire(l), l._addOrigin(h), l.immediatePropagationStopped || l.propagationStopped && p + 1 < c.length && c[p + 1].node !== l.currentTarget) break;\n }\n if (e.fire(\"pointerEvents:fired\", u), \"tap\" === a) {\n var v = l.double ? Vn({\n interaction: n,\n pointer: r,\n event: i,\n eventTarget: o,\n type: \"doubletap\"\n }, e) : l;\n n.prevTap = v, n.tapTime = v.timeStamp;\n }\n return l;\n }\n function Wn(t1, e) {\n var n = t1.interaction, r = t1.pointer, i = t1.event, o = t1.eventTarget, a = t1.type, s = n.getPointerIndex(r), c = n.pointers[s];\n if (\"tap\" === a && (n.pointerWasMoved || !c || c.downTarget !== o)) return [];\n for(var l = q(o), u = {\n interaction: n,\n pointer: r,\n event: i,\n eventTarget: o,\n type: a,\n path: l,\n targets: [],\n node: null\n }, p = 0; p < l.length; p++){\n var f = l[p];\n u.node = f, e.fire(\"pointerEvents:collect-targets\", u);\n }\n return \"hold\" === a && (u.targets = u.targets.filter(function(t1) {\n var e, r;\n return t1.eventable.options.holdDuration === (null == (e = n.pointers[s]) || null == (r = e.hold) ? void 0 : r.duration);\n })), u.targets;\n }\n function Gn(t1) {\n var e = t1.interaction, n = t1.pointerIndex, r = e.pointers[n].hold;\n r && r.timeout && (clearTimeout(r.timeout), r.timeout = null);\n }\n var Nn = Object.freeze({\n __proto__: null,\n default: Bn\n });\n function Un(t1) {\n var e = t1.interaction;\n e.holdIntervalHandle && (clearInterval(e.holdIntervalHandle), e.holdIntervalHandle = null);\n }\n var Hn = {\n id: \"pointer-events/holdRepeat\",\n install: function(t1) {\n t1.usePlugin(Bn);\n var e = t1.pointerEvents;\n e.defaults.holdRepeatInterval = 0, e.types.holdrepeat = t1.actions.phaselessTypes.holdrepeat = !0;\n },\n listeners: [\n \"move\",\n \"up\",\n \"cancel\",\n \"endall\"\n ].reduce(function(t1, e) {\n return t1[\"pointerEvents:\".concat(e)] = Un, t1;\n }, {\n \"pointerEvents:new\": function(t1) {\n var e = t1.pointerEvent;\n \"hold\" === e.type && (e.count = (e.count || 0) + 1);\n },\n \"pointerEvents:fired\": function(t1, e) {\n var n = t1.interaction, r = t1.pointerEvent, i = t1.eventTarget, o = t1.targets;\n if (\"hold\" === r.type && o.length) {\n var a = o[0].eventable.options.holdRepeatInterval;\n a <= 0 || (n.holdIntervalHandle = setTimeout(function() {\n e.pointerEvents.fire({\n interaction: n,\n eventTarget: i,\n type: \"hold\",\n pointer: r,\n event: r\n }, e);\n }, a));\n }\n }\n })\n }, Kn = Hn;\n var $n = {\n id: \"pointer-events/interactableTargets\",\n install: function(t1) {\n var e = t1.Interactable;\n e.prototype.pointerEvents = function(t1) {\n return V(this.events.options, t1), this;\n };\n var n = e.prototype._backCompatOption;\n e.prototype._backCompatOption = function(t1, e) {\n var r = n.call(this, t1, e);\n return r === this && (this.events.options[t1] = e), r;\n };\n },\n listeners: {\n \"pointerEvents:collect-targets\": function(t1, e) {\n var n = t1.targets, r = t1.node, i = t1.type, o = t1.eventTarget;\n e.interactables.forEachMatch(r, function(t1) {\n var e = t1.events, a = e.options;\n e.types[i] && e.types[i].length && t1.testIgnoreAllow(a, r, o) && n.push({\n node: r,\n eventable: e,\n props: {\n interactable: t1\n }\n });\n });\n },\n \"interactable:new\": function(t1) {\n var e = t1.interactable;\n e.events.getRect = function(t1) {\n return e.getRect(t1);\n };\n },\n \"interactable:set\": function(t1, e) {\n var n = t1.interactable, r = t1.options;\n V(n.events.options, e.pointerEvents.defaults), V(n.events.options, r.pointerEvents || {});\n }\n }\n }, Jn = $n, Qn = {\n id: \"pointer-events\",\n install: function(t1) {\n t1.usePlugin(Nn), t1.usePlugin(Kn), t1.usePlugin(Jn);\n }\n }, Zn = Qn;\n var tr = {\n id: \"reflow\",\n install: function(t1) {\n var e = t1.Interactable;\n t1.actions.phases.reflow = !0, e.prototype.reflow = function(e) {\n return function(t1, e, n) {\n for(var r = t1.getAllElements(), i = n.window.Promise, o = i ? [] : null, a = function() {\n var a = r[s], c = t1.getRect(a);\n if (!c) return 1;\n var l, u = bt(n.interactions.list, function(n) {\n return n.interacting() && n.interactable === t1 && n.element === a && n.prepared.name === e.name;\n });\n if (u) u.move(), o && (l = u._reflowPromise || new i(function(t1) {\n u._reflowResolve = t1;\n }));\n else {\n var p = U(c), f = function(t1) {\n return {\n coords: t1,\n get page () {\n return this.coords.page;\n },\n get client () {\n return this.coords.client;\n },\n get timeStamp () {\n return this.coords.timeStamp;\n },\n get pageX () {\n return this.coords.page.x;\n },\n get pageY () {\n return this.coords.page.y;\n },\n get clientX () {\n return this.coords.client.x;\n },\n get clientY () {\n return this.coords.client.y;\n },\n get pointerId () {\n return this.coords.pointerId;\n },\n get target () {\n return this.coords.target;\n },\n get type () {\n return this.coords.type;\n },\n get pointerType () {\n return this.coords.pointerType;\n },\n get buttons () {\n return this.coords.buttons;\n },\n preventDefault: function() {}\n };\n }({\n page: {\n x: p.x,\n y: p.y\n },\n client: {\n x: p.x,\n y: p.y\n },\n timeStamp: n.now()\n });\n l = function(t1, e, n, r, i) {\n var o = t1.interactions.new({\n pointerType: \"reflow\"\n }), a = {\n interaction: o,\n event: i,\n pointer: i,\n eventTarget: n,\n phase: \"reflow\"\n };\n o.interactable = e, o.element = n, o.prevEvent = i, o.updatePointer(i, i, n, !0), nt(o.coords.delta), Ut(o.prepared, r), o._doPhase(a);\n var s = t1.window, c = s.Promise, l = c ? new c(function(t1) {\n o._reflowResolve = t1;\n }) : void 0;\n o._reflowPromise = l, o.start(r, e, n), o._interacting ? (o.move(a), o.end(i)) : (o.stop(), o._reflowResolve());\n return o.removePointer(i, i), l;\n }(n, t1, a, e, f);\n }\n o && o.push(l);\n }, s = 0; s < r.length && !a(); s++);\n return o && i.all(o).then(function() {\n return t1;\n });\n }(this, e, t1);\n };\n },\n listeners: {\n \"interactions:stop\": function(t1, e) {\n var n = t1.interaction;\n \"reflow\" === n.pointerType && (n._reflowResolve && n._reflowResolve(), function(t1, e) {\n t1.splice(t1.indexOf(e), 1);\n }(e.interactions.list, n));\n }\n }\n }, er = tr;\n if (un.use(he), un.use(Ce), un.use(Zn), un.use(qe), un.use(Ln), un.use(pe), un.use(Xt), un.use(Gt), un.use(er), un.default = un, \"object\" === n(module) && module) try {\n module.exports = un;\n } catch (t1) {}\n return un.default = un, un;\n});\n\n});\n\nvar $65d5daca13f5010c$exports = {};\n\"use strict\";\nvar $20d57ad7857b7d5d$exports = {};\n\"use strict\";\n\nvar $iVcuU = parcelRequire(\"iVcuU\");\n\n$iVcuU.trust = (parcelRequire(\"e2F9W\"));\n\n$iVcuU.fragment = (parcelRequire(\"7PZrX\"));\n$20d57ad7857b7d5d$exports = $iVcuU;\n\n\nvar $8fa9e1679f027da0$exports = {};\n\"use strict\";\n\nvar $2uPnQ = parcelRequire(\"2uPnQ\");\n\nvar $7EF0O = parcelRequire(\"7EF0O\");\n\n$8fa9e1679f027da0$exports = (parcelRequire(\"5y2KI\"))(typeof window !== \"undefined\" ? window : null, $2uPnQ, $7EF0O.redraw);\n\n\n\nvar $7EF0O = parcelRequire(\"7EF0O\");\nvar $65d5daca13f5010c$var$m = function m() {\n return $20d57ad7857b7d5d$exports.apply(this, arguments);\n};\n$65d5daca13f5010c$var$m.m = $20d57ad7857b7d5d$exports;\n$65d5daca13f5010c$var$m.trust = $20d57ad7857b7d5d$exports.trust;\n$65d5daca13f5010c$var$m.fragment = $20d57ad7857b7d5d$exports.fragment;\n$65d5daca13f5010c$var$m.Fragment = \"[\";\n$65d5daca13f5010c$var$m.mount = $7EF0O.mount;\n\n$65d5daca13f5010c$var$m.route = (parcelRequire(\"4Ppi2\"));\n\n$65d5daca13f5010c$var$m.render = (parcelRequire(\"j25vk\"));\n$65d5daca13f5010c$var$m.redraw = $7EF0O.redraw;\n$65d5daca13f5010c$var$m.request = $8fa9e1679f027da0$exports.request;\n$65d5daca13f5010c$var$m.jsonp = $8fa9e1679f027da0$exports.jsonp;\n\n$65d5daca13f5010c$var$m.parseQueryString = (parcelRequire(\"gZZfO\"));\n\n$65d5daca13f5010c$var$m.buildQueryString = (parcelRequire(\"iRA82\"));\n\n$65d5daca13f5010c$var$m.parsePathname = (parcelRequire(\"7lWrV\"));\n\n$65d5daca13f5010c$var$m.buildPathname = (parcelRequire(\"cITMw\"));\n\n$65d5daca13f5010c$var$m.vnode = (parcelRequire(\"dBs8J\"));\n\n$65d5daca13f5010c$var$m.PromisePolyfill = (parcelRequire(\"k7iQv\"));\n\n$65d5daca13f5010c$var$m.censor = (parcelRequire(\"e9o88\"));\n$65d5daca13f5010c$exports = $65d5daca13f5010c$var$m;\n\n\nvar $6c48d115f6b35383$exports = {};\n\n\nvar $4827982a76523906$exports = {};\n\"use strict\";\n\n$4827982a76523906$exports = (parcelRequire(\"9erhh\"));\n\n\nvar $22dd8f6982cb874d$export$ae01dedf5c052bb = {\n clip: null,\n paused: true,\n filename: \"\",\n time: $4827982a76523906$exports(0),\n duration: 0,\n volume: .1,\n speed: 1\n};\nvar $22dd8f6982cb874d$export$304e9dfcb2c65a51 = {\n edl: [],\n current: 0,\n time: 0,\n duration: ()=>{\n if ($22dd8f6982cb874d$export$304e9dfcb2c65a51.edl.length > 0) return $22dd8f6982cb874d$export$304e9dfcb2c65a51.edl.reduce((a, b)=>a + (b ? b[\"duration\"] : 0), 0);\n else return 0;\n },\n durations: (e)=>{\n let d = e.map((clip)=>clip[\"duration\"]);\n return d.reduce((a, b)=>a + b, 0);\n },\n update: ()=>{\n let edl = $22dd8f6982cb874d$export$304e9dfcb2c65a51.edl;\n $22dd8f6982cb874d$export$304e9dfcb2c65a51.edl = [];\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw.sync();\n $22dd8f6982cb874d$export$304e9dfcb2c65a51.edl = edl;\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw.sync();\n console.log(\"edl updated\", $22dd8f6982cb874d$export$304e9dfcb2c65a51.edl);\n },\n which: (t)=>{\n let c = 0;\n let i = 0;\n while(c + $22dd8f6982cb874d$export$304e9dfcb2c65a51.edl[i].duration < t){\n c += $22dd8f6982cb874d$export$304e9dfcb2c65a51.edl[i].duration;\n i++;\n }\n return i;\n },\n jump: (t)=>{\n let n = $22dd8f6982cb874d$export$304e9dfcb2c65a51.which(t);\n if (n != $22dd8f6982cb874d$export$304e9dfcb2c65a51.current) {\n $22dd8f6982cb874d$export$ae01dedf5c052bb.clip = $22dd8f6982cb874d$export$304e9dfcb2c65a51.edl[n];\n $22dd8f6982cb874d$export$304e9dfcb2c65a51.current = n;\n }\n $22dd8f6982cb874d$export$304e9dfcb2c65a51.time = t;\n $22dd8f6982cb874d$export$ae01dedf5c052bb.time(t - $22dd8f6982cb874d$export$304e9dfcb2c65a51.durations($22dd8f6982cb874d$export$304e9dfcb2c65a51.edl.slice(0, n)));\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw.sync();\n }\n};\nfunction $22dd8f6982cb874d$export$4331e38cf536896b(arr, old_index, new_index) {\n let element = arr[old_index];\n arr.splice(old_index, 1);\n arr.splice(new_index, 0, element);\n return arr;\n}\n\n\n\nvar $75d41d026a980c58$export$ca000e230c0caa3e = {\n edl: $4827982a76523906$exports([]),\n paused: $4827982a76523906$exports(true),\n scale: $4827982a76523906$exports(50),\n volume: $4827982a76523906$exports(.1),\n time: $4827982a76523906$exports(0),\n duration: $4827982a76523906$exports(0),\n tool: $4827982a76523906$exports(\"time\"),\n width: ()=>{\n if ($75d41d026a980c58$export$ca000e230c0caa3e.aspectWidth() >= $75d41d026a980c58$export$ca000e230c0caa3e.aspectHeight()) {\n let w = parseInt($75d41d026a980c58$export$ca000e230c0caa3e.resolution() * $75d41d026a980c58$export$ca000e230c0caa3e.aspectWidth() / $75d41d026a980c58$export$ca000e230c0caa3e.aspectHeight());\n if (w % 2 != 0) w -= 1;\n return w;\n } else return $75d41d026a980c58$export$ca000e230c0caa3e.resolution();\n },\n height: ()=>{\n if ($75d41d026a980c58$export$ca000e230c0caa3e.aspectWidth() >= $75d41d026a980c58$export$ca000e230c0caa3e.aspectHeight()) return $75d41d026a980c58$export$ca000e230c0caa3e.resolution();\n else {\n let h = parseInt($75d41d026a980c58$export$ca000e230c0caa3e.resolution() * $75d41d026a980c58$export$ca000e230c0caa3e.aspectHeight() / $75d41d026a980c58$export$ca000e230c0caa3e.aspectWidth());\n if (h % 2 != 0) h -= 1;\n return h;\n }\n },\n resolution: $4827982a76523906$exports(1080),\n aspectWidth: $4827982a76523906$exports(16),\n aspectHeight: $4827982a76523906$exports(9)\n};\n\n\nvar $6c48d115f6b35383$require$state = $75d41d026a980c58$export$ca000e230c0caa3e;\n\n/**!\n * Sortable 1.15.1\n * @author\tRubaXa \n * @author\towenm \n * @license MIT\n */ function $dc7ec905e041f51c$var$ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\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 return keys;\n}\nfunction $dc7ec905e041f51c$var$_objectSpread2(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) $dc7ec905e041f51c$var$ownKeys(Object(source), true).forEach(function(key) {\n $dc7ec905e041f51c$var$_defineProperty(target, key, source[key]);\n });\n else if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n else $dc7ec905e041f51c$var$ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction $dc7ec905e041f51c$var$_typeof(obj) {\n \"@babel/helpers - typeof\";\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") $dc7ec905e041f51c$var$_typeof = function(obj) {\n return typeof obj;\n };\n else $dc7ec905e041f51c$var$_typeof = function(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n return $dc7ec905e041f51c$var$_typeof(obj);\n}\nfunction $dc7ec905e041f51c$var$_defineProperty(obj, key, value) {\n if (key in obj) Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n else obj[key] = value;\n return obj;\n}\nfunction $dc7ec905e041f51c$var$_extends() {\n $dc7ec905e041f51c$var$_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)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];\n }\n return target;\n };\n return $dc7ec905e041f51c$var$_extends.apply(this, arguments);\n}\nfunction $dc7ec905e041f51c$var$_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 $dc7ec905e041f51c$var$_objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = $dc7ec905e041f51c$var$_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 $dc7ec905e041f51c$var$_toConsumableArray(arr) {\n return $dc7ec905e041f51c$var$_arrayWithoutHoles(arr) || $dc7ec905e041f51c$var$_iterableToArray(arr) || $dc7ec905e041f51c$var$_unsupportedIterableToArray(arr) || $dc7ec905e041f51c$var$_nonIterableSpread();\n}\nfunction $dc7ec905e041f51c$var$_arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return $dc7ec905e041f51c$var$_arrayLikeToArray(arr);\n}\nfunction $dc7ec905e041f51c$var$_iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction $dc7ec905e041f51c$var$_unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return $dc7ec905e041f51c$var$_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 $dc7ec905e041f51c$var$_arrayLikeToArray(o, minLen);\n}\nfunction $dc7ec905e041f51c$var$_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 $dc7ec905e041f51c$var$_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}\nvar $dc7ec905e041f51c$var$version = \"1.15.1\";\nfunction $dc7ec905e041f51c$var$userAgent(pattern) {\n if (typeof window !== \"undefined\" && window.navigator) return !!/*@__PURE__*/ navigator.userAgent.match(pattern);\n}\nvar $dc7ec905e041f51c$var$IE11OrLess = $dc7ec905e041f51c$var$userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar $dc7ec905e041f51c$var$Edge = $dc7ec905e041f51c$var$userAgent(/Edge/i);\nvar $dc7ec905e041f51c$var$FireFox = $dc7ec905e041f51c$var$userAgent(/firefox/i);\nvar $dc7ec905e041f51c$var$Safari = $dc7ec905e041f51c$var$userAgent(/safari/i) && !$dc7ec905e041f51c$var$userAgent(/chrome/i) && !$dc7ec905e041f51c$var$userAgent(/android/i);\nvar $dc7ec905e041f51c$var$IOS = $dc7ec905e041f51c$var$userAgent(/iP(ad|od|hone)/i);\nvar $dc7ec905e041f51c$var$ChromeForAndroid = $dc7ec905e041f51c$var$userAgent(/chrome/i) && $dc7ec905e041f51c$var$userAgent(/android/i);\nvar $dc7ec905e041f51c$var$captureMode = {\n capture: false,\n passive: false\n};\nfunction $dc7ec905e041f51c$var$on(el, event, fn) {\n el.addEventListener(event, fn, !$dc7ec905e041f51c$var$IE11OrLess && $dc7ec905e041f51c$var$captureMode);\n}\nfunction $dc7ec905e041f51c$var$off(el, event, fn) {\n el.removeEventListener(event, fn, !$dc7ec905e041f51c$var$IE11OrLess && $dc7ec905e041f51c$var$captureMode);\n}\nfunction $dc7ec905e041f51c$var$matches(/**HTMLElement*/ el, /**String*/ selector) {\n if (!selector) return;\n selector[0] === \">\" && (selector = selector.substring(1));\n if (el) try {\n if (el.matches) return el.matches(selector);\n else if (el.msMatchesSelector) return el.msMatchesSelector(selector);\n else if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);\n } catch (_) {\n return false;\n }\n return false;\n}\nfunction $dc7ec905e041f51c$var$getParentOrHost(el) {\n return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\nfunction $dc7ec905e041f51c$var$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 && $dc7ec905e041f51c$var$matches(el, selector) : $dc7ec905e041f51c$var$matches(el, selector)) || includeCTX && el === ctx) return el;\n if (el === ctx) break;\n /* jshint boss:true */ }while (el = $dc7ec905e041f51c$var$getParentOrHost(el));\n }\n return null;\n}\nvar $dc7ec905e041f51c$var$R_SPACE = /\\s+/g;\nfunction $dc7ec905e041f51c$var$toggleClass(el, name, state) {\n if (el && name) {\n if (el.classList) el.classList[state ? \"add\" : \"remove\"](name);\n else {\n var className = (\" \" + el.className + \" \").replace($dc7ec905e041f51c$var$R_SPACE, \" \").replace(\" \" + name + \" \", \" \");\n el.className = (className + (state ? \" \" + name : \"\")).replace($dc7ec905e041f51c$var$R_SPACE, \" \");\n }\n }\n}\nfunction $dc7ec905e041f51c$var$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) val = document.defaultView.getComputedStyle(el, \"\");\n else if (el.currentStyle) val = el.currentStyle;\n return prop === void 0 ? val : val[prop];\n } else {\n if (!(prop in style) && prop.indexOf(\"webkit\") === -1) prop = \"-webkit-\" + prop;\n style[prop] = val + (typeof val === \"string\" ? \"\" : \"px\");\n }\n }\n}\nfunction $dc7ec905e041f51c$var$matrix(el, selfOnly) {\n var appliedTransforms = \"\";\n if (typeof el === \"string\") appliedTransforms = el;\n else do {\n var transform = $dc7ec905e041f51c$var$css(el, \"transform\");\n if (transform && transform !== \"none\") appliedTransforms = transform + \" \" + appliedTransforms;\n /* jshint boss:true */ }while (!selfOnly && (el = el.parentNode));\n var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n /*jshint -W056 */ return matrixFn && new matrixFn(appliedTransforms);\n}\nfunction $dc7ec905e041f51c$var$find(ctx, tagName, iterator) {\n if (ctx) {\n var list = ctx.getElementsByTagName(tagName), i = 0, n = list.length;\n if (iterator) for(; i < n; i++)iterator(list[i], i);\n return list;\n }\n return [];\n}\nfunction $dc7ec905e041f51c$var$getWindowScrollingElement() {\n var scrollingElement = document.scrollingElement;\n if (scrollingElement) return scrollingElement;\n else return document.documentElement;\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 */ function $dc7ec905e041f51c$var$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 !== $dc7ec905e041f51c$var$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 // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n // Not needed on <= IE11\n if (!$dc7ec905e041f51c$var$IE11OrLess) {\n do if (container && container.getBoundingClientRect && ($dc7ec905e041f51c$var$css(container, \"transform\") !== \"none\" || relativeToNonStaticParent && $dc7ec905e041f51c$var$css(container, \"position\") !== \"static\")) {\n var containerRect = container.getBoundingClientRect();\n // Set relative to edges of padding box of container\n top -= containerRect.top + parseInt($dc7ec905e041f51c$var$css(container, \"border-top-width\"));\n left -= containerRect.left + parseInt($dc7ec905e041f51c$var$css(container, \"border-left-width\"));\n bottom = top + elRect.height;\n right = left + elRect.width;\n break;\n }\n while (container = container.parentNode);\n }\n }\n if (undoScale && el !== window) {\n // Adjust for scale()\n var elMatrix = $dc7ec905e041f51c$var$matrix(container || el), scaleX = elMatrix && elMatrix.a, 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/**\r\n * Returns the content rect of the element (bounding rect minus border and padding)\r\n * @param {HTMLElement} el \r\n */ function $dc7ec905e041f51c$var$getContentRect(el) {\n var rect = $dc7ec905e041f51c$var$getRect(el);\n var paddingLeft = parseInt($dc7ec905e041f51c$var$css(el, \"padding-left\")), paddingTop = parseInt($dc7ec905e041f51c$var$css(el, \"padding-top\")), paddingRight = parseInt($dc7ec905e041f51c$var$css(el, \"padding-right\")), paddingBottom = parseInt($dc7ec905e041f51c$var$css(el, \"padding-bottom\"));\n rect.top += paddingTop + parseInt($dc7ec905e041f51c$var$css(el, \"border-top-width\"));\n rect.left += paddingLeft + parseInt($dc7ec905e041f51c$var$css(el, \"border-left-width\"));\n // Client Width/Height includes padding only\n rect.width = el.clientWidth - paddingLeft - paddingRight;\n rect.height = el.clientHeight - paddingTop - paddingBottom;\n rect.bottom = rect.top + rect.height;\n rect.right = rect.left + rect.width;\n return rect;\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 */ function $dc7ec905e041f51c$var$isScrolledPast(el, elSide, parentSide) {\n var parent = $dc7ec905e041f51c$var$getParentAutoScrollElement(el, true), elSideVal = $dc7ec905e041f51c$var$getRect(el)[elSide];\n /* jshint boss:true */ while(parent){\n var parentSideVal = $dc7ec905e041f51c$var$getRect(parent)[parentSide], visible = void 0;\n if (parentSide === \"top\" || parentSide === \"left\") visible = elSideVal >= parentSideVal;\n else visible = elSideVal <= parentSideVal;\n if (!visible) return parent;\n if (parent === $dc7ec905e041f51c$var$getWindowScrollingElement()) break;\n parent = $dc7ec905e041f51c$var$getParentAutoScrollElement(parent, false);\n }\n return false;\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 */ function $dc7ec905e041f51c$var$getChild(el, childNum, options, includeDragEl) {\n var currentChild = 0, i = 0, children = el.children;\n while(i < children.length){\n if (children[i].style.display !== \"none\" && children[i] !== $dc7ec905e041f51c$export$31b3ca70d8f57423.ghost && (includeDragEl || children[i] !== $dc7ec905e041f51c$export$31b3ca70d8f57423.dragged) && $dc7ec905e041f51c$var$closest(children[i], options.draggable, el, false)) {\n if (currentChild === childNum) return children[i];\n currentChild++;\n }\n i++;\n }\n return null;\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 */ function $dc7ec905e041f51c$var$lastChild(el, selector) {\n var last = el.lastElementChild;\n while(last && (last === $dc7ec905e041f51c$export$31b3ca70d8f57423.ghost || $dc7ec905e041f51c$var$css(last, \"display\") === \"none\" || selector && !$dc7ec905e041f51c$var$matches(last, selector)))last = last.previousElementSibling;\n return last || null;\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 */ function $dc7ec905e041f51c$var$index(el, selector) {\n var index = 0;\n if (!el || !el.parentNode) return -1;\n /* jshint boss:true */ while(el = el.previousElementSibling)if (el.nodeName.toUpperCase() !== \"TEMPLATE\" && el !== $dc7ec905e041f51c$export$31b3ca70d8f57423.clone && (!selector || $dc7ec905e041f51c$var$matches(el, selector))) index++;\n return index;\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 */ function $dc7ec905e041f51c$var$getRelativeScrollOffset(el) {\n var offsetLeft = 0, offsetTop = 0, winScroller = $dc7ec905e041f51c$var$getWindowScrollingElement();\n if (el) do {\n var elMatrix = $dc7ec905e041f51c$var$matrix(el), scaleX = elMatrix.a, scaleY = elMatrix.d;\n offsetLeft += el.scrollLeft * scaleX;\n offsetTop += el.scrollTop * scaleY;\n }while (el !== winScroller && (el = el.parentNode));\n return [\n offsetLeft,\n 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 */ function $dc7ec905e041f51c$var$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 $dc7ec905e041f51c$var$getParentAutoScrollElement(el, includeSelf) {\n // skip to window\n if (!el || !el.getBoundingClientRect) return $dc7ec905e041f51c$var$getWindowScrollingElement();\n var elem = el;\n var gotSelf = false;\n do // 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 = $dc7ec905e041f51c$var$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 $dc7ec905e041f51c$var$getWindowScrollingElement();\n if (gotSelf || includeSelf) return elem;\n gotSelf = true;\n }\n }\n while (elem = elem.parentNode);\n return $dc7ec905e041f51c$var$getWindowScrollingElement();\n}\nfunction $dc7ec905e041f51c$var$extend(dst, src) {\n if (dst && src) {\n for(var key in src)if (src.hasOwnProperty(key)) dst[key] = src[key];\n }\n return dst;\n}\nfunction $dc7ec905e041f51c$var$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 $dc7ec905e041f51c$var$_throttleTimeout;\nfunction $dc7ec905e041f51c$var$throttle(callback, ms) {\n return function() {\n if (!$dc7ec905e041f51c$var$_throttleTimeout) {\n var args = arguments, _this = this;\n if (args.length === 1) callback.call(_this, args[0]);\n else callback.apply(_this, args);\n $dc7ec905e041f51c$var$_throttleTimeout = setTimeout(function() {\n $dc7ec905e041f51c$var$_throttleTimeout = void 0;\n }, ms);\n }\n };\n}\nfunction $dc7ec905e041f51c$var$cancelThrottle() {\n clearTimeout($dc7ec905e041f51c$var$_throttleTimeout);\n $dc7ec905e041f51c$var$_throttleTimeout = void 0;\n}\nfunction $dc7ec905e041f51c$var$scrollBy(el, x, y) {\n el.scrollLeft += x;\n el.scrollTop += y;\n}\nfunction $dc7ec905e041f51c$var$clone(el) {\n var Polymer = window.Polymer;\n var $ = window.jQuery || window.Zepto;\n if (Polymer && Polymer.dom) return Polymer.dom(el).cloneNode(true);\n else if ($) return $(el).clone(true)[0];\n else return el.cloneNode(true);\n}\nfunction $dc7ec905e041f51c$var$setRect(el, rect) {\n $dc7ec905e041f51c$var$css(el, \"position\", \"absolute\");\n $dc7ec905e041f51c$var$css(el, \"top\", rect.top);\n $dc7ec905e041f51c$var$css(el, \"left\", rect.left);\n $dc7ec905e041f51c$var$css(el, \"width\", rect.width);\n $dc7ec905e041f51c$var$css(el, \"height\", rect.height);\n}\nfunction $dc7ec905e041f51c$var$unsetRect(el) {\n $dc7ec905e041f51c$var$css(el, \"position\", \"\");\n $dc7ec905e041f51c$var$css(el, \"top\", \"\");\n $dc7ec905e041f51c$var$css(el, \"left\", \"\");\n $dc7ec905e041f51c$var$css(el, \"width\", \"\");\n $dc7ec905e041f51c$var$css(el, \"height\", \"\");\n}\nvar $dc7ec905e041f51c$var$expando = \"Sortable\" + new Date().getTime();\nfunction $dc7ec905e041f51c$var$AnimationStateManager() {\n var animationStates = [], 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 ($dc7ec905e041f51c$var$css(child, \"display\") === \"none\" || child === $dc7ec905e041f51c$export$31b3ca70d8f57423.ghost) return;\n animationStates.push({\n target: child,\n rect: $dc7ec905e041f51c$var$getRect(child)\n });\n var fromRect = $dc7ec905e041f51c$var$_objectSpread2({}, animationStates[animationStates.length - 1].rect);\n // If animating: compensate for current animation\n if (child.thisAnimationDuration) {\n var childMatrix = $dc7ec905e041f51c$var$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($dc7ec905e041f51c$var$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, animationTime = 0;\n animationStates.forEach(function(state) {\n var time = 0, target = state.target, fromRect = target.fromRect, toRect = $dc7ec905e041f51c$var$getRect(target), prevFromRect = target.prevFromRect, prevToRect = target.prevToRect, animatingRect = state.rect, targetMatrix = $dc7ec905e041f51c$var$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) // Could also check if animatingRect is between fromRect and toRect\n {\n if ($dc7ec905e041f51c$var$isRectEqual(prevFromRect, toRect) && !$dc7ec905e041f51c$var$isRectEqual(fromRect, toRect) && // 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)) // If returning to same place as started from animation and on same axis\n time = $dc7ec905e041f51c$var$calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n }\n // if fromRect != toRect: animate\n if (!$dc7ec905e041f51c$var$isRectEqual(toRect, fromRect)) {\n target.prevFromRect = fromRect;\n target.prevToRect = toRect;\n if (!time) time = _this.options.animation;\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 animationCallbackId = setTimeout(function() {\n if (typeof callback === \"function\") callback();\n }, animationTime);\n animationStates = [];\n },\n animate: function animate(target, currentRect, toRect, duration) {\n if (duration) {\n $dc7ec905e041f51c$var$css(target, \"transition\", \"\");\n $dc7ec905e041f51c$var$css(target, \"transform\", \"\");\n var elMatrix = $dc7ec905e041f51c$var$matrix(this.el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d, translateX = (currentRect.left - toRect.left) / (scaleX || 1), translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n target.animatingX = !!translateX;\n target.animatingY = !!translateY;\n $dc7ec905e041f51c$var$css(target, \"transform\", \"translate3d(\" + translateX + \"px,\" + translateY + \"px,0)\");\n this.forRepaintDummy = $dc7ec905e041f51c$var$repaint(target); // repaint\n $dc7ec905e041f51c$var$css(target, \"transition\", \"transform \" + duration + \"ms\" + (this.options.easing ? \" \" + this.options.easing : \"\"));\n $dc7ec905e041f51c$var$css(target, \"transform\", \"translate3d(0,0,0)\");\n typeof target.animated === \"number\" && clearTimeout(target.animated);\n target.animated = setTimeout(function() {\n $dc7ec905e041f51c$var$css(target, \"transition\", \"\");\n $dc7ec905e041f51c$var$css(target, \"transform\", \"\");\n target.animated = false;\n target.animatingX = false;\n target.animatingY = false;\n }, duration);\n }\n }\n };\n}\nfunction $dc7ec905e041f51c$var$repaint(target) {\n return target.offsetWidth;\n}\nfunction $dc7ec905e041f51c$var$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}\nvar $dc7ec905e041f51c$var$plugins = [];\nvar $dc7ec905e041f51c$var$defaults = {\n initializeByDefault: true\n};\nvar $dc7ec905e041f51c$var$PluginManager = {\n mount: function mount(plugin) {\n // Set default static properties\n for(var option in $dc7ec905e041f51c$var$defaults)if ($dc7ec905e041f51c$var$defaults.hasOwnProperty(option) && !(option in plugin)) plugin[option] = $dc7ec905e041f51c$var$defaults[option];\n $dc7ec905e041f51c$var$plugins.forEach(function(p) {\n if (p.pluginName === plugin.pluginName) throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n });\n $dc7ec905e041f51c$var$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 $dc7ec905e041f51c$var$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]) sortable[plugin.pluginName][eventNameGlobal]($dc7ec905e041f51c$var$_objectSpread2({\n sortable: sortable\n }, evt));\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]) sortable[plugin.pluginName][eventName]($dc7ec905e041f51c$var$_objectSpread2({\n sortable: sortable\n }, evt));\n });\n },\n initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n $dc7ec905e041f51c$var$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 // Add default options from plugin\n $dc7ec905e041f51c$var$_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\") sortable.options[option] = modified;\n }\n },\n getEventProperties: function getEventProperties(name, sortable) {\n var eventProperties = {};\n $dc7ec905e041f51c$var$plugins.forEach(function(plugin) {\n if (typeof plugin.eventProperties !== \"function\") return;\n $dc7ec905e041f51c$var$_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 $dc7ec905e041f51c$var$plugins.forEach(function(plugin) {\n // Plugin must exist on the Sortable\n if (!sortable[plugin.pluginName]) return;\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\") modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n });\n return modifiedValue;\n }\n};\nfunction $dc7ec905e041f51c$var$dispatchEvent(_ref) {\n var sortable = _ref.sortable, rootEl = _ref.rootEl, name = _ref.name, targetEl = _ref.targetEl, cloneEl = _ref.cloneEl, toEl = _ref.toEl, fromEl = _ref.fromEl, oldIndex = _ref.oldIndex, newIndex = _ref.newIndex, oldDraggableIndex = _ref.oldDraggableIndex, newDraggableIndex = _ref.newDraggableIndex, originalEvent = _ref.originalEvent, putSortable = _ref.putSortable, extraEventProperties = _ref.extraEventProperties;\n sortable = sortable || rootEl && rootEl[$dc7ec905e041f51c$var$expando];\n if (!sortable) return;\n var evt, options = sortable.options, onName = \"on\" + name.charAt(0).toUpperCase() + name.substr(1);\n // Support for new CustomEvent feature\n if (window.CustomEvent && !$dc7ec905e041f51c$var$IE11OrLess && !$dc7ec905e041f51c$var$Edge) 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 = $dc7ec905e041f51c$var$_objectSpread2($dc7ec905e041f51c$var$_objectSpread2({}, extraEventProperties), $dc7ec905e041f51c$var$PluginManager.getEventProperties(name, sortable));\n for(var option in allEventProperties)evt[option] = allEventProperties[option];\n if (rootEl) rootEl.dispatchEvent(evt);\n if (options[onName]) options[onName].call(sortable, evt);\n}\nvar $dc7ec905e041f51c$var$_excluded = [\n \"evt\"\n];\nvar $dc7ec905e041f51c$var$pluginEvent = function pluginEvent(eventName, sortable) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, originalEvent = _ref.evt, data = $dc7ec905e041f51c$var$_objectWithoutProperties(_ref, $dc7ec905e041f51c$var$_excluded);\n $dc7ec905e041f51c$var$PluginManager.pluginEvent.bind($dc7ec905e041f51c$export$31b3ca70d8f57423)(eventName, sortable, $dc7ec905e041f51c$var$_objectSpread2({\n dragEl: $dc7ec905e041f51c$var$dragEl,\n parentEl: $dc7ec905e041f51c$var$parentEl,\n ghostEl: $dc7ec905e041f51c$var$ghostEl,\n rootEl: $dc7ec905e041f51c$var$rootEl,\n nextEl: $dc7ec905e041f51c$var$nextEl,\n lastDownEl: $dc7ec905e041f51c$var$lastDownEl,\n cloneEl: $dc7ec905e041f51c$var$cloneEl,\n cloneHidden: $dc7ec905e041f51c$var$cloneHidden,\n dragStarted: $dc7ec905e041f51c$var$moved,\n putSortable: $dc7ec905e041f51c$var$putSortable,\n activeSortable: $dc7ec905e041f51c$export$31b3ca70d8f57423.active,\n originalEvent: originalEvent,\n oldIndex: $dc7ec905e041f51c$var$oldIndex,\n oldDraggableIndex: $dc7ec905e041f51c$var$oldDraggableIndex,\n newIndex: $dc7ec905e041f51c$var$newIndex,\n newDraggableIndex: $dc7ec905e041f51c$var$newDraggableIndex,\n hideGhostForTarget: $dc7ec905e041f51c$var$_hideGhostForTarget,\n unhideGhostForTarget: $dc7ec905e041f51c$var$_unhideGhostForTarget,\n cloneNowHidden: function cloneNowHidden() {\n $dc7ec905e041f51c$var$cloneHidden = true;\n },\n cloneNowShown: function cloneNowShown() {\n $dc7ec905e041f51c$var$cloneHidden = false;\n },\n dispatchSortableEvent: function dispatchSortableEvent(name) {\n $dc7ec905e041f51c$var$_dispatchEvent({\n sortable: sortable,\n name: name,\n originalEvent: originalEvent\n });\n }\n }, data));\n};\nfunction $dc7ec905e041f51c$var$_dispatchEvent(info) {\n $dc7ec905e041f51c$var$dispatchEvent($dc7ec905e041f51c$var$_objectSpread2({\n putSortable: $dc7ec905e041f51c$var$putSortable,\n cloneEl: $dc7ec905e041f51c$var$cloneEl,\n targetEl: $dc7ec905e041f51c$var$dragEl,\n rootEl: $dc7ec905e041f51c$var$rootEl,\n oldIndex: $dc7ec905e041f51c$var$oldIndex,\n oldDraggableIndex: $dc7ec905e041f51c$var$oldDraggableIndex,\n newIndex: $dc7ec905e041f51c$var$newIndex,\n newDraggableIndex: $dc7ec905e041f51c$var$newDraggableIndex\n }, info));\n}\nvar $dc7ec905e041f51c$var$dragEl, $dc7ec905e041f51c$var$parentEl, $dc7ec905e041f51c$var$ghostEl, $dc7ec905e041f51c$var$rootEl, $dc7ec905e041f51c$var$nextEl, $dc7ec905e041f51c$var$lastDownEl, $dc7ec905e041f51c$var$cloneEl, $dc7ec905e041f51c$var$cloneHidden, $dc7ec905e041f51c$var$oldIndex, $dc7ec905e041f51c$var$newIndex, $dc7ec905e041f51c$var$oldDraggableIndex, $dc7ec905e041f51c$var$newDraggableIndex, $dc7ec905e041f51c$var$activeGroup, $dc7ec905e041f51c$var$putSortable, $dc7ec905e041f51c$var$awaitingDragStarted = false, $dc7ec905e041f51c$var$ignoreNextClick = false, $dc7ec905e041f51c$var$sortables = [], $dc7ec905e041f51c$var$tapEvt, $dc7ec905e041f51c$var$touchEvt, $dc7ec905e041f51c$var$lastDx, $dc7ec905e041f51c$var$lastDy, $dc7ec905e041f51c$var$tapDistanceLeft, $dc7ec905e041f51c$var$tapDistanceTop, $dc7ec905e041f51c$var$moved, $dc7ec905e041f51c$var$lastTarget, $dc7ec905e041f51c$var$lastDirection, $dc7ec905e041f51c$var$pastFirstInvertThresh = false, $dc7ec905e041f51c$var$isCircumstantialInvert = false, $dc7ec905e041f51c$var$targetMoveDistance, // For positioning ghost absolutely\n$dc7ec905e041f51c$var$ghostRelativeParent, $dc7ec905e041f51c$var$ghostRelativeParentInitialScroll = [], // (left, top)\n$dc7ec905e041f51c$var$_silent = false, $dc7ec905e041f51c$var$savedInputChecked = [];\n/** @const */ var $dc7ec905e041f51c$var$documentExists = typeof document !== \"undefined\", $dc7ec905e041f51c$var$PositionGhostAbsolutely = $dc7ec905e041f51c$var$IOS, $dc7ec905e041f51c$var$CSSFloatProperty = $dc7ec905e041f51c$var$Edge || $dc7ec905e041f51c$var$IE11OrLess ? \"cssFloat\" : \"float\", // This will not pass for IE9, because IE9 DnD only works on anchors\n$dc7ec905e041f51c$var$supportDraggable = $dc7ec905e041f51c$var$documentExists && !$dc7ec905e041f51c$var$ChromeForAndroid && !$dc7ec905e041f51c$var$IOS && \"draggable\" in document.createElement(\"div\"), $dc7ec905e041f51c$var$supportCssPointerEvents = function() {\n if (!$dc7ec905e041f51c$var$documentExists) return;\n // false when <= IE11\n if ($dc7ec905e041f51c$var$IE11OrLess) return false;\n var el = document.createElement(\"x\");\n el.style.cssText = \"pointer-events:auto\";\n return el.style.pointerEvents === \"auto\";\n}(), $dc7ec905e041f51c$var$_detectDirection = function _detectDirection(el, options) {\n var elCSS = $dc7ec905e041f51c$var$css(el), elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth), child1 = $dc7ec905e041f51c$var$getChild(el, 0, options), child2 = $dc7ec905e041f51c$var$getChild(el, 1, options), firstChildCSS = child1 && $dc7ec905e041f51c$var$css(child1), secondChildCSS = child2 && $dc7ec905e041f51c$var$css(child2), firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + $dc7ec905e041f51c$var$getRect(child1).width, secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + $dc7ec905e041f51c$var$getRect(child2).width;\n if (elCSS.display === \"flex\") return elCSS.flexDirection === \"column\" || elCSS.flexDirection === \"column-reverse\" ? \"vertical\" : \"horizontal\";\n if (elCSS.display === \"grid\") return elCSS.gridTemplateColumns.split(\" \").length <= 1 ? \"vertical\" : \"horizontal\";\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[$dc7ec905e041f51c$var$CSSFloatProperty] === \"none\" || child2 && elCSS[$dc7ec905e041f51c$var$CSSFloatProperty] === \"none\" && firstChildWidth + secondChildWidth > elWidth) ? \"vertical\" : \"horizontal\";\n}, $dc7ec905e041f51c$var$_dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n var dragElS1Opp = vertical ? dragRect.left : dragRect.top, dragElS2Opp = vertical ? dragRect.right : dragRect.bottom, dragElOppLength = vertical ? dragRect.width : dragRect.height, targetS1Opp = vertical ? targetRect.left : targetRect.top, targetS2Opp = vertical ? targetRect.right : targetRect.bottom, targetOppLength = vertical ? targetRect.width : targetRect.height;\n return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\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 */ $dc7ec905e041f51c$var$_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n var ret;\n $dc7ec905e041f51c$var$sortables.some(function(sortable) {\n var threshold = sortable[$dc7ec905e041f51c$var$expando].options.emptyInsertThreshold;\n if (!threshold || $dc7ec905e041f51c$var$lastChild(sortable)) return;\n var rect = $dc7ec905e041f51c$var$getRect(sortable), insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold, insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n if (insideHorizontally && insideVertically) return ret = sortable;\n });\n return ret;\n}, $dc7ec905e041f51c$var$_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)) // Default pull value\n // Default pull and put value if same group\n return true;\n else if (value == null || value === false) return false;\n else if (pull && value === \"clone\") return value;\n else if (typeof value === \"function\") 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 || $dc7ec905e041f51c$var$_typeof(originalGroup) != \"object\") originalGroup = {\n name: originalGroup\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}, $dc7ec905e041f51c$var$_hideGhostForTarget = function _hideGhostForTarget() {\n if (!$dc7ec905e041f51c$var$supportCssPointerEvents && $dc7ec905e041f51c$var$ghostEl) $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"display\", \"none\");\n}, $dc7ec905e041f51c$var$_unhideGhostForTarget = function _unhideGhostForTarget() {\n if (!$dc7ec905e041f51c$var$supportCssPointerEvents && $dc7ec905e041f51c$var$ghostEl) $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"display\", \"\");\n};\n// #1184 fix - Prevent click event on fallback if dragged but item not changed position\nif ($dc7ec905e041f51c$var$documentExists && !$dc7ec905e041f51c$var$ChromeForAndroid) document.addEventListener(\"click\", function(evt) {\n if ($dc7ec905e041f51c$var$ignoreNextClick) {\n evt.preventDefault();\n evt.stopPropagation && evt.stopPropagation();\n evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n $dc7ec905e041f51c$var$ignoreNextClick = false;\n return false;\n }\n}, true);\nvar $dc7ec905e041f51c$var$nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n if ($dc7ec905e041f51c$var$dragEl) {\n evt = evt.touches ? evt.touches[0] : evt;\n var nearest = $dc7ec905e041f51c$var$_detectNearestEmptySortable(evt.clientX, evt.clientY);\n if (nearest) {\n // Create imitation event\n var event = {};\n for(var i in evt)if (evt.hasOwnProperty(i)) event[i] = evt[i];\n event.target = event.rootEl = nearest;\n event.preventDefault = void 0;\n event.stopPropagation = void 0;\n nearest[$dc7ec905e041f51c$var$expando]._onDragOver(event);\n }\n }\n};\nvar $dc7ec905e041f51c$var$_checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n if ($dc7ec905e041f51c$var$dragEl) $dc7ec905e041f51c$var$dragEl.parentNode[$dc7ec905e041f51c$var$expando]._isOutsideThisEl(evt.target);\n};\n/**\r\n * @class Sortable\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */ function $dc7ec905e041f51c$export$31b3ca70d8f57423(el, options) {\n if (!(el && el.nodeType && el.nodeType === 1)) throw \"Sortable: `el` must be an HTMLElement, not \".concat(({}).toString.call(el));\n this.el = el; // root element\n this.options = options = $dc7ec905e041f51c$var$_extends({}, options);\n // Export instance\n el[$dc7ec905e041f51c$var$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 $dc7ec905e041f51c$var$_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 supportPointer: $dc7ec905e041f51c$export$31b3ca70d8f57423.supportPointer !== false && \"PointerEvent\" in window && !$dc7ec905e041f51c$var$Safari,\n emptyInsertThreshold: 5\n };\n $dc7ec905e041f51c$var$PluginManager.initializePlugins(this, el, defaults);\n // Set default options\n for(var name in defaults)!(name in options) && (options[name] = defaults[name]);\n $dc7ec905e041f51c$var$_prepareGroup(options);\n // Bind all private methods\n for(var fn in this)if (fn.charAt(0) === \"_\" && typeof this[fn] === \"function\") this[fn] = this[fn].bind(this);\n // Setup drag mode\n this.nativeDraggable = options.forceFallback ? false : $dc7ec905e041f51c$var$supportDraggable;\n if (this.nativeDraggable) // Touch start threshold cannot be greater than the native dragstart threshold\n this.options.touchStartThreshold = 1;\n // Bind events\n if (options.supportPointer) $dc7ec905e041f51c$var$on(el, \"pointerdown\", this._onTapStart);\n else {\n $dc7ec905e041f51c$var$on(el, \"mousedown\", this._onTapStart);\n $dc7ec905e041f51c$var$on(el, \"touchstart\", this._onTapStart);\n }\n if (this.nativeDraggable) {\n $dc7ec905e041f51c$var$on(el, \"dragover\", this);\n $dc7ec905e041f51c$var$on(el, \"dragenter\", this);\n }\n $dc7ec905e041f51c$var$sortables.push(this.el);\n // Restore sorting\n options.store && options.store.get && this.sort(options.store.get(this) || []);\n // Add animation state manager\n $dc7ec905e041f51c$var$_extends(this, $dc7ec905e041f51c$var$AnimationStateManager());\n}\n$dc7ec905e041f51c$export$31b3ca70d8f57423.prototype = /** @lends Sortable.prototype */ {\n constructor: $dc7ec905e041f51c$export$31b3ca70d8f57423,\n _isOutsideThisEl: function _isOutsideThisEl(target) {\n if (!this.el.contains(target) && target !== this.el) $dc7ec905e041f51c$var$lastTarget = null;\n },\n _getDirection: function _getDirection(evt, target) {\n return typeof this.options.direction === \"function\" ? this.options.direction.call(this, evt, target, $dc7ec905e041f51c$var$dragEl) : this.options.direction;\n },\n _onTapStart: function _onTapStart(/** Event|TouchEvent */ evt) {\n if (!evt.cancelable) return;\n var _this = this, el = this.el, options = this.options, preventOnFilter = options.preventOnFilter, type = evt.type, touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === \"touch\" && evt, target = (touch || evt).target, originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target, filter = options.filter;\n $dc7ec905e041f51c$var$_saveInputCheckedState(el);\n // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n if ($dc7ec905e041f51c$var$dragEl) return;\n if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) return; // only left button and enabled\n // cancel dnd if original target is content editable\n if (originalTarget.isContentEditable) return;\n // Safari ignores further event handling after mousedown\n if (!this.nativeDraggable && $dc7ec905e041f51c$var$Safari && target && target.tagName.toUpperCase() === \"SELECT\") return;\n target = $dc7ec905e041f51c$var$closest(target, options.draggable, el, false);\n if (target && target.animated) return;\n if ($dc7ec905e041f51c$var$lastDownEl === target) // Ignoring duplicate `down`\n return;\n // Get the index of the dragged element within its parent\n $dc7ec905e041f51c$var$oldIndex = $dc7ec905e041f51c$var$index(target);\n $dc7ec905e041f51c$var$oldDraggableIndex = $dc7ec905e041f51c$var$index(target, options.draggable);\n // Check filter\n if (typeof filter === \"function\") {\n if (filter.call(this, evt, target, this)) {\n $dc7ec905e041f51c$var$_dispatchEvent({\n sortable: _this,\n rootEl: originalTarget,\n name: \"filter\",\n targetEl: target,\n toEl: el,\n fromEl: el\n });\n $dc7ec905e041f51c$var$pluginEvent(\"filter\", _this, {\n evt: evt\n });\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n } else if (filter) {\n filter = filter.split(\",\").some(function(criteria) {\n criteria = $dc7ec905e041f51c$var$closest(originalTarget, criteria.trim(), el, false);\n if (criteria) {\n $dc7ec905e041f51c$var$_dispatchEvent({\n sortable: _this,\n rootEl: criteria,\n name: \"filter\",\n targetEl: target,\n fromEl: el,\n toEl: el\n });\n $dc7ec905e041f51c$var$pluginEvent(\"filter\", _this, {\n evt: evt\n });\n return true;\n }\n });\n if (filter) {\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n }\n if (options.handle && !$dc7ec905e041f51c$var$closest(originalTarget, options.handle, el, false)) return;\n // Prepare `dragstart`\n this._prepareDragStart(evt, touch, target);\n },\n _prepareDragStart: function _prepareDragStart(/** Event */ evt, /** Touch */ touch, /** HTMLElement */ target) {\n var _this = this, el = _this.el, options = _this.options, ownerDocument = el.ownerDocument, dragStartFn;\n if (target && !$dc7ec905e041f51c$var$dragEl && target.parentNode === el) {\n var dragRect = $dc7ec905e041f51c$var$getRect(target);\n $dc7ec905e041f51c$var$rootEl = el;\n $dc7ec905e041f51c$var$dragEl = target;\n $dc7ec905e041f51c$var$parentEl = $dc7ec905e041f51c$var$dragEl.parentNode;\n $dc7ec905e041f51c$var$nextEl = $dc7ec905e041f51c$var$dragEl.nextSibling;\n $dc7ec905e041f51c$var$lastDownEl = target;\n $dc7ec905e041f51c$var$activeGroup = options.group;\n $dc7ec905e041f51c$export$31b3ca70d8f57423.dragged = $dc7ec905e041f51c$var$dragEl;\n $dc7ec905e041f51c$var$tapEvt = {\n target: $dc7ec905e041f51c$var$dragEl,\n clientX: (touch || evt).clientX,\n clientY: (touch || evt).clientY\n };\n $dc7ec905e041f51c$var$tapDistanceLeft = $dc7ec905e041f51c$var$tapEvt.clientX - dragRect.left;\n $dc7ec905e041f51c$var$tapDistanceTop = $dc7ec905e041f51c$var$tapEvt.clientY - dragRect.top;\n this._lastX = (touch || evt).clientX;\n this._lastY = (touch || evt).clientY;\n $dc7ec905e041f51c$var$dragEl.style[\"will-change\"] = \"all\";\n dragStartFn = function dragStartFn() {\n $dc7ec905e041f51c$var$pluginEvent(\"delayEnded\", _this, {\n evt: evt\n });\n if ($dc7ec905e041f51c$export$31b3ca70d8f57423.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 (!$dc7ec905e041f51c$var$FireFox && _this.nativeDraggable) $dc7ec905e041f51c$var$dragEl.draggable = true;\n // Bind the events: dragstart/dragend\n _this._triggerDragStart(evt, touch);\n // Drag start event\n $dc7ec905e041f51c$var$_dispatchEvent({\n sortable: _this,\n name: \"choose\",\n originalEvent: evt\n });\n // Chosen item\n $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$dragEl, options.chosenClass, true);\n };\n // Disable \"draggable\"\n options.ignore.split(\",\").forEach(function(criteria) {\n $dc7ec905e041f51c$var$find($dc7ec905e041f51c$var$dragEl, criteria.trim(), $dc7ec905e041f51c$var$_disableDraggable);\n });\n $dc7ec905e041f51c$var$on(ownerDocument, \"dragover\", $dc7ec905e041f51c$var$nearestEmptyInsertDetectEvent);\n $dc7ec905e041f51c$var$on(ownerDocument, \"mousemove\", $dc7ec905e041f51c$var$nearestEmptyInsertDetectEvent);\n $dc7ec905e041f51c$var$on(ownerDocument, \"touchmove\", $dc7ec905e041f51c$var$nearestEmptyInsertDetectEvent);\n $dc7ec905e041f51c$var$on(ownerDocument, \"mouseup\", _this._onDrop);\n $dc7ec905e041f51c$var$on(ownerDocument, \"touchend\", _this._onDrop);\n $dc7ec905e041f51c$var$on(ownerDocument, \"touchcancel\", _this._onDrop);\n // Make dragEl draggable (must be before delay for FireFox)\n if ($dc7ec905e041f51c$var$FireFox && this.nativeDraggable) {\n this.options.touchStartThreshold = 4;\n $dc7ec905e041f51c$var$dragEl.draggable = true;\n }\n $dc7ec905e041f51c$var$pluginEvent(\"delayStart\", this, {\n evt: evt\n });\n // Delay is impossible for native DnD in Edge or IE\n if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !($dc7ec905e041f51c$var$Edge || $dc7ec905e041f51c$var$IE11OrLess))) {\n if ($dc7ec905e041f51c$export$31b3ca70d8f57423.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 $dc7ec905e041f51c$var$on(ownerDocument, \"mouseup\", _this._disableDelayedDrag);\n $dc7ec905e041f51c$var$on(ownerDocument, \"touchend\", _this._disableDelayedDrag);\n $dc7ec905e041f51c$var$on(ownerDocument, \"touchcancel\", _this._disableDelayedDrag);\n $dc7ec905e041f51c$var$on(ownerDocument, \"mousemove\", _this._delayedDragTouchMoveHandler);\n $dc7ec905e041f51c$var$on(ownerDocument, \"touchmove\", _this._delayedDragTouchMoveHandler);\n options.supportPointer && $dc7ec905e041f51c$var$on(ownerDocument, \"pointermove\", _this._delayedDragTouchMoveHandler);\n _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n } else dragStartFn();\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))) this._disableDelayedDrag();\n },\n _disableDelayedDrag: function _disableDelayedDrag() {\n $dc7ec905e041f51c$var$dragEl && $dc7ec905e041f51c$var$_disableDraggable($dc7ec905e041f51c$var$dragEl);\n clearTimeout(this._dragStartTimer);\n this._disableDelayedDragEvents();\n },\n _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n var ownerDocument = this.el.ownerDocument;\n $dc7ec905e041f51c$var$off(ownerDocument, \"mouseup\", this._disableDelayedDrag);\n $dc7ec905e041f51c$var$off(ownerDocument, \"touchend\", this._disableDelayedDrag);\n $dc7ec905e041f51c$var$off(ownerDocument, \"touchcancel\", this._disableDelayedDrag);\n $dc7ec905e041f51c$var$off(ownerDocument, \"mousemove\", this._delayedDragTouchMoveHandler);\n $dc7ec905e041f51c$var$off(ownerDocument, \"touchmove\", this._delayedDragTouchMoveHandler);\n $dc7ec905e041f51c$var$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) $dc7ec905e041f51c$var$on(document, \"pointermove\", this._onTouchMove);\n else if (touch) $dc7ec905e041f51c$var$on(document, \"touchmove\", this._onTouchMove);\n else $dc7ec905e041f51c$var$on(document, \"mousemove\", this._onTouchMove);\n } else {\n $dc7ec905e041f51c$var$on($dc7ec905e041f51c$var$dragEl, \"dragend\", this);\n $dc7ec905e041f51c$var$on($dc7ec905e041f51c$var$rootEl, \"dragstart\", this._onDragStart);\n }\n try {\n if (document.selection) // Timeout neccessary for IE9\n $dc7ec905e041f51c$var$_nextTick(function() {\n document.selection.empty();\n });\n else window.getSelection().removeAllRanges();\n } catch (err) {}\n },\n _dragStarted: function _dragStarted(fallback, evt) {\n $dc7ec905e041f51c$var$awaitingDragStarted = false;\n if ($dc7ec905e041f51c$var$rootEl && $dc7ec905e041f51c$var$dragEl) {\n $dc7ec905e041f51c$var$pluginEvent(\"dragStarted\", this, {\n evt: evt\n });\n if (this.nativeDraggable) $dc7ec905e041f51c$var$on(document, \"dragover\", $dc7ec905e041f51c$var$_checkOutsideTargetEl);\n var options = this.options;\n // Apply effect\n !fallback && $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$dragEl, options.dragClass, false);\n $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$dragEl, options.ghostClass, true);\n $dc7ec905e041f51c$export$31b3ca70d8f57423.active = this;\n fallback && this._appendGhost();\n // Drag start event\n $dc7ec905e041f51c$var$_dispatchEvent({\n sortable: this,\n name: \"start\",\n originalEvent: evt\n });\n } else this._nulling();\n },\n _emulateDragOver: function _emulateDragOver() {\n if ($dc7ec905e041f51c$var$touchEvt) {\n this._lastX = $dc7ec905e041f51c$var$touchEvt.clientX;\n this._lastY = $dc7ec905e041f51c$var$touchEvt.clientY;\n $dc7ec905e041f51c$var$_hideGhostForTarget();\n var target = document.elementFromPoint($dc7ec905e041f51c$var$touchEvt.clientX, $dc7ec905e041f51c$var$touchEvt.clientY);\n var parent = target;\n while(target && target.shadowRoot){\n target = target.shadowRoot.elementFromPoint($dc7ec905e041f51c$var$touchEvt.clientX, $dc7ec905e041f51c$var$touchEvt.clientY);\n if (target === parent) break;\n parent = target;\n }\n $dc7ec905e041f51c$var$dragEl.parentNode[$dc7ec905e041f51c$var$expando]._isOutsideThisEl(target);\n if (parent) do {\n if (parent[$dc7ec905e041f51c$var$expando]) {\n var inserted = void 0;\n inserted = parent[$dc7ec905e041f51c$var$expando]._onDragOver({\n clientX: $dc7ec905e041f51c$var$touchEvt.clientX,\n clientY: $dc7ec905e041f51c$var$touchEvt.clientY,\n target: target,\n rootEl: parent\n });\n if (inserted && !this.options.dragoverBubble) break;\n }\n target = parent; // store last element\n }while (parent = parent.parentNode);\n $dc7ec905e041f51c$var$_unhideGhostForTarget();\n }\n },\n _onTouchMove: function _onTouchMove(/**TouchEvent*/ evt) {\n if ($dc7ec905e041f51c$var$tapEvt) {\n var options = this.options, fallbackTolerance = options.fallbackTolerance, fallbackOffset = options.fallbackOffset, touch = evt.touches ? evt.touches[0] : evt, ghostMatrix = $dc7ec905e041f51c$var$ghostEl && $dc7ec905e041f51c$var$matrix($dc7ec905e041f51c$var$ghostEl, true), scaleX = $dc7ec905e041f51c$var$ghostEl && ghostMatrix && ghostMatrix.a, scaleY = $dc7ec905e041f51c$var$ghostEl && ghostMatrix && ghostMatrix.d, relativeScrollOffset = $dc7ec905e041f51c$var$PositionGhostAbsolutely && $dc7ec905e041f51c$var$ghostRelativeParent && $dc7ec905e041f51c$var$getRelativeScrollOffset($dc7ec905e041f51c$var$ghostRelativeParent), dx = (touch.clientX - $dc7ec905e041f51c$var$tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - $dc7ec905e041f51c$var$ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1), dy = (touch.clientY - $dc7ec905e041f51c$var$tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - $dc7ec905e041f51c$var$ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);\n // only set the status to dragging, when we are actually dragging\n if (!$dc7ec905e041f51c$export$31b3ca70d8f57423.active && !$dc7ec905e041f51c$var$awaitingDragStarted) {\n if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) return;\n this._onDragStart(evt, true);\n }\n if ($dc7ec905e041f51c$var$ghostEl) {\n if (ghostMatrix) {\n ghostMatrix.e += dx - ($dc7ec905e041f51c$var$lastDx || 0);\n ghostMatrix.f += dy - ($dc7ec905e041f51c$var$lastDy || 0);\n } else ghostMatrix = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: dx,\n f: dy\n };\n var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"webkitTransform\", cssMatrix);\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"mozTransform\", cssMatrix);\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"msTransform\", cssMatrix);\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"transform\", cssMatrix);\n $dc7ec905e041f51c$var$lastDx = dx;\n $dc7ec905e041f51c$var$lastDy = dy;\n $dc7ec905e041f51c$var$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 (!$dc7ec905e041f51c$var$ghostEl) {\n var container = this.options.fallbackOnBody ? document.body : $dc7ec905e041f51c$var$rootEl, rect = $dc7ec905e041f51c$var$getRect($dc7ec905e041f51c$var$dragEl, true, $dc7ec905e041f51c$var$PositionGhostAbsolutely, true, container), options = this.options;\n // Position absolutely\n if ($dc7ec905e041f51c$var$PositionGhostAbsolutely) {\n // Get relatively positioned parent\n $dc7ec905e041f51c$var$ghostRelativeParent = container;\n while($dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostRelativeParent, \"position\") === \"static\" && $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostRelativeParent, \"transform\") === \"none\" && $dc7ec905e041f51c$var$ghostRelativeParent !== document)$dc7ec905e041f51c$var$ghostRelativeParent = $dc7ec905e041f51c$var$ghostRelativeParent.parentNode;\n if ($dc7ec905e041f51c$var$ghostRelativeParent !== document.body && $dc7ec905e041f51c$var$ghostRelativeParent !== document.documentElement) {\n if ($dc7ec905e041f51c$var$ghostRelativeParent === document) $dc7ec905e041f51c$var$ghostRelativeParent = $dc7ec905e041f51c$var$getWindowScrollingElement();\n rect.top += $dc7ec905e041f51c$var$ghostRelativeParent.scrollTop;\n rect.left += $dc7ec905e041f51c$var$ghostRelativeParent.scrollLeft;\n } else $dc7ec905e041f51c$var$ghostRelativeParent = $dc7ec905e041f51c$var$getWindowScrollingElement();\n $dc7ec905e041f51c$var$ghostRelativeParentInitialScroll = $dc7ec905e041f51c$var$getRelativeScrollOffset($dc7ec905e041f51c$var$ghostRelativeParent);\n }\n $dc7ec905e041f51c$var$ghostEl = $dc7ec905e041f51c$var$dragEl.cloneNode(true);\n $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$ghostEl, options.ghostClass, false);\n $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$ghostEl, options.fallbackClass, true);\n $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$ghostEl, options.dragClass, true);\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"transition\", \"\");\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"transform\", \"\");\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"box-sizing\", \"border-box\");\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"margin\", 0);\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"top\", rect.top);\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"left\", rect.left);\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"width\", rect.width);\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"height\", rect.height);\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"opacity\", \"0.8\");\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"position\", $dc7ec905e041f51c$var$PositionGhostAbsolutely ? \"absolute\" : \"fixed\");\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"zIndex\", \"100000\");\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"pointerEvents\", \"none\");\n $dc7ec905e041f51c$export$31b3ca70d8f57423.ghost = $dc7ec905e041f51c$var$ghostEl;\n container.appendChild($dc7ec905e041f51c$var$ghostEl);\n // Set transform-origin\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$ghostEl, \"transform-origin\", $dc7ec905e041f51c$var$tapDistanceLeft / parseInt($dc7ec905e041f51c$var$ghostEl.style.width) * 100 + \"% \" + $dc7ec905e041f51c$var$tapDistanceTop / parseInt($dc7ec905e041f51c$var$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 $dc7ec905e041f51c$var$pluginEvent(\"dragStart\", this, {\n evt: evt\n });\n if ($dc7ec905e041f51c$export$31b3ca70d8f57423.eventCanceled) {\n this._onDrop();\n return;\n }\n $dc7ec905e041f51c$var$pluginEvent(\"setupClone\", this);\n if (!$dc7ec905e041f51c$export$31b3ca70d8f57423.eventCanceled) {\n $dc7ec905e041f51c$var$cloneEl = $dc7ec905e041f51c$var$clone($dc7ec905e041f51c$var$dragEl);\n $dc7ec905e041f51c$var$cloneEl.removeAttribute(\"id\");\n $dc7ec905e041f51c$var$cloneEl.draggable = false;\n $dc7ec905e041f51c$var$cloneEl.style[\"will-change\"] = \"\";\n this._hideClone();\n $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$cloneEl, this.options.chosenClass, false);\n $dc7ec905e041f51c$export$31b3ca70d8f57423.clone = $dc7ec905e041f51c$var$cloneEl;\n }\n // #1143: IFrame support workaround\n _this.cloneId = $dc7ec905e041f51c$var$_nextTick(function() {\n $dc7ec905e041f51c$var$pluginEvent(\"clone\", _this);\n if ($dc7ec905e041f51c$export$31b3ca70d8f57423.eventCanceled) return;\n if (!_this.options.removeCloneOnHide) $dc7ec905e041f51c$var$rootEl.insertBefore($dc7ec905e041f51c$var$cloneEl, $dc7ec905e041f51c$var$dragEl);\n _this._hideClone();\n $dc7ec905e041f51c$var$_dispatchEvent({\n sortable: _this,\n name: \"clone\"\n });\n });\n !fallback && $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$dragEl, options.dragClass, true);\n // Set proper drop events\n if (fallback) {\n $dc7ec905e041f51c$var$ignoreNextClick = true;\n _this._loopId = setInterval(_this._emulateDragOver, 50);\n } else {\n // Undo what was set in _prepareDragStart before drag started\n $dc7ec905e041f51c$var$off(document, \"mouseup\", _this._onDrop);\n $dc7ec905e041f51c$var$off(document, \"touchend\", _this._onDrop);\n $dc7ec905e041f51c$var$off(document, \"touchcancel\", _this._onDrop);\n if (dataTransfer) {\n dataTransfer.effectAllowed = \"move\";\n options.setData && options.setData.call(_this, dataTransfer, $dc7ec905e041f51c$var$dragEl);\n }\n $dc7ec905e041f51c$var$on(document, \"drop\", _this);\n // #1276 fix:\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$dragEl, \"transform\", \"translateZ(0)\");\n }\n $dc7ec905e041f51c$var$awaitingDragStarted = true;\n _this._dragStartId = $dc7ec905e041f51c$var$_nextTick(_this._dragStarted.bind(_this, fallback, evt));\n $dc7ec905e041f51c$var$on(document, \"selectstart\", _this);\n $dc7ec905e041f51c$var$moved = true;\n if ($dc7ec905e041f51c$var$Safari) $dc7ec905e041f51c$var$css(document.body, \"user-select\", \"none\");\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, target = evt.target, dragRect, targetRect, revert, options = this.options, group = options.group, activeSortable = $dc7ec905e041f51c$export$31b3ca70d8f57423.active, isOwner = $dc7ec905e041f51c$var$activeGroup === group, canSort = options.sort, fromSortable = $dc7ec905e041f51c$var$putSortable || activeSortable, vertical, _this = this, completedFired = false;\n if ($dc7ec905e041f51c$var$_silent) return;\n function dragOverEvent(name, extra) {\n $dc7ec905e041f51c$var$pluginEvent(name, _this, $dc7ec905e041f51c$var$_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 $dc7ec905e041f51c$var$_onMove($dc7ec905e041f51c$var$rootEl, el, $dc7ec905e041f51c$var$dragEl, dragRect, target, $dc7ec905e041f51c$var$getRect(target), evt, after);\n },\n changed: changed\n }, extra));\n }\n // Capture animation state\n function capture() {\n dragOverEvent(\"dragOverAnimationCapture\");\n _this.captureAnimationState();\n if (_this !== fromSortable) fromSortable.captureAnimationState();\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) activeSortable._hideClone();\n else activeSortable._showClone(_this);\n if (_this !== fromSortable) {\n // Set ghost class to new sortable's ghost class\n $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$dragEl, $dc7ec905e041f51c$var$putSortable ? $dc7ec905e041f51c$var$putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$dragEl, options.ghostClass, true);\n }\n if ($dc7ec905e041f51c$var$putSortable !== _this && _this !== $dc7ec905e041f51c$export$31b3ca70d8f57423.active) $dc7ec905e041f51c$var$putSortable = _this;\n else if (_this === $dc7ec905e041f51c$export$31b3ca70d8f57423.active && $dc7ec905e041f51c$var$putSortable) $dc7ec905e041f51c$var$putSortable = null;\n // Animation\n if (fromSortable === _this) _this._ignoreWhileAnimating = target;\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 // Null lastTarget if it is not inside a previously swapped element\n if (target === $dc7ec905e041f51c$var$dragEl && !$dc7ec905e041f51c$var$dragEl.animated || target === el && !target.animated) $dc7ec905e041f51c$var$lastTarget = null;\n // no bubbling and not fallback\n if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n $dc7ec905e041f51c$var$dragEl.parentNode[$dc7ec905e041f51c$var$expando]._isOutsideThisEl(evt.target);\n // Do not detect for empty insert if already inserted\n !insertion && $dc7ec905e041f51c$var$nearestEmptyInsertDetectEvent(evt);\n }\n !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n return completedFired = true;\n }\n // Call when dragEl has been inserted\n function changed() {\n $dc7ec905e041f51c$var$newIndex = $dc7ec905e041f51c$var$index($dc7ec905e041f51c$var$dragEl);\n $dc7ec905e041f51c$var$newDraggableIndex = $dc7ec905e041f51c$var$index($dc7ec905e041f51c$var$dragEl, options.draggable);\n $dc7ec905e041f51c$var$_dispatchEvent({\n sortable: _this,\n name: \"change\",\n toEl: el,\n newIndex: $dc7ec905e041f51c$var$newIndex,\n newDraggableIndex: $dc7ec905e041f51c$var$newDraggableIndex,\n originalEvent: evt\n });\n }\n if (evt.preventDefault !== void 0) evt.cancelable && evt.preventDefault();\n target = $dc7ec905e041f51c$var$closest(target, options.draggable, el, true);\n dragOverEvent(\"dragOver\");\n if ($dc7ec905e041f51c$export$31b3ca70d8f57423.eventCanceled) return completedFired;\n if ($dc7ec905e041f51c$var$dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) return completed(false);\n $dc7ec905e041f51c$var$ignoreNextClick = false;\n if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = $dc7ec905e041f51c$var$parentEl !== $dc7ec905e041f51c$var$rootEl // Reverting item into the original list\n ) : $dc7ec905e041f51c$var$putSortable === this || (this.lastPutMode = $dc7ec905e041f51c$var$activeGroup.checkPull(this, activeSortable, $dc7ec905e041f51c$var$dragEl, evt)) && group.checkPut(this, activeSortable, $dc7ec905e041f51c$var$dragEl, evt))) {\n vertical = this._getDirection(evt, target) === \"vertical\";\n dragRect = $dc7ec905e041f51c$var$getRect($dc7ec905e041f51c$var$dragEl);\n dragOverEvent(\"dragOverValid\");\n if ($dc7ec905e041f51c$export$31b3ca70d8f57423.eventCanceled) return completedFired;\n if (revert) {\n $dc7ec905e041f51c$var$parentEl = $dc7ec905e041f51c$var$rootEl; // actualization\n capture();\n this._hideClone();\n dragOverEvent(\"revert\");\n if (!$dc7ec905e041f51c$export$31b3ca70d8f57423.eventCanceled) {\n if ($dc7ec905e041f51c$var$nextEl) $dc7ec905e041f51c$var$rootEl.insertBefore($dc7ec905e041f51c$var$dragEl, $dc7ec905e041f51c$var$nextEl);\n else $dc7ec905e041f51c$var$rootEl.appendChild($dc7ec905e041f51c$var$dragEl);\n }\n return completed(true);\n }\n var elLastChild = $dc7ec905e041f51c$var$lastChild(el, options.draggable);\n if (!elLastChild || $dc7ec905e041f51c$var$_ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n // Insert to end of list\n // If already at end of list: Do not insert\n if (elLastChild === $dc7ec905e041f51c$var$dragEl) return completed(false);\n // if there is a last element, it is the target\n if (elLastChild && el === evt.target) target = elLastChild;\n if (target) targetRect = $dc7ec905e041f51c$var$getRect(target);\n if ($dc7ec905e041f51c$var$_onMove($dc7ec905e041f51c$var$rootEl, el, $dc7ec905e041f51c$var$dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n capture();\n if (elLastChild && elLastChild.nextSibling) // the last draggable element is not the last node\n el.insertBefore($dc7ec905e041f51c$var$dragEl, elLastChild.nextSibling);\n else el.appendChild($dc7ec905e041f51c$var$dragEl);\n $dc7ec905e041f51c$var$parentEl = el; // actualization\n changed();\n return completed(true);\n }\n } else if (elLastChild && $dc7ec905e041f51c$var$_ghostIsFirst(evt, vertical, this)) {\n // Insert to start of list\n var firstChild = $dc7ec905e041f51c$var$getChild(el, 0, options, true);\n if (firstChild === $dc7ec905e041f51c$var$dragEl) return completed(false);\n target = firstChild;\n targetRect = $dc7ec905e041f51c$var$getRect(target);\n if ($dc7ec905e041f51c$var$_onMove($dc7ec905e041f51c$var$rootEl, el, $dc7ec905e041f51c$var$dragEl, dragRect, target, targetRect, evt, false) !== false) {\n capture();\n el.insertBefore($dc7ec905e041f51c$var$dragEl, firstChild);\n $dc7ec905e041f51c$var$parentEl = el; // actualization\n changed();\n return completed(true);\n }\n } else if (target.parentNode === el) {\n targetRect = $dc7ec905e041f51c$var$getRect(target);\n var direction = 0, targetBeforeFirstSwap, differentLevel = $dc7ec905e041f51c$var$dragEl.parentNode !== el, differentRowCol = !$dc7ec905e041f51c$var$_dragElInRowColumn($dc7ec905e041f51c$var$dragEl.animated && $dc7ec905e041f51c$var$dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical), side1 = vertical ? \"top\" : \"left\", scrolledPastTop = $dc7ec905e041f51c$var$isScrolledPast(target, \"top\", \"top\") || $dc7ec905e041f51c$var$isScrolledPast($dc7ec905e041f51c$var$dragEl, \"top\", \"top\"), scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n if ($dc7ec905e041f51c$var$lastTarget !== target) {\n targetBeforeFirstSwap = targetRect[side1];\n $dc7ec905e041f51c$var$pastFirstInvertThresh = false;\n $dc7ec905e041f51c$var$isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n }\n direction = $dc7ec905e041f51c$var$_getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, $dc7ec905e041f51c$var$isCircumstantialInvert, $dc7ec905e041f51c$var$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 = $dc7ec905e041f51c$var$index($dc7ec905e041f51c$var$dragEl);\n do {\n dragIndex -= direction;\n sibling = $dc7ec905e041f51c$var$parentEl.children[dragIndex];\n }while (sibling && ($dc7ec905e041f51c$var$css(sibling, \"display\") === \"none\" || sibling === $dc7ec905e041f51c$var$ghostEl));\n }\n // If dragEl is already beside target: Do not insert\n if (direction === 0 || sibling === target) return completed(false);\n $dc7ec905e041f51c$var$lastTarget = target;\n $dc7ec905e041f51c$var$lastDirection = direction;\n var nextSibling = target.nextElementSibling, after = false;\n after = direction === 1;\n var moveVector = $dc7ec905e041f51c$var$_onMove($dc7ec905e041f51c$var$rootEl, el, $dc7ec905e041f51c$var$dragEl, dragRect, target, targetRect, evt, after);\n if (moveVector !== false) {\n if (moveVector === 1 || moveVector === -1) after = moveVector === 1;\n $dc7ec905e041f51c$var$_silent = true;\n setTimeout($dc7ec905e041f51c$var$_unsilent, 30);\n capture();\n if (after && !nextSibling) el.appendChild($dc7ec905e041f51c$var$dragEl);\n else target.parentNode.insertBefore($dc7ec905e041f51c$var$dragEl, after ? nextSibling : target);\n // Undo chrome's scroll adjustment (has no effect on other browsers)\n if (scrolledPastTop) $dc7ec905e041f51c$var$scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n $dc7ec905e041f51c$var$parentEl = $dc7ec905e041f51c$var$dragEl.parentNode; // actualization\n // must be done before animation\n if (targetBeforeFirstSwap !== undefined && !$dc7ec905e041f51c$var$isCircumstantialInvert) $dc7ec905e041f51c$var$targetMoveDistance = Math.abs(targetBeforeFirstSwap - $dc7ec905e041f51c$var$getRect(target)[side1]);\n changed();\n return completed(true);\n }\n }\n if (el.contains($dc7ec905e041f51c$var$dragEl)) return completed(false);\n }\n return false;\n },\n _ignoreWhileAnimating: null,\n _offMoveEvents: function _offMoveEvents() {\n $dc7ec905e041f51c$var$off(document, \"mousemove\", this._onTouchMove);\n $dc7ec905e041f51c$var$off(document, \"touchmove\", this._onTouchMove);\n $dc7ec905e041f51c$var$off(document, \"pointermove\", this._onTouchMove);\n $dc7ec905e041f51c$var$off(document, \"dragover\", $dc7ec905e041f51c$var$nearestEmptyInsertDetectEvent);\n $dc7ec905e041f51c$var$off(document, \"mousemove\", $dc7ec905e041f51c$var$nearestEmptyInsertDetectEvent);\n $dc7ec905e041f51c$var$off(document, \"touchmove\", $dc7ec905e041f51c$var$nearestEmptyInsertDetectEvent);\n },\n _offUpEvents: function _offUpEvents() {\n var ownerDocument = this.el.ownerDocument;\n $dc7ec905e041f51c$var$off(ownerDocument, \"mouseup\", this._onDrop);\n $dc7ec905e041f51c$var$off(ownerDocument, \"touchend\", this._onDrop);\n $dc7ec905e041f51c$var$off(ownerDocument, \"pointerup\", this._onDrop);\n $dc7ec905e041f51c$var$off(ownerDocument, \"touchcancel\", this._onDrop);\n $dc7ec905e041f51c$var$off(document, \"selectstart\", this);\n },\n _onDrop: function _onDrop(/**Event*/ evt) {\n var el = this.el, options = this.options;\n // Get the index of the dragged element within its parent\n $dc7ec905e041f51c$var$newIndex = $dc7ec905e041f51c$var$index($dc7ec905e041f51c$var$dragEl);\n $dc7ec905e041f51c$var$newDraggableIndex = $dc7ec905e041f51c$var$index($dc7ec905e041f51c$var$dragEl, options.draggable);\n $dc7ec905e041f51c$var$pluginEvent(\"drop\", this, {\n evt: evt\n });\n $dc7ec905e041f51c$var$parentEl = $dc7ec905e041f51c$var$dragEl && $dc7ec905e041f51c$var$dragEl.parentNode;\n // Get again after plugin event\n $dc7ec905e041f51c$var$newIndex = $dc7ec905e041f51c$var$index($dc7ec905e041f51c$var$dragEl);\n $dc7ec905e041f51c$var$newDraggableIndex = $dc7ec905e041f51c$var$index($dc7ec905e041f51c$var$dragEl, options.draggable);\n if ($dc7ec905e041f51c$export$31b3ca70d8f57423.eventCanceled) {\n this._nulling();\n return;\n }\n $dc7ec905e041f51c$var$awaitingDragStarted = false;\n $dc7ec905e041f51c$var$isCircumstantialInvert = false;\n $dc7ec905e041f51c$var$pastFirstInvertThresh = false;\n clearInterval(this._loopId);\n clearTimeout(this._dragStartTimer);\n $dc7ec905e041f51c$var$_cancelNextTick(this.cloneId);\n $dc7ec905e041f51c$var$_cancelNextTick(this._dragStartId);\n // Unbind events\n if (this.nativeDraggable) {\n $dc7ec905e041f51c$var$off(document, \"drop\", this);\n $dc7ec905e041f51c$var$off(el, \"dragstart\", this._onDragStart);\n }\n this._offMoveEvents();\n this._offUpEvents();\n if ($dc7ec905e041f51c$var$Safari) $dc7ec905e041f51c$var$css(document.body, \"user-select\", \"\");\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$dragEl, \"transform\", \"\");\n if (evt) {\n if ($dc7ec905e041f51c$var$moved) {\n evt.cancelable && evt.preventDefault();\n !options.dropBubble && evt.stopPropagation();\n }\n $dc7ec905e041f51c$var$ghostEl && $dc7ec905e041f51c$var$ghostEl.parentNode && $dc7ec905e041f51c$var$ghostEl.parentNode.removeChild($dc7ec905e041f51c$var$ghostEl);\n if ($dc7ec905e041f51c$var$rootEl === $dc7ec905e041f51c$var$parentEl || $dc7ec905e041f51c$var$putSortable && $dc7ec905e041f51c$var$putSortable.lastPutMode !== \"clone\") // Remove clone(s)\n $dc7ec905e041f51c$var$cloneEl && $dc7ec905e041f51c$var$cloneEl.parentNode && $dc7ec905e041f51c$var$cloneEl.parentNode.removeChild($dc7ec905e041f51c$var$cloneEl);\n if ($dc7ec905e041f51c$var$dragEl) {\n if (this.nativeDraggable) $dc7ec905e041f51c$var$off($dc7ec905e041f51c$var$dragEl, \"dragend\", this);\n $dc7ec905e041f51c$var$_disableDraggable($dc7ec905e041f51c$var$dragEl);\n $dc7ec905e041f51c$var$dragEl.style[\"will-change\"] = \"\";\n // Remove classes\n // ghostClass is added in dragStarted\n if ($dc7ec905e041f51c$var$moved && !$dc7ec905e041f51c$var$awaitingDragStarted) $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$dragEl, $dc7ec905e041f51c$var$putSortable ? $dc7ec905e041f51c$var$putSortable.options.ghostClass : this.options.ghostClass, false);\n $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$dragEl, this.options.chosenClass, false);\n // Drag stop event\n $dc7ec905e041f51c$var$_dispatchEvent({\n sortable: this,\n name: \"unchoose\",\n toEl: $dc7ec905e041f51c$var$parentEl,\n newIndex: null,\n newDraggableIndex: null,\n originalEvent: evt\n });\n if ($dc7ec905e041f51c$var$rootEl !== $dc7ec905e041f51c$var$parentEl) {\n if ($dc7ec905e041f51c$var$newIndex >= 0) {\n // Add event\n $dc7ec905e041f51c$var$_dispatchEvent({\n rootEl: $dc7ec905e041f51c$var$parentEl,\n name: \"add\",\n toEl: $dc7ec905e041f51c$var$parentEl,\n fromEl: $dc7ec905e041f51c$var$rootEl,\n originalEvent: evt\n });\n // Remove event\n $dc7ec905e041f51c$var$_dispatchEvent({\n sortable: this,\n name: \"remove\",\n toEl: $dc7ec905e041f51c$var$parentEl,\n originalEvent: evt\n });\n // drag from one list and drop into another\n $dc7ec905e041f51c$var$_dispatchEvent({\n rootEl: $dc7ec905e041f51c$var$parentEl,\n name: \"sort\",\n toEl: $dc7ec905e041f51c$var$parentEl,\n fromEl: $dc7ec905e041f51c$var$rootEl,\n originalEvent: evt\n });\n $dc7ec905e041f51c$var$_dispatchEvent({\n sortable: this,\n name: \"sort\",\n toEl: $dc7ec905e041f51c$var$parentEl,\n originalEvent: evt\n });\n }\n $dc7ec905e041f51c$var$putSortable && $dc7ec905e041f51c$var$putSortable.save();\n } else {\n if ($dc7ec905e041f51c$var$newIndex !== $dc7ec905e041f51c$var$oldIndex) {\n if ($dc7ec905e041f51c$var$newIndex >= 0) {\n // drag & drop within the same list\n $dc7ec905e041f51c$var$_dispatchEvent({\n sortable: this,\n name: \"update\",\n toEl: $dc7ec905e041f51c$var$parentEl,\n originalEvent: evt\n });\n $dc7ec905e041f51c$var$_dispatchEvent({\n sortable: this,\n name: \"sort\",\n toEl: $dc7ec905e041f51c$var$parentEl,\n originalEvent: evt\n });\n }\n }\n }\n if ($dc7ec905e041f51c$export$31b3ca70d8f57423.active) {\n /* jshint eqnull:true */ if ($dc7ec905e041f51c$var$newIndex == null || $dc7ec905e041f51c$var$newIndex === -1) {\n $dc7ec905e041f51c$var$newIndex = $dc7ec905e041f51c$var$oldIndex;\n $dc7ec905e041f51c$var$newDraggableIndex = $dc7ec905e041f51c$var$oldDraggableIndex;\n }\n $dc7ec905e041f51c$var$_dispatchEvent({\n sortable: this,\n name: \"end\",\n toEl: $dc7ec905e041f51c$var$parentEl,\n originalEvent: evt\n });\n // Save sorting\n this.save();\n }\n }\n }\n this._nulling();\n },\n _nulling: function _nulling() {\n $dc7ec905e041f51c$var$pluginEvent(\"nulling\", this);\n $dc7ec905e041f51c$var$rootEl = $dc7ec905e041f51c$var$dragEl = $dc7ec905e041f51c$var$parentEl = $dc7ec905e041f51c$var$ghostEl = $dc7ec905e041f51c$var$nextEl = $dc7ec905e041f51c$var$cloneEl = $dc7ec905e041f51c$var$lastDownEl = $dc7ec905e041f51c$var$cloneHidden = $dc7ec905e041f51c$var$tapEvt = $dc7ec905e041f51c$var$touchEvt = $dc7ec905e041f51c$var$moved = $dc7ec905e041f51c$var$newIndex = $dc7ec905e041f51c$var$newDraggableIndex = $dc7ec905e041f51c$var$oldIndex = $dc7ec905e041f51c$var$oldDraggableIndex = $dc7ec905e041f51c$var$lastTarget = $dc7ec905e041f51c$var$lastDirection = $dc7ec905e041f51c$var$putSortable = $dc7ec905e041f51c$var$activeGroup = $dc7ec905e041f51c$export$31b3ca70d8f57423.dragged = $dc7ec905e041f51c$export$31b3ca70d8f57423.ghost = $dc7ec905e041f51c$export$31b3ca70d8f57423.clone = $dc7ec905e041f51c$export$31b3ca70d8f57423.active = null;\n $dc7ec905e041f51c$var$savedInputChecked.forEach(function(el) {\n el.checked = true;\n });\n $dc7ec905e041f51c$var$savedInputChecked.length = $dc7ec905e041f51c$var$lastDx = $dc7ec905e041f51c$var$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 ($dc7ec905e041f51c$var$dragEl) {\n this._onDragOver(evt);\n $dc7ec905e041f51c$var$_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 */ toArray: function toArray() {\n var order = [], el, children = this.el.children, i = 0, n = children.length, options = this.options;\n for(; i < n; i++){\n el = children[i];\n if ($dc7ec905e041f51c$var$closest(el, options.draggable, this.el, false)) order.push(el.getAttribute(options.dataIdAttr) || $dc7ec905e041f51c$var$_generateId(el));\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 */ sort: function sort(order, useAnimation) {\n var items = {}, rootEl = this.el;\n this.toArray().forEach(function(id, i) {\n var el = rootEl.children[i];\n if ($dc7ec905e041f51c$var$closest(el, this.options.draggable, rootEl, false)) items[id] = el;\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 */ 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 */ closest: function closest$1(el, selector) {\n return $dc7ec905e041f51c$var$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 */ option: function option(name, value) {\n var options = this.options;\n if (value === void 0) return options[name];\n else {\n var modifiedValue = $dc7ec905e041f51c$var$PluginManager.modifyOption(this, name, value);\n if (typeof modifiedValue !== \"undefined\") options[name] = modifiedValue;\n else options[name] = value;\n if (name === \"group\") $dc7ec905e041f51c$var$_prepareGroup(options);\n }\n },\n /**\r\n * Destroy\r\n */ destroy: function destroy() {\n $dc7ec905e041f51c$var$pluginEvent(\"destroy\", this);\n var el = this.el;\n el[$dc7ec905e041f51c$var$expando] = null;\n $dc7ec905e041f51c$var$off(el, \"mousedown\", this._onTapStart);\n $dc7ec905e041f51c$var$off(el, \"touchstart\", this._onTapStart);\n $dc7ec905e041f51c$var$off(el, \"pointerdown\", this._onTapStart);\n if (this.nativeDraggable) {\n $dc7ec905e041f51c$var$off(el, \"dragover\", this);\n $dc7ec905e041f51c$var$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 $dc7ec905e041f51c$var$sortables.splice($dc7ec905e041f51c$var$sortables.indexOf(this.el), 1);\n this.el = el = null;\n },\n _hideClone: function _hideClone() {\n if (!$dc7ec905e041f51c$var$cloneHidden) {\n $dc7ec905e041f51c$var$pluginEvent(\"hideClone\", this);\n if ($dc7ec905e041f51c$export$31b3ca70d8f57423.eventCanceled) return;\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$cloneEl, \"display\", \"none\");\n if (this.options.removeCloneOnHide && $dc7ec905e041f51c$var$cloneEl.parentNode) $dc7ec905e041f51c$var$cloneEl.parentNode.removeChild($dc7ec905e041f51c$var$cloneEl);\n $dc7ec905e041f51c$var$cloneHidden = true;\n }\n },\n _showClone: function _showClone(putSortable) {\n if (putSortable.lastPutMode !== \"clone\") {\n this._hideClone();\n return;\n }\n if ($dc7ec905e041f51c$var$cloneHidden) {\n $dc7ec905e041f51c$var$pluginEvent(\"showClone\", this);\n if ($dc7ec905e041f51c$export$31b3ca70d8f57423.eventCanceled) return;\n // show clone at dragEl or original position\n if ($dc7ec905e041f51c$var$dragEl.parentNode == $dc7ec905e041f51c$var$rootEl && !this.options.group.revertClone) $dc7ec905e041f51c$var$rootEl.insertBefore($dc7ec905e041f51c$var$cloneEl, $dc7ec905e041f51c$var$dragEl);\n else if ($dc7ec905e041f51c$var$nextEl) $dc7ec905e041f51c$var$rootEl.insertBefore($dc7ec905e041f51c$var$cloneEl, $dc7ec905e041f51c$var$nextEl);\n else $dc7ec905e041f51c$var$rootEl.appendChild($dc7ec905e041f51c$var$cloneEl);\n if (this.options.group.revertClone) this.animate($dc7ec905e041f51c$var$dragEl, $dc7ec905e041f51c$var$cloneEl);\n $dc7ec905e041f51c$var$css($dc7ec905e041f51c$var$cloneEl, \"display\", \"\");\n $dc7ec905e041f51c$var$cloneHidden = false;\n }\n }\n};\nfunction $dc7ec905e041f51c$var$_globalDragOver(/**Event*/ evt) {\n if (evt.dataTransfer) evt.dataTransfer.dropEffect = \"move\";\n evt.cancelable && evt.preventDefault();\n}\nfunction $dc7ec905e041f51c$var$_onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n var evt, sortable = fromEl[$dc7ec905e041f51c$var$expando], onMoveFn = sortable.options.onMove, retVal;\n // Support for new CustomEvent feature\n if (window.CustomEvent && !$dc7ec905e041f51c$var$IE11OrLess && !$dc7ec905e041f51c$var$Edge) 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 || $dc7ec905e041f51c$var$getRect(toEl);\n evt.willInsertAfter = willInsertAfter;\n evt.originalEvent = originalEvent;\n fromEl.dispatchEvent(evt);\n if (onMoveFn) retVal = onMoveFn.call(sortable, evt, originalEvent);\n return retVal;\n}\nfunction $dc7ec905e041f51c$var$_disableDraggable(el) {\n el.draggable = false;\n}\nfunction $dc7ec905e041f51c$var$_unsilent() {\n $dc7ec905e041f51c$var$_silent = false;\n}\nfunction $dc7ec905e041f51c$var$_ghostIsFirst(evt, vertical, sortable) {\n var firstElRect = $dc7ec905e041f51c$var$getRect($dc7ec905e041f51c$var$getChild(sortable.el, 0, sortable.options, true));\n var sortableContentRect = $dc7ec905e041f51c$var$getContentRect(sortable.el);\n var spacer = 10;\n return vertical ? evt.clientX < sortableContentRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < sortableContentRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;\n}\nfunction $dc7ec905e041f51c$var$_ghostIsLast(evt, vertical, sortable) {\n var lastElRect = $dc7ec905e041f51c$var$getRect($dc7ec905e041f51c$var$lastChild(sortable.el, sortable.options.draggable));\n var sortableContentRect = $dc7ec905e041f51c$var$getContentRect(sortable.el);\n var spacer = 10;\n return vertical ? evt.clientX > sortableContentRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > sortableContentRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;\n}\nfunction $dc7ec905e041f51c$var$_getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n var mouseOnAxis = vertical ? evt.clientY : evt.clientX, targetLength = vertical ? targetRect.height : targetRect.width, targetS1 = vertical ? targetRect.top : targetRect.left, targetS2 = vertical ? targetRect.bottom : targetRect.right, 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 && $dc7ec905e041f51c$var$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 (!$dc7ec905e041f51c$var$pastFirstInvertThresh && ($dc7ec905e041f51c$var$lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n $dc7ec905e041f51c$var$pastFirstInvertThresh = true;\n if (!$dc7ec905e041f51c$var$pastFirstInvertThresh) {\n // dragEl shadow (target move distance shadow)\n if ($dc7ec905e041f51c$var$lastDirection === 1 ? mouseOnAxis < targetS1 + $dc7ec905e041f51c$var$targetMoveDistance // over dragEl shadow\n : mouseOnAxis > targetS2 - $dc7ec905e041f51c$var$targetMoveDistance) return -$dc7ec905e041f51c$var$lastDirection;\n } else invert = true;\n } else {\n // Regular\n if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) return $dc7ec905e041f51c$var$_getInsertDirection(target);\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) return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n }\n return 0;\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 */ function $dc7ec905e041f51c$var$_getInsertDirection(target) {\n if ($dc7ec905e041f51c$var$index($dc7ec905e041f51c$var$dragEl) < $dc7ec905e041f51c$var$index(target)) return 1;\n else return -1;\n}\n/**\r\n * Generate id\r\n * @param {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */ function $dc7ec905e041f51c$var$_generateId(el) {\n var str = el.tagName + el.className + el.src + el.href + el.textContent, i = str.length, sum = 0;\n while(i--)sum += str.charCodeAt(i);\n return sum.toString(36);\n}\nfunction $dc7ec905e041f51c$var$_saveInputCheckedState(root) {\n $dc7ec905e041f51c$var$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 && $dc7ec905e041f51c$var$savedInputChecked.push(el);\n }\n}\nfunction $dc7ec905e041f51c$var$_nextTick(fn) {\n return setTimeout(fn, 0);\n}\nfunction $dc7ec905e041f51c$var$_cancelNextTick(id) {\n return clearTimeout(id);\n}\n// Fixed #973:\nif ($dc7ec905e041f51c$var$documentExists) $dc7ec905e041f51c$var$on(document, \"touchmove\", function(evt) {\n if (($dc7ec905e041f51c$export$31b3ca70d8f57423.active || $dc7ec905e041f51c$var$awaitingDragStarted) && evt.cancelable) evt.preventDefault();\n});\n// Export utils\n$dc7ec905e041f51c$export$31b3ca70d8f57423.utils = {\n on: $dc7ec905e041f51c$var$on,\n off: $dc7ec905e041f51c$var$off,\n css: $dc7ec905e041f51c$var$css,\n find: $dc7ec905e041f51c$var$find,\n is: function is(el, selector) {\n return !!$dc7ec905e041f51c$var$closest(el, selector, el, false);\n },\n extend: $dc7ec905e041f51c$var$extend,\n throttle: $dc7ec905e041f51c$var$throttle,\n closest: $dc7ec905e041f51c$var$closest,\n toggleClass: $dc7ec905e041f51c$var$toggleClass,\n clone: $dc7ec905e041f51c$var$clone,\n index: $dc7ec905e041f51c$var$index,\n nextTick: $dc7ec905e041f51c$var$_nextTick,\n cancelNextTick: $dc7ec905e041f51c$var$_cancelNextTick,\n detectDirection: $dc7ec905e041f51c$var$_detectDirection,\n getChild: $dc7ec905e041f51c$var$getChild\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 */ $dc7ec905e041f51c$export$31b3ca70d8f57423.get = function(element) {\n return element[$dc7ec905e041f51c$var$expando];\n};\n/**\r\n * Mount a plugin to Sortable\r\n * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted\r\n */ $dc7ec905e041f51c$export$31b3ca70d8f57423.mount = function() {\n for(var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++)plugins[_key] = arguments[_key];\n if (plugins[0].constructor === Array) plugins = plugins[0];\n plugins.forEach(function(plugin) {\n if (!plugin.prototype || !plugin.prototype.constructor) throw \"Sortable: Mounted plugin must be a constructor function, not \".concat(({}).toString.call(plugin));\n if (plugin.utils) $dc7ec905e041f51c$export$31b3ca70d8f57423.utils = $dc7ec905e041f51c$var$_objectSpread2($dc7ec905e041f51c$var$_objectSpread2({}, $dc7ec905e041f51c$export$31b3ca70d8f57423.utils), plugin.utils);\n $dc7ec905e041f51c$var$PluginManager.mount(plugin);\n });\n};\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */ $dc7ec905e041f51c$export$31b3ca70d8f57423.create = function(el, options) {\n return new $dc7ec905e041f51c$export$31b3ca70d8f57423(el, options);\n};\n// Export\n$dc7ec905e041f51c$export$31b3ca70d8f57423.version = $dc7ec905e041f51c$var$version;\nvar $dc7ec905e041f51c$var$autoScrolls = [], $dc7ec905e041f51c$var$scrollEl, $dc7ec905e041f51c$var$scrollRootEl, $dc7ec905e041f51c$var$scrolling = false, $dc7ec905e041f51c$var$lastAutoScrollX, $dc7ec905e041f51c$var$lastAutoScrollY, $dc7ec905e041f51c$var$touchEvt$1, $dc7ec905e041f51c$var$pointerElemChangedInterval;\nfunction $dc7ec905e041f51c$var$AutoScrollPlugin() {\n function AutoScroll() {\n this.defaults = {\n scroll: true,\n forceAutoScrollFallback: false,\n scrollSensitivity: 30,\n scrollSpeed: 10,\n bubbleScroll: true\n };\n // Bind all private methods\n for(var fn in this)if (fn.charAt(0) === \"_\" && typeof this[fn] === \"function\") this[fn] = this[fn].bind(this);\n }\n AutoScroll.prototype = {\n dragStarted: function dragStarted(_ref) {\n var originalEvent = _ref.originalEvent;\n if (this.sortable.nativeDraggable) $dc7ec905e041f51c$var$on(document, \"dragover\", this._handleAutoScroll);\n else {\n if (this.options.supportPointer) $dc7ec905e041f51c$var$on(document, \"pointermove\", this._handleFallbackAutoScroll);\n else if (originalEvent.touches) $dc7ec905e041f51c$var$on(document, \"touchmove\", this._handleFallbackAutoScroll);\n else $dc7ec905e041f51c$var$on(document, \"mousemove\", this._handleFallbackAutoScroll);\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) this._handleAutoScroll(originalEvent);\n },\n drop: function drop() {\n if (this.sortable.nativeDraggable) $dc7ec905e041f51c$var$off(document, \"dragover\", this._handleAutoScroll);\n else {\n $dc7ec905e041f51c$var$off(document, \"pointermove\", this._handleFallbackAutoScroll);\n $dc7ec905e041f51c$var$off(document, \"touchmove\", this._handleFallbackAutoScroll);\n $dc7ec905e041f51c$var$off(document, \"mousemove\", this._handleFallbackAutoScroll);\n }\n $dc7ec905e041f51c$var$clearPointerElemChangedInterval();\n $dc7ec905e041f51c$var$clearAutoScrolls();\n $dc7ec905e041f51c$var$cancelThrottle();\n },\n nulling: function nulling() {\n $dc7ec905e041f51c$var$touchEvt$1 = $dc7ec905e041f51c$var$scrollRootEl = $dc7ec905e041f51c$var$scrollEl = $dc7ec905e041f51c$var$scrolling = $dc7ec905e041f51c$var$pointerElemChangedInterval = $dc7ec905e041f51c$var$lastAutoScrollX = $dc7ec905e041f51c$var$lastAutoScrollY = null;\n $dc7ec905e041f51c$var$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, y = (evt.touches ? evt.touches[0] : evt).clientY, elem = document.elementFromPoint(x, y);\n $dc7ec905e041f51c$var$touchEvt$1 = evt;\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 || $dc7ec905e041f51c$var$Edge || $dc7ec905e041f51c$var$IE11OrLess || $dc7ec905e041f51c$var$Safari) {\n $dc7ec905e041f51c$var$autoScroll(evt, this.options, elem, fallback);\n // Listener for pointer element change\n var ogElemScroller = $dc7ec905e041f51c$var$getParentAutoScrollElement(elem, true);\n if ($dc7ec905e041f51c$var$scrolling && (!$dc7ec905e041f51c$var$pointerElemChangedInterval || x !== $dc7ec905e041f51c$var$lastAutoScrollX || y !== $dc7ec905e041f51c$var$lastAutoScrollY)) {\n $dc7ec905e041f51c$var$pointerElemChangedInterval && $dc7ec905e041f51c$var$clearPointerElemChangedInterval();\n // Detect for pointer elem change, emulating native DnD behaviour\n $dc7ec905e041f51c$var$pointerElemChangedInterval = setInterval(function() {\n var newElem = $dc7ec905e041f51c$var$getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n if (newElem !== ogElemScroller) {\n ogElemScroller = newElem;\n $dc7ec905e041f51c$var$clearAutoScrolls();\n }\n $dc7ec905e041f51c$var$autoScroll(evt, _this.options, newElem, fallback);\n }, 10);\n $dc7ec905e041f51c$var$lastAutoScrollX = x;\n $dc7ec905e041f51c$var$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 || $dc7ec905e041f51c$var$getParentAutoScrollElement(elem, true) === $dc7ec905e041f51c$var$getWindowScrollingElement()) {\n $dc7ec905e041f51c$var$clearAutoScrolls();\n return;\n }\n $dc7ec905e041f51c$var$autoScroll(evt, this.options, $dc7ec905e041f51c$var$getParentAutoScrollElement(elem, false), false);\n }\n }\n };\n return $dc7ec905e041f51c$var$_extends(AutoScroll, {\n pluginName: \"scroll\",\n initializeByDefault: true\n });\n}\nfunction $dc7ec905e041f51c$var$clearAutoScrolls() {\n $dc7ec905e041f51c$var$autoScrolls.forEach(function(autoScroll) {\n clearInterval(autoScroll.pid);\n });\n $dc7ec905e041f51c$var$autoScrolls = [];\n}\nfunction $dc7ec905e041f51c$var$clearPointerElemChangedInterval() {\n clearInterval($dc7ec905e041f51c$var$pointerElemChangedInterval);\n}\nvar $dc7ec905e041f51c$var$autoScroll = $dc7ec905e041f51c$var$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, y = (evt.touches ? evt.touches[0] : evt).clientY, sens = options.scrollSensitivity, speed = options.scrollSpeed, winScroller = $dc7ec905e041f51c$var$getWindowScrollingElement();\n var scrollThisInstance = false, scrollCustomFn;\n // New scroll root, set scrollEl\n if ($dc7ec905e041f51c$var$scrollRootEl !== rootEl) {\n $dc7ec905e041f51c$var$scrollRootEl = rootEl;\n $dc7ec905e041f51c$var$clearAutoScrolls();\n $dc7ec905e041f51c$var$scrollEl = options.scroll;\n scrollCustomFn = options.scrollFn;\n if ($dc7ec905e041f51c$var$scrollEl === true) $dc7ec905e041f51c$var$scrollEl = $dc7ec905e041f51c$var$getParentAutoScrollElement(rootEl, true);\n }\n var layersOut = 0;\n var currentParent = $dc7ec905e041f51c$var$scrollEl;\n do {\n var el = currentParent, rect = $dc7ec905e041f51c$var$getRect(el), top = rect.top, bottom = rect.bottom, left = rect.left, right = rect.right, width = rect.width, height = rect.height, canScrollX = void 0, canScrollY = void 0, scrollWidth = el.scrollWidth, scrollHeight = el.scrollHeight, elCSS = $dc7ec905e041f51c$var$css(el), scrollPosX = el.scrollLeft, 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 (!$dc7ec905e041f51c$var$autoScrolls[layersOut]) {\n for(var i = 0; i <= layersOut; i++)if (!$dc7ec905e041f51c$var$autoScrolls[i]) $dc7ec905e041f51c$var$autoScrolls[i] = {};\n }\n if ($dc7ec905e041f51c$var$autoScrolls[layersOut].vx != vx || $dc7ec905e041f51c$var$autoScrolls[layersOut].vy != vy || $dc7ec905e041f51c$var$autoScrolls[layersOut].el !== el) {\n $dc7ec905e041f51c$var$autoScrolls[layersOut].el = el;\n $dc7ec905e041f51c$var$autoScrolls[layersOut].vx = vx;\n $dc7ec905e041f51c$var$autoScrolls[layersOut].vy = vy;\n clearInterval($dc7ec905e041f51c$var$autoScrolls[layersOut].pid);\n if (vx != 0 || vy != 0) {\n scrollThisInstance = true;\n /* jshint loopfunc:true */ $dc7ec905e041f51c$var$autoScrolls[layersOut].pid = setInterval((function() {\n // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n if (isFallback && this.layer === 0) $dc7ec905e041f51c$export$31b3ca70d8f57423.active._onTouchMove($dc7ec905e041f51c$var$touchEvt$1); // To move ghost if it is positioned absolutely\n var scrollOffsetY = $dc7ec905e041f51c$var$autoScrolls[this.layer].vy ? $dc7ec905e041f51c$var$autoScrolls[this.layer].vy * speed : 0;\n var scrollOffsetX = $dc7ec905e041f51c$var$autoScrolls[this.layer].vx ? $dc7ec905e041f51c$var$autoScrolls[this.layer].vx * speed : 0;\n if (typeof scrollCustomFn === \"function\") {\n if (scrollCustomFn.call($dc7ec905e041f51c$export$31b3ca70d8f57423.dragged.parentNode[$dc7ec905e041f51c$var$expando], scrollOffsetX, scrollOffsetY, evt, $dc7ec905e041f51c$var$touchEvt$1, $dc7ec905e041f51c$var$autoScrolls[this.layer].el) !== \"continue\") return;\n }\n $dc7ec905e041f51c$var$scrollBy($dc7ec905e041f51c$var$autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n }).bind({\n layer: layersOut\n }), 24);\n }\n }\n layersOut++;\n }while (options.bubbleScroll && currentParent !== winScroller && (currentParent = $dc7ec905e041f51c$var$getParentAutoScrollElement(currentParent, false)));\n $dc7ec905e041f51c$var$scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\nvar $dc7ec905e041f51c$var$drop = function drop(_ref) {\n var originalEvent = _ref.originalEvent, putSortable = _ref.putSortable, dragEl = _ref.dragEl, activeSortable = _ref.activeSortable, dispatchSortableEvent = _ref.dispatchSortableEvent, hideGhostForTarget = _ref.hideGhostForTarget, 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 $dc7ec905e041f51c$var$Revert() {}\n$dc7ec905e041f51c$var$Revert.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, putSortable = _ref3.putSortable;\n this.sortable.captureAnimationState();\n if (putSortable) putSortable.captureAnimationState();\n var nextSibling = $dc7ec905e041f51c$var$getChild(this.sortable.el, this.startIndex, this.options);\n if (nextSibling) this.sortable.el.insertBefore(dragEl, nextSibling);\n else this.sortable.el.appendChild(dragEl);\n this.sortable.animateAll();\n if (putSortable) putSortable.animateAll();\n },\n drop: $dc7ec905e041f51c$var$drop\n};\n$dc7ec905e041f51c$var$_extends($dc7ec905e041f51c$var$Revert, {\n pluginName: \"revertOnSpill\"\n});\nfunction $dc7ec905e041f51c$var$Remove() {}\n$dc7ec905e041f51c$var$Remove.prototype = {\n onSpill: function onSpill(_ref4) {\n var dragEl = _ref4.dragEl, 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: $dc7ec905e041f51c$var$drop\n};\n$dc7ec905e041f51c$var$_extends($dc7ec905e041f51c$var$Remove, {\n pluginName: \"removeOnSpill\"\n});\nvar $dc7ec905e041f51c$var$lastSwapEl;\nfunction $dc7ec905e041f51c$export$bdb5f0a1b77546f4() {\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 $dc7ec905e041f51c$var$lastSwapEl = dragEl;\n },\n dragOverValid: function dragOverValid(_ref2) {\n var completed = _ref2.completed, target = _ref2.target, onMove = _ref2.onMove, activeSortable = _ref2.activeSortable, changed = _ref2.changed, cancel = _ref2.cancel;\n if (!activeSortable.options.swap) return;\n var el = this.sortable.el, options = this.options;\n if (target && target !== el) {\n var prevSwapEl = $dc7ec905e041f51c$var$lastSwapEl;\n if (onMove(target) !== false) {\n $dc7ec905e041f51c$var$toggleClass(target, options.swapClass, true);\n $dc7ec905e041f51c$var$lastSwapEl = target;\n } else $dc7ec905e041f51c$var$lastSwapEl = null;\n if (prevSwapEl && prevSwapEl !== $dc7ec905e041f51c$var$lastSwapEl) $dc7ec905e041f51c$var$toggleClass(prevSwapEl, options.swapClass, false);\n }\n changed();\n completed(true);\n cancel();\n },\n drop: function drop(_ref3) {\n var activeSortable = _ref3.activeSortable, putSortable = _ref3.putSortable, dragEl = _ref3.dragEl;\n var toSortable = putSortable || this.sortable;\n var options = this.options;\n $dc7ec905e041f51c$var$lastSwapEl && $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$lastSwapEl, options.swapClass, false);\n if ($dc7ec905e041f51c$var$lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n if (dragEl !== $dc7ec905e041f51c$var$lastSwapEl) {\n toSortable.captureAnimationState();\n if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n $dc7ec905e041f51c$var$swapNodes(dragEl, $dc7ec905e041f51c$var$lastSwapEl);\n toSortable.animateAll();\n if (toSortable !== activeSortable) activeSortable.animateAll();\n }\n }\n },\n nulling: function nulling() {\n $dc7ec905e041f51c$var$lastSwapEl = null;\n }\n };\n return $dc7ec905e041f51c$var$_extends(Swap, {\n pluginName: \"swap\",\n eventProperties: function eventProperties() {\n return {\n swapItem: $dc7ec905e041f51c$var$lastSwapEl\n };\n }\n });\n}\nfunction $dc7ec905e041f51c$var$swapNodes(n1, n2) {\n var p1 = n1.parentNode, p2 = n2.parentNode, i1, i2;\n if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n i1 = $dc7ec905e041f51c$var$index(n1);\n i2 = $dc7ec905e041f51c$var$index(n2);\n if (p1.isEqualNode(p2) && i1 < i2) i2++;\n p1.insertBefore(n2, p1.children[i1]);\n p2.insertBefore(n1, p2.children[i2]);\n}\nvar $dc7ec905e041f51c$var$multiDragElements = [], $dc7ec905e041f51c$var$multiDragClones = [], $dc7ec905e041f51c$var$lastMultiDragSelect, // for selection with modifier key down (SHIFT)\n$dc7ec905e041f51c$var$multiDragSortable, $dc7ec905e041f51c$var$initialFolding = false, // Initial multi-drag fold when drag started\n$dc7ec905e041f51c$var$folding = false, // Folding any other time\n$dc7ec905e041f51c$var$dragStarted = false, $dc7ec905e041f51c$var$dragEl$1, $dc7ec905e041f51c$var$clonesFromRect, $dc7ec905e041f51c$var$clonesHidden;\nfunction $dc7ec905e041f51c$export$18e5d2a5d1df842d() {\n function MultiDrag(sortable) {\n // Bind all private methods\n for(var fn in this)if (fn.charAt(0) === \"_\" && typeof this[fn] === \"function\") this[fn] = this[fn].bind(this);\n if (!sortable.options.avoidImplicitDeselect) {\n if (sortable.options.supportPointer) $dc7ec905e041f51c$var$on(document, \"pointerup\", this._deselectMultiDrag);\n else {\n $dc7ec905e041f51c$var$on(document, \"mouseup\", this._deselectMultiDrag);\n $dc7ec905e041f51c$var$on(document, \"touchend\", this._deselectMultiDrag);\n }\n }\n $dc7ec905e041f51c$var$on(document, \"keydown\", this._checkKeyDown);\n $dc7ec905e041f51c$var$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 ($dc7ec905e041f51c$var$multiDragElements.length && $dc7ec905e041f51c$var$multiDragSortable === sortable) $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement, i) {\n data += (!i ? \"\" : \", \") + multiDragElement.textContent;\n });\n else data = dragEl.textContent;\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 $dc7ec905e041f51c$var$dragEl$1 = dragged;\n },\n delayEnded: function delayEnded() {\n this.isMultiDrag = ~$dc7ec905e041f51c$var$multiDragElements.indexOf($dc7ec905e041f51c$var$dragEl$1);\n },\n setupClone: function setupClone(_ref2) {\n var sortable = _ref2.sortable, cancel = _ref2.cancel;\n if (!this.isMultiDrag) return;\n for(var i = 0; i < $dc7ec905e041f51c$var$multiDragElements.length; i++){\n $dc7ec905e041f51c$var$multiDragClones.push($dc7ec905e041f51c$var$clone($dc7ec905e041f51c$var$multiDragElements[i]));\n $dc7ec905e041f51c$var$multiDragClones[i].sortableIndex = $dc7ec905e041f51c$var$multiDragElements[i].sortableIndex;\n $dc7ec905e041f51c$var$multiDragClones[i].draggable = false;\n $dc7ec905e041f51c$var$multiDragClones[i].style[\"will-change\"] = \"\";\n $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$multiDragClones[i], this.options.selectedClass, false);\n $dc7ec905e041f51c$var$multiDragElements[i] === $dc7ec905e041f51c$var$dragEl$1 && $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$multiDragClones[i], this.options.chosenClass, false);\n }\n sortable._hideClone();\n cancel();\n },\n clone: function clone(_ref3) {\n var sortable = _ref3.sortable, rootEl = _ref3.rootEl, dispatchSortableEvent = _ref3.dispatchSortableEvent, cancel = _ref3.cancel;\n if (!this.isMultiDrag) return;\n if (!this.options.removeCloneOnHide) {\n if ($dc7ec905e041f51c$var$multiDragElements.length && $dc7ec905e041f51c$var$multiDragSortable === sortable) {\n $dc7ec905e041f51c$var$insertMultiDragClones(true, rootEl);\n dispatchSortableEvent(\"clone\");\n cancel();\n }\n }\n },\n showClone: function showClone(_ref4) {\n var cloneNowShown = _ref4.cloneNowShown, rootEl = _ref4.rootEl, cancel = _ref4.cancel;\n if (!this.isMultiDrag) return;\n $dc7ec905e041f51c$var$insertMultiDragClones(false, rootEl);\n $dc7ec905e041f51c$var$multiDragClones.forEach(function(clone) {\n $dc7ec905e041f51c$var$css(clone, \"display\", \"\");\n });\n cloneNowShown();\n $dc7ec905e041f51c$var$clonesHidden = false;\n cancel();\n },\n hideClone: function hideClone(_ref5) {\n var _this = this;\n var sortable = _ref5.sortable, cloneNowHidden = _ref5.cloneNowHidden, cancel = _ref5.cancel;\n if (!this.isMultiDrag) return;\n $dc7ec905e041f51c$var$multiDragClones.forEach(function(clone) {\n $dc7ec905e041f51c$var$css(clone, \"display\", \"none\");\n if (_this.options.removeCloneOnHide && clone.parentNode) clone.parentNode.removeChild(clone);\n });\n cloneNowHidden();\n $dc7ec905e041f51c$var$clonesHidden = true;\n cancel();\n },\n dragStartGlobal: function dragStartGlobal(_ref6) {\n var sortable = _ref6.sortable;\n if (!this.isMultiDrag && $dc7ec905e041f51c$var$multiDragSortable) $dc7ec905e041f51c$var$multiDragSortable.multiDrag._deselectMultiDrag();\n $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement) {\n multiDragElement.sortableIndex = $dc7ec905e041f51c$var$index(multiDragElement);\n });\n // Sort multi-drag elements\n $dc7ec905e041f51c$var$multiDragElements = $dc7ec905e041f51c$var$multiDragElements.sort(function(a, b) {\n return a.sortableIndex - b.sortableIndex;\n });\n $dc7ec905e041f51c$var$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 sortable.captureAnimationState();\n if (this.options.animation) {\n $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement) {\n if (multiDragElement === $dc7ec905e041f51c$var$dragEl$1) return;\n $dc7ec905e041f51c$var$css(multiDragElement, \"position\", \"absolute\");\n });\n var dragRect = $dc7ec905e041f51c$var$getRect($dc7ec905e041f51c$var$dragEl$1, false, true, true);\n $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement) {\n if (multiDragElement === $dc7ec905e041f51c$var$dragEl$1) return;\n $dc7ec905e041f51c$var$setRect(multiDragElement, dragRect);\n });\n $dc7ec905e041f51c$var$folding = true;\n $dc7ec905e041f51c$var$initialFolding = true;\n }\n }\n sortable.animateAll(function() {\n $dc7ec905e041f51c$var$folding = false;\n $dc7ec905e041f51c$var$initialFolding = false;\n if (_this2.options.animation) $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement) {\n $dc7ec905e041f51c$var$unsetRect(multiDragElement);\n });\n // Remove all auxiliary multidrag items from el, if sorting enabled\n if (_this2.options.sort) $dc7ec905e041f51c$var$removeMultiDragElements();\n });\n },\n dragOver: function dragOver(_ref8) {\n var target = _ref8.target, completed = _ref8.completed, cancel = _ref8.cancel;\n if ($dc7ec905e041f51c$var$folding && ~$dc7ec905e041f51c$var$multiDragElements.indexOf(target)) {\n completed(false);\n cancel();\n }\n },\n revert: function revert(_ref9) {\n var fromSortable = _ref9.fromSortable, rootEl = _ref9.rootEl, sortable = _ref9.sortable, dragRect = _ref9.dragRect;\n if ($dc7ec905e041f51c$var$multiDragElements.length > 1) {\n // Setup unfold animation\n $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement) {\n sortable.addAnimationState({\n target: multiDragElement,\n rect: $dc7ec905e041f51c$var$folding ? $dc7ec905e041f51c$var$getRect(multiDragElement) : dragRect\n });\n $dc7ec905e041f51c$var$unsetRect(multiDragElement);\n multiDragElement.fromRect = dragRect;\n fromSortable.removeAnimationState(multiDragElement);\n });\n $dc7ec905e041f51c$var$folding = false;\n $dc7ec905e041f51c$var$insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref10) {\n var sortable = _ref10.sortable, isOwner = _ref10.isOwner, insertion = _ref10.insertion, activeSortable = _ref10.activeSortable, parentEl = _ref10.parentEl, 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) activeSortable._hideClone();\n $dc7ec905e041f51c$var$initialFolding = false;\n // If leaving sort:false root, or already folding - Fold to new location\n if (options.animation && $dc7ec905e041f51c$var$multiDragElements.length > 1 && ($dc7ec905e041f51c$var$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 = $dc7ec905e041f51c$var$getRect($dc7ec905e041f51c$var$dragEl$1, false, true, true);\n $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement) {\n if (multiDragElement === $dc7ec905e041f51c$var$dragEl$1) return;\n $dc7ec905e041f51c$var$setRect(multiDragElement, dragRectAbsolute);\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 $dc7ec905e041f51c$var$folding = true;\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 (!$dc7ec905e041f51c$var$folding) $dc7ec905e041f51c$var$removeMultiDragElements();\n if ($dc7ec905e041f51c$var$multiDragElements.length > 1) {\n var clonesHiddenBefore = $dc7ec905e041f51c$var$clonesHidden;\n activeSortable._showClone(sortable);\n // Unfold animation for clones if showing from hidden\n if (activeSortable.options.animation && !$dc7ec905e041f51c$var$clonesHidden && clonesHiddenBefore) $dc7ec905e041f51c$var$multiDragClones.forEach(function(clone) {\n activeSortable.addAnimationState({\n target: clone,\n rect: $dc7ec905e041f51c$var$clonesFromRect\n });\n clone.fromRect = $dc7ec905e041f51c$var$clonesFromRect;\n clone.thisAnimationDuration = null;\n });\n } else activeSortable._showClone(sortable);\n }\n }\n },\n dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n var dragRect = _ref11.dragRect, isOwner = _ref11.isOwner, activeSortable = _ref11.activeSortable;\n $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n });\n if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n $dc7ec905e041f51c$var$clonesFromRect = $dc7ec905e041f51c$var$_extends({}, dragRect);\n var dragMatrix = $dc7ec905e041f51c$var$matrix($dc7ec905e041f51c$var$dragEl$1, true);\n $dc7ec905e041f51c$var$clonesFromRect.top -= dragMatrix.f;\n $dc7ec905e041f51c$var$clonesFromRect.left -= dragMatrix.e;\n }\n },\n dragOverAnimationComplete: function dragOverAnimationComplete() {\n if ($dc7ec905e041f51c$var$folding) {\n $dc7ec905e041f51c$var$folding = false;\n $dc7ec905e041f51c$var$removeMultiDragElements();\n }\n },\n drop: function drop(_ref12) {\n var evt = _ref12.originalEvent, rootEl = _ref12.rootEl, parentEl = _ref12.parentEl, sortable = _ref12.sortable, dispatchSortableEvent = _ref12.dispatchSortableEvent, oldIndex = _ref12.oldIndex, putSortable = _ref12.putSortable;\n var toSortable = putSortable || this.sortable;\n if (!evt) return;\n var options = this.options, children = parentEl.children;\n // Multi-drag selection\n if (!$dc7ec905e041f51c$var$dragStarted) {\n if (options.multiDragKey && !this.multiDragKeyDown) this._deselectMultiDrag();\n $dc7ec905e041f51c$var$toggleClass($dc7ec905e041f51c$var$dragEl$1, options.selectedClass, !~$dc7ec905e041f51c$var$multiDragElements.indexOf($dc7ec905e041f51c$var$dragEl$1));\n if (!~$dc7ec905e041f51c$var$multiDragElements.indexOf($dc7ec905e041f51c$var$dragEl$1)) {\n $dc7ec905e041f51c$var$multiDragElements.push($dc7ec905e041f51c$var$dragEl$1);\n $dc7ec905e041f51c$var$dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: \"select\",\n targetEl: $dc7ec905e041f51c$var$dragEl$1,\n originalEvent: evt\n });\n // Modifier activated, select from last to dragEl\n if (evt.shiftKey && $dc7ec905e041f51c$var$lastMultiDragSelect && sortable.el.contains($dc7ec905e041f51c$var$lastMultiDragSelect)) {\n var lastIndex = $dc7ec905e041f51c$var$index($dc7ec905e041f51c$var$lastMultiDragSelect), currentIndex = $dc7ec905e041f51c$var$index($dc7ec905e041f51c$var$dragEl$1);\n if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\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 for(; i < n; i++){\n if (~$dc7ec905e041f51c$var$multiDragElements.indexOf(children[i])) continue;\n $dc7ec905e041f51c$var$toggleClass(children[i], options.selectedClass, true);\n $dc7ec905e041f51c$var$multiDragElements.push(children[i]);\n $dc7ec905e041f51c$var$dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: \"select\",\n targetEl: children[i],\n originalEvent: evt\n });\n }\n }\n } else $dc7ec905e041f51c$var$lastMultiDragSelect = $dc7ec905e041f51c$var$dragEl$1;\n $dc7ec905e041f51c$var$multiDragSortable = toSortable;\n } else {\n $dc7ec905e041f51c$var$multiDragElements.splice($dc7ec905e041f51c$var$multiDragElements.indexOf($dc7ec905e041f51c$var$dragEl$1), 1);\n $dc7ec905e041f51c$var$lastMultiDragSelect = null;\n $dc7ec905e041f51c$var$dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: \"deselect\",\n targetEl: $dc7ec905e041f51c$var$dragEl$1,\n originalEvent: evt\n });\n }\n }\n // Multi-drag drop\n if ($dc7ec905e041f51c$var$dragStarted && this.isMultiDrag) {\n $dc7ec905e041f51c$var$folding = false;\n // Do not \"unfold\" after around dragEl if reverted\n if ((parentEl[$dc7ec905e041f51c$var$expando].options.sort || parentEl !== rootEl) && $dc7ec905e041f51c$var$multiDragElements.length > 1) {\n var dragRect = $dc7ec905e041f51c$var$getRect($dc7ec905e041f51c$var$dragEl$1), multiDragIndex = $dc7ec905e041f51c$var$index($dc7ec905e041f51c$var$dragEl$1, \":not(.\" + this.options.selectedClass + \")\");\n if (!$dc7ec905e041f51c$var$initialFolding && options.animation) $dc7ec905e041f51c$var$dragEl$1.thisAnimationDuration = null;\n toSortable.captureAnimationState();\n if (!$dc7ec905e041f51c$var$initialFolding) {\n if (options.animation) {\n $dc7ec905e041f51c$var$dragEl$1.fromRect = dragRect;\n $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n if (multiDragElement !== $dc7ec905e041f51c$var$dragEl$1) {\n var rect = $dc7ec905e041f51c$var$folding ? $dc7ec905e041f51c$var$getRect(multiDragElement) : dragRect;\n multiDragElement.fromRect = rect;\n // Prepare unfold animation\n toSortable.addAnimationState({\n target: multiDragElement,\n rect: rect\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 $dc7ec905e041f51c$var$removeMultiDragElements();\n $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement) {\n if (children[multiDragIndex]) parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n else parentEl.appendChild(multiDragElement);\n multiDragIndex++;\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 === $dc7ec905e041f51c$var$index($dc7ec905e041f51c$var$dragEl$1)) {\n var update = false;\n $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement) {\n if (multiDragElement.sortableIndex !== $dc7ec905e041f51c$var$index(multiDragElement)) {\n update = true;\n return;\n }\n });\n if (update) {\n dispatchSortableEvent(\"update\");\n dispatchSortableEvent(\"sort\");\n }\n }\n }\n // Must be done after capturing individual rects (scroll bar)\n $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement) {\n $dc7ec905e041f51c$var$unsetRect(multiDragElement);\n });\n toSortable.animateAll();\n }\n $dc7ec905e041f51c$var$multiDragSortable = toSortable;\n }\n // Remove clones if necessary\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== \"clone\") $dc7ec905e041f51c$var$multiDragClones.forEach(function(clone) {\n clone.parentNode && clone.parentNode.removeChild(clone);\n });\n },\n nullingGlobal: function nullingGlobal() {\n this.isMultiDrag = $dc7ec905e041f51c$var$dragStarted = false;\n $dc7ec905e041f51c$var$multiDragClones.length = 0;\n },\n destroyGlobal: function destroyGlobal() {\n this._deselectMultiDrag();\n $dc7ec905e041f51c$var$off(document, \"pointerup\", this._deselectMultiDrag);\n $dc7ec905e041f51c$var$off(document, \"mouseup\", this._deselectMultiDrag);\n $dc7ec905e041f51c$var$off(document, \"touchend\", this._deselectMultiDrag);\n $dc7ec905e041f51c$var$off(document, \"keydown\", this._checkKeyDown);\n $dc7ec905e041f51c$var$off(document, \"keyup\", this._checkKeyUp);\n },\n _deselectMultiDrag: function _deselectMultiDrag(evt) {\n if (typeof $dc7ec905e041f51c$var$dragStarted !== \"undefined\" && $dc7ec905e041f51c$var$dragStarted) return;\n // Only deselect if selection is in this sortable\n if ($dc7ec905e041f51c$var$multiDragSortable !== this.sortable) return;\n // Only deselect if target is not item in this sortable\n if (evt && $dc7ec905e041f51c$var$closest(evt.target, this.options.draggable, this.sortable.el, false)) return;\n // Only deselect if left click\n if (evt && evt.button !== 0) return;\n while($dc7ec905e041f51c$var$multiDragElements.length){\n var el = $dc7ec905e041f51c$var$multiDragElements[0];\n $dc7ec905e041f51c$var$toggleClass(el, this.options.selectedClass, false);\n $dc7ec905e041f51c$var$multiDragElements.shift();\n $dc7ec905e041f51c$var$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) this.multiDragKeyDown = true;\n },\n _checkKeyUp: function _checkKeyUp(evt) {\n if (evt.key === this.options.multiDragKey) this.multiDragKeyDown = false;\n }\n };\n return $dc7ec905e041f51c$var$_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 */ select: function select(el) {\n var sortable = el.parentNode[$dc7ec905e041f51c$var$expando];\n if (!sortable || !sortable.options.multiDrag || ~$dc7ec905e041f51c$var$multiDragElements.indexOf(el)) return;\n if ($dc7ec905e041f51c$var$multiDragSortable && $dc7ec905e041f51c$var$multiDragSortable !== sortable) {\n $dc7ec905e041f51c$var$multiDragSortable.multiDrag._deselectMultiDrag();\n $dc7ec905e041f51c$var$multiDragSortable = sortable;\n }\n $dc7ec905e041f51c$var$toggleClass(el, sortable.options.selectedClass, true);\n $dc7ec905e041f51c$var$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 */ deselect: function deselect(el) {\n var sortable = el.parentNode[$dc7ec905e041f51c$var$expando], index = $dc7ec905e041f51c$var$multiDragElements.indexOf(el);\n if (!sortable || !sortable.options.multiDrag || !~index) return;\n $dc7ec905e041f51c$var$toggleClass(el, sortable.options.selectedClass, false);\n $dc7ec905e041f51c$var$multiDragElements.splice(index, 1);\n }\n },\n eventProperties: function eventProperties() {\n var _this3 = this;\n var oldIndicies = [], newIndicies = [];\n $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement) {\n oldIndicies.push({\n multiDragElement: multiDragElement,\n index: multiDragElement.sortableIndex\n });\n // multiDragElements will already be sorted if folding\n var newIndex;\n if ($dc7ec905e041f51c$var$folding && multiDragElement !== $dc7ec905e041f51c$var$dragEl$1) newIndex = -1;\n else if ($dc7ec905e041f51c$var$folding) newIndex = $dc7ec905e041f51c$var$index(multiDragElement, \":not(.\" + _this3.options.selectedClass + \")\");\n else newIndex = $dc7ec905e041f51c$var$index(multiDragElement);\n newIndicies.push({\n multiDragElement: multiDragElement,\n index: newIndex\n });\n });\n return {\n items: $dc7ec905e041f51c$var$_toConsumableArray($dc7ec905e041f51c$var$multiDragElements),\n clones: [].concat($dc7ec905e041f51c$var$multiDragClones),\n oldIndicies: oldIndicies,\n newIndicies: newIndicies\n };\n },\n optionListeners: {\n multiDragKey: function multiDragKey(key) {\n key = key.toLowerCase();\n if (key === \"ctrl\") key = \"Control\";\n else if (key.length > 1) key = key.charAt(0).toUpperCase() + key.substr(1);\n return key;\n }\n }\n });\n}\nfunction $dc7ec905e041f51c$var$insertMultiDragElements(clonesInserted, rootEl) {\n $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement, i) {\n var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n if (target) rootEl.insertBefore(multiDragElement, target);\n else rootEl.appendChild(multiDragElement);\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 */ function $dc7ec905e041f51c$var$insertMultiDragClones(elementsInserted, rootEl) {\n $dc7ec905e041f51c$var$multiDragClones.forEach(function(clone, i) {\n var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n if (target) rootEl.insertBefore(clone, target);\n else rootEl.appendChild(clone);\n });\n}\nfunction $dc7ec905e041f51c$var$removeMultiDragElements() {\n $dc7ec905e041f51c$var$multiDragElements.forEach(function(multiDragElement) {\n if (multiDragElement === $dc7ec905e041f51c$var$dragEl$1) return;\n multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n });\n}\n$dc7ec905e041f51c$export$31b3ca70d8f57423.mount(new $dc7ec905e041f51c$var$AutoScrollPlugin());\n$dc7ec905e041f51c$export$31b3ca70d8f57423.mount($dc7ec905e041f51c$var$Remove, $dc7ec905e041f51c$var$Revert);\nvar $dc7ec905e041f51c$export$2e2bcd8739ae039 = $dc7ec905e041f51c$export$31b3ca70d8f57423;\n\n\n\n\nvar $65AEs = parcelRequire(\"65AEs\");\n\nvar $e6f0a14715dbdf71$exports = {};\n\n\n\nvar $e6f0a14715dbdf71$require$state = $75d41d026a980c58$export$ca000e230c0caa3e;\nvar $e6f0a14715dbdf71$var$Mon = {\n dom: null\n};\n$e6f0a14715dbdf71$exports = {\n dom: null,\n seek: (t)=>{\n if ($e6f0a14715dbdf71$var$Mon.dom) $e6f0a14715dbdf71$var$Mon.dom.currentTime = t;\n },\n seekEdl: (t)=>{\n let c = 0;\n let d = 0;\n while(d + (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[c][3] <= t && c < (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.length - 1)d += (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[c++][3];\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current = c;\n let clip = (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[c];\n console.log(\"seeking edl\", c, d, t, clip);\n let clipTime = Number((t - d + clip[1]).toFixed(2));\n if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).filename != clip[0]) $e6f0a14715dbdf71$exports.load(clip[0]);\n $e6f0a14715dbdf71$exports.seek(clipTime);\n },\n play: ()=>{\n if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).paused) {\n $e6f0a14715dbdf71$var$Mon.dom.play();\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).paused = false;\n } else {\n $e6f0a14715dbdf71$var$Mon.dom.pause();\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).paused = true;\n }\n },\n stop: ()=>{\n $e6f0a14715dbdf71$var$Mon.dom.pause();\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).paused = true;\n },\n faster: ()=>{\n console.log(\"playbackRate changed\", (0, $22dd8f6982cb874d$export$ae01dedf5c052bb));\n if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed < -0.25) (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed = (parseFloat((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed) / 2).toFixed(2);\n else if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed < 1) (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed = parseFloat((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed) + .25;\n else if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed < 16) (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed = parseFloat((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed) * 2;\n if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed == .25) $e6f0a14715dbdf71$var$Mon.dom.play();\n else $e6f0a14715dbdf71$var$Mon.dom.playbackRate = (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed;\n },\n slower: ()=>{\n if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed > 1) (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed = ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed / 2).toFixed();\n else if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed > 0) (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed -= .25;\n if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed == 0) $e6f0a14715dbdf71$var$Mon.dom.pause();\n else $e6f0a14715dbdf71$var$Mon.dom.playbackRate = (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed;\n },\n resetSpeed: ()=>{\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed = 1;\n $e6f0a14715dbdf71$var$Mon.dom.playbackRate = (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed;\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n },\n load: (f)=>{\n $e6f0a14715dbdf71$var$Mon.dom.src = f;\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).filename = f;\n },\n oncreate: (vnode)=>{\n // Video.filename = Edl.edl[0][0]\n vnode.dom.addEventListener(\"durationchange\", (e)=>{\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).duration = vnode.dom.duration;\n // console.log('duration change', Video)\n // m.redraw()\n });\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).duration = vnode.duration;\n // console.log('monitor created', Video)\n $e6f0a14715dbdf71$var$Mon.dom = vnode.dom;\n document.addEventListener(\"keydown\", (e)=>{\n switch(e.code){\n case \"Space\":\n e.preventDefault();\n $e6f0a14715dbdf71$exports.play();\n // console.log('space', Video, vnode)\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n break;\n case \"Equal\":\n $e6f0a14715dbdf71$exports.faster();\n break;\n case \"Minus\":\n $e6f0a14715dbdf71$exports.slower();\n break;\n case \"ArrowLeft\":\n e.preventDefault();\n $e6f0a14715dbdf71$exports.seekEdl(Math.max((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time - 5, 0));\n break;\n case \"ArrowRight\":\n e.preventDefault();\n $e6f0a14715dbdf71$exports.seekEdl(Math.min((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time + 5, (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).duration()));\n break;\n }\n });\n vnode.dom.addEventListener(\"timeupdate\", (e)=>{\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time = e.target.currentTime;\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time = (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time - (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current][1] + (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).durations((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.slice(0, (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current));\n // if (Edl.edl[Edl.current]) {\n console.log(\"timeupdate\", e, (0, $22dd8f6982cb874d$export$ae01dedf5c052bb), (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51));\n // , Edl.edl[Edl.current][2] - Video.time)\n // check to see if we need to make an edit in the monitor\n // if the current video time is beyond the current clip outpoint:\n if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time > (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current][2]) {\n // and if there's another clip to edit to:\n if ((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current < (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.length - 1) {\n // we need to change the video somehow.\n console.log(\"editing!\", (0, $22dd8f6982cb874d$export$ae01dedf5c052bb), (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51));\n // if the next video is different than the current video:\n if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).filename != (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[++(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current][0]) {\n // we need to switch videos\n console.log(\"loading\", (0, $22dd8f6982cb874d$export$ae01dedf5c052bb), (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current]);\n $e6f0a14715dbdf71$exports.load((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current][0]);\n }\n // perform the edit!\n if (!(0, $22dd8f6982cb874d$export$ae01dedf5c052bb).paused) $e6f0a14715dbdf71$exports.seek(parseFloat((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current][1]));\n } else {\n // this is the last clip in the edl.\n console.log(\"End of edl. stopping\");\n // since Video.time > current outpoint\n $e6f0a14715dbdf71$exports.seek(parseFloat((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current][2]));\n $e6f0a14715dbdf71$exports.stop();\n }\n }\n // }\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n });\n $e6f0a14715dbdf71$var$Mon.dom.addEventListener(\"loadeddata\", (event)=>{\n if (!(0, $22dd8f6982cb874d$export$ae01dedf5c052bb).paused && $e6f0a14715dbdf71$var$Mon.dom.paused) {\n console.log(\"fixed paused!\");\n $e6f0a14715dbdf71$var$Mon.dom.play();\n }\n if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time < (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current][1]) {\n console.log(\"jumping to inpoint\");\n $e6f0a14715dbdf71$exports.seek((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current][1]);\n }\n });\n },\n onbeforeupdate: (vnode, old)=>{\n // prevent component from updating on redraw\n return false;\n },\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"video#monitor.monitor\", {\n src: (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).filename,\n controls: true,\n preload: true,\n volume: (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).volume\n });\n }\n};\n\n\n\n\nvar $0c848907285c315f$require$state = $75d41d026a980c58$export$ca000e230c0caa3e;\nfunction $0c848907285c315f$var$whichAmI(e, p) {\n let c = p.children;\n for(var i = 0; i < c.length; i++){\n if (c[i] == e) return i;\n }\n return false;\n}\nclass $0c848907285c315f$export$2e2bcd8739ae039 {\n constructor(vnode){\n this.inpoint = vnode.attrs.inpoint;\n this.outpoint = vnode.attrs.outpoint;\n this.description = vnode.attrs.description;\n this.filename = vnode.attrs.name;\n this.pos = vnode.attrs.pos;\n // console.log('clip init', vnode, this.inpoint, this.outpoint)\n }\n oninit(vnode) {}\n /* Create an interactable object in order to resize the left and right edges of the clip.\n */ oncreate(vnode) {\n const clip = (0, (/*@__PURE__*/$parcel$interopDefault($65AEs)))(vnode.dom);\n clip.resizable({\n edges: {\n left: true,\n right: true\n },\n cursorChecker: (action, interactable, element, interacting)=>{\n switch($0c848907285c315f$require$state.tool()){\n case \"trim\":\n if (action.edges.right) return \"e-resize\";\n else if (action.edges.left) return \"w-resize\";\n break;\n default:\n return null;\n }\n }\n });\n clip.on(\"resizemove\", (event)=>{\n // console.log('resizemove', event)\n let target = event.target;\n // console.log('event: ', event) //event.delta.x, )\n const w = parseInt(target.style.width);\n const dx = Number((event.dx / $0c848907285c315f$require$state.scale()).toFixed(2));\n // console.log( w - (vnode.state.outpoint - vnode.state.inpoint), event.rect.width, vnode.state.outpoint, vnode.state.inpoint, w)\n if ($0c848907285c315f$require$state.tool() == \"trim\") {\n if (event.edges.left && this.outpoint > this.inpoint + dx && this.inpoint + dx >= 0) {\n // target.style.width = event.rect.width + 'px';\n target.style.width = w - dx + \"px\";\n this.inpoint = this.inpoint + dx;\n target.setAttribute(\"inpoint\", this.inpoint);\n (0, $95330ca74a9dfc2d$export$e6a97ba2cae5bb94).updateEdl();\n // console.log('changing inpoint', vnode, event)\n } else if (event.edges.right && this.outpoint + dx > this.inpoint) {\n target.style.width = w + dx + \"px\";\n this.outpoint = this.outpoint + dx;\n target.setAttribute(\"outpoint\", this.outpoint);\n // console.log('changing outpoint', event.deltaRect, event)\n (0, $95330ca74a9dfc2d$export$e6a97ba2cae5bb94).updateEdl();\n }\n } else if ($0c848907285c315f$require$state.tool() == \"dual roller\") {\n if (event.edges.left && this.outpoint > this.inpoint + dx && this.inpoint + dx >= 0) {\n console.log(\"dual rolling\");\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[this.pos][1] += dx;\n if (this.pos) (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[this.pos - 1][2] += dx;\n (0, $95330ca74a9dfc2d$export$e6a97ba2cae5bb94).loadEdl((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl);\n } else if (event.edges.right && this.outpoint + dx > this.inpoint) {\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[this.pos][2] += dx;\n if ((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.length - 1 > this.pos) (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[this.pos + 1][1] += dx;\n (0, $95330ca74a9dfc2d$export$e6a97ba2cae5bb94).loadEdl((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl);\n }\n }\n });\n var self = this;\n clip.draggable({\n cursorChecker () {\n return null;\n },\n listeners: {\n start (e) {\n console.log(\"dragging clip\", e);\n },\n move (e) {\n if ($0c848907285c315f$require$state.tool() == \"slip\") {\n const dx = e.dx / $0c848907285c315f$require$state.scale();\n if (self.inpoint - e.dx > 0) {\n console.log(\"slipping\", e, dx);\n self.inpoint -= dx;\n self.outpoint -= dx;\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[self.pos][1] -= dx;\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[self.pos][2] -= dx;\n (0, $95330ca74a9dfc2d$export$e6a97ba2cae5bb94).loadEdl((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl);\n } else {\n self.outpoint -= self.inpoint;\n self.inpoint = 0;\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[self.pos][2] -= (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[self.pos][1];\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[self.pos][1] = 0;\n (0, $95330ca74a9dfc2d$export$e6a97ba2cae5bb94).loadEdl((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl);\n }\n } else if ($0c848907285c315f$require$state.tool() == \"slide\") {\n const dx = e.dx / $0c848907285c315f$require$state.scale();\n console.log(\"sliding\", e, dx);\n if (self.pos) (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[self.pos - 1][2] = Math.max((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[self.pos - 1][2] + dx, 0);\n if ((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.length - 1 > self.pos) (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[self.pos + 1][1] += dx;\n (0, $95330ca74a9dfc2d$export$e6a97ba2cae5bb94).loadEdl((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl);\n }\n },\n end (e) {}\n }\n });\n vnode.dom.addEventListener(\"mousedown\", (e)=>{\n let target = e.target;\n const r = e.offsetX / e.target.offsetWidth;\n const t = Number((r * (this.outpoint - this.inpoint) + this.inpoint).toFixed(2));\n // let i = this.pos\n let i = $0c848907285c315f$var$whichAmI(target, target.parentElement);\n console.log(\"clicked on clip\", i, e, r, t);\n if ($0c848907285c315f$require$state.tool() == \"time\") {\n if (target.parentElement.id == \"timeline\") {\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current = i;\n if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).filename != (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current][0]) {\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).filename = (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current][0];\n (0, (/*@__PURE__*/$parcel$interopDefault($e6f0a14715dbdf71$exports))).load((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).filename);\n }\n (0, (/*@__PURE__*/$parcel$interopDefault($e6f0a14715dbdf71$exports))).seek(t);\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n }\n } else if ($0c848907285c315f$require$state.tool() == \"cut\") {\n if (this.inpoint < t && t < this.outpoint) {\n console.log(this.inpoint, t, this.outpoint);\n var edl = (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl;\n var newClip = [\n edl[i][0],\n edl[i][1],\n edl[i][2],\n edl[i][3],\n edl[i][4]\n ];\n console.log(\"old:\", edl[i]);\n // var newClip = Edl.edl[i]\n edl[i][2] = t;\n this.outpoint = t;\n edl[i][3] = Number((edl[i][2] - edl[i][1]).toFixed(2));\n newClip[1] = t;\n console.log(\"cutting\", edl[i], newClip);\n newClip[3] = newClip[2] - newClip[1];\n edl.splice(i + 1, 0, newClip);\n // Edl.edl = edl\n console.log(\"new edl\", (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl);\n // m.redraw()\n (0, $95330ca74a9dfc2d$export$e6a97ba2cae5bb94).loadEdl(edl);\n // Timeline.updateEdl()\n }\n }\n }, true);\n }\n onupdate(vnode) {\n if (vnode.dom.parentElement) this.pos = $0c848907285c315f$var$whichAmI(vnode.dom, vnode.dom.parentElement);\n else vnode.dom.remove();\n // console.log('updating clip pos', this.filename, this.pos)\n }\n view(vnode) {\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(`.clip#${vnode.attrs.name}`, {\n \"data-x\": this.inpoint,\n // 'data-duration': vnode.attrs.duration/scale,\n // innerHTML: `${this.description} - [${this.inpoint}, ${this.outpoint}]`,\n pos: this.pos,\n inpoint: this.inpoint,\n outpoint: this.outpoint,\n name: this.filename,\n description: this.description,\n title: this.pos + \" - \" + this.filename + \" - \" + this.description,\n style: {\n width: (this.outpoint - this.inpoint) * $0c848907285c315f$require$state.scale()\n }\n }, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"p#clipname.clipname\", this.filename.split(\"/\").pop()),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"p#inpoint[]\", this.inpoint.toFixed(2)),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"p#outpoint[]\", this.outpoint.toFixed(2)),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"p#description[contenteditable=true]\", {\n oncreate: (v)=>{\n let t = document.getElementById(\"timeline\");\n // console.log('description created', v)\n vnode.dom.addEventListener(\"input\", (e)=>{\n console.log(\"input changed\", e, vnode, this.pos);\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[this.pos][4] = e.target.textContent;\n this.description = e.target.textContent;\n });\n vnode.dom.addEventListener(\"keyup\", (e)=>{\n if (e.key == \"Enter\") {\n e.preventDefault();\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n }\n if (e.key == \"ArrowLeft\" || e.key == \"ArrowRight\" || e.key == \" \") e.stopPropagation();\n });\n }\n }, (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).trust(this.description)),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons#progress.progress\", {\n style: {\n display: (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current == this.pos && this.inpoint < (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time() < this.outpoint ? \"inherit\" : \"none\",\n left: ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time() - this.inpoint) * $0c848907285c315f$require$state.scale()\n }\n })\n ]);\n // {data-x: vnode.attrs.inpoint/scale, data-y: vnode.attrs.outpoint/scale})\n }\n}\n\n\n\n\n(0, $dc7ec905e041f51c$export$2e2bcd8739ae039).mount(new (0, $dc7ec905e041f51c$export$18e5d2a5d1df842d)());\n\nvar $95330ca74a9dfc2d$require$state = $75d41d026a980c58$export$ca000e230c0caa3e;\n// This will parse a delimited string into an array of\n// arrays. The default delimiter is the comma, but this\n// can be overriden in the second argument.\nfunction $43de37786be4adb0$export$5777570ea8dff499(strData, strDelimiter) {\n // Check to see if the delimiter is defined. If not,\n // then default to comma.\n strDelimiter = strDelimiter || \",\";\n // Create a regular expression to parse the CSV values.\n var objPattern = new RegExp(// Delimiters.\n \"(\\\\\" + strDelimiter + \"|\\\\r?\\\\n|\\\\r|^)\" + // Quoted fields.\n '(?:\"([^\"]*(?:\"\"[^\"]*)*)\"|' + // Standard fields.\n '([^\"\\\\' + strDelimiter + \"\\\\r\\\\n]*))\", \"gi\");\n // Create an array to hold our data. Give the array\n // a default empty first row.\n var arrData = [\n []\n ];\n // Create an array to hold our individual pattern\n // matching groups.\n var arrMatches = null;\n // Keep looping over the regular expression matches\n // until we can no longer find a match.\n while(arrMatches = objPattern.exec(strData)){\n // Get the delimiter that was found.\n var strMatchedDelimiter = arrMatches[1];\n // Check to see if the given delimiter has a length\n // (is not the start of string) and if it matches\n // field delimiter. If id does not, then we know\n // that this delimiter is a row delimiter.\n if (strMatchedDelimiter.length && strMatchedDelimiter != strDelimiter) // Since we have reached a new row of data,\n // add an empty row to our data array.\n arrData.push([]);\n // Now that we have our delimiter out of the way,\n // let's check to see which kind of value we\n // captured (quoted or unquoted).\n if (arrMatches[2]) // We found a quoted value. When we capture\n // this value, unescape any double quotes.\n var strMatchedValue = arrMatches[2].replace(new RegExp('\"\"', \"g\"), '\"');\n else // We found a non-quoted value.\n var strMatchedValue = arrMatches[3];\n // Now that we have our value string, let's add\n // it to the data array.\n arrData[arrData.length - 1].push(strMatchedValue);\n }\n // Return the parsed data.\n return arrData;\n}\nfunction $43de37786be4adb0$export$4792e48abc550fa1(t) {\n t = t.split(\":\");\n // console.log('split', t, parseFloat(t[2]))\n var v = 3600 * parseFloat(t[0]) + 60 * parseFloat(t[1]) + parseFloat(t[2]);\n // console.log('v', v)\n return v;\n}\nfunction $43de37786be4adb0$export$cbdf058efcf8f6ee(arrData) {\n arrData = arrData.slice(1);\n arrData.pop();\n // console.log('edl: ', arrData)\n for(var i = 0; i < arrData.length; i++){\n // arrData[i] = arrData[i].map(col => col.includes(\":\") && !col.includes(\"M\") ? seconds(col) : col\n let d = arrData[i];\n arrData[i] = [\n d[0],\n $43de37786be4adb0$export$4792e48abc550fa1(d[1]),\n $43de37786be4adb0$export$4792e48abc550fa1(d[2]),\n $43de37786be4adb0$export$4792e48abc550fa1(d[3]),\n d[4]\n ];\n }\n return arrData;\n}\n\n\nvar $95330ca74a9dfc2d$require$CSVToArray = $43de37786be4adb0$export$5777570ea8dff499;\n\nvar $95330ca74a9dfc2d$require$edlToSeconds = $43de37786be4adb0$export$cbdf058efcf8f6ee;\nvar $95330ca74a9dfc2d$export$e6a97ba2cae5bb94 = {\n // constructor() {\n // edl: [],\n // duration: 0,\n // }\n v: null,\n updateEdl: ()=>{\n var edl = [];\n let clips = $95330ca74a9dfc2d$export$e6a97ba2cae5bb94.v.dom.children;\n // let clips = document.getElementById('timeline').children\n // console.log('updating edl', clips)\n for(var i = 0; i < clips.length; i++){\n // console.log(i, clips[i])\n edl.push([\n clips[i].attributes.filename.value,\n Number(clips[i].attributes.inpoint.value),\n Number(clips[i].attributes.outpoint.value),\n Number(clips[i].attributes.outpoint.value - clips[i].attributes.inpoint.value),\n clips[i].attributes.description.value\n ]);\n clips[i].attributes.pos.value = i;\n }\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl = edl;\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n },\n loadEdl: (edl)=>{\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl = [];\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw.sync();\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl = edl;\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n },\n oninit: (vnode)=>{\n $95330ca74a9dfc2d$export$e6a97ba2cae5bb94.v = vnode;\n // m.request(m.route.param('edl') || 'test.csv', {extract: (xhr) => {return {status: xhr.status, body: xhr.responseText}}}).then((e) => {\n // console.log('got edl!', e)\n // // Edl.edl = csvStringToArray(e.body)\n // Edl.edl = edlToSeconds(CSVToArray(e.body))\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).request({\n url: \"/edl\",\n params: {\n filename: (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.param(\"edl\")\n }\n }).then((e)=>{\n let edl;\n if (Array.isArray(e) && e.length) edl = e;\n else edl = $95330ca74a9dfc2d$require$edlToSeconds($95330ca74a9dfc2d$require$CSVToArray(e));\n console.log(\"got edl!\", e, edl);\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl = edl;\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).filename = (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[0][0];\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[0][1]);\n (0, (/*@__PURE__*/$parcel$interopDefault($e6f0a14715dbdf71$exports))).load((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).filename);\n });\n // m.redraw()\n // Monitor.play()\n // })\n },\n oncreate: (vnode)=>{\n new (0, $dc7ec905e041f51c$export$2e2bcd8739ae039)(vnode.dom, {\n multiDrag: true,\n group: \"media\",\n selectedClass: \"selected\",\n swapThreshold: 0.50,\n animation: 150,\n ghostClass: \"ghost\",\n forceFallback: true,\n // delay: 100,\n invertSwap: true,\n preventOnFilter: false,\n filter: (e)=>{\n if ($95330ca74a9dfc2d$require$state.tool() != \"move\") return true;\n else return false;\n },\n onUpdate: (e)=>{\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current = e.newIndex;\n console.log(\"sorting update\", e, (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51));\n $95330ca74a9dfc2d$export$e6a97ba2cae5bb94.updateEdl();\n },\n removeOnSpill: true,\n onSpill: (e)=>{\n console.log(\"spilling\", e);\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.splice(e.oldIndex, 1);\n $95330ca74a9dfc2d$export$e6a97ba2cae5bb94.loadEdl((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl);\n // console.log('new edl:', Edl.edl)\n }\n });\n },\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"#timeline.timeline\", [\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.map((c, i)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $0c848907285c315f$export$2e2bcd8739ae039), {\n filename: c[0],\n inpoint: c[1],\n outpoint: c[2],\n duration: c[3],\n description: c[4],\n pos: i\n });\n })\n ]);\n }\n};\n\n\nvar $6c48d115f6b35383$require$Timeline = $95330ca74a9dfc2d$export$e6a97ba2cae5bb94;\nvar $37d0566241e39315$exports = {};\n\n\nvar $65AEs = parcelRequire(\"65AEs\");\n\n\n\nvar $37d0566241e39315$require$state = $75d41d026a980c58$export$ca000e230c0caa3e;\n$37d0566241e39315$exports = {\n formatTime: (seconds)=>{\n const h = Math.floor(seconds / 3600);\n const m = Math.floor(seconds % 3600 / 60);\n const s = (Math.floor(seconds * 100) % 6000 / 100).toFixed(2);\n return [\n h,\n m > 9 ? m : h ? \"0\" + m : m || \"0\",\n s > 9 ? s : \"0\" + s\n ].filter((a)=>a).join(\":\");\n },\n elapsed: (e)=>{\n let d = e.map((clip)=>clip[3]);\n return d.reduce((a, b)=>a + b, 0);\n },\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".slider#slider\", {\n min: 1,\n max: (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).duration()\n });\n },\n oncreate: (vnode)=>{\n const slider = (0, (/*@__PURE__*/$parcel$interopDefault($65AEs)))(vnode.dom);\n slider.draggable({\n origin: \"self\",\n inertia: true,\n modifiers: [\n (0, (/*@__PURE__*/$parcel$interopDefault($65AEs))).modifiers.restrict({\n restriction: \"self\"\n })\n ]\n }).on(\"dragmove\", (event)=>{\n const sliderWidth = event.target.offsetWidth - event.target.offsetLeft;\n const value = Math.max((event.pageX - event.target.offsetLeft) / sliderWidth, 0);\n const t = (value * (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).duration()).toFixed(2);\n console.log(\"sliding to\", t, value, event, event.pageX, sliderWidth, event.target.offsetLeft);\n event.target.style.paddingLeft = 100 * value.toFixed(4) + \"%\";\n event.target.setAttribute(\"data-value\", t);\n }).on(\"dragend\", (event)=>{\n const sliderWidth = event.target.offsetWidth - event.target.offsetLeft;\n const value = Math.max((event.pageX - event.target.offsetLeft) / sliderWidth, 0);\n const t = (value * (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).duration()).toFixed(2);\n console.log(\"slide end. Jumping\", t, value, sliderWidth, event);\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).jump(Number(t));\n });\n },\n onupdate: (vnode)=>{\n vnode.dom.setAttribute(\"data-value\", (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time.toFixed(2));\n let p = (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time / (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).duration() * 100;\n console.log(\"updating slider\", vnode, p);\n vnode.dom.style.paddingLeft = `${p.toFixed(2)}%`;\n }\n};\n\n\nvar $6c48d115f6b35383$require$formatTime = $37d0566241e39315$exports.formatTime;\n$6c48d115f6b35383$exports = {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"table#project.project\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"tr\", [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"name\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"inpoint\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"outpoint\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"duration\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"description\")\n ]),\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.map((c)=>{\n // console.log('project clip: ', c)\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"tr\", [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", c[0].split(\"/\").pop()),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", $6c48d115f6b35383$require$formatTime(c[1])),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", $6c48d115f6b35383$require$formatTime(c[2])),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", $6c48d115f6b35383$require$formatTime(c[2] - c[1])),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", c[4])\n ]);\n })\n ]);\n }\n};\n\n\n\n\nvar $cc19313c82e913d3$var$timeline1 = \"https://images.squarespace-cdn.com/content/v1/5b54f2433e2d096995211b77/1597084858418-8X6LW6UDTW7LA52ZOR33/alfred-timeline.jpg?format=500w\";\nvar $cc19313c82e913d3$var$timeline2 = \"https://images.squarespace-cdn.com/content/v1/5b54f2433e2d096995211b77/1597014928858-1H9VY1CWOPV0ZATALHYH/Screenshot+from+2020-08-09+19-11-10.png?format=750w\";\nvar $cc19313c82e913d3$var$imageUpload = \"https://images.squarespace-cdn.com/content/v1/5b54f2433e2d096995211b77/1597014788791-AXD895KQ3LCMDBZYNVRP/image-asset.png?format=750w\";\nvar $cc19313c82e913d3$var$rendererImage = \"https://images.squarespace-cdn.com/content/v1/5b54f2433e2d096995211b77/1597015146812-NWUP1J4VFMV7J9148G57/image-asset.png?format=750w\";\nconst $cc19313c82e913d3$export$b94310965bed44e6 = ()=>({\n view: (vnode)=>(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".homeCntr\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"h1\", \"AUTOMATED VIDEO PRODUCTION\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".imgTxtCntr\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"img.rightImg\", {\n src: $cc19313c82e913d3$var$timeline1\n }), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"form.txtBox.alfredText\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".firstLine\", \"Alfred \"),\n \"is a simple, yet powerful video tool, designed to automate and streamline video creation. \",\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\"),\n \"Leveraging the power of HTML5 video, it is designed to make editing simple from any modern browser, \",\n \"including mobile devices! \"\n ])),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".imgTxtCntr\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"img.leftImg\", {\n src: $cc19313c82e913d3$var$imageUpload\n }), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"form.txtBox.firstText\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".firstLine\", \"First, \"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\"),\n \"Add photos and videos from the web, or upload custom to use in your project. \",\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\"),\n \"Or, search the media browser for related content available on the web. \"\n ])),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".imgTxtCntr\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"img.rightImg\", {\n src: $cc19313c82e913d3$var$timeline2\n }), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"form.txtBox.thenText\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".firstLine\", \"Then, \"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\"),\n \"'Generate a timeline of clips that represent your video. Edit the text, resize or rearrange clips, \",\n \"and preview the results instantly! \",\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\"),\n \"Or, bypass the timeline entirely and let Alfred automatically \",\n \"create videos based on your content. \"\n ])),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".imgTxtCntr\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"img.leftImg\", {\n src: $cc19313c82e913d3$var$rendererImage\n }), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"form.txtBox.finallyText\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".firstLine\", \"Finally, \"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\"),\n \"Render your video at multiple resolutions, frame rates, or directly upload to specific output \",\n \"destinations (Facebook, YouTube, Instagram, TikTok, etc).\",\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\"),\n \"Videos can be rendered in parallel, \",\n \"on multiple machines, simultaneously! \"\n ])),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".imgTxtCntrs\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"hr\")),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".imgTxtCntrs\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".alQuote\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"q\", \"The pictures over. Now I have to go and put it on film.\")\n ]), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".text\", \"\\u2014 Alfred Hitchcock \")),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".honorText\", \"Named in honor of the illustrious Hitchcock, the master of creating film by design. \")\n ])\n ])\n });\n\n\n\n\n\nfunction $1eeac253570f845a$var$e(e) {\n this.message = e;\n}\n$1eeac253570f845a$var$e.prototype = new Error, $1eeac253570f845a$var$e.prototype.name = \"InvalidCharacterError\";\nvar $1eeac253570f845a$var$r = \"undefined\" != typeof window && window.atob && window.atob.bind(window) || function(r) {\n var t = String(r).replace(/=+$/, \"\");\n if (t.length % 4 == 1) throw new $1eeac253570f845a$var$e(\"'atob' failed: The string to be decoded is not correctly encoded.\");\n for(var n, o, a = 0, i = 0, c = \"\"; o = t.charAt(i++); ~o && (n = a % 4 ? 64 * n + o : o, a++ % 4) && (c += String.fromCharCode(255 & n >> (-2 * a & 6))))o = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".indexOf(o);\n return c;\n};\nfunction $1eeac253570f845a$var$t(e) {\n var t = e.replace(/-/g, \"+\").replace(/_/g, \"/\");\n switch(t.length % 4){\n case 0:\n break;\n case 2:\n t += \"==\";\n break;\n case 3:\n t += \"=\";\n break;\n default:\n throw \"Illegal base64url string!\";\n }\n try {\n return function(e) {\n return decodeURIComponent($1eeac253570f845a$var$r(e).replace(/(.)/g, function(e, r) {\n var t = r.charCodeAt(0).toString(16).toUpperCase();\n return t.length < 2 && (t = \"0\" + t), \"%\" + t;\n }));\n }(t);\n } catch (e) {\n return $1eeac253570f845a$var$r(t);\n }\n}\nfunction $1eeac253570f845a$export$b9721ef022f71a68(e) {\n this.message = e;\n}\nfunction $1eeac253570f845a$var$o(e, r) {\n if (\"string\" != typeof e) throw new $1eeac253570f845a$export$b9721ef022f71a68(\"Invalid token specified\");\n var o = !0 === (r = r || {}).header ? 0 : 1;\n try {\n return JSON.parse($1eeac253570f845a$var$t(e.split(\".\")[o]));\n } catch (e) {\n throw new $1eeac253570f845a$export$b9721ef022f71a68(\"Invalid token specified: \" + e.message);\n }\n}\n$1eeac253570f845a$export$b9721ef022f71a68.prototype = new Error, $1eeac253570f845a$export$b9721ef022f71a68.prototype.name = \"InvalidTokenError\";\nvar $1eeac253570f845a$export$2e2bcd8739ae039 = $1eeac253570f845a$var$o;\n\n\n\n\nvar $89b291c8bc281326$exports = {};\n/**\r\n * alertifyjs 1.13.1 http://alertifyjs.com\r\n * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.\r\n * Copyright 2019 Mohammad Younes (http://alertifyjs.com) \r\n * Licensed under GPL 3 */ (function(window1) {\n \"use strict\";\n var NOT_DISABLED_NOT_RESET = \":not(:disabled):not(.ajs-reset)\";\n /**\r\n * Keys enum\r\n * @type {Object}\r\n */ var keys = {\n ENTER: 13,\n ESC: 27,\n F1: 112,\n F12: 123,\n LEFT: 37,\n RIGHT: 39,\n TAB: 9\n };\n /**\r\n * Default options \r\n * @type {Object}\r\n */ var defaults = {\n autoReset: true,\n basic: false,\n closable: true,\n closableByDimmer: true,\n invokeOnCloseOff: false,\n frameless: false,\n defaultFocusOff: false,\n maintainFocus: true,\n maximizable: true,\n modal: true,\n movable: true,\n moveBounded: false,\n overflow: true,\n padding: true,\n pinnable: true,\n pinned: true,\n preventBodyShift: false,\n resizable: true,\n startMaximized: false,\n transition: \"pulse\",\n transitionOff: false,\n tabbable: [\n \"button\",\n \"[href]\",\n \"input\",\n \"select\",\n \"textarea\",\n '[tabindex]:not([tabindex^=\"-\"])' + NOT_DISABLED_NOT_RESET\n ].join(NOT_DISABLED_NOT_RESET + \",\"),\n notifier: {\n delay: 5,\n position: \"bottom-right\",\n closeButton: false,\n classes: {\n base: \"alertify-notifier\",\n prefix: \"ajs-\",\n message: \"ajs-message\",\n top: \"ajs-top\",\n right: \"ajs-right\",\n bottom: \"ajs-bottom\",\n left: \"ajs-left\",\n center: \"ajs-center\",\n visible: \"ajs-visible\",\n hidden: \"ajs-hidden\",\n close: \"ajs-close\"\n }\n },\n glossary: {\n title: \"AlertifyJS\",\n ok: \"OK\",\n cancel: \"Cancel\",\n acccpt: \"Accept\",\n deny: \"Deny\",\n confirm: \"Confirm\",\n decline: \"Decline\",\n close: \"Close\",\n maximize: \"Maximize\",\n restore: \"Restore\"\n },\n theme: {\n input: \"ajs-input\",\n ok: \"ajs-ok\",\n cancel: \"ajs-cancel\"\n },\n hooks: {\n preinit: function() {},\n postinit: function() {}\n }\n };\n //holds open dialogs instances\n var openDialogs = [];\n /**\r\n * [Helper] Adds the specified class(es) to the element.\r\n *\r\n * @element {node} The element\r\n * @className {string} One or more space-separated classes to be added to the class attribute of the element.\r\n * \r\n * @return {undefined}\r\n */ function addClass(element, classNames) {\n element.className += \" \" + classNames;\n }\n /**\r\n * [Helper] Removes the specified class(es) from the element.\r\n *\r\n * @element {node} The element\r\n * @className {string} One or more space-separated classes to be removed from the class attribute of the element.\r\n * \r\n * @return {undefined}\r\n */ function removeClass(element, classNames) {\n var original = element.className.split(\" \");\n var toBeRemoved = classNames.split(\" \");\n for(var x = 0; x < toBeRemoved.length; x += 1){\n var index = original.indexOf(toBeRemoved[x]);\n if (index > -1) original.splice(index, 1);\n }\n element.className = original.join(\" \");\n }\n /**\r\n * [Helper] Checks if the document is RTL\r\n *\r\n * @return {Boolean} True if the document is RTL, false otherwise.\r\n */ function isRightToLeft() {\n return window1.getComputedStyle(document.body).direction === \"rtl\";\n }\n /**\r\n * [Helper] Get the document current scrollTop\r\n *\r\n * @return {Number} current document scrollTop value\r\n */ function getScrollTop() {\n return document.documentElement && document.documentElement.scrollTop || document.body.scrollTop;\n }\n /**\r\n * [Helper] Get the document current scrollLeft\r\n *\r\n * @return {Number} current document scrollLeft value\r\n */ function getScrollLeft() {\n return document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft;\n }\n /**\r\n * Helper: clear contents\r\n *\r\n */ function clearContents(element) {\n while(element.lastChild)element.removeChild(element.lastChild);\n }\n /**\r\n * Extends a given prototype by merging properties from base into sub.\r\n *\r\n * @sub {Object} sub The prototype being overwritten.\r\n * @base {Object} base The prototype being written.\r\n *\r\n * @return {Object} The extended prototype.\r\n */ function copy(src) {\n if (null === src) return src;\n var cpy;\n if (Array.isArray(src)) {\n cpy = [];\n for(var x = 0; x < src.length; x += 1)cpy.push(copy(src[x]));\n return cpy;\n }\n if (src instanceof Date) return new Date(src.getTime());\n if (src instanceof RegExp) {\n cpy = new RegExp(src.source);\n cpy.global = src.global;\n cpy.ignoreCase = src.ignoreCase;\n cpy.multiline = src.multiline;\n cpy.lastIndex = src.lastIndex;\n return cpy;\n }\n if (typeof src === \"object\") {\n cpy = {};\n // copy dialog pototype over definition.\n for(var prop in src)if (src.hasOwnProperty(prop)) cpy[prop] = copy(src[prop]);\n return cpy;\n }\n return src;\n }\n /**\r\n * Helper: destruct the dialog\r\n *\r\n */ function destruct(instance, initialize) {\n if (instance.elements) {\n //delete the dom and it's references.\n var root = instance.elements.root;\n root.parentNode.removeChild(root);\n delete instance.elements;\n //copy back initial settings.\n instance.settings = copy(instance.__settings);\n //re-reference init function.\n instance.__init = initialize;\n //delete __internal variable to allow re-initialization.\n delete instance.__internal;\n }\n }\n /**\r\n * Test to check if passive event listeners are supported.\r\n */ var IsPassiveSupported = false;\n try {\n var options = Object.defineProperty({}, \"passive\", {\n get: function() {\n IsPassiveSupported = true;\n }\n });\n window1.addEventListener(\"test\", options, options);\n window1.removeEventListener(\"test\", options, options);\n } catch (e) {}\n /**\r\n * Removes an event listener\r\n *\r\n * @param {HTMLElement} el The EventTarget to register the listenr on.\r\n * @param {string} event The event type to listen for.\r\n * @param {Function} handler The function to handle the event.\r\n * @param {boolean} useCapture Specifices if the event to be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree.\r\n * @param {boolean} passive A Boolean which, if true, indicates that the function specified by listener will never call preventDefault().\r\n */ var on = function(el, event, fn, useCapture, passive) {\n el.addEventListener(event, fn, IsPassiveSupported ? {\n capture: useCapture,\n passive: passive\n } : useCapture === true);\n };\n /**\r\n * Removes an event listener\r\n *\r\n * @param {HTMLElement} el The EventTarget to unregister the listenr from.\r\n * @param {string} event The event type to remove.\r\n * @param {Function} fn The event handler to remove.\r\n * @param {boolean} useCapture Specifices if the event to be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree.\r\n * @param {boolean} passive A Boolean which, if true, indicates that the function specified by listener will never call preventDefault().\r\n */ var off = function(el, event, fn, useCapture, passive) {\n el.removeEventListener(event, fn, IsPassiveSupported ? {\n capture: useCapture,\n passive: passive\n } : useCapture === true);\n };\n /**\r\n * Prevent default event from firing\r\n *\r\n * @param {Event} event Event object\r\n * @return {undefined}\r\n\r\n function prevent ( event ) {\r\n if ( event ) {\r\n if ( event.preventDefault ) {\r\n event.preventDefault();\r\n } else {\r\n event.returnValue = false;\r\n }\r\n }\r\n }\r\n */ var transition = function() {\n var t, type;\n var supported = false;\n var transitions = {\n \"animation\": \"animationend\",\n \"OAnimation\": \"oAnimationEnd oanimationend\",\n \"msAnimation\": \"MSAnimationEnd\",\n \"MozAnimation\": \"animationend\",\n \"WebkitAnimation\": \"webkitAnimationEnd\"\n };\n for(t in transitions)if (document.documentElement.style[t] !== undefined) {\n type = transitions[t];\n supported = true;\n break;\n }\n return {\n type: type,\n supported: supported\n };\n }();\n /**\r\n * Creates event handler delegate that sends the instance as last argument.\r\n * \r\n * @return {Function} a function wrapper which sends the instance as last argument.\r\n */ function delegate(context, method) {\n return function() {\n if (arguments.length > 0) {\n var args = [];\n for(var x = 0; x < arguments.length; x += 1)args.push(arguments[x]);\n args.push(context);\n return method.apply(context, args);\n }\n return method.apply(context, [\n null,\n context\n ]);\n };\n }\n /**\r\n * Helper for creating a dialog close event.\r\n * \r\n * @return {object}\r\n */ function createCloseEvent(index, button) {\n return {\n index: index,\n button: button,\n cancel: false\n };\n }\n /**\r\n * Helper for dispatching events.\r\n *\r\n * @param {string} evenType The type of the event to disptach.\r\n * @param {object} instance The dialog instance disptaching the event.\r\n *\r\n * @return {any} The result of the invoked function.\r\n */ function dispatchEvent(eventType, instance) {\n if (typeof instance.get(eventType) === \"function\") return instance.get(eventType).call(instance);\n }\n /**\r\n * Super class for all dialogs\r\n *\r\n * @return {Object}\t\tbase dialog prototype\r\n */ var dialog = function() {\n var usedKeys = [], //dummy variable, used to trigger dom reflow.\n reflow = null, //holds body tab index in case it has any.\n tabindex = false, //condition for detecting safari\n isSafari = window1.navigator.userAgent.indexOf(\"Safari\") > -1 && window1.navigator.userAgent.indexOf(\"Chrome\") < 0, //dialog building blocks\n templates = {\n dimmer: '
',\n /*tab index required to fire click event before body focus*/ modal: '
',\n dialog: '
',\n reset: '',\n commands: '
',\n header: '
',\n body: '
',\n content: '
',\n footer: '
',\n buttons: {\n primary: '
',\n auxiliary: '
'\n },\n button: '',\n resizeHandle: '
'\n }, //common class names\n classes = {\n animationIn: \"ajs-in\",\n animationOut: \"ajs-out\",\n base: \"alertify\",\n basic: \"ajs-basic\",\n capture: \"ajs-capture\",\n closable: \"ajs-closable\",\n fixed: \"ajs-fixed\",\n frameless: \"ajs-frameless\",\n hidden: \"ajs-hidden\",\n maximize: \"ajs-maximize\",\n maximized: \"ajs-maximized\",\n maximizable: \"ajs-maximizable\",\n modeless: \"ajs-modeless\",\n movable: \"ajs-movable\",\n noSelection: \"ajs-no-selection\",\n noOverflow: \"ajs-no-overflow\",\n noPadding: \"ajs-no-padding\",\n pin: \"ajs-pin\",\n pinnable: \"ajs-pinnable\",\n prefix: \"ajs-\",\n resizable: \"ajs-resizable\",\n restore: \"ajs-restore\",\n shake: \"ajs-shake\",\n unpinned: \"ajs-unpinned\",\n noTransition: \"ajs-no-transition\"\n };\n /**\r\n * Helper: initializes the dialog instance\r\n * \r\n * @return\t{Number}\tThe total count of currently open modals.\r\n */ function initialize(instance) {\n if (!instance.__internal) {\n //invoke preinit global hook\n alertify.defaults.hooks.preinit(instance);\n //no need to expose init after this.\n delete instance.__init;\n //keep a copy of initial dialog settings\n if (!instance.__settings) instance.__settings = copy(instance.settings);\n //get dialog buttons/focus setup\n var setup;\n if (typeof instance.setup === \"function\") {\n setup = instance.setup();\n setup.options = setup.options || {};\n setup.focus = setup.focus || {};\n } else setup = {\n buttons: [],\n focus: {\n element: null,\n select: false\n },\n options: {}\n };\n //initialize hooks object.\n if (typeof instance.hooks !== \"object\") instance.hooks = {};\n //copy buttons defintion\n var buttonsDefinition = [];\n if (Array.isArray(setup.buttons)) for(var b = 0; b < setup.buttons.length; b += 1){\n var ref = setup.buttons[b], cpy = {};\n for(var i in ref)if (ref.hasOwnProperty(i)) cpy[i] = ref[i];\n buttonsDefinition.push(cpy);\n }\n var internal = instance.__internal = {\n /**\r\n * Flag holding the open state of the dialog\r\n * \r\n * @type {Boolean}\r\n */ isOpen: false,\n /**\r\n * Active element is the element that will receive focus after\r\n * closing the dialog. It defaults as the body tag, but gets updated\r\n * to the last focused element before the dialog was opened.\r\n *\r\n * @type {Node}\r\n */ activeElement: document.body,\n timerIn: undefined,\n timerOut: undefined,\n buttons: buttonsDefinition,\n focus: setup.focus,\n options: {\n title: undefined,\n modal: undefined,\n basic: undefined,\n frameless: undefined,\n defaultFocusOff: undefined,\n pinned: undefined,\n movable: undefined,\n moveBounded: undefined,\n resizable: undefined,\n autoReset: undefined,\n closable: undefined,\n closableByDimmer: undefined,\n invokeOnCloseOff: undefined,\n maximizable: undefined,\n startMaximized: undefined,\n pinnable: undefined,\n transition: undefined,\n transitionOff: undefined,\n padding: undefined,\n overflow: undefined,\n onshow: undefined,\n onclosing: undefined,\n onclose: undefined,\n onfocus: undefined,\n onmove: undefined,\n onmoved: undefined,\n onresize: undefined,\n onresized: undefined,\n onmaximize: undefined,\n onmaximized: undefined,\n onrestore: undefined,\n onrestored: undefined\n },\n resetHandler: undefined,\n beginMoveHandler: undefined,\n beginResizeHandler: undefined,\n bringToFrontHandler: undefined,\n modalClickHandler: undefined,\n buttonsClickHandler: undefined,\n commandsClickHandler: undefined,\n transitionInHandler: undefined,\n transitionOutHandler: undefined,\n destroy: undefined\n };\n var elements = {};\n //root node\n elements.root = document.createElement(\"div\");\n //prevent FOUC in case of async styles loading.\n elements.root.style.display = \"none\";\n elements.root.className = classes.base + \" \" + classes.hidden + \" \";\n elements.root.innerHTML = templates.dimmer + templates.modal;\n //dimmer\n elements.dimmer = elements.root.firstChild;\n //dialog\n elements.modal = elements.root.lastChild;\n elements.modal.innerHTML = templates.dialog;\n elements.dialog = elements.modal.firstChild;\n elements.dialog.innerHTML = templates.reset + templates.commands + templates.header + templates.body + templates.footer + templates.resizeHandle + templates.reset;\n //reset links\n elements.reset = [];\n elements.reset.push(elements.dialog.firstChild);\n elements.reset.push(elements.dialog.lastChild);\n //commands\n elements.commands = {};\n elements.commands.container = elements.reset[0].nextSibling;\n elements.commands.pin = elements.commands.container.firstChild;\n elements.commands.maximize = elements.commands.pin.nextSibling;\n elements.commands.close = elements.commands.maximize.nextSibling;\n //header\n elements.header = elements.commands.container.nextSibling;\n //body\n elements.body = elements.header.nextSibling;\n elements.body.innerHTML = templates.content;\n elements.content = elements.body.firstChild;\n //footer\n elements.footer = elements.body.nextSibling;\n elements.footer.innerHTML = templates.buttons.auxiliary + templates.buttons.primary;\n //resize handle\n elements.resizeHandle = elements.footer.nextSibling;\n //buttons\n elements.buttons = {};\n elements.buttons.auxiliary = elements.footer.firstChild;\n elements.buttons.primary = elements.buttons.auxiliary.nextSibling;\n elements.buttons.primary.innerHTML = templates.button;\n elements.buttonTemplate = elements.buttons.primary.firstChild;\n //remove button template\n elements.buttons.primary.removeChild(elements.buttonTemplate);\n for(var x = 0; x < instance.__internal.buttons.length; x += 1){\n var button = instance.__internal.buttons[x];\n // add to the list of used keys.\n if (usedKeys.indexOf(button.key) < 0) usedKeys.push(button.key);\n button.element = elements.buttonTemplate.cloneNode();\n button.element.innerHTML = button.text;\n if (typeof button.className === \"string\" && button.className !== \"\") addClass(button.element, button.className);\n for(var key in button.attrs)if (key !== \"className\" && button.attrs.hasOwnProperty(key)) button.element.setAttribute(key, button.attrs[key]);\n if (button.scope === \"auxiliary\") elements.buttons.auxiliary.appendChild(button.element);\n else elements.buttons.primary.appendChild(button.element);\n }\n //make elements pubic\n instance.elements = elements;\n //save event handlers delegates\n internal.resetHandler = delegate(instance, onReset);\n internal.beginMoveHandler = delegate(instance, beginMove);\n internal.beginResizeHandler = delegate(instance, beginResize);\n internal.bringToFrontHandler = delegate(instance, bringToFront);\n internal.modalClickHandler = delegate(instance, modalClickHandler);\n internal.buttonsClickHandler = delegate(instance, buttonsClickHandler);\n internal.commandsClickHandler = delegate(instance, commandsClickHandler);\n internal.transitionInHandler = delegate(instance, handleTransitionInEvent);\n internal.transitionOutHandler = delegate(instance, handleTransitionOutEvent);\n //settings\n for(var opKey in internal.options){\n if (setup.options[opKey] !== undefined) // if found in user options\n instance.set(opKey, setup.options[opKey]);\n else if (alertify.defaults.hasOwnProperty(opKey)) // else if found in defaults options\n instance.set(opKey, alertify.defaults[opKey]);\n else if (opKey === \"title\") // else if title key, use alertify.defaults.glossary\n instance.set(opKey, alertify.defaults.glossary[opKey]);\n }\n // allow dom customization\n if (typeof instance.build === \"function\") instance.build();\n //invoke postinit global hook\n alertify.defaults.hooks.postinit(instance);\n }\n //add to the end of the DOM tree.\n document.body.appendChild(instance.elements.root);\n }\n /**\r\n * Helper: maintains scroll position\r\n *\r\n */ var scrollX, scrollY;\n function saveScrollPosition() {\n scrollX = getScrollLeft();\n scrollY = getScrollTop();\n }\n function restoreScrollPosition() {\n window1.scrollTo(scrollX, scrollY);\n }\n /**\r\n * Helper: adds/removes no-overflow class from body\r\n *\r\n */ function ensureNoOverflow() {\n var requiresNoOverflow = 0;\n for(var x = 0; x < openDialogs.length; x += 1){\n var instance = openDialogs[x];\n if (instance.isModal() || instance.isMaximized()) requiresNoOverflow += 1;\n }\n if (requiresNoOverflow === 0 && document.body.className.indexOf(classes.noOverflow) >= 0) {\n //last open modal or last maximized one\n removeClass(document.body, classes.noOverflow);\n preventBodyShift(false);\n } else if (requiresNoOverflow > 0 && document.body.className.indexOf(classes.noOverflow) < 0) {\n //first open modal or first maximized one\n preventBodyShift(true);\n addClass(document.body, classes.noOverflow);\n }\n }\n var top = \"\", topScroll = 0;\n /**\r\n * Helper: prevents body shift.\r\n *\r\n */ function preventBodyShift(add) {\n if (alertify.defaults.preventBodyShift) {\n if (add && document.documentElement.scrollHeight > document.documentElement.clientHeight) {\n topScroll = scrollY;\n top = window1.getComputedStyle(document.body).top;\n addClass(document.body, classes.fixed);\n document.body.style.top = -scrollY + \"px\";\n } else if (!add) {\n scrollY = topScroll;\n document.body.style.top = top;\n removeClass(document.body, classes.fixed);\n restoreScrollPosition();\n }\n }\n }\n /**\r\n * Sets the name of the transition used to show/hide the dialog\r\n * \r\n * @param {Object} instance The dilog instance.\r\n *\r\n */ function updateTransition(instance, value, oldValue) {\n if (typeof oldValue === \"string\") removeClass(instance.elements.root, classes.prefix + oldValue);\n addClass(instance.elements.root, classes.prefix + value);\n reflow = instance.elements.root.offsetWidth;\n }\n /**\r\n * Toggles the dialog no transition \r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function updateTransitionOff(instance) {\n if (instance.get(\"transitionOff\")) // add class\n addClass(instance.elements.root, classes.noTransition);\n else // remove class\n removeClass(instance.elements.root, classes.noTransition);\n }\n /**\r\n * Toggles the dialog display mode\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function updateDisplayMode(instance) {\n if (instance.get(\"modal\")) {\n //make modal\n removeClass(instance.elements.root, classes.modeless);\n //only if open\n if (instance.isOpen()) {\n unbindModelessEvents(instance);\n //in case a pinned modless dialog was made modal while open.\n updateAbsPositionFix(instance);\n ensureNoOverflow();\n }\n } else {\n //make modelss\n addClass(instance.elements.root, classes.modeless);\n //only if open\n if (instance.isOpen()) {\n bindModelessEvents(instance);\n //in case pin/unpin was called while a modal is open\n updateAbsPositionFix(instance);\n ensureNoOverflow();\n }\n }\n }\n /**\r\n * Toggles the dialog basic view mode \r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function updateBasicMode(instance) {\n if (instance.get(\"basic\")) // add class\n addClass(instance.elements.root, classes.basic);\n else // remove class\n removeClass(instance.elements.root, classes.basic);\n }\n /**\r\n * Toggles the dialog frameless view mode \r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function updateFramelessMode(instance) {\n if (instance.get(\"frameless\")) // add class\n addClass(instance.elements.root, classes.frameless);\n else // remove class\n removeClass(instance.elements.root, classes.frameless);\n }\n /**\r\n * Helper: Brings the modeless dialog to front, attached to modeless dialogs.\r\n *\r\n * @param {Event} event Focus event\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function bringToFront(event, instance) {\n // Do not bring to front if preceeded by an open modal\n var index = openDialogs.indexOf(instance);\n for(var x = index + 1; x < openDialogs.length; x += 1){\n if (openDialogs[x].isModal()) return;\n }\n // Bring to front by making it the last child.\n if (document.body.lastChild !== instance.elements.root) {\n document.body.appendChild(instance.elements.root);\n //also make sure its at the end of the list\n openDialogs.splice(openDialogs.indexOf(instance), 1);\n openDialogs.push(instance);\n setFocus(instance);\n }\n return false;\n }\n /**\r\n * Helper: reflects dialogs options updates\r\n *\r\n * @param {Object} instance The dilog instance.\r\n * @param {String} option The updated option name.\r\n *\r\n * @return\t{undefined}\t\r\n */ function optionUpdated(instance, option, oldValue, newValue) {\n switch(option){\n case \"title\":\n instance.setHeader(newValue);\n break;\n case \"modal\":\n updateDisplayMode(instance);\n break;\n case \"basic\":\n updateBasicMode(instance);\n break;\n case \"frameless\":\n updateFramelessMode(instance);\n break;\n case \"pinned\":\n updatePinned(instance);\n break;\n case \"closable\":\n updateClosable(instance);\n break;\n case \"maximizable\":\n updateMaximizable(instance);\n break;\n case \"pinnable\":\n updatePinnable(instance);\n break;\n case \"movable\":\n updateMovable(instance);\n break;\n case \"resizable\":\n updateResizable(instance);\n break;\n case \"padding\":\n if (newValue) removeClass(instance.elements.root, classes.noPadding);\n else if (instance.elements.root.className.indexOf(classes.noPadding) < 0) addClass(instance.elements.root, classes.noPadding);\n break;\n case \"overflow\":\n if (newValue) removeClass(instance.elements.root, classes.noOverflow);\n else if (instance.elements.root.className.indexOf(classes.noOverflow) < 0) addClass(instance.elements.root, classes.noOverflow);\n break;\n case \"transition\":\n updateTransition(instance, newValue, oldValue);\n break;\n case \"transitionOff\":\n updateTransitionOff(instance);\n break;\n }\n // internal on option updated event\n if (typeof instance.hooks.onupdate === \"function\") instance.hooks.onupdate.call(instance, option, oldValue, newValue);\n }\n /**\r\n * Helper: reflects dialogs options updates\r\n *\r\n * @param {Object} instance The dilog instance.\r\n * @param {Object} obj The object to set/get a value on/from.\r\n * @param {Function} callback The callback function to call if the key was found.\r\n * @param {String|Object} key A string specifying a propery name or a collection of key value pairs.\r\n * @param {Object} value Optional, the value associated with the key (in case it was a string).\r\n * @param {String} option The updated option name.\r\n *\r\n * @return\t{Object} result object \r\n *\tThe result objects has an 'op' property, indicating of this is a SET or GET operation.\r\n *\t\tGET: \r\n *\t\t- found: a flag indicating if the key was found or not.\r\n *\t\t- value: the property value.\r\n *\t\tSET:\r\n *\t\t- items: a list of key value pairs of the properties being set.\r\n *\t\t\t\teach contains:\r\n *\t\t\t\t\t- found: a flag indicating if the key was found or not.\r\n *\t\t\t\t\t- key: the property key.\r\n *\t\t\t\t\t- value: the property value.\r\n */ function update(instance, obj, callback, key, value) {\n var result = {\n op: undefined,\n items: []\n };\n if (typeof value === \"undefined\" && typeof key === \"string\") {\n //get\n result.op = \"get\";\n if (obj.hasOwnProperty(key)) {\n result.found = true;\n result.value = obj[key];\n } else {\n result.found = false;\n result.value = undefined;\n }\n } else {\n var old;\n //set\n result.op = \"set\";\n if (typeof key === \"object\") {\n //set multiple\n var args = key;\n for(var prop in args)if (obj.hasOwnProperty(prop)) {\n if (obj[prop] !== args[prop]) {\n old = obj[prop];\n obj[prop] = args[prop];\n callback.call(instance, prop, old, args[prop]);\n }\n result.items.push({\n \"key\": prop,\n \"value\": args[prop],\n \"found\": true\n });\n } else result.items.push({\n \"key\": prop,\n \"value\": args[prop],\n \"found\": false\n });\n } else if (typeof key === \"string\") {\n //set single\n if (obj.hasOwnProperty(key)) {\n if (obj[key] !== value) {\n old = obj[key];\n obj[key] = value;\n callback.call(instance, key, old, value);\n }\n result.items.push({\n \"key\": key,\n \"value\": value,\n \"found\": true\n });\n } else result.items.push({\n \"key\": key,\n \"value\": value,\n \"found\": false\n });\n } else //invalid params\n throw new Error(\"args must be a string or object\");\n }\n return result;\n }\n /**\r\n * Triggers a close event.\r\n *\r\n * @param {Object} instance\tThe dilog instance.\r\n * \r\n * @return {undefined}\r\n */ function triggerClose(instance) {\n var found;\n triggerCallback(instance, function(button) {\n return found = instance.get(\"invokeOnCloseOff\") !== true && button.invokeOnClose === true;\n });\n //none of the buttons registered as onclose callback\n //close the dialog\n if (!found && instance.isOpen()) instance.close();\n }\n /**\r\n * Dialogs commands event handler, attached to the dialog commands element.\r\n *\r\n * @param {Event} event\tDOM event object.\r\n * @param {Object} instance\tThe dilog instance.\r\n * \r\n * @return {undefined}\r\n */ function commandsClickHandler(event, instance) {\n var target = event.srcElement || event.target;\n switch(target){\n case instance.elements.commands.pin:\n if (!instance.isPinned()) pin(instance);\n else unpin(instance);\n break;\n case instance.elements.commands.maximize:\n if (!instance.isMaximized()) maximize(instance);\n else restore(instance);\n break;\n case instance.elements.commands.close:\n triggerClose(instance);\n break;\n }\n return false;\n }\n /**\r\n * Helper: pins the modeless dialog.\r\n *\r\n * @param {Object} instance\tThe dialog instance.\r\n * \r\n * @return {undefined}\r\n */ function pin(instance) {\n //pin the dialog\n instance.set(\"pinned\", true);\n }\n /**\r\n * Helper: unpins the modeless dialog.\r\n *\r\n * @param {Object} instance\tThe dilog instance.\r\n * \r\n * @return {undefined}\r\n */ function unpin(instance) {\n //unpin the dialog \n instance.set(\"pinned\", false);\n }\n /**\r\n * Helper: enlarges the dialog to fill the entire screen.\r\n *\r\n * @param {Object} instance\tThe dilog instance.\r\n * \r\n * @return {undefined}\r\n */ function maximize(instance) {\n // allow custom `onmaximize` method\n dispatchEvent(\"onmaximize\", instance);\n //maximize the dialog \n addClass(instance.elements.root, classes.maximized);\n if (instance.isOpen()) ensureNoOverflow();\n // allow custom `onmaximized` method\n dispatchEvent(\"onmaximized\", instance);\n }\n /**\r\n * Helper: returns the dialog to its former size.\r\n *\r\n * @param {Object} instance\tThe dilog instance.\r\n * \r\n * @return {undefined}\r\n */ function restore(instance) {\n // allow custom `onrestore` method\n dispatchEvent(\"onrestore\", instance);\n //maximize the dialog \n removeClass(instance.elements.root, classes.maximized);\n if (instance.isOpen()) ensureNoOverflow();\n // allow custom `onrestored` method\n dispatchEvent(\"onrestored\", instance);\n }\n /**\r\n * Show or hide the maximize box.\r\n *\r\n * @param {Object} instance The dilog instance.\r\n * @param {Boolean} on True to add the behavior, removes it otherwise.\r\n *\r\n * @return {undefined}\r\n */ function updatePinnable(instance) {\n if (instance.get(\"pinnable\")) // add class\n addClass(instance.elements.root, classes.pinnable);\n else // remove class\n removeClass(instance.elements.root, classes.pinnable);\n }\n /**\r\n * Helper: Fixes the absolutly positioned modal div position.\r\n *\r\n * @param {Object} instance The dialog instance.\r\n *\r\n * @return {undefined}\r\n */ function addAbsPositionFix(instance) {\n var scrollLeft = getScrollLeft();\n instance.elements.modal.style.marginTop = getScrollTop() + \"px\";\n instance.elements.modal.style.marginLeft = scrollLeft + \"px\";\n instance.elements.modal.style.marginRight = -scrollLeft + \"px\";\n }\n /**\r\n * Helper: Removes the absolutly positioned modal div position fix.\r\n *\r\n * @param {Object} instance The dialog instance.\r\n *\r\n * @return {undefined}\r\n */ function removeAbsPositionFix(instance) {\n var marginTop = parseInt(instance.elements.modal.style.marginTop, 10);\n var marginLeft = parseInt(instance.elements.modal.style.marginLeft, 10);\n instance.elements.modal.style.marginTop = \"\";\n instance.elements.modal.style.marginLeft = \"\";\n instance.elements.modal.style.marginRight = \"\";\n if (instance.isOpen()) {\n var top = 0, left = 0;\n if (instance.elements.dialog.style.top !== \"\") top = parseInt(instance.elements.dialog.style.top, 10);\n instance.elements.dialog.style.top = top + (marginTop - getScrollTop()) + \"px\";\n if (instance.elements.dialog.style.left !== \"\") left = parseInt(instance.elements.dialog.style.left, 10);\n instance.elements.dialog.style.left = left + (marginLeft - getScrollLeft()) + \"px\";\n }\n }\n /**\r\n * Helper: Adds/Removes the absolutly positioned modal div position fix based on its pinned setting.\r\n *\r\n * @param {Object} instance The dialog instance.\r\n *\r\n * @return {undefined}\r\n */ function updateAbsPositionFix(instance) {\n // if modeless and unpinned add fix\n if (!instance.get(\"modal\") && !instance.get(\"pinned\")) addAbsPositionFix(instance);\n else removeAbsPositionFix(instance);\n }\n /**\r\n * Toggles the dialog position lock | modeless only.\r\n *\r\n * @param {Object} instance The dilog instance.\r\n * @param {Boolean} on True to make it modal, false otherwise.\r\n *\r\n * @return {undefined}\r\n */ function updatePinned(instance) {\n if (instance.get(\"pinned\")) {\n removeClass(instance.elements.root, classes.unpinned);\n if (instance.isOpen()) removeAbsPositionFix(instance);\n } else {\n addClass(instance.elements.root, classes.unpinned);\n if (instance.isOpen() && !instance.isModal()) addAbsPositionFix(instance);\n }\n }\n /**\r\n * Show or hide the maximize box.\r\n *\r\n * @param {Object} instance The dilog instance.\r\n * @param {Boolean} on True to add the behavior, removes it otherwise.\r\n *\r\n * @return {undefined}\r\n */ function updateMaximizable(instance) {\n if (instance.get(\"maximizable\")) // add class\n addClass(instance.elements.root, classes.maximizable);\n else // remove class\n removeClass(instance.elements.root, classes.maximizable);\n }\n /**\r\n * Show or hide the close box.\r\n *\r\n * @param {Object} instance The dilog instance.\r\n * @param {Boolean} on True to add the behavior, removes it otherwise.\r\n *\r\n * @return {undefined}\r\n */ function updateClosable(instance) {\n if (instance.get(\"closable\")) {\n // add class\n addClass(instance.elements.root, classes.closable);\n bindClosableEvents(instance);\n } else {\n // remove class\n removeClass(instance.elements.root, classes.closable);\n unbindClosableEvents(instance);\n }\n }\n var cancelClick = false, modalClickHandlerTS = 0 // stores last click timestamp to prevent executing the handler twice on double click.\n ;\n /**\r\n * Helper: closes the modal dialog when clicking the modal\r\n *\r\n * @param {Event} event\tDOM event object.\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function modalClickHandler(event, instance) {\n if (event.timeStamp - modalClickHandlerTS > 200 && (modalClickHandlerTS = event.timeStamp) && !cancelClick) {\n var target = event.srcElement || event.target;\n if (instance.get(\"closableByDimmer\") === true && target === instance.elements.modal) triggerClose(instance);\n }\n cancelClick = false;\n }\n // stores last call timestamp to prevent triggering the callback twice.\n var callbackTS = 0;\n // flag to cancel keyup event if already handled by click event (pressing Enter on a focusted button).\n var cancelKeyup = false;\n /** \r\n * Helper: triggers a button callback\r\n *\r\n * @param {Object}\t\tThe dilog instance.\r\n * @param {Function}\tCallback to check which button triggered the event.\r\n *\r\n * @return {undefined}\r\n */ function triggerCallback(instance, check) {\n if (Date.now() - callbackTS > 200 && (callbackTS = Date.now())) for(var idx = 0; idx < instance.__internal.buttons.length; idx += 1){\n var button = instance.__internal.buttons[idx];\n if (!button.element.disabled && check(button)) {\n var closeEvent = createCloseEvent(idx, button);\n if (typeof instance.callback === \"function\") instance.callback.apply(instance, [\n closeEvent\n ]);\n //close the dialog only if not canceled.\n if (closeEvent.cancel === false) instance.close();\n break;\n }\n }\n }\n /**\r\n * Clicks event handler, attached to the dialog footer.\r\n *\r\n * @param {Event}\t\tDOM event object.\r\n * @param {Object}\t\tThe dilog instance.\r\n * \r\n * @return {undefined}\r\n */ function buttonsClickHandler(event, instance) {\n var target = event.srcElement || event.target;\n triggerCallback(instance, function(button) {\n // if this button caused the click, cancel keyup event\n return button.element === target && (cancelKeyup = true);\n });\n }\n /**\r\n * Keyup event handler, attached to the document.body\r\n *\r\n * @param {Event}\t\tDOM event object.\r\n * @param {Object}\t\tThe dilog instance.\r\n * \r\n * @return {undefined}\r\n */ function keyupHandler(event) {\n //hitting enter while button has focus will trigger keyup too.\n //ignore if handled by clickHandler\n if (cancelKeyup) {\n cancelKeyup = false;\n return;\n }\n var instance = openDialogs[openDialogs.length - 1];\n var keyCode = event.keyCode;\n if (instance.__internal.buttons.length === 0 && keyCode === keys.ESC && instance.get(\"closable\") === true) {\n triggerClose(instance);\n return false;\n } else if (usedKeys.indexOf(keyCode) > -1) {\n triggerCallback(instance, function(button) {\n return button.key === keyCode;\n });\n return false;\n }\n }\n /**\r\n * Keydown event handler, attached to the document.body\r\n *\r\n * @param {Event}\t\tDOM event object.\r\n * @param {Object}\t\tThe dilog instance.\r\n * \r\n * @return {undefined}\r\n */ function keydownHandler(event) {\n var instance = openDialogs[openDialogs.length - 1];\n var keyCode = event.keyCode;\n if (keyCode === keys.LEFT || keyCode === keys.RIGHT) {\n var buttons = instance.__internal.buttons;\n for(var x = 0; x < buttons.length; x += 1)if (document.activeElement === buttons[x].element) switch(keyCode){\n case keys.LEFT:\n buttons[(x || buttons.length) - 1].element.focus();\n return;\n case keys.RIGHT:\n buttons[(x + 1) % buttons.length].element.focus();\n return;\n }\n } else if (keyCode < keys.F12 + 1 && keyCode > keys.F1 - 1 && usedKeys.indexOf(keyCode) > -1) {\n event.preventDefault();\n event.stopPropagation();\n triggerCallback(instance, function(button) {\n return button.key === keyCode;\n });\n return false;\n }\n }\n /**\r\n * Sets focus to proper dialog element\r\n *\r\n * @param {Object} instance The dilog instance.\r\n * @param {Node} [resetTarget=undefined] DOM element to reset focus to.\r\n *\r\n * @return {undefined}\r\n */ function setFocus(instance, resetTarget) {\n // reset target has already been determined.\n if (resetTarget) resetTarget.focus();\n else {\n // current instance focus settings\n var focus = instance.__internal.focus;\n // the focus element.\n var element = focus.element;\n switch(typeof focus.element){\n // a number means a button index\n case \"number\":\n if (instance.__internal.buttons.length > focus.element) {\n //in basic view, skip focusing the buttons.\n if (instance.get(\"basic\") === true) element = instance.elements.reset[0];\n else element = instance.__internal.buttons[focus.element].element;\n }\n break;\n // a string means querySelector to select from dialog body contents.\n case \"string\":\n element = instance.elements.body.querySelector(focus.element);\n break;\n // a function should return the focus element.\n case \"function\":\n element = focus.element.call(instance);\n break;\n }\n // if no focus element, default to first reset element.\n if (instance.get(\"defaultFocusOff\") === true || (typeof element === \"undefined\" || element === null) && instance.__internal.buttons.length === 0) element = instance.elements.reset[0];\n // focus\n if (element && element.focus) {\n element.focus();\n // if selectable\n if (focus.select && element.select) element.select();\n }\n }\n }\n /**\r\n * Focus event handler, attached to document.body and dialogs own reset links.\r\n * handles the focus for modal dialogs only.\r\n *\r\n * @param {Event} event DOM focus event object.\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function onReset(event, instance) {\n // should work on last modal if triggered from document.body \n if (!instance) {\n for(var x = openDialogs.length - 1; x > -1; x -= 1)if (openDialogs[x].isModal()) {\n instance = openDialogs[x];\n break;\n }\n }\n if (instance) // if modal\n {\n if (instance.isModal()) {\n // determine reset target to enable forward/backward tab cycle.\n var firstReset = instance.elements.reset[0], lastReset = instance.elements.reset[1], lastFocusedElement = event.relatedTarget, within = instance.elements.root.contains(lastFocusedElement), target = event.srcElement || event.target, resetTarget;\n //if the previous focused element element was outside the modal do nthing\n if (/*first show */ target === firstReset && !within || /*focus cycle */ target === lastReset && lastFocusedElement === firstReset) return;\n else if (target === lastReset || target === document.body) resetTarget = firstReset;\n else if (target === firstReset && lastFocusedElement === lastReset) resetTarget = findTabbable(instance);\n else if (target === firstReset && within) resetTarget = findTabbable(instance, true);\n // focus\n setFocus(instance, resetTarget);\n }\n }\n }\n function findTabbable(instance, last) {\n var tabbables = [].slice.call(instance.elements.dialog.querySelectorAll(defaults.tabbable));\n if (last) tabbables.reverse();\n for(var x = 0; x < tabbables.length; x += 1){\n var tabbable = tabbables[x];\n //check if visible\n if (!!(tabbable.offsetParent || tabbable.offsetWidth || tabbable.offsetHeight || tabbable.getClientRects().length)) return tabbable;\n }\n }\n function recycleTab(event) {\n var instance = openDialogs[openDialogs.length - 1];\n if (instance && event.shiftKey && event.keyCode === keys.TAB) instance.elements.reset[1].focus();\n }\n /**\r\n * Transition in transitionend event handler. \r\n *\r\n * @param {Event}\t\tTransitionEnd event object.\r\n * @param {Object}\t\tThe dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function handleTransitionInEvent(event, instance) {\n // clear the timer\n clearTimeout(instance.__internal.timerIn);\n // once transition is complete, set focus\n setFocus(instance);\n // allow handling key up after transition ended.\n cancelKeyup = false;\n // allow custom `onfocus` method\n dispatchEvent(\"onfocus\", instance);\n // unbind the event\n off(instance.elements.dialog, transition.type, instance.__internal.transitionInHandler);\n removeClass(instance.elements.root, classes.animationIn);\n }\n /**\r\n * Transition out transitionend event handler. \r\n *\r\n * @param {Event}\t\tTransitionEnd event object.\r\n * @param {Object}\t\tThe dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function handleTransitionOutEvent(event, instance) {\n // clear the timer\n clearTimeout(instance.__internal.timerOut);\n // unbind the event\n off(instance.elements.dialog, transition.type, instance.__internal.transitionOutHandler);\n // reset move updates\n resetMove(instance);\n // reset resize updates\n resetResize(instance);\n // restore if maximized\n if (instance.isMaximized() && !instance.get(\"startMaximized\")) restore(instance);\n //destory the instance\n if (typeof instance.__internal.destroy === \"function\") instance.__internal.destroy.apply(instance);\n }\n /* Controls moving a dialog around */ //holde the current moving instance\n var movable = null, //holds the current X offset when move starts\n offsetX = 0, //holds the current Y offset when move starts\n offsetY = 0, xProp = \"pageX\", yProp = \"pageY\", bounds = null, refreshTop = false, moveDelegate = null;\n /**\r\n * Helper: sets the element top/left coordinates\r\n *\r\n * @param {Event} event\tDOM event object.\r\n * @param {Node} element The element being moved.\r\n * \r\n * @return {undefined}\r\n */ function moveElement(event, element) {\n var left = event[xProp] - offsetX, top = event[yProp] - offsetY;\n if (refreshTop) top -= document.body.scrollTop;\n element.style.left = left + \"px\";\n element.style.top = top + \"px\";\n }\n /**\r\n * Helper: sets the element top/left coordinates within screen bounds\r\n *\r\n * @param {Event} event\tDOM event object.\r\n * @param {Node} element The element being moved.\r\n * \r\n * @return {undefined}\r\n */ function moveElementBounded(event, element) {\n var left = event[xProp] - offsetX, top = event[yProp] - offsetY;\n if (refreshTop) top -= document.body.scrollTop;\n element.style.left = Math.min(bounds.maxLeft, Math.max(bounds.minLeft, left)) + \"px\";\n if (refreshTop) element.style.top = Math.min(bounds.maxTop, Math.max(bounds.minTop, top)) + \"px\";\n else element.style.top = Math.max(bounds.minTop, top) + \"px\";\n }\n /**\r\n * Triggers the start of a move event, attached to the header element mouse down event.\r\n * Adds no-selection class to the body, disabling selection while moving.\r\n *\r\n * @param {Event} event\tDOM event object.\r\n * @param {Object} instance The dilog instance.\r\n * \r\n * @return {Boolean} false\r\n */ function beginMove(event, instance) {\n if (resizable === null && !instance.isMaximized() && instance.get(\"movable\")) {\n var eventSrc, left = 0, top = 0;\n if (event.type === \"touchstart\") {\n event.preventDefault();\n eventSrc = event.targetTouches[0];\n xProp = \"clientX\";\n yProp = \"clientY\";\n } else if (event.button === 0) eventSrc = event;\n if (eventSrc) {\n var element = instance.elements.dialog;\n addClass(element, classes.capture);\n if (element.style.left) left = parseInt(element.style.left, 10);\n if (element.style.top) top = parseInt(element.style.top, 10);\n offsetX = eventSrc[xProp] - left;\n offsetY = eventSrc[yProp] - top;\n if (instance.isModal()) offsetY += instance.elements.modal.scrollTop;\n else if (instance.isPinned()) offsetY -= document.body.scrollTop;\n if (instance.get(\"moveBounded\")) {\n var current = element, offsetLeft = -left, offsetTop = -top;\n //calc offset\n do {\n offsetLeft += current.offsetLeft;\n offsetTop += current.offsetTop;\n }while (current = current.offsetParent);\n bounds = {\n maxLeft: offsetLeft,\n minLeft: -offsetLeft,\n maxTop: document.documentElement.clientHeight - element.clientHeight - offsetTop,\n minTop: -offsetTop\n };\n moveDelegate = moveElementBounded;\n } else {\n bounds = null;\n moveDelegate = moveElement;\n }\n // allow custom `onmove` method\n dispatchEvent(\"onmove\", instance);\n refreshTop = !instance.isModal() && instance.isPinned();\n movable = instance;\n moveDelegate(eventSrc, element);\n addClass(document.body, classes.noSelection);\n return false;\n }\n }\n }\n /**\r\n * The actual move handler, attached to document.body mousemove event.\r\n *\r\n * @param {Event} event\tDOM event object.\r\n * \r\n * @return {undefined}\r\n */ function move(event) {\n if (movable) {\n var eventSrc;\n if (event.type === \"touchmove\") {\n event.preventDefault();\n eventSrc = event.targetTouches[0];\n } else if (event.button === 0) eventSrc = event;\n if (eventSrc) moveDelegate(eventSrc, movable.elements.dialog);\n }\n }\n /**\r\n * Triggers the end of a move event, attached to document.body mouseup event.\r\n * Removes no-selection class from document.body, allowing selection.\r\n *\r\n * @return {undefined}\r\n */ function endMove() {\n if (movable) {\n var instance = movable;\n movable = bounds = null;\n removeClass(document.body, classes.noSelection);\n removeClass(instance.elements.dialog, classes.capture);\n // allow custom `onmoved` method\n dispatchEvent(\"onmoved\", instance);\n }\n }\n /**\r\n * Resets any changes made by moving the element to its original state,\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function resetMove(instance) {\n movable = null;\n var element = instance.elements.dialog;\n element.style.left = element.style.top = \"\";\n }\n /**\r\n * Updates the dialog move behavior.\r\n *\r\n * @param {Object} instance The dilog instance.\r\n * @param {Boolean} on True to add the behavior, removes it otherwise.\r\n *\r\n * @return {undefined}\r\n */ function updateMovable(instance) {\n if (instance.get(\"movable\")) {\n // add class\n addClass(instance.elements.root, classes.movable);\n if (instance.isOpen()) bindMovableEvents(instance);\n } else {\n //reset\n resetMove(instance);\n // remove class\n removeClass(instance.elements.root, classes.movable);\n if (instance.isOpen()) unbindMovableEvents(instance);\n }\n }\n /* Controls moving a dialog around */ //holde the current instance being resized\t\t\n var resizable = null, //holds the staring left offset when resize starts.\n startingLeft = Number.Nan, //holds the staring width when resize starts.\n startingWidth = 0, //holds the initial width when resized for the first time.\n minWidth = 0, //holds the offset of the resize handle.\n handleOffset = 0;\n /**\r\n * Helper: sets the element width/height and updates left coordinate if neccessary.\r\n *\r\n * @param {Event} event\tDOM mousemove event object.\r\n * @param {Node} element The element being moved.\r\n * @param {Boolean} pinned A flag indicating if the element being resized is pinned to the screen.\r\n * \r\n * @return {undefined}\r\n */ function resizeElement(event, element, pageRelative) {\n //calculate offsets from 0,0\n var current = element;\n var offsetLeft = 0;\n var offsetTop = 0;\n do {\n offsetLeft += current.offsetLeft;\n offsetTop += current.offsetTop;\n }while (current = current.offsetParent);\n // determine X,Y coordinates.\n var X, Y;\n if (pageRelative === true) {\n X = event.pageX;\n Y = event.pageY;\n } else {\n X = event.clientX;\n Y = event.clientY;\n }\n // rtl handling\n var isRTL = isRightToLeft();\n if (isRTL) {\n // reverse X \n X = document.body.offsetWidth - X;\n // if has a starting left, calculate offsetRight\n if (!isNaN(startingLeft)) offsetLeft = document.body.offsetWidth - offsetLeft - element.offsetWidth;\n }\n // set width/height\n element.style.height = Y - offsetTop + handleOffset + \"px\";\n element.style.width = X - offsetLeft + handleOffset + \"px\";\n // if the element being resized has a starting left, maintain it.\n // the dialog is centered, divide by half the offset to maintain the margins.\n if (!isNaN(startingLeft)) {\n var diff = Math.abs(element.offsetWidth - startingWidth) * 0.5;\n if (isRTL) //negate the diff, why?\n //when growing it should decrease left\n //when shrinking it should increase left\n diff *= -1;\n if (element.offsetWidth > startingWidth) //growing\n element.style.left = startingLeft + diff + \"px\";\n else if (element.offsetWidth >= minWidth) //shrinking\n element.style.left = startingLeft - diff + \"px\";\n }\n }\n /**\r\n * Triggers the start of a resize event, attached to the resize handle element mouse down event.\r\n * Adds no-selection class to the body, disabling selection while moving.\r\n *\r\n * @param {Event} event\tDOM event object.\r\n * @param {Object} instance The dilog instance.\r\n * \r\n * @return {Boolean} false\r\n */ function beginResize(event, instance) {\n if (!instance.isMaximized()) {\n var eventSrc;\n if (event.type === \"touchstart\") {\n event.preventDefault();\n eventSrc = event.targetTouches[0];\n } else if (event.button === 0) eventSrc = event;\n if (eventSrc) {\n // allow custom `onresize` method\n dispatchEvent(\"onresize\", instance);\n resizable = instance;\n handleOffset = instance.elements.resizeHandle.offsetHeight / 2;\n var element = instance.elements.dialog;\n addClass(element, classes.capture);\n startingLeft = parseInt(element.style.left, 10);\n element.style.height = element.offsetHeight + \"px\";\n element.style.minHeight = instance.elements.header.offsetHeight + instance.elements.footer.offsetHeight + \"px\";\n element.style.width = (startingWidth = element.offsetWidth) + \"px\";\n if (element.style.maxWidth !== \"none\") element.style.minWidth = (minWidth = element.offsetWidth) + \"px\";\n element.style.maxWidth = \"none\";\n addClass(document.body, classes.noSelection);\n return false;\n }\n }\n }\n /**\r\n * The actual resize handler, attached to document.body mousemove event.\r\n *\r\n * @param {Event} event\tDOM event object.\r\n * \r\n * @return {undefined}\r\n */ function resize(event) {\n if (resizable) {\n var eventSrc;\n if (event.type === \"touchmove\") {\n event.preventDefault();\n eventSrc = event.targetTouches[0];\n } else if (event.button === 0) eventSrc = event;\n if (eventSrc) resizeElement(eventSrc, resizable.elements.dialog, !resizable.get(\"modal\") && !resizable.get(\"pinned\"));\n }\n }\n /**\r\n * Triggers the end of a resize event, attached to document.body mouseup event.\r\n * Removes no-selection class from document.body, allowing selection.\r\n *\r\n * @return {undefined}\r\n */ function endResize() {\n if (resizable) {\n var instance = resizable;\n resizable = null;\n removeClass(document.body, classes.noSelection);\n removeClass(instance.elements.dialog, classes.capture);\n cancelClick = true;\n // allow custom `onresized` method\n dispatchEvent(\"onresized\", instance);\n }\n }\n /**\r\n * Resets any changes made by resizing the element to its original state.\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function resetResize(instance) {\n resizable = null;\n var element = instance.elements.dialog;\n if (element.style.maxWidth === \"none\") {\n //clear inline styles.\n element.style.maxWidth = element.style.minWidth = element.style.width = element.style.height = element.style.minHeight = element.style.left = \"\";\n //reset variables.\n startingLeft = Number.Nan;\n startingWidth = minWidth = handleOffset = 0;\n }\n }\n /**\r\n * Updates the dialog move behavior.\r\n *\r\n * @param {Object} instance The dilog instance.\r\n * @param {Boolean} on True to add the behavior, removes it otherwise.\r\n *\r\n * @return {undefined}\r\n */ function updateResizable(instance) {\n if (instance.get(\"resizable\")) {\n // add class\n addClass(instance.elements.root, classes.resizable);\n if (instance.isOpen()) bindResizableEvents(instance);\n } else {\n //reset\n resetResize(instance);\n // remove class\n removeClass(instance.elements.root, classes.resizable);\n if (instance.isOpen()) unbindResizableEvents(instance);\n }\n }\n /**\r\n * Reset move/resize on window resize.\r\n *\r\n * @param {Event} event\twindow resize event object.\r\n *\r\n * @return {undefined}\r\n */ function windowResize() {\n for(var x = 0; x < openDialogs.length; x += 1){\n var instance = openDialogs[x];\n if (instance.get(\"autoReset\")) {\n resetMove(instance);\n resetResize(instance);\n }\n }\n }\n /**\r\n * Bind dialogs events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function bindEvents(instance) {\n // if first dialog, hook global handlers\n if (openDialogs.length === 1) {\n //global\n on(window1, \"resize\", windowResize);\n on(document.body, \"keyup\", keyupHandler);\n on(document.body, \"keydown\", keydownHandler);\n on(document.body, \"focus\", onReset);\n //move\n on(document.documentElement, \"mousemove\", move);\n on(document.documentElement, \"touchmove\", move, false, false);\n on(document.documentElement, \"mouseup\", endMove);\n on(document.documentElement, \"touchend\", endMove);\n //resize\n on(document.documentElement, \"mousemove\", resize);\n on(document.documentElement, \"touchmove\", resize, false, false);\n on(document.documentElement, \"mouseup\", endResize);\n on(document.documentElement, \"touchend\", endResize);\n }\n // common events\n on(instance.elements.commands.container, \"click\", instance.__internal.commandsClickHandler);\n on(instance.elements.footer, \"click\", instance.__internal.buttonsClickHandler);\n on(instance.elements.reset[0], \"focusin\", instance.__internal.resetHandler);\n on(instance.elements.reset[0], \"keydown\", recycleTab);\n on(instance.elements.reset[1], \"focusin\", instance.__internal.resetHandler);\n //prevent handling key up when dialog is being opened by a key stroke.\n cancelKeyup = true;\n // hook in transition handler\n on(instance.elements.dialog, transition.type, instance.__internal.transitionInHandler);\n // modelss only events\n if (!instance.get(\"modal\")) bindModelessEvents(instance);\n // resizable\n if (instance.get(\"resizable\")) bindResizableEvents(instance);\n // movable\n if (instance.get(\"movable\")) bindMovableEvents(instance);\n }\n /**\r\n * Unbind dialogs events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function unbindEvents(instance) {\n // if last dialog, remove global handlers\n if (openDialogs.length === 1) {\n //global\n off(window1, \"resize\", windowResize);\n off(document.body, \"keyup\", keyupHandler);\n off(document.body, \"keydown\", keydownHandler);\n off(document.body, \"focus\", onReset);\n //move\n off(document.documentElement, \"mousemove\", move);\n off(document.documentElement, \"mouseup\", endMove);\n //resize\n off(document.documentElement, \"mousemove\", resize);\n off(document.documentElement, \"mouseup\", endResize);\n }\n // common events\n off(instance.elements.commands.container, \"click\", instance.__internal.commandsClickHandler);\n off(instance.elements.footer, \"click\", instance.__internal.buttonsClickHandler);\n off(instance.elements.reset[0], \"focusin\", instance.__internal.resetHandler);\n off(instance.elements.reset[0], \"keydown\", recycleTab);\n off(instance.elements.reset[1], \"focusin\", instance.__internal.resetHandler);\n // hook out transition handler\n on(instance.elements.dialog, transition.type, instance.__internal.transitionOutHandler);\n // modelss only events\n if (!instance.get(\"modal\")) unbindModelessEvents(instance);\n // movable\n if (instance.get(\"movable\")) unbindMovableEvents(instance);\n // resizable\n if (instance.get(\"resizable\")) unbindResizableEvents(instance);\n }\n /**\r\n * Bind modeless specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function bindModelessEvents(instance) {\n on(instance.elements.dialog, \"focus\", instance.__internal.bringToFrontHandler, true);\n }\n /**\r\n * Unbind modeless specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function unbindModelessEvents(instance) {\n off(instance.elements.dialog, \"focus\", instance.__internal.bringToFrontHandler, true);\n }\n /**\r\n * Bind movable specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function bindMovableEvents(instance) {\n on(instance.elements.header, \"mousedown\", instance.__internal.beginMoveHandler);\n on(instance.elements.header, \"touchstart\", instance.__internal.beginMoveHandler, false, false);\n }\n /**\r\n * Unbind movable specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function unbindMovableEvents(instance) {\n off(instance.elements.header, \"mousedown\", instance.__internal.beginMoveHandler);\n off(instance.elements.header, \"touchstart\", instance.__internal.beginMoveHandler, false, false);\n }\n /**\r\n * Bind resizable specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function bindResizableEvents(instance) {\n on(instance.elements.resizeHandle, \"mousedown\", instance.__internal.beginResizeHandler);\n on(instance.elements.resizeHandle, \"touchstart\", instance.__internal.beginResizeHandler, false, false);\n }\n /**\r\n * Unbind resizable specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function unbindResizableEvents(instance) {\n off(instance.elements.resizeHandle, \"mousedown\", instance.__internal.beginResizeHandler);\n off(instance.elements.resizeHandle, \"touchstart\", instance.__internal.beginResizeHandler, false, false);\n }\n /**\r\n * Bind closable events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function bindClosableEvents(instance) {\n on(instance.elements.modal, \"click\", instance.__internal.modalClickHandler);\n }\n /**\r\n * Unbind closable specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */ function unbindClosableEvents(instance) {\n off(instance.elements.modal, \"click\", instance.__internal.modalClickHandler);\n }\n // dialog API\n return {\n __init: initialize,\n /**\r\n * Check if dialog is currently open\r\n *\r\n * @return {Boolean}\r\n */ isOpen: function() {\n return this.__internal.isOpen;\n },\n isModal: function() {\n return this.elements.root.className.indexOf(classes.modeless) < 0;\n },\n isMaximized: function() {\n return this.elements.root.className.indexOf(classes.maximized) > -1;\n },\n isPinned: function() {\n return this.elements.root.className.indexOf(classes.unpinned) < 0;\n },\n maximize: function() {\n if (!this.isMaximized()) maximize(this);\n return this;\n },\n restore: function() {\n if (this.isMaximized()) restore(this);\n return this;\n },\n pin: function() {\n if (!this.isPinned()) pin(this);\n return this;\n },\n unpin: function() {\n if (this.isPinned()) unpin(this);\n return this;\n },\n bringToFront: function() {\n bringToFront(null, this);\n return this;\n },\n /**\r\n * Move the dialog to a specific x/y coordinates\r\n *\r\n * @param {Number} x The new dialog x coordinate in pixels.\r\n * @param {Number} y The new dialog y coordinate in pixels.\r\n *\r\n * @return {Object} The dialog instance.\r\n */ moveTo: function(x, y) {\n if (!isNaN(x) && !isNaN(y)) {\n // allow custom `onmove` method\n dispatchEvent(\"onmove\", this);\n var element = this.elements.dialog, current = element, offsetLeft = 0, offsetTop = 0;\n //subtract existing left,top\n if (element.style.left) offsetLeft -= parseInt(element.style.left, 10);\n if (element.style.top) offsetTop -= parseInt(element.style.top, 10);\n //calc offset\n do {\n offsetLeft += current.offsetLeft;\n offsetTop += current.offsetTop;\n }while (current = current.offsetParent);\n //calc left, top\n var left = x - offsetLeft;\n var top = y - offsetTop;\n //// rtl handling\n if (isRightToLeft()) left *= -1;\n element.style.left = left + \"px\";\n element.style.top = top + \"px\";\n // allow custom `onmoved` method\n dispatchEvent(\"onmoved\", this);\n }\n return this;\n },\n /**\r\n * Resize the dialog to a specific width/height (the dialog must be 'resizable').\r\n * The dialog can be resized to:\r\n * A minimum width equal to the initial display width\r\n * A minimum height equal to the sum of header/footer heights.\r\n *\r\n *\r\n * @param {Number or String} width The new dialog width in pixels or in percent.\r\n * @param {Number or String} height The new dialog height in pixels or in percent.\r\n *\r\n * @return {Object} The dialog instance.\r\n */ resizeTo: function(width, height) {\n var w = parseFloat(width), h = parseFloat(height), regex = /(\\d*\\.\\d+|\\d+)%/;\n if (!isNaN(w) && !isNaN(h) && this.get(\"resizable\") === true) {\n // allow custom `onresize` method\n dispatchEvent(\"onresize\", this);\n if ((\"\" + width).match(regex)) w = w / 100 * document.documentElement.clientWidth;\n if ((\"\" + height).match(regex)) h = h / 100 * document.documentElement.clientHeight;\n var element = this.elements.dialog;\n if (element.style.maxWidth !== \"none\") element.style.minWidth = (minWidth = element.offsetWidth) + \"px\";\n element.style.maxWidth = \"none\";\n element.style.minHeight = this.elements.header.offsetHeight + this.elements.footer.offsetHeight + \"px\";\n element.style.width = w + \"px\";\n element.style.height = h + \"px\";\n // allow custom `onresized` method\n dispatchEvent(\"onresized\", this);\n }\n return this;\n },\n /**\r\n * Gets or Sets dialog settings/options \r\n *\r\n * @param {String|Object} key A string specifying a propery name or a collection of key/value pairs.\r\n * @param {Object} value Optional, the value associated with the key (in case it was a string).\r\n *\r\n * @return {undefined}\r\n */ setting: function(key, value) {\n var self = this;\n var result = update(this, this.__internal.options, function(k, o, n) {\n optionUpdated(self, k, o, n);\n }, key, value);\n if (result.op === \"get\") {\n if (result.found) return result.value;\n else if (typeof this.settings !== \"undefined\") return update(this, this.settings, this.settingUpdated || function() {}, key, value).value;\n else return undefined;\n } else if (result.op === \"set\") {\n if (result.items.length > 0) {\n var callback = this.settingUpdated || function() {};\n for(var x = 0; x < result.items.length; x += 1){\n var item = result.items[x];\n if (!item.found && typeof this.settings !== \"undefined\") update(this, this.settings, callback, item.key, item.value);\n }\n }\n return this;\n }\n },\n /**\r\n * [Alias] Sets dialog settings/options \r\n */ set: function(key, value) {\n this.setting(key, value);\n return this;\n },\n /**\r\n * [Alias] Gets dialog settings/options \r\n */ get: function(key) {\n return this.setting(key);\n },\n /**\r\n * Sets dialog header\r\n * @content {string or element}\r\n *\r\n * @return {undefined}\r\n */ setHeader: function(content) {\n if (typeof content === \"string\") {\n clearContents(this.elements.header);\n this.elements.header.innerHTML = content;\n } else if (content instanceof window1.HTMLElement && this.elements.header.firstChild !== content) {\n clearContents(this.elements.header);\n this.elements.header.appendChild(content);\n }\n return this;\n },\n /**\r\n * Sets dialog contents\r\n * @content {string or element}\r\n *\r\n * @return {undefined}\r\n */ setContent: function(content) {\n if (typeof content === \"string\") {\n clearContents(this.elements.content);\n this.elements.content.innerHTML = content;\n } else if (content instanceof window1.HTMLElement && this.elements.content.firstChild !== content) {\n clearContents(this.elements.content);\n this.elements.content.appendChild(content);\n }\n return this;\n },\n /**\r\n * Show the dialog as modal\r\n *\r\n * @return {Object} the dialog instance.\r\n */ showModal: function(className) {\n return this.show(true, className);\n },\n /**\r\n * Show the dialog\r\n *\r\n * @return {Object} the dialog instance.\r\n */ show: function(modal, className) {\n // ensure initialization\n initialize(this);\n if (!this.__internal.isOpen) {\n // add to open dialogs\n this.__internal.isOpen = true;\n openDialogs.push(this);\n // save last focused element\n if (alertify.defaults.maintainFocus) this.__internal.activeElement = document.activeElement;\n // set tabindex attribute on body element this allows script to give it focusable\n if (!document.body.hasAttribute(\"tabindex\")) document.body.setAttribute(\"tabindex\", tabindex = \"0\");\n //allow custom dom manipulation updates before showing the dialog.\n if (typeof this.prepare === \"function\") this.prepare();\n bindEvents(this);\n if (modal !== undefined) this.set(\"modal\", modal);\n //save scroll to prevent document jump\n saveScrollPosition();\n ensureNoOverflow();\n // allow custom dialog class on show\n if (typeof className === \"string\" && className !== \"\") {\n this.__internal.className = className;\n addClass(this.elements.root, className);\n }\n // maximize if start maximized\n if (this.get(\"startMaximized\")) this.maximize();\n else if (this.isMaximized()) restore(this);\n updateAbsPositionFix(this);\n this.elements.root.removeAttribute(\"style\");\n removeClass(this.elements.root, classes.animationOut);\n addClass(this.elements.root, classes.animationIn);\n // set 1s fallback in case transition event doesn't fire\n clearTimeout(this.__internal.timerIn);\n this.__internal.timerIn = setTimeout(this.__internal.transitionInHandler, transition.supported ? 1000 : 100);\n if (isSafari) {\n // force desktop safari reflow\n var root = this.elements.root;\n root.style.display = \"none\";\n setTimeout(function() {\n root.style.display = \"block\";\n }, 0);\n }\n //reflow\n reflow = this.elements.root.offsetWidth;\n // show dialog\n removeClass(this.elements.root, classes.hidden);\n //restore scroll to prevent document jump\n restoreScrollPosition();\n // internal on show event\n if (typeof this.hooks.onshow === \"function\") this.hooks.onshow.call(this);\n // allow custom `onshow` method\n dispatchEvent(\"onshow\", this);\n } else {\n // reset move updates\n resetMove(this);\n // reset resize updates\n resetResize(this);\n // shake the dialog to indicate its already open\n addClass(this.elements.dialog, classes.shake);\n var self = this;\n setTimeout(function() {\n removeClass(self.elements.dialog, classes.shake);\n }, 200);\n }\n return this;\n },\n /**\r\n * Close the dialog\r\n *\r\n * @return {Object} The dialog instance\r\n */ close: function() {\n if (this.__internal.isOpen) // custom `onclosing` event\n {\n if (dispatchEvent(\"onclosing\", this) !== false) {\n unbindEvents(this);\n removeClass(this.elements.root, classes.animationIn);\n addClass(this.elements.root, classes.animationOut);\n // set 1s fallback in case transition event doesn't fire\n clearTimeout(this.__internal.timerOut);\n this.__internal.timerOut = setTimeout(this.__internal.transitionOutHandler, transition.supported ? 1000 : 100);\n // hide dialog\n addClass(this.elements.root, classes.hidden);\n //reflow\n reflow = this.elements.modal.offsetWidth;\n // return focus to the last active element\n if (alertify.defaults.maintainFocus && this.__internal.activeElement) {\n this.__internal.activeElement.focus();\n this.__internal.activeElement = null;\n }\n // remove custom dialog class on hide\n if (typeof this.__internal.className !== \"undefined\" && this.__internal.className !== \"\") removeClass(this.elements.root, this.__internal.className);\n // internal on close event\n if (typeof this.hooks.onclose === \"function\") this.hooks.onclose.call(this);\n // allow custom `onclose` method\n dispatchEvent(\"onclose\", this);\n //remove from open dialogs\n openDialogs.splice(openDialogs.indexOf(this), 1);\n this.__internal.isOpen = false;\n ensureNoOverflow();\n }\n }\n // last dialog and tab index was set by us, remove it.\n if (!openDialogs.length && tabindex === \"0\") document.body.removeAttribute(\"tabindex\");\n return this;\n },\n /**\r\n * Close all open dialogs except this.\r\n *\r\n * @return {undefined}\r\n */ closeOthers: function() {\n alertify.closeAll(this);\n return this;\n },\n /**\r\n * Destroys this dialog instance\r\n *\r\n * @return {undefined}\r\n */ destroy: function() {\n if (this.__internal) {\n if (this.__internal.isOpen) {\n //mark dialog for destruction, this will be called on tranistionOut event.\n this.__internal.destroy = function() {\n destruct(this, initialize);\n };\n //close the dialog to unbind all events.\n this.close();\n } else if (!this.__internal.destroy) destruct(this, initialize);\n }\n return this;\n }\n };\n }();\n var notifier = function() {\n var reflow, element, openInstances = [], classes = defaults.notifier.classes, baseClass = classes.base;\n /**\r\n * Helper: initializes the notifier instance\r\n *\r\n */ function initialize(instance) {\n if (!instance.__internal) {\n instance.__internal = {\n position: alertify.defaults.notifier.position,\n delay: alertify.defaults.notifier.delay\n };\n element = document.createElement(\"DIV\");\n var transitionOff = \"transitionOff\" in defaults.notifier ? defaults.notifier.transitionOff : defaults.transitionOff;\n if (transitionOff) baseClass = classes.base + \" ajs-no-transition\";\n updatePosition(instance);\n }\n //add to DOM tree.\n if (element.parentNode !== document.body) document.body.appendChild(element);\n }\n function pushInstance(instance) {\n instance.__internal.pushed = true;\n openInstances.push(instance);\n }\n function popInstance(instance) {\n openInstances.splice(openInstances.indexOf(instance), 1);\n instance.__internal.pushed = false;\n }\n /**\r\n * Helper: update the notifier instance position\r\n *\r\n */ function updatePosition(instance) {\n element.className = baseClass;\n switch(instance.__internal.position){\n case \"top-right\":\n addClass(element, classes.top + \" \" + classes.right);\n break;\n case \"top-left\":\n addClass(element, classes.top + \" \" + classes.left);\n break;\n case \"top-center\":\n addClass(element, classes.top + \" \" + classes.center);\n break;\n case \"bottom-left\":\n addClass(element, classes.bottom + \" \" + classes.left);\n break;\n case \"bottom-center\":\n addClass(element, classes.bottom + \" \" + classes.center);\n break;\n default:\n case \"bottom-right\":\n addClass(element, classes.bottom + \" \" + classes.right);\n break;\n }\n }\n /**\r\n * creates a new notification message\r\n *\r\n * @param {DOMElement} message\tThe notifier message element\r\n * @param {Number} wait Time (in ms) to wait before the message is dismissed, a value of 0 means keep open till clicked.\r\n * @param {Function} callback A callback function to be invoked when the message is dismissed.\r\n *\r\n * @return {undefined}\r\n */ function create(div, callback) {\n function clickDelegate(event, instance) {\n if (!instance.__internal.closeButton || event.target.getAttribute(\"data-close\") === \"true\") instance.dismiss(true);\n }\n function transitionDone(event, instance) {\n // unbind event\n off(instance.element, transition.type, transitionDone);\n // remove the message\n element.removeChild(instance.element);\n }\n function initialize(instance) {\n if (!instance.__internal) {\n instance.__internal = {\n pushed: false,\n delay: undefined,\n timer: undefined,\n clickHandler: undefined,\n transitionEndHandler: undefined,\n transitionTimeout: undefined\n };\n instance.__internal.clickHandler = delegate(instance, clickDelegate);\n instance.__internal.transitionEndHandler = delegate(instance, transitionDone);\n }\n return instance;\n }\n function clearTimers(instance) {\n clearTimeout(instance.__internal.timer);\n clearTimeout(instance.__internal.transitionTimeout);\n }\n return initialize({\n /* notification DOM element*/ element: div,\n /*\r\n * Pushes a notification message\r\n * @param {string or DOMElement} content The notification message content\r\n * @param {Number} wait The time (in seconds) to wait before the message is dismissed, a value of 0 means keep open till clicked.\r\n *\r\n */ push: function(_content, _wait) {\n if (!this.__internal.pushed) {\n pushInstance(this);\n clearTimers(this);\n var content, wait;\n switch(arguments.length){\n case 0:\n wait = this.__internal.delay;\n break;\n case 1:\n if (typeof _content === \"number\") wait = _content;\n else {\n content = _content;\n wait = this.__internal.delay;\n }\n break;\n case 2:\n content = _content;\n wait = _wait;\n break;\n }\n this.__internal.closeButton = alertify.defaults.notifier.closeButton;\n // set contents\n if (typeof content !== \"undefined\") this.setContent(content);\n // append or insert\n if (notifier.__internal.position.indexOf(\"top\") < 0) element.appendChild(this.element);\n else element.insertBefore(this.element, element.firstChild);\n reflow = this.element.offsetWidth;\n addClass(this.element, classes.visible);\n // attach click event\n on(this.element, \"click\", this.__internal.clickHandler);\n return this.delay(wait);\n }\n return this;\n },\n /*\r\n * {Function} callback function to be invoked before dismissing the notification message.\r\n * Remarks: A return value === 'false' will cancel the dismissal\r\n *\r\n */ ondismiss: function() {},\n /*\r\n * {Function} callback function to be invoked when the message is dismissed.\r\n *\r\n */ callback: callback,\n /*\r\n * Dismisses the notification message\r\n * @param {Boolean} clicked A flag indicating if the dismissal was caused by a click.\r\n *\r\n */ dismiss: function(clicked) {\n if (this.__internal.pushed) {\n clearTimers(this);\n if (!(typeof this.ondismiss === \"function\" && this.ondismiss.call(this) === false)) {\n //detach click event\n off(this.element, \"click\", this.__internal.clickHandler);\n // ensure element exists\n if (typeof this.element !== \"undefined\" && this.element.parentNode === element) {\n //transition end or fallback\n this.__internal.transitionTimeout = setTimeout(this.__internal.transitionEndHandler, transition.supported ? 1000 : 100);\n removeClass(this.element, classes.visible);\n // custom callback on dismiss\n if (typeof this.callback === \"function\") this.callback.call(this, clicked);\n }\n popInstance(this);\n }\n }\n return this;\n },\n /*\r\n * Delays the notification message dismissal\r\n * @param {Number} wait The time (in seconds) to wait before the message is dismissed, a value of 0 means keep open till clicked.\r\n *\r\n */ delay: function(wait) {\n clearTimers(this);\n this.__internal.delay = typeof wait !== \"undefined\" && !isNaN(+wait) ? +wait : notifier.__internal.delay;\n if (this.__internal.delay > 0) {\n var self = this;\n this.__internal.timer = setTimeout(function() {\n self.dismiss();\n }, this.__internal.delay * 1000);\n }\n return this;\n },\n /*\r\n * Sets the notification message contents\r\n * @param {string or DOMElement} content The notification message content\r\n *\r\n */ setContent: function(content) {\n if (typeof content === \"string\") {\n clearContents(this.element);\n this.element.innerHTML = content;\n } else if (content instanceof window1.HTMLElement && this.element.firstChild !== content) {\n clearContents(this.element);\n this.element.appendChild(content);\n }\n if (this.__internal.closeButton) {\n var close = document.createElement(\"span\");\n addClass(close, classes.close);\n close.setAttribute(\"data-close\", true);\n this.element.appendChild(close);\n }\n return this;\n },\n /*\r\n * Dismisses all open notifications except this.\r\n *\r\n */ dismissOthers: function() {\n notifier.dismissAll(this);\n return this;\n }\n });\n }\n //notifier api\n return {\n /**\r\n * Gets or Sets notifier settings.\r\n *\r\n * @param {string} key The setting name\r\n * @param {Variant} value The setting value.\r\n *\r\n * @return {Object}\tif the called as a setter, return the notifier instance.\r\n */ setting: function(key, value) {\n //ensure init\n initialize(this);\n if (typeof value === \"undefined\") //get\n return this.__internal[key];\n else //set\n switch(key){\n case \"position\":\n this.__internal.position = value;\n updatePosition(this);\n break;\n case \"delay\":\n this.__internal.delay = value;\n break;\n }\n return this;\n },\n /**\r\n * [Alias] Sets dialog settings/options\r\n */ set: function(key, value) {\n this.setting(key, value);\n return this;\n },\n /**\r\n * [Alias] Gets dialog settings/options\r\n */ get: function(key) {\n return this.setting(key);\n },\n /**\r\n * Creates a new notification message\r\n *\r\n * @param {string} type The type of notification message (simply a CSS class name 'ajs-{type}' to be added).\r\n * @param {Function} callback A callback function to be invoked when the message is dismissed.\r\n *\r\n * @return {undefined}\r\n */ create: function(type, callback) {\n //ensure notifier init\n initialize(this);\n //create new notification message\n var div = document.createElement(\"div\");\n div.className = classes.message + (typeof type === \"string\" && type !== \"\" ? \" \" + classes.prefix + type : \"\");\n return create(div, callback);\n },\n /**\r\n * Dismisses all open notifications.\r\n *\r\n * @param {Object} excpet [optional] The notification object to exclude from dismissal.\r\n *\r\n */ dismissAll: function(except) {\n var clone = openInstances.slice(0);\n for(var x = 0; x < clone.length; x += 1){\n var instance = clone[x];\n if (except === undefined || except !== instance) instance.dismiss();\n }\n }\n };\n }();\n /**\r\n * Alertify public API\r\n * This contains everything that is exposed through the alertify object.\r\n *\r\n * @return {Object}\r\n */ function Alertify() {\n // holds a references of created dialogs\n var dialogs = {};\n /**\r\n * Extends a given prototype by merging properties from base into sub.\r\n *\r\n * @sub {Object} sub The prototype being overwritten.\r\n * @base {Object} base The prototype being written.\r\n *\r\n * @return {Object} The extended prototype.\r\n */ function extend(sub, base) {\n // copy dialog pototype over definition.\n for(var prop in base)if (base.hasOwnProperty(prop)) sub[prop] = base[prop];\n return sub;\n }\n /**\r\n * Helper: returns a dialog instance from saved dialogs.\r\n * and initializes the dialog if its not already initialized.\r\n *\r\n * @name {String} name The dialog name.\r\n *\r\n * @return {Object} The dialog instance.\r\n */ function get_dialog(name) {\n var dialog = dialogs[name].dialog;\n //initialize the dialog if its not already initialized.\n if (dialog && typeof dialog.__init === \"function\") dialog.__init(dialog);\n return dialog;\n }\n /**\r\n * Helper: registers a new dialog definition.\r\n *\r\n * @name {String} name The dialog name.\r\n * @Factory {Function} Factory a function resposible for creating dialog prototype.\r\n * @transient {Boolean} transient True to create a new dialog instance each time the dialog is invoked, false otherwise.\r\n * @base {String} base the name of another dialog to inherit from.\r\n *\r\n * @return {Object} The dialog definition.\r\n */ function register(name, Factory, transient, base) {\n var definition = {\n dialog: null,\n factory: Factory\n };\n //if this is based on an existing dialog, create a new definition\n //by applying the new protoype over the existing one.\n if (base !== undefined) definition.factory = function() {\n return extend(new dialogs[base].factory(), new Factory());\n };\n if (!transient) //create a new definition based on dialog\n definition.dialog = extend(new definition.factory(), dialog);\n return dialogs[name] = definition;\n }\n return {\n /**\r\n * Alertify defaults\r\n * \r\n * @type {Object}\r\n */ defaults: defaults,\n /**\r\n * Dialogs factory \r\n *\r\n * @param {string} Dialog name.\r\n * @param {Function} A Dialog factory function.\r\n * @param {Boolean} Indicates whether to create a singleton or transient dialog.\r\n * @param {String} The name of the base type to inherit from.\r\n */ dialog: function(name, Factory, transient, base) {\n // get request, create a new instance and return it.\n if (typeof Factory !== \"function\") return get_dialog(name);\n if (this.hasOwnProperty(name)) throw new Error(\"alertify.dialog: name already exists\");\n // register the dialog\n var definition = register(name, Factory, transient, base);\n if (transient) // make it public\n this[name] = function() {\n //if passed with no params, consider it a get request\n if (arguments.length === 0) return definition.dialog;\n else {\n var instance = extend(new definition.factory(), dialog);\n //ensure init\n if (instance && typeof instance.__init === \"function\") instance.__init(instance);\n instance[\"main\"].apply(instance, arguments);\n return instance[\"show\"].apply(instance);\n }\n };\n else // make it public\n this[name] = function() {\n //ensure init\n if (definition.dialog && typeof definition.dialog.__init === \"function\") definition.dialog.__init(definition.dialog);\n //if passed with no params, consider it a get request\n if (arguments.length === 0) return definition.dialog;\n else {\n var dialog = definition.dialog;\n dialog[\"main\"].apply(definition.dialog, arguments);\n return dialog[\"show\"].apply(definition.dialog);\n }\n };\n },\n /**\r\n * Close all open dialogs.\r\n *\r\n * @param {Object} excpet [optional] The dialog object to exclude from closing.\r\n *\r\n * @return {undefined}\r\n */ closeAll: function(except) {\n var clone = openDialogs.slice(0);\n for(var x = 0; x < clone.length; x += 1){\n var instance = clone[x];\n if (except === undefined || except !== instance) instance.close();\n }\n },\n /**\r\n * Gets or Sets dialog settings/options. if the dialog is transient, this call does nothing.\r\n *\r\n * @param {string} name The dialog name.\r\n * @param {String|Object} key A string specifying a propery name or a collection of key/value pairs.\r\n * @param {Variant} value Optional, the value associated with the key (in case it was a string).\r\n *\r\n * @return {undefined}\r\n */ setting: function(name, key, value) {\n if (name === \"notifier\") return notifier.setting(key, value);\n var dialog = get_dialog(name);\n if (dialog) return dialog.setting(key, value);\n },\n /**\r\n * [Alias] Sets dialog settings/options \r\n */ set: function(name, key, value) {\n return this.setting(name, key, value);\n },\n /**\r\n * [Alias] Gets dialog settings/options \r\n */ get: function(name, key) {\n return this.setting(name, key);\n },\n /**\r\n * Creates a new notification message.\r\n * If a type is passed, a class name \"ajs-{type}\" will be added.\r\n * This allows for custom look and feel for various types of notifications.\r\n *\r\n * @param {String | DOMElement} [message=undefined]\t\tMessage text\r\n * @param {String} [type='']\t\t\t\tType of log message\r\n * @param {String} [wait='']\t\t\t\tTime (in seconds) to wait before auto-close\r\n * @param {Function} [callback=undefined]\tA callback function to be invoked when the log is closed.\r\n *\r\n * @return {Object} Notification object.\r\n */ notify: function(message, type, wait, callback) {\n return notifier.create(type, callback).push(message, wait);\n },\n /**\r\n * Creates a new notification message.\r\n *\r\n * @param {String}\t\t[message=undefined]\t\tMessage text\r\n * @param {String} [wait='']\t\t\t\tTime (in seconds) to wait before auto-close\r\n * @param {Function}\t[callback=undefined]\tA callback function to be invoked when the log is closed.\r\n *\r\n * @return {Object} Notification object.\r\n */ message: function(message, wait, callback) {\n return notifier.create(null, callback).push(message, wait);\n },\n /**\r\n * Creates a new notification message of type 'success'.\r\n *\r\n * @param {String}\t\t[message=undefined]\t\tMessage text\r\n * @param {String} [wait='']\t\t\t\tTime (in seconds) to wait before auto-close\r\n * @param {Function}\t[callback=undefined]\tA callback function to be invoked when the log is closed.\r\n *\r\n * @return {Object} Notification object.\r\n */ success: function(message, wait, callback) {\n return notifier.create(\"success\", callback).push(message, wait);\n },\n /**\r\n * Creates a new notification message of type 'error'.\r\n *\r\n * @param {String}\t\t[message=undefined]\t\tMessage text\r\n * @param {String} [wait='']\t\t\t\tTime (in seconds) to wait before auto-close\r\n * @param {Function}\t[callback=undefined]\tA callback function to be invoked when the log is closed.\r\n *\r\n * @return {Object} Notification object.\r\n */ error: function(message, wait, callback) {\n return notifier.create(\"error\", callback).push(message, wait);\n },\n /**\r\n * Creates a new notification message of type 'warning'.\r\n *\r\n * @param {String}\t\t[message=undefined]\t\tMessage text\r\n * @param {String} [wait='']\t\t\t\tTime (in seconds) to wait before auto-close\r\n * @param {Function}\t[callback=undefined]\tA callback function to be invoked when the log is closed.\r\n *\r\n * @return {Object} Notification object.\r\n */ warning: function(message, wait, callback) {\n return notifier.create(\"warning\", callback).push(message, wait);\n },\n /**\r\n * Dismisses all open notifications\r\n *\r\n * @return {undefined}\r\n */ dismissAll: function() {\n notifier.dismissAll();\n }\n };\n }\n var alertify = new Alertify();\n /**\r\n * Alert dialog definition\r\n *\r\n * invoked by:\r\n *\talertify.alert(message);\r\n *\talertify.alert(title, message);\r\n *\talertify.alert(message, onok);\r\n *\talertify.alert(title, message, onok);\r\n */ alertify.dialog(\"alert\", function() {\n return {\n main: function(_title, _message, _onok) {\n var title, message, onok;\n switch(arguments.length){\n case 1:\n message = _title;\n break;\n case 2:\n if (typeof _message === \"function\") {\n message = _title;\n onok = _message;\n } else {\n title = _title;\n message = _message;\n }\n break;\n case 3:\n title = _title;\n message = _message;\n onok = _onok;\n break;\n }\n this.set(\"title\", title);\n this.set(\"message\", message);\n this.set(\"onok\", onok);\n return this;\n },\n setup: function() {\n return {\n buttons: [\n {\n text: alertify.defaults.glossary.ok,\n key: keys.ESC,\n invokeOnClose: true,\n className: alertify.defaults.theme.ok\n }\n ],\n focus: {\n element: 0,\n select: false\n },\n options: {\n maximizable: false,\n resizable: false\n }\n };\n },\n build: function() {\n // nothing\n },\n prepare: function() {\n //nothing\n },\n setMessage: function(message) {\n this.setContent(message);\n },\n settings: {\n message: undefined,\n onok: undefined,\n label: undefined\n },\n settingUpdated: function(key, oldValue, newValue) {\n switch(key){\n case \"message\":\n this.setMessage(newValue);\n break;\n case \"label\":\n if (this.__internal.buttons[0].element) this.__internal.buttons[0].element.innerHTML = newValue;\n break;\n }\n },\n callback: function(closeEvent) {\n if (typeof this.get(\"onok\") === \"function\") {\n var returnValue = this.get(\"onok\").call(this, closeEvent);\n if (typeof returnValue !== \"undefined\") closeEvent.cancel = !returnValue;\n }\n }\n };\n });\n /**\r\n * Confirm dialog object\r\n *\r\n *\talertify.confirm(message);\r\n *\talertify.confirm(message, onok);\r\n *\talertify.confirm(message, onok, oncancel);\r\n *\talertify.confirm(title, message, onok, oncancel);\r\n */ alertify.dialog(\"confirm\", function() {\n var autoConfirm = {\n timer: null,\n index: null,\n text: null,\n duration: null,\n task: function(event, self) {\n if (self.isOpen()) {\n self.__internal.buttons[autoConfirm.index].element.innerHTML = autoConfirm.text + \" (‏\" + autoConfirm.duration + \"‏) \";\n autoConfirm.duration -= 1;\n if (autoConfirm.duration === -1) {\n clearAutoConfirm(self);\n var button = self.__internal.buttons[autoConfirm.index];\n var closeEvent = createCloseEvent(autoConfirm.index, button);\n if (typeof self.callback === \"function\") self.callback.apply(self, [\n closeEvent\n ]);\n //close the dialog.\n if (closeEvent.close !== false) self.close();\n }\n } else clearAutoConfirm(self);\n }\n };\n function clearAutoConfirm(self) {\n if (autoConfirm.timer !== null) {\n clearInterval(autoConfirm.timer);\n autoConfirm.timer = null;\n self.__internal.buttons[autoConfirm.index].element.innerHTML = autoConfirm.text;\n }\n }\n function startAutoConfirm(self, index, duration) {\n clearAutoConfirm(self);\n autoConfirm.duration = duration;\n autoConfirm.index = index;\n autoConfirm.text = self.__internal.buttons[index].element.innerHTML;\n autoConfirm.timer = setInterval(delegate(self, autoConfirm.task), 1000);\n autoConfirm.task(null, self);\n }\n return {\n main: function(_title, _message, _onok, _oncancel) {\n var title, message, onok, oncancel;\n switch(arguments.length){\n case 1:\n message = _title;\n break;\n case 2:\n message = _title;\n onok = _message;\n break;\n case 3:\n message = _title;\n onok = _message;\n oncancel = _onok;\n break;\n case 4:\n title = _title;\n message = _message;\n onok = _onok;\n oncancel = _oncancel;\n break;\n }\n this.set(\"title\", title);\n this.set(\"message\", message);\n this.set(\"onok\", onok);\n this.set(\"oncancel\", oncancel);\n return this;\n },\n setup: function() {\n return {\n buttons: [\n {\n text: alertify.defaults.glossary.ok,\n key: keys.ENTER,\n className: alertify.defaults.theme.ok\n },\n {\n text: alertify.defaults.glossary.cancel,\n key: keys.ESC,\n invokeOnClose: true,\n className: alertify.defaults.theme.cancel\n }\n ],\n focus: {\n element: 0,\n select: false\n },\n options: {\n maximizable: false,\n resizable: false\n }\n };\n },\n build: function() {\n //nothing\n },\n prepare: function() {\n //nothing\n },\n setMessage: function(message) {\n this.setContent(message);\n },\n settings: {\n message: null,\n labels: null,\n onok: null,\n oncancel: null,\n defaultFocus: null,\n reverseButtons: null\n },\n settingUpdated: function(key, oldValue, newValue) {\n switch(key){\n case \"message\":\n this.setMessage(newValue);\n break;\n case \"labels\":\n if (\"ok\" in newValue && this.__internal.buttons[0].element) {\n this.__internal.buttons[0].text = newValue.ok;\n this.__internal.buttons[0].element.innerHTML = newValue.ok;\n }\n if (\"cancel\" in newValue && this.__internal.buttons[1].element) {\n this.__internal.buttons[1].text = newValue.cancel;\n this.__internal.buttons[1].element.innerHTML = newValue.cancel;\n }\n break;\n case \"reverseButtons\":\n if (newValue === true) this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element);\n else this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element);\n break;\n case \"defaultFocus\":\n this.__internal.focus.element = newValue === \"ok\" ? 0 : 1;\n break;\n }\n },\n callback: function(closeEvent) {\n clearAutoConfirm(this);\n var returnValue;\n switch(closeEvent.index){\n case 0:\n if (typeof this.get(\"onok\") === \"function\") {\n returnValue = this.get(\"onok\").call(this, closeEvent);\n if (typeof returnValue !== \"undefined\") closeEvent.cancel = !returnValue;\n }\n break;\n case 1:\n if (typeof this.get(\"oncancel\") === \"function\") {\n returnValue = this.get(\"oncancel\").call(this, closeEvent);\n if (typeof returnValue !== \"undefined\") closeEvent.cancel = !returnValue;\n }\n break;\n }\n },\n autoOk: function(duration) {\n startAutoConfirm(this, 0, duration);\n return this;\n },\n autoCancel: function(duration) {\n startAutoConfirm(this, 1, duration);\n return this;\n }\n };\n });\n /**\r\n * Prompt dialog object\r\n *\r\n * invoked by:\r\n *\talertify.prompt(message);\r\n *\talertify.prompt(message, value);\r\n *\talertify.prompt(message, value, onok);\r\n *\talertify.prompt(message, value, onok, oncancel);\r\n *\talertify.prompt(title, message, value, onok, oncancel);\r\n */ alertify.dialog(\"prompt\", function() {\n var input = document.createElement(\"INPUT\");\n var p = document.createElement(\"P\");\n return {\n main: function(_title, _message, _value, _onok, _oncancel) {\n var title, message, value, onok, oncancel;\n switch(arguments.length){\n case 1:\n message = _title;\n break;\n case 2:\n message = _title;\n value = _message;\n break;\n case 3:\n message = _title;\n value = _message;\n onok = _value;\n break;\n case 4:\n message = _title;\n value = _message;\n onok = _value;\n oncancel = _onok;\n break;\n case 5:\n title = _title;\n message = _message;\n value = _value;\n onok = _onok;\n oncancel = _oncancel;\n break;\n }\n this.set(\"title\", title);\n this.set(\"message\", message);\n this.set(\"value\", value);\n this.set(\"onok\", onok);\n this.set(\"oncancel\", oncancel);\n return this;\n },\n setup: function() {\n return {\n buttons: [\n {\n text: alertify.defaults.glossary.ok,\n key: keys.ENTER,\n className: alertify.defaults.theme.ok\n },\n {\n text: alertify.defaults.glossary.cancel,\n key: keys.ESC,\n invokeOnClose: true,\n className: alertify.defaults.theme.cancel\n }\n ],\n focus: {\n element: input,\n select: true\n },\n options: {\n maximizable: false,\n resizable: false\n }\n };\n },\n build: function() {\n input.className = alertify.defaults.theme.input;\n input.setAttribute(\"type\", \"text\");\n input.value = this.get(\"value\");\n this.elements.content.appendChild(p);\n this.elements.content.appendChild(input);\n },\n prepare: function() {\n //nothing\n },\n setMessage: function(message) {\n if (typeof message === \"string\") {\n clearContents(p);\n p.innerHTML = message;\n } else if (message instanceof window1.HTMLElement && p.firstChild !== message) {\n clearContents(p);\n p.appendChild(message);\n }\n },\n settings: {\n message: undefined,\n labels: undefined,\n onok: undefined,\n oncancel: undefined,\n value: \"\",\n type: \"text\",\n reverseButtons: undefined\n },\n settingUpdated: function(key, oldValue, newValue) {\n switch(key){\n case \"message\":\n this.setMessage(newValue);\n break;\n case \"value\":\n input.value = newValue;\n break;\n case \"type\":\n switch(newValue){\n case \"text\":\n case \"color\":\n case \"date\":\n case \"datetime-local\":\n case \"email\":\n case \"month\":\n case \"number\":\n case \"password\":\n case \"search\":\n case \"tel\":\n case \"time\":\n case \"week\":\n input.type = newValue;\n break;\n default:\n input.type = \"text\";\n break;\n }\n break;\n case \"labels\":\n if (newValue.ok && this.__internal.buttons[0].element) this.__internal.buttons[0].element.innerHTML = newValue.ok;\n if (newValue.cancel && this.__internal.buttons[1].element) this.__internal.buttons[1].element.innerHTML = newValue.cancel;\n break;\n case \"reverseButtons\":\n if (newValue === true) this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element);\n else this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element);\n break;\n }\n },\n callback: function(closeEvent) {\n var returnValue;\n switch(closeEvent.index){\n case 0:\n this.settings.value = input.value;\n if (typeof this.get(\"onok\") === \"function\") {\n returnValue = this.get(\"onok\").call(this, closeEvent, this.settings.value);\n if (typeof returnValue !== \"undefined\") closeEvent.cancel = !returnValue;\n }\n break;\n case 1:\n if (typeof this.get(\"oncancel\") === \"function\") {\n returnValue = this.get(\"oncancel\").call(this, closeEvent);\n if (typeof returnValue !== \"undefined\") closeEvent.cancel = !returnValue;\n }\n if (!closeEvent.cancel) input.value = this.settings.value;\n break;\n }\n }\n };\n });\n // CommonJS\n if (typeof $89b291c8bc281326$exports === \"object\") $89b291c8bc281326$exports = alertify;\n else if (typeof define === \"function\" && define.amd) define([], function() {\n return alertify;\n });\n else if (!window1.alertify) window1.alertify = alertify;\n})(typeof window !== \"undefined\" ? window : $89b291c8bc281326$exports);\n\n\nfunction $98d6fbf968cbb475$export$73693bad9f5880b0(url, opts) {\n const req = new Promise((resolve, reject)=>{\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).request(url, {\n headers: {\n Authorization: (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).token\n },\n ...opts\n }).then((res)=>{\n // console.log('auth success')\n resolve(res);\n // return res\n }).catch((e)=>{\n if (e.code == 401) (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).request(\"/auth/jwt/refresh\", {\n headers: {\n Authorization: (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).token\n },\n method: \"post\"\n }).then((token)=>{\n (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).login(token);\n $98d6fbf968cbb475$export$73693bad9f5880b0(url, opts).then((res)=>{\n console.log(\"resolved refresh\");\n resolve(res);\n });\n }).catch((err)=>{\n console.log(\"error making auth request\", url, opts, err);\n if (err.code == 401) {\n (0, $89b291c8bc281326$exports.error)(\"not authorized\", 2);\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.set(\"/login\", {\n redirect: (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.get()\n });\n }\n reject(err);\n });\n });\n });\n return req;\n}\nconst $98d6fbf968cbb475$export$21a94553ffa41578 = ()=>{\n return {\n view: (vnode)=>{\n return [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"h2\", \"login\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"form#login\", {\n action: \"/auth/jwt/login\",\n method: \"post\"\n }, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"label[for=username]\", \"email:\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"input#username\", {\n name: \"username\"\n }),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"label[for=password]\", \"password:\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"input#password\", {\n name: \"password\",\n type: \"password\"\n }),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"input#submit\", {\n type: \"submit\",\n value: \"login\",\n style: {\n display: (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).username ? \"none\" : \"\"\n },\n onclick: (e)=>{\n e.preventDefault();\n let form = new FormData(document.getElementById(\"login\"));\n console.log(\"sending form\", e, form);\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).request(\"/auth/jwt/login\", {\n method: \"post\",\n body: form\n }).then((token)=>{\n (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).login(token);\n (0, $89b291c8bc281326$exports.success)(`Logged in!`, 4);\n }, (res)=>{\n console.log(\"error logging in!\", res);\n (0, $89b291c8bc281326$exports.error)(\"error logging in\", 3);\n });\n }\n }),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"button#logout\", {\n style: {\n display: (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).username ? \"\" : \"none\"\n },\n onclick: (e)=>{\n e.preventDefault();\n if ((0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).username) (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).logout();\n else (0, $89b291c8bc281326$exports.message)(\"not logged in. Can't log out.\", 3);\n }\n }, \"logout\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"button#register\", {\n style: {\n display: (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).username ? \"none\" : \"\"\n },\n onclick: (e)=>{\n e.preventDefault();\n if (document.getElementById(\"username\").value == \"\") (0, $89b291c8bc281326$exports.error)(\"please enter a username\");\n else if (document.getElementById(\"password\").value.length < 8) (0, $89b291c8bc281326$exports.error)(\"password must be at least 8 characters\");\n else (0, $89b291c8bc281326$exports.prompt)(\"register\", \"what is your first name?\", \"user\", (e, first_name)=>{\n let form = new FormData(document.getElementById(\"login\"));\n let register = {\n first_name: first_name,\n email: form.get(\"username\"),\n password: form.get(\"password\")\n };\n console.log(\"registering user\", register, e, form);\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).request({\n url: \"/auth/register\",\n method: \"post\",\n body: register\n }).then((res)=>{\n console.log(\"successfully registered\", res);\n (0, $89b291c8bc281326$exports.success)(`${res.first_name} is now registered!`);\n }).catch((err)=>{\n console.log(\"error registering\", err);\n (0, $89b291c8bc281326$exports.error)(\"error regestering\");\n });\n }, ()=>{});\n }\n }, \"register\")\n ])\n ];\n }\n };\n};\nconst $98d6fbf968cbb475$export$cad1a703886b4e3a = ()=>{\n return {\n view: (vnode)=>{\n (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).logout();\n (0, $89b291c8bc281326$exports.message)(\"logged out\", 3);\n }\n };\n};\n\n\nvar $d53863f8c6f341c9$export$1f44aaf2ec115b54 = {\n jwt: null,\n username: null,\n token: null,\n loggedIn: false,\n login: (token)=>{\n $d53863f8c6f341c9$export$1f44aaf2ec115b54.jwt = token;\n let decoded = (0, $1eeac253570f845a$export$2e2bcd8739ae039)(token[\"access_token\"]);\n console.log(\"authenticated!\", decoded);\n $d53863f8c6f341c9$export$1f44aaf2ec115b54.token = token[\"token_type\"] + \" \" + token[\"access_token\"];\n (0, $98d6fbf968cbb475$export$73693bad9f5880b0)(\"/users/me\").then((me)=>{\n $d53863f8c6f341c9$export$1f44aaf2ec115b54.username = me.first_name;\n $d53863f8c6f341c9$export$1f44aaf2ec115b54.loggedIn = true;\n console.log(\"logged in as: \", $d53863f8c6f341c9$export$1f44aaf2ec115b54);\n if ((0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.param(\"redirect\")) (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.set((0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.param(\"redirect\"));\n else if ((0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.get() == \"/login\") (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.set(\"/\");\n else (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.set((0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.get());\n }, (err)=>{\n console.log(\"error getting username\", err);\n });\n // m.redraw()\n },\n logout: ()=>{\n console.log(\"logging out\", $d53863f8c6f341c9$export$1f44aaf2ec115b54);\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).request(\"/logout\", {\n method: \"post\"\n });\n $d53863f8c6f341c9$export$1f44aaf2ec115b54.jwt = null;\n $d53863f8c6f341c9$export$1f44aaf2ec115b54.username = null;\n $d53863f8c6f341c9$export$1f44aaf2ec115b54.token = null;\n $d53863f8c6f341c9$export$1f44aaf2ec115b54.loggedIn = false;\n window.localStorage.setItem(\"CREDENTIALS_FLUSH\", Date.now().toString());\n window.localStorage.removeItem(\"CREDENTIALS_FLUSH\");\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.set(\"/\");\n }\n};\n\n\n\n\n\n\nfunction $ecb8f3b69b3e0f46$export$ca6fbb51b35e375c() {\n var projects = [];\n return {\n oninit: (vnode)=>{\n (0, $98d6fbf968cbb475$export$73693bad9f5880b0)(\"/project\").then((e)=>{\n console.log(\"got projects\", e);\n projects = e;\n }, (err)=>{\n console.log(\"error loading projects from server\", err);\n });\n },\n view: (vnode)=>{\n return [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"h1\", \"Projects\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".projects\", [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"table.projTableHead\", [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Name\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Edit Template\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Create New Video\")\n ]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".projTableContainer\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"table.projTable\", {}, [\n projects.map((p)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"tr\", [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", p[\"name\"]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n onclick: (e)=>{\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.set(\"/editor?project=\" + p[\"_id\"]);\n }\n }, \"edit\")),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n onclick: (e)=>{\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.set(\"/form?project=\" + p[\"_id\"]);\n }\n }, \"video_call\"))\n ]);\n })\n ]))\n ])\n ];\n }\n };\n}\n\n\n\n\nconst $bdfa56e2d7b9b984$export$22c59631e6c46e5a = {\n view: (vnode)=>[\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"h1\", \"Documents\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"a.docLink\", {\n href: \"https://quaternionmedia.github.io/alfred/\"\n }, \"User Documentation\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"a.docLink\", {\n href: \"/api\"\n }, \"API Reference\")\n ]\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar $3ccf69c8ded49b26$require$state = $75d41d026a980c58$export$ca000e230c0caa3e;\nfunction $3ccf69c8ded49b26$export$3e4ff2216a90b8a4() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"select#resolution\", {\n value: `${$3ccf69c8ded49b26$require$state.resolution()}p`,\n onchange: (e)=>{\n let res = e.target.value.split(\"p\")[0];\n $3ccf69c8ded49b26$require$state.resolution(res);\n console.log(\"changing resolution\", res);\n },\n ...vnode.attrs\n }, [\n vnode.children.map((opt)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"option\", {\n value: opt\n }, opt);\n })\n ]);\n }\n };\n}\nfunction $3ccf69c8ded49b26$export$403b19f90abd052f() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"select#aspect\", {\n value: `${$3ccf69c8ded49b26$require$state.aspectWidth()}:${$3ccf69c8ded49b26$require$state.aspectHeight()}`,\n onchange: (e)=>{\n let res = e.target.value.split(\":\");\n $3ccf69c8ded49b26$require$state.aspectWidth(res[0]);\n $3ccf69c8ded49b26$require$state.aspectHeight(res[1]);\n console.log(\"changing aspects\", $3ccf69c8ded49b26$require$state.aspectWidth(), $3ccf69c8ded49b26$require$state.aspectHeight(), $3ccf69c8ded49b26$require$state.width(), $3ccf69c8ded49b26$require$state.height());\n },\n ...vnode.attrs\n }, [\n vnode.children.map((opt)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"option\", {\n value: opt\n }, opt);\n })\n ]);\n }\n };\n}\n\n\n\nvar $d3adc0dc5c0e930a$require$state = $75d41d026a980c58$export$ca000e230c0caa3e;\nfunction $d3adc0dc5c0e930a$export$bb3b75778e3e272(url) {\n var a = document.createElement(\"a\");\n document.body.appendChild(a);\n a.style = \"display: none\";\n a.href = url;\n a.click();\n document.body.removeChild(a);\n}\nfunction $d3adc0dc5c0e930a$export$123539912283e31c() {\n return {\n view (vnode) {\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"#PlaybackTools.tools.toolbar\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"start\",\n onclick: (vnode)=>{\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).jump(0);\n }\n }, \"first_page\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"back 5s\",\n onclick: (vnode)=>{\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).jump(Math.max((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time - 5, 0));\n }\n }, \"fast_rewind\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"pause\",\n onclick: (0, (/*@__PURE__*/$parcel$interopDefault($e6f0a14715dbdf71$exports))).play\n }, (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).paused ? \"play_arrow\" : \"pause\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"forward 5s\",\n onclick: (vnode)=>{\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).jump(Math.min((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time + 5, (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).duration()));\n }\n }, \"fast_forward\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"end\",\n onclick: (vnode)=>{\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).jump((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).duration());\n }\n }, \"last_page\")\n ]);\n }\n };\n}\nfunction $d3adc0dc5c0e930a$export$5e1c87f561bdb6c8() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".tools.toolbar\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"slower\",\n onclick: (vnode)=>{\n (0, (/*@__PURE__*/$parcel$interopDefault($e6f0a14715dbdf71$exports))).slower();\n }\n }, \"slow_motion_video\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.custom\", {\n title: \"reset speed\",\n onclick: (vnode)=>{\n (0, (/*@__PURE__*/$parcel$interopDefault($e6f0a14715dbdf71$exports))).resetSpeed();\n }\n }, (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).speed + \"x\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"faster\",\n onclick: (vnode)=>{\n (0, (/*@__PURE__*/$parcel$interopDefault($e6f0a14715dbdf71$exports))).faster();\n }\n }, \"speed\")\n ]);\n }\n };\n}\nfunction $d3adc0dc5c0e930a$export$8af178eeca6d02ea() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".tools.toolbar\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"save\",\n onclick: (vnode)=>{\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).request({\n url: \"/edl\",\n method: \"post\",\n params: {\n filename: (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.param(\"edl\")\n },\n body: {\n \"edl\": (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl\n }\n }).then((e)=>{\n let resp = JSON.parse(e);\n console.log(\"sucessfully saved\", resp);\n (0, $89b291c8bc281326$exports.message)(`saved! ${resp.filename}`, 3);\n });\n }\n }, \"save\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"render\",\n onclick: (vnode)=>{\n // console.log('export')\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).request({\n url: \"/render\",\n method: \"post\",\n params: {\n project: (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.param(\"project\"),\n width: $d3adc0dc5c0e930a$require$state.width(),\n height: $d3adc0dc5c0e930a$require$state.height()\n },\n body: {\n edl: (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl\n }\n }).then((e)=>{\n console.log(\"got result\", e);\n (0, $89b291c8bc281326$exports.message)(`Added ${(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.param(\"project\")} to render queue`, 5);\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.set(\"/renders\");\n });\n }\n }, \"file_upload\")\n ]);\n }\n };\n}\n\n\n\n\n\n\nfunction $880c6aed43944db1$var$tsToDate(ts) {\n let date = new Date(ts.substr(0, 4), ts.substr(4, 2) - 1, ts.substr(6, 2), ts.substr(9, 2), ts.substr(11, 2), ts.substr(13, 2));\n return date;\n}\nfunction $880c6aed43944db1$var$timeDelta(date) {\n let now = new Date();\n let delta = (now - date) / 1000;\n let days = Math.floor(delta / 3600 / 24);\n let hours = Math.floor(delta / 3600);\n let minutes = String(Math.floor(delta % 3600 / 60)).padStart(2, \"0\");\n let seconds = String(Math.floor(delta % 60)).padStart(2, \"0\");\n return days ? days + \"d\" : hours + \":\" + minutes + \":\" + seconds;\n}\nfunction $880c6aed43944db1$var$shortTime(date) {\n let now = new Date();\n let delta = (now - date) / 1000;\n let days = Math.floor(delta / 3600 / 24);\n return days ? days + \"d\" : date.toLocaleTimeString();\n}\nconst $880c6aed43944db1$export$532ea57f7c892d6e = function(objectId) {\n return new Date(parseInt(objectId.substring(0, 8), 16) * 1000);\n};\nfunction $880c6aed43944db1$export$d259c86defeb4608() {\n var link = null;\n return {\n view: (vnode)=>{\n return link ? (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".bar\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"textarea\", {\n id: vnode.attrs.id\n }, link),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n onclick: (e)=>{\n // console.log('copied ', e)\n (0, $89b291c8bc281326$exports.success)(\"copied link to clipboard!\", 3);\n let txt = document.getElementById(vnode.attrs.id);\n txt.select();\n document.execCommand(\"copy\");\n }\n }, \"content_copy\")\n ]) : (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".tools\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n onclick: (e)=>{\n // console.log('getting render link', vnode.children)\n (0, $98d6fbf968cbb475$export$73693bad9f5880b0)(\"/render/\" + vnode.attrs.id, {}).then((res)=>{\n link = res;\n });\n }\n }, \"link\"));\n }\n };\n}\nfunction $880c6aed43944db1$export$e2a5113ff815c2ab() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"video\", {\n width: \"100%\",\n \"object-fit\": \"contain\",\n src: vnode.attrs.src,\n controls: true,\n autoplay: true,\n volume: 0.2\n });\n }\n };\n}\nfunction $880c6aed43944db1$export$eaf7822a8f6a78d6() {\n var preview = $4827982a76523906$exports(null);\n var renders = [];\n function getRenders() {\n (0, $98d6fbf968cbb475$export$73693bad9f5880b0)(\"/render\").then((e)=>{\n // console.log('renders init')\n renders = e;\n });\n }\n return {\n oncreate: (vnode)=>{\n function checkRenders() {\n if ((0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.get() == \"/renders\") {\n getRenders();\n setTimeout(()=>{\n checkRenders();\n }, 1000);\n }\n }\n checkRenders();\n },\n view: (vnode)=>{\n let now = new Date();\n return [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"h1\", \"Renders\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".renderVideo\", [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($880c6aed43944db1$export$e2a5113ff815c2ab, {\n src: preview()\n })\n ]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".flexwrap\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"table.rendTableHead\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Project\"), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Description\"), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Duration\"), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Resolution\"), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Quality\"), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Start Time\"), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Progress\"), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Preview\"), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Link\"), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Issue\"), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"th\", \"Delete\")),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"table.rendTable\", {}, [\n renders.map((r)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"tr\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", {}, r[\"project\"]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", {}, r[\"description\"]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", {}, r[\"duration\"]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", {}, `${r[\"width\"]}x${r[\"height\"]}`),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", {}, r[\"quality\"]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td.tooltip\", {}, [\n $880c6aed43944db1$var$shortTime($880c6aed43944db1$export$532ea57f7c892d6e(r[\"_id\"])),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".tooltiptext\", {}, $880c6aed43944db1$export$532ea57f7c892d6e(r[\"_id\"]).toLocaleString())\n ]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"progress\", {\n max: 100,\n value: `${Number(r[\"progress\"]).toFixed(2)}`\n }),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"p\", `${Number(r[\"progress\"]).toFixed(2)}%`)\n ]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", r[\"progress\"] >= 100 ? (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".tools\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n onclick: (e)=>{\n (0, $98d6fbf968cbb475$export$73693bad9f5880b0)(\"/render/\" + r[\"_id\"]).then((res)=>{\n // console.log('got signed link', res)\n preview(res);\n });\n }\n }, \"missed_video_call\")) : \"\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", r[\"progress\"] >= 100 ? (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($880c6aed43944db1$export$d259c86defeb4608, {\n id: r[\"_id\"]\n }) : \"\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", {}, (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".tools\", {}, (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n onclick: (e)=>{\n (0, $89b291c8bc281326$exports.prompt)(\"Report issue\", \"Please provide a detailed description of the issue\", \"There's a problem with...\", (evt, issue)=>{\n console.log(\"reporting issue\", evt, issue);\n (0, $98d6fbf968cbb475$export$73693bad9f5880b0)(`/render/${r[\"_id\"]}/report`, {\n method: \"post\",\n body: issue\n }).then((win)=>{\n (0, $89b291c8bc281326$exports.success)(\"issue submitted! We'll check it out as soon as we can!\");\n }, (lose)=>{\n console.log(\"error reporting issue\", lose);\n (0, $89b291c8bc281326$exports.error)(\"Oops... something went wrong. Sorry!\");\n });\n }, (evt)=>{\n console.log(\"cancelled issue\");\n });\n }\n }, \"report_problem\"))),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"td\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".tools\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n onclick: (e)=>{\n (0, $98d6fbf968cbb475$export$73693bad9f5880b0)(`/render/${r[\"_id\"]}`, {\n method: \"delete\"\n }).then((res)=>{\n console.log(\"deleted\", r[\"filename\"]);\n (0, $89b291c8bc281326$exports.message)(`${r[\"filename\"]} removed`, 4);\n getRenders();\n }, (err)=>{\n console.log(\"error deleting\", err);\n if (err.status_code == 406) (0, $89b291c8bc281326$exports.error)(\"did not find that entry\", 4);\n else (0, $89b291c8bc281326$exports.error)(\"error removing from db\", 4);\n }).catch();\n }\n }, \"delete\")))\n ]);\n })\n ])\n ])\n ];\n }\n };\n}\n\n\n\n\n\n\n\nvar $d40041a1f594fd32$require$state = $75d41d026a980c58$export$ca000e230c0caa3e;\nconst $d40041a1f594fd32$var$urlfy = (obj)=>Object.keys(obj).map((k)=>encodeURIComponent(k) + \"=\" + encodeURIComponent(obj[k])).join(\"&\");\nfunction $d40041a1f594fd32$export$4a96334d5925dbf2() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"img.preview\", {\n src: vnode.attrs.src\n });\n }\n };\n}\nfunction $d40041a1f594fd32$export$ee45c20555d0eaba() {\n return {\n onbeforeupdate: (vnode, old)=>{\n return (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).paused;\n },\n oncreate: (vnode)=>{\n document.addEventListener(\"keydown\", (e)=>{\n switch(e.code){\n case \"Space\":\n e.preventDefault();\n if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).paused) {\n vnode.dom.play();\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).paused = false;\n vnode.dom.addEventListener(\"timeupdate\", (e)=>{\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time(e.target.currentTime);\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time + (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).durations((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.slice(0, (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current)));\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n });\n } else {\n vnode.dom.pause();\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).paused = true;\n }\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n break;\n }\n });\n vnode.dom.addEventListener(\"loadeddata\", (event)=>{\n if (!(0, $22dd8f6982cb874d$export$ae01dedf5c052bb).paused && vnode.dom.paused) {\n console.log(\"fixing paused video by playing\");\n vnode.dom.play();\n }\n if ((0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time() < (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current][\"inpoint\"]) {\n console.log(\"jumping to inpoint\");\n vnode.dom.currentTime = (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time();\n }\n });\n },\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"video.preview\", {\n ...vnode.attrs,\n currentTime: (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time(),\n // state: Video.paused ? vnode.dom.pause() : vnode.dom.play(),\n style: {\n width: \"100%\",\n height: \"100%\",\n \"object-fit\": \"contain\"\n }\n });\n }\n };\n}\nvar $d40041a1f594fd32$export$133773870222880f = ()=>{\n return {\n oncreate: (vnode)=>{\n document.addEventListener(\"keydown\", (e)=>{\n switch(e.code){\n case \"ArrowLeft\":\n console.log(\"left!\", e);\n e.preventDefault();\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).jump(Math.max((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time() - 5, 0));\n break;\n case \"ArrowRight\":\n e.preventDefault();\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).jump(Math.min((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time() + 5, (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).duration()));\n break;\n }\n });\n },\n onupdate: (vnode)=>{},\n view: (vnode)=>{\n let clip = (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current];\n if (clip) {\n if (clip.type == \"template\") return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".bkg#preview\", {\n style: {\n \"background-image\": `url(bkg/${encodeURIComponent((0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.param(\"project\"))}?width=${$d40041a1f594fd32$require$state.width()}&height=${$d40041a1f594fd32$require$state.height()}&t=${(0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time})`\n }\n }, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($d40041a1f594fd32$export$4a96334d5925dbf2, {\n id: \"preview\",\n src: `otto/template/${clip[\"name\"]}?${$d40041a1f594fd32$var$urlfy(clip.data)}&width=${$d40041a1f594fd32$require$state.width()}&height=${$d40041a1f594fd32$require$state.height()}&t=${(0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time()}`\n })\n ]);\n else return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($d40041a1f594fd32$export$ee45c20555d0eaba, {\n id: \"preview\",\n src: clip.name\n });\n }\n }\n };\n};\n\n\nvar $2188d3836cd50cfb$exports = {};\n\n$parcel$export($2188d3836cd50cfb$exports, \"Form\", () => $2188d3836cd50cfb$export$a7fed597f4b8afd8);\n$parcel$export($2188d3836cd50cfb$exports, \"Text\", () => $2188d3836cd50cfb$export$5f1af8db9871e1d6);\n$parcel$export($2188d3836cd50cfb$exports, \"Textarea\", () => $2188d3836cd50cfb$export$379139ebc1c2b235);\n$parcel$export($2188d3836cd50cfb$exports, \"Button\", () => $2188d3836cd50cfb$export$353f5b6fc5456de1);\n$parcel$export($2188d3836cd50cfb$exports, \"Color\", () => $2188d3836cd50cfb$export$892596cec99bc70e);\n$parcel$export($2188d3836cd50cfb$exports, \"Img\", () => $2188d3836cd50cfb$export$cc7b5f925acc71d3);\n$parcel$export($2188d3836cd50cfb$exports, \"Image\", () => $2188d3836cd50cfb$export$3e431a229df88919);\n$parcel$export($2188d3836cd50cfb$exports, \"Selector\", () => $2188d3836cd50cfb$export$d15f4cd5286f9b1e);\n$parcel$export($2188d3836cd50cfb$exports, \"Section\", () => $2188d3836cd50cfb$export$6e2c8f0811a474ce);\n$parcel$export($2188d3836cd50cfb$exports, \"Layout\", () => $2188d3836cd50cfb$export$c84671f46d6a1ca);\n\n\n\n\nvar $e3655bb830efdd39$exports = {};\n$e3655bb830efdd39$exports = new URL(\"alWhite.f7212539.png\", import.meta.url).toString();\n\n\n\nfunction $0e686a53b040bd4d$export$d9b273488cd8ce6f() {\n // toggles the navContainer visibility\n var open = false;\n addEventListener(\"resize\", ()=>{\n if (window.innerWidth >= 1026 && open) {\n open = false;\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n }\n });\n function toggle() {\n console.log(\"toggling menu\", open);\n open = !open;\n }\n return {\n view: (vnode)=>{\n return [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"header\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".navbutton\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n onclick: toggle\n }, \"menu\")), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".navContainer\", {\n style: {\n width: open ? \"250px\" : \"0px\"\n }\n }, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($0e686a53b040bd4d$export$c2dd313c040ea211, {\n onclick: toggle\n })\n ]), //TODO: change logo to new image in the future when location of images is known\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"div.logo\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($0e686a53b040bd4d$export$a6c7ac8248d6e38a, {\n href: \"/\",\n id: \"home-link\",\n ...vnode.attrs\n }, (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"img.logoImg\", {\n src: (0, (/*@__PURE__*/$parcel$interopDefault($e3655bb830efdd39$exports)))\n }))), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".menuLinks\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($0e686a53b040bd4d$export$b2e089eb3692b073)), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($0e686a53b040bd4d$export$a6c7ac8248d6e38a, {\n class: \"loginLink\",\n href: (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).username ? \"/logout\" : \"/login\",\n id: \"login-link\",\n ...vnode.attrs\n }, (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).username ? \"Logout\" : \"Login\"))\n ];\n }\n };\n}\nconst $0e686a53b040bd4d$export$a6c7ac8248d6e38a = ()=>({\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.Link, {\n class: window.location.hash.startsWith(vnode.attrs.href, 2) ? \"active\" : \"\",\n ...vnode.attrs\n }, vnode.children);\n }\n });\nconst $0e686a53b040bd4d$export$b2e089eb3692b073 = ()=>({\n view: (vnode)=>[\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($0e686a53b040bd4d$export$a6c7ac8248d6e38a, {\n href: \"/projects\",\n id: \"projects-link\",\n ...vnode.attrs\n }, \"PROJECTS\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($0e686a53b040bd4d$export$a6c7ac8248d6e38a, {\n href: \"/renders\",\n id: \"renders-link\",\n ...vnode.attrs\n }, \"RENDERS\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($0e686a53b040bd4d$export$a6c7ac8248d6e38a, {\n href: \"/documents\",\n id: \"documents-link\",\n ...vnode.attrs\n }, \"DOCUMENTS\")\n ]\n });\nconst $0e686a53b040bd4d$export$c2dd313c040ea211 = ()=>({\n view: (vnode)=>[\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($0e686a53b040bd4d$export$a6c7ac8248d6e38a, {\n class: \"navLink\",\n href: \"/\",\n id: \"home-link\",\n ...vnode.attrs\n }, \"HOME\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($0e686a53b040bd4d$export$a6c7ac8248d6e38a, {\n class: \"navLink\",\n href: \"/projects\",\n id: \"projects-link\",\n ...vnode.attrs\n }, \"PROJECTS\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($0e686a53b040bd4d$export$a6c7ac8248d6e38a, {\n class: \"navLink\",\n href: \"/renders\",\n id: \"renders-link\",\n ...vnode.attrs\n }, \"RENDERS\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($0e686a53b040bd4d$export$a6c7ac8248d6e38a, {\n class: \"navLink\",\n href: \"/documents\",\n id: \"documents-link\",\n ...vnode.attrs\n }, \"DOCUMENTS\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($0e686a53b040bd4d$export$a6c7ac8248d6e38a, {\n class: \"navLink\",\n href: (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).username ? \"/logout\" : \"/login\",\n id: \"login-link\",\n ...vnode.attrs\n }, (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).username ? \"LOGOUT\" : \"LOGIN\")\n ]\n });\n\n\n\n\nconst $3f78d5f92d9885c3$export$a06f1c675e846f6f = {\n view: (vnode)=>(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"footer\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".text\", \"More information at \"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"a.link\", {\n href: \"https://www.quaternion.media/alfred/\"\n }, \"quaternion.media/alfred\")\n ])\n};\n\n\nfunction $2188d3836cd50cfb$export$a7fed597f4b8afd8() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"form\", vnode.attrs, vnode.children);\n }\n };\n}\nfunction $2188d3836cd50cfb$export$5f1af8db9871e1d6() {\n return {\n view: (vnode)=>{\n return [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"label.formlabel\", {\n for: vnode.attrs.name\n }, vnode.attrs.text),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"input[type=text]\", vnode.attrs),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\")\n ];\n }\n };\n}\nfunction $2188d3836cd50cfb$export$379139ebc1c2b235() {\n return {\n view: (vnode)=>{\n return [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"label.formlabel\", {\n for: vnode.attrs.name\n }, vnode.attrs.text),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"textarea\", vnode.attrs),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\")\n ];\n }\n };\n}\nfunction $2188d3836cd50cfb$export$353f5b6fc5456de1() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"input.button\", vnode.attrs, vnode.children);\n }\n };\n}\nfunction $2188d3836cd50cfb$export$892596cec99bc70e() {\n return {\n view: (vnode)=>{\n return [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"label.formlabel\", {\n for: vnode.attrs.name\n }, vnode.attrs.text),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"input[type=color]\", vnode.attrs)\n ];\n }\n };\n}\nfunction $2188d3836cd50cfb$export$cc7b5f925acc71d3() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"img\", vnode.attrs, vnode.children);\n }\n };\n}\nfunction $2188d3836cd50cfb$export$3e431a229df88919() {\n return {\n view: (vnode)=>{\n return [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"label.formlabel\", {\n for: vnode.attrs.name\n }, vnode.attrs.text),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"input[type=text]\", vnode.attrs),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"img\", {\n src: vnode.attrs.value\n }, vnode.children)\n ];\n }\n };\n}\nfunction $2188d3836cd50cfb$export$d15f4cd5286f9b1e() {\n return {\n view: (vnode)=>{\n return [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"label.formlabel\", {\n for: vnode.attrs.name\n }, vnode.attrs.text),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"select\", vnode.attrs, vnode.children.map((c)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"option\", {\n value: c\n }, c);\n })),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"br\")\n ];\n }\n };\n}\nconst $2188d3836cd50cfb$export$6e2c8f0811a474ce = {\n view: (vnode)=>(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"section\", vnode.attrs, vnode.children)\n};\nconst $2188d3836cd50cfb$export$c84671f46d6a1ca = {\n view: (vnode)=>[\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $0e686a53b040bd4d$export$d9b273488cd8ce6f)),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($2188d3836cd50cfb$export$6e2c8f0811a474ce, vnode.attrs, vnode.children),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $3f78d5f92d9885c3$export$a06f1c675e846f6f))\n ]\n};\n\n\n\n\n\n\n\nfunction $9173046a4a2c2474$export$833b3e5a19fb8939() {\n return {\n view: (vnode)=>{\n return vnode.children.map((field)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($2188d3836cd50cfb$exports[field.type], field.attrs, field.children);\n });\n }\n };\n}\nconst $9173046a4a2c2474$export$702b6645b5a13d5d = [\n // { type: 'Selector', attrs: { name: 'project', text: 'Video', }, children: [ 'Magnussens', 'RSG']) },\n {\n type: \"Selector\",\n attrs: {\n name: \"duration\",\n text: \"Duration\"\n },\n children: [\n \"30\",\n \"15\"\n ]\n },\n {\n type: \"TextBox\",\n attrs: {\n name: \"carname\",\n text: \"Car Name\"\n }\n },\n {\n type: \"TextBox\",\n attrs: {\n name: \"offerinfo\",\n text: \"Offer Info\"\n }\n },\n {\n type: \"Selector\",\n attrs: {\n name: \"offeralign\",\n text: \"Offer alignment\"\n },\n children: [\n \"left\",\n \"center\"\n ]\n },\n {\n type: \"TextBox\",\n attrs: {\n name: \"legaltext\",\n text: \"Legal Text\"\n }\n }\n];\n\n\n\nvar $7238a34a955809b2$exports = {};\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */ var $7238a34a955809b2$var$runtime = function(exports) {\n \"use strict\";\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var defineProperty = Object.defineProperty || function(obj, key, desc) {\n obj[key] = desc.value;\n };\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n });\n return generator;\n }\n exports.wrap = wrap;\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function() {\n return this;\n });\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: true\n });\n defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: true\n });\n GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\");\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\n \"next\",\n \"throw\",\n \"return\"\n ].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\" : false;\n };\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return {\n __await: arg\n };\n };\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") reject(record.arg);\n else {\n var result = record.arg;\n var value = result.value;\n if (value && typeof value === \"object\" && hasOwn.call(value, \"__await\")) return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n var previousPromise;\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n defineProperty(this, \"_invoke\", {\n value: enqueue\n });\n }\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function() {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n return function invoke(method, arg) {\n if (state === GenStateExecuting) throw new Error(\"Generator is already running\");\n if (state === GenStateCompleted) {\n if (method === \"throw\") throw arg;\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n context.method = method;\n context.arg = arg;\n while(true){\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (context.method === \"next\") // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n context.dispatchException(context.arg);\n } else if (context.method === \"return\") context.abrupt(\"return\", context.arg);\n state = GenStateExecuting;\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done ? GenStateCompleted : GenStateSuspendedYield;\n if (record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method;\n var method = delegate.iterator[methodName];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method, or a missing .next mehtod, always terminate the\n // yield* loop.\n context.delegate = null;\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (methodName === \"throw\" && delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n if (context.method === \"throw\") // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n if (methodName !== \"return\") {\n context.method = \"throw\";\n context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\");\n }\n return ContinueSentinel;\n }\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n var info = record.arg;\n if (!info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n } else // Re-yield the result returned by the delegate method.\n return info;\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n define(Gp, toStringTagSymbol, \"Generator\");\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n if (1 in locs) entry.catchLoc = locs[1];\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [\n {\n tryLoc: \"root\"\n }\n ];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n exports.keys = function(val) {\n var object = Object(val);\n var keys = [];\n for(var key in object)keys.push(key);\n keys.reverse();\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while(keys.length){\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (typeof iterable.next === \"function\") return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while(++i < iterable.length)if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n next.value = undefined;\n next.done = true;\n return next;\n };\n return next.next = next;\n }\n }\n // Return an iterator with no values.\n return {\n next: doneResult\n };\n }\n exports.values = values;\n function doneResult() {\n return {\n value: undefined,\n done: true\n };\n }\n Context.prototype = {\n constructor: Context,\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n this.method = \"next\";\n this.arg = undefined;\n this.tryEntries.forEach(resetTryEntry);\n if (!skipTempReset) {\n for(var name in this)// Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) this[name] = undefined;\n }\n },\n stop: function() {\n this.done = true;\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n return !!caught;\n }\n for(var i = this.tryEntries.length - 1; i >= 0; --i){\n var entry = this.tryEntries[i];\n var record = entry.completion;\n if (entry.tryLoc === \"root\") // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, true);\n else if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, true);\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else throw new Error(\"try statement without catch or finally\");\n }\n }\n },\n abrupt: function(type, arg) {\n for(var i = this.tryEntries.length - 1; i >= 0; --i){\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n if (finallyEntry && (type === \"break\" || type === \"continue\") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n return this.complete(record);\n },\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") throw record.arg;\n if (record.type === \"break\" || record.type === \"continue\") this.next = record.arg;\n else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) this.next = afterLoc;\n return ContinueSentinel;\n },\n finish: function(finallyLoc) {\n for(var i = this.tryEntries.length - 1; i >= 0; --i){\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n \"catch\": function(tryLoc) {\n for(var i = this.tryEntries.length - 1; i >= 0; --i){\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n if (this.method === \"next\") // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n return ContinueSentinel;\n }\n };\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n}(// If this script is executing as a CommonJS module, use module.exports\n// as the regeneratorRuntime namespace. Otherwise create a new empty\n// object. Either way, the resulting object will be used to initialize\n// the regeneratorRuntime variable at the top of this file.\n(0, $7238a34a955809b2$exports));\ntry {\n regeneratorRuntime = $7238a34a955809b2$var$runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") globalThis.regeneratorRuntime = $7238a34a955809b2$var$runtime;\n else Function(\"r\", \"regeneratorRuntime = r\")($7238a34a955809b2$var$runtime);\n}\n\n\n\nvar $12ab4b555e4e721f$exports = {};\n\"use strict\";\n///////////////////////////////////////////////\n// Mithril Range\n// (c) 2017-2018 by Mike Linkovich\n// https://github.com/spacejack/mithril-range\n// License: MIT\n///////////////////////////////////////////////\nObject.defineProperty($12ab4b555e4e721f$exports, \"__esModule\", {\n value: true\n});\n\nvar $12ab4b555e4e721f$var$NONE = 0;\nvar $12ab4b555e4e721f$var$MOUSE = 1;\nvar $12ab4b555e4e721f$var$TOUCH = 2;\n// So we aren't triggered by echoed mouse events (some mobile browsers)\nvar $12ab4b555e4e721f$var$DEVICE_DELAY = 350;\n/** Clamp number to range */ function $12ab4b555e4e721f$var$clamp(n, min, max) {\n return Math.min(Math.max(n, min), max);\n}\nvar $12ab4b555e4e721f$var$isIOS = !!navigator.userAgent.match(/iPhone|iPad|iPod/i);\n// This is some unbelievable stone-age nonsense.\n// Workaround for webkit bug where event.preventDefault\n// within touchmove handler fails to prevent scrolling.\nvar $12ab4b555e4e721f$var$iOSHackApplied = false;\nfunction $12ab4b555e4e721f$var$applyIOSHack() {\n // Only apply this hack if iOS, haven't yet applied it,\n // and only if a component is actually created\n if (!$12ab4b555e4e721f$var$isIOS || $12ab4b555e4e721f$var$iOSHackApplied) return;\n window.addEventListener(\"touchmove\", function() {});\n $12ab4b555e4e721f$var$iOSHackApplied = true;\n}\nfunction $12ab4b555e4e721f$var$quantize(val, min, max, step) {\n if (max - min <= 0) return min;\n if (step <= 0) return $12ab4b555e4e721f$var$clamp(val, min, max);\n var steps = Math.ceil((max - min) / step);\n var v = min + Math.round(steps * (val - min) / (max - min)) * step;\n return $12ab4b555e4e721f$var$clamp(v, min, max);\n}\n$12ab4b555e4e721f$exports.quantize = $12ab4b555e4e721f$var$quantize;\n/** Range Component */ function $12ab4b555e4e721f$var$MithrilRange() {\n var elHit;\n var elBar;\n var elBar0;\n var elBar1;\n var elHandle;\n var rcBar;\n var device = $12ab4b555e4e721f$var$NONE;\n var pressed = false;\n // Attrs we need to cache\n var min = 0;\n var max = 10;\n var value = 0;\n var startValue = 0;\n var step = 1;\n var orientation = \"horizontal\";\n var onchange;\n var ondrag;\n // Event handlers\n function onMouseDown(e) {\n if (device === $12ab4b555e4e721f$var$TOUCH) return;\n device = $12ab4b555e4e721f$var$MOUSE;\n if (e.button !== 0) return;\n window.addEventListener(\"mousemove\", onMouseMove);\n window.addEventListener(\"mouseup\", onMouseUp);\n onPress(e.clientX, e.clientY);\n }\n function onMouseMove(e) {\n e.preventDefault();\n onMove(e.clientX, e.clientY);\n }\n function onMouseUp(e) {\n window.removeEventListener(\"mousemove\", onMouseMove);\n window.removeEventListener(\"mouseup\", onMouseUp);\n onRelease(e.clientX, e.clientY);\n }\n function onTouchStart(e) {\n if (device === $12ab4b555e4e721f$var$MOUSE) return;\n elHit.addEventListener(\"touchmove\", onTouchMove);\n elHit.addEventListener(\"touchend\", onTouchEnd);\n var t = e.changedTouches[0];\n onPress(t.clientX, t.clientY);\n }\n function onTouchMove(e) {\n e.preventDefault();\n var t = e.changedTouches[0];\n onMove(t.clientX, t.clientY);\n }\n function onTouchEnd(e) {\n elHit.removeEventListener(\"touchmove\", onTouchMove);\n elHit.removeEventListener(\"touchend\", onTouchEnd);\n var t = e.changedTouches[0];\n onRelease(t.clientX, t.clientY);\n }\n function onKeyDown(e) {\n var k = e.keyCode;\n var newVal;\n if (k === 33) {\n e.preventDefault();\n var s = Math.max((max - min) / 10, step);\n if (s <= 0) s = 1;\n newVal = $12ab4b555e4e721f$var$quantize(value + s, min, max, step);\n } else if (k === 34) {\n e.preventDefault();\n var s = Math.max((max - min) / 10, step);\n if (s <= 0) s = 1;\n newVal = $12ab4b555e4e721f$var$quantize(value - s, min, max, step);\n } else if (k === 35) {\n e.preventDefault();\n newVal = max;\n } else if (k === 36) {\n e.preventDefault();\n newVal = min;\n } else if (k === 37 || k === 40) {\n e.preventDefault();\n var s = step > 0 ? step : (max - min) / 10;\n newVal = Math.max(value - s, min);\n } else if (k === 38 || k === 39) {\n e.preventDefault();\n var s = step > 0 ? step : (max - min) / 10;\n newVal = Math.min(value + s, max);\n }\n if (typeof newVal !== \"number\" || newVal === value) return; // no change to make\n value = newVal;\n setStyles(value);\n if (onchange && onchange(value) !== false) $65d5daca13f5010c$exports.redraw();\n }\n // App handlers\n function onPress(x, y) {\n startValue = value;\n pressed = true;\n rcBar = elBar.getBoundingClientRect();\n var val = moveHandle(x, y);\n if (val !== value) {\n value = val;\n if (ondrag && ondrag(value) !== false) $65d5daca13f5010c$exports.redraw();\n }\n }\n function onMove(x, y) {\n if (!pressed) return;\n var val = moveHandle(x, y);\n if (val !== value) {\n value = val;\n if (ondrag && ondrag(value) !== false) $65d5daca13f5010c$exports.redraw();\n }\n }\n function onRelease(x, y) {\n if (!pressed) return;\n pressed = false;\n value = moveHandle(x, y);\n if (value !== startValue) {\n if (onchange && onchange(value) !== false) $65d5daca13f5010c$exports.redraw();\n }\n setTimeout(function() {\n if (!pressed) device = $12ab4b555e4e721f$var$NONE;\n }, $12ab4b555e4e721f$var$DEVICE_DELAY);\n }\n function moveHandle(x, y) {\n var barLength, delta;\n if (orientation === \"vertical\") {\n barLength = rcBar.bottom - rcBar.top;\n delta = rcBar.bottom - y;\n } else {\n barLength = rcBar.right - rcBar.left;\n delta = x - rcBar.left;\n }\n delta = $12ab4b555e4e721f$var$clamp(delta, 0, barLength);\n var val = $12ab4b555e4e721f$var$quantize(delta / barLength * (max - min) + min, min, max, step);\n setStyles(val);\n return val;\n }\n /** Compute handle position style */ function positionStyle(val) {\n var s = (val - min) / (max - min);\n if (orientation === \"vertical\") s = 1.0 - s;\n return String(100 * s) + \"%\";\n }\n /** Set styles for movable parts */ function setStyles(value) {\n var ps = positionStyle(value);\n var rps = positionStyle(max - value + min);\n if (orientation === \"vertical\") {\n elHandle.style.top = ps;\n elBar0.style.height = ps;\n elBar1.style.height = rps;\n } else {\n elHandle.style.left = ps;\n elBar0.style.width = rps;\n elBar1.style.width = ps;\n }\n }\n /** Some attrs need to be cached (and updated) so that they are current in event handlers */ function updateAttrs(attrs) {\n min = attrs.min;\n max = attrs.max;\n step = typeof attrs.step === \"number\" && !Number.isNaN(attrs.step) ? $12ab4b555e4e721f$var$clamp(attrs.step, 0, max - min) : 1;\n orientation = attrs.orientation === \"vertical\" ? \"vertical\" : \"horizontal\";\n onchange = attrs.onchange;\n ondrag = attrs.ondrag;\n if (typeof attrs.value === \"number\") value = $12ab4b555e4e721f$var$clamp(attrs.value, min, max);\n }\n /** Return mithril component hooks object */ return {\n oncreate: function(_a) {\n var attrs = _a.attrs, dom = _a.dom;\n $12ab4b555e4e721f$var$applyIOSHack();\n updateAttrs(attrs);\n elHit = dom;\n elBar = elHit.querySelector(\".mithril-range-bar\");\n elBar0 = elBar.querySelector(\".mithril-range-bar-0\");\n elBar1 = elBar.querySelector(\".mithril-range-bar-1\");\n elHandle = elBar.querySelector(\".mithril-range-handle\");\n elHit.addEventListener(\"mousedown\", onMouseDown);\n elHit.addEventListener(\"touchstart\", onTouchStart);\n elHit.addEventListener(\"keydown\", onKeyDown);\n },\n onremove: function() {\n window.removeEventListener(\"mousemove\", onMouseMove);\n window.removeEventListener(\"mouseup\", onMouseUp);\n elHit.removeEventListener(\"mousedown\", onMouseDown);\n elHit.removeEventListener(\"touchstart\", onTouchStart);\n elHit.removeEventListener(\"touchmove\", onTouchMove);\n elHit.removeEventListener(\"touchend\", onTouchEnd);\n elHit.removeEventListener(\"keydown\", onKeyDown);\n },\n view: function(_a) {\n var attrs = _a.attrs, children = _a.children;\n updateAttrs(attrs);\n value = $12ab4b555e4e721f$var$quantize(value, min, max, step);\n var a = {\n class: \"mithril-range\" + (attrs.class != null ? \" \" + attrs.class : \"\"),\n tabIndex: \"0\",\n role: \"slider\",\n \"aria-valuemin\": String(min),\n \"aria-valuemax\": String(max),\n \"aria-valuenow\": String(value),\n \"aria-orientation\": orientation\n };\n if (attrs.id) a.id = attrs.id;\n if (attrs.ariaLabelledby) a[\"aria-labelledby\"] = attrs.ariaLabelledby;\n if (attrs.disabled) {\n a.style = {\n pointerEvents: \"none\"\n };\n a[\"aria-disabled\"] = \"true\";\n }\n var ps = positionStyle(value);\n var rps = positionStyle(max - value + min);\n var handleStyle, bar0Style, bar1Style;\n if (orientation === \"vertical\") {\n handleStyle = {\n top: ps\n };\n bar0Style = {\n height: ps\n };\n bar1Style = {\n height: rps\n };\n } else {\n handleStyle = {\n left: ps\n };\n bar0Style = {\n width: rps\n };\n bar1Style = {\n width: ps\n };\n }\n return $65d5daca13f5010c$exports(\"div\", a, $65d5daca13f5010c$exports(\"div\", {\n class: \"mithril-range-bar\"\n }, $65d5daca13f5010c$exports(\"div\", {\n class: \"mithril-range-bar-0\",\n style: bar0Style\n }), $65d5daca13f5010c$exports(\"div\", {\n class: \"mithril-range-bar-1\",\n style: bar1Style\n }), $65d5daca13f5010c$exports(\"div\", {\n class: \"mithril-range-handle\",\n style: handleStyle\n }, children)), !!attrs.name && $65d5daca13f5010c$exports(\"input\", {\n type: \"hidden\",\n name: attrs.name,\n value: String(value)\n }));\n }\n };\n}\n$12ab4b555e4e721f$exports.default = $12ab4b555e4e721f$var$MithrilRange;\n\n\n// @ts-check\n/**\n * A class that handles the Yielding logic & helps generate replacement logic.\n */ class $99853b4cdba0c969$export$217b4a9f5766d4d4 {\n constructor(data){\n this._logic = null;\n this.resumable = null;\n this._input = null;\n Object.assign(this, data);\n }\n logic() {\n // if (this._input && !this._logic) {\n // return { [this._name]: this._input }\n // }\n return this._logic;\n }\n}\n// @ts-check\nconst $99853b4cdba0c969$var$mutateKey = (i)=>i;\nconst $99853b4cdba0c969$var$mutateValue = (i)=>i;\nconst $99853b4cdba0c969$var$skipCopy = (i)=>false;\nconst $99853b4cdba0c969$var$defaultOptions = {\n mutateKey: $99853b4cdba0c969$var$mutateKey,\n mutateValue: $99853b4cdba0c969$var$mutateValue,\n skipCopy: $99853b4cdba0c969$var$skipCopy\n};\n/**\n *\n * @param {Object} obj\n * @param {Object} target\n * @param {{ mutateKey?: Function, mutateValue?: Function, skipCopy?: Function }} options\n * @returns\n */ function $99853b4cdba0c969$var$traverseCopy(obj, target = {}, options = $99853b4cdba0c969$var$defaultOptions) {\n const { mutateKey: mutateKey, mutateValue: mutateValue, skipCopy: skipCopy } = {\n ...$99853b4cdba0c969$var$defaultOptions,\n ...options\n };\n if (typeof obj === \"object\" && !Array.isArray(obj) && obj) {\n if (skipCopy(obj)) return mutateValue(obj);\n Object.keys(obj).forEach((key)=>{\n target[mutateKey(key)] = mutateValue($99853b4cdba0c969$var$traverseCopy(obj[key], {}, options));\n });\n return target;\n } else if (Array.isArray(obj)) return [\n ...obj\n ].map((i, x)=>mutateValue($99853b4cdba0c969$var$traverseCopy(i, {}, options)));\n else return mutateValue(obj);\n}\n// @ts-check\nfunction $99853b4cdba0c969$var$fetchYields(obj, arr = []) {\n if (obj instanceof $99853b4cdba0c969$export$217b4a9f5766d4d4) {\n arr.push(obj);\n return arr;\n }\n if (Array.isArray(obj)) obj.forEach((i)=>$99853b4cdba0c969$var$fetchYields(i, arr));\n else if (typeof obj === \"object\") Object.keys(obj || {}).forEach((key)=>{\n $99853b4cdba0c969$var$fetchYields(obj[key], arr);\n });\n return arr;\n}\nclass $99853b4cdba0c969$export$be4f7f3aef5d45f6 {\n constructor(data){\n this.data = data;\n }\n yields() {\n return $99853b4cdba0c969$var$fetchYields(this.data.result, []);\n }\n logic() {\n return $99853b4cdba0c969$var$traverseCopy(this.data.result, {}, {\n mutateValue: (i)=>{\n if (i instanceof $99853b4cdba0c969$export$217b4a9f5766d4d4) return i.logic();\n return i;\n },\n skipCopy: (i)=>i instanceof $99853b4cdba0c969$export$217b4a9f5766d4d4\n });\n }\n}\n// @ts-check\n/**\n * Checks if the item that's passed in is or contains a YieldStructure / EngineObject (signifying a YieldStructure)\n * @param {*} item\n * @returns {Boolean}\n */ function $99853b4cdba0c969$var$checkYield(item) {\n if (Array.isArray(item)) return item.some((i)=>i instanceof $99853b4cdba0c969$export$217b4a9f5766d4d4 || i instanceof $99853b4cdba0c969$export$be4f7f3aef5d45f6);\n return item instanceof $99853b4cdba0c969$export$217b4a9f5766d4d4 || item instanceof $99853b4cdba0c969$export$be4f7f3aef5d45f6;\n}\n// @ts-check\n// Note: Each of these iterators executes synchronously, and will not \"run in parallel\"\n// I am supporting filter, reduce, some, every, map\nasync function $99853b4cdba0c969$var$filter(arr, iter) {\n const result = [];\n for (const item of arr)if (await iter(item)) result.push(item);\n return result;\n}\nasync function $99853b4cdba0c969$var$some(arr, iter) {\n for (const item of arr){\n if (await iter(item)) return true;\n }\n return false;\n}\nasync function $99853b4cdba0c969$var$every(arr, iter) {\n for (const item of arr){\n if (!await iter(item)) return false;\n }\n return true;\n}\nasync function $99853b4cdba0c969$var$map(arr, iter) {\n const result = [];\n for (const item of arr)result.push(await iter(item));\n return result;\n}\nasync function $99853b4cdba0c969$var$reduce(arr, iter, defaultValue) {\n if (arr.length === 0) {\n if (typeof defaultValue !== \"undefined\") return defaultValue;\n throw new Error(\"Array has no elements.\");\n }\n const start = typeof defaultValue === \"undefined\" ? 1 : 0;\n let data = start ? arr[0] : defaultValue;\n for(let i = start; i < arr.length; i++)data = await iter(data, arr[i]);\n return data;\n}\nconst $99853b4cdba0c969$var$asyncIterators = {\n filter: $99853b4cdba0c969$var$filter,\n some: $99853b4cdba0c969$var$some,\n every: $99853b4cdba0c969$var$every,\n map: $99853b4cdba0c969$var$map,\n reduce: $99853b4cdba0c969$var$reduce\n};\n// @ts-check\nconst $99853b4cdba0c969$var$Sync = Symbol.for(\"json_logic_sync\");\nconst $99853b4cdba0c969$var$Override = Symbol.for(\"json_logic_override\");\nconst $99853b4cdba0c969$var$EfficientTop = Symbol.for(\"json_logic_efficientTop\");\nconst $99853b4cdba0c969$var$isSync = (x)=>Boolean(typeof x !== \"function\" || x[$99853b4cdba0c969$var$Sync]);\nconst $99853b4cdba0c969$export$a002182e51710d39 = {\n Sync: $99853b4cdba0c969$var$Sync,\n Override: $99853b4cdba0c969$var$Override,\n EfficientTop: $99853b4cdba0c969$var$EfficientTop,\n isSync: $99853b4cdba0c969$var$isSync\n};\n// @ts-check\nfunction $99853b4cdba0c969$var$declareSync(obj, sync = true) {\n obj[$99853b4cdba0c969$var$Sync] = sync;\n return obj;\n}\n// @ts-check\n/**\n * @typedef BuildState\n * Used to keep track of the compilation.\n * @property {*} [engine]\n * @property {Object} [notTraversed]\n * @property {Object} [functions]\n * @property {Object} [methods]\n * @property {Object} [state]\n * @property {Array} [processing]\n * @property {*} [async]\n * @property {Array} [above]\n * @property {Boolean} [asyncDetected]\n * @property {*} [values]\n * @property {*} [yieldUsed]\n * @property {Boolean} [useContext]\n * @property {Boolean} [avoidInlineAsync]\n *\n */ /**\n * Checks if the value passed in is a primitive JS object / value.\n * @param {*} x\n * @returns\n */ function $99853b4cdba0c969$var$isPrimitive(x, preserveObject) {\n if (typeof x === \"number\" && (x === Infinity || x === -Infinity || Number.isNaN(x))) return false;\n return x === null || x === undefined || [\n \"Number\",\n \"String\",\n \"Boolean\"\n ].includes(x.constructor.name) || !preserveObject && x.constructor.name === \"Object\";\n}\n/**\n * Checks if the method & its inputs are deterministic.\n * @param {*} method\n * @param {*} engine\n * @param {BuildState} buildState\n * @returns\n */ function $99853b4cdba0c969$var$isDeterministic$2(method, engine, buildState) {\n if (Array.isArray(method)) return method.every((i)=>$99853b4cdba0c969$var$isDeterministic$2(i, engine, buildState));\n if (method && typeof method === \"object\") {\n const func = Object.keys(method)[0];\n const lower = method[func];\n if (engine.methods[func].traverse === false) return typeof engine.methods[func].deterministic === \"function\" ? engine.methods[func].deterministic(lower, buildState) : engine.methods[func].deterministic;\n return typeof engine.methods[func].deterministic === \"function\" ? engine.methods[func].deterministic(lower, buildState) : engine.methods[func].deterministic && $99853b4cdba0c969$var$isDeterministic$2(lower, engine, buildState);\n }\n return true;\n}\n/**\n * Checks if the method & its inputs are synchronous.\n * @param {*} method\n * @param {*} engine\n */ function $99853b4cdba0c969$var$isDeepSync(method, engine) {\n if (!engine.async) return true;\n if (Array.isArray(method)) return method.every((i)=>$99853b4cdba0c969$var$isDeepSync(i, engine));\n if (typeof method === \"object\") {\n const func = Object.keys(method)[0];\n const lower = method[func];\n if (!$99853b4cdba0c969$var$isSync(engine.methods[func])) return false;\n return $99853b4cdba0c969$var$isDeepSync(lower, engine);\n }\n return true;\n}\n/**\n * A function that handles yields by caching the values to resumable object.\n * @param {Function} func\n * @param {*} input\n * @param {String} name\n * @param {Object} resumable\n * @returns\n */ function $99853b4cdba0c969$var$r(func, input, name, resumable) {\n if (resumable[name]) return resumable[name];\n const result = resumable[name + \"_input\"] ? func(resumable[name + \"_input\"]) : func(typeof input === \"function\" ? input() : input);\n if (result instanceof $99853b4cdba0c969$export$217b4a9f5766d4d4) {\n if (result._input) resumable[name + \"_input\"] = result._input;\n result.resumable = resumable;\n throw result;\n } else resumable[name] = result;\n return result;\n}\n/**\n * A function that handles async yields by caching the values to resumable object.\n * @param {Function} func\n * @param {*} input\n * @param {String} name\n * @param {Object} resumable\n * @returns\n */ async function $99853b4cdba0c969$var$rAsync(func, input, name, resumable) {\n if (resumable[name]) return resumable[name];\n const result = resumable[name + \"_input\"] ? await func(resumable[name + \"_input\"]) : await func(typeof input === \"function\" ? await input() : input);\n if (result instanceof $99853b4cdba0c969$export$217b4a9f5766d4d4) {\n if (result._input) resumable[name + \"_input\"] = result._input;\n result.resumable = resumable;\n throw result;\n } else resumable[name] = result;\n return result;\n}\n/**\n * Builds a string for a function that may need to yield & resume.\n * @param {String} method\n * @param {BuildState} buildState\n * @returns\n */ function $99853b4cdba0c969$var$buildYield(method, buildState = {}) {\n // todo: add gc so we don't save resumable state for longer than it needs to exist\n const { notTraversed: notTraversed = [], functions: functions = {}, async: async, engine: engine } = buildState;\n const func = Object.keys(method)[0];\n buildState.yieldUsed = (buildState.yieldUsed || 0) + 1;\n let asyncDetected = false;\n buildState.useContext = buildState.useContext || (engine.methods[func] || {}).useContext;\n if (typeof engine.methods[func] === \"function\") {\n functions[func] = 1;\n asyncDetected = !$99853b4cdba0c969$var$isSync(engine.methods[func]);\n const stringBuildState = {\n ...buildState,\n avoidInlineAsync: true\n };\n const inputStr = $99853b4cdba0c969$var$buildString(method[func], stringBuildState);\n buildState.useContext = buildState.useContext || stringBuildState.useContext;\n if (asyncDetected || inputStr.includes(\"await\")) {\n buildState.asyncDetected = buildState.asyncDetected || asyncDetected;\n return `await rAsync(gen[\"${func}\"], async () => { return ${inputStr} }, 'yield${buildState.yieldUsed}', resumable)`;\n }\n return `r(gen[\"${func}\"], () => { return ${inputStr} }, 'yield${buildState.yieldUsed}', resumable)`;\n } else if (engine.methods[func] && engine.methods[func].traverse) {\n functions[func] = 1;\n // console.log(async)\n asyncDetected = Boolean(async && engine.methods[func] && engine.methods[func].asyncMethod);\n const stringBuildState = {\n ...buildState,\n avoidInlineAsync: true\n };\n const inputStr = $99853b4cdba0c969$var$buildString(method[func], stringBuildState);\n buildState.useContext = buildState.useContext || stringBuildState.useContext;\n if (asyncDetected || inputStr.startsWith(\"await\")) {\n buildState.asyncDetected = buildState.asyncDetected || asyncDetected;\n return `await rAsync(gen[\"${func}\"], async () => ${inputStr}, 'yield${buildState.yieldUsed}', resumable)`;\n }\n return `r(gen[\"${func}\"], () => ${inputStr}, 'yield${buildState.yieldUsed}', resumable)`;\n } else {\n // todo: make build work for yields somehow. The issue is that it pre-binds data, thus making it impossible\n asyncDetected = Boolean(async && engine.methods[func] && engine.methods[func].asyncMethod);\n functions[func] = 1;\n notTraversed.push(method[func]);\n buildState.useContext = true;\n if (asyncDetected) {\n buildState.asyncDetected = buildState.asyncDetected || asyncDetected;\n return `await rAsync(gen[\"${func}\"], notTraversed[${notTraversed.length - 1}], 'yield${buildState.yieldUsed}', resumable)`;\n }\n return `r(gen[\"${func}\"], notTraversed[${notTraversed.length - 1}], 'yield${buildState.yieldUsed}', resumable)`;\n }\n}\n/**\n * Builds the string for the function that will be evaluated.\n * @param {*} method\n * @param {BuildState} buildState\n * @returns\n */ function $99853b4cdba0c969$var$buildString(method, buildState = {}) {\n const { notTraversed: notTraversed = [], functions: functions = {}, methods: methods = [], state: state, async: async, above: above = [], processing: processing = [], values: values = [], engine: engine } = buildState;\n function pushValue(value, preserveObject = false) {\n if ($99853b4cdba0c969$var$isPrimitive(value, preserveObject)) return JSON.stringify(value);\n values.push(value);\n return `values[${values.length - 1}]`;\n }\n if (Array.isArray(method)) return \"[\" + method.map((i)=>$99853b4cdba0c969$var$buildString(i, buildState)).join(\", \") + \"]\";\n let asyncDetected = false;\n function makeAsync(result) {\n buildState.asyncDetected = buildState.asyncDetected || asyncDetected;\n if (async && asyncDetected) return `await ${result}`;\n return result;\n }\n const func = method && Object.keys(method)[0];\n buildState.useContext = buildState.useContext || (engine.methods[func] || {}).useContext;\n if (method && typeof method === \"object\") {\n if (!func) return pushValue(method);\n if (!engine.methods[func]) {\n // If we are in permissive mode, we will just return the object.\n if (engine.options.permissive) return pushValue(method, true);\n throw new Error(`Method '${func}' was not found in the Logic Engine.`);\n }\n functions[func] = functions[func] || 2;\n if (!buildState.engine.disableInline && engine.methods[func] && $99853b4cdba0c969$var$isDeterministic$2(method, engine, buildState)) {\n if ($99853b4cdba0c969$var$isDeepSync(method, engine)) return pushValue((engine.fallback || engine).run(method), true);\n else if (!buildState.avoidInlineAsync) {\n processing.push(engine.run(method).then((i)=>pushValue(i)));\n return `__%%%${processing.length - 1}%%%__`;\n }\n }\n if (engine.options.yieldSupported && engine.methods[func] && engine.methods[func].yields) return $99853b4cdba0c969$var$buildYield(method, buildState);\n if (engine.methods[func] && engine.methods[func].compile) {\n const str = engine.methods[func].compile(method[func], buildState);\n if ((str || \"\").startsWith(\"await\")) buildState.asyncDetected = true;\n if (str !== false) return str;\n }\n if (typeof engine.methods[func] === \"function\") {\n functions[func] = 1;\n asyncDetected = !$99853b4cdba0c969$var$isSync(engine.methods[func]);\n return makeAsync(`gen[\"${func}\"](` + $99853b4cdba0c969$var$buildString(method[func], buildState) + \")\");\n } else if (engine.methods[func] && (typeof engine.methods[func].traverse === \"undefined\" ? true : engine.methods[func].traverse)) {\n functions[func] = 1;\n asyncDetected = Boolean(async && engine.methods[func] && engine.methods[func].asyncMethod);\n return makeAsync(`gen[\"${func}\"](` + $99853b4cdba0c969$var$buildString(method[func], buildState) + \")\");\n } else {\n if (engine.methods[func]) {\n if (async) {\n if (engine.methods[func].asyncBuild || engine.methods[func].build) {\n const builder = engine.methods[func].asyncBuild || engine.methods[func].build;\n const result = builder(method[func], state, above, engine, buildState);\n methods.push(result);\n asyncDetected = !$99853b4cdba0c969$var$isSync(result);\n return makeAsync(`methods[${methods.length - 1}]()`);\n }\n } else if (engine.methods[func].build) {\n methods.push(engine.methods[func].build(method[func], state, above, engine, buildState));\n return makeAsync(`methods[${methods.length - 1}]()`);\n }\n }\n asyncDetected = Boolean(async && engine.methods[func] && engine.methods[func].asyncMethod);\n functions[func] = 1;\n notTraversed.push(method[func]);\n return makeAsync(`gen[\"${func}\"](` + `notTraversed[${notTraversed.length - 1}]` + \")\");\n }\n }\n return pushValue(method);\n}\n/**\n * Synchronously compiles the logic to a function that can run the logic more optimally.\n * @param {*} method\n * @param {BuildState} [buildState]\n * @returns\n */ function $99853b4cdba0c969$var$build(method, buildState = {}) {\n Object.assign(buildState, Object.assign({\n notTraversed: [],\n functions: {},\n methods: [],\n state: {},\n processing: [],\n async: buildState.engine.async,\n above: [],\n asyncDetected: false,\n values: []\n }, buildState));\n const str = $99853b4cdba0c969$var$buildString(method, buildState);\n return $99853b4cdba0c969$var$processBuiltString(method, str, buildState);\n}\n/**\n * Asynchronously compiles the logic to a function that can run the logic more optimally. Also supports async logic methods.\n * @param {*} method\n * @param {BuildState} [buildState]\n * @returns\n */ async function $99853b4cdba0c969$var$buildAsync(method, buildState = {}) {\n Object.assign(buildState, Object.assign({\n notTraversed: [],\n functions: {},\n methods: [],\n state: {},\n processing: [],\n async: buildState.engine.async,\n above: [],\n asyncDetected: false,\n values: []\n }, buildState));\n const str = $99853b4cdba0c969$var$buildString(method, buildState);\n buildState.processing = await Promise.all(buildState.processing);\n return $99853b4cdba0c969$var$processBuiltString(method, str, buildState);\n}\n/**\n * Takes the string that's been generated and does some post-processing on it to be evaluated.\n * @param {*} method\n * @param {*} str\n * @param {BuildState} buildState\n * @returns\n */ function $99853b4cdba0c969$var$processBuiltString(method, str, buildState) {\n const gen = {};\n const { functions: functions, state: state, async: async, engine: engine, above: above, methods: methods, notTraversed: notTraversed, processing: processing, values: values } = buildState;\n processing.forEach((item, x)=>{\n str = str.replace(`__%%%${x}%%%__`, item);\n });\n Object.keys(functions).forEach((key)=>{\n if (functions[key] === 2) return;\n if (!engine.methods[key]) throw new Error(`Method '${key}' was not found in the Logic Engine.`);\n if (typeof engine.methods[key] === \"function\") {\n const method = engine.methods[key];\n gen[key] = (input)=>method(input, state, above, engine);\n } else if (async && engine.methods[key].asyncMethod) {\n buildState.asyncDetected = true;\n const method = engine.methods[key].asyncMethod;\n gen[key] = (input)=>method(input, state, above, engine);\n } else {\n const method = engine.methods[key].method;\n gen[key] = (input)=>method(input, state, above, engine);\n }\n });\n if (!Object.keys(functions).length) return method;\n let copyStateCall = \"state[Override] = context;\";\n // console.log(buildState.useContext)\n if (!buildState.useContext) {\n copyStateCall = \"\";\n while(str.includes(\"state[Override]\"))str = str.replace(\"state[Override]\", \"context\");\n }\n const final = `(state, values, methods, gen, notTraversed, Override, asyncIterators, r, rAsync) => ${buildState.asyncDetected ? \"async\" : \"\"} (context ${buildState.yieldUsed ? \", resumable = {}\" : \"\"}) => { ${copyStateCall} const result = ${str}; return result }`;\n // console.log(str)\n // console.log(final)\n // eslint-disable-next-line no-eval\n return $99853b4cdba0c969$var$declareSync(globalThis.eval(final)(state, values, methods, gen, notTraversed, $99853b4cdba0c969$var$Override, $99853b4cdba0c969$var$asyncIterators, $99853b4cdba0c969$var$r, $99853b4cdba0c969$var$rAsync), !buildState.asyncDetected);\n}\nconst $99853b4cdba0c969$export$3a6335acfcf707c9 = {\n build: $99853b4cdba0c969$var$build,\n buildAsync: $99853b4cdba0c969$var$buildAsync,\n buildString: $99853b4cdba0c969$var$buildString,\n r: $99853b4cdba0c969$var$r,\n rAsync: $99853b4cdba0c969$var$rAsync\n};\n// @ts-check\n/**\n * Checks if optional chaining is supported for the compiler\n * @returns {Boolean}\n */ const $99853b4cdba0c969$var$getIsOptionalChainingSupported = ()=>{\n try {\n // eslint-disable-next-line no-unused-vars\n const test = {};\n // eslint-disable-next-line no-eval\n const isUndefined = globalThis.eval(\"(test) => test?.foo?.bar\")(test);\n return isUndefined === undefined;\n } catch {\n return false;\n }\n};\nconst $99853b4cdba0c969$var$chainingSupported = $99853b4cdba0c969$var$getIsOptionalChainingSupported();\n// @ts-check\nclass $99853b4cdba0c969$var$InvalidControlInput extends Error {\n constructor(input){\n super();\n this.message = \"Built-in control structures are not allowed to receive dynamic inputs, this could allow a lesser version of remote-code execution.\";\n this.input = input;\n }\n}\n// @ts-check\n// works fine for arrays, may need to create a more general version though\nclass $99853b4cdba0c969$var$ReduceIterator {\n constructor(arr, cur, next){\n this.arr = arr;\n this.cur = cur;\n this.nextCall = next;\n this.position = 0;\n this._position = 0;\n this.map = null;\n }\n next() {\n const item = this.arr[this.position];\n this._position = this.position;\n const cur = this.nextCall(this.cur, item, this.arr, this);\n if (cur instanceof $99853b4cdba0c969$export$217b4a9f5766d4d4 || cur instanceof $99853b4cdba0c969$export$be4f7f3aef5d45f6) return cur;\n // commit\n this.position = this._position;\n this.cur = cur;\n this.position++;\n return this.cur;\n }\n skip() {\n this._position++;\n }\n dump() {\n this._position = this.arr.length;\n }\n result() {\n return this.cur;\n }\n state() {\n return {\n arr: this.arr.splice(this.position),\n cur: this.cur\n };\n }\n done() {\n return this.position >= this.arr.length;\n }\n}\nclass $99853b4cdba0c969$var$AsyncReduceIterator extends $99853b4cdba0c969$var$ReduceIterator {\n async next() {\n const item = this.arr[this.position];\n this._position = this.position;\n const cur = await this.nextCall(this.cur, item, this.arr, this);\n if (cur instanceof $99853b4cdba0c969$export$217b4a9f5766d4d4 || cur instanceof $99853b4cdba0c969$export$be4f7f3aef5d45f6) return cur;\n // commit\n this.position = this._position;\n this.cur = cur;\n this.position++;\n return this.cur;\n }\n}\n// @ts-check\n// Todo: Pursue support for yielding within the built functions.\n// It will be extremely difficult to leverage the yields here.\nfunction $99853b4cdba0c969$var$isDeterministic$1(method, engine, buildState) {\n if (Array.isArray(method)) return method.every((i)=>$99853b4cdba0c969$var$isDeterministic$1(i, engine, buildState));\n if (method && typeof method === \"object\") {\n const func = Object.keys(method)[0];\n const lower = method[func];\n if (engine.methods[func].traverse === false) return typeof engine.methods[func].deterministic === \"function\" ? engine.methods[func].deterministic(lower, buildState) : engine.methods[func].deterministic;\n return typeof engine.methods[func].deterministic === \"function\" ? engine.methods[func].deterministic(lower, buildState) : engine.methods[func].deterministic && $99853b4cdba0c969$var$isDeterministic$1(lower, engine, buildState);\n }\n return true;\n}\nfunction $99853b4cdba0c969$var$createYieldingControl(name, method, asyncMethod) {\n return {\n yields: true,\n method: (input, context, above, engine)=>{\n let arr = input;\n let cur = null;\n if (!Array.isArray(input)) {\n arr = input.arr;\n cur = input.cur;\n }\n const executed = method(input, context, above, engine);\n const iter = new $99853b4cdba0c969$var$ReduceIterator(arr, cur, executed);\n while(!iter.done()){\n const cur = iter.next();\n if ($99853b4cdba0c969$var$checkYield(cur)) return new $99853b4cdba0c969$export$217b4a9f5766d4d4({\n yield: cur,\n _name: name,\n _input: iter.state()\n });\n }\n return iter.result();\n },\n asyncMethod: async (input, context, above, engine)=>{\n let arr = input;\n let cur = null;\n if (!Array.isArray(input)) {\n arr = input.arr;\n cur = input.cur;\n }\n const executed = asyncMethod(input, context, above, engine);\n const iter = new $99853b4cdba0c969$var$AsyncReduceIterator(arr, cur, executed);\n while(!iter.done()){\n const cur = await iter.next();\n if ($99853b4cdba0c969$var$checkYield(cur)) return new $99853b4cdba0c969$export$217b4a9f5766d4d4({\n yield: cur,\n _name: name,\n _input: iter.state()\n });\n }\n return iter.result();\n },\n traverse: false\n };\n}\nconst $99853b4cdba0c969$var$ifYield = $99853b4cdba0c969$var$createYieldingControl(\"ifYield\", (input, context, above, engine)=>(cur, item, arr, iter)=>{\n if (arr.length % 2 === 0) arr.push(null);\n // if it's an even spot, and not the last item, run the condition.\n if ((iter._position & 1) === 0 && iter._position !== arr.length - 1) {\n const test = engine.run(item, context, {\n above: above\n });\n if (!test) iter.skip();\n return test;\n } else if (iter._position & 1) // if it's odd, then we are done.\n iter.dump();\n return engine.run(item, context, {\n above: above\n });\n }, (input, context, above, engine)=>async (cur, item, arr, iter)=>{\n if (arr.length % 2 === 0) arr.push(null);\n // if it's an even spot, and not the last item, run the condition.\n if ((iter._position & 1) === 0 && iter._position !== arr.length - 1) {\n const test = await engine.run(item, context, {\n above: above\n });\n if (!test) iter.skip();\n return test;\n } else if (iter._position & 1) // if it's odd, then we are done.\n iter.dump();\n return engine.run(item, context, {\n above: above\n });\n });\nconst $99853b4cdba0c969$var$someYield = $99853b4cdba0c969$var$createArrayIterativeMethod$1(\"someYield\", (input, context, above, engine)=>(cur, item, arr, iter)=>{\n const currentItem = engine.run(iter.map, item, {\n above: [\n input,\n context,\n ...above\n ]\n });\n if (currentItem) {\n iter.dump();\n return currentItem;\n }\n return false;\n }, (input, context, above, engine)=>async (cur, item, arr, iter)=>{\n const currentItem = await engine.run(iter.map, item, {\n above: [\n input,\n context,\n ...above\n ]\n });\n if (currentItem) {\n iter.dump();\n return currentItem;\n }\n return false;\n }, false);\nconst $99853b4cdba0c969$var$everyYield = $99853b4cdba0c969$var$createArrayIterativeMethod$1(\"everyYield\", (input, context, above, engine)=>(cur, item, arr, iter)=>{\n const currentItem = engine.run(iter.map, item, {\n above: [\n input,\n context,\n ...above\n ]\n });\n if (!currentItem) {\n iter.dump();\n return false;\n }\n return currentItem;\n }, (input, context, above, engine)=>async (cur, item, arr, iter)=>{\n const currentItem = await engine.run(iter.map, item, {\n above: [\n input,\n context,\n ...above\n ]\n });\n if (!currentItem) {\n iter.dump();\n return false;\n }\n return currentItem;\n }, true);\nconst $99853b4cdba0c969$var$filterYield = $99853b4cdba0c969$var$createArrayIterativeMethod$1(\"filterYield\", (input, context, above, engine)=>(cur, item, arr, iter)=>{\n const currentItem = engine.run(iter.map, item, {\n above: [\n input,\n context,\n ...above\n ]\n });\n if ($99853b4cdba0c969$var$checkYield(currentItem)) return currentItem;\n if (currentItem) cur.push(item);\n return cur;\n }, (input, context, above, engine)=>async (cur, item, arr, iter)=>{\n const currentItem = await engine.run(iter.map, item, {\n above: [\n input,\n context,\n ...above\n ]\n });\n if ($99853b4cdba0c969$var$checkYield(currentItem)) return currentItem;\n if (currentItem) cur.push(item);\n return cur;\n }, ()=>[]);\nconst $99853b4cdba0c969$var$mapYield = $99853b4cdba0c969$var$createArrayIterativeMethod$1(\"mapYield\", (input, context, above, engine)=>(cur, item, arr, iter)=>{\n const currentItem = engine.run(iter.map, item, {\n above: [\n input,\n context,\n ...above\n ]\n });\n if ($99853b4cdba0c969$var$checkYield(currentItem)) return currentItem;\n cur.push(currentItem);\n return cur;\n }, (input, context, above, engine)=>async (cur, item, arr, iter)=>{\n const currentItem = await engine.run(iter.map, item, {\n above: [\n input,\n context,\n ...above\n ]\n });\n if ($99853b4cdba0c969$var$checkYield(currentItem)) return currentItem;\n cur.push(currentItem);\n return cur;\n }, ()=>[]);\nconst $99853b4cdba0c969$var$reduceYield = $99853b4cdba0c969$var$createArrayIterativeMethod$1(\"reduceYield\", (input, context, above, engine)=>(cur, item, arr, iter)=>{\n return engine.run(iter.map, {\n accumulator: cur,\n current: item\n }, {\n above: [\n input,\n context,\n ...above\n ]\n });\n }, (input, context, above, engine)=>async (cur, item, arr, iter)=>{\n return engine.run(iter.map, {\n accumulator: cur,\n current: item\n }, {\n above: [\n input,\n context,\n ...above\n ]\n });\n });\nfunction $99853b4cdba0c969$var$createArrayIterativeMethod$1(name, method, asyncMethod, defaultInitializer) {\n const result = {\n yields: true,\n deterministic: (data, buildState)=>{\n return $99853b4cdba0c969$var$isDeterministic$1(data[0], buildState.engine, buildState) && $99853b4cdba0c969$var$isDeterministic$1(data[1], buildState.engine, {\n ...buildState,\n insideIterator: true\n });\n },\n build: (input, context, above, engine, buildState)=>{\n buildState.useContext = true;\n return $99853b4cdba0c969$var$declareSync(()=>result.method(input, context, above, engine));\n },\n asyncBuild: (input, context, above, engine, buildState)=>{\n buildState.useContext = true;\n const [selector, mapper] = input;\n // const selectFunction = engine.build(selector, {}, { top: EfficientTop })\n // const mapFunction = engine.build(mapper, {}, { top: EfficientTop })\n const selectFunction = $99853b4cdba0c969$var$build(selector, {\n engine: engine,\n async: true,\n avoidInlineAsync: true\n });\n const mapFunction = $99853b4cdba0c969$var$build(mapper, {\n engine: engine,\n state: {},\n async: true,\n avoidInlineAsync: true\n });\n if ($99853b4cdba0c969$var$isSync(selectFunction) && $99853b4cdba0c969$var$isSync(mapFunction)) return $99853b4cdba0c969$var$declareSync(()=>result.method(input, context, above, engine.fallback));\n return ()=>result.asyncMethod(input, context, above, engine);\n },\n method: (input, context, above, engine)=>{\n let defaultCur = defaultInitializer;\n if (typeof defaultInitializer === \"function\") defaultCur = defaultInitializer();\n let arr;\n let cur;\n let map = null;\n if (Array.isArray(input)) {\n const [selector, mapper, defaultValue] = input;\n const selected = engine.run(selector, context, {\n above: above\n }) || [];\n if ($99853b4cdba0c969$var$checkYield(selected)) // todo: add extraction of the existing yields.\n return new $99853b4cdba0c969$export$217b4a9f5766d4d4({\n _input: [\n selector,\n mapper,\n defaultValue\n ],\n _name: name,\n yields: selected.yields()\n });\n arr = selected;\n map = mapper;\n cur = defaultValue === 0 ? 0 : defaultValue || defaultCur;\n } else {\n arr = input.arr;\n cur = input.cur;\n map = input.map;\n }\n const executed = method(input, context, above, engine);\n const iter = new $99853b4cdba0c969$var$ReduceIterator(arr, cur, executed);\n iter.map = map;\n while(!iter.done()){\n const cur = iter.next();\n if ($99853b4cdba0c969$var$checkYield(cur)) return new $99853b4cdba0c969$export$217b4a9f5766d4d4({\n yields: cur.yields(),\n _name: name,\n _input: {\n ...iter.state(),\n map: map\n }\n });\n }\n return iter.result();\n },\n asyncMethod: async (input, context, above, engine)=>{\n let defaultCur = defaultInitializer;\n if (typeof defaultInitializer === \"function\") defaultCur = defaultInitializer();\n let arr;\n let cur;\n let map = null;\n if (Array.isArray(input)) {\n const [selector, mapper, defaultValue] = input;\n const selected = await engine.run(selector, context, {\n above: above\n }) || [];\n if ($99853b4cdba0c969$var$checkYield(selected)) // todo: add extraction of the existing yields.\n return new $99853b4cdba0c969$export$217b4a9f5766d4d4({\n _name: name,\n _input: [\n selector,\n mapper,\n defaultValue\n ],\n yields: selected.yields()\n });\n arr = selected;\n map = mapper;\n cur = defaultValue === 0 ? 0 : defaultValue || defaultCur;\n } else {\n arr = input.arr;\n cur = input.cur;\n map = input.map;\n }\n const executed = asyncMethod(input, context, above, engine);\n const iter = new $99853b4cdba0c969$var$AsyncReduceIterator(arr, cur, executed);\n iter.map = map;\n while(!iter.done()){\n const cur = await iter.next();\n if ($99853b4cdba0c969$var$checkYield(cur)) return new $99853b4cdba0c969$export$217b4a9f5766d4d4({\n yields: cur.yields(),\n _name: name,\n _input: {\n ...iter.state(),\n map: map\n }\n });\n }\n return iter.result();\n },\n traverse: false\n };\n return result;\n}\nconst $99853b4cdba0c969$var$YieldingIterators = {\n someYield: $99853b4cdba0c969$var$someYield,\n everyYield: $99853b4cdba0c969$var$everyYield,\n filterYield: $99853b4cdba0c969$var$filterYield,\n mapYield: $99853b4cdba0c969$var$mapYield,\n reduceYield: $99853b4cdba0c969$var$reduceYield,\n ifYield: $99853b4cdba0c969$var$ifYield\n};\n/**\n * Splits a path string into an array of parts.\n *\n * @example splitPath('a.b.c') // ['a', 'b', 'c']\n * @example splitPath('a\\\\.b.c') // ['a.b', 'c']\n * @example splitPath('a\\\\\\\\.b.c') // ['a\\\\', 'b', 'c']\n * @example splitPath('a\\\\\\\\\\\\.b.c') // ['a\\\\.b', 'c']\n * @example splitPath('hello') // ['hello']\n * @example splitPath('hello\\\\') // ['hello\\\\']\n * @example splitPath('hello\\\\\\\\') // ['hello\\\\']\n *\n * @param {string} str\n * @param {string} separator\n * @returns {string[]}\n */ function $99853b4cdba0c969$export$824c337f43f2b64d(str, separator = \".\", escape = \"\\\\\") {\n const parts = [];\n let current = \"\";\n for(let i = 0; i < str.length; i++){\n const char = str[i];\n if (char === escape) {\n if (str[i + 1] === separator) {\n current += separator;\n i++;\n } else if (str[i + 1] === escape) {\n current += escape;\n i++;\n } else current += escape;\n } else if (char === separator) {\n parts.push(current);\n current = \"\";\n } else current += char;\n }\n parts.push(current);\n return parts;\n}\n// @ts-check\nfunction $99853b4cdba0c969$var$isDeterministic(method, engine, buildState) {\n if (Array.isArray(method)) return method.every((i)=>$99853b4cdba0c969$var$isDeterministic(i, engine, buildState));\n if (method && typeof method === \"object\") {\n const func = Object.keys(method)[0];\n const lower = method[func];\n if (!engine.methods[func] && engine.options.permissive) return true;\n if (engine.methods[func].traverse === false) return typeof engine.methods[func].deterministic === \"function\" ? engine.methods[func].deterministic(lower, buildState) : engine.methods[func].deterministic;\n return typeof engine.methods[func].deterministic === \"function\" ? engine.methods[func].deterministic(lower, buildState) : engine.methods[func].deterministic && $99853b4cdba0c969$var$isDeterministic(lower, engine, buildState);\n }\n return true;\n}\nconst $99853b4cdba0c969$var$defaultMethods = {\n \"+\": (data)=>[].concat(data).reduce((a, b)=>+a + +b, 0),\n \"*\": (data)=>data.reduce((a, b)=>+a * +b),\n \"/\": (data)=>data.reduce((a, b)=>+a / +b),\n \"-\": (data)=>// @ts-ignore Type checking is incorrect on the following line.\n ((a)=>(a.length === 1 ? a[0] = -a[0] : a, a))([].concat(data)).reduce((a, b)=>+a - +b),\n \"%\": (data)=>data.reduce((a, b)=>+a % +b),\n max: (data)=>Math.max(...data),\n min: (data)=>Math.min(...data),\n in: ([item, array])=>(array || []).includes(item),\n \">\": ([a, b])=>a > b,\n \"<\": ([a, b, c])=>c === undefined ? a < b : a < b && b < c,\n preserve: {\n traverse: false,\n method: $99853b4cdba0c969$var$declareSync((i)=>i)\n },\n if: {\n method: (input, context, above, engine)=>{\n if (!Array.isArray(input)) throw new $99853b4cdba0c969$var$InvalidControlInput(input);\n // check the bounds\n if (input.length < 2) throw new $99853b4cdba0c969$var$InvalidControlInput(input);\n input = [\n ...input\n ];\n if (input.length % 2 !== 1) input.push(null);\n // fallback to the default if the condition is false\n const onFalse = input.pop();\n // while there are still conditions\n while(input.length){\n const check = input.shift();\n const onTrue = input.shift();\n const test = engine.run(check, context, {\n above: above\n });\n // if the condition is true, run the true branch\n if (test) return engine.run(onTrue, context, {\n above: above\n });\n }\n return engine.run(onFalse, context, {\n above: above\n });\n },\n deterministic: (data, buildState)=>{\n return $99853b4cdba0c969$var$isDeterministic(data, buildState.engine, buildState);\n },\n asyncMethod: async (input, context, above, engine)=>{\n if (!Array.isArray(input)) throw new $99853b4cdba0c969$var$InvalidControlInput(input);\n // check the bounds\n if (input.length < 2) throw new $99853b4cdba0c969$var$InvalidControlInput(input);\n input = [\n ...input\n ];\n if (input.length % 2 !== 1) input.push(null);\n // fallback to the default if the condition is false\n const onFalse = input.pop();\n // while there are still conditions\n while(input.length){\n const check = input.shift();\n const onTrue = input.shift();\n const test = await engine.run(check, context, {\n above: above\n });\n // if the condition is true, run the true branch\n if (test) return engine.run(onTrue, context, {\n above: above\n });\n }\n return engine.run(onFalse, context, {\n above: above\n });\n },\n traverse: false\n },\n \"<=\": ([a, b, c])=>c === undefined ? a <= b : a <= b && b <= c,\n \">=\": ([a, b])=>a >= b,\n // eslint-disable-next-line eqeqeq\n \"==\": ([a, b])=>a == b,\n \"===\": ([a, b])=>a === b,\n // eslint-disable-next-line eqeqeq\n \"!=\": ([a, b])=>a != b,\n \"!==\": ([a, b])=>a !== b,\n xor: ([a, b])=>a ^ b,\n or: (arr)=>arr.reduce((a, b)=>a || b, false),\n and: (arr)=>arr.reduce((a, b)=>a && b),\n substr: ([string, from, end])=>{\n if (end < 0) {\n const result = string.substr(from);\n return result.substr(0, result.length + end);\n }\n return string.substr(from, end);\n },\n length: (i)=>{\n if (typeof i === \"string\" || Array.isArray(i)) return i.length;\n if (i && typeof i === \"object\") return Object.keys(i).length;\n return 0;\n },\n get: {\n method: ([data, key, defaultValue], context, above, engine)=>{\n const notFound = defaultValue === undefined ? null : defaultValue;\n const subProps = $99853b4cdba0c969$export$824c337f43f2b64d(String(key));\n for(let i = 0; i < subProps.length; i++){\n if (data === null || data === undefined) return notFound;\n // Descending into context\n data = data[subProps[i]];\n if (data === undefined) return notFound;\n }\n if (engine.allowFunctions || typeof data[key] !== \"function\") return data;\n }\n },\n var: (key, context, above, engine)=>{\n let b;\n if (Array.isArray(key)) {\n b = key[1];\n key = key[0];\n }\n // if (!key && context && context[Override]) return context[Override]\n let iter = 0;\n while(typeof key === \"string\" && key.startsWith(\"../\") && iter < above.length){\n context = above[iter++];\n key = key.substring(3);\n }\n if (context && typeof context[$99853b4cdba0c969$var$Override] !== \"undefined\") context = context[$99853b4cdba0c969$var$Override];\n const notFound = b === undefined ? null : b;\n if (typeof key === \"undefined\" || key === \"\" || key === null) {\n if (engine.allowFunctions || typeof (context && context[key]) !== \"function\") return context;\n return null;\n }\n const subProps = $99853b4cdba0c969$export$824c337f43f2b64d(String(key));\n for(let i = 0; i < subProps.length; i++){\n if (context === null || context === undefined) return notFound;\n // Descending into context\n context = context[subProps[i]];\n if (context === undefined) return notFound;\n }\n if (engine.allowFunctions || typeof (context && context[key]) !== \"function\") return context;\n return null;\n },\n missing: (checked, context, above, engine)=>{\n return (Array.isArray(checked) ? checked : [\n checked\n ]).filter((key)=>{\n return $99853b4cdba0c969$var$defaultMethods.var(key, context, above, engine) === null;\n });\n },\n missing_some: ([needCount, options], context, above, engine)=>{\n const missing = $99853b4cdba0c969$var$defaultMethods.missing(options, context, above, engine);\n if (options.length - missing.length >= needCount) return [];\n else return missing;\n },\n map: $99853b4cdba0c969$var$createArrayIterativeMethod(\"map\"),\n some: $99853b4cdba0c969$var$createArrayIterativeMethod(\"some\"),\n all: $99853b4cdba0c969$var$createArrayIterativeMethod(\"every\"),\n none: {\n traverse: false,\n // todo: add async build & build\n method: (val, context, above, engine)=>{\n return !$99853b4cdba0c969$var$defaultMethods.some.method(val, context, above, engine);\n },\n asyncMethod: async (val, context, above, engine)=>{\n return !await $99853b4cdba0c969$var$defaultMethods.some.asyncMethod(val, context, above, engine);\n },\n compile: (data, buildState)=>{\n const result = `${$99853b4cdba0c969$var$defaultMethods.some.compile(data, buildState)}`;\n return result ? `!(${result})` : false;\n }\n },\n merge: (arrays)=>Array.isArray(arrays) ? [].concat(...arrays) : [\n arrays\n ],\n every: $99853b4cdba0c969$var$createArrayIterativeMethod(\"every\"),\n filter: $99853b4cdba0c969$var$createArrayIterativeMethod(\"filter\"),\n reduce: {\n deterministic: (data, buildState)=>{\n return $99853b4cdba0c969$var$isDeterministic(data[0], buildState.engine, buildState) && $99853b4cdba0c969$var$isDeterministic(data[1], buildState.engine, {\n ...buildState,\n insideIterator: true\n });\n },\n compile: (data, buildState)=>{\n if (!Array.isArray(data)) throw new $99853b4cdba0c969$var$InvalidControlInput(data);\n const { above: above = [], state: state, async: async } = buildState;\n let [selector, mapper, defaultValue] = data;\n selector = $99853b4cdba0c969$var$buildString(selector, buildState);\n if (typeof defaultValue !== \"undefined\") defaultValue = $99853b4cdba0c969$var$buildString(defaultValue, buildState);\n const mapState = {\n ...buildState,\n state: {},\n above: [\n selector,\n state,\n ...above\n ],\n avoidInlineAsync: true\n };\n mapper = $99853b4cdba0c969$var$build(mapper, mapState);\n buildState.useContext = buildState.useContext || mapState.useContext;\n buildState.methods.push(mapper);\n if (async) {\n if (!$99853b4cdba0c969$var$isSync(mapper) || selector.includes(\"await\")) {\n buildState.detectAsync = true;\n if (typeof defaultValue !== \"undefined\") return `await asyncIterators.reduce(${selector} || [], (a,b) => methods[${buildState.methods.length - 1}]({ accumulator: a, current: b }), ${defaultValue})`;\n return `await asyncIterators.reduce(${selector} || [], (a,b) => methods[${buildState.methods.length - 1}]({ accumulator: a, current: b }))`;\n }\n }\n if (typeof defaultValue !== \"undefined\") return `(${selector} || []).reduce((a,b) => methods[${buildState.methods.length - 1}]({ accumulator: a, current: b }), ${defaultValue})`;\n return `(${selector} || []).reduce((a,b) => methods[${buildState.methods.length - 1}]({ accumulator: a, current: b }))`;\n },\n method: (input, context, above, engine)=>{\n if (!Array.isArray(input)) throw new $99853b4cdba0c969$var$InvalidControlInput(input);\n let [selector, mapper, defaultValue] = input;\n defaultValue = engine.run(defaultValue, context, {\n above: above\n });\n selector = engine.run(selector, context, {\n above: above\n }) || [];\n const func = (accumulator, current)=>{\n return engine.run(mapper, {\n accumulator: accumulator,\n current: current\n }, {\n above: [\n selector,\n context,\n ...above\n ]\n });\n };\n if (typeof defaultValue === \"undefined\") return selector.reduce(func);\n return selector.reduce(func, defaultValue);\n },\n asyncMethod: async (input, context, above, engine)=>{\n if (!Array.isArray(input)) throw new $99853b4cdba0c969$var$InvalidControlInput(input);\n let [selector, mapper, defaultValue] = input;\n defaultValue = await engine.run(defaultValue, context, {\n above: above\n });\n selector = await engine.run(selector, context, {\n above: above\n }) || [];\n return $99853b4cdba0c969$var$asyncIterators.reduce(selector, (accumulator, current)=>{\n return engine.run(mapper, {\n accumulator: accumulator,\n current: current\n }, {\n above: [\n selector,\n context,\n ...above\n ]\n });\n }, defaultValue);\n },\n traverse: false\n },\n not: (value)=>!value,\n \"!\": (value)=>!value,\n \"!!\": (value)=>Boolean(value),\n cat: (arr)=>typeof arr === \"string\" ? arr : arr.join(\"\"),\n keys: (obj)=>Object.keys(obj),\n eachKey: {\n traverse: false,\n method: (object, context, above, engine)=>{\n const result = Object.keys(object).reduce((accumulator, key)=>{\n const item = object[key];\n Object.defineProperty(accumulator, key, {\n enumerable: true,\n value: engine.run(item, context, {\n above: above\n })\n });\n return accumulator;\n }, {});\n return result;\n },\n useContext: true,\n deterministic: (data, buildState)=>{\n if (data && typeof data === \"object\") return Object.values(data).every((i)=>{\n return $99853b4cdba0c969$var$isDeterministic(i, buildState.engine, buildState);\n });\n throw new $99853b4cdba0c969$var$InvalidControlInput(data);\n },\n compile: (data, buildState)=>{\n // what's nice about this is that I don't have to worry about whether it's async or not, the lower entries take care of that ;)\n // however, this is not engineered support yields, I will have to make a note of that & possibly support it at a later point.\n if (data && typeof data === \"object\") {\n const result = `({ ${Object.keys(data).reduce((accumulator, key)=>{\n accumulator.push(`${JSON.stringify(key)}: ${$99853b4cdba0c969$var$buildString(data[key], buildState)}`);\n return accumulator;\n }, []).join(\",\")} })`;\n return result;\n }\n throw new $99853b4cdba0c969$var$InvalidControlInput(data);\n },\n asyncMethod: async (object, context, above, engine)=>{\n const result = await $99853b4cdba0c969$var$asyncIterators.reduce(Object.keys(object), async (accumulator, key)=>{\n const item = object[key];\n Object.defineProperty(accumulator, key, {\n enumerable: true,\n value: await engine.run(item, context, {\n above: above\n })\n });\n return accumulator;\n }, {});\n return result;\n }\n }\n};\nfunction $99853b4cdba0c969$var$createArrayIterativeMethod(name) {\n return {\n deterministic: (data, buildState)=>{\n return $99853b4cdba0c969$var$isDeterministic(data[0], buildState.engine, buildState) && $99853b4cdba0c969$var$isDeterministic(data[1], buildState.engine, {\n ...buildState,\n insideIterator: true\n });\n },\n method: (input, context, above, engine)=>{\n if (!Array.isArray(input)) throw new $99853b4cdba0c969$var$InvalidControlInput(input);\n let [selector, mapper] = input;\n selector = engine.run(selector, context, {\n above: above\n }) || [];\n return selector[name]((i)=>{\n return engine.run(mapper, i, {\n above: [\n selector,\n context,\n ...above\n ]\n });\n });\n },\n asyncMethod: async (input, context, above, engine)=>{\n if (!Array.isArray(input)) throw new $99853b4cdba0c969$var$InvalidControlInput(input);\n let [selector, mapper] = input;\n selector = await engine.run(selector, context, {\n above: above\n }) || [];\n return $99853b4cdba0c969$var$asyncIterators[name](selector, (i)=>{\n return engine.run(mapper, i, {\n above: [\n selector,\n context,\n ...above\n ]\n });\n });\n },\n compile: (data, buildState)=>{\n if (!Array.isArray(data)) throw new $99853b4cdba0c969$var$InvalidControlInput(data);\n const { above: above = [], state: state, async: async } = buildState;\n let [selector, mapper] = data;\n selector = $99853b4cdba0c969$var$buildString(selector, buildState);\n const mapState = {\n ...buildState,\n state: {},\n above: [\n selector,\n state,\n ...above\n ],\n avoidInlineAsync: true\n };\n mapper = $99853b4cdba0c969$var$build(mapper, mapState);\n buildState.useContext = buildState.useContext || mapState.useContext;\n buildState.methods.push(mapper);\n if (async) {\n if (!$99853b4cdba0c969$var$isSync(mapper) || selector.includes(\"await\")) {\n buildState.detectAsync = true;\n return `await asyncIterators.${name}(${selector} || [], methods[${buildState.methods.length - 1}])`;\n }\n }\n return `(${selector} || []).${name}(methods[${buildState.methods.length - 1}])`;\n },\n traverse: false\n };\n}\n$99853b4cdba0c969$var$defaultMethods[\"?:\"] = $99853b4cdba0c969$var$defaultMethods.if;\n// declare all of the functions here synchronous\nObject.keys($99853b4cdba0c969$var$defaultMethods).forEach((item)=>{\n if (typeof $99853b4cdba0c969$var$defaultMethods[item] === \"function\") $99853b4cdba0c969$var$defaultMethods[item][$99853b4cdba0c969$var$Sync] = true;\n $99853b4cdba0c969$var$defaultMethods[item].deterministic = typeof $99853b4cdba0c969$var$defaultMethods[item].deterministic === \"undefined\" ? true : $99853b4cdba0c969$var$defaultMethods[item].deterministic;\n});\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods.var.deterministic = (data, buildState)=>{\n return buildState.insideIterator && !String(data).includes(\"../\");\n};\nObject.assign($99853b4cdba0c969$var$defaultMethods.var, {\n traverse: false\n});\nObject.assign($99853b4cdba0c969$var$defaultMethods.missing, {\n deterministic: false,\n useContext: true\n});\nObject.assign($99853b4cdba0c969$var$defaultMethods.missing_some, {\n deterministic: false,\n useContext: true\n});\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\"<\"].compile = function(data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) return \"(\" + $99853b4cdba0c969$var$buildString(data[0], buildState) + \" < \" + $99853b4cdba0c969$var$buildString(data[1], buildState) + \")\";\n if (data.length === 3) {\n const a = $99853b4cdba0c969$var$buildString(data[0], buildState);\n const b = $99853b4cdba0c969$var$buildString(data[1], buildState);\n const c = $99853b4cdba0c969$var$buildString(data[2], buildState);\n return `${a} < ${b} && ${b} < ${c}`;\n }\n }\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\"<=\"].compile = function(data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) return \"(\" + $99853b4cdba0c969$var$buildString(data[0], buildState) + \" <= \" + $99853b4cdba0c969$var$buildString(data[1], buildState) + \")\";\n if (data.length === 3) {\n const a = $99853b4cdba0c969$var$buildString(data[0], buildState);\n const b = $99853b4cdba0c969$var$buildString(data[1], buildState);\n const c = $99853b4cdba0c969$var$buildString(data[2], buildState);\n return `${a} <= ${b} && ${b} <= ${c}`;\n }\n }\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods.min.compile = function(data, buildState) {\n if (Array.isArray(data)) return `Math.min(${data.map((i)=>$99853b4cdba0c969$var$buildString(i, buildState)).join(\", \")})`;\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods.max.compile = function(data, buildState) {\n if (Array.isArray(data)) return `Math.max(${data.map((i)=>$99853b4cdba0c969$var$buildString(i, buildState)).join(\", \")})`;\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\">\"].compile = function(data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) return \"(\" + $99853b4cdba0c969$var$buildString(data[0], buildState) + \" > \" + $99853b4cdba0c969$var$buildString(data[1], buildState) + \")\";\n }\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\">=\"].compile = function(data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) return \"(\" + $99853b4cdba0c969$var$buildString(data[0], buildState) + \" >= \" + $99853b4cdba0c969$var$buildString(data[1], buildState) + \")\";\n }\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\"==\"].compile = function(data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) return \"(\" + $99853b4cdba0c969$var$buildString(data[0], buildState) + \" == \" + $99853b4cdba0c969$var$buildString(data[1], buildState) + \")\";\n }\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\"!=\"].compile = function(data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) return \"(\" + $99853b4cdba0c969$var$buildString(data[0], buildState) + \" != \" + $99853b4cdba0c969$var$buildString(data[1], buildState) + \")\";\n }\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods.if.compile = function(data, buildState) {\n if (Array.isArray(data)) {\n if (data.length >= 3) {\n data = [\n ...data\n ];\n if (data.length % 2 !== 1) data.push(null);\n const onFalse = data.pop();\n let str = \"\";\n while(data.length){\n const condition = data.shift();\n const onTrue = data.shift();\n str += `(${$99853b4cdba0c969$var$buildString(condition, buildState)}) ? ${$99853b4cdba0c969$var$buildString(onTrue, buildState)} : `;\n }\n return \"(\" + str + `${$99853b4cdba0c969$var$buildString(onFalse, buildState)}` + \")\";\n }\n }\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\"!==\"].compile = function(data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) return \"(\" + $99853b4cdba0c969$var$buildString(data[0], buildState) + \" !== \" + $99853b4cdba0c969$var$buildString(data[1], buildState) + \")\";\n }\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\"===\"].compile = function(data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) return \"(\" + $99853b4cdba0c969$var$buildString(data[0], buildState) + \" === \" + $99853b4cdba0c969$var$buildString(data[1], buildState) + \")\";\n }\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\"+\"].compile = function(data, buildState) {\n if (Array.isArray(data)) return `(${data.map((i)=>`(+${$99853b4cdba0c969$var$buildString(i, buildState)})`).join(\" + \")})`;\n else if (typeof data === \"string\" || typeof data === \"number\") return `(+${$99853b4cdba0c969$var$buildString(data, buildState)})`;\n else return `([].concat(${$99853b4cdba0c969$var$buildString(data, buildState)})).reduce((a,b) => (+a)+(+b), 0)`;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\"%\"].compile = function(data, buildState) {\n if (Array.isArray(data)) return `(${data.map((i)=>`(+${$99853b4cdba0c969$var$buildString(i, buildState)})`).join(\" % \")})`;\n else return `(${$99853b4cdba0c969$var$buildString(data, buildState)}).reduce((a,b) => (+a)%(+b))`;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods.or.compile = function(data, buildState) {\n if (Array.isArray(data)) return `(${data.map((i)=>$99853b4cdba0c969$var$buildString(i, buildState)).join(\" || \")})`;\n else return `(${$99853b4cdba0c969$var$buildString(data, buildState)}).reduce((a,b) => a||b, false)`;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods.in.compile = function(data, buildState) {\n if (Array.isArray(data)) return `(${$99853b4cdba0c969$var$buildString(data[1], buildState)} || []).includes(${$99853b4cdba0c969$var$buildString(data[0], buildState)})`;\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods.and.compile = function(data, buildState) {\n if (Array.isArray(data)) return `(${data.map((i)=>$99853b4cdba0c969$var$buildString(i, buildState)).join(\" && \")})`;\n else return `(${$99853b4cdba0c969$var$buildString(data, buildState)}).reduce((a,b) => a&&b, true)`;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\"-\"].compile = function(data, buildState) {\n if (Array.isArray(data)) return `${data.length === 1 ? \"-\" : \"\"}(${data.map((i)=>`(+${$99853b4cdba0c969$var$buildString(i, buildState)})`).join(\" - \")})`;\n if (typeof data === \"string\" || typeof data === \"number\") return `(-${$99853b4cdba0c969$var$buildString(data, buildState)})`;\n else return `((a=>(a.length===1?a[0]=-a[0]:a)&0||a)([].concat(${$99853b4cdba0c969$var$buildString(data, buildState)}))).reduce((a,b) => (+a)-(+b))`;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\"/\"].compile = function(data, buildState) {\n if (Array.isArray(data)) return `(${data.map((i)=>`(+${$99853b4cdba0c969$var$buildString(i, buildState)})`).join(\" / \")})`;\n else return `(${$99853b4cdba0c969$var$buildString(data, buildState)}).reduce((a,b) => (+a)/(+b))`;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\"*\"].compile = function(data, buildState) {\n if (Array.isArray(data)) return `(${data.map((i)=>`(+${$99853b4cdba0c969$var$buildString(i, buildState)})`).join(\" * \")})`;\n else return `(${$99853b4cdba0c969$var$buildString(data, buildState)}).reduce((a,b) => (+a)*(+b))`;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods.cat.compile = function(data, buildState) {\n if (typeof data === \"string\") return JSON.stringify(data);\n else if (Array.isArray(data)) return `(${[\n \"\",\n ...data\n ].map((i)=>$99853b4cdba0c969$var$buildString(i, buildState)).join(\" + \")})`;\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods.not.compile = $99853b4cdba0c969$var$defaultMethods[\"!\"].compile = function(data, buildState) {\n return `(!(${$99853b4cdba0c969$var$buildString(data, buildState)}))`;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods[\"!!\"].compile = function(data, buildState) {\n return `(!!(${$99853b4cdba0c969$var$buildString(data, buildState)}))`;\n};\n$99853b4cdba0c969$var$defaultMethods.none.deterministic = $99853b4cdba0c969$var$defaultMethods.some.deterministic;\n$99853b4cdba0c969$var$defaultMethods.get.compile = function(data, buildState) {\n let defaultValue = null;\n let key = data;\n let obj = null;\n if (Array.isArray(data) && data.length <= 3) {\n obj = data[0];\n key = data[1];\n defaultValue = typeof data[2] === \"undefined\" ? null : data[2];\n // Bail out if the key is dynamic; dynamic keys are not really optimized by this block.\n if (key && typeof key === \"object\") return false;\n key = key.toString();\n const pieces = $99853b4cdba0c969$export$824c337f43f2b64d(key);\n if (!$99853b4cdba0c969$var$chainingSupported) return `(((a,b) => (typeof a === 'undefined' || a === null) ? b : a)(${pieces.reduce((text, i)=>{\n return `(${text}||0)[${JSON.stringify(i)}]`;\n }, `(${$99853b4cdba0c969$var$buildString(obj, buildState)}||0)`)}, ${$99853b4cdba0c969$var$buildString(defaultValue, buildState)}))`;\n return `((${$99853b4cdba0c969$var$buildString(obj, buildState)})${pieces.map((i)=>`?.[${$99853b4cdba0c969$var$buildString(i, buildState)}]`).join(\"\")} ?? ${$99853b4cdba0c969$var$buildString(defaultValue, buildState)})`;\n }\n return false;\n};\n// @ts-ignore Allow custom attribute\n$99853b4cdba0c969$var$defaultMethods.var.compile = function(data, buildState) {\n let key = data;\n let defaultValue = null;\n buildState.varTop = buildState.varTop || new Set();\n if (!key || typeof data === \"string\" || typeof data === \"number\" || Array.isArray(data) && data.length <= 2) {\n if (Array.isArray(data)) {\n key = data[0];\n defaultValue = typeof data[1] === \"undefined\" ? null : data[1];\n }\n if (typeof key === \"undefined\" || key === null || key === \"\") // this counts the number of var accesses to determine if they're all just using this override.\n // this allows for a small optimization :)\n return \"state[Override]\";\n if (typeof key !== \"string\" && typeof key !== \"number\") {\n buildState.useContext = true;\n return false;\n }\n key = key.toString();\n if (key.includes(\"../\")) {\n buildState.useContext = true;\n return false;\n }\n const pieces = $99853b4cdba0c969$export$824c337f43f2b64d(key);\n const [top] = pieces;\n buildState.varTop.add(top);\n // support older versions of node\n if (!$99853b4cdba0c969$var$chainingSupported) return `(((a,b) => (typeof a === 'undefined' || a === null) ? b : a)(${pieces.reduce((text, i)=>{\n return `(${text}||0)[${JSON.stringify(i)}]`;\n }, \"(context||0)\")}, ${$99853b4cdba0c969$var$buildString(defaultValue, buildState)}))`;\n return `(context${pieces.map((i)=>`?.[${JSON.stringify(i)}]`).join(\"\")} ?? ${$99853b4cdba0c969$var$buildString(defaultValue, buildState)})`;\n }\n buildState.useContext = true;\n return false;\n};\nconst $99853b4cdba0c969$export$7d60df12ed556f50 = {\n ...$99853b4cdba0c969$var$defaultMethods,\n ...$99853b4cdba0c969$var$YieldingIterators\n};\n// @ts-check\nconst $99853b4cdba0c969$var$omitUndefined = function omitUndefined(obj) {\n Object.keys(obj).forEach((key)=>{\n if (obj[key] === undefined) delete obj[key];\n });\n return obj;\n};\n// @ts-check\n/**\n * An engine capable of running synchronous JSON Logic.\n */ class $99853b4cdba0c969$export$c03b5e17854f9221 {\n /**\n *\n * @param {Object} methods An object that stores key-value pairs between the names of the commands & the functions they execute.\n * @param {{ yieldSupported?: Boolean, disableInline?: Boolean, permissive?: boolean }} options\n */ constructor(methods = $99853b4cdba0c969$export$7d60df12ed556f50, options = {\n yieldSupported: false,\n disableInline: false,\n permissive: false\n }){\n this.disableInline = options.disableInline;\n this.methods = {\n ...methods\n };\n /** @type {{yieldSupported?: Boolean, disableInline?: Boolean, permissive?: boolean}} */ this.options = {\n ...options\n };\n }\n /**\n * An internal method used to parse through the JSON Logic at a lower level.\n * @param {*} logic The logic being executed.\n * @param {*} context The context of the logic being run (input to the function.)\n * @param {*} above The context above (can be used for handlebars-style data traversal.)\n * @returns {{ result: *, func: string }}\n */ _parse(logic, context, above) {\n const [func] = Object.keys(logic);\n const data = logic[func];\n if (this.methods[func]) {\n if (typeof this.methods[func] === \"function\") {\n const input = this.run(data, context, {\n above: above\n });\n if (this.options.yieldSupported && $99853b4cdba0c969$var$checkYield(input)) return {\n result: input,\n func: func\n };\n return {\n result: this.methods[func](input, context, above, this),\n func: func\n };\n }\n if (typeof this.methods[func] === \"object\") {\n const { method: method, traverse: traverse } = this.methods[func];\n const shouldTraverse = typeof traverse === \"undefined\" ? true : traverse;\n const parsedData = shouldTraverse ? this.run(data, context, {\n above: above\n }) : data;\n if (this.options.yieldSupported && $99853b4cdba0c969$var$checkYield(parsedData)) return {\n result: parsedData,\n func: func\n };\n return {\n result: method(parsedData, context, above, this),\n func: func\n };\n }\n }\n if (this.options.permissive) return {\n result: logic,\n func: func\n };\n throw new Error(`Method '${func}' was not found in the Logic Engine.`);\n }\n /**\n *\n * @param {String} name The name of the method being added.\n * @param {Function|{ traverse?: Boolean, method: Function, deterministic?: Function | Boolean }} method\n * @param {{ deterministic?: Boolean, yields?: Boolean, useContext?: Boolean }} annotations This is used by the compiler to help determine if it can optimize the function being generated.\n */ addMethod(name, method, { deterministic: deterministic, yields: yields, useContext: useContext } = {}) {\n if (typeof method === \"function\") method = {\n method: method,\n traverse: true\n };\n else method = {\n ...method\n };\n Object.assign(method, $99853b4cdba0c969$var$omitUndefined({\n yields: yields,\n useContext: useContext,\n deterministic: deterministic\n }));\n this.methods[name] = $99853b4cdba0c969$var$declareSync(method);\n }\n /**\n * Adds a batch of functions to the engine\n * @param {String} name\n * @param {Object} obj\n * @param {{ deterministic?: Boolean, yields?: Boolean, useContext?: Boolean, async?: Boolean, sync?: Boolean }} annotations Not recommended unless you're sure every function from the module will match these annotations.\n */ addModule(name, obj, annotations) {\n Object.getOwnPropertyNames(obj).forEach((key)=>{\n if (typeof obj[key] === \"function\" || typeof obj[key] === \"object\") this.addMethod(`${name}${name ? \".\" : \"\"}${key}`, obj[key], annotations);\n });\n }\n /**\n *\n * @param {*} logic The logic to be executed\n * @param {*} data The data being passed in to the logic to be executed against.\n * @param {{ above?: any }} options Options for the invocation\n * @returns {*}\n */ run(logic, data = {}, options = {}) {\n const { above: above = [] } = options;\n if (Array.isArray(logic)) {\n const result = logic.map((i)=>this.run(i, data, {\n above: above\n }));\n if (this.options.yieldSupported && $99853b4cdba0c969$var$checkYield(result)) return new $99853b4cdba0c969$export$be4f7f3aef5d45f6({\n result: result\n });\n return result;\n }\n if (logic && typeof logic === \"object\" && Object.keys(logic).length > 0) {\n const { func: func, result: result } = this._parse(logic, data, above);\n if (this.options.yieldSupported && $99853b4cdba0c969$var$checkYield(result)) {\n if (result instanceof $99853b4cdba0c969$export$217b4a9f5766d4d4) {\n if (result._input) result._logic = {\n [func]: result._input\n };\n if (!result._logic) result._logic = logic;\n return result;\n }\n return new $99853b4cdba0c969$export$be4f7f3aef5d45f6({\n result: {\n [func]: result.data.result\n }\n });\n }\n return result;\n }\n return logic;\n }\n /**\n *\n * @param {*} logic The logic to be built.\n * @param {{ top?: Boolean, above?: any }} options\n * @returns {Function}\n */ build(logic, options = {}) {\n const { above: above = [], top: top = true } = options;\n if (top) {\n const constructedFunction = $99853b4cdba0c969$var$build(logic, {\n state: {},\n engine: this,\n above: above\n });\n if (typeof constructedFunction === \"function\" || top === true) return (...args)=>{\n return typeof constructedFunction === \"function\" ? constructedFunction(...args) : constructedFunction;\n };\n return constructedFunction;\n }\n return logic;\n }\n}\n// @ts-check\nfunction $99853b4cdba0c969$var$timeout(n) {\n return new Promise((resolve)=>{\n setTimeout(()=>{\n resolve();\n }, n);\n });\n}\nfunction $99853b4cdba0c969$var$asyncPool({ free: free = [], max: max = 10, created: created = free.length, create: create = ()=>{} } = {}) {\n const pool = async function() {\n if (free.length) {\n const func = free.pop();\n const promise = func(...arguments);\n // return the stateful function\n promise.then(()=>{\n free.push(func);\n }).catch(()=>{\n free.push(func);\n });\n return promise;\n } else {\n if (created < max) {\n created++;\n free.push(await create());\n }\n while(!free.length)await $99853b4cdba0c969$var$timeout(250);\n return pool(...arguments);\n }\n };\n return pool;\n}\n// @ts-check\n/**\n * An engine capable of running asynchronous JSON Logic.\n */ class $99853b4cdba0c969$export$bd004c314a0b6901 {\n /**\n *\n * @param {Object} methods An object that stores key-value pairs between the names of the commands & the functions they execute.\n * @param {{ yieldSupported?: Boolean, disableInline?: Boolean, permissive?: boolean }} options\n */ constructor(methods = $99853b4cdba0c969$export$7d60df12ed556f50, options = {\n yieldSupported: false,\n disableInline: false,\n permissive: false\n }){\n this.methods = {\n ...methods\n };\n /** @type {{yieldSupported?: Boolean, disableInline?: Boolean, permissive?: boolean}} */ this.options = {\n ...options\n };\n this.disableInline = options.disableInline;\n this.async = true;\n this.fallback = new $99853b4cdba0c969$export$c03b5e17854f9221(methods, options);\n }\n /**\n * An internal method used to parse through the JSON Logic at a lower level.\n * @param {*} logic The logic being executed.\n * @param {*} context The context of the logic being run (input to the function.)\n * @param {*} above The context above (can be used for handlebars-style data traversal.)\n * @returns {Promise<{ func: string, result: * }>}\n */ async _parse(logic, context, above) {\n const [func] = Object.keys(logic);\n const data = logic[func];\n if (this.methods[func]) {\n if (typeof this.methods[func] === \"function\") {\n const input = await this.run(data, context, {\n above: above\n });\n if (this.options.yieldSupported && await $99853b4cdba0c969$var$checkYield(input)) return {\n result: input,\n func: func\n };\n const result = await this.methods[func](input, context, above, this);\n return {\n result: Array.isArray(result) ? Promise.all(result) : result,\n func: func\n };\n }\n if (typeof this.methods[func] === \"object\") {\n const { asyncMethod: asyncMethod, method: method, traverse: traverse } = this.methods[func];\n const shouldTraverse = typeof traverse === \"undefined\" ? true : traverse;\n const parsedData = shouldTraverse ? await this.run(data, context, {\n above: above\n }) : data;\n if (this.options.yieldSupported && await $99853b4cdba0c969$var$checkYield(parsedData)) return {\n result: parsedData,\n func: func\n };\n const result = await (asyncMethod || method)(parsedData, context, above, this);\n return {\n result: Array.isArray(result) ? Promise.all(result) : result,\n func: func\n };\n }\n }\n if (this.options.permissive) return {\n result: logic,\n func: func\n };\n throw new Error(`Method '${func}' was not found in the Logic Engine.`);\n }\n /**\n *\n * @param {String} name The name of the method being added.\n * @param {Function|{ traverse?: Boolean, method?: Function, asyncMethod?: Function, deterministic?: Function | Boolean }} method\n * @param {{ deterministic?: Boolean, yields?: Boolean, useContext?: Boolean, async?: Boolean, sync?: Boolean }} annotations This is used by the compiler to help determine if it can optimize the function being generated.\n */ addMethod(name, method, { deterministic: deterministic, async: async, sync: sync, yields: yields, useContext: useContext } = {}) {\n if (typeof async === \"undefined\" && typeof sync === \"undefined\") sync = false;\n if (typeof sync !== \"undefined\") async = !sync;\n if (typeof async !== \"undefined\") sync = !async;\n if (typeof method === \"function\") {\n if (async) method = {\n asyncMethod: method,\n traverse: true\n };\n else method = {\n method: method,\n traverse: true\n };\n } else method = {\n ...method\n };\n Object.assign(method, $99853b4cdba0c969$var$omitUndefined({\n yields: yields,\n deterministic: deterministic,\n useContext: useContext\n }));\n // @ts-ignore\n this.fallback.addMethod(name, method, {\n deterministic: deterministic,\n yields: yields,\n useContext: useContext\n });\n this.methods[name] = $99853b4cdba0c969$var$declareSync(method, sync);\n }\n /**\n * Adds a batch of functions to the engine\n * @param {String} name\n * @param {Object} obj\n * @param {{ deterministic?: Boolean, yields?: Boolean, useContext?: Boolean, async?: Boolean, sync?: Boolean }} annotations Not recommended unless you're sure every function from the module will match these annotations.\n */ addModule(name, obj, annotations = {}) {\n Object.getOwnPropertyNames(obj).forEach((key)=>{\n if (typeof obj[key] === \"function\" || typeof obj[key] === \"object\") this.addMethod(`${name}${name ? \".\" : \"\"}${key}`, obj[key], annotations);\n });\n }\n /**\n *\n * @param {*} logic The logic to be executed\n * @param {*} data The data being passed in to the logic to be executed against.\n * @param {{ above?: any }} options Options for the invocation\n * @returns {Promise}\n */ async run(logic, data = {}, options = {}) {\n const { above: above = [] } = options;\n if (Array.isArray(logic)) {\n const result = await Promise.all(logic.map((i)=>this.run(i, data, {\n above: above\n })));\n if (this.options.yieldSupported && await $99853b4cdba0c969$var$checkYield(result)) return new $99853b4cdba0c969$export$be4f7f3aef5d45f6({\n result: result\n });\n return result;\n }\n if (logic && typeof logic === \"object\" && Object.keys(logic).length > 0) {\n const { func: func, result: result } = await this._parse(logic, data, above);\n if (this.options.yieldSupported && await $99853b4cdba0c969$var$checkYield(result)) {\n if (result instanceof $99853b4cdba0c969$export$217b4a9f5766d4d4) {\n if (result._input) result._logic = {\n [func]: result._input\n };\n if (!result._logic) result._logic = logic;\n return result;\n }\n return new $99853b4cdba0c969$export$be4f7f3aef5d45f6({\n result: {\n [func]: result.data.result\n }\n });\n }\n return result;\n }\n return logic;\n }\n /**\n *\n * @param {*} logic The logic to be built.\n * @param {{ top?: Boolean, above?: any, max?: Number }} options\n * @returns {Promise}\n */ async build(logic, options = {}) {\n const { above: above = [], max: max = 100, top: top = true } = options;\n if (top) {\n const constructedFunction = await $99853b4cdba0c969$var$buildAsync(logic, {\n engine: this,\n above: above,\n async: true,\n state: {}\n });\n const result = $99853b4cdba0c969$var$declareSync((...args)=>{\n if (top === true) try {\n const result = typeof constructedFunction === \"function\" ? constructedFunction(...args) : constructedFunction;\n return Promise.resolve(result);\n } catch (err) {\n return Promise.reject(err);\n }\n const result = typeof constructedFunction === \"function\" ? constructedFunction(...args) : constructedFunction;\n return result;\n }, top !== true && $99853b4cdba0c969$var$isSync(constructedFunction));\n // we can avoid the async pool if the constructed function is synchronous since the data\n // can't be updated :)\n if (top === true && constructedFunction && !constructedFunction[$99853b4cdba0c969$var$Sync]) // we use this async pool so that we can execute these in parallel without having\n // concerns about the data.\n return $99853b4cdba0c969$var$asyncPool({\n free: [\n result\n ],\n max: max,\n create: ()=>this.build(logic, {\n ...options,\n above: above\n })\n });\n else return typeof constructedFunction === \"function\" || top === true ? result : constructedFunction;\n }\n return logic;\n }\n}\n/**\n * @param {string[]} keep\n * @param {{ [key:string]: any }} obj\n */ function $99853b4cdba0c969$var$pick(keep, obj) {\n return Object.keys(obj).reduce((acc, i)=>{\n if (keep.includes(i)) acc[i] = obj[i];\n return acc;\n }, {});\n}\n/**\n * Takes functions and makes it possible to use them in a locked-down json-logic document.\n * @param {{ [key: string]: (...args: any[]) => any }} functions Functions to import into the engine.\n * @param {string[]} keep Methods to keep from the original logic engine\n * @returns {(...args: any[]) => (...args: any[]) => any}\n */ function $99853b4cdba0c969$export$bb02ebaa4e14e32f(functions, keep = [\n \"var\"\n], engine = new $99853b4cdba0c969$export$c03b5e17854f9221()) {\n engine.methods = $99853b4cdba0c969$var$pick(keep, engine.methods);\n engine.addMethod(\"list\", (i)=>[].concat(i));\n Object.keys(functions).forEach((i)=>engine.addMethod(i, (data)=>Array.isArray(data) ? functions[i](...data) : functions[i](data === null ? undefined : data)));\n return engine.build.bind(engine);\n}\n/**\n * Takes functions and makes it possible to use them in a locked-down json-logic document.\n * If performance becomes a problem, you may wish to optimize by creating a \"new AsyncLogicEngine\" yourself,\n * and adding the methods you're using as sync / async respectively. .addMethod(name, func, { sync: true })\n * This is meant to be a simple adapter.\n *\n * @param {{ [key: string]: (...args: any[]) => any }} functions\n * @param {string[]} keep\n * @returns {(...args: any[]) => Promise<(...args: any[]) => Promise>}\n */ function $99853b4cdba0c969$export$4609c8da91829f08(functions, keep = [\n \"var\"\n]) {\n return $99853b4cdba0c969$export$bb02ebaa4e14e32f(functions, keep, new $99853b4cdba0c969$export$bd004c314a0b6901());\n}\n// @ts-check\nconst $99853b4cdba0c969$export$2e2bcd8739ae039 = {\n LogicEngine: $99853b4cdba0c969$export$c03b5e17854f9221,\n AsyncLogicEngine: $99853b4cdba0c969$export$bd004c314a0b6901,\n Compiler: $99853b4cdba0c969$export$3a6335acfcf707c9,\n YieldStructure: $99853b4cdba0c969$export$217b4a9f5766d4d4,\n EngineObject: $99853b4cdba0c969$export$be4f7f3aef5d45f6,\n Constants: $99853b4cdba0c969$export$a002182e51710d39,\n defaultMethods: $99853b4cdba0c969$export$7d60df12ed556f50,\n asLogicSync: $99853b4cdba0c969$export$bb02ebaa4e14e32f,\n asLogicAsync: $99853b4cdba0c969$export$4609c8da91829f08,\n splitPath: $99853b4cdba0c969$export$824c337f43f2b64d\n};\n\n\nfunction $5b1641ca184fea1a$export$da4bcb8500ed9b65() {\n let project;\n let fields = [];\n let logic;\n let preview;\n let loading = false;\n let engine = new (0, $99853b4cdba0c969$export$c03b5e17854f9221)();\n let t = 1;\n engine.addMethod(\"floor\", Math.floor);\n engine.addMethod(\"sqrt\", Math.sqrt);\n return {\n oninit: (vnode)=>{\n if ((0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.param(\"project\")) (0, $98d6fbf968cbb475$export$73693bad9f5880b0)(\"/project/\" + (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.param(\"project\")).then((res)=>{\n console.log(\"project\", res);\n project = res;\n fields = res[\"fields\"];\n logic = engine.build(res[\"logic\"]);\n });\n },\n view: (vnode)=>{\n return [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"h2\", {}, project ? project.name : \"\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$a7fed597f4b8afd8), {\n id: \"template_form\"\n }, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $9173046a4a2c2474$export$833b3e5a19fb8939), {}, fields),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$d15f4cd5286f9b1e), {\n name: \"resolution\",\n text: \"Resolution\"\n }, [\n \"1920x1080\",\n \"1600x900\",\n \"1280x720\"\n ]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$d15f4cd5286f9b1e), {\n name: \"quality\",\n text: \"Quality\"\n }, [\n \"web\",\n \"TV\"\n ]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$5f1af8db9871e1d6), {\n name: \"description\",\n text: \"Desciption (optional)\"\n }, \"\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$353f5b6fc5456de1), {\n name: \"preview\",\n value: \"preview\",\n onclick: (e)=>{\n e.preventDefault();\n loading = true;\n let form = new FormData(document.getElementById(\"template_form\"));\n let data = Object.fromEntries(form.entries());\n data.width = data.resolution.split(\"x\")[0];\n data.height = data.resolution.split(\"x\")[1];\n let edl = logic(data);\n // edl.shift()\n console.log(\"previewing \", edl, vnode.dom);\n (0, $98d6fbf968cbb475$export$73693bad9f5880b0)(\"/preview/\", {\n method: \"post\",\n params: {\n t: t\n },\n body: {\n edl: {\n clips: edl\n }\n }\n }).then((res)=>{\n console.log(\"preview available at\", res);\n loading = false;\n preview = res;\n }).catch((e)=>{\n console.log(\"error previewing\", e);\n });\n }\n }),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$353f5b6fc5456de1), {\n name: \"save\",\n type: \"submit\",\n value: \"render\",\n onclick: (e)=>{\n e.preventDefault();\n let form = new FormData(document.getElementById(\"template_form\"));\n // form.forEach(f => {console.log('field', f.name, f)})\n (0, $89b291c8bc281326$exports.message)(\"assembling render\");\n let data = Object.fromEntries(form.entries());\n data.width = data.resolution.split(\"x\")[0];\n data.height = data.resolution.split(\"x\")[1];\n let edl = {\n clips: logic(data),\n duration: data.duration\n };\n let ffmpeg_params = data.quality == \"TV\" ? [\n \"-b:v\",\n \"25M\",\n \"-maxrate\",\n \"30M\",\n \"-bufsize\",\n \"20M\"\n ] : [\n \"-b:v\",\n \"5M\",\n \"-minrate\",\n \"1M\",\n \"-maxrate\",\n \"10M\",\n \"-bufsize\",\n \"5M\"\n ];\n console.log(\"saving form\", e, edl, data, data, ffmpeg_params);\n let params = {\n project: project.name,\n project_id: (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.param(\"project\"),\n width: data.width,\n height: data.height,\n fps: 29.97,\n quality: data.quality,\n description: data.description,\n ffmpeg_params: ffmpeg_params,\n edl: edl,\n duration: data.duration ? data.duration : edl.duration\n };\n (0, $98d6fbf968cbb475$export$73693bad9f5880b0)(`/render`, {\n method: \"post\",\n body: params\n }).then((e)=>{\n (0, $89b291c8bc281326$exports.success)(\"Rendering!\");\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.set(\"/renders\");\n }).catch((e)=>{\n console.log(\"error rendering\", e);\n });\n }\n }),\n // m(Progress),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, (/*@__PURE__*/$parcel$interopDefault($12ab4b555e4e721f$exports))), {\n min: 0,\n max: 30,\n step: .1,\n value: t,\n class: \"timerange\",\n ondrag: (v)=>{\n t = v.toFixed(1);\n }\n }, (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".timerange-value\", {}, t)),\n loading ? (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".loader\") : (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $d40041a1f594fd32$export$4a96334d5925dbf2), {\n src: preview\n })\n ])\n ];\n }\n };\n}\n\n\n\n\nvar $505bd04b6527b6c0$exports = {};\n\nvar $505bd04b6527b6c0$require$m = $65d5daca13f5010c$exports;\nif (typeof $505bd04b6527b6c0$require$m !== \"function\") $505bd04b6527b6c0$require$m = $505bd04b6527b6c0$require$m.default;\nfunction $505bd04b6527b6c0$var$renderCollapsed(propStr, isArray, pathStr, statusLookup) {\n return $505bd04b6527b6c0$require$m(\"div\", [\n \"\" + propStr + (isArray ? \"[\" : \"{\"),\n $505bd04b6527b6c0$require$m(\"button\", {\n onclick: function() {\n statusLookup[pathStr] = false;\n }\n }, \"...\"),\n isArray ? \"]\" : \"}\"\n ]);\n}\nfunction $505bd04b6527b6c0$var$renderExpanded(propStr, tree, paths, isArray, pathStr, statusLookup, collapseAfter) {\n var divs = [];\n divs.push(\"\" + propStr + (isArray ? \"[\" : \"{\"));\n divs.push($505bd04b6527b6c0$require$m(\"button\", {\n onclick: function() {\n statusLookup[pathStr] = true;\n }\n }, \"-\"));\n for(var key in tree){\n if (!tree.hasOwnProperty(key)) continue;\n var child = tree[key];\n var newpath = paths.slice();\n newpath.push(key);\n divs.push($505bd04b6527b6c0$var$renderTree(key, child, newpath, statusLookup, collapseAfter));\n }\n divs.push(isArray ? \"]\" : \"}\");\n return $505bd04b6527b6c0$require$m(\"div\", divs);\n}\nfunction $505bd04b6527b6c0$var$renderTree(prop, tree, paths, statusLookup, collapseAfter) {\n var propStr = prop == null ? \"\" : prop + \":\";\n var pathStr = JSON.stringify(paths);\n var collapsed = statusLookup[pathStr];\n if (collapsed == null) {\n if (paths.length > collapseAfter) collapsed = true;\n else collapsed = false;\n }\n if (tree != null && tree instanceof Array) {\n if (collapsed) return $505bd04b6527b6c0$var$renderCollapsed(propStr, true, pathStr, statusLookup);\n else return $505bd04b6527b6c0$var$renderExpanded(propStr, tree, paths, true, pathStr, statusLookup, collapseAfter);\n }\n if (tree != null && typeof tree === \"object\") {\n if (collapsed) return $505bd04b6527b6c0$var$renderCollapsed(propStr, false, pathStr, statusLookup);\n else return $505bd04b6527b6c0$var$renderExpanded(propStr, tree, paths, false, pathStr, statusLookup, collapseAfter);\n }\n return $505bd04b6527b6c0$require$m(\"div\", propStr + JSON.stringify(tree));\n}\n$505bd04b6527b6c0$exports = function JsonViewer(initialVnode) {\n var attrs = initialVnode.attrs;\n var options = attrs.options || {};\n var statusLookup = {};\n return {\n view: function(vnode) {\n var tree = vnode.attrs.tree;\n return $505bd04b6527b6c0$var$renderTree(null, tree, [], statusLookup, options.collapseAfter);\n }\n };\n};\n\n\n\n\nconst $2a5c75a353ebafa5$export$72b66677513e0cef = ()=>{\n let projectName;\n let logic;\n let fields;\n return {\n oninit: (vnode)=>{\n projectName = (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.param(\"project\");\n (0, $98d6fbf968cbb475$export$73693bad9f5880b0)(\"/project/\" + projectName).then((res)=>{\n console.log(\"got project\", res);\n logic = res.logic;\n fields = res.fields;\n }).catch((err)=>{\n console.log(\"error getting project\");\n });\n },\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".json-tree\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"h2\", {}, projectName),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"h3\", {}, \"logic\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, (/*@__PURE__*/$parcel$interopDefault($505bd04b6527b6c0$exports))), {\n tree: logic\n }),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"h3\", {}, \"fields\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, (/*@__PURE__*/$parcel$interopDefault($505bd04b6527b6c0$exports))), {\n tree: fields\n })\n ]);\n }\n };\n};\n\n\n\n\n\n\nvar $65de353d4f6468ba$require$state = $75d41d026a980c58$export$ca000e230c0caa3e;\nfunction $65de353d4f6468ba$export$e93312b7773dfcac() {\n return {\n oncreate: (vnode)=>{\n window.onresize = (e)=>{\n let h = $65de353d4f6468ba$require$state.width() / $65de353d4f6468ba$require$state.height() * window.innerHeight;\n // console.log('updating head', h, e)\n vnode.dom.style.width = window.innerWidth > window.innerHeight ? `${h * .4}` : `${h * .24}`;\n vnode.dom.style.height = window.innerWidth > window.innerHeight ? \"40vh\" : \"24vh\";\n };\n },\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"#head.head\", {\n style: {\n width: window.innerWidth > window.innerHeight ? `${$65de353d4f6468ba$require$state.width() / $65de353d4f6468ba$require$state.height() * window.innerHeight * .4}` : `${$65de353d4f6468ba$require$state.width() / $65de353d4f6468ba$require$state.height() * window.innerHeight * .24}`,\n height: window.innerWidth > window.innerHeight ? \"40vh\" : \"24vh\"\n },\n ...vnode.attrs\n }, vnode.children);\n }\n };\n}\n\n\n\n\n\n\n\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***************************************************************************** */ var $8262638a2f185ab5$var$t = function() {\n return ($8262638a2f185ab5$var$t = Object.assign || function(e) {\n for(var t, n = 1, o = arguments.length; n < o; n++)for(var r in t = arguments[n])Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);\n return e;\n }).apply(this, arguments);\n};\nvar $8262638a2f185ab5$export$15d656b6f5aa1ba8 = function() {\n var n = {}, o = function(e, t) {\n void 0 === t && (t = !1);\n var o = n.dom, r = n.onchange, l = n.lastHtml, i = t ? a(o.innerHTML) : o.innerHTML;\n r && i !== l && r(i, Object.assign({}, e, {\n target: {\n value: i\n }\n }));\n n.lastHtml = i;\n }, r = function(e) {\n e.preventDefault();\n var t = e.clipboardData && e.clipboardData.getData(\"text/plain\");\n document.execCommand(\"insertHTML\", !1, t || \"\");\n }, a = function(e) {\n return e.replace(/ /g, \"\").replace(/&/g, \"&\").replace(/>/g, \">\").replace(/</g, \"<\");\n }, l = function(e) {\n 13 === (e.keyCode || e.which) && (e.returnValue = !1, e.preventDefault && e.preventDefault());\n }, i = function() {\n setTimeout(function() {\n document.execCommand(\"selectAll\", !1);\n }, 0);\n };\n return {\n oncreate: function(e) {\n var t = e.dom, o = e.attrs.onchange;\n n.onchange = o, n.dom = t;\n },\n view: function(n) {\n var a = n.attrs, c = a.html, u = a.tagName, p = void 0 === u ? \"div\" : u, s = a.disabled, d = void 0 !== s && s, v = a.pasteAsPlainText, f = void 0 === v || v, m = a.cleanupHtml, b = void 0 === m || m, g = a.preventNewline, h = void 0 === g || g, O = a.selectAllOnFocus, y = void 0 === O || O, w = (a.onchange, a.onblur), H = function(e, t) {\n var n = {};\n for(var o in e)Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (null != e && \"function\" == typeof Object.getOwnPropertySymbols) {\n var r = 0;\n for(o = Object.getOwnPropertySymbols(e); r < o.length; r++)t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);\n }\n return n;\n }(a, [\n \"html\",\n \"tagName\",\n \"disabled\",\n \"pasteAsPlainText\",\n \"cleanupHtml\",\n \"preventNewline\",\n \"selectAllOnFocus\",\n \"onchange\",\n \"onblur\"\n ]);\n return [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"div\", {\n contenteditable: !0\n }, (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).trust(\"Hello, world\")),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"div\", (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).trust(\"Hello, world\")),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(p, $8262638a2f185ab5$var$t($8262638a2f185ab5$var$t({}, H), {\n contenteditable: !d,\n onfocus: y ? i : void 0,\n oninput: o,\n onblur: function(e) {\n o(e, b), w && w(e);\n },\n onpaste: f ? r : void 0,\n onkeypress: h ? l : void 0\n }), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).trust(c))\n ];\n }\n };\n};\n\n\n\n\n\n\nvar $dc360f619821288e$require$state = $75d41d026a980c58$export$ca000e230c0caa3e;\nfunction $dc360f619821288e$export$9907240837c74db() {\n return {\n oncreate: (vnode)=>{\n let data = vnode.attrs;\n let i = vnode.attrs.i;\n let element = vnode.dom;\n let original_width = 0;\n let original_x = 0;\n let original_mouse_x = 0;\n element.addEventListener(\"mousedown\", (e)=>{\n if ($dc360f619821288e$require$state.tool() == \"trim\") {\n e.preventDefault();\n original_width = parseFloat(getComputedStyle(element, null).getPropertyValue(\"width\").replace(\"px\", \"\"));\n original_x = element.getBoundingClientRect().left;\n original_mouse_x = e.pageX;\n function resize(e) {\n const w = original_width + (e.pageX - original_mouse_x);\n const dx = e.movementX / $dc360f619821288e$require$state.scale();\n if (w + dx > 0) element.style.width = w + dx + \"px\";\n console.log(\"trimmed\", e, dx, element);\n }\n function stopResize() {\n element.removeEventListener(\"mousemove\", resize);\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[vnode.attrs.i][\"duration\"] = parseFloat(element.style.width) / $dc360f619821288e$require$state.scale();\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).update();\n }\n element.addEventListener(\"mousemove\", resize);\n element.addEventListener(\"mouseup\", stopResize);\n } else if ($dc360f619821288e$require$state.tool() == \"time\") {\n let p = e.offsetX / e.target.offsetWidth;\n let d = p * e.target.offsetWidth / $dc360f619821288e$require$state.scale();\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current = vnode.attrs.i;\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time = d + (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).durations((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.slice(0, vnode.attrs.i));\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).clip = data;\n (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time(d);\n console.log(\"clicked on clip\", this, vnode, e, p, d, (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51), (0, $22dd8f6982cb874d$export$ae01dedf5c052bb));\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n }\n });\n },\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".clip\", {\n style: {\n width: vnode.attrs.duration * $dc360f619821288e$require$state.scale()\n },\n ...vnode.attrs\n }, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons.progress\", {\n style: {\n display: (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current == vnode.attrs.i ? \"inherit\" : \"none\",\n left: (0, $22dd8f6982cb874d$export$ae01dedf5c052bb).time() * $dc360f619821288e$require$state.scale()\n }\n }),\n ...vnode.children\n ]);\n }\n };\n}\nfunction $dc360f619821288e$export$14416b8d99d47caa() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($dc360f619821288e$export$9907240837c74db, {\n class: \"template\",\n ...vnode.attrs\n }, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $8262638a2f185ab5$export$15d656b6f5aa1ba8), {\n style: {\n margin: \"5px\"\n },\n // Original HTML input\n html: this.html,\n // Returns the updated HTML code\n oncreate: (html)=>{\n this.html = `${JSON.stringify(vnode.attrs.data[\"text\"]).slice(1, -1)}`;\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n },\n onchange: (html)=>{\n this.html = html;\n },\n // Example to prevent the user from entering commas\n onkeydown: (e)=>{\n switch(e.key){\n case \"Enter\":\n e.preventDefault();\n e.stopPropagation();\n console.log(\"enter\");\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).update();\n case \"ArrowLeft\":\n e.stopPropagation();\n case \"ArrowRight\":\n e.stopPropagation();\n }\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl[vnode.attrs.i].data[\"text\"] = this.html;\n },\n // Replace the base tag, if needed\n tagName: \"div\"\n })\n ]);\n }\n };\n}\nfunction $dc360f619821288e$export$549c3bd210462fa5() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($dc360f619821288e$export$9907240837c74db, vnode.attrs, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"p#clipname.clipname\", vnode.attrs.name),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"p#inpoint.inpoint\", vnode.attrs.inpoint),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"p#outpoint.outpoint\", vnode.attrs.outpoint)\n ]);\n }\n };\n}\nfunction $dc360f619821288e$export$509b1ad5a8dc36f0() {\n return {\n oninit: (vnode)=>{\n (0, $98d6fbf968cbb475$export$73693bad9f5880b0)(`/project/${(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route.param(\"project\")}`, {}).then((e)=>{\n console.log(\"got otto\", e);\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl = e.edl;\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current = 0;\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time = 0;\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).update();\n });\n },\n oncreate: (vnode)=>{\n new (0, $dc7ec905e041f51c$export$2e2bcd8739ae039)(vnode.dom, {\n multiDrag: true,\n group: \"clip\",\n selectedClass: \"selected\",\n swapThreshold: 0.50,\n animation: 150,\n ghostClass: \"ghost\",\n forceFallback: true,\n // delay: 100,\n invertSwap: true,\n preventOnFilter: false,\n filter: (e)=>{\n if ($dc360f619821288e$require$state.tool() != \"move\") return true;\n else return false;\n },\n onUpdate: (e)=>{\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl = (0, $22dd8f6982cb874d$export$4331e38cf536896b)((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl, e.oldIndex, e.newIndex);\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).update();\n console.log(\"sorting update\", e, (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl);\n },\n removeOnSpill: true,\n onSpill: (e)=>{\n console.log(\"spilling\", e);\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.splice(e.oldIndex, 1);\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).update();\n }\n });\n window.scroll(0, 0);\n },\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"#timeline.timeline\", [\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.map((c, i)=>{\n if (c) {\n c.i = i;\n switch(c.type){\n case \"template\":\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($dc360f619821288e$export$14416b8d99d47caa, c);\n case \"video\":\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($dc360f619821288e$export$549c3bd210462fa5, c);\n }\n } else return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"\");\n })\n ]);\n }\n };\n}\n\n\n\n\n\n\n\n\n\n\nvar $814c1d11c1f7e12f$var$Bin = {\n videos: [],\n templates: [],\n oninit: (vnode)=>{\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).request(\"/videos\").then((e)=>{\n // console.log('got videos!', e)\n $814c1d11c1f7e12f$var$Bin.videos = e;\n });\n (0, $98d6fbf968cbb475$export$73693bad9f5880b0)(\"/otto/templates\").then((e)=>{\n // console.log('got videos!', e)\n $814c1d11c1f7e12f$var$Bin.templates = e;\n });\n },\n oncreate: (vnode)=>{\n new (0, $dc7ec905e041f51c$export$31b3ca70d8f57423)(vnode.dom, {\n group: {\n name: \"media\",\n pull: \"clone\",\n put: false\n },\n sort: false,\n selectedClass: \"selected\",\n ghostClass: \"ghost\",\n forceFallback: true,\n animation: 150,\n onEnd: (e)=>{\n if (e.from.id == \"bin\" && e.to.id == \"timeline\") {\n console.log(\"moved media!\", e);\n var clip = e.item.attributes;\n e.item.attributes.pos = e.newIndex;\n // Timeline.updateEdl()\n // Edl.edl.splice(e.newIndex, 0, [\n var edl = (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.slice(0, e.newIndex);\n if (clip.type.value == \"template\") edl.push({\n name: clip.name.value,\n duration: clip.duration.value,\n type: \"template\",\n data: JSON.parse(clip.datastr.value)\n });\n else edl.push({\n name: clip.name.value,\n inpoint: Number(clip.inpoint.value),\n outpoint: Number(clip.outpoint.value),\n duration: Number(clip.outpoint.value - clip.inpoint.value),\n description: clip.description.value,\n type: \"video\"\n });\n edl = edl.concat((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl.slice(e.newIndex));\n console.log(\"inserted new clip\", edl);\n if (e.newIndex <= (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current) (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).current++;\n e.item.remove();\n // Timeline.loadEdl(edl)\n (0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).edl = edl;\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n }\n }\n });\n },\n view: (vnode)=>{\n // m('#bin.project.bin', {}, [\n // m('h3', 'bin'),\n // m('tr', [\n // m('th', 'files'),\n // ]),\n // return m('table#bin.project.bin', {}, [\n // media.map(f => {\n // return m('tr', [\n // m('td', {\n // }, f)\n // ])\n // })\n // ])\n return [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"table#bin.bin.project\", {}, [\n $814c1d11c1f7e12f$var$Bin.templates.map((clip)=>{\n // console.log('making template', clip, typeof(clip))\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $dc360f619821288e$export$14416b8d99d47caa), {\n ...clip,\n datastr: JSON.stringify(clip.data)\n });\n }),\n $814c1d11c1f7e12f$var$Bin.videos.map((f)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $dc360f619821288e$export$549c3bd210462fa5), {\n type: \"video\",\n name: f,\n inpoint: 0,\n outpoint: 5,\n pos: \"-1\",\n duration: 10,\n description: \"\"\n });\n })\n ])\n ];\n }\n};\nvar $814c1d11c1f7e12f$export$2e2bcd8739ae039 = $814c1d11c1f7e12f$var$Bin;\n\n\n\n\n\nvar $c6a8d06c14eaca08$require$formatTime = $37d0566241e39315$exports.formatTime;\nfunction $c6a8d06c14eaca08$export$c7bb7bfc56e79955() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"p.timecode\", {}, $c6a8d06c14eaca08$require$formatTime((0, $22dd8f6982cb874d$export$304e9dfcb2c65a51).time));\n }\n };\n}\n\n\n\n\n\nvar $9ffa454b1b7cb1a3$require$state = $75d41d026a980c58$export$ca000e230c0caa3e;\nclass $9ffa454b1b7cb1a3$export$2e2bcd8739ae039 {\n oncreate() {}\n view() {\n let t = document.getElementById(\"timeline\");\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"span#TTools.tools.toolcol\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.custom\", {\n title: \"time selector\",\n onclick: (vnode)=>{\n t.style.cursor = \"text\";\n $9ffa454b1b7cb1a3$require$state.tool(\"time\");\n },\n style: {\n \"background-color\": $9ffa454b1b7cb1a3$require$state.tool() == \"time\" ? \"#393939\" : \"transparent\"\n }\n }, \"|\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.custom\", {\n title: \"trim\",\n onclick: (vnode)=>{\n t.style.cursor = \"ew-resize\";\n $9ffa454b1b7cb1a3$require$state.tool(\"trim\");\n },\n style: {\n \"background-color\": $9ffa454b1b7cb1a3$require$state.tool() == \"trim\" ? \"#393939\" : \"transparent\"\n }\n }, \"[ ]\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"move\",\n onclick: (vnode)=>{\n t.style.cursor = \"url(./assets/swap-horizontal.svg), -webkit-grab\";\n $9ffa454b1b7cb1a3$require$state.tool(\"move\");\n },\n style: {\n \"background-color\": $9ffa454b1b7cb1a3$require$state.tool() == \"move\" ? \"#393939\" : \"transparent\"\n }\n }, \"swap_horizontal\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"cut\",\n onclick: (vnode)=>{\n t.style.cursor = \"url(./assets/content-cut.svg), auto\";\n $9ffa454b1b7cb1a3$require$state.tool(\"cut\");\n },\n style: {\n \"background-color\": $9ffa454b1b7cb1a3$require$state.tool() == \"cut\" ? \"#393939\" : \"transparent\"\n }\n }, \"content_cut\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"slip\",\n onclick: (vnode)=>{\n t.style.cursor = \"ew-resize\";\n $9ffa454b1b7cb1a3$require$state.tool(\"slip\");\n },\n style: {\n \"background-color\": $9ffa454b1b7cb1a3$require$state.tool() == \"slip\" ? \"#393939\" : \"transparent\"\n }\n }, \"swap_calls\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"slide\",\n onclick: (vnode)=>{\n t.style.cursor = \"ew-resize\";\n $9ffa454b1b7cb1a3$require$state.tool(\"slide\");\n },\n style: {\n \"background-color\": $9ffa454b1b7cb1a3$require$state.tool() == \"slide\" ? \"#393939\" : \"transparent\"\n }\n }, \"sync_alt\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n title: \"dual roller\",\n onclick: (vnode)=>{\n t.style.cursor = \"ew-resize\";\n $9ffa454b1b7cb1a3$require$state.tool(\"dual roller\");\n },\n style: {\n \"background-color\": $9ffa454b1b7cb1a3$require$state.tool() == \"dual roller\" ? \"#393939\" : \"transparent\"\n }\n }, \"compare_arrows\")\n ]);\n }\n}\n\n\n\n\nvar $65AEs = parcelRequire(\"65AEs\");\n\n\nvar $ca1543b41bbd74a8$require$Timeline = $95330ca74a9dfc2d$export$e6a97ba2cae5bb94;\n\nvar $ca1543b41bbd74a8$require$state = $75d41d026a980c58$export$ca000e230c0caa3e;\n// position will be between 0 and 1\nvar $ca1543b41bbd74a8$var$minp = 0;\nvar $ca1543b41bbd74a8$var$maxp = 1;\n// The result should be between .1 an 1000\nvar $ca1543b41bbd74a8$var$minv = Math.log(.1);\nvar $ca1543b41bbd74a8$var$maxv = Math.log(1000);\n// calculate adjustment factor\nvar $ca1543b41bbd74a8$var$scale = ($ca1543b41bbd74a8$var$maxv - $ca1543b41bbd74a8$var$minv) / ($ca1543b41bbd74a8$var$maxp - $ca1543b41bbd74a8$var$minp);\nfunction $ca1543b41bbd74a8$export$d9c53faf2c4538f4(position) {\n return Math.exp($ca1543b41bbd74a8$var$minv + $ca1543b41bbd74a8$var$scale * (position - $ca1543b41bbd74a8$var$minp));\n}\nfunction $ca1543b41bbd74a8$export$5faf06e8a1a0bc80(value) {\n return (Math.log(value) - $ca1543b41bbd74a8$var$minv) / $ca1543b41bbd74a8$var$scale + $ca1543b41bbd74a8$var$minp;\n}\nfunction $ca1543b41bbd74a8$export$341ecdfed83689f3() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".slider#scale\", {\n min: 1,\n max: 100,\n style: {\n paddingLeft: `${$ca1543b41bbd74a8$export$5faf06e8a1a0bc80($ca1543b41bbd74a8$require$state.scale()) * 100}%`,\n \"background-color\": \"#393939\"\n }\n });\n },\n oncreate: (vnode)=>{\n const slider = (0, (/*@__PURE__*/$parcel$interopDefault($65AEs)))(vnode.dom);\n slider.draggable({\n origin: \"self\",\n inertia: true,\n modifiers: [\n (0, (/*@__PURE__*/$parcel$interopDefault($65AEs))).modifiers.restrict({\n restriction: \"self\"\n })\n ]\n }).on(\"dragmove\", (event)=>{\n // const sliderWidth = interact.getElementRect(event.target.parentNode).width\n let sliderWidth = event.target.offsetWidth;\n let p = Math.max(event.pageX - event.target.offsetLeft, 0) / sliderWidth;\n // event.target.style.paddingLeft = p*100 + '%'\n const value = $ca1543b41bbd74a8$export$d9c53faf2c4538f4(p).toFixed(4);\n console.log(\"scale:\", value, \"padding:\", p);\n // event.target.setAttribute('data-value', value)\n $ca1543b41bbd74a8$require$state.scale(value);\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).redraw();\n });\n }\n };\n}\nfunction $ca1543b41bbd74a8$export$d60cfc58d3c358b6() {\n return {\n view: (vnode)=>{\n return (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".tools.toolbar\", {\n style: {\n width: \"auto\"\n }\n }, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n onclick: (e)=>{\n let s = $ca1543b41bbd74a8$export$d9c53faf2c4538f4(Math.max($ca1543b41bbd74a8$export$5faf06e8a1a0bc80($ca1543b41bbd74a8$require$state.scale()) - .05, .01));\n $ca1543b41bbd74a8$require$state.scale(s);\n console.log(\"zooming out\", s);\n }\n }, \"zoom_out\"),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))($ca1543b41bbd74a8$export$341ecdfed83689f3),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\"i.material-icons\", {\n style: {\n position: \"absolute\",\n right: 0\n },\n onclick: (e)=>{\n let s = $ca1543b41bbd74a8$export$d9c53faf2c4538f4($ca1543b41bbd74a8$export$5faf06e8a1a0bc80($ca1543b41bbd74a8$require$state.scale()) + .05);\n $ca1543b41bbd74a8$require$state.scale(s);\n console.log(\"zooming in\", s);\n }\n }, \"zoom_in\")\n ]);\n }\n };\n}\n\n\nvar $bddfb93d329dfb15$export$8ee4384013e13f14 = {\n view: (vnode)=>{\n return [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $0e686a53b040bd4d$export$d9b273488cd8ce6f)),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $65de353d4f6468ba$export$e93312b7773dfcac), [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $d40041a1f594fd32$export$133773870222880f))\n ]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".fit.center\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $3ccf69c8ded49b26$export$403b19f90abd052f), [\n \"16:9\",\n \"4:3\",\n \"4:5\",\n \"1:1\",\n \"5:4\",\n \"3:4\",\n \"9:16\"\n ]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $3ccf69c8ded49b26$export$3e4ff2216a90b8a4), [\n \"1080p\",\n \"720p\",\n \"480p\",\n \"240p\"\n ])\n ]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $d3adc0dc5c0e930a$export$123539912283e31c)),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".bar.fullwidth.timelinegrid\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $9ffa454b1b7cb1a3$export$2e2bcd8739ae039)),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".vcenter\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".bar\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $c6a8d06c14eaca08$export$c7bb7bfc56e79955)),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, (/*@__PURE__*/$parcel$interopDefault($37d0566241e39315$exports))))\n ]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".bar.right\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $d3adc0dc5c0e930a$export$5e1c87f561bdb6c8)),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".right\", {}, [\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $d3adc0dc5c0e930a$export$8af178eeca6d02ea))\n ])\n ]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $dc360f619821288e$export$509b1ad5a8dc36f0))\n ])\n ]),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $ca1543b41bbd74a8$export$d60cfc58d3c358b6)),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))(\".spacer\", {\n style: {\n height: \"3em\"\n }\n }, []),\n (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $814c1d11c1f7e12f$export$2e2bcd8739ae039))\n ];\n }\n};\n\n\nvar $28edbe48ebdea224$exports = {};\n$28edbe48ebdea224$exports = new URL(\"al-white.3b0a8f21.svg\", import.meta.url).toString();\n\n\n\nvar $35da740d59af89ba$require$state = $75d41d026a980c58$export$ca000e230c0caa3e;\n(0, $89b291c8bc281326$exports.defaults).transition = \"zoom\";\n(0, $89b291c8bc281326$exports.defaults).theme.ok = \"ui positive button\";\n(0, $89b291c8bc281326$exports.defaults).theme.cancel = \"ui black button\";\n(0, $89b291c8bc281326$exports.defaults).notifier.delay = 10;\nif (window.matchMedia && window.matchMedia(\"(prefers-color-scheme: dark)\").matches) {\n // swap favicon if in dark mode\n let favicon = document.getElementById(\"favicon\").href = (0, (/*@__PURE__*/$parcel$interopDefault($28edbe48ebdea224$exports)));\n}\nwindow.addEventListener(\"storage\", (event)=>{\n let credentials = (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).jwt;\n // console.log('storage event', event, credentials)\n if (event.key === \"REQUESTING_SHARED_CREDENTIALS\" && credentials) {\n window.localStorage.setItem(\"CREDENTIALS_SHARING\", JSON.stringify(credentials));\n window.localStorage.removeItem(\"CREDENTIALS_SHARING\");\n }\n if (event.key === \"CREDENTIALS_SHARING\" && !credentials) (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).login(JSON.parse(event.newValue));\n if (event.key === \"CREDENTIALS_FLUSH\" && credentials) (0, $d53863f8c6f341c9$export$1f44aaf2ec115b54).logout();\n});\nwindow.localStorage.setItem(\"REQUESTING_SHARED_CREDENTIALS\", Date.now().toString());\nwindow.localStorage.removeItem(\"REQUESTING_SHARED_CREDENTIALS\");\nconsole.log(\"sup!\");\n(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports))).route(document.body, \"/\", {\n \"/\": {\n render: ()=>(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$c84671f46d6a1ca), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $cc19313c82e913d3$export$b94310965bed44e6)))\n },\n \"/projects\": {\n render: ()=>(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$c84671f46d6a1ca), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $ecb8f3b69b3e0f46$export$ca6fbb51b35e375c)))\n },\n \"/renders\": {\n render: ()=>(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$c84671f46d6a1ca), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $880c6aed43944db1$export$eaf7822a8f6a78d6)))\n },\n \"/documents\": {\n render: ()=>(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$c84671f46d6a1ca), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $bdfa56e2d7b9b984$export$22c59631e6c46e5a)))\n },\n \"/otto\": (0, $bddfb93d329dfb15$export$8ee4384013e13f14),\n \"/form\": {\n render: ()=>(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$c84671f46d6a1ca), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $5b1641ca184fea1a$export$da4bcb8500ed9b65)))\n },\n \"/editor\": {\n render: ()=>(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$c84671f46d6a1ca), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2a5c75a353ebafa5$export$72b66677513e0cef)))\n },\n \"/login\": {\n render: ()=>(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$c84671f46d6a1ca), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $98d6fbf968cbb475$export$21a94553ffa41578)))\n },\n \"/logout\": {\n render: ()=>(0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $2188d3836cd50cfb$export$c84671f46d6a1ca), (0, (/*@__PURE__*/$parcel$interopDefault($65d5daca13f5010c$exports)))((0, $98d6fbf968cbb475$export$cad1a703886b4e3a)))\n }\n});\n\n\n//# sourceMappingURL=index.80acf4f7.js.map\n","\"use strict\"\n\nfunction Vnode(tag, key, attrs, children, text, dom) {\n\treturn {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: undefined, events: undefined, instance: undefined}\n}\nVnode.normalize = function(node) {\n\tif (Array.isArray(node)) return Vnode(\"[\", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)\n\tif (node == null || typeof node === \"boolean\") return null\n\tif (typeof node === \"object\") return node\n\treturn Vnode(\"#\", undefined, undefined, String(node), undefined, undefined)\n}\nVnode.normalizeChildren = function(input) {\n\tvar children = []\n\tif (input.length) {\n\t\tvar isKeyed = input[0] != null && input[0].key != null\n\t\t// Note: this is a *very* perf-sensitive check.\n\t\t// Fun fact: merging the loop like this is somehow faster than splitting\n\t\t// it, noticeably so.\n\t\tfor (var i = 1; i < input.length; i++) {\n\t\t\tif ((input[i] != null && input[i].key != null) !== isKeyed) {\n\t\t\t\tthrow new TypeError(\n\t\t\t\t\tisKeyed && (input[i] != null || typeof input[i] === \"boolean\")\n\t\t\t\t\t\t? \"In fragments, vnodes must either all have keys or none have keys. You may wish to consider using an explicit keyed empty fragment, m.fragment({key: ...}), instead of a hole.\"\n\t\t\t\t\t\t: \"In fragments, vnodes must either all have keys or none have keys.\"\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < input.length; i++) {\n\t\t\tchildren[i] = Vnode.normalize(input[i])\n\t\t}\n\t}\n\treturn children\n}\n\nmodule.exports = Vnode\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(html) {\n\tif (html == null) html = \"\"\n\treturn Vnode(\"<\", undefined, undefined, html, undefined, undefined)\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nmodule.exports = function() {\n\tvar vnode = hyperscriptVnode.apply(0, arguments)\n\n\tvnode.tag = \"[\"\n\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\treturn vnode\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\n// Call via `hyperscriptVnode.apply(startOffset, arguments)`\n//\n// The reason I do it this way, forwarding the arguments and passing the start\n// offset in `this`, is so I don't have to create a temporary array in a\n// performance-critical path.\n//\n// In native ES6, I'd instead add a final `...args` parameter to the\n// `hyperscript` and `fragment` factories and define this as\n// `hyperscriptVnode(...args)`, since modern engines do optimize that away. But\n// ES5 (what Mithril.js requires thanks to IE support) doesn't give me that luxury,\n// and engines aren't nearly intelligent enough to do either of these:\n//\n// 1. Elide the allocation for `[].slice.call(arguments, 1)` when it's passed to\n// another function only to be indexed.\n// 2. Elide an `arguments` allocation when it's passed to any function other\n// than `Function.prototype.apply` or `Reflect.apply`.\n//\n// In ES6, it'd probably look closer to this (I'd need to profile it, though):\n// module.exports = function(attrs, ...children) {\n// if (attrs == null || typeof attrs === \"object\" && attrs.tag == null && !Array.isArray(attrs)) {\n// if (children.length === 1 && Array.isArray(children[0])) children = children[0]\n// } else {\n// children = children.length === 0 && Array.isArray(attrs) ? attrs : [attrs, ...children]\n// attrs = undefined\n// }\n//\n// if (attrs == null) attrs = {}\n// return Vnode(\"\", attrs.key, attrs, children)\n// }\nmodule.exports = function() {\n\tvar attrs = arguments[this], start = this + 1, children\n\n\tif (attrs == null) {\n\t\tattrs = {}\n\t} else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n\t\tattrs = {}\n\t\tstart = this\n\t}\n\n\tif (arguments.length === start + 1) {\n\t\tchildren = arguments[start]\n\t\tif (!Array.isArray(children)) children = [children]\n\t} else {\n\t\tchildren = []\n\t\twhile (start < arguments.length) children.push(arguments[start++])\n\t}\n\n\treturn Vnode(\"\", attrs.key, attrs, children)\n}\n","\"use strict\"\n/** @constructor */\nvar PromisePolyfill = function(executor) {\n\tif (!(this instanceof PromisePolyfill)) throw new Error(\"Promise must be called with 'new'.\")\n\tif (typeof executor !== \"function\") throw new TypeError(\"executor must be a function.\")\n\n\tvar self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)\n\tvar instance = self._instance = {resolvers: resolvers, rejectors: rejectors}\n\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction handler(list, shouldAbsorb) {\n\t\treturn function execute(value) {\n\t\t\tvar then\n\t\t\ttry {\n\t\t\t\tif (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n\t\t\t\t\tif (value === self) throw new TypeError(\"Promise can't be resolved with itself.\")\n\t\t\t\t\texecuteOnce(then.bind(value))\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcallAsync(function() {\n\t\t\t\t\t\tif (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value)\n\t\t\t\t\t\tfor (var i = 0; i < list.length; i++) list[i](value)\n\t\t\t\t\t\tresolvers.length = 0, rejectors.length = 0\n\t\t\t\t\t\tinstance.state = shouldAbsorb\n\t\t\t\t\t\tinstance.retry = function() {execute(value)}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\trejectCurrent(e)\n\t\t\t}\n\t\t}\n\t}\n\tfunction executeOnce(then) {\n\t\tvar runs = 0\n\t\tfunction run(fn) {\n\t\t\treturn function(value) {\n\t\t\t\tif (runs++ > 0) return\n\t\t\t\tfn(value)\n\t\t\t}\n\t\t}\n\t\tvar onerror = run(rejectCurrent)\n\t\ttry {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}\n\t}\n\n\texecuteOnce(executor)\n}\nPromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n\tvar self = this, instance = self._instance\n\tfunction handle(callback, list, next, state) {\n\t\tlist.push(function(value) {\n\t\t\tif (typeof callback !== \"function\") next(value)\n\t\t\telse try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}\n\t\t})\n\t\tif (typeof instance.retry === \"function\" && state === instance.state) instance.retry()\n\t}\n\tvar resolveNext, rejectNext\n\tvar promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})\n\thandle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)\n\treturn promise\n}\nPromisePolyfill.prototype.catch = function(onRejection) {\n\treturn this.then(null, onRejection)\n}\nPromisePolyfill.prototype.finally = function(callback) {\n\treturn this.then(\n\t\tfunction(value) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn value\n\t\t\t})\n\t\t},\n\t\tfunction(reason) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn PromisePolyfill.reject(reason);\n\t\t\t})\n\t\t}\n\t)\n}\nPromisePolyfill.resolve = function(value) {\n\tif (value instanceof PromisePolyfill) return value\n\treturn new PromisePolyfill(function(resolve) {resolve(value)})\n}\nPromisePolyfill.reject = function(value) {\n\treturn new PromisePolyfill(function(resolve, reject) {reject(value)})\n}\nPromisePolyfill.all = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tvar total = list.length, count = 0, values = []\n\t\tif (list.length === 0) resolve([])\n\t\telse for (var i = 0; i < list.length; i++) {\n\t\t\t(function(i) {\n\t\t\t\tfunction consume(value) {\n\t\t\t\t\tcount++\n\t\t\t\t\tvalues[i] = value\n\t\t\t\t\tif (count === total) resolve(values)\n\t\t\t\t}\n\t\t\t\tif (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") {\n\t\t\t\t\tlist[i].then(consume, reject)\n\t\t\t\t}\n\t\t\t\telse consume(list[i])\n\t\t\t})(i)\n\t\t}\n\t})\n}\nPromisePolyfill.race = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tlist[i].then(resolve, reject)\n\t\t}\n\t})\n}\n\nmodule.exports = PromisePolyfill\n","\"use strict\"\n\nmodule.exports = require(\"./render/render\")(typeof window !== \"undefined\" ? window : null)\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function($window) {\n\tvar $doc = $window && $window.document\n\tvar currentRedraw\n\n\tvar nameSpace = {\n\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\tmath: \"http://www.w3.org/1998/Math/MathML\"\n\t}\n\n\tfunction getNameSpace(vnode) {\n\t\treturn vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]\n\t}\n\n\t//sanity check to discourage people from doing `vnode.state = ...`\n\tfunction checkState(vnode, original) {\n\t\tif (vnode.state !== original) throw new Error(\"'vnode.state' must not be modified.\")\n\t}\n\n\t//Note: the hook is passed as the `this` argument to allow proxying the\n\t//arguments without requiring a full array allocation to do so. It also\n\t//takes advantage of the fact the current `vnode` is the first argument in\n\t//all lifecycle methods.\n\tfunction callHook(vnode) {\n\t\tvar original = vnode.state\n\t\ttry {\n\t\t\treturn this.apply(original, arguments)\n\t\t} finally {\n\t\t\tcheckState(vnode, original)\n\t\t}\n\t}\n\n\t// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when\n\t// inside an iframe. Catch and swallow this error, and heavy-handidly return null.\n\tfunction activeElement() {\n\t\ttry {\n\t\t\treturn $doc.activeElement\n\t\t} catch (e) {\n\t\t\treturn null\n\t\t}\n\t}\n\t//create\n\tfunction createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t}\n\tfunction createNode(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tif (typeof tag === \"string\") {\n\t\t\tvnode.state = {}\n\t\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"#\": createText(parent, vnode, nextSibling); break\n\t\t\t\tcase \"<\": createHTML(parent, vnode, ns, nextSibling); break\n\t\t\t\tcase \"[\": createFragment(parent, vnode, hooks, ns, nextSibling); break\n\t\t\t\tdefault: createElement(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t\telse createComponent(parent, vnode, hooks, ns, nextSibling)\n\t}\n\tfunction createText(parent, vnode, nextSibling) {\n\t\tvnode.dom = $doc.createTextNode(vnode.children)\n\t\tinsertNode(parent, vnode.dom, nextSibling)\n\t}\n\tvar possibleParents = {caption: \"table\", thead: \"table\", tbody: \"table\", tfoot: \"table\", tr: \"tbody\", th: \"tr\", td: \"tr\", colgroup: \"table\", col: \"colgroup\"}\n\tfunction createHTML(parent, vnode, ns, nextSibling) {\n\t\tvar match = vnode.children.match(/^\\s*?<(\\w+)/im) || []\n\t\t// not using the proper parent makes the child element(s) vanish.\n\t\t// var div = document.createElement(\"div\")\n\t\t// div.innerHTML = \"ij\"\n\t\t// console.log(div.innerHTML)\n\t\t// --> \"ij\", no in sight.\n\t\tvar temp = $doc.createElement(possibleParents[match[1]] || \"div\")\n\t\tif (ns === \"http://www.w3.org/2000/svg\") {\n\t\t\ttemp.innerHTML = \"\" + vnode.children + \"\"\n\t\t\ttemp = temp.firstChild\n\t\t} else {\n\t\t\ttemp.innerHTML = vnode.children\n\t\t}\n\t\tvnode.dom = temp.firstChild\n\t\tvnode.domSize = temp.childNodes.length\n\t\t// Capture nodes to remove, so we don't confuse them.\n\t\tvnode.instance = []\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tvar child\n\t\twhile (child = temp.firstChild) {\n\t\t\tvnode.instance.push(child)\n\t\t\tfragment.appendChild(child)\n\t\t}\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createFragment(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tif (vnode.children != null) {\n\t\t\tvar children = vnode.children\n\t\t\tcreateNodes(fragment, children, 0, children.length, hooks, null, ns)\n\t\t}\n\t\tvnode.dom = fragment.firstChild\n\t\tvnode.domSize = fragment.childNodes.length\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createElement(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tvar attrs = vnode.attrs\n\t\tvar is = attrs && attrs.is\n\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tvar element = ns ?\n\t\t\tis ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :\n\t\t\tis ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)\n\t\tvnode.dom = element\n\n\t\tif (attrs != null) {\n\t\t\tsetAttrs(vnode, attrs, ns)\n\t\t}\n\n\t\tinsertNode(parent, element, nextSibling)\n\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (vnode.children != null) {\n\t\t\t\tvar children = vnode.children\n\t\t\t\tcreateNodes(element, children, 0, children.length, hooks, null, ns)\n\t\t\t\tif (vnode.tag === \"select\" && attrs != null) setLateSelectAttrs(vnode, attrs)\n\t\t\t}\n\t\t}\n\t}\n\tfunction initComponent(vnode, hooks) {\n\t\tvar sentinel\n\t\tif (typeof vnode.tag.view === \"function\") {\n\t\t\tvnode.state = Object.create(vnode.tag)\n\t\t\tsentinel = vnode.state.view\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t} else {\n\t\t\tvnode.state = void 0\n\t\t\tsentinel = vnode.tag\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t\tvnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\") ? new vnode.tag(vnode) : vnode.tag(vnode)\n\t\t}\n\t\tinitLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tsentinel.$$reentrantLock$$ = null\n\t}\n\tfunction createComponent(parent, vnode, hooks, ns, nextSibling) {\n\t\tinitComponent(vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tcreateNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0\n\t\t}\n\t\telse {\n\t\t\tvnode.domSize = 0\n\t\t}\n\t}\n\n\t//update\n\t/**\n\t * @param {Element|Fragment} parent - the parent element\n\t * @param {Vnode[] | null} old - the list of vnodes of the last `render()` call for\n\t * this part of the tree\n\t * @param {Vnode[] | null} vnodes - as above, but for the current `render()` call.\n\t * @param {Function[]} hooks - an accumulator of post-render hooks (oncreate/onupdate)\n\t * @param {Element | null} nextSibling - the next DOM node if we're dealing with a\n\t * fragment that is not the last item in its\n\t * parent\n\t * @param {'svg' | 'math' | String | null} ns) - the current XML namespace, if any\n\t * @returns void\n\t */\n\t// This function diffs and patches lists of vnodes, both keyed and unkeyed.\n\t//\n\t// We will:\n\t//\n\t// 1. describe its general structure\n\t// 2. focus on the diff algorithm optimizations\n\t// 3. discuss DOM node operations.\n\n\t// ## Overview:\n\t//\n\t// The updateNodes() function:\n\t// - deals with trivial cases\n\t// - determines whether the lists are keyed or unkeyed based on the first non-null node\n\t// of each list.\n\t// - diffs them and patches the DOM if needed (that's the brunt of the code)\n\t// - manages the leftovers: after diffing, are there:\n\t// - old nodes left to remove?\n\t// \t - new nodes to insert?\n\t// \t deal with them!\n\t//\n\t// The lists are only iterated over once, with an exception for the nodes in `old` that\n\t// are visited in the fourth part of the diff and in the `removeNodes` loop.\n\n\t// ## Diffing\n\t//\n\t// Reading https://github.com/localvoid/ivi/blob/ddc09d06abaef45248e6133f7040d00d3c6be853/packages/ivi/src/vdom/implementation.ts#L617-L837\n\t// may be good for context on longest increasing subsequence-based logic for moving nodes.\n\t//\n\t// In order to diff keyed lists, one has to\n\t//\n\t// 1) match nodes in both lists, per key, and update them accordingly\n\t// 2) create the nodes present in the new list, but absent in the old one\n\t// 3) remove the nodes present in the old list, but absent in the new one\n\t// 4) figure out what nodes in 1) to move in order to minimize the DOM operations.\n\t//\n\t// To achieve 1) one can create a dictionary of keys => index (for the old list), then iterate\n\t// over the new list and for each new vnode, find the corresponding vnode in the old list using\n\t// the map.\n\t// 2) is achieved in the same step: if a new node has no corresponding entry in the map, it is new\n\t// and must be created.\n\t// For the removals, we actually remove the nodes that have been updated from the old list.\n\t// The nodes that remain in that list after 1) and 2) have been performed can be safely removed.\n\t// The fourth step is a bit more complex and relies on the longest increasing subsequence (LIS)\n\t// algorithm.\n\t//\n\t// the longest increasing subsequence is the list of nodes that can remain in place. Imagine going\n\t// from `1,2,3,4,5` to `4,5,1,2,3` where the numbers are not necessarily the keys, but the indices\n\t// corresponding to the keyed nodes in the old list (keyed nodes `e,d,c,b,a` => `b,a,e,d,c` would\n\t// match the above lists, for example).\n\t//\n\t// In there are two increasing subsequences: `4,5` and `1,2,3`, the latter being the longest. We\n\t// can update those nodes without moving them, and only call `insertNode` on `4` and `5`.\n\t//\n\t// @localvoid adapted the algo to also support node deletions and insertions (the `lis` is actually\n\t// the longest increasing subsequence *of old nodes still present in the new list*).\n\t//\n\t// It is a general algorithm that is fireproof in all circumstances, but it requires the allocation\n\t// and the construction of a `key => oldIndex` map, and three arrays (one with `newIndex => oldIndex`,\n\t// the `LIS` and a temporary one to create the LIS).\n\t//\n\t// So we cheat where we can: if the tails of the lists are identical, they are guaranteed to be part of\n\t// the LIS and can be updated without moving them.\n\t//\n\t// If two nodes are swapped, they are guaranteed not to be part of the LIS, and must be moved (with\n\t// the exception of the last node if the list is fully reversed).\n\t//\n\t// ## Finding the next sibling.\n\t//\n\t// `updateNode()` and `createNode()` expect a nextSibling parameter to perform DOM operations.\n\t// When the list is being traversed top-down, at any index, the DOM nodes up to the previous\n\t// vnode reflect the content of the new list, whereas the rest of the DOM nodes reflect the old\n\t// list. The next sibling must be looked for in the old list using `getNextSibling(... oldStart + 1 ...)`.\n\t//\n\t// In the other scenarios (swaps, upwards traversal, map-based diff),\n\t// the new vnodes list is traversed upwards. The DOM nodes at the bottom of the list reflect the\n\t// bottom part of the new vnodes list, and we can use the `v.dom` value of the previous node\n\t// as the next sibling (cached in the `nextSibling` variable).\n\n\n\t// ## DOM node moves\n\t//\n\t// In most scenarios `updateNode()` and `createNode()` perform the DOM operations. However,\n\t// this is not the case if the node moved (second and fourth part of the diff algo). We move\n\t// the old DOM nodes before updateNode runs because it enables us to use the cached `nextSibling`\n\t// variable rather than fetching it using `getNextSibling()`.\n\t//\n\t// The fourth part of the diff currently inserts nodes unconditionally, leading to issues\n\t// like #1791 and #1999. We need to be smarter about those situations where adjascent old\n\t// nodes remain together in the new list in a way that isn't covered by parts one and\n\t// three of the diff algo.\n\n\tfunction updateNodes(parent, old, vnodes, hooks, nextSibling, ns) {\n\t\tif (old === vnodes || old == null && vnodes == null) return\n\t\telse if (old == null || old.length === 0) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns)\n\t\telse if (vnodes == null || vnodes.length === 0) removeNodes(parent, old, 0, old.length)\n\t\telse {\n\t\t\tvar isOldKeyed = old[0] != null && old[0].key != null\n\t\t\tvar isKeyed = vnodes[0] != null && vnodes[0].key != null\n\t\t\tvar start = 0, oldStart = 0\n\t\t\tif (!isOldKeyed) while (oldStart < old.length && old[oldStart] == null) oldStart++\n\t\t\tif (!isKeyed) while (start < vnodes.length && vnodes[start] == null) start++\n\t\t\tif (isOldKeyed !== isKeyed) {\n\t\t\t\tremoveNodes(parent, old, oldStart, old.length)\n\t\t\t\tcreateNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else if (!isKeyed) {\n\t\t\t\t// Don't index past the end of either list (causes deopts).\n\t\t\t\tvar commonLength = old.length < vnodes.length ? old.length : vnodes.length\n\t\t\t\t// Rewind if necessary to the first non-null index on either side.\n\t\t\t\t// We could alternatively either explicitly create or remove nodes when `start !== oldStart`\n\t\t\t\t// but that would be optimizing for sparse lists which are more rare than dense ones.\n\t\t\t\tstart = start < oldStart ? start : oldStart\n\t\t\t\tfor (; start < commonLength; start++) {\n\t\t\t\t\to = old[start]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o === v || o == null && v == null) continue\n\t\t\t\t\telse if (o == null) createNode(parent, v, hooks, ns, getNextSibling(old, start + 1, nextSibling))\n\t\t\t\t\telse if (v == null) removeNode(parent, o)\n\t\t\t\t\telse updateNode(parent, o, v, hooks, getNextSibling(old, start + 1, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\tif (old.length > commonLength) removeNodes(parent, old, start, old.length)\n\t\t\t\tif (vnodes.length > commonLength) createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else {\n\t\t\t\t// keyed diff\n\t\t\t\tvar oldEnd = old.length - 1, end = vnodes.length - 1, map, o, v, oe, ve, topSibling\n\n\t\t\t\t// bottom-up\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t}\n\t\t\t\t// top-down\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o.key !== v.key) break\n\t\t\t\t\toldStart++, start++\n\t\t\t\t\tif (o !== v) updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\t// swaps and list reversals\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (start === end) break\n\t\t\t\t\tif (o.key !== ve.key || oe.key !== v.key) break\n\t\t\t\t\ttopSibling = getNextSibling(old, oldStart, nextSibling)\n\t\t\t\t\tmoveNodes(parent, oe, topSibling)\n\t\t\t\t\tif (oe !== v) updateNode(parent, oe, v, hooks, topSibling, ns)\n\t\t\t\t\tif (++start <= --end) moveNodes(parent, o, nextSibling)\n\t\t\t\t\tif (o !== ve) updateNode(parent, o, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldStart++; oldEnd--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t}\n\t\t\t\t// bottom up once again\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t}\n\t\t\t\tif (start > end) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\telse if (oldStart > oldEnd) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\telse {\n\t\t\t\t\t// inspired by ivi https://github.com/ivijs/ivi/ by Boris Kaul\n\t\t\t\t\tvar originalNextSibling = nextSibling, vnodesLength = end - start + 1, oldIndices = new Array(vnodesLength), li=0, i=0, pos = 2147483647, matched = 0, map, lisIndices\n\t\t\t\t\tfor (i = 0; i < vnodesLength; i++) oldIndices[i] = -1\n\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\tif (map == null) map = getKeyMap(old, oldStart, oldEnd + 1)\n\t\t\t\t\t\tve = vnodes[i]\n\t\t\t\t\t\tvar oldIndex = map[ve.key]\n\t\t\t\t\t\tif (oldIndex != null) {\n\t\t\t\t\t\t\tpos = (oldIndex < pos) ? oldIndex : -1 // becomes -1 if nodes were re-ordered\n\t\t\t\t\t\t\toldIndices[i-start] = oldIndex\n\t\t\t\t\t\t\toe = old[oldIndex]\n\t\t\t\t\t\t\told[oldIndex] = null\n\t\t\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\t\t\tmatched++\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnextSibling = originalNextSibling\n\t\t\t\t\tif (matched !== oldEnd - oldStart + 1) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\t\tif (matched === 0) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (pos === -1) {\n\t\t\t\t\t\t\t// the indices of the indices of the items that are part of the\n\t\t\t\t\t\t\t// longest increasing subsequence in the oldIndices list\n\t\t\t\t\t\t\tlisIndices = makeLisIndices(oldIndices)\n\t\t\t\t\t\t\tli = lisIndices.length - 1\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif (lisIndices[li] === i - start) li--\n\t\t\t\t\t\t\t\t\telse moveNodes(parent, v, nextSibling)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateNode(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvar oldTag = old.tag, tag = vnode.tag\n\t\tif (oldTag === tag) {\n\t\t\tvnode.state = old.state\n\t\t\tvnode.events = old.events\n\t\t\tif (shouldNotUpdate(vnode, old)) return\n\t\t\tif (typeof oldTag === \"string\") {\n\t\t\t\tif (vnode.attrs != null) {\n\t\t\t\t\tupdateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t}\n\t\t\t\tswitch (oldTag) {\n\t\t\t\t\tcase \"#\": updateText(old, vnode); break\n\t\t\t\t\tcase \"<\": updateHTML(parent, old, vnode, ns, nextSibling); break\n\t\t\t\t\tcase \"[\": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break\n\t\t\t\t\tdefault: updateElement(old, vnode, hooks, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse updateComponent(parent, old, vnode, hooks, nextSibling, ns)\n\t\t}\n\t\telse {\n\t\t\tremoveNode(parent, old)\n\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t}\n\t}\n\tfunction updateText(old, vnode) {\n\t\tif (old.children.toString() !== vnode.children.toString()) {\n\t\t\told.dom.nodeValue = vnode.children\n\t\t}\n\t\tvnode.dom = old.dom\n\t}\n\tfunction updateHTML(parent, old, vnode, ns, nextSibling) {\n\t\tif (old.children !== vnode.children) {\n\t\t\tremoveHTML(parent, old)\n\t\t\tcreateHTML(parent, vnode, ns, nextSibling)\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t\tvnode.instance = old.instance\n\t\t}\n\t}\n\tfunction updateFragment(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tupdateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns)\n\t\tvar domSize = 0, children = vnode.children\n\t\tvnode.dom = null\n\t\tif (children != null) {\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\tvar child = children[i]\n\t\t\t\tif (child != null && child.dom != null) {\n\t\t\t\t\tif (vnode.dom == null) vnode.dom = child.dom\n\t\t\t\t\tdomSize += child.domSize || 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (domSize !== 1) vnode.domSize = domSize\n\t\t}\n\t}\n\tfunction updateElement(old, vnode, hooks, ns) {\n\t\tvar element = vnode.dom = old.dom\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tif (vnode.tag === \"textarea\") {\n\t\t\tif (vnode.attrs == null) vnode.attrs = {}\n\t\t}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tupdateNodes(element, old.children, vnode.children, hooks, null, ns)\n\t\t}\n\t}\n\tfunction updateComponent(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tupdateLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tif (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\telse updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, ns)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.instance.domSize\n\t\t}\n\t\telse if (old.instance != null) {\n\t\t\tremoveNode(parent, old.instance)\n\t\t\tvnode.dom = undefined\n\t\t\tvnode.domSize = 0\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t}\n\t}\n\tfunction getKeyMap(vnodes, start, end) {\n\t\tvar map = Object.create(null)\n\t\tfor (; start < end; start++) {\n\t\t\tvar vnode = vnodes[start]\n\t\t\tif (vnode != null) {\n\t\t\t\tvar key = vnode.key\n\t\t\t\tif (key != null) map[key] = start\n\t\t\t}\n\t\t}\n\t\treturn map\n\t}\n\t// Lifted from ivi https://github.com/ivijs/ivi/\n\t// takes a list of unique numbers (-1 is special and can\n\t// occur multiple times) and returns an array with the indices\n\t// of the items that are part of the longest increasing\n\t// subsequence\n\tvar lisTemp = []\n\tfunction makeLisIndices(a) {\n\t\tvar result = [0]\n\t\tvar u = 0, v = 0, i = 0\n\t\tvar il = lisTemp.length = a.length\n\t\tfor (var i = 0; i < il; i++) lisTemp[i] = a[i]\n\t\tfor (var i = 0; i < il; ++i) {\n\t\t\tif (a[i] === -1) continue\n\t\t\tvar j = result[result.length - 1]\n\t\t\tif (a[j] < a[i]) {\n\t\t\t\tlisTemp[i] = j\n\t\t\t\tresult.push(i)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tu = 0\n\t\t\tv = result.length - 1\n\t\t\twhile (u < v) {\n\t\t\t\t// Fast integer average without overflow.\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tvar c = (u >>> 1) + (v >>> 1) + (u & v & 1)\n\t\t\t\tif (a[result[c]] < a[i]) {\n\t\t\t\t\tu = c + 1\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tv = c\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a[i] < a[result[u]]) {\n\t\t\t\tif (u > 0) lisTemp[i] = result[u - 1]\n\t\t\t\tresult[u] = i\n\t\t\t}\n\t\t}\n\t\tu = result.length\n\t\tv = result[u - 1]\n\t\twhile (u-- > 0) {\n\t\t\tresult[u] = v\n\t\t\tv = lisTemp[v]\n\t\t}\n\t\tlisTemp.length = 0\n\t\treturn result\n\t}\n\n\tfunction getNextSibling(vnodes, i, nextSibling) {\n\t\tfor (; i < vnodes.length; i++) {\n\t\t\tif (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom\n\t\t}\n\t\treturn nextSibling\n\t}\n\n\t// This covers a really specific edge case:\n\t// - Parent node is keyed and contains child\n\t// - Child is removed, returns unresolved promise in `onbeforeremove`\n\t// - Parent node is moved in keyed diff\n\t// - Remaining children still need moved appropriately\n\t//\n\t// Ideally, I'd track removed nodes as well, but that introduces a lot more\n\t// complexity and I'm not exactly interested in doing that.\n\tfunction moveNodes(parent, vnode, nextSibling) {\n\t\tvar frag = $doc.createDocumentFragment()\n\t\tmoveChildToFrag(parent, frag, vnode)\n\t\tinsertNode(parent, frag, nextSibling)\n\t}\n\tfunction moveChildToFrag(parent, frag, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\t\t\tfrag.appendChild(vnode.instance[i])\n\t\t\t\t}\n\t\t\t} else if (vnode.tag !== \"[\") {\n\t\t\t\t// Don't recurse for text nodes *or* elements, just fragments\n\t\t\t\tfrag.appendChild(vnode.dom)\n\t\t\t} else if (vnode.children.length === 1) {\n\t\t\t\tvnode = vnode.children[0]\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\tif (child != null) moveChildToFrag(parent, frag, child)\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tfunction insertNode(parent, dom, nextSibling) {\n\t\tif (nextSibling != null) parent.insertBefore(dom, nextSibling)\n\t\telse parent.appendChild(dom)\n\t}\n\n\tfunction maybeSetContentEditable(vnode) {\n\t\tif (vnode.attrs == null || (\n\t\t\tvnode.attrs.contenteditable == null && // attribute\n\t\t\tvnode.attrs.contentEditable == null // property\n\t\t)) return false\n\t\tvar children = vnode.children\n\t\tif (children != null && children.length === 1 && children[0].tag === \"<\") {\n\t\t\tvar content = children[0].children\n\t\t\tif (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content\n\t\t}\n\t\telse if (children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted.\")\n\t\treturn true\n\t}\n\n\t//remove\n\tfunction removeNodes(parent, vnodes, start, end) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) removeNode(parent, vnode)\n\t\t}\n\t}\n\tfunction removeNode(parent, vnode) {\n\t\tvar mask = 0\n\t\tvar original = vnode.state\n\t\tvar stateResult, attrsResult\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.state.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\tmask = 1\n\t\t\t\tstateResult = result\n\t\t\t}\n\t\t}\n\t\tif (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.attrs.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tmask |= 2\n\t\t\t\tattrsResult = result\n\t\t\t}\n\t\t}\n\t\tcheckState(vnode, original)\n\n\t\t// If we can, try to fast-path it and avoid all the overhead of awaiting\n\t\tif (!mask) {\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t} else {\n\t\t\tif (stateResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 1) { mask &= 2; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tstateResult.then(next, next)\n\t\t\t}\n\t\t\tif (attrsResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 2) { mask &= 1; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tattrsResult.then(next, next)\n\t\t\t}\n\t\t}\n\n\t\tfunction reallyRemove() {\n\t\t\tcheckState(vnode, original)\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t}\n\t}\n\tfunction removeHTML(parent, vnode) {\n\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\tparent.removeChild(vnode.instance[i])\n\t\t}\n\t}\n\tfunction removeChild(parent, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tremoveHTML(parent, vnode)\n\t\t\t} else {\n\t\t\t\tif (vnode.tag !== \"[\") {\n\t\t\t\t\tparent.removeChild(vnode.dom)\n\t\t\t\t\tif (!Array.isArray(vnode.children)) break\n\t\t\t\t}\n\t\t\t\tif (vnode.children.length === 1) {\n\t\t\t\t\tvnode = vnode.children[0]\n\t\t\t\t\tif (vnode != null) continue\n\t\t\t\t} else {\n\t\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\t\tif (child != null) removeChild(parent, child)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\tfunction onremove(vnode) {\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onremove === \"function\") callHook.call(vnode.state.onremove, vnode)\n\t\tif (vnode.attrs && typeof vnode.attrs.onremove === \"function\") callHook.call(vnode.attrs.onremove, vnode)\n\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\t} else {\n\t\t\tvar children = vnode.children\n\t\t\tif (Array.isArray(children)) {\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tvar child = children[i]\n\t\t\t\t\tif (child != null) onremove(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//attrs\n\tfunction setAttrs(vnode, attrs, ns) {\n\t\t// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n\t\t//\n\t\t// Also, the DOM does things to inputs based on the value, so it needs set first.\n\t\t// See: https://github.com/MithrilJS/mithril.js/issues/2622\n\t\tif (vnode.tag === \"input\" && attrs.type != null) vnode.dom.setAttribute(\"type\", attrs.type)\n\t\tvar isFileInput = attrs != null && vnode.tag === \"input\" && attrs.type === \"file\"\n\t\tfor (var key in attrs) {\n\t\t\tsetAttr(vnode, key, null, attrs[key], ns, isFileInput)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key, old, value, ns, isFileInput) {\n\t\tif (key === \"key\" || key === \"is\" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== \"object\" || key === \"type\" && vnode.tag === \"input\") return\n\t\tif (key[0] === \"o\" && key[1] === \"n\") return updateEvent(vnode, key, value)\n\t\tif (key.slice(0, 6) === \"xlink:\") vnode.dom.setAttributeNS(\"http://www.w3.org/1999/xlink\", key.slice(6), value)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, value)\n\t\telse if (hasPropertyKey(vnode, key, ns)) {\n\t\t\tif (key === \"value\") {\n\t\t\t\t// Only do the coercion if we're actually going to check the value.\n\t\t\t\t/* eslint-disable no-implicit-coercion */\n\t\t\t\t//setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n\t\t\t\t//setting input[type=file][value] to same value causes an error to be generated if it's non-empty\n\t\t\t\tif ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === \"\" + value && (isFileInput || vnode.dom === activeElement())) return\n\t\t\t\t//setting select[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"select\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t//setting option[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"option\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t//setting input[type=file][value] to different value is an error if it's non-empty\n\t\t\t\t// Not ideal, but it at least works around the most common source of uncaught exceptions for now.\n\t\t\t\tif (isFileInput && \"\" + value !== \"\") { console.error(\"`value` is read-only on file inputs!\"); return }\n\t\t\t\t/* eslint-enable no-implicit-coercion */\n\t\t\t}\n\t\t\tvnode.dom[key] = value\n\t\t} else {\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\tif (value) vnode.dom.setAttribute(key, \"\")\n\t\t\t\telse vnode.dom.removeAttribute(key)\n\t\t\t}\n\t\t\telse vnode.dom.setAttribute(key === \"className\" ? \"class\" : key, value)\n\t\t}\n\t}\n\tfunction removeAttr(vnode, key, old, ns) {\n\t\tif (key === \"key\" || key === \"is\" || old == null || isLifecycleMethod(key)) return\n\t\tif (key[0] === \"o\" && key[1] === \"n\") updateEvent(vnode, key, undefined)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, null)\n\t\telse if (\n\t\t\thasPropertyKey(vnode, key, ns)\n\t\t\t&& key !== \"className\"\n\t\t\t&& key !== \"title\" // creates \"null\" as title\n\t\t\t&& !(key === \"value\" && (\n\t\t\t\tvnode.tag === \"option\"\n\t\t\t\t|| vnode.tag === \"select\" && vnode.dom.selectedIndex === -1 && vnode.dom === activeElement()\n\t\t\t))\n\t\t\t&& !(vnode.tag === \"input\" && key === \"type\")\n\t\t) {\n\t\t\tvnode.dom[key] = null\n\t\t} else {\n\t\t\tvar nsLastIndex = key.indexOf(\":\")\n\t\t\tif (nsLastIndex !== -1) key = key.slice(nsLastIndex + 1)\n\t\t\tif (old !== false) vnode.dom.removeAttribute(key === \"className\" ? \"class\" : key)\n\t\t}\n\t}\n\tfunction setLateSelectAttrs(vnode, attrs) {\n\t\tif (\"value\" in attrs) {\n\t\t\tif(attrs.value === null) {\n\t\t\t\tif (vnode.dom.selectedIndex !== -1) vnode.dom.value = null\n\t\t\t} else {\n\t\t\t\tvar normalized = \"\" + attrs.value // eslint-disable-line no-implicit-coercion\n\t\t\t\tif (vnode.dom.value !== normalized || vnode.dom.selectedIndex === -1) {\n\t\t\t\t\tvnode.dom.value = normalized\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (\"selectedIndex\" in attrs) setAttr(vnode, \"selectedIndex\", null, attrs.selectedIndex, undefined)\n\t}\n\tfunction updateAttrs(vnode, old, attrs, ns) {\n\t\tif (old && old === attrs) {\n\t\t\tconsole.warn(\"Don't reuse attrs object, use new object for every redraw, this will throw in next major\")\n\t\t}\n\t\tif (attrs != null) {\n\t\t\t// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n\t\t\t//\n\t\t\t// Also, the DOM does things to inputs based on the value, so it needs set first.\n\t\t\t// See: https://github.com/MithrilJS/mithril.js/issues/2622\n\t\t\tif (vnode.tag === \"input\" && attrs.type != null) vnode.dom.setAttribute(\"type\", attrs.type)\n\t\t\tvar isFileInput = vnode.tag === \"input\" && attrs.type === \"file\"\n\t\t\tfor (var key in attrs) {\n\t\t\t\tsetAttr(vnode, key, old && old[key], attrs[key], ns, isFileInput)\n\t\t\t}\n\t\t}\n\t\tvar val\n\t\tif (old != null) {\n\t\t\tfor (var key in old) {\n\t\t\t\tif (((val = old[key]) != null) && (attrs == null || attrs[key] == null)) {\n\t\t\t\t\tremoveAttr(vnode, key, val, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isFormAttribute(vnode, attr) {\n\t\treturn attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === activeElement() || vnode.tag === \"option\" && vnode.dom.parentNode === $doc.activeElement\n\t}\n\tfunction isLifecycleMethod(attr) {\n\t\treturn attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\"\n\t}\n\tfunction hasPropertyKey(vnode, key, ns) {\n\t\t// Filter out namespaced keys\n\t\treturn ns === undefined && (\n\t\t\t// If it's a custom element, just keep it.\n\t\t\tvnode.tag.indexOf(\"-\") > -1 || vnode.attrs != null && vnode.attrs.is ||\n\t\t\t// If it's a normal element, let's try to avoid a few browser bugs.\n\t\t\tkey !== \"href\" && key !== \"list\" && key !== \"form\" && key !== \"width\" && key !== \"height\"// && key !== \"type\"\n\t\t\t// Defer the property check until *after* we check everything.\n\t\t) && key in vnode.dom\n\t}\n\n\t//style\n\tvar uppercaseRegex = /[A-Z]/g\n\tfunction toLowerCase(capital) { return \"-\" + capital.toLowerCase() }\n\tfunction normalizeKey(key) {\n\t\treturn key[0] === \"-\" && key[1] === \"-\" ? key :\n\t\t\tkey === \"cssFloat\" ? \"float\" :\n\t\t\t\tkey.replace(uppercaseRegex, toLowerCase)\n\t}\n\tfunction updateStyle(element, old, style) {\n\t\tif (old === style) {\n\t\t\t// Styles are equivalent, do nothing.\n\t\t} else if (style == null) {\n\t\t\t// New style is missing, just clear it.\n\t\t\telement.style.cssText = \"\"\n\t\t} else if (typeof style !== \"object\") {\n\t\t\t// New style is a string, let engine deal with patching.\n\t\t\telement.style.cssText = style\n\t\t} else if (old == null || typeof old !== \"object\") {\n\t\t\t// `old` is missing or a string, `style` is an object.\n\t\t\telement.style.cssText = \"\"\n\t\t\t// Add new style properties\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null) element.style.setProperty(normalizeKey(key), String(value))\n\t\t\t}\n\t\t} else {\n\t\t\t// Both old & new are (different) objects.\n\t\t\t// Update style properties that have changed\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null && (value = String(value)) !== String(old[key])) {\n\t\t\t\t\telement.style.setProperty(normalizeKey(key), value)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove style properties that no longer exist\n\t\t\tfor (var key in old) {\n\t\t\t\tif (old[key] != null && style[key] == null) {\n\t\t\t\t\telement.style.removeProperty(normalizeKey(key))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Here's an explanation of how this works:\n\t// 1. The event names are always (by design) prefixed by `on`.\n\t// 2. The EventListener interface accepts either a function or an object\n\t// with a `handleEvent` method.\n\t// 3. The object does not inherit from `Object.prototype`, to avoid\n\t// any potential interference with that (e.g. setters).\n\t// 4. The event name is remapped to the handler before calling it.\n\t// 5. In function-based event handlers, `ev.target === this`. We replicate\n\t// that below.\n\t// 6. In function-based event handlers, `return false` prevents the default\n\t// action and stops event propagation. We replicate that below.\n\tfunction EventDict() {\n\t\t// Save this, so the current redraw is correctly tracked.\n\t\tthis._ = currentRedraw\n\t}\n\tEventDict.prototype = Object.create(null)\n\tEventDict.prototype.handleEvent = function (ev) {\n\t\tvar handler = this[\"on\" + ev.type]\n\t\tvar result\n\t\tif (typeof handler === \"function\") result = handler.call(ev.currentTarget, ev)\n\t\telse if (typeof handler.handleEvent === \"function\") handler.handleEvent(ev)\n\t\tif (this._ && ev.redraw !== false) (0, this._)()\n\t\tif (result === false) {\n\t\t\tev.preventDefault()\n\t\t\tev.stopPropagation()\n\t\t}\n\t}\n\n\t//event\n\tfunction updateEvent(vnode, key, value) {\n\t\tif (vnode.events != null) {\n\t\t\tvnode.events._ = currentRedraw\n\t\t\tif (vnode.events[key] === value) return\n\t\t\tif (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\t\tif (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = value\n\t\t\t} else {\n\t\t\t\tif (vnode.events[key] != null) vnode.dom.removeEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = undefined\n\t\t\t}\n\t\t} else if (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\tvnode.events = new EventDict()\n\t\t\tvnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\tvnode.events[key] = value\n\t\t}\n\t}\n\n\t//lifecycle\n\tfunction initLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.oninit === \"function\") callHook.call(source.oninit, vnode)\n\t\tif (typeof source.oncreate === \"function\") hooks.push(callHook.bind(source.oncreate, vnode))\n\t}\n\tfunction updateLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.onupdate === \"function\") hooks.push(callHook.bind(source.onupdate, vnode))\n\t}\n\tfunction shouldNotUpdate(vnode, old) {\n\t\tdo {\n\t\t\tif (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.attrs.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.state.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\treturn false\n\t\t} while (false); // eslint-disable-line no-constant-condition\n\t\tvnode.dom = old.dom\n\t\tvnode.domSize = old.domSize\n\t\tvnode.instance = old.instance\n\t\t// One would think having the actual latest attributes would be ideal,\n\t\t// but it doesn't let us properly diff based on our current internal\n\t\t// representation. We have to save not only the old DOM info, but also\n\t\t// the attributes used to create it, as we diff *that*, not against the\n\t\t// DOM directly (with a few exceptions in `setAttr`). And, of course, we\n\t\t// need to save the children and text as they are conceptually not\n\t\t// unlike special \"attributes\" internally.\n\t\tvnode.attrs = old.attrs\n\t\tvnode.children = old.children\n\t\tvnode.text = old.text\n\t\treturn true\n\t}\n\n\tvar currentDOM\n\n\treturn function(dom, vnodes, redraw) {\n\t\tif (!dom) throw new TypeError(\"DOM element being rendered to does not exist.\")\n\t\tif (currentDOM != null && dom.contains(currentDOM)) {\n\t\t\tthrow new TypeError(\"Node is currently being rendered to and thus is locked.\")\n\t\t}\n\t\tvar prevRedraw = currentRedraw\n\t\tvar prevDOM = currentDOM\n\t\tvar hooks = []\n\t\tvar active = activeElement()\n\t\tvar namespace = dom.namespaceURI\n\n\t\tcurrentDOM = dom\n\t\tcurrentRedraw = typeof redraw === \"function\" ? redraw : undefined\n\t\ttry {\n\t\t\t// First time rendering into a node clears it out\n\t\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\t\t\tvnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes])\n\t\t\tupdateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace)\n\t\t\tdom.vnodes = vnodes\n\t\t\t// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement\n\t\t\tif (active != null && activeElement() !== active && typeof active.focus === \"function\") active.focus()\n\t\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t\t} finally {\n\t\t\tcurrentRedraw = prevRedraw\n\t\t\tcurrentDOM = prevDOM\n\t\t}\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(render, schedule, console) {\n\tvar subscriptions = []\n\tvar pending = false\n\tvar offset = -1\n\n\tfunction sync() {\n\t\tfor (offset = 0; offset < subscriptions.length; offset += 2) {\n\t\t\ttry { render(subscriptions[offset], Vnode(subscriptions[offset + 1]), redraw) }\n\t\t\tcatch (e) { console.error(e) }\n\t\t}\n\t\toffset = -1\n\t}\n\n\tfunction redraw() {\n\t\tif (!pending) {\n\t\t\tpending = true\n\t\t\tschedule(function() {\n\t\t\t\tpending = false\n\t\t\t\tsync()\n\t\t\t})\n\t\t}\n\t}\n\n\tredraw.sync = sync\n\n\tfunction mount(root, component) {\n\t\tif (component != null && component.view == null && typeof component !== \"function\") {\n\t\t\tthrow new TypeError(\"m.mount expects a component, not a vnode.\")\n\t\t}\n\n\t\tvar index = subscriptions.indexOf(root)\n\t\tif (index >= 0) {\n\t\t\tsubscriptions.splice(index, 2)\n\t\t\tif (index <= offset) offset -= 2\n\t\t\trender(root, [])\n\t\t}\n\n\t\tif (component != null) {\n\t\t\tsubscriptions.push(root, component)\n\t\t\trender(root, Vnode(component), redraw)\n\t\t}\n\t}\n\n\treturn {mount: mount, redraw: redraw}\n}\n","\"use strict\"\n\nvar buildPathname = require(\"../pathname/build\")\nvar hasOwn = require(\"../util/hasOwn\")\n\nmodule.exports = function($window, Promise, oncompletion) {\n\tvar callbackCount = 0\n\n\tfunction PromiseProxy(executor) {\n\t\treturn new Promise(executor)\n\t}\n\n\t// In case the global Promise is some userland library's where they rely on\n\t// `foo instanceof this.constructor`, `this.constructor.resolve(value)`, or\n\t// similar. Let's *not* break them.\n\tPromiseProxy.prototype = Promise.prototype\n\tPromiseProxy.__proto__ = Promise // eslint-disable-line no-proto\n\n\tfunction makeRequest(factory) {\n\t\treturn function(url, args) {\n\t\t\tif (typeof url !== \"string\") { args = url; url = url.url }\n\t\t\telse if (args == null) args = {}\n\t\t\tvar promise = new Promise(function(resolve, reject) {\n\t\t\t\tfactory(buildPathname(url, args.params), args, function (data) {\n\t\t\t\t\tif (typeof args.type === \"function\") {\n\t\t\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tdata[i] = new args.type(data[i])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse data = new args.type(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(data)\n\t\t\t\t}, reject)\n\t\t\t})\n\t\t\tif (args.background === true) return promise\n\t\t\tvar count = 0\n\t\t\tfunction complete() {\n\t\t\t\tif (--count === 0 && typeof oncompletion === \"function\") oncompletion()\n\t\t\t}\n\n\t\t\treturn wrap(promise)\n\n\t\t\tfunction wrap(promise) {\n\t\t\t\tvar then = promise.then\n\t\t\t\t// Set the constructor, so engines know to not await or resolve\n\t\t\t\t// this as a native promise. At the time of writing, this is\n\t\t\t\t// only necessary for V8, but their behavior is the correct\n\t\t\t\t// behavior per spec. See this spec issue for more details:\n\t\t\t\t// https://github.com/tc39/ecma262/issues/1577. Also, see the\n\t\t\t\t// corresponding comment in `request/tests/test-request.js` for\n\t\t\t\t// a bit more background on the issue at hand.\n\t\t\t\tpromise.constructor = PromiseProxy\n\t\t\t\tpromise.then = function() {\n\t\t\t\t\tcount++\n\t\t\t\t\tvar next = then.apply(promise, arguments)\n\t\t\t\t\tnext.then(complete, function(e) {\n\t\t\t\t\t\tcomplete()\n\t\t\t\t\t\tif (count === 0) throw e\n\t\t\t\t\t})\n\t\t\t\t\treturn wrap(next)\n\t\t\t\t}\n\t\t\t\treturn promise\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction hasHeader(args, name) {\n\t\tfor (var key in args.headers) {\n\t\t\tif (hasOwn.call(args.headers, key) && key.toLowerCase() === name) return true\n\t\t}\n\t\treturn false\n\t}\n\n\treturn {\n\t\trequest: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar method = args.method != null ? args.method.toUpperCase() : \"GET\"\n\t\t\tvar body = args.body\n\t\t\tvar assumeJSON = (args.serialize == null || args.serialize === JSON.serialize) && !(body instanceof $window.FormData || body instanceof $window.URLSearchParams)\n\t\t\tvar responseType = args.responseType || (typeof args.extract === \"function\" ? \"\" : \"json\")\n\n\t\t\tvar xhr = new $window.XMLHttpRequest(), aborted = false, isTimeout = false\n\t\t\tvar original = xhr, replacedAbort\n\t\t\tvar abort = xhr.abort\n\n\t\t\txhr.abort = function() {\n\t\t\t\taborted = true\n\t\t\t\tabort.call(this)\n\t\t\t}\n\n\t\t\txhr.open(method, url, args.async !== false, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined)\n\n\t\t\tif (assumeJSON && body != null && !hasHeader(args, \"content-type\")) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (typeof args.deserialize !== \"function\" && !hasHeader(args, \"accept\")) {\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\n\t\t\t}\n\t\t\tif (args.withCredentials) xhr.withCredentials = args.withCredentials\n\t\t\tif (args.timeout) xhr.timeout = args.timeout\n\t\t\txhr.responseType = responseType\n\n\t\t\tfor (var key in args.headers) {\n\t\t\t\tif (hasOwn.call(args.headers, key)) {\n\t\t\t\t\txhr.setRequestHeader(key, args.headers[key])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txhr.onreadystatechange = function(ev) {\n\t\t\t\t// Don't throw errors on xhr.abort().\n\t\t\t\tif (aborted) return\n\n\t\t\t\tif (ev.target.readyState === 4) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar success = (ev.target.status >= 200 && ev.target.status < 300) || ev.target.status === 304 || (/^file:\\/\\//i).test(url)\n\t\t\t\t\t\t// When the response type isn't \"\" or \"text\",\n\t\t\t\t\t\t// `xhr.responseText` is the wrong thing to use.\n\t\t\t\t\t\t// Browsers do the right thing and throw here, and we\n\t\t\t\t\t\t// should honor that and do the right thing by\n\t\t\t\t\t\t// preferring `xhr.response` where possible/practical.\n\t\t\t\t\t\tvar response = ev.target.response, message\n\n\t\t\t\t\t\tif (responseType === \"json\") {\n\t\t\t\t\t\t\t// For IE and Edge, which don't implement\n\t\t\t\t\t\t\t// `responseType: \"json\"`.\n\t\t\t\t\t\t\tif (!ev.target.responseType && typeof args.extract !== \"function\") {\n\t\t\t\t\t\t\t\t// Handle no-content which will not parse.\n\t\t\t\t\t\t\t\ttry { response = JSON.parse(ev.target.responseText) }\n\t\t\t\t\t\t\t\tcatch (e) { response = null }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (!responseType || responseType === \"text\") {\n\t\t\t\t\t\t\t// Only use this default if it's text. If a parsed\n\t\t\t\t\t\t\t// document is needed on old IE and friends (all\n\t\t\t\t\t\t\t// unsupported), the user should use a custom\n\t\t\t\t\t\t\t// `config` instead. They're already using this at\n\t\t\t\t\t\t\t// their own risk.\n\t\t\t\t\t\t\tif (response == null) response = ev.target.responseText\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof args.extract === \"function\") {\n\t\t\t\t\t\t\tresponse = args.extract(ev.target, args)\n\t\t\t\t\t\t\tsuccess = true\n\t\t\t\t\t\t} else if (typeof args.deserialize === \"function\") {\n\t\t\t\t\t\t\tresponse = args.deserialize(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (success) resolve(response)\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar completeErrorResponse = function() {\n\t\t\t\t\t\t\t\ttry { message = ev.target.responseText }\n\t\t\t\t\t\t\t\tcatch (e) { message = response }\n\t\t\t\t\t\t\t\tvar error = new Error(message)\n\t\t\t\t\t\t\t\terror.code = ev.target.status\n\t\t\t\t\t\t\t\terror.response = response\n\t\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (xhr.status === 0) {\n\t\t\t\t\t\t\t\t// Use setTimeout to push this code block onto the event queue\n\t\t\t\t\t\t\t\t// This allows `xhr.ontimeout` to run in the case that there is a timeout\n\t\t\t\t\t\t\t\t// Without this setTimeout, `xhr.ontimeout` doesn't have a chance to reject\n\t\t\t\t\t\t\t\t// as `xhr.onreadystatechange` will run before it\n\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\tif (isTimeout) return\n\t\t\t\t\t\t\t\t\tcompleteErrorResponse()\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t} else completeErrorResponse()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\treject(e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txhr.ontimeout = function (ev) {\n\t\t\t\tisTimeout = true\n\t\t\t\tvar error = new Error(\"Request timed out\")\n\t\t\t\terror.code = ev.target.status\n\t\t\t\treject(error)\n\t\t\t}\n\n\t\t\tif (typeof args.config === \"function\") {\n\t\t\t\txhr = args.config(xhr, args, url) || xhr\n\n\t\t\t\t// Propagate the `abort` to any replacement XHR as well.\n\t\t\t\tif (xhr !== original) {\n\t\t\t\t\treplacedAbort = xhr.abort\n\t\t\t\t\txhr.abort = function() {\n\t\t\t\t\t\taborted = true\n\t\t\t\t\t\treplacedAbort.call(this)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (body == null) xhr.send()\n\t\t\telse if (typeof args.serialize === \"function\") xhr.send(args.serialize(body))\n\t\t\telse if (body instanceof $window.FormData || body instanceof $window.URLSearchParams) xhr.send(body)\n\t\t\telse xhr.send(JSON.stringify(body))\n\t\t}),\n\t\tjsonp: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++\n\t\t\tvar script = $window.document.createElement(\"script\")\n\t\t\t$window[callbackName] = function(data) {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\tresolve(data)\n\t\t\t}\n\t\t\tscript.onerror = function() {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\treject(new Error(\"JSONP request failed\"))\n\t\t\t}\n\t\t\tscript.src = url + (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") +\n\t\t\t\tencodeURIComponent(args.callbackKey || \"callback\") + \"=\" +\n\t\t\t\tencodeURIComponent(callbackName)\n\t\t\t$window.document.documentElement.appendChild(script)\n\t\t}),\n\t}\n}\n","\"use strict\"\n\nvar buildQueryString = require(\"../querystring/build\")\nvar assign = require(\"../util/assign\")\n\n// Returns `path` from `template` + `params`\nmodule.exports = function(template, params) {\n\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(template)) {\n\t\tthrow new SyntaxError(\"Template parameter names must be separated by either a '/', '-', or '.'.\")\n\t}\n\tif (params == null) return template\n\tvar queryIndex = template.indexOf(\"?\")\n\tvar hashIndex = template.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? template.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = template.slice(0, pathEnd)\n\tvar query = {}\n\n\tassign(query, params)\n\n\tvar resolved = path.replace(/:([^\\/\\.-]+)(\\.{3})?/g, function(m, key, variadic) {\n\t\tdelete query[key]\n\t\t// If no such parameter exists, don't interpolate it.\n\t\tif (params[key] == null) return m\n\t\t// Escape normal parameters, but not variadic ones.\n\t\treturn variadic ? params[key] : encodeURIComponent(String(params[key]))\n\t})\n\n\t// In case the template substitution adds new query/hash parameters.\n\tvar newQueryIndex = resolved.indexOf(\"?\")\n\tvar newHashIndex = resolved.indexOf(\"#\")\n\tvar newQueryEnd = newHashIndex < 0 ? resolved.length : newHashIndex\n\tvar newPathEnd = newQueryIndex < 0 ? newQueryEnd : newQueryIndex\n\tvar result = resolved.slice(0, newPathEnd)\n\n\tif (queryIndex >= 0) result += template.slice(queryIndex, queryEnd)\n\tif (newQueryIndex >= 0) result += (queryIndex < 0 ? \"?\" : \"&\") + resolved.slice(newQueryIndex, newQueryEnd)\n\tvar querystring = buildQueryString(query)\n\tif (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? \"?\" : \"&\") + querystring\n\tif (hashIndex >= 0) result += template.slice(hashIndex)\n\tif (newHashIndex >= 0) result += (hashIndex < 0 ? \"\" : \"&\") + resolved.slice(newHashIndex)\n\treturn result\n}\n","\"use strict\"\n\nmodule.exports = function(object) {\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\"\n\n\tvar args = []\n\tfor (var key in object) {\n\t\tdestructure(key, object[key])\n\t}\n\n\treturn args.join(\"&\")\n\n\tfunction destructure(key, value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse if (Object.prototype.toString.call(value) === \"[object Object]\") {\n\t\t\tfor (var i in value) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse args.push(encodeURIComponent(key) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"))\n\t}\n}\n","// This exists so I'm only saving it once.\n\"use strict\"\n\nvar hasOwn = require(\"./hasOwn\")\n\nmodule.exports = Object.assign || function(target, source) {\n\tfor (var key in source) {\n\t\tif (hasOwn.call(source, key)) target[key] = source[key]\n\t}\n}\n","// This exists so I'm only saving it once.\n\"use strict\"\n\nmodule.exports = {}.hasOwnProperty\n","\"use strict\"\n\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./api/router\")(typeof window !== \"undefined\" ? window : null, mountRedraw)\n","\"use strict\"\n\nvar render = require(\"./render\")\n\nmodule.exports = require(\"./api/mount-redraw\")(render, typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : null, typeof console !== \"undefined\" ? console : null)\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar m = require(\"../render/hyperscript\")\nvar Promise = require(\"../promise/promise\")\n\nvar buildPathname = require(\"../pathname/build\")\nvar parsePathname = require(\"../pathname/parse\")\nvar compileTemplate = require(\"../pathname/compileTemplate\")\nvar assign = require(\"../util/assign\")\nvar censor = require(\"../util/censor\")\n\nvar sentinel = {}\n\nfunction decodeURIComponentSave(component) {\n\ttry {\n\t\treturn decodeURIComponent(component)\n\t} catch(e) {\n\t\treturn component\n\t}\n}\n\nmodule.exports = function($window, mountRedraw) {\n\tvar callAsync = $window == null\n\t\t// In case Mithril.js' loaded globally without the DOM, let's not break\n\t\t? null\n\t\t: typeof $window.setImmediate === \"function\" ? $window.setImmediate : $window.setTimeout\n\tvar p = Promise.resolve()\n\n\tvar scheduled = false\n\n\t// state === 0: init\n\t// state === 1: scheduled\n\t// state === 2: done\n\tvar ready = false\n\tvar state = 0\n\n\tvar compiled, fallbackRoute\n\n\tvar currentResolver = sentinel, component, attrs, currentPath, lastUpdate\n\n\tvar RouterRoot = {\n\t\tonbeforeupdate: function() {\n\t\t\tstate = state ? 2 : 1\n\t\t\treturn !(!state || sentinel === currentResolver)\n\t\t},\n\t\tonremove: function() {\n\t\t\t$window.removeEventListener(\"popstate\", fireAsync, false)\n\t\t\t$window.removeEventListener(\"hashchange\", resolveRoute, false)\n\t\t},\n\t\tview: function() {\n\t\t\tif (!state || sentinel === currentResolver) return\n\t\t\t// Wrap in a fragment to preserve existing key semantics\n\t\t\tvar vnode = [Vnode(component, attrs.key, attrs)]\n\t\t\tif (currentResolver) vnode = currentResolver.render(vnode[0])\n\t\t\treturn vnode\n\t\t},\n\t}\n\n\tvar SKIP = route.SKIP = {}\n\n\tfunction resolveRoute() {\n\t\tscheduled = false\n\t\t// Consider the pathname holistically. The prefix might even be invalid,\n\t\t// but that's not our problem.\n\t\tvar prefix = $window.location.hash\n\t\tif (route.prefix[0] !== \"#\") {\n\t\t\tprefix = $window.location.search + prefix\n\t\t\tif (route.prefix[0] !== \"?\") {\n\t\t\t\tprefix = $window.location.pathname + prefix\n\t\t\t\tif (prefix[0] !== \"/\") prefix = \"/\" + prefix\n\t\t\t}\n\t\t}\n\t\t// This seemingly useless `.concat()` speeds up the tests quite a bit,\n\t\t// since the representation is consistently a relatively poorly\n\t\t// optimized cons string.\n\t\tvar path = prefix.concat()\n\t\t\t.replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponentSave)\n\t\t\t.slice(route.prefix.length)\n\t\tvar data = parsePathname(path)\n\n\t\tassign(data.params, $window.history.state)\n\n\t\tfunction reject(e) {\n\t\t\tconsole.error(e)\n\t\t\tsetPath(fallbackRoute, null, {replace: true})\n\t\t}\n\n\t\tloop(0)\n\t\tfunction loop(i) {\n\t\t\t// state === 0: init\n\t\t\t// state === 1: scheduled\n\t\t\t// state === 2: done\n\t\t\tfor (; i < compiled.length; i++) {\n\t\t\t\tif (compiled[i].check(data)) {\n\t\t\t\t\tvar payload = compiled[i].component\n\t\t\t\t\tvar matchedRoute = compiled[i].route\n\t\t\t\t\tvar localComp = payload\n\t\t\t\t\tvar update = lastUpdate = function(comp) {\n\t\t\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\t\t\tif (comp === SKIP) return loop(i + 1)\n\t\t\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\t\t\tattrs = data.params, currentPath = path, lastUpdate = null\n\t\t\t\t\t\tcurrentResolver = payload.render ? payload : null\n\t\t\t\t\t\tif (state === 2) mountRedraw.redraw()\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tstate = 2\n\t\t\t\t\t\t\tmountRedraw.redraw.sync()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// There's no understating how much I *wish* I could\n\t\t\t\t\t// use `async`/`await` here...\n\t\t\t\t\tif (payload.view || typeof payload === \"function\") {\n\t\t\t\t\t\tpayload = {}\n\t\t\t\t\t\tupdate(localComp)\n\t\t\t\t\t}\n\t\t\t\t\telse if (payload.onmatch) {\n\t\t\t\t\t\tp.then(function () {\n\t\t\t\t\t\t\treturn payload.onmatch(data.params, path, matchedRoute)\n\t\t\t\t\t\t}).then(update, path === fallbackRoute ? null : reject)\n\t\t\t\t\t}\n\t\t\t\t\telse update(\"div\")\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (path === fallbackRoute) {\n\t\t\t\tthrow new Error(\"Could not resolve default route \" + fallbackRoute + \".\")\n\t\t\t}\n\t\t\tsetPath(fallbackRoute, null, {replace: true})\n\t\t}\n\t}\n\n\t// Set it unconditionally so `m.route.set` and `m.route.Link` both work,\n\t// even if neither `pushState` nor `hashchange` are supported. It's\n\t// cleared if `hashchange` is used, since that makes it automatically\n\t// async.\n\tfunction fireAsync() {\n\t\tif (!scheduled) {\n\t\t\tscheduled = true\n\t\t\t// TODO: just do `mountRedraw.redraw()` here and elide the timer\n\t\t\t// dependency. Note that this will muck with tests a *lot*, so it's\n\t\t\t// not as easy of a change as it sounds.\n\t\t\tcallAsync(resolveRoute)\n\t\t}\n\t}\n\n\tfunction setPath(path, data, options) {\n\t\tpath = buildPathname(path, data)\n\t\tif (ready) {\n\t\t\tfireAsync()\n\t\t\tvar state = options ? options.state : null\n\t\t\tvar title = options ? options.title : null\n\t\t\tif (options && options.replace) $window.history.replaceState(state, title, route.prefix + path)\n\t\t\telse $window.history.pushState(state, title, route.prefix + path)\n\t\t}\n\t\telse {\n\t\t\t$window.location.href = route.prefix + path\n\t\t}\n\t}\n\n\tfunction route(root, defaultRoute, routes) {\n\t\tif (!root) throw new TypeError(\"DOM element being rendered to does not exist.\")\n\n\t\tcompiled = Object.keys(routes).map(function(route) {\n\t\t\tif (route[0] !== \"/\") throw new SyntaxError(\"Routes must start with a '/'.\")\n\t\t\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(route)) {\n\t\t\t\tthrow new SyntaxError(\"Route parameter names must be separated with either '/', '.', or '-'.\")\n\t\t\t}\n\t\t\treturn {\n\t\t\t\troute: route,\n\t\t\t\tcomponent: routes[route],\n\t\t\t\tcheck: compileTemplate(route),\n\t\t\t}\n\t\t})\n\t\tfallbackRoute = defaultRoute\n\t\tif (defaultRoute != null) {\n\t\t\tvar defaultData = parsePathname(defaultRoute)\n\n\t\t\tif (!compiled.some(function (i) { return i.check(defaultData) })) {\n\t\t\t\tthrow new ReferenceError(\"Default route doesn't match any known routes.\")\n\t\t\t}\n\t\t}\n\n\t\tif (typeof $window.history.pushState === \"function\") {\n\t\t\t$window.addEventListener(\"popstate\", fireAsync, false)\n\t\t} else if (route.prefix[0] === \"#\") {\n\t\t\t$window.addEventListener(\"hashchange\", resolveRoute, false)\n\t\t}\n\n\t\tready = true\n\t\tmountRedraw.mount(root, RouterRoot)\n\t\tresolveRoute()\n\t}\n\troute.set = function(path, data, options) {\n\t\tif (lastUpdate != null) {\n\t\t\toptions = options || {}\n\t\t\toptions.replace = true\n\t\t}\n\t\tlastUpdate = null\n\t\tsetPath(path, data, options)\n\t}\n\troute.get = function() {return currentPath}\n\troute.prefix = \"#!\"\n\troute.Link = {\n\t\tview: function(vnode) {\n\t\t\t// Omit the used parameters from the rendered element - they are\n\t\t\t// internal. Also, censor the various lifecycle methods.\n\t\t\t//\n\t\t\t// We don't strip the other parameters because for convenience we\n\t\t\t// let them be specified in the selector as well.\n\t\t\tvar child = m(\n\t\t\t\tvnode.attrs.selector || \"a\",\n\t\t\t\tcensor(vnode.attrs, [\"options\", \"params\", \"selector\", \"onclick\"]),\n\t\t\t\tvnode.children\n\t\t\t)\n\t\t\tvar options, onclick, href\n\n\t\t\t// Let's provide a *right* way to disable a route link, rather than\n\t\t\t// letting people screw up accessibility on accident.\n\t\t\t//\n\t\t\t// The attribute is coerced so users don't get surprised over\n\t\t\t// `disabled: 0` resulting in a button that's somehow routable\n\t\t\t// despite being visibly disabled.\n\t\t\tif (child.attrs.disabled = Boolean(child.attrs.disabled)) {\n\t\t\t\tchild.attrs.href = null\n\t\t\t\tchild.attrs[\"aria-disabled\"] = \"true\"\n\t\t\t\t// If you *really* do want add `onclick` on a disabled link, use\n\t\t\t\t// an `oncreate` hook to add it.\n\t\t\t} else {\n\t\t\t\toptions = vnode.attrs.options\n\t\t\t\tonclick = vnode.attrs.onclick\n\t\t\t\t// Easier to build it now to keep it isomorphic.\n\t\t\t\thref = buildPathname(child.attrs.href, vnode.attrs.params)\n\t\t\t\tchild.attrs.href = route.prefix + href\n\t\t\t\tchild.attrs.onclick = function(e) {\n\t\t\t\t\tvar result\n\t\t\t\t\tif (typeof onclick === \"function\") {\n\t\t\t\t\t\tresult = onclick.call(e.currentTarget, e)\n\t\t\t\t\t} else if (onclick == null || typeof onclick !== \"object\") {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t} else if (typeof onclick.handleEvent === \"function\") {\n\t\t\t\t\t\tonclick.handleEvent(e)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Adapted from React Router's implementation:\n\t\t\t\t\t// https://github.com/ReactTraining/react-router/blob/520a0acd48ae1b066eb0b07d6d4d1790a1d02482/packages/react-router-dom/modules/Link.js\n\t\t\t\t\t//\n\t\t\t\t\t// Try to be flexible and intuitive in how we handle links.\n\t\t\t\t\t// Fun fact: links aren't as obvious to get right as you\n\t\t\t\t\t// would expect. There's a lot more valid ways to click a\n\t\t\t\t\t// link than this, and one might want to not simply click a\n\t\t\t\t\t// link, but right click or command-click it to copy the\n\t\t\t\t\t// link target, etc. Nope, this isn't just for blind people.\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip if `onclick` prevented default\n\t\t\t\t\t\tresult !== false && !e.defaultPrevented &&\n\t\t\t\t\t\t// Ignore everything but left clicks\n\t\t\t\t\t\t(e.button === 0 || e.which === 0 || e.which === 1) &&\n\t\t\t\t\t\t// Let the browser handle `target=_blank`, etc.\n\t\t\t\t\t\t(!e.currentTarget.target || e.currentTarget.target === \"_self\") &&\n\t\t\t\t\t\t// No modifier keys\n\t\t\t\t\t\t!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey\n\t\t\t\t\t) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\te.redraw = false\n\t\t\t\t\t\troute.set(href, null, options)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn child\n\t\t},\n\t}\n\troute.param = function(key) {\n\t\treturn attrs && key != null ? attrs[key] : attrs\n\t}\n\n\treturn route\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\nvar hasOwn = require(\"../util/hasOwn\")\n\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\n\nfunction isEmpty(object) {\n\tfor (var key in object) if (hasOwn.call(object, key)) return false\n\treturn true\n}\n\nfunction compileSelector(selector) {\n\tvar match, tag = \"div\", classes = [], attrs = {}\n\twhile (match = selectorParser.exec(selector)) {\n\t\tvar type = match[1], value = match[2]\n\t\tif (type === \"\" && value !== \"\") tag = value\n\t\telse if (type === \"#\") attrs.id = value\n\t\telse if (type === \".\") classes.push(value)\n\t\telse if (match[3][0] === \"[\") {\n\t\t\tvar attrValue = match[6]\n\t\t\tif (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\")\n\t\t\tif (match[4] === \"class\") classes.push(attrValue)\n\t\t\telse attrs[match[4]] = attrValue === \"\" ? attrValue : attrValue || true\n\t\t}\n\t}\n\tif (classes.length > 0) attrs.className = classes.join(\" \")\n\treturn selectorCache[selector] = {tag: tag, attrs: attrs}\n}\n\nfunction execSelector(state, vnode) {\n\tvar attrs = vnode.attrs\n\tvar hasClass = hasOwn.call(attrs, \"class\")\n\tvar className = hasClass ? attrs.class : attrs.className\n\n\tvnode.tag = state.tag\n\tvnode.attrs = {}\n\n\tif (!isEmpty(state.attrs) && !isEmpty(attrs)) {\n\t\tvar newAttrs = {}\n\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key)) newAttrs[key] = attrs[key]\n\t\t}\n\n\t\tattrs = newAttrs\n\t}\n\n\tfor (var key in state.attrs) {\n\t\tif (hasOwn.call(state.attrs, key) && key !== \"className\" && !hasOwn.call(attrs, key)){\n\t\t\tattrs[key] = state.attrs[key]\n\t\t}\n\t}\n\tif (className != null || state.attrs.className != null) attrs.className =\n\t\tclassName != null\n\t\t\t? state.attrs.className != null\n\t\t\t\t? String(state.attrs.className) + \" \" + String(className)\n\t\t\t\t: className\n\t\t\t: state.attrs.className != null\n\t\t\t\t? state.attrs.className\n\t\t\t\t: null\n\n\tif (hasClass) attrs.class = null\n\n\tfor (var key in attrs) {\n\t\tif (hasOwn.call(attrs, key) && key !== \"key\") {\n\t\t\tvnode.attrs = attrs\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn vnode\n}\n\nfunction hyperscript(selector) {\n\tif (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") {\n\t\tthrow Error(\"The selector must be either a string or a component.\");\n\t}\n\n\tvar vnode = hyperscriptVnode.apply(1, arguments)\n\n\tif (typeof selector === \"string\") {\n\t\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\t\tif (selector !== \"[\") return execSelector(selectorCache[selector] || compileSelector(selector), vnode)\n\t}\n\n\tvnode.tag = selector\n\treturn vnode\n}\n\nmodule.exports = hyperscript\n","/* global window */\n\"use strict\"\n\nvar PromisePolyfill = require(\"./polyfill\")\n\nif (typeof window !== \"undefined\") {\n\tif (typeof window.Promise === \"undefined\") {\n\t\twindow.Promise = PromisePolyfill\n\t} else if (!window.Promise.prototype.finally) {\n\t\twindow.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = window.Promise\n} else if (typeof global !== \"undefined\") {\n\tif (typeof global.Promise === \"undefined\") {\n\t\tglobal.Promise = PromisePolyfill\n\t} else if (!global.Promise.prototype.finally) {\n\t\tglobal.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = global.Promise\n} else {\n\tmodule.exports = PromisePolyfill\n}\n","\"use strict\"\n\nvar parseQueryString = require(\"../querystring/parse\")\n\n// Returns `{path, params}` from `url`\nmodule.exports = function(url) {\n\tvar queryIndex = url.indexOf(\"?\")\n\tvar hashIndex = url.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? url.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = url.slice(0, pathEnd).replace(/\\/{2,}/g, \"/\")\n\n\tif (!path) path = \"/\"\n\telse {\n\t\tif (path[0] !== \"/\") path = \"/\" + path\n\t\tif (path.length > 1 && path[path.length - 1] === \"/\") path = path.slice(0, -1)\n\t}\n\treturn {\n\t\tpath: path,\n\t\tparams: queryIndex < 0\n\t\t\t? {}\n\t\t\t: parseQueryString(url.slice(queryIndex + 1, queryEnd)),\n\t}\n}\n","\"use strict\"\n\nfunction decodeURIComponentSave(str) {\n\ttry {\n\t\treturn decodeURIComponent(str)\n\t} catch(err) {\n\t\treturn str\n\t}\n}\n\nmodule.exports = function(string) {\n\tif (string === \"\" || string == null) return {}\n\tif (string.charAt(0) === \"?\") string = string.slice(1)\n\n\tvar entries = string.split(\"&\"), counters = {}, data = {}\n\tfor (var i = 0; i < entries.length; i++) {\n\t\tvar entry = entries[i].split(\"=\")\n\t\tvar key = decodeURIComponentSave(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponentSave(entry[1]) : \"\"\n\n\t\tif (value === \"true\") value = true\n\t\telse if (value === \"false\") value = false\n\n\t\tvar levels = key.split(/\\]\\[?|\\[/)\n\t\tvar cursor = data\n\t\tif (key.indexOf(\"[\") > -1) levels.pop()\n\t\tfor (var j = 0; j < levels.length; j++) {\n\t\t\tvar level = levels[j], nextLevel = levels[j + 1]\n\t\t\tvar isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10))\n\t\t\tif (level === \"\") {\n\t\t\t\tvar key = levels.slice(0, j).join()\n\t\t\t\tif (counters[key] == null) {\n\t\t\t\t\tcounters[key] = Array.isArray(cursor) ? cursor.length : 0\n\t\t\t\t}\n\t\t\t\tlevel = counters[key]++\n\t\t\t}\n\t\t\t// Disallow direct prototype pollution\n\t\t\telse if (level === \"__proto__\") break\n\t\t\tif (j === levels.length - 1) cursor[level] = value\n\t\t\telse {\n\t\t\t\t// Read own properties exclusively to disallow indirect\n\t\t\t\t// prototype pollution\n\t\t\t\tvar desc = Object.getOwnPropertyDescriptor(cursor, level)\n\t\t\t\tif (desc != null) desc = desc.value\n\t\t\t\tif (desc == null) cursor[level] = desc = isNumber ? [] : {}\n\t\t\t\tcursor = desc\n\t\t\t}\n\t\t}\n\t}\n\treturn data\n}\n","\"use strict\"\n\nvar parsePathname = require(\"./parse\")\n\n// Compiles a template into a function that takes a resolved path (without query\n// strings) and returns an object containing the template parameters with their\n// parsed values. This expects the input of the compiled template to be the\n// output of `parsePathname`. Note that it does *not* remove query parameters\n// specified in the template.\nmodule.exports = function(template) {\n\tvar templateData = parsePathname(template)\n\tvar templateKeys = Object.keys(templateData.params)\n\tvar keys = []\n\tvar regexp = new RegExp(\"^\" + templateData.path.replace(\n\t\t// I escape literal text so people can use things like `:file.:ext` or\n\t\t// `:lang-:locale` in routes. This is all merged into one pass so I\n\t\t// don't also accidentally escape `-` and make it harder to detect it to\n\t\t// ban it from template parameters.\n\t\t/:([^\\/.-]+)(\\.{3}|\\.(?!\\.)|-)?|[\\\\^$*+.()|\\[\\]{}]/g,\n\t\tfunction(m, key, extra) {\n\t\t\tif (key == null) return \"\\\\\" + m\n\t\t\tkeys.push({k: key, r: extra === \"...\"})\n\t\t\tif (extra === \"...\") return \"(.*)\"\n\t\t\tif (extra === \".\") return \"([^/]+)\\\\.\"\n\t\t\treturn \"([^/]+)\" + (extra || \"\")\n\t\t}\n\t) + \"$\")\n\treturn function(data) {\n\t\t// First, check the params. Usually, there isn't any, and it's just\n\t\t// checking a static set.\n\t\tfor (var i = 0; i < templateKeys.length; i++) {\n\t\t\tif (templateData.params[templateKeys[i]] !== data.params[templateKeys[i]]) return false\n\t\t}\n\t\t// If no interpolations exist, let's skip all the ceremony\n\t\tif (!keys.length) return regexp.test(data.path)\n\t\tvar values = regexp.exec(data.path)\n\t\tif (values == null) return false\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tdata.params[keys[i].k] = keys[i].r ? values[i + 1] : decodeURIComponent(values[i + 1])\n\t\t}\n\t\treturn true\n\t}\n}\n","\"use strict\"\n\n// Note: this is mildly perf-sensitive.\n//\n// It does *not* use `delete` - dynamic `delete`s usually cause objects to bail\n// out into dictionary mode and just generally cause a bunch of optimization\n// issues within engines.\n//\n// Ideally, I would've preferred to do this, if it weren't for the optimization\n// issues:\n//\n// ```js\n// const hasOwn = require(\"./hasOwn\")\n// const magic = [\n// \"key\", \"oninit\", \"oncreate\", \"onbeforeupdate\", \"onupdate\",\n// \"onbeforeremove\", \"onremove\",\n// ]\n// module.exports = (attrs, extras) => {\n// const result = Object.assign(Object.create(null), attrs)\n// for (const key of magic) delete result[key]\n// if (extras != null) for (const key of extras) delete result[key]\n// return result\n// }\n// ```\n\nvar hasOwn = require(\"./hasOwn\")\n// Words in RegExp literals are sometimes mangled incorrectly by the internal bundler, so use RegExp().\nvar magic = new RegExp(\"^(?:key|oninit|oncreate|onbeforeupdate|onupdate|onbeforeremove|onremove)$\")\n\nmodule.exports = function(attrs, extras) {\n\tvar result = {}\n\n\tif (extras != null) {\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key) && !magic.test(key) && extras.indexOf(key) < 0) {\n\t\t\t\tresult[key] = attrs[key]\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key) && !magic.test(key)) {\n\t\t\t\tresult[key] = attrs[key]\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result\n}\n","/* eslint-disable */\n;(function() {\n\"use strict\"\n/* eslint-enable */\nStream.SKIP = {}\nStream.lift = lift\nStream.scan = scan\nStream.merge = merge\nStream.combine = combine\nStream.scanMerge = scanMerge\nStream[\"fantasy-land/of\"] = Stream\n\nvar warnedHalt = false\nObject.defineProperty(Stream, \"HALT\", {\n\tget: function() {\n\t\twarnedHalt || console.log(\"HALT is deprecated and has been renamed to SKIP\");\n\t\twarnedHalt = true\n\t\treturn Stream.SKIP\n\t}\n})\n\nfunction Stream(value) {\n\tvar dependentStreams = []\n\tvar dependentFns = []\n\n\tfunction stream(v) {\n\t\tif (arguments.length && v !== Stream.SKIP) {\n\t\t\tvalue = v\n\t\t\tif (open(stream)) {\n\t\t\t\tstream._changing()\n\t\t\t\tstream._state = \"active\"\n\t\t\t\t// Cloning the list to ensure it's still iterated in intended\n\t\t\t\t// order\n\t\t\t\tdependentStreams.slice().forEach(function(s, i) {\n\t\t\t\t\tif (open(s)) s(this[i](value))\n\t\t\t\t}, dependentFns.slice())\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\tstream.constructor = Stream\n\tstream._state = arguments.length && value !== Stream.SKIP ? \"active\" : \"pending\"\n\tstream._parents = []\n\n\tstream._changing = function() {\n\t\tif (open(stream)) stream._state = \"changing\"\n\t\tdependentStreams.forEach(function(s) {\n\t\t\ts._changing()\n\t\t})\n\t}\n\n\tstream._map = function(fn, ignoreInitial) {\n\t\tvar target = ignoreInitial ? Stream() : Stream(fn(value))\n\t\ttarget._parents.push(stream)\n\t\tdependentStreams.push(target)\n\t\tdependentFns.push(fn)\n\t\treturn target\n\t}\n\n\tstream.map = function(fn) {\n\t\treturn stream._map(fn, stream._state !== \"active\")\n\t}\n\n\tvar end\n\tfunction createEnd() {\n\t\tend = Stream()\n\t\tend.map(function(value) {\n\t\t\tif (value === true) {\n\t\t\t\tstream._parents.forEach(function (p) {p._unregisterChild(stream)})\n\t\t\t\tstream._state = \"ended\"\n\t\t\t\tstream._parents.length = dependentStreams.length = dependentFns.length = 0\n\t\t\t}\n\t\t\treturn value\n\t\t})\n\t\treturn end\n\t}\n\n\tstream.toJSON = function() { return value != null && typeof value.toJSON === \"function\" ? value.toJSON() : value }\n\n\tstream[\"fantasy-land/map\"] = stream.map\n\tstream[\"fantasy-land/ap\"] = function(x) { return combine(function(s1, s2) { return s1()(s2()) }, [x, stream]) }\n\n\tstream._unregisterChild = function(child) {\n\t\tvar childIndex = dependentStreams.indexOf(child)\n\t\tif (childIndex !== -1) {\n\t\t\tdependentStreams.splice(childIndex, 1)\n\t\t\tdependentFns.splice(childIndex, 1)\n\t\t}\n\t}\n\n\tObject.defineProperty(stream, \"end\", {\n\t\tget: function() { return end || createEnd() }\n\t})\n\n\treturn stream\n}\n\nfunction combine(fn, streams) {\n\tvar ready = streams.every(function(s) {\n\t\tif (s.constructor !== Stream)\n\t\t\tthrow new Error(\"Ensure that each item passed to stream.combine/stream.merge/lift is a stream.\")\n\t\treturn s._state === \"active\"\n\t})\n\tvar stream = ready\n\t\t? Stream(fn.apply(null, streams.concat([streams])))\n\t\t: Stream()\n\n\tvar changed = []\n\n\tvar mappers = streams.map(function(s) {\n\t\treturn s._map(function(value) {\n\t\t\tchanged.push(s)\n\t\t\tif (ready || streams.every(function(s) { return s._state !== \"pending\" })) {\n\t\t\t\tready = true\n\t\t\t\tstream(fn.apply(null, streams.concat([changed])))\n\t\t\t\tchanged = []\n\t\t\t}\n\t\t\treturn value\n\t\t}, true)\n\t})\n\n\tvar endStream = stream.end.map(function(value) {\n\t\tif (value === true) {\n\t\t\tmappers.forEach(function(mapper) { mapper.end(true) })\n\t\t\tendStream.end(true)\n\t\t}\n\t\treturn undefined\n\t})\n\n\treturn stream\n}\n\nfunction merge(streams) {\n\treturn combine(function() { return streams.map(function(s) { return s() }) }, streams)\n}\n\nfunction scan(fn, acc, origin) {\n\tvar stream = origin.map(function(v) {\n\t\tvar next = fn(acc, v)\n\t\tif (next !== Stream.SKIP) acc = next\n\t\treturn next\n\t})\n\tstream(acc)\n\treturn stream\n}\n\nfunction scanMerge(tuples, seed) {\n\tvar streams = tuples.map(function(tuple) { return tuple[0] })\n\n\tvar stream = combine(function() {\n\t\tvar changed = arguments[arguments.length - 1]\n\t\tstreams.forEach(function(stream, i) {\n\t\t\tif (changed.indexOf(stream) > -1)\n\t\t\t\tseed = tuples[i][1](seed, stream())\n\t\t})\n\n\t\treturn seed\n\t}, streams)\n\n\tstream(seed)\n\n\treturn stream\n}\n\nfunction lift() {\n\tvar fn = arguments[0]\n\tvar streams = Array.prototype.slice.call(arguments, 1)\n\treturn merge(streams).map(function(streams) {\n\t\treturn fn.apply(undefined, streams)\n\t})\n}\n\nfunction open(s) {\n\treturn s._state === \"pending\" || s._state === \"active\" || s._state === \"changing\"\n}\n\nif (typeof module !== \"undefined\") module[\"exports\"] = Stream\nelse if (typeof window.m === \"function\" && !(\"stream\" in window.m)) window.m.stream = Stream\nelse window.m = {stream : Stream}\n\n}());\n","/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */\n\n!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).interact=e()}(this,(function(){\"use strict\";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:function(t){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},w.string(t)&&-1!==t.search(\" \")&&(t=J(t)),w.array(t))return t.forEach((function(t){return $(t,e,n,r)})),r;if(w.object(t)&&(e=t,t=\"\"),w.func(e)&&n(t))r[t]=r[t]||[],r[t].push(e);else if(w.array(e))for(var i=0,o=e;i1?lt(e):e[0];ot(r,t.page),function(t,e){e=e||{},I.isOperaMobile&&rt(t)?it(\"screen\",t,e):it(\"client\",t,e)}(r,t.client),t.timeStamp=n}function ct(t){var e=[];return w.array(t)?(e[0]=t[0],e[1]=t[1]):\"touchend\"===t.type?1===t.touches.length?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):0===t.touches.length&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function lt(t){for(var e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},n=0;n=(parseInt(y(r).getComputedStyle(r).zIndex,10)||0)&&(e=o);else e=o}else e=o}return e}(a);return r.activeDrops[h]||null}function St(t,e,n){var r=t.dropState,i={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return\"dragstart\"===n.type&&(i.activate=new xt(r,n,\"dropactivate\"),i.activate.target=null,i.activate.dropzone=null),\"dragend\"===n.type&&(i.deactivate=new xt(r,n,\"dropdeactivate\"),i.deactivate.target=null,i.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(i.leave=new xt(r,n,\"dragleave\"),n.dragLeave=i.leave.target=r.prev.element,n.prevDropzone=i.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(i.enter=new xt(r,n,\"dragenter\"),n.dragEnter=r.cur.element,n.dropzone=r.cur.dropzone)),\"dragend\"===n.type&&r.cur.dropzone&&(i.drop=new xt(r,n,\"drop\"),n.dropzone=r.cur.dropzone,n.relatedTarget=r.cur.element),\"dragmove\"===n.type&&r.cur.dropzone&&(i.move=new xt(r,n,\"dropmove\"),n.dropzone=r.cur.dropzone)),i}function _t(t,e){var n=t.dropState,r=n.activeDrops,i=n.cur,o=n.prev;e.leave&&o.dropzone.fire(e.leave),e.enter&&i.dropzone.fire(e.enter),e.move&&i.dropzone.fire(e.move),e.drop&&i.dropzone.fire(e.drop),e.deactivate&&wt(r,e.deactivate),n.prev.dropzone=i.dropzone,n.prev.element=i.element}function Pt(t,e){var n=t.interaction,r=t.iEvent,i=t.event;if(\"dragmove\"===r.type||\"dragend\"===r.type){var o=n.dropState;e.dynamicDrop&&(o.activeDrops=Et(e,n.element));var a=r,s=Tt(n,a,i);o.rejected=o.rejected&&!!s&&s.dropzone===o.cur.dropzone&&s.element===o.cur.element,o.cur.dropzone=s&&s.dropzone,o.cur.element=s&&s.element,o.events=St(n,0,a)}}var Ot={id:\"actions/drop\",install:function(t){var e=t.actions,n=t.interactStatic,r=t.Interactable,i=t.defaults;t.usePlugin(_),r.prototype.dropzone=function(t){return function(t,e){if(w.object(e)){if(t.options.drop.enabled=!1!==e.enabled,e.listeners){var n=$(e.listeners),r=Object.keys(n).reduce((function(t,e){return t[/^(enter|leave)/.test(e)?\"drag\".concat(e):/^(activate|deactivate|move)/.test(e)?\"drop\".concat(e):e]=n[e],t}),{}),i=t.options.drop.listeners;i&&t.off(i),t.on(r),t.options.drop.listeners=r}return w.func(e.ondrop)&&t.on(\"drop\",e.ondrop),w.func(e.ondropactivate)&&t.on(\"dropactivate\",e.ondropactivate),w.func(e.ondropdeactivate)&&t.on(\"dropdeactivate\",e.ondropdeactivate),w.func(e.ondragenter)&&t.on(\"dragenter\",e.ondragenter),w.func(e.ondragleave)&&t.on(\"dragleave\",e.ondragleave),w.func(e.ondropmove)&&t.on(\"dropmove\",e.ondropmove),/^(pointer|center)$/.test(e.overlap)?t.options.drop.overlap=e.overlap:w.number(e.overlap)&&(t.options.drop.overlap=Math.max(Math.min(1,e.overlap),0)),\"accept\"in e&&(t.options.drop.accept=e.accept),\"checker\"in e&&(t.options.drop.checker=e.checker),t}if(w.bool(e))return t.options.drop.enabled=e,t;return t.options.drop}(this,t)},r.prototype.dropCheck=function(t,e,n,r,i,o){return function(t,e,n,r,i,o,a){var s=!1;if(!(a=a||t.getRect(o)))return!!t.options.drop.checker&&t.options.drop.checker(e,n,s,t,o,r,i);var c=t.options.drop.overlap;if(\"pointer\"===c){var l=K(r,i,\"drag\"),u=ot(e);u.x+=l.x,u.y+=l.y;var p=u.x>a.left&&u.xa.top&&u.y=a.left&&h<=a.right&&v>=a.top&&v<=a.bottom}if(d&&w.number(c)){s=Math.max(0,Math.min(a.right,d.right)-Math.max(a.left,d.left))*Math.max(0,Math.min(a.bottom,d.bottom)-Math.max(a.top,d.top))/(d.width*d.height)>=c}t.options.drop.checker&&(s=t.options.drop.checker(e,n,s,t,o,r,i));return s}(this,t,e,n,r,i,o)},n.dynamicDrop=function(e){return w.bool(e)?(t.dynamicDrop=e,n):t.dynamicDrop},V(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop=\"dropzone\",t.dynamicDrop=!1,i.actions.drop=Ot.defaults},listeners:{\"interactions:before-action-start\":function(t){var e=t.interaction;\"drag\"===e.prepared.name&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},\"interactions:after-action-start\":function(t,e){var n=t.interaction,r=(t.event,t.iEvent);if(\"drag\"===n.prepared.name){var i=n.dropState;i.activeDrops=[],i.events={},i.activeDrops=Et(e,n.element),i.events=St(n,0,r),i.events.activate&&(wt(i.activeDrops,i.events.activate),e.fire(\"actions/drop:start\",{interaction:n,dragEvent:r}))}},\"interactions:action-move\":Pt,\"interactions:after-action-move\":function(t,e){var n=t.interaction,r=t.iEvent;if(\"drag\"===n.prepared.name){var i=n.dropState;_t(n,i.events),e.fire(\"actions/drop:move\",{interaction:n,dragEvent:r}),i.events={}}},\"interactions:action-end\":function(t,e){if(\"drag\"===t.interaction.prepared.name){var n=t.interaction,r=t.iEvent;Pt(t,e),_t(n,n.dropState.events),e.fire(\"actions/drop:end\",{interaction:n,dragEvent:r})}},\"interactions:stop\":function(t){var e=t.interaction;if(\"drag\"===e.prepared.name){var n=e.dropState;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}}},getActiveDrops:Et,getDrop:Tt,getDropEvents:St,fireDropEvents:_t,filterEventType:function(t){return 0===t.search(\"drag\")||0===t.search(\"drop\")},defaults:{enabled:!1,accept:null,overlap:\"pointer\"}},kt=Ot;function Dt(t){var e=t.interaction,n=t.iEvent,r=t.phase;if(\"gesture\"===e.prepared.name){var i=e.pointers.map((function(t){return t.pointer})),o=\"start\"===r,a=\"end\"===r,s=e.interactable.options.deltaSource;if(n.touches=[i[0],i[1]],o)n.distance=pt(i,s),n.box=ut(i),n.scale=1,n.ds=0,n.angle=ft(i,s),n.da=0,e.gesture.startDistance=n.distance,e.gesture.startAngle=n.angle;else if(a||e.pointers.length<2){var c=e.prevEvent;n.distance=c.distance,n.box=c.box,n.scale=c.scale,n.ds=0,n.angle=c.angle,n.da=0}else n.distance=pt(i,s),n.box=ut(i),n.scale=n.distance/e.gesture.startDistance,n.angle=ft(i,s),n.ds=n.scale-e.gesture.scale,n.da=n.angle-e.gesture.angle;e.gesture.distance=n.distance,e.gesture.angle=n.angle,w.number(n.scale)&&n.scale!==1/0&&!isNaN(n.scale)&&(e.gesture.scale=n.scale)}}var It={id:\"actions/gesture\",before:[\"actions/drag\",\"actions/resize\"],install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.gesturable=function(t){return w.object(t)?(this.options.gesture.enabled=!1!==t.enabled,this.setPerAction(\"gesture\",t),this.setOnEvents(\"gesture\",t),this):w.bool(t)?(this.options.gesture.enabled=t,this):this.options.gesture},e.map.gesture=It,e.methodDict.gesture=\"gesturable\",r.actions.gesture=It.defaults},listeners:{\"interactions:action-start\":Dt,\"interactions:action-move\":Dt,\"interactions:action-end\":Dt,\"interactions:new\":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},\"auto-start:check\":function(t){if(!(t.interaction.pointers.length<2)){var e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:\"gesture\"},!1}}},defaults:{},getCursor:function(){return\"\"},filterEventType:function(t){return 0===t.search(\"gesture\")}},Mt=It;function zt(t,e,n,r,i,o,a){if(!e)return!1;if(!0===e){var s=w.number(o.width)?o.width:o.right-o.left,c=w.number(o.height)?o.height:o.bottom-o.top;if(a=Math.min(a,Math.abs((\"left\"===t||\"right\"===t?s:c)/2)),s<0&&(\"left\"===t?t=\"right\":\"right\"===t&&(t=\"left\")),c<0&&(\"top\"===t?t=\"bottom\":\"bottom\"===t&&(t=\"top\")),\"left\"===t){var l=s>=0?o.left:o.right;return n.x=0?o.top:o.bottom;return n.y(s>=0?o.right:o.left)-a;if(\"bottom\"===t)return n.y>(c>=0?o.bottom:o.top)-a}return!!w.element(r)&&(w.element(e)?e===r:F(r,e,i))}function At(t){var e=t.iEvent,n=t.interaction;if(\"resize\"===n.prepared.name&&n.resizeAxes){var r=e;n.interactable.options.resize.square?(\"y\"===n.resizeAxes?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes=\"xy\"):(r.axes=n.resizeAxes,\"x\"===n.resizeAxes?r.delta.y=0:\"y\"===n.resizeAxes&&(r.delta.x=0))}}var Rt,Ct,jt={id:\"actions/resize\",before:[\"actions/drag\"],install:function(t){var e=t.actions,n=t.browser,r=t.Interactable,i=t.defaults;jt.cursors=function(t){return t.isIe9?{x:\"e-resize\",y:\"s-resize\",xy:\"se-resize\",top:\"n-resize\",left:\"w-resize\",bottom:\"s-resize\",right:\"e-resize\",topleft:\"se-resize\",bottomright:\"se-resize\",topright:\"ne-resize\",bottomleft:\"ne-resize\"}:{x:\"ew-resize\",y:\"ns-resize\",xy:\"nwse-resize\",top:\"ns-resize\",left:\"ew-resize\",bottom:\"ns-resize\",right:\"ew-resize\",topleft:\"nwse-resize\",bottomright:\"nwse-resize\",topright:\"nesw-resize\",bottomleft:\"nesw-resize\"}}(n),jt.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,r.prototype.resizable=function(e){return function(t,e,n){if(w.object(e))return t.options.resize.enabled=!1!==e.enabled,t.setPerAction(\"resize\",e),t.setOnEvents(\"resize\",e),w.string(e.axis)&&/^x$|^y$|^xy$/.test(e.axis)?t.options.resize.axis=e.axis:null===e.axis&&(t.options.resize.axis=n.defaults.actions.resize.axis),w.bool(e.preserveAspectRatio)?t.options.resize.preserveAspectRatio=e.preserveAspectRatio:w.bool(e.square)&&(t.options.resize.square=e.square),t;if(w.bool(e))return t.options.resize.enabled=e,t;return t.options.resize}(this,e,t)},e.map.resize=jt,e.methodDict.resize=\"resizable\",i.actions.resize=jt.defaults},listeners:{\"interactions:new\":function(t){t.interaction.resizeAxes=\"xy\"},\"interactions:action-start\":function(t){!function(t){var e=t.iEvent,n=t.interaction;if(\"resize\"===n.prepared.name&&n.prepared.edges){var r=e,i=n.rect;n._rects={start:V({},i),corrected:V({},i),previous:V({},i),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}}(t),At(t)},\"interactions:action-move\":function(t){!function(t){var e=t.iEvent,n=t.interaction;if(\"resize\"===n.prepared.name&&n.prepared.edges){var r=e,i=n.interactable.options.resize.invert,o=\"reposition\"===i||\"negate\"===i,a=n.rect,s=n._rects,c=s.start,l=s.corrected,u=s.delta,p=s.previous;if(V(p,l),o){if(V(l,a),\"reposition\"===i){if(l.top>l.bottom){var f=l.top;l.top=l.bottom,l.bottom=f}if(l.left>l.right){var d=l.left;l.left=l.right,l.right=d}}}else l.top=Math.min(a.top,c.bottom),l.bottom=Math.max(a.bottom,c.top),l.left=Math.min(a.left,c.right),l.right=Math.max(a.right,c.left);for(var h in l.width=l.right-l.left,l.height=l.bottom-l.top,l)u[h]=l[h]-p[h];r.edges=n.prepared.edges,r.rect=l,r.deltaRect=u}}(t),At(t)},\"interactions:action-end\":function(t){var e=t.iEvent,n=t.interaction;if(\"resize\"===n.prepared.name&&n.prepared.edges){var r=e;r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}},\"auto-start:check\":function(t){var e=t.interaction,n=t.interactable,r=t.element,i=t.rect,o=t.buttons;if(i){var a=V({},e.coords.cur.page),s=n.options.resize;if(s&&s.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||0!=(o&s.mouseButtons))){if(w.object(s.edges)){var c={left:!1,right:!1,top:!1,bottom:!1};for(var l in c)c[l]=zt(l,s.edges[l],a,e._latestPointer.eventTarget,r,i,s.margin||jt.defaultMargin);c.left=c.left&&!c.right,c.top=c.top&&!c.bottom,(c.left||c.right||c.top||c.bottom)&&(t.action={name:\"resize\",edges:c})}else{var u=\"y\"!==s.axis&&a.x>i.right-jt.defaultMargin,p=\"x\"!==s.axis&&a.y>i.bottom-jt.defaultMargin;(u||p)&&(t.action={name:\"resize\",axes:(u?\"x\":\"\")+(p?\"y\":\"\")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:\"xy\",margin:NaN,edges:null,invert:\"none\"},cursors:null,getCursor:function(t){var e=t.edges,n=t.axis,r=t.name,i=jt.cursors,o=null;if(n)o=i[r+n];else if(e){for(var a=\"\",s=0,c=[\"top\",\"bottom\",\"left\",\"right\"];s=1){var l={x:qt.x*c,y:qt.y*c};if(l.x||l.y){var u=Vt(o);w.window(o)?o.scrollBy(l.x,l.y):o&&(o.scrollLeft+=l.x,o.scrollTop+=l.y);var p=Vt(o),f={x:p.x-u.x,y:p.y-u.y};(f.x||f.y)&&e.fire({type:\"autoscroll\",target:n,interactable:e,delta:f,interaction:t,container:o})}qt.prevTime=a}qt.isScrolling&&(Lt.cancel(qt.i),qt.i=Lt.request(qt.scroll))},check:function(t,e){var n;return null==(n=t.options[e].autoScroll)?void 0:n.enabled},onInteractionMove:function(t){var e=t.interaction,n=t.pointer;if(e.interacting()&&qt.check(e.interactable,e.prepared.name))if(e.simulation)qt.x=qt.y=0;else{var r,i,o,a,s=e.interactable,c=e.element,l=e.prepared.name,u=s.options[l].autoScroll,p=Bt(u.container,s,c);if(w.window(p))a=n.clientXp.innerWidth-qt.margin,o=n.clientY>p.innerHeight-qt.margin;else{var f=Y(p);a=n.clientXf.right-qt.margin,o=n.clientY>f.bottom-qt.margin}qt.x=i?1:a?-1:0,qt.y=o?1:r?-1:0,qt.isScrolling||(qt.margin=u.margin,qt.speed=u.speed,qt.start(e))}}};function Bt(t,e,n){return(w.string(t)?W(t,e,n):t)||y(n)}function Vt(t){return w.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Wt={id:\"auto-scroll\",install:function(t){var e=t.defaults,n=t.actions;t.autoScroll=qt,qt.now=function(){return t.now()},n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=qt.defaults},listeners:{\"interactions:new\":function(t){t.interaction.autoScroll=null},\"interactions:destroy\":function(t){t.interaction.autoScroll=null,qt.stop(),qt.interaction&&(qt.interaction=null)},\"interactions:stop\":qt.stop,\"interactions:action-move\":function(t){return qt.onInteractionMove(t)}}},Gt=Wt;function Nt(t,e){var n=!1;return function(){return n||(g.console.warn(e),n=!0),t.apply(this,arguments)}}function Ut(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function Ht(t){return w.bool(t)?(this.options.styleCursor=t,this):null===t?(delete this.options.styleCursor,this):this.options.styleCursor}function Kt(t){return w.func(t)?(this.options.actionChecker=t,this):null===t?(delete this.options.actionChecker,this):this.options.actionChecker}var $t={id:\"auto-start/interactableMethods\",install:function(t){var e=t.Interactable;e.prototype.getAction=function(e,n,r,i){var o=function(t,e,n,r,i){var o=t.getRect(r),a=e.buttons||{0:1,1:4,3:8,4:16}[e.button],s={action:null,interactable:t,interaction:n,element:r,rect:o,buttons:a};return i.fire(\"auto-start:check\",s),s.action}(this,n,r,i,t);return this.options.actionChecker?this.options.actionChecker(e,n,o,this,i,r):o},e.prototype.ignoreFrom=Nt((function(t){return this._backCompatOption(\"ignoreFrom\",t)}),\"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue}).\"),e.prototype.allowFrom=Nt((function(t){return this._backCompatOption(\"allowFrom\",t)}),\"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue}).\"),e.prototype.actionChecker=Kt,e.prototype.styleCursor=Ht}};function Jt(t,e,n,r,i){return e.testIgnoreAllow(e.options[t.name],n,r)&&e.options[t.name].enabled&&ee(e,n,t,i)?t:null}function Qt(t,e,n,r,i,o,a){for(var s=0,c=r.length;s=s)return!1;if(d.interactable===t){if((l+=h===n.name?1:0)>=o)return!1;if(d.element===e&&(u++,h===n.name&&u>=a))return!1}}}return s>0}function ne(t,e){return w.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function re(t,e,n){var r=n.autoStart.cursorElement;r&&r!==t&&(r.style.cursor=\"\"),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function ie(t,e){var n=t.interactable,r=t.element,i=t.prepared;if(\"mouse\"===t.pointerType&&n&&n.options.styleCursor){var o=\"\";if(i.name){var a=n.options[i.name].cursorChecker;o=w.func(a)?a(i,n,r,t._interacting):e.actions.map[i.name].getCursor(i)}re(t.element,o||\"\",e)}else e.autoStart.cursorElement&&re(e.autoStart.cursorElement,\"\",e)}var oe={id:\"auto-start/base\",before:[\"actions\"],install:function(t){var e=t.interactStatic,n=t.defaults;t.usePlugin($t),n.base.actionChecker=null,n.base.styleCursor=!0,V(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=function(e){return ne(e,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:ee,cursorElement:null}},listeners:{\"interactions:down\":function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;n.interacting()||te(n,Zt(n,r,i,o,e),e)},\"interactions:move\":function(t,e){!function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;\"mouse\"!==n.pointerType||n.pointerIsDown||n.interacting()||te(n,Zt(n,r,i,o,e),e)}(t,e),function(t,e){var n=t.interaction;if(n.pointerIsDown&&!n.interacting()&&n.pointerWasMoved&&n.prepared.name){e.fire(\"autoStart:before-start\",t);var r=n.interactable,i=n.prepared.name;i&&r&&(r.options[i].manualStart||!ee(r,n.element,n.prepared,e)?n.stop():(n.start(n.prepared,r,n.element),ie(n,e)))}}(t,e)},\"interactions:stop\":function(t,e){var n=t.interaction,r=n.interactable;r&&r.options.styleCursor&&re(n.element,\"\",e)}},maxInteractions:ne,withinInteractionLimit:ee,validateAction:Jt},ae=oe;var se={id:\"auto-start/dragAxis\",listeners:{\"autoStart:before-start\":function(t,e){var n=t.interaction,r=t.eventTarget,i=t.dx,o=t.dy;if(\"drag\"===n.prepared.name){var a=Math.abs(i),s=Math.abs(o),c=n.interactable.options.drag,l=c.startAxis,u=a>s?\"x\":a0&&(e.autoStartHoldTimer=setTimeout((function(){e.start(e.prepared,e.interactable,e.element)}),n))},\"interactions:move\":function(t){var e=t.interaction,n=t.duplicate;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},\"autoStart:before-start\":function(t){var e=t.interaction;ce(e)>0&&(e.prepared.name=null)}},getHoldDuration:ce},ue=le,pe={id:\"auto-start\",install:function(t){t.usePlugin(ae),t.usePlugin(ue),t.usePlugin(se)}},fe=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):w.bool(t)?(this.options.preventDefault=t?\"always\":\"never\",this):this.options.preventDefault};function de(t){var e=t.interaction,n=t.event;e.interactable&&e.interactable.checkAndPreventDefault(n)}var he={id:\"core/interactablePreventDefault\",install:function(t){var e=t.Interactable;e.prototype.preventDefault=fe,e.prototype.checkAndPreventDefault=function(e){return function(t,e,n){var r=t.options.preventDefault;if(\"never\"!==r)if(\"always\"!==r){if(e.events.supportsPassive&&/^touch(start|move)$/.test(n.type)){var i=y(n.target).document,o=e.getDocOptions(i);if(!o||!o.events||!1!==o.events.passive)return}/^(mouse|pointer|touch)*(down|start)/i.test(n.type)||w.element(n.target)&&R(n.target,\"input,select,textarea,[contenteditable=true],[contenteditable=true] *\")||n.preventDefault()}else n.preventDefault()}(this,t,e)},t.interactions.docEvents.push({type:\"dragstart\",listener:function(e){for(var n=0,r=t.interactions.list;n150)return null;var e=180*Math.atan2(t.prevEvent.velocityY,t.prevEvent.velocityX)/Math.PI;e<0&&(e+=360);var n=112.5<=e&&e<247.5,r=202.5<=e&&e<337.5;return{up:r,down:!r&&22.5<=e&&e<157.5,left:n,right:!n&&(292.5<=e||e<67.5),angle:e,speed:t.prevEvent.speed,velocity:{x:t.prevEvent.velocityX,y:t.prevEvent.velocityY}}}},{key:\"preventDefault\",value:function(){}},{key:\"stopImmediatePropagation\",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:\"stopPropagation\",value:function(){this.propagationStopped=!0}}]),n}(vt);Object.defineProperties(Se.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var _e=o((function t(e,n,i,o,a){r(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=e,this.pointer=n,this.event=i,this.downTime=o,this.downTarget=a})),Pe=function(t){return t.interactable=\"\",t.element=\"\",t.prepared=\"\",t.pointerIsDown=\"\",t.pointerWasMoved=\"\",t._proxy=\"\",t}({}),Oe=function(t){return t.start=\"\",t.move=\"\",t.end=\"\",t.stop=\"\",t.interacting=\"\",t}({}),ke=0,De=function(){function t(e){var n=this,i=e.pointerType,o=e.scopeFire;r(this,t),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Nt((function(t){this.move(t)}),\"The interaction.doMove() method has been renamed to interaction.move()\"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=ke++,this._scopeFire=o,this.pointerType=i;var a=this;this._proxy={};var s=function(t){Object.defineProperty(n._proxy,t,{get:function(){return a[t]}})};for(var c in Pe)s(c);var l=function(t){Object.defineProperty(n._proxy,t,{value:function(){return a[t].apply(a,arguments)}})};for(var u in Oe)l(u);this._scopeFire(\"interactions:new\",{interaction:this})}return o(t,[{key:\"pointerMoveTolerance\",get:function(){return 1}},{key:\"pointerDown\",value:function(t,e,n){var r=this.updatePointer(t,e,n,!0),i=this.pointers[r];this._scopeFire(\"interactions:down\",{pointer:t,event:e,eventTarget:n,pointerIndex:r,pointerInfo:i,type:\"down\",interaction:this})}},{key:\"start\",value:function(t,e,n){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(\"gesture\"===t.name?2:1)||!e.options[t.name].enabled)&&(Ut(this.prepared,t),this.interactable=e,this.element=n,this.rect=e.getRect(n),this.edges=this.prepared.edges?V({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:\"start\"})&&!this._stopped,this._interacting)}},{key:\"pointerMove\",value:function(t,e,n){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,e,n,!1);var r,i,o=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(r=this.coords.cur.client.x-this.coords.start.client.x,i=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Q(r,i)>this.pointerMoveTolerance);var a,s,c,l=this.getPointerIndex(t),u={pointer:t,pointerIndex:l,pointerInfo:this.pointers[l],event:e,type:\"move\",eventTarget:n,dx:r,dy:i,duplicate:o,interaction:this};o||(a=this.coords.velocity,s=this.coords.delta,c=Math.max(s.timeStamp/1e3,.001),a.page.x=s.page.x/c,a.page.y=s.page.y/c,a.client.x=s.client.x/c,a.client.y=s.client.y/c,a.timeStamp=c),this._scopeFire(\"interactions:move\",u),o||this.simulation||(this.interacting()&&(u.type=null,this.move(u)),this.pointerWasMoved&&et(this.coords.prev,this.coords.cur))}},{key:\"move\",value:function(t){t&&t.event||nt(this.coords.delta),(t=V({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase=\"move\",this._doPhase(t)}},{key:\"pointerUp\",value:function(t,e,n,r){var i=this.getPointerIndex(t);-1===i&&(i=this.updatePointer(t,e,n,!1));var o=/cancel$/i.test(e.type)?\"cancel\":\"up\";this._scopeFire(\"interactions:\".concat(o),{pointer:t,pointerIndex:i,pointerInfo:this.pointers[i],event:e,eventTarget:n,type:o,curEventTarget:r,interaction:this}),this.simulation||this.end(e),this.removePointer(t,e)}},{key:\"documentBlur\",value:function(t){this.end(t),this._scopeFire(\"interactions:blur\",{event:t,type:\"blur\",interaction:this})}},{key:\"end\",value:function(t){var e;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(e=this._doPhase({event:t,interaction:this,phase:\"end\"})),this._ending=!1,!0===e&&this.stop()}},{key:\"currentAction\",value:function(){return this._interacting?this.prepared.name:null}},{key:\"interacting\",value:function(){return this._interacting}},{key:\"stop\",value:function(){this._scopeFire(\"interactions:stop\",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:\"getPointerIndex\",value:function(t){var e=at(t);return\"mouse\"===this.pointerType||\"pen\"===this.pointerType?this.pointers.length-1:yt(this.pointers,(function(t){return t.id===e}))}},{key:\"getPointerInfo\",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:\"updatePointer\",value:function(t,e,n,r){var i,o,a,s=at(t),c=this.getPointerIndex(t),l=this.pointers[c];return r=!1!==r&&(r||/(down|start)$/i.test(e.type)),l?l.pointer=t:(l=new _e(s,t,e,null,null),c=this.pointers.length,this.pointers.push(l)),st(this.coords.cur,this.pointers.map((function(t){return t.pointer})),this._now()),i=this.coords.delta,o=this.coords.prev,a=this.coords.cur,i.page.x=a.page.x-o.page.x,i.page.y=a.page.y-o.page.y,i.client.x=a.client.x-o.client.x,i.client.y=a.client.y-o.client.y,i.timeStamp=a.timeStamp-o.timeStamp,r&&(this.pointerIsDown=!0,l.downTime=this.coords.cur.timeStamp,l.downTarget=n,tt(this.downPointer,t),this.interacting()||(et(this.coords.start,this.coords.cur),et(this.coords.prev,this.coords.cur),this.downEvent=e,this.pointerWasMoved=!1)),this._updateLatestPointer(t,e,n),this._scopeFire(\"interactions:update-pointer\",{pointer:t,event:e,eventTarget:n,down:r,pointerInfo:l,pointerIndex:c,interaction:this}),c}},{key:\"removePointer\",value:function(t,e){var n=this.getPointerIndex(t);if(-1!==n){var r=this.pointers[n];this._scopeFire(\"interactions:remove-pointer\",{pointer:t,event:e,eventTarget:null,pointerIndex:n,pointerInfo:r,interaction:this}),this.pointers.splice(n,1),this.pointerIsDown=!1}}},{key:\"_updateLatestPointer\",value:function(t,e,n){this._latestPointer.pointer=t,this._latestPointer.event=e,this._latestPointer.eventTarget=n}},{key:\"destroy\",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:\"_createPreparedEvent\",value:function(t,e,n,r){return new Se(this,t,this.prepared.name,e,this.element,n,r)}},{key:\"_fireEvent\",value:function(t){var e;null==(e=this.interactable)||e.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:\"_doPhase\",value:function(t){var e=t.event,n=t.phase,r=t.preEnd,i=t.type,o=this.rect;if(o&&\"move\"===n&&(H(this.edges,o,this.coords.delta[this.interactable.options.deltaSource]),o.width=o.right-o.left,o.height=o.bottom-o.top),!1===this._scopeFire(\"interactions:before-action-\".concat(n),t))return!1;var a=t.iEvent=this._createPreparedEvent(e,n,r,i);return this._scopeFire(\"interactions:action-\".concat(n),t),\"start\"===n&&(this.prevEvent=a),this._fireEvent(a),this._scopeFire(\"interactions:after-action-\".concat(n),t),!0}},{key:\"_now\",value:function(){return Date.now()}}]),t}();function Ie(t){Me(t.interaction)}function Me(t){if(!function(t){return!(!t.offset.pending.x&&!t.offset.pending.y)}(t))return!1;var e=t.offset.pending;return Ae(t.coords.cur,e),Ae(t.coords.delta,e),H(t.edges,t.rect,e),e.x=0,e.y=0,!0}function ze(t){var e=t.x,n=t.y;this.offset.pending.x+=e,this.offset.pending.y+=n,this.offset.total.x+=e,this.offset.total.y+=n}function Ae(t,e){var n=t.page,r=t.client,i=e.x,o=e.y;n.x+=i,n.y+=o,r.x+=i,r.y+=o}Oe.offsetBy=\"\";var Re={id:\"offset\",before:[\"modifiers\",\"pointer-events\",\"actions\",\"inertia\"],install:function(t){t.Interaction.prototype.offsetBy=ze},listeners:{\"interactions:new\":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},\"interactions:update-pointer\":function(t){return function(t){t.pointerIsDown&&(Ae(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(t.interaction)},\"interactions:before-action-start\":Ie,\"interactions:before-action-move\":Ie,\"interactions:before-action-end\":function(t){var e=t.interaction;if(Me(e))return e.move({offset:!0}),e.end(),!1},\"interactions:stop\":function(t){var e=t.interaction;e.offset.total.x=0,e.offset.total.y=0,e.offset.pending.x=0,e.offset.pending.y=0}}},Ce=Re;var je=function(){function t(e){r(this,t),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=e}return o(t,[{key:\"start\",value:function(t){var e=this.interaction,n=Fe(e);if(!n||!n.enabled)return!1;var r=e.coords.velocity.client,i=Q(r.x,r.y),o=this.modification||(this.modification=new me(e));if(o.copyFrom(e.modification),this.t0=e._now(),this.allowResume=n.allowResume,this.v0=i,this.currentOffset={x:0,y:0},this.startCoords=e.coords.cur.page,this.modifierArg=o.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:\"inertiastart\"}),this.t0-e.coords.cur.timeStamp<50&&i>n.minSpeed&&i>n.endSpeed)this.startInertia();else{if(o.result=o.setAll(this.modifierArg),!o.result.changed)return!1;this.startSmoothEnd()}return e.modification.result.rect=null,e.offsetBy(this.targetOffset),e._doPhase({interaction:e,event:t,phase:\"inertiastart\"}),e.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),e.modification.result.rect=null,this.active=!0,e.simulation=this,!0}},{key:\"startInertia\",value:function(){var t=this,e=this.interaction.coords.velocity.client,n=Fe(this.interaction),r=n.resistance,i=-Math.log(n.endSpeed/this.v0)/r;this.targetOffset={x:(e.x-i)/r,y:(e.y-i)/r},this.te=i,this.lambda_v0=r/this.v0,this.one_ve_v0=1-n.endSpeed/this.v0;var o=this.modification,a=this.modifierArg;a.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},o.result=o.setAll(a),o.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+o.result.delta.x,y:this.targetOffset.y+o.result.delta.y}),this.onNextFrame((function(){return t.inertiaTick()}))}},{key:\"startSmoothEnd\",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return t.smoothEndTick()}))}},{key:\"onNextFrame\",value:function(t){var e=this;this.timeout=Lt.request((function(){e.active&&t()}))}},{key:\"inertiaTick\",value:function(){var t,e,n,r,i,o,a,s=this,c=this.interaction,l=Fe(c).resistance,u=(c._now()-this.t0)/1e3;if(u=0;a--){var d=p[a];if(d.selector===t&&d.context===e){for(var h=d.listeners,v=h.length-1;v>=0;v--){var g=h[v];if(g.func===i&&Ne(g.options,u)){h.splice(v,1),h.length||(p.splice(a,1),s(e,n,c),s(e,n,l,!0)),f=!0;break}}if(f)break}}},delegateListener:c,delegateUseCapture:l,delegatedEvents:r,documents:i,targets:n,supportsOptions:!1,supportsPassive:!1};function a(t,e,r,i){if(t.addEventListener){var a=Ge(i),s=bt(n,(function(e){return e.eventTarget===t}));s||(s={eventTarget:t,events:{}},n.push(s)),s.events[e]||(s.events[e]=[]),bt(s.events[e],(function(t){return t.func===r&&Ne(t.options,a)}))||(t.addEventListener(e,r,o.supportsOptions?a:a.capture),s.events[e].push({func:r,options:a}))}}function s(t,e,r,i){if(t.addEventListener&&t.removeEventListener){var a=yt(n,(function(e){return e.eventTarget===t})),c=n[a];if(c&&c.events)if(\"all\"!==e){var l=!1,u=c.events[e];if(u){if(\"all\"===r){for(var p=u.length-1;p>=0;p--){var f=u[p];s(t,e,f.func,f.options)}return}for(var d=Ge(i),h=0;h=2)continue;if(!i.interacting()&&e===i.pointerType)return i}return null}};function Ke(t,e){return t.pointers.some((function(t){return t.id===e}))}var $e=He,Je=[\"pointerDown\",\"pointerMove\",\"pointerUp\",\"updatePointer\",\"removePointer\",\"windowBlur\"];function Qe(t,e){return function(n){var r=e.interactions.list,i=dt(n),o=ht(n),a=o[0],s=o[1],c=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(var l=0,u=n.changedTouches;l=0;r--){var i=e.interactions.list[r];i.interactable===n&&(i.stop(),e.fire(\"interactions:destroy\",{interaction:i}),i.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(r,1))}}},onDocSignal:tn,doOnInteractions:Qe,methodNames:Je},nn=en,rn=function(t){return t[t.On=0]=\"On\",t[t.Off=1]=\"Off\",t}(rn||{}),on=function(){function t(e,n,i,o){r(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Ve,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=n.actions,this.target=e,this._context=n.context||i,this._win=y(B(e)?this._context:e),this._doc=this._win.document,this._scopeEvents=o,this.set(n)}return o(t,[{key:\"_defaults\",get:function(){return{base:{},perAction:{},actions:{}}}},{key:\"setOnEvents\",value:function(t,e){return w.func(e.onstart)&&this.on(\"\".concat(t,\"start\"),e.onstart),w.func(e.onmove)&&this.on(\"\".concat(t,\"move\"),e.onmove),w.func(e.onend)&&this.on(\"\".concat(t,\"end\"),e.onend),w.func(e.oninertiastart)&&this.on(\"\".concat(t,\"inertiastart\"),e.oninertiastart),this}},{key:\"updatePerActionListeners\",value:function(t,e,n){var r,i=this,o=null==(r=this._actions.map[t])?void 0:r.filterEventType,a=function(t){return(null==o||o(t))&&ve(t,i._actions)};(w.array(e)||w.object(e))&&this._onOff(rn.Off,t,e,void 0,a),(w.array(n)||w.object(n))&&this._onOff(rn.On,t,n,void 0,a)}},{key:\"setPerAction\",value:function(t,e){var n=this._defaults;for(var r in e){var i=r,o=this.options[t],a=e[i];\"listeners\"===i&&this.updatePerActionListeners(t,o.listeners,a),w.array(a)?o[i]=mt(a):w.plainObject(a)?(o[i]=V(o[i]||{},ge(a)),w.object(n.perAction[i])&&\"enabled\"in n.perAction[i]&&(o[i].enabled=!1!==a.enabled)):w.bool(a)&&w.object(n.perAction[i])?o[i].enabled=a:o[i]=a}}},{key:\"getRect\",value:function(t){return t=t||(w.element(this.target)?this.target:null),w.string(this.target)&&(t=t||this._context.querySelector(this.target)),L(t)}},{key:\"rectChecker\",value:function(t){var e=this;return w.func(t)?(this.getRect=function(n){var r=V({},t.apply(e,n));return\"width\"in r||(r.width=r.right-r.left,r.height=r.bottom-r.top),r},this):null===t?(delete this.getRect,this):this.getRect}},{key:\"_backCompatOption\",value:function(t,e){if(B(e)||w.object(e)){for(var n in this.options[t]=e,this._actions.map)this.options[n][t]=e;return this}return this.options[t]}},{key:\"origin\",value:function(t){return this._backCompatOption(\"origin\",t)}},{key:\"deltaSource\",value:function(t){return\"page\"===t||\"client\"===t?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:\"getAllElements\",value:function(){var t=this.target;return w.string(t)?Array.from(this._context.querySelectorAll(t)):w.func(t)&&t.getAllElements?t.getAllElements():w.element(t)?[t]:[]}},{key:\"context\",value:function(){return this._context}},{key:\"inContext\",value:function(t){return this._context===t.ownerDocument||M(this._context,t)}},{key:\"testIgnoreAllow\",value:function(t,e,n){return!this.testIgnore(t.ignoreFrom,e,n)&&this.testAllow(t.allowFrom,e,n)}},{key:\"testAllow\",value:function(t,e,n){return!t||!!w.element(n)&&(w.string(t)?F(n,t,e):!!w.element(t)&&M(t,n))}},{key:\"testIgnore\",value:function(t,e,n){return!(!t||!w.element(n))&&(w.string(t)?F(n,t,e):!!w.element(t)&&M(t,n))}},{key:\"fire\",value:function(t){return this.events.fire(t),this}},{key:\"_onOff\",value:function(t,e,n,r,i){w.object(e)&&!w.array(e)&&(r=n,n=null);var o=$(e,n,i);for(var a in o){\"wheel\"===a&&(a=I.wheelEvent);for(var s=0,c=o[a];s=0;n--){var r=e[n],i=r.selector,o=r.context,a=r.listeners;i===this.target&&o===this._context&&e.splice(n,1);for(var s=a.length-1;s>=0;s--)this._scopeEvents.removeDelegate(this.target,this._context,t,a[s][0],a[s][1])}else this._scopeEvents.remove(this.target,\"all\")}}]),t}(),an=function(){function t(e){var n=this;r(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=e,e.addListeners({\"interactable:unset\":function(t){var e=t.interactable,r=e.target,i=w.string(r)?n.selectorMap[r]:r[n.scope.id],o=yt(i,(function(t){return t===e}));i.splice(o,1)}})}return o(t,[{key:\"new\",value:function(t,e){e=V(e||{},{actions:this.scope.actions});var n=new this.scope.Interactable(t,e,this.scope.document,this.scope.events);return this.scope.addDocument(n._doc),this.list.push(n),w.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(n)):(n.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(n)),this.scope.fire(\"interactable:new\",{target:t,options:e,interactable:n,win:this.scope._win}),n}},{key:\"getExisting\",value:function(t,e){var n=e&&e.context||this.scope.document,r=w.string(t),i=r?this.selectorMap[t]:t[this.scope.id];if(i)return bt(i,(function(e){return e._context===n&&(r||e.inContext(t))}))}},{key:\"forEachMatch\",value:function(t,e){for(var n=0,r=this.list;nMath.abs(u.y),l.coords,l.rect),V(i,l.coords));return l.eventProps},defaults:{ratio:\"preserve\",equalDelta:!1,modifiers:[],enabled:!1}};function gn(t,e,n){var r=t.startCoords,i=t.edgeSign;e?n.y=r.y+(n.x-r.x)*i.y:n.x=r.x+(n.y-r.y)*i.x}function mn(t,e,n,r){var i=t.startRect,o=t.startCoords,a=t.ratio,s=t.edgeSign;if(e){var c=r.width/a;n.y=o.y+(c-i.height)*s.y}else{var l=r.height*a;n.x=o.x+(l-i.width)*s.x}}var yn=be(vn,\"aspectRatio\"),bn=function(){};bn._defaults={};var xn=bn;function wn(t,e,n){return w.func(t)?G(t,e.interactable,e.element,[n.x,n.y,e]):G(t,e.interactable,e.element)}var En={start:function(t){var e=t.rect,n=t.startOffset,r=t.state,i=t.interaction,o=t.pageCoords,a=r.options,s=a.elementRect,c=V({left:0,top:0,right:0,bottom:0},a.offset||{});if(e&&s){var l=wn(a.restriction,i,o);if(l){var u=l.right-l.left-e.width,p=l.bottom-l.top-e.height;u<0&&(c.left+=u,c.right+=u),p<0&&(c.top+=p,c.bottom+=p)}c.left+=n.left-e.width*s.left,c.top+=n.top-e.height*s.top,c.right+=n.right-e.width*(1-s.right),c.bottom+=n.bottom-e.height*(1-s.bottom)}r.offset=c},set:function(t){var e=t.coords,n=t.interaction,r=t.state,i=r.options,o=r.offset,a=wn(i.restriction,n,e);if(a){var s=function(t){return!t||\"left\"in t&&\"top\"in t||((t=V({},t)).left=t.x||0,t.top=t.y||0,t.right=t.right||t.left+t.width,t.bottom=t.bottom||t.top+t.height),t}(a);e.x=Math.max(Math.min(s.right-o.right,e.x),s.left+o.left),e.y=Math.max(Math.min(s.bottom-o.bottom,e.y),s.top+o.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Tn=be(En,\"restrict\"),Sn={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_n={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Pn(t,e){for(var n=0,r=[\"top\",\"left\",\"bottom\",\"right\"];n !!(thing && thing.Window) && thing instanceof thing.Window\n","import isWindow from './isWindow'\n\nexport let realWindow = undefined as Window\n\nlet win = undefined as Window\nexport { win as window }\n\nexport function init(window: Window & { wrap?: (...args: any[]) => any }) {\n // get wrapped window if using Shadow DOM polyfill\n\n realWindow = window\n\n // create a TextNode\n const el = window.document.createTextNode('')\n\n // check if it's wrapped by a polyfill\n if (el.ownerDocument !== window.document && typeof window.wrap === 'function' && window.wrap(el) === el) {\n // use wrapped window\n window = window.wrap(window)\n }\n\n win = window\n}\n\nif (typeof window !== 'undefined' && !!window) {\n init(window)\n}\n\nexport function getWindow(node: any) {\n if (isWindow(node)) {\n return node\n }\n\n const rootNode = node.ownerDocument || node\n\n return rootNode.defaultView || win.window\n}\n","import isWindow from './isWindow'\nimport * as win from './window'\n\nconst window = (thing: any): thing is Window => thing === win.window || isWindow(thing)\n\nconst docFrag = (thing: any): thing is DocumentFragment => object(thing) && thing.nodeType === 11\n\nconst object = (thing: any): thing is { [index: string]: any } => !!thing && typeof thing === 'object'\n\nconst func = (thing: any): thing is (...args: any[]) => any => typeof thing === 'function'\n\nconst number = (thing: any): thing is number => typeof thing === 'number'\n\nconst bool = (thing: any): thing is boolean => typeof thing === 'boolean'\n\nconst string = (thing: any): thing is string => typeof thing === 'string'\n\nconst element = (thing: any): thing is HTMLElement | SVGElement => {\n if (!thing || typeof thing !== 'object') {\n return false\n }\n\n const _window = win.getWindow(thing) || win.window\n\n return /object|function/.test(typeof Element)\n ? thing instanceof Element || thing instanceof _window.Element\n : thing.nodeType === 1 && typeof thing.nodeName === 'string'\n}\n\nconst plainObject: typeof object = (thing: any): thing is { [index: string]: any } =>\n object(thing) && !!thing.constructor && /function Object\\b/.test(thing.constructor.toString())\n\nconst array = (thing: any): thing is T[] =>\n object(thing) && typeof thing.length !== 'undefined' && func(thing.splice)\n\nexport default {\n window,\n docFrag,\n object,\n func,\n number,\n bool,\n string,\n element,\n plainObject,\n array,\n}\n","import type { Interactable } from '@interactjs/core/Interactable'\nimport type { InteractEvent } from '@interactjs/core/InteractEvent'\nimport type { PerActionDefaults } from '@interactjs/core/options'\nimport type { Scope, Plugin } from '@interactjs/core/scope'\nimport type { ListenersArg, OrBoolean } from '@interactjs/core/types'\nimport is from '@interactjs/utils/is'\n\ndeclare module '@interactjs/core/Interactable' {\n interface Interactable {\n draggable(options: Partial> | boolean): this\n draggable(): DraggableOptions\n /**\n * ```js\n * interact(element).draggable({\n * onstart: function (event) {},\n * onmove : function (event) {},\n * onend : function (event) {},\n *\n * // the axis in which the first movement must be\n * // for the drag sequence to start\n * // 'xy' by default - any direction\n * startAxis: 'x' || 'y' || 'xy',\n *\n * // 'xy' by default - don't restrict to one axis (move in any direction)\n * // 'x' or 'y' to restrict movement to either axis\n * // 'start' to restrict movement to the axis the drag started in\n * lockAxis: 'x' || 'y' || 'xy' || 'start',\n *\n * // max number of drags that can happen concurrently\n * // with elements of this Interactable. Infinity by default\n * max: Infinity,\n *\n * // max number of drags that can target the same element+Interactable\n * // 1 by default\n * maxPerElement: 2\n * })\n *\n * var isDraggable = interact('element').draggable(); // true\n * ```\n *\n * Get or set whether drag actions can be performed on the target\n *\n * @param options - true/false or An object with event\n * listeners to be fired on drag events (object makes the Interactable\n * draggable)\n */\n draggable(options?: Partial> | boolean): this | DraggableOptions\n }\n}\n\ndeclare module '@interactjs/core/options' {\n interface ActionDefaults {\n drag: DraggableOptions\n }\n}\n\ndeclare module '@interactjs/core/types' {\n interface ActionMap {\n drag?: typeof drag\n }\n}\n\nexport type DragEvent = InteractEvent<'drag'>\n\nexport interface DraggableOptions extends PerActionDefaults {\n startAxis?: 'x' | 'y' | 'xy'\n lockAxis?: 'x' | 'y' | 'xy' | 'start'\n oninertiastart?: ListenersArg\n onstart?: ListenersArg\n onmove?: ListenersArg\n onend?: ListenersArg\n}\n\nfunction install(scope: Scope) {\n const { actions, Interactable, defaults } = scope\n\n Interactable.prototype.draggable = drag.draggable\n\n actions.map.drag = drag\n actions.methodDict.drag = 'draggable'\n\n defaults.actions.drag = drag.defaults\n}\n\nfunction beforeMove({ interaction }) {\n if (interaction.prepared.name !== 'drag') return\n\n const axis = interaction.prepared.axis\n\n if (axis === 'x') {\n interaction.coords.cur.page.y = interaction.coords.start.page.y\n interaction.coords.cur.client.y = interaction.coords.start.client.y\n\n interaction.coords.velocity.client.y = 0\n interaction.coords.velocity.page.y = 0\n } else if (axis === 'y') {\n interaction.coords.cur.page.x = interaction.coords.start.page.x\n interaction.coords.cur.client.x = interaction.coords.start.client.x\n\n interaction.coords.velocity.client.x = 0\n interaction.coords.velocity.page.x = 0\n }\n}\n\nfunction move({ iEvent, interaction }) {\n if (interaction.prepared.name !== 'drag') return\n\n const axis = interaction.prepared.axis\n\n if (axis === 'x' || axis === 'y') {\n const opposite = axis === 'x' ? 'y' : 'x'\n\n iEvent.page[opposite] = interaction.coords.start.page[opposite]\n iEvent.client[opposite] = interaction.coords.start.client[opposite]\n iEvent.delta[opposite] = 0\n }\n}\n\nconst draggable: Interactable['draggable'] = function draggable(\n this: Interactable,\n options?: DraggableOptions | boolean,\n): any {\n if (is.object(options)) {\n this.options.drag.enabled = options.enabled !== false\n this.setPerAction('drag', options)\n this.setOnEvents('drag', options)\n\n if (/^(xy|x|y|start)$/.test(options.lockAxis)) {\n this.options.drag.lockAxis = options.lockAxis\n }\n if (/^(xy|x|y)$/.test(options.startAxis)) {\n this.options.drag.startAxis = options.startAxis\n }\n\n return this\n }\n\n if (is.bool(options)) {\n this.options.drag.enabled = options\n\n return this\n }\n\n return this.options.drag as DraggableOptions\n}\n\nconst drag: Plugin = {\n id: 'actions/drag',\n install,\n listeners: {\n 'interactions:before-action-move': beforeMove,\n 'interactions:action-resume': beforeMove,\n\n // dragmove\n 'interactions:action-move': move,\n 'auto-start:check': (arg) => {\n const { interaction, interactable, buttons } = arg\n const dragOptions = interactable.options.drag\n\n if (\n !(dragOptions && dragOptions.enabled) ||\n // check mouseButton setting if the pointer is down\n (interaction.pointerIsDown &&\n /mouse|pointer/.test(interaction.pointerType) &&\n (buttons & interactable.options.drag.mouseButtons) === 0)\n ) {\n return undefined\n }\n\n arg.action = {\n name: 'drag',\n axis: dragOptions.lockAxis === 'start' ? dragOptions.startAxis : dragOptions.lockAxis,\n }\n\n return false\n },\n },\n draggable,\n beforeMove,\n move,\n defaults: {\n startAxis: 'xy',\n lockAxis: 'xy',\n } as DraggableOptions,\n\n getCursor() {\n return 'move'\n },\n\n filterEventType: (type: string) => type.search('drag') === 0,\n}\n\nexport default drag\n","const domObjects: {\n init: any\n document: Document\n DocumentFragment: typeof DocumentFragment\n SVGElement: typeof SVGElement\n SVGSVGElement: typeof SVGSVGElement\n SVGElementInstance: any\n Element: typeof Element\n HTMLElement: typeof HTMLElement\n Event: typeof Event\n Touch: typeof Touch\n PointerEvent: typeof PointerEvent\n} = {\n init,\n document: null,\n DocumentFragment: null,\n SVGElement: null,\n SVGSVGElement: null,\n SVGElementInstance: null,\n Element: null,\n HTMLElement: null,\n Event: null,\n Touch: null,\n PointerEvent: null,\n}\n\nfunction blank() {}\n\nexport default domObjects\n\nfunction init(window: Window) {\n const win = window as any\n\n domObjects.document = win.document\n domObjects.DocumentFragment = win.DocumentFragment || blank\n domObjects.SVGElement = win.SVGElement || blank\n domObjects.SVGSVGElement = win.SVGSVGElement || blank\n domObjects.SVGElementInstance = win.SVGElementInstance || blank\n domObjects.Element = win.Element || blank\n domObjects.HTMLElement = win.HTMLElement || domObjects.Element\n\n domObjects.Event = win.Event\n domObjects.Touch = win.Touch || blank\n domObjects.PointerEvent = win.PointerEvent || win.MSPointerEvent\n}\n","import domObjects from './domObjects'\nimport is from './is'\n\nconst browser = {\n init,\n supportsTouch: null as boolean,\n supportsPointerEvent: null as boolean,\n isIOS7: null as boolean,\n isIOS: null as boolean,\n isIe9: null as boolean,\n isOperaMobile: null as boolean,\n prefixedMatchesSelector: null as 'matches',\n pEventTypes: null as {\n up: string\n down: string\n over: string\n out: string\n move: string\n cancel: string\n },\n wheelEvent: null as string,\n}\n\nfunction init(window: any) {\n const Element = domObjects.Element\n const navigator: Partial = window.navigator || {}\n\n // Does the browser support touch input?\n browser.supportsTouch =\n 'ontouchstart' in window ||\n (is.func(window.DocumentTouch) && domObjects.document instanceof window.DocumentTouch)\n\n // Does the browser support PointerEvents\n // https://github.com/taye/interact.js/issues/703#issuecomment-471570492\n browser.supportsPointerEvent = (navigator as any).pointerEnabled !== false && !!domObjects.PointerEvent\n\n browser.isIOS = /iP(hone|od|ad)/.test(navigator.platform)\n\n // scrolling doesn't change the result of getClientRects on iOS 7\n browser.isIOS7 = /iP(hone|od|ad)/.test(navigator.platform) && /OS 7[^\\d]/.test(navigator.appVersion)\n\n browser.isIe9 = /MSIE 9/.test(navigator.userAgent)\n\n // Opera Mobile must be handled differently\n browser.isOperaMobile =\n navigator.appName === 'Opera' && browser.supportsTouch && /Presto/.test(navigator.userAgent)\n\n // prefix matchesSelector\n browser.prefixedMatchesSelector = (\n 'matches' in Element.prototype\n ? 'matches'\n : 'webkitMatchesSelector' in Element.prototype\n ? 'webkitMatchesSelector'\n : 'mozMatchesSelector' in Element.prototype\n ? 'mozMatchesSelector'\n : 'oMatchesSelector' in Element.prototype\n ? 'oMatchesSelector'\n : 'msMatchesSelector'\n ) as 'matches'\n\n browser.pEventTypes = browser.supportsPointerEvent\n ? domObjects.PointerEvent === window.MSPointerEvent\n ? {\n up: 'MSPointerUp',\n down: 'MSPointerDown',\n over: 'mouseover',\n out: 'mouseout',\n move: 'MSPointerMove',\n cancel: 'MSPointerCancel',\n }\n : {\n up: 'pointerup',\n down: 'pointerdown',\n over: 'pointerover',\n out: 'pointerout',\n move: 'pointermove',\n cancel: 'pointercancel',\n }\n : null\n\n // because Webkit and Opera still use 'mousewheel' event type\n browser.wheelEvent = domObjects.document && 'onmousewheel' in domObjects.document ? 'mousewheel' : 'wheel'\n}\n\nexport default browser\n","import type { Rect, Target, Element } from '@interactjs/core/types'\n\nimport browser from './browser'\nimport domObjects from './domObjects'\nimport is from './is'\nimport * as win from './window'\n\nexport function nodeContains(parent: Node, child: Node) {\n if (parent.contains) {\n return parent.contains(child as Node)\n }\n\n while (child) {\n if (child === parent) {\n return true\n }\n\n child = (child as Node).parentNode\n }\n\n return false\n}\n\nexport function closest(element: Node, selector: string) {\n while (is.element(element)) {\n if (matchesSelector(element, selector)) {\n return element\n }\n\n element = parentNode(element)\n }\n\n return null\n}\n\nexport function parentNode(node: Node | Document) {\n let parent = node.parentNode\n\n if (is.docFrag(parent)) {\n // skip past #shado-root fragments\n // tslint:disable-next-line\n while ((parent = (parent as any).host) && is.docFrag(parent)) {\n continue\n }\n\n return parent\n }\n\n return parent\n}\n\nexport function matchesSelector(element: Element, selector: string) {\n // remove /deep/ from selectors if shadowDOM polyfill is used\n if (win.window !== win.realWindow) {\n selector = selector.replace(/\\/deep\\//g, ' ')\n }\n\n return element[browser.prefixedMatchesSelector](selector)\n}\n\nconst getParent = (el: Node | Document | ShadowRoot) => el.parentNode || (el as ShadowRoot).host\n\n// Test for the element that's \"above\" all other qualifiers\nexport function indexOfDeepestElement(elements: Element[] | NodeListOf) {\n let deepestNodeParents: Node[] = []\n let deepestNodeIndex: number\n\n for (let i = 0; i < elements.length; i++) {\n const currentNode = elements[i]\n const deepestNode: Node = elements[deepestNodeIndex]\n\n // node may appear in elements array multiple times\n if (!currentNode || i === deepestNodeIndex) {\n continue\n }\n\n if (!deepestNode) {\n deepestNodeIndex = i\n continue\n }\n\n const currentNodeParent = getParent(currentNode)\n const deepestNodeParent = getParent(deepestNode)\n\n // check if the deepest or current are document.documentElement/rootElement\n // - if the current node is, do nothing and continue\n if (currentNodeParent === currentNode.ownerDocument) {\n continue\n }\n // - if deepest is, update with the current node and continue to next\n else if (deepestNodeParent === currentNode.ownerDocument) {\n deepestNodeIndex = i\n continue\n }\n\n // compare zIndex of siblings\n if (currentNodeParent === deepestNodeParent) {\n if (zIndexIsHigherThan(currentNode, deepestNode)) {\n deepestNodeIndex = i\n }\n\n continue\n }\n\n // populate the ancestry array for the latest deepest node\n deepestNodeParents = deepestNodeParents.length ? deepestNodeParents : getNodeParents(deepestNode)\n\n let ancestryStart: Node\n\n // if the deepest node is an HTMLElement and the current node is a non root svg element\n if (\n deepestNode instanceof domObjects.HTMLElement &&\n currentNode instanceof domObjects.SVGElement &&\n !(currentNode instanceof domObjects.SVGSVGElement)\n ) {\n // TODO: is this check necessary? Was this for HTML elements embedded in SVG?\n if (currentNode === deepestNodeParent) {\n continue\n }\n\n ancestryStart = currentNode.ownerSVGElement\n } else {\n ancestryStart = currentNode\n }\n\n const currentNodeParents = getNodeParents(ancestryStart, deepestNode.ownerDocument)\n let commonIndex = 0\n\n // get (position of closest common ancestor) + 1\n while (\n currentNodeParents[commonIndex] &&\n currentNodeParents[commonIndex] === deepestNodeParents[commonIndex]\n ) {\n commonIndex++\n }\n\n const parents = [\n currentNodeParents[commonIndex - 1],\n currentNodeParents[commonIndex],\n deepestNodeParents[commonIndex],\n ]\n\n if (parents[0]) {\n let child = parents[0].lastChild\n\n while (child) {\n if (child === parents[1]) {\n deepestNodeIndex = i\n deepestNodeParents = currentNodeParents\n\n break\n } else if (child === parents[2]) {\n break\n }\n\n child = child.previousSibling\n }\n }\n }\n\n return deepestNodeIndex\n}\n\nfunction getNodeParents(node: Node, limit?: Node) {\n const parents: Node[] = []\n let parent: Node = node\n let parentParent: Node\n\n while ((parentParent = getParent(parent)) && parent !== limit && parentParent !== parent.ownerDocument) {\n parents.unshift(parent)\n parent = parentParent\n }\n\n return parents\n}\n\nfunction zIndexIsHigherThan(higherNode: Node, lowerNode: Node) {\n const higherIndex = parseInt(win.getWindow(higherNode).getComputedStyle(higherNode).zIndex, 10) || 0\n const lowerIndex = parseInt(win.getWindow(lowerNode).getComputedStyle(lowerNode).zIndex, 10) || 0\n\n return higherIndex >= lowerIndex\n}\n\nexport function matchesUpTo(element: Element, selector: string, limit: Node) {\n while (is.element(element)) {\n if (matchesSelector(element, selector)) {\n return true\n }\n\n element = parentNode(element) as Element\n\n if (element === limit) {\n return matchesSelector(element, selector)\n }\n }\n\n return false\n}\n\nexport function getActualElement(element: Element) {\n return (element as any).correspondingUseElement || element\n}\n\nexport function getScrollXY(relevantWindow?: Window) {\n relevantWindow = relevantWindow || win.window\n return {\n x: relevantWindow.scrollX || relevantWindow.document.documentElement.scrollLeft,\n y: relevantWindow.scrollY || relevantWindow.document.documentElement.scrollTop,\n }\n}\n\nexport function getElementClientRect(element: Element): Required {\n const clientRect =\n element instanceof domObjects.SVGElement ? element.getBoundingClientRect() : element.getClientRects()[0]\n\n return (\n clientRect && {\n left: clientRect.left,\n right: clientRect.right,\n top: clientRect.top,\n bottom: clientRect.bottom,\n width: clientRect.width || clientRect.right - clientRect.left,\n height: clientRect.height || clientRect.bottom - clientRect.top,\n }\n )\n}\n\nexport function getElementRect(element: Element) {\n const clientRect = getElementClientRect(element)\n\n if (!browser.isIOS7 && clientRect) {\n const scroll = getScrollXY(win.getWindow(element))\n\n clientRect.left += scroll.x\n clientRect.right += scroll.x\n clientRect.top += scroll.y\n clientRect.bottom += scroll.y\n }\n\n return clientRect\n}\n\nexport function getPath(node: Node | Document) {\n const path = []\n\n while (node) {\n path.push(node)\n node = parentNode(node)\n }\n\n return path\n}\n\nexport function trySelector(value: Target) {\n if (!is.string(value)) {\n return false\n }\n\n // an exception will be raised if it is invalid\n domObjects.document.querySelector(value)\n return true\n}\n","export default function extend(dest: U & Partial, source: T): T & U {\n for (const prop in source) {\n ;(dest as unknown as T)[prop] = source[prop]\n }\n\n const ret = dest as T & U\n\n return ret\n}\n","import type {\n HasGetRect,\n RectResolvable,\n Rect,\n Element,\n Point,\n FullRect,\n EdgeOptions,\n} from '@interactjs/core/types'\n\nimport { closest, getElementRect, parentNode } from './domUtils'\nimport extend from './extend'\nimport is from './is'\n\nexport function getStringOptionResult(value: any, target: HasGetRect, element: Node) {\n if (value === 'parent') {\n return parentNode(element)\n }\n\n if (value === 'self') {\n return target.getRect(element as Element)\n }\n\n return closest(element, value)\n}\n\nexport function resolveRectLike(\n value: RectResolvable,\n target?: HasGetRect,\n element?: Node,\n functionArgs?: T,\n) {\n let returnValue: any = value\n if (is.string(returnValue)) {\n returnValue = getStringOptionResult(returnValue, target, element)\n } else if (is.func(returnValue)) {\n returnValue = returnValue(...functionArgs)\n }\n\n if (is.element(returnValue)) {\n returnValue = getElementRect(returnValue)\n }\n\n return returnValue as Rect\n}\n\nexport function toFullRect(rect: Rect): FullRect {\n const { top, left, bottom, right } = rect\n const width = rect.width ?? rect.right - rect.left\n const height = rect.height ?? rect.bottom - rect.top\n\n return { top, left, bottom, right, width, height }\n}\n\nexport function rectToXY(rect: Rect | Point) {\n return (\n rect && {\n x: 'x' in rect ? rect.x : rect.left,\n y: 'y' in rect ? rect.y : rect.top,\n }\n )\n}\n\nexport function xywhToTlbr>(rect: T) {\n if (rect && !('left' in rect && 'top' in rect)) {\n rect = extend({}, rect)\n\n rect.left = rect.x || 0\n rect.top = rect.y || 0\n rect.right = rect.right || rect.left + rect.width\n rect.bottom = rect.bottom || rect.top + rect.height\n }\n\n return rect as Rect & T\n}\n\nexport function tlbrToXywh(rect: Rect & Partial) {\n if (rect && !('x' in rect && 'y' in rect)) {\n rect = extend({}, rect)\n\n rect.x = rect.left || 0\n rect.y = rect.top || 0\n rect.width = rect.width || (rect.right || 0) - rect.x\n rect.height = rect.height || (rect.bottom || 0) - rect.y\n }\n\n return rect as FullRect & Point\n}\n\nexport function addEdges(edges: EdgeOptions, rect: Rect, delta: Point) {\n if (edges.left) {\n rect.left += delta.x\n }\n if (edges.right) {\n rect.right += delta.x\n }\n if (edges.top) {\n rect.top += delta.y\n }\n if (edges.bottom) {\n rect.bottom += delta.y\n }\n\n rect.width = rect.right - rect.left\n rect.height = rect.bottom - rect.top\n}\n","import type { PerActionDefaults } from '@interactjs/core/options'\nimport type { ActionName, HasGetRect } from '@interactjs/core/types'\n\nimport { rectToXY, resolveRectLike } from './rect'\n\nexport default function getOriginXY(\n target: HasGetRect & { options: PerActionDefaults },\n element: Node,\n actionName?: ActionName,\n) {\n const actionOptions = actionName && (target.options as any)[actionName]\n const actionOrigin = actionOptions && actionOptions.origin\n const origin = actionOrigin || target.options.origin\n\n const originRect = resolveRectLike(origin, target, element, [target && element])\n\n return rectToXY(originRect) || { x: 0, y: 0 }\n}\n","import type { EventTypes, Listener, ListenersArg } from '@interactjs/core/types'\n\nimport is from './is'\n\nexport interface NormalizedListeners {\n [type: string]: Listener[]\n}\n\nexport default function normalize(\n type: EventTypes,\n listeners?: ListenersArg | ListenersArg[] | null,\n filter = (_typeOrPrefix: string) => true,\n result?: NormalizedListeners,\n): NormalizedListeners {\n result = result || {}\n\n if (is.string(type) && type.search(' ') !== -1) {\n type = split(type)\n }\n\n if (is.array(type)) {\n type.forEach((t) => normalize(t, listeners, filter, result))\n return result\n }\n\n // before: type = [{ drag: () => {} }], listeners = undefined\n // after: type = '' , listeners = [{ drag: () => {} }]\n if (is.object(type)) {\n listeners = type\n type = ''\n }\n\n if (is.func(listeners) && filter(type)) {\n result[type] = result[type] || []\n result[type].push(listeners)\n } else if (is.array(listeners)) {\n for (const l of listeners) {\n normalize(type, l, filter, result)\n }\n } else if (is.object(listeners)) {\n for (const prefix in listeners) {\n const combinedTypes = split(prefix).map((p) => `${type}${p}`)\n\n normalize(combinedTypes, listeners[prefix], filter, result)\n }\n }\n\n return result as NormalizedListeners\n}\n\nfunction split(type: string) {\n return type.trim().split(/ +/)\n}\n","export default (x: number, y: number) => Math.sqrt(x * x + y * y)\n","const VENDOR_PREFIXES = ['webkit', 'moz']\n\nexport default function pointerExtend(dest: Partial }>, source: T) {\n dest.__set ||= {} as any\n\n for (const prop in source) {\n // skip deprecated prefixed properties\n if (VENDOR_PREFIXES.some((prefix) => prop.indexOf(prefix) === 0)) continue\n\n if (typeof dest[prop] !== 'function' && prop !== '__set') {\n Object.defineProperty(dest, prop, {\n get() {\n if (prop in dest.__set) return dest.__set[prop]\n\n return (dest.__set[prop] = source[prop] as any)\n },\n set(value: any) {\n dest.__set[prop] = value\n },\n configurable: true,\n })\n }\n }\n return dest\n}\n","import type { InteractEvent } from '@interactjs/core/InteractEvent'\nimport type { CoordsSetMember, PointerType, Point, PointerEventType, Element } from '@interactjs/core/types'\n\nimport browser from './browser'\nimport dom from './domObjects'\nimport * as domUtils from './domUtils'\nimport hypot from './hypot'\nimport is from './is'\nimport pointerExtend from './pointerExtend'\n\nexport function copyCoords(dest: CoordsSetMember, src: CoordsSetMember) {\n dest.page = dest.page || ({} as any)\n dest.page.x = src.page.x\n dest.page.y = src.page.y\n\n dest.client = dest.client || ({} as any)\n dest.client.x = src.client.x\n dest.client.y = src.client.y\n\n dest.timeStamp = src.timeStamp\n}\n\nexport function setCoordDeltas(targetObj: CoordsSetMember, prev: CoordsSetMember, cur: CoordsSetMember) {\n targetObj.page.x = cur.page.x - prev.page.x\n targetObj.page.y = cur.page.y - prev.page.y\n targetObj.client.x = cur.client.x - prev.client.x\n targetObj.client.y = cur.client.y - prev.client.y\n targetObj.timeStamp = cur.timeStamp - prev.timeStamp\n}\n\nexport function setCoordVelocity(targetObj: CoordsSetMember, delta: CoordsSetMember) {\n const dt = Math.max(delta.timeStamp / 1000, 0.001)\n\n targetObj.page.x = delta.page.x / dt\n targetObj.page.y = delta.page.y / dt\n targetObj.client.x = delta.client.x / dt\n targetObj.client.y = delta.client.y / dt\n targetObj.timeStamp = dt\n}\n\nexport function setZeroCoords(targetObj: CoordsSetMember) {\n targetObj.page.x = 0\n targetObj.page.y = 0\n targetObj.client.x = 0\n targetObj.client.y = 0\n}\n\nexport function isNativePointer(pointer: any) {\n return pointer instanceof dom.Event || pointer instanceof dom.Touch\n}\n\n// Get specified X/Y coords for mouse or event.touches[0]\nexport function getXY(type: string, pointer: PointerType | InteractEvent, xy: Point) {\n xy = xy || ({} as Point)\n type = type || 'page'\n\n xy.x = pointer[(type + 'X') as 'pageX']\n xy.y = pointer[(type + 'Y') as 'pageY']\n\n return xy\n}\n\nexport function getPageXY(pointer: PointerType | InteractEvent, page?: Point) {\n page = page || { x: 0, y: 0 }\n\n // Opera Mobile handles the viewport and scrolling oddly\n if (browser.isOperaMobile && isNativePointer(pointer)) {\n getXY('screen', pointer, page)\n\n page.x += window.scrollX\n page.y += window.scrollY\n } else {\n getXY('page', pointer, page)\n }\n\n return page\n}\n\nexport function getClientXY(pointer: PointerType, client: Point) {\n client = client || ({} as any)\n\n if (browser.isOperaMobile && isNativePointer(pointer)) {\n // Opera Mobile handles the viewport and scrolling oddly\n getXY('screen', pointer, client)\n } else {\n getXY('client', pointer, client)\n }\n\n return client\n}\n\nexport function getPointerId(pointer: { pointerId?: number; identifier?: number; type?: string }) {\n return is.number(pointer.pointerId) ? pointer.pointerId! : pointer.identifier!\n}\n\nexport function setCoords(dest: CoordsSetMember, pointers: any[], timeStamp: number) {\n const pointer = pointers.length > 1 ? pointerAverage(pointers) : pointers[0]\n\n getPageXY(pointer, dest.page)\n getClientXY(pointer, dest.client)\n\n dest.timeStamp = timeStamp\n}\n\nexport function getTouchPair(event: TouchEvent | PointerType[]) {\n const touches: PointerType[] = []\n\n // array of touches is supplied\n if (is.array(event)) {\n touches[0] = event[0]\n touches[1] = event[1]\n }\n // an event\n else {\n if (event.type === 'touchend') {\n if (event.touches.length === 1) {\n touches[0] = event.touches[0]\n touches[1] = event.changedTouches[0]\n } else if (event.touches.length === 0) {\n touches[0] = event.changedTouches[0]\n touches[1] = event.changedTouches[1]\n }\n } else {\n touches[0] = event.touches[0]\n touches[1] = event.touches[1]\n }\n }\n\n return touches\n}\n\nexport function pointerAverage(pointers: PointerType[]) {\n const average = {\n pageX: 0,\n pageY: 0,\n clientX: 0,\n clientY: 0,\n screenX: 0,\n screenY: 0,\n }\n\n type CoordKeys = keyof typeof average\n\n for (const pointer of pointers) {\n for (const prop in average) {\n average[prop as CoordKeys] += pointer[prop as CoordKeys]\n }\n }\n for (const prop in average) {\n average[prop as CoordKeys] /= pointers.length\n }\n\n return average\n}\n\nexport function touchBBox(event: PointerType[]) {\n if (!event.length) {\n return null\n }\n\n const touches = getTouchPair(event)\n const minX = Math.min(touches[0].pageX, touches[1].pageX)\n const minY = Math.min(touches[0].pageY, touches[1].pageY)\n const maxX = Math.max(touches[0].pageX, touches[1].pageX)\n const maxY = Math.max(touches[0].pageY, touches[1].pageY)\n\n return {\n x: minX,\n y: minY,\n left: minX,\n top: minY,\n right: maxX,\n bottom: maxY,\n width: maxX - minX,\n height: maxY - minY,\n }\n}\n\nexport function touchDistance(event: PointerType[] | TouchEvent, deltaSource: string) {\n const sourceX = (deltaSource + 'X') as 'pageX'\n const sourceY = (deltaSource + 'Y') as 'pageY'\n const touches = getTouchPair(event)\n\n const dx = touches[0][sourceX] - touches[1][sourceX]\n const dy = touches[0][sourceY] - touches[1][sourceY]\n\n return hypot(dx, dy)\n}\n\nexport function touchAngle(event: PointerType[] | TouchEvent, deltaSource: string) {\n const sourceX = (deltaSource + 'X') as 'pageX'\n const sourceY = (deltaSource + 'Y') as 'pageY'\n const touches = getTouchPair(event)\n const dx = touches[1][sourceX] - touches[0][sourceX]\n const dy = touches[1][sourceY] - touches[0][sourceY]\n const angle = (180 * Math.atan2(dy, dx)) / Math.PI\n\n return angle\n}\n\nexport function getPointerType(pointer: { pointerType?: string; identifier?: number; type?: string }) {\n return is.string(pointer.pointerType)\n ? pointer.pointerType\n : is.number(pointer.pointerType)\n ? [undefined, undefined, 'touch', 'pen', 'mouse'][pointer.pointerType]!\n : // if the PointerEvent API isn't available, then the \"pointer\" must\n // be either a MouseEvent, TouchEvent, or Touch object\n /touch/.test(pointer.type || '') || pointer instanceof dom.Touch\n ? 'touch'\n : 'mouse'\n}\n\n// [ event.target, event.currentTarget ]\nexport function getEventTargets(event: Event) {\n const path = is.func(event.composedPath)\n ? (event.composedPath() as Element[])\n : (event as unknown as { path: Element[] }).path\n\n return [\n domUtils.getActualElement(path ? path[0] : (event.target as Element)),\n domUtils.getActualElement(event.currentTarget as Element),\n ]\n}\n\nexport function newCoords(): CoordsSetMember {\n return {\n page: { x: 0, y: 0 },\n client: { x: 0, y: 0 },\n timeStamp: 0,\n }\n}\n\nexport function coordsToEvent(coords: MockCoords) {\n const event = {\n coords,\n get page() {\n return this.coords.page\n },\n get client() {\n return this.coords.client\n },\n get timeStamp() {\n return this.coords.timeStamp\n },\n get pageX() {\n return this.coords.page.x\n },\n get pageY() {\n return this.coords.page.y\n },\n get clientX() {\n return this.coords.client.x\n },\n get clientY() {\n return this.coords.client.y\n },\n get pointerId() {\n return this.coords.pointerId\n },\n get target() {\n return this.coords.target\n },\n get type() {\n return this.coords.type\n },\n get pointerType() {\n return this.coords.pointerType\n },\n get buttons() {\n return this.coords.buttons\n },\n preventDefault() {},\n }\n\n return event as typeof event & PointerType & PointerEventType\n}\n\nexport interface MockCoords {\n page: Point\n client: Point\n timeStamp?: number\n pointerId?: any\n target?: any\n type?: string\n pointerType?: string\n buttons?: number\n}\n\nexport { pointerExtend }\n","import type { Interactable } from '@interactjs/core/Interactable'\nimport type { Interaction, InteractionProxy } from '@interactjs/core/Interaction'\nimport type { ActionName } from '@interactjs/core/types'\n\nexport class BaseEvent {\n declare type: string\n declare target: EventTarget\n declare currentTarget: Node\n declare interactable: Interactable\n /** @internal */\n declare _interaction: Interaction\n declare timeStamp: number\n immediatePropagationStopped = false\n propagationStopped = false\n\n constructor(interaction: Interaction) {\n this._interaction = interaction\n }\n\n preventDefault() {}\n\n /**\n * Don't call any other listeners (even on the current target)\n */\n stopPropagation() {\n this.propagationStopped = true\n }\n\n /**\n * Don't call listeners on the remaining targets\n */\n stopImmediatePropagation() {\n this.immediatePropagationStopped = this.propagationStopped = true\n }\n}\n\n// defined outside of class definition to avoid assignment of undefined during\n// construction\nexport interface BaseEvent {\n interaction: InteractionProxy\n}\n\n// getters and setters defined here to support typescript 3.6 and below which\n// don't support getter and setters in .d.ts files\nObject.defineProperty(BaseEvent.prototype, 'interaction', {\n get(this: BaseEvent) {\n return this._interaction._proxy\n },\n set(this: BaseEvent) {},\n})\n","type Filter = (element: T, index: number, array: T[]) => boolean\n\nexport const contains = (array: T[], target: T) => array.indexOf(target) !== -1\n\nexport const remove = (array: T[], target: T) => array.splice(array.indexOf(target), 1)\n\nexport const merge = (target: Array, source: U[]) => {\n for (const item of source) {\n target.push(item)\n }\n\n return target\n}\n\nexport const from = (source: ArrayLike) => merge([] as T[], source as T[])\n\nexport const findIndex = (array: T[], func: Filter) => {\n for (let i = 0; i < array.length; i++) {\n if (func(array[i], i, array)) {\n return i\n }\n }\n\n return -1\n}\n\nexport const find = (array: T[], func: Filter): T | undefined => array[findIndex(array, func)]\n","import { BaseEvent } from '@interactjs/core/BaseEvent'\nimport type { Interactable } from '@interactjs/core/Interactable'\nimport type { InteractEvent } from '@interactjs/core/InteractEvent'\nimport type { Element } from '@interactjs/core/types'\nimport * as arr from '@interactjs/utils/arr'\n\nimport type { DropState } from './plugin'\n\nexport class DropEvent extends BaseEvent<'drag'> {\n declare target: Element\n dropzone: Interactable\n dragEvent: InteractEvent<'drag'>\n relatedTarget: Element\n draggable: Interactable\n propagationStopped = false\n immediatePropagationStopped = false\n\n /**\n * Class of events fired on dropzones during drags with acceptable targets.\n */\n constructor(dropState: DropState, dragEvent: InteractEvent<'drag'>, type: string) {\n super(dragEvent._interaction)\n\n const { element, dropzone } = type === 'dragleave' ? dropState.prev : dropState.cur\n\n this.type = type\n this.target = element\n this.currentTarget = element\n this.dropzone = dropzone\n this.dragEvent = dragEvent\n this.relatedTarget = dragEvent.target\n this.draggable = dragEvent.interactable\n this.timeStamp = dragEvent.timeStamp\n }\n\n /**\n * If this is a `dropactivate` event, the dropzone element will be\n * deactivated.\n *\n * If this is a `dragmove` or `dragenter`, a `dragleave` will be fired on the\n * dropzone element and more.\n */\n reject() {\n const { dropState } = this._interaction\n\n if (\n this.type !== 'dropactivate' &&\n (!this.dropzone || dropState.cur.dropzone !== this.dropzone || dropState.cur.element !== this.target)\n ) {\n return\n }\n\n dropState.prev.dropzone = this.dropzone\n dropState.prev.element = this.target\n\n dropState.rejected = true\n dropState.events.enter = null\n\n this.stopImmediatePropagation()\n\n if (this.type === 'dropactivate') {\n const activeDrops = dropState.activeDrops\n const index = arr.findIndex(\n activeDrops,\n ({ dropzone, element }) => dropzone === this.dropzone && element === this.target,\n )\n\n dropState.activeDrops.splice(index, 1)\n\n const deactivateEvent = new DropEvent(dropState, this.dragEvent, 'dropdeactivate')\n\n deactivateEvent.dropzone = this.dropzone\n deactivateEvent.target = this.target\n\n this.dropzone.fire(deactivateEvent)\n } else {\n this.dropzone.fire(new DropEvent(dropState, this.dragEvent, 'dragleave'))\n }\n }\n\n preventDefault() {}\n\n stopPropagation() {\n this.propagationStopped = true\n }\n\n stopImmediatePropagation() {\n this.immediatePropagationStopped = this.propagationStopped = true\n }\n}\n","import type { Interactable } from '@interactjs/core/Interactable'\nimport type { EventPhase, InteractEvent } from '@interactjs/core/InteractEvent'\nimport type { Interaction, DoPhaseArg } from '@interactjs/core/Interaction'\nimport type { PerActionDefaults } from '@interactjs/core/options'\nimport type { Scope, Plugin } from '@interactjs/core/scope'\nimport type { Element, PointerEventType, Rect, ListenersArg } from '@interactjs/core/types'\nimport * as domUtils from '@interactjs/utils/domUtils'\nimport extend from '@interactjs/utils/extend'\nimport getOriginXY from '@interactjs/utils/getOriginXY'\nimport is from '@interactjs/utils/is'\nimport normalizeListeners from '@interactjs/utils/normalizeListeners'\nimport * as pointerUtils from '@interactjs/utils/pointerUtils'\n\n/* eslint-disable import/no-duplicates -- for typescript module augmentations */\nimport '../drag/plugin'\n\nimport type { DragEvent } from '../drag/plugin'\nimport drag from '../drag/plugin'\n/* eslint-enable import/no-duplicates */\n\nimport { DropEvent } from './DropEvent'\n\nexport type DropFunctionChecker = (\n dragEvent: any, // related drag operation\n event: any, // touch or mouse EventEmitter\n dropped: boolean, // default checker result\n dropzone: Interactable, // dropzone interactable\n dropElement: Element, // drop zone element\n draggable: Interactable, // draggable's Interactable\n draggableElement: Element, // dragged element\n) => boolean\n\nexport interface DropzoneOptions extends PerActionDefaults {\n accept?:\n | string\n | Element\n | (({ dropzone, draggableElement }: { dropzone: Interactable; draggableElement: Element }) => boolean)\n // How the overlap is checked on the drop zone\n overlap?: 'pointer' | 'center' | number\n checker?: DropFunctionChecker\n\n ondropactivate?: ListenersArg\n ondropdeactivate?: ListenersArg\n ondragenter?: ListenersArg\n ondragleave?: ListenersArg\n ondropmove?: ListenersArg\n ondrop?: ListenersArg\n}\n\nexport interface DropzoneMethod {\n (this: Interactable, options: DropzoneOptions | boolean): Interactable\n (): DropzoneOptions\n}\n\ndeclare module '@interactjs/core/Interactable' {\n interface Interactable {\n /**\n *\n * ```js\n * interact('.drop').dropzone({\n * accept: '.can-drop' || document.getElementById('single-drop'),\n * overlap: 'pointer' || 'center' || zeroToOne\n * }\n * ```\n *\n * Returns or sets whether draggables can be dropped onto this target to\n * trigger drop events\n *\n * Dropzones can receive the following events:\n * - `dropactivate` and `dropdeactivate` when an acceptable drag starts and ends\n * - `dragenter` and `dragleave` when a draggable enters and leaves the dropzone\n * - `dragmove` when a draggable that has entered the dropzone is moved\n * - `drop` when a draggable is dropped into this dropzone\n *\n * Use the `accept` option to allow only elements that match the given CSS\n * selector or element. The value can be:\n *\n * - **an Element** - only that element can be dropped into this dropzone.\n * - **a string**, - the element being dragged must match it as a CSS selector.\n * - **`null`** - accept options is cleared - it accepts any element.\n *\n * Use the `overlap` option to set how drops are checked for. The allowed\n * values are:\n *\n * - `'pointer'`, the pointer must be over the dropzone (default)\n * - `'center'`, the draggable element's center must be over the dropzone\n * - a number from 0-1 which is the `(intersection area) / (draggable area)`.\n * e.g. `0.5` for drop to happen when half of the area of the draggable is\n * over the dropzone\n *\n * Use the `checker` option to specify a function to check if a dragged element\n * is over this Interactable.\n *\n * @param options - The new options to be set\n */\n dropzone(options: DropzoneOptions | boolean): Interactable\n /** @returns The current setting */\n dropzone(): DropzoneOptions\n\n /**\n * ```js\n * interact(target)\n * .dropChecker(function(dragEvent, // related dragmove or dragend event\n * event, // TouchEvent/PointerEvent/MouseEvent\n * dropped, // bool result of the default checker\n * dropzone, // dropzone Interactable\n * dropElement, // dropzone elemnt\n * draggable, // draggable Interactable\n * draggableElement) {// draggable element\n *\n * return dropped && event.target.hasAttribute('allow-drop')\n * }\n * ```\n */\n dropCheck(\n dragEvent: InteractEvent,\n event: PointerEventType,\n draggable: Interactable,\n draggableElement: Element,\n dropElemen: Element,\n rect: any,\n ): boolean\n }\n}\n\ndeclare module '@interactjs/core/Interaction' {\n interface Interaction {\n dropState?: DropState\n }\n}\n\ndeclare module '@interactjs/core/InteractEvent' {\n interface InteractEvent {\n /** @internal */\n prevDropzone?: Interactable\n dropzone?: Interactable\n dragEnter?: Element\n dragLeave?: Element\n }\n}\n\ndeclare module '@interactjs/core/options' {\n interface ActionDefaults {\n drop: DropzoneOptions\n }\n}\n\ndeclare module '@interactjs/core/scope' {\n interface Scope {\n dynamicDrop?: boolean\n }\n\n interface SignalArgs {\n 'actions/drop:start': DropSignalArg\n 'actions/drop:move': DropSignalArg\n 'actions/drop:end': DropSignalArg\n }\n}\n\ndeclare module '@interactjs/core/types' {\n interface ActionMap {\n drop?: typeof drop\n }\n}\n\ndeclare module '@interactjs/core/InteractStatic' {\n interface InteractStatic {\n /**\n * Returns or sets whether the dimensions of dropzone elements are calculated\n * on every dragmove or only on dragstart for the default dropChecker\n *\n * @param {boolean} [newValue] True to check on each move. False to check only\n * before start\n * @return {boolean | interact} The current setting or interact\n */\n dynamicDrop: (newValue?: boolean) => boolean | this\n }\n}\n\ninterface DropSignalArg {\n interaction: Interaction<'drag'>\n dragEvent: DragEvent\n}\n\nexport interface ActiveDrop {\n dropzone: Interactable\n element: Element\n rect: Rect\n}\n\nexport interface DropState {\n cur: {\n // the dropzone a drag target might be dropped into\n dropzone: Interactable\n // the element at the time of checking\n element: Element\n }\n prev: {\n // the dropzone that was recently dragged away from\n dropzone: Interactable\n // the element at the time of checking\n element: Element\n }\n // wheather the potential drop was rejected from a listener\n rejected: boolean\n // the drop events related to the current drag event\n events: FiredDropEvents\n activeDrops: ActiveDrop[]\n}\n\nfunction install(scope: Scope) {\n const { actions, interactStatic: interact, Interactable, defaults } = scope\n\n scope.usePlugin(drag)\n\n Interactable.prototype.dropzone = function (this: Interactable, options) {\n return dropzoneMethod(this, options)\n } as Interactable['dropzone']\n\n Interactable.prototype.dropCheck = function (\n this: Interactable,\n dragEvent,\n event,\n draggable,\n draggableElement,\n dropElement,\n rect,\n ) {\n return dropCheckMethod(this, dragEvent, event, draggable, draggableElement, dropElement, rect)\n }\n\n interact.dynamicDrop = function (newValue?: boolean) {\n if (is.bool(newValue)) {\n // if (dragging && scope.dynamicDrop !== newValue && !newValue) {\n // calcRects(dropzones)\n // }\n\n scope.dynamicDrop = newValue\n\n return interact\n }\n return scope.dynamicDrop!\n }\n\n extend(actions.phaselessTypes, {\n dragenter: true,\n dragleave: true,\n dropactivate: true,\n dropdeactivate: true,\n dropmove: true,\n drop: true,\n })\n actions.methodDict.drop = 'dropzone'\n\n scope.dynamicDrop = false\n\n defaults.actions.drop = drop.defaults\n}\n\nfunction collectDropzones({ interactables }: Scope, draggableElement: Element) {\n const drops: ActiveDrop[] = []\n\n // collect all dropzones and their elements which qualify for a drop\n for (const dropzone of interactables.list) {\n if (!dropzone.options.drop.enabled) {\n continue\n }\n\n const accept = dropzone.options.drop.accept\n\n // test the draggable draggableElement against the dropzone's accept setting\n if (\n (is.element(accept) && accept !== draggableElement) ||\n (is.string(accept) && !domUtils.matchesSelector(draggableElement, accept)) ||\n (is.func(accept) && !accept({ dropzone, draggableElement }))\n ) {\n continue\n }\n\n for (const dropzoneElement of dropzone.getAllElements()) {\n if (dropzoneElement !== draggableElement) {\n drops.push({\n dropzone,\n element: dropzoneElement,\n rect: dropzone.getRect(dropzoneElement),\n })\n }\n }\n }\n\n return drops\n}\n\nfunction fireActivationEvents(activeDrops: ActiveDrop[], event: DropEvent) {\n // loop through all active dropzones and trigger event\n for (const { dropzone, element } of activeDrops.slice()) {\n event.dropzone = dropzone\n\n // set current element as event target\n event.target = element\n dropzone.fire(event)\n event.propagationStopped = event.immediatePropagationStopped = false\n }\n}\n\n// return a new array of possible drops. getActiveDrops should always be\n// called when a drag has just started or a drag event happens while\n// dynamicDrop is true\nfunction getActiveDrops(scope: Scope, dragElement: Element) {\n // get dropzones and their elements that could receive the draggable\n const activeDrops = collectDropzones(scope, dragElement)\n\n for (const activeDrop of activeDrops) {\n activeDrop.rect = activeDrop.dropzone.getRect(activeDrop.element)\n }\n\n return activeDrops\n}\n\nfunction getDrop(\n { dropState, interactable: draggable, element: dragElement }: Interaction,\n dragEvent,\n pointerEvent,\n) {\n const validDrops: Element[] = []\n\n // collect all dropzones and their elements which qualify for a drop\n for (const { dropzone, element: dropzoneElement, rect } of dropState.activeDrops) {\n const isValid = dropzone.dropCheck(\n dragEvent,\n pointerEvent,\n draggable!,\n dragElement!,\n dropzoneElement,\n rect,\n )\n validDrops.push(isValid ? dropzoneElement : null)\n }\n\n // get the most appropriate dropzone based on DOM depth and order\n const dropIndex = domUtils.indexOfDeepestElement(validDrops)\n\n return dropState!.activeDrops[dropIndex] || null\n}\n\nfunction getDropEvents(interaction: Interaction, _pointerEvent, dragEvent: DragEvent) {\n const dropState = interaction.dropState!\n const dropEvents: Record = {\n enter: null,\n leave: null,\n activate: null,\n deactivate: null,\n move: null,\n drop: null,\n }\n\n if (dragEvent.type === 'dragstart') {\n dropEvents.activate = new DropEvent(dropState, dragEvent, 'dropactivate')\n\n dropEvents.activate.target = null as never\n dropEvents.activate.dropzone = null as never\n }\n if (dragEvent.type === 'dragend') {\n dropEvents.deactivate = new DropEvent(dropState, dragEvent, 'dropdeactivate')\n\n dropEvents.deactivate.target = null as never\n dropEvents.deactivate.dropzone = null as never\n }\n\n if (dropState.rejected) {\n return dropEvents\n }\n\n if (dropState.cur.element !== dropState.prev.element) {\n // if there was a previous dropzone, create a dragleave event\n if (dropState.prev.dropzone) {\n dropEvents.leave = new DropEvent(dropState, dragEvent, 'dragleave')\n\n dragEvent.dragLeave = dropEvents.leave.target = dropState.prev.element\n dragEvent.prevDropzone = dropEvents.leave.dropzone = dropState.prev.dropzone\n }\n // if dropzone is not null, create a dragenter event\n if (dropState.cur.dropzone) {\n dropEvents.enter = new DropEvent(dropState, dragEvent, 'dragenter')\n\n dragEvent.dragEnter = dropState.cur.element\n dragEvent.dropzone = dropState.cur.dropzone\n }\n }\n\n if (dragEvent.type === 'dragend' && dropState.cur.dropzone) {\n dropEvents.drop = new DropEvent(dropState, dragEvent, 'drop')\n\n dragEvent.dropzone = dropState.cur.dropzone\n dragEvent.relatedTarget = dropState.cur.element\n }\n if (dragEvent.type === 'dragmove' && dropState.cur.dropzone) {\n dropEvents.move = new DropEvent(dropState, dragEvent, 'dropmove')\n\n dragEvent.dropzone = dropState.cur.dropzone\n }\n\n return dropEvents\n}\n\ntype FiredDropEvents = Partial<\n Record<'leave' | 'enter' | 'move' | 'drop' | 'activate' | 'deactivate', DropEvent>\n>\n\nfunction fireDropEvents(interaction: Interaction, events: FiredDropEvents) {\n const dropState = interaction.dropState!\n const { activeDrops, cur, prev } = dropState\n\n if (events.leave) {\n prev.dropzone.fire(events.leave)\n }\n if (events.enter) {\n cur.dropzone.fire(events.enter)\n }\n if (events.move) {\n cur.dropzone.fire(events.move)\n }\n if (events.drop) {\n cur.dropzone.fire(events.drop)\n }\n\n if (events.deactivate) {\n fireActivationEvents(activeDrops, events.deactivate)\n }\n\n dropState.prev.dropzone = cur.dropzone\n dropState.prev.element = cur.element\n}\n\nfunction onEventCreated({ interaction, iEvent, event }: DoPhaseArg<'drag', EventPhase>, scope: Scope) {\n if (iEvent.type !== 'dragmove' && iEvent.type !== 'dragend') {\n return\n }\n\n const dropState = interaction.dropState!\n\n if (scope.dynamicDrop) {\n dropState.activeDrops = getActiveDrops(scope, interaction.element!)\n }\n\n const dragEvent = iEvent\n const dropResult = getDrop(interaction, dragEvent, event)\n\n // update rejected status\n dropState.rejected =\n dropState.rejected &&\n !!dropResult &&\n dropResult.dropzone === dropState.cur.dropzone &&\n dropResult.element === dropState.cur.element\n\n dropState.cur.dropzone = dropResult && dropResult.dropzone\n dropState.cur.element = dropResult && dropResult.element\n\n dropState.events = getDropEvents(interaction, event, dragEvent)\n}\n\nfunction dropzoneMethod(interactable: Interactable): DropzoneOptions\nfunction dropzoneMethod(interactable: Interactable, options: DropzoneOptions | boolean): Interactable\nfunction dropzoneMethod(interactable: Interactable, options?: DropzoneOptions | boolean) {\n if (is.object(options)) {\n interactable.options.drop.enabled = options.enabled !== false\n\n if (options.listeners) {\n const normalized = normalizeListeners(options.listeners)\n // rename 'drop' to '' as it will be prefixed with 'drop'\n const corrected = Object.keys(normalized).reduce((acc, type) => {\n const correctedType = /^(enter|leave)/.test(type)\n ? `drag${type}`\n : /^(activate|deactivate|move)/.test(type)\n ? `drop${type}`\n : type\n\n acc[correctedType] = normalized[type]\n\n return acc\n }, {})\n\n const prevListeners = interactable.options.drop.listeners\n prevListeners && interactable.off(prevListeners)\n\n interactable.on(corrected)\n interactable.options.drop.listeners = corrected\n }\n\n if (is.func(options.ondrop)) {\n interactable.on('drop', options.ondrop)\n }\n if (is.func(options.ondropactivate)) {\n interactable.on('dropactivate', options.ondropactivate)\n }\n if (is.func(options.ondropdeactivate)) {\n interactable.on('dropdeactivate', options.ondropdeactivate)\n }\n if (is.func(options.ondragenter)) {\n interactable.on('dragenter', options.ondragenter)\n }\n if (is.func(options.ondragleave)) {\n interactable.on('dragleave', options.ondragleave)\n }\n if (is.func(options.ondropmove)) {\n interactable.on('dropmove', options.ondropmove)\n }\n\n if (/^(pointer|center)$/.test(options.overlap as string)) {\n interactable.options.drop.overlap = options.overlap\n } else if (is.number(options.overlap)) {\n interactable.options.drop.overlap = Math.max(Math.min(1, options.overlap), 0)\n }\n if ('accept' in options) {\n interactable.options.drop.accept = options.accept\n }\n if ('checker' in options) {\n interactable.options.drop.checker = options.checker\n }\n\n return interactable\n }\n\n if (is.bool(options)) {\n interactable.options.drop.enabled = options\n\n return interactable\n }\n\n return interactable.options.drop\n}\n\nfunction dropCheckMethod(\n interactable: Interactable,\n dragEvent: InteractEvent,\n event: PointerEventType,\n draggable: Interactable,\n draggableElement: Element,\n dropElement: Element,\n rect: any,\n) {\n let dropped = false\n\n // if the dropzone has no rect (eg. display: none)\n // call the custom dropChecker or just return false\n if (!(rect = rect || interactable.getRect(dropElement))) {\n return interactable.options.drop.checker\n ? interactable.options.drop.checker(\n dragEvent,\n event,\n dropped,\n interactable,\n dropElement,\n draggable,\n draggableElement,\n )\n : false\n }\n\n const dropOverlap = interactable.options.drop.overlap\n\n if (dropOverlap === 'pointer') {\n const origin = getOriginXY(draggable, draggableElement, 'drag')\n const page = pointerUtils.getPageXY(dragEvent)\n\n page.x += origin.x\n page.y += origin.y\n\n const horizontal = page.x > rect.left && page.x < rect.right\n const vertical = page.y > rect.top && page.y < rect.bottom\n\n dropped = horizontal && vertical\n }\n\n const dragRect = draggable.getRect(draggableElement)\n\n if (dragRect && dropOverlap === 'center') {\n const cx = dragRect.left + dragRect.width / 2\n const cy = dragRect.top + dragRect.height / 2\n\n dropped = cx >= rect.left && cx <= rect.right && cy >= rect.top && cy <= rect.bottom\n }\n\n if (dragRect && is.number(dropOverlap)) {\n const overlapArea =\n Math.max(0, Math.min(rect.right, dragRect.right) - Math.max(rect.left, dragRect.left)) *\n Math.max(0, Math.min(rect.bottom, dragRect.bottom) - Math.max(rect.top, dragRect.top))\n\n const overlapRatio = overlapArea / (dragRect.width * dragRect.height)\n\n dropped = overlapRatio >= dropOverlap\n }\n\n if (interactable.options.drop.checker) {\n dropped = interactable.options.drop.checker(\n dragEvent,\n event,\n dropped,\n interactable,\n dropElement,\n draggable,\n draggableElement,\n )\n }\n\n return dropped\n}\n\nconst drop: Plugin = {\n id: 'actions/drop',\n install,\n listeners: {\n 'interactions:before-action-start': ({ interaction }) => {\n if (interaction.prepared.name !== 'drag') {\n return\n }\n\n interaction.dropState = {\n cur: {\n dropzone: null,\n element: null,\n },\n prev: {\n dropzone: null,\n element: null,\n },\n rejected: null,\n events: null,\n activeDrops: [],\n }\n },\n\n 'interactions:after-action-start': (\n { interaction, event, iEvent: dragEvent }: DoPhaseArg<'drag', EventPhase>,\n scope,\n ) => {\n if (interaction.prepared.name !== 'drag') {\n return\n }\n\n const dropState = interaction.dropState!\n\n // reset active dropzones\n dropState.activeDrops = []\n dropState.events = {}\n dropState.activeDrops = getActiveDrops(scope, interaction.element!)\n dropState.events = getDropEvents(interaction, event, dragEvent)\n\n if (dropState.events.activate) {\n fireActivationEvents(dropState.activeDrops, dropState.events.activate)\n scope.fire('actions/drop:start', { interaction, dragEvent })\n }\n },\n\n 'interactions:action-move': onEventCreated,\n\n 'interactions:after-action-move': (\n { interaction, iEvent: dragEvent }: DoPhaseArg<'drag', EventPhase>,\n scope,\n ) => {\n if (interaction.prepared.name !== 'drag') {\n return\n }\n\n const dropState = interaction.dropState!\n fireDropEvents(interaction, dropState.events)\n\n scope.fire('actions/drop:move', { interaction, dragEvent })\n dropState.events = {}\n },\n\n 'interactions:action-end': (arg: DoPhaseArg<'drag', EventPhase>, scope) => {\n if (arg.interaction.prepared.name !== 'drag') {\n return\n }\n\n const { interaction, iEvent: dragEvent } = arg\n\n onEventCreated(arg, scope)\n fireDropEvents(interaction, interaction.dropState!.events)\n scope.fire('actions/drop:end', { interaction, dragEvent })\n },\n\n 'interactions:stop': ({ interaction }) => {\n if (interaction.prepared.name !== 'drag') {\n return\n }\n\n const { dropState } = interaction\n\n if (dropState) {\n dropState.activeDrops = null as never\n dropState.events = null as never\n dropState.cur.dropzone = null as never\n dropState.cur.element = null as never\n dropState.prev.dropzone = null as never\n dropState.prev.element = null as never\n dropState.rejected = false\n }\n },\n },\n getActiveDrops,\n getDrop,\n getDropEvents,\n fireDropEvents,\n\n filterEventType: (type: string) => type.search('drag') === 0 || type.search('drop') === 0,\n\n defaults: {\n enabled: false,\n accept: null as never,\n overlap: 'pointer',\n } as DropzoneOptions,\n}\n\nexport default drop\n","import type { Interactable } from '@interactjs/core/Interactable'\nimport type { InteractEvent, EventPhase } from '@interactjs/core/InteractEvent'\nimport type { Interaction, DoPhaseArg } from '@interactjs/core/Interaction'\nimport type { PerActionDefaults } from '@interactjs/core/options'\nimport type { Scope, Plugin } from '@interactjs/core/scope'\nimport type { Rect, PointerType, ListenersArg, OrBoolean } from '@interactjs/core/types'\nimport is from '@interactjs/utils/is'\nimport * as pointerUtils from '@interactjs/utils/pointerUtils'\n\ndeclare module '@interactjs/core/Interaction' {\n interface Interaction {\n gesture?: {\n angle: number // angle from first to second touch\n distance: number\n scale: number // gesture.distance / gesture.startDistance\n startAngle: number // angle of line joining two touches\n startDistance: number // distance between two touches of touchStart\n }\n }\n}\n\ndeclare module '@interactjs/core/Interactable' {\n interface Interactable {\n gesturable(options: Partial> | boolean): this\n gesturable(): GesturableOptions\n /**\n * ```js\n * interact(element).gesturable({\n * onstart: function (event) {},\n * onmove : function (event) {},\n * onend : function (event) {},\n *\n * // limit multiple gestures.\n * // See the explanation in {@link Interactable.draggable} example\n * max: Infinity,\n * maxPerElement: 1,\n * })\n *\n * var isGestureable = interact(element).gesturable()\n * ```\n *\n * Gets or sets whether multitouch gestures can be performed on the target\n *\n * @param options - true/false or An object with event listeners to be fired on gesture events (makes the Interactable gesturable)\n * @returns A boolean indicating if this can be the target of gesture events, or this Interactable\n */\n gesturable(options?: Partial> | boolean): this | GesturableOptions\n }\n}\n\ndeclare module '@interactjs/core/options' {\n interface ActionDefaults {\n gesture: GesturableOptions\n }\n}\n\ndeclare module '@interactjs/core/types' {\n interface ActionMap {\n gesture?: typeof gesture\n }\n}\n\nexport interface GesturableOptions extends PerActionDefaults {\n onstart?: ListenersArg\n onmove?: ListenersArg\n onend?: ListenersArg\n}\n\nexport interface GestureEvent extends InteractEvent<'gesture'> {\n distance: number\n angle: number\n da: number // angle change\n scale: number // ratio of distance start to current event\n ds: number // scale change\n box: Rect // enclosing box of all points\n touches: PointerType[]\n}\n\nexport interface GestureSignalArg extends DoPhaseArg<'gesture', EventPhase> {\n iEvent: GestureEvent\n interaction: Interaction<'gesture'>\n}\n\nfunction install(scope: Scope) {\n const { actions, Interactable, defaults } = scope\n\n Interactable.prototype.gesturable = function (\n this: InstanceType,\n options: GesturableOptions | boolean,\n ) {\n if (is.object(options)) {\n this.options.gesture.enabled = options.enabled !== false\n this.setPerAction('gesture', options)\n this.setOnEvents('gesture', options)\n\n return this\n }\n\n if (is.bool(options)) {\n this.options.gesture.enabled = options\n\n return this\n }\n\n return this.options.gesture as GesturableOptions\n } as Interactable['gesturable']\n\n actions.map.gesture = gesture\n actions.methodDict.gesture = 'gesturable'\n\n defaults.actions.gesture = gesture.defaults\n}\n\nfunction updateGestureProps({ interaction, iEvent, phase }: GestureSignalArg) {\n if (interaction.prepared.name !== 'gesture') return\n\n const pointers = interaction.pointers.map((p) => p.pointer)\n const starting = phase === 'start'\n const ending = phase === 'end'\n const deltaSource = interaction.interactable.options.deltaSource\n\n iEvent.touches = [pointers[0], pointers[1]]\n\n if (starting) {\n iEvent.distance = pointerUtils.touchDistance(pointers, deltaSource)\n iEvent.box = pointerUtils.touchBBox(pointers)\n iEvent.scale = 1\n iEvent.ds = 0\n iEvent.angle = pointerUtils.touchAngle(pointers, deltaSource)\n iEvent.da = 0\n\n interaction.gesture.startDistance = iEvent.distance\n interaction.gesture.startAngle = iEvent.angle\n } else if (ending || interaction.pointers.length < 2) {\n const prevEvent = interaction.prevEvent as GestureEvent\n\n iEvent.distance = prevEvent.distance\n iEvent.box = prevEvent.box\n iEvent.scale = prevEvent.scale\n iEvent.ds = 0\n iEvent.angle = prevEvent.angle\n iEvent.da = 0\n } else {\n iEvent.distance = pointerUtils.touchDistance(pointers, deltaSource)\n iEvent.box = pointerUtils.touchBBox(pointers)\n iEvent.scale = iEvent.distance / interaction.gesture.startDistance\n iEvent.angle = pointerUtils.touchAngle(pointers, deltaSource)\n\n iEvent.ds = iEvent.scale - interaction.gesture.scale\n iEvent.da = iEvent.angle - interaction.gesture.angle\n }\n\n interaction.gesture.distance = iEvent.distance\n interaction.gesture.angle = iEvent.angle\n\n if (is.number(iEvent.scale) && iEvent.scale !== Infinity && !isNaN(iEvent.scale)) {\n interaction.gesture.scale = iEvent.scale\n }\n}\n\nconst gesture: Plugin = {\n id: 'actions/gesture',\n before: ['actions/drag', 'actions/resize'],\n install,\n listeners: {\n 'interactions:action-start': updateGestureProps,\n 'interactions:action-move': updateGestureProps,\n 'interactions:action-end': updateGestureProps,\n\n 'interactions:new': ({ interaction }) => {\n interaction.gesture = {\n angle: 0,\n distance: 0,\n scale: 1,\n startAngle: 0,\n startDistance: 0,\n }\n },\n\n 'auto-start:check': (arg) => {\n if (arg.interaction.pointers.length < 2) {\n return undefined\n }\n\n const gestureOptions = arg.interactable.options.gesture\n\n if (!(gestureOptions && gestureOptions.enabled)) {\n return undefined\n }\n\n arg.action = { name: 'gesture' }\n\n return false\n },\n },\n\n defaults: {},\n\n getCursor() {\n return ''\n },\n\n filterEventType: (type: string) => type.search('gesture') === 0,\n}\n\nexport default gesture\n","import type { Interactable } from '@interactjs/core/Interactable'\nimport type { EventPhase, InteractEvent } from '@interactjs/core/InteractEvent'\nimport type { Interaction } from '@interactjs/core/Interaction'\nimport type { PerActionDefaults } from '@interactjs/core/options'\nimport type { Scope, Plugin } from '@interactjs/core/scope'\nimport type {\n ActionName,\n ActionProps,\n EdgeOptions,\n FullRect,\n ListenersArg,\n OrBoolean,\n Point,\n Rect,\n} from '@interactjs/core/types'\nimport * as dom from '@interactjs/utils/domUtils'\nimport extend from '@interactjs/utils/extend'\nimport is from '@interactjs/utils/is'\n\nexport type EdgeName = 'top' | 'left' | 'bottom' | 'right'\n\ndeclare module '@interactjs/core/Interactable' {\n interface Interactable {\n resizable(): ResizableOptions\n resizable(options: Partial> | boolean): this\n /**\n * ```js\n * interact(element).resizable({\n * onstart: function (event) {},\n * onmove : function (event) {},\n * onend : function (event) {},\n *\n * edges: {\n * top : true, // Use pointer coords to check for resize.\n * left : false, // Disable resizing from left edge.\n * bottom: '.resize-s',// Resize if pointer target matches selector\n * right : handleEl // Resize if pointer target is the given Element\n * },\n *\n * // Width and height can be adjusted independently. When `true`, width and\n * // height are adjusted at a 1:1 ratio.\n * square: false,\n *\n * // Width and height can be adjusted independently. When `true`, width and\n * // height maintain the aspect ratio they had when resizing started.\n * preserveAspectRatio: false,\n *\n * // a value of 'none' will limit the resize rect to a minimum of 0x0\n * // 'negate' will allow the rect to have negative width/height\n * // 'reposition' will keep the width/height positive by swapping\n * // the top and bottom edges and/or swapping the left and right edges\n * invert: 'none' || 'negate' || 'reposition'\n *\n * // limit multiple resizes.\n * // See the explanation in the {@link Interactable.draggable} example\n * max: Infinity,\n * maxPerElement: 1,\n * })\n *\n * var isResizeable = interact(element).resizable()\n * ```\n *\n * Gets or sets whether resize actions can be performed on the target\n *\n * @param options - true/false or An object with event\n * listeners to be fired on resize events (object makes the Interactable\n * resizable)\n * @returns A boolean indicating if this can be the\n * target of resize elements, or this Interactable\n */\n resizable(options?: Partial> | boolean): this | ResizableOptions\n }\n}\n\ndeclare module '@interactjs/core/Interaction' {\n interface Interaction {\n resizeAxes: 'x' | 'y' | 'xy'\n styleCursor(newValue: boolean): this\n styleCursor(): boolean\n resizeStartAspectRatio: number\n }\n}\n\ndeclare module '@interactjs/core/options' {\n interface ActionDefaults {\n resize: ResizableOptions\n }\n}\n\ndeclare module '@interactjs/core/types' {\n interface ActionMap {\n resize?: typeof resize\n }\n}\n\nexport interface ResizableOptions extends PerActionDefaults {\n square?: boolean\n preserveAspectRatio?: boolean\n edges?: EdgeOptions | null\n axis?: 'x' | 'y' | 'xy' // deprecated\n invert?: 'none' | 'negate' | 'reposition'\n margin?: number\n squareResize?: boolean\n oninertiastart?: ListenersArg\n onstart?: ListenersArg\n onmove?: ListenersArg\n onend?: ListenersArg\n}\n\nexport interface ResizeEvent

extends InteractEvent<'resize', P> {\n deltaRect?: FullRect\n edges?: ActionProps['edges']\n}\n\nfunction install(scope: Scope) {\n const {\n actions,\n browser,\n Interactable, // tslint:disable-line no-shadowed-variable\n defaults,\n } = scope\n\n // Less Precision with touch input\n\n resize.cursors = initCursors(browser)\n resize.defaultMargin = browser.supportsTouch || browser.supportsPointerEvent ? 20 : 10\n\n Interactable.prototype.resizable = function (this: Interactable, options: ResizableOptions | boolean) {\n return resizable(this, options, scope)\n } as Interactable['resizable']\n\n actions.map.resize = resize\n actions.methodDict.resize = 'resizable'\n\n defaults.actions.resize = resize.defaults\n}\n\nfunction resizeChecker(arg) {\n const { interaction, interactable, element, rect, buttons } = arg\n\n if (!rect) {\n return undefined\n }\n\n const page = extend({}, interaction.coords.cur.page)\n const resizeOptions = interactable.options.resize\n\n if (\n !(resizeOptions && resizeOptions.enabled) ||\n // check mouseButton setting if the pointer is down\n (interaction.pointerIsDown &&\n /mouse|pointer/.test(interaction.pointerType) &&\n (buttons & resizeOptions.mouseButtons) === 0)\n ) {\n return undefined\n }\n\n // if using resize.edges\n if (is.object(resizeOptions.edges)) {\n const resizeEdges = {\n left: false,\n right: false,\n top: false,\n bottom: false,\n }\n\n for (const edge in resizeEdges) {\n resizeEdges[edge] = checkResizeEdge(\n edge,\n resizeOptions.edges[edge],\n page,\n interaction._latestPointer.eventTarget,\n element,\n rect,\n resizeOptions.margin || resize.defaultMargin,\n )\n }\n\n resizeEdges.left = resizeEdges.left && !resizeEdges.right\n resizeEdges.top = resizeEdges.top && !resizeEdges.bottom\n\n if (resizeEdges.left || resizeEdges.right || resizeEdges.top || resizeEdges.bottom) {\n arg.action = {\n name: 'resize',\n edges: resizeEdges,\n }\n }\n } else {\n const right = resizeOptions.axis !== 'y' && page.x > rect.right - resize.defaultMargin\n const bottom = resizeOptions.axis !== 'x' && page.y > rect.bottom - resize.defaultMargin\n\n if (right || bottom) {\n arg.action = {\n name: 'resize',\n axes: (right ? 'x' : '') + (bottom ? 'y' : ''),\n }\n }\n }\n\n return arg.action ? false : undefined\n}\n\nfunction resizable(interactable: Interactable, options: OrBoolean | boolean, scope: Scope) {\n if (is.object(options)) {\n interactable.options.resize.enabled = options.enabled !== false\n interactable.setPerAction('resize', options)\n interactable.setOnEvents('resize', options)\n\n if (is.string(options.axis) && /^x$|^y$|^xy$/.test(options.axis)) {\n interactable.options.resize.axis = options.axis\n } else if (options.axis === null) {\n interactable.options.resize.axis = scope.defaults.actions.resize.axis\n }\n\n if (is.bool(options.preserveAspectRatio)) {\n interactable.options.resize.preserveAspectRatio = options.preserveAspectRatio\n } else if (is.bool(options.square)) {\n interactable.options.resize.square = options.square\n }\n\n return interactable\n }\n if (is.bool(options)) {\n interactable.options.resize.enabled = options\n\n return interactable\n }\n return interactable.options.resize\n}\n\nfunction checkResizeEdge(\n name: string,\n value: any,\n page: Point,\n element: Node,\n interactableElement: Element,\n rect: Rect,\n margin: number,\n) {\n // false, '', undefined, null\n if (!value) {\n return false\n }\n\n // true value, use pointer coords and element rect\n if (value === true) {\n // if dimensions are negative, \"switch\" edges\n const width = is.number(rect.width) ? rect.width : rect.right - rect.left\n const height = is.number(rect.height) ? rect.height : rect.bottom - rect.top\n\n // don't use margin greater than half the relevent dimension\n margin = Math.min(margin, Math.abs((name === 'left' || name === 'right' ? width : height) / 2))\n\n if (width < 0) {\n if (name === 'left') {\n name = 'right'\n } else if (name === 'right') {\n name = 'left'\n }\n }\n if (height < 0) {\n if (name === 'top') {\n name = 'bottom'\n } else if (name === 'bottom') {\n name = 'top'\n }\n }\n\n if (name === 'left') {\n const edge = width >= 0 ? rect.left : rect.right\n return page.x < edge + margin\n }\n if (name === 'top') {\n const edge = height >= 0 ? rect.top : rect.bottom\n return page.y < edge + margin\n }\n\n if (name === 'right') {\n return page.x > (width >= 0 ? rect.right : rect.left) - margin\n }\n if (name === 'bottom') {\n return page.y > (height >= 0 ? rect.bottom : rect.top) - margin\n }\n }\n\n // the remaining checks require an element\n if (!is.element(element)) {\n return false\n }\n\n return is.element(value)\n ? // the value is an element to use as a resize handle\n value === element\n : // otherwise check if element matches value as selector\n dom.matchesUpTo(element, value, interactableElement)\n}\n\n/* eslint-disable multiline-ternary */\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\nfunction initCursors(browser: typeof import('@interactjs/utils/browser').default) {\n return browser.isIe9\n ? {\n x: 'e-resize',\n y: 's-resize',\n xy: 'se-resize',\n\n top: 'n-resize',\n left: 'w-resize',\n bottom: 's-resize',\n right: 'e-resize',\n topleft: 'se-resize',\n bottomright: 'se-resize',\n topright: 'ne-resize',\n bottomleft: 'ne-resize',\n }\n : {\n x: 'ew-resize',\n y: 'ns-resize',\n xy: 'nwse-resize',\n\n top: 'ns-resize',\n left: 'ew-resize',\n bottom: 'ns-resize',\n right: 'ew-resize',\n topleft: 'nwse-resize',\n bottomright: 'nwse-resize',\n topright: 'nesw-resize',\n bottomleft: 'nesw-resize',\n }\n}\n/* eslint-enable multiline-ternary */\n\nfunction start({ iEvent, interaction }: { iEvent: InteractEvent; interaction: Interaction }) {\n if (interaction.prepared.name !== 'resize' || !interaction.prepared.edges) {\n return\n }\n\n const resizeEvent = iEvent as ResizeEvent\n const rect = interaction.rect\n\n interaction._rects = {\n start: extend({}, rect),\n corrected: extend({}, rect),\n previous: extend({}, rect),\n delta: {\n left: 0,\n right: 0,\n width: 0,\n top: 0,\n bottom: 0,\n height: 0,\n },\n }\n\n resizeEvent.edges = interaction.prepared.edges\n resizeEvent.rect = interaction._rects.corrected\n resizeEvent.deltaRect = interaction._rects.delta\n}\n\nfunction move({ iEvent, interaction }: { iEvent: InteractEvent; interaction: Interaction }) {\n if (interaction.prepared.name !== 'resize' || !interaction.prepared.edges) return\n\n const resizeEvent = iEvent as ResizeEvent\n const resizeOptions = interaction.interactable.options.resize\n const invert = resizeOptions.invert\n const invertible = invert === 'reposition' || invert === 'negate'\n\n const current = interaction.rect\n const { start: startRect, corrected, delta: deltaRect, previous } = interaction._rects\n\n extend(previous, corrected)\n\n if (invertible) {\n // if invertible, copy the current rect\n extend(corrected, current)\n\n if (invert === 'reposition') {\n // swap edge values if necessary to keep width/height positive\n if (corrected.top > corrected.bottom) {\n const swap = corrected.top\n\n corrected.top = corrected.bottom\n corrected.bottom = swap\n }\n if (corrected.left > corrected.right) {\n const swap = corrected.left\n\n corrected.left = corrected.right\n corrected.right = swap\n }\n }\n } else {\n // if not invertible, restrict to minimum of 0x0 rect\n corrected.top = Math.min(current.top, startRect.bottom)\n corrected.bottom = Math.max(current.bottom, startRect.top)\n corrected.left = Math.min(current.left, startRect.right)\n corrected.right = Math.max(current.right, startRect.left)\n }\n\n corrected.width = corrected.right - corrected.left\n corrected.height = corrected.bottom - corrected.top\n\n for (const edge in corrected) {\n deltaRect[edge] = corrected[edge] - previous[edge]\n }\n\n resizeEvent.edges = interaction.prepared.edges\n resizeEvent.rect = corrected\n resizeEvent.deltaRect = deltaRect\n}\n\nfunction end({ iEvent, interaction }: { iEvent: InteractEvent; interaction: Interaction }) {\n if (interaction.prepared.name !== 'resize' || !interaction.prepared.edges) return\n\n const resizeEvent = iEvent as ResizeEvent\n\n resizeEvent.edges = interaction.prepared.edges\n resizeEvent.rect = interaction._rects.corrected\n resizeEvent.deltaRect = interaction._rects.delta\n}\n\nfunction updateEventAxes({\n iEvent,\n interaction,\n}: {\n iEvent: InteractEvent\n interaction: Interaction\n}) {\n if (interaction.prepared.name !== 'resize' || !interaction.resizeAxes) return\n\n const options = interaction.interactable.options\n const resizeEvent = iEvent as ResizeEvent\n\n if (options.resize.square) {\n if (interaction.resizeAxes === 'y') {\n resizeEvent.delta.x = resizeEvent.delta.y\n } else {\n resizeEvent.delta.y = resizeEvent.delta.x\n }\n resizeEvent.axes = 'xy'\n } else {\n resizeEvent.axes = interaction.resizeAxes\n\n if (interaction.resizeAxes === 'x') {\n resizeEvent.delta.y = 0\n } else if (interaction.resizeAxes === 'y') {\n resizeEvent.delta.x = 0\n }\n }\n}\n\nconst resize: Plugin = {\n id: 'actions/resize',\n before: ['actions/drag'],\n install,\n listeners: {\n 'interactions:new': ({ interaction }) => {\n interaction.resizeAxes = 'xy'\n },\n\n 'interactions:action-start': (arg) => {\n start(arg)\n updateEventAxes(arg)\n },\n 'interactions:action-move': (arg) => {\n move(arg)\n updateEventAxes(arg)\n },\n 'interactions:action-end': end,\n 'auto-start:check': resizeChecker,\n },\n\n defaults: {\n square: false,\n preserveAspectRatio: false,\n axis: 'xy',\n\n // use default margin\n margin: NaN,\n\n // object with props left, right, top, bottom which are\n // true/false values to resize when the pointer is over that edge,\n // CSS selectors to match the handles for each direction\n // or the Elements for each handle\n edges: null,\n\n // a value of 'none' will limit the resize rect to a minimum of 0x0\n // 'negate' will alow the rect to have negative width/height\n // 'reposition' will keep the width/height positive by swapping\n // the top and bottom edges and/or swapping the left and right edges\n invert: 'none',\n } as ResizableOptions,\n\n cursors: null as ReturnType,\n\n getCursor({ edges, axis, name }: ActionProps) {\n const cursors = resize.cursors\n let result: string = null\n\n if (axis) {\n result = cursors[name + axis]\n } else if (edges) {\n let cursorKey = ''\n\n for (const edge of ['top', 'bottom', 'left', 'right']) {\n if (edges[edge]) {\n cursorKey += edge\n }\n }\n\n result = cursors[cursorKey]\n }\n\n return result\n },\n\n filterEventType: (type: string) => type.search('resize') === 0,\n\n defaultMargin: null as number,\n}\n\nexport default resize\n","let lastTime = 0\nlet request: typeof requestAnimationFrame\nlet cancel: typeof cancelAnimationFrame\n\nfunction init(global: Window | typeof globalThis) {\n request = global.requestAnimationFrame\n cancel = global.cancelAnimationFrame\n\n if (!request) {\n const vendors = ['ms', 'moz', 'webkit', 'o']\n\n for (const vendor of vendors) {\n request = global[`${vendor}RequestAnimationFrame` as 'requestAnimationFrame']\n cancel =\n global[`${vendor}CancelAnimationFrame` as 'cancelAnimationFrame'] ||\n global[`${vendor}CancelRequestAnimationFrame` as 'cancelAnimationFrame']\n }\n }\n\n request = request && request.bind(global)\n cancel = cancel && cancel.bind(global)\n\n if (!request) {\n request = (callback) => {\n const currTime = Date.now()\n const timeToCall = Math.max(0, 16 - (currTime - lastTime))\n const token = global.setTimeout(() => {\n // eslint-disable-next-line n/no-callback-literal\n callback(currTime + timeToCall)\n }, timeToCall)\n\n lastTime = currTime + timeToCall\n return token as any\n }\n\n cancel = (token) => clearTimeout(token)\n }\n}\n\nexport default {\n request: (callback: FrameRequestCallback) => request(callback),\n cancel: (token: number) => cancel(token),\n init,\n}\n","import type { Scope } from '@interactjs/core/scope'\n\n/* eslint-disable import/no-duplicates -- for typescript module augmentations */\nimport './drag/plugin'\nimport './drop/plugin'\nimport './gesture/plugin'\nimport './resize/plugin'\n\nimport drag from './drag/plugin'\nimport drop from './drop/plugin'\nimport gesture from './gesture/plugin'\nimport resize from './resize/plugin'\n/* eslint-enable import/no-duplicates */\n\nexport default {\n id: 'actions',\n install(scope: Scope) {\n scope.usePlugin(gesture)\n scope.usePlugin(resize)\n scope.usePlugin(drag)\n scope.usePlugin(drop)\n },\n}\n","import type { Interactable } from '@interactjs/core/Interactable'\nimport type Interaction from '@interactjs/core/Interaction'\nimport type { Scope, Plugin } from '@interactjs/core/scope'\nimport type { ActionName, PointerType } from '@interactjs/core/types'\nimport * as domUtils from '@interactjs/utils/domUtils'\nimport is from '@interactjs/utils/is'\nimport raf from '@interactjs/utils/raf'\nimport { getStringOptionResult } from '@interactjs/utils/rect'\nimport { getWindow } from '@interactjs/utils/window'\n\ndeclare module '@interactjs/core/scope' {\n interface Scope {\n autoScroll: typeof autoScroll\n }\n}\n\ndeclare module '@interactjs/core/Interaction' {\n interface Interaction {\n autoScroll?: typeof autoScroll\n }\n}\n\ndeclare module '@interactjs/core/options' {\n interface PerActionDefaults {\n autoScroll?: AutoScrollOptions\n }\n}\n\nexport interface AutoScrollOptions {\n container?: Window | HTMLElement | string\n margin?: number\n distance?: number\n interval?: number\n speed?: number\n enabled?: boolean\n}\n\nfunction install(scope: Scope) {\n const { defaults, actions } = scope\n\n scope.autoScroll = autoScroll\n autoScroll.now = () => scope.now()\n\n actions.phaselessTypes.autoscroll = true\n defaults.perAction.autoScroll = autoScroll.defaults\n}\n\nconst autoScroll = {\n defaults: {\n enabled: false,\n margin: 60,\n\n // the item that is scrolled (Window or HTMLElement)\n container: null as AutoScrollOptions['container'],\n\n // the scroll speed in pixels per second\n speed: 300,\n } as AutoScrollOptions,\n\n now: Date.now,\n\n interaction: null as Interaction | null,\n i: 0, // the handle returned by window.setInterval\n\n // Direction each pulse is to scroll in\n x: 0,\n y: 0,\n\n isScrolling: false,\n prevTime: 0,\n margin: 0,\n speed: 0,\n\n start(interaction: Interaction) {\n autoScroll.isScrolling = true\n raf.cancel(autoScroll.i)\n\n interaction.autoScroll = autoScroll\n autoScroll.interaction = interaction\n autoScroll.prevTime = autoScroll.now()\n autoScroll.i = raf.request(autoScroll.scroll)\n },\n\n stop() {\n autoScroll.isScrolling = false\n if (autoScroll.interaction) {\n autoScroll.interaction.autoScroll = null\n }\n raf.cancel(autoScroll.i)\n },\n\n // scroll the window by the values in scroll.x/y\n scroll() {\n const { interaction } = autoScroll\n const { interactable, element } = interaction\n const actionName = interaction.prepared.name\n const options = interactable.options[actionName].autoScroll\n const container = getContainer(options.container, interactable, element)\n const now = autoScroll.now()\n // change in time in seconds\n const dt = (now - autoScroll.prevTime) / 1000\n // displacement\n const s = options.speed * dt\n\n if (s >= 1) {\n const scrollBy = {\n x: autoScroll.x * s,\n y: autoScroll.y * s,\n }\n\n if (scrollBy.x || scrollBy.y) {\n const prevScroll = getScroll(container)\n\n if (is.window(container)) {\n container.scrollBy(scrollBy.x, scrollBy.y)\n } else if (container) {\n container.scrollLeft += scrollBy.x\n container.scrollTop += scrollBy.y\n }\n\n const curScroll = getScroll(container)\n const delta = {\n x: curScroll.x - prevScroll.x,\n y: curScroll.y - prevScroll.y,\n }\n\n if (delta.x || delta.y) {\n interactable.fire({\n type: 'autoscroll',\n target: element,\n interactable,\n delta,\n interaction,\n container,\n })\n }\n }\n\n autoScroll.prevTime = now\n }\n\n if (autoScroll.isScrolling) {\n raf.cancel(autoScroll.i)\n autoScroll.i = raf.request(autoScroll.scroll)\n }\n },\n check(interactable: Interactable, actionName: ActionName) {\n const options = interactable.options\n\n return options[actionName].autoScroll?.enabled\n },\n onInteractionMove({\n interaction,\n pointer,\n }: {\n interaction: Interaction\n pointer: PointerType\n }) {\n if (\n !(interaction.interacting() && autoScroll.check(interaction.interactable, interaction.prepared.name))\n ) {\n return\n }\n\n if (interaction.simulation) {\n autoScroll.x = autoScroll.y = 0\n return\n }\n\n let top: boolean\n let right: boolean\n let bottom: boolean\n let left: boolean\n\n const { interactable, element } = interaction\n const actionName = interaction.prepared.name\n const options = interactable.options[actionName].autoScroll\n const container = getContainer(options.container, interactable, element)\n\n if (is.window(container)) {\n left = pointer.clientX < autoScroll.margin\n top = pointer.clientY < autoScroll.margin\n right = pointer.clientX > container.innerWidth - autoScroll.margin\n bottom = pointer.clientY > container.innerHeight - autoScroll.margin\n } else {\n const rect = domUtils.getElementClientRect(container)\n\n left = pointer.clientX < rect.left + autoScroll.margin\n top = pointer.clientY < rect.top + autoScroll.margin\n right = pointer.clientX > rect.right - autoScroll.margin\n bottom = pointer.clientY > rect.bottom - autoScroll.margin\n }\n\n autoScroll.x = right ? 1 : left ? -1 : 0\n autoScroll.y = bottom ? 1 : top ? -1 : 0\n\n if (!autoScroll.isScrolling) {\n // set the autoScroll properties to those of the target\n autoScroll.margin = options.margin\n autoScroll.speed = options.speed\n\n autoScroll.start(interaction)\n }\n },\n}\n\nexport function getContainer(value: any, interactable: Interactable, element: Element) {\n return (\n (is.string(value) ? getStringOptionResult(value, interactable, element) : value) || getWindow(element)\n )\n}\n\nexport function getScroll(container: any) {\n if (is.window(container)) {\n container = window.document.body\n }\n\n return { x: container.scrollLeft, y: container.scrollTop }\n}\n\nexport function getScrollSize(container: any) {\n if (is.window(container)) {\n container = window.document.body\n }\n\n return { x: container.scrollWidth, y: container.scrollHeight }\n}\n\nexport function getScrollSizeDelta(\n {\n interaction,\n element,\n }: {\n interaction: Partial>\n element: Element\n },\n func: any,\n) {\n const scrollOptions = interaction && interaction.interactable.options[interaction.prepared.name].autoScroll\n\n if (!scrollOptions || !scrollOptions.enabled) {\n func()\n return { x: 0, y: 0 }\n }\n\n const scrollContainer = getContainer(scrollOptions.container, interaction.interactable, element)\n\n const prevSize = getScroll(scrollContainer)\n func()\n const curSize = getScroll(scrollContainer)\n\n return {\n x: curSize.x - prevSize.x,\n y: curSize.y - prevSize.y,\n }\n}\n\nconst autoScrollPlugin: Plugin = {\n id: 'auto-scroll',\n install,\n listeners: {\n 'interactions:new': ({ interaction }) => {\n interaction.autoScroll = null\n },\n\n 'interactions:destroy': ({ interaction }) => {\n interaction.autoScroll = null\n autoScroll.stop()\n if (autoScroll.interaction) {\n autoScroll.interaction = null\n }\n },\n\n 'interactions:stop': autoScroll.stop,\n\n 'interactions:action-move': (arg: any) => autoScroll.onInteractionMove(arg),\n },\n}\n\nexport default autoScrollPlugin\n","import type { ActionName, ActionProps } from '@interactjs/core/types'\n\nimport { window } from './window'\n\nexport function warnOnce(this: T, method: (...args: any[]) => any, message: string) {\n let warned = false\n\n return function (this: T) {\n if (!warned) {\n ;(window as any).console.warn(message)\n warned = true\n }\n\n return method.apply(this, arguments)\n }\n}\n\nexport function copyAction(dest: ActionProps, src: ActionProps) {\n dest.name = src.name\n dest.axis = src.axis\n dest.edges = src.edges\n\n return dest\n}\n\nexport const sign = (n: number) => (n >= 0 ? 1 : -1)\n","import type { Interactable } from '@interactjs/core/Interactable'\nimport type { Interaction } from '@interactjs/core/Interaction'\nimport type { Scope } from '@interactjs/core/scope'\nimport type { ActionProps, PointerType, PointerEventType, Element } from '@interactjs/core/types'\nimport is from '@interactjs/utils/is'\nimport { warnOnce } from '@interactjs/utils/misc'\n\ndeclare module '@interactjs/core/Interactable' {\n interface Interactable {\n getAction: (\n this: Interactable,\n pointer: PointerType,\n event: PointerEventType,\n interaction: Interaction,\n element: Element,\n ) => ActionProps | null\n styleCursor(newValue: boolean): this\n styleCursor(): boolean\n /**\n * Returns or sets whether the the cursor should be changed depending on the\n * action that would be performed if the mouse were pressed and dragged.\n *\n * @param {boolean} [newValue]\n * @return {boolean | Interactable} The current setting or this Interactable\n */\n styleCursor(newValue?: boolean): boolean | this\n actionChecker(checker: Function): Interactable\n actionChecker(): Function\n /**\n * ```js\n * interact('.resize-drag')\n * .resizable(true)\n * .draggable(true)\n * .actionChecker(function (pointer, event, action, interactable, element, interaction) {\n *\n * if (interact.matchesSelector(event.target, '.drag-handle')) {\n * // force drag with handle target\n * action.name = drag\n * }\n * else {\n * // resize from the top and right edges\n * action.name = 'resize'\n * action.edges = { top: true, right: true }\n * }\n *\n * return action\n * })\n * ```\n *\n * Returns or sets the function used to check action to be performed on\n * pointerDown\n *\n * @param checker - A function which takes a pointer event,\n * defaultAction string, interactable, element and interaction as parameters\n * and returns an object with name property 'drag' 'resize' or 'gesture' and\n * optionally an `edges` object with boolean 'top', 'left', 'bottom' and right\n * props.\n * @returns The checker function or this Interactable\n */\n actionChecker(checker?: Function): Interactable | Function\n /** @returns This interactable */\n ignoreFrom(newValue: string | Element | null): Interactable\n /** @returns The current ignoreFrom value */\n ignoreFrom(): string | Element | null\n /**\n * If the target of the `mousedown`, `pointerdown` or `touchstart` event or any\n * of it's parents match the given CSS selector or Element, no\n * drag/resize/gesture is started.\n *\n * @deprecated\n * Don't use this method. Instead set the `ignoreFrom` option for each action\n * or for `pointerEvents`\n *\n * ```js\n * interact(targett)\n * .draggable({\n * ignoreFrom: 'input, textarea, a[href]'',\n * })\n * .pointerEvents({\n * ignoreFrom: '[no-pointer]',\n * })\n * ```\n * Interactable\n */\n ignoreFrom(\n /** a CSS selector string, an Element or `null` to not ignore any elements */\n newValue?: string | Element | null,\n ): Interactable | string | Element | null\n allowFrom(): boolean\n /**\n *\n * A drag/resize/gesture is started only If the target of the `mousedown`,\n * `pointerdown` or `touchstart` event or any of it's parents match the given\n * CSS selector or Element.\n *\n * @deprecated\n * Don't use this method. Instead set the `allowFrom` option for each action\n * or for `pointerEvents`\n *\n * ```js\n * interact(targett)\n * .resizable({\n * allowFrom: '.resize-handle',\n * .pointerEvents({\n * allowFrom: '.handle',,\n * })\n * ```\n *\n * @param {string | Element | null} [newValue]\n * @return {string | Element | object} The current allowFrom value or this\n * Interactable\n */\n allowFrom(\n /** A CSS selector string, an Element or `null` to allow from any element */\n newValue: string | Element | null,\n ): Interactable\n }\n}\n\nfunction install(scope: Scope) {\n const {\n Interactable, // tslint:disable-line no-shadowed-variable\n } = scope\n\n Interactable.prototype.getAction = function getAction(\n this: Interactable,\n pointer: PointerType,\n event: PointerEventType,\n interaction: Interaction,\n element: Element,\n ): ActionProps {\n const action = defaultActionChecker(this, event, interaction, element, scope)\n\n if (this.options.actionChecker) {\n return this.options.actionChecker(pointer, event, action, this, element, interaction)\n }\n\n return action\n }\n\n Interactable.prototype.ignoreFrom = warnOnce(function (this: Interactable, newValue) {\n return this._backCompatOption('ignoreFrom', newValue)\n }, 'Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue}).')\n\n Interactable.prototype.allowFrom = warnOnce(function (this: Interactable, newValue) {\n return this._backCompatOption('allowFrom', newValue)\n }, 'Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue}).')\n\n Interactable.prototype.actionChecker = actionChecker\n\n Interactable.prototype.styleCursor = styleCursor\n}\n\nfunction defaultActionChecker(\n interactable: Interactable,\n event: PointerEventType,\n interaction: Interaction,\n element: Element,\n scope: Scope,\n) {\n const rect = interactable.getRect(element)\n const buttons =\n (event as MouseEvent).buttons ||\n {\n 0: 1,\n 1: 4,\n 3: 8,\n 4: 16,\n }[(event as MouseEvent).button as 0 | 1 | 3 | 4]\n const arg = {\n action: null,\n interactable,\n interaction,\n element,\n rect,\n buttons,\n }\n\n scope.fire('auto-start:check', arg)\n\n return arg.action\n}\n\nfunction styleCursor(this: Interactable, newValue?: boolean) {\n if (is.bool(newValue)) {\n this.options.styleCursor = newValue\n\n return this\n }\n\n if (newValue === null) {\n delete this.options.styleCursor\n\n return this\n }\n\n return this.options.styleCursor\n}\n\nfunction actionChecker(this: Interactable, checker?: any) {\n if (is.func(checker)) {\n this.options.actionChecker = checker\n\n return this\n }\n\n if (checker === null) {\n delete this.options.actionChecker\n\n return this\n }\n\n return this.options.actionChecker\n}\n\nexport default {\n id: 'auto-start/interactableMethods',\n install,\n}\n","import type { Interactable } from '@interactjs/core/Interactable'\nimport type { Interaction } from '@interactjs/core/Interaction'\nimport type { Scope, SignalArgs, Plugin } from '@interactjs/core/scope'\nimport type {\n CursorChecker,\n PointerType,\n PointerEventType,\n Element,\n ActionName,\n ActionProps,\n} from '@interactjs/core/types'\nimport * as domUtils from '@interactjs/utils/domUtils'\nimport extend from '@interactjs/utils/extend'\nimport is from '@interactjs/utils/is'\nimport { copyAction } from '@interactjs/utils/misc'\n\n/* eslint-disable import/no-duplicates -- for typescript module augmentations */\nimport './InteractableMethods'\nimport InteractableMethods from './InteractableMethods'\n/* eslint-enable import/no-duplicates */\n\ndeclare module '@interactjs/core/InteractStatic' {\n export interface InteractStatic {\n /**\n * Returns or sets the maximum number of concurrent interactions allowed. By\n * default only 1 interaction is allowed at a time (for backwards\n * compatibility). To allow multiple interactions on the same Interactables and\n * elements, you need to enable it in the draggable, resizable and gesturable\n * `'max'` and `'maxPerElement'` options.\n *\n * @param {number} [newValue] Any number. newValue <= 0 means no interactions.\n */\n maxInteractions: (newValue: any) => any\n }\n}\n\ndeclare module '@interactjs/core/scope' {\n interface Scope {\n autoStart: AutoStart\n }\n\n interface SignalArgs {\n 'autoStart:before-start': Omit & {\n interaction: Interaction\n }\n 'autoStart:prepared': { interaction: Interaction }\n 'auto-start:check': CheckSignalArg\n }\n}\n\ndeclare module '@interactjs/core/options' {\n interface BaseDefaults {\n actionChecker?: any\n cursorChecker?: any\n styleCursor?: any\n }\n\n interface PerActionDefaults {\n manualStart?: boolean\n max?: number\n maxPerElement?: number\n allowFrom?: string | Element\n ignoreFrom?: string | Element\n cursorChecker?: CursorChecker\n\n // only allow left button by default\n // see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons#Return_value\n // TODO: docst\n mouseButtons?: 0 | 1 | 2 | 4 | 8 | 16\n }\n}\n\ninterface CheckSignalArg {\n interactable: Interactable\n interaction: Interaction\n element: Element\n action: ActionProps\n buttons: number\n}\n\nexport interface AutoStart {\n // Allow this many interactions to happen simultaneously\n maxInteractions: number\n withinInteractionLimit: typeof withinInteractionLimit\n cursorElement: Element\n}\n\nfunction install(scope: Scope) {\n const { interactStatic: interact, defaults } = scope\n\n scope.usePlugin(InteractableMethods)\n\n defaults.base.actionChecker = null\n defaults.base.styleCursor = true\n\n extend(defaults.perAction, {\n manualStart: false,\n max: Infinity,\n maxPerElement: 1,\n allowFrom: null,\n ignoreFrom: null,\n\n // only allow left button by default\n // see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons#Return_value\n mouseButtons: 1,\n })\n\n interact.maxInteractions = (newValue: number) => maxInteractions(newValue, scope)\n\n scope.autoStart = {\n // Allow this many interactions to happen simultaneously\n maxInteractions: Infinity,\n withinInteractionLimit,\n cursorElement: null,\n }\n}\n\nfunction prepareOnDown(\n { interaction, pointer, event, eventTarget }: SignalArgs['interactions:down'],\n scope: Scope,\n) {\n if (interaction.interacting()) return\n\n const actionInfo = getActionInfo(interaction, pointer, event, eventTarget, scope)\n prepare(interaction, actionInfo, scope)\n}\n\nfunction prepareOnMove(\n { interaction, pointer, event, eventTarget }: SignalArgs['interactions:move'],\n scope: Scope,\n) {\n if (interaction.pointerType !== 'mouse' || interaction.pointerIsDown || interaction.interacting()) return\n\n const actionInfo = getActionInfo(interaction, pointer, event, eventTarget as Element, scope)\n prepare(interaction, actionInfo, scope)\n}\n\nfunction startOnMove(arg: SignalArgs['interactions:move'], scope: Scope) {\n const { interaction } = arg\n\n if (\n !interaction.pointerIsDown ||\n interaction.interacting() ||\n !interaction.pointerWasMoved ||\n !interaction.prepared.name\n ) {\n return\n }\n\n scope.fire('autoStart:before-start', arg)\n\n const { interactable } = interaction\n const actionName = (interaction as Interaction).prepared.name\n\n if (actionName && interactable) {\n // check manualStart and interaction limit\n if (\n interactable.options[actionName].manualStart ||\n !withinInteractionLimit(interactable, interaction.element, interaction.prepared, scope)\n ) {\n interaction.stop()\n } else {\n interaction.start(interaction.prepared, interactable, interaction.element)\n setInteractionCursor(interaction, scope)\n }\n }\n}\n\nfunction clearCursorOnStop({ interaction }: { interaction: Interaction }, scope: Scope) {\n const { interactable } = interaction\n\n if (interactable && interactable.options.styleCursor) {\n setCursor(interaction.element, '', scope)\n }\n}\n\n// Check if the current interactable supports the action.\n// If so, return the validated action. Otherwise, return null\nfunction validateAction(\n action: ActionProps,\n interactable: Interactable,\n element: Element,\n eventTarget: Node,\n scope: Scope,\n) {\n if (\n interactable.testIgnoreAllow(interactable.options[action.name], element, eventTarget) &&\n interactable.options[action.name].enabled &&\n withinInteractionLimit(interactable, element, action, scope)\n ) {\n return action\n }\n\n return null\n}\n\nfunction validateMatches(\n interaction: Interaction,\n pointer: PointerType,\n event: PointerEventType,\n matches: Interactable[],\n matchElements: Element[],\n eventTarget: Node,\n scope: Scope,\n) {\n for (let i = 0, len = matches.length; i < len; i++) {\n const match = matches[i]\n const matchElement = matchElements[i]\n const matchAction = match.getAction(pointer, event, interaction, matchElement)\n\n if (!matchAction) {\n continue\n }\n\n const action = validateAction(matchAction, match, matchElement, eventTarget, scope)\n\n if (action) {\n return {\n action,\n interactable: match,\n element: matchElement,\n }\n }\n }\n\n return { action: null, interactable: null, element: null }\n}\n\nfunction getActionInfo(\n interaction: Interaction,\n pointer: PointerType,\n event: PointerEventType,\n eventTarget: Node,\n scope: Scope,\n) {\n let matches: Interactable[] = []\n let matchElements: Element[] = []\n\n let element = eventTarget as Element\n\n function pushMatches(interactable: Interactable) {\n matches.push(interactable)\n matchElements.push(element)\n }\n\n while (is.element(element)) {\n matches = []\n matchElements = []\n\n scope.interactables.forEachMatch(element, pushMatches)\n\n const actionInfo = validateMatches(\n interaction,\n pointer,\n event,\n matches,\n matchElements,\n eventTarget,\n scope,\n )\n\n if (actionInfo.action && !actionInfo.interactable.options[actionInfo.action.name].manualStart) {\n return actionInfo\n }\n\n element = domUtils.parentNode(element) as Element\n }\n\n return { action: null, interactable: null, element: null }\n}\n\nfunction prepare(\n interaction: Interaction,\n {\n action,\n interactable,\n element,\n }: {\n action: ActionProps\n interactable: Interactable\n element: Element\n },\n scope: Scope,\n) {\n action = action || { name: null }\n\n interaction.interactable = interactable\n interaction.element = element\n copyAction(interaction.prepared, action)\n\n interaction.rect = interactable && action.name ? interactable.getRect(element) : null\n\n setInteractionCursor(interaction, scope)\n\n scope.fire('autoStart:prepared', { interaction })\n}\n\nfunction withinInteractionLimit(\n interactable: Interactable,\n element: Element,\n action: ActionProps,\n scope: Scope,\n) {\n const options = interactable.options\n const maxActions = options[action.name].max\n const maxPerElement = options[action.name].maxPerElement\n const autoStartMax = scope.autoStart.maxInteractions\n let activeInteractions = 0\n let interactableCount = 0\n let elementCount = 0\n\n // no actions if any of these values == 0\n if (!(maxActions && maxPerElement && autoStartMax)) {\n return false\n }\n\n for (const interaction of scope.interactions.list) {\n const otherAction = interaction.prepared.name\n\n if (!interaction.interacting()) {\n continue\n }\n\n activeInteractions++\n\n if (activeInteractions >= autoStartMax) {\n return false\n }\n\n if (interaction.interactable !== interactable) {\n continue\n }\n\n interactableCount += otherAction === action.name ? 1 : 0\n\n if (interactableCount >= maxActions) {\n return false\n }\n\n if (interaction.element === element) {\n elementCount++\n\n if (otherAction === action.name && elementCount >= maxPerElement) {\n return false\n }\n }\n }\n\n return autoStartMax > 0\n}\n\nfunction maxInteractions(newValue: any, scope: Scope) {\n if (is.number(newValue)) {\n scope.autoStart.maxInteractions = newValue\n\n return this\n }\n\n return scope.autoStart.maxInteractions\n}\n\nfunction setCursor(element: Element, cursor: string, scope: Scope) {\n const { cursorElement: prevCursorElement } = scope.autoStart\n\n if (prevCursorElement && prevCursorElement !== element) {\n prevCursorElement.style.cursor = ''\n }\n\n element.ownerDocument.documentElement.style.cursor = cursor\n element.style.cursor = cursor\n scope.autoStart.cursorElement = cursor ? element : null\n}\n\nfunction setInteractionCursor(interaction: Interaction, scope: Scope) {\n const { interactable, element, prepared } = interaction\n\n if (!(interaction.pointerType === 'mouse' && interactable && interactable.options.styleCursor)) {\n // clear previous target element cursor\n if (scope.autoStart.cursorElement) {\n setCursor(scope.autoStart.cursorElement, '', scope)\n }\n\n return\n }\n\n let cursor = ''\n\n if (prepared.name) {\n const cursorChecker = interactable.options[prepared.name].cursorChecker\n\n if (is.func(cursorChecker)) {\n cursor = cursorChecker(prepared, interactable, element, interaction._interacting)\n } else {\n cursor = scope.actions.map[prepared.name].getCursor(prepared)\n }\n }\n\n setCursor(interaction.element, cursor || '', scope)\n}\n\nconst autoStart: Plugin = {\n id: 'auto-start/base',\n before: ['actions'],\n install,\n listeners: {\n 'interactions:down': prepareOnDown,\n 'interactions:move': (arg, scope) => {\n prepareOnMove(arg, scope)\n startOnMove(arg, scope)\n },\n 'interactions:stop': clearCursorOnStop,\n },\n maxInteractions,\n withinInteractionLimit,\n validateAction,\n}\n\nexport default autoStart\n","import type { Interactable } from '@interactjs/core/Interactable'\nimport type Interaction from '@interactjs/core/Interaction'\nimport type { SignalArgs, Scope } from '@interactjs/core/scope'\nimport type { ActionName, Element } from '@interactjs/core/types'\nimport { parentNode } from '@interactjs/utils/domUtils'\nimport is from '@interactjs/utils/is'\n\nimport autoStart from './base'\n\nfunction beforeStart({ interaction, eventTarget, dx, dy }: SignalArgs['interactions:move'], scope: Scope) {\n if (interaction.prepared.name !== 'drag') return\n\n // check if a drag is in the correct axis\n const absX = Math.abs(dx)\n const absY = Math.abs(dy)\n const targetOptions = interaction.interactable.options.drag\n const startAxis = targetOptions.startAxis\n const currentAxis = absX > absY ? 'x' : absX < absY ? 'y' : 'xy'\n\n interaction.prepared.axis =\n targetOptions.lockAxis === 'start'\n ? (currentAxis[0] as 'x' | 'y') // always lock to one axis even if currentAxis === 'xy'\n : targetOptions.lockAxis\n\n // if the movement isn't in the startAxis of the interactable\n if (currentAxis !== 'xy' && startAxis !== 'xy' && startAxis !== currentAxis) {\n // cancel the prepared action\n ;(interaction as Interaction).prepared.name = null\n\n // then try to get a drag from another ineractable\n let element = eventTarget as Element\n\n const getDraggable = function (interactable: Interactable): Interactable | void {\n if (interactable === interaction.interactable) return\n\n const options = interaction.interactable.options.drag\n\n if (!options.manualStart && interactable.testIgnoreAllow(options, element, eventTarget)) {\n const action = interactable.getAction(\n interaction.downPointer,\n interaction.downEvent,\n interaction,\n element,\n )\n\n if (\n action &&\n action.name === 'drag' &&\n checkStartAxis(currentAxis, interactable) &&\n autoStart.validateAction(action, interactable, element, eventTarget, scope)\n ) {\n return interactable\n }\n }\n }\n\n // check all interactables\n while (is.element(element)) {\n const interactable = scope.interactables.forEachMatch(element, getDraggable)\n\n if (interactable) {\n ;(interaction as Interaction).prepared.name = 'drag'\n interaction.interactable = interactable\n interaction.element = element\n break\n }\n\n element = parentNode(element) as Element\n }\n }\n}\n\nfunction checkStartAxis(startAxis: string, interactable: Interactable) {\n if (!interactable) {\n return false\n }\n\n const thisAxis = interactable.options.drag.startAxis\n\n return startAxis === 'xy' || thisAxis === 'xy' || thisAxis === startAxis\n}\n\nexport default {\n id: 'auto-start/dragAxis',\n listeners: { 'autoStart:before-start': beforeStart },\n}\n","import type Interaction from '@interactjs/core/Interaction'\nimport type { Scope, Plugin } from '@interactjs/core/scope'\n\n/* eslint-disable import/no-duplicates -- for typescript module augmentations */\nimport './base'\nimport basePlugin from './base'\n/* eslint-enable */\n\ndeclare module '@interactjs/core/options' {\n interface PerActionDefaults {\n hold?: number\n delay?: number\n }\n}\n\ndeclare module '@interactjs/core/Interaction' {\n interface Interaction {\n autoStartHoldTimer?: any\n }\n}\n\nfunction install(scope: Scope) {\n const { defaults } = scope\n\n scope.usePlugin(basePlugin)\n\n defaults.perAction.hold = 0\n defaults.perAction.delay = 0\n}\n\nfunction getHoldDuration(interaction: Interaction) {\n const actionName = interaction.prepared && interaction.prepared.name\n\n if (!actionName) {\n return null\n }\n\n const options = interaction.interactable.options\n\n return options[actionName].hold || options[actionName].delay\n}\n\nconst hold: Plugin = {\n id: 'auto-start/hold',\n install,\n listeners: {\n 'interactions:new': ({ interaction }) => {\n interaction.autoStartHoldTimer = null\n },\n\n 'autoStart:prepared': ({ interaction }) => {\n const hold = getHoldDuration(interaction)\n\n if (hold > 0) {\n interaction.autoStartHoldTimer = setTimeout(() => {\n interaction.start(interaction.prepared, interaction.interactable, interaction.element)\n }, hold)\n }\n },\n\n 'interactions:move': ({ interaction, duplicate }) => {\n if (interaction.autoStartHoldTimer && interaction.pointerWasMoved && !duplicate) {\n clearTimeout(interaction.autoStartHoldTimer)\n interaction.autoStartHoldTimer = null\n }\n },\n\n // prevent regular down->move autoStart\n 'autoStart:before-start': ({ interaction }) => {\n const holdDuration = getHoldDuration(interaction)\n\n if (holdDuration > 0) {\n interaction.prepared.name = null\n }\n },\n },\n getHoldDuration,\n}\nexport default hold\n","import type { Scope } from '@interactjs/core/scope'\n\n/* eslint-disable import/no-duplicates -- for typescript module augmentations */\nimport './base'\nimport './dragAxis'\nimport './hold'\n\nimport autoStart from './base'\nimport dragAxis from './dragAxis'\nimport hold from './hold'\n/* eslint-enable import/no-duplicates */\n\nexport default {\n id: 'auto-start',\n install(scope: Scope) {\n scope.usePlugin(autoStart)\n scope.usePlugin(hold)\n scope.usePlugin(dragAxis)\n },\n}\n","import { matchesSelector, nodeContains } from '@interactjs/utils/domUtils'\nimport is from '@interactjs/utils/is'\nimport { getWindow } from '@interactjs/utils/window'\n\nimport type { Interactable } from '@interactjs/core/Interactable'\nimport type Interaction from '@interactjs/core/Interaction'\nimport type { Scope } from '@interactjs/core/scope'\nimport type { PointerEventType } from '@interactjs/core/types'\n\ntype PreventDefaultValue = 'always' | 'never' | 'auto'\n\ndeclare module '@interactjs/core/Interactable' {\n interface Interactable {\n preventDefault(newValue: PreventDefaultValue): this\n preventDefault(): PreventDefaultValue\n /**\n * Returns or sets whether to prevent the browser's default behaviour in\n * response to pointer events. Can be set to:\n * - `'always'` to always prevent\n * - `'never'` to never prevent\n * - `'auto'` to let interact.js try to determine what would be best\n *\n * @param newValue - `'always'`, `'never'` or `'auto'`\n * @returns The current setting or this Interactable\n */\n preventDefault(newValue?: PreventDefaultValue): PreventDefaultValue | this\n checkAndPreventDefault(event: Event): void\n }\n}\n\nconst preventDefault = function preventDefault(this: Interactable, newValue?: PreventDefaultValue) {\n if (/^(always|never|auto)$/.test(newValue)) {\n this.options.preventDefault = newValue\n return this\n }\n\n if (is.bool(newValue)) {\n this.options.preventDefault = newValue ? 'always' : 'never'\n return this\n }\n\n return this.options.preventDefault\n} as Interactable['preventDefault']\n\nfunction checkAndPreventDefault(interactable: Interactable, scope: Scope, event: Event) {\n const setting = interactable.options.preventDefault\n\n if (setting === 'never') return\n\n if (setting === 'always') {\n event.preventDefault()\n return\n }\n\n // setting === 'auto'\n\n // if the browser supports passive event listeners and isn't running on iOS,\n // don't preventDefault of touch{start,move} events. CSS touch-action and\n // user-select should be used instead of calling event.preventDefault().\n if (scope.events.supportsPassive && /^touch(start|move)$/.test(event.type)) {\n const doc = getWindow(event.target).document\n const docOptions = scope.getDocOptions(doc)\n\n if (!(docOptions && docOptions.events) || docOptions.events.passive !== false) {\n return\n }\n }\n\n // don't preventDefault of pointerdown events\n if (/^(mouse|pointer|touch)*(down|start)/i.test(event.type)) {\n return\n }\n\n // don't preventDefault on editable elements\n if (\n is.element(event.target) &&\n matchesSelector(event.target, 'input,select,textarea,[contenteditable=true],[contenteditable=true] *')\n ) {\n return\n }\n\n event.preventDefault()\n}\n\nfunction onInteractionEvent({ interaction, event }: { interaction: Interaction; event: PointerEventType }) {\n if (interaction.interactable) {\n interaction.interactable.checkAndPreventDefault(event as Event)\n }\n}\n\nexport function install(scope: Scope) {\n const { Interactable } = scope\n\n Interactable.prototype.preventDefault = preventDefault\n\n Interactable.prototype.checkAndPreventDefault = function (event) {\n return checkAndPreventDefault(this, scope, event)\n }\n\n // prevent native HTML5 drag on interact.js target elements\n scope.interactions.docEvents.push({\n type: 'dragstart',\n listener(event) {\n for (const interaction of scope.interactions.list) {\n if (\n interaction.element &&\n (interaction.element === event.target || nodeContains(interaction.element, event.target))\n ) {\n interaction.interactable.checkAndPreventDefault(event)\n return\n }\n }\n },\n })\n}\n\nexport default {\n id: 'core/interactablePreventDefault',\n install,\n listeners: ['down', 'move', 'up', 'cancel'].reduce((acc, eventType) => {\n acc[`interactions:${eventType}`] = onInteractionEvent\n return acc\n }, {} as any),\n}\n","import type { Actions } from '@interactjs/core/types'\n\nexport default function isNonNativeEvent(type: string, actions: Actions) {\n if (actions.phaselessTypes[type]) {\n return true\n }\n\n for (const name in actions.map) {\n if (type.indexOf(name) === 0 && type.substr(name.length) in actions.phases) {\n return true\n }\n }\n\n return false\n}\n","import * as arr from './arr'\nimport is from './is'\n\n// tslint:disable-next-line ban-types\nexport default function clone(source: T): Partial {\n const dest = {} as Partial\n\n for (const prop in source) {\n const value = source[prop]\n\n if (is.plainObject(value)) {\n dest[prop] = clone(value) as any\n } else if (is.array(value)) {\n dest[prop] = arr.from(value) as typeof value\n } else {\n dest[prop] = value\n }\n }\n\n return dest\n}\n","import type { EventPhase } from '@interactjs/core/InteractEvent'\nimport type { Interaction, DoAnyPhaseArg } from '@interactjs/core/Interaction'\nimport type { EdgeOptions, FullRect, Point, Rect } from '@interactjs/core/types'\nimport clone from '@interactjs/utils/clone'\nimport extend from '@interactjs/utils/extend'\nimport * as rectUtils from '@interactjs/utils/rect'\n\nimport type { Modifier, ModifierArg, ModifierState } from './types'\n\nexport interface ModificationResult {\n delta: Point\n rectDelta: Rect\n coords: Point\n rect: FullRect\n eventProps: any[]\n changed: boolean\n}\n\ninterface MethodArg {\n phase: EventPhase\n pageCoords: Point\n rect: FullRect\n coords: Point\n preEnd?: boolean\n skipModifiers?: number\n}\n\nexport class Modification {\n states: ModifierState[] = []\n startOffset: Rect = { left: 0, right: 0, top: 0, bottom: 0 }\n startDelta!: Point\n result!: ModificationResult\n endResult!: Point\n startEdges!: EdgeOptions\n edges: EdgeOptions\n readonly interaction: Readonly\n\n constructor(interaction: Interaction) {\n this.interaction = interaction\n this.result = createResult()\n this.edges = {\n left: false,\n right: false,\n top: false,\n bottom: false,\n }\n }\n\n start({ phase }: { phase: EventPhase }, pageCoords: Point) {\n const { interaction } = this\n const modifierList = getModifierList(interaction)\n this.prepareStates(modifierList)\n\n this.startEdges = extend({}, interaction.edges)\n this.edges = extend({}, this.startEdges)\n this.startOffset = getRectOffset(interaction.rect, pageCoords)\n this.startDelta = { x: 0, y: 0 }\n\n const arg = this.fillArg({\n phase,\n pageCoords,\n preEnd: false,\n })\n\n this.result = createResult()\n this.startAll(arg)\n\n const result = (this.result = this.setAll(arg))\n\n return result\n }\n\n fillArg(arg: Partial) {\n const { interaction } = this\n\n arg.interaction = interaction\n arg.interactable = interaction.interactable\n arg.element = interaction.element\n arg.rect ||= interaction.rect\n arg.edges ||= this.startEdges\n arg.startOffset = this.startOffset\n\n return arg as ModifierArg\n }\n\n startAll(arg: MethodArg & Partial) {\n for (const state of this.states) {\n if (state.methods.start) {\n arg.state = state\n state.methods.start(arg as ModifierArg)\n }\n }\n }\n\n setAll(arg: MethodArg & Partial): ModificationResult {\n const { phase, preEnd, skipModifiers, rect: unmodifiedRect, edges: unmodifiedEdges } = arg\n\n arg.coords = extend({}, arg.pageCoords)\n arg.rect = extend({}, unmodifiedRect)\n arg.edges = extend({}, unmodifiedEdges)\n\n const states = skipModifiers ? this.states.slice(skipModifiers) : this.states\n\n const newResult = createResult(arg.coords, arg.rect)\n\n for (const state of states) {\n const { options } = state\n const lastModifierCoords = extend({}, arg.coords)\n let returnValue = null\n\n if (state.methods?.set && this.shouldDo(options, preEnd, phase)) {\n arg.state = state\n returnValue = state.methods.set(arg as ModifierArg)\n\n rectUtils.addEdges(arg.edges, arg.rect, {\n x: arg.coords.x - lastModifierCoords.x,\n y: arg.coords.y - lastModifierCoords.y,\n })\n }\n\n newResult.eventProps.push(returnValue)\n }\n\n extend(this.edges, arg.edges)\n\n newResult.delta.x = arg.coords.x - arg.pageCoords.x\n newResult.delta.y = arg.coords.y - arg.pageCoords.y\n\n newResult.rectDelta.left = arg.rect.left - unmodifiedRect.left\n newResult.rectDelta.right = arg.rect.right - unmodifiedRect.right\n newResult.rectDelta.top = arg.rect.top - unmodifiedRect.top\n newResult.rectDelta.bottom = arg.rect.bottom - unmodifiedRect.bottom\n\n const prevCoords = this.result.coords\n const prevRect = this.result.rect\n\n if (prevCoords && prevRect) {\n const rectChanged =\n newResult.rect.left !== prevRect.left ||\n newResult.rect.right !== prevRect.right ||\n newResult.rect.top !== prevRect.top ||\n newResult.rect.bottom !== prevRect.bottom\n\n newResult.changed =\n rectChanged || prevCoords.x !== newResult.coords.x || prevCoords.y !== newResult.coords.y\n }\n\n return newResult\n }\n\n applyToInteraction(arg: { phase: EventPhase; rect?: Rect }) {\n const { interaction } = this\n const { phase } = arg\n const curCoords = interaction.coords.cur\n const startCoords = interaction.coords.start\n const { result, startDelta } = this\n const curDelta = result.delta\n\n if (phase === 'start') {\n extend(this.startDelta, result.delta)\n }\n\n for (const [coordsSet, delta] of [\n [startCoords, startDelta],\n [curCoords, curDelta],\n ] as const) {\n coordsSet.page.x += delta.x\n coordsSet.page.y += delta.y\n coordsSet.client.x += delta.x\n coordsSet.client.y += delta.y\n }\n\n const { rectDelta } = this.result\n const rect = arg.rect || interaction.rect\n\n rect.left += rectDelta.left\n rect.right += rectDelta.right\n rect.top += rectDelta.top\n rect.bottom += rectDelta.bottom\n\n rect.width = rect.right - rect.left\n rect.height = rect.bottom - rect.top\n }\n\n setAndApply(\n arg: Partial & {\n phase: EventPhase\n preEnd?: boolean\n skipModifiers?: number\n modifiedCoords?: Point\n },\n ): void | false {\n const { interaction } = this\n const { phase, preEnd, skipModifiers } = arg\n\n const result = this.setAll(\n this.fillArg({\n preEnd,\n phase,\n pageCoords: arg.modifiedCoords || interaction.coords.cur.page,\n }),\n )\n\n this.result = result\n\n // don't fire an action move if a modifier would keep the event in the same\n // cordinates as before\n if (\n !result.changed &&\n (!skipModifiers || skipModifiers < this.states.length) &&\n interaction.interacting()\n ) {\n return false\n }\n\n if (arg.modifiedCoords) {\n const { page } = interaction.coords.cur\n const adjustment = {\n x: arg.modifiedCoords.x - page.x,\n y: arg.modifiedCoords.y - page.y,\n }\n\n result.coords.x += adjustment.x\n result.coords.y += adjustment.y\n result.delta.x += adjustment.x\n result.delta.y += adjustment.y\n }\n\n this.applyToInteraction(arg)\n }\n\n beforeEnd(arg: Omit & { state?: ModifierState }): void | false {\n const { interaction, event } = arg\n const states = this.states\n\n if (!states || !states.length) {\n return\n }\n\n let doPreend = false\n\n for (const state of states) {\n arg.state = state\n const { options, methods } = state\n\n const endPosition = methods.beforeEnd && methods.beforeEnd(arg as unknown as ModifierArg)\n\n if (endPosition) {\n this.endResult = endPosition\n return false\n }\n\n doPreend = doPreend || (!doPreend && this.shouldDo(options, true, arg.phase, true))\n }\n\n if (doPreend) {\n // trigger a final modified move before ending\n interaction.move({ event, preEnd: true })\n }\n }\n\n stop(arg: { interaction: Interaction }) {\n const { interaction } = arg\n\n if (!this.states || !this.states.length) {\n return\n }\n\n const modifierArg: Partial = extend(\n {\n states: this.states,\n interactable: interaction.interactable,\n element: interaction.element,\n rect: null,\n },\n arg,\n )\n\n this.fillArg(modifierArg)\n\n for (const state of this.states) {\n modifierArg.state = state\n\n if (state.methods.stop) {\n state.methods.stop(modifierArg as ModifierArg)\n }\n }\n\n this.states = null\n this.endResult = null\n }\n\n prepareStates(modifierList: Modifier[]) {\n this.states = []\n\n for (let index = 0; index < modifierList.length; index++) {\n const { options, methods, name } = modifierList[index]\n\n this.states.push({\n options,\n methods,\n index,\n name,\n })\n }\n\n return this.states\n }\n\n restoreInteractionCoords({ interaction: { coords, rect, modification } }: { interaction: Interaction }) {\n if (!modification.result) return\n\n const { startDelta } = modification\n const { delta: curDelta, rectDelta } = modification.result\n\n const coordsAndDeltas = [\n [coords.start, startDelta],\n [coords.cur, curDelta],\n ]\n\n for (const [coordsSet, delta] of coordsAndDeltas as any) {\n coordsSet.page.x -= delta.x\n coordsSet.page.y -= delta.y\n coordsSet.client.x -= delta.x\n coordsSet.client.y -= delta.y\n }\n\n rect.left -= rectDelta.left\n rect.right -= rectDelta.right\n rect.top -= rectDelta.top\n rect.bottom -= rectDelta.bottom\n }\n\n shouldDo(options, preEnd?: boolean, phase?: string, requireEndOnly?: boolean) {\n if (\n // ignore disabled modifiers\n !options ||\n options.enabled === false ||\n // check if we require endOnly option to fire move before end\n (requireEndOnly && !options.endOnly) ||\n // don't apply endOnly modifiers when not ending\n (options.endOnly && !preEnd) ||\n // check if modifier should run be applied on start\n (phase === 'start' && !options.setStart)\n ) {\n return false\n }\n\n return true\n }\n\n copyFrom(other: Modification) {\n this.startOffset = other.startOffset\n this.startDelta = other.startDelta\n this.startEdges = other.startEdges\n this.edges = other.edges\n this.states = other.states.map((s) => clone(s) as ModifierState)\n this.result = createResult(extend({}, other.result.coords), extend({}, other.result.rect))\n }\n\n destroy() {\n for (const prop in this) {\n this[prop] = null\n }\n }\n}\n\nfunction createResult(coords?: Point, rect?: FullRect): ModificationResult {\n return {\n rect,\n coords,\n delta: { x: 0, y: 0 },\n rectDelta: {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n },\n eventProps: [],\n changed: true,\n }\n}\n\nfunction getModifierList(interaction) {\n const actionOptions = interaction.interactable.options[interaction.prepared.name]\n const actionModifiers = actionOptions.modifiers\n\n if (actionModifiers && actionModifiers.length) {\n return actionModifiers\n }\n\n return ['snap', 'snapSize', 'snapEdges', 'restrict', 'restrictEdges', 'restrictSize']\n .map((type) => {\n const options = actionOptions[type]\n\n return (\n options &&\n options.enabled && {\n options,\n methods: options._methods,\n }\n )\n })\n .filter((m) => !!m)\n}\n\nexport function getRectOffset(rect, coords) {\n return rect\n ? {\n left: coords.x - rect.left,\n top: coords.y - rect.top,\n right: rect.right - coords.x,\n bottom: rect.bottom - coords.y,\n }\n : {\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n }\n}\n","import type { InteractEvent } from '@interactjs/core/InteractEvent'\nimport type Interaction from '@interactjs/core/Interaction'\nimport type { Plugin } from '@interactjs/core/scope'\n\nimport { Modification } from './Modification'\nimport type { Modifier, ModifierModule, ModifierState } from './types'\n\ndeclare module '@interactjs/core/Interaction' {\n interface Interaction {\n modification?: Modification\n }\n}\n\ndeclare module '@interactjs/core/InteractEvent' {\n interface InteractEvent {\n modifiers?: Array<{\n name: string\n [key: string]: any\n }>\n }\n}\n\ndeclare module '@interactjs/core/options' {\n interface PerActionDefaults {\n modifiers?: Modifier[]\n }\n}\n\nexport function makeModifier<\n Defaults extends { enabled?: boolean },\n State extends ModifierState,\n Name extends string,\n Result,\n>(module: ModifierModule, name?: Name) {\n const { defaults } = module\n const methods = {\n start: module.start,\n set: module.set,\n beforeEnd: module.beforeEnd,\n stop: module.stop,\n }\n\n const modifier = (_options?: Partial) => {\n const options = (_options || {}) as Defaults\n\n options.enabled = options.enabled !== false\n\n // add missing defaults to options\n for (const prop in defaults) {\n if (!(prop in options)) {\n ;(options as any)[prop] = defaults[prop]\n }\n }\n\n const m: Modifier = {\n options,\n methods,\n name,\n enable: () => {\n options.enabled = true\n return m\n },\n disable: () => {\n options.enabled = false\n return m\n },\n }\n\n return m\n }\n\n if (name && typeof name === 'string') {\n // for backwrads compatibility\n modifier._defaults = defaults\n modifier._methods = methods\n }\n\n return modifier\n}\n\nexport function addEventModifiers({\n iEvent,\n interaction,\n}: {\n iEvent: InteractEvent\n interaction: Interaction\n}) {\n const result = interaction.modification!.result\n\n if (result) {\n iEvent.modifiers = result.eventProps\n }\n}\n\nconst modifiersBase: Plugin = {\n id: 'modifiers/base',\n before: ['actions'],\n install: (scope) => {\n scope.defaults.perAction.modifiers = []\n },\n listeners: {\n 'interactions:new': ({ interaction }) => {\n interaction.modification = new Modification(interaction)\n },\n\n 'interactions:before-action-start': (arg) => {\n const { interaction } = arg\n const modification = arg.interaction.modification!\n\n modification.start(arg, interaction.coords.start.page)\n interaction.edges = modification.edges\n modification.applyToInteraction(arg)\n },\n\n 'interactions:before-action-move': (arg) => {\n const { interaction } = arg\n const { modification } = interaction\n const ret = modification.setAndApply(arg)\n interaction.edges = modification.edges\n\n return ret\n },\n\n 'interactions:before-action-end': (arg) => {\n const { interaction } = arg\n const { modification } = interaction\n const ret = modification.beforeEnd(arg)\n interaction.edges = modification.startEdges\n\n return ret\n },\n\n 'interactions:action-start': addEventModifiers,\n 'interactions:action-move': addEventModifiers,\n 'interactions:action-end': addEventModifiers,\n\n 'interactions:after-action-start': (arg) => arg.interaction.modification.restoreInteractionCoords(arg),\n 'interactions:after-action-move': (arg) => arg.interaction.modification.restoreInteractionCoords(arg),\n\n 'interactions:stop': (arg) => arg.interaction.modification.stop(arg),\n },\n}\n\nexport default modifiersBase\n","import type { Point, Listeners, OrBoolean, Element, Rect } from '@interactjs/core/types'\n\nexport interface Defaults {\n base: BaseDefaults\n perAction: PerActionDefaults\n actions: ActionDefaults\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface ActionDefaults {}\n\nexport interface BaseDefaults {\n preventDefault?: 'always' | 'never' | 'auto'\n deltaSource?: 'page' | 'client'\n context?: Node\n getRect?: (element: Element) => Rect\n}\n\nexport interface PerActionDefaults {\n enabled?: boolean\n origin?: Point | string | Element\n listeners?: Listeners\n allowFrom?: string | Element\n ignoreFrom?: string | Element\n}\n\nexport type Options = Partial &\n Partial & {\n [P in keyof ActionDefaults]?: Partial\n }\n\nexport interface OptionsArg extends BaseDefaults, OrBoolean> {}\n\nexport const defaults: Defaults = {\n base: {\n preventDefault: 'auto',\n deltaSource: 'page',\n },\n\n perAction: {\n enabled: false,\n origin: { x: 0, y: 0 },\n },\n\n actions: {} as ActionDefaults,\n}\n","import extend from '@interactjs/utils/extend'\nimport getOriginXY from '@interactjs/utils/getOriginXY'\nimport hypot from '@interactjs/utils/hypot'\n\nimport type { Point, FullRect, PointerEventType, Element, ActionName } from '@interactjs/core/types'\n\nimport { BaseEvent } from './BaseEvent'\nimport type { Interaction } from './Interaction'\nimport { defaults } from './options'\n\nexport type EventPhase = keyof PhaseMap\n\nexport interface PhaseMap {\n start: true\n move: true\n end: true\n}\n\n// defined outside of class definition to avoid assignment of undefined during\n// construction\nexport interface InteractEvent {\n pageX: number\n pageY: number\n\n clientX: number\n clientY: number\n\n dx: number\n dy: number\n\n velocityX: number\n velocityY: number\n}\n\nexport class InteractEvent<\n T extends ActionName = never,\n P extends EventPhase = EventPhase,\n> extends BaseEvent {\n declare target: Element\n declare currentTarget: Element\n relatedTarget: Element | null = null\n screenX?: number\n screenY?: number\n button: number\n buttons: number\n ctrlKey: boolean\n shiftKey: boolean\n altKey: boolean\n metaKey: boolean\n page: Point\n client: Point\n delta: Point\n rect: FullRect\n x0: number\n y0: number\n t0: number\n dt: number\n duration: number\n clientX0: number\n clientY0: number\n velocity: Point\n speed: number\n swipe: ReturnType['getSwipe']>\n // resize\n axes?: 'x' | 'y' | 'xy'\n /** @internal */\n preEnd?: boolean\n\n constructor(\n interaction: Interaction,\n event: PointerEventType,\n actionName: T,\n phase: P,\n element: Element,\n preEnd?: boolean,\n type?: string,\n ) {\n super(interaction)\n\n element = element || interaction.element\n\n const target = interaction.interactable\n const deltaSource = (((target && target.options) || defaults) as any).deltaSource as 'page' | 'client'\n const origin = getOriginXY(target, element, actionName)\n const starting = phase === 'start'\n const ending = phase === 'end'\n const prevEvent = starting ? this : interaction.prevEvent\n const coords = starting\n ? interaction.coords.start\n : ending\n ? { page: prevEvent.page, client: prevEvent.client, timeStamp: interaction.coords.cur.timeStamp }\n : interaction.coords.cur\n\n this.page = extend({}, coords.page)\n this.client = extend({}, coords.client)\n this.rect = extend({}, interaction.rect)\n this.timeStamp = coords.timeStamp\n\n if (!ending) {\n this.page.x -= origin.x\n this.page.y -= origin.y\n\n this.client.x -= origin.x\n this.client.y -= origin.y\n }\n\n this.ctrlKey = event.ctrlKey\n this.altKey = event.altKey\n this.shiftKey = event.shiftKey\n this.metaKey = event.metaKey\n this.button = (event as MouseEvent).button\n this.buttons = (event as MouseEvent).buttons\n this.target = element\n this.currentTarget = element\n this.preEnd = preEnd\n this.type = type || actionName + (phase || '')\n this.interactable = target\n\n this.t0 = starting ? interaction.pointers[interaction.pointers.length - 1].downTime : prevEvent.t0\n\n this.x0 = interaction.coords.start.page.x - origin.x\n this.y0 = interaction.coords.start.page.y - origin.y\n this.clientX0 = interaction.coords.start.client.x - origin.x\n this.clientY0 = interaction.coords.start.client.y - origin.y\n\n if (starting || ending) {\n this.delta = { x: 0, y: 0 }\n } else {\n this.delta = {\n x: this[deltaSource].x - prevEvent[deltaSource].x,\n y: this[deltaSource].y - prevEvent[deltaSource].y,\n }\n }\n\n this.dt = interaction.coords.delta.timeStamp\n this.duration = this.timeStamp - this.t0\n\n // velocity and speed in pixels per second\n this.velocity = extend({}, interaction.coords.velocity[deltaSource])\n this.speed = hypot(this.velocity.x, this.velocity.y)\n\n this.swipe = ending || phase === 'inertiastart' ? this.getSwipe() : null\n }\n\n getSwipe() {\n const interaction = this._interaction\n\n if (interaction.prevEvent.speed < 600 || this.timeStamp - interaction.prevEvent.timeStamp > 150) {\n return null\n }\n\n let angle = (180 * Math.atan2(interaction.prevEvent.velocityY, interaction.prevEvent.velocityX)) / Math.PI\n const overlap = 22.5\n\n if (angle < 0) {\n angle += 360\n }\n\n const left = 135 - overlap <= angle && angle < 225 + overlap\n const up = 225 - overlap <= angle && angle < 315 + overlap\n\n const right = !left && (315 - overlap <= angle || angle < 45 + overlap)\n const down = !up && 45 - overlap <= angle && angle < 135 + overlap\n\n return {\n up,\n down,\n left,\n right,\n angle,\n speed: interaction.prevEvent.speed,\n velocity: {\n x: interaction.prevEvent.velocityX,\n y: interaction.prevEvent.velocityY,\n },\n }\n }\n\n preventDefault() {}\n\n /**\n * Don't call listeners on the remaining targets\n */\n stopImmediatePropagation() {\n this.immediatePropagationStopped = this.propagationStopped = true\n }\n\n /**\n * Don't call any other listeners (even on the current target)\n */\n stopPropagation() {\n this.propagationStopped = true\n }\n}\n\n// getters and setters defined here to support typescript 3.6 and below which\n// don't support getter and setters in .d.ts files\nObject.defineProperties(InteractEvent.prototype, {\n pageX: {\n get() {\n return this.page.x\n },\n set(value) {\n this.page.x = value\n },\n },\n pageY: {\n get() {\n return this.page.y\n },\n set(value) {\n this.page.y = value\n },\n },\n\n clientX: {\n get() {\n return this.client.x\n },\n set(value) {\n this.client.x = value\n },\n },\n clientY: {\n get() {\n return this.client.y\n },\n set(value) {\n this.client.y = value\n },\n },\n\n dx: {\n get() {\n return this.delta.x\n },\n set(value) {\n this.delta.x = value\n },\n },\n dy: {\n get() {\n return this.delta.y\n },\n set(value) {\n this.delta.y = value\n },\n },\n\n velocityX: {\n get() {\n return this.velocity.x\n },\n set(value) {\n this.velocity.x = value\n },\n },\n velocityY: {\n get() {\n return this.velocity.y\n },\n set(value) {\n this.velocity.y = value\n },\n },\n})\n","import type { PointerEventType, PointerType } from '@interactjs/core/types'\n\nexport class PointerInfo {\n id: number\n pointer: PointerType\n event: PointerEventType\n downTime: number\n downTarget: Node\n\n constructor(id: number, pointer: PointerType, event: PointerEventType, downTime: number, downTarget: Node) {\n this.id = id\n this.pointer = pointer\n this.event = event\n this.downTime = downTime\n this.downTarget = downTarget\n }\n}\n","import * as arr from '@interactjs/utils/arr'\nimport extend from '@interactjs/utils/extend'\nimport hypot from '@interactjs/utils/hypot'\nimport { warnOnce, copyAction } from '@interactjs/utils/misc'\nimport * as pointerUtils from '@interactjs/utils/pointerUtils'\nimport * as rectUtils from '@interactjs/utils/rect'\n\nimport type {\n Element,\n EdgeOptions,\n PointerEventType,\n PointerType,\n FullRect,\n CoordsSet,\n ActionName,\n ActionProps,\n} from '@interactjs/core/types'\n\nimport type { Interactable } from './Interactable'\nimport type { EventPhase } from './InteractEvent'\nimport { InteractEvent } from './InteractEvent'\nimport type { ActionDefaults } from './options'\nimport { PointerInfo } from './PointerInfo'\nimport type { Scope } from './scope'\n\nexport enum _ProxyValues {\n interactable = '',\n element = '',\n prepared = '',\n pointerIsDown = '',\n pointerWasMoved = '',\n _proxy = '',\n}\n\nexport enum _ProxyMethods {\n start = '',\n move = '',\n end = '',\n stop = '',\n interacting = '',\n}\n\nexport type PointerArgProps = {\n pointer: PointerType\n event: PointerEventType\n eventTarget: Node\n pointerIndex: number\n pointerInfo: PointerInfo\n interaction: Interaction\n} & T\n\nexport interface DoPhaseArg {\n event: PointerEventType\n phase: EventPhase\n interaction: Interaction\n iEvent: InteractEvent\n preEnd?: boolean\n type?: string\n}\n\nexport type DoAnyPhaseArg = DoPhaseArg\n\ndeclare module '@interactjs/core/scope' {\n interface SignalArgs {\n 'interactions:new': { interaction: Interaction }\n 'interactions:down': PointerArgProps<{\n type: 'down'\n }>\n 'interactions:move': PointerArgProps<{\n type: 'move'\n dx: number\n dy: number\n duplicate: boolean\n }>\n 'interactions:up': PointerArgProps<{\n type: 'up'\n curEventTarget: EventTarget\n }>\n 'interactions:cancel': SignalArgs['interactions:up'] & {\n type: 'cancel'\n curEventTarget: EventTarget\n }\n 'interactions:update-pointer': PointerArgProps<{\n down: boolean\n }>\n 'interactions:remove-pointer': PointerArgProps\n 'interactions:blur': { interaction: Interaction; event: Event; type: 'blur' }\n 'interactions:before-action-start': Omit\n 'interactions:action-start': DoAnyPhaseArg\n 'interactions:after-action-start': DoAnyPhaseArg\n 'interactions:before-action-move': Omit\n 'interactions:action-move': DoAnyPhaseArg\n 'interactions:after-action-move': DoAnyPhaseArg\n 'interactions:before-action-end': Omit\n 'interactions:action-end': DoAnyPhaseArg\n 'interactions:after-action-end': DoAnyPhaseArg\n 'interactions:stop': { interaction: Interaction }\n }\n}\n\nexport type InteractionProxy = Pick<\n Interaction,\n keyof typeof _ProxyValues | keyof typeof _ProxyMethods\n>\n\nlet idCounter = 0\n\nexport class Interaction {\n /** current interactable being interacted with */\n interactable: Interactable | null = null\n\n /** the target element of the interactable */\n element: Element | null = null\n rect: FullRect | null = null\n /** @internal */\n _rects?: {\n start: FullRect\n corrected: FullRect\n previous: FullRect\n delta: FullRect\n }\n /** @internal */\n edges: EdgeOptions | null = null\n\n /** @internal */\n _scopeFire: Scope['fire']\n\n // action that's ready to be fired on next move event\n prepared: ActionProps = {\n name: null,\n axis: null,\n edges: null,\n }\n\n pointerType: string\n\n /** @internal keep track of added pointers */\n pointers: PointerInfo[] = []\n\n /** @internal pointerdown/mousedown/touchstart event */\n downEvent: PointerEventType | null = null\n\n /** @internal */ downPointer: PointerType = {} as PointerType\n\n /** @internal */\n _latestPointer: {\n pointer: PointerType\n event: PointerEventType\n eventTarget: Node\n } = {\n pointer: null,\n event: null,\n eventTarget: null,\n }\n\n /** @internal */ prevEvent: InteractEvent = null\n\n pointerIsDown = false\n pointerWasMoved = false\n /** @internal */ _interacting = false\n /** @internal */ _ending = false\n /** @internal */ _stopped = true\n /** @internal */ _proxy: InteractionProxy\n\n /** @internal */ simulation = null\n\n /** @internal */ get pointerMoveTolerance() {\n return 1\n }\n\n doMove = warnOnce(function (this: Interaction, signalArg: any) {\n this.move(signalArg)\n }, 'The interaction.doMove() method has been renamed to interaction.move()')\n\n coords: CoordsSet = {\n // Starting InteractEvent pointer coordinates\n start: pointerUtils.newCoords(),\n // Previous native pointer move event coordinates\n prev: pointerUtils.newCoords(),\n // current native pointer move event coordinates\n cur: pointerUtils.newCoords(),\n // Change in coordinates and time of the pointer\n delta: pointerUtils.newCoords(),\n // pointer velocity\n velocity: pointerUtils.newCoords(),\n }\n\n /** @internal */ readonly _id: number = idCounter++\n\n constructor({ pointerType, scopeFire }: { pointerType?: string; scopeFire: Scope['fire'] }) {\n this._scopeFire = scopeFire\n this.pointerType = pointerType\n\n const that = this\n\n this._proxy = {} as InteractionProxy\n\n for (const key in _ProxyValues) {\n Object.defineProperty(this._proxy, key, {\n get() {\n return that[key]\n },\n })\n }\n\n for (const key in _ProxyMethods) {\n Object.defineProperty(this._proxy, key, {\n value: (...args: any[]) => that[key](...args),\n })\n }\n\n this._scopeFire('interactions:new', { interaction: this })\n }\n\n pointerDown(pointer: PointerType, event: PointerEventType, eventTarget: Node) {\n const pointerIndex = this.updatePointer(pointer, event, eventTarget, true)\n const pointerInfo = this.pointers[pointerIndex]\n\n this._scopeFire('interactions:down', {\n pointer,\n event,\n eventTarget,\n pointerIndex,\n pointerInfo,\n type: 'down',\n interaction: this as unknown as Interaction,\n })\n }\n\n /**\n * ```js\n * interact(target)\n * .draggable({\n * // disable the default drag start by down->move\n * manualStart: true\n * })\n * // start dragging after the user holds the pointer down\n * .on('hold', function (event) {\n * var interaction = event.interaction\n *\n * if (!interaction.interacting()) {\n * interaction.start({ name: 'drag' },\n * event.interactable,\n * event.currentTarget)\n * }\n * })\n * ```\n *\n * Start an action with the given Interactable and Element as tartgets. The\n * action must be enabled for the target Interactable and an appropriate\n * number of pointers must be held down - 1 for drag/resize, 2 for gesture.\n *\n * Use it with `interactable.able({ manualStart: false })` to always\n * [start actions manually](https://github.com/taye/interact.js/issues/114)\n *\n * @param action - The action to be performed - drag, resize, etc.\n * @param target - The Interactable to target\n * @param element - The DOM Element to target\n * @returns Whether the interaction was successfully started\n */\n start(action: ActionProps, interactable: Interactable, element: Element): boolean {\n if (\n this.interacting() ||\n !this.pointerIsDown ||\n this.pointers.length < (action.name === 'gesture' ? 2 : 1) ||\n !interactable.options[action.name as keyof ActionDefaults].enabled\n ) {\n return false\n }\n\n copyAction(this.prepared, action)\n\n this.interactable = interactable\n this.element = element\n this.rect = interactable.getRect(element)\n this.edges = this.prepared.edges\n ? extend({}, this.prepared.edges)\n : { left: true, right: true, top: true, bottom: true }\n this._stopped = false\n this._interacting =\n this._doPhase({\n interaction: this,\n event: this.downEvent,\n phase: 'start',\n }) && !this._stopped\n\n return this._interacting\n }\n\n pointerMove(pointer: PointerType, event: PointerEventType, eventTarget: Node) {\n if (!this.simulation && !(this.modification && this.modification.endResult)) {\n this.updatePointer(pointer, event, eventTarget, false)\n }\n\n const duplicateMove =\n this.coords.cur.page.x === this.coords.prev.page.x &&\n this.coords.cur.page.y === this.coords.prev.page.y &&\n this.coords.cur.client.x === this.coords.prev.client.x &&\n this.coords.cur.client.y === this.coords.prev.client.y\n\n let dx: number\n let dy: number\n\n // register movement greater than pointerMoveTolerance\n if (this.pointerIsDown && !this.pointerWasMoved) {\n dx = this.coords.cur.client.x - this.coords.start.client.x\n dy = this.coords.cur.client.y - this.coords.start.client.y\n\n this.pointerWasMoved = hypot(dx, dy) > this.pointerMoveTolerance\n }\n\n const pointerIndex = this.getPointerIndex(pointer)\n const signalArg = {\n pointer,\n pointerIndex,\n pointerInfo: this.pointers[pointerIndex],\n event,\n type: 'move' as const,\n eventTarget,\n dx,\n dy,\n duplicate: duplicateMove,\n interaction: this as unknown as Interaction,\n }\n\n if (!duplicateMove) {\n // set pointer coordinate, time changes and velocity\n pointerUtils.setCoordVelocity(this.coords.velocity, this.coords.delta)\n }\n\n this._scopeFire('interactions:move', signalArg)\n\n if (!duplicateMove && !this.simulation) {\n // if interacting, fire an 'action-move' signal etc\n if (this.interacting()) {\n signalArg.type = null\n this.move(signalArg)\n }\n\n if (this.pointerWasMoved) {\n pointerUtils.copyCoords(this.coords.prev, this.coords.cur)\n }\n }\n }\n\n /**\n * ```js\n * interact(target)\n * .draggable(true)\n * .on('dragmove', function (event) {\n * if (someCondition) {\n * // change the snap settings\n * event.interactable.draggable({ snap: { targets: [] }})\n * // fire another move event with re-calculated snap\n * event.interaction.move()\n * }\n * })\n * ```\n *\n * Force a move of the current action at the same coordinates. Useful if\n * snap/restrict has been changed and you want a movement with the new\n * settings.\n */\n move(signalArg?: any) {\n if (!signalArg || !signalArg.event) {\n pointerUtils.setZeroCoords(this.coords.delta)\n }\n\n signalArg = extend(\n {\n pointer: this._latestPointer.pointer,\n event: this._latestPointer.event,\n eventTarget: this._latestPointer.eventTarget,\n interaction: this,\n },\n signalArg || {},\n )\n\n signalArg.phase = 'move'\n\n this._doPhase(signalArg)\n }\n\n /**\n * @internal\n * End interact move events and stop auto-scroll unless simulation is running\n */\n pointerUp(pointer: PointerType, event: PointerEventType, eventTarget: Node, curEventTarget: EventTarget) {\n let pointerIndex = this.getPointerIndex(pointer)\n\n if (pointerIndex === -1) {\n pointerIndex = this.updatePointer(pointer, event, eventTarget, false)\n }\n\n const type = /cancel$/i.test(event.type) ? 'cancel' : 'up'\n\n this._scopeFire(`interactions:${type}` as 'interactions:up' | 'interactions:cancel', {\n pointer,\n pointerIndex,\n pointerInfo: this.pointers[pointerIndex],\n event,\n eventTarget,\n type: type as any,\n curEventTarget,\n interaction: this as unknown as Interaction,\n })\n\n if (!this.simulation) {\n this.end(event)\n }\n\n this.removePointer(pointer, event)\n }\n\n /** @internal */\n documentBlur(event: Event) {\n this.end(event as any)\n this._scopeFire('interactions:blur', {\n event,\n type: 'blur',\n interaction: this as unknown as Interaction,\n })\n }\n\n /**\n * ```js\n * interact(target)\n * .draggable(true)\n * .on('move', function (event) {\n * if (event.pageX > 1000) {\n * // end the current action\n * event.interaction.end()\n * // stop all further listeners from being called\n * event.stopImmediatePropagation()\n * }\n * })\n * ```\n */\n end(event?: PointerEventType) {\n this._ending = true\n event = event || this._latestPointer.event\n let endPhaseResult: boolean\n\n if (this.interacting()) {\n endPhaseResult = this._doPhase({\n event,\n interaction: this,\n phase: 'end',\n })\n }\n\n this._ending = false\n\n if (endPhaseResult === true) {\n this.stop()\n }\n }\n\n currentAction() {\n return this._interacting ? this.prepared.name : null\n }\n\n interacting() {\n return this._interacting\n }\n\n stop() {\n this._scopeFire('interactions:stop', { interaction: this })\n\n this.interactable = this.element = null\n\n this._interacting = false\n this._stopped = true\n this.prepared.name = this.prevEvent = null\n }\n\n /** @internal */\n getPointerIndex(pointer: any) {\n const pointerId = pointerUtils.getPointerId(pointer)\n\n // mouse and pen interactions may have only one pointer\n return this.pointerType === 'mouse' || this.pointerType === 'pen'\n ? this.pointers.length - 1\n : arr.findIndex(this.pointers, (curPointer) => curPointer.id === pointerId)\n }\n\n /** @internal */\n getPointerInfo(pointer: any) {\n return this.pointers[this.getPointerIndex(pointer)]\n }\n\n /** @internal */\n updatePointer(pointer: PointerType, event: PointerEventType, eventTarget: Node, down?: boolean) {\n const id = pointerUtils.getPointerId(pointer)\n let pointerIndex = this.getPointerIndex(pointer)\n let pointerInfo = this.pointers[pointerIndex]\n\n down = down === false ? false : down || /(down|start)$/i.test(event.type)\n\n if (!pointerInfo) {\n pointerInfo = new PointerInfo(id, pointer, event, null, null)\n\n pointerIndex = this.pointers.length\n this.pointers.push(pointerInfo)\n } else {\n pointerInfo.pointer = pointer\n }\n\n pointerUtils.setCoords(\n this.coords.cur,\n this.pointers.map((p) => p.pointer),\n this._now(),\n )\n pointerUtils.setCoordDeltas(this.coords.delta, this.coords.prev, this.coords.cur)\n\n if (down) {\n this.pointerIsDown = true\n\n pointerInfo.downTime = this.coords.cur.timeStamp\n pointerInfo.downTarget = eventTarget\n pointerUtils.pointerExtend(this.downPointer, pointer)\n\n if (!this.interacting()) {\n pointerUtils.copyCoords(this.coords.start, this.coords.cur)\n pointerUtils.copyCoords(this.coords.prev, this.coords.cur)\n\n this.downEvent = event\n this.pointerWasMoved = false\n }\n }\n\n this._updateLatestPointer(pointer, event, eventTarget)\n\n this._scopeFire('interactions:update-pointer', {\n pointer,\n event,\n eventTarget,\n down,\n pointerInfo,\n pointerIndex,\n interaction: this as unknown as Interaction,\n })\n\n return pointerIndex\n }\n\n /** @internal */\n removePointer(pointer: PointerType, event: PointerEventType) {\n const pointerIndex = this.getPointerIndex(pointer)\n\n if (pointerIndex === -1) return\n\n const pointerInfo = this.pointers[pointerIndex]\n\n this._scopeFire('interactions:remove-pointer', {\n pointer,\n event,\n eventTarget: null,\n pointerIndex,\n pointerInfo,\n interaction: this as unknown as Interaction,\n })\n\n this.pointers.splice(pointerIndex, 1)\n this.pointerIsDown = false\n }\n\n /** @internal */\n _updateLatestPointer(pointer: PointerType, event: PointerEventType, eventTarget: Node) {\n this._latestPointer.pointer = pointer\n this._latestPointer.event = event\n this._latestPointer.eventTarget = eventTarget\n }\n\n destroy() {\n this._latestPointer.pointer = null\n this._latestPointer.event = null\n this._latestPointer.eventTarget = null\n }\n\n /** @internal */\n _createPreparedEvent

(\n event: PointerEventType,\n phase: P,\n preEnd?: boolean,\n type?: string,\n ) {\n return new InteractEvent(this, event, this.prepared.name, phase, this.element, preEnd, type)\n }\n\n /** @internal */\n _fireEvent

(iEvent: InteractEvent) {\n this.interactable?.fire(iEvent)\n\n if (!this.prevEvent || iEvent.timeStamp >= this.prevEvent.timeStamp) {\n this.prevEvent = iEvent\n }\n }\n\n /** @internal */\n _doPhase

(\n signalArg: Omit, 'iEvent'> & { iEvent?: InteractEvent },\n ) {\n const { event, phase, preEnd, type } = signalArg\n const { rect } = this\n\n if (rect && phase === 'move') {\n // update the rect changes due to pointer move\n rectUtils.addEdges(this.edges, rect, this.coords.delta[this.interactable.options.deltaSource])\n\n rect.width = rect.right - rect.left\n rect.height = rect.bottom - rect.top\n }\n\n const beforeResult = this._scopeFire(`interactions:before-action-${phase}` as any, signalArg)\n\n if (beforeResult === false) {\n return false\n }\n\n const iEvent = (signalArg.iEvent = this._createPreparedEvent(event, phase, preEnd, type))\n\n this._scopeFire(`interactions:action-${phase}` as any, signalArg)\n\n if (phase === 'start') {\n this.prevEvent = iEvent\n }\n\n this._fireEvent(iEvent)\n\n this._scopeFire(`interactions:after-action-${phase}` as any, signalArg)\n\n return true\n }\n\n /** @internal */\n _now() {\n return Date.now()\n }\n}\n\nexport default Interaction\nexport { PointerInfo }\n","import type Interaction from '@interactjs/core/Interaction'\nimport { _ProxyMethods } from '@interactjs/core/Interaction'\nimport type { Plugin } from '@interactjs/core/scope'\nimport type { Point } from '@interactjs/core/types'\nimport * as rectUtils from '@interactjs/utils/rect'\n\ndeclare module '@interactjs/core/Interaction' {\n interface Interaction {\n offsetBy?: typeof offsetBy\n offset: {\n total: Point\n pending: Point\n }\n }\n\n enum _ProxyMethods {\n offsetBy = '',\n }\n}\n\n;(_ProxyMethods as any).offsetBy = ''\n\nexport function addTotal(interaction: Interaction) {\n if (!interaction.pointerIsDown) {\n return\n }\n\n addToCoords(interaction.coords.cur, interaction.offset.total)\n\n interaction.offset.pending.x = 0\n interaction.offset.pending.y = 0\n}\n\nfunction beforeAction({ interaction }: { interaction: Interaction }) {\n applyPending(interaction)\n}\n\nfunction beforeEnd({ interaction }: { interaction: Interaction }): boolean | void {\n const hadPending = applyPending(interaction)\n\n if (!hadPending) return\n\n interaction.move({ offset: true })\n interaction.end()\n\n return false\n}\n\nfunction end({ interaction }: { interaction: Interaction }) {\n interaction.offset.total.x = 0\n interaction.offset.total.y = 0\n interaction.offset.pending.x = 0\n interaction.offset.pending.y = 0\n}\n\nexport function applyPending(interaction: Interaction) {\n if (!hasPending(interaction)) {\n return false\n }\n\n const { pending } = interaction.offset\n\n addToCoords(interaction.coords.cur, pending)\n addToCoords(interaction.coords.delta, pending)\n rectUtils.addEdges(interaction.edges, interaction.rect, pending)\n\n pending.x = 0\n pending.y = 0\n\n return true\n}\n\nfunction offsetBy(this: Interaction, { x, y }: Point) {\n this.offset.pending.x += x\n this.offset.pending.y += y\n\n this.offset.total.x += x\n this.offset.total.y += y\n}\n\nfunction addToCoords({ page, client }, { x, y }: Point) {\n page.x += x\n page.y += y\n client.x += x\n client.y += y\n}\n\nfunction hasPending(interaction: Interaction) {\n return !!(interaction.offset.pending.x || interaction.offset.pending.y)\n}\n\nconst offset: Plugin = {\n id: 'offset',\n before: ['modifiers', 'pointer-events', 'actions', 'inertia'],\n install(scope) {\n scope.Interaction.prototype.offsetBy = offsetBy\n },\n listeners: {\n 'interactions:new': ({ interaction }) => {\n interaction.offset = {\n total: { x: 0, y: 0 },\n pending: { x: 0, y: 0 },\n }\n },\n 'interactions:update-pointer': ({ interaction }) => addTotal(interaction),\n 'interactions:before-action-start': beforeAction,\n 'interactions:before-action-move': beforeAction,\n 'interactions:before-action-end': beforeEnd,\n 'interactions:stop': end,\n },\n}\n\nexport default offset\n","import type { Interaction, DoPhaseArg } from '@interactjs/core/Interaction'\nimport type { Scope, SignalArgs, Plugin } from '@interactjs/core/scope'\nimport type { ActionName, Point, PointerEventType } from '@interactjs/core/types'\n/* eslint-disable import/no-duplicates -- for typescript module augmentations */\nimport '@interactjs/modifiers/base'\nimport '@interactjs/offset/plugin'\nimport * as modifiers from '@interactjs/modifiers/base'\nimport { Modification } from '@interactjs/modifiers/Modification'\nimport type { ModifierArg } from '@interactjs/modifiers/types'\nimport offset from '@interactjs/offset/plugin'\n/* eslint-enable import/no-duplicates */\nimport * as dom from '@interactjs/utils/domUtils'\nimport hypot from '@interactjs/utils/hypot'\nimport is from '@interactjs/utils/is'\nimport { copyCoords } from '@interactjs/utils/pointerUtils'\nimport raf from '@interactjs/utils/raf'\n\ndeclare module '@interactjs/core/InteractEvent' {\n interface PhaseMap {\n resume?: true\n inertiastart?: true\n }\n}\n\ndeclare module '@interactjs/core/Interaction' {\n interface Interaction {\n inertia?: InertiaState\n }\n}\n\ndeclare module '@interactjs/core/options' {\n interface PerActionDefaults {\n inertia?: {\n enabled?: boolean\n resistance?: number // the lambda in exponential decay\n minSpeed?: number // target speed must be above this for inertia to start\n endSpeed?: number // the speed at which inertia is slow enough to stop\n allowResume?: true // allow resuming an action in inertia phase\n smoothEndDuration?: number // animate to snap/restrict endOnly if there's no inertia\n }\n }\n}\n\ndeclare module '@interactjs/core/scope' {\n interface SignalArgs {\n 'interactions:before-action-inertiastart': Omit, 'iEvent'>\n 'interactions:action-inertiastart': DoPhaseArg\n 'interactions:after-action-inertiastart': DoPhaseArg\n 'interactions:before-action-resume': Omit, 'iEvent'>\n 'interactions:action-resume': DoPhaseArg\n 'interactions:after-action-resume': DoPhaseArg\n }\n}\n\nfunction install(scope: Scope) {\n const { defaults } = scope\n\n scope.usePlugin(offset)\n scope.usePlugin(modifiers.default)\n scope.actions.phases.inertiastart = true\n scope.actions.phases.resume = true\n\n defaults.perAction.inertia = {\n enabled: false,\n resistance: 10, // the lambda in exponential decay\n minSpeed: 100, // target speed must be above this for inertia to start\n endSpeed: 10, // the speed at which inertia is slow enough to stop\n allowResume: true, // allow resuming an action in inertia phase\n smoothEndDuration: 300, // animate to snap/restrict endOnly if there's no inertia\n }\n}\n\nexport class InertiaState {\n active = false\n isModified = false\n smoothEnd = false\n allowResume = false\n\n modification!: Modification\n modifierCount = 0\n modifierArg!: ModifierArg\n\n startCoords!: Point\n t0 = 0\n v0 = 0\n\n te = 0\n targetOffset!: Point\n modifiedOffset!: Point\n currentOffset!: Point\n\n lambda_v0? = 0 // eslint-disable-line camelcase\n one_ve_v0? = 0 // eslint-disable-line camelcase\n timeout!: number\n readonly interaction: Interaction\n\n constructor(interaction: Interaction) {\n this.interaction = interaction\n }\n\n start(event: PointerEventType) {\n const { interaction } = this\n const options = getOptions(interaction)\n\n if (!options || !options.enabled) {\n return false\n }\n\n const { client: velocityClient } = interaction.coords.velocity\n const pointerSpeed = hypot(velocityClient.x, velocityClient.y)\n const modification = this.modification || (this.modification = new Modification(interaction))\n\n modification.copyFrom(interaction.modification)\n\n this.t0 = interaction._now()\n this.allowResume = options.allowResume\n this.v0 = pointerSpeed\n this.currentOffset = { x: 0, y: 0 }\n this.startCoords = interaction.coords.cur.page\n\n this.modifierArg = modification.fillArg({\n pageCoords: this.startCoords,\n preEnd: true,\n phase: 'inertiastart',\n })\n\n const thrown =\n this.t0 - interaction.coords.cur.timeStamp < 50 &&\n pointerSpeed > options.minSpeed &&\n pointerSpeed > options.endSpeed\n\n if (thrown) {\n this.startInertia()\n } else {\n modification.result = modification.setAll(this.modifierArg)\n\n if (!modification.result.changed) {\n return false\n }\n\n this.startSmoothEnd()\n }\n\n // force modification change\n interaction.modification.result.rect = null\n\n // bring inertiastart event to the target coords\n interaction.offsetBy(this.targetOffset)\n interaction._doPhase({\n interaction,\n event,\n phase: 'inertiastart',\n })\n interaction.offsetBy({ x: -this.targetOffset.x, y: -this.targetOffset.y })\n // force modification change\n interaction.modification.result.rect = null\n\n this.active = true\n interaction.simulation = this\n\n return true\n }\n\n startInertia() {\n const startVelocity = this.interaction.coords.velocity.client\n const options = getOptions(this.interaction)\n const lambda = options.resistance\n const inertiaDur = -Math.log(options.endSpeed / this.v0) / lambda\n\n this.targetOffset = {\n x: (startVelocity.x - inertiaDur) / lambda,\n y: (startVelocity.y - inertiaDur) / lambda,\n }\n\n this.te = inertiaDur\n this.lambda_v0 = lambda / this.v0\n this.one_ve_v0 = 1 - options.endSpeed / this.v0\n\n const { modification, modifierArg } = this\n\n modifierArg.pageCoords = {\n x: this.startCoords.x + this.targetOffset.x,\n y: this.startCoords.y + this.targetOffset.y,\n }\n\n modification.result = modification.setAll(modifierArg)\n\n if (modification.result.changed) {\n this.isModified = true\n this.modifiedOffset = {\n x: this.targetOffset.x + modification.result.delta.x,\n y: this.targetOffset.y + modification.result.delta.y,\n }\n }\n\n this.onNextFrame(() => this.inertiaTick())\n }\n\n startSmoothEnd() {\n this.smoothEnd = true\n this.isModified = true\n this.targetOffset = {\n x: this.modification.result.delta.x,\n y: this.modification.result.delta.y,\n }\n\n this.onNextFrame(() => this.smoothEndTick())\n }\n\n onNextFrame(tickFn: () => void) {\n this.timeout = raf.request(() => {\n if (this.active) {\n tickFn()\n }\n })\n }\n\n inertiaTick() {\n const { interaction } = this\n const options = getOptions(interaction)\n const lambda = options.resistance\n const t = (interaction._now() - this.t0) / 1000\n\n if (t < this.te) {\n const progress = 1 - (Math.exp(-lambda * t) - this.lambda_v0) / this.one_ve_v0\n let newOffset: Point\n\n if (this.isModified) {\n newOffset = getQuadraticCurvePoint(\n 0,\n 0,\n this.targetOffset.x,\n this.targetOffset.y,\n this.modifiedOffset.x,\n this.modifiedOffset.y,\n progress,\n )\n } else {\n newOffset = {\n x: this.targetOffset.x * progress,\n y: this.targetOffset.y * progress,\n }\n }\n\n const delta = { x: newOffset.x - this.currentOffset.x, y: newOffset.y - this.currentOffset.y }\n\n this.currentOffset.x += delta.x\n this.currentOffset.y += delta.y\n\n interaction.offsetBy(delta)\n interaction.move()\n\n this.onNextFrame(() => this.inertiaTick())\n } else {\n interaction.offsetBy({\n x: this.modifiedOffset.x - this.currentOffset.x,\n y: this.modifiedOffset.y - this.currentOffset.y,\n })\n\n this.end()\n }\n }\n\n smoothEndTick() {\n const { interaction } = this\n const t = interaction._now() - this.t0\n const { smoothEndDuration: duration } = getOptions(interaction)\n\n if (t < duration) {\n const newOffset = {\n x: easeOutQuad(t, 0, this.targetOffset.x, duration),\n y: easeOutQuad(t, 0, this.targetOffset.y, duration),\n }\n const delta = {\n x: newOffset.x - this.currentOffset.x,\n y: newOffset.y - this.currentOffset.y,\n }\n\n this.currentOffset.x += delta.x\n this.currentOffset.y += delta.y\n\n interaction.offsetBy(delta)\n interaction.move({ skipModifiers: this.modifierCount })\n\n this.onNextFrame(() => this.smoothEndTick())\n } else {\n interaction.offsetBy({\n x: this.targetOffset.x - this.currentOffset.x,\n y: this.targetOffset.y - this.currentOffset.y,\n })\n\n this.end()\n }\n }\n\n resume({ pointer, event, eventTarget }: SignalArgs['interactions:down']) {\n const { interaction } = this\n\n // undo inertia changes to interaction coords\n interaction.offsetBy({\n x: -this.currentOffset.x,\n y: -this.currentOffset.y,\n })\n\n // update pointer at pointer down position\n interaction.updatePointer(pointer, event, eventTarget, true)\n\n // fire resume signals and event\n interaction._doPhase({\n interaction,\n event,\n phase: 'resume',\n })\n copyCoords(interaction.coords.prev, interaction.coords.cur)\n\n this.stop()\n }\n\n end() {\n this.interaction.move()\n this.interaction.end()\n this.stop()\n }\n\n stop() {\n this.active = this.smoothEnd = false\n this.interaction.simulation = null\n raf.cancel(this.timeout)\n }\n}\n\nfunction start({ interaction, event }: DoPhaseArg) {\n if (!interaction._interacting || interaction.simulation) {\n return null\n }\n\n const started = interaction.inertia.start(event)\n\n // prevent action end if inertia or smoothEnd\n return started ? false : null\n}\n\n// Check if the down event hits the current inertia target\n// control should be return to the user\nfunction resume(arg: SignalArgs['interactions:down']) {\n const { interaction, eventTarget } = arg\n const state = interaction.inertia\n\n if (!state.active) return\n\n let element = eventTarget as Node\n\n // climb up the DOM tree from the event target\n while (is.element(element)) {\n // if interaction element is the current inertia target element\n if (element === interaction.element) {\n state.resume(arg)\n break\n }\n\n element = dom.parentNode(element)\n }\n}\n\nfunction stop({ interaction }: { interaction: Interaction }) {\n const state = interaction.inertia\n\n if (state.active) {\n state.stop()\n }\n}\n\nfunction getOptions({ interactable, prepared }: Interaction) {\n return interactable && interactable.options && prepared.name && interactable.options[prepared.name].inertia\n}\n\nconst inertia: Plugin = {\n id: 'inertia',\n before: ['modifiers', 'actions'],\n install,\n listeners: {\n 'interactions:new': ({ interaction }) => {\n interaction.inertia = new InertiaState(interaction)\n },\n\n 'interactions:before-action-end': start,\n 'interactions:down': resume,\n 'interactions:stop': stop,\n\n 'interactions:before-action-resume': (arg) => {\n const { modification } = arg.interaction\n\n modification.stop(arg)\n modification.start(arg, arg.interaction.coords.cur.page)\n modification.applyToInteraction(arg)\n },\n\n 'interactions:before-action-inertiastart': (arg) => arg.interaction.modification.setAndApply(arg),\n 'interactions:action-resume': modifiers.addEventModifiers,\n 'interactions:action-inertiastart': modifiers.addEventModifiers,\n 'interactions:after-action-inertiastart': (arg) =>\n arg.interaction.modification.restoreInteractionCoords(arg),\n 'interactions:after-action-resume': (arg) => arg.interaction.modification.restoreInteractionCoords(arg),\n },\n}\n\n// http://stackoverflow.com/a/5634528/2280888\nfunction _getQBezierValue(t: number, p1: number, p2: number, p3: number) {\n const iT = 1 - t\n return iT * iT * p1 + 2 * iT * t * p2 + t * t * p3\n}\n\nfunction getQuadraticCurvePoint(\n startX: number,\n startY: number,\n cpX: number,\n cpY: number,\n endX: number,\n endY: number,\n position: number,\n) {\n return {\n x: _getQBezierValue(position, startX, cpX, endX),\n y: _getQBezierValue(position, startY, cpY, endY),\n }\n}\n\n// http://gizma.com/easing/\nfunction easeOutQuad(t: number, b: number, c: number, d: number) {\n t /= d\n return -c * t * (t - 2) + b\n}\n\nexport default inertia\n","import * as arr from '@interactjs/utils/arr'\nimport extend from '@interactjs/utils/extend'\nimport type { NormalizedListeners } from '@interactjs/utils/normalizeListeners'\nimport normalize from '@interactjs/utils/normalizeListeners'\n\nimport type { Listener, ListenersArg, Rect } from '@interactjs/core/types'\n\nfunction fireUntilImmediateStopped(event: any, listeners: Listener[]) {\n for (const listener of listeners) {\n if (event.immediatePropagationStopped) {\n break\n }\n\n listener(event)\n }\n}\n\nexport class Eventable {\n options: any\n types: NormalizedListeners = {}\n propagationStopped = false\n immediatePropagationStopped = false\n global: any\n\n constructor(options?: { [index: string]: any }) {\n this.options = extend({}, options || {})\n }\n\n fire(event: T) {\n let listeners: Listener[]\n const global = this.global\n\n // Interactable#on() listeners\n // tslint:disable no-conditional-assignment\n if ((listeners = this.types[event.type])) {\n fireUntilImmediateStopped(event, listeners)\n }\n\n // interact.on() listeners\n if (!event.propagationStopped && global && (listeners = global[event.type])) {\n fireUntilImmediateStopped(event, listeners)\n }\n }\n\n on(type: string, listener: ListenersArg) {\n const listeners = normalize(type, listener)\n\n for (type in listeners) {\n this.types[type] = arr.merge(this.types[type] || [], listeners[type])\n }\n }\n\n off(type: string, listener: ListenersArg) {\n const listeners = normalize(type, listener)\n\n for (type in listeners) {\n const eventList = this.types[type]\n\n if (!eventList || !eventList.length) {\n continue\n }\n\n for (const subListener of listeners[type]) {\n const index = eventList.indexOf(subListener)\n\n if (index !== -1) {\n eventList.splice(index, 1)\n }\n }\n }\n }\n\n getRect(_element: Element): Rect {\n return null\n }\n}\n","import * as arr from '@interactjs/utils/arr'\nimport * as domUtils from '@interactjs/utils/domUtils'\nimport is from '@interactjs/utils/is'\nimport pExtend from '@interactjs/utils/pointerExtend'\nimport * as pointerUtils from '@interactjs/utils/pointerUtils'\n\nimport type { Scope } from '@interactjs/core/scope'\nimport type { Element } from '@interactjs/core/types'\n\nimport type { NativeEventTarget } from './NativeTypes'\n\ndeclare module '@interactjs/core/scope' {\n interface Scope {\n events: ReturnType\n }\n}\n\ninterface EventOptions {\n capture: boolean\n passive: boolean\n}\n\ntype PartialEventTarget = Partial\n\ntype ListenerEntry = { func: (event: Event | FakeEvent) => any; options: EventOptions }\n\nfunction install(scope: Scope) {\n const targets: Array<{\n eventTarget: PartialEventTarget\n events: { [type: string]: ListenerEntry[] }\n }> = []\n\n const delegatedEvents: {\n [type: string]: Array<{\n selector: string\n context: Node\n listeners: ListenerEntry[]\n }>\n } = {}\n const documents: Document[] = []\n\n const eventsMethods = {\n add,\n remove,\n\n addDelegate,\n removeDelegate,\n\n delegateListener,\n delegateUseCapture,\n delegatedEvents,\n documents,\n\n targets,\n\n supportsOptions: false,\n supportsPassive: false,\n }\n\n // check if browser supports passive events and options arg\n scope.document?.createElement('div').addEventListener('test', null, {\n get capture() {\n return (eventsMethods.supportsOptions = true)\n },\n get passive() {\n return (eventsMethods.supportsPassive = true)\n },\n })\n\n scope.events = eventsMethods\n\n function add(\n eventTarget: PartialEventTarget,\n type: string,\n listener: ListenerEntry['func'],\n optionalArg?: boolean | EventOptions,\n ) {\n if (!eventTarget.addEventListener) return\n\n const options = getOptions(optionalArg)\n let target = arr.find(targets, (t) => t.eventTarget === eventTarget)\n\n if (!target) {\n target = {\n eventTarget,\n events: {},\n }\n\n targets.push(target)\n }\n\n if (!target.events[type]) {\n target.events[type] = []\n }\n\n if (!arr.find(target.events[type], (l) => l.func === listener && optionsMatch(l.options, options))) {\n eventTarget.addEventListener(\n type,\n listener as any,\n eventsMethods.supportsOptions ? options : options.capture,\n )\n target.events[type].push({ func: listener, options })\n }\n }\n\n function remove(\n eventTarget: PartialEventTarget,\n type: string,\n listener?: 'all' | ListenerEntry['func'],\n optionalArg?: boolean | EventOptions,\n ) {\n if (!eventTarget.addEventListener || !eventTarget.removeEventListener) return\n\n const targetIndex = arr.findIndex(targets, (t) => t.eventTarget === eventTarget)\n const target = targets[targetIndex]\n\n if (!target || !target.events) {\n return\n }\n\n if (type === 'all') {\n for (type in target.events) {\n if (target.events.hasOwnProperty(type)) {\n remove(eventTarget, type, 'all')\n }\n }\n return\n }\n\n let typeIsEmpty = false\n const typeListeners = target.events[type]\n\n if (typeListeners) {\n if (listener === 'all') {\n for (let i = typeListeners.length - 1; i >= 0; i--) {\n const entry = typeListeners[i]\n remove(eventTarget, type, entry.func, entry.options)\n }\n return\n } else {\n const options = getOptions(optionalArg)\n\n for (let i = 0; i < typeListeners.length; i++) {\n const entry = typeListeners[i]\n if (entry.func === listener && optionsMatch(entry.options, options)) {\n eventTarget.removeEventListener(\n type,\n listener as any,\n eventsMethods.supportsOptions ? options : options.capture,\n )\n typeListeners.splice(i, 1)\n\n if (typeListeners.length === 0) {\n delete target.events[type]\n typeIsEmpty = true\n }\n\n break\n }\n }\n }\n }\n\n if (typeIsEmpty && !Object.keys(target.events).length) {\n targets.splice(targetIndex, 1)\n }\n }\n\n function addDelegate(\n selector: string,\n context: Node,\n type: string,\n listener: ListenerEntry['func'],\n optionalArg?: any,\n ) {\n const options = getOptions(optionalArg)\n if (!delegatedEvents[type]) {\n delegatedEvents[type] = []\n\n // add delegate listener functions\n for (const doc of documents) {\n add(doc, type, delegateListener)\n add(doc, type, delegateUseCapture, true)\n }\n }\n\n const delegates = delegatedEvents[type]\n let delegate = arr.find(delegates, (d) => d.selector === selector && d.context === context)\n\n if (!delegate) {\n delegate = { selector, context, listeners: [] }\n delegates.push(delegate)\n }\n\n delegate.listeners.push({ func: listener, options })\n }\n\n function removeDelegate(\n selector: string,\n context: Document | Element,\n type: string,\n listener?: ListenerEntry['func'],\n optionalArg?: any,\n ) {\n const options = getOptions(optionalArg)\n const delegates = delegatedEvents[type]\n let matchFound = false\n let index: number\n\n if (!delegates) return\n\n // count from last index of delegated to 0\n for (index = delegates.length - 1; index >= 0; index--) {\n const cur = delegates[index]\n // look for matching selector and context Node\n if (cur.selector === selector && cur.context === context) {\n const { listeners } = cur\n\n // each item of the listeners array is an array: [function, capture, passive]\n for (let i = listeners.length - 1; i >= 0; i--) {\n const entry = listeners[i]\n\n // check if the listener functions and capture and passive flags match\n if (entry.func === listener && optionsMatch(entry.options, options)) {\n // remove the listener from the array of listeners\n listeners.splice(i, 1)\n\n // if all listeners for this target have been removed\n // remove the target from the delegates array\n if (!listeners.length) {\n delegates.splice(index, 1)\n\n // remove delegate function from context\n remove(context, type, delegateListener)\n remove(context, type, delegateUseCapture, true)\n }\n\n // only remove one listener\n matchFound = true\n break\n }\n }\n\n if (matchFound) {\n break\n }\n }\n }\n }\n\n // bound to the interactable context when a DOM event\n // listener is added to a selector interactable\n function delegateListener(event: Event | FakeEvent, optionalArg?: any) {\n const options = getOptions(optionalArg)\n const fakeEvent = new FakeEvent(event as Event)\n const delegates = delegatedEvents[event.type]\n const [eventTarget] = pointerUtils.getEventTargets(event as Event)\n let element: Node = eventTarget\n\n // climb up document tree looking for selector matches\n while (is.element(element)) {\n for (let i = 0; i < delegates.length; i++) {\n const cur = delegates[i]\n const { selector, context } = cur\n\n if (\n domUtils.matchesSelector(element, selector) &&\n domUtils.nodeContains(context, eventTarget) &&\n domUtils.nodeContains(context, element)\n ) {\n const { listeners } = cur\n\n fakeEvent.currentTarget = element\n\n for (const entry of listeners) {\n if (optionsMatch(entry.options, options)) {\n entry.func(fakeEvent)\n }\n }\n }\n }\n\n element = domUtils.parentNode(element)\n }\n }\n\n function delegateUseCapture(this: Element, event: Event | FakeEvent) {\n return delegateListener.call(this, event, true)\n }\n\n // for type inferrence\n return eventsMethods\n}\n\nclass FakeEvent implements Partial {\n currentTarget: Node\n originalEvent: Event\n type: string\n\n constructor(originalEvent: Event) {\n this.originalEvent = originalEvent\n // duplicate the event so that currentTarget can be changed\n pExtend(this, originalEvent)\n }\n\n preventOriginalDefault() {\n this.originalEvent.preventDefault()\n }\n\n stopPropagation() {\n this.originalEvent.stopPropagation()\n }\n\n stopImmediatePropagation() {\n this.originalEvent.stopImmediatePropagation()\n }\n}\n\nfunction getOptions(param: { [index: string]: any } | boolean): { capture: boolean; passive: boolean } {\n if (!is.object(param)) {\n return { capture: !!param, passive: false }\n }\n\n return {\n capture: !!param.capture,\n passive: !!param.passive,\n }\n}\n\nfunction optionsMatch(a: Partial | boolean, b: Partial) {\n if (a === b) return true\n\n if (typeof a === 'boolean') return !!b.capture === a && !!b.passive === false\n\n return !!a.capture === !!b.capture && !!a.passive === !!b.passive\n}\n\nexport default {\n id: 'events',\n install,\n}\n","import * as dom from '@interactjs/utils/domUtils'\n\nimport type Interaction from '@interactjs/core/Interaction'\nimport type { Scope } from '@interactjs/core/scope'\nimport type { PointerType } from '@interactjs/core/types'\n\nexport interface SearchDetails {\n pointer: PointerType\n pointerId: number\n pointerType: string\n eventType: string\n eventTarget: EventTarget\n curEventTarget: EventTarget\n scope: Scope\n}\n\nconst finder = {\n methodOrder: ['simulationResume', 'mouseOrPen', 'hasPointer', 'idle'] as const,\n\n search(details: SearchDetails) {\n for (const method of finder.methodOrder) {\n const interaction = finder[method](details)\n\n if (interaction) {\n return interaction\n }\n }\n\n return null\n },\n\n // try to resume simulation with a new pointer\n simulationResume({ pointerType, eventType, eventTarget, scope }: SearchDetails) {\n if (!/down|start/i.test(eventType)) {\n return null\n }\n\n for (const interaction of scope.interactions.list) {\n let element = eventTarget as Node\n\n if (\n interaction.simulation &&\n interaction.simulation.allowResume &&\n interaction.pointerType === pointerType\n ) {\n while (element) {\n // if the element is the interaction element\n if (element === interaction.element) {\n return interaction\n }\n element = dom.parentNode(element)\n }\n }\n }\n\n return null\n },\n\n // if it's a mouse or pen interaction\n mouseOrPen({ pointerId, pointerType, eventType, scope }: SearchDetails) {\n if (pointerType !== 'mouse' && pointerType !== 'pen') {\n return null\n }\n\n let firstNonActive\n\n for (const interaction of scope.interactions.list) {\n if (interaction.pointerType === pointerType) {\n // if it's a down event, skip interactions with running simulations\n if (interaction.simulation && !hasPointerId(interaction, pointerId)) {\n continue\n }\n\n // if the interaction is active, return it immediately\n if (interaction.interacting()) {\n return interaction\n }\n // otherwise save it and look for another active interaction\n else if (!firstNonActive) {\n firstNonActive = interaction\n }\n }\n }\n\n // if no active mouse interaction was found use the first inactive mouse\n // interaction\n if (firstNonActive) {\n return firstNonActive\n }\n\n // find any mouse or pen interaction.\n // ignore the interaction if the eventType is a *down, and a simulation\n // is active\n for (const interaction of scope.interactions.list) {\n if (interaction.pointerType === pointerType && !(/down/i.test(eventType) && interaction.simulation)) {\n return interaction\n }\n }\n\n return null\n },\n\n // get interaction that has this pointer\n hasPointer({ pointerId, scope }: SearchDetails) {\n for (const interaction of scope.interactions.list) {\n if (hasPointerId(interaction, pointerId)) {\n return interaction\n }\n }\n\n return null\n },\n\n // get first idle interaction with a matching pointerType\n idle({ pointerType, scope }: SearchDetails) {\n for (const interaction of scope.interactions.list) {\n // if there's already a pointer held down\n if (interaction.pointers.length === 1) {\n const target = interaction.interactable\n // don't add this pointer if there is a target interactable and it\n // isn't gesturable\n if (target && !(target.options.gesture && target.options.gesture.enabled)) {\n continue\n }\n }\n // maximum of 2 pointers per interaction\n else if (interaction.pointers.length >= 2) {\n continue\n }\n\n if (!interaction.interacting() && pointerType === interaction.pointerType) {\n return interaction\n }\n }\n\n return null\n },\n}\n\nfunction hasPointerId(interaction: Interaction, pointerId: number) {\n return interaction.pointers.some(({ id }) => id === pointerId)\n}\n\nexport default finder\n","import browser from '@interactjs/utils/browser'\nimport domObjects from '@interactjs/utils/domObjects'\nimport { nodeContains } from '@interactjs/utils/domUtils'\nimport * as pointerUtils from '@interactjs/utils/pointerUtils'\n\nimport type { Scope, SignalArgs, Plugin } from '@interactjs/core/scope'\nimport type { ActionName, Listener } from '@interactjs/core/types'\n\n/* eslint-disable import/no-duplicates -- for typescript module augmentations */\nimport './interactablePreventDefault'\nimport interactablePreventDefault from './interactablePreventDefault'\nimport InteractionBase from './Interaction'\n/* eslint-enable import/no-duplicates */\nimport type { SearchDetails } from './interactionFinder'\nimport finder from './interactionFinder'\n\ndeclare module '@interactjs/core/scope' {\n interface Scope {\n Interaction: typeof InteractionBase\n interactions: {\n new: (options: any) => InteractionBase\n list: Array>\n listeners: { [type: string]: Listener }\n docEvents: Array<{ type: string; listener: Listener }>\n pointerMoveTolerance: number\n }\n prevTouchTime: number\n }\n\n interface SignalArgs {\n 'interactions:find': {\n interaction: InteractionBase\n searchDetails: SearchDetails\n }\n }\n}\n\nconst methodNames = [\n 'pointerDown',\n 'pointerMove',\n 'pointerUp',\n 'updatePointer',\n 'removePointer',\n 'windowBlur',\n]\n\nfunction install(scope: Scope) {\n const listeners = {} as any\n\n for (const method of methodNames) {\n listeners[method] = doOnInteractions(method, scope)\n }\n\n const pEventTypes = browser.pEventTypes\n let docEvents: typeof scope.interactions.docEvents\n\n if (domObjects.PointerEvent) {\n docEvents = [\n { type: pEventTypes.down, listener: releasePointersOnRemovedEls },\n { type: pEventTypes.down, listener: listeners.pointerDown },\n { type: pEventTypes.move, listener: listeners.pointerMove },\n { type: pEventTypes.up, listener: listeners.pointerUp },\n { type: pEventTypes.cancel, listener: listeners.pointerUp },\n ]\n } else {\n docEvents = [\n { type: 'mousedown', listener: listeners.pointerDown },\n { type: 'mousemove', listener: listeners.pointerMove },\n { type: 'mouseup', listener: listeners.pointerUp },\n\n { type: 'touchstart', listener: releasePointersOnRemovedEls },\n { type: 'touchstart', listener: listeners.pointerDown },\n { type: 'touchmove', listener: listeners.pointerMove },\n { type: 'touchend', listener: listeners.pointerUp },\n { type: 'touchcancel', listener: listeners.pointerUp },\n ]\n }\n\n docEvents.push({\n type: 'blur',\n listener(event) {\n for (const interaction of scope.interactions.list) {\n interaction.documentBlur(event)\n }\n },\n })\n\n // for ignoring browser's simulated mouse events\n scope.prevTouchTime = 0\n\n scope.Interaction = class extends InteractionBase {\n get pointerMoveTolerance() {\n return scope.interactions.pointerMoveTolerance\n }\n\n set pointerMoveTolerance(value) {\n scope.interactions.pointerMoveTolerance = value\n }\n\n _now() {\n return scope.now()\n }\n }\n\n scope.interactions = {\n // all active and idle interactions\n list: [],\n new(options: { pointerType?: string; scopeFire?: Scope['fire'] }) {\n options.scopeFire = (name, arg) => scope.fire(name, arg)\n\n const interaction = new scope.Interaction(options as Required)\n\n scope.interactions.list.push(interaction)\n return interaction\n },\n listeners,\n docEvents,\n pointerMoveTolerance: 1,\n }\n\n function releasePointersOnRemovedEls() {\n // for all inactive touch interactions with pointers down\n for (const interaction of scope.interactions.list) {\n if (!interaction.pointerIsDown || interaction.pointerType !== 'touch' || interaction._interacting) {\n continue\n }\n\n // if a pointer is down on an element that is no longer in the DOM tree\n for (const pointer of interaction.pointers) {\n if (!scope.documents.some(({ doc }) => nodeContains(doc, pointer.downTarget))) {\n // remove the pointer from the interaction\n interaction.removePointer(pointer.pointer, pointer.event)\n }\n }\n }\n }\n\n scope.usePlugin(interactablePreventDefault)\n}\n\nfunction doOnInteractions(method: string, scope: Scope) {\n return function (event: Event) {\n const interactions = scope.interactions.list\n\n const pointerType = pointerUtils.getPointerType(event)\n const [eventTarget, curEventTarget] = pointerUtils.getEventTargets(event)\n const matches: any[] = [] // [ [pointer, interaction], ...]\n\n if (/^touch/.test(event.type)) {\n scope.prevTouchTime = scope.now()\n\n // @ts-expect-error\n for (const changedTouch of event.changedTouches) {\n const pointer = changedTouch\n const pointerId = pointerUtils.getPointerId(pointer)\n const searchDetails: SearchDetails = {\n pointer,\n pointerId,\n pointerType,\n eventType: event.type,\n eventTarget,\n curEventTarget,\n scope,\n }\n const interaction = getInteraction(searchDetails)\n\n matches.push([\n searchDetails.pointer,\n searchDetails.eventTarget,\n searchDetails.curEventTarget,\n interaction,\n ])\n }\n } else {\n let invalidPointer = false\n\n if (!browser.supportsPointerEvent && /mouse/.test(event.type)) {\n // ignore mouse events while touch interactions are active\n for (let i = 0; i < interactions.length && !invalidPointer; i++) {\n invalidPointer = interactions[i].pointerType !== 'mouse' && interactions[i].pointerIsDown\n }\n\n // try to ignore mouse events that are simulated by the browser\n // after a touch event\n invalidPointer =\n invalidPointer ||\n scope.now() - scope.prevTouchTime < 500 ||\n // on iOS and Firefox Mobile, MouseEvent.timeStamp is zero if simulated\n event.timeStamp === 0\n }\n\n if (!invalidPointer) {\n const searchDetails = {\n pointer: event as PointerEvent,\n pointerId: pointerUtils.getPointerId(event as PointerEvent),\n pointerType,\n eventType: event.type,\n curEventTarget,\n eventTarget,\n scope,\n }\n\n const interaction = getInteraction(searchDetails)\n\n matches.push([\n searchDetails.pointer,\n searchDetails.eventTarget,\n searchDetails.curEventTarget,\n interaction,\n ])\n }\n }\n\n // eslint-disable-next-line no-shadow\n for (const [pointer, eventTarget, curEventTarget, interaction] of matches) {\n interaction[method](pointer, event, eventTarget, curEventTarget)\n }\n }\n}\n\nfunction getInteraction(searchDetails: SearchDetails) {\n const { pointerType, scope } = searchDetails\n\n const foundInteraction = finder.search(searchDetails)\n const signalArg = { interaction: foundInteraction, searchDetails }\n\n scope.fire('interactions:find', signalArg)\n\n return signalArg.interaction || scope.interactions.new({ pointerType })\n}\n\nfunction onDocSignal(\n { doc, scope, options }: SignalArgs[T],\n eventMethodName: 'add' | 'remove',\n) {\n const {\n interactions: { docEvents },\n events,\n } = scope\n const eventMethod = events[eventMethodName]\n\n if (scope.browser.isIOS && !options.events) {\n options.events = { passive: false }\n }\n\n // delegate event listener\n for (const eventType in events.delegatedEvents) {\n eventMethod(doc, eventType, events.delegateListener)\n eventMethod(doc, eventType, events.delegateUseCapture, true)\n }\n\n const eventOptions = options && options.events\n\n for (const { type, listener } of docEvents) {\n eventMethod(doc, type, listener, eventOptions)\n }\n}\n\nconst interactions: Plugin = {\n id: 'core/interactions',\n install,\n listeners: {\n 'scope:add-document': (arg) => onDocSignal(arg, 'add'),\n 'scope:remove-document': (arg) => onDocSignal(arg, 'remove'),\n 'interactable:unset': ({ interactable }, scope) => {\n // Stop and destroy related interactions when an Interactable is unset\n for (let i = scope.interactions.list.length - 1; i >= 0; i--) {\n const interaction = scope.interactions.list[i]\n\n if (interaction.interactable !== interactable) {\n continue\n }\n\n interaction.stop()\n scope.fire('interactions:destroy', { interaction })\n interaction.destroy()\n\n if (scope.interactions.list.length > 2) {\n scope.interactions.list.splice(i, 1)\n }\n }\n },\n },\n onDocSignal,\n doOnInteractions,\n methodNames,\n}\n\nexport default interactions\n","/* eslint-disable no-dupe-class-members */\nimport * as arr from '@interactjs/utils/arr'\nimport browser from '@interactjs/utils/browser'\nimport clone from '@interactjs/utils/clone'\nimport { getElementRect, matchesUpTo, nodeContains, trySelector } from '@interactjs/utils/domUtils'\nimport extend from '@interactjs/utils/extend'\nimport is from '@interactjs/utils/is'\nimport isNonNativeEvent from '@interactjs/utils/isNonNativeEvent'\nimport normalizeListeners from '@interactjs/utils/normalizeListeners'\nimport { getWindow } from '@interactjs/utils/window'\n\nimport type { Scope } from '@interactjs/core/scope'\nimport type {\n ActionMap,\n ActionMethod,\n ActionName,\n Actions,\n Context,\n Element,\n EventTypes,\n Listeners,\n ListenersArg,\n OrBoolean,\n Target,\n} from '@interactjs/core/types'\n\nimport { Eventable } from './Eventable'\nimport type { ActionDefaults, Defaults, OptionsArg, PerActionDefaults, Options } from './options'\n\ntype IgnoreValue = string | Element | boolean\ntype DeltaSource = 'page' | 'client'\n\nconst enum OnOffMethod {\n On,\n Off,\n}\n\n/**\n * ```ts\n * const interactable = interact('.cards')\n * .draggable({\n * listeners: { move: event => console.log(event.type, event.pageX, event.pageY) }\n * })\n * .resizable({\n * listeners: { move: event => console.log(event.rect) },\n * modifiers: [interact.modifiers.restrictEdges({ outer: 'parent' })]\n * })\n * ```\n */\nexport class Interactable implements Partial {\n /** @internal */ get _defaults(): Defaults {\n return {\n base: {},\n perAction: {},\n actions: {} as ActionDefaults,\n }\n }\n\n readonly target: Target\n /** @internal */ readonly options!: Required\n /** @internal */ readonly _actions: Actions\n /** @internal */ readonly events = new Eventable()\n /** @internal */ readonly _context: Context\n /** @internal */ readonly _win: Window\n /** @internal */ readonly _doc: Document\n /** @internal */ readonly _scopeEvents: Scope['events']\n\n constructor(\n target: Target,\n options: any,\n defaultContext: Document | Element,\n scopeEvents: Scope['events'],\n ) {\n this._actions = options.actions\n this.target = target\n this._context = options.context || defaultContext\n this._win = getWindow(trySelector(target) ? this._context : target)\n this._doc = this._win.document\n this._scopeEvents = scopeEvents\n\n this.set(options)\n }\n\n setOnEvents(actionName: ActionName, phases: NonNullable) {\n if (is.func(phases.onstart)) {\n this.on(`${actionName}start`, phases.onstart)\n }\n if (is.func(phases.onmove)) {\n this.on(`${actionName}move`, phases.onmove)\n }\n if (is.func(phases.onend)) {\n this.on(`${actionName}end`, phases.onend)\n }\n if (is.func(phases.oninertiastart)) {\n this.on(`${actionName}inertiastart`, phases.oninertiastart)\n }\n\n return this\n }\n\n updatePerActionListeners(actionName: ActionName, prev: Listeners | undefined, cur: Listeners | undefined) {\n const actionFilter = (this._actions.map[actionName] as { filterEventType?: (type: string) => boolean })\n ?.filterEventType\n const filter = (type: string) =>\n (actionFilter == null || actionFilter(type)) && isNonNativeEvent(type, this._actions)\n\n if (is.array(prev) || is.object(prev)) {\n this._onOff(OnOffMethod.Off, actionName, prev, undefined, filter)\n }\n\n if (is.array(cur) || is.object(cur)) {\n this._onOff(OnOffMethod.On, actionName, cur, undefined, filter)\n }\n }\n\n setPerAction(actionName: ActionName, options: OrBoolean) {\n const defaults = this._defaults\n\n // for all the default per-action options\n for (const optionName_ in options) {\n const optionName = optionName_ as keyof PerActionDefaults\n const actionOptions = this.options[actionName]\n const optionValue: any = options[optionName]\n\n // remove old event listeners and add new ones\n if (optionName === 'listeners') {\n this.updatePerActionListeners(actionName, actionOptions.listeners, optionValue as Listeners)\n }\n\n // if the option value is an array\n if (is.array(optionValue)) {\n ;(actionOptions[optionName] as any) = arr.from(optionValue)\n }\n // if the option value is an object\n else if (is.plainObject(optionValue)) {\n // copy the object\n ;(actionOptions[optionName] as any) = extend(\n actionOptions[optionName] || ({} as any),\n clone(optionValue),\n )\n\n // set anabled field to true if it exists in the defaults\n if (\n is.object(defaults.perAction[optionName]) &&\n 'enabled' in (defaults.perAction[optionName] as any)\n ) {\n ;(actionOptions[optionName] as any).enabled = optionValue.enabled !== false\n }\n }\n // if the option value is a boolean and the default is an object\n else if (is.bool(optionValue) && is.object(defaults.perAction[optionName])) {\n ;(actionOptions[optionName] as any).enabled = optionValue\n }\n // if it's anything else, do a plain assignment\n else {\n ;(actionOptions[optionName] as any) = optionValue\n }\n }\n }\n\n /**\n * The default function to get an Interactables bounding rect. Can be\n * overridden using {@link Interactable.rectChecker}.\n *\n * @param {Element} [element] The element to measure.\n * @return {Rect} The object's bounding rectangle.\n */\n getRect(element: Element) {\n element = element || (is.element(this.target) ? this.target : null)\n\n if (is.string(this.target)) {\n element = element || this._context.querySelector(this.target)\n }\n\n return getElementRect(element)\n }\n\n /**\n * Returns or sets the function used to calculate the interactable's\n * element's rectangle\n *\n * @param {function} [checker] A function which returns this Interactable's\n * bounding rectangle. See {@link Interactable.getRect}\n * @return {function | object} The checker function or this Interactable\n */\n rectChecker(): (element: Element) => any | null\n rectChecker(checker: (element: Element) => any): this\n rectChecker(checker?: (element: Element) => any) {\n if (is.func(checker)) {\n this.getRect = (element) => {\n const rect = extend({}, checker.apply(this, element))\n\n if (!(('width' in rect) as unknown)) {\n rect.width = rect.right - rect.left\n rect.height = rect.bottom - rect.top\n }\n\n return rect\n }\n\n return this\n }\n\n if (checker === null) {\n delete (this as Partial).getRect\n\n return this\n }\n\n return this.getRect\n }\n\n /** @internal */\n _backCompatOption(optionName: keyof Options, newValue: any) {\n if (trySelector(newValue) || is.object(newValue)) {\n ;(this.options[optionName] as any) = newValue\n\n for (const action in this._actions.map) {\n ;(this.options[action as keyof ActionMap] as any)[optionName] = newValue\n }\n\n return this\n }\n\n return this.options[optionName]\n }\n\n /**\n * Gets or sets the origin of the Interactable's element. The x and y\n * of the origin will be subtracted from action event coordinates.\n *\n * @param {Element | object | string} [origin] An HTML or SVG Element whose\n * rect will be used, an object eg. { x: 0, y: 0 } or string 'parent', 'self'\n * or any CSS selector\n *\n * @return {object} The current origin or this Interactable\n */\n origin(newValue: any) {\n return this._backCompatOption('origin', newValue)\n }\n\n /**\n * Returns or sets the mouse coordinate types used to calculate the\n * movement of the pointer.\n *\n * @param {string} [newValue] Use 'client' if you will be scrolling while\n * interacting; Use 'page' if you want autoScroll to work\n * @return {string | object} The current deltaSource or this Interactable\n */\n deltaSource(): DeltaSource\n deltaSource(newValue: DeltaSource): this\n deltaSource(newValue?: DeltaSource) {\n if (newValue === 'page' || newValue === 'client') {\n this.options.deltaSource = newValue\n\n return this\n }\n\n return this.options.deltaSource\n }\n\n /** @internal */\n getAllElements(): Element[] {\n const { target } = this\n\n if (is.string(target)) {\n return Array.from(this._context.querySelectorAll(target))\n }\n\n if (is.func(target) && (target as any).getAllElements) {\n return (target as any).getAllElements()\n }\n\n return is.element(target) ? [target] : []\n }\n\n /**\n * Gets the selector context Node of the Interactable. The default is\n * `window.document`.\n *\n * @return {Node} The context Node of this Interactable\n */\n context() {\n return this._context\n }\n\n inContext(element: Document | Node) {\n return this._context === element.ownerDocument || nodeContains(this._context, element)\n }\n\n /** @internal */\n testIgnoreAllow(\n this: Interactable,\n options: { ignoreFrom?: IgnoreValue; allowFrom?: IgnoreValue },\n targetNode: Node,\n eventTarget: Node,\n ) {\n return (\n !this.testIgnore(options.ignoreFrom, targetNode, eventTarget) &&\n this.testAllow(options.allowFrom, targetNode, eventTarget)\n )\n }\n\n /** @internal */\n testAllow(this: Interactable, allowFrom: IgnoreValue | undefined, targetNode: Node, element: Node) {\n if (!allowFrom) {\n return true\n }\n\n if (!is.element(element)) {\n return false\n }\n\n if (is.string(allowFrom)) {\n return matchesUpTo(element, allowFrom, targetNode)\n } else if (is.element(allowFrom)) {\n return nodeContains(allowFrom, element)\n }\n\n return false\n }\n\n /** @internal */\n testIgnore(this: Interactable, ignoreFrom: IgnoreValue | undefined, targetNode: Node, element: Node) {\n if (!ignoreFrom || !is.element(element)) {\n return false\n }\n\n if (is.string(ignoreFrom)) {\n return matchesUpTo(element, ignoreFrom, targetNode)\n } else if (is.element(ignoreFrom)) {\n return nodeContains(ignoreFrom, element)\n }\n\n return false\n }\n\n /**\n * Calls listeners for the given InteractEvent type bound globally\n * and directly to this Interactable\n *\n * @param {InteractEvent} iEvent The InteractEvent object to be fired on this\n * Interactable\n * @return {Interactable} this Interactable\n */\n fire(iEvent: E) {\n this.events.fire(iEvent)\n\n return this\n }\n\n /** @internal */\n _onOff(\n method: OnOffMethod,\n typeArg: EventTypes,\n listenerArg?: ListenersArg | null,\n options?: any,\n filter?: (type: string) => boolean,\n ) {\n if (is.object(typeArg) && !is.array(typeArg)) {\n options = listenerArg\n listenerArg = null\n }\n\n const listeners = normalizeListeners(typeArg, listenerArg, filter)\n\n for (let type in listeners) {\n if (type === 'wheel') {\n type = browser.wheelEvent\n }\n\n for (const listener of listeners[type]) {\n // if it is an action event type\n if (isNonNativeEvent(type, this._actions)) {\n this.events[method === OnOffMethod.On ? 'on' : 'off'](type, listener)\n }\n // delegated event\n else if (is.string(this.target)) {\n this._scopeEvents[method === OnOffMethod.On ? 'addDelegate' : 'removeDelegate'](\n this.target,\n this._context,\n type,\n listener,\n options,\n )\n }\n // remove listener from this Interactable's element\n else {\n this._scopeEvents[method === OnOffMethod.On ? 'add' : 'remove'](\n this.target,\n type,\n listener,\n options,\n )\n }\n }\n }\n\n return this\n }\n\n /**\n * Binds a listener for an InteractEvent, pointerEvent or DOM event.\n *\n * @param {string | array | object} types The types of events to listen\n * for\n * @param {function | array | object} [listener] The event listener function(s)\n * @param {object | boolean} [options] options object or useCapture flag for\n * addEventListener\n * @return {Interactable} This Interactable\n */\n on(types: EventTypes, listener?: ListenersArg, options?: any) {\n return this._onOff(OnOffMethod.On, types, listener, options)\n }\n\n /**\n * Removes an InteractEvent, pointerEvent or DOM event listener.\n *\n * @param {string | array | object} types The types of events that were\n * listened for\n * @param {function | array | object} [listener] The event listener function(s)\n * @param {object | boolean} [options] options object or useCapture flag for\n * removeEventListener\n * @return {Interactable} This Interactable\n */\n off(types: string | string[] | EventTypes, listener?: ListenersArg, options?: any) {\n return this._onOff(OnOffMethod.Off, types, listener, options)\n }\n\n /**\n * Reset the options of this Interactable\n *\n * @param {object} options The new settings to apply\n * @return {object} This Interactable\n */\n set(options: OptionsArg) {\n const defaults = this._defaults\n\n if (!is.object(options)) {\n options = {}\n }\n\n ;(this.options as Required) = clone(defaults.base) as Required\n\n for (const actionName_ in this._actions.methodDict) {\n const actionName = actionName_ as ActionName\n const methodName = this._actions.methodDict[actionName]\n\n this.options[actionName] = {}\n this.setPerAction(actionName, extend(extend({}, defaults.perAction), defaults.actions[actionName]))\n ;(this[methodName] as ActionMethod)(options[actionName])\n }\n\n for (const setting in options) {\n if (setting === 'getRect') {\n this.rectChecker(options.getRect)\n continue\n }\n\n if (is.func((this as any)[setting])) {\n ;(this as any)[setting](options[setting as keyof typeof options])\n }\n }\n\n return this\n }\n\n /**\n * Remove this interactable from the list of interactables and remove it's\n * action capabilities and event listeners\n */\n unset() {\n if (is.string(this.target)) {\n // remove delegated events\n for (const type in this._scopeEvents.delegatedEvents) {\n const delegated = this._scopeEvents.delegatedEvents[type]\n\n for (let i = delegated.length - 1; i >= 0; i--) {\n const { selector, context, listeners } = delegated[i]\n\n if (selector === this.target && context === this._context) {\n delegated.splice(i, 1)\n }\n\n for (let l = listeners.length - 1; l >= 0; l--) {\n this._scopeEvents.removeDelegate(\n this.target,\n this._context,\n type,\n listeners[l][0],\n listeners[l][1],\n )\n }\n }\n }\n } else {\n this._scopeEvents.remove(this.target, 'all')\n }\n }\n}\n","import * as arr from '@interactjs/utils/arr'\nimport * as domUtils from '@interactjs/utils/domUtils'\nimport extend from '@interactjs/utils/extend'\nimport is from '@interactjs/utils/is'\n\nimport type { Interactable } from '@interactjs/core/Interactable'\nimport type { OptionsArg, Options } from '@interactjs/core/options'\nimport type { Scope } from '@interactjs/core/scope'\nimport type { Target } from '@interactjs/core/types'\n\ndeclare module '@interactjs/core/scope' {\n interface SignalArgs {\n 'interactable:new': {\n interactable: Interactable\n target: Target\n options: OptionsArg\n win: Window\n }\n }\n}\n\nexport class InteractableSet {\n // all set interactables\n list: Interactable[] = []\n\n selectorMap: {\n [selector: string]: Interactable[]\n } = {}\n\n scope: Scope\n\n constructor(scope: Scope) {\n this.scope = scope\n scope.addListeners({\n 'interactable:unset': ({ interactable }) => {\n const { target } = interactable\n const interactablesOnTarget: Interactable[] = is.string(target)\n ? this.selectorMap[target]\n : (target as any)[this.scope.id]\n\n const targetIndex = arr.findIndex(interactablesOnTarget, (i) => i === interactable)\n interactablesOnTarget.splice(targetIndex, 1)\n },\n })\n }\n\n new(target: Target, options?: any): Interactable {\n options = extend(options || {}, {\n actions: this.scope.actions,\n })\n const interactable = new this.scope.Interactable(target, options, this.scope.document, this.scope.events)\n\n this.scope.addDocument(interactable._doc)\n this.list.push(interactable)\n\n if (is.string(target)) {\n if (!this.selectorMap[target]) {\n this.selectorMap[target] = []\n }\n this.selectorMap[target].push(interactable)\n } else {\n if (!(interactable.target as any)[this.scope.id]) {\n Object.defineProperty(target, this.scope.id, {\n value: [],\n configurable: true,\n })\n }\n\n ;(target as any)[this.scope.id].push(interactable)\n }\n\n this.scope.fire('interactable:new', {\n target,\n options,\n interactable,\n win: this.scope._win,\n })\n\n return interactable\n }\n\n getExisting(target: Target, options?: Options) {\n const context = (options && options.context) || this.scope.document\n const isSelector = is.string(target)\n const interactablesOnTarget: Interactable[] = isSelector\n ? this.selectorMap[target as string]\n : (target as any)[this.scope.id]\n\n if (!interactablesOnTarget) return undefined\n\n return arr.find(\n interactablesOnTarget,\n (interactable) =>\n interactable._context === context && (isSelector || interactable.inContext(target as any)),\n )\n }\n\n forEachMatch(node: Node, callback: (interactable: Interactable) => T): T | void {\n for (const interactable of this.list) {\n let ret: T\n\n if (\n (is.string(interactable.target)\n ? // target is a selector and the element matches\n is.element(node) && domUtils.matchesSelector(node, interactable.target)\n : // target is the element\n node === interactable.target) &&\n // the element is in context\n interactable.inContext(node)\n ) {\n ret = callback(interactable)\n }\n\n if (ret !== undefined) {\n return ret\n }\n }\n }\n}\n","import browser from '@interactjs/utils/browser'\nimport clone from '@interactjs/utils/clone'\nimport domObjects from '@interactjs/utils/domObjects'\nimport extend from '@interactjs/utils/extend'\nimport is from '@interactjs/utils/is'\nimport raf from '@interactjs/utils/raf'\nimport * as win from '@interactjs/utils/window'\n\nimport type Interaction from '@interactjs/core/Interaction'\n\nimport { Eventable } from './Eventable'\n/* eslint-disable import/no-duplicates -- for typescript module augmentations */\nimport './events'\nimport './interactions'\nimport events from './events'\nimport { Interactable as InteractableBase } from './Interactable'\nimport { InteractableSet } from './InteractableSet'\nimport { InteractEvent } from './InteractEvent'\nimport interactions from './interactions'\n/* eslint-enable import/no-duplicates */\nimport { createInteractStatic } from './InteractStatic'\nimport type { OptionsArg } from './options'\nimport { defaults } from './options'\nimport type { Actions } from './types'\n\nexport interface SignalArgs {\n 'scope:add-document': DocSignalArg\n 'scope:remove-document': DocSignalArg\n 'interactable:unset': { interactable: InteractableBase }\n 'interactable:set': { interactable: InteractableBase; options: OptionsArg }\n 'interactions:destroy': { interaction: Interaction }\n}\n\nexport type ListenerName = keyof SignalArgs\n\nexport type ListenerMap = {\n [P in ListenerName]?: (arg: SignalArgs[P], scope: Scope, signalName: P) => void | boolean\n}\n\ninterface DocSignalArg {\n doc: Document\n window: Window\n scope: Scope\n options: Record\n}\n\n/** @internal */\nexport interface Plugin {\n [key: string]: any\n id?: string\n listeners?: ListenerMap\n before?: string[]\n install?(scope: Scope, options?: any): void\n}\n\n/** @internal */\nexport class Scope {\n id = `__interact_scope_${Math.floor(Math.random() * 100)}`\n isInitialized = false\n listenerMaps: Array<{\n map: ListenerMap\n id?: string\n }> = []\n\n browser = browser\n defaults = clone(defaults) as typeof defaults\n Eventable = Eventable\n actions: Actions = {\n map: {},\n phases: {\n start: true,\n move: true,\n end: true,\n },\n methodDict: {} as any,\n phaselessTypes: {},\n }\n\n interactStatic = createInteractStatic(this)\n InteractEvent = InteractEvent\n Interactable: typeof InteractableBase\n interactables = new InteractableSet(this)\n\n // main window\n _win!: Window\n\n // main document\n document!: Document\n\n // main window\n window!: Window\n\n // all documents being listened to\n documents: Array<{ doc: Document; options: any }> = []\n\n _plugins: {\n list: Plugin[]\n map: { [id: string]: Plugin }\n } = {\n list: [],\n map: {},\n }\n\n constructor() {\n const scope = this\n\n this.Interactable = class extends InteractableBase {\n get _defaults() {\n return scope.defaults\n }\n\n set(this: T, options: OptionsArg) {\n super.set(options)\n\n scope.fire('interactable:set', {\n options,\n interactable: this,\n })\n\n return this\n }\n\n unset(this: InteractableBase) {\n super.unset()\n\n const index = scope.interactables.list.indexOf(this)\n if (index < 0) return\n\n scope.interactables.list.splice(index, 1)\n scope.fire('interactable:unset', { interactable: this })\n }\n }\n }\n\n addListeners(map: ListenerMap, id?: string) {\n this.listenerMaps.push({ id, map })\n }\n\n fire(name: T, arg: SignalArgs[T]): void | false {\n for (const {\n map: { [name]: listener },\n } of this.listenerMaps) {\n if (!!listener && listener(arg as any, this, name as never) === false) {\n return false\n }\n }\n }\n\n onWindowUnload = (event: BeforeUnloadEvent) => this.removeDocument(event.target as Document)\n\n init(window: Window | typeof globalThis) {\n return this.isInitialized ? this : initScope(this, window)\n }\n\n pluginIsInstalled(plugin: Plugin) {\n const { id } = plugin\n return id ? !!this._plugins.map[id] : this._plugins.list.indexOf(plugin) !== -1\n }\n\n usePlugin(plugin: Plugin, options?: { [key: string]: any }) {\n if (!this.isInitialized) {\n return this\n }\n\n if (this.pluginIsInstalled(plugin)) {\n return this\n }\n\n if (plugin.id) {\n this._plugins.map[plugin.id] = plugin\n }\n this._plugins.list.push(plugin)\n\n if (plugin.install) {\n plugin.install(this, options)\n }\n\n if (plugin.listeners && plugin.before) {\n let index = 0\n const len = this.listenerMaps.length\n const before = plugin.before.reduce((acc, id) => {\n acc[id] = true\n acc[pluginIdRoot(id)] = true\n return acc\n }, {})\n\n for (; index < len; index++) {\n const otherId = this.listenerMaps[index].id\n\n if (otherId && (before[otherId] || before[pluginIdRoot(otherId)])) {\n break\n }\n }\n\n this.listenerMaps.splice(index, 0, { id: plugin.id, map: plugin.listeners })\n } else if (plugin.listeners) {\n this.listenerMaps.push({ id: plugin.id, map: plugin.listeners })\n }\n\n return this\n }\n\n addDocument(doc: Document, options?: any): void | false {\n // do nothing if document is already known\n if (this.getDocIndex(doc) !== -1) {\n return false\n }\n\n const window = win.getWindow(doc)\n\n options = options ? extend({}, options) : {}\n\n this.documents.push({ doc, options })\n this.events.documents.push(doc)\n\n // don't add an unload event for the main document\n // so that the page may be cached in browser history\n if (doc !== this.document) {\n this.events.add(window, 'unload', this.onWindowUnload)\n }\n\n this.fire('scope:add-document', { doc, window, scope: this, options })\n }\n\n removeDocument(doc: Document) {\n const index = this.getDocIndex(doc)\n\n const window = win.getWindow(doc)\n const options = this.documents[index].options\n\n this.events.remove(window, 'unload', this.onWindowUnload)\n\n this.documents.splice(index, 1)\n this.events.documents.splice(index, 1)\n\n this.fire('scope:remove-document', { doc, window, scope: this, options })\n }\n\n getDocIndex(doc: Document) {\n for (let i = 0; i < this.documents.length; i++) {\n if (this.documents[i].doc === doc) {\n return i\n }\n }\n\n return -1\n }\n\n getDocOptions(doc: Document) {\n const docIndex = this.getDocIndex(doc)\n\n return docIndex === -1 ? null : this.documents[docIndex].options\n }\n\n now() {\n return (((this.window as any).Date as typeof Date) || Date).now()\n }\n}\n\n/** @internal */\nexport function initScope(scope: Scope, window: Window | typeof globalThis) {\n scope.isInitialized = true\n\n if (is.window(window)) {\n win.init(window)\n }\n\n domObjects.init(window)\n browser.init(window)\n raf.init(window)\n\n // @ts-expect-error\n scope.window = window\n scope.document = window.document\n\n scope.usePlugin(interactions)\n scope.usePlugin(events)\n\n return scope\n}\n\nfunction pluginIdRoot(id: string) {\n return id && id.replace(/\\/.*$/, '')\n}\n","import browser from '@interactjs/utils/browser'\nimport * as domUtils from '@interactjs/utils/domUtils'\nimport is from '@interactjs/utils/is'\nimport isNonNativeEvent from '@interactjs/utils/isNonNativeEvent'\nimport { warnOnce } from '@interactjs/utils/misc'\nimport * as pointerUtils from '@interactjs/utils/pointerUtils'\n\nimport type { Scope, Plugin } from '@interactjs/core/scope'\nimport type { Context, EventTypes, Listener, ListenersArg, Target } from '@interactjs/core/types'\n\nimport type { Interactable } from './Interactable'\nimport type { Options } from './options'\n\n/**\n * ```js\n * interact('#draggable').draggable(true)\n *\n * var rectables = interact('rect')\n * rectables\n * .gesturable(true)\n * .on('gesturemove', function (event) {\n * // ...\n * })\n * ```\n *\n * The methods of this variable can be used to set elements as interactables\n * and also to change various default settings.\n *\n * Calling it as a function and passing an element or a valid CSS selector\n * string returns an Interactable object which has various methods to configure\n * it.\n *\n * @param {Element | string} target The HTML or SVG Element to interact with\n * or CSS selector\n * @return {Interactable}\n */\nexport interface InteractStatic {\n (target: Target, options?: Options): Interactable\n getPointerAverage: typeof pointerUtils.pointerAverage\n getTouchBBox: typeof pointerUtils.touchBBox\n getTouchDistance: typeof pointerUtils.touchDistance\n getTouchAngle: typeof pointerUtils.touchAngle\n getElementRect: typeof domUtils.getElementRect\n getElementClientRect: typeof domUtils.getElementClientRect\n matchesSelector: typeof domUtils.matchesSelector\n closest: typeof domUtils.closest\n /** @internal */ globalEvents: any\n version: string\n /** @internal */ scope: Scope\n /**\n * Use a plugin\n */\n use(\n plugin: Plugin,\n options?: {\n [key: string]: any\n },\n ): any\n /**\n * Check if an element or selector has been set with the `interact(target)`\n * function\n *\n * @return {boolean} Indicates if the element or CSS selector was previously\n * passed to interact\n */\n isSet(\n /* The Element or string being searched for */\n target: Target,\n options?: any,\n ): boolean\n on(type: string | EventTypes, listener: ListenersArg, options?: object): any\n off(type: EventTypes, listener: any, options?: object): any\n debug(): any\n /**\n * Whether or not the browser supports touch input\n */\n supportsTouch(): boolean\n /**\n * Whether or not the browser supports PointerEvents\n */\n supportsPointerEvent(): boolean\n /**\n * Cancels all interactions (end events are not fired)\n */\n stop(): InteractStatic\n /**\n * Returns or sets the distance the pointer must be moved before an action\n * sequence occurs. This also affects tolerance for tap events.\n */\n pointerMoveTolerance(\n /** The movement from the start position must be greater than this value */\n newValue?: number,\n ): InteractStatic | number\n addDocument(doc: Document, options?: object): void\n removeDocument(doc: Document): void\n}\n\nexport function createInteractStatic(scope: Scope): InteractStatic {\n const interact = ((target: Target, options: Options) => {\n let interactable = scope.interactables.getExisting(target, options)\n\n if (!interactable) {\n interactable = scope.interactables.new(target, options)\n interactable.events.global = interact.globalEvents\n }\n\n return interactable\n }) as InteractStatic\n\n // expose the functions used to calculate multi-touch properties\n interact.getPointerAverage = pointerUtils.pointerAverage\n interact.getTouchBBox = pointerUtils.touchBBox\n interact.getTouchDistance = pointerUtils.touchDistance\n interact.getTouchAngle = pointerUtils.touchAngle\n\n interact.getElementRect = domUtils.getElementRect\n interact.getElementClientRect = domUtils.getElementClientRect\n interact.matchesSelector = domUtils.matchesSelector\n interact.closest = domUtils.closest\n\n interact.globalEvents = {} as any\n\n // eslint-disable-next-line no-undef\n interact.version = process.env.npm_package_version\n interact.scope = scope\n interact.use = function (plugin, options) {\n this.scope.usePlugin(plugin, options)\n\n return this\n }\n\n interact.isSet = function (target: Target, options?: { context?: Context }): boolean {\n return !!this.scope.interactables.get(target, options && options.context)\n }\n\n interact.on = warnOnce(function on(type: string | EventTypes, listener: ListenersArg, options?: object) {\n if (is.string(type) && type.search(' ') !== -1) {\n type = type.trim().split(/ +/)\n }\n\n if (is.array(type)) {\n for (const eventType of type as any[]) {\n this.on(eventType, listener, options)\n }\n\n return this\n }\n\n if (is.object(type)) {\n for (const prop in type) {\n this.on(prop, (type as any)[prop], listener)\n }\n\n return this\n }\n\n // if it is an InteractEvent type, add listener to globalEvents\n if (isNonNativeEvent(type, this.scope.actions)) {\n // if this type of event was never bound\n if (!this.globalEvents[type]) {\n this.globalEvents[type] = [listener]\n } else {\n this.globalEvents[type].push(listener)\n }\n }\n // If non InteractEvent type, addEventListener to document\n else {\n this.scope.events.add(this.scope.document, type, listener as Listener, { options })\n }\n\n return this\n }, 'The interact.on() method is being deprecated')\n\n interact.off = warnOnce(function off(type: EventTypes, listener: any, options?: object) {\n if (is.string(type) && type.search(' ') !== -1) {\n type = type.trim().split(/ +/)\n }\n\n if (is.array(type)) {\n for (const eventType of type) {\n this.off(eventType, listener, options)\n }\n\n return this\n }\n\n if (is.object(type)) {\n for (const prop in type) {\n this.off(prop, type[prop], listener)\n }\n\n return this\n }\n\n if (isNonNativeEvent(type, this.scope.actions)) {\n let index: number\n\n if (type in this.globalEvents && (index = this.globalEvents[type].indexOf(listener)) !== -1) {\n this.globalEvents[type].splice(index, 1)\n }\n } else {\n this.scope.events.remove(this.scope.document, type, listener, options)\n }\n\n return this\n }, 'The interact.off() method is being deprecated')\n\n interact.debug = function () {\n return this.scope\n }\n\n interact.supportsTouch = function () {\n return browser.supportsTouch\n }\n\n interact.supportsPointerEvent = function () {\n return browser.supportsPointerEvent\n }\n\n interact.stop = function () {\n for (const interaction of this.scope.interactions.list) {\n interaction.stop()\n }\n\n return this\n }\n\n interact.pointerMoveTolerance = function (newValue?: number) {\n if (is.number(newValue)) {\n this.scope.interactions.pointerMoveTolerance = newValue\n\n return this\n }\n\n return this.scope.interactions.pointerMoveTolerance\n }\n\n interact.addDocument = function (doc: Document, options?: object) {\n this.scope.addDocument(doc, options)\n }\n\n interact.removeDocument = function (doc: Document) {\n this.scope.removeDocument(doc)\n }\n\n return interact\n}\n","import { Scope } from '@interactjs/core/scope'\n\nconst scope = new Scope()\n\nconst interact = scope.interactStatic\n\nexport default interact\n\nconst _global = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : this\nscope.init(_global)\n","export default () => {}\n","export default () => {}\n","import type { Rect, Point } from '@interactjs/core/types'\nimport type { SnapFunction, SnapTarget } from '@interactjs/modifiers/snap/pointer'\n\nexport interface GridOptionsBase {\n range?: number\n limits?: Rect\n offset?: Point\n}\nexport interface GridOptionsXY extends GridOptionsBase {\n x: number\n y: number\n}\nexport interface GridOptionsTopLeft extends GridOptionsBase {\n top?: number\n left?: number\n}\nexport interface GridOptionsBottomRight extends GridOptionsBase {\n bottom?: number\n right?: number\n}\nexport interface GridOptionsWidthHeight extends GridOptionsBase {\n width?: number\n height?: number\n}\n\nexport type GridOptions = GridOptionsXY | GridOptionsTopLeft | GridOptionsBottomRight | GridOptionsWidthHeight\n\nexport default (grid: GridOptions) => {\n const coordFields = (\n [\n ['x', 'y'],\n ['left', 'top'],\n ['right', 'bottom'],\n ['width', 'height'],\n ] as const\n ).filter(([xField, yField]) => xField in grid || yField in grid)\n\n const gridFunc: SnapFunction & {\n grid: typeof grid\n coordFields: typeof coordFields\n } = (x, y) => {\n const {\n range,\n limits = {\n left: -Infinity,\n right: Infinity,\n top: -Infinity,\n bottom: Infinity,\n },\n offset = { x: 0, y: 0 },\n } = grid\n\n const result: SnapTarget & {\n grid: typeof grid\n } = { range, grid, x: null as number, y: null as number }\n\n for (const [xField, yField] of coordFields) {\n const gridx = Math.round((x - offset.x) / (grid as any)[xField])\n const gridy = Math.round((y - offset.y) / (grid as any)[yField])\n\n result[xField] = Math.max(limits.left, Math.min(limits.right, gridx * (grid as any)[xField] + offset.x))\n result[yField] = Math.max(limits.top, Math.min(limits.bottom, gridy * (grid as any)[yField] + offset.y))\n }\n\n return result\n }\n\n gridFunc.grid = grid\n gridFunc.coordFields = coordFields\n\n return gridFunc\n}\n","import type { Plugin } from '@interactjs/core/scope'\nimport extend from '@interactjs/utils/extend'\n\nimport * as allSnappers from './all'\n\ndeclare module '@interactjs/core/InteractStatic' {\n export interface InteractStatic {\n snappers: typeof allSnappers\n createSnapGrid: typeof allSnappers.grid\n }\n}\n\nconst snappersPlugin: Plugin = {\n id: 'snappers',\n install(scope) {\n const { interactStatic: interact } = scope\n\n interact.snappers = extend(interact.snappers || {}, allSnappers)\n interact.createSnapGrid = interact.snappers.grid\n },\n}\n\nexport default snappersPlugin\n","/**\n * @module modifiers/aspectRatio\n *\n * @description\n * This modifier forces elements to be resized with a specified dx/dy ratio.\n *\n * ```js\n * interact(target).resizable({\n * modifiers: [\n * interact.modifiers.snapSize({\n * targets: [ interact.snappers.grid({ x: 20, y: 20 }) ],\n * }),\n * interact.aspectRatio({ ratio: 'preserve' }),\n * ],\n * });\n * ```\n */\n\nimport type { Point, Rect, EdgeOptions } from '@interactjs/core/types'\nimport extend from '@interactjs/utils/extend'\nimport { addEdges } from '@interactjs/utils/rect'\n\nimport { makeModifier } from './base'\nimport { Modification } from './Modification'\nimport type { Modifier, ModifierModule, ModifierState } from './types'\n\nexport interface AspectRatioOptions {\n ratio?: number | 'preserve'\n equalDelta?: boolean\n modifiers?: Modifier[]\n enabled?: boolean\n}\n\nexport type AspectRatioState = ModifierState<\n AspectRatioOptions,\n {\n startCoords: Point\n startRect: Rect\n linkedEdges: EdgeOptions\n ratio: number\n equalDelta: boolean\n xIsPrimaryAxis: boolean\n edgeSign: {\n x: number\n y: number\n }\n subModification: Modification\n }\n>\n\nconst aspectRatio: ModifierModule = {\n start(arg) {\n const { state, rect, edges, pageCoords: coords } = arg\n let { ratio, enabled } = state.options\n const { equalDelta, modifiers } = state.options\n\n if (ratio === 'preserve') {\n ratio = rect.width / rect.height\n }\n\n state.startCoords = extend({}, coords)\n state.startRect = extend({}, rect)\n state.ratio = ratio\n state.equalDelta = equalDelta\n\n const linkedEdges = (state.linkedEdges = {\n top: edges.top || (edges.left && !edges.bottom),\n left: edges.left || (edges.top && !edges.right),\n bottom: edges.bottom || (edges.right && !edges.top),\n right: edges.right || (edges.bottom && !edges.left),\n })\n\n state.xIsPrimaryAxis = !!(edges.left || edges.right)\n\n if (state.equalDelta) {\n const sign = (linkedEdges.left ? 1 : -1) * (linkedEdges.top ? 1 : -1)\n state.edgeSign = {\n x: sign,\n y: sign,\n }\n } else {\n state.edgeSign = {\n x: linkedEdges.left ? -1 : 1,\n y: linkedEdges.top ? -1 : 1,\n }\n }\n\n if (enabled !== false) {\n extend(edges, linkedEdges)\n }\n\n if (!modifiers?.length) return\n\n const subModification = new Modification(arg.interaction)\n\n subModification.copyFrom(arg.interaction.modification)\n subModification.prepareStates(modifiers)\n\n state.subModification = subModification\n subModification.startAll({ ...arg })\n },\n\n set(arg) {\n const { state, rect, coords } = arg\n const { linkedEdges } = state\n const initialCoords = extend({}, coords)\n const aspectMethod = state.equalDelta ? setEqualDelta : setRatio\n\n extend(arg.edges, linkedEdges)\n aspectMethod(state, state.xIsPrimaryAxis, coords, rect)\n\n if (!state.subModification) {\n return null\n }\n\n const correctedRect = extend({}, rect)\n\n addEdges(linkedEdges, correctedRect, {\n x: coords.x - initialCoords.x,\n y: coords.y - initialCoords.y,\n })\n\n const result = state.subModification.setAll({\n ...arg,\n rect: correctedRect,\n edges: linkedEdges,\n pageCoords: coords,\n prevCoords: coords,\n prevRect: correctedRect,\n })\n\n const { delta } = result\n\n if (result.changed) {\n const xIsCriticalAxis = Math.abs(delta.x) > Math.abs(delta.y)\n\n // do aspect modification again with critical edge axis as primary\n aspectMethod(state, xIsCriticalAxis, result.coords, result.rect)\n extend(coords, result.coords)\n }\n\n return result.eventProps\n },\n\n defaults: {\n ratio: 'preserve',\n equalDelta: false,\n modifiers: [],\n enabled: false,\n },\n}\n\nfunction setEqualDelta({ startCoords, edgeSign }: AspectRatioState, xIsPrimaryAxis: boolean, coords: Point) {\n if (xIsPrimaryAxis) {\n coords.y = startCoords.y + (coords.x - startCoords.x) * edgeSign.y\n } else {\n coords.x = startCoords.x + (coords.y - startCoords.y) * edgeSign.x\n }\n}\n\nfunction setRatio(\n { startRect, startCoords, ratio, edgeSign }: AspectRatioState,\n xIsPrimaryAxis: boolean,\n coords: Point,\n rect: Rect,\n) {\n if (xIsPrimaryAxis) {\n const newHeight = rect.width / ratio\n\n coords.y = startCoords.y + (newHeight - startRect.height) * edgeSign.y\n } else {\n const newWidth = rect.height * ratio\n\n coords.x = startCoords.x + (newWidth - startRect.width) * edgeSign.x\n }\n}\n\nexport default makeModifier(aspectRatio, 'aspectRatio')\nexport { aspectRatio }\n","import type { ModifierFunction } from './types'\n\nconst noop = (() => {}) as unknown as ModifierFunction\n\nnoop._defaults = {}\n\nexport default noop\n","import type Interaction from '@interactjs/core/Interaction'\nimport type { RectResolvable, Rect, Point } from '@interactjs/core/types'\nimport extend from '@interactjs/utils/extend'\nimport is from '@interactjs/utils/is'\nimport * as rectUtils from '@interactjs/utils/rect'\n\nimport { makeModifier } from '../base'\nimport type { ModifierArg, ModifierModule, ModifierState } from '../types'\n\nexport interface RestrictOptions {\n // where to drag over\n restriction: RectResolvable<[number, number, Interaction]>\n // what part of self is allowed to drag over\n elementRect: Rect\n offset: Rect\n // restrict just before the end drag\n endOnly: boolean\n enabled?: boolean\n}\n\nexport type RestrictState = ModifierState<\n RestrictOptions,\n {\n offset: Rect\n }\n>\n\nfunction start({ rect, startOffset, state, interaction, pageCoords }: ModifierArg) {\n const { options } = state\n const { elementRect } = options\n const offset: Rect = extend(\n {\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n },\n options.offset || {},\n )\n\n if (rect && elementRect) {\n const restriction = getRestrictionRect(options.restriction, interaction, pageCoords)\n\n if (restriction) {\n const widthDiff = restriction.right - restriction.left - rect.width\n const heightDiff = restriction.bottom - restriction.top - rect.height\n\n if (widthDiff < 0) {\n offset.left += widthDiff\n offset.right += widthDiff\n }\n if (heightDiff < 0) {\n offset.top += heightDiff\n offset.bottom += heightDiff\n }\n }\n\n offset.left += startOffset.left - rect.width * elementRect.left\n offset.top += startOffset.top - rect.height * elementRect.top\n\n offset.right += startOffset.right - rect.width * (1 - elementRect.right)\n offset.bottom += startOffset.bottom - rect.height * (1 - elementRect.bottom)\n }\n\n state.offset = offset\n}\n\nfunction set({ coords, interaction, state }: ModifierArg) {\n const { options, offset } = state\n\n const restriction = getRestrictionRect(options.restriction, interaction, coords)\n\n if (!restriction) return\n\n const rect = rectUtils.xywhToTlbr(restriction)\n\n coords.x = Math.max(Math.min(rect.right - offset.right, coords.x), rect.left + offset.left)\n coords.y = Math.max(Math.min(rect.bottom - offset.bottom, coords.y), rect.top + offset.top)\n}\n\nexport function getRestrictionRect(\n value: RectResolvable<[number, number, Interaction]>,\n interaction: Interaction,\n coords?: Point,\n) {\n if (is.func(value)) {\n return rectUtils.resolveRectLike(value, interaction.interactable, interaction.element, [\n coords.x,\n coords.y,\n interaction,\n ])\n } else {\n return rectUtils.resolveRectLike(value, interaction.interactable, interaction.element)\n }\n}\n\nconst defaults: RestrictOptions = {\n restriction: null,\n elementRect: null,\n offset: null,\n endOnly: false,\n enabled: false,\n}\n\nconst restrict: ModifierModule = {\n start,\n set,\n defaults,\n}\n\nexport default makeModifier(restrict, 'restrict')\nexport { restrict }\n","// This modifier adds the options.resize.restrictEdges setting which sets min and\n// max for the top, left, bottom and right edges of the target being resized.\n//\n// interact(target).resize({\n// edges: { top: true, left: true },\n// restrictEdges: {\n// inner: { top: 200, left: 200, right: 400, bottom: 400 },\n// outer: { top: 0, left: 0, right: 600, bottom: 600 },\n// },\n// })\n\nimport type { Point, Rect } from '@interactjs/core/types'\nimport extend from '@interactjs/utils/extend'\nimport * as rectUtils from '@interactjs/utils/rect'\n\nimport { makeModifier } from '../base'\nimport type { ModifierArg, ModifierState } from '../types'\n\nimport type { RestrictOptions } from './pointer'\nimport { getRestrictionRect } from './pointer'\n\nexport interface RestrictEdgesOptions {\n inner: RestrictOptions['restriction']\n outer: RestrictOptions['restriction']\n offset?: RestrictOptions['offset']\n endOnly: boolean\n enabled?: boolean\n}\n\nexport type RestrictEdgesState = ModifierState<\n RestrictEdgesOptions,\n {\n inner: Rect\n outer: Rect\n offset: RestrictEdgesOptions['offset']\n }\n>\n\nconst noInner = { top: +Infinity, left: +Infinity, bottom: -Infinity, right: -Infinity }\nconst noOuter = { top: -Infinity, left: -Infinity, bottom: +Infinity, right: +Infinity }\n\nfunction start({ interaction, startOffset, state }: ModifierArg) {\n const { options } = state\n let offset: Point\n\n if (options) {\n const offsetRect = getRestrictionRect(options.offset, interaction, interaction.coords.start.page)\n\n offset = rectUtils.rectToXY(offsetRect)\n }\n\n offset = offset || { x: 0, y: 0 }\n\n state.offset = {\n top: offset.y + startOffset.top,\n left: offset.x + startOffset.left,\n bottom: offset.y - startOffset.bottom,\n right: offset.x - startOffset.right,\n }\n}\n\nfunction set({ coords, edges, interaction, state }: ModifierArg) {\n const { offset, options } = state\n\n if (!edges) {\n return\n }\n\n const page = extend({}, coords)\n const inner = getRestrictionRect(options.inner, interaction, page) || ({} as Rect)\n const outer = getRestrictionRect(options.outer, interaction, page) || ({} as Rect)\n\n fixRect(inner, noInner)\n fixRect(outer, noOuter)\n\n if (edges.top) {\n coords.y = Math.min(Math.max(outer.top + offset.top, page.y), inner.top + offset.top)\n } else if (edges.bottom) {\n coords.y = Math.max(Math.min(outer.bottom + offset.bottom, page.y), inner.bottom + offset.bottom)\n }\n if (edges.left) {\n coords.x = Math.min(Math.max(outer.left + offset.left, page.x), inner.left + offset.left)\n } else if (edges.right) {\n coords.x = Math.max(Math.min(outer.right + offset.right, page.x), inner.right + offset.right)\n }\n}\n\nfunction fixRect(rect: Rect, defaults: Rect) {\n for (const edge of ['top', 'left', 'bottom', 'right']) {\n if (!(edge in rect)) {\n rect[edge] = defaults[edge]\n }\n }\n\n return rect\n}\n\nconst defaults: RestrictEdgesOptions = {\n inner: null,\n outer: null,\n offset: null,\n endOnly: false,\n enabled: false,\n}\n\nconst restrictEdges = {\n noInner,\n noOuter,\n start,\n set,\n defaults,\n}\n\nexport default makeModifier(restrictEdges, 'restrictEdges')\nexport { restrictEdges }\n","import extend from '@interactjs/utils/extend'\n\nimport { makeModifier } from '../base'\n\nimport { restrict } from './pointer'\n\nconst defaults = extend(\n {\n get elementRect() {\n return { top: 0, left: 0, bottom: 1, right: 1 }\n },\n set elementRect(_) {},\n },\n restrict.defaults,\n)\n\nconst restrictRect = {\n start: restrict.start,\n set: restrict.set,\n defaults,\n}\n\nexport default makeModifier(restrictRect, 'restrictRect')\nexport { restrictRect }\n","import type { Point, Rect, Size } from '@interactjs/core/types'\nimport extend from '@interactjs/utils/extend'\nimport * as rectUtils from '@interactjs/utils/rect'\n\nimport { makeModifier } from '../base'\nimport type { ModifierArg, ModifierState } from '../types'\n\nimport type { RestrictEdgesState } from './edges'\nimport { restrictEdges } from './edges'\nimport type { RestrictOptions } from './pointer'\nimport { getRestrictionRect } from './pointer'\n\nconst noMin = { width: -Infinity, height: -Infinity }\nconst noMax = { width: +Infinity, height: +Infinity }\n\nexport interface RestrictSizeOptions {\n min?: Size | Point | RestrictOptions['restriction']\n max?: Size | Point | RestrictOptions['restriction']\n endOnly: boolean\n enabled?: boolean\n}\n\nfunction start(arg: ModifierArg) {\n return restrictEdges.start(arg)\n}\n\nexport type RestrictSizeState = RestrictEdgesState &\n ModifierState<\n RestrictSizeOptions & { inner: Rect; outer: Rect },\n {\n min: Rect\n max: Rect\n }\n >\n\nfunction set(arg: ModifierArg) {\n const { interaction, state, rect, edges } = arg\n const { options } = state\n\n if (!edges) {\n return\n }\n\n const minSize =\n rectUtils.tlbrToXywh(getRestrictionRect(options.min as any, interaction, arg.coords)) || noMin\n const maxSize =\n rectUtils.tlbrToXywh(getRestrictionRect(options.max as any, interaction, arg.coords)) || noMax\n\n state.options = {\n endOnly: options.endOnly,\n inner: extend({}, restrictEdges.noInner),\n outer: extend({}, restrictEdges.noOuter),\n }\n\n if (edges.top) {\n state.options.inner.top = rect.bottom - minSize.height\n state.options.outer.top = rect.bottom - maxSize.height\n } else if (edges.bottom) {\n state.options.inner.bottom = rect.top + minSize.height\n state.options.outer.bottom = rect.top + maxSize.height\n }\n if (edges.left) {\n state.options.inner.left = rect.right - minSize.width\n state.options.outer.left = rect.right - maxSize.width\n } else if (edges.right) {\n state.options.inner.right = rect.left + minSize.width\n state.options.outer.right = rect.left + maxSize.width\n }\n\n restrictEdges.set(arg)\n\n state.options = options\n}\n\nconst defaults: RestrictSizeOptions = {\n min: null,\n max: null,\n endOnly: false,\n enabled: false,\n}\n\nconst restrictSize = {\n start,\n set,\n defaults,\n}\n\nexport default makeModifier(restrictSize, 'restrictSize')\nexport { restrictSize }\n","import type { Interaction, InteractionProxy } from '@interactjs/core/Interaction'\nimport type { ActionName, Point, RectResolvable, Element } from '@interactjs/core/types'\nimport extend from '@interactjs/utils/extend'\nimport getOriginXY from '@interactjs/utils/getOriginXY'\nimport hypot from '@interactjs/utils/hypot'\nimport is from '@interactjs/utils/is'\nimport { resolveRectLike, rectToXY } from '@interactjs/utils/rect'\n\nimport { makeModifier } from '../base'\nimport type { ModifierArg, ModifierState } from '../types'\n\nexport interface Offset {\n x: number\n y: number\n index: number\n relativePoint?: Point | null\n}\n\nexport interface SnapPosition {\n x?: number\n y?: number\n range?: number\n offset?: Offset\n [index: string]: any\n}\n\nexport type SnapFunction = (\n x: number,\n y: number,\n interaction: InteractionProxy,\n offset: Offset,\n index: number,\n) => SnapPosition\nexport type SnapTarget = SnapPosition | SnapFunction\nexport interface SnapOptions {\n targets?: SnapTarget[]\n // target range\n range?: number\n // self points for snapping. [0,0] = top left, [1,1] = bottom right\n relativePoints?: Point[]\n // startCoords = offset snapping from drag start page position\n offset?: Point | RectResolvable<[Interaction]> | 'startCoords'\n offsetWithOrigin?: boolean\n origin?: RectResolvable<[Element]> | Point\n endOnly?: boolean\n enabled?: boolean\n}\n\nexport type SnapState = ModifierState<\n SnapOptions,\n {\n offsets?: Offset[]\n closest?: any\n targetFields?: string[][]\n }\n>\n\nfunction start(arg: ModifierArg) {\n const { interaction, interactable, element, rect, state, startOffset } = arg\n const { options } = state\n const origin = options.offsetWithOrigin ? getOrigin(arg) : { x: 0, y: 0 }\n\n let snapOffset: Point\n\n if (options.offset === 'startCoords') {\n snapOffset = {\n x: interaction.coords.start.page.x,\n y: interaction.coords.start.page.y,\n }\n } else {\n const offsetRect = resolveRectLike(options.offset as any, interactable, element, [interaction])\n\n snapOffset = rectToXY(offsetRect) || { x: 0, y: 0 }\n snapOffset.x += origin.x\n snapOffset.y += origin.y\n }\n\n const { relativePoints } = options\n\n state.offsets =\n rect && relativePoints && relativePoints.length\n ? relativePoints.map((relativePoint, index) => ({\n index,\n relativePoint,\n x: startOffset.left - rect.width * relativePoint.x + snapOffset.x,\n y: startOffset.top - rect.height * relativePoint.y + snapOffset.y,\n }))\n : [\n {\n index: 0,\n relativePoint: null,\n x: snapOffset.x,\n y: snapOffset.y,\n },\n ]\n}\n\nfunction set(arg: ModifierArg) {\n const { interaction, coords, state } = arg\n const { options, offsets } = state\n\n const origin = getOriginXY(interaction.interactable!, interaction.element!, interaction.prepared.name)\n const page = extend({}, coords)\n const targets: SnapPosition[] = []\n\n if (!options.offsetWithOrigin) {\n page.x -= origin.x\n page.y -= origin.y\n }\n\n for (const offset of offsets!) {\n const relativeX = page.x - offset.x\n const relativeY = page.y - offset.y\n\n for (let index = 0, len = options.targets!.length; index < len; index++) {\n const snapTarget = options.targets![index]\n let target: SnapPosition\n\n if (is.func(snapTarget)) {\n target = snapTarget(relativeX, relativeY, interaction._proxy, offset, index)\n } else {\n target = snapTarget\n }\n\n if (!target) {\n continue\n }\n\n targets.push({\n x: (is.number(target.x) ? target.x : relativeX) + offset.x,\n y: (is.number(target.y) ? target.y : relativeY) + offset.y,\n\n range: is.number(target.range) ? target.range : options.range,\n source: snapTarget,\n index,\n offset,\n })\n }\n }\n\n const closest = {\n target: null,\n inRange: false,\n distance: 0,\n range: 0,\n delta: { x: 0, y: 0 },\n }\n\n for (const target of targets) {\n const range = target.range\n const dx = target.x - page.x\n const dy = target.y - page.y\n const distance = hypot(dx, dy)\n let inRange = distance <= range\n\n // Infinite targets count as being out of range\n // compared to non infinite ones that are in range\n if (range === Infinity && closest.inRange && closest.range !== Infinity) {\n inRange = false\n }\n\n if (\n !closest.target ||\n (inRange\n ? // is the closest target in range?\n closest.inRange && range !== Infinity\n ? // the pointer is relatively deeper in this target\n distance / range < closest.distance / closest.range\n : // this target has Infinite range and the closest doesn't\n (range === Infinity && closest.range !== Infinity) ||\n // OR this target is closer that the previous closest\n distance < closest.distance\n : // The other is not in range and the pointer is closer to this target\n !closest.inRange && distance < closest.distance)\n ) {\n closest.target = target\n closest.distance = distance\n closest.range = range\n closest.inRange = inRange\n closest.delta.x = dx\n closest.delta.y = dy\n }\n }\n\n if (closest.inRange) {\n coords.x = closest.target.x\n coords.y = closest.target.y\n }\n\n state.closest = closest\n return closest\n}\n\nfunction getOrigin(arg: Partial>) {\n const { element } = arg.interaction\n const optionsOrigin = rectToXY(resolveRectLike(arg.state.options.origin as any, null, null, [element]))\n const origin = optionsOrigin || getOriginXY(arg.interactable, element, arg.interaction.prepared.name)\n\n return origin\n}\n\nconst defaults: SnapOptions = {\n range: Infinity,\n targets: null,\n offset: null,\n offsetWithOrigin: true,\n origin: null,\n relativePoints: null,\n endOnly: false,\n enabled: false,\n}\nconst snap = {\n start,\n set,\n defaults,\n}\n\nexport default makeModifier(snap, 'snap')\nexport { snap }\n","// This modifier allows snapping of the size of targets during resize\n// interactions.\n\nimport extend from '@interactjs/utils/extend'\nimport is from '@interactjs/utils/is'\n\nimport { makeModifier } from '../base'\nimport type { ModifierArg } from '../types'\n\nimport type { SnapOptions, SnapState } from './pointer'\nimport { snap } from './pointer'\n\nexport type SnapSizeOptions = Pick\n\nfunction start(arg: ModifierArg) {\n const { state, edges } = arg\n const { options } = state\n\n if (!edges) {\n return null\n }\n\n arg.state = {\n options: {\n targets: null,\n relativePoints: [\n {\n x: edges.left ? 0 : 1,\n y: edges.top ? 0 : 1,\n },\n ],\n offset: options.offset || 'self',\n origin: { x: 0, y: 0 },\n range: options.range,\n },\n }\n\n state.targetFields = state.targetFields || [\n ['width', 'height'],\n ['x', 'y'],\n ]\n\n snap.start(arg)\n state.offsets = arg.state.offsets\n\n arg.state = state\n}\n\nfunction set(arg) {\n const { interaction, state, coords } = arg\n const { options, offsets } = state\n const relative = {\n x: coords.x - offsets[0].x,\n y: coords.y - offsets[0].y,\n }\n\n state.options = extend({}, options)\n state.options.targets = []\n\n for (const snapTarget of options.targets || []) {\n let target\n\n if (is.func(snapTarget)) {\n target = snapTarget(relative.x, relative.y, interaction)\n } else {\n target = snapTarget\n }\n\n if (!target) {\n continue\n }\n\n for (const [xField, yField] of state.targetFields) {\n if (xField in target || yField in target) {\n target.x = target[xField]\n target.y = target[yField]\n\n break\n }\n }\n\n state.options.targets.push(target)\n }\n\n const returnValue = snap.set(arg)\n\n state.options = options\n\n return returnValue\n}\n\nconst defaults: SnapSizeOptions = {\n range: Infinity,\n targets: null,\n offset: null,\n endOnly: false,\n enabled: false,\n}\n\nconst snapSize = {\n start,\n set,\n defaults,\n}\n\nexport default makeModifier(snapSize, 'snapSize')\nexport { snapSize }\n","/**\n * @module modifiers/snapEdges\n *\n * @description\n * This modifier allows snapping of the edges of targets during resize\n * interactions.\n *\n * ```js\n * interact(target).resizable({\n * snapEdges: {\n * targets: [interact.snappers.grid({ x: 100, y: 50 })],\n * },\n * })\n *\n * interact(target).resizable({\n * snapEdges: {\n * targets: [\n * interact.snappers.grid({\n * top: 50,\n * left: 50,\n * bottom: 100,\n * right: 100,\n * }),\n * ],\n * },\n * })\n * ```\n */\n\nimport clone from '@interactjs/utils/clone'\nimport extend from '@interactjs/utils/extend'\n\nimport { makeModifier } from '../base'\nimport type { ModifierArg, ModifierModule } from '../types'\n\nimport type { SnapOptions, SnapState } from './pointer'\nimport { snapSize } from './size'\n\nexport type SnapEdgesOptions = Pick\n\nfunction start(arg: ModifierArg) {\n const { edges } = arg\n\n if (!edges) {\n return null\n }\n\n arg.state.targetFields = arg.state.targetFields || [\n [edges.left ? 'left' : 'right', edges.top ? 'top' : 'bottom'],\n ]\n\n return snapSize.start(arg)\n}\n\nconst snapEdges: ModifierModule> = {\n start,\n set: snapSize.set,\n defaults: extend(clone(snapSize.defaults), {\n targets: undefined,\n range: undefined,\n offset: { x: 0, y: 0 },\n } as const),\n}\n\nexport default makeModifier(snapEdges, 'snapEdges')\nexport { snapEdges }\n","/* eslint-disable n/no-extraneous-import, import/no-unresolved */\nimport aspectRatio from './aspectRatio'\nimport avoid from './avoid/avoid'\nimport restrictEdges from './restrict/edges'\nimport restrict from './restrict/pointer'\nimport restrictRect from './restrict/rect'\nimport restrictSize from './restrict/size'\nimport rubberband from './rubberband/rubberband'\nimport snapEdges from './snap/edges'\nimport snap from './snap/pointer'\nimport snapSize from './snap/size'\nimport spring from './spring/spring'\nimport transform from './transform/transform'\n\nexport default {\n aspectRatio,\n restrictEdges,\n restrict,\n restrictRect,\n restrictSize,\n snapEdges,\n snap,\n snapSize,\n\n spring,\n avoid,\n transform,\n rubberband,\n}\n","import type { Plugin } from '@interactjs/core/scope'\nimport snappers from '@interactjs/snappers/plugin'\n\n/* eslint-disable import/no-duplicates -- for typescript module augmentations */\nimport './all'\nimport './base'\n\nimport all from './all'\nimport base from './base'\n/* eslint-enable import/no-duplicates */\n\ndeclare module '@interactjs/core/InteractStatic' {\n export interface InteractStatic {\n modifiers: typeof all\n }\n}\n\nconst modifiers: Plugin = {\n id: 'modifiers',\n install(scope) {\n const { interactStatic: interact } = scope\n\n scope.usePlugin(base)\n scope.usePlugin(snappers)\n\n interact.modifiers = all\n\n // for backwrads compatibility\n for (const type in all) {\n const { _defaults, _methods } = all[type as keyof typeof all]\n\n ;(_defaults as any)._methods = _methods\n ;(scope.defaults.perAction as any)[type] = _defaults\n }\n },\n}\n\nexport default modifiers\n","import { BaseEvent } from '@interactjs/core/BaseEvent'\nimport type Interaction from '@interactjs/core/Interaction'\nimport type { PointerEventType, PointerType, Point } from '@interactjs/core/types'\nimport * as pointerUtils from '@interactjs/utils/pointerUtils'\n\nexport class PointerEvent extends BaseEvent {\n declare type: T\n declare originalEvent: PointerEventType\n declare pointerId: number\n declare pointerType: string\n declare double: boolean\n declare pageX: number\n declare pageY: number\n declare clientX: number\n declare clientY: number\n declare dt: number\n declare eventable: any;\n [key: string]: any\n\n constructor(\n type: T,\n pointer: PointerType | PointerEvent,\n event: PointerEventType,\n eventTarget: Node,\n interaction: Interaction,\n timeStamp: number,\n ) {\n super(interaction)\n pointerUtils.pointerExtend(this, event)\n\n if (event !== pointer) {\n pointerUtils.pointerExtend(this, pointer)\n }\n\n this.timeStamp = timeStamp\n this.originalEvent = event\n this.type = type\n this.pointerId = pointerUtils.getPointerId(pointer)\n this.pointerType = pointerUtils.getPointerType(pointer)\n this.target = eventTarget\n this.currentTarget = null\n\n if (type === 'tap') {\n const pointerIndex = interaction.getPointerIndex(pointer)\n this.dt = this.timeStamp - interaction.pointers[pointerIndex].downTime\n\n const interval = this.timeStamp - interaction.tapTime\n\n this.double =\n !!interaction.prevTap &&\n interaction.prevTap.type !== 'doubletap' &&\n interaction.prevTap.target === this.target &&\n interval < 500\n } else if (type === 'doubletap') {\n this.dt = (pointer as PointerEvent<'tap'>).timeStamp - interaction.tapTime\n this.double = true\n }\n }\n\n _subtractOrigin({ x: originX, y: originY }: Point) {\n this.pageX -= originX\n this.pageY -= originY\n this.clientX -= originX\n this.clientY -= originY\n\n return this\n }\n\n _addOrigin({ x: originX, y: originY }: Point) {\n this.pageX += originX\n this.pageY += originY\n this.clientX += originX\n this.clientY += originY\n\n return this\n }\n\n /**\n * Prevent the default behaviour of the original Event\n */\n preventDefault() {\n this.originalEvent.preventDefault()\n }\n}\n","import type { Eventable } from '@interactjs/core/Eventable'\nimport type { Interaction } from '@interactjs/core/Interaction'\nimport type { PerActionDefaults } from '@interactjs/core/options'\nimport type { Scope, SignalArgs, Plugin } from '@interactjs/core/scope'\nimport type { Point, PointerType, PointerEventType, Element } from '@interactjs/core/types'\nimport * as domUtils from '@interactjs/utils/domUtils'\nimport extend from '@interactjs/utils/extend'\nimport getOriginXY from '@interactjs/utils/getOriginXY'\n\nimport { PointerEvent } from './PointerEvent'\n\nexport type EventTargetList = Array<{\n node: Node\n eventable: Eventable\n props: { [key: string]: any }\n}>\n\nexport interface PointerEventOptions extends PerActionDefaults {\n enabled?: undefined // not used\n holdDuration?: number\n ignoreFrom?: any\n allowFrom?: any\n origin?: Point | string | Element\n}\n\ndeclare module '@interactjs/core/scope' {\n interface Scope {\n pointerEvents: typeof pointerEvents\n }\n}\n\ndeclare module '@interactjs/core/Interaction' {\n interface Interaction {\n prevTap?: PointerEvent\n tapTime?: number\n }\n}\n\ndeclare module '@interactjs/core/PointerInfo' {\n interface PointerInfo {\n hold?: {\n duration: number\n timeout: any\n }\n }\n}\n\ndeclare module '@interactjs/core/options' {\n interface ActionDefaults {\n pointerEvents: Options\n }\n}\n\ndeclare module '@interactjs/core/scope' {\n interface SignalArgs {\n 'pointerEvents:new': { pointerEvent: PointerEvent }\n 'pointerEvents:fired': {\n interaction: Interaction\n pointer: PointerType | PointerEvent\n event: PointerEventType | PointerEvent\n eventTarget: Node\n pointerEvent: PointerEvent\n targets?: EventTargetList\n type: string\n }\n 'pointerEvents:collect-targets': {\n interaction: Interaction\n pointer: PointerType | PointerEvent\n event: PointerEventType | PointerEvent\n eventTarget: Node\n targets?: EventTargetList\n type: string\n path: Node[]\n node: null\n }\n }\n}\n\nconst defaults: PointerEventOptions = {\n holdDuration: 600,\n ignoreFrom: null,\n allowFrom: null,\n origin: { x: 0, y: 0 },\n}\n\nconst pointerEvents: Plugin = {\n id: 'pointer-events/base',\n before: ['inertia', 'modifiers', 'auto-start', 'actions'],\n install,\n listeners: {\n 'interactions:new': addInteractionProps,\n 'interactions:update-pointer': addHoldInfo,\n 'interactions:move': moveAndClearHold,\n 'interactions:down': (arg, scope) => {\n downAndStartHold(arg, scope)\n fire(arg, scope)\n },\n 'interactions:up': (arg, scope) => {\n clearHold(arg)\n fire(arg, scope)\n tapAfterUp(arg, scope)\n },\n 'interactions:cancel': (arg, scope) => {\n clearHold(arg)\n fire(arg, scope)\n },\n },\n PointerEvent,\n fire,\n collectEventTargets,\n defaults,\n types: {\n down: true,\n move: true,\n up: true,\n cancel: true,\n tap: true,\n doubletap: true,\n hold: true,\n } as { [type: string]: true },\n}\n\nfunction fire(\n arg: {\n pointer: PointerType | PointerEvent\n event: PointerEventType | PointerEvent\n eventTarget: Node\n interaction: Interaction\n type: T\n targets?: EventTargetList\n },\n scope: Scope,\n) {\n const { interaction, pointer, event, eventTarget, type, targets = collectEventTargets(arg, scope) } = arg\n\n const pointerEvent = new PointerEvent(type, pointer, event, eventTarget, interaction, scope.now())\n\n scope.fire('pointerEvents:new', { pointerEvent })\n\n const signalArg = {\n interaction,\n pointer,\n event,\n eventTarget,\n targets,\n type,\n pointerEvent,\n }\n\n for (let i = 0; i < targets.length; i++) {\n const target = targets[i]\n\n for (const prop in target.props || {}) {\n ;(pointerEvent as any)[prop] = target.props[prop]\n }\n\n const origin = getOriginXY(target.eventable, target.node)\n\n pointerEvent._subtractOrigin(origin)\n pointerEvent.eventable = target.eventable\n pointerEvent.currentTarget = target.node\n\n target.eventable.fire(pointerEvent)\n\n pointerEvent._addOrigin(origin)\n\n if (\n pointerEvent.immediatePropagationStopped ||\n (pointerEvent.propagationStopped &&\n i + 1 < targets.length &&\n targets[i + 1].node !== pointerEvent.currentTarget)\n ) {\n break\n }\n }\n\n scope.fire('pointerEvents:fired', signalArg)\n\n if (type === 'tap') {\n // if pointerEvent should make a double tap, create and fire a doubletap\n // PointerEvent and use that as the prevTap\n const prevTap = pointerEvent.double\n ? fire(\n {\n interaction,\n pointer,\n event,\n eventTarget,\n type: 'doubletap',\n },\n scope,\n )\n : pointerEvent\n\n interaction.prevTap = prevTap\n interaction.tapTime = prevTap.timeStamp\n }\n\n return pointerEvent\n}\n\nfunction collectEventTargets(\n {\n interaction,\n pointer,\n event,\n eventTarget,\n type,\n }: {\n interaction: Interaction\n pointer: PointerType | PointerEvent\n event: PointerEventType | PointerEvent\n eventTarget: Node\n type: T\n },\n scope: Scope,\n) {\n const pointerIndex = interaction.getPointerIndex(pointer)\n const pointerInfo = interaction.pointers[pointerIndex]\n\n // do not fire a tap event if the pointer was moved before being lifted\n if (\n type === 'tap' &&\n (interaction.pointerWasMoved ||\n // or if the pointerup target is different to the pointerdown target\n !(pointerInfo && pointerInfo.downTarget === eventTarget))\n ) {\n return []\n }\n\n const path = domUtils.getPath(eventTarget as Element | Document)\n const signalArg = {\n interaction,\n pointer,\n event,\n eventTarget,\n type,\n path,\n targets: [] as EventTargetList,\n node: null,\n }\n\n for (const node of path) {\n signalArg.node = node\n\n scope.fire('pointerEvents:collect-targets', signalArg)\n }\n\n if (type === 'hold') {\n signalArg.targets = signalArg.targets.filter(\n (target) =>\n target.eventable.options.holdDuration === interaction.pointers[pointerIndex]?.hold?.duration,\n )\n }\n\n return signalArg.targets\n}\n\nfunction addInteractionProps({ interaction }) {\n interaction.prevTap = null // the most recent tap event on this interaction\n interaction.tapTime = 0 // time of the most recent tap event\n}\n\nfunction addHoldInfo({ down, pointerInfo }: SignalArgs['interactions:update-pointer']) {\n if (!down && pointerInfo.hold) {\n return\n }\n\n pointerInfo.hold = { duration: Infinity, timeout: null }\n}\n\nfunction clearHold({ interaction, pointerIndex }) {\n const hold = interaction.pointers[pointerIndex].hold\n\n if (hold && hold.timeout) {\n clearTimeout(hold.timeout)\n hold.timeout = null\n }\n}\n\nfunction moveAndClearHold(arg: SignalArgs['interactions:move'], scope: Scope) {\n const { interaction, pointer, event, eventTarget, duplicate } = arg\n\n if (!duplicate && (!interaction.pointerIsDown || interaction.pointerWasMoved)) {\n if (interaction.pointerIsDown) {\n clearHold(arg)\n }\n\n fire(\n {\n interaction,\n pointer,\n event,\n eventTarget: eventTarget as Element,\n type: 'move',\n },\n scope,\n )\n }\n}\n\nfunction downAndStartHold(\n { interaction, pointer, event, eventTarget, pointerIndex }: SignalArgs['interactions:down'],\n scope: Scope,\n) {\n const timer = interaction.pointers[pointerIndex].hold!\n const path = domUtils.getPath(eventTarget as Element | Document)\n const signalArg = {\n interaction,\n pointer,\n event,\n eventTarget,\n type: 'hold',\n targets: [] as EventTargetList,\n path,\n node: null,\n }\n\n for (const node of path) {\n signalArg.node = node\n\n scope.fire('pointerEvents:collect-targets', signalArg)\n }\n\n if (!signalArg.targets.length) return\n\n let minDuration = Infinity\n\n for (const target of signalArg.targets) {\n const holdDuration = target.eventable.options.holdDuration\n\n if (holdDuration < minDuration) {\n minDuration = holdDuration\n }\n }\n\n timer.duration = minDuration\n timer.timeout = setTimeout(() => {\n fire(\n {\n interaction,\n eventTarget,\n pointer,\n event,\n type: 'hold',\n },\n scope,\n )\n }, minDuration)\n}\n\nfunction tapAfterUp(\n { interaction, pointer, event, eventTarget }: SignalArgs['interactions:up'],\n scope: Scope,\n) {\n if (!interaction.pointerWasMoved) {\n fire({ interaction, eventTarget, pointer, event, type: 'tap' }, scope)\n }\n}\n\nfunction install(scope: Scope) {\n scope.pointerEvents = pointerEvents\n scope.defaults.actions.pointerEvents = pointerEvents.defaults\n extend(scope.actions.phaselessTypes, pointerEvents.types)\n}\n\nexport default pointerEvents\n","import type Interaction from '@interactjs/core/Interaction'\nimport type { ListenerMap, Scope, SignalArgs, Plugin } from '@interactjs/core/scope'\n\n/* eslint-disable import/no-duplicates -- for typescript module augmentations */\nimport './base'\nimport basePlugin from './base'\n/* eslint-enable import/no-duplicates */\nimport { type PointerEvent } from './PointerEvent'\n\ndeclare module '@interactjs/core/Interaction' {\n interface Interaction {\n holdIntervalHandle?: any\n }\n}\n\ndeclare module '@interactjs/pointer-events/PointerEvent' {\n interface PointerEvent {\n count?: number\n }\n}\n\ndeclare module '@interactjs/pointer-events/base' {\n interface PointerEventOptions {\n holdRepeatInterval?: number\n }\n}\n\nfunction install(scope: Scope) {\n scope.usePlugin(basePlugin)\n\n const { pointerEvents } = scope\n\n // don't repeat by default\n pointerEvents.defaults.holdRepeatInterval = 0\n pointerEvents.types.holdrepeat = scope.actions.phaselessTypes.holdrepeat = true\n}\n\nfunction onNew({ pointerEvent }: { pointerEvent: PointerEvent }) {\n if (pointerEvent.type !== 'hold') return\n\n pointerEvent.count = (pointerEvent.count || 0) + 1\n}\n\nfunction onFired(\n { interaction, pointerEvent, eventTarget, targets }: SignalArgs['pointerEvents:fired'],\n scope: Scope,\n) {\n if (pointerEvent.type !== 'hold' || !targets.length) return\n\n // get the repeat interval from the first eventable\n const interval = targets[0].eventable.options.holdRepeatInterval\n\n // don't repeat if the interval is 0 or less\n if (interval <= 0) return\n\n // set a timeout to fire the holdrepeat event\n interaction.holdIntervalHandle = setTimeout(() => {\n scope.pointerEvents.fire(\n {\n interaction,\n eventTarget,\n type: 'hold',\n pointer: pointerEvent,\n event: pointerEvent,\n },\n scope,\n )\n }, interval)\n}\n\nfunction endHoldRepeat({ interaction }: { interaction: Interaction }) {\n // set the interaction's holdStopTime property\n // to stop further holdRepeat events\n if (interaction.holdIntervalHandle) {\n clearInterval(interaction.holdIntervalHandle)\n interaction.holdIntervalHandle = null\n }\n}\n\nconst holdRepeat: Plugin = {\n id: 'pointer-events/holdRepeat',\n install,\n listeners: ['move', 'up', 'cancel', 'endall'].reduce(\n (acc, enderTypes) => {\n ;(acc as any)[`pointerEvents:${enderTypes}`] = endHoldRepeat\n return acc\n },\n {\n 'pointerEvents:new': onNew,\n 'pointerEvents:fired': onFired,\n } as ListenerMap,\n ),\n}\n\nexport default holdRepeat\n","import type { Interactable } from '@interactjs/core/Interactable'\nimport type { Scope, Plugin } from '@interactjs/core/scope'\nimport type { Element } from '@interactjs/core/types'\nimport extend from '@interactjs/utils/extend'\n\nimport type { PointerEventOptions } from '@interactjs/pointer-events/base'\n\ndeclare module '@interactjs/core/Interactable' {\n interface Interactable {\n pointerEvents(options: Partial): this\n /** @internal */\n __backCompatOption: (optionName: string, newValue: any) => any\n }\n}\n\nfunction install(scope: Scope) {\n const { Interactable } = scope\n\n Interactable.prototype.pointerEvents = function (\n this: Interactable,\n options: Partial,\n ) {\n extend(this.events.options, options)\n\n return this\n }\n\n const __backCompatOption = Interactable.prototype._backCompatOption\n\n Interactable.prototype._backCompatOption = function (optionName, newValue) {\n const ret = __backCompatOption.call(this, optionName, newValue)\n\n if (ret === this) {\n this.events.options[optionName] = newValue\n }\n\n return ret\n }\n}\n\nconst plugin: Plugin = {\n id: 'pointer-events/interactableTargets',\n install,\n listeners: {\n 'pointerEvents:collect-targets': ({ targets, node, type, eventTarget }, scope) => {\n scope.interactables.forEachMatch(node, (interactable: Interactable) => {\n const eventable = interactable.events\n const options = eventable.options\n\n if (\n eventable.types[type] &&\n eventable.types[type].length &&\n interactable.testIgnoreAllow(options, node, eventTarget)\n ) {\n targets.push({\n node,\n eventable,\n props: { interactable },\n })\n }\n })\n },\n\n 'interactable:new': ({ interactable }) => {\n interactable.events.getRect = function (element: Element) {\n return interactable.getRect(element)\n }\n },\n\n 'interactable:set': ({ interactable, options }, scope) => {\n extend(interactable.events.options, scope.pointerEvents.defaults)\n extend(interactable.events.options, options.pointerEvents || {})\n },\n },\n}\n\nexport default plugin\n","import type { Plugin } from '@interactjs/core/scope'\n\n/* eslint-disable import/no-duplicates -- for typescript module augmentations */\nimport './base'\nimport './holdRepeat'\nimport './interactableTargets'\n\nimport * as pointerEvents from './base'\nimport holdRepeat from './holdRepeat'\nimport interactableTargets from './interactableTargets'\n/* eslint-enable import/no-duplicates */\n\nconst plugin: Plugin = {\n id: 'pointer-events',\n install(scope) {\n scope.usePlugin(pointerEvents)\n scope.usePlugin(holdRepeat)\n scope.usePlugin(interactableTargets)\n },\n}\n\nexport default plugin\n","import type { Interactable } from '@interactjs/core/Interactable'\nimport type { DoAnyPhaseArg, Interaction } from '@interactjs/core/Interaction'\nimport type { Scope, Plugin } from '@interactjs/core/scope'\nimport type { ActionName, ActionProps, Element } from '@interactjs/core/types'\nimport * as arr from '@interactjs/utils/arr'\nimport { copyAction } from '@interactjs/utils/misc'\nimport * as pointerUtils from '@interactjs/utils/pointerUtils'\nimport { tlbrToXywh } from '@interactjs/utils/rect'\n\ndeclare module '@interactjs/core/scope' {\n interface SignalArgs {\n 'interactions:before-action-reflow': Omit\n 'interactions:action-reflow': DoAnyPhaseArg\n 'interactions:after-action-reflow': DoAnyPhaseArg\n }\n}\n\ndeclare module '@interactjs/core/Interactable' {\n interface Interactable {\n /**\n * ```js\n * const interactable = interact(target)\n * const drag = { name: drag, axis: 'x' }\n * const resize = { name: resize, edges: { left: true, bottom: true }\n *\n * interactable.reflow(drag)\n * interactable.reflow(resize)\n * ```\n *\n * Start an action sequence to re-apply modifiers, check drops, etc.\n *\n * @param { Object } action The action to begin\n * @param { string } action.name The name of the action\n * @returns { Promise } A promise that resolves to the `Interactable` when actions on all targets have ended\n */\n reflow(action: ActionProps): ReturnType\n }\n}\n\ndeclare module '@interactjs/core/Interaction' {\n interface Interaction {\n _reflowPromise: Promise\n _reflowResolve: (...args: unknown[]) => void\n }\n}\n\ndeclare module '@interactjs/core/InteractEvent' {\n interface PhaseMap {\n reflow?: true\n }\n}\n\nfunction install(scope: Scope) {\n const { Interactable } = scope\n\n scope.actions.phases.reflow = true\n\n Interactable.prototype.reflow = function (action: ActionProps) {\n return doReflow(this, action, scope)\n }\n}\n\nfunction doReflow(\n interactable: Interactable,\n action: ActionProps,\n scope: Scope,\n): Promise {\n const elements = interactable.getAllElements()\n\n // tslint:disable-next-line variable-name\n const Promise = (scope.window as any).Promise\n const promises: Array> | null = Promise ? [] : null\n\n for (const element of elements) {\n const rect = interactable.getRect(element as HTMLElement | SVGElement)\n\n if (!rect) {\n break\n }\n\n const runningInteraction = arr.find(scope.interactions.list, (interaction: Interaction) => {\n return (\n interaction.interacting() &&\n interaction.interactable === interactable &&\n interaction.element === element &&\n interaction.prepared.name === action.name\n )\n })\n let reflowPromise: Promise\n\n if (runningInteraction) {\n runningInteraction.move()\n\n if (promises) {\n reflowPromise =\n runningInteraction._reflowPromise ||\n new Promise((resolve: any) => {\n runningInteraction._reflowResolve = resolve\n })\n }\n } else {\n const xywh = tlbrToXywh(rect)\n const coords = {\n page: { x: xywh.x, y: xywh.y },\n client: { x: xywh.x, y: xywh.y },\n timeStamp: scope.now(),\n }\n\n const event = pointerUtils.coordsToEvent(coords)\n reflowPromise = startReflow(scope, interactable, element, action, event)\n }\n\n if (promises) {\n promises.push(reflowPromise)\n }\n }\n\n return promises && Promise.all(promises).then(() => interactable)\n}\n\nfunction startReflow(\n scope: Scope,\n interactable: Interactable,\n element: Element,\n action: ActionProps,\n event: any,\n) {\n const interaction = scope.interactions.new({ pointerType: 'reflow' })\n const signalArg = {\n interaction,\n event,\n pointer: event,\n eventTarget: element,\n phase: 'reflow',\n } as const\n\n interaction.interactable = interactable\n interaction.element = element\n interaction.prevEvent = event\n interaction.updatePointer(event, event, element, true)\n pointerUtils.setZeroCoords(interaction.coords.delta)\n\n copyAction(interaction.prepared, action)\n interaction._doPhase(signalArg)\n\n const { Promise } = scope.window as unknown as { Promise: PromiseConstructor }\n const reflowPromise = Promise\n ? new Promise((resolve) => {\n interaction._reflowResolve = resolve\n })\n : undefined\n\n interaction._reflowPromise = reflowPromise\n interaction.start(action, interactable, element)\n\n if (interaction._interacting) {\n interaction.move(signalArg)\n interaction.end(event)\n } else {\n interaction.stop()\n interaction._reflowResolve()\n }\n\n interaction.removePointer(event, event)\n\n return reflowPromise\n}\n\nconst reflow: Plugin = {\n id: 'reflow',\n install,\n listeners: {\n // remove completed reflow interactions\n 'interactions:stop': ({ interaction }, scope) => {\n if (interaction.pointerType === 'reflow') {\n if (interaction._reflowResolve) {\n interaction._reflowResolve()\n }\n\n arr.remove(scope.interactions.list, interaction)\n }\n },\n },\n}\n\nexport default reflow\n","// eslint-disable-next-line import/no-extraneous-dependencies\nimport interact from '@interactjs/interactjs'\n\nexport default interact\n\nif (typeof module === 'object' && !!module) {\n try {\n module.exports = interact\n } catch {}\n}\n\n;(interact as any).default = interact\n","/* eslint-disable import/no-duplicates -- for typescript module augmentations */\nimport '@interactjs/actions/plugin'\nimport '@interactjs/auto-scroll/plugin'\nimport '@interactjs/auto-start/plugin'\nimport '@interactjs/core/interactablePreventDefault'\nimport '@interactjs/dev-tools/plugin'\nimport '@interactjs/inertia/plugin'\nimport '@interactjs/interact'\nimport '@interactjs/modifiers/plugin'\nimport '@interactjs/offset/plugin'\nimport '@interactjs/pointer-events/plugin'\nimport '@interactjs/reflow/plugin'\n\nimport actions from '@interactjs/actions/plugin'\nimport autoScroll from '@interactjs/auto-scroll/plugin'\nimport autoStart from '@interactjs/auto-start/plugin'\nimport interactablePreventDefault from '@interactjs/core/interactablePreventDefault'\nimport devTools from '@interactjs/dev-tools/plugin'\nimport inertia from '@interactjs/inertia/plugin'\nimport interact from '@interactjs/interact'\nimport modifiers from '@interactjs/modifiers/plugin'\nimport offset from '@interactjs/offset/plugin'\nimport pointerEvents from '@interactjs/pointer-events/plugin'\nimport reflow from '@interactjs/reflow/plugin'\n/* eslint-enable import/no-duplicates */\n\ninteract.use(interactablePreventDefault)\n\ninteract.use(offset)\n\n// pointerEvents\ninteract.use(pointerEvents)\n\n// inertia\ninteract.use(inertia)\n\n// snap, resize, etc.\ninteract.use(modifiers)\n\n// autoStart, hold\ninteract.use(autoStart)\n\n// drag and drop, resize, gesture\ninteract.use(actions)\n\n// autoScroll\ninteract.use(autoScroll)\n\n// reflow\ninteract.use(reflow)\n\n// eslint-disable-next-line no-undef\nif (process.env.NODE_ENV !== 'production') {\n interact.use(devTools)\n}\n\nexport default interact\n;(interact as any).default = interact\n","import m from 'mithril'\nimport Project from './Project'\nimport { Home } from './Home'\nimport { Projects } from './Projects'\nimport { Documents } from './Documents'\nimport '../node_modules/alertifyjs/build/css/alertify.min.css'\nimport '../node_modules/alertifyjs/build/css/themes/semantic.css'\nimport { defaults } from 'alertifyjs'\nimport { Login, Logout } from './Login'\nimport { User } from './User'\nimport { Renders } from './Renders'\nimport { Magnussens } from './Magnussens'\nimport { Layout } from './Components'\nimport { TemplateEditor } from './TemplateEditor'\nimport { Otto } from './Otto'\nimport ICON from './assets/al-white.svg'\n\nvar state = require('./Globals').state\n\ndefaults.transition = 'zoom'\ndefaults.theme.ok = 'ui positive button'\ndefaults.theme.cancel = 'ui black button'\ndefaults.notifier.delay = 10\n\nif (\n window.matchMedia &&\n window.matchMedia('(prefers-color-scheme: dark)').matches\n) {\n // swap favicon if in dark mode\n let favicon = (document.getElementById('favicon').href = ICON)\n}\n\nwindow.addEventListener('storage', event => {\n let credentials = User.jwt\n // console.log('storage event', event, credentials)\n if (event.key === 'REQUESTING_SHARED_CREDENTIALS' && credentials) {\n window.localStorage.setItem(\n 'CREDENTIALS_SHARING',\n JSON.stringify(credentials)\n )\n window.localStorage.removeItem('CREDENTIALS_SHARING')\n }\n if (event.key === 'CREDENTIALS_SHARING' && !credentials) {\n User.login(JSON.parse(event.newValue))\n }\n if (event.key === 'CREDENTIALS_FLUSH' && credentials) {\n User.logout()\n }\n})\n\nwindow.localStorage.setItem(\n 'REQUESTING_SHARED_CREDENTIALS',\n Date.now().toString()\n)\nwindow.localStorage.removeItem('REQUESTING_SHARED_CREDENTIALS')\n\nconsole.log('sup!')\n\nm.route(document.body, '/', {\n '/': { render: () => m(Layout, m(Home)) },\n '/projects': { render: () => m(Layout, m(Projects)) },\n '/renders': { render: () => m(Layout, m(Renders)) },\n '/documents': { render: () => m(Layout, m(Documents)) },\n '/otto': Otto,\n '/form': { render: () => m(Layout, m(Magnussens)) },\n '/editor': { render: () => m(Layout, m(TemplateEditor)) },\n '/login': { render: () => m(Layout, m(Login)) },\n '/logout': { render: () => m(Layout, m(Logout)) },\n})\n","\"use strict\"\n\nvar hyperscript = require(\"./hyperscript\")\nvar request = require(\"./request\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nvar m = function m() { return hyperscript.apply(this, arguments) }\nm.m = hyperscript\nm.trust = hyperscript.trust\nm.fragment = hyperscript.fragment\nm.Fragment = \"[\"\nm.mount = mountRedraw.mount\nm.route = require(\"./route\")\nm.render = require(\"./render\")\nm.redraw = mountRedraw.redraw\nm.request = request.request\nm.jsonp = request.jsonp\nm.parseQueryString = require(\"./querystring/parse\")\nm.buildQueryString = require(\"./querystring/build\")\nm.parsePathname = require(\"./pathname/parse\")\nm.buildPathname = require(\"./pathname/build\")\nm.vnode = require(\"./render/vnode\")\nm.PromisePolyfill = require(\"./promise/polyfill\")\nm.censor = require(\"./util/censor\")\n\nmodule.exports = m\n","\"use strict\"\n\nvar hyperscript = require(\"./render/hyperscript\")\n\nhyperscript.trust = require(\"./render/trust\")\nhyperscript.fragment = require(\"./render/fragment\")\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./promise/promise\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./request/request\")(typeof window !== \"undefined\" ? window : null, PromisePolyfill, mountRedraw.redraw)\n","import m from 'mithril'\nvar state = require(\"./Globals\").state\nvar Timeline = require(\"./Timeline\").Timeline\nconst formatTime = require('./Slider').formatTime\nimport { Edl } from './Video'\n\nmodule.exports = {\n view: (vnode) => {\n return m('table#project.project', {}, [\n m('tr', [\n m('th', 'name'),\n m('th', 'inpoint'),\n m('th', 'outpoint'),\n m('th', 'duration'),\n m('th', 'description'),\n ]),\n Edl.edl.map(c => {\n // console.log('project clip: ', c)\n return m('tr', [\n m('td', c[0].split('/').pop()),\n m('td', formatTime(c[1])),\n m('td', formatTime(c[2])),\n m('td', formatTime(c[2] - c[1])),\n m('td', c[4]),\n ])\n })])\n }\n}\n","import m from 'mithril'\nvar Stream = require(\"mithril/stream\")\n\nexport var Video = {\n clip: null,\n paused: true,\n filename: \"\",\n time: Stream(0),\n duration: 0,\n volume: .1,\n speed: 1,\n}\n\nexport var Edl = {\n edl: [],\n current: 0,\n time: 0,\n duration: () => {\n if (Edl.edl.length > 0) {\n return Edl.edl.reduce((a, b) => a + (b ? b['duration'] : 0), 0)\n } else {\n return 0\n }\n },\n durations: (e) => {\n let d = e.map(clip => clip['duration'])\n return d.reduce((a, b) => a + b, 0)\n },\n update: () => {\n let edl = Edl.edl\n Edl.edl = []\n m.redraw.sync()\n Edl.edl = edl\n m.redraw.sync()\n console.log('edl updated', Edl.edl)\n },\n which: (t) => {\n let c = 0\n let i = 0\n while (c + Edl.edl[i].duration < t) {\n c += Edl.edl[i].duration\n i++\n }\n return i\n },\n jump: (t) => {\n let n = Edl.which(t)\n if (n != Edl.current) {\n Video.clip = Edl.edl[n]\n Edl.current = n\n }\n Edl.time = t\n Video.time(t - Edl.durations(Edl.edl.slice(0, n)))\n m.redraw.sync()\n }\n}\n\nexport function array_move(arr, old_index, new_index) {\n let element = arr[old_index];\n arr.splice(old_index, 1);\n arr.splice(new_index, 0, element);\n return arr\n};\n","\"use strict\"\n\nmodule.exports = require(\"./stream/stream\")\n","\nvar Stream = require(\"mithril/stream\")\n\nexport var state = {\n edl: Stream([]),\n paused: Stream(true),\n scale: Stream(50),\n volume: Stream(.1),\n time: Stream(0),\n duration: Stream(0),\n tool: Stream('time'),\n width: () => {\n if (state.aspectWidth() >= state.aspectHeight()) {\n let w = parseInt(state.resolution()*state.aspectWidth()/state.aspectHeight())\n if (w % 2 != 0) {\n w -= 1\n }\n return w\n } else {\n return state.resolution()\n }\n },\n height: () => {\n if (state.aspectWidth() >= state.aspectHeight()) {\n return state.resolution()\n } else {\n let h = parseInt(state.resolution()*state.aspectHeight()/state.aspectWidth())\n if (h % 2 != 0) {\n h -= 1\n }\n return h\n }\n },\n resolution: Stream(1080),\n aspectWidth: Stream(16),\n aspectHeight: Stream(9),\n}\n","import m from 'mithril'\nimport Sortable, { MultiDrag } from 'sortablejs'\nSortable.mount(new MultiDrag());\n// var Clip = require('./Clip').Clip\nimport Clip from './Clip'\nvar state = require(\"./Globals\").state\nimport { Video, Edl } from './Video'\nimport Monitor from './Monitor'\n\n\n// const csvStringToArray = require('./parseCsv').csvStringToArray\nconst CSVToArray = require('./CSVToArray').CSVToArray\nconst edlToSeconds = require('./CSVToArray').edlToSeconds\n\nexport var Timeline = {\n // constructor() {\n // edl: [],\n // duration: 0,\n // }\n v: null,\n updateEdl: () => {\n var edl = []\n let clips = Timeline.v.dom.children\n // let clips = document.getElementById('timeline').children\n // console.log('updating edl', clips)\n for (var i = 0; i < clips.length; i++) {\n // console.log(i, clips[i])\n edl.push([\n clips[i].attributes.filename.value,\n Number(clips[i].attributes.inpoint.value),\n Number(clips[i].attributes.outpoint.value),\n Number(clips[i].attributes.outpoint.value - clips[i].attributes.inpoint.value),\n clips[i].attributes.description.value\n ])\n clips[i].attributes.pos.value = i\n }\n Edl.edl = edl\n m.redraw()\n },\n loadEdl: (edl) => {\n Edl.edl = []\n m.redraw.sync()\n Edl.edl = edl\n m.redraw()\n },\n oninit: (vnode) => {\n Timeline.v = vnode\n // m.request(m.route.param('edl') || 'test.csv', {extract: (xhr) => {return {status: xhr.status, body: xhr.responseText}}}).then((e) => {\n // console.log('got edl!', e)\n // // Edl.edl = csvStringToArray(e.body)\n // Edl.edl = edlToSeconds(CSVToArray(e.body))\n m.request({\n url: '/edl',\n params: {\n filename: m.route.param('edl')\n }\n }).then(e => {\n let edl\n if (Array.isArray(e) && e.length) {\n edl = e\n } else {\n edl = edlToSeconds(CSVToArray(e))\n }\n console.log('got edl!', e, edl)\n Edl.edl = edl\n Video.filename = Edl.edl[0][0]\n Video.time(Edl.edl[0][1])\n Monitor.load(Video.filename)\n })\n // m.redraw()\n // Monitor.play()\n // })\n\n },\n oncreate: (vnode) => {\n new Sortable(vnode.dom, {\n multiDrag: true,\n group: 'media',\n selectedClass: \"selected\",\n swapThreshold: 0.50,\n animation: 150,\n ghostClass: 'ghost',\n forceFallback: true,\n // delay: 100,\n invertSwap: true,\n preventOnFilter: false,\n filter: (e) => {\n if (state.tool() != 'move') {\n return true\n }\n else {\n return false\n }\n\n },\n onUpdate: (e) => {\n Edl.current = e.newIndex\n console.log('sorting update', e, Edl)\n Timeline.updateEdl()\n },\n removeOnSpill: true,\n onSpill: e => {\n console.log('spilling', e)\n Edl.edl.splice(e.oldIndex, 1)\n Timeline.loadEdl(Edl.edl)\n // console.log('new edl:', Edl.edl)\n }\n })\n },\n view: (vnode) => {\n return m('#timeline.timeline', [\n Edl.edl.map((c, i) => {\n return m(Clip, {filename: c[0], inpoint: c[1], outpoint: c[2], duration: c[3], description: c[4], pos: i})\n\n })\n ])\n },\n}\n","/**!\n * Sortable 1.15.1\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.1\";\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 * Returns the content rect of the element (bounding rect minus border and padding)\r\n * @param {HTMLElement} el \r\n */\nfunction getContentRect(el) {\n var rect = getRect(el);\n var paddingLeft = parseInt(css(el, 'padding-left')),\n paddingTop = parseInt(css(el, 'padding-top')),\n paddingRight = parseInt(css(el, 'padding-right')),\n paddingBottom = parseInt(css(el, 'padding-bottom'));\n rect.top += paddingTop + parseInt(css(el, 'border-top-width'));\n rect.left += paddingLeft + parseInt(css(el, 'border-left-width'));\n // Client Width/Height includes padding only\n rect.width = el.clientWidth - paddingLeft - paddingRight;\n rect.height = el.clientHeight - paddingTop - paddingBottom;\n rect.bottom = rect.top + rect.height;\n rect.right = rect.left + rect.width;\n return rect;\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}\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 supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,\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.cancelable && 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.cancelable && 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 on(ownerDocument, 'mouseup', _this._onDrop);\n on(ownerDocument, 'touchend', _this._onDrop);\n on(ownerDocument, 'touchcancel', _this._onDrop);\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 on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\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, '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 // Timeout neccessary for IE9\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 = parent.parentNode);\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 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, '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 sortableContentRect = getContentRect(sortable.el);\n var spacer = 10;\n return vertical ? evt.clientX < sortableContentRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < sortableContentRect.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 sortableContentRect = getContentRect(sortable.el);\n var spacer = 10;\n return vertical ? evt.clientX > sortableContentRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > sortableContentRect.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};\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});\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 // 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 for (; i < n; i++) {\n if (~multiDragElements.indexOf(children[i])) 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 } 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\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\nexport default Sortable;\nexport { MultiDragPlugin as MultiDrag, Sortable, SwapPlugin as Swap };\n","import m from 'mithril'\nimport interact from 'interactjs'\nimport { Timeline } from './Timeline'\nimport Monitor from './Monitor'\nimport { Video, Edl } from './Video'\nvar state = require(\"./Globals\").state\n\nfunction whichAmI(e, p) {\n let c = p.children\n for (var i = 0; i < c.length; i++) {\n if (c[i] == e) {\n return i\n }\n }\n return false\n}\n\nexport default class Clip {\n constructor(vnode) {\n this.inpoint = vnode.attrs.inpoint\n this.outpoint = vnode.attrs.outpoint\n this.description = vnode.attrs.description\n this.filename = vnode.attrs.name\n this.pos = vnode.attrs.pos\n // console.log('clip init', vnode, this.inpoint, this.outpoint)\n }\n\n oninit(vnode) {\n }\n /* Create an interactable object in order to resize the left and right edges of the clip.\n */\n oncreate(vnode) {\n const clip = interact(vnode.dom)\n clip.resizable({\n edges: {\n left: true,\n right: true,\n },\n cursorChecker: (action, interactable, element, interacting) => {\n switch(state.tool()) {\n case 'trim': {\n if (action.edges.right) {\n return 'e-resize'\n } else if (action.edges.left) {\n return 'w-resize'\n }\n break\n }\n default: return null\n }\n },\n }\n )\n clip.on('resizemove', (event) => {\n // console.log('resizemove', event)\n let target = event.target\n // console.log('event: ', event) //event.delta.x, )\n const w = parseInt(target.style.width)\n const dx = Number((event.dx / state.scale()).toFixed(2))\n // console.log( w - (vnode.state.outpoint - vnode.state.inpoint), event.rect.width, vnode.state.outpoint, vnode.state.inpoint, w)\n if (state.tool() == 'trim') {\n if (event.edges.left && ( this.outpoint > this.inpoint + dx) && (this.inpoint + dx >= 0)) {\n // target.style.width = event.rect.width + 'px';\n target.style.width = w - dx + 'px'\n this.inpoint = this.inpoint + dx\n target.setAttribute('inpoint', this.inpoint)\n Timeline.updateEdl()\n // console.log('changing inpoint', vnode, event)\n } else if (event.edges.right && (this.outpoint + dx > this.inpoint)) {\n target.style.width = w + dx + 'px';\n this.outpoint = this.outpoint + dx\n target.setAttribute('outpoint', this.outpoint)\n // console.log('changing outpoint', event.deltaRect, event)\n Timeline.updateEdl()\n }\n } else if (state.tool() == 'dual roller') {\n if (event.edges.left && ( this.outpoint > this.inpoint + dx) && (this.inpoint + dx >= 0)) {\n console.log('dual rolling')\n Edl.edl[this.pos][1] += dx\n if (this.pos) {\n Edl.edl[this.pos - 1][2] += dx\n }\n Timeline.loadEdl(Edl.edl)\n } else if (event.edges.right && (this.outpoint + dx > this.inpoint)) {\n Edl.edl[this.pos][2] += dx\n if (Edl.edl.length - 1 > this.pos) {\n Edl.edl[this.pos + 1][1] += dx\n }\n Timeline.loadEdl(Edl.edl)\n }\n }\n })\n var self = this\n clip.draggable({\n cursorChecker () {\n return null\n },\n listeners: {\n start (e) {\n console.log('dragging clip', e)\n },\n move (e) {\n if (state.tool() == 'slip') {\n const dx = e.dx / state.scale()\n if (self.inpoint - e.dx > 0) {\n console.log('slipping', e, dx)\n self.inpoint -= dx\n self.outpoint -= dx\n Edl.edl[self.pos][1] -= dx\n Edl.edl[self.pos][2] -= dx\n Timeline.loadEdl(Edl.edl)\n } else {\n self.outpoint -= self.inpoint\n self.inpoint = 0\n Edl.edl[self.pos][2] -= Edl.edl[self.pos][1]\n Edl.edl[self.pos][1] = 0\n Timeline.loadEdl(Edl.edl)\n }\n } else if (state.tool() == 'slide') {\n const dx = e.dx / state.scale()\n console.log('sliding', e, dx)\n if (self.pos) {\n Edl.edl[self.pos - 1][2] = Math.max(Edl.edl[self.pos - 1][2] + dx, 0)\n }\n if (Edl.edl.length - 1 > self.pos) {\n Edl.edl[self.pos + 1][1] += dx\n }\n Timeline.loadEdl(Edl.edl)\n\n }\n },\n end (e) {\n }\n }\n })\n\n\n vnode.dom.addEventListener('mousedown', (e) => {\n let target = e.target\n const r = e.offsetX / e.target.offsetWidth\n const t = Number((r*(this.outpoint - this.inpoint) + this.inpoint).toFixed(2))\n // let i = this.pos\n let i = whichAmI(target, target.parentElement)\n console.log('clicked on clip', i, e, r, t)\n if (state.tool() == 'time') {\n if (target.parentElement.id == 'timeline') {\n Edl.current = i\n if (Video.filename != Edl.edl[Edl.current][0]) {\n Video.filename = Edl.edl[Edl.current][0]\n Monitor.load(Video.filename)\n }\n Monitor.seek(t)\n m.redraw()\n }\n } else if (state.tool() == 'cut') {\n if ((this.inpoint < t) && (t < this.outpoint)) {\n console.log(this.inpoint, t, this.outpoint)\n var edl = Edl.edl\n var newClip = [edl[i][0], edl[i][1], edl[i][2],edl[i][3],edl[i][4]]\n console.log('old:', edl[i])\n // var newClip = Edl.edl[i]\n edl[i][2] = t\n this.outpoint = t\n edl[i][3] = Number((edl[i][2] - edl[i][1]).toFixed(2))\n newClip[1] = t\n console.log('cutting', edl[i], newClip)\n newClip[3] = newClip[2] - newClip[1]\n edl.splice(i+1, 0, newClip)\n // Edl.edl = edl\n console.log('new edl', Edl.edl)\n // m.redraw()\n Timeline.loadEdl(edl)\n // Timeline.updateEdl()\n }\n }\n }, true)\n\n }\n onupdate(vnode) {\n if (vnode.dom.parentElement) {\n this.pos = whichAmI(vnode.dom, vnode.dom.parentElement)\n } else {\n vnode.dom.remove()\n }\n // console.log('updating clip pos', this.filename, this.pos)\n }\n view(vnode) {\n return m(`.clip#${vnode.attrs.name}`, {\n 'data-x': this.inpoint, // /state.scale(),\n // 'data-duration': vnode.attrs.duration/scale,\n // innerHTML: `${this.description} - [${this.inpoint}, ${this.outpoint}]`,\n pos: this.pos,\n inpoint: this.inpoint,\n outpoint: this.outpoint,\n name: this.filename,\n description: this.description,\n title: this.pos + ' - ' + this.filename + ' - ' + this.description,\n style: {\n width: (this.outpoint - this.inpoint)*state.scale(),\n },\n }, [\n m('p#clipname.clipname', this.filename.split('/').pop()),\n m('p#inpoint[]', this.inpoint.toFixed(2)),\n m('p#outpoint[]', this.outpoint.toFixed(2)),\n m('p#description[contenteditable=true]', {\n oncreate: (v) => {\n let t = document.getElementById('timeline')\n // console.log('description created', v)\n vnode.dom.addEventListener('input', (e) => {\n console.log('input changed', e, vnode, this.pos)\n Edl.edl[this.pos][4] = e.target.textContent\n this.description = e.target.textContent\n })\n vnode.dom.addEventListener('keyup', (e) => {\n if (e.key == 'Enter') {\n e.preventDefault()\n m.redraw()\n }\n if (e.key == 'ArrowLeft' || e.key == 'ArrowRight' || e.key == ' ') {\n e.stopPropagation()\n }\n })\n }\n }, m.trust(this.description)),\n m('i.material-icons#progress.progress', {\n style: {\n display: (Edl.current == this.pos) && (this.inpoint < Video.time() < this.outpoint) ? 'inherit': 'none',\n left: (Video.time() - this.inpoint)*state.scale(),\n }\n }),\n ])\n // {data-x: vnode.attrs.inpoint/scale, data-y: vnode.attrs.outpoint/scale})\n }\n}\n","import m from 'mithril'\nvar state = require(\"./Globals\").state\nimport { Video, Edl } from './Video'\n\nvar Mon = {\n dom: null,\n}\n\nmodule.exports = {\n dom: null,\n seek: (t) => {\n if (Mon.dom) {\n Mon.dom.currentTime = t\n }\n },\n seekEdl: (t) => {\n let c =0\n let d = 0\n while (d + Edl.edl[c][3] <= t && c < Edl.edl.length - 1) {\n d += Edl.edl[c++][3]\n }\n Edl.current = c\n let clip = Edl.edl[c]\n console.log('seeking edl', c, d, t, clip)\n let clipTime = Number((t - d + clip[1]).toFixed(2))\n if (Video.filename != clip[0]) {\n module.exports.load(clip[0])\n }\n module.exports.seek(clipTime)\n },\n play: () => {\n if (Video.paused) {\n Mon.dom.play()\n Video.paused = false\n\n } else {\n Mon.dom.pause()\n Video.paused = true\n }\n },\n stop: () => {\n Mon.dom.pause()\n Video.paused = true\n },\n faster: () => {\n console.log('playbackRate changed', Video)\n if (Video.speed < -.25) {\n Video.speed = (parseFloat(Video.speed) / 2).toFixed(2)\n } else if (Video.speed < 1) {\n Video.speed = parseFloat(Video.speed) + .25\n } else if (Video.speed < 16){\n Video.speed = parseFloat(Video.speed) * 2\n }\n if (Video.speed == .25) {\n Mon.dom.play()\n } else {\n Mon.dom.playbackRate = Video.speed\n }\n },\n slower: () => {\n if (Video.speed > 1) {\n Video.speed = (Video.speed / 2).toFixed()\n } else if (Video.speed > 0) {\n Video.speed -= .25\n } else {\n // Video.speed = Video.speed * 2\n }\n if (Video.speed == 0) {\n Mon.dom.pause()\n } else {\n Mon.dom.playbackRate = Video.speed\n }\n },\n resetSpeed: () => {\n Video.speed = 1\n Mon.dom.playbackRate = Video.speed\n m.redraw()\n },\n load: (f) => {\n Mon.dom.src = f\n Video.filename = f\n },\n oncreate: (vnode) => {\n // Video.filename = Edl.edl[0][0]\n vnode.dom.addEventListener('durationchange', (e) => {\n Video.duration = vnode.dom.duration\n // console.log('duration change', Video)\n // m.redraw()\n })\n Video.duration = vnode.duration\n // console.log('monitor created', Video)\n Mon.dom = vnode.dom\n document.addEventListener('keydown', e => {\n switch (e.code) {\n case 'Space':\n e.preventDefault()\n module.exports.play()\n // console.log('space', Video, vnode)\n m.redraw()\n break\n case 'Equal':\n module.exports.faster()\n break\n case 'Minus':\n module.exports.slower()\n break\n case 'ArrowLeft':\n e.preventDefault()\n module.exports.seekEdl(Math.max(Edl.time - 5, 0))\n break\n case 'ArrowRight':\n e.preventDefault()\n module.exports.seekEdl(Math.min(Edl.time + 5, Edl.duration()))\n break\n\n }\n })\n\n vnode.dom.addEventListener('timeupdate', (e) => {\n Video.time = e.target.currentTime\n Edl.time = Video.time - Edl.edl[Edl.current][1] + Edl.durations(Edl.edl.slice(0, Edl.current))\n // if (Edl.edl[Edl.current]) {\n console.log('timeupdate', e, Video, Edl)\n // , Edl.edl[Edl.current][2] - Video.time)\n // check to see if we need to make an edit in the monitor\n // if the current video time is beyond the current clip outpoint:\n if (Video.time > Edl.edl[Edl.current][2]) {\n // and if there's another clip to edit to:\n if (Edl.current < Edl.edl.length - 1) {\n // we need to change the video somehow.\n console.log('editing!', Video, Edl )\n // if the next video is different than the current video:\n if (Video.filename != Edl.edl[++Edl.current][0]) {\n // we need to switch videos\n console.log('loading', Video, Edl.edl[Edl.current])\n module.exports.load(Edl.edl[Edl.current][0])\n }\n // perform the edit!\n if (!Video.paused) {\n module.exports.seek(parseFloat(Edl.edl[Edl.current][1]))\n }\n } else {\n // this is the last clip in the edl.\n console.log('End of edl. stopping')\n // since Video.time > current outpoint\n module.exports.seek(parseFloat(Edl.edl[Edl.current][2]))\n module.exports.stop()\n }\n }\n // }\n m.redraw()\n })\n Mon.dom.addEventListener('loadeddata', (event) => {\n if (!Video.paused && Mon.dom.paused) {\n console.log('fixed paused!')\n Mon.dom.play()\n }\n if (Video.time < Edl.edl[Edl.current][1]) {\n console.log('jumping to inpoint')\n module.exports.seek(Edl.edl[Edl.current][1])\n }\n })\n },\n onbeforeupdate: (vnode, old) => {\n // prevent component from updating on redraw\n return false\n },\n view: (vnode) => {\n return m('video#monitor.monitor', {\n src: Video.filename,\n controls: true,\n preload: true,\n volume: Video.volume,\n // currentTime: Video.time,\n })\n }\n}\n","\n// This will parse a delimited string into an array of\n// arrays. The default delimiter is the comma, but this\n// can be overriden in the second argument.\nexport function CSVToArray( strData, strDelimiter ){\n // Check to see if the delimiter is defined. If not,\n // then default to comma.\n strDelimiter = (strDelimiter || \",\");\n // Create a regular expression to parse the CSV values.\n var objPattern = new RegExp(\n (\n // Delimiters.\n \"(\\\\\" + strDelimiter + \"|\\\\r?\\\\n|\\\\r|^)\" +\n // Quoted fields.\n \"(?:\\\"([^\\\"]*(?:\\\"\\\"[^\\\"]*)*)\\\"|\" +\n // Standard fields.\n \"([^\\\"\\\\\" + strDelimiter + \"\\\\r\\\\n]*))\"\n ),\n \"gi\"\n );\n // Create an array to hold our data. Give the array\n // a default empty first row.\n var arrData = [[]];\n // Create an array to hold our individual pattern\n // matching groups.\n var arrMatches = null;\n // Keep looping over the regular expression matches\n // until we can no longer find a match.\n while (arrMatches = objPattern.exec( strData )){\n // Get the delimiter that was found.\n var strMatchedDelimiter = arrMatches[ 1 ];\n // Check to see if the given delimiter has a length\n // (is not the start of string) and if it matches\n // field delimiter. If id does not, then we know\n // that this delimiter is a row delimiter.\n if (\n strMatchedDelimiter.length &&\n (strMatchedDelimiter != strDelimiter)\n ){\n // Since we have reached a new row of data,\n // add an empty row to our data array.\n arrData.push( [] );\n }\n // Now that we have our delimiter out of the way,\n // let's check to see which kind of value we\n // captured (quoted or unquoted).\n if (arrMatches[ 2 ]){\n // We found a quoted value. When we capture\n // this value, unescape any double quotes.\n var strMatchedValue = arrMatches[ 2 ].replace(\n new RegExp( \"\\\"\\\"\", \"g\" ),\n \"\\\"\"\n );\n } else {\n // We found a non-quoted value.\n var strMatchedValue = arrMatches[ 3 ];\n }\n // Now that we have our value string, let's add\n // it to the data array.\n arrData[ arrData.length - 1 ].push( strMatchedValue );\n }\n // Return the parsed data.\n return( arrData );\n}\n\nexport function seconds(t) {\n t = t.split(\":\")\n // console.log('split', t, parseFloat(t[2]))\n var v = 3600*parseFloat(t[0]) + 60*parseFloat(t[1]) + parseFloat(t[2])\n // console.log('v', v)\n return v\n}\n\nexport function edlToSeconds(arrData) {\n arrData = arrData.slice(1)\n arrData.pop()\n // console.log('edl: ', arrData)\n for (var i = 0; i < arrData.length; i++) {\n // arrData[i] = arrData[i].map(col => col.includes(\":\") && !col.includes(\"M\") ? seconds(col) : col\n let d = arrData[i]\n arrData[i] = [ d[0], seconds(d[1]), seconds(d[2]), seconds(d[3]), d[4] ]\n\n }\n\n return arrData\n}\n","import m from 'mithril'\nimport interact from 'interactjs'\nvar state = require(\"./Globals\").state\nimport Monitor from './Monitor'\nimport { Video, Edl } from './Video'\n\nmodule.exports = {\n formatTime: (seconds) => {\n const h = Math.floor(seconds / 3600);\n const m = Math.floor((seconds % 3600) / 60);\n const s = ((Math.floor(seconds*100) % 6000)/100).toFixed(2);\n return [\n h,\n m > 9 ? m : (h ? '0' + m : m || '0'),\n s > 9 ? s : '0' + s,\n ].filter(a => a).join(':');\n },\n elapsed: (e) => {\n let d = e.map(clip => clip[3])\n return d.reduce((a, b) => a + b, 0)\n },\n view: (vnode) => {\n return m('.slider#slider', {min: 1, max: Edl.duration()})\n },\n oncreate: (vnode) => {\n const slider = interact(vnode.dom)\n slider.draggable({\n origin: 'self',\n inertia: true,\n modifiers: [\n interact.modifiers.restrict({\n restriction: 'self'\n })\n ]\n })\n .on('dragmove', (event) => {\n const sliderWidth = event.target.offsetWidth - event.target.offsetLeft\n const value = Math.max((event.pageX - event.target.offsetLeft) / sliderWidth, 0)\n const t = (value*Edl.duration()).toFixed(2)\n console.log('sliding to', t, value, event, event.pageX, sliderWidth, event.target.offsetLeft)\n event.target.style.paddingLeft = 100*value.toFixed(4) + '%'\n event.target.setAttribute('data-value', t)\n })\n .on('dragend', (event) => {\n const sliderWidth = event.target.offsetWidth - event.target.offsetLeft\n const value = Math.max((event.pageX - event.target.offsetLeft) / sliderWidth, 0)\n const t = (value*Edl.duration()).toFixed(2)\n console.log('slide end. Jumping', t, value, sliderWidth, event)\n Edl.jump(Number(t))\n })\n },\n onupdate: (vnode) => {\n vnode.dom.setAttribute('data-value', Edl.time.toFixed(2))\n let p = (Edl.time / Edl.duration())*100\n console.log('updating slider', vnode, p)\n vnode.dom.style.paddingLeft = `${p.toFixed(2)}%`\n },\n}\n","import m from 'mithril'\nimport './styles/home.scss'\nvar timeline1 =\n 'https://images.squarespace-cdn.com/content/v1/5b54f2433e2d096995211b77/1597084858418-8X6LW6UDTW7LA52ZOR33/alfred-timeline.jpg?format=500w'\nvar timeline2 =\n 'https://images.squarespace-cdn.com/content/v1/5b54f2433e2d096995211b77/1597014928858-1H9VY1CWOPV0ZATALHYH/Screenshot+from+2020-08-09+19-11-10.png?format=750w'\nvar imageUpload =\n 'https://images.squarespace-cdn.com/content/v1/5b54f2433e2d096995211b77/1597014788791-AXD895KQ3LCMDBZYNVRP/image-asset.png?format=750w'\nvar rendererImage =\n 'https://images.squarespace-cdn.com/content/v1/5b54f2433e2d096995211b77/1597015146812-NWUP1J4VFMV7J9148G57/image-asset.png?format=750w'\n\nexport const Home = () => ({\n view: vnode =>\n m('.homeCntr', {}, [\n m('h1', 'AUTOMATED VIDEO PRODUCTION'),\n\n m(\n '.imgTxtCntr',\n m('img.rightImg', { src: timeline1 }),\n m('form.txtBox.alfredText', {}, [\n m('.firstLine', 'Alfred '),\n 'is a simple, yet powerful video tool, designed to automate and streamline video creation. ',\n m('br'),\n m('br'),\n 'Leveraging the power of HTML5 video, it is designed to make editing simple from any modern browser, ',\n 'including mobile devices! ',\n ])\n ),\n\n m(\n '.imgTxtCntr',\n m('img.leftImg', { src: imageUpload }),\n m('form.txtBox.firstText', {}, [\n m('.firstLine', 'First, '),\n m('br'),\n 'Add photos and videos from the web, or upload custom to use in your project. ',\n m('br'),\n m('br'),\n 'Or, search the media browser for related content available on the web. ',\n ])\n ),\n\n m(\n '.imgTxtCntr',\n m('img.rightImg', { src: timeline2 }),\n m('form.txtBox.thenText', {}, [\n m('.firstLine', 'Then, '),\n m('br'),\n \"'Generate a timeline of clips that represent your video. Edit the text, resize or rearrange clips, \",\n 'and preview the results instantly! ',\n m('br'),\n m('br'),\n 'Or, bypass the timeline entirely and let Alfred automatically ',\n 'create videos based on your content. ',\n ])\n ),\n\n m(\n '.imgTxtCntr',\n m('img.leftImg', { src: rendererImage }),\n m('form.txtBox.finallyText', {}, [\n m('.firstLine', 'Finally, '),\n m('br'),\n 'Render your video at multiple resolutions, frame rates, or directly upload to specific output ',\n 'destinations (Facebook, YouTube, Instagram, TikTok, etc).',\n m('br'),\n m('br'),\n 'Videos can be rendered in parallel, ',\n 'on multiple machines, simultaneously! ',\n ])\n ),\n\n m('.imgTxtCntrs', m('hr')),\n\n m('.imgTxtCntrs', {}, [\n m(\n '.alQuote',\n m('i', {}, [\n m('q', 'The pictures over. Now I have to go and put it on film.'),\n ]),\n m('.text', '— Alfred Hitchcock ')\n ),\n m(\n '.honorText',\n 'Named in honor of the illustrious Hitchcock, the master of creating film by design. '\n ),\n ]),\n ]),\n})\n","import m from 'mithril'\nimport { Edl } from './Video'\nimport { User } from './User'\nimport { error } from 'alertifyjs'\nimport { auth } from './Login'\nimport './styles/projects.scss'\nimport './styles/tables.scss'\n\nexport function Projects() {\n var projects = []\n return {\n oninit: vnode => {\n auth('/project').then(\n e => {\n console.log('got projects', e)\n projects = e\n },\n err => {\n console.log('error loading projects from server', err)\n }\n )\n },\n view: vnode => {\n return [\n m('h1', 'Projects'),\n m('.projects', [\n m('table.projTableHead', [\n m('th', 'Name'),\n m('th', 'Edit Template'),\n m('th', 'Create New Video'),\n ]),\n m(\n '.projTableContainer',\n m('table.projTable', {}, [\n projects.map(p => {\n return m('tr', [\n m('td', p['name']),\n m(\n 'td',\n m(\n 'i.material-icons',\n {\n onclick: e => {\n m.route.set('/editor?project=' + p['_id'])\n },\n },\n 'edit'\n )\n ),\n m(\n 'td',\n m(\n 'i.material-icons',\n {\n onclick: e => {\n m.route.set('/form?project=' + p['_id'])\n },\n },\n 'video_call'\n )\n ),\n ])\n }),\n ])\n ),\n ]),\n ]\n },\n }\n}\n","import m from 'mithril'\nimport jwt_decode from 'jwt-decode'\nimport { auth } from './Login'\n\nexport var User = {\n jwt: null,\n username: null,\n token: null,\n loggedIn: false,\n login: (token) => {\n User.jwt = token\n let decoded = jwt_decode(token['access_token'])\n \n console.log('authenticated!', decoded)\n User.token = token['token_type'] + ' ' + token['access_token']\n auth('/users/me').then(me => {\n User.username = me.first_name\n User.loggedIn = true\n console.log('logged in as: ', User)\n if (m.route.param('redirect')) {\n m.route.set(m.route.param('redirect'))\n } else if (m.route.get() == '/login') {\n m.route.set('/')\n } else {\n m.route.set(m.route.get())\n }\n }, err => {\n console.log('error getting username', err)\n })\n \n // m.redraw()\n },\n logout: () => {\n console.log('logging out', User)\n m.request('/logout', {method: 'post'})\n User.jwt = null\n User.username = null\n User.token = null\n User.loggedIn = false\n window.localStorage.setItem('CREDENTIALS_FLUSH', Date.now().toString())\n window.localStorage.removeItem('CREDENTIALS_FLUSH')\n m.route.set('/')\n }\n}\n","function e(e){this.message=e}e.prototype=new Error,e.prototype.name=\"InvalidCharacterError\";var r=\"undefined\"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,\"\");if(t.length%4==1)throw new e(\"'atob' failed: The string to be decoded is not correctly encoded.\");for(var n,o,a=0,i=0,c=\"\";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".indexOf(o);return c};function t(e){var t=e.replace(/-/g,\"+\").replace(/_/g,\"/\");switch(t.length%4){case 0:break;case 2:t+=\"==\";break;case 3:t+=\"=\";break;default:throw\"Illegal base64url string!\"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t=\"0\"+t),\"%\"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e}function o(e,r){if(\"string\"!=typeof e)throw new n(\"Invalid token specified\");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(\".\")[o]))}catch(e){throw new n(\"Invalid token specified: \"+e.message)}}n.prototype=new Error,n.prototype.name=\"InvalidTokenError\";export default o;export{n as InvalidTokenError};\n//# sourceMappingURL=jwt-decode.esm.js.map\n","/**\n * The code was extracted from:\n * https://github.com/davidchambers/Base64.js\n */\n\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\nfunction InvalidCharacterError(message) {\n this.message = message;\n}\n\nInvalidCharacterError.prototype = new Error();\nInvalidCharacterError.prototype.name = \"InvalidCharacterError\";\n\nfunction polyfill(input) {\n var str = String(input).replace(/=+$/, \"\");\n if (str.length % 4 == 1) {\n throw new InvalidCharacterError(\n \"'atob' failed: The string to be decoded is not correctly encoded.\"\n );\n }\n for (\n // initialize result and counters\n var bc = 0, bs, buffer, idx = 0, output = \"\";\n // get next character\n (buffer = str.charAt(idx++));\n // character found in table? initialize bit storage and add its ascii value;\n ~buffer &&\n ((bs = bc % 4 ? bs * 64 + buffer : buffer),\n // and if not first of each 4 characters,\n // convert the first 8 bits to one ascii character\n bc++ % 4) ?\n (output += String.fromCharCode(255 & (bs >> ((-2 * bc) & 6)))) :\n 0\n ) {\n // try to find character in table (0-63, not found => -1)\n buffer = chars.indexOf(buffer);\n }\n return output;\n}\n\nexport default (typeof window !== \"undefined\" &&\n window.atob &&\n window.atob.bind(window)) ||\npolyfill;","import atob from \"./atob\";\n\nfunction b64DecodeUnicode(str) {\n return decodeURIComponent(\n atob(str).replace(/(.)/g, function(m, p) {\n var code = p.charCodeAt(0).toString(16).toUpperCase();\n if (code.length < 2) {\n code = \"0\" + code;\n }\n return \"%\" + code;\n })\n );\n}\n\nexport default function(str) {\n var output = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += \"==\";\n break;\n case 3:\n output += \"=\";\n break;\n default:\n throw \"Illegal base64url string!\";\n }\n\n try {\n return b64DecodeUnicode(output);\n } catch (err) {\n return atob(output);\n }\n}","\"use strict\";\n\nimport base64_url_decode from \"./base64_url_decode\";\n\nexport function InvalidTokenError(message) {\n this.message = message;\n}\n\nInvalidTokenError.prototype = new Error();\nInvalidTokenError.prototype.name = \"InvalidTokenError\";\n\nexport default function(token, options) {\n if (typeof token !== \"string\") {\n throw new InvalidTokenError(\"Invalid token specified\");\n }\n\n options = options || {};\n var pos = options.header === true ? 0 : 1;\n try {\n return JSON.parse(base64_url_decode(token.split(\".\")[pos]));\n } catch (e) {\n throw new InvalidTokenError(\"Invalid token specified: \" + e.message);\n }\n}","import m from 'mithril'\nimport { User } from './User'\nimport { success, error, message, prompt } from 'alertifyjs'\n\nexport function auth(url, opts) {\n const req = new Promise((resolve, reject) => {\n m.request(url, {\n headers: {\n Authorization: User.token,\n },\n ...opts\n }).then(res => {\n // console.log('auth success')\n resolve(res)\n // return res\n }).catch( e => {\n if (e.code == 401) {\n m.request('/auth/jwt/refresh', {\n headers: {Authorization: User.token},\n method: 'post'\n }).then(token => {\n User.login(token)\n auth(url, opts).then(res => {\n console.log('resolved refresh')\n resolve(res)\n })\n }).catch(err => {\n console.log('error making auth request', url, opts, err)\n if (err.code == 401) {\n error('not authorized', 2)\n m.route.set('/login', {\n redirect: m.route.get()\n })\n }\n reject(err)\n })\n }\n })\n })\n return req\n}\n\nexport const Login = () => {\n return {\n view: (vnode) => {\n return [\n m('h2', 'login'),\n m('form#login', {\n action: '/auth/jwt/login',\n method: 'post',\n }, [\n m('label[for=username]', 'email:'),\n m('input#username', {\n name: 'username',\n }),\n m('br'),\n m('label[for=password]', 'password:'),\n m('input#password', {\n name: 'password',\n type: 'password',\n }),\n m('br'),\n m('input#submit', {\n type: 'submit',\n value: 'login',\n style: {\n display: User.username ? 'none' : ''\n },\n onclick: (e) => {\n e.preventDefault()\n let form = new FormData(document.getElementById('login'))\n console.log('sending form', e, form)\n m.request('/auth/jwt/login', {\n method: 'post',\n body: form,\n }).then( (token) => {\n User.login(token)\n success(`Logged in!`, 4)\n }, (res) => {\n console.log('error logging in!', res)\n error('error logging in', 3)\n })\n }},\n ),\n m('button#logout', {\n style: {\n display: User.username ? '' : 'none'\n },\n onclick: (e) => {\n e.preventDefault()\n if (User.username) {\n User.logout()\n } else {\n message(\"not logged in. Can't log out.\", 3)\n }\n }\n }, 'logout'),\n m('button#register', {\n style: {\n display: User.username ? 'none' : ''\n },\n onclick: e => {\n e.preventDefault()\n if (document.getElementById('username').value == '') {\n error('please enter a username')\n } else if (document.getElementById('password').value.length < 8) {\n error('password must be at least 8 characters')\n } else {\n prompt('register', 'what is your first name?', 'user', (e, first_name) => {\n let form = new FormData(document.getElementById('login'))\n let register = {first_name: first_name, email: form.get('username'), password: form.get('password')}\n console.log('registering user', register, e, form)\n m.request({\n url: '/auth/register',\n method: 'post',\n body: register\n }).then( res => {\n console.log('successfully registered', res)\n success(`${res.first_name} is now registered!`)\n }).catch( err => {\n console.log('error registering', err)\n error('error regestering')\n })\n }, () => {\n })\n }\n },\n }, 'register')\n ]\n )\n ]\n }\n}\n}\n\nexport const Logout = () => {\n return {\n view: vnode => {\n User.logout()\n message('logged out', 3)\n }\n }\n}","/**\r\n * alertifyjs 1.13.1 http://alertifyjs.com\r\n * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.\r\n * Copyright 2019 Mohammad Younes (http://alertifyjs.com) \r\n * Licensed under GPL 3 */\r\n( function ( window ) {\r\n 'use strict';\r\n var NOT_DISABLED_NOT_RESET = ':not(:disabled):not(.ajs-reset)';\r\n /**\r\n * Keys enum\r\n * @type {Object}\r\n */\r\n var keys = {\r\n ENTER: 13,\r\n ESC: 27,\r\n F1: 112,\r\n F12: 123,\r\n LEFT: 37,\r\n RIGHT: 39,\r\n TAB: 9\r\n };\r\n /**\r\n * Default options \r\n * @type {Object}\r\n */\r\n var defaults = {\r\n autoReset:true,\r\n basic:false,\r\n closable:true,\r\n closableByDimmer:true,\r\n invokeOnCloseOff:false,\r\n frameless:false,\r\n defaultFocusOff:false,\r\n maintainFocus:true, //global default not per instance, applies to all dialogs\r\n maximizable:true,\r\n modal:true,\r\n movable:true,\r\n moveBounded:false,\r\n overflow:true,\r\n padding: true,\r\n pinnable:true,\r\n pinned:true,\r\n preventBodyShift:false, //global default not per instance, applies to all dialogs\r\n resizable:true,\r\n startMaximized:false,\r\n transition:'pulse',\r\n transitionOff:false,\r\n tabbable:['button', '[href]', 'input', 'select', 'textarea', '[tabindex]:not([tabindex^=\"-\"])'+NOT_DISABLED_NOT_RESET].join(NOT_DISABLED_NOT_RESET+','),//global\r\n notifier:{\r\n delay:5,\r\n position:'bottom-right',\r\n closeButton:false,\r\n classes: {\r\n base: 'alertify-notifier',\r\n prefix:'ajs-',\r\n message: 'ajs-message',\r\n top: 'ajs-top',\r\n right: 'ajs-right',\r\n bottom: 'ajs-bottom',\r\n left: 'ajs-left',\r\n center: 'ajs-center',\r\n visible: 'ajs-visible',\r\n hidden: 'ajs-hidden',\r\n close: 'ajs-close'\r\n }\r\n },\r\n glossary:{\r\n title:'AlertifyJS',\r\n ok: 'OK',\r\n cancel: 'Cancel',\r\n acccpt: 'Accept',\r\n deny: 'Deny',\r\n confirm: 'Confirm',\r\n decline: 'Decline',\r\n close: 'Close',\r\n maximize: 'Maximize',\r\n restore: 'Restore',\r\n },\r\n theme:{\r\n input:'ajs-input',\r\n ok:'ajs-ok',\r\n cancel:'ajs-cancel',\r\n },\r\n hooks:{\r\n preinit:function(){},\r\n postinit:function(){}\r\n }\r\n };\r\n \r\n //holds open dialogs instances\r\n var openDialogs = [];\r\n\r\n /**\r\n * [Helper] Adds the specified class(es) to the element.\r\n *\r\n * @element {node} The element\r\n * @className {string} One or more space-separated classes to be added to the class attribute of the element.\r\n * \r\n * @return {undefined}\r\n */\r\n function addClass(element,classNames){\r\n element.className += ' ' + classNames;\r\n }\r\n \r\n /**\r\n * [Helper] Removes the specified class(es) from the element.\r\n *\r\n * @element {node} The element\r\n * @className {string} One or more space-separated classes to be removed from the class attribute of the element.\r\n * \r\n * @return {undefined}\r\n */\r\n function removeClass(element, classNames) {\r\n var original = element.className.split(' ');\r\n var toBeRemoved = classNames.split(' ');\r\n for (var x = 0; x < toBeRemoved.length; x += 1) {\r\n var index = original.indexOf(toBeRemoved[x]);\r\n if (index > -1){\r\n original.splice(index,1);\r\n }\r\n }\r\n element.className = original.join(' ');\r\n }\r\n\r\n /**\r\n * [Helper] Checks if the document is RTL\r\n *\r\n * @return {Boolean} True if the document is RTL, false otherwise.\r\n */\r\n function isRightToLeft(){\r\n return window.getComputedStyle(document.body).direction === 'rtl';\r\n }\r\n /**\r\n * [Helper] Get the document current scrollTop\r\n *\r\n * @return {Number} current document scrollTop value\r\n */\r\n function getScrollTop(){\r\n return ((document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop);\r\n }\r\n\r\n /**\r\n * [Helper] Get the document current scrollLeft\r\n *\r\n * @return {Number} current document scrollLeft value\r\n */\r\n function getScrollLeft(){\r\n return ((document.documentElement && document.documentElement.scrollLeft) || document.body.scrollLeft);\r\n }\r\n\r\n /**\r\n * Helper: clear contents\r\n *\r\n */\r\n function clearContents(element){\r\n while (element.lastChild) {\r\n element.removeChild(element.lastChild);\r\n }\r\n }\r\n /**\r\n * Extends a given prototype by merging properties from base into sub.\r\n *\r\n * @sub {Object} sub The prototype being overwritten.\r\n * @base {Object} base The prototype being written.\r\n *\r\n * @return {Object} The extended prototype.\r\n */\r\n function copy(src) {\r\n if(null === src){\r\n return src;\r\n }\r\n var cpy;\r\n if(Array.isArray(src)){\r\n cpy = [];\r\n for(var x=0;x 0) {\r\n var args = [];\r\n for (var x = 0; x < arguments.length; x += 1) {\r\n args.push(arguments[x]);\r\n }\r\n args.push(context);\r\n return method.apply(context, args);\r\n }\r\n return method.apply(context, [null, context]);\r\n };\r\n }\r\n /**\r\n * Helper for creating a dialog close event.\r\n * \r\n * @return {object}\r\n */\r\n function createCloseEvent(index, button) {\r\n return {\r\n index: index,\r\n button: button,\r\n cancel: false\r\n };\r\n }\r\n /**\r\n * Helper for dispatching events.\r\n *\r\n * @param {string} evenType The type of the event to disptach.\r\n * @param {object} instance The dialog instance disptaching the event.\r\n *\r\n * @return {any} The result of the invoked function.\r\n */\r\n function dispatchEvent(eventType, instance) {\r\n if ( typeof instance.get(eventType) === 'function' ) {\r\n return instance.get(eventType).call(instance);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Super class for all dialogs\r\n *\r\n * @return {Object}\t\tbase dialog prototype\r\n */\r\n var dialog = (function () {\r\n var //holds the list of used keys.\r\n usedKeys = [],\r\n //dummy variable, used to trigger dom reflow.\r\n reflow = null,\r\n //holds body tab index in case it has any.\r\n tabindex = false,\r\n //condition for detecting safari\r\n isSafari = window.navigator.userAgent.indexOf('Safari') > -1 && window.navigator.userAgent.indexOf('Chrome') < 0,\r\n //dialog building blocks\r\n templates = {\r\n dimmer:'

',\r\n /*tab index required to fire click event before body focus*/\r\n modal: '
',\r\n dialog: '
',\r\n reset: '',\r\n commands: '
',\r\n header: '
',\r\n body: '
',\r\n content: '
',\r\n footer: '
',\r\n buttons: { primary: '
', auxiliary: '
' },\r\n button: '',\r\n resizeHandle: '
',\r\n },\r\n //common class names\r\n classes = {\r\n animationIn: 'ajs-in',\r\n animationOut: 'ajs-out',\r\n base: 'alertify',\r\n basic:'ajs-basic',\r\n capture: 'ajs-capture',\r\n closable:'ajs-closable',\r\n fixed: 'ajs-fixed',\r\n frameless:'ajs-frameless',\r\n hidden: 'ajs-hidden',\r\n maximize: 'ajs-maximize',\r\n maximized: 'ajs-maximized',\r\n maximizable:'ajs-maximizable',\r\n modeless: 'ajs-modeless',\r\n movable: 'ajs-movable',\r\n noSelection: 'ajs-no-selection',\r\n noOverflow: 'ajs-no-overflow',\r\n noPadding:'ajs-no-padding',\r\n pin:'ajs-pin',\r\n pinnable:'ajs-pinnable',\r\n prefix: 'ajs-',\r\n resizable: 'ajs-resizable',\r\n restore: 'ajs-restore',\r\n shake:'ajs-shake',\r\n unpinned:'ajs-unpinned',\r\n noTransition:'ajs-no-transition'\r\n };\r\n\r\n /**\r\n * Helper: initializes the dialog instance\r\n * \r\n * @return\t{Number}\tThe total count of currently open modals.\r\n */\r\n function initialize(instance){\r\n \r\n if(!instance.__internal){\r\n //invoke preinit global hook\r\n alertify.defaults.hooks.preinit(instance);\r\n //no need to expose init after this.\r\n delete instance.__init;\r\n \r\n //keep a copy of initial dialog settings\r\n if(!instance.__settings){\r\n instance.__settings = copy(instance.settings);\r\n }\r\n \r\n //get dialog buttons/focus setup\r\n var setup;\r\n if(typeof instance.setup === 'function'){\r\n setup = instance.setup();\r\n setup.options = setup.options || {};\r\n setup.focus = setup.focus || {};\r\n }else{\r\n setup = {\r\n buttons:[],\r\n focus:{\r\n element:null,\r\n select:false\r\n },\r\n options:{\r\n }\r\n };\r\n }\r\n \r\n //initialize hooks object.\r\n if(typeof instance.hooks !== 'object'){\r\n instance.hooks = {};\r\n }\r\n\r\n //copy buttons defintion\r\n var buttonsDefinition = [];\r\n if(Array.isArray(setup.buttons)){\r\n for(var b=0;b= 0){\r\n //last open modal or last maximized one\r\n removeClass(document.body, classes.noOverflow);\r\n preventBodyShift(false);\r\n }else if(requiresNoOverflow > 0 && document.body.className.indexOf(classes.noOverflow) < 0){\r\n //first open modal or first maximized one\r\n preventBodyShift(true);\r\n addClass(document.body, classes.noOverflow);\r\n }\r\n }\r\n var top = '', topScroll = 0;\r\n /**\r\n * Helper: prevents body shift.\r\n *\r\n */\r\n function preventBodyShift(add){\r\n if(alertify.defaults.preventBodyShift){\r\n if(add && document.documentElement.scrollHeight > document.documentElement.clientHeight ){//&& openDialogs[openDialogs.length-1].elements.dialog.clientHeight <= document.documentElement.clientHeight){\r\n topScroll = scrollY;\r\n top = window.getComputedStyle(document.body).top;\r\n addClass(document.body, classes.fixed);\r\n document.body.style.top = -scrollY + 'px';\r\n } else if(!add) {\r\n scrollY = topScroll;\r\n document.body.style.top = top;\r\n removeClass(document.body, classes.fixed);\r\n restoreScrollPosition();\r\n }\r\n }\r\n }\r\n\t\t\r\n /**\r\n * Sets the name of the transition used to show/hide the dialog\r\n * \r\n * @param {Object} instance The dilog instance.\r\n *\r\n */\r\n function updateTransition(instance, value, oldValue){\r\n if(typeof oldValue === 'string'){\r\n removeClass(instance.elements.root,classes.prefix + oldValue);\r\n }\r\n addClass(instance.elements.root, classes.prefix + value);\r\n reflow = instance.elements.root.offsetWidth;\r\n }\r\n\r\n /**\r\n * Toggles the dialog no transition \r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function updateTransitionOff(instance){\r\n if (instance.get('transitionOff')) {\r\n // add class\r\n addClass(instance.elements.root, classes.noTransition);\r\n } else {\r\n // remove class\r\n removeClass(instance.elements.root, classes.noTransition);\r\n }\r\n }\r\n\r\n /**\r\n * Toggles the dialog display mode\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function updateDisplayMode(instance){\r\n if(instance.get('modal')){\r\n\r\n //make modal\r\n removeClass(instance.elements.root, classes.modeless);\r\n\r\n //only if open\r\n if(instance.isOpen()){\r\n unbindModelessEvents(instance);\r\n\r\n //in case a pinned modless dialog was made modal while open.\r\n updateAbsPositionFix(instance);\r\n\r\n ensureNoOverflow();\r\n }\r\n }else{\r\n //make modelss\r\n addClass(instance.elements.root, classes.modeless);\r\n\r\n //only if open\r\n if(instance.isOpen()){\r\n bindModelessEvents(instance);\r\n\r\n //in case pin/unpin was called while a modal is open\r\n updateAbsPositionFix(instance);\r\n\r\n ensureNoOverflow();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Toggles the dialog basic view mode \r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function updateBasicMode(instance){\r\n if (instance.get('basic')) {\r\n // add class\r\n addClass(instance.elements.root, classes.basic);\r\n } else {\r\n // remove class\r\n removeClass(instance.elements.root, classes.basic);\r\n }\r\n }\r\n\r\n /**\r\n * Toggles the dialog frameless view mode \r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function updateFramelessMode(instance){\r\n if (instance.get('frameless')) {\r\n // add class\r\n addClass(instance.elements.root, classes.frameless);\r\n } else {\r\n // remove class\r\n removeClass(instance.elements.root, classes.frameless);\r\n }\r\n }\r\n\t\t\r\n /**\r\n * Helper: Brings the modeless dialog to front, attached to modeless dialogs.\r\n *\r\n * @param {Event} event Focus event\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function bringToFront(event, instance){\r\n \r\n // Do not bring to front if preceeded by an open modal\r\n var index = openDialogs.indexOf(instance);\r\n for(var x=index+1;x 200 && (modalClickHandlerTS = event.timeStamp) && !cancelClick){\r\n var target = event.srcElement || event.target;\r\n if (instance.get('closableByDimmer') === true && target === instance.elements.modal) {\r\n triggerClose(instance);\r\n }\r\n }\r\n cancelClick = false;\r\n }\r\n\r\n // stores last call timestamp to prevent triggering the callback twice.\r\n var callbackTS = 0;\r\n // flag to cancel keyup event if already handled by click event (pressing Enter on a focusted button).\r\n var cancelKeyup = false;\r\n /** \r\n * Helper: triggers a button callback\r\n *\r\n * @param {Object}\t\tThe dilog instance.\r\n * @param {Function}\tCallback to check which button triggered the event.\r\n *\r\n * @return {undefined}\r\n */\r\n function triggerCallback(instance, check) {\r\n if(Date.now() - callbackTS > 200 && (callbackTS = Date.now())){\r\n for (var idx = 0; idx < instance.__internal.buttons.length; idx += 1) {\r\n var button = instance.__internal.buttons[idx];\r\n if (!button.element.disabled && check(button)) {\r\n var closeEvent = createCloseEvent(idx, button);\r\n if (typeof instance.callback === 'function') {\r\n instance.callback.apply(instance, [closeEvent]);\r\n }\r\n //close the dialog only if not canceled.\r\n if (closeEvent.cancel === false) {\r\n instance.close();\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Clicks event handler, attached to the dialog footer.\r\n *\r\n * @param {Event}\t\tDOM event object.\r\n * @param {Object}\t\tThe dilog instance.\r\n * \r\n * @return {undefined}\r\n */\r\n function buttonsClickHandler(event, instance) {\r\n var target = event.srcElement || event.target;\r\n triggerCallback(instance, function (button) {\r\n // if this button caused the click, cancel keyup event\r\n return button.element === target && (cancelKeyup = true);\r\n });\r\n }\r\n\r\n /**\r\n * Keyup event handler, attached to the document.body\r\n *\r\n * @param {Event}\t\tDOM event object.\r\n * @param {Object}\t\tThe dilog instance.\r\n * \r\n * @return {undefined}\r\n */\r\n function keyupHandler(event) {\r\n //hitting enter while button has focus will trigger keyup too.\r\n //ignore if handled by clickHandler\r\n if (cancelKeyup) {\r\n cancelKeyup = false;\r\n return;\r\n }\r\n var instance = openDialogs[openDialogs.length - 1];\r\n var keyCode = event.keyCode;\r\n if (instance.__internal.buttons.length === 0 && keyCode === keys.ESC && instance.get('closable') === true) {\r\n triggerClose(instance);\r\n return false;\r\n }else if (usedKeys.indexOf(keyCode) > -1) {\r\n triggerCallback(instance, function (button) {\r\n return button.key === keyCode;\r\n });\r\n return false;\r\n }\r\n }\r\n /**\r\n * Keydown event handler, attached to the document.body\r\n *\r\n * @param {Event}\t\tDOM event object.\r\n * @param {Object}\t\tThe dilog instance.\r\n * \r\n * @return {undefined}\r\n */\r\n function keydownHandler(event) {\r\n var instance = openDialogs[openDialogs.length - 1];\r\n var keyCode = event.keyCode;\r\n if (keyCode === keys.LEFT || keyCode === keys.RIGHT) {\r\n var buttons = instance.__internal.buttons;\r\n for (var x = 0; x < buttons.length; x += 1) {\r\n if (document.activeElement === buttons[x].element) {\r\n switch (keyCode) {\r\n case keys.LEFT:\r\n buttons[(x || buttons.length) - 1].element.focus();\r\n return;\r\n case keys.RIGHT:\r\n buttons[(x + 1) % buttons.length].element.focus();\r\n return;\r\n }\r\n }\r\n }\r\n }else if (keyCode < keys.F12 + 1 && keyCode > keys.F1 - 1 && usedKeys.indexOf(keyCode) > -1) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n triggerCallback(instance, function (button) {\r\n return button.key === keyCode;\r\n });\r\n return false;\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Sets focus to proper dialog element\r\n *\r\n * @param {Object} instance The dilog instance.\r\n * @param {Node} [resetTarget=undefined] DOM element to reset focus to.\r\n *\r\n * @return {undefined}\r\n */\r\n function setFocus(instance, resetTarget) {\r\n // reset target has already been determined.\r\n if (resetTarget) {\r\n resetTarget.focus();\r\n } else {\r\n // current instance focus settings\r\n var focus = instance.__internal.focus;\r\n // the focus element.\r\n var element = focus.element;\r\n\r\n switch (typeof focus.element) {\r\n // a number means a button index\r\n case 'number':\r\n if (instance.__internal.buttons.length > focus.element) {\r\n //in basic view, skip focusing the buttons.\r\n if (instance.get('basic') === true) {\r\n element = instance.elements.reset[0];\r\n } else {\r\n element = instance.__internal.buttons[focus.element].element;\r\n }\r\n }\r\n break;\r\n // a string means querySelector to select from dialog body contents.\r\n case 'string':\r\n element = instance.elements.body.querySelector(focus.element);\r\n break;\r\n // a function should return the focus element.\r\n case 'function':\r\n element = focus.element.call(instance);\r\n break;\r\n }\r\n\r\n // if no focus element, default to first reset element.\r\n if (instance.get('defaultFocusOff') === true || ((typeof element === 'undefined' || element === null) && instance.__internal.buttons.length === 0)) {\r\n element = instance.elements.reset[0];\r\n }\r\n // focus\r\n if (element && element.focus) {\r\n element.focus();\r\n // if selectable\r\n if (focus.select && element.select) {\r\n element.select();\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Focus event handler, attached to document.body and dialogs own reset links.\r\n * handles the focus for modal dialogs only.\r\n *\r\n * @param {Event} event DOM focus event object.\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function onReset(event, instance) {\r\n\r\n // should work on last modal if triggered from document.body \r\n if (!instance) {\r\n for (var x = openDialogs.length - 1; x > -1; x -= 1) {\r\n if (openDialogs[x].isModal()) {\r\n instance = openDialogs[x];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if(instance) {\r\n // if modal\r\n if (instance.isModal()) {\r\n // determine reset target to enable forward/backward tab cycle.\r\n var firstReset = instance.elements.reset[0],\r\n lastReset = instance.elements.reset[1],\r\n lastFocusedElement = event.relatedTarget,\r\n within = instance.elements.root.contains(lastFocusedElement),\r\n target = event.srcElement || event.target,\r\n resetTarget;\r\n\r\n //if the previous focused element element was outside the modal do nthing\r\n if( /*first show */\r\n (target === firstReset && !within) ||\r\n /*focus cycle */\r\n (target === lastReset && lastFocusedElement === firstReset)){\r\n return;\r\n }else if(target === lastReset || target === document.body){\r\n resetTarget = firstReset;\r\n }else if(target === firstReset && lastFocusedElement === lastReset){\r\n resetTarget = findTabbable(instance);\r\n }else if(target === firstReset && within){\r\n resetTarget = findTabbable(instance, true);\r\n }\r\n // focus\r\n setFocus(instance, resetTarget);\r\n }\r\n }\r\n }\r\n function findTabbable(instance, last){\r\n var tabbables = [].slice.call(instance.elements.dialog.querySelectorAll(defaults.tabbable));\r\n if(last){\r\n tabbables.reverse();\r\n }\r\n for(var x=0;x startingWidth) {\r\n //growing\r\n element.style.left = (startingLeft + diff) + 'px';\r\n } else if (element.offsetWidth >= minWidth) {\r\n //shrinking\r\n element.style.left = (startingLeft - diff) + 'px';\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Triggers the start of a resize event, attached to the resize handle element mouse down event.\r\n * Adds no-selection class to the body, disabling selection while moving.\r\n *\r\n * @param {Event} event\tDOM event object.\r\n * @param {Object} instance The dilog instance.\r\n * \r\n * @return {Boolean} false\r\n */\r\n function beginResize(event, instance) {\r\n if (!instance.isMaximized()) {\r\n var eventSrc;\r\n if (event.type === 'touchstart') {\r\n event.preventDefault();\r\n eventSrc = event.targetTouches[0];\r\n } else if (event.button === 0) {\r\n eventSrc = event;\r\n }\r\n if (eventSrc) {\r\n // allow custom `onresize` method\r\n dispatchEvent('onresize', instance);\r\n \r\n resizable = instance;\r\n handleOffset = instance.elements.resizeHandle.offsetHeight / 2;\r\n var element = instance.elements.dialog;\r\n addClass(element, classes.capture);\r\n startingLeft = parseInt(element.style.left, 10);\r\n element.style.height = element.offsetHeight + 'px';\r\n element.style.minHeight = instance.elements.header.offsetHeight + instance.elements.footer.offsetHeight + 'px';\r\n element.style.width = (startingWidth = element.offsetWidth) + 'px';\r\n\r\n if (element.style.maxWidth !== 'none') {\r\n element.style.minWidth = (minWidth = element.offsetWidth) + 'px';\r\n }\r\n element.style.maxWidth = 'none';\r\n addClass(document.body, classes.noSelection);\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * The actual resize handler, attached to document.body mousemove event.\r\n *\r\n * @param {Event} event\tDOM event object.\r\n * \r\n * @return {undefined}\r\n */\r\n function resize(event) {\r\n if (resizable) {\r\n var eventSrc;\r\n if (event.type === 'touchmove') {\r\n event.preventDefault();\r\n eventSrc = event.targetTouches[0];\r\n } else if (event.button === 0) {\r\n eventSrc = event;\r\n }\r\n if (eventSrc) {\r\n resizeElement(eventSrc, resizable.elements.dialog, !resizable.get('modal') && !resizable.get('pinned'));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Triggers the end of a resize event, attached to document.body mouseup event.\r\n * Removes no-selection class from document.body, allowing selection.\r\n *\r\n * @return {undefined}\r\n */\r\n function endResize() {\r\n if (resizable) {\r\n var instance = resizable;\r\n resizable = null;\r\n removeClass(document.body, classes.noSelection);\r\n removeClass(instance.elements.dialog, classes.capture);\r\n cancelClick = true;\r\n // allow custom `onresized` method\r\n dispatchEvent('onresized', instance);\r\n }\r\n }\r\n\r\n /**\r\n * Resets any changes made by resizing the element to its original state.\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function resetResize(instance) {\r\n resizable = null;\r\n var element = instance.elements.dialog;\r\n if (element.style.maxWidth === 'none') {\r\n //clear inline styles.\r\n element.style.maxWidth = element.style.minWidth = element.style.width = element.style.height = element.style.minHeight = element.style.left = '';\r\n //reset variables.\r\n startingLeft = Number.Nan;\r\n startingWidth = minWidth = handleOffset = 0;\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Updates the dialog move behavior.\r\n *\r\n * @param {Object} instance The dilog instance.\r\n * @param {Boolean} on True to add the behavior, removes it otherwise.\r\n *\r\n * @return {undefined}\r\n */\r\n function updateResizable(instance) {\r\n if (instance.get('resizable')) {\r\n // add class\r\n addClass(instance.elements.root, classes.resizable);\r\n if (instance.isOpen()) {\r\n bindResizableEvents(instance);\r\n }\r\n } else {\r\n //reset\r\n resetResize(instance);\r\n // remove class\r\n removeClass(instance.elements.root, classes.resizable);\r\n if (instance.isOpen()) {\r\n unbindResizableEvents(instance);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Reset move/resize on window resize.\r\n *\r\n * @param {Event} event\twindow resize event object.\r\n *\r\n * @return {undefined}\r\n */\r\n function windowResize(/*event*/) {\r\n for (var x = 0; x < openDialogs.length; x += 1) {\r\n var instance = openDialogs[x];\r\n if (instance.get('autoReset')) {\r\n resetMove(instance);\r\n resetResize(instance);\r\n }\r\n }\r\n }\r\n /**\r\n * Bind dialogs events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function bindEvents(instance) {\r\n // if first dialog, hook global handlers\r\n if (openDialogs.length === 1) {\r\n //global\r\n on(window, 'resize', windowResize);\r\n on(document.body, 'keyup', keyupHandler);\r\n on(document.body, 'keydown', keydownHandler);\r\n on(document.body, 'focus', onReset);\r\n\r\n //move\r\n on(document.documentElement, 'mousemove', move);\r\n on(document.documentElement, 'touchmove', move, false, false);\r\n on(document.documentElement, 'mouseup', endMove);\r\n on(document.documentElement, 'touchend', endMove);\r\n //resize\r\n on(document.documentElement, 'mousemove', resize);\r\n on(document.documentElement, 'touchmove', resize, false, false);\r\n on(document.documentElement, 'mouseup', endResize);\r\n on(document.documentElement, 'touchend', endResize);\r\n }\r\n\r\n // common events\r\n on(instance.elements.commands.container, 'click', instance.__internal.commandsClickHandler);\r\n on(instance.elements.footer, 'click', instance.__internal.buttonsClickHandler);\r\n on(instance.elements.reset[0], 'focusin', instance.__internal.resetHandler);\r\n on(instance.elements.reset[0], 'keydown', recycleTab);\r\n on(instance.elements.reset[1], 'focusin', instance.__internal.resetHandler);\r\n\r\n //prevent handling key up when dialog is being opened by a key stroke.\r\n cancelKeyup = true;\r\n // hook in transition handler\r\n on(instance.elements.dialog, transition.type, instance.__internal.transitionInHandler);\r\n\r\n // modelss only events\r\n if (!instance.get('modal')) {\r\n bindModelessEvents(instance);\r\n }\r\n\r\n // resizable\r\n if (instance.get('resizable')) {\r\n bindResizableEvents(instance);\r\n }\r\n\r\n // movable\r\n if (instance.get('movable')) {\r\n bindMovableEvents(instance);\r\n }\r\n }\r\n\r\n /**\r\n * Unbind dialogs events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function unbindEvents(instance) {\r\n // if last dialog, remove global handlers\r\n if (openDialogs.length === 1) {\r\n //global\r\n off(window, 'resize', windowResize);\r\n off(document.body, 'keyup', keyupHandler);\r\n off(document.body, 'keydown', keydownHandler);\r\n off(document.body, 'focus', onReset);\r\n //move\r\n off(document.documentElement, 'mousemove', move);\r\n off(document.documentElement, 'mouseup', endMove);\r\n //resize\r\n off(document.documentElement, 'mousemove', resize);\r\n off(document.documentElement, 'mouseup', endResize);\r\n }\r\n\r\n // common events\r\n off(instance.elements.commands.container, 'click', instance.__internal.commandsClickHandler);\r\n off(instance.elements.footer, 'click', instance.__internal.buttonsClickHandler);\r\n off(instance.elements.reset[0], 'focusin', instance.__internal.resetHandler);\r\n off(instance.elements.reset[0], 'keydown', recycleTab);\r\n off(instance.elements.reset[1], 'focusin', instance.__internal.resetHandler);\r\n\r\n // hook out transition handler\r\n on(instance.elements.dialog, transition.type, instance.__internal.transitionOutHandler);\r\n\r\n // modelss only events\r\n if (!instance.get('modal')) {\r\n unbindModelessEvents(instance);\r\n }\r\n\r\n // movable\r\n if (instance.get('movable')) {\r\n unbindMovableEvents(instance);\r\n }\r\n\r\n // resizable\r\n if (instance.get('resizable')) {\r\n unbindResizableEvents(instance);\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Bind modeless specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function bindModelessEvents(instance) {\r\n on(instance.elements.dialog, 'focus', instance.__internal.bringToFrontHandler, true);\r\n }\r\n\r\n /**\r\n * Unbind modeless specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function unbindModelessEvents(instance) {\r\n off(instance.elements.dialog, 'focus', instance.__internal.bringToFrontHandler, true);\r\n }\r\n\r\n\r\n\r\n /**\r\n * Bind movable specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function bindMovableEvents(instance) {\r\n on(instance.elements.header, 'mousedown', instance.__internal.beginMoveHandler);\r\n on(instance.elements.header, 'touchstart', instance.__internal.beginMoveHandler, false, false);\r\n }\r\n\r\n /**\r\n * Unbind movable specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function unbindMovableEvents(instance) {\r\n off(instance.elements.header, 'mousedown', instance.__internal.beginMoveHandler);\r\n off(instance.elements.header, 'touchstart', instance.__internal.beginMoveHandler, false, false);\r\n }\r\n\r\n\r\n\r\n /**\r\n * Bind resizable specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function bindResizableEvents(instance) {\r\n on(instance.elements.resizeHandle, 'mousedown', instance.__internal.beginResizeHandler);\r\n on(instance.elements.resizeHandle, 'touchstart', instance.__internal.beginResizeHandler, false, false);\r\n }\r\n\r\n /**\r\n * Unbind resizable specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function unbindResizableEvents(instance) {\r\n off(instance.elements.resizeHandle, 'mousedown', instance.__internal.beginResizeHandler);\r\n off(instance.elements.resizeHandle, 'touchstart', instance.__internal.beginResizeHandler, false, false);\r\n }\r\n\r\n /**\r\n * Bind closable events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function bindClosableEvents(instance) {\r\n on(instance.elements.modal, 'click', instance.__internal.modalClickHandler);\r\n }\r\n\r\n /**\r\n * Unbind closable specific events\r\n *\r\n * @param {Object} instance The dilog instance.\r\n *\r\n * @return {undefined}\r\n */\r\n function unbindClosableEvents(instance) {\r\n off(instance.elements.modal, 'click', instance.__internal.modalClickHandler);\r\n }\r\n // dialog API\r\n return {\r\n __init:initialize,\r\n /**\r\n * Check if dialog is currently open\r\n *\r\n * @return {Boolean}\r\n */\r\n isOpen: function () {\r\n return this.__internal.isOpen;\r\n },\r\n isModal: function (){\r\n return this.elements.root.className.indexOf(classes.modeless) < 0;\r\n },\r\n isMaximized:function(){\r\n return this.elements.root.className.indexOf(classes.maximized) > -1;\r\n },\r\n isPinned:function(){\r\n return this.elements.root.className.indexOf(classes.unpinned) < 0;\r\n },\r\n maximize:function(){\r\n if(!this.isMaximized()){\r\n maximize(this);\r\n }\r\n return this;\r\n },\r\n restore:function(){\r\n if(this.isMaximized()){\r\n restore(this);\r\n }\r\n return this;\r\n },\r\n pin:function(){\r\n if(!this.isPinned()){\r\n pin(this);\r\n }\r\n return this;\r\n },\r\n unpin:function(){\r\n if(this.isPinned()){\r\n unpin(this);\r\n }\r\n return this;\r\n },\r\n bringToFront:function(){\r\n bringToFront(null, this);\r\n return this;\r\n },\r\n /**\r\n * Move the dialog to a specific x/y coordinates\r\n *\r\n * @param {Number} x The new dialog x coordinate in pixels.\r\n * @param {Number} y The new dialog y coordinate in pixels.\r\n *\r\n * @return {Object} The dialog instance.\r\n */\r\n moveTo:function(x,y){\r\n if(!isNaN(x) && !isNaN(y)){\r\n // allow custom `onmove` method\r\n dispatchEvent('onmove', this);\r\n \r\n var element = this.elements.dialog,\r\n current = element,\r\n offsetLeft = 0,\r\n offsetTop = 0;\r\n \r\n //subtract existing left,top\r\n if (element.style.left) {\r\n offsetLeft -= parseInt(element.style.left, 10);\r\n }\r\n if (element.style.top) {\r\n offsetTop -= parseInt(element.style.top, 10);\r\n }\r\n //calc offset\r\n do {\r\n offsetLeft += current.offsetLeft;\r\n offsetTop += current.offsetTop;\r\n } while (current = current.offsetParent);\r\n\r\n //calc left, top\r\n var left = (x - offsetLeft);\r\n var top = (y - offsetTop);\r\n\r\n //// rtl handling\r\n if (isRightToLeft()) {\r\n left *= -1;\r\n }\r\n\r\n element.style.left = left + 'px';\r\n element.style.top = top + 'px';\r\n \r\n // allow custom `onmoved` method\r\n dispatchEvent('onmoved', this);\r\n }\r\n return this;\r\n },\r\n /**\r\n * Resize the dialog to a specific width/height (the dialog must be 'resizable').\r\n * The dialog can be resized to:\r\n * A minimum width equal to the initial display width\r\n * A minimum height equal to the sum of header/footer heights.\r\n *\r\n *\r\n * @param {Number or String} width The new dialog width in pixels or in percent.\r\n * @param {Number or String} height The new dialog height in pixels or in percent.\r\n *\r\n * @return {Object} The dialog instance.\r\n */\r\n resizeTo:function(width,height){\r\n var w = parseFloat(width),\r\n h = parseFloat(height),\r\n regex = /(\\d*\\.\\d+|\\d+)%/\r\n ;\r\n\r\n if(!isNaN(w) && !isNaN(h) && this.get('resizable') === true){\r\n \r\n // allow custom `onresize` method\r\n dispatchEvent('onresize', this);\r\n \r\n if(('' + width).match(regex)){\r\n w = w / 100 * document.documentElement.clientWidth ;\r\n }\r\n\r\n if(('' + height).match(regex)){\r\n h = h / 100 * document.documentElement.clientHeight;\r\n }\r\n\r\n var element = this.elements.dialog;\r\n if (element.style.maxWidth !== 'none') {\r\n element.style.minWidth = (minWidth = element.offsetWidth) + 'px';\r\n }\r\n element.style.maxWidth = 'none';\r\n element.style.minHeight = this.elements.header.offsetHeight + this.elements.footer.offsetHeight + 'px';\r\n element.style.width = w + 'px';\r\n element.style.height = h + 'px';\r\n \r\n // allow custom `onresized` method\r\n dispatchEvent('onresized', this);\r\n }\r\n return this;\r\n },\r\n /**\r\n * Gets or Sets dialog settings/options \r\n *\r\n * @param {String|Object} key A string specifying a propery name or a collection of key/value pairs.\r\n * @param {Object} value Optional, the value associated with the key (in case it was a string).\r\n *\r\n * @return {undefined}\r\n */\r\n setting : function (key, value) {\r\n var self = this;\r\n var result = update(this, this.__internal.options, function(k,o,n){ optionUpdated(self,k,o,n); }, key, value);\r\n if(result.op === 'get'){\r\n if(result.found){\r\n return result.value;\r\n }else if(typeof this.settings !== 'undefined'){\r\n return update(this, this.settings, this.settingUpdated || function(){}, key, value).value;\r\n }else{\r\n return undefined;\r\n }\r\n }else if(result.op === 'set'){\r\n if(result.items.length > 0){\r\n var callback = this.settingUpdated || function(){};\r\n for(var x=0;x 0) {\r\n var self = this;\r\n this.__internal.timer = setTimeout(function () { self.dismiss(); }, this.__internal.delay * 1000);\r\n }\r\n return this;\r\n },\r\n /*\r\n * Sets the notification message contents\r\n * @param {string or DOMElement} content The notification message content\r\n *\r\n */\r\n setContent: function (content) {\r\n if (typeof content === 'string') {\r\n clearContents(this.element);\r\n this.element.innerHTML = content;\r\n } else if (content instanceof window.HTMLElement && this.element.firstChild !== content) {\r\n clearContents(this.element);\r\n this.element.appendChild(content);\r\n }\r\n if(this.__internal.closeButton){\r\n var close = document.createElement('span');\r\n addClass(close, classes.close);\r\n close.setAttribute('data-close', true);\r\n this.element.appendChild(close);\r\n }\r\n return this;\r\n },\r\n /*\r\n * Dismisses all open notifications except this.\r\n *\r\n */\r\n dismissOthers: function () {\r\n notifier.dismissAll(this);\r\n return this;\r\n }\r\n });\r\n }\r\n\r\n //notifier api\r\n return {\r\n /**\r\n * Gets or Sets notifier settings.\r\n *\r\n * @param {string} key The setting name\r\n * @param {Variant} value The setting value.\r\n *\r\n * @return {Object}\tif the called as a setter, return the notifier instance.\r\n */\r\n setting: function (key, value) {\r\n //ensure init\r\n initialize(this);\r\n\r\n if (typeof value === 'undefined') {\r\n //get\r\n return this.__internal[key];\r\n } else {\r\n //set\r\n switch (key) {\r\n case 'position':\r\n this.__internal.position = value;\r\n updatePosition(this);\r\n break;\r\n case 'delay':\r\n this.__internal.delay = value;\r\n break;\r\n }\r\n }\r\n return this;\r\n },\r\n /**\r\n * [Alias] Sets dialog settings/options\r\n */\r\n set:function(key,value){\r\n this.setting(key,value);\r\n return this;\r\n },\r\n /**\r\n * [Alias] Gets dialog settings/options\r\n */\r\n get:function(key){\r\n return this.setting(key);\r\n },\r\n /**\r\n * Creates a new notification message\r\n *\r\n * @param {string} type The type of notification message (simply a CSS class name 'ajs-{type}' to be added).\r\n * @param {Function} callback A callback function to be invoked when the message is dismissed.\r\n *\r\n * @return {undefined}\r\n */\r\n create: function (type, callback) {\r\n //ensure notifier init\r\n initialize(this);\r\n //create new notification message\r\n var div = document.createElement('div');\r\n div.className = classes.message + ((typeof type === 'string' && type !== '') ? ' ' + classes.prefix + type : '');\r\n return create(div, callback);\r\n },\r\n /**\r\n * Dismisses all open notifications.\r\n *\r\n * @param {Object} excpet [optional] The notification object to exclude from dismissal.\r\n *\r\n */\r\n dismissAll: function (except) {\r\n var clone = openInstances.slice(0);\r\n for (var x = 0; x < clone.length; x += 1) {\r\n var instance = clone[x];\r\n if (except === undefined || except !== instance) {\r\n instance.dismiss();\r\n }\r\n }\r\n }\r\n };\r\n })();\r\n\r\n /**\r\n * Alertify public API\r\n * This contains everything that is exposed through the alertify object.\r\n *\r\n * @return {Object}\r\n */\r\n function Alertify() {\r\n\r\n // holds a references of created dialogs\r\n var dialogs = {};\r\n\r\n /**\r\n * Extends a given prototype by merging properties from base into sub.\r\n *\r\n * @sub {Object} sub The prototype being overwritten.\r\n * @base {Object} base The prototype being written.\r\n *\r\n * @return {Object} The extended prototype.\r\n */\r\n function extend(sub, base) {\r\n // copy dialog pototype over definition.\r\n for (var prop in base) {\r\n if (base.hasOwnProperty(prop)) {\r\n sub[prop] = base[prop];\r\n }\r\n }\r\n return sub;\r\n }\r\n\r\n\r\n /**\r\n * Helper: returns a dialog instance from saved dialogs.\r\n * and initializes the dialog if its not already initialized.\r\n *\r\n * @name {String} name The dialog name.\r\n *\r\n * @return {Object} The dialog instance.\r\n */\r\n function get_dialog(name) {\r\n var dialog = dialogs[name].dialog;\r\n //initialize the dialog if its not already initialized.\r\n if (dialog && typeof dialog.__init === 'function') {\r\n dialog.__init(dialog);\r\n }\r\n return dialog;\r\n }\r\n\r\n /**\r\n * Helper: registers a new dialog definition.\r\n *\r\n * @name {String} name The dialog name.\r\n * @Factory {Function} Factory a function resposible for creating dialog prototype.\r\n * @transient {Boolean} transient True to create a new dialog instance each time the dialog is invoked, false otherwise.\r\n * @base {String} base the name of another dialog to inherit from.\r\n *\r\n * @return {Object} The dialog definition.\r\n */\r\n function register(name, Factory, transient, base) {\r\n var definition = {\r\n dialog: null,\r\n factory: Factory\r\n };\r\n\r\n //if this is based on an existing dialog, create a new definition\r\n //by applying the new protoype over the existing one.\r\n if (base !== undefined) {\r\n definition.factory = function () {\r\n return extend(new dialogs[base].factory(), new Factory());\r\n };\r\n }\r\n\r\n if (!transient) {\r\n //create a new definition based on dialog\r\n definition.dialog = extend(new definition.factory(), dialog);\r\n }\r\n return dialogs[name] = definition;\r\n }\r\n\r\n return {\r\n /**\r\n * Alertify defaults\r\n * \r\n * @type {Object}\r\n */\r\n defaults: defaults,\r\n /**\r\n * Dialogs factory \r\n *\r\n * @param {string} Dialog name.\r\n * @param {Function} A Dialog factory function.\r\n * @param {Boolean} Indicates whether to create a singleton or transient dialog.\r\n * @param {String} The name of the base type to inherit from.\r\n */\r\n dialog: function (name, Factory, transient, base) {\r\n\r\n // get request, create a new instance and return it.\r\n if (typeof Factory !== 'function') {\r\n return get_dialog(name);\r\n }\r\n\r\n if (this.hasOwnProperty(name)) {\r\n throw new Error('alertify.dialog: name already exists');\r\n }\r\n\r\n // register the dialog\r\n var definition = register(name, Factory, transient, base);\r\n\r\n if (transient) {\r\n\r\n // make it public\r\n this[name] = function () {\r\n //if passed with no params, consider it a get request\r\n if (arguments.length === 0) {\r\n return definition.dialog;\r\n } else {\r\n var instance = extend(new definition.factory(), dialog);\r\n //ensure init\r\n if (instance && typeof instance.__init === 'function') {\r\n instance.__init(instance);\r\n }\r\n instance['main'].apply(instance, arguments);\r\n return instance['show'].apply(instance);\r\n }\r\n };\r\n } else {\r\n // make it public\r\n this[name] = function () {\r\n //ensure init\r\n if (definition.dialog && typeof definition.dialog.__init === 'function') {\r\n definition.dialog.__init(definition.dialog);\r\n }\r\n //if passed with no params, consider it a get request\r\n if (arguments.length === 0) {\r\n return definition.dialog;\r\n } else {\r\n var dialog = definition.dialog;\r\n dialog['main'].apply(definition.dialog, arguments);\r\n return dialog['show'].apply(definition.dialog);\r\n }\r\n };\r\n }\r\n },\r\n /**\r\n * Close all open dialogs.\r\n *\r\n * @param {Object} excpet [optional] The dialog object to exclude from closing.\r\n *\r\n * @return {undefined}\r\n */\r\n closeAll: function (except) {\r\n var clone = openDialogs.slice(0);\r\n for (var x = 0; x < clone.length; x += 1) {\r\n var instance = clone[x];\r\n if (except === undefined || except !== instance) {\r\n instance.close();\r\n }\r\n }\r\n },\r\n /**\r\n * Gets or Sets dialog settings/options. if the dialog is transient, this call does nothing.\r\n *\r\n * @param {string} name The dialog name.\r\n * @param {String|Object} key A string specifying a propery name or a collection of key/value pairs.\r\n * @param {Variant} value Optional, the value associated with the key (in case it was a string).\r\n *\r\n * @return {undefined}\r\n */\r\n setting: function (name, key, value) {\r\n\r\n if (name === 'notifier') {\r\n return notifier.setting(key, value);\r\n }\r\n\r\n var dialog = get_dialog(name);\r\n if (dialog) {\r\n return dialog.setting(key, value);\r\n }\r\n },\r\n /**\r\n * [Alias] Sets dialog settings/options \r\n */\r\n set: function(name,key,value){\r\n return this.setting(name, key,value);\r\n },\r\n /**\r\n * [Alias] Gets dialog settings/options \r\n */\r\n get: function(name, key){\r\n return this.setting(name, key);\r\n },\r\n /**\r\n * Creates a new notification message.\r\n * If a type is passed, a class name \"ajs-{type}\" will be added.\r\n * This allows for custom look and feel for various types of notifications.\r\n *\r\n * @param {String | DOMElement} [message=undefined]\t\tMessage text\r\n * @param {String} [type='']\t\t\t\tType of log message\r\n * @param {String} [wait='']\t\t\t\tTime (in seconds) to wait before auto-close\r\n * @param {Function} [callback=undefined]\tA callback function to be invoked when the log is closed.\r\n *\r\n * @return {Object} Notification object.\r\n */\r\n notify: function (message, type, wait, callback) {\r\n return notifier.create(type, callback).push(message, wait);\r\n },\r\n /**\r\n * Creates a new notification message.\r\n *\r\n * @param {String}\t\t[message=undefined]\t\tMessage text\r\n * @param {String} [wait='']\t\t\t\tTime (in seconds) to wait before auto-close\r\n * @param {Function}\t[callback=undefined]\tA callback function to be invoked when the log is closed.\r\n *\r\n * @return {Object} Notification object.\r\n */\r\n message: function (message, wait, callback) {\r\n return notifier.create(null, callback).push(message, wait);\r\n },\r\n /**\r\n * Creates a new notification message of type 'success'.\r\n *\r\n * @param {String}\t\t[message=undefined]\t\tMessage text\r\n * @param {String} [wait='']\t\t\t\tTime (in seconds) to wait before auto-close\r\n * @param {Function}\t[callback=undefined]\tA callback function to be invoked when the log is closed.\r\n *\r\n * @return {Object} Notification object.\r\n */\r\n success: function (message, wait, callback) {\r\n return notifier.create('success', callback).push(message, wait);\r\n },\r\n /**\r\n * Creates a new notification message of type 'error'.\r\n *\r\n * @param {String}\t\t[message=undefined]\t\tMessage text\r\n * @param {String} [wait='']\t\t\t\tTime (in seconds) to wait before auto-close\r\n * @param {Function}\t[callback=undefined]\tA callback function to be invoked when the log is closed.\r\n *\r\n * @return {Object} Notification object.\r\n */\r\n error: function (message, wait, callback) {\r\n return notifier.create('error', callback).push(message, wait);\r\n },\r\n /**\r\n * Creates a new notification message of type 'warning'.\r\n *\r\n * @param {String}\t\t[message=undefined]\t\tMessage text\r\n * @param {String} [wait='']\t\t\t\tTime (in seconds) to wait before auto-close\r\n * @param {Function}\t[callback=undefined]\tA callback function to be invoked when the log is closed.\r\n *\r\n * @return {Object} Notification object.\r\n */\r\n warning: function (message, wait, callback) {\r\n return notifier.create('warning', callback).push(message, wait);\r\n },\r\n /**\r\n * Dismisses all open notifications\r\n *\r\n * @return {undefined}\r\n */\r\n dismissAll: function () {\r\n notifier.dismissAll();\r\n }\r\n };\r\n }\r\n var alertify = new Alertify();\r\n\r\n /**\r\n * Alert dialog definition\r\n *\r\n * invoked by:\r\n *\talertify.alert(message);\r\n *\talertify.alert(title, message);\r\n *\talertify.alert(message, onok);\r\n *\talertify.alert(title, message, onok);\r\n */\r\n alertify.dialog('alert', function () {\r\n return {\r\n main: function (_title, _message, _onok) {\r\n var title, message, onok;\r\n switch (arguments.length) {\r\n case 1:\r\n message = _title;\r\n break;\r\n case 2:\r\n if (typeof _message === 'function') {\r\n message = _title;\r\n onok = _message;\r\n } else {\r\n title = _title;\r\n message = _message;\r\n }\r\n break;\r\n case 3:\r\n title = _title;\r\n message = _message;\r\n onok = _onok;\r\n break;\r\n }\r\n this.set('title', title);\r\n this.set('message', message);\r\n this.set('onok', onok);\r\n return this;\r\n },\r\n setup: function () {\r\n return {\r\n buttons: [\r\n {\r\n text: alertify.defaults.glossary.ok,\r\n key: keys.ESC,\r\n invokeOnClose: true,\r\n className: alertify.defaults.theme.ok,\r\n }\r\n ],\r\n focus: {\r\n element: 0,\r\n select: false\r\n },\r\n options: {\r\n maximizable: false,\r\n resizable: false\r\n }\r\n };\r\n },\r\n build: function () {\r\n // nothing\r\n },\r\n prepare: function () {\r\n //nothing\r\n },\r\n setMessage: function (message) {\r\n this.setContent(message);\r\n },\r\n settings: {\r\n message: undefined,\r\n onok: undefined,\r\n label: undefined,\r\n },\r\n settingUpdated: function (key, oldValue, newValue) {\r\n switch (key) {\r\n case 'message':\r\n this.setMessage(newValue);\r\n break;\r\n case 'label':\r\n if (this.__internal.buttons[0].element) {\r\n this.__internal.buttons[0].element.innerHTML = newValue;\r\n }\r\n break;\r\n }\r\n },\r\n callback: function (closeEvent) {\r\n if (typeof this.get('onok') === 'function') {\r\n var returnValue = this.get('onok').call(this, closeEvent);\r\n if (typeof returnValue !== 'undefined') {\r\n closeEvent.cancel = !returnValue;\r\n }\r\n }\r\n }\r\n };\r\n });\r\n /**\r\n * Confirm dialog object\r\n *\r\n *\talertify.confirm(message);\r\n *\talertify.confirm(message, onok);\r\n *\talertify.confirm(message, onok, oncancel);\r\n *\talertify.confirm(title, message, onok, oncancel);\r\n */\r\n alertify.dialog('confirm', function () {\r\n\r\n var autoConfirm = {\r\n timer: null,\r\n index: null,\r\n text: null,\r\n duration: null,\r\n task: function (event, self) {\r\n if (self.isOpen()) {\r\n self.__internal.buttons[autoConfirm.index].element.innerHTML = autoConfirm.text + ' (‏' + autoConfirm.duration + '‏) ';\r\n autoConfirm.duration -= 1;\r\n if (autoConfirm.duration === -1) {\r\n clearAutoConfirm(self);\r\n var button = self.__internal.buttons[autoConfirm.index];\r\n var closeEvent = createCloseEvent(autoConfirm.index, button);\r\n\r\n if (typeof self.callback === 'function') {\r\n self.callback.apply(self, [closeEvent]);\r\n }\r\n //close the dialog.\r\n if (closeEvent.close !== false) {\r\n self.close();\r\n }\r\n }\r\n } else {\r\n clearAutoConfirm(self);\r\n }\r\n }\r\n };\r\n\r\n function clearAutoConfirm(self) {\r\n if (autoConfirm.timer !== null) {\r\n clearInterval(autoConfirm.timer);\r\n autoConfirm.timer = null;\r\n self.__internal.buttons[autoConfirm.index].element.innerHTML = autoConfirm.text;\r\n }\r\n }\r\n\r\n function startAutoConfirm(self, index, duration) {\r\n clearAutoConfirm(self);\r\n autoConfirm.duration = duration;\r\n autoConfirm.index = index;\r\n autoConfirm.text = self.__internal.buttons[index].element.innerHTML;\r\n autoConfirm.timer = setInterval(delegate(self, autoConfirm.task), 1000);\r\n autoConfirm.task(null, self);\r\n }\r\n\r\n\r\n return {\r\n main: function (_title, _message, _onok, _oncancel) {\r\n var title, message, onok, oncancel;\r\n switch (arguments.length) {\r\n case 1:\r\n message = _title;\r\n break;\r\n case 2:\r\n message = _title;\r\n onok = _message;\r\n break;\r\n case 3:\r\n message = _title;\r\n onok = _message;\r\n oncancel = _onok;\r\n break;\r\n case 4:\r\n title = _title;\r\n message = _message;\r\n onok = _onok;\r\n oncancel = _oncancel;\r\n break;\r\n }\r\n this.set('title', title);\r\n this.set('message', message);\r\n this.set('onok', onok);\r\n this.set('oncancel', oncancel);\r\n return this;\r\n },\r\n setup: function () {\r\n return {\r\n buttons: [\r\n {\r\n text: alertify.defaults.glossary.ok,\r\n key: keys.ENTER,\r\n className: alertify.defaults.theme.ok,\r\n },\r\n {\r\n text: alertify.defaults.glossary.cancel,\r\n key: keys.ESC,\r\n invokeOnClose: true,\r\n className: alertify.defaults.theme.cancel,\r\n }\r\n ],\r\n focus: {\r\n element: 0,\r\n select: false\r\n },\r\n options: {\r\n maximizable: false,\r\n resizable: false\r\n }\r\n };\r\n },\r\n build: function () {\r\n //nothing\r\n },\r\n prepare: function () {\r\n //nothing\r\n },\r\n setMessage: function (message) {\r\n this.setContent(message);\r\n },\r\n settings: {\r\n message: null,\r\n labels: null,\r\n onok: null,\r\n oncancel: null,\r\n defaultFocus: null,\r\n reverseButtons: null,\r\n },\r\n settingUpdated: function (key, oldValue, newValue) {\r\n switch (key) {\r\n case 'message':\r\n this.setMessage(newValue);\r\n break;\r\n case 'labels':\r\n if ('ok' in newValue && this.__internal.buttons[0].element) {\r\n this.__internal.buttons[0].text = newValue.ok;\r\n this.__internal.buttons[0].element.innerHTML = newValue.ok;\r\n }\r\n if ('cancel' in newValue && this.__internal.buttons[1].element) {\r\n this.__internal.buttons[1].text = newValue.cancel;\r\n this.__internal.buttons[1].element.innerHTML = newValue.cancel;\r\n }\r\n break;\r\n case 'reverseButtons':\r\n if (newValue === true) {\r\n this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element);\r\n } else {\r\n this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element);\r\n }\r\n break;\r\n case 'defaultFocus':\r\n this.__internal.focus.element = newValue === 'ok' ? 0 : 1;\r\n break;\r\n }\r\n },\r\n callback: function (closeEvent) {\r\n clearAutoConfirm(this);\r\n var returnValue;\r\n switch (closeEvent.index) {\r\n case 0:\r\n if (typeof this.get('onok') === 'function') {\r\n returnValue = this.get('onok').call(this, closeEvent);\r\n if (typeof returnValue !== 'undefined') {\r\n closeEvent.cancel = !returnValue;\r\n }\r\n }\r\n break;\r\n case 1:\r\n if (typeof this.get('oncancel') === 'function') {\r\n returnValue = this.get('oncancel').call(this, closeEvent);\r\n if (typeof returnValue !== 'undefined') {\r\n closeEvent.cancel = !returnValue;\r\n }\r\n }\r\n break;\r\n }\r\n },\r\n autoOk: function (duration) {\r\n startAutoConfirm(this, 0, duration);\r\n return this;\r\n },\r\n autoCancel: function (duration) {\r\n startAutoConfirm(this, 1, duration);\r\n return this;\r\n }\r\n };\r\n });\r\n /**\r\n * Prompt dialog object\r\n *\r\n * invoked by:\r\n *\talertify.prompt(message);\r\n *\talertify.prompt(message, value);\r\n *\talertify.prompt(message, value, onok);\r\n *\talertify.prompt(message, value, onok, oncancel);\r\n *\talertify.prompt(title, message, value, onok, oncancel);\r\n */\r\n alertify.dialog('prompt', function () {\r\n var input = document.createElement('INPUT');\r\n var p = document.createElement('P');\r\n return {\r\n main: function (_title, _message, _value, _onok, _oncancel) {\r\n var title, message, value, onok, oncancel;\r\n switch (arguments.length) {\r\n case 1:\r\n message = _title;\r\n break;\r\n case 2:\r\n message = _title;\r\n value = _message;\r\n break;\r\n case 3:\r\n message = _title;\r\n value = _message;\r\n onok = _value;\r\n break;\r\n case 4:\r\n message = _title;\r\n value = _message;\r\n onok = _value;\r\n oncancel = _onok;\r\n break;\r\n case 5:\r\n title = _title;\r\n message = _message;\r\n value = _value;\r\n onok = _onok;\r\n oncancel = _oncancel;\r\n break;\r\n }\r\n this.set('title', title);\r\n this.set('message', message);\r\n this.set('value', value);\r\n this.set('onok', onok);\r\n this.set('oncancel', oncancel);\r\n return this;\r\n },\r\n setup: function () {\r\n return {\r\n buttons: [\r\n {\r\n text: alertify.defaults.glossary.ok,\r\n key: keys.ENTER,\r\n className: alertify.defaults.theme.ok,\r\n },\r\n {\r\n text: alertify.defaults.glossary.cancel,\r\n key: keys.ESC,\r\n invokeOnClose: true,\r\n className: alertify.defaults.theme.cancel,\r\n }\r\n ],\r\n focus: {\r\n element: input,\r\n select: true\r\n },\r\n options: {\r\n maximizable: false,\r\n resizable: false\r\n }\r\n };\r\n },\r\n build: function () {\r\n input.className = alertify.defaults.theme.input;\r\n input.setAttribute('type', 'text');\r\n input.value = this.get('value');\r\n this.elements.content.appendChild(p);\r\n this.elements.content.appendChild(input);\r\n },\r\n prepare: function () {\r\n //nothing\r\n },\r\n setMessage: function (message) {\r\n if (typeof message === 'string') {\r\n clearContents(p);\r\n p.innerHTML = message;\r\n } else if (message instanceof window.HTMLElement && p.firstChild !== message) {\r\n clearContents(p);\r\n p.appendChild(message);\r\n }\r\n },\r\n settings: {\r\n message: undefined,\r\n labels: undefined,\r\n onok: undefined,\r\n oncancel: undefined,\r\n value: '',\r\n type:'text',\r\n reverseButtons: undefined,\r\n },\r\n settingUpdated: function (key, oldValue, newValue) {\r\n switch (key) {\r\n case 'message':\r\n this.setMessage(newValue);\r\n break;\r\n case 'value':\r\n input.value = newValue;\r\n break;\r\n case 'type':\r\n switch (newValue) {\r\n case 'text':\r\n case 'color':\r\n case 'date':\r\n case 'datetime-local':\r\n case 'email':\r\n case 'month':\r\n case 'number':\r\n case 'password':\r\n case 'search':\r\n case 'tel':\r\n case 'time':\r\n case 'week':\r\n input.type = newValue;\r\n break;\r\n default:\r\n input.type = 'text';\r\n break;\r\n }\r\n break;\r\n case 'labels':\r\n if (newValue.ok && this.__internal.buttons[0].element) {\r\n this.__internal.buttons[0].element.innerHTML = newValue.ok;\r\n }\r\n if (newValue.cancel && this.__internal.buttons[1].element) {\r\n this.__internal.buttons[1].element.innerHTML = newValue.cancel;\r\n }\r\n break;\r\n case 'reverseButtons':\r\n if (newValue === true) {\r\n this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element);\r\n } else {\r\n this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element);\r\n }\r\n break;\r\n }\r\n },\r\n callback: function (closeEvent) {\r\n var returnValue;\r\n switch (closeEvent.index) {\r\n case 0:\r\n this.settings.value = input.value;\r\n if (typeof this.get('onok') === 'function') {\r\n returnValue = this.get('onok').call(this, closeEvent, this.settings.value);\r\n if (typeof returnValue !== 'undefined') {\r\n closeEvent.cancel = !returnValue;\r\n }\r\n }\r\n break;\r\n case 1:\r\n if (typeof this.get('oncancel') === 'function') {\r\n returnValue = this.get('oncancel').call(this, closeEvent);\r\n if (typeof returnValue !== 'undefined') {\r\n closeEvent.cancel = !returnValue;\r\n }\r\n }\r\n if(!closeEvent.cancel){\r\n input.value = this.settings.value;\r\n }\r\n break;\r\n }\r\n }\r\n };\r\n });\r\n\r\n // CommonJS\r\n if ( typeof module === 'object' && typeof module.exports === 'object' ) {\r\n module.exports = alertify;\r\n // AMD\r\n } else if ( typeof define === 'function' && define.amd) {\r\n define( [], function () {\r\n return alertify;\r\n } );\r\n // window\r\n } else if ( !window.alertify ) {\r\n window.alertify = alertify;\r\n }\r\n\r\n} ( typeof window !== 'undefined' ? window : this ) );\r\n","import m from 'mithril'\nimport './styles/documents.scss'\n\nexport const Documents = {\n view: vnode => [\n m('h1', 'Documents'),\n m(\n 'a.docLink',\n { href: 'https://quaternionmedia.github.io/alfred/' },\n 'User Documentation'\n ),\n m('a.docLink', { href: '/api' }, 'API Reference'),\n ],\n}\n","import m from 'mithril'\nimport { User } from './User'\nimport { auth } from './Login'\nimport { success, error, message, prompt } from 'alertifyjs'\nimport { downloadFile } from './Tools'\nimport '../node_modules/material-design-icons-iconfont/dist/material-design-icons.css'\nimport './styles/renders.scss'\nimport './styles/tables.scss'\n\nvar Stream = require('mithril/stream')\n\nfunction tsToDate(ts) {\n let date = new Date(\n ts.substr(0, 4),\n ts.substr(4, 2) - 1,\n ts.substr(6, 2),\n ts.substr(9, 2),\n ts.substr(11, 2),\n ts.substr(13, 2)\n )\n return date\n}\n\nfunction timeDelta(date) {\n let now = new Date()\n let delta = (now - date) / 1000\n let days = Math.floor(delta / 3600 / 24)\n let hours = Math.floor(delta / 3600)\n let minutes = String(Math.floor((delta % 3600) / 60)).padStart(2, '0')\n let seconds = String(Math.floor(delta % 60)).padStart(2, '0')\n return days ? days + 'd' : hours + ':' + minutes + ':' + seconds\n}\n\nfunction shortTime(date) {\n let now = new Date()\n let delta = (now - date) / 1000\n let days = Math.floor(delta / 3600 / 24)\n return days ? days + 'd' : date.toLocaleTimeString()\n}\n\nexport const dateFromObjectId = function (objectId) {\n return new Date(parseInt(objectId.substring(0, 8), 16) * 1000)\n}\n\nexport function RenderLink() {\n var link = null\n return {\n view: vnode => {\n return link\n ? m('.bar', {}, [\n m(\n 'textarea',\n {\n id: vnode.attrs.id,\n },\n link\n ),\n m(\n 'i.material-icons',\n {\n onclick: e => {\n // console.log('copied ', e)\n success('copied link to clipboard!', 3)\n let txt = document.getElementById(vnode.attrs.id)\n txt.select()\n document.execCommand('copy')\n },\n },\n 'content_copy'\n ),\n ])\n : m(\n '.tools',\n m(\n 'i.material-icons',\n {\n onclick: e => {\n // console.log('getting render link', vnode.children)\n auth('/render/' + vnode.attrs.id, {}).then(res => {\n link = res\n })\n },\n },\n 'link'\n )\n )\n },\n }\n}\nexport function RenderPreview() {\n return {\n view: vnode => {\n return m('video', {\n width: '100%',\n 'object-fit': 'contain',\n src: vnode.attrs.src,\n controls: true,\n autoplay: true,\n volume: 0.2,\n })\n },\n }\n}\n\nexport function Renders() {\n var preview = Stream(null)\n var renders = []\n\n function getRenders() {\n auth('/render').then(e => {\n // console.log('renders init')\n renders = e\n })\n }\n\n return {\n oncreate: vnode => {\n function checkRenders() {\n if (m.route.get() == '/renders') {\n getRenders()\n setTimeout(() => {\n checkRenders()\n }, 1000)\n }\n }\n checkRenders()\n },\n view: vnode => {\n let now = new Date()\n return [\n m('h1', 'Renders'),\n m('.renderVideo', [\n m(RenderPreview, {\n src: preview(),\n }),\n ]),\n m('.flexwrap', {}, [\n m(\n 'table.rendTableHead',\n m('th', 'Project'),\n m('th', 'Description'),\n m('th', 'Duration'),\n m('th', 'Resolution'),\n m('th', 'Quality'),\n m('th', 'Start Time'),\n m('th', 'Progress'),\n m('th', 'Preview'),\n m('th', 'Link'),\n m('th', 'Issue'),\n m('th', 'Delete')\n ),\n m('table.rendTable', {}, [\n renders.map(r => {\n return m('tr', {}, [\n m('td', {}, r['project']),\n m('td', {}, r['description']),\n m('td', {}, r['duration']),\n m('td', {}, `${r['width']}x${r['height']}`),\n m('td', {}, r['quality']),\n m('td.tooltip', {}, [\n shortTime(dateFromObjectId(r['_id'])),\n m(\n '.tooltiptext',\n {},\n dateFromObjectId(r['_id']).toLocaleString()\n ),\n ]),\n m('td', {}, [\n m('progress', {\n max: 100,\n value: `${Number(r['progress']).toFixed(2)}`,\n }),\n m('p', `${Number(r['progress']).toFixed(2)}%`),\n ]),\n m(\n 'td',\n r['progress'] >= 100\n ? m(\n '.tools',\n m(\n 'i.material-icons',\n {\n onclick: e => {\n auth('/render/' + r['_id']).then(res => {\n // console.log('got signed link', res)\n preview(res)\n })\n },\n },\n 'missed_video_call'\n )\n )\n : ''\n ),\n m(\n 'td',\n r['progress'] >= 100 ? m(RenderLink, { id: r['_id'] }) : ''\n ),\n m(\n 'td',\n {},\n m(\n '.tools',\n {},\n m(\n 'i.material-icons',\n {\n onclick: e => {\n prompt(\n 'Report issue',\n 'Please provide a detailed description of the issue',\n \"There's a problem with...\",\n (evt, issue) => {\n console.log('reporting issue', evt, issue)\n auth(`/render/${r['_id']}/report`, {\n method: 'post',\n body: issue,\n }).then(\n win => {\n success(\n \"issue submitted! We'll check it out as soon as we can!\"\n )\n },\n lose => {\n console.log('error reporting issue', lose)\n error('Oops... something went wrong. Sorry!')\n }\n )\n },\n evt => {\n console.log('cancelled issue')\n }\n )\n },\n },\n 'report_problem'\n )\n )\n ),\n m(\n 'td',\n m(\n '.tools',\n m(\n 'i.material-icons',\n {\n onclick: e => {\n auth(`/render/${r['_id']}`, {\n method: 'delete',\n })\n .then(\n res => {\n console.log('deleted', r['filename'])\n message(`${r['filename']} removed`, 4)\n getRenders()\n },\n err => {\n console.log('error deleting', err)\n if (err.status_code == 406) {\n error('did not find that entry', 4)\n } else {\n error('error removing from db', 4)\n }\n }\n )\n .catch()\n },\n },\n 'delete'\n )\n )\n ),\n ])\n }),\n ]),\n ]),\n ]\n },\n }\n}\n","import m from 'mithril'\nimport '../node_modules/material-design-icons-iconfont/dist/material-design-icons.css'\nimport Monitor from './Monitor'\nimport { Video, Edl } from './Video'\nvar state = require(\"./Globals\").state\nimport { message, success, defaults } from 'alertifyjs'\nimport { Resolution, Aspect } from './Resolution'\n\nexport function downloadFile(url) {\n var a = document.createElement(\"a\")\n document.body.appendChild(a)\n a.style = \"display: none\"\n a.href = url\n a.click()\n document.body.removeChild(a)\n}\nexport function PlaybackTools() {\n return {\n view(vnode) {\n return m('#PlaybackTools.tools.toolbar', {}, [\n\n m('i.material-icons', {\n title: 'start',\n onclick: (vnode) => {Edl.jump(0)}\n }, 'first_page'),\n m('i.material-icons', {\n title: 'back 5s',\n onclick: (vnode) => {\n Edl.jump(Math.max(Edl.time - 5, 0))}\n }, 'fast_rewind'),\n m('i.material-icons', {\n title: 'pause',\n onclick: Monitor.play,\n }, Video.paused ? 'play_arrow': 'pause' ),\n m('i.material-icons', {\n title: 'forward 5s',\n onclick: (vnode) => {\n Edl.jump(Math.min(Edl.time + 5, Edl.duration()))}\n }, 'fast_forward'),\n m('i.material-icons', {\n title: 'end',\n onclick: (vnode) => {Edl.jump(Edl.duration())}\n }, 'last_page'),\n ]\n )\n }\n }\n}\n\nexport function SpeedTools() {\n return {\n view: vnode => {\n return m('.tools.toolbar', {}, [\n m('i.material-icons', {\n title: 'slower',\n onclick: (vnode) => {Monitor.slower()}\n }, 'slow_motion_video'),\n m('i.custom', {\n title: 'reset speed',\n onclick: (vnode) => {Monitor.resetSpeed()}\n }, Video.speed + 'x'),\n m('i.material-icons', {\n title: 'faster',\n onclick: (vnode) => {Monitor.faster()}\n }, 'speed'),\n ])\n }\n }\n}\n\nexport function ProjectTools() {\n return {\n view: vnode => {\n return m('.tools.toolbar', {}, [\n m('i.material-icons', {\n title: 'save',\n onclick: vnode => {\n m.request({\n url: '/edl',\n method: 'post',\n params: {\n filename: m.route.param('edl')\n },\n body: {'edl': Edl.edl}\n }).then(e => {\n let resp = JSON.parse(e)\n console.log('sucessfully saved', resp)\n message(`saved! ${resp.filename}`, 3)\n })\n }\n }, 'save'),\n m('i.material-icons', {\n title: 'render',\n onclick: (vnode) => {\n // console.log('export')\n m.request({\n url: '/render',\n method: 'post',\n params: {\n project: m.route.param('project'),\n width: state.width(),\n height: state.height(),\n },\n body: { edl: Edl.edl },\n }).then(e => {\n console.log('got result', e)\n message(`Added ${m.route.param(\"project\")} to render queue`, 5)\n m.route.set('/renders')\n }\n )\n }\n }, 'file_upload'),\n ])\n }\n }\n}\n","import m from 'mithril'\nimport { Video } from './Video'\nvar state = require(\"./Globals\").state\n\nexport function Resolution() {\n return {\n view: (vnode) => {\n return m('select#resolution', {\n value: `${state.resolution()}p`,\n onchange: e => {\n let res = e.target.value.split('p')[0]\n state.resolution(res)\n console.log('changing resolution', res)\n },\n ...vnode.attrs,\n }, [\n vnode.children.map(opt => {\n return m('option', {value: opt}, opt)\n })\n ])\n }\n }\n}\n\nexport function Aspect() {\n return {\n view: (vnode) => {\n return m('select#aspect', {\n value: `${state.aspectWidth()}:${state.aspectHeight()}`,\n onchange: e => {\n let res = e.target.value.split(':')\n state.aspectWidth(res[0])\n state.aspectHeight(res[1])\n console.log('changing aspects', state.aspectWidth(), state.aspectHeight(), state.width(), state.height())\n },\n ...vnode.attrs,\n }, [\n vnode.children.map(opt => {\n return m('option', {value: opt}, opt)\n })\n ])\n\n }\n }\n}\n","import m from 'mithril'\nimport { success, error, message } from 'alertifyjs'\nimport { ImagePreview } from './Preview'\nimport { Form, Text, TextBox, Button, Img, Selector} from './Components'\nimport { User } from './User'\nimport { auth } from './Login'\nimport { Fields, MagnussensFields } from './Form'\nimport './timerange.css'\nimport 'regenerator-runtime/runtime'\nimport \"../node_modules/mithril-range/index.css\"\nimport range from 'mithril-range'\n\nimport { LogicEngine } from 'json-logic-engine'\n\nexport function Magnussens() {\n let project\n let fields = []\n let logic\n let preview\n let loading = false\n let engine = new LogicEngine()\n let t = 1\n engine.addMethod('floor', Math.floor)\n engine.addMethod('sqrt', Math.sqrt)\n \n return {\n oninit: vnode => {\n if (m.route.param('project')) {\n auth('/project/' + m.route.param('project')).then(res => {\n console.log('project', res)\n project = res\n fields = res['fields']\n logic = engine.build(res['logic'])\n })\n }\n },\n view: vnode => {\n return [\n m('h2', {}, project ? project.name : ''),\n m(Form, {id: 'template_form'}, [\n m(Fields, {}, fields),\n m(Selector, { name: 'resolution', text: 'Resolution'}, [\n '1920x1080', '1600x900', '1280x720',\n ]),\n m(Selector, { name: 'quality', text: 'Quality'}, [\n 'web', 'TV'\n ]),\n m(Text, { name: 'description', text: 'Desciption (optional)'}, ''),\n m(Button, { name: 'preview', value: 'preview', onclick: e => {\n e.preventDefault()\n loading = true\n\n let form = new FormData(document.getElementById('template_form'))\n let data = Object.fromEntries(form.entries())\n data.width = data.resolution.split('x')[0]\n data.height = data.resolution.split('x')[1]\n let edl = logic(data)\n // edl.shift()\n console.log('previewing ', edl, vnode.dom)\n auth('/preview/', {\n method: 'post',\n params: {\n t: t\n },\n body: {\n edl: {clips: edl},\n },\n }).then(res => {\n console.log('preview available at', res)\n loading = false\n preview = res\n }).catch(e => {\n console.log('error previewing', e)\n })\n }},),\n m(Button, { name: 'save', type: 'submit', value: 'render',\n onclick: e => {\n e.preventDefault()\n let form = new FormData(document.getElementById('template_form'))\n // form.forEach(f => {console.log('field', f.name, f)})\n message('assembling render')\n let data = Object.fromEntries(form.entries())\n data.width = data.resolution.split('x')[0]\n data.height = data.resolution.split('x')[1]\n\n let edl = {clips: logic(data), duration: data.duration}\n let ffmpeg_params = data.quality == 'TV' ? ['-b:v', '25M', '-maxrate', '30M', '-bufsize', '20M'] : ['-b:v', '5M', '-minrate', '1M', '-maxrate', '10M', '-bufsize', '5M']\n console.log('saving form', e, edl, data, data, ffmpeg_params)\n \n let params = {\n project: project.name,\n project_id: m.route.param('project'),\n width: data.width,\n height: data.height,\n fps: 29.97,\n quality: data.quality,\n description: data.description,\n ffmpeg_params: ffmpeg_params,\n edl: edl,\n duration: data.duration ? data.duration : edl.duration,\n }\n auth(`/render`, {\n method: 'post',\n body: params\n }).then(e => {\n success('Rendering!')\n m.route.set('/renders')\n }).catch(e => {\n console.log('error rendering', e)\n })\n },\n },),\n // m(Progress),\n m(range, {\n min: 0,\n max: 30,\n step: .1,\n value: t,\n class: 'timerange',\n ondrag: v => {\n t = v.toFixed(1)\n }\n }, m('.timerange-value', {}, t)),\n loading ? m('.loader') : m(ImagePreview, {src: preview,})\n ]),\n ]\n }\n}\n}\n","import m from 'mithril'\nimport { Video, Edl } from './Video'\nvar state = require(\"./Globals\").state\n\nconst urlfy = obj => Object\n .keys(obj)\n .map(k => encodeURIComponent(k) + '=' + encodeURIComponent(obj[k]))\n .join('&');\n\nexport function ImagePreview() {\n return {\n view: (vnode) => {\n return m('img.preview', {\n src: vnode.attrs.src\n })\n }\n }\n}\nexport function VideoPreview() {\n return {\n onbeforeupdate: (vnode, old) => {\n return Video.paused\n },\n oncreate: (vnode) => {\n document.addEventListener('keydown', e => {\n switch (e.code) {\n case 'Space':\n e.preventDefault()\n if (Video.paused) {\n vnode.dom.play()\n Video.paused = false\n vnode.dom.addEventListener('timeupdate', (e) => {\n Video.time(e.target.currentTime)\n Edl.time(Video.time + Edl.durations(Edl.edl.slice(0,Edl.current)))\n m.redraw()\n })\n } else {\n vnode.dom.pause()\n Video.paused = true\n }\n m.redraw()\n break\n }\n })\n vnode.dom.addEventListener('loadeddata', (event) => {\n if (!Video.paused && vnode.dom.paused) {\n console.log('fixing paused video by playing')\n vnode.dom.play()\n }\n if (Video.time() < Edl.edl[Edl.current]['inpoint']) {\n console.log('jumping to inpoint')\n vnode.dom.currentTime = Video.time()\n }\n })\n },\n view: (vnode) => {\n return m('video.preview', {\n ...vnode.attrs,\n currentTime: Video.time(),\n // state: Video.paused ? vnode.dom.pause() : vnode.dom.play(),\n style: {\n width: '100%',\n height: '100%',\n 'object-fit': 'contain'\n }\n })\n }\n }\n}\n\n\nexport var Preview = ( () => {\n return {\n oncreate: (vnode) => {\n document.addEventListener('keydown', e => {\n switch (e.code) {\n case 'ArrowLeft':\n console.log('left!', e)\n e.preventDefault()\n Edl.jump(Math.max(Edl.time() - 5, 0))\n break\n case 'ArrowRight':\n e.preventDefault()\n Edl.jump(Math.min(Edl.time() + 5, Edl.duration()))\n break\n }\n })},\n onupdate: (vnode) => {\n\n },\n view: (vnode) => {\n let clip = Edl.edl[Edl.current]\n if (clip) {\n if (clip.type == 'template') {\n return m('.bkg#preview', {\n style: {\n 'background-image': `url(bkg/${encodeURIComponent(m.route.param('project'))}?width=${state.width()}&height=${state.height()}&t=${Edl.time})`\n }\n }, [m(ImagePreview, {\n id: 'preview',\n src: `otto/template/${clip['name']}?${urlfy(clip.data)}&width=${state.width()}&height=${ state.height()}&t=${Video.time()}`\n })\n ])\n } else {\n return m(VideoPreview, {\n id: 'preview',\n src: clip.name\n })\n }\n }\n }\n }\n})\n","import m from 'mithril'\nimport { Menu } from './Menu' \nimport { Footer } from './Footer'\n\nexport function Form() {\n return {\n view: vnode => {\n return m('form', vnode.attrs, vnode.children)\n },\n }\n}\nexport function Text() {\n return {\n view: vnode => {\n return [\n m('label.formlabel', { for: vnode.attrs.name }, vnode.attrs.text),\n m('input[type=text]', vnode.attrs),\n m('br'),\n ]\n },\n }\n}\nexport function Textarea() {\n return {\n view: vnode => {\n return [\n m('label.formlabel', { for: vnode.attrs.name }, vnode.attrs.text),\n m('textarea', vnode.attrs),\n m('br'),\n ]\n },\n }\n}\nexport function Button() {\n return {\n view: vnode => {\n return m('input.button', vnode.attrs, vnode.children)\n },\n }\n}\n\nexport function Color() {\n return {\n view: vnode => {\n return [\n m('label.formlabel', { for: vnode.attrs.name }, vnode.attrs.text),\n m('input[type=color]', vnode.attrs),\n ]\n },\n }\n}\n\nexport function Img() {\n return {\n view: vnode => {\n return m('img', vnode.attrs, vnode.children)\n },\n }\n}\n\nexport function Image() {\n return {\n view: vnode => {\n return [\n m('label.formlabel', { for: vnode.attrs.name }, vnode.attrs.text),\n m('input[type=text]', vnode.attrs),\n m('img', { src: vnode.attrs.value }, vnode.children),\n ]\n },\n }\n}\n\nexport function Selector() {\n return {\n view: vnode => {\n return [\n m('label.formlabel', { for: vnode.attrs.name }, vnode.attrs.text),\n m(\n 'select',\n vnode.attrs,\n vnode.children.map(c => {\n return m('option', { value: c }, c)\n })\n ),\n m('br'),\n ]\n },\n }\n}\n\nexport const Section = {\n view: vnode => m('section', vnode.attrs, vnode.children),\n}\n\nexport const Layout = {\n view: vnode => [m(Menu), m(Section, vnode.attrs, vnode.children), m(Footer)],\n}\n","import m, { render } from 'mithril'\nimport { message } from 'alertifyjs'\nimport { User } from './User'\nimport LOGO from './assets/alWhite.png'\nimport './styles/menu.scss'\n\nexport function Menu() {\n // toggles the navContainer visibility\n var open = false\n addEventListener('resize', () => {\n if (window.innerWidth >= 1026 && open) {\n open = false\n m.redraw()\n }\n })\n function toggle() {\n console.log('toggling menu', open)\n open = !open\n }\n\n return {\n view: vnode => {\n return [\n m(\n 'header',\n m('.navbutton', m('i.material-icons', { onclick: toggle }, 'menu')),\n m('.navContainer', { style: { width: open ? '250px' : '0px' } }, [\n m(navLinks, { onclick: toggle }),\n ]),\n //TODO: change logo to new image in the future when location of images is known\n m(\n 'div.logo',\n m(\n Link,\n { href: '/', id: 'home-link', ...vnode.attrs },\n m('img.logoImg', { src: LOGO })\n )\n ),\n m('.menuLinks', m(Links)),\n m(\n Link,\n {\n class: 'loginLink',\n href: User.username ? '/logout' : '/login',\n id: 'login-link',\n ...vnode.attrs,\n },\n User.username ? 'Logout' : 'Login'\n )\n ),\n ]\n },\n }\n}\n\n//an individual link\nexport const Link = () => ({\n view: vnode => {\n return m(\n m.route.Link,\n {\n class: window.location.hash.startsWith(vnode.attrs.href, 2)\n ? 'active'\n : '',\n ...vnode.attrs,\n },\n vnode.children\n )\n },\n})\n\n//the links in the menu bar\nexport const Links = () => ({\n view: vnode => [\n m(\n Link,\n {\n href: '/projects',\n id: 'projects-link',\n ...vnode.attrs,\n },\n 'PROJECTS'\n ),\n m(\n Link,\n {\n href: '/renders',\n id: 'renders-link',\n ...vnode.attrs,\n },\n 'RENDERS'\n ),\n m(\n Link,\n {\n href: '/documents',\n id: 'documents-link',\n ...vnode.attrs,\n },\n 'DOCUMENTS'\n ),\n ],\n})\n\n//the links in the nav bar, separated to have own style\nexport const navLinks = () => ({\n view: vnode => [\n m(\n Link,\n { class: 'navLink', href: '/', id: 'home-link', ...vnode.attrs },\n 'HOME'\n ),\n m(\n Link,\n {\n class: 'navLink',\n href: '/projects',\n id: 'projects-link',\n ...vnode.attrs,\n },\n 'PROJECTS'\n ),\n m(\n Link,\n {\n class: 'navLink',\n href: '/renders',\n id: 'renders-link',\n ...vnode.attrs,\n },\n 'RENDERS'\n ),\n m(\n Link,\n {\n class: 'navLink',\n href: '/documents',\n id: 'documents-link',\n ...vnode.attrs,\n },\n 'DOCUMENTS'\n ),\n m(\n Link,\n {\n class: 'navLink',\n href: User.username ? '/logout' : '/login',\n id: 'login-link',\n ...vnode.attrs,\n },\n User.username ? 'LOGOUT' : 'LOGIN'\n ),\n ],\n})\n","module.exports = new __parcel__URL__(\"alWhite.f7212539.png\").toString();","import m from 'mithril'\nimport './styles/footer.scss'\n\nexport const Footer = {\n view: vnode =>\n m('footer', {}, [\n m('.text', 'More information at '),\n m(\n 'a.link',\n { href: 'https://www.quaternion.media/alfred/' },\n 'quaternion.media/alfred'\n ),\n ]),\n}\n","import m from 'mithril'\nimport { success, error, message } from 'alertifyjs'\nlet components = require('./Components')\n\nexport function Fields() {\n return {\n view: vnode => {\n return vnode.children.map(field => {\n return m(components[field.type], field.attrs, field.children)\n })\n }\n }\n}\n\nexport const MagnussensFields = [\n // { type: 'Selector', attrs: { name: 'project', text: 'Video', }, children: [ 'Magnussens', 'RSG']) },\n { type: 'Selector', attrs: { name: 'duration', text: 'Duration',}, children: ['30', '15'] },\n { type: 'TextBox', attrs: { name: 'carname', text: 'Car Name' } },\n { type: 'TextBox', attrs: { name: 'offerinfo', text: 'Offer Info' } },\n { type: 'Selector', attrs: { name: 'offeralign', text: 'Offer alignment' }, children: ['left', 'center'] },\n { type: 'TextBox', attrs: { name: 'legaltext', text: 'Legal Text' } },\n]","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n defineProperty(generator, \"_invoke\", { value: makeInvokeMethod(innerFn, self, context) });\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n defineProperty(Gp, \"constructor\", { value: GeneratorFunctionPrototype, configurable: true });\n defineProperty(\n GeneratorFunctionPrototype,\n \"constructor\",\n { value: GeneratorFunction, configurable: true }\n );\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n defineProperty(this, \"_invoke\", { value: enqueue });\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method;\n var method = delegate.iterator[methodName];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method, or a missing .next mehtod, always terminate the\n // yield* loop.\n context.delegate = null;\n\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (methodName === \"throw\" && delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n if (methodName !== \"return\") {\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a '\" + methodName + \"' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(val) {\n var object = Object(val);\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","\"use strict\";\n///////////////////////////////////////////////\n// Mithril Range\n// (c) 2017-2018 by Mike Linkovich\n// https://github.com/spacejack/mithril-range\n// License: MIT\n///////////////////////////////////////////////\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar m = require(\"mithril\");\nvar NONE = 0;\nvar MOUSE = 1;\nvar TOUCH = 2;\n// So we aren't triggered by echoed mouse events (some mobile browsers)\nvar DEVICE_DELAY = 350;\n/** Clamp number to range */\nfunction clamp(n, min, max) {\n return Math.min(Math.max(n, min), max);\n}\nvar isIOS = !!navigator.userAgent.match(/iPhone|iPad|iPod/i);\n// This is some unbelievable stone-age nonsense.\n// Workaround for webkit bug where event.preventDefault\n// within touchmove handler fails to prevent scrolling.\nvar iOSHackApplied = false;\nfunction applyIOSHack() {\n // Only apply this hack if iOS, haven't yet applied it,\n // and only if a component is actually created\n if (!isIOS || iOSHackApplied)\n return;\n window.addEventListener('touchmove', function () { });\n iOSHackApplied = true;\n}\nfunction quantize(val, min, max, step) {\n if (max - min <= 0)\n return min;\n if (step <= 0)\n return clamp(val, min, max);\n var steps = Math.ceil((max - min) / step);\n var v = min + Math.round(steps * (val - min) / (max - min)) * step;\n return clamp(v, min, max);\n}\nexports.quantize = quantize;\n/** Range Component */\nfunction MithrilRange() {\n var elHit;\n var elBar;\n var elBar0;\n var elBar1;\n var elHandle;\n var rcBar;\n var device = NONE;\n var pressed = false;\n // Attrs we need to cache\n var min = 0;\n var max = 10;\n var value = 0;\n var startValue = 0;\n var step = 1;\n var orientation = 'horizontal';\n var onchange;\n var ondrag;\n // Event handlers\n function onMouseDown(e) {\n if (device === TOUCH)\n return;\n device = MOUSE;\n if (e.button !== 0)\n return;\n window.addEventListener('mousemove', onMouseMove);\n window.addEventListener('mouseup', onMouseUp);\n onPress(e.clientX, e.clientY);\n }\n function onMouseMove(e) {\n e.preventDefault();\n onMove(e.clientX, e.clientY);\n }\n function onMouseUp(e) {\n window.removeEventListener('mousemove', onMouseMove);\n window.removeEventListener('mouseup', onMouseUp);\n onRelease(e.clientX, e.clientY);\n }\n function onTouchStart(e) {\n if (device === MOUSE)\n return;\n elHit.addEventListener('touchmove', onTouchMove);\n elHit.addEventListener('touchend', onTouchEnd);\n var t = e.changedTouches[0];\n onPress(t.clientX, t.clientY);\n }\n function onTouchMove(e) {\n e.preventDefault();\n var t = e.changedTouches[0];\n onMove(t.clientX, t.clientY);\n }\n function onTouchEnd(e) {\n elHit.removeEventListener('touchmove', onTouchMove);\n elHit.removeEventListener('touchend', onTouchEnd);\n var t = e.changedTouches[0];\n onRelease(t.clientX, t.clientY);\n }\n function onKeyDown(e) {\n var k = e.keyCode;\n var newVal;\n if (k === 33) { // pgup\n e.preventDefault();\n var s = Math.max((max - min) / 10, step);\n if (s <= 0)\n s = 1;\n newVal = quantize(value + s, min, max, step);\n }\n else if (k === 34) { // pgdown\n e.preventDefault();\n var s = Math.max((max - min) / 10, step);\n if (s <= 0)\n s = 1;\n newVal = quantize(value - s, min, max, step);\n }\n else if (k === 35) { // end\n e.preventDefault();\n newVal = max;\n }\n else if (k === 36) { // home\n e.preventDefault();\n newVal = min;\n }\n else if (k === 37 || k === 40) { // left/down\n e.preventDefault();\n var s = step > 0 ? step : (max - min) / 10;\n newVal = Math.max(value - s, min);\n }\n else if (k === 38 || k === 39) { // right/up\n e.preventDefault();\n var s = step > 0 ? step : (max - min) / 10;\n newVal = Math.min(value + s, max);\n }\n if (typeof newVal !== 'number' || newVal === value) {\n return; // no change to make\n }\n value = newVal;\n setStyles(value);\n if (onchange && onchange(value) !== false) {\n m.redraw();\n }\n }\n // App handlers\n function onPress(x, y) {\n startValue = value;\n pressed = true;\n rcBar = elBar.getBoundingClientRect();\n var val = moveHandle(x, y);\n if (val !== value) {\n value = val;\n if (ondrag && ondrag(value) !== false) {\n m.redraw();\n }\n }\n }\n function onMove(x, y) {\n if (!pressed)\n return;\n var val = moveHandle(x, y);\n if (val !== value) {\n value = val;\n if (ondrag && ondrag(value) !== false) {\n m.redraw();\n }\n }\n }\n function onRelease(x, y) {\n if (!pressed)\n return;\n pressed = false;\n value = moveHandle(x, y);\n if (value !== startValue) {\n if (onchange && onchange(value) !== false) {\n m.redraw();\n }\n }\n setTimeout(function () {\n if (!pressed)\n device = NONE;\n }, DEVICE_DELAY);\n }\n function moveHandle(x, y) {\n var barLength, delta;\n if (orientation === 'vertical') {\n barLength = rcBar.bottom - rcBar.top;\n delta = rcBar.bottom - y;\n }\n else {\n barLength = rcBar.right - rcBar.left;\n delta = x - rcBar.left;\n }\n delta = clamp(delta, 0, barLength);\n var val = quantize((delta / barLength) * (max - min) + min, min, max, step);\n setStyles(val);\n return val;\n }\n /** Compute handle position style */\n function positionStyle(val) {\n var s = (val - min) / (max - min);\n if (orientation === 'vertical')\n s = 1.0 - s;\n return String(100 * s) + '%';\n }\n /** Set styles for movable parts */\n function setStyles(value) {\n var ps = positionStyle(value);\n var rps = positionStyle(max - value + min);\n if (orientation === 'vertical') {\n elHandle.style.top = ps;\n elBar0.style.height = ps;\n elBar1.style.height = rps;\n }\n else {\n elHandle.style.left = ps;\n elBar0.style.width = rps;\n elBar1.style.width = ps;\n }\n }\n /** Some attrs need to be cached (and updated) so that they are current in event handlers */\n function updateAttrs(attrs) {\n min = attrs.min;\n max = attrs.max;\n step = (typeof attrs.step === 'number' && !Number.isNaN(attrs.step))\n ? clamp(attrs.step, 0, max - min) : 1;\n orientation = attrs.orientation === 'vertical' ? 'vertical' : 'horizontal';\n onchange = attrs.onchange;\n ondrag = attrs.ondrag;\n if (typeof attrs.value === 'number') {\n value = clamp(attrs.value, min, max);\n }\n }\n /** Return mithril component hooks object */\n return {\n oncreate: function (_a) {\n var attrs = _a.attrs, dom = _a.dom;\n applyIOSHack();\n updateAttrs(attrs);\n elHit = dom;\n elBar = elHit.querySelector('.mithril-range-bar');\n elBar0 = elBar.querySelector('.mithril-range-bar-0');\n elBar1 = elBar.querySelector('.mithril-range-bar-1');\n elHandle = elBar.querySelector('.mithril-range-handle');\n elHit.addEventListener('mousedown', onMouseDown);\n elHit.addEventListener('touchstart', onTouchStart);\n elHit.addEventListener('keydown', onKeyDown);\n },\n onremove: function () {\n window.removeEventListener('mousemove', onMouseMove);\n window.removeEventListener('mouseup', onMouseUp);\n elHit.removeEventListener('mousedown', onMouseDown);\n elHit.removeEventListener('touchstart', onTouchStart);\n elHit.removeEventListener('touchmove', onTouchMove);\n elHit.removeEventListener('touchend', onTouchEnd);\n elHit.removeEventListener('keydown', onKeyDown);\n },\n view: function (_a) {\n var attrs = _a.attrs, children = _a.children;\n updateAttrs(attrs);\n value = quantize(value, min, max, step);\n var a = {\n class: 'mithril-range' + (attrs.class != null ? ' ' + attrs.class : ''),\n tabIndex: '0',\n role: 'slider',\n 'aria-valuemin': String(min),\n 'aria-valuemax': String(max),\n 'aria-valuenow': String(value),\n 'aria-orientation': orientation\n };\n if (attrs.id)\n a.id = attrs.id;\n if (attrs.ariaLabelledby)\n a['aria-labelledby'] = attrs.ariaLabelledby;\n if (attrs.disabled) {\n a.style = { pointerEvents: 'none' };\n a['aria-disabled'] = 'true';\n }\n var ps = positionStyle(value);\n var rps = positionStyle(max - value + min);\n var handleStyle, bar0Style, bar1Style;\n if (orientation === 'vertical') {\n handleStyle = { top: ps };\n bar0Style = { height: ps };\n bar1Style = { height: rps };\n }\n else {\n handleStyle = { left: ps };\n bar0Style = { width: rps };\n bar1Style = { width: ps };\n }\n return m('div', a, m('div', { class: 'mithril-range-bar' }, m('div', {\n class: 'mithril-range-bar-0',\n style: bar0Style\n }), m('div', {\n class: 'mithril-range-bar-1',\n style: bar1Style\n }), m('div', {\n class: 'mithril-range-handle',\n style: handleStyle\n }, children)), !!attrs.name && m('input', {\n type: 'hidden',\n name: attrs.name,\n value: String(value)\n }));\n }\n };\n}\nexports.default = MithrilRange;\n","// @ts-check\n/**\n * A class that handles the Yielding logic & helps generate replacement logic.\n */\nclass YieldStructure {\n constructor (data) {\n this._logic = null\n this.resumable = null\n this._input = null\n Object.assign(this, data)\n }\n\n logic () {\n // if (this._input && !this._logic) {\n // return { [this._name]: this._input }\n // }\n return this._logic\n }\n}\n\n// @ts-check\nconst mutateKey = (i) => i\nconst mutateValue = (i) => i\nconst skipCopy = (i) => false\nconst defaultOptions = { mutateKey, mutateValue, skipCopy }\n/**\n *\n * @param {Object} obj\n * @param {Object} target\n * @param {{ mutateKey?: Function, mutateValue?: Function, skipCopy?: Function }} options\n * @returns\n */\nfunction traverseCopy (obj, target = {}, options = defaultOptions) {\n const { mutateKey, mutateValue, skipCopy } = {\n ...defaultOptions,\n ...options\n }\n if (typeof obj === 'object' && !Array.isArray(obj) && obj) {\n if (skipCopy(obj)) return mutateValue(obj)\n Object.keys(obj).forEach((key) => {\n target[mutateKey(key)] = mutateValue(traverseCopy(obj[key], {}, options))\n })\n return target\n } else if (Array.isArray(obj)) {\n return [...obj].map((i, x) => mutateValue(traverseCopy(i, {}, options)))\n } else {\n return mutateValue(obj)\n }\n}\n\n// @ts-check\n\nfunction fetchYields (obj, arr = []) {\n if (obj instanceof YieldStructure) {\n arr.push(obj)\n return arr\n }\n if (Array.isArray(obj)) {\n obj.forEach((i) => fetchYields(i, arr))\n } else if (typeof obj === 'object') {\n Object.keys(obj || {}).forEach((key) => {\n fetchYields(obj[key], arr)\n })\n }\n return arr\n}\nclass EngineObject {\n constructor (data) {\n this.data = data\n }\n\n yields () {\n return fetchYields(this.data.result, [])\n }\n\n logic () {\n return traverseCopy(\n this.data.result,\n {},\n {\n mutateValue: (i) => {\n if (i instanceof YieldStructure) {\n return i.logic()\n }\n return i\n },\n skipCopy: (i) => i instanceof YieldStructure\n }\n )\n }\n}\n\n// @ts-check\n\n/**\n * Checks if the item that's passed in is or contains a YieldStructure / EngineObject (signifying a YieldStructure)\n * @param {*} item\n * @returns {Boolean}\n */\nfunction checkYield (item) {\n if (Array.isArray(item)) {\n return item.some((i) => i instanceof YieldStructure || i instanceof EngineObject)\n }\n return item instanceof YieldStructure || item instanceof EngineObject\n}\n\n// @ts-check\n// Note: Each of these iterators executes synchronously, and will not \"run in parallel\"\n// I am supporting filter, reduce, some, every, map\nasync function filter (arr, iter) {\n const result = []\n for (const item of arr) {\n if (await iter(item)) result.push(item)\n }\n return result\n}\n\nasync function some (arr, iter) {\n for (const item of arr) {\n if (await iter(item)) return true\n }\n return false\n}\n\nasync function every (arr, iter) {\n for (const item of arr) {\n if (!(await iter(item))) return false\n }\n return true\n}\n\nasync function map (arr, iter) {\n const result = []\n for (const item of arr) {\n result.push(await iter(item))\n }\n return result\n}\n\nasync function reduce (arr, iter, defaultValue) {\n if (arr.length === 0) {\n if (typeof defaultValue !== 'undefined') {\n return defaultValue\n }\n throw new Error('Array has no elements.')\n }\n\n const start = typeof defaultValue === 'undefined' ? 1 : 0\n let data = start ? arr[0] : defaultValue\n\n for (let i = start; i < arr.length; i++) {\n data = await iter(data, arr[i])\n }\n\n return data\n}\n\nconst asyncIterators = {\n filter,\n some,\n every,\n map,\n reduce\n}\n\n// @ts-check\n\nconst Sync = Symbol.for('json_logic_sync')\nconst Override = Symbol.for('json_logic_override')\nconst EfficientTop = Symbol.for('json_logic_efficientTop')\nconst isSync = (x) => Boolean(typeof x !== 'function' || x[Sync])\nconst Constants = {\n Sync,\n Override,\n EfficientTop,\n isSync\n}\n\n// @ts-check\nfunction declareSync (obj, sync = true) {\n obj[Sync] = sync\n return obj\n}\n\n// @ts-check\n\n/**\n * @typedef BuildState\n * Used to keep track of the compilation.\n * @property {*} [engine]\n * @property {Object} [notTraversed]\n * @property {Object} [functions]\n * @property {Object} [methods]\n * @property {Object} [state]\n * @property {Array} [processing]\n * @property {*} [async]\n * @property {Array} [above]\n * @property {Boolean} [asyncDetected]\n * @property {*} [values]\n * @property {*} [yieldUsed]\n * @property {Boolean} [useContext]\n * @property {Boolean} [avoidInlineAsync]\n *\n */\n\n/**\n * Checks if the value passed in is a primitive JS object / value.\n * @param {*} x\n * @returns\n */\nfunction isPrimitive (x, preserveObject) {\n if (typeof x === 'number' && (x === Infinity || x === -Infinity || Number.isNaN(x))) return false\n return (\n x === null ||\n x === undefined ||\n ['Number', 'String', 'Boolean'].includes(x.constructor.name) ||\n (!preserveObject && x.constructor.name === 'Object')\n )\n}\n\n/**\n * Checks if the method & its inputs are deterministic.\n * @param {*} method\n * @param {*} engine\n * @param {BuildState} buildState\n * @returns\n */\nfunction isDeterministic$2 (method, engine, buildState) {\n if (Array.isArray(method)) {\n return method.every((i) => isDeterministic$2(i, engine, buildState))\n }\n\n if (method && typeof method === 'object') {\n const func = Object.keys(method)[0]\n const lower = method[func]\n\n if (engine.methods[func].traverse === false) {\n return typeof engine.methods[func].deterministic === 'function'\n ? engine.methods[func].deterministic(lower, buildState)\n : engine.methods[func].deterministic\n }\n\n return typeof engine.methods[func].deterministic === 'function'\n ? engine.methods[func].deterministic(lower, buildState)\n : engine.methods[func].deterministic &&\n isDeterministic$2(lower, engine, buildState)\n }\n\n return true\n}\n\n/**\n * Checks if the method & its inputs are synchronous.\n * @param {*} method\n * @param {*} engine\n */\nfunction isDeepSync (method, engine) {\n if (!engine.async) return true\n\n if (Array.isArray(method)) {\n return method.every(i => isDeepSync(i, engine))\n }\n\n if (typeof method === 'object') {\n const func = Object.keys(method)[0]\n\n const lower = method[func]\n if (!isSync(engine.methods[func])) return false\n return isDeepSync(lower, engine)\n }\n\n return true\n}\n\n/**\n * A function that handles yields by caching the values to resumable object.\n * @param {Function} func\n * @param {*} input\n * @param {String} name\n * @param {Object} resumable\n * @returns\n */\nfunction r (func, input, name, resumable) {\n if (resumable[name]) {\n return resumable[name]\n }\n const result = resumable[name + '_input']\n ? func(resumable[name + '_input'])\n : func(typeof input === 'function' ? input() : input)\n\n if (result instanceof YieldStructure) {\n if (result._input) {\n resumable[name + '_input'] = result._input\n }\n result.resumable = resumable\n throw result\n } else {\n resumable[name] = result\n }\n\n return result\n}\n\n/**\n * A function that handles async yields by caching the values to resumable object.\n * @param {Function} func\n * @param {*} input\n * @param {String} name\n * @param {Object} resumable\n * @returns\n */\nasync function rAsync (func, input, name, resumable) {\n if (resumable[name]) {\n return resumable[name]\n }\n\n const result = resumable[name + '_input']\n ? await func(resumable[name + '_input'])\n : await func(typeof input === 'function' ? await input() : input)\n\n if (result instanceof YieldStructure) {\n if (result._input) {\n resumable[name + '_input'] = result._input\n }\n\n result.resumable = resumable\n throw result\n } else {\n resumable[name] = result\n }\n\n return result\n}\n/**\n * Builds a string for a function that may need to yield & resume.\n * @param {String} method\n * @param {BuildState} buildState\n * @returns\n */\nfunction buildYield (method, buildState = {}) {\n // todo: add gc so we don't save resumable state for longer than it needs to exist\n const { notTraversed = [], functions = {}, async, engine } = buildState\n const func = Object.keys(method)[0]\n buildState.yieldUsed = (buildState.yieldUsed || 0) + 1\n let asyncDetected = false\n buildState.useContext =\n buildState.useContext || (engine.methods[func] || {}).useContext\n\n if (typeof engine.methods[func] === 'function') {\n functions[func] = 1\n asyncDetected = !isSync(engine.methods[func])\n const stringBuildState = { ...buildState, avoidInlineAsync: true }\n const inputStr = buildString(method[func], stringBuildState)\n buildState.useContext =\n buildState.useContext || stringBuildState.useContext\n\n if (asyncDetected || inputStr.includes('await')) {\n buildState.asyncDetected = buildState.asyncDetected || asyncDetected\n return `await rAsync(gen[\"${func}\"], async () => { return ${inputStr} }, 'yield${buildState.yieldUsed}', resumable)`\n }\n\n return `r(gen[\"${func}\"], () => { return ${inputStr} }, 'yield${buildState.yieldUsed}', resumable)`\n } else {\n if (engine.methods[func] && engine.methods[func].traverse) {\n functions[func] = 1\n // console.log(async)\n asyncDetected = Boolean(\n async && engine.methods[func] && engine.methods[func].asyncMethod\n )\n\n const stringBuildState = { ...buildState, avoidInlineAsync: true }\n const inputStr = buildString(method[func], stringBuildState)\n\n buildState.useContext =\n buildState.useContext || stringBuildState.useContext\n\n if (asyncDetected || inputStr.startsWith('await')) {\n buildState.asyncDetected = buildState.asyncDetected || asyncDetected\n return `await rAsync(gen[\"${func}\"], async () => ${inputStr}, 'yield${buildState.yieldUsed}', resumable)`\n }\n return `r(gen[\"${func}\"], () => ${inputStr}, 'yield${buildState.yieldUsed}', resumable)`\n } else {\n // todo: make build work for yields somehow. The issue is that it pre-binds data, thus making it impossible\n asyncDetected = Boolean(\n async && engine.methods[func] && engine.methods[func].asyncMethod\n )\n functions[func] = 1\n notTraversed.push(method[func])\n buildState.useContext = true\n\n if (asyncDetected) {\n buildState.asyncDetected = buildState.asyncDetected || asyncDetected\n return `await rAsync(gen[\"${func}\"], notTraversed[${\n notTraversed.length - 1\n }], 'yield${buildState.yieldUsed}', resumable)`\n }\n return `r(gen[\"${func}\"], notTraversed[${\n notTraversed.length - 1\n }], 'yield${buildState.yieldUsed}', resumable)`\n }\n }\n}\n/**\n * Builds the string for the function that will be evaluated.\n * @param {*} method\n * @param {BuildState} buildState\n * @returns\n */\nfunction buildString (method, buildState = {}) {\n const {\n notTraversed = [],\n functions = {},\n methods = [],\n state,\n async,\n above = [],\n processing = [],\n values = [],\n engine\n } = buildState\n function pushValue (value, preserveObject = false) {\n if (isPrimitive(value, preserveObject)) return JSON.stringify(value)\n values.push(value)\n return `values[${values.length - 1}]`\n }\n\n if (Array.isArray(method)) {\n return '[' + method.map((i) => buildString(i, buildState)).join(', ') + ']'\n }\n\n let asyncDetected = false\n\n function makeAsync (result) {\n buildState.asyncDetected = buildState.asyncDetected || asyncDetected\n\n if (async && asyncDetected) {\n return `await ${result}`\n }\n return result\n }\n\n const func = method && Object.keys(method)[0]\n buildState.useContext =\n buildState.useContext || (engine.methods[func] || {}).useContext\n\n if (method && typeof method === 'object') {\n if (!func) return pushValue(method)\n if (!engine.methods[func]) {\n // If we are in permissive mode, we will just return the object.\n if (engine.options.permissive) return pushValue(method, true)\n throw new Error(`Method '${func}' was not found in the Logic Engine.`)\n }\n functions[func] = functions[func] || 2\n\n if (\n !buildState.engine.disableInline &&\n engine.methods[func] &&\n isDeterministic$2(method, engine, buildState)\n ) {\n if (isDeepSync(method, engine)) {\n return pushValue((engine.fallback || engine).run(method), true)\n } else if (!buildState.avoidInlineAsync) {\n processing.push(engine.run(method).then((i) => pushValue(i)))\n return `__%%%${processing.length - 1}%%%__`\n }\n }\n\n if (\n engine.options.yieldSupported &&\n engine.methods[func] &&\n engine.methods[func].yields\n ) {\n return buildYield(method, buildState)\n }\n\n if (engine.methods[func] && engine.methods[func].compile) {\n const str = engine.methods[func].compile(method[func], buildState)\n\n if ((str || '').startsWith('await')) buildState.asyncDetected = true\n\n if (str !== false) return str\n }\n\n if (typeof engine.methods[func] === 'function') {\n functions[func] = 1\n asyncDetected = !isSync(engine.methods[func])\n\n return makeAsync(\n `gen[\"${func}\"](` + buildString(method[func], buildState) + ')'\n )\n } else {\n if (engine.methods[func] && (typeof engine.methods[func].traverse === 'undefined' ? true : engine.methods[func].traverse)) {\n functions[func] = 1\n asyncDetected = Boolean(\n async && engine.methods[func] && engine.methods[func].asyncMethod\n )\n\n return makeAsync(\n `gen[\"${func}\"](` + buildString(method[func], buildState) + ')'\n )\n } else {\n if (engine.methods[func]) {\n if (async) {\n if (engine.methods[func].asyncBuild || engine.methods[func].build) {\n const builder =\n engine.methods[func].asyncBuild || engine.methods[func].build\n const result = builder(\n method[func],\n state,\n above,\n engine,\n buildState\n )\n methods.push(result)\n asyncDetected = !isSync(result)\n return makeAsync(`methods[${methods.length - 1}]()`)\n }\n } else {\n if (engine.methods[func].build) {\n methods.push(\n engine.methods[func].build(\n method[func],\n state,\n above,\n engine,\n buildState\n )\n )\n return makeAsync(`methods[${methods.length - 1}]()`)\n }\n }\n }\n\n asyncDetected = Boolean(\n async && engine.methods[func] && engine.methods[func].asyncMethod\n )\n\n functions[func] = 1\n notTraversed.push(method[func])\n\n return makeAsync(\n `gen[\"${func}\"](` + `notTraversed[${notTraversed.length - 1}]` + ')'\n )\n }\n }\n }\n return pushValue(method)\n}\n\n/**\n * Synchronously compiles the logic to a function that can run the logic more optimally.\n * @param {*} method\n * @param {BuildState} [buildState]\n * @returns\n */\nfunction build (method, buildState = {}) {\n Object.assign(\n buildState,\n Object.assign(\n {\n notTraversed: [],\n functions: {},\n methods: [],\n state: {},\n processing: [],\n async: buildState.engine.async,\n above: [],\n asyncDetected: false,\n values: []\n },\n buildState\n )\n )\n const str = buildString(method, buildState)\n return processBuiltString(method, str, buildState)\n}\n\n/**\n * Asynchronously compiles the logic to a function that can run the logic more optimally. Also supports async logic methods.\n * @param {*} method\n * @param {BuildState} [buildState]\n * @returns\n */\nasync function buildAsync (method, buildState = {}) {\n Object.assign(\n buildState,\n Object.assign(\n {\n notTraversed: [],\n functions: {},\n methods: [],\n state: {},\n processing: [],\n async: buildState.engine.async,\n above: [],\n asyncDetected: false,\n values: []\n },\n buildState\n )\n )\n const str = buildString(method, buildState)\n buildState.processing = await Promise.all(buildState.processing)\n return processBuiltString(method, str, buildState)\n}\n\n/**\n * Takes the string that's been generated and does some post-processing on it to be evaluated.\n * @param {*} method\n * @param {*} str\n * @param {BuildState} buildState\n * @returns\n */\nfunction processBuiltString (method, str, buildState) {\n const gen = {}\n const {\n functions,\n state,\n async,\n engine,\n above,\n methods,\n notTraversed,\n processing,\n values\n } = buildState\n processing.forEach((item, x) => {\n str = str.replace(`__%%%${x}%%%__`, item)\n })\n Object.keys(functions).forEach((key) => {\n if (functions[key] === 2) return\n\n if (!engine.methods[key]) throw new Error(`Method '${key}' was not found in the Logic Engine.`)\n\n if (typeof engine.methods[key] === 'function') {\n const method = engine.methods[key]\n gen[key] = (input) => method(input, state, above, engine)\n } else {\n if (async && engine.methods[key].asyncMethod) {\n buildState.asyncDetected = true\n const method = engine.methods[key].asyncMethod\n gen[key] = (input) => method(input, state, above, engine)\n } else {\n const method = engine.methods[key].method\n gen[key] = (input) => method(input, state, above, engine)\n }\n }\n })\n\n if (!Object.keys(functions).length) {\n return method\n }\n\n let copyStateCall = 'state[Override] = context;'\n // console.log(buildState.useContext)\n\n if (!buildState.useContext) {\n copyStateCall = ''\n while (str.includes('state[Override]')) {\n str = str.replace('state[Override]', 'context')\n }\n }\n\n const final = `(state, values, methods, gen, notTraversed, Override, asyncIterators, r, rAsync) => ${buildState.asyncDetected ? 'async' : ''} (context ${\n buildState.yieldUsed ? ', resumable = {}' : ''\n }) => { ${copyStateCall} const result = ${str}; return result }`\n\n // console.log(str)\n // console.log(final)\n // eslint-disable-next-line no-eval\n return declareSync(globalThis.eval(final)(state, values, methods, gen, notTraversed, Override, asyncIterators, r, rAsync), !buildState.asyncDetected)\n}\nconst Compiler = {\n build,\n buildAsync,\n buildString,\n r,\n rAsync\n}\n\n// @ts-check\n/**\n * Checks if optional chaining is supported for the compiler\n * @returns {Boolean}\n */\nconst getIsOptionalChainingSupported = () => {\n try {\n // eslint-disable-next-line no-unused-vars\n const test = {}\n // eslint-disable-next-line no-eval\n const isUndefined = globalThis.eval('(test) => test?.foo?.bar')(test)\n return isUndefined === undefined\n } catch {\n return false\n }\n}\nconst chainingSupported = getIsOptionalChainingSupported()\n\n// @ts-check\nclass InvalidControlInput extends Error {\n constructor (input) {\n super()\n this.message =\n 'Built-in control structures are not allowed to receive dynamic inputs, this could allow a lesser version of remote-code execution.'\n this.input = input\n }\n}\n\n// @ts-check\n\n// works fine for arrays, may need to create a more general version though\nclass ReduceIterator {\n constructor (arr, cur, next) {\n this.arr = arr\n this.cur = cur\n this.nextCall = next\n this.position = 0\n this._position = 0\n this.map = null\n }\n\n next () {\n const item = this.arr[this.position]\n this._position = this.position\n const cur = this.nextCall(this.cur, item, this.arr, this)\n if (cur instanceof YieldStructure || cur instanceof EngineObject) {\n return cur\n }\n // commit\n this.position = this._position\n this.cur = cur\n this.position++\n return this.cur\n }\n\n skip () {\n this._position++\n }\n\n dump () {\n this._position = this.arr.length\n }\n\n result () {\n return this.cur\n }\n\n state () {\n return { arr: this.arr.splice(this.position), cur: this.cur }\n }\n\n done () {\n return this.position >= this.arr.length\n }\n}\nclass AsyncReduceIterator extends ReduceIterator {\n async next () {\n const item = this.arr[this.position]\n this._position = this.position\n const cur = await this.nextCall(this.cur, item, this.arr, this)\n if (cur instanceof YieldStructure || cur instanceof EngineObject) {\n return cur\n }\n // commit\n this.position = this._position\n this.cur = cur\n this.position++\n return this.cur\n }\n}\n\n// @ts-check\n\n// Todo: Pursue support for yielding within the built functions.\n// It will be extremely difficult to leverage the yields here.\nfunction isDeterministic$1 (method, engine, buildState) {\n if (Array.isArray(method)) {\n return method.every((i) => isDeterministic$1(i, engine, buildState))\n }\n if (method && typeof method === 'object') {\n const func = Object.keys(method)[0]\n const lower = method[func]\n if (engine.methods[func].traverse === false) {\n return typeof engine.methods[func].deterministic === 'function'\n ? engine.methods[func].deterministic(lower, buildState)\n : engine.methods[func].deterministic\n }\n return typeof engine.methods[func].deterministic === 'function'\n ? engine.methods[func].deterministic(lower, buildState)\n : engine.methods[func].deterministic &&\n isDeterministic$1(lower, engine, buildState)\n }\n return true\n}\nfunction createYieldingControl (name, method, asyncMethod) {\n return {\n yields: true,\n method: (input, context, above, engine) => {\n let arr = input\n let cur = null\n if (!Array.isArray(input)) {\n arr = input.arr\n cur = input.cur\n }\n const executed = method(input, context, above, engine)\n const iter = new ReduceIterator(arr, cur, executed)\n while (!iter.done()) {\n const cur = iter.next()\n if (checkYield(cur)) {\n return new YieldStructure({\n yield: cur,\n _name: name,\n _input: iter.state()\n })\n }\n }\n return iter.result()\n },\n asyncMethod: async (input, context, above, engine) => {\n let arr = input\n let cur = null\n if (!Array.isArray(input)) {\n arr = input.arr\n cur = input.cur\n }\n const executed = asyncMethod(input, context, above, engine)\n const iter = new AsyncReduceIterator(arr, cur, executed)\n while (!iter.done()) {\n const cur = await iter.next()\n if (checkYield(cur)) {\n return new YieldStructure({\n yield: cur,\n _name: name,\n _input: iter.state()\n })\n }\n }\n return iter.result()\n },\n traverse: false\n }\n}\nconst ifYield = createYieldingControl(\n 'ifYield',\n (input, context, above, engine) => (cur, item, arr, iter) => {\n if (arr.length % 2 === 0) {\n arr.push(null)\n }\n // if it's an even spot, and not the last item, run the condition.\n if ((iter._position & 1) === 0 && iter._position !== arr.length - 1) {\n const test = engine.run(item, context, {\n above\n })\n if (!test) {\n iter.skip()\n }\n return test\n } else if (iter._position & 1) {\n // if it's odd, then we are done.\n iter.dump()\n }\n\n return engine.run(item, context, {\n above\n })\n },\n (input, context, above, engine) => async (cur, item, arr, iter) => {\n if (arr.length % 2 === 0) {\n arr.push(null)\n }\n // if it's an even spot, and not the last item, run the condition.\n if ((iter._position & 1) === 0 && iter._position !== arr.length - 1) {\n const test = await engine.run(item, context, {\n above\n })\n if (!test) {\n iter.skip()\n }\n return test\n } else if (iter._position & 1) {\n // if it's odd, then we are done.\n iter.dump()\n }\n\n return engine.run(item, context, {\n above\n })\n }\n)\nconst someYield = createArrayIterativeMethod$1(\n 'someYield',\n (input, context, above, engine) => (cur, item, arr, iter) => {\n const currentItem = engine.run(iter.map, item, {\n above: [input, context, ...above]\n })\n if (currentItem) {\n iter.dump()\n return currentItem\n }\n return false\n },\n (input, context, above, engine) => async (cur, item, arr, iter) => {\n const currentItem = await engine.run(iter.map, item, {\n above: [input, context, ...above]\n })\n if (currentItem) {\n iter.dump()\n return currentItem\n }\n return false\n },\n false\n)\nconst everyYield = createArrayIterativeMethod$1(\n 'everyYield',\n (input, context, above, engine) => (cur, item, arr, iter) => {\n const currentItem = engine.run(iter.map, item, {\n above: [input, context, ...above]\n })\n if (!currentItem) {\n iter.dump()\n return false\n }\n return currentItem\n },\n (input, context, above, engine) => async (cur, item, arr, iter) => {\n const currentItem = await engine.run(iter.map, item, {\n above: [input, context, ...above]\n })\n if (!currentItem) {\n iter.dump()\n return false\n }\n return currentItem\n },\n true\n)\nconst filterYield = createArrayIterativeMethod$1(\n 'filterYield',\n (input, context, above, engine) => (cur, item, arr, iter) => {\n const currentItem = engine.run(iter.map, item, {\n above: [input, context, ...above]\n })\n if (checkYield(currentItem)) return currentItem\n if (currentItem) cur.push(item)\n return cur\n },\n (input, context, above, engine) => async (cur, item, arr, iter) => {\n const currentItem = await engine.run(iter.map, item, {\n above: [input, context, ...above]\n })\n if (checkYield(currentItem)) return currentItem\n if (currentItem) cur.push(item)\n return cur\n },\n () => []\n)\nconst mapYield = createArrayIterativeMethod$1(\n 'mapYield',\n (input, context, above, engine) => (cur, item, arr, iter) => {\n const currentItem = engine.run(iter.map, item, {\n above: [input, context, ...above]\n })\n if (checkYield(currentItem)) return currentItem\n cur.push(currentItem)\n return cur\n },\n (input, context, above, engine) => async (cur, item, arr, iter) => {\n const currentItem = await engine.run(iter.map, item, {\n above: [input, context, ...above]\n })\n if (checkYield(currentItem)) return currentItem\n cur.push(currentItem)\n return cur\n },\n () => []\n)\nconst reduceYield = createArrayIterativeMethod$1(\n 'reduceYield',\n (input, context, above, engine) => (cur, item, arr, iter) => {\n return engine.run(\n iter.map,\n {\n accumulator: cur,\n current: item\n },\n {\n above: [input, context, ...above]\n }\n )\n },\n (input, context, above, engine) => async (cur, item, arr, iter) => {\n return engine.run(\n iter.map,\n {\n accumulator: cur,\n current: item\n },\n {\n above: [input, context, ...above]\n }\n )\n }\n)\nfunction createArrayIterativeMethod$1 (\n name,\n method,\n asyncMethod,\n defaultInitializer\n) {\n const result = {\n yields: true,\n deterministic: (data, buildState) => {\n return (\n isDeterministic$1(data[0], buildState.engine, buildState) &&\n isDeterministic$1(data[1], buildState.engine, {\n ...buildState,\n insideIterator: true\n })\n )\n },\n build: (input, context, above, engine, buildState) => {\n buildState.useContext = true\n return declareSync(() => result.method(input, context, above, engine))\n },\n asyncBuild: (input, context, above, engine, buildState) => {\n buildState.useContext = true\n const [selector, mapper] = input\n // const selectFunction = engine.build(selector, {}, { top: EfficientTop })\n // const mapFunction = engine.build(mapper, {}, { top: EfficientTop })\n const selectFunction = build(selector, {\n engine,\n async: true,\n avoidInlineAsync: true\n })\n const mapFunction = build(mapper, {\n engine,\n state: {},\n async: true,\n avoidInlineAsync: true\n })\n if (isSync(selectFunction) && isSync(mapFunction)) {\n return declareSync(() =>\n result.method(input, context, above, engine.fallback)\n )\n }\n return () => result.asyncMethod(input, context, above, engine)\n },\n method: (input, context, above, engine) => {\n let defaultCur = defaultInitializer\n if (typeof defaultInitializer === 'function') {\n defaultCur = defaultInitializer()\n }\n let arr\n let cur\n let map = null\n if (Array.isArray(input)) {\n const [selector, mapper, defaultValue] = input\n const selected =\n engine.run(selector, context, {\n above\n }) || []\n if (checkYield(selected)) {\n // todo: add extraction of the existing yields.\n return new YieldStructure({\n _input: [selector, mapper, defaultValue],\n _name: name,\n yields: selected.yields()\n })\n }\n arr = selected\n map = mapper\n cur = defaultValue === 0 ? 0 : defaultValue || defaultCur\n } else {\n arr = input.arr\n cur = input.cur\n map = input.map\n }\n const executed = method(input, context, above, engine)\n const iter = new ReduceIterator(arr, cur, executed)\n iter.map = map\n while (!iter.done()) {\n const cur = iter.next()\n if (checkYield(cur)) {\n return new YieldStructure({\n yields: cur.yields(),\n _name: name,\n _input: {\n ...iter.state(),\n map\n }\n })\n }\n }\n return iter.result()\n },\n asyncMethod: async (input, context, above, engine) => {\n let defaultCur = defaultInitializer\n if (typeof defaultInitializer === 'function') {\n defaultCur = defaultInitializer()\n }\n let arr\n let cur\n let map = null\n if (Array.isArray(input)) {\n const [selector, mapper, defaultValue] = input\n const selected =\n (await engine.run(selector, context, {\n above\n })) || []\n if (checkYield(selected)) {\n // todo: add extraction of the existing yields.\n return new YieldStructure({\n _name: name,\n _input: [selector, mapper, defaultValue],\n yields: selected.yields()\n })\n }\n arr = selected\n map = mapper\n cur = defaultValue === 0 ? 0 : defaultValue || defaultCur\n } else {\n arr = input.arr\n cur = input.cur\n map = input.map\n }\n const executed = asyncMethod(input, context, above, engine)\n const iter = new AsyncReduceIterator(arr, cur, executed)\n iter.map = map\n while (!iter.done()) {\n const cur = await iter.next()\n if (checkYield(cur)) {\n return new YieldStructure({\n yields: cur.yields(),\n _name: name,\n _input: {\n ...iter.state(),\n map\n }\n })\n }\n }\n return iter.result()\n },\n traverse: false\n }\n return result\n}\nconst YieldingIterators = {\n someYield,\n everyYield,\n filterYield,\n mapYield,\n reduceYield,\n ifYield\n}\n\n/**\n * Splits a path string into an array of parts.\n *\n * @example splitPath('a.b.c') // ['a', 'b', 'c']\n * @example splitPath('a\\\\.b.c') // ['a.b', 'c']\n * @example splitPath('a\\\\\\\\.b.c') // ['a\\\\', 'b', 'c']\n * @example splitPath('a\\\\\\\\\\\\.b.c') // ['a\\\\.b', 'c']\n * @example splitPath('hello') // ['hello']\n * @example splitPath('hello\\\\') // ['hello\\\\']\n * @example splitPath('hello\\\\\\\\') // ['hello\\\\']\n *\n * @param {string} str\n * @param {string} separator\n * @returns {string[]}\n */\nfunction splitPath (str, separator = '.', escape = '\\\\') {\n const parts = []\n let current = ''\n\n for (let i = 0; i < str.length; i++) {\n const char = str[i]\n if (char === escape) {\n if (str[i + 1] === separator) {\n current += separator\n i++\n } else if (str[i + 1] === escape) {\n current += escape\n i++\n } else current += escape\n } else if (char === separator) {\n parts.push(current)\n current = ''\n } else current += char\n }\n parts.push(current)\n\n return parts\n}\n\n// @ts-check\n\nfunction isDeterministic (method, engine, buildState) {\n if (Array.isArray(method)) {\n return method.every((i) => isDeterministic(i, engine, buildState))\n }\n if (method && typeof method === 'object') {\n const func = Object.keys(method)[0]\n const lower = method[func]\n\n if (!engine.methods[func] && engine.options.permissive) return true\n\n if (engine.methods[func].traverse === false) {\n return typeof engine.methods[func].deterministic === 'function'\n ? engine.methods[func].deterministic(lower, buildState)\n : engine.methods[func].deterministic\n }\n return typeof engine.methods[func].deterministic === 'function'\n ? engine.methods[func].deterministic(lower, buildState)\n : engine.methods[func].deterministic &&\n isDeterministic(lower, engine, buildState)\n }\n return true\n}\n\nconst defaultMethods = {\n '+': (data) => [].concat(data).reduce((a, b) => +a + +b, 0),\n '*': (data) => data.reduce((a, b) => +a * +b),\n '/': (data) => data.reduce((a, b) => +a / +b),\n\n '-': (data) =>\n // @ts-ignore Type checking is incorrect on the following line.\n ((a) => (a.length === 1 ? (a[0] = -a[0]) : a) & 0 || a)(\n [].concat(data)\n // @ts-ignore Type checking is incorrect on the following line.\n ).reduce((a, b) => +a - +b),\n '%': (data) => data.reduce((a, b) => +a % +b),\n max: (data) => Math.max(...data),\n min: (data) => Math.min(...data),\n in: ([item, array]) => (array || []).includes(item),\n '>': ([a, b]) => a > b,\n '<': ([a, b, c]) => (c === undefined ? a < b : a < b && b < c),\n preserve: {\n traverse: false,\n method: declareSync((i) => i)\n },\n if: {\n method: (input, context, above, engine) => {\n if (!Array.isArray(input)) throw new InvalidControlInput(input)\n\n // check the bounds\n if (input.length < 2) {\n throw new InvalidControlInput(input)\n }\n\n input = [...input]\n\n if (input.length % 2 !== 1) {\n input.push(null)\n }\n\n // fallback to the default if the condition is false\n const onFalse = input.pop()\n\n // while there are still conditions\n while (input.length) {\n const check = input.shift()\n const onTrue = input.shift()\n\n const test = engine.run(check, context, {\n above\n })\n\n // if the condition is true, run the true branch\n if (test) {\n return engine.run(onTrue, context, {\n above\n })\n }\n }\n\n return engine.run(onFalse, context, {\n above\n })\n },\n deterministic: (data, buildState) => {\n return isDeterministic(data, buildState.engine, buildState)\n },\n asyncMethod: async (input, context, above, engine) => {\n if (!Array.isArray(input)) throw new InvalidControlInput(input)\n\n // check the bounds\n if (input.length < 2) {\n throw new InvalidControlInput(input)\n }\n\n input = [...input]\n\n if (input.length % 2 !== 1) {\n input.push(null)\n }\n\n // fallback to the default if the condition is false\n const onFalse = input.pop()\n\n // while there are still conditions\n while (input.length) {\n const check = input.shift()\n const onTrue = input.shift()\n\n const test = await engine.run(check, context, {\n above\n })\n\n // if the condition is true, run the true branch\n if (test) {\n return engine.run(onTrue, context, {\n above\n })\n }\n }\n\n return engine.run(onFalse, context, {\n above\n })\n },\n traverse: false\n },\n '<=': ([a, b, c]) => (c === undefined ? a <= b : a <= b && b <= c),\n '>=': ([a, b]) => a >= b,\n // eslint-disable-next-line eqeqeq\n '==': ([a, b]) => a == b,\n '===': ([a, b]) => a === b,\n // eslint-disable-next-line eqeqeq\n '!=': ([a, b]) => a != b,\n '!==': ([a, b]) => a !== b,\n xor: ([a, b]) => a ^ b,\n or: (arr) => arr.reduce((a, b) => a || b, false),\n and: (arr) => arr.reduce((a, b) => a && b),\n substr: ([string, from, end]) => {\n if (end < 0) {\n const result = string.substr(from)\n return result.substr(0, result.length + end)\n }\n return string.substr(from, end)\n },\n length: (i) => {\n if (typeof i === 'string' || Array.isArray(i)) return i.length\n if (i && typeof i === 'object') return Object.keys(i).length\n return 0\n },\n get: {\n method: ([data, key, defaultValue], context, above, engine) => {\n const notFound = defaultValue === undefined ? null : defaultValue\n\n const subProps = splitPath(String(key))\n for (let i = 0; i < subProps.length; i++) {\n if (data === null || data === undefined) {\n return notFound\n }\n // Descending into context\n data = data[subProps[i]]\n if (data === undefined) {\n return notFound\n }\n }\n if (engine.allowFunctions || typeof data[key] !== 'function') {\n return data\n }\n }\n },\n var: (key, context, above, engine) => {\n let b\n if (Array.isArray(key)) {\n b = key[1]\n key = key[0]\n }\n // if (!key && context && context[Override]) return context[Override]\n let iter = 0\n while (\n typeof key === 'string' &&\n key.startsWith('../') &&\n iter < above.length\n ) {\n context = above[iter++]\n key = key.substring(3)\n }\n if (context && typeof context[Override] !== 'undefined') {\n context = context[Override]\n }\n const notFound = b === undefined ? null : b\n if (typeof key === 'undefined' || key === '' || key === null) {\n if (engine.allowFunctions || typeof (context && context[key]) !== 'function') {\n return context\n }\n return null\n }\n const subProps = splitPath(String(key))\n for (let i = 0; i < subProps.length; i++) {\n if (context === null || context === undefined) {\n return notFound\n }\n // Descending into context\n context = context[subProps[i]]\n if (context === undefined) {\n return notFound\n }\n }\n if (engine.allowFunctions || typeof (context && context[key]) !== 'function') {\n return context\n }\n return null\n },\n missing: (checked, context, above, engine) => {\n return (Array.isArray(checked) ? checked : [checked]).filter((key) => {\n return defaultMethods.var(key, context, above, engine) === null\n })\n },\n missing_some: ([needCount, options], context, above, engine) => {\n const missing = defaultMethods.missing(options, context, above, engine)\n if (options.length - missing.length >= needCount) {\n return []\n } else {\n return missing\n }\n },\n map: createArrayIterativeMethod('map'),\n some: createArrayIterativeMethod('some'),\n all: createArrayIterativeMethod('every'),\n none: {\n traverse: false,\n // todo: add async build & build\n method: (val, context, above, engine) => {\n return !defaultMethods.some.method(val, context, above, engine)\n },\n asyncMethod: async (val, context, above, engine) => {\n return !(await defaultMethods.some.asyncMethod(\n val,\n context,\n above,\n engine\n ))\n },\n compile: (data, buildState) => {\n const result = `${defaultMethods.some.compile(data, buildState)}`\n return result ? `!(${result})` : false\n }\n },\n merge: (arrays) => (Array.isArray(arrays) ? [].concat(...arrays) : [arrays]),\n every: createArrayIterativeMethod('every'),\n filter: createArrayIterativeMethod('filter'),\n reduce: {\n deterministic: (data, buildState) => {\n return (\n isDeterministic(data[0], buildState.engine, buildState) &&\n isDeterministic(data[1], buildState.engine, {\n ...buildState,\n insideIterator: true\n })\n )\n },\n compile: (data, buildState) => {\n if (!Array.isArray(data)) throw new InvalidControlInput(data)\n const { above = [], state, async } = buildState\n let [selector, mapper, defaultValue] = data\n selector = buildString(selector, buildState)\n if (typeof defaultValue !== 'undefined') {\n defaultValue = buildString(defaultValue, buildState)\n }\n const mapState = {\n ...buildState,\n state: {},\n above: [selector, state, ...above],\n avoidInlineAsync: true\n }\n mapper = build(mapper, mapState)\n buildState.useContext = buildState.useContext || mapState.useContext\n buildState.methods.push(mapper)\n if (async) {\n if (!isSync(mapper) || selector.includes('await')) {\n buildState.detectAsync = true\n if (typeof defaultValue !== 'undefined') {\n return `await asyncIterators.reduce(${selector} || [], (a,b) => methods[${\n buildState.methods.length - 1\n }]({ accumulator: a, current: b }), ${defaultValue})`\n }\n return `await asyncIterators.reduce(${selector} || [], (a,b) => methods[${\n buildState.methods.length - 1\n }]({ accumulator: a, current: b }))`\n }\n }\n if (typeof defaultValue !== 'undefined') {\n return `(${selector} || []).reduce((a,b) => methods[${\n buildState.methods.length - 1\n }]({ accumulator: a, current: b }), ${defaultValue})`\n }\n return `(${selector} || []).reduce((a,b) => methods[${\n buildState.methods.length - 1\n }]({ accumulator: a, current: b }))`\n },\n method: (input, context, above, engine) => {\n if (!Array.isArray(input)) throw new InvalidControlInput(input)\n let [selector, mapper, defaultValue] = input\n defaultValue = engine.run(defaultValue, context, {\n above\n })\n selector =\n engine.run(selector, context, {\n above\n }) || []\n const func = (accumulator, current) => {\n return engine.run(\n mapper,\n {\n accumulator,\n current\n },\n {\n above: [selector, context, ...above]\n }\n )\n }\n if (typeof defaultValue === 'undefined') {\n return selector.reduce(func)\n }\n return selector.reduce(func, defaultValue)\n },\n asyncMethod: async (input, context, above, engine) => {\n if (!Array.isArray(input)) throw new InvalidControlInput(input)\n let [selector, mapper, defaultValue] = input\n defaultValue = await engine.run(defaultValue, context, {\n above\n })\n selector =\n (await engine.run(selector, context, {\n above\n })) || []\n return asyncIterators.reduce(\n selector,\n (accumulator, current) => {\n return engine.run(\n mapper,\n {\n accumulator,\n current\n },\n {\n above: [selector, context, ...above]\n }\n )\n },\n defaultValue\n )\n },\n traverse: false\n },\n not: (value) => !value,\n '!': (value) => !value,\n '!!': (value) => Boolean(value),\n cat: (arr) => (typeof arr === 'string' ? arr : arr.join('')),\n keys: (obj) => Object.keys(obj),\n eachKey: {\n traverse: false,\n method: (object, context, above, engine) => {\n const result = Object.keys(object).reduce((accumulator, key) => {\n const item = object[key]\n Object.defineProperty(accumulator, key, {\n enumerable: true,\n value: engine.run(item, context, { above })\n })\n return accumulator\n }, {})\n return result\n },\n useContext: true,\n deterministic: (data, buildState) => {\n if (data && typeof data === 'object') {\n return Object.values(data).every((i) => {\n return isDeterministic(i, buildState.engine, buildState)\n })\n }\n throw new InvalidControlInput(data)\n },\n compile: (data, buildState) => {\n // what's nice about this is that I don't have to worry about whether it's async or not, the lower entries take care of that ;)\n // however, this is not engineered support yields, I will have to make a note of that & possibly support it at a later point.\n if (data && typeof data === 'object') {\n const result = `({ ${Object.keys(data)\n .reduce((accumulator, key) => {\n accumulator.push(\n `${JSON.stringify(key)}: ${buildString(data[key], buildState)}`\n )\n return accumulator\n }, [])\n .join(',')} })`\n return result\n }\n throw new InvalidControlInput(data)\n },\n asyncMethod: async (object, context, above, engine) => {\n const result = await asyncIterators.reduce(\n Object.keys(object),\n async (accumulator, key) => {\n const item = object[key]\n Object.defineProperty(accumulator, key, {\n enumerable: true,\n value: await engine.run(item, context, { above })\n })\n return accumulator\n },\n {}\n )\n return result\n }\n }\n}\nfunction createArrayIterativeMethod (name) {\n return {\n deterministic: (data, buildState) => {\n return (\n isDeterministic(data[0], buildState.engine, buildState) &&\n isDeterministic(data[1], buildState.engine, {\n ...buildState,\n insideIterator: true\n })\n )\n },\n method: (input, context, above, engine) => {\n if (!Array.isArray(input)) throw new InvalidControlInput(input)\n let [selector, mapper] = input\n selector =\n engine.run(selector, context, {\n above\n }) || []\n return selector[name]((i) => {\n return engine.run(mapper, i, {\n above: [selector, context, ...above]\n })\n })\n },\n asyncMethod: async (input, context, above, engine) => {\n if (!Array.isArray(input)) throw new InvalidControlInput(input)\n let [selector, mapper] = input\n selector =\n (await engine.run(selector, context, {\n above\n })) || []\n return asyncIterators[name](selector, (i) => {\n return engine.run(mapper, i, {\n above: [selector, context, ...above]\n })\n })\n },\n compile: (data, buildState) => {\n if (!Array.isArray(data)) throw new InvalidControlInput(data)\n const { above = [], state, async } = buildState\n let [selector, mapper] = data\n selector = buildString(selector, buildState)\n const mapState = {\n ...buildState,\n state: {},\n above: [selector, state, ...above],\n avoidInlineAsync: true\n }\n mapper = build(mapper, mapState)\n buildState.useContext = buildState.useContext || mapState.useContext\n buildState.methods.push(mapper)\n if (async) {\n if (!isSync(mapper) || selector.includes('await')) {\n buildState.detectAsync = true\n return `await asyncIterators.${name}(${selector} || [], methods[${\n buildState.methods.length - 1\n }])`\n }\n }\n return `(${selector} || []).${name}(methods[${\n buildState.methods.length - 1\n }])`\n },\n traverse: false\n }\n}\ndefaultMethods['?:'] = defaultMethods.if\n// declare all of the functions here synchronous\nObject.keys(defaultMethods).forEach((item) => {\n if (typeof defaultMethods[item] === 'function') {\n defaultMethods[item][Sync] = true\n }\n defaultMethods[item].deterministic =\n typeof defaultMethods[item].deterministic === 'undefined'\n ? true\n : defaultMethods[item].deterministic\n})\n// @ts-ignore Allow custom attribute\ndefaultMethods.var.deterministic = (data, buildState) => {\n return buildState.insideIterator && !String(data).includes('../')\n}\nObject.assign(defaultMethods.var, { traverse: false })\nObject.assign(defaultMethods.missing, {\n deterministic: false,\n useContext: true\n})\nObject.assign(defaultMethods.missing_some, {\n deterministic: false,\n useContext: true\n})\n// @ts-ignore Allow custom attribute\ndefaultMethods['<'].compile = function (data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) {\n return (\n '(' +\n buildString(data[0], buildState) +\n ' < ' +\n buildString(data[1], buildState) +\n ')'\n )\n }\n if (data.length === 3) {\n const a = buildString(data[0], buildState)\n const b = buildString(data[1], buildState)\n const c = buildString(data[2], buildState)\n return `${a} < ${b} && ${b} < ${c}`\n }\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods['<='].compile = function (data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) {\n return (\n '(' +\n buildString(data[0], buildState) +\n ' <= ' +\n buildString(data[1], buildState) +\n ')'\n )\n }\n if (data.length === 3) {\n const a = buildString(data[0], buildState)\n const b = buildString(data[1], buildState)\n const c = buildString(data[2], buildState)\n return `${a} <= ${b} && ${b} <= ${c}`\n }\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods.min.compile = function (data, buildState) {\n if (Array.isArray(data)) {\n return `Math.min(${data\n .map((i) => buildString(i, buildState))\n .join(', ')})`\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods.max.compile = function (data, buildState) {\n if (Array.isArray(data)) {\n return `Math.max(${data\n .map((i) => buildString(i, buildState))\n .join(', ')})`\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods['>'].compile = function (data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) {\n return (\n '(' +\n buildString(data[0], buildState) +\n ' > ' +\n buildString(data[1], buildState) +\n ')'\n )\n }\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods['>='].compile = function (data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) {\n return (\n '(' +\n buildString(data[0], buildState) +\n ' >= ' +\n buildString(data[1], buildState) +\n ')'\n )\n }\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods['=='].compile = function (data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) {\n return (\n '(' +\n buildString(data[0], buildState) +\n ' == ' +\n buildString(data[1], buildState) +\n ')'\n )\n }\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods['!='].compile = function (data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) {\n return (\n '(' +\n buildString(data[0], buildState) +\n ' != ' +\n buildString(data[1], buildState) +\n ')'\n )\n }\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods.if.compile = function (data, buildState) {\n if (Array.isArray(data)) {\n if (data.length >= 3) {\n data = [...data]\n\n if (data.length % 2 !== 1) {\n data.push(null)\n }\n\n const onFalse = data.pop()\n\n let str = ''\n while (data.length) {\n const condition = data.shift()\n const onTrue = data.shift()\n str += `(${buildString(condition, buildState)}) ? ${buildString(onTrue, buildState)} : `\n }\n\n return '(' + str + `${buildString(onFalse, buildState)}` + ')'\n }\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods['!=='].compile = function (data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) {\n return (\n '(' +\n buildString(data[0], buildState) +\n ' !== ' +\n buildString(data[1], buildState) +\n ')'\n )\n }\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods['==='].compile = function (data, buildState) {\n if (Array.isArray(data)) {\n if (data.length === 2) {\n return (\n '(' +\n buildString(data[0], buildState) +\n ' === ' +\n buildString(data[1], buildState) +\n ')'\n )\n }\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods['+'].compile = function (data, buildState) {\n if (Array.isArray(data)) {\n return `(${data\n .map((i) => `(+${buildString(i, buildState)})`)\n .join(' + ')})`\n } else if (typeof data === 'string' || typeof data === 'number') {\n return `(+${buildString(data, buildState)})`\n } else {\n return `([].concat(${buildString(\n data,\n buildState\n )})).reduce((a,b) => (+a)+(+b), 0)`\n }\n}\n\n// @ts-ignore Allow custom attribute\ndefaultMethods['%'].compile = function (data, buildState) {\n if (Array.isArray(data)) {\n return `(${data\n .map((i) => `(+${buildString(i, buildState)})`)\n .join(' % ')})`\n } else {\n return `(${buildString(data, buildState)}).reduce((a,b) => (+a)%(+b))`\n }\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods.or.compile = function (data, buildState) {\n if (Array.isArray(data)) {\n return `(${data.map((i) => buildString(i, buildState)).join(' || ')})`\n } else {\n return `(${buildString(data, buildState)}).reduce((a,b) => a||b, false)`\n }\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods.in.compile = function (data, buildState) {\n if (Array.isArray(data)) {\n return `(${buildString(data[1], buildState)} || []).includes(${buildString(\n data[0],\n buildState\n )})`\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods.and.compile = function (data, buildState) {\n if (Array.isArray(data)) {\n return `(${data.map((i) => buildString(i, buildState)).join(' && ')})`\n } else {\n return `(${buildString(data, buildState)}).reduce((a,b) => a&&b, true)`\n }\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods['-'].compile = function (data, buildState) {\n if (Array.isArray(data)) {\n return `${data.length === 1 ? '-' : ''}(${data\n .map((i) => `(+${buildString(i, buildState)})`)\n .join(' - ')})`\n }\n if (typeof data === 'string' || typeof data === 'number') {\n return `(-${buildString(data, buildState)})`\n } else {\n return `((a=>(a.length===1?a[0]=-a[0]:a)&0||a)([].concat(${buildString(\n data,\n buildState\n )}))).reduce((a,b) => (+a)-(+b))`\n }\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods['/'].compile = function (data, buildState) {\n if (Array.isArray(data)) {\n return `(${data\n .map((i) => `(+${buildString(i, buildState)})`)\n .join(' / ')})`\n } else {\n return `(${buildString(data, buildState)}).reduce((a,b) => (+a)/(+b))`\n }\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods['*'].compile = function (data, buildState) {\n if (Array.isArray(data)) {\n return `(${data\n .map((i) => `(+${buildString(i, buildState)})`)\n .join(' * ')})`\n } else {\n return `(${buildString(data, buildState)}).reduce((a,b) => (+a)*(+b))`\n }\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods.cat.compile = function (data, buildState) {\n if (typeof data === 'string') {\n return JSON.stringify(data)\n } else if (Array.isArray(data)) {\n return `(${['', ...data]\n .map((i) => buildString(i, buildState))\n .join(' + ')})`\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods.not.compile = defaultMethods['!'].compile = function (\n data,\n buildState\n) {\n return `(!(${buildString(data, buildState)}))`\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods['!!'].compile = function (data, buildState) {\n return `(!!(${buildString(data, buildState)}))`\n}\ndefaultMethods.none.deterministic = defaultMethods.some.deterministic\ndefaultMethods.get.compile = function (data, buildState) {\n let defaultValue = null\n let key = data\n let obj = null\n if (Array.isArray(data) && data.length <= 3) {\n obj = data[0]\n key = data[1]\n defaultValue = typeof data[2] === 'undefined' ? null : data[2]\n\n // Bail out if the key is dynamic; dynamic keys are not really optimized by this block.\n if (key && typeof key === 'object') return false\n\n key = key.toString()\n const pieces = splitPath(key)\n if (!chainingSupported) {\n return `(((a,b) => (typeof a === 'undefined' || a === null) ? b : a)(${pieces.reduce(\n (text, i) => {\n return `(${text}||0)[${JSON.stringify(i)}]`\n },\n `(${buildString(obj, buildState)}||0)`\n )}, ${buildString(defaultValue, buildState)}))`\n }\n return `((${buildString(obj, buildState)})${pieces\n .map((i) => `?.[${buildString(i, buildState)}]`)\n .join('')} ?? ${buildString(defaultValue, buildState)})`\n }\n return false\n}\n// @ts-ignore Allow custom attribute\ndefaultMethods.var.compile = function (data, buildState) {\n let key = data\n let defaultValue = null\n buildState.varTop = buildState.varTop || new Set()\n if (\n !key ||\n typeof data === 'string' ||\n typeof data === 'number' ||\n (Array.isArray(data) && data.length <= 2)\n ) {\n if (Array.isArray(data)) {\n key = data[0]\n defaultValue = typeof data[1] === 'undefined' ? null : data[1]\n }\n if (typeof key === 'undefined' || key === null || key === '') {\n // this counts the number of var accesses to determine if they're all just using this override.\n // this allows for a small optimization :)\n return 'state[Override]'\n }\n if (typeof key !== 'string' && typeof key !== 'number') {\n buildState.useContext = true\n return false\n }\n key = key.toString()\n if (key.includes('../')) {\n buildState.useContext = true\n return false\n }\n const pieces = splitPath(key)\n const [top] = pieces\n buildState.varTop.add(top)\n // support older versions of node\n if (!chainingSupported) {\n return `(((a,b) => (typeof a === 'undefined' || a === null) ? b : a)(${pieces.reduce(\n (text, i) => {\n return `(${text}||0)[${JSON.stringify(i)}]`\n },\n '(context||0)'\n )}, ${buildString(defaultValue, buildState)}))`\n }\n return `(context${pieces\n .map((i) => `?.[${JSON.stringify(i)}]`)\n .join('')} ?? ${buildString(defaultValue, buildState)})`\n }\n buildState.useContext = true\n return false\n}\n\nconst defaultMethods$1 = {\n ...defaultMethods,\n ...YieldingIterators\n}\n\n// @ts-check\nconst omitUndefined = function omitUndefined (obj) {\n Object.keys(obj).forEach((key) => {\n if (obj[key] === undefined) {\n delete obj[key]\n }\n })\n return obj\n}\n\n// @ts-check\n\n/**\n * An engine capable of running synchronous JSON Logic.\n */\nclass LogicEngine {\n /**\n *\n * @param {Object} methods An object that stores key-value pairs between the names of the commands & the functions they execute.\n * @param {{ yieldSupported?: Boolean, disableInline?: Boolean, permissive?: boolean }} options\n */\n constructor (\n methods = defaultMethods$1,\n options = { yieldSupported: false, disableInline: false, permissive: false }\n ) {\n this.disableInline = options.disableInline\n this.methods = { ...methods }\n /** @type {{yieldSupported?: Boolean, disableInline?: Boolean, permissive?: boolean}} */\n this.options = { ...options }\n }\n\n /**\n * An internal method used to parse through the JSON Logic at a lower level.\n * @param {*} logic The logic being executed.\n * @param {*} context The context of the logic being run (input to the function.)\n * @param {*} above The context above (can be used for handlebars-style data traversal.)\n * @returns {{ result: *, func: string }}\n */\n _parse (logic, context, above) {\n const [func] = Object.keys(logic)\n const data = logic[func]\n if (this.methods[func]) {\n if (typeof this.methods[func] === 'function') {\n const input = this.run(data, context, { above })\n if (this.options.yieldSupported && checkYield(input)) return { result: input, func }\n return { result: this.methods[func](input, context, above, this), func }\n }\n if (typeof this.methods[func] === 'object') {\n const { method, traverse } = this.methods[func]\n const shouldTraverse = typeof traverse === 'undefined' ? true : traverse\n const parsedData = shouldTraverse\n ? this.run(data, context, { above })\n : data\n if (this.options.yieldSupported && checkYield(parsedData)) return { result: parsedData, func }\n return { result: method(parsedData, context, above, this), func }\n }\n }\n if (this.options.permissive) return { result: logic, func }\n throw new Error(`Method '${func}' was not found in the Logic Engine.`)\n }\n\n /**\n *\n * @param {String} name The name of the method being added.\n * @param {Function|{ traverse?: Boolean, method: Function, deterministic?: Function | Boolean }} method\n * @param {{ deterministic?: Boolean, yields?: Boolean, useContext?: Boolean }} annotations This is used by the compiler to help determine if it can optimize the function being generated.\n */\n addMethod (name, method, { deterministic, yields, useContext } = {}) {\n if (typeof method === 'function') {\n method = { method, traverse: true }\n } else {\n method = { ...method }\n }\n\n Object.assign(method, omitUndefined({ yields, useContext, deterministic }))\n this.methods[name] = declareSync(method)\n }\n\n /**\n * Adds a batch of functions to the engine\n * @param {String} name\n * @param {Object} obj\n * @param {{ deterministic?: Boolean, yields?: Boolean, useContext?: Boolean, async?: Boolean, sync?: Boolean }} annotations Not recommended unless you're sure every function from the module will match these annotations.\n */\n addModule (name, obj, annotations) {\n Object.getOwnPropertyNames(obj).forEach((key) => {\n if (typeof obj[key] === 'function' || typeof obj[key] === 'object') {\n this.addMethod(\n `${name}${name ? '.' : ''}${key}`,\n obj[key],\n annotations\n )\n }\n })\n }\n\n /**\n *\n * @param {*} logic The logic to be executed\n * @param {*} data The data being passed in to the logic to be executed against.\n * @param {{ above?: any }} options Options for the invocation\n * @returns {*}\n */\n run (logic, data = {}, options = {}) {\n const { above = [] } = options\n if (Array.isArray(logic)) {\n const result = logic.map((i) => this.run(i, data, { above }))\n if (this.options.yieldSupported && checkYield(result)) {\n return new EngineObject({\n result\n })\n }\n return result\n }\n if (logic && typeof logic === 'object' && Object.keys(logic).length > 0) {\n const { func, result } = this._parse(logic, data, above)\n if (this.options.yieldSupported && checkYield(result)) {\n if (result instanceof YieldStructure) {\n if (result._input) {\n result._logic = { [func]: result._input }\n }\n if (!result._logic) {\n result._logic = logic\n }\n return result\n }\n return new EngineObject({\n result: { [func]: result.data.result }\n })\n }\n return result\n }\n return logic\n }\n\n /**\n *\n * @param {*} logic The logic to be built.\n * @param {{ top?: Boolean, above?: any }} options\n * @returns {Function}\n */\n build (logic, options = {}) {\n const { above = [], top = true } = options\n if (top) {\n const constructedFunction = build(logic, {\n state: {},\n engine: this,\n above\n })\n if (typeof constructedFunction === 'function' || top === true) {\n return (...args) => {\n return typeof constructedFunction === 'function'\n ? constructedFunction(...args)\n : constructedFunction\n }\n }\n return constructedFunction\n }\n return logic\n }\n}\n\n// @ts-check\n\nfunction timeout (n) {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve()\n }, n)\n })\n}\n\nfunction asyncPool ({\n free = [],\n max = 10,\n created = free.length,\n create = () => {}\n} = {}) {\n const pool = async function () {\n if (free.length) {\n const func = free.pop()\n const promise = func(...arguments)\n // return the stateful function\n promise\n .then(() => {\n free.push(func)\n })\n .catch(() => {\n free.push(func)\n })\n return promise\n } else {\n if (created < max) {\n created++\n free.push(await create())\n }\n while (!free.length) {\n await timeout(250)\n }\n return pool(...arguments)\n }\n }\n return pool\n}\n\n// @ts-check\n\n/**\n * An engine capable of running asynchronous JSON Logic.\n */\nclass AsyncLogicEngine {\n /**\n *\n * @param {Object} methods An object that stores key-value pairs between the names of the commands & the functions they execute.\n * @param {{ yieldSupported?: Boolean, disableInline?: Boolean, permissive?: boolean }} options\n */\n constructor (\n methods = defaultMethods$1,\n options = { yieldSupported: false, disableInline: false, permissive: false }\n ) {\n this.methods = { ...methods }\n /** @type {{yieldSupported?: Boolean, disableInline?: Boolean, permissive?: boolean}} */\n this.options = { ...options }\n this.disableInline = options.disableInline\n this.async = true\n this.fallback = new LogicEngine(methods, options)\n }\n\n /**\n * An internal method used to parse through the JSON Logic at a lower level.\n * @param {*} logic The logic being executed.\n * @param {*} context The context of the logic being run (input to the function.)\n * @param {*} above The context above (can be used for handlebars-style data traversal.)\n * @returns {Promise<{ func: string, result: * }>}\n */\n async _parse (logic, context, above) {\n const [func] = Object.keys(logic)\n const data = logic[func]\n if (this.methods[func]) {\n if (typeof this.methods[func] === 'function') {\n const input = await this.run(data, context, { above })\n if (this.options.yieldSupported && (await checkYield(input))) {\n return { result: input, func }\n }\n const result = await this.methods[func](input, context, above, this)\n return { result: Array.isArray(result) ? Promise.all(result) : result, func }\n }\n\n if (typeof this.methods[func] === 'object') {\n const { asyncMethod, method, traverse } = this.methods[func]\n const shouldTraverse =\n typeof traverse === 'undefined' ? true : traverse\n const parsedData = shouldTraverse\n ? await this.run(data, context, { above })\n : data\n\n if (this.options.yieldSupported && (await checkYield(parsedData))) {\n return { result: parsedData, func }\n }\n\n const result = await (asyncMethod || method)(\n parsedData,\n context,\n above,\n this\n )\n return { result: Array.isArray(result) ? Promise.all(result) : result, func }\n }\n }\n if (this.options.permissive) return { result: logic, func }\n throw new Error(`Method '${func}' was not found in the Logic Engine.`)\n }\n\n /**\n *\n * @param {String} name The name of the method being added.\n * @param {Function|{ traverse?: Boolean, method?: Function, asyncMethod?: Function, deterministic?: Function | Boolean }} method\n * @param {{ deterministic?: Boolean, yields?: Boolean, useContext?: Boolean, async?: Boolean, sync?: Boolean }} annotations This is used by the compiler to help determine if it can optimize the function being generated.\n */\n addMethod (\n name,\n method,\n { deterministic, async, sync, yields, useContext } = {}\n ) {\n if (typeof async === 'undefined' && typeof sync === 'undefined') sync = false\n if (typeof sync !== 'undefined') async = !sync\n if (typeof async !== 'undefined') sync = !async\n\n if (typeof method === 'function') {\n if (async) {\n method = { asyncMethod: method, traverse: true }\n } else {\n method = { method, traverse: true }\n }\n } else {\n method = { ...method }\n }\n\n Object.assign(method, omitUndefined({ yields, deterministic, useContext }))\n // @ts-ignore\n this.fallback.addMethod(name, method, { deterministic, yields, useContext })\n this.methods[name] = declareSync(method, sync)\n }\n\n /**\n * Adds a batch of functions to the engine\n * @param {String} name\n * @param {Object} obj\n * @param {{ deterministic?: Boolean, yields?: Boolean, useContext?: Boolean, async?: Boolean, sync?: Boolean }} annotations Not recommended unless you're sure every function from the module will match these annotations.\n */\n addModule (name, obj, annotations = {}) {\n Object.getOwnPropertyNames(obj).forEach((key) => {\n if (typeof obj[key] === 'function' || typeof obj[key] === 'object') {\n this.addMethod(\n `${name}${name ? '.' : ''}${key}`,\n obj[key],\n annotations\n )\n }\n })\n }\n\n /**\n *\n * @param {*} logic The logic to be executed\n * @param {*} data The data being passed in to the logic to be executed against.\n * @param {{ above?: any }} options Options for the invocation\n * @returns {Promise}\n */\n async run (logic, data = {}, options = {}) {\n const { above = [] } = options\n if (Array.isArray(logic)) {\n const result = await Promise.all(\n logic.map((i) => this.run(i, data, { above }))\n )\n\n if (this.options.yieldSupported && (await checkYield(result))) {\n return new EngineObject({\n result\n })\n }\n\n return result\n }\n\n if (logic && typeof logic === 'object' && Object.keys(logic).length > 0) {\n const { func, result } = await this._parse(logic, data, above)\n\n if (this.options.yieldSupported && (await checkYield(result))) {\n if (result instanceof YieldStructure) {\n if (result._input) {\n result._logic = { [func]: result._input }\n }\n if (!result._logic) {\n result._logic = logic\n }\n return result\n }\n\n return new EngineObject({\n result: { [func]: result.data.result }\n })\n }\n\n return result\n }\n\n return logic\n }\n\n /**\n *\n * @param {*} logic The logic to be built.\n * @param {{ top?: Boolean, above?: any, max?: Number }} options\n * @returns {Promise}\n */\n async build (logic, options = {}) {\n const { above = [], max = 100, top = true } = options\n if (top) {\n const constructedFunction = await buildAsync(logic, {\n engine: this,\n above,\n async: true,\n state: {}\n })\n\n const result = declareSync((...args) => {\n if (top === true) {\n try {\n const result =\n typeof constructedFunction === 'function'\n ? constructedFunction(...args)\n : constructedFunction\n return Promise.resolve(result)\n } catch (err) {\n return Promise.reject(err)\n }\n }\n\n const result =\n typeof constructedFunction === 'function'\n ? constructedFunction(...args)\n : constructedFunction\n\n return result\n }, top !== true && isSync(constructedFunction))\n // we can avoid the async pool if the constructed function is synchronous since the data\n // can't be updated :)\n if (top === true && constructedFunction && !constructedFunction[Sync]) {\n // we use this async pool so that we can execute these in parallel without having\n // concerns about the data.\n return asyncPool({\n free: [result],\n max,\n create: () => this.build(logic, { ...options, above })\n })\n } else {\n return typeof constructedFunction === 'function' || top === true\n ? result\n : constructedFunction\n }\n }\n\n return logic\n }\n}\n\n/**\n * @param {string[]} keep\n * @param {{ [key:string]: any }} obj\n */\nfunction pick (keep, obj) {\n return Object.keys(obj).reduce((acc, i) => {\n if (keep.includes(i)) acc[i] = obj[i]\n return acc\n }, {})\n}\n\n/**\n * Takes functions and makes it possible to use them in a locked-down json-logic document.\n * @param {{ [key: string]: (...args: any[]) => any }} functions Functions to import into the engine.\n * @param {string[]} keep Methods to keep from the original logic engine\n * @returns {(...args: any[]) => (...args: any[]) => any}\n */\nfunction asLogicSync (functions, keep = ['var'], engine = new LogicEngine()) {\n engine.methods = pick(keep, engine.methods)\n engine.addMethod('list', i => [].concat(i))\n Object.keys(functions).forEach(i => engine.addMethod(i, data => Array.isArray(data) ? functions[i](...data) : functions[i](data === null ? undefined : data)))\n return engine.build.bind(engine)\n}\n\n/**\n * Takes functions and makes it possible to use them in a locked-down json-logic document.\n * If performance becomes a problem, you may wish to optimize by creating a \"new AsyncLogicEngine\" yourself,\n * and adding the methods you're using as sync / async respectively. .addMethod(name, func, { sync: true })\n * This is meant to be a simple adapter.\n *\n * @param {{ [key: string]: (...args: any[]) => any }} functions\n * @param {string[]} keep\n * @returns {(...args: any[]) => Promise<(...args: any[]) => Promise>}\n */\nfunction asLogicAsync (functions, keep = ['var']) {\n return asLogicSync(functions, keep, new AsyncLogicEngine())\n}\n\n// @ts-check\n\nconst index = { LogicEngine, AsyncLogicEngine, Compiler, YieldStructure, EngineObject, Constants, defaultMethods: defaultMethods$1, asLogicSync, asLogicAsync, splitPath }\n\nexport { AsyncLogicEngine, Compiler, Constants, EngineObject, LogicEngine, YieldStructure, asLogicAsync, asLogicSync, index as default, defaultMethods$1 as defaultMethods, splitPath }\n","import m from 'mithril'\nimport JsonViewer from 'mithril-json-viewer'\nimport './json.css'\nimport { auth } from './Login'\n\nexport const TemplateEditor = () => {\n let projectName\n let logic\n let fields\n return {\n oninit: vnode => {\n projectName = m.route.param('project')\n auth('/project/' + projectName).then(res => {\n console.log('got project', res)\n logic = res.logic\n fields = res.fields\n }).catch(err => {\n console.log('error getting project')\n })\n },\n view: vnode => {\n return m('.json-tree', {}, [\n m('h2', {}, projectName),\n m('h3', {}, 'logic'),\n m(JsonViewer, {tree: logic}),\n m('h3', {}, 'fields'),\n m(JsonViewer, {tree: fields}),\n ])\n }\n }\n}","var m = require('mithril'); if (typeof m !== 'function') m = m.default;\r\n\r\nfunction renderCollapsed(propStr, isArray, pathStr, statusLookup) {\r\n return m('div', [\r\n '' + propStr + (isArray ? '[' : '{'),\r\n m('button', {\r\n onclick: function () { statusLookup[pathStr] = false; },\r\n }, '...'),\r\n (isArray ? ']' : '}'),\r\n ]);\r\n}\r\n\r\nfunction renderExpanded(propStr, tree, paths, isArray, pathStr, statusLookup, collapseAfter) {\r\n var divs = [];\r\n divs.push('' + propStr + (isArray ? '[' : '{'));\r\n divs.push(\r\n m('button', {\r\n onclick: function () { statusLookup[pathStr] = true; },\r\n }, '-')\r\n );\r\n for (var key in tree) {\r\n if (!tree.hasOwnProperty(key)) continue;\r\n var child = tree[key];\r\n var newpath = paths.slice();\r\n newpath.push(key);\r\n divs.push(renderTree(key, child, newpath, statusLookup, collapseAfter));\r\n }\r\n divs.push((isArray ? ']' : '}'));\r\n return m('div', divs);\r\n}\r\n\r\nfunction renderTree(prop, tree, paths, statusLookup, collapseAfter) {\r\n var propStr = prop == null ? '' : prop + ':';\r\n var pathStr = JSON.stringify(paths);\r\n var collapsed = statusLookup[pathStr];\r\n if (collapsed == null) {\r\n if (paths.length > collapseAfter) collapsed = true;\r\n else collapsed = false;\r\n }\r\n if (tree != null && tree instanceof Array) {\r\n if (collapsed) return renderCollapsed(propStr, true, pathStr, statusLookup);\r\n else return renderExpanded(propStr, tree, paths, true, pathStr, statusLookup, collapseAfter);\r\n }\r\n if (tree != null && typeof tree === 'object') {\r\n if (collapsed) return renderCollapsed(propStr, false, pathStr, statusLookup);\r\n else return renderExpanded(propStr, tree, paths, false, pathStr, statusLookup, collapseAfter);\r\n }\r\n return m('div', propStr + JSON.stringify(tree));\r\n}\r\n\r\nmodule.exports = function JsonViewer(initialVnode) {\r\n var attrs = initialVnode.attrs;\r\n var options = attrs.options || {};\r\n var statusLookup = {};\r\n\r\n return {\r\n view: function(vnode) {\r\n var tree = vnode.attrs.tree;\r\n return renderTree(null, tree, [], statusLookup, options.collapseAfter);\r\n }\r\n };\r\n};\r\n\r\n","import m from \"mithril\"\nimport { Menu } from './Menu'\nimport { Head } from './Head'\n\nimport Slider from './Slider'\nimport { Timeline } from './Timeline'\nimport Monitor from './Monitor'\nimport { PlaybackTools, SpeedTools, ProjectTools } from './Tools'\nimport { OttoTimeline } from './OttoTimeline'\nimport { Preview } from './Preview'\nimport { Resolution, Aspect } from './Resolution'\nimport Bin from './Bin'\nimport { Timecode } from './Timecode'\n\nimport TimelineTools from './TimelineTools'\nimport { Scale } from './Scale'\n\nexport var Otto = {\n view: (vnode) => {\n return [\n m(Menu),\n m(Head, [\n m(Preview)\n ]),\n m('.fit.center', {}, [\n m(Aspect, [\n '16:9',\n '4:3',\n '4:5',\n '1:1',\n '5:4',\n '3:4',\n '9:16'\n ]),\n m(Resolution, [\n '1080p',\n '720p',\n '480p',\n '240p',\n ]),\n ]),\n m(PlaybackTools),\n m('.bar.fullwidth.timelinegrid', {}, [\n m(TimelineTools),\n m('.vcenter', {}, [\n m('.bar', {}, [\n m(Timecode),\n m(Slider),\n ]),\n m('.bar.right', {}, [\n m(SpeedTools),\n m('.right', {}, [\n m(ProjectTools),\n ]),\n ]),\n m(OttoTimeline),\n ]),\n ]),\n m(Scale),\n m('.spacer', {style:{height:'3em'}}, []),\n m(Bin),\n ]\n }\n}\n\n","import m from 'mithril'\nvar state = require(\"./Globals\").state\n\nexport function Head() {\n return {\n oncreate: vnode => {\n window.onresize = e => {\n let h = state.width()/state.height()*window.innerHeight\n // console.log('updating head', h, e)\n vnode.dom.style.width = window.innerWidth > window.innerHeight ? `${h*.4}` : `${h*.24}`\n vnode.dom.style.height = window.innerWidth > window.innerHeight ? '40vh' : '24vh'\n }\n },\n view: vnode => {\n return m('#head.head', {\n style: {\n width: window.innerWidth > window.innerHeight ? `${state.width()/state.height()*window.innerHeight*.4}` : `${state.width()/state.height()*window.innerHeight*.24}`,\n height: window.innerWidth > window.innerHeight ? '40vh' : '24vh'\n },\n ...vnode.attrs\n }, vnode.children)\n }\n }\n}\n","import m from 'mithril'\nimport Sortable, { MultiDrag } from 'sortablejs'\nimport { ContentEditable } from 'mithril-contenteditable'\n\n// Sortable.mount(new MultiDrag());\nvar state = require(\"./Globals\").state\nimport { Video, Edl, array_move } from './Video'\nimport { Preview } from './Preview'\nimport { auth } from './Login'\n\nexport function Clip() {\n return {\n oncreate: (vnode) => {\n let data = vnode.attrs\n let i = vnode.attrs.i\n let element = vnode.dom\n let original_width = 0;\n let original_x = 0;\n let original_mouse_x = 0;\n\n element.addEventListener('mousedown', e => {\n if (state.tool() == 'trim') {\n e.preventDefault()\n original_width = parseFloat(getComputedStyle(element, null).getPropertyValue('width').replace('px', ''));\n original_x = element.getBoundingClientRect().left;\n original_mouse_x = e.pageX;\n\n function resize(e) {\n const w = original_width + (e.pageX - original_mouse_x);\n const dx = e.movementX / state.scale()\n if ((w + dx) > 0)\n element.style.width = w + dx + 'px'\n console.log('trimmed', e, dx, element)\n }\n function stopResize() {\n element.removeEventListener('mousemove', resize)\n Edl.edl[vnode.attrs.i]['duration'] = parseFloat(element.style.width) / state.scale()\n Edl.update()\n }\n element.addEventListener('mousemove', resize)\n element.addEventListener('mouseup', stopResize)\n\n } else if (state.tool() == 'time') {\n let p = e.offsetX / e.target.offsetWidth\n let d = p * e.target.offsetWidth / state.scale()\n Edl.current = vnode.attrs.i\n Edl.time = d + Edl.durations(Edl.edl.slice(0, vnode.attrs.i))\n Video.clip = data\n Video.time(d)\n console.log('clicked on clip', this, vnode, e, p, d, Edl, Video)\n m.redraw()\n }\n })\n },\n view: (vnode) => {\n return m('.clip', {\n style: {\n width: vnode.attrs.duration*state.scale()\n },\n ...vnode.attrs\n }, [\n m('i.material-icons.progress', {\n style: {\n display: (Edl.current == vnode.attrs.i) ? 'inherit': 'none',\n left: Video.time()*state.scale(),\n }\n }),\n ...vnode.children\n ])\n }\n }\n}\n\n\nexport function Template() {\n return {\n view: (vnode) => {\n return m(Clip, {\n class: 'template',\n ...vnode.attrs,\n }, [\n m(ContentEditable, {\n style: {margin: '5px'},\n // Original HTML input\n html: this.html,\n // Returns the updated HTML code\n oncreate: html => {\n this.html = `${JSON.stringify(vnode.attrs.data['text']).slice(1, -1)}`\n m.redraw()\n },\n onchange: html => {\n this.html = html\n\n },\n // Example to prevent the user from entering commas\n onkeydown: e => {\n switch (e.key) {\n case 'Enter': e.preventDefault()\n e.stopPropagation()\n console.log('enter')\n Edl.update()\n case 'ArrowLeft': e.stopPropagation()\n case 'ArrowRight': e.stopPropagation()\n }\n Edl.edl[vnode.attrs.i].data['text'] = this.html\n },\n\n // Replace the base tag, if needed\n tagName: 'div',\n // By default, & etc are replaced by their normal counterpart when losing focus.\n // cleanupHtml: false,\n // By default, don't allow the user to enter newlines\n // preventNewline: false,\n // By default, select all text when the element receives focus\n // selectAllOnFocus: false,\n // By default, when pasting text, remove all HTML and keep the plain text.\n // pasteAsPlainText: false,\n }),\n ])\n }\n }\n}\n\nexport function VideoClip() {\n return {\n view: (vnode) => {\n return m(Clip, vnode.attrs, [\n m('p#clipname.clipname', vnode.attrs.name),\n m('p#inpoint.inpoint', vnode.attrs.inpoint),\n m('p#outpoint.outpoint', vnode.attrs.outpoint),\n ])\n }\n }\n}\n\n\nexport function OttoTimeline() {\n return {\n oninit: (vnode) => {\n auth(`/project/${m.route.param('project')}`, {}).then(e => {\n console.log('got otto', e)\n Edl.edl = e.edl\n Edl.current = 0\n Edl.time = 0\n Edl.update()\n })\n },\n oncreate: (vnode) => {\n new Sortable(vnode.dom, {\n multiDrag: true,\n group: 'clip',\n selectedClass: \"selected\",\n swapThreshold: 0.50,\n animation: 150,\n ghostClass: 'ghost',\n forceFallback: true,\n // delay: 100,\n invertSwap: true,\n preventOnFilter: false,\n filter: (e) => {\n if (state.tool() != 'move') {\n return true\n }\n else {\n return false\n }\n },\n onUpdate: (e) => {\n Edl.edl = array_move(Edl.edl, e.oldIndex, e.newIndex)\n Edl.update()\n console.log('sorting update', e, Edl.edl)\n },\n removeOnSpill: true,\n onSpill: e => {\n console.log('spilling', e)\n Edl.edl.splice(e.oldIndex, 1)\n Edl.update()\n },\n })\n window.scroll(0,0)\n },\n view: (vnode) => {\n return m('#timeline.timeline', [\n Edl.edl.map((c, i) => {\n if (c) {\n c.i = i\n switch (c.type) {\n case 'template': return m(Template, c)\n case 'video': return m(VideoClip, c)\n // default: return m(Clip, c)\n }\n } else return m('')\n }),\n ])\n }\n }\n}\n","import e from\"mithril\";\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***************************************************************************** */var t=function(){return(t=Object.assign||function(e){for(var t,n=1,o=arguments.length;n\").replace(/</g,\"<\")},l=function(e){13===(e.keyCode||e.which)&&(e.returnValue=!1,e.preventDefault&&e.preventDefault())},i=function(){setTimeout((function(){document.execCommand(\"selectAll\",!1)}),0)};return{oncreate:function(e){var t=e.dom,o=e.attrs.onchange;n.onchange=o,n.dom=t},view:function(n){var a=n.attrs,c=a.html,u=a.tagName,p=void 0===u?\"div\":u,s=a.disabled,d=void 0!==s&&s,v=a.pasteAsPlainText,f=void 0===v||v,m=a.cleanupHtml,b=void 0===m||m,g=a.preventNewline,h=void 0===g||g,O=a.selectAllOnFocus,y=void 0===O||O,w=(a.onchange,a.onblur),H=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);rHello, world\")),e(\"div\",e.trust(\"Hello, world\")),e(p,t(t({},H),{contenteditable:!d,onfocus:y?i:void 0,oninput:o,onblur:function(e){o(e,b),w&&w(e)},onpaste:f?r:void 0,onkeypress:h?l:void 0}),e.trust(c))]}}};export{n as ContentEditable};\n","import m from 'mithril'\nimport { Sortable } from 'sortablejs'\nimport { VideoClip, Template } from './OttoTimeline'\nimport { Timeline } from './Timeline'\nimport { Edl } from './Video'\nimport { auth } from './Login'\n\n\nvar Bin = {\n videos: [],\n templates: [],\n oninit: (vnode) => {\n m.request('/videos').then( e => {\n // console.log('got videos!', e)\n Bin.videos = e\n })\n\n auth('/otto/templates').then( e => {\n // console.log('got videos!', e)\n Bin.templates = e\n })\n },\n oncreate: vnode => {\n new Sortable(vnode.dom, {\n group: {\n name: 'media',\n pull: 'clone',\n put: false,\n },\n sort: false,\n selectedClass: \"selected\",\n ghostClass: 'ghost',\n forceFallback: true,\n animation: 150,\n onEnd: (e) => {\n if (e.from.id == 'bin' && e.to.id == 'timeline') {\n console.log('moved media!', e)\n var clip = e.item.attributes\n e.item.attributes.pos = e.newIndex\n // Timeline.updateEdl()\n // Edl.edl.splice(e.newIndex, 0, [\n var edl = Edl.edl.slice(0, e.newIndex)\n if (clip.type.value == 'template') {\n edl.push({\n name: clip.name.value,\n duration: clip.duration.value,\n type: 'template',\n data: JSON.parse(clip.datastr.value),\n })\n } else {\n edl.push( {\n name: clip.name.value,\n inpoint: Number(clip.inpoint.value),\n outpoint: Number(clip.outpoint.value),\n duration: Number(clip.outpoint.value - clip.inpoint.value),\n description: clip.description.value,\n type: 'video',\n })}\n edl = edl.concat(Edl.edl.slice(e.newIndex))\n console.log('inserted new clip', edl)\n if (e.newIndex <= Edl.current) {\n Edl.current++\n }\n e.item.remove()\n // Timeline.loadEdl(edl)\n Edl.edl = edl\n m.redraw()\n }\n },\n })\n },\n view: (vnode) => {\n // m('#bin.project.bin', {}, [\n // m('h3', 'bin'),\n // m('tr', [\n // m('th', 'files'),\n // ]),\n\n // return m('table#bin.project.bin', {}, [\n // media.map(f => {\n // return m('tr', [\n // m('td', {\n // }, f)\n // ])\n // })\n // ])\n\n return [\n m('table#bin.bin.project', {}, [\n Bin.templates.map(clip => {\n // console.log('making template', clip, typeof(clip))\n return m(Template, {...clip, datastr: JSON.stringify(clip.data)})\n }),\n Bin.videos.map(f => {\n return m(VideoClip, {type: 'video', name: f, inpoint: 0, outpoint: 5, pos: \"-1\", duration: 10, description: ''})\n })])]\n }\n}\n\n\nexport default Bin\n","import m from 'mithril'\nimport { Edl } from './Video'\nconst formatTime = require('./Slider').formatTime\n\nexport function Timecode() {\n return {\n view: vnode => {\n return m('p.timecode', {}, formatTime(Edl.time))\n }\n }\n}\n","import m from 'mithril'\nimport '../node_modules/material-design-icons-iconfont/dist/material-design-icons.css'\nvar state = require(\"./Globals\").state\n\nexport default class TimelineTools {\n oncreate() {\n\n }\n view() {\n let t = document.getElementById('timeline')\n return m('span#TTools.tools.toolcol', {}, [\n m('i.custom', {\n title: 'time selector',\n onclick: (vnode) => {\n t.style.cursor = 'text'\n state.tool('time')\n },\n style: {\n 'background-color': state.tool() == 'time' ? '#393939' : 'transparent'\n }\n }, '|'),\n m('i.custom', {\n title: 'trim',\n onclick: (vnode) => {\n t.style.cursor = 'ew-resize'\n state.tool('trim')\n },\n style: {\n 'background-color': state.tool() == 'trim' ? '#393939' : 'transparent'\n }\n }, '[ ]'),\n m('i.material-icons', {\n title: 'move',\n onclick: (vnode) => {\n t.style.cursor = 'url(./assets/swap-horizontal.svg), -webkit-grab'\n state.tool('move')\n },\n style: {\n 'background-color': state.tool() == 'move' ? '#393939' : 'transparent'\n }\n }, 'swap_horizontal'),\n m('i.material-icons', {\n title: 'cut',\n onclick: (vnode) => {\n t.style.cursor = 'url(./assets/content-cut.svg), auto'\n state.tool('cut')\n },\n style: {\n 'background-color': state.tool() == 'cut' ? '#393939' : 'transparent'\n }\n }, 'content_cut'),\n m('i.material-icons', {\n title: 'slip',\n onclick: (vnode) => {\n t.style.cursor = 'ew-resize'\n state.tool('slip')\n },\n style: {\n 'background-color': state.tool() == 'slip' ? '#393939' : 'transparent'\n }\n }, 'swap_calls'),\n m('i.material-icons', {\n title: 'slide',\n onclick: (vnode) => {\n t.style.cursor = 'ew-resize'\n state.tool('slide')\n },\n style: {\n 'background-color': state.tool() == 'slide' ? '#393939' : 'transparent'\n }\n }, 'sync_alt'),\n m('i.material-icons', {\n title: 'dual roller',\n onclick: (vnode) => {\n t.style.cursor = 'ew-resize'\n state.tool('dual roller')\n },\n style: {\n 'background-color': state.tool() == 'dual roller' ? '#393939' : 'transparent'\n }\n }, 'compare_arrows'),\n ])\n }\n}\n","import m from 'mithril'\nimport interact from 'interactjs'\nimport { Video } from './Video'\nvar Timeline = require('./Timeline').Timeline\nvar state = require(\"./Globals\").state\n\n// position will be between 0 and 1\nvar minp = 0;\nvar maxp = 1;\n\n// The result should be between .1 an 1000\nvar minv = Math.log(.1);\nvar maxv = Math.log(1000);\n\n// calculate adjustment factor\nvar scale = (maxv-minv) / (maxp-minp);\n\nexport function logslider(position) {\n\n return Math.exp( minv + scale * ( position - minp ) );\n}\n\nexport function inverseLog(value) {\n return ( ( Math.log(value) - minv ) / scale ) + minp\n}\n\nexport function ScaleBar() {\n return {\n view: (vnode) => {\n return m('.slider#scale', {min: 1, max: 100, style: {paddingLeft: `${inverseLog(state.scale())*100}%`, 'background-color': '#393939'}})\n },\n oncreate: (vnode) => {\n const slider = interact(vnode.dom)\n slider.draggable({\n origin: 'self',\n inertia: true,\n modifiers: [\n interact.modifiers.restrict({\n restriction: 'self'\n })\n ]\n })\n .on('dragmove', (event) => {\n // const sliderWidth = interact.getElementRect(event.target.parentNode).width\n let sliderWidth = event.target.offsetWidth\n let p = Math.max(event.pageX - event.target.offsetLeft, 0) / sliderWidth\n // event.target.style.paddingLeft = p*100 + '%'\n const value = logslider(p).toFixed(4)\n console.log('scale:', value, 'padding:', p)\n // event.target.setAttribute('data-value', value)\n state.scale(value)\n m.redraw()\n })\n },\n }\n}\n\nexport function Scale() {\n return {\n view: vnode => {\n return m('.tools.toolbar', {style:{width: 'auto'}}, [\n m('i.material-icons', {\n onclick: e => {\n let s = logslider(Math.max(inverseLog(state.scale()) - .05, .01))\n state.scale(s)\n console.log('zooming out', s)\n }\n }, 'zoom_out'),\n m(ScaleBar),\n m('i.material-icons', {\n style: {position: 'absolute', right:0},\n onclick: e => {\n let s = logslider(inverseLog(state.scale()) + .05)\n state.scale(s)\n console.log('zooming in', s)\n }\n }, 'zoom_in'),\n ])\n }\n }\n\n}\n","module.exports = new __parcel__URL__(\"al-white.3b0a8f21.svg\").toString();"],"names":["name","method","asyncMethod","$parcel$global","globalThis","$parcel$interopDefault","a","__esModule","default","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","$9e748f0e7cb702a5$var$Vnode","tag","key","attrs","children","text","dom","domSize","undefined","state","events","instance","normalize","node","Array","isArray","normalizeChildren","String","input","length","isKeyed","i","TypeError","$dBs8J","html","$5sRXF","vnode","apply","arguments","start","push","$ea53147a45dc1bd2$var$PromisePolyfill","executor","self","resolvers","rejectors","resolveCurrent","handler","rejectCurrent","_instance","callAsync","setImmediate","setTimeout","list","shouldAbsorb","execute","value","then","executeOnce","bind","console","error","retry","runs","run","fn","onerror","prototype","onFulfilled","onRejection","resolveNext","rejectNext","handle","callback","next","promise","resolve","reject","catch","finally","reason","all","total","count","values","consume","race","window","$window","currentRedraw","currentDOM","$doc","document","nameSpace","svg","math","getNameSpace","xmlns","checkState","original","callHook","activeElement","createNodes","parent","vnodes","end","hooks","nextSibling","ns","createNode","initLifecycle","createTextNode","insertNode","createHTML","createFragment","fragment","createDocumentFragment","firstChild","childNodes","createElement","is","element","createElementNS","setAttrs","type","setAttribute","isFileInput","setAttr","maybeSetContentEditable","setLateSelectAttrs","selectedIndex","normalized","initComponent","sentinel","view","create","$$reentrantLock$$","possibleParents","caption","thead","tbody","tfoot","tr","th","td","colgroup","col","child","match","temp","innerHTML","appendChild","updateNodes","old","removeNodes","isOldKeyed","oldStart","map","o","oe","ve","topSibling","oldEnd","updateNode","getNextSibling","moveNodes","lisIndices","originalNextSibling","vnodesLength","oldIndices","li","pos","matched","getKeyMap","oldIndex","makeLisIndices","result","u","il","lisTemp","j","c","commonLength","removeNode","oldTag","shouldNotUpdate","onbeforeupdate","force","updateLifecycle","toString","nodeValue","removeHTML","updateFragment","updateAttrs","warn","val","removeAttr","isLifecycleMethod","updateEvent","updateStyle","hasPropertyKey","nsLastIndex","indexOf","slice","removeAttribute","updateComponent","frag","moveChildToFrag","parentNode","insertBefore","contenteditable","contentEditable","content","stateResult","attrsResult","mask","onbeforeremove","reallyRemove","onremove","removeChild","attr","setAttributeNS","uppercaseRegex","toLowerCase","capital","normalizeKey","replace","style","cssText","setProperty","removeProperty","EventDict","_","addEventListener","removeEventListener","source","oninit","oncreate","onupdate","handleEvent","ev","currentTarget","redraw","preventDefault","stopPropagation","contains","prevRedraw","prevDOM","active","namespace","namespaceURI","textContent","focus","render","schedule","subscriptions","pending","offset","sync","mount","root","component","index","splice","$cITMw","$9eOch","Promise","oncompletion","callbackCount","PromiseProxy","makeRequest","factory","url","args","params","data","background","complete","wrap","constructor","hasHeader","headers","__proto__","request","replacedAbort","toUpperCase","body","assumeJSON","serialize","JSON","FormData","URLSearchParams","responseType","extract","xhr","XMLHttpRequest","aborted","isTimeout","abort","open","async","user","password","setRequestHeader","deserialize","withCredentials","timeout","onreadystatechange","target","readyState","message","success","status","test","response","parse","responseText","completeErrorResponse","ontimeout","config","send","stringify","jsonp","callbackName","Math","round","random","script","src","encodeURIComponent","callbackKey","documentElement","$iRA82","$enXzN","template","SyntaxError","queryIndex","hashIndex","queryEnd","path","query","resolved","m","variadic","newQueryIndex","newHashIndex","newQueryEnd","querystring","object","destructure","join","assign","hasOwnProperty","$7EF0O","$j25vk","requestAnimationFrame","$iVcuU","$2uPnQ","$7lWrV","$8KlxE","$e9o88","$aae70388e69e8325$var$sentinel","$aae70388e69e8325$var$decodeURIComponentSave","decodeURIComponent","mountRedraw","compiled","fallbackRoute","currentPath","lastUpdate","p","scheduled","ready","currentResolver","RouterRoot","fireAsync","resolveRoute","SKIP","route","prefix","location","hash","search","pathname","concat","setPath","history","loop","check","payload","matchedRoute","localComp","update","comp","onmatch","options","title","replaceState","pushState","href","defaultRoute","routes","keys","defaultData","some","ReferenceError","Link","onclick","selector","disabled","Boolean","defaultPrevented","button","which","ctrlKey","metaKey","shiftKey","altKey","param","$dc673ea23ab51a3f$var$selectorParser","$dc673ea23ab51a3f$var$selectorCache","$dc673ea23ab51a3f$var$isEmpty","$dc673ea23ab51a3f$var$execSelector","hasClass","className","class","newAttrs","$dc673ea23ab51a3f$var$compileSelector","classes","exec","attrValue","$k7iQv","$gZZfO","$c601dba597649f5e$var$decodeURIComponentSave","str","string","charAt","entries","split","counters","entry","levels","cursor","pop","level","nextLevel","isNumber","isNaN","parseInt","desc","getOwnPropertyDescriptor","templateData","templateKeys","regexp","RegExp","extra","k","r","$a4d49fb46380177c$var$magic","extras","Stream","lift","streams","merge","scan","acc","origin","stream","combine","scanMerge","tuples","seed","tuple","changed","forEach","warnedHalt","dependentStreams","dependentFns","_changing","_state","_parents","_map","ignoreInitial","toJSON","x","s1","s2","_unregisterChild","childIndex","every","mappers","endStream","mapper","log","t1","getOwnPropertySymbols","filter","d","writable","getOwnPropertyDescriptors","defineProperties","Symbol","iterator","l","setPrototypeOf","getPrototypeOf","Reflect","construct","sham","Proxy","valueOf","f","toPrimitive","Number","h","Window","g","ownerDocument","y","defaultView","b","w","docFrag","nodeType","func","number","bool","Element","nodeName","plainObject","array","E","interaction","prepared","axis","coords","cur","page","client","velocity","T","iEvent","delta","S","install","actions","Interactable","defaults","draggable","drag","methodDict","listeners","interactable","buttons","enabled","pointerIsDown","pointerType","mouseButtons","action","lockAxis","startAxis","setPerAction","setOnEvents","beforeMove","move","getCursor","filterEventType","P","DocumentFragment","O","SVGElement","SVGSVGElement","SVGElementInstance","HTMLElement","Event","Touch","PointerEvent","MSPointerEvent","D","navigator","supportsTouch","DocumentTouch","supportsPointerEvent","pointerEnabled","isIOS","platform","isIOS7","appVersion","isIe9","userAgent","isOperaMobile","appName","prefixedMatchesSelector","pEventTypes","up","down","over","out","cancel","wheelEvent","M","z","R","A","host","I","C","unshift","F","X","correspondingUseElement","Y","getBoundingClientRect","getClientRects","left","right","top","bottom","width","height","L","scrollX","scrollLeft","scrollY","scrollTop","q","B","querySelector","V","W","getRect","G","N","U","H","K","$","J","trim","Q","sqrt","Z","tt","__set","et","timeStamp","nt","rt","it","ot","at","pointerId","identifier","ct","touches","changedTouches","lt","pageX","pageY","clientX","clientY","screenX","screenY","ut","min","max","pt","ft","atan2","PI","dt","ht","composedPath","vt","immediatePropagationStopped","propagationStopped","_interaction","_proxy","gt","mt","yt","bt","xt","dropzone","dragEvent","relatedTarget","prev","dropState","rejected","enter","stopImmediatePropagation","activeDrops","fire","wt","Et","interactables","drop","accept","draggableElement","getAllElements","rect","Tt","dropCheck","ownerSVGElement","lastChild","previousSibling","getComputedStyle","zIndex","St","leave","activate","deactivate","dragLeave","prevDropzone","dragEnter","_t","Pt","event","dynamicDrop","Ot","interactStatic","usePlugin","reduce","off","on","ondrop","ondropactivate","ondropdeactivate","ondragenter","ondragleave","ondropmove","overlap","checker","phaselessTypes","dragenter","dragleave","dropactivate","dropdeactivate","dropmove","getActiveDrops","getDrop","getDropEvents","fireDropEvents","Dt","phase","pointers","pointer","deltaSource","distance","box","scale","ds","angle","da","gesture","startDistance","startAngle","prevEvent","It","before","gesturable","At","resizeAxes","resize","square","axes","Rt","Ct","jt","browser","cursors","xy","topleft","bottomright","topright","bottomleft","defaultMargin","resizable","preserveAspectRatio","edges","_rects","corrected","previous","deltaRect","invert","zt","abs","_latestPointer","eventTarget","margin","NaN","Yt","Lt","cancelAnimationFrame","Date","now","clearTimeout","qt","container","speed","isScrolling","prevTime","autoScroll","scroll","stop","Bt","Vt","scrollBy","onInteractionMove","interacting","simulation","innerWidth","innerHeight","Wt","autoscroll","perAction","Nt","Ut","Ht","styleCursor","Kt","actionChecker","$t","getAction","ignoreFrom","_backCompatOption","allowFrom","Jt","testIgnoreAllow","ee","Zt","forEachMatch","Qt","manualStart","te","ie","maxPerElement","autoStart","maxInteractions","interactions","ne","re","cursorElement","cursorChecker","_interacting","ae","base","withinInteractionLimit","pointerWasMoved","validateAction","se","dx","dy","downPointer","downEvent","ce","hold","delay","ue","autoStartHoldTimer","duplicate","getHoldDuration","fe","de","checkAndPreventDefault","he","supportsPassive","getDocOptions","passive","docEvents","listener","substr","phases","ge","me","states","startOffset","startDelta","endResult","startEdges","ye","modifiers","methods","_methods","prepareStates","fillArg","pageCoords","preEnd","startAll","setAll","skipModifiers","shouldDo","eventProps","rectDelta","modifiedCoords","applyToInteraction","beforeEnd","modification","endOnly","setStart","be","enable","disable","_defaults","xe","Ee","setAndApply","restoreInteractionCoords","Te","Se","x0","y0","t0","duration","clientX0","clientY0","swipe","downTime","getSwipe","velocityY","velocityX","_e","downTarget","Pe","Oe","ke","De","scopeFire","_scopeFire","_ending","_stopped","doMove","_id","updatePointer","pointerIndex","pointerInfo","_doPhase","pointerMoveTolerance","getPointerIndex","curEventTarget","removePointer","_now","_updateLatestPointer","_createPreparedEvent","_fireEvent","Ie","Me","Ae","ze","offsetBy","Ce","Interaction","je","isModified","smoothEnd","allowResume","modifierCount","modifierArg","startCoords","v0","targetOffset","modifiedOffset","currentOffset","lambda_v0","one_ve_v0","Fe","copyFrom","minSpeed","endSpeed","startInertia","startSmoothEnd","resistance","onNextFrame","inertiaTick","smoothEndTick","exp","Ye","smoothEndDuration","inertia","Be","Ve","types","global","We","originalEvent","Ge","capture","Ne","Ue","add","remove","addDelegate","context","removeDelegate","delegateListener","delegateUseCapture","delegatedEvents","documents","targets","supportsOptions","He","methodOrder","simulationResume","eventType","scope","mouseOrPen","Ke","hasPointer","idle","Je","Qe","prevTouchTime","Ze","$e","searchDetails","new","tn","doc","nn","pointerDown","pointerMove","pointerUp","documentBlur","destroy","onDocSignal","doOnInteractions","methodNames","rn","On","Off","_actions","_context","_win","_doc","_scopeEvents","onstart","onmove","onend","oninertiastart","_onOff","updatePerActionListeners","from","querySelectorAll","testIgnore","testAllow","rectChecker","an","selectorMap","addListeners","addDocument","win","inContext","cn","ln","floor","isInitialized","listenerMaps","Eventable","getExisting","globalEvents","getPointerAverage","getTouchBBox","getTouchDistance","getTouchAngle","getElementRect","getElementClientRect","matchesSelector","closest","version","use","isSet","debug","removeDocument","InteractEvent","_plugins","onWindowUnload","pluginIsInstalled","getDocIndex","un","pn","freeze","edgeTarget","elements","grid","range","limits","coordFields","hn","snappers","createSnapGrid","gn","edgeSign","mn","startRect","ratio","yn","equalDelta","linkedEdges","xIsPrimaryAxis","subModification","prevCoords","prevRect","bn","wn","En","elementRect","restriction","Tn","Sn","_n","Pn","noInner","noOuter","inner","outer","kn","Dn","t","In","Mn","zn","An","Rn","offsetWithOrigin","relativePoints","offsets","relativePoint","inRange","Cn","jn","targetFields","Fn","Xn","aspectRatio","restrictEdges","restrict","restrictRect","restrictSize","snapEdges","snap","snapSize","spring","avoid","transform","rubberband","qn","tapTime","double","prevTap","Bn","pointerEvents","Gn","Vn","eventable","holdDuration","collectEventTargets","Wn","tap","doubletap","pointerEvent","props","_subtractOrigin","_addOrigin","Nn","Un","holdIntervalHandle","clearInterval","Hn","holdRepeatInterval","holdrepeat","Jn","inertiastart","resume","reflow","_reflowPromise","_reflowResolve","$65d5daca13f5010c$exports","$20d57ad7857b7d5d$exports","trust","$8fa9e1679f027da0$exports","$65d5daca13f5010c$var$m","Fragment","parseQueryString","buildQueryString","parsePathname","buildPathname","PromisePolyfill","censor","$4827982a76523906$exports","$22dd8f6982cb874d$export$ae01dedf5c052bb","clip","paused","filename","time","volume","$22dd8f6982cb874d$export$304e9dfcb2c65a51","edl","current","durations","jump","$75d41d026a980c58$export$ca000e230c0caa3e","tool","aspectWidth","aspectHeight","resolution","$dc7ec905e041f51c$var$ownKeys","enumerableOnly","symbols","sym","$dc7ec905e041f51c$var$_objectSpread2","obj","$dc7ec905e041f51c$var$_typeof","$dc7ec905e041f51c$var$_extends","$dc7ec905e041f51c$var$_arrayLikeToArray","arr","len","arr2","$dc7ec905e041f51c$var$userAgent","pattern","$dc7ec905e041f51c$var$IE11OrLess","$dc7ec905e041f51c$var$Edge","$dc7ec905e041f51c$var$FireFox","$dc7ec905e041f51c$var$Safari","$dc7ec905e041f51c$var$IOS","$dc7ec905e041f51c$var$ChromeForAndroid","$dc7ec905e041f51c$var$captureMode","$dc7ec905e041f51c$var$on","el","$dc7ec905e041f51c$var$off","$dc7ec905e041f51c$var$matches","substring","matches","msMatchesSelector","webkitMatchesSelector","$dc7ec905e041f51c$var$closest","ctx","includeCTX","$dc7ec905e041f51c$var$R_SPACE","$dc7ec905e041f51c$var$toggleClass","classList","$dc7ec905e041f51c$var$css","prop","currentStyle","$dc7ec905e041f51c$var$matrix","selfOnly","appliedTransforms","matrixFn","DOMMatrix","WebKitCSSMatrix","CSSMatrix","MSCSSMatrix","$dc7ec905e041f51c$var$find","tagName","getElementsByTagName","$dc7ec905e041f51c$var$getWindowScrollingElement","scrollingElement","$dc7ec905e041f51c$var$getRect","relativeToContainingBlock","relativeToNonStaticParent","undoScale","elRect","containerRect","elMatrix","scaleX","scaleY","$dc7ec905e041f51c$var$getContentRect","paddingLeft","paddingTop","paddingRight","paddingBottom","clientWidth","clientHeight","$dc7ec905e041f51c$var$isScrolledPast","elSide","parentSide","$dc7ec905e041f51c$var$getParentAutoScrollElement","elSideVal","parentSideVal","$dc7ec905e041f51c$var$getChild","childNum","includeDragEl","currentChild","display","$dc7ec905e041f51c$export$31b3ca70d8f57423","ghost","dragged","$dc7ec905e041f51c$var$lastChild","last","lastElementChild","previousElementSibling","$dc7ec905e041f51c$var$index","clone","$dc7ec905e041f51c$var$getRelativeScrollOffset","offsetLeft","offsetTop","winScroller","includeSelf","elem","gotSelf","scrollWidth","scrollHeight","elemCSS","overflowX","overflowY","$dc7ec905e041f51c$var$isRectEqual","rect1","rect2","$dc7ec905e041f51c$var$throttle","ms","$dc7ec905e041f51c$var$_throttleTimeout","$dc7ec905e041f51c$var$scrollBy","$dc7ec905e041f51c$var$clone","Polymer","jQuery","Zepto","cloneNode","$dc7ec905e041f51c$var$setRect","$dc7ec905e041f51c$var$unsetRect","$dc7ec905e041f51c$var$expando","getTime","$dc7ec905e041f51c$var$plugins","$dc7ec905e041f51c$var$defaults","initializeByDefault","$dc7ec905e041f51c$var$PluginManager","plugin","option","pluginName","pluginEvent","eventName","sortable","evt","_this","eventCanceled","eventNameGlobal","initializePlugins","initialized","modified","modifyOption","getEventProperties","eventProperties","modifiedValue","optionListeners","$dc7ec905e041f51c$var$dispatchEvent","_ref","rootEl","targetEl","cloneEl","toEl","fromEl","newIndex","oldDraggableIndex","newDraggableIndex","putSortable","extraEventProperties","onName","CustomEvent","createEvent","initEvent","bubbles","cancelable","to","item","pullMode","lastPutMode","allEventProperties","dispatchEvent","$dc7ec905e041f51c$var$_excluded","$dc7ec905e041f51c$var$pluginEvent","$dc7ec905e041f51c$var$_objectWithoutProperties","excluded","$dc7ec905e041f51c$var$_objectWithoutPropertiesLoose","sourceKeys","sourceSymbolKeys","propertyIsEnumerable","dragEl","$dc7ec905e041f51c$var$dragEl","parentEl","$dc7ec905e041f51c$var$parentEl","ghostEl","$dc7ec905e041f51c$var$ghostEl","$dc7ec905e041f51c$var$rootEl","nextEl","$dc7ec905e041f51c$var$nextEl","lastDownEl","$dc7ec905e041f51c$var$lastDownEl","$dc7ec905e041f51c$var$cloneEl","cloneHidden","$dc7ec905e041f51c$var$cloneHidden","dragStarted","$dc7ec905e041f51c$var$moved","$dc7ec905e041f51c$var$putSortable","activeSortable","$dc7ec905e041f51c$var$oldIndex","$dc7ec905e041f51c$var$oldDraggableIndex","$dc7ec905e041f51c$var$newIndex","$dc7ec905e041f51c$var$newDraggableIndex","hideGhostForTarget","$dc7ec905e041f51c$var$_hideGhostForTarget","unhideGhostForTarget","$dc7ec905e041f51c$var$_unhideGhostForTarget","cloneNowHidden","cloneNowShown","dispatchSortableEvent","$dc7ec905e041f51c$var$_dispatchEvent","info","$dc7ec905e041f51c$var$activeGroup","$dc7ec905e041f51c$var$tapEvt","$dc7ec905e041f51c$var$touchEvt","$dc7ec905e041f51c$var$lastDx","$dc7ec905e041f51c$var$lastDy","$dc7ec905e041f51c$var$tapDistanceLeft","$dc7ec905e041f51c$var$tapDistanceTop","$dc7ec905e041f51c$var$lastTarget","$dc7ec905e041f51c$var$lastDirection","$dc7ec905e041f51c$var$targetMoveDistance","$dc7ec905e041f51c$var$ghostRelativeParent","$dc7ec905e041f51c$var$awaitingDragStarted","$dc7ec905e041f51c$var$ignoreNextClick","$dc7ec905e041f51c$var$sortables","$dc7ec905e041f51c$var$pastFirstInvertThresh","$dc7ec905e041f51c$var$isCircumstantialInvert","$dc7ec905e041f51c$var$ghostRelativeParentInitialScroll","$dc7ec905e041f51c$var$_silent","$dc7ec905e041f51c$var$savedInputChecked","$dc7ec905e041f51c$var$documentExists","$dc7ec905e041f51c$var$CSSFloatProperty","$dc7ec905e041f51c$var$supportDraggable","$dc7ec905e041f51c$var$supportCssPointerEvents","$dc7ec905e041f51c$var$_detectDirection","elCSS","elWidth","borderLeftWidth","borderRightWidth","child1","child2","firstChildCSS","secondChildCSS","firstChildWidth","marginLeft","marginRight","secondChildWidth","flexDirection","gridTemplateColumns","touchingSideChild2","clear","$dc7ec905e041f51c$var$_dragElInRowColumn","dragRect","targetRect","vertical","dragElS1Opp","dragElS2Opp","dragElOppLength","targetS1Opp","targetS2Opp","targetOppLength","$dc7ec905e041f51c$var$_detectNearestEmptySortable","ret","threshold","emptyInsertThreshold","insideHorizontally","insideVertically","$dc7ec905e041f51c$var$_prepareGroup","toFn","pull","sameGroup","group","otherGroup","originalGroup","checkPull","checkPut","put","revertClone","$dc7ec905e041f51c$var$nearestEmptyInsertDetectEvent","nearest","_onDragOver","$dc7ec905e041f51c$var$_checkOutsideTargetEl","_isOutsideThisEl","animationCallbackId","animationStates","sort","store","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","ghostClass","chosenClass","dragClass","ignore","preventOnFilter","animation","easing","setData","dataTransfer","dropBubble","dragoverBubble","dataIdAttr","delayOnTouchOnly","touchStartThreshold","devicePixelRatio","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","nativeDraggable","_onTapStart","captureAnimationState","fromRect","thisAnimationDuration","childMatrix","addAnimationState","removeAnimationState","$dc7ec905e041f51c$var$indexOfObject","animateAll","animating","animationTime","toRect","prevFromRect","prevToRect","animatingRect","targetMatrix","pow","animate","animationResetTimer","currentRect","translateX","translateY","animatingX","animatingY","forRepaintDummy","offsetWidth","animated","$dc7ec905e041f51c$var$_onMove","willInsertAfter","retVal","onMoveFn","onMove","draggedRect","related","relatedRect","$dc7ec905e041f51c$var$_disableDraggable","$dc7ec905e041f51c$var$_unsilent","$dc7ec905e041f51c$var$_nextTick","$dc7ec905e041f51c$var$_cancelNextTick","_getDirection","touch","originalTarget","shadowRoot","$dc7ec905e041f51c$var$_saveInputCheckedState","inputs","idx","checked","isContentEditable","criteria","_prepareDragStart","dragStartFn","_lastX","_lastY","_onDrop","_disableDelayedDragEvents","_triggerDragStart","_disableDelayedDrag","_delayedDragTouchMoveHandler","_dragStartTimer","_onTouchMove","_onDragStart","selection","empty","getSelection","removeAllRanges","_dragStarted","fallback","_appendGhost","_nulling","_emulateDragOver","elementFromPoint","inserted","ghostMatrix","relativeScrollOffset","$dc7ec905e041f51c$var$PositionGhostAbsolutely","cssMatrix","_hideClone","cloneId","_loopId","setInterval","effectAllowed","_dragStartId","revert","isOwner","canSort","fromSortable","completedFired","dragOverEvent","_ignoreWhileAnimating","completed","elLastChild","$dc7ec905e041f51c$var$_ghostIsLast","lastElRect","sortableContentRect","firstElRect","sibling","targetBeforeFirstSwap","differentLevel","differentRowCol","side1","scrolledPastTop","scrollBefore","$dc7ec905e041f51c$var$_getSwapDirection","isLastTarget","mouseOnAxis","targetLength","targetS1","targetS2","dragIndex","nextElementSibling","after","moveVector","insertion","_showClone","_offMoveEvents","_offUpEvents","save","dropEffect","toArray","order","getAttribute","$dc7ec905e041f51c$var$_generateId","sum","charCodeAt","useAnimation","items","utils","css","find","extend","dst","throttle","toggleClass","nextTick","cancelNextTick","detectDirection","getChild","_len","plugins","_key","$dc7ec905e041f51c$var$scrollEl","$dc7ec905e041f51c$var$scrollRootEl","$dc7ec905e041f51c$var$lastAutoScrollX","$dc7ec905e041f51c$var$lastAutoScrollY","$dc7ec905e041f51c$var$touchEvt$1","$dc7ec905e041f51c$var$pointerElemChangedInterval","$dc7ec905e041f51c$var$autoScrolls","$dc7ec905e041f51c$var$scrolling","$dc7ec905e041f51c$var$clearAutoScrolls","pid","$dc7ec905e041f51c$var$clearPointerElemChangedInterval","$dc7ec905e041f51c$var$autoScroll","isFallback","scrollCustomFn","sens","scrollSensitivity","scrollSpeed","scrollThisInstance","scrollFn","layersOut","currentParent","canScrollX","canScrollY","scrollPosX","scrollPosY","vx","vy","layer","scrollOffsetY","scrollOffsetX","bubbleScroll","$dc7ec905e041f51c$var$drop","toSortable","onSpill","$dc7ec905e041f51c$var$Revert","$dc7ec905e041f51c$var$Remove","startIndex","dragStart","_ref2","_ref3","_ref4","parentSortable","$dc7ec905e041f51c$var$lastMultiDragSelect","$dc7ec905e041f51c$var$multiDragSortable","$dc7ec905e041f51c$var$dragEl$1","$dc7ec905e041f51c$var$clonesFromRect","$dc7ec905e041f51c$var$clonesHidden","$dc7ec905e041f51c$var$multiDragElements","$dc7ec905e041f51c$var$multiDragClones","$dc7ec905e041f51c$var$initialFolding","$dc7ec905e041f51c$var$folding","$dc7ec905e041f51c$var$dragStarted","$dc7ec905e041f51c$var$insertMultiDragClones","elementsInserted","sortableIndex","$dc7ec905e041f51c$var$removeMultiDragElements","multiDragElement","AutoScroll","forceAutoScrollFallback","_handleAutoScroll","_handleFallbackAutoScroll","dragOverCompleted","dragOverBubble","nulling","ogElemScroller","newElem","$65AEs","$e6f0a14715dbdf71$exports","$e6f0a14715dbdf71$var$Mon","$0c848907285c315f$var$whichAmI","seek","currentTime","seekEdl","clipTime","toFixed","load","play","pause","faster","parseFloat","playbackRate","slower","resetSpeed","controls","preload","$0c848907285c315f$export$2e2bcd8739ae039","inpoint","outpoint","description","$0c848907285c315f$require$state","$95330ca74a9dfc2d$export$e6a97ba2cae5bb94","updateEdl","loadEdl","offsetX","parentElement","newClip","getElementById","$43de37786be4adb0$export$4792e48abc550fa1","MultiDrag","avoidImplicitDeselect","_deselectMultiDrag","_checkKeyDown","_checkKeyUp","selectedClass","multiDragKey","multiDragKeyDown","isMultiDrag","delayStartGlobal","delayEnded","setupClone","showClone","hideClone","_ref5","dragStartGlobal","_ref6","multiDrag","_ref7","_this2","dragOver","_ref8","_ref9","clonesInserted","_ref10","dragRectAbsolute","clonesHiddenBefore","dragOverAnimationCapture","_ref11","dragMatrix","dragOverAnimationComplete","_ref12","lastIndex","currentIndex","multiDragIndex","nullingGlobal","destroyGlobal","shift","select","deselect","_this3","oldIndicies","newIndicies","$dc7ec905e041f51c$var$_arrayWithoutHoles","$dc7ec905e041f51c$var$_iterableToArray","iter","$dc7ec905e041f51c$var$_unsupportedIterableToArray","minLen","$dc7ec905e041f51c$var$_nonIterableSpread","clones","$95330ca74a9dfc2d$require$CSVToArray","strData","strDelimiter","objPattern","arrData","arrMatches","strMatchedDelimiter","strMatchedValue","$95330ca74a9dfc2d$require$edlToSeconds","clips","attributes","$95330ca74a9dfc2d$require$state","onUpdate","removeOnSpill","$37d0566241e39315$exports","formatTime","seconds","elapsed","slider","sliderWidth","$cc19313c82e913d3$export$b94310965bed44e6","$1eeac253570f845a$var$e","$1eeac253570f845a$var$r","atob","fromCharCode","$1eeac253570f845a$export$b9721ef022f71a68","$1eeac253570f845a$export$2e2bcd8739ae039","header","$1eeac253570f845a$var$t","$89b291c8bc281326$exports","$98d6fbf968cbb475$export$73693bad9f5880b0","opts","Authorization","$d53863f8c6f341c9$export$1f44aaf2ec115b54","token","res","login","redirect","window1","NOT_DISABLED_NOT_RESET","ENTER","ESC","F1","F12","LEFT","RIGHT","TAB","autoReset","basic","closable","closableByDimmer","invokeOnCloseOff","frameless","defaultFocusOff","maintainFocus","maximizable","modal","movable","moveBounded","overflow","padding","pinnable","pinned","preventBodyShift","startMaximized","transition","transitionOff","tabbable","notifier","position","closeButton","center","visible","hidden","close","glossary","ok","acccpt","deny","confirm","decline","maximize","restore","theme","preinit","postinit","openDialogs","addClass","classNames","removeClass","toBeRemoved","isRightToLeft","getScrollTop","getScrollLeft","clearContents","copy","cpy","ignoreCase","multiline","destruct","initialize","settings","__settings","__init","__internal","IsPassiveSupported","useCapture","supported","transitions","delegate","createCloseEvent","dialog","usedKeys","tabindex","isSafari","templates","dimmer","reset","commands","footer","primary","auxiliary","resizeHandle","animationIn","animationOut","fixed","maximized","modeless","noSelection","noOverflow","noPadding","shake","unpinned","noTransition","alertify","setup","buttonsDefinition","ref","internal","isOpen","timerIn","timerOut","onshow","onclosing","onclose","onfocus","onmoved","onresize","onresized","onmaximize","onmaximized","onrestore","onrestored","resetHandler","beginMoveHandler","beginResizeHandler","bringToFrontHandler","modalClickHandler","buttonsClickHandler","commandsClickHandler","transitionInHandler","transitionOutHandler","pin","buttonTemplate","opKey","onReset","beginMove","beginResize","bringToFront","handleTransitionInEvent","handleTransitionOutEvent","build","restoreScrollPosition","scrollTo","ensureNoOverflow","requiresNoOverflow","isModal","isMaximized","topScroll","setFocus","op","found","triggerClose","triggerCallback","invokeOnClose","srcElement","isPinned","unpin","addAbsPositionFix","marginTop","removeAbsPositionFix","updateAbsPositionFix","cancelClick","modalClickHandlerTS","callbackTS","cancelKeyup","closeEvent","keyupHandler","keyCode","keydownHandler","resetTarget","firstReset","lastReset","lastFocusedElement","within","findTabbable","tabbables","reverse","offsetParent","offsetHeight","recycleTab","resetMove","resetResize","offsetY","xProp","yProp","bounds","refreshTop","moveDelegate","moveElement","moveElementBounded","maxLeft","minLeft","maxTop","minTop","eventSrc","targetTouches","endMove","startingLeft","Nan","startingWidth","minWidth","handleOffset","minHeight","maxWidth","resizeElement","pageRelative","isRTL","diff","endResize","windowResize","bindModelessEvents","unbindModelessEvents","bindMovableEvents","unbindMovableEvents","bindResizableEvents","unbindResizableEvents","moveTo","resizeTo","regex","setting","optionUpdated","oldValue","newValue","setHeader","settingUpdated","setContent","showModal","show","hasAttribute","prepare","closeOthers","closeAll","openInstances","baseClass","updatePosition","div","clearTimers","timer","transitionTimeout","_content","_wait","pushed","wait","clickHandler","ondismiss","dismiss","clicked","transitionEndHandler","dismissOthers","dismissAll","transitionDone","except","dialogs","sub","get_dialog","Factory","transient","definition","notify","warning","main","_title","_message","_onok","onok","setMessage","label","returnValue","autoConfirm","task","clearAutoConfirm","startAutoConfirm","_oncancel","oncancel","labels","defaultFocus","reverseButtons","autoOk","autoCancel","_value","define","amd","$98d6fbf968cbb475$export$21a94553ffa41578","username","form","logout","prompt","first_name","email","$98d6fbf968cbb475$export$cad1a703886b4e3a","jwt","loggedIn","localStorage","setItem","removeItem","$ecb8f3b69b3e0f46$export$ca6fbb51b35e375c","projects","$bdfa56e2d7b9b984$export$22c59631e6c46e5a","$3ccf69c8ded49b26$export$3e4ff2216a90b8a4","$3ccf69c8ded49b26$require$state","onchange","opt","$3ccf69c8ded49b26$export$403b19f90abd052f","$d3adc0dc5c0e930a$export$123539912283e31c","$d3adc0dc5c0e930a$export$5e1c87f561bdb6c8","$d3adc0dc5c0e930a$export$8af178eeca6d02ea","resp","project","$d3adc0dc5c0e930a$require$state","$880c6aed43944db1$export$532ea57f7c892d6e","objectId","$880c6aed43944db1$export$d259c86defeb4608","link","txt","execCommand","$880c6aed43944db1$export$e2a5113ff815c2ab","autoplay","$880c6aed43944db1$export$eaf7822a8f6a78d6","preview","renders","getRenders","checkRenders","date","days","toLocaleTimeString","toLocaleString","issue","lose","status_code","$d40041a1f594fd32$var$urlfy","$d40041a1f594fd32$export$4a96334d5925dbf2","$d40041a1f594fd32$export$ee45c20555d0eaba","$d40041a1f594fd32$export$133773870222880f","$d40041a1f594fd32$require$state","$2188d3836cd50cfb$exports","$2188d3836cd50cfb$export$a7fed597f4b8afd8","$2188d3836cd50cfb$export$5f1af8db9871e1d6","$2188d3836cd50cfb$export$379139ebc1c2b235","$2188d3836cd50cfb$export$353f5b6fc5456de1","$2188d3836cd50cfb$export$892596cec99bc70e","$2188d3836cd50cfb$export$cc7b5f925acc71d3","$2188d3836cd50cfb$export$3e431a229df88919","$2188d3836cd50cfb$export$d15f4cd5286f9b1e","$2188d3836cd50cfb$export$6e2c8f0811a474ce","$2188d3836cd50cfb$export$c84671f46d6a1ca","$e3655bb830efdd39$exports","$0e686a53b040bd4d$export$d9b273488cd8ce6f","toggle","$0e686a53b040bd4d$export$c2dd313c040ea211","$0e686a53b040bd4d$export$a6c7ac8248d6e38a","$0e686a53b040bd4d$export$b2e089eb3692b073","URL","startsWith","$3f78d5f92d9885c3$export$a06f1c675e846f6f","for","$9173046a4a2c2474$export$833b3e5a19fb8939","field","$7238a34a955809b2$var$runtime","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","innerFn","outerFn","tryLocsList","generator","protoGenerator","Generator","Context","GenStateSuspendedStart","arg","GenStateExecuting","GenStateCompleted","doneResult","delegateResult","maybeInvokeDelegate","methodName","ContinueSentinel","record","tryCatch","done","resultName","nextLoc","sent","_sent","dispatchException","abrupt","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","NativeIteratorPrototype","Gp","defineIteratorMethods","_invoke","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","invoke","__await","unwrapped","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iterable","iteratorMethod","displayName","isGeneratorFunction","genFun","ctor","mark","awrap","skipTempReset","rootRecord","rootEntry","rval","exception","loc","caught","hasCatch","hasFinally","finallyEntry","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function","$12ab4b555e4e721f$exports","$12ab4b555e4e721f$var$clamp","$12ab4b555e4e721f$var$isIOS","$12ab4b555e4e721f$var$iOSHackApplied","$12ab4b555e4e721f$var$quantize","step","steps","ceil","quantize","elHit","elBar","elBar0","elBar1","elHandle","rcBar","ondrag","device","pressed","startValue","orientation","onMouseDown","onMouseMove","onMouseUp","onPress","onRelease","onTouchStart","onTouchMove","onTouchEnd","onKeyDown","newVal","setStyles","moveHandle","barLength","positionStyle","ps","rps","_a","handleStyle","bar0Style","bar1Style","tabIndex","role","ariaLabelledby","$99853b4cdba0c969$export$217b4a9f5766d4d4","_logic","resumable","_input","logic","$99853b4cdba0c969$var$defaultOptions","mutateKey","mutateValue","skipCopy","$99853b4cdba0c969$export$be4f7f3aef5d45f6","yields","$99853b4cdba0c969$var$fetchYields","$99853b4cdba0c969$var$traverseCopy","$99853b4cdba0c969$var$checkYield","$99853b4cdba0c969$var$asyncIterators","defaultValue","$99853b4cdba0c969$var$Sync","$99853b4cdba0c969$var$Override","$99853b4cdba0c969$var$isSync","$99853b4cdba0c969$var$declareSync","$99853b4cdba0c969$var$r","$99853b4cdba0c969$var$rAsync","$99853b4cdba0c969$var$buildString","buildState","notTraversed","functions","above","processing","engine","pushValue","preserveObject","Infinity","includes","asyncDetected","makeAsync","useContext","permissive","disableInline","$99853b4cdba0c969$var$isDeterministic$2","lower","traverse","deterministic","$99853b4cdba0c969$var$isDeepSync","avoidInlineAsync","yieldSupported","$99853b4cdba0c969$var$buildYield","yieldUsed","stringBuildState","inputStr","compile","asyncBuild","builder","$99853b4cdba0c969$var$build","$99853b4cdba0c969$var$processBuiltString","gen","copyStateCall","eval","$99853b4cdba0c969$var$chainingSupported","$99853b4cdba0c969$var$getIsOptionalChainingSupported","isUndefined","$99853b4cdba0c969$var$InvalidControlInput","$99853b4cdba0c969$var$ReduceIterator","nextCall","_position","skip","dump","$99853b4cdba0c969$var$AsyncReduceIterator","$99853b4cdba0c969$var$isDeterministic$1","$99853b4cdba0c969$var$ifYield","yield","_name","$99853b4cdba0c969$var$someYield","$99853b4cdba0c969$var$createArrayIterativeMethod$1","currentItem","$99853b4cdba0c969$var$everyYield","$99853b4cdba0c969$var$filterYield","$99853b4cdba0c969$var$mapYield","$99853b4cdba0c969$var$reduceYield","accumulator","defaultInitializer","insideIterator","selectFunction","mapFunction","defaultCur","selected","$99853b4cdba0c969$export$824c337f43f2b64d","separator","escape","parts","char","$99853b4cdba0c969$var$isDeterministic","$99853b4cdba0c969$var$defaultMethods","in","preserve","if","onFalse","onTrue","xor","or","and","notFound","subProps","allowFunctions","var","missing","missing_some","needCount","$99853b4cdba0c969$var$createArrayIterativeMethod","none","arrays","mapState","detectAsync","not","cat","eachKey","condition","pieces","varTop","Set","$99853b4cdba0c969$export$7d60df12ed556f50","someYield","everyYield","filterYield","mapYield","reduceYield","ifYield","$99853b4cdba0c969$export$c03b5e17854f9221","_parse","parsedData","shouldTraverse","addMethod","addModule","annotations","getOwnPropertyNames","constructedFunction","$5b1641ca184fea1a$export$da4bcb8500ed9b65","fields","loading","fromEntries","ffmpeg_params","quality","project_id","fps","$505bd04b6527b6c0$exports","$505bd04b6527b6c0$require$m","$505bd04b6527b6c0$var$renderCollapsed","propStr","pathStr","statusLookup","$505bd04b6527b6c0$var$renderExpanded","tree","paths","collapseAfter","divs","newpath","$505bd04b6527b6c0$var$renderTree","collapsed","initialVnode","$2a5c75a353ebafa5$export$72b66677513e0cef","projectName","$65de353d4f6468ba$export$e93312b7773dfcac","$65de353d4f6468ba$require$state","$8262638a2f185ab5$var$t","$8262638a2f185ab5$export$15d656b6f5aa1ba8","lastHtml","clipboardData","getData","pasteAsPlainText","cleanupHtml","preventNewline","selectAllOnFocus","onblur","oninput","onpaste","onkeypress","$dc360f619821288e$export$9907240837c74db","original_width","original_mouse_x","$dc360f619821288e$require$state","movementX","getPropertyValue","$dc360f619821288e$export$14416b8d99d47caa","onkeydown","$dc360f619821288e$export$549c3bd210462fa5","$dc360f619821288e$export$509b1ad5a8dc36f0","old_index","new_index","$814c1d11c1f7e12f$var$Bin","videos","onEnd","datastr","$c6a8d06c14eaca08$require$formatTime","$c6a8d06c14eaca08$export$c7bb7bfc56e79955","$9ffa454b1b7cb1a3$export$2e2bcd8739ae039","$9ffa454b1b7cb1a3$require$state","$ca1543b41bbd74a8$var$minv","$ca1543b41bbd74a8$var$scale","$ca1543b41bbd74a8$var$maxv","$ca1543b41bbd74a8$var$maxp","$ca1543b41bbd74a8$export$d9c53faf2c4538f4","$ca1543b41bbd74a8$export$5faf06e8a1a0bc80","$ca1543b41bbd74a8$export$341ecdfed83689f3","$ca1543b41bbd74a8$require$state","$ca1543b41bbd74a8$export$d60cfc58d3c358b6","$28edbe48ebdea224$exports","matchMedia","credentials","isWindow","thing","realWindow","getWindow","_typeof","_window","opposite","dragOptions","this","drag$1","domObjects","blank","domObjects$1","browser$1","nodeContains","getParent","getNodeParents","limit","parentParent","parents","matchesUpTo","getActualElement","clientRect","relevantWindow","getPath","trySelector","dest","getStringOptionResult","resolveRectLike","functionArgs","rectToXY","tlbrToXywh","addEdges","getOriginXY","actionName","actionOptions","_typeOrPrefix","_i2","_listeners2","hypot","VENDOR_PREFIXES","pointerExtend","_loop","copyCoords","setZeroCoords","targetObj","isNativePointer","getXY","getPageXY","getPointerId","setCoords","pointerAverage","getClientXY","getTouchPair","average","touchBBox","minX","minY","maxX","maxY","touchDistance","sourceX","sourceY","touchAngle","getPointerType","getEventTargets","domUtils","BaseEvent","_classCallCheck","_createClass","findIndex","DropEvent","_BaseEvent","_inherits","_super","_createSuper","deactivateEvent","fireActivationEvents","_i6","_activeDrops$slice2","_activeDrops$slice2$_","dragElement","drops","_interactables$list2","_i4","_dropzone$getAllEleme2","dropzoneElement","collectDropzones","_i8","activeDrop","validDrops","_i10","_dropState$activeDrop2","_dropState$activeDrop3","isValid","dropIndex","deepestNodeIndex","higherNode","lowerNode","deepestNodeParents","currentNode","deepestNode","currentNodeParent","deepestNodeParent","ancestryStart","currentNodeParents","commonIndex","higherIndex","lowerIndex","_pointerEvent","dropEvents","onEventCreated","dropResult","interact","normalizeListeners","prevListeners","dropzoneMethod","dropElement","dropped","dropOverlap","pointerUtils","horizontal","cx","cy","dropCheckMethod","drop$1","updateGestureProps","starting","ending","gestureOptions","gesture$1","checkResizeEdge","interactableElement","edge","updateEventAxes","resizeEvent","initCursors","invertible","_interaction$_rects","swap","resizeOptions","resizeEdges","cursorKey","resize$1","lastTime","raf","vendors","vendor","currTime","timeToCall","getContainer","prevScroll","getScroll","curScroll","_options$actionName$a","autoScrollPlugin","autoScroll$1","warnOnce","warned","copyAction","InteractableMethods","defaultActionChecker","validateMatches","matchElements","matchElement","matchAction","getActionInfo","pushMatches","actionInfo","setInteractionCursor","maxActions","autoStartMax","activeInteractions","interactableCount","elementCount","_scope$interactions$l2","otherAction","setCursor","prevCursorElement","prepareOnMove","startOnMove","autoStart$2","dragAxis","absX","absY","targetOptions","currentAxis","getDraggable","thisAxis","checkStartAxis","basePlugin","hold$1","onInteractionEvent","interactablePreventDefault","docOptions","isNonNativeEvent","Modification","createResult","modifierList","actionModifiers","getModifierList","_this$states2","unmodifiedRect","unmodifiedEdges","newResult","_state$methods","lastModifierCoords","rectUtils","rectChanged","curCoords","curDelta","_ref3$_i","coordsSet","adjustment","doPreend","endPosition","_this$states4","_modifierList$index","_ref4$interaction","_modification$result","_i12","_ref6$_i","requireEndOnly","other","makeModifier","modifier","_options","addEventModifiers","modifiersBase","_assertThisInitialized","PointerInfo","_ProxyValues","_ProxyMethods","idCounter","signalArg","that","_loop2","duplicateMove","endPhaseResult","curPointer","_this$interactable","beforeAction","applyPending","hasPending","addToCoords","addTotal","offset$1","InertiaState","getOptions","velocityClient","pointerSpeed","startVelocity","lambda","inertiaDur","tickFn","startX","startY","cpX","cpY","endX","endY","_this4","newOffset","progress","_getQBezierValue","_this5","easeOutQuad","p1","p2","p3","iT","inertia$1","fireUntilImmediateStopped","eventList","_listeners$type2","subListener","_element","FakeEvent","pExtend","optionsMatch","_scope$document","eventsMethods","optionalArg","_i3","delegates","matchFound","targetIndex","typeIsEmpty","typeListeners","fakeEvent","_i5","finder","details","_finder$methodOrder2","firstNonActive","_scope$interactions$l4","hasPointerId","_scope$interactions$l6","_scope$interactions$l8","_scope$interactions$l10","finder$1","_pointerUtils$getEven","_event$changedTouches2","changedTouch","getInteraction","invalidPointer","_matches$_i","eventMethodName","eventMethod","eventOptions","_i14","_docEvents$_i","releasePointersOnRemovedEls","_interaction$pointers2","_InteractionBase","_class","InteractionBase","interactions$1","OnOffMethod","defaultContext","scopeEvents","_this$_actions$map$ac","actionFilter","optionName_","optionName","optionValue","targetNode","typeArg","listenerArg","_listeners$_type2","actionName_","delegated","_delegated$i","InteractableSet","interactablesOnTarget","isSelector","_this$list2","Scope","process","_type2","_this$scope$interacti2","createInteractStatic","_InteractableBase","_class2","_get","_getPrototypeOf","InteractableBase","_this$listenerMaps2","initScope","pluginIdRoot","otherId","docIndex","interact$1","_global","xField","yField","gridFunc","_grid$limits","_grid$offset","_coordFields$_i","gridx","gridy","snappersPlugin","allSnappers","_state$options","_state$options2","sign","_objectSpread","initialCoords","aspectMethod","setEqualDelta","setRatio","correctedRect","newHeight","newWidth","aspectRatio$1","noop","getRestrictionRect","widthDiff","heightDiff","restrict$1","fixRect","restrictEdges$1","restrictRect$1","noMin","noMax","restrictSize$1","minSize","maxSize","snapOffset","optionsOrigin","getOrigin","offsetRect","relativeX","relativeY","snapTarget","snap$1","relative","_state$targetFields2","_state$targetFields2$","snapSize$1","_all","modifiers$1","interval","originX","originY","clearHold","minDuration","_signalArg$targets2","downAndStartHold","tapAfterUp","_arg$targets","_interaction$pointers","endHoldRepeat","holdRepeat","enderTypes","holdRepeat$1","__backCompatOption","interactableTargets","promises","reflowPromise","runningInteraction","xywh","startReflow","doReflow","reflow$1","_unused","InvalidCharacterError","bs","buffer","bc","output","b64DecodeUnicode","InvalidTokenError","base64_url_decode"],"version":3,"file":"index.80acf4f7.js.map"}