diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..2193baf --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,32 @@ +{ + "root": true, + "env": { + "browser": true, + "es2021": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "sourceType": "module", + "ecmaVersion": 12 + }, + "rules": { + "indent": [ + "error", + 2 + ], + "no-unused-vars": [ + "error", + { + "args": "none" + } + ], + "quotes": [ + "error", + "double" + ], + "semi": [ + "error", + "always" + ] + } +} diff --git a/.gitignore b/.gitignore index 5148e52..99f2ed6 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,6 @@ jspm_packages # Optional REPL history .node_repl_history + +# Parcel +.parcel-cache diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 91f833d..0000000 --- a/.jshintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "undef": true, - "unused": "vars", - "browser": true, - "node": true, - "eqnull": true, - "esnext": true, - "indent": 4 -} diff --git a/README.md b/README.md index bf400af..604b590 100644 --- a/README.md +++ b/README.md @@ -4,104 +4,114 @@ ![Electron Tab Demo](screenshot.jpg) +## Features + +* :electron: Compatible with Electron ≥ 17. +* :lock: Compliant with [Electron security recommendations](https://www.electronjs.org/docs/latest/tutorial/security) (works without `nodeIntegration: true`). +* :toolbox: Written with TypeScript and Web Components. +* :hand: Supports drag and drop out of the box. +* :art: Easily customizable. + ## Installation -``` -$ npm install --save electron-tabs +```bash +npm install --save electron-tabs ``` -## Demo +## Getting started -``` -$ npm run demo -``` - -## Usage - -Electron-tabs uses webviews, so you first need to use the following `webPreferences` options in the main process: +Define the following `webPreferences` options in the main process: ```js const mainWindow = new electron.BrowserWindow({ webPreferences: { - nodeIntegration: true, - contextIsolation: false, // needed for Electron >= 12.x webviewTag: true } }); ``` -Then add the following elements to the app page: +Then add the following markup where you want the tabs to display: ```html -
-
-
-
-
+ + + ``` -And call the module in the renderer process: +## Options -```javascript -const TabGroup = require("electron-tabs"); -``` - -Now you can initialize a tab group and add tabs to it: - -```javascript -let tabGroup = new TabGroup(); -let tab = tabGroup.addTab({ - title: "Electron", - src: "http://electron.atom.io", - visible: true -}); -``` - -If you don't want to write your own styles, you can also insert the sample electron-tabs stylesheet in the page header: +You can add options by setting `` element attributes: ```html - + ``` -### Note +The following attributes are supported: -Please note, there is a known issue in some versions of Electron that prevents the process to completely shut down and it remains hanging in Background Processes (Windows 10). If you encounter that issue please use the workaround provided at https://github.com/electron/electron/issues/13939 +* `close-button-text` (string): text of the tabs "Close" button. +* `new-tab-button` (boolean): set it to true to display the "New Tab" button. +* `new-tab-button-text` (string): text of the "New Tab" button. +* `sortable` (boolean): set it to true to make the tabs sortable by drag and drop. +* `visibility-threshold` (number): the minimum number of tabs necessary for the tab bar to be displayed. 0 (default) means that it will always remain visible. -## API +## Methods -### Tab Group +Use `TabGroup` methods and manipulate tabs in a script after calling `electron-tabs.js`. -Represents the main tab container. +```html + -#### `new TabGroup(options)` + -`options` must be an object. The following options are available: + +``` + +### TabGroup #### `tabGroup.addTab(options)` -Add a new tab to the tab group and returns a `Tab` instance. +Add a new tab and returns the related `Tab` instance. * `title`: tab title. * `src`: URL to the page which will be loaded into the view. This is actually the same than `options.webview.src`. -* `badge`: optional text to put into a badge, badge will be hidden if it's falsey +* `badge`: optional text to put into a badge, badge will be hidden if false. * `iconURL`: optional URL to the tab icon. * `icon`: optional code for a tab icon. Can be used with symbol libraries (example with Font Awesome: `icon: 'fa fa-icon-name'`). This attribute is ignored if an `iconURL` was given. * `closable` (default: `true`): if set to `true` the close button won't be displayed and the user won't be able to close the tab. See also `tab.close()`. -* `webviewAttributes`: attributes to add to the webview tag. See [webview documentation](http://electron.atom.io/docs/api/web-view-tag/#tag-attributes). * `visible` (default: `true`): set this to `false` if you don't want to display the tab once it is loaded. If set to `false` then you will need to call `tab.show()` to display the tab. * `active` (default: `false`): set this to `true` if you want to activate the tab once it is loaded. Otherwise you will need to call `tab.activate()`. * `ready`: a callback function to call once the tab is ready. The `Tab` instance is passed as the only parameter. +* `webviewAttributes`: attributes to add to the webview tag. See [webview documentation](http://electron.atom.io/docs/api/web-view-tag/#tag-attributes). + +### `tabGroup.setDefaultTab(options)` + +Define default options to use for creating the tab when the "New Tab" button is clicked or when calling `tabGroup.addTab()` with no parameter. + +```javascript +tabGroup.setDefaultTab({ + title: "New Page", + src: "path/to/new-page.html", + active: true +}); +``` #### `tabGroup.getTab(id)` @@ -123,17 +133,17 @@ To get the tab in the rightmost position: tabGroup.getTabByPosition(-1); ``` -> Note: Position 0 does not contain a tab. - #### `tabGroup.getTabByRelPosition(position)` Retrieve an instance of `Tab` from this `position` relative to the active tab (return `null` if not found). + `tabGroup.getNextTab()` is an alias to `tabGroup.getTabByRelPosition(1)`. + `tabGroup.getPreviousTab()` is an alias to `tabGroup.getTabByRelPosition(-1)`. #### `tabGroup.getActiveTab()` -Return the currently active tab (otherwise return `null`). +Return the active tab (return `null` if none). #### `tabGroup.getTabs()` @@ -179,7 +189,7 @@ Get current tab icon URL / icon. #### `tab.setPosition(newPosition)` -Move tab to the specified position. If `position` is 0 then `null` is returned and nothing happens. See [`tabGroup.getTabByPosition`](#tabgroupgettabbypositionposition) for information about positions. +Move tab to the specified position. See [`tabGroup.getTabByPosition`](#tabgroupgettabbypositionposition) for information about positions. #### `tab.getPosition(fromRight)` @@ -193,30 +203,17 @@ Activate this tab. The class "active" is added to the active tab. Toggle the "visible" class on the tab. `tab.hide()` is an alias to `tab.show(false)`. -#### `tab.flash(flag)` - -Toggle the "flash" class on the tab. `tab.unflash()` is an alias to `tab.flash(false)`. - #### `tab.hasClass(classname)` -Return `true` if the tab element has the specified classname. Useful for checking if a tab is "active", "visible" of "flash". +Return `true` if the tab element has the specified classname. Useful for checking if a tab is "active" or "visible". #### `tab.close(force)` Close the tab (and activate another tab if relevant). When `force` is set to `true` the tab will be closed even if it is not `closable`. -### Access webview element +## Events -You can access the webview element and use its methods with through the `Tab.webview` attribute. See [webview documentation](https://electronjs.org/docs/api/webview-tag#methods). - -```javascript -let webview = tab.webview; -webview.loadURL("file://path/to/new/page.html"); -``` - -### Events - -The following events are available: +The following events are emitted: * `tabGroup.on("tab-added", (tab, tabGroup) => { ... });` * `tabGroup.on("tab-removed", (tab, tabGroup) => { ... });` @@ -230,8 +227,6 @@ The following events are available: * `tab.on("inactive", (tab) => { ... });` * `tab.on("visible", (tab) => { ... });` * `tab.on("hidden", (tab) => { ... });` -* `tab.on("flash", (tab) => { ... });` -* `tab.on("unflash", (tab) => { ... });` * `tab.on("close", (tab) => { ... });` * `tab.on("closing", (tab, abort) => { ... });` (Use `abort()` function to cancel closing) @@ -240,37 +235,100 @@ You can also use `tab.once` to automatically remove the listener when invoked: * `tab.once("webview-ready", (tab) => { ... });` * `tab.once("webview-dom-ready", (tab) => { ... });` -## Drag and drop support +## Access Electron webview element -Electron-tabs is compatible with [Dragula](https://github.com/bevacqua/dragula) so you can easily make your tabs draggable. - -Install Dragula: - -``` -npm install dragula --save -``` - -Don't forget to add a link to its stylesheet in the header: - -```html - -``` - -Then call Dragula in your script once tabGroup is ready: +You can access the webview element and use its methods with through the `Tab.webview` attribute. See [webview documentation](https://electronjs.org/docs/api/webview-tag#methods). ```javascript -const TabGroup = require("electron-tabs"); -const dragula = require("dragula"); +let webview = tab.webview; +webview.loadURL("file://path/to/new/page.html"); +``` -var tabGroup = new TabGroup({ - ready: function (tabGroup) { - dragula([tabGroup.tabContainer], { - direction: "horizontal" - }); - } -}); +## Custom styles + +To customize tab-group styles, set new values to [electron-tabs CSS variables](https://github.com/brrd/electron-tabs/blob/master/src/style.css) in your application stylesheet. + +Since `TabGroup` is a Web Component you won't be able to change its styles directly from your app stylesheet. If you need more control over it then you can add a ` + +``` + +This method is particularly useful when you need to define custom badges or tab styles: + +```html + + + + + + + +``` + +## Development + +`electron-tabs` uses TypeScript and Parcel under the hood. + +### Requirements + +Git and Node 12+. + +### Build + +```bash +# Clone this repo +git clone git@github.com:brrd/electron-tabs.git +cd electron-tabs + +# Install dependencies +npm install + +# Build +npm run build + +# ...or watch +npm run watch +``` + +### Demo + +```bash +npm run demo ``` ## License -The MIT License (MIT) - Copyright (c) 2016 Thomas Brouard +The MIT License (MIT) - Copyright (c) 2022 Thomas Brouard diff --git a/declarations.d.ts b/declarations.d.ts new file mode 100644 index 0000000..cbe652d --- /dev/null +++ b/declarations.d.ts @@ -0,0 +1 @@ +declare module "*.css"; diff --git a/demo/app.js b/demo/app.js index d9763cb..575222f 100644 --- a/demo/app.js +++ b/demo/app.js @@ -1,16 +1,14 @@ -const electron = require('electron'); +const electron = require("electron"); const app = electron.app; -app.on('ready', function () { +app.on("ready", function () { const mainWindow = new electron.BrowserWindow({ webPreferences: { - nodeIntegration: true, - contextIsolation: false, webviewTag: true } }); - mainWindow.loadURL('file://' + __dirname + '/electron-tabs.html'); - mainWindow.on('ready-to-show', function () { + mainWindow.loadURL("file://" + __dirname + "/electron-tabs.html"); + mainWindow.on("ready-to-show", function () { mainWindow.show(); mainWindow.focus(); }); diff --git a/demo/electron-tabs.html b/demo/electron-tabs.html index 5a4944a..ec9c68f 100644 --- a/demo/electron-tabs.html +++ b/demo/electron-tabs.html @@ -3,39 +3,58 @@ electron-tabs-demo - -
-
-
-
-
- + + + + diff --git a/demo/mark-github.svg b/demo/mark-github.svg new file mode 100644 index 0000000..320c3db --- /dev/null +++ b/demo/mark-github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/demo/page.html b/demo/page.html new file mode 100644 index 0000000..5ce2b09 --- /dev/null +++ b/demo/page.html @@ -0,0 +1,13 @@ + + + + + + + Local Page + + +

Hello World!

+

This is a local page.

+ + diff --git a/dist/electron-tabs.d.ts b/dist/electron-tabs.d.ts new file mode 100644 index 0000000..695e8a6 --- /dev/null +++ b/dist/electron-tabs.d.ts @@ -0,0 +1,96 @@ +import Sortable from "sortablejs"; +interface TabGroupOptions { + closeButtonText: string; + defaultTab: TabOptions | ((tabGroup: TabGroup) => TabOptions); + newTabButton: boolean; + newTabButtonText: string; + sortable: boolean; + sortableOptions?: Sortable.Options; + visibilityThreshold: number; +} +interface TabOptions { + active?: boolean; + badge?: Badge; + closable?: boolean; + icon?: string; + iconURL?: string; + ready?: ((tab: Tab) => void); + src?: string; + title?: string; + visible?: boolean; + webviewAttributes?: { + [key: string]: any; + }; +} +interface Badge { + text: string; + classname: string; +} +export class TabGroup extends HTMLElement { + buttonContainer: HTMLDivElement; + isReady: boolean; + newTabId: number; + options: TabGroupOptions; + shadow: ShadowRoot; + tabContainer: HTMLDivElement; + tabs: Array; + viewContainer: HTMLDivElement; + constructor(); + emit(type: string, ...args: any[]): void; + on(type: string, fn: (...detail: any[]) => void): void; + once(type: string, fn: (detail: string) => void): void; + connectedCallback(): void; + initSortable(): void; + setDefaultTab(tab: TabOptions): void; + addTab(args?: TabOptions | ((tabGroup: TabGroup) => TabOptions)): Tab; + getTab(id: number): Tab; + getTabByPosition(position: number): Tab; + getTabByRelPosition(position: number): Tab; + getNextTab(): Tab; + getPreviousTab(): Tab; + getTabs(): Tab[]; + eachTab(fn: (tab: Tab) => void): void; + getActiveTab(): Tab; + setActiveTab(tab: Tab): void; + removeTab(tab: Tab, triggerEvent?: boolean): void; + activateRecentTab(): void; +} +export class Tab extends EventTarget { + badge: Badge; + closable: boolean; + element: HTMLDivElement; + icon: string; + iconURL: string; + id: number; + isClosed: boolean; + isReady: boolean; + spans: { + [key: string]: HTMLSpanElement; + }; + tabGroup: TabGroup; + title: string; + webview: HTMLElement; + webviewAttributes: { + [key: string]: any; + }; + constructor(tabGroup: TabGroup, id: number, args: TabOptions); + emit(type: string, ...args: any[]): void; + on(type: string, fn: (...detail: any[]) => void): void; + once(type: string, fn: (detail: string) => void): void; + initWebview(): void; + setTitle(title: string): this; + getTitle(): string; + setBadge(badge?: Badge): void; + getBadge(): Badge; + setIcon(iconURL: string, icon: string): this; + getIcon(): string; + setPosition(newPosition: number): this; + getPosition(fromRight?: boolean): number; + activate(): this; + show(flag?: boolean): this; + hide(): this; + hasClass(classname: string): boolean; + close(force: boolean): void; +} + +//# sourceMappingURL=electron-tabs.d.ts.map diff --git a/dist/electron-tabs.d.ts.map b/dist/electron-tabs.d.ts.map new file mode 100644 index 0000000..4688f4e --- /dev/null +++ b/dist/electron-tabs.d.ts.map @@ -0,0 +1 @@ +{"mappings":";AAQA;IACE,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,UAAU,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,UAAU,CAAC,CAAC;IAC9D,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,SAAS,OAAO,CAAA;IAClC,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED;IACE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iBAAiB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC5C;AAED;IACE,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAA;CAClB;AA0BD,qBAAe,SAAQ,WAAW;IAChC,eAAe,EAAE,cAAc,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,eAAe,CAAC;IACzB,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,EAAE,cAAc,CAAC;IAC7B,IAAI,EAAE,KAAK,CAA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AAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;gBAE9B,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU;IA4B5D,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAIjC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,KAAK,IAAI;IAI/C,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;IAmD/C,WAAW;IA+BX,QAAQ,CAAC,KAAK,EAAE,MAAM;IAUtB,QAAQ;IAKR,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK;IAgBtB,QAAQ;IAKR,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAgBrC,OAAO;IAMP,WAAW,CAAC,WAAW,EAAE,MAAM;IAuB/B,WAAW,CAAC,SAAS,UAAQ;IAY7B,QAAQ;IAgBR,IAAI,CAAC,IAAI,UAAO;IAYhB,IAAI;IAIJ,QAAQ,CAAC,SAAS,EAAE,MAAM;IAI1B,KAAK,CAAC,KAAK,EAAE,OAAO;CAqBrB","sources":["src/src/index.ts","src/index.ts"],"sourcesContent":[null,"import Sortable from \"sortablejs\";\n// @ts-ignore\nimport styles from \"bundle-text:./style.css\";\n\nif (!document) {\n throw Error(\"electron-tabs module must be called in renderer process\");\n}\n\ninterface TabGroupOptions {\n closeButtonText: string,\n defaultTab: TabOptions | ((tabGroup: TabGroup) => TabOptions),\n newTabButton: boolean,\n newTabButtonText: string,\n sortable: boolean,\n sortableOptions?: Sortable.Options\n visibilityThreshold: number,\n}\n\ninterface TabOptions {\n active?: boolean;\n badge?: Badge;\n closable?: boolean;\n icon?: string;\n iconURL?: string;\n ready?: ((tab: Tab) => void);\n src?: string;\n title?: string;\n visible?: boolean;\n webviewAttributes?: { [key: string]: any };\n}\n\ninterface Badge {\n text: string,\n classname: string\n}\n\nconst CLASSNAMES = {\n ROOT: \"etabs\",\n NAV: \"nav\",\n TABS: \"tabs\",\n TAB: \"tab\",\n BUTTONS: \"buttons\",\n VIEWS: \"views\",\n VIEW: \"view\"\n}\n\nfunction emit(emitter: TabGroup | Tab, type: string, args: any[]) {\n if (type === \"ready\") {\n emitter.isReady = true;\n }\n emitter.dispatchEvent(new CustomEvent(type, { detail: args }));\n}\n\nfunction on(emitter: TabGroup | Tab, type: string, fn: (detail: string) => void, options?: { [key: string]: any }) {\n if (type === \"ready\" && emitter.isReady === true) {\n fn.apply(emitter, [emitter]);\n }\n emitter.addEventListener(type, ((e: CustomEvent) => fn.apply(emitter, e.detail)) as EventListener, options);\n}\n\nclass TabGroup extends HTMLElement {\n buttonContainer: HTMLDivElement;\n isReady: boolean;\n newTabId: number;\n options: TabGroupOptions;\n shadow: ShadowRoot;\n tabContainer: HTMLDivElement;\n tabs: Array;\n viewContainer: HTMLDivElement;\n\n constructor() {\n super();\n\n this.isReady = false;\n\n // Options\n this.options = {\n closeButtonText: this.getAttribute(\"close-button-text\") || \"×\",\n defaultTab: { title: \"New Tab\", active: true },\n newTabButton: !!this.getAttribute(\"new-tab-button\") === true || false,\n newTabButtonText: this.getAttribute(\"new-tab-button-text\") || \"+\",\n sortable: !!this.getAttribute(\"sortable\") === true || false,\n visibilityThreshold: Number(this.getAttribute(\"visibility-threshold\")) || 0\n };\n\n this.tabs = [];\n this.newTabId = 0;\n\n this.createComponent();\n this.initVisibility();\n if (this.options.sortable) {\n this.initSortable();\n }\n\n this.emit(\"ready\", this);\n }\n\n emit(type: string, ...args: any[]) {\n return emit(this, type, args);\n }\n\n on(type: string, fn: (...detail: any[]) => void) {\n return on(this, type, fn);\n }\n\n once(type: string, fn: (detail: string) => void) {\n return on(this, type, fn, { once: true });\n }\n\n connectedCallback() {\n // Support custom styles\n const style = this.querySelector(\"style\");\n if (style) {\n this.shadow.appendChild(style);\n }\n }\n\n private createComponent() {\n const shadow = this.attachShadow({mode: \"open\"});\n this.shadow = shadow;\n\n const wrapper = document.createElement(\"div\");\n wrapper.setAttribute(\"class\", CLASSNAMES.ROOT);\n\n const tabgroup = document.createElement(\"nav\");\n tabgroup.setAttribute(\"class\", CLASSNAMES.NAV);\n wrapper.appendChild(tabgroup);\n\n const tabContainer = document.createElement(\"div\");\n tabContainer.setAttribute(\"class\", CLASSNAMES.TABS);\n tabgroup.appendChild(tabContainer);\n this.tabContainer = tabContainer;\n\n const buttonContainer = document.createElement(\"div\");\n buttonContainer.setAttribute(\"class\", CLASSNAMES.BUTTONS);\n tabgroup.appendChild(buttonContainer);\n this.buttonContainer = buttonContainer;\n\n if (this.options.newTabButton) {\n const button = this.buttonContainer.appendChild(document.createElement(\"button\"));\n button.innerHTML = this.options.newTabButtonText;\n button.addEventListener(\"click\", this.addTab.bind(this, undefined), false);\n }\n\n const viewContainer = document.createElement(\"div\");\n viewContainer.setAttribute(\"class\", CLASSNAMES.VIEWS);\n wrapper.appendChild(viewContainer);\n this.viewContainer = viewContainer;\n\n const style = document.createElement(\"style\");\n style.textContent = styles;\n\n shadow.appendChild(style);\n shadow.appendChild(wrapper);\n }\n\n private initVisibility() {\n function toggleTabsVisibility(tab: Tab, tabGroup: TabGroup) {\n const visibilityThreshold = this.options.visibilityThreshold;\n const el = tabGroup.tabContainer.parentElement;\n if (this.tabs.length >= visibilityThreshold) {\n el.classList.add(\"visible\");\n } else {\n el.classList.remove(\"visible\");\n }\n }\n\n this.on(\"tab-added\", toggleTabsVisibility);\n this.on(\"tab-removed\", toggleTabsVisibility);\n }\n\n initSortable() {\n const createNewSortable = () => {\n const options = Object.assign({\n direction: \"horizontal\",\n animation: 150,\n swapThreshold: 0.20\n }, this.options.sortableOptions);\n new Sortable(this.tabContainer, options);\n };\n\n if (Sortable) {\n createNewSortable();\n } else {\n document.addEventListener(\"DOMContentLoaded\", createNewSortable);\n }\n }\n\n setDefaultTab(tab: TabOptions) {\n this.options.defaultTab = tab;\n }\n\n addTab(args = this.options.defaultTab) {\n if (typeof args === \"function\") {\n args = args(this);\n }\n const id = this.newTabId;\n this.newTabId++;\n const tab = new Tab(this, id, args);\n this.tabs.push(tab);\n // Don't call tab.activate() before a tab is referenced in this.tabs\n if (args.active === true) {\n tab.activate();\n }\n this.emit(\"tab-added\", tab, this);\n return tab;\n }\n\n getTab(id: number) {\n for (let i in this.tabs) {\n if (this.tabs[i].id === id) {\n return this.tabs[i];\n }\n }\n return null;\n }\n\n getTabByPosition(position: number) {\n const fromRight = position < 0;\n for (let i in this.tabs) {\n if (this.tabs[i].getPosition(fromRight) === position) {\n return this.tabs[i];\n }\n }\n return null;\n }\n\n getTabByRelPosition(position: number) {\n position = this.getActiveTab().getPosition() + position;\n if (position <= 0) {\n return null;\n }\n return this.getTabByPosition(position);\n }\n\n getNextTab() {\n return this.getTabByRelPosition(1);\n }\n\n getPreviousTab() {\n return this.getTabByRelPosition(-1);\n }\n\n getTabs() {\n return this.tabs.slice();\n }\n\n eachTab(fn: (tab: Tab) => void) {\n this.getTabs().forEach(fn);\n }\n\n getActiveTab() {\n if (this.tabs.length === 0) return null;\n return this.tabs[0];\n }\n\n setActiveTab(tab: Tab) {\n this.removeTab(tab);\n this.tabs.unshift(tab);\n this.emit(\"tab-active\", tab, this);\n }\n\n removeTab(tab: Tab, triggerEvent = false) {\n const id = tab.id;\n const index = this.tabs.findIndex((t: Tab) => t.id === id);\n this.tabs.splice(index, 1);\n if (triggerEvent) {\n this.emit(\"tab-removed\", tab, this);\n }\n }\n\n activateRecentTab() {\n if (this.tabs.length > 0) {\n this.tabs[0].activate();\n }\n }\n}\n\nclass Tab extends EventTarget {\n badge: Badge;\n closable: boolean;\n element: HTMLDivElement;\n icon: string;\n iconURL: string;\n id: number;\n isClosed: boolean;\n isReady: boolean;\n spans: { [key: string]: HTMLSpanElement };\n tabGroup: TabGroup;\n title: string;\n webview: HTMLElement;\n webviewAttributes: { [key: string]: any };\n\n constructor(tabGroup: TabGroup, id: number, args: TabOptions) {\n super();\n this.badge = args.badge;\n this.closable = args.closable === false ? false : true;\n this.icon = args.icon;\n this.iconURL = args.iconURL;\n this.id = id;\n this.isClosed = false;\n this.isReady = false;\n this.spans = {};\n this.tabGroup = tabGroup;\n this.title = args.title;\n this.webviewAttributes = args.webviewAttributes || {};\n this.webviewAttributes.src = args.src;\n\n this.initTab();\n this.initWebview();\n\n if (args.visible !== false) {\n this.show();\n }\n if (typeof args.ready === \"function\") {\n args.ready(this);\n } else {\n this.emit(\"ready\", this);\n }\n }\n\n emit(type: string, ...args: any[]) {\n return emit(this, type, args);\n }\n\n on(type: string, fn: (...detail: any[]) => void) {\n return on(this, type, fn);\n }\n\n once(type: string, fn: (detail: string) => void) {\n return on(this, type, fn, { once: true });\n }\n\n private initTab() {\n const tab = this.element = document.createElement(\"div\");\n tab.classList.add(CLASSNAMES.TAB);\n for (let el of [\"icon\", \"title\", \"badge\", \"close\"]) {\n const span = tab.appendChild(document.createElement(\"span\"));\n span.classList.add(`${CLASSNAMES.TAB}-${el}`);\n this.spans[el] = span;\n }\n\n this.setTitle(this.title);\n this.setBadge(this.badge);\n this.setIcon(this.iconURL, this.icon);\n this.initTabCloseButton();\n this.initTabClickHandler();\n\n this.tabGroup.tabContainer.appendChild(this.element);\n }\n\n private initTabCloseButton() {\n const container = this.spans.close;\n if (this.closable) {\n const button = container.appendChild(document.createElement(\"button\"));\n button.innerHTML = this.tabGroup.options.closeButtonText;\n button.addEventListener(\"click\", this.close.bind(this, false), false);\n }\n }\n\n private initTabClickHandler() {\n // Mouse up\n const tabClickHandler = function(e: KeyboardEvent) {\n if (this.isClosed) return;\n if (e.which === 2) {\n this.close();\n }\n };\n this.element.addEventListener(\"mouseup\", tabClickHandler.bind(this), false);\n // Mouse down\n const tabMouseDownHandler = function(e: KeyboardEvent) {\n if (this.isClosed) return;\n if (e.which === 1) {\n if ((e.target as HTMLElement).matches(\"button\")) return;\n this.activate();\n }\n };\n this.element.addEventListener(\"mousedown\", tabMouseDownHandler.bind(this), false);\n }\n\n initWebview() {\n const webview = this.webview = document.createElement(\"webview\");\n\n const tabWebviewDidFinishLoadHandler = function(e: Event) {\n this.emit(\"webview-ready\", this);\n };\n\n this.webview.addEventListener(\"did-finish-load\", tabWebviewDidFinishLoadHandler.bind(this), false);\n\n const tabWebviewDomReadyHandler = function(e: Event) {\n // Remove this once https://github.com/electron/electron/issues/14474 is fixed\n webview.blur();\n webview.focus();\n this.emit(\"webview-dom-ready\", this);\n };\n\n this.webview.addEventListener(\"dom-ready\", tabWebviewDomReadyHandler.bind(this), false);\n\n this.webview.classList.add(CLASSNAMES.VIEW);\n if (this.webviewAttributes) {\n const attrs = this.webviewAttributes;\n for (let key in attrs) {\n const attr = attrs[key];\n if (attr === false) continue;\n this.webview.setAttribute(key, attr);\n }\n }\n\n this.tabGroup.viewContainer.appendChild(this.webview);\n }\n\n setTitle(title: string) {\n if (this.isClosed) return;\n const span = this.spans.title;\n span.innerHTML = title;\n span.title = title;\n this.title = title;\n this.emit(\"title-changed\", title, this);\n return this;\n }\n\n getTitle() {\n if (this.isClosed) return;\n return this.title;\n }\n\n setBadge(badge?: Badge) {\n if (this.isClosed) return;\n const span = this.spans.badge;\n this.badge = badge;\n\n if (badge) {\n span.innerHTML = badge.text;\n span.classList.add(badge.classname);\n span.classList.remove(\"hidden\");\n } else {\n span.classList.add(\"hidden\");\n }\n\n this.emit(\"badge-changed\", badge, this);\n }\n\n getBadge() {\n if (this.isClosed) return;\n return this.badge;\n }\n\n setIcon(iconURL: string, icon: string) {\n if (this.isClosed) return;\n this.iconURL = iconURL;\n this.icon = icon;\n const span = this.spans.icon;\n if (iconURL) {\n span.innerHTML = ``;\n this.emit(\"icon-changed\", iconURL, this);\n } else if (icon) {\n span.innerHTML = ``;\n this.emit(\"icon-changed\", icon, this);\n }\n\n return this;\n }\n\n getIcon() {\n if (this.isClosed) return;\n if (this.iconURL) return this.iconURL;\n return this.icon;\n }\n\n setPosition(newPosition: number) {\n const tabContainer = this.tabGroup.tabContainer;\n const length = tabContainer.childElementCount;\n const thisPosition = this.getPosition();\n const tabs = Array.from(tabContainer.children)\n tabs.splice(thisPosition, 1);\n\n if (newPosition < 0) {\n newPosition += length;\n if (newPosition < 0) {\n newPosition = 0;\n }\n }\n\n if (newPosition < length) {\n tabContainer.insertBefore(this.element, tabs[newPosition]);\n } else {\n tabContainer.appendChild(this.element);\n }\n\n return this;\n }\n\n getPosition(fromRight = false) {\n let position = 0;\n let tab = this.element;\n while ((tab = tab.previousSibling as HTMLDivElement) != null) position++;\n\n if (fromRight === true) {\n position -= this.tabGroup.tabContainer.childElementCount;\n }\n\n return position;\n }\n\n activate() {\n if (this.isClosed) return;\n const activeTab = this.tabGroup.getActiveTab();\n if (activeTab) {\n activeTab.element.classList.remove(\"active\");\n activeTab.webview.classList.remove(\"visible\");\n activeTab.emit(\"inactive\", activeTab);\n }\n this.tabGroup.setActiveTab(this);\n this.element.classList.add(\"active\");\n this.webview.classList.add(\"visible\");\n this.webview.focus();\n this.emit(\"active\", this);\n return this;\n }\n\n show(flag = true) {\n if (this.isClosed) return;\n if (flag) {\n this.element.classList.add(\"visible\");\n this.emit(\"visible\", this);\n } else {\n this.element.classList.remove(\"visible\");\n this.emit(\"hidden\", this);\n }\n return this;\n }\n\n hide() {\n return this.show(false);\n }\n\n hasClass(classname: string) {\n return this.element.classList.contains(classname);\n }\n\n close(force: boolean) {\n const abortController = new AbortController();\n const abort = () => abortController.abort();\n this.emit(\"closing\", this, abort);\n\n const abortSignal = abortController.signal;\n if (this.isClosed || (!this.closable && !force) || abortSignal.aborted) return;\n\n this.isClosed = true;\n const tabGroup = this.tabGroup;\n tabGroup.tabContainer.removeChild(this.element);\n tabGroup.viewContainer.removeChild(this.webview);\n const activeTab = this.tabGroup.getActiveTab();\n tabGroup.removeTab(this, true);\n\n this.emit(\"close\", this);\n\n if (activeTab.id === this.id) {\n tabGroup.activateRecentTab();\n }\n }\n}\n\ncustomElements.define(\"tab-group\", TabGroup);\n\nexport type { TabGroup, Tab };\n"],"names":[],"version":3,"file":"electron-tabs.d.ts.map","sourceRoot":"../"} \ No newline at end of file diff --git a/dist/electron-tabs.js b/dist/electron-tabs.js new file mode 100644 index 0000000..ba0ad2c --- /dev/null +++ b/dist/electron-tabs.js @@ -0,0 +1,2906 @@ +function $parcel$interopDefault(a) { + return a && a.__esModule ? a.default : a; +} +/**! + * Sortable 1.15.0 + * @author RubaXa + * @author owenm + * @license MIT + */ function $64afbd09cd65a300$var$ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + return keys; +} +function $64afbd09cd65a300$var$_objectSpread2(target) { + for(var i = 1; i < arguments.length; i++){ + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) $64afbd09cd65a300$var$ownKeys(Object(source), true).forEach(function(key) { + $64afbd09cd65a300$var$_defineProperty(target, key, source[key]); + }); + else if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + else $64afbd09cd65a300$var$ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; +} +function $64afbd09cd65a300$var$_typeof(obj1) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") $64afbd09cd65a300$var$_typeof = function(obj) { + return typeof obj; + }; + else $64afbd09cd65a300$var$_typeof = function(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + return $64afbd09cd65a300$var$_typeof(obj1); +} +function $64afbd09cd65a300$var$_defineProperty(obj, key, value) { + if (key in obj) Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + else obj[key] = value; + return obj; +} +function $64afbd09cd65a300$var$_extends() { + $64afbd09cd65a300$var$_extends = Object.assign || function(target) { + for(var i = 1; i < arguments.length; i++){ + var source = arguments[i]; + for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key]; + } + return target; + }; + return $64afbd09cd65a300$var$_extends.apply(this, arguments); +} +function $64afbd09cd65a300$var$_objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + for(i = 0; i < sourceKeys.length; i++){ + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + return target; +} +function $64afbd09cd65a300$var$_objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = $64afbd09cd65a300$var$_objectWithoutPropertiesLoose(source, excluded); + var key, i; + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + for(i = 0; i < sourceSymbolKeys.length; i++){ + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + return target; +} +function $64afbd09cd65a300$var$_toConsumableArray(arr) { + return $64afbd09cd65a300$var$_arrayWithoutHoles(arr) || $64afbd09cd65a300$var$_iterableToArray(arr) || $64afbd09cd65a300$var$_unsupportedIterableToArray(arr) || $64afbd09cd65a300$var$_nonIterableSpread(); +} +function $64afbd09cd65a300$var$_arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return $64afbd09cd65a300$var$_arrayLikeToArray(arr); +} +function $64afbd09cd65a300$var$_iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} +function $64afbd09cd65a300$var$_unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return $64afbd09cd65a300$var$_arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return $64afbd09cd65a300$var$_arrayLikeToArray(o, minLen); +} +function $64afbd09cd65a300$var$_arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i]; + return arr2; +} +function $64afbd09cd65a300$var$_nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +var $64afbd09cd65a300$var$version = "1.15.0"; +function $64afbd09cd65a300$var$userAgent(pattern) { + if (typeof window !== 'undefined' && window.navigator) return !!/*@__PURE__*/ navigator.userAgent.match(pattern); +} +var $64afbd09cd65a300$var$IE11OrLess = $64afbd09cd65a300$var$userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i); +var $64afbd09cd65a300$var$Edge = $64afbd09cd65a300$var$userAgent(/Edge/i); +var $64afbd09cd65a300$var$FireFox = $64afbd09cd65a300$var$userAgent(/firefox/i); +var $64afbd09cd65a300$var$Safari = $64afbd09cd65a300$var$userAgent(/safari/i) && !$64afbd09cd65a300$var$userAgent(/chrome/i) && !$64afbd09cd65a300$var$userAgent(/android/i); +var $64afbd09cd65a300$var$IOS = $64afbd09cd65a300$var$userAgent(/iP(ad|od|hone)/i); +var $64afbd09cd65a300$var$ChromeForAndroid = $64afbd09cd65a300$var$userAgent(/chrome/i) && $64afbd09cd65a300$var$userAgent(/android/i); +var $64afbd09cd65a300$var$captureMode = { + capture: false, + passive: false +}; +function $64afbd09cd65a300$var$on(el, event, fn) { + el.addEventListener(event, fn, !$64afbd09cd65a300$var$IE11OrLess && $64afbd09cd65a300$var$captureMode); +} +function $64afbd09cd65a300$var$off(el, event, fn) { + el.removeEventListener(event, fn, !$64afbd09cd65a300$var$IE11OrLess && $64afbd09cd65a300$var$captureMode); +} +function $64afbd09cd65a300$var$matches(/**HTMLElement*/ el, /**String*/ selector) { + if (!selector) return; + selector[0] === '>' && (selector = selector.substring(1)); + if (el) try { + if (el.matches) return el.matches(selector); + else if (el.msMatchesSelector) return el.msMatchesSelector(selector); + else if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector); + } catch (_) { + return false; + } + return false; +} +function $64afbd09cd65a300$var$getParentOrHost(el) { + return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode; +} +function $64afbd09cd65a300$var$closest(/**HTMLElement*/ el, /**String*/ selector, /**HTMLElement*/ ctx, includeCTX) { + if (el) { + ctx = ctx || document; + do { + if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && $64afbd09cd65a300$var$matches(el, selector) : $64afbd09cd65a300$var$matches(el, selector)) || includeCTX && el === ctx) return el; + if (el === ctx) break; + /* jshint boss:true */ }while (el = $64afbd09cd65a300$var$getParentOrHost(el)) + } + return null; +} +var $64afbd09cd65a300$var$R_SPACE = /\s+/g; +function $64afbd09cd65a300$var$toggleClass(el, name, state) { + if (el && name) { + if (el.classList) el.classList[state ? 'add' : 'remove'](name); + else { + var className = (' ' + el.className + ' ').replace($64afbd09cd65a300$var$R_SPACE, ' ').replace(' ' + name + ' ', ' '); + el.className = (className + (state ? ' ' + name : '')).replace($64afbd09cd65a300$var$R_SPACE, ' '); + } + } +} +function $64afbd09cd65a300$var$css(el, prop, val) { + var style = el && el.style; + if (style) { + if (val === void 0) { + if (document.defaultView && document.defaultView.getComputedStyle) val = document.defaultView.getComputedStyle(el, ''); + else if (el.currentStyle) val = el.currentStyle; + return prop === void 0 ? val : val[prop]; + } else { + if (!(prop in style) && prop.indexOf('webkit') === -1) prop = '-webkit-' + prop; + style[prop] = val + (typeof val === 'string' ? '' : 'px'); + } + } +} +function $64afbd09cd65a300$var$matrix(el, selfOnly) { + var appliedTransforms = ''; + if (typeof el === 'string') appliedTransforms = el; + else do { + var transform = $64afbd09cd65a300$var$css(el, 'transform'); + if (transform && transform !== 'none') appliedTransforms = transform + ' ' + appliedTransforms; + /* jshint boss:true */ }while (!selfOnly && (el = el.parentNode)) + var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix; + /*jshint -W056 */ return matrixFn && new matrixFn(appliedTransforms); +} +function $64afbd09cd65a300$var$find(ctx, tagName, iterator) { + if (ctx) { + var list = ctx.getElementsByTagName(tagName), i = 0, n = list.length; + if (iterator) for(; i < n; i++)iterator(list[i], i); + return list; + } + return []; +} +function $64afbd09cd65a300$var$getWindowScrollingElement() { + var scrollingElement = document.scrollingElement; + if (scrollingElement) return scrollingElement; + else return document.documentElement; +} +/** + * Returns the "bounding client rect" of given element + * @param {HTMLElement} el The element whose boundingClientRect is wanted + * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container + * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr + * @param {[Boolean]} undoScale Whether the container's scale() should be undone + * @param {[HTMLElement]} container The parent the element will be placed in + * @return {Object} The boundingClientRect of el, with specified adjustments + */ function $64afbd09cd65a300$var$getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) { + if (!el.getBoundingClientRect && el !== window) return; + var elRect, top, left, bottom, right, height, width; + if (el !== window && el.parentNode && el !== $64afbd09cd65a300$var$getWindowScrollingElement()) { + elRect = el.getBoundingClientRect(); + top = elRect.top; + left = elRect.left; + bottom = elRect.bottom; + right = elRect.right; + height = elRect.height; + width = elRect.width; + } else { + top = 0; + left = 0; + bottom = window.innerHeight; + right = window.innerWidth; + height = window.innerHeight; + width = window.innerWidth; + } + if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) { + // Adjust for translate() + container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312) + // Not needed on <= IE11 + if (!$64afbd09cd65a300$var$IE11OrLess) { + do if (container && container.getBoundingClientRect && ($64afbd09cd65a300$var$css(container, 'transform') !== 'none' || relativeToNonStaticParent && $64afbd09cd65a300$var$css(container, 'position') !== 'static')) { + var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container + top -= containerRect.top + parseInt($64afbd09cd65a300$var$css(container, 'border-top-width')); + left -= containerRect.left + parseInt($64afbd09cd65a300$var$css(container, 'border-left-width')); + bottom = top + elRect.height; + right = left + elRect.width; + break; + } + while (container = container.parentNode) + } + } + if (undoScale && el !== window) { + // Adjust for scale() + var elMatrix = $64afbd09cd65a300$var$matrix(container || el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d; + if (elMatrix) { + top /= scaleY; + left /= scaleX; + width /= scaleX; + height /= scaleY; + bottom = top + height; + right = left + width; + } + } + return { + top: top, + left: left, + bottom: bottom, + right: right, + width: width, + height: height + }; +} +/** + * Checks if a side of an element is scrolled past a side of its parents + * @param {HTMLElement} el The element who's side being scrolled out of view is in question + * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom') + * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom') + * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element + */ function $64afbd09cd65a300$var$isScrolledPast(el, elSide, parentSide) { + var parent = $64afbd09cd65a300$var$getParentAutoScrollElement(el, true), elSideVal = $64afbd09cd65a300$var$getRect(el)[elSide]; + /* jshint boss:true */ while(parent){ + var parentSideVal = $64afbd09cd65a300$var$getRect(parent)[parentSide], visible = void 0; + if (parentSide === 'top' || parentSide === 'left') visible = elSideVal >= parentSideVal; + else visible = elSideVal <= parentSideVal; + if (!visible) return parent; + if (parent === $64afbd09cd65a300$var$getWindowScrollingElement()) break; + parent = $64afbd09cd65a300$var$getParentAutoScrollElement(parent, false); + } + return false; +} +/** + * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible) + * and non-draggable elements + * @param {HTMLElement} el The parent element + * @param {Number} childNum The index of the child + * @param {Object} options Parent Sortable's options + * @return {HTMLElement} The child at index childNum, or null if not found + */ function $64afbd09cd65a300$var$getChild(el, childNum, options, includeDragEl) { + var currentChild = 0, i = 0, children = el.children; + while(i < children.length){ + if (children[i].style.display !== 'none' && children[i] !== $64afbd09cd65a300$export$31b3ca70d8f57423.ghost && (includeDragEl || children[i] !== $64afbd09cd65a300$export$31b3ca70d8f57423.dragged) && $64afbd09cd65a300$var$closest(children[i], options.draggable, el, false)) { + if (currentChild === childNum) return children[i]; + currentChild++; + } + i++; + } + return null; +} +/** + * Gets the last child in the el, ignoring ghostEl or invisible elements (clones) + * @param {HTMLElement} el Parent element + * @param {selector} selector Any other elements that should be ignored + * @return {HTMLElement} The last child, ignoring ghostEl + */ function $64afbd09cd65a300$var$lastChild(el, selector) { + var last = el.lastElementChild; + while(last && (last === $64afbd09cd65a300$export$31b3ca70d8f57423.ghost || $64afbd09cd65a300$var$css(last, 'display') === 'none' || selector && !$64afbd09cd65a300$var$matches(last, selector)))last = last.previousElementSibling; + return last || null; +} +/** + * Returns the index of an element within its parent for a selected set of + * elements + * @param {HTMLElement} el + * @param {selector} selector + * @return {number} + */ function $64afbd09cd65a300$var$index(el, selector) { + var index = 0; + if (!el || !el.parentNode) return -1; + /* jshint boss:true */ while(el = el.previousElementSibling)if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== $64afbd09cd65a300$export$31b3ca70d8f57423.clone && (!selector || $64afbd09cd65a300$var$matches(el, selector))) index++; + return index; +} +/** + * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements. + * The value is returned in real pixels. + * @param {HTMLElement} el + * @return {Array} Offsets in the format of [left, top] + */ function $64afbd09cd65a300$var$getRelativeScrollOffset(el) { + var offsetLeft = 0, offsetTop = 0, winScroller = $64afbd09cd65a300$var$getWindowScrollingElement(); + if (el) do { + var elMatrix = $64afbd09cd65a300$var$matrix(el), scaleX = elMatrix.a, scaleY = elMatrix.d; + offsetLeft += el.scrollLeft * scaleX; + offsetTop += el.scrollTop * scaleY; + }while (el !== winScroller && (el = el.parentNode)) + return [ + offsetLeft, + offsetTop + ]; +} +/** + * Returns the index of the object within the given array + * @param {Array} arr Array that may or may not hold the object + * @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 + * @return {Number} The index of the object in the array, or -1 + */ function $64afbd09cd65a300$var$indexOfObject(arr, obj) { + for(var i in arr){ + if (!arr.hasOwnProperty(i)) continue; + for(var key in obj){ + if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i); + } + } + return -1; +} +function $64afbd09cd65a300$var$getParentAutoScrollElement(el, includeSelf) { + // skip to window + if (!el || !el.getBoundingClientRect) return $64afbd09cd65a300$var$getWindowScrollingElement(); + var elem = el; + var gotSelf = false; + do // we don't need to get elem css if it isn't even overflowing in the first place (performance) + if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) { + var elemCSS = $64afbd09cd65a300$var$css(elem); + if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) { + if (!elem.getBoundingClientRect || elem === document.body) return $64afbd09cd65a300$var$getWindowScrollingElement(); + if (gotSelf || includeSelf) return elem; + gotSelf = true; + } + } + while (elem = elem.parentNode) + return $64afbd09cd65a300$var$getWindowScrollingElement(); +} +function $64afbd09cd65a300$var$extend(dst, src) { + if (dst && src) { + for(var key in src)if (src.hasOwnProperty(key)) dst[key] = src[key]; + } + return dst; +} +function $64afbd09cd65a300$var$isRectEqual(rect1, rect2) { + 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); +} +var $64afbd09cd65a300$var$_throttleTimeout; +function $64afbd09cd65a300$var$throttle(callback, ms) { + return function() { + if (!$64afbd09cd65a300$var$_throttleTimeout) { + var args = arguments, _this = this; + if (args.length === 1) callback.call(_this, args[0]); + else callback.apply(_this, args); + $64afbd09cd65a300$var$_throttleTimeout = setTimeout(function() { + $64afbd09cd65a300$var$_throttleTimeout = void 0; + }, ms); + } + }; +} +function $64afbd09cd65a300$var$cancelThrottle() { + clearTimeout($64afbd09cd65a300$var$_throttleTimeout); + $64afbd09cd65a300$var$_throttleTimeout = void 0; +} +function $64afbd09cd65a300$var$scrollBy(el, x, y) { + el.scrollLeft += x; + el.scrollTop += y; +} +function $64afbd09cd65a300$var$clone(el) { + var Polymer = window.Polymer; + var $ = window.jQuery || window.Zepto; + if (Polymer && Polymer.dom) return Polymer.dom(el).cloneNode(true); + else if ($) return $(el).clone(true)[0]; + else return el.cloneNode(true); +} +function $64afbd09cd65a300$var$setRect(el, rect) { + $64afbd09cd65a300$var$css(el, 'position', 'absolute'); + $64afbd09cd65a300$var$css(el, 'top', rect.top); + $64afbd09cd65a300$var$css(el, 'left', rect.left); + $64afbd09cd65a300$var$css(el, 'width', rect.width); + $64afbd09cd65a300$var$css(el, 'height', rect.height); +} +function $64afbd09cd65a300$var$unsetRect(el) { + $64afbd09cd65a300$var$css(el, 'position', ''); + $64afbd09cd65a300$var$css(el, 'top', ''); + $64afbd09cd65a300$var$css(el, 'left', ''); + $64afbd09cd65a300$var$css(el, 'width', ''); + $64afbd09cd65a300$var$css(el, 'height', ''); +} +var $64afbd09cd65a300$var$expando = 'Sortable' + new Date().getTime(); +function $64afbd09cd65a300$var$AnimationStateManager() { + var animationStates = [], animationCallbackId; + return { + captureAnimationState: function captureAnimationState() { + animationStates = []; + if (!this.options.animation) return; + var children = [].slice.call(this.el.children); + children.forEach(function(child) { + if ($64afbd09cd65a300$var$css(child, 'display') === 'none' || child === $64afbd09cd65a300$export$31b3ca70d8f57423.ghost) return; + animationStates.push({ + target: child, + rect: $64afbd09cd65a300$var$getRect(child) + }); + var fromRect = $64afbd09cd65a300$var$_objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation + if (child.thisAnimationDuration) { + var childMatrix = $64afbd09cd65a300$var$matrix(child, true); + if (childMatrix) { + fromRect.top -= childMatrix.f; + fromRect.left -= childMatrix.e; + } + } + child.fromRect = fromRect; + }); + }, + addAnimationState: function addAnimationState(state) { + animationStates.push(state); + }, + removeAnimationState: function removeAnimationState(target) { + animationStates.splice($64afbd09cd65a300$var$indexOfObject(animationStates, { + target: target + }), 1); + }, + animateAll: function animateAll(callback) { + var _this = this; + if (!this.options.animation) { + clearTimeout(animationCallbackId); + if (typeof callback === 'function') callback(); + return; + } + var animating = false, animationTime = 0; + animationStates.forEach(function(state) { + var time = 0, target = state.target, fromRect = target.fromRect, toRect = $64afbd09cd65a300$var$getRect(target), prevFromRect = target.prevFromRect, prevToRect = target.prevToRect, animatingRect = state.rect, targetMatrix = $64afbd09cd65a300$var$matrix(target, true); + if (targetMatrix) { + // Compensate for current animation + toRect.top -= targetMatrix.f; + toRect.left -= targetMatrix.e; + } + target.toRect = toRect; + if (target.thisAnimationDuration) // Could also check if animatingRect is between fromRect and toRect + { + if ($64afbd09cd65a300$var$isRectEqual(prevFromRect, toRect) && !$64afbd09cd65a300$var$isRectEqual(fromRect, toRect) && (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 + time = $64afbd09cd65a300$var$calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options); + } // if fromRect != toRect: animate + if (!$64afbd09cd65a300$var$isRectEqual(toRect, fromRect)) { + target.prevFromRect = fromRect; + target.prevToRect = toRect; + if (!time) time = _this.options.animation; + _this.animate(target, animatingRect, toRect, time); + } + if (time) { + animating = true; + animationTime = Math.max(animationTime, time); + clearTimeout(target.animationResetTimer); + target.animationResetTimer = setTimeout(function() { + target.animationTime = 0; + target.prevFromRect = null; + target.fromRect = null; + target.prevToRect = null; + target.thisAnimationDuration = null; + }, time); + target.thisAnimationDuration = time; + } + }); + clearTimeout(animationCallbackId); + if (!animating) { + if (typeof callback === 'function') callback(); + } else animationCallbackId = setTimeout(function() { + if (typeof callback === 'function') callback(); + }, animationTime); + animationStates = []; + }, + animate: function animate(target, currentRect, toRect, duration) { + if (duration) { + $64afbd09cd65a300$var$css(target, 'transition', ''); + $64afbd09cd65a300$var$css(target, 'transform', ''); + var elMatrix = $64afbd09cd65a300$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); + target.animatingX = !!translateX; + target.animatingY = !!translateY; + $64afbd09cd65a300$var$css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)'); + this.forRepaintDummy = $64afbd09cd65a300$var$repaint(target); // repaint + $64afbd09cd65a300$var$css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : '')); + $64afbd09cd65a300$var$css(target, 'transform', 'translate3d(0,0,0)'); + typeof target.animated === 'number' && clearTimeout(target.animated); + target.animated = setTimeout(function() { + $64afbd09cd65a300$var$css(target, 'transition', ''); + $64afbd09cd65a300$var$css(target, 'transform', ''); + target.animated = false; + target.animatingX = false; + target.animatingY = false; + }, duration); + } + } + }; +} +function $64afbd09cd65a300$var$repaint(target) { + return target.offsetWidth; +} +function $64afbd09cd65a300$var$calculateRealTime(animatingRect, fromRect, toRect, options) { + 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; +} +var $64afbd09cd65a300$var$plugins = []; +var $64afbd09cd65a300$var$defaults = { + initializeByDefault: true +}; +var $64afbd09cd65a300$var$PluginManager = { + mount: function mount(plugin) { + // Set default static properties + for(var option in $64afbd09cd65a300$var$defaults)if ($64afbd09cd65a300$var$defaults.hasOwnProperty(option) && !(option in plugin)) plugin[option] = $64afbd09cd65a300$var$defaults[option]; + $64afbd09cd65a300$var$plugins.forEach(function(p) { + if (p.pluginName === plugin.pluginName) throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once"); + }); + $64afbd09cd65a300$var$plugins.push(plugin); + }, + pluginEvent: function pluginEvent(eventName, sortable, evt) { + var _this = this; + this.eventCanceled = false; + evt.cancel = function() { + _this.eventCanceled = true; + }; + var eventNameGlobal = eventName + 'Global'; + $64afbd09cd65a300$var$plugins.forEach(function(plugin) { + if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable + if (sortable[plugin.pluginName][eventNameGlobal]) sortable[plugin.pluginName][eventNameGlobal]($64afbd09cd65a300$var$_objectSpread2({ + sortable: sortable + }, evt)); + // Only fire plugin event if plugin is enabled in this sortable, + // and plugin has event defined + if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) sortable[plugin.pluginName][eventName]($64afbd09cd65a300$var$_objectSpread2({ + sortable: sortable + }, evt)); + }); + }, + initializePlugins: function initializePlugins(sortable, el, defaults, options) { + $64afbd09cd65a300$var$plugins.forEach(function(plugin) { + var pluginName = plugin.pluginName; + if (!sortable.options[pluginName] && !plugin.initializeByDefault) return; + var initialized = new plugin(sortable, el, sortable.options); + initialized.sortable = sortable; + initialized.options = sortable.options; + sortable[pluginName] = initialized; // Add default options from plugin + $64afbd09cd65a300$var$_extends(defaults, initialized.defaults); + }); + for(var option in sortable.options){ + if (!sortable.options.hasOwnProperty(option)) continue; + var modified = this.modifyOption(sortable, option, sortable.options[option]); + if (typeof modified !== 'undefined') sortable.options[option] = modified; + } + }, + getEventProperties: function getEventProperties(name, sortable) { + var eventProperties = {}; + $64afbd09cd65a300$var$plugins.forEach(function(plugin) { + if (typeof plugin.eventProperties !== 'function') return; + $64afbd09cd65a300$var$_extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name)); + }); + return eventProperties; + }, + modifyOption: function modifyOption(sortable, name, value) { + var modifiedValue; + $64afbd09cd65a300$var$plugins.forEach(function(plugin) { + // Plugin must exist on the Sortable + if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin + if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value); + }); + return modifiedValue; + } +}; +function $64afbd09cd65a300$var$dispatchEvent(_ref) { + 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; + sortable = sortable || rootEl && rootEl[$64afbd09cd65a300$var$expando]; + if (!sortable) return; + var evt, options = sortable.options, onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature + if (window.CustomEvent && !$64afbd09cd65a300$var$IE11OrLess && !$64afbd09cd65a300$var$Edge) evt = new CustomEvent(name, { + bubbles: true, + cancelable: true + }); + else { + evt = document.createEvent('Event'); + evt.initEvent(name, true, true); + } + evt.to = toEl || rootEl; + evt.from = fromEl || rootEl; + evt.item = targetEl || rootEl; + evt.clone = cloneEl; + evt.oldIndex = oldIndex; + evt.newIndex = newIndex; + evt.oldDraggableIndex = oldDraggableIndex; + evt.newDraggableIndex = newDraggableIndex; + evt.originalEvent = originalEvent; + evt.pullMode = putSortable ? putSortable.lastPutMode : undefined; + var allEventProperties = $64afbd09cd65a300$var$_objectSpread2($64afbd09cd65a300$var$_objectSpread2({}, extraEventProperties), $64afbd09cd65a300$var$PluginManager.getEventProperties(name, sortable)); + for(var option in allEventProperties)evt[option] = allEventProperties[option]; + if (rootEl) rootEl.dispatchEvent(evt); + if (options[onName]) options[onName].call(sortable, evt); +} +var $64afbd09cd65a300$var$_excluded = [ + "evt" +]; +var $64afbd09cd65a300$var$pluginEvent = function pluginEvent(eventName, sortable) { + var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, originalEvent = _ref.evt, data = $64afbd09cd65a300$var$_objectWithoutProperties(_ref, $64afbd09cd65a300$var$_excluded); + $64afbd09cd65a300$var$PluginManager.pluginEvent.bind($64afbd09cd65a300$export$31b3ca70d8f57423)(eventName, sortable, $64afbd09cd65a300$var$_objectSpread2({ + dragEl: $64afbd09cd65a300$var$dragEl, + parentEl: $64afbd09cd65a300$var$parentEl, + ghostEl: $64afbd09cd65a300$var$ghostEl, + rootEl: $64afbd09cd65a300$var$rootEl, + nextEl: $64afbd09cd65a300$var$nextEl, + lastDownEl: $64afbd09cd65a300$var$lastDownEl, + cloneEl: $64afbd09cd65a300$var$cloneEl, + cloneHidden: $64afbd09cd65a300$var$cloneHidden, + dragStarted: $64afbd09cd65a300$var$moved, + putSortable: $64afbd09cd65a300$var$putSortable, + activeSortable: $64afbd09cd65a300$export$31b3ca70d8f57423.active, + originalEvent: originalEvent, + oldIndex: $64afbd09cd65a300$var$oldIndex, + oldDraggableIndex: $64afbd09cd65a300$var$oldDraggableIndex, + newIndex: $64afbd09cd65a300$var$newIndex, + newDraggableIndex: $64afbd09cd65a300$var$newDraggableIndex, + hideGhostForTarget: $64afbd09cd65a300$var$_hideGhostForTarget, + unhideGhostForTarget: $64afbd09cd65a300$var$_unhideGhostForTarget, + cloneNowHidden: function cloneNowHidden() { + $64afbd09cd65a300$var$cloneHidden = true; + }, + cloneNowShown: function cloneNowShown() { + $64afbd09cd65a300$var$cloneHidden = false; + }, + dispatchSortableEvent: function dispatchSortableEvent(name) { + $64afbd09cd65a300$var$_dispatchEvent({ + sortable: sortable, + name: name, + originalEvent: originalEvent + }); + } + }, data)); +}; +function $64afbd09cd65a300$var$_dispatchEvent(info) { + $64afbd09cd65a300$var$dispatchEvent($64afbd09cd65a300$var$_objectSpread2({ + putSortable: $64afbd09cd65a300$var$putSortable, + cloneEl: $64afbd09cd65a300$var$cloneEl, + targetEl: $64afbd09cd65a300$var$dragEl, + rootEl: $64afbd09cd65a300$var$rootEl, + oldIndex: $64afbd09cd65a300$var$oldIndex, + oldDraggableIndex: $64afbd09cd65a300$var$oldDraggableIndex, + newIndex: $64afbd09cd65a300$var$newIndex, + newDraggableIndex: $64afbd09cd65a300$var$newDraggableIndex + }, info)); +} +var $64afbd09cd65a300$var$dragEl, $64afbd09cd65a300$var$parentEl, $64afbd09cd65a300$var$ghostEl, $64afbd09cd65a300$var$rootEl, $64afbd09cd65a300$var$nextEl, $64afbd09cd65a300$var$lastDownEl, $64afbd09cd65a300$var$cloneEl, $64afbd09cd65a300$var$cloneHidden, $64afbd09cd65a300$var$oldIndex, $64afbd09cd65a300$var$newIndex, $64afbd09cd65a300$var$oldDraggableIndex, $64afbd09cd65a300$var$newDraggableIndex, $64afbd09cd65a300$var$activeGroup, $64afbd09cd65a300$var$putSortable, $64afbd09cd65a300$var$awaitingDragStarted = false, $64afbd09cd65a300$var$ignoreNextClick = false, $64afbd09cd65a300$var$sortables = [], $64afbd09cd65a300$var$tapEvt, $64afbd09cd65a300$var$touchEvt, $64afbd09cd65a300$var$lastDx, $64afbd09cd65a300$var$lastDy, $64afbd09cd65a300$var$tapDistanceLeft, $64afbd09cd65a300$var$tapDistanceTop, $64afbd09cd65a300$var$moved, $64afbd09cd65a300$var$lastTarget, $64afbd09cd65a300$var$lastDirection, $64afbd09cd65a300$var$pastFirstInvertThresh = false, $64afbd09cd65a300$var$isCircumstantialInvert = false, $64afbd09cd65a300$var$targetMoveDistance, // For positioning ghost absolutely +$64afbd09cd65a300$var$ghostRelativeParent, $64afbd09cd65a300$var$ghostRelativeParentInitialScroll = [], // (left, top) +$64afbd09cd65a300$var$_silent = false, $64afbd09cd65a300$var$savedInputChecked = []; +/** @const */ var $64afbd09cd65a300$var$documentExists = typeof document !== 'undefined', $64afbd09cd65a300$var$PositionGhostAbsolutely = $64afbd09cd65a300$var$IOS, $64afbd09cd65a300$var$CSSFloatProperty = $64afbd09cd65a300$var$Edge || $64afbd09cd65a300$var$IE11OrLess ? 'cssFloat' : 'float', // This will not pass for IE9, because IE9 DnD only works on anchors +$64afbd09cd65a300$var$supportDraggable = $64afbd09cd65a300$var$documentExists && !$64afbd09cd65a300$var$ChromeForAndroid && !$64afbd09cd65a300$var$IOS && 'draggable' in document.createElement('div'), $64afbd09cd65a300$var$supportCssPointerEvents = function() { + if (!$64afbd09cd65a300$var$documentExists) return; // false when <= IE11 + if ($64afbd09cd65a300$var$IE11OrLess) return false; + var el = document.createElement('x'); + el.style.cssText = 'pointer-events:auto'; + return el.style.pointerEvents === 'auto'; +}(), $64afbd09cd65a300$var$_detectDirection = function _detectDirection(el, options) { + var elCSS = $64afbd09cd65a300$var$css(el), elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth), child1 = $64afbd09cd65a300$var$getChild(el, 0, options), child2 = $64afbd09cd65a300$var$getChild(el, 1, options), firstChildCSS = child1 && $64afbd09cd65a300$var$css(child1), secondChildCSS = child2 && $64afbd09cd65a300$var$css(child2), firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + $64afbd09cd65a300$var$getRect(child1).width, secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + $64afbd09cd65a300$var$getRect(child2).width; + if (elCSS.display === 'flex') return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal'; + if (elCSS.display === 'grid') return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal'; + if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') { + var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right'; + return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal'; + } + return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[$64afbd09cd65a300$var$CSSFloatProperty] === 'none' || child2 && elCSS[$64afbd09cd65a300$var$CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal'; +}, $64afbd09cd65a300$var$_dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) { + 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; + return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2; +}, /** + * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold. + * @param {Number} x X position + * @param {Number} y Y position + * @return {HTMLElement} Element of the first found nearest Sortable + */ $64afbd09cd65a300$var$_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) { + var ret; + $64afbd09cd65a300$var$sortables.some(function(sortable) { + var threshold = sortable[$64afbd09cd65a300$var$expando].options.emptyInsertThreshold; + if (!threshold || $64afbd09cd65a300$var$lastChild(sortable)) return; + var rect = $64afbd09cd65a300$var$getRect(sortable), insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold, insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold; + if (insideHorizontally && insideVertically) return ret = sortable; + }); + return ret; +}, $64afbd09cd65a300$var$_prepareGroup = function _prepareGroup(options) { + function toFn(value, pull) { + return function(to, from, dragEl, evt) { + var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name; + if (value == null && (pull || sameGroup)) // Default pull value + // Default pull and put value if same group + return true; + else if (value == null || value === false) return false; + else if (pull && value === 'clone') return value; + else if (typeof value === 'function') return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt); + else { + var otherGroup = (pull ? to : from).options.group.name; + return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1; + } + }; + } + var group = {}; + var originalGroup = options.group; + if (!originalGroup || $64afbd09cd65a300$var$_typeof(originalGroup) != 'object') originalGroup = { + name: originalGroup + }; + group.name = originalGroup.name; + group.checkPull = toFn(originalGroup.pull, true); + group.checkPut = toFn(originalGroup.put); + group.revertClone = originalGroup.revertClone; + options.group = group; +}, $64afbd09cd65a300$var$_hideGhostForTarget = function _hideGhostForTarget() { + if (!$64afbd09cd65a300$var$supportCssPointerEvents && $64afbd09cd65a300$var$ghostEl) $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'display', 'none'); +}, $64afbd09cd65a300$var$_unhideGhostForTarget = function _unhideGhostForTarget() { + if (!$64afbd09cd65a300$var$supportCssPointerEvents && $64afbd09cd65a300$var$ghostEl) $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'display', ''); +}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position +if ($64afbd09cd65a300$var$documentExists && !$64afbd09cd65a300$var$ChromeForAndroid) document.addEventListener('click', function(evt) { + if ($64afbd09cd65a300$var$ignoreNextClick) { + evt.preventDefault(); + evt.stopPropagation && evt.stopPropagation(); + evt.stopImmediatePropagation && evt.stopImmediatePropagation(); + $64afbd09cd65a300$var$ignoreNextClick = false; + return false; + } +}, true); +var $64afbd09cd65a300$var$nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) { + if ($64afbd09cd65a300$var$dragEl) { + evt = evt.touches ? evt.touches[0] : evt; + var nearest = $64afbd09cd65a300$var$_detectNearestEmptySortable(evt.clientX, evt.clientY); + if (nearest) { + // Create imitation event + var event = {}; + for(var i in evt)if (evt.hasOwnProperty(i)) event[i] = evt[i]; + event.target = event.rootEl = nearest; + event.preventDefault = void 0; + event.stopPropagation = void 0; + nearest[$64afbd09cd65a300$var$expando]._onDragOver(event); + } + } +}; +var $64afbd09cd65a300$var$_checkOutsideTargetEl = function _checkOutsideTargetEl(evt) { + if ($64afbd09cd65a300$var$dragEl) $64afbd09cd65a300$var$dragEl.parentNode[$64afbd09cd65a300$var$expando]._isOutsideThisEl(evt.target); +}; +/** + * @class Sortable + * @param {HTMLElement} el + * @param {Object} [options] + */ function $64afbd09cd65a300$export$31b3ca70d8f57423(el, options) { + if (!(el && el.nodeType && el.nodeType === 1)) throw "Sortable: `el` must be an HTMLElement, not ".concat(({}).toString.call(el)); + this.el = el; // root element + this.options = options = $64afbd09cd65a300$var$_extends({}, options); // Export instance + el[$64afbd09cd65a300$var$expando] = this; + var defaults = { + group: null, + sort: true, + disabled: false, + store: null, + handle: null, + draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*', + swapThreshold: 1, + // percentage; 0 <= x <= 1 + invertSwap: false, + // invert always + invertedSwapThreshold: null, + // will be set to same as swapThreshold if default + removeCloneOnHide: true, + direction: function direction() { + return $64afbd09cd65a300$var$_detectDirection(el, this.options); + }, + ghostClass: 'sortable-ghost', + chosenClass: 'sortable-chosen', + dragClass: 'sortable-drag', + ignore: 'a, img', + filter: null, + preventOnFilter: true, + animation: 0, + easing: null, + setData: function setData(dataTransfer, dragEl) { + dataTransfer.setData('Text', dragEl.textContent); + }, + dropBubble: false, + dragoverBubble: false, + dataIdAttr: 'data-id', + delay: 0, + delayOnTouchOnly: false, + touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1, + forceFallback: false, + fallbackClass: 'sortable-fallback', + fallbackOnBody: false, + fallbackTolerance: 0, + fallbackOffset: { + x: 0, + y: 0 + }, + supportPointer: $64afbd09cd65a300$export$31b3ca70d8f57423.supportPointer !== false && 'PointerEvent' in window && !$64afbd09cd65a300$var$Safari, + emptyInsertThreshold: 5 + }; + $64afbd09cd65a300$var$PluginManager.initializePlugins(this, el, defaults); // Set default options + for(var name in defaults)!(name in options) && (options[name] = defaults[name]); + $64afbd09cd65a300$var$_prepareGroup(options); // Bind all private methods + for(var fn in this)if (fn.charAt(0) === '_' && typeof this[fn] === 'function') this[fn] = this[fn].bind(this); + // Setup drag mode + this.nativeDraggable = options.forceFallback ? false : $64afbd09cd65a300$var$supportDraggable; + if (this.nativeDraggable) // Touch start threshold cannot be greater than the native dragstart threshold + this.options.touchStartThreshold = 1; + // Bind events + if (options.supportPointer) $64afbd09cd65a300$var$on(el, 'pointerdown', this._onTapStart); + else { + $64afbd09cd65a300$var$on(el, 'mousedown', this._onTapStart); + $64afbd09cd65a300$var$on(el, 'touchstart', this._onTapStart); + } + if (this.nativeDraggable) { + $64afbd09cd65a300$var$on(el, 'dragover', this); + $64afbd09cd65a300$var$on(el, 'dragenter', this); + } + $64afbd09cd65a300$var$sortables.push(this.el); // Restore sorting + options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager + $64afbd09cd65a300$var$_extends(this, $64afbd09cd65a300$var$AnimationStateManager()); +} +$64afbd09cd65a300$export$31b3ca70d8f57423.prototype = /** @lends Sortable.prototype */ { + constructor: $64afbd09cd65a300$export$31b3ca70d8f57423, + _isOutsideThisEl: function _isOutsideThisEl(target) { + if (!this.el.contains(target) && target !== this.el) $64afbd09cd65a300$var$lastTarget = null; + }, + _getDirection: function _getDirection(evt, target) { + return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, $64afbd09cd65a300$var$dragEl) : this.options.direction; + }, + _onTapStart: function _onTapStart(/** Event|TouchEvent */ evt) { + if (!evt.cancelable) return; + 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; + $64afbd09cd65a300$var$_saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group. + if ($64afbd09cd65a300$var$dragEl) return; + if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) return; // only left button and enabled + // cancel dnd if original target is content editable + if (originalTarget.isContentEditable) return; + // Safari ignores further event handling after mousedown + if (!this.nativeDraggable && $64afbd09cd65a300$var$Safari && target && target.tagName.toUpperCase() === 'SELECT') return; + target = $64afbd09cd65a300$var$closest(target, options.draggable, el, false); + if (target && target.animated) return; + if ($64afbd09cd65a300$var$lastDownEl === target) // Ignoring duplicate `down` + return; + // Get the index of the dragged element within its parent + $64afbd09cd65a300$var$oldIndex = $64afbd09cd65a300$var$index(target); + $64afbd09cd65a300$var$oldDraggableIndex = $64afbd09cd65a300$var$index(target, options.draggable); // Check filter + if (typeof filter === 'function') { + if (filter.call(this, evt, target, this)) { + $64afbd09cd65a300$var$_dispatchEvent({ + sortable: _this, + rootEl: originalTarget, + name: 'filter', + targetEl: target, + toEl: el, + fromEl: el + }); + $64afbd09cd65a300$var$pluginEvent('filter', _this, { + evt: evt + }); + preventOnFilter && evt.cancelable && evt.preventDefault(); + return; // cancel dnd + } + } else if (filter) { + filter = filter.split(',').some(function(criteria) { + criteria = $64afbd09cd65a300$var$closest(originalTarget, criteria.trim(), el, false); + if (criteria) { + $64afbd09cd65a300$var$_dispatchEvent({ + sortable: _this, + rootEl: criteria, + name: 'filter', + targetEl: target, + fromEl: el, + toEl: el + }); + $64afbd09cd65a300$var$pluginEvent('filter', _this, { + evt: evt + }); + return true; + } + }); + if (filter) { + preventOnFilter && evt.cancelable && evt.preventDefault(); + return; // cancel dnd + } + } + if (options.handle && !$64afbd09cd65a300$var$closest(originalTarget, options.handle, el, false)) return; + // Prepare `dragstart` + this._prepareDragStart(evt, touch, target); + }, + _prepareDragStart: function _prepareDragStart(/** Event */ evt, /** Touch */ touch, /** HTMLElement */ target) { + var _this = this, el = _this.el, options = _this.options, ownerDocument = el.ownerDocument, dragStartFn; + if (target && !$64afbd09cd65a300$var$dragEl && target.parentNode === el) { + var dragRect = $64afbd09cd65a300$var$getRect(target); + $64afbd09cd65a300$var$rootEl = el; + $64afbd09cd65a300$var$dragEl = target; + $64afbd09cd65a300$var$parentEl = $64afbd09cd65a300$var$dragEl.parentNode; + $64afbd09cd65a300$var$nextEl = $64afbd09cd65a300$var$dragEl.nextSibling; + $64afbd09cd65a300$var$lastDownEl = target; + $64afbd09cd65a300$var$activeGroup = options.group; + $64afbd09cd65a300$export$31b3ca70d8f57423.dragged = $64afbd09cd65a300$var$dragEl; + $64afbd09cd65a300$var$tapEvt = { + target: $64afbd09cd65a300$var$dragEl, + clientX: (touch || evt).clientX, + clientY: (touch || evt).clientY + }; + $64afbd09cd65a300$var$tapDistanceLeft = $64afbd09cd65a300$var$tapEvt.clientX - dragRect.left; + $64afbd09cd65a300$var$tapDistanceTop = $64afbd09cd65a300$var$tapEvt.clientY - dragRect.top; + this._lastX = (touch || evt).clientX; + this._lastY = (touch || evt).clientY; + $64afbd09cd65a300$var$dragEl.style['will-change'] = 'all'; + dragStartFn = function dragStartFn() { + $64afbd09cd65a300$var$pluginEvent('delayEnded', _this, { + evt: evt + }); + if ($64afbd09cd65a300$export$31b3ca70d8f57423.eventCanceled) { + _this._onDrop(); + return; + } // Delayed drag has been triggered + // we can re-enable the events: touchmove/mousemove + _this._disableDelayedDragEvents(); + if (!$64afbd09cd65a300$var$FireFox && _this.nativeDraggable) $64afbd09cd65a300$var$dragEl.draggable = true; + // Bind the events: dragstart/dragend + _this._triggerDragStart(evt, touch); // Drag start event + $64afbd09cd65a300$var$_dispatchEvent({ + sortable: _this, + name: 'choose', + originalEvent: evt + }); // Chosen item + $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$dragEl, options.chosenClass, true); + }; // Disable "draggable" + options.ignore.split(',').forEach(function(criteria) { + $64afbd09cd65a300$var$find($64afbd09cd65a300$var$dragEl, criteria.trim(), $64afbd09cd65a300$var$_disableDraggable); + }); + $64afbd09cd65a300$var$on(ownerDocument, 'dragover', $64afbd09cd65a300$var$nearestEmptyInsertDetectEvent); + $64afbd09cd65a300$var$on(ownerDocument, 'mousemove', $64afbd09cd65a300$var$nearestEmptyInsertDetectEvent); + $64afbd09cd65a300$var$on(ownerDocument, 'touchmove', $64afbd09cd65a300$var$nearestEmptyInsertDetectEvent); + $64afbd09cd65a300$var$on(ownerDocument, 'mouseup', _this._onDrop); + $64afbd09cd65a300$var$on(ownerDocument, 'touchend', _this._onDrop); + $64afbd09cd65a300$var$on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox) + if ($64afbd09cd65a300$var$FireFox && this.nativeDraggable) { + this.options.touchStartThreshold = 4; + $64afbd09cd65a300$var$dragEl.draggable = true; + } + $64afbd09cd65a300$var$pluginEvent('delayStart', this, { + evt: evt + }); // Delay is impossible for native DnD in Edge or IE + if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !($64afbd09cd65a300$var$Edge || $64afbd09cd65a300$var$IE11OrLess))) { + if ($64afbd09cd65a300$export$31b3ca70d8f57423.eventCanceled) { + this._onDrop(); + return; + } // If the user moves the pointer or let go the click or touch + // before the delay has been reached: + // disable the delayed drag + $64afbd09cd65a300$var$on(ownerDocument, 'mouseup', _this._disableDelayedDrag); + $64afbd09cd65a300$var$on(ownerDocument, 'touchend', _this._disableDelayedDrag); + $64afbd09cd65a300$var$on(ownerDocument, 'touchcancel', _this._disableDelayedDrag); + $64afbd09cd65a300$var$on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler); + $64afbd09cd65a300$var$on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler); + options.supportPointer && $64afbd09cd65a300$var$on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler); + _this._dragStartTimer = setTimeout(dragStartFn, options.delay); + } else dragStartFn(); + } + }, + _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(/** TouchEvent|PointerEvent **/ e) { + var touch = e.touches ? e.touches[0] : e; + 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(); + }, + _disableDelayedDrag: function _disableDelayedDrag() { + $64afbd09cd65a300$var$dragEl && $64afbd09cd65a300$var$_disableDraggable($64afbd09cd65a300$var$dragEl); + clearTimeout(this._dragStartTimer); + this._disableDelayedDragEvents(); + }, + _disableDelayedDragEvents: function _disableDelayedDragEvents() { + var ownerDocument = this.el.ownerDocument; + $64afbd09cd65a300$var$off(ownerDocument, 'mouseup', this._disableDelayedDrag); + $64afbd09cd65a300$var$off(ownerDocument, 'touchend', this._disableDelayedDrag); + $64afbd09cd65a300$var$off(ownerDocument, 'touchcancel', this._disableDelayedDrag); + $64afbd09cd65a300$var$off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler); + $64afbd09cd65a300$var$off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler); + $64afbd09cd65a300$var$off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler); + }, + _triggerDragStart: function _triggerDragStart(/** Event */ evt, /** Touch */ touch) { + touch = touch || evt.pointerType == 'touch' && evt; + if (!this.nativeDraggable || touch) { + if (this.options.supportPointer) $64afbd09cd65a300$var$on(document, 'pointermove', this._onTouchMove); + else if (touch) $64afbd09cd65a300$var$on(document, 'touchmove', this._onTouchMove); + else $64afbd09cd65a300$var$on(document, 'mousemove', this._onTouchMove); + } else { + $64afbd09cd65a300$var$on($64afbd09cd65a300$var$dragEl, 'dragend', this); + $64afbd09cd65a300$var$on($64afbd09cd65a300$var$rootEl, 'dragstart', this._onDragStart); + } + try { + if (document.selection) // Timeout neccessary for IE9 + $64afbd09cd65a300$var$_nextTick(function() { + document.selection.empty(); + }); + else window.getSelection().removeAllRanges(); + } catch (err) {} + }, + _dragStarted: function _dragStarted(fallback, evt) { + $64afbd09cd65a300$var$awaitingDragStarted = false; + if ($64afbd09cd65a300$var$rootEl && $64afbd09cd65a300$var$dragEl) { + $64afbd09cd65a300$var$pluginEvent('dragStarted', this, { + evt: evt + }); + if (this.nativeDraggable) $64afbd09cd65a300$var$on(document, 'dragover', $64afbd09cd65a300$var$_checkOutsideTargetEl); + var options = this.options; // Apply effect + !fallback && $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$dragEl, options.dragClass, false); + $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$dragEl, options.ghostClass, true); + $64afbd09cd65a300$export$31b3ca70d8f57423.active = this; + fallback && this._appendGhost(); // Drag start event + $64afbd09cd65a300$var$_dispatchEvent({ + sortable: this, + name: 'start', + originalEvent: evt + }); + } else this._nulling(); + }, + _emulateDragOver: function _emulateDragOver() { + if ($64afbd09cd65a300$var$touchEvt) { + this._lastX = $64afbd09cd65a300$var$touchEvt.clientX; + this._lastY = $64afbd09cd65a300$var$touchEvt.clientY; + $64afbd09cd65a300$var$_hideGhostForTarget(); + var target = document.elementFromPoint($64afbd09cd65a300$var$touchEvt.clientX, $64afbd09cd65a300$var$touchEvt.clientY); + var parent = target; + while(target && target.shadowRoot){ + target = target.shadowRoot.elementFromPoint($64afbd09cd65a300$var$touchEvt.clientX, $64afbd09cd65a300$var$touchEvt.clientY); + if (target === parent) break; + parent = target; + } + $64afbd09cd65a300$var$dragEl.parentNode[$64afbd09cd65a300$var$expando]._isOutsideThisEl(target); + if (parent) do { + if (parent[$64afbd09cd65a300$var$expando]) { + var inserted = void 0; + inserted = parent[$64afbd09cd65a300$var$expando]._onDragOver({ + clientX: $64afbd09cd65a300$var$touchEvt.clientX, + clientY: $64afbd09cd65a300$var$touchEvt.clientY, + target: target, + rootEl: parent + }); + if (inserted && !this.options.dragoverBubble) break; + } + target = parent; // store last element + }while (parent = parent.parentNode) + $64afbd09cd65a300$var$_unhideGhostForTarget(); + } + }, + _onTouchMove: function _onTouchMove(/**TouchEvent*/ evt) { + if ($64afbd09cd65a300$var$tapEvt) { + var options = this.options, fallbackTolerance = options.fallbackTolerance, fallbackOffset = options.fallbackOffset, touch = evt.touches ? evt.touches[0] : evt, ghostMatrix = $64afbd09cd65a300$var$ghostEl && $64afbd09cd65a300$var$matrix($64afbd09cd65a300$var$ghostEl, true), scaleX = $64afbd09cd65a300$var$ghostEl && ghostMatrix && ghostMatrix.a, scaleY = $64afbd09cd65a300$var$ghostEl && ghostMatrix && ghostMatrix.d, relativeScrollOffset = $64afbd09cd65a300$var$PositionGhostAbsolutely && $64afbd09cd65a300$var$ghostRelativeParent && $64afbd09cd65a300$var$getRelativeScrollOffset($64afbd09cd65a300$var$ghostRelativeParent), dx = (touch.clientX - $64afbd09cd65a300$var$tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - $64afbd09cd65a300$var$ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1), dy = (touch.clientY - $64afbd09cd65a300$var$tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - $64afbd09cd65a300$var$ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging + if (!$64afbd09cd65a300$export$31b3ca70d8f57423.active && !$64afbd09cd65a300$var$awaitingDragStarted) { + if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) return; + this._onDragStart(evt, true); + } + if ($64afbd09cd65a300$var$ghostEl) { + if (ghostMatrix) { + ghostMatrix.e += dx - ($64afbd09cd65a300$var$lastDx || 0); + ghostMatrix.f += dy - ($64afbd09cd65a300$var$lastDy || 0); + } else ghostMatrix = { + a: 1, + b: 0, + c: 0, + d: 1, + e: dx, + f: dy + }; + var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")"); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'webkitTransform', cssMatrix); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'mozTransform', cssMatrix); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'msTransform', cssMatrix); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'transform', cssMatrix); + $64afbd09cd65a300$var$lastDx = dx; + $64afbd09cd65a300$var$lastDy = dy; + $64afbd09cd65a300$var$touchEvt = touch; + } + evt.cancelable && evt.preventDefault(); + } + }, + _appendGhost: function _appendGhost() { + // Bug if using scale(): https://stackoverflow.com/questions/2637058 + // Not being adjusted for + if (!$64afbd09cd65a300$var$ghostEl) { + var container = this.options.fallbackOnBody ? document.body : $64afbd09cd65a300$var$rootEl, rect = $64afbd09cd65a300$var$getRect($64afbd09cd65a300$var$dragEl, true, $64afbd09cd65a300$var$PositionGhostAbsolutely, true, container), options = this.options; // Position absolutely + if ($64afbd09cd65a300$var$PositionGhostAbsolutely) { + // Get relatively positioned parent + $64afbd09cd65a300$var$ghostRelativeParent = container; + while($64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostRelativeParent, 'position') === 'static' && $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostRelativeParent, 'transform') === 'none' && $64afbd09cd65a300$var$ghostRelativeParent !== document)$64afbd09cd65a300$var$ghostRelativeParent = $64afbd09cd65a300$var$ghostRelativeParent.parentNode; + if ($64afbd09cd65a300$var$ghostRelativeParent !== document.body && $64afbd09cd65a300$var$ghostRelativeParent !== document.documentElement) { + if ($64afbd09cd65a300$var$ghostRelativeParent === document) $64afbd09cd65a300$var$ghostRelativeParent = $64afbd09cd65a300$var$getWindowScrollingElement(); + rect.top += $64afbd09cd65a300$var$ghostRelativeParent.scrollTop; + rect.left += $64afbd09cd65a300$var$ghostRelativeParent.scrollLeft; + } else $64afbd09cd65a300$var$ghostRelativeParent = $64afbd09cd65a300$var$getWindowScrollingElement(); + $64afbd09cd65a300$var$ghostRelativeParentInitialScroll = $64afbd09cd65a300$var$getRelativeScrollOffset($64afbd09cd65a300$var$ghostRelativeParent); + } + $64afbd09cd65a300$var$ghostEl = $64afbd09cd65a300$var$dragEl.cloneNode(true); + $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$ghostEl, options.ghostClass, false); + $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$ghostEl, options.fallbackClass, true); + $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$ghostEl, options.dragClass, true); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'transition', ''); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'transform', ''); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'box-sizing', 'border-box'); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'margin', 0); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'top', rect.top); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'left', rect.left); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'width', rect.width); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'height', rect.height); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'opacity', '0.8'); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'position', $64afbd09cd65a300$var$PositionGhostAbsolutely ? 'absolute' : 'fixed'); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'zIndex', '100000'); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'pointerEvents', 'none'); + $64afbd09cd65a300$export$31b3ca70d8f57423.ghost = $64afbd09cd65a300$var$ghostEl; + container.appendChild($64afbd09cd65a300$var$ghostEl); // Set transform-origin + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$ghostEl, 'transform-origin', $64afbd09cd65a300$var$tapDistanceLeft / parseInt($64afbd09cd65a300$var$ghostEl.style.width) * 100 + '% ' + $64afbd09cd65a300$var$tapDistanceTop / parseInt($64afbd09cd65a300$var$ghostEl.style.height) * 100 + '%'); + } + }, + _onDragStart: function _onDragStart(/**Event*/ evt, /**boolean*/ fallback) { + var _this = this; + var dataTransfer = evt.dataTransfer; + var options = _this.options; + $64afbd09cd65a300$var$pluginEvent('dragStart', this, { + evt: evt + }); + if ($64afbd09cd65a300$export$31b3ca70d8f57423.eventCanceled) { + this._onDrop(); + return; + } + $64afbd09cd65a300$var$pluginEvent('setupClone', this); + if (!$64afbd09cd65a300$export$31b3ca70d8f57423.eventCanceled) { + $64afbd09cd65a300$var$cloneEl = $64afbd09cd65a300$var$clone($64afbd09cd65a300$var$dragEl); + $64afbd09cd65a300$var$cloneEl.removeAttribute("id"); + $64afbd09cd65a300$var$cloneEl.draggable = false; + $64afbd09cd65a300$var$cloneEl.style['will-change'] = ''; + this._hideClone(); + $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$cloneEl, this.options.chosenClass, false); + $64afbd09cd65a300$export$31b3ca70d8f57423.clone = $64afbd09cd65a300$var$cloneEl; + } // #1143: IFrame support workaround + _this.cloneId = $64afbd09cd65a300$var$_nextTick(function() { + $64afbd09cd65a300$var$pluginEvent('clone', _this); + if ($64afbd09cd65a300$export$31b3ca70d8f57423.eventCanceled) return; + if (!_this.options.removeCloneOnHide) $64afbd09cd65a300$var$rootEl.insertBefore($64afbd09cd65a300$var$cloneEl, $64afbd09cd65a300$var$dragEl); + _this._hideClone(); + $64afbd09cd65a300$var$_dispatchEvent({ + sortable: _this, + name: 'clone' + }); + }); + !fallback && $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$dragEl, options.dragClass, true); // Set proper drop events + if (fallback) { + $64afbd09cd65a300$var$ignoreNextClick = true; + _this._loopId = setInterval(_this._emulateDragOver, 50); + } else { + // Undo what was set in _prepareDragStart before drag started + $64afbd09cd65a300$var$off(document, 'mouseup', _this._onDrop); + $64afbd09cd65a300$var$off(document, 'touchend', _this._onDrop); + $64afbd09cd65a300$var$off(document, 'touchcancel', _this._onDrop); + if (dataTransfer) { + dataTransfer.effectAllowed = 'move'; + options.setData && options.setData.call(_this, dataTransfer, $64afbd09cd65a300$var$dragEl); + } + $64afbd09cd65a300$var$on(document, 'drop', _this); // #1276 fix: + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$dragEl, 'transform', 'translateZ(0)'); + } + $64afbd09cd65a300$var$awaitingDragStarted = true; + _this._dragStartId = $64afbd09cd65a300$var$_nextTick(_this._dragStarted.bind(_this, fallback, evt)); + $64afbd09cd65a300$var$on(document, 'selectstart', _this); + $64afbd09cd65a300$var$moved = true; + if ($64afbd09cd65a300$var$Safari) $64afbd09cd65a300$var$css(document.body, 'user-select', 'none'); + }, + // Returns true - if no further action is needed (either inserted or another condition) + _onDragOver: function _onDragOver(/**Event*/ evt) { + var el = this.el, target1 = evt.target, dragRect, targetRect, revert, options = this.options, group = options.group, activeSortable = $64afbd09cd65a300$export$31b3ca70d8f57423.active, isOwner = $64afbd09cd65a300$var$activeGroup === group, canSort = options.sort, fromSortable = $64afbd09cd65a300$var$putSortable || activeSortable, vertical, _this = this, completedFired = false; + if ($64afbd09cd65a300$var$_silent) return; + function dragOverEvent(name, extra) { + $64afbd09cd65a300$var$pluginEvent(name, _this, $64afbd09cd65a300$var$_objectSpread2({ + evt: evt, + isOwner: isOwner, + axis: vertical ? 'vertical' : 'horizontal', + revert: revert, + dragRect: dragRect, + targetRect: targetRect, + canSort: canSort, + fromSortable: fromSortable, + target: target1, + completed: completed, + onMove: function onMove(target, after) { + return $64afbd09cd65a300$var$_onMove($64afbd09cd65a300$var$rootEl, el, $64afbd09cd65a300$var$dragEl, dragRect, target, $64afbd09cd65a300$var$getRect(target), evt, after); + }, + changed: changed + }, extra)); + } // Capture animation state + function capture() { + dragOverEvent('dragOverAnimationCapture'); + _this.captureAnimationState(); + if (_this !== fromSortable) fromSortable.captureAnimationState(); + } // Return invocation when dragEl is inserted (or completed) + function completed(insertion) { + dragOverEvent('dragOverCompleted', { + insertion: insertion + }); + if (insertion) { + // Clones must be hidden before folding animation to capture dragRectAbsolute properly + if (isOwner) activeSortable._hideClone(); + else activeSortable._showClone(_this); + if (_this !== fromSortable) { + // Set ghost class to new sortable's ghost class + $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$dragEl, $64afbd09cd65a300$var$putSortable ? $64afbd09cd65a300$var$putSortable.options.ghostClass : activeSortable.options.ghostClass, false); + $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$dragEl, options.ghostClass, true); + } + if ($64afbd09cd65a300$var$putSortable !== _this && _this !== $64afbd09cd65a300$export$31b3ca70d8f57423.active) $64afbd09cd65a300$var$putSortable = _this; + else if (_this === $64afbd09cd65a300$export$31b3ca70d8f57423.active && $64afbd09cd65a300$var$putSortable) $64afbd09cd65a300$var$putSortable = null; + // Animation + if (fromSortable === _this) _this._ignoreWhileAnimating = target1; + _this.animateAll(function() { + dragOverEvent('dragOverAnimationComplete'); + _this._ignoreWhileAnimating = null; + }); + if (_this !== fromSortable) { + fromSortable.animateAll(); + fromSortable._ignoreWhileAnimating = null; + } + } // Null lastTarget if it is not inside a previously swapped element + if (target1 === $64afbd09cd65a300$var$dragEl && !$64afbd09cd65a300$var$dragEl.animated || target1 === el && !target1.animated) $64afbd09cd65a300$var$lastTarget = null; + // no bubbling and not fallback + if (!options.dragoverBubble && !evt.rootEl && target1 !== document) { + $64afbd09cd65a300$var$dragEl.parentNode[$64afbd09cd65a300$var$expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted + !insertion && $64afbd09cd65a300$var$nearestEmptyInsertDetectEvent(evt); + } + !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation(); + return completedFired = true; + } // Call when dragEl has been inserted + function changed() { + $64afbd09cd65a300$var$newIndex = $64afbd09cd65a300$var$index($64afbd09cd65a300$var$dragEl); + $64afbd09cd65a300$var$newDraggableIndex = $64afbd09cd65a300$var$index($64afbd09cd65a300$var$dragEl, options.draggable); + $64afbd09cd65a300$var$_dispatchEvent({ + sortable: _this, + name: 'change', + toEl: el, + newIndex: $64afbd09cd65a300$var$newIndex, + newDraggableIndex: $64afbd09cd65a300$var$newDraggableIndex, + originalEvent: evt + }); + } + if (evt.preventDefault !== void 0) evt.cancelable && evt.preventDefault(); + target1 = $64afbd09cd65a300$var$closest(target1, options.draggable, el, true); + dragOverEvent('dragOver'); + if ($64afbd09cd65a300$export$31b3ca70d8f57423.eventCanceled) return completedFired; + if ($64afbd09cd65a300$var$dragEl.contains(evt.target) || target1.animated && target1.animatingX && target1.animatingY || _this._ignoreWhileAnimating === target1) return completed(false); + $64afbd09cd65a300$var$ignoreNextClick = false; + if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = $64afbd09cd65a300$var$parentEl !== $64afbd09cd65a300$var$rootEl // Reverting item into the original list + ) : $64afbd09cd65a300$var$putSortable === this || (this.lastPutMode = $64afbd09cd65a300$var$activeGroup.checkPull(this, activeSortable, $64afbd09cd65a300$var$dragEl, evt)) && group.checkPut(this, activeSortable, $64afbd09cd65a300$var$dragEl, evt))) { + vertical = this._getDirection(evt, target1) === 'vertical'; + dragRect = $64afbd09cd65a300$var$getRect($64afbd09cd65a300$var$dragEl); + dragOverEvent('dragOverValid'); + if ($64afbd09cd65a300$export$31b3ca70d8f57423.eventCanceled) return completedFired; + if (revert) { + $64afbd09cd65a300$var$parentEl = $64afbd09cd65a300$var$rootEl; // actualization + capture(); + this._hideClone(); + dragOverEvent('revert'); + if (!$64afbd09cd65a300$export$31b3ca70d8f57423.eventCanceled) { + if ($64afbd09cd65a300$var$nextEl) $64afbd09cd65a300$var$rootEl.insertBefore($64afbd09cd65a300$var$dragEl, $64afbd09cd65a300$var$nextEl); + else $64afbd09cd65a300$var$rootEl.appendChild($64afbd09cd65a300$var$dragEl); + } + return completed(true); + } + var elLastChild = $64afbd09cd65a300$var$lastChild(el, options.draggable); + if (!elLastChild || $64afbd09cd65a300$var$_ghostIsLast(evt, vertical, this) && !elLastChild.animated) { + // Insert to end of list + // If already at end of list: Do not insert + if (elLastChild === $64afbd09cd65a300$var$dragEl) return completed(false); + // if there is a last element, it is the target + if (elLastChild && el === evt.target) target1 = elLastChild; + if (target1) targetRect = $64afbd09cd65a300$var$getRect(target1); + if ($64afbd09cd65a300$var$_onMove($64afbd09cd65a300$var$rootEl, el, $64afbd09cd65a300$var$dragEl, dragRect, target1, targetRect, evt, !!target1) !== false) { + capture(); + if (elLastChild && elLastChild.nextSibling) // the last draggable element is not the last node + el.insertBefore($64afbd09cd65a300$var$dragEl, elLastChild.nextSibling); + else el.appendChild($64afbd09cd65a300$var$dragEl); + $64afbd09cd65a300$var$parentEl = el; // actualization + changed(); + return completed(true); + } + } else if (elLastChild && $64afbd09cd65a300$var$_ghostIsFirst(evt, vertical, this)) { + // Insert to start of list + var firstChild = $64afbd09cd65a300$var$getChild(el, 0, options, true); + if (firstChild === $64afbd09cd65a300$var$dragEl) return completed(false); + target1 = firstChild; + targetRect = $64afbd09cd65a300$var$getRect(target1); + if ($64afbd09cd65a300$var$_onMove($64afbd09cd65a300$var$rootEl, el, $64afbd09cd65a300$var$dragEl, dragRect, target1, targetRect, evt, false) !== false) { + capture(); + el.insertBefore($64afbd09cd65a300$var$dragEl, firstChild); + $64afbd09cd65a300$var$parentEl = el; // actualization + changed(); + return completed(true); + } + } else if (target1.parentNode === el) { + targetRect = $64afbd09cd65a300$var$getRect(target1); + var direction = 0, targetBeforeFirstSwap, differentLevel = $64afbd09cd65a300$var$dragEl.parentNode !== el, differentRowCol = !$64afbd09cd65a300$var$_dragElInRowColumn($64afbd09cd65a300$var$dragEl.animated && $64afbd09cd65a300$var$dragEl.toRect || dragRect, target1.animated && target1.toRect || targetRect, vertical), side1 = vertical ? 'top' : 'left', scrolledPastTop = $64afbd09cd65a300$var$isScrolledPast(target1, 'top', 'top') || $64afbd09cd65a300$var$isScrolledPast($64afbd09cd65a300$var$dragEl, 'top', 'top'), scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0; + if ($64afbd09cd65a300$var$lastTarget !== target1) { + targetBeforeFirstSwap = targetRect[side1]; + $64afbd09cd65a300$var$pastFirstInvertThresh = false; + $64afbd09cd65a300$var$isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel; + } + direction = $64afbd09cd65a300$var$_getSwapDirection(evt, target1, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, $64afbd09cd65a300$var$isCircumstantialInvert, $64afbd09cd65a300$var$lastTarget === target1); + var sibling; + if (direction !== 0) { + // Check if target is beside dragEl in respective direction (ignoring hidden elements) + var dragIndex = $64afbd09cd65a300$var$index($64afbd09cd65a300$var$dragEl); + do { + dragIndex -= direction; + sibling = $64afbd09cd65a300$var$parentEl.children[dragIndex]; + }while (sibling && ($64afbd09cd65a300$var$css(sibling, 'display') === 'none' || sibling === $64afbd09cd65a300$var$ghostEl)) + } // If dragEl is already beside target: Do not insert + if (direction === 0 || sibling === target1) return completed(false); + $64afbd09cd65a300$var$lastTarget = target1; + $64afbd09cd65a300$var$lastDirection = direction; + var nextSibling = target1.nextElementSibling, after1 = false; + after1 = direction === 1; + var moveVector = $64afbd09cd65a300$var$_onMove($64afbd09cd65a300$var$rootEl, el, $64afbd09cd65a300$var$dragEl, dragRect, target1, targetRect, evt, after1); + if (moveVector !== false) { + if (moveVector === 1 || moveVector === -1) after1 = moveVector === 1; + $64afbd09cd65a300$var$_silent = true; + setTimeout($64afbd09cd65a300$var$_unsilent, 30); + capture(); + if (after1 && !nextSibling) el.appendChild($64afbd09cd65a300$var$dragEl); + else target1.parentNode.insertBefore($64afbd09cd65a300$var$dragEl, after1 ? nextSibling : target1); + // Undo chrome's scroll adjustment (has no effect on other browsers) + if (scrolledPastTop) $64afbd09cd65a300$var$scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop); + $64afbd09cd65a300$var$parentEl = $64afbd09cd65a300$var$dragEl.parentNode; // actualization + // must be done before animation + if (targetBeforeFirstSwap !== undefined && !$64afbd09cd65a300$var$isCircumstantialInvert) $64afbd09cd65a300$var$targetMoveDistance = Math.abs(targetBeforeFirstSwap - $64afbd09cd65a300$var$getRect(target1)[side1]); + changed(); + return completed(true); + } + } + if (el.contains($64afbd09cd65a300$var$dragEl)) return completed(false); + } + return false; + }, + _ignoreWhileAnimating: null, + _offMoveEvents: function _offMoveEvents() { + $64afbd09cd65a300$var$off(document, 'mousemove', this._onTouchMove); + $64afbd09cd65a300$var$off(document, 'touchmove', this._onTouchMove); + $64afbd09cd65a300$var$off(document, 'pointermove', this._onTouchMove); + $64afbd09cd65a300$var$off(document, 'dragover', $64afbd09cd65a300$var$nearestEmptyInsertDetectEvent); + $64afbd09cd65a300$var$off(document, 'mousemove', $64afbd09cd65a300$var$nearestEmptyInsertDetectEvent); + $64afbd09cd65a300$var$off(document, 'touchmove', $64afbd09cd65a300$var$nearestEmptyInsertDetectEvent); + }, + _offUpEvents: function _offUpEvents() { + var ownerDocument = this.el.ownerDocument; + $64afbd09cd65a300$var$off(ownerDocument, 'mouseup', this._onDrop); + $64afbd09cd65a300$var$off(ownerDocument, 'touchend', this._onDrop); + $64afbd09cd65a300$var$off(ownerDocument, 'pointerup', this._onDrop); + $64afbd09cd65a300$var$off(ownerDocument, 'touchcancel', this._onDrop); + $64afbd09cd65a300$var$off(document, 'selectstart', this); + }, + _onDrop: function _onDrop(/**Event*/ evt) { + var el = this.el, options = this.options; // Get the index of the dragged element within its parent + $64afbd09cd65a300$var$newIndex = $64afbd09cd65a300$var$index($64afbd09cd65a300$var$dragEl); + $64afbd09cd65a300$var$newDraggableIndex = $64afbd09cd65a300$var$index($64afbd09cd65a300$var$dragEl, options.draggable); + $64afbd09cd65a300$var$pluginEvent('drop', this, { + evt: evt + }); + $64afbd09cd65a300$var$parentEl = $64afbd09cd65a300$var$dragEl && $64afbd09cd65a300$var$dragEl.parentNode; // Get again after plugin event + $64afbd09cd65a300$var$newIndex = $64afbd09cd65a300$var$index($64afbd09cd65a300$var$dragEl); + $64afbd09cd65a300$var$newDraggableIndex = $64afbd09cd65a300$var$index($64afbd09cd65a300$var$dragEl, options.draggable); + if ($64afbd09cd65a300$export$31b3ca70d8f57423.eventCanceled) { + this._nulling(); + return; + } + $64afbd09cd65a300$var$awaitingDragStarted = false; + $64afbd09cd65a300$var$isCircumstantialInvert = false; + $64afbd09cd65a300$var$pastFirstInvertThresh = false; + clearInterval(this._loopId); + clearTimeout(this._dragStartTimer); + $64afbd09cd65a300$var$_cancelNextTick(this.cloneId); + $64afbd09cd65a300$var$_cancelNextTick(this._dragStartId); // Unbind events + if (this.nativeDraggable) { + $64afbd09cd65a300$var$off(document, 'drop', this); + $64afbd09cd65a300$var$off(el, 'dragstart', this._onDragStart); + } + this._offMoveEvents(); + this._offUpEvents(); + if ($64afbd09cd65a300$var$Safari) $64afbd09cd65a300$var$css(document.body, 'user-select', ''); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$dragEl, 'transform', ''); + if (evt) { + if ($64afbd09cd65a300$var$moved) { + evt.cancelable && evt.preventDefault(); + !options.dropBubble && evt.stopPropagation(); + } + $64afbd09cd65a300$var$ghostEl && $64afbd09cd65a300$var$ghostEl.parentNode && $64afbd09cd65a300$var$ghostEl.parentNode.removeChild($64afbd09cd65a300$var$ghostEl); + if ($64afbd09cd65a300$var$rootEl === $64afbd09cd65a300$var$parentEl || $64afbd09cd65a300$var$putSortable && $64afbd09cd65a300$var$putSortable.lastPutMode !== 'clone') // Remove clone(s) + $64afbd09cd65a300$var$cloneEl && $64afbd09cd65a300$var$cloneEl.parentNode && $64afbd09cd65a300$var$cloneEl.parentNode.removeChild($64afbd09cd65a300$var$cloneEl); + if ($64afbd09cd65a300$var$dragEl) { + if (this.nativeDraggable) $64afbd09cd65a300$var$off($64afbd09cd65a300$var$dragEl, 'dragend', this); + $64afbd09cd65a300$var$_disableDraggable($64afbd09cd65a300$var$dragEl); + $64afbd09cd65a300$var$dragEl.style['will-change'] = ''; // Remove classes + // ghostClass is added in dragStarted + if ($64afbd09cd65a300$var$moved && !$64afbd09cd65a300$var$awaitingDragStarted) $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$dragEl, $64afbd09cd65a300$var$putSortable ? $64afbd09cd65a300$var$putSortable.options.ghostClass : this.options.ghostClass, false); + $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$dragEl, this.options.chosenClass, false); // Drag stop event + $64afbd09cd65a300$var$_dispatchEvent({ + sortable: this, + name: 'unchoose', + toEl: $64afbd09cd65a300$var$parentEl, + newIndex: null, + newDraggableIndex: null, + originalEvent: evt + }); + if ($64afbd09cd65a300$var$rootEl !== $64afbd09cd65a300$var$parentEl) { + if ($64afbd09cd65a300$var$newIndex >= 0) { + // Add event + $64afbd09cd65a300$var$_dispatchEvent({ + rootEl: $64afbd09cd65a300$var$parentEl, + name: 'add', + toEl: $64afbd09cd65a300$var$parentEl, + fromEl: $64afbd09cd65a300$var$rootEl, + originalEvent: evt + }); // Remove event + $64afbd09cd65a300$var$_dispatchEvent({ + sortable: this, + name: 'remove', + toEl: $64afbd09cd65a300$var$parentEl, + originalEvent: evt + }); // drag from one list and drop into another + $64afbd09cd65a300$var$_dispatchEvent({ + rootEl: $64afbd09cd65a300$var$parentEl, + name: 'sort', + toEl: $64afbd09cd65a300$var$parentEl, + fromEl: $64afbd09cd65a300$var$rootEl, + originalEvent: evt + }); + $64afbd09cd65a300$var$_dispatchEvent({ + sortable: this, + name: 'sort', + toEl: $64afbd09cd65a300$var$parentEl, + originalEvent: evt + }); + } + $64afbd09cd65a300$var$putSortable && $64afbd09cd65a300$var$putSortable.save(); + } else { + if ($64afbd09cd65a300$var$newIndex !== $64afbd09cd65a300$var$oldIndex) { + if ($64afbd09cd65a300$var$newIndex >= 0) { + // drag & drop within the same list + $64afbd09cd65a300$var$_dispatchEvent({ + sortable: this, + name: 'update', + toEl: $64afbd09cd65a300$var$parentEl, + originalEvent: evt + }); + $64afbd09cd65a300$var$_dispatchEvent({ + sortable: this, + name: 'sort', + toEl: $64afbd09cd65a300$var$parentEl, + originalEvent: evt + }); + } + } + } + if ($64afbd09cd65a300$export$31b3ca70d8f57423.active) { + /* jshint eqnull:true */ if ($64afbd09cd65a300$var$newIndex == null || $64afbd09cd65a300$var$newIndex === -1) { + $64afbd09cd65a300$var$newIndex = $64afbd09cd65a300$var$oldIndex; + $64afbd09cd65a300$var$newDraggableIndex = $64afbd09cd65a300$var$oldDraggableIndex; + } + $64afbd09cd65a300$var$_dispatchEvent({ + sortable: this, + name: 'end', + toEl: $64afbd09cd65a300$var$parentEl, + originalEvent: evt + }); // Save sorting + this.save(); + } + } + } + this._nulling(); + }, + _nulling: function _nulling() { + $64afbd09cd65a300$var$pluginEvent('nulling', this); + $64afbd09cd65a300$var$rootEl = $64afbd09cd65a300$var$dragEl = $64afbd09cd65a300$var$parentEl = $64afbd09cd65a300$var$ghostEl = $64afbd09cd65a300$var$nextEl = $64afbd09cd65a300$var$cloneEl = $64afbd09cd65a300$var$lastDownEl = $64afbd09cd65a300$var$cloneHidden = $64afbd09cd65a300$var$tapEvt = $64afbd09cd65a300$var$touchEvt = $64afbd09cd65a300$var$moved = $64afbd09cd65a300$var$newIndex = $64afbd09cd65a300$var$newDraggableIndex = $64afbd09cd65a300$var$oldIndex = $64afbd09cd65a300$var$oldDraggableIndex = $64afbd09cd65a300$var$lastTarget = $64afbd09cd65a300$var$lastDirection = $64afbd09cd65a300$var$putSortable = $64afbd09cd65a300$var$activeGroup = $64afbd09cd65a300$export$31b3ca70d8f57423.dragged = $64afbd09cd65a300$export$31b3ca70d8f57423.ghost = $64afbd09cd65a300$export$31b3ca70d8f57423.clone = $64afbd09cd65a300$export$31b3ca70d8f57423.active = null; + $64afbd09cd65a300$var$savedInputChecked.forEach(function(el) { + el.checked = true; + }); + $64afbd09cd65a300$var$savedInputChecked.length = $64afbd09cd65a300$var$lastDx = $64afbd09cd65a300$var$lastDy = 0; + }, + handleEvent: function handleEvent(/**Event*/ evt) { + switch(evt.type){ + case 'drop': + case 'dragend': + this._onDrop(evt); + break; + case 'dragenter': + case 'dragover': + if ($64afbd09cd65a300$var$dragEl) { + this._onDragOver(evt); + $64afbd09cd65a300$var$_globalDragOver(evt); + } + break; + case 'selectstart': + evt.preventDefault(); + break; + } + }, + /** + * Serializes the item into an array of string. + * @returns {String[]} + */ toArray: function toArray() { + var order = [], el, children = this.el.children, i = 0, n = children.length, options = this.options; + for(; i < n; i++){ + el = children[i]; + if ($64afbd09cd65a300$var$closest(el, options.draggable, this.el, false)) order.push(el.getAttribute(options.dataIdAttr) || $64afbd09cd65a300$var$_generateId(el)); + } + return order; + }, + /** + * Sorts the elements according to the array. + * @param {String[]} order order of the items + */ sort: function sort(order, useAnimation) { + var items = {}, rootEl = this.el; + this.toArray().forEach(function(id, i) { + var el = rootEl.children[i]; + if ($64afbd09cd65a300$var$closest(el, this.options.draggable, rootEl, false)) items[id] = el; + }, this); + useAnimation && this.captureAnimationState(); + order.forEach(function(id) { + if (items[id]) { + rootEl.removeChild(items[id]); + rootEl.appendChild(items[id]); + } + }); + useAnimation && this.animateAll(); + }, + /** + * Save the current sorting + */ save: function save() { + var store = this.options.store; + store && store.set && store.set(this); + }, + /** + * 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. + * @param {HTMLElement} el + * @param {String} [selector] default: `options.draggable` + * @returns {HTMLElement|null} + */ closest: function closest$1(el, selector) { + return $64afbd09cd65a300$var$closest(el, selector || this.options.draggable, this.el, false); + }, + /** + * Set/get option + * @param {string} name + * @param {*} [value] + * @returns {*} + */ option: function option(name, value) { + var options = this.options; + if (value === void 0) return options[name]; + else { + var modifiedValue = $64afbd09cd65a300$var$PluginManager.modifyOption(this, name, value); + if (typeof modifiedValue !== 'undefined') options[name] = modifiedValue; + else options[name] = value; + if (name === 'group') $64afbd09cd65a300$var$_prepareGroup(options); + } + }, + /** + * Destroy + */ destroy: function destroy() { + $64afbd09cd65a300$var$pluginEvent('destroy', this); + var el1 = this.el; + el1[$64afbd09cd65a300$var$expando] = null; + $64afbd09cd65a300$var$off(el1, 'mousedown', this._onTapStart); + $64afbd09cd65a300$var$off(el1, 'touchstart', this._onTapStart); + $64afbd09cd65a300$var$off(el1, 'pointerdown', this._onTapStart); + if (this.nativeDraggable) { + $64afbd09cd65a300$var$off(el1, 'dragover', this); + $64afbd09cd65a300$var$off(el1, 'dragenter', this); + } // Remove draggable attributes + Array.prototype.forEach.call(el1.querySelectorAll('[draggable]'), function(el) { + el.removeAttribute('draggable'); + }); + this._onDrop(); + this._disableDelayedDragEvents(); + $64afbd09cd65a300$var$sortables.splice($64afbd09cd65a300$var$sortables.indexOf(this.el), 1); + this.el = el1 = null; + }, + _hideClone: function _hideClone() { + if (!$64afbd09cd65a300$var$cloneHidden) { + $64afbd09cd65a300$var$pluginEvent('hideClone', this); + if ($64afbd09cd65a300$export$31b3ca70d8f57423.eventCanceled) return; + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$cloneEl, 'display', 'none'); + if (this.options.removeCloneOnHide && $64afbd09cd65a300$var$cloneEl.parentNode) $64afbd09cd65a300$var$cloneEl.parentNode.removeChild($64afbd09cd65a300$var$cloneEl); + $64afbd09cd65a300$var$cloneHidden = true; + } + }, + _showClone: function _showClone(putSortable) { + if (putSortable.lastPutMode !== 'clone') { + this._hideClone(); + return; + } + if ($64afbd09cd65a300$var$cloneHidden) { + $64afbd09cd65a300$var$pluginEvent('showClone', this); + if ($64afbd09cd65a300$export$31b3ca70d8f57423.eventCanceled) return; // show clone at dragEl or original position + if ($64afbd09cd65a300$var$dragEl.parentNode == $64afbd09cd65a300$var$rootEl && !this.options.group.revertClone) $64afbd09cd65a300$var$rootEl.insertBefore($64afbd09cd65a300$var$cloneEl, $64afbd09cd65a300$var$dragEl); + else if ($64afbd09cd65a300$var$nextEl) $64afbd09cd65a300$var$rootEl.insertBefore($64afbd09cd65a300$var$cloneEl, $64afbd09cd65a300$var$nextEl); + else $64afbd09cd65a300$var$rootEl.appendChild($64afbd09cd65a300$var$cloneEl); + if (this.options.group.revertClone) this.animate($64afbd09cd65a300$var$dragEl, $64afbd09cd65a300$var$cloneEl); + $64afbd09cd65a300$var$css($64afbd09cd65a300$var$cloneEl, 'display', ''); + $64afbd09cd65a300$var$cloneHidden = false; + } + } +}; +function $64afbd09cd65a300$var$_globalDragOver(/**Event*/ evt) { + if (evt.dataTransfer) evt.dataTransfer.dropEffect = 'move'; + evt.cancelable && evt.preventDefault(); +} +function $64afbd09cd65a300$var$_onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) { + var evt, sortable = fromEl[$64afbd09cd65a300$var$expando], onMoveFn = sortable.options.onMove, retVal; // Support for new CustomEvent feature + if (window.CustomEvent && !$64afbd09cd65a300$var$IE11OrLess && !$64afbd09cd65a300$var$Edge) evt = new CustomEvent('move', { + bubbles: true, + cancelable: true + }); + else { + evt = document.createEvent('Event'); + evt.initEvent('move', true, true); + } + evt.to = toEl; + evt.from = fromEl; + evt.dragged = dragEl; + evt.draggedRect = dragRect; + evt.related = targetEl || toEl; + evt.relatedRect = targetRect || $64afbd09cd65a300$var$getRect(toEl); + evt.willInsertAfter = willInsertAfter; + evt.originalEvent = originalEvent; + fromEl.dispatchEvent(evt); + if (onMoveFn) retVal = onMoveFn.call(sortable, evt, originalEvent); + return retVal; +} +function $64afbd09cd65a300$var$_disableDraggable(el) { + el.draggable = false; +} +function $64afbd09cd65a300$var$_unsilent() { + $64afbd09cd65a300$var$_silent = false; +} +function $64afbd09cd65a300$var$_ghostIsFirst(evt, vertical, sortable) { + var rect = $64afbd09cd65a300$var$getRect($64afbd09cd65a300$var$getChild(sortable.el, 0, sortable.options, true)); + var spacer = 10; + return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left; +} +function $64afbd09cd65a300$var$_ghostIsLast(evt, vertical, sortable) { + var rect = $64afbd09cd65a300$var$getRect($64afbd09cd65a300$var$lastChild(sortable.el, sortable.options.draggable)); + var spacer = 10; + return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer; +} +function $64afbd09cd65a300$var$_getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) { + 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; + if (!invertSwap) { + // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold + if (isLastTarget && $64afbd09cd65a300$var$targetMoveDistance < targetLength * swapThreshold) { + // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2 + // check if past first invert threshold on side opposite of lastDirection + if (!$64afbd09cd65a300$var$pastFirstInvertThresh && ($64afbd09cd65a300$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 + $64afbd09cd65a300$var$pastFirstInvertThresh = true; + if (!$64afbd09cd65a300$var$pastFirstInvertThresh) { + // dragEl shadow (target move distance shadow) + if ($64afbd09cd65a300$var$lastDirection === 1 ? mouseOnAxis < targetS1 + $64afbd09cd65a300$var$targetMoveDistance // over dragEl shadow + : mouseOnAxis > targetS2 - $64afbd09cd65a300$var$targetMoveDistance) return -$64afbd09cd65a300$var$lastDirection; + } else invert = true; + } else { + // Regular + if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) return $64afbd09cd65a300$var$_getInsertDirection(target); + } + } + invert = invert || invertSwap; + if (invert) { + // Invert of regular + if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1; + } + return 0; +} +/** + * Gets the direction dragEl must be swapped relative to target in order to make it + * seem that dragEl has been "inserted" into that element's position + * @param {HTMLElement} target The target whose position dragEl is being inserted at + * @return {Number} Direction dragEl must be swapped + */ function $64afbd09cd65a300$var$_getInsertDirection(target) { + if ($64afbd09cd65a300$var$index($64afbd09cd65a300$var$dragEl) < $64afbd09cd65a300$var$index(target)) return 1; + else return -1; +} +/** + * Generate id + * @param {HTMLElement} el + * @returns {String} + * @private + */ function $64afbd09cd65a300$var$_generateId(el) { + var str = el.tagName + el.className + el.src + el.href + el.textContent, i = str.length, sum = 0; + while(i--)sum += str.charCodeAt(i); + return sum.toString(36); +} +function $64afbd09cd65a300$var$_saveInputCheckedState(root) { + $64afbd09cd65a300$var$savedInputChecked.length = 0; + var inputs = root.getElementsByTagName('input'); + var idx = inputs.length; + while(idx--){ + var el = inputs[idx]; + el.checked && $64afbd09cd65a300$var$savedInputChecked.push(el); + } +} +function $64afbd09cd65a300$var$_nextTick(fn) { + return setTimeout(fn, 0); +} +function $64afbd09cd65a300$var$_cancelNextTick(id) { + return clearTimeout(id); +} // Fixed #973: +if ($64afbd09cd65a300$var$documentExists) $64afbd09cd65a300$var$on(document, 'touchmove', function(evt) { + if (($64afbd09cd65a300$export$31b3ca70d8f57423.active || $64afbd09cd65a300$var$awaitingDragStarted) && evt.cancelable) evt.preventDefault(); +}); + // Export utils +$64afbd09cd65a300$export$31b3ca70d8f57423.utils = { + on: $64afbd09cd65a300$var$on, + off: $64afbd09cd65a300$var$off, + css: $64afbd09cd65a300$var$css, + find: $64afbd09cd65a300$var$find, + is: function is(el, selector) { + return !!$64afbd09cd65a300$var$closest(el, selector, el, false); + }, + extend: $64afbd09cd65a300$var$extend, + throttle: $64afbd09cd65a300$var$throttle, + closest: $64afbd09cd65a300$var$closest, + toggleClass: $64afbd09cd65a300$var$toggleClass, + clone: $64afbd09cd65a300$var$clone, + index: $64afbd09cd65a300$var$index, + nextTick: $64afbd09cd65a300$var$_nextTick, + cancelNextTick: $64afbd09cd65a300$var$_cancelNextTick, + detectDirection: $64afbd09cd65a300$var$_detectDirection, + getChild: $64afbd09cd65a300$var$getChild +}; +/** + * Get the Sortable instance of an element + * @param {HTMLElement} element The element + * @return {Sortable|undefined} The instance of Sortable + */ $64afbd09cd65a300$export$31b3ca70d8f57423.get = function(element) { + return element[$64afbd09cd65a300$var$expando]; +}; +/** + * Mount a plugin to Sortable + * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted + */ $64afbd09cd65a300$export$31b3ca70d8f57423.mount = function() { + for(var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++)plugins[_key] = arguments[_key]; + if (plugins[0].constructor === Array) plugins = plugins[0]; + plugins.forEach(function(plugin) { + if (!plugin.prototype || !plugin.prototype.constructor) throw "Sortable: Mounted plugin must be a constructor function, not ".concat(({}).toString.call(plugin)); + if (plugin.utils) $64afbd09cd65a300$export$31b3ca70d8f57423.utils = $64afbd09cd65a300$var$_objectSpread2($64afbd09cd65a300$var$_objectSpread2({}, $64afbd09cd65a300$export$31b3ca70d8f57423.utils), plugin.utils); + $64afbd09cd65a300$var$PluginManager.mount(plugin); + }); +}; +/** + * Create sortable instance + * @param {HTMLElement} el + * @param {Object} [options] + */ $64afbd09cd65a300$export$31b3ca70d8f57423.create = function(el, options) { + return new $64afbd09cd65a300$export$31b3ca70d8f57423(el, options); +}; // Export +$64afbd09cd65a300$export$31b3ca70d8f57423.version = $64afbd09cd65a300$var$version; +var $64afbd09cd65a300$var$autoScrolls = [], $64afbd09cd65a300$var$scrollEl, $64afbd09cd65a300$var$scrollRootEl, $64afbd09cd65a300$var$scrolling = false, $64afbd09cd65a300$var$lastAutoScrollX, $64afbd09cd65a300$var$lastAutoScrollY, $64afbd09cd65a300$var$touchEvt$1, $64afbd09cd65a300$var$pointerElemChangedInterval; +function $64afbd09cd65a300$var$AutoScrollPlugin() { + function AutoScroll() { + this.defaults = { + scroll: true, + forceAutoScrollFallback: false, + scrollSensitivity: 30, + scrollSpeed: 10, + bubbleScroll: true + }; // Bind all private methods + for(var fn in this)if (fn.charAt(0) === '_' && typeof this[fn] === 'function') this[fn] = this[fn].bind(this); + } + AutoScroll.prototype = { + dragStarted: function dragStarted(_ref) { + var originalEvent = _ref.originalEvent; + if (this.sortable.nativeDraggable) $64afbd09cd65a300$var$on(document, 'dragover', this._handleAutoScroll); + else { + if (this.options.supportPointer) $64afbd09cd65a300$var$on(document, 'pointermove', this._handleFallbackAutoScroll); + else if (originalEvent.touches) $64afbd09cd65a300$var$on(document, 'touchmove', this._handleFallbackAutoScroll); + else $64afbd09cd65a300$var$on(document, 'mousemove', this._handleFallbackAutoScroll); + } + }, + dragOverCompleted: function dragOverCompleted(_ref2) { + var originalEvent = _ref2.originalEvent; + // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached) + if (!this.options.dragOverBubble && !originalEvent.rootEl) this._handleAutoScroll(originalEvent); + }, + drop: function drop() { + if (this.sortable.nativeDraggable) $64afbd09cd65a300$var$off(document, 'dragover', this._handleAutoScroll); + else { + $64afbd09cd65a300$var$off(document, 'pointermove', this._handleFallbackAutoScroll); + $64afbd09cd65a300$var$off(document, 'touchmove', this._handleFallbackAutoScroll); + $64afbd09cd65a300$var$off(document, 'mousemove', this._handleFallbackAutoScroll); + } + $64afbd09cd65a300$var$clearPointerElemChangedInterval(); + $64afbd09cd65a300$var$clearAutoScrolls(); + $64afbd09cd65a300$var$cancelThrottle(); + }, + nulling: function nulling() { + $64afbd09cd65a300$var$touchEvt$1 = $64afbd09cd65a300$var$scrollRootEl = $64afbd09cd65a300$var$scrollEl = $64afbd09cd65a300$var$scrolling = $64afbd09cd65a300$var$pointerElemChangedInterval = $64afbd09cd65a300$var$lastAutoScrollX = $64afbd09cd65a300$var$lastAutoScrollY = null; + $64afbd09cd65a300$var$autoScrolls.length = 0; + }, + _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) { + this._handleAutoScroll(evt, true); + }, + _handleAutoScroll: function _handleAutoScroll(evt, fallback) { + var _this = this; + var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, elem = document.elementFromPoint(x, y); + $64afbd09cd65a300$var$touchEvt$1 = evt; // IE does not seem to have native autoscroll, + // Edge's autoscroll seems too conditional, + // MACOS Safari does not have autoscroll, + // Firefox and Chrome are good + if (fallback || this.options.forceAutoScrollFallback || $64afbd09cd65a300$var$Edge || $64afbd09cd65a300$var$IE11OrLess || $64afbd09cd65a300$var$Safari) { + $64afbd09cd65a300$var$autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change + var ogElemScroller = $64afbd09cd65a300$var$getParentAutoScrollElement(elem, true); + if ($64afbd09cd65a300$var$scrolling && (!$64afbd09cd65a300$var$pointerElemChangedInterval || x !== $64afbd09cd65a300$var$lastAutoScrollX || y !== $64afbd09cd65a300$var$lastAutoScrollY)) { + $64afbd09cd65a300$var$pointerElemChangedInterval && $64afbd09cd65a300$var$clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour + $64afbd09cd65a300$var$pointerElemChangedInterval = setInterval(function() { + var newElem = $64afbd09cd65a300$var$getParentAutoScrollElement(document.elementFromPoint(x, y), true); + if (newElem !== ogElemScroller) { + ogElemScroller = newElem; + $64afbd09cd65a300$var$clearAutoScrolls(); + } + $64afbd09cd65a300$var$autoScroll(evt, _this.options, newElem, fallback); + }, 10); + $64afbd09cd65a300$var$lastAutoScrollX = x; + $64afbd09cd65a300$var$lastAutoScrollY = y; + } + } else { + // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll + if (!this.options.bubbleScroll || $64afbd09cd65a300$var$getParentAutoScrollElement(elem, true) === $64afbd09cd65a300$var$getWindowScrollingElement()) { + $64afbd09cd65a300$var$clearAutoScrolls(); + return; + } + $64afbd09cd65a300$var$autoScroll(evt, this.options, $64afbd09cd65a300$var$getParentAutoScrollElement(elem, false), false); + } + } + }; + return $64afbd09cd65a300$var$_extends(AutoScroll, { + pluginName: 'scroll', + initializeByDefault: true + }); +} +function $64afbd09cd65a300$var$clearAutoScrolls() { + $64afbd09cd65a300$var$autoScrolls.forEach(function(autoScroll) { + clearInterval(autoScroll.pid); + }); + $64afbd09cd65a300$var$autoScrolls = []; +} +function $64afbd09cd65a300$var$clearPointerElemChangedInterval() { + clearInterval($64afbd09cd65a300$var$pointerElemChangedInterval); +} +var $64afbd09cd65a300$var$autoScroll = $64afbd09cd65a300$var$throttle(function(evt, options, rootEl, isFallback) { + // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521 + if (!options.scroll) return; + var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, sens = options.scrollSensitivity, speed = options.scrollSpeed, winScroller = $64afbd09cd65a300$var$getWindowScrollingElement(); + var scrollThisInstance = false, scrollCustomFn; // New scroll root, set scrollEl + if ($64afbd09cd65a300$var$scrollRootEl !== rootEl) { + $64afbd09cd65a300$var$scrollRootEl = rootEl; + $64afbd09cd65a300$var$clearAutoScrolls(); + $64afbd09cd65a300$var$scrollEl = options.scroll; + scrollCustomFn = options.scrollFn; + if ($64afbd09cd65a300$var$scrollEl === true) $64afbd09cd65a300$var$scrollEl = $64afbd09cd65a300$var$getParentAutoScrollElement(rootEl, true); + } + var layersOut = 0; + var currentParent = $64afbd09cd65a300$var$scrollEl; + do { + var el = currentParent, rect = $64afbd09cd65a300$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 = $64afbd09cd65a300$var$css(el), scrollPosX = el.scrollLeft, scrollPosY = el.scrollTop; + if (el === winScroller) { + canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible'); + canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible'); + } else { + canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll'); + canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll'); + } + var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX); + var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY); + if (!$64afbd09cd65a300$var$autoScrolls[layersOut]) { + for(var i = 0; i <= layersOut; i++)if (!$64afbd09cd65a300$var$autoScrolls[i]) $64afbd09cd65a300$var$autoScrolls[i] = {}; + } + if ($64afbd09cd65a300$var$autoScrolls[layersOut].vx != vx || $64afbd09cd65a300$var$autoScrolls[layersOut].vy != vy || $64afbd09cd65a300$var$autoScrolls[layersOut].el !== el) { + $64afbd09cd65a300$var$autoScrolls[layersOut].el = el; + $64afbd09cd65a300$var$autoScrolls[layersOut].vx = vx; + $64afbd09cd65a300$var$autoScrolls[layersOut].vy = vy; + clearInterval($64afbd09cd65a300$var$autoScrolls[layersOut].pid); + if (vx != 0 || vy != 0) { + scrollThisInstance = true; + /* jshint loopfunc:true */ $64afbd09cd65a300$var$autoScrolls[layersOut].pid = setInterval((function() { + // emulate drag over during autoscroll (fallback), emulating native DnD behaviour + if (isFallback && this.layer === 0) $64afbd09cd65a300$export$31b3ca70d8f57423.active._onTouchMove($64afbd09cd65a300$var$touchEvt$1); // To move ghost if it is positioned absolutely + var scrollOffsetY = $64afbd09cd65a300$var$autoScrolls[this.layer].vy ? $64afbd09cd65a300$var$autoScrolls[this.layer].vy * speed : 0; + var scrollOffsetX = $64afbd09cd65a300$var$autoScrolls[this.layer].vx ? $64afbd09cd65a300$var$autoScrolls[this.layer].vx * speed : 0; + if (typeof scrollCustomFn === 'function') { + if (scrollCustomFn.call($64afbd09cd65a300$export$31b3ca70d8f57423.dragged.parentNode[$64afbd09cd65a300$var$expando], scrollOffsetX, scrollOffsetY, evt, $64afbd09cd65a300$var$touchEvt$1, $64afbd09cd65a300$var$autoScrolls[this.layer].el) !== 'continue') return; + } + $64afbd09cd65a300$var$scrollBy($64afbd09cd65a300$var$autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY); + }).bind({ + layer: layersOut + }), 24); + } + } + layersOut++; + }while (options.bubbleScroll && currentParent !== winScroller && (currentParent = $64afbd09cd65a300$var$getParentAutoScrollElement(currentParent, false))) + $64afbd09cd65a300$var$scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not +}, 30); +var $64afbd09cd65a300$var$drop = function drop(_ref) { + var originalEvent = _ref.originalEvent, putSortable = _ref.putSortable, dragEl = _ref.dragEl, activeSortable = _ref.activeSortable, dispatchSortableEvent = _ref.dispatchSortableEvent, hideGhostForTarget = _ref.hideGhostForTarget, unhideGhostForTarget = _ref.unhideGhostForTarget; + if (!originalEvent) return; + var toSortable = putSortable || activeSortable; + hideGhostForTarget(); + var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent; + var target = document.elementFromPoint(touch.clientX, touch.clientY); + unhideGhostForTarget(); + if (toSortable && !toSortable.el.contains(target)) { + dispatchSortableEvent('spill'); + this.onSpill({ + dragEl: dragEl, + putSortable: putSortable + }); + } +}; +function $64afbd09cd65a300$var$Revert() {} +$64afbd09cd65a300$var$Revert.prototype = { + startIndex: null, + dragStart: function dragStart(_ref2) { + var oldDraggableIndex = _ref2.oldDraggableIndex; + this.startIndex = oldDraggableIndex; + }, + onSpill: function onSpill(_ref3) { + var dragEl = _ref3.dragEl, putSortable = _ref3.putSortable; + this.sortable.captureAnimationState(); + if (putSortable) putSortable.captureAnimationState(); + var nextSibling = $64afbd09cd65a300$var$getChild(this.sortable.el, this.startIndex, this.options); + if (nextSibling) this.sortable.el.insertBefore(dragEl, nextSibling); + else this.sortable.el.appendChild(dragEl); + this.sortable.animateAll(); + if (putSortable) putSortable.animateAll(); + }, + drop: $64afbd09cd65a300$var$drop +}; +$64afbd09cd65a300$var$_extends($64afbd09cd65a300$var$Revert, { + pluginName: 'revertOnSpill' +}); +function $64afbd09cd65a300$var$Remove() {} +$64afbd09cd65a300$var$Remove.prototype = { + onSpill: function onSpill(_ref4) { + var dragEl = _ref4.dragEl, putSortable = _ref4.putSortable; + var parentSortable = putSortable || this.sortable; + parentSortable.captureAnimationState(); + dragEl.parentNode && dragEl.parentNode.removeChild(dragEl); + parentSortable.animateAll(); + }, + drop: $64afbd09cd65a300$var$drop +}; +$64afbd09cd65a300$var$_extends($64afbd09cd65a300$var$Remove, { + pluginName: 'removeOnSpill' +}); +var $64afbd09cd65a300$var$lastSwapEl; +function $64afbd09cd65a300$export$bdb5f0a1b77546f4() { + function Swap() { + this.defaults = { + swapClass: 'sortable-swap-highlight' + }; + } + Swap.prototype = { + dragStart: function dragStart(_ref) { + var dragEl = _ref.dragEl; + $64afbd09cd65a300$var$lastSwapEl = dragEl; + }, + dragOverValid: function dragOverValid(_ref2) { + var completed = _ref2.completed, target = _ref2.target, onMove = _ref2.onMove, activeSortable = _ref2.activeSortable, changed = _ref2.changed, cancel = _ref2.cancel; + if (!activeSortable.options.swap) return; + var el = this.sortable.el, options = this.options; + if (target && target !== el) { + var prevSwapEl = $64afbd09cd65a300$var$lastSwapEl; + if (onMove(target) !== false) { + $64afbd09cd65a300$var$toggleClass(target, options.swapClass, true); + $64afbd09cd65a300$var$lastSwapEl = target; + } else $64afbd09cd65a300$var$lastSwapEl = null; + if (prevSwapEl && prevSwapEl !== $64afbd09cd65a300$var$lastSwapEl) $64afbd09cd65a300$var$toggleClass(prevSwapEl, options.swapClass, false); + } + changed(); + completed(true); + cancel(); + }, + drop: function drop(_ref3) { + var activeSortable = _ref3.activeSortable, putSortable = _ref3.putSortable, dragEl = _ref3.dragEl; + var toSortable = putSortable || this.sortable; + var options = this.options; + $64afbd09cd65a300$var$lastSwapEl && $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$lastSwapEl, options.swapClass, false); + if ($64afbd09cd65a300$var$lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) { + if (dragEl !== $64afbd09cd65a300$var$lastSwapEl) { + toSortable.captureAnimationState(); + if (toSortable !== activeSortable) activeSortable.captureAnimationState(); + $64afbd09cd65a300$var$swapNodes(dragEl, $64afbd09cd65a300$var$lastSwapEl); + toSortable.animateAll(); + if (toSortable !== activeSortable) activeSortable.animateAll(); + } + } + }, + nulling: function nulling() { + $64afbd09cd65a300$var$lastSwapEl = null; + } + }; + return $64afbd09cd65a300$var$_extends(Swap, { + pluginName: 'swap', + eventProperties: function eventProperties() { + return { + swapItem: $64afbd09cd65a300$var$lastSwapEl + }; + } + }); +} +function $64afbd09cd65a300$var$swapNodes(n1, n2) { + var p1 = n1.parentNode, p2 = n2.parentNode, i1, i2; + if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return; + i1 = $64afbd09cd65a300$var$index(n1); + i2 = $64afbd09cd65a300$var$index(n2); + if (p1.isEqualNode(p2) && i1 < i2) i2++; + p1.insertBefore(n2, p1.children[i1]); + p2.insertBefore(n1, p2.children[i2]); +} +var $64afbd09cd65a300$var$multiDragElements = [], $64afbd09cd65a300$var$multiDragClones = [], $64afbd09cd65a300$var$lastMultiDragSelect, // for selection with modifier key down (SHIFT) +$64afbd09cd65a300$var$multiDragSortable, $64afbd09cd65a300$var$initialFolding = false, // Initial multi-drag fold when drag started +$64afbd09cd65a300$var$folding = false, // Folding any other time +$64afbd09cd65a300$var$dragStarted = false, $64afbd09cd65a300$var$dragEl$1, $64afbd09cd65a300$var$clonesFromRect, $64afbd09cd65a300$var$clonesHidden; +function $64afbd09cd65a300$export$18e5d2a5d1df842d() { + function MultiDrag(sortable) { + // Bind all private methods + for(var fn in this)if (fn.charAt(0) === '_' && typeof this[fn] === 'function') this[fn] = this[fn].bind(this); + if (!sortable.options.avoidImplicitDeselect) { + if (sortable.options.supportPointer) $64afbd09cd65a300$var$on(document, 'pointerup', this._deselectMultiDrag); + else { + $64afbd09cd65a300$var$on(document, 'mouseup', this._deselectMultiDrag); + $64afbd09cd65a300$var$on(document, 'touchend', this._deselectMultiDrag); + } + } + $64afbd09cd65a300$var$on(document, 'keydown', this._checkKeyDown); + $64afbd09cd65a300$var$on(document, 'keyup', this._checkKeyUp); + this.defaults = { + selectedClass: 'sortable-selected', + multiDragKey: null, + avoidImplicitDeselect: false, + setData: function setData(dataTransfer, dragEl) { + var data = ''; + if ($64afbd09cd65a300$var$multiDragElements.length && $64afbd09cd65a300$var$multiDragSortable === sortable) $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement, i) { + data += (!i ? '' : ', ') + multiDragElement.textContent; + }); + else data = dragEl.textContent; + dataTransfer.setData('Text', data); + } + }; + } + MultiDrag.prototype = { + multiDragKeyDown: false, + isMultiDrag: false, + delayStartGlobal: function delayStartGlobal(_ref) { + var dragged = _ref.dragEl; + $64afbd09cd65a300$var$dragEl$1 = dragged; + }, + delayEnded: function delayEnded() { + this.isMultiDrag = ~$64afbd09cd65a300$var$multiDragElements.indexOf($64afbd09cd65a300$var$dragEl$1); + }, + setupClone: function setupClone(_ref2) { + var sortable = _ref2.sortable, cancel = _ref2.cancel; + if (!this.isMultiDrag) return; + for(var i = 0; i < $64afbd09cd65a300$var$multiDragElements.length; i++){ + $64afbd09cd65a300$var$multiDragClones.push($64afbd09cd65a300$var$clone($64afbd09cd65a300$var$multiDragElements[i])); + $64afbd09cd65a300$var$multiDragClones[i].sortableIndex = $64afbd09cd65a300$var$multiDragElements[i].sortableIndex; + $64afbd09cd65a300$var$multiDragClones[i].draggable = false; + $64afbd09cd65a300$var$multiDragClones[i].style['will-change'] = ''; + $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$multiDragClones[i], this.options.selectedClass, false); + $64afbd09cd65a300$var$multiDragElements[i] === $64afbd09cd65a300$var$dragEl$1 && $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$multiDragClones[i], this.options.chosenClass, false); + } + sortable._hideClone(); + cancel(); + }, + clone: function clone(_ref3) { + var sortable = _ref3.sortable, rootEl = _ref3.rootEl, dispatchSortableEvent = _ref3.dispatchSortableEvent, cancel = _ref3.cancel; + if (!this.isMultiDrag) return; + if (!this.options.removeCloneOnHide) { + if ($64afbd09cd65a300$var$multiDragElements.length && $64afbd09cd65a300$var$multiDragSortable === sortable) { + $64afbd09cd65a300$var$insertMultiDragClones(true, rootEl); + dispatchSortableEvent('clone'); + cancel(); + } + } + }, + showClone: function showClone(_ref4) { + var cloneNowShown = _ref4.cloneNowShown, rootEl = _ref4.rootEl, cancel = _ref4.cancel; + if (!this.isMultiDrag) return; + $64afbd09cd65a300$var$insertMultiDragClones(false, rootEl); + $64afbd09cd65a300$var$multiDragClones.forEach(function(clone) { + $64afbd09cd65a300$var$css(clone, 'display', ''); + }); + cloneNowShown(); + $64afbd09cd65a300$var$clonesHidden = false; + cancel(); + }, + hideClone: function hideClone(_ref5) { + var _this = this; + var sortable = _ref5.sortable, cloneNowHidden = _ref5.cloneNowHidden, cancel = _ref5.cancel; + if (!this.isMultiDrag) return; + $64afbd09cd65a300$var$multiDragClones.forEach(function(clone) { + $64afbd09cd65a300$var$css(clone, 'display', 'none'); + if (_this.options.removeCloneOnHide && clone.parentNode) clone.parentNode.removeChild(clone); + }); + cloneNowHidden(); + $64afbd09cd65a300$var$clonesHidden = true; + cancel(); + }, + dragStartGlobal: function dragStartGlobal(_ref6) { + var sortable = _ref6.sortable; + if (!this.isMultiDrag && $64afbd09cd65a300$var$multiDragSortable) $64afbd09cd65a300$var$multiDragSortable.multiDrag._deselectMultiDrag(); + $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement) { + multiDragElement.sortableIndex = $64afbd09cd65a300$var$index(multiDragElement); + }); // Sort multi-drag elements + $64afbd09cd65a300$var$multiDragElements = $64afbd09cd65a300$var$multiDragElements.sort(function(a, b) { + return a.sortableIndex - b.sortableIndex; + }); + $64afbd09cd65a300$var$dragStarted = true; + }, + dragStarted: function dragStarted(_ref7) { + var _this2 = this; + var sortable = _ref7.sortable; + if (!this.isMultiDrag) return; + if (this.options.sort) { + // Capture rects, + // hide multi drag elements (by positioning them absolute), + // set multi drag elements rects to dragRect, + // show multi drag elements, + // animate to rects, + // unset rects & remove from DOM + sortable.captureAnimationState(); + if (this.options.animation) { + $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement) { + if (multiDragElement === $64afbd09cd65a300$var$dragEl$1) return; + $64afbd09cd65a300$var$css(multiDragElement, 'position', 'absolute'); + }); + var dragRect = $64afbd09cd65a300$var$getRect($64afbd09cd65a300$var$dragEl$1, false, true, true); + $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement) { + if (multiDragElement === $64afbd09cd65a300$var$dragEl$1) return; + $64afbd09cd65a300$var$setRect(multiDragElement, dragRect); + }); + $64afbd09cd65a300$var$folding = true; + $64afbd09cd65a300$var$initialFolding = true; + } + } + sortable.animateAll(function() { + $64afbd09cd65a300$var$folding = false; + $64afbd09cd65a300$var$initialFolding = false; + if (_this2.options.animation) $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement) { + $64afbd09cd65a300$var$unsetRect(multiDragElement); + }); + // Remove all auxiliary multidrag items from el, if sorting enabled + if (_this2.options.sort) $64afbd09cd65a300$var$removeMultiDragElements(); + }); + }, + dragOver: function dragOver(_ref8) { + var target = _ref8.target, completed = _ref8.completed, cancel = _ref8.cancel; + if ($64afbd09cd65a300$var$folding && ~$64afbd09cd65a300$var$multiDragElements.indexOf(target)) { + completed(false); + cancel(); + } + }, + revert: function revert(_ref9) { + var fromSortable = _ref9.fromSortable, rootEl = _ref9.rootEl, sortable = _ref9.sortable, dragRect = _ref9.dragRect; + if ($64afbd09cd65a300$var$multiDragElements.length > 1) { + // Setup unfold animation + $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement) { + sortable.addAnimationState({ + target: multiDragElement, + rect: $64afbd09cd65a300$var$folding ? $64afbd09cd65a300$var$getRect(multiDragElement) : dragRect + }); + $64afbd09cd65a300$var$unsetRect(multiDragElement); + multiDragElement.fromRect = dragRect; + fromSortable.removeAnimationState(multiDragElement); + }); + $64afbd09cd65a300$var$folding = false; + $64afbd09cd65a300$var$insertMultiDragElements(!this.options.removeCloneOnHide, rootEl); + } + }, + dragOverCompleted: function dragOverCompleted(_ref10) { + var sortable = _ref10.sortable, isOwner = _ref10.isOwner, insertion = _ref10.insertion, activeSortable = _ref10.activeSortable, parentEl = _ref10.parentEl, putSortable = _ref10.putSortable; + var options = this.options; + if (insertion) { + // Clones must be hidden before folding animation to capture dragRectAbsolute properly + if (isOwner) activeSortable._hideClone(); + $64afbd09cd65a300$var$initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location + if (options.animation && $64afbd09cd65a300$var$multiDragElements.length > 1 && ($64afbd09cd65a300$var$folding || !isOwner && !activeSortable.options.sort && !putSortable)) { + // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible + var dragRectAbsolute = $64afbd09cd65a300$var$getRect($64afbd09cd65a300$var$dragEl$1, false, true, true); + $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement) { + if (multiDragElement === $64afbd09cd65a300$var$dragEl$1) return; + $64afbd09cd65a300$var$setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted + // while folding, and so that we can capture them again because old sortable will no longer be fromSortable + parentEl.appendChild(multiDragElement); + }); + $64afbd09cd65a300$var$folding = true; + } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out + if (!isOwner) { + // Only remove if not folding (folding will remove them anyways) + if (!$64afbd09cd65a300$var$folding) $64afbd09cd65a300$var$removeMultiDragElements(); + if ($64afbd09cd65a300$var$multiDragElements.length > 1) { + var clonesHiddenBefore = $64afbd09cd65a300$var$clonesHidden; + activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden + if (activeSortable.options.animation && !$64afbd09cd65a300$var$clonesHidden && clonesHiddenBefore) $64afbd09cd65a300$var$multiDragClones.forEach(function(clone) { + activeSortable.addAnimationState({ + target: clone, + rect: $64afbd09cd65a300$var$clonesFromRect + }); + clone.fromRect = $64afbd09cd65a300$var$clonesFromRect; + clone.thisAnimationDuration = null; + }); + } else activeSortable._showClone(sortable); + } + } + }, + dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) { + var dragRect = _ref11.dragRect, isOwner = _ref11.isOwner, activeSortable = _ref11.activeSortable; + $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement) { + multiDragElement.thisAnimationDuration = null; + }); + if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) { + $64afbd09cd65a300$var$clonesFromRect = $64afbd09cd65a300$var$_extends({}, dragRect); + var dragMatrix = $64afbd09cd65a300$var$matrix($64afbd09cd65a300$var$dragEl$1, true); + $64afbd09cd65a300$var$clonesFromRect.top -= dragMatrix.f; + $64afbd09cd65a300$var$clonesFromRect.left -= dragMatrix.e; + } + }, + dragOverAnimationComplete: function dragOverAnimationComplete() { + if ($64afbd09cd65a300$var$folding) { + $64afbd09cd65a300$var$folding = false; + $64afbd09cd65a300$var$removeMultiDragElements(); + } + }, + drop: function drop(_ref12) { + var evt = _ref12.originalEvent, rootEl = _ref12.rootEl, parentEl = _ref12.parentEl, sortable = _ref12.sortable, dispatchSortableEvent = _ref12.dispatchSortableEvent, oldIndex = _ref12.oldIndex, putSortable = _ref12.putSortable; + var toSortable = putSortable || this.sortable; + if (!evt) return; + var options = this.options, children = parentEl.children; // Multi-drag selection + if (!$64afbd09cd65a300$var$dragStarted) { + if (options.multiDragKey && !this.multiDragKeyDown) this._deselectMultiDrag(); + $64afbd09cd65a300$var$toggleClass($64afbd09cd65a300$var$dragEl$1, options.selectedClass, !~$64afbd09cd65a300$var$multiDragElements.indexOf($64afbd09cd65a300$var$dragEl$1)); + if (!~$64afbd09cd65a300$var$multiDragElements.indexOf($64afbd09cd65a300$var$dragEl$1)) { + $64afbd09cd65a300$var$multiDragElements.push($64afbd09cd65a300$var$dragEl$1); + $64afbd09cd65a300$var$dispatchEvent({ + sortable: sortable, + rootEl: rootEl, + name: 'select', + targetEl: $64afbd09cd65a300$var$dragEl$1, + originalEvent: evt + }); // Modifier activated, select from last to dragEl + if (evt.shiftKey && $64afbd09cd65a300$var$lastMultiDragSelect && sortable.el.contains($64afbd09cd65a300$var$lastMultiDragSelect)) { + var lastIndex = $64afbd09cd65a300$var$index($64afbd09cd65a300$var$lastMultiDragSelect), currentIndex = $64afbd09cd65a300$var$index($64afbd09cd65a300$var$dragEl$1); + if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) { + // Must include lastMultiDragSelect (select it), in case modified selection from no selection + // (but previous selection existed) + var n, i; + if (currentIndex > lastIndex) { + i = lastIndex; + n = currentIndex; + } else { + i = currentIndex; + n = lastIndex + 1; + } + for(; i < n; i++){ + if (~$64afbd09cd65a300$var$multiDragElements.indexOf(children[i])) continue; + $64afbd09cd65a300$var$toggleClass(children[i], options.selectedClass, true); + $64afbd09cd65a300$var$multiDragElements.push(children[i]); + $64afbd09cd65a300$var$dispatchEvent({ + sortable: sortable, + rootEl: rootEl, + name: 'select', + targetEl: children[i], + originalEvent: evt + }); + } + } + } else $64afbd09cd65a300$var$lastMultiDragSelect = $64afbd09cd65a300$var$dragEl$1; + $64afbd09cd65a300$var$multiDragSortable = toSortable; + } else { + $64afbd09cd65a300$var$multiDragElements.splice($64afbd09cd65a300$var$multiDragElements.indexOf($64afbd09cd65a300$var$dragEl$1), 1); + $64afbd09cd65a300$var$lastMultiDragSelect = null; + $64afbd09cd65a300$var$dispatchEvent({ + sortable: sortable, + rootEl: rootEl, + name: 'deselect', + targetEl: $64afbd09cd65a300$var$dragEl$1, + originalEvent: evt + }); + } + } // Multi-drag drop + if ($64afbd09cd65a300$var$dragStarted && this.isMultiDrag) { + $64afbd09cd65a300$var$folding = false; // Do not "unfold" after around dragEl if reverted + if ((parentEl[$64afbd09cd65a300$var$expando].options.sort || parentEl !== rootEl) && $64afbd09cd65a300$var$multiDragElements.length > 1) { + var dragRect = $64afbd09cd65a300$var$getRect($64afbd09cd65a300$var$dragEl$1), multiDragIndex = $64afbd09cd65a300$var$index($64afbd09cd65a300$var$dragEl$1, ':not(.' + this.options.selectedClass + ')'); + if (!$64afbd09cd65a300$var$initialFolding && options.animation) $64afbd09cd65a300$var$dragEl$1.thisAnimationDuration = null; + toSortable.captureAnimationState(); + if (!$64afbd09cd65a300$var$initialFolding) { + if (options.animation) { + $64afbd09cd65a300$var$dragEl$1.fromRect = dragRect; + $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement) { + multiDragElement.thisAnimationDuration = null; + if (multiDragElement !== $64afbd09cd65a300$var$dragEl$1) { + var rect = $64afbd09cd65a300$var$folding ? $64afbd09cd65a300$var$getRect(multiDragElement) : dragRect; + multiDragElement.fromRect = rect; // Prepare unfold animation + toSortable.addAnimationState({ + target: multiDragElement, + rect: rect + }); + } + }); + } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert + // properly they must all be removed + $64afbd09cd65a300$var$removeMultiDragElements(); + $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement) { + if (children[multiDragIndex]) parentEl.insertBefore(multiDragElement, children[multiDragIndex]); + else parentEl.appendChild(multiDragElement); + multiDragIndex++; + }); // If initial folding is done, the elements may have changed position because they are now + // unfolding around dragEl, even though dragEl may not have his index changed, so update event + // must be fired here as Sortable will not. + if (oldIndex === $64afbd09cd65a300$var$index($64afbd09cd65a300$var$dragEl$1)) { + var update = false; + $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement) { + if (multiDragElement.sortableIndex !== $64afbd09cd65a300$var$index(multiDragElement)) { + update = true; + return; + } + }); + if (update) dispatchSortableEvent('update'); + } + } // Must be done after capturing individual rects (scroll bar) + $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement) { + $64afbd09cd65a300$var$unsetRect(multiDragElement); + }); + toSortable.animateAll(); + } + $64afbd09cd65a300$var$multiDragSortable = toSortable; + } // Remove clones if necessary + if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') $64afbd09cd65a300$var$multiDragClones.forEach(function(clone) { + clone.parentNode && clone.parentNode.removeChild(clone); + }); + }, + nullingGlobal: function nullingGlobal() { + this.isMultiDrag = $64afbd09cd65a300$var$dragStarted = false; + $64afbd09cd65a300$var$multiDragClones.length = 0; + }, + destroyGlobal: function destroyGlobal() { + this._deselectMultiDrag(); + $64afbd09cd65a300$var$off(document, 'pointerup', this._deselectMultiDrag); + $64afbd09cd65a300$var$off(document, 'mouseup', this._deselectMultiDrag); + $64afbd09cd65a300$var$off(document, 'touchend', this._deselectMultiDrag); + $64afbd09cd65a300$var$off(document, 'keydown', this._checkKeyDown); + $64afbd09cd65a300$var$off(document, 'keyup', this._checkKeyUp); + }, + _deselectMultiDrag: function _deselectMultiDrag(evt) { + if (typeof $64afbd09cd65a300$var$dragStarted !== "undefined" && $64afbd09cd65a300$var$dragStarted) return; // Only deselect if selection is in this sortable + if ($64afbd09cd65a300$var$multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable + if (evt && $64afbd09cd65a300$var$closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click + if (evt && evt.button !== 0) return; + while($64afbd09cd65a300$var$multiDragElements.length){ + var el = $64afbd09cd65a300$var$multiDragElements[0]; + $64afbd09cd65a300$var$toggleClass(el, this.options.selectedClass, false); + $64afbd09cd65a300$var$multiDragElements.shift(); + $64afbd09cd65a300$var$dispatchEvent({ + sortable: this.sortable, + rootEl: this.sortable.el, + name: 'deselect', + targetEl: el, + originalEvent: evt + }); + } + }, + _checkKeyDown: function _checkKeyDown(evt) { + if (evt.key === this.options.multiDragKey) this.multiDragKeyDown = true; + }, + _checkKeyUp: function _checkKeyUp(evt) { + if (evt.key === this.options.multiDragKey) this.multiDragKeyDown = false; + } + }; + return $64afbd09cd65a300$var$_extends(MultiDrag, { + // Static methods & properties + pluginName: 'multiDrag', + utils: { + /** + * Selects the provided multi-drag item + * @param {HTMLElement} el The element to be selected + */ select: function select(el) { + var sortable = el.parentNode[$64afbd09cd65a300$var$expando]; + if (!sortable || !sortable.options.multiDrag || ~$64afbd09cd65a300$var$multiDragElements.indexOf(el)) return; + if ($64afbd09cd65a300$var$multiDragSortable && $64afbd09cd65a300$var$multiDragSortable !== sortable) { + $64afbd09cd65a300$var$multiDragSortable.multiDrag._deselectMultiDrag(); + $64afbd09cd65a300$var$multiDragSortable = sortable; + } + $64afbd09cd65a300$var$toggleClass(el, sortable.options.selectedClass, true); + $64afbd09cd65a300$var$multiDragElements.push(el); + }, + /** + * Deselects the provided multi-drag item + * @param {HTMLElement} el The element to be deselected + */ deselect: function deselect(el) { + var sortable = el.parentNode[$64afbd09cd65a300$var$expando], index = $64afbd09cd65a300$var$multiDragElements.indexOf(el); + if (!sortable || !sortable.options.multiDrag || !~index) return; + $64afbd09cd65a300$var$toggleClass(el, sortable.options.selectedClass, false); + $64afbd09cd65a300$var$multiDragElements.splice(index, 1); + } + }, + eventProperties: function eventProperties() { + var _this3 = this; + var oldIndicies = [], newIndicies = []; + $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement) { + oldIndicies.push({ + multiDragElement: multiDragElement, + index: multiDragElement.sortableIndex + }); // multiDragElements will already be sorted if folding + var newIndex; + if ($64afbd09cd65a300$var$folding && multiDragElement !== $64afbd09cd65a300$var$dragEl$1) newIndex = -1; + else if ($64afbd09cd65a300$var$folding) newIndex = $64afbd09cd65a300$var$index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')'); + else newIndex = $64afbd09cd65a300$var$index(multiDragElement); + newIndicies.push({ + multiDragElement: multiDragElement, + index: newIndex + }); + }); + return { + items: $64afbd09cd65a300$var$_toConsumableArray($64afbd09cd65a300$var$multiDragElements), + clones: [].concat($64afbd09cd65a300$var$multiDragClones), + oldIndicies: oldIndicies, + newIndicies: newIndicies + }; + }, + optionListeners: { + multiDragKey: function multiDragKey(key) { + key = key.toLowerCase(); + if (key === 'ctrl') key = 'Control'; + else if (key.length > 1) key = key.charAt(0).toUpperCase() + key.substr(1); + return key; + } + } + }); +} +function $64afbd09cd65a300$var$insertMultiDragElements(clonesInserted, rootEl) { + $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement, i) { + var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)]; + if (target) rootEl.insertBefore(multiDragElement, target); + else rootEl.appendChild(multiDragElement); + }); +} +/** + * Insert multi-drag clones + * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted + * @param {HTMLElement} rootEl + */ function $64afbd09cd65a300$var$insertMultiDragClones(elementsInserted, rootEl) { + $64afbd09cd65a300$var$multiDragClones.forEach(function(clone, i) { + var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)]; + if (target) rootEl.insertBefore(clone, target); + else rootEl.appendChild(clone); + }); +} +function $64afbd09cd65a300$var$removeMultiDragElements() { + $64afbd09cd65a300$var$multiDragElements.forEach(function(multiDragElement) { + if (multiDragElement === $64afbd09cd65a300$var$dragEl$1) return; + multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement); + }); +} +$64afbd09cd65a300$export$31b3ca70d8f57423.mount(new $64afbd09cd65a300$var$AutoScrollPlugin()); +$64afbd09cd65a300$export$31b3ca70d8f57423.mount($64afbd09cd65a300$var$Remove, $64afbd09cd65a300$var$Revert); +var $64afbd09cd65a300$export$2e2bcd8739ae039 = $64afbd09cd65a300$export$31b3ca70d8f57423; + + +var $0648b347057451f2$exports = {}; +$0648b347057451f2$exports = ":host {\n --tabgroup-background: #e7eaed;\n --tab-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n --tab-font-size: 13px;\n --tab-background: #e7eaed;\n --tab-color: #696a6c;\n --tab-border-color: #dadce0;\n --tab-transition: background-color 200ms ease-out, color 200ms ease-out;\n --tab-cursor: pointer;\n --tab-active-color: currentcolor;\n --tab-active-background: #fff;\n --tag-hover-color: currentcolor;\n --tag-hover-background: #f1f3f4;\n --button-font-size: 15px;\n --button-background: none;\n --button-color: #696a6c;\n --button-hover-background: #dadce0;\n --button-hover-color: #383a3e;\n --button-border-radius: 50%;\n --button-cursor: pointer;\n --badge-background: #383a3e;\n --badge-color: #fff;\n}\n\nwebview {\n visibility: hidden;\n width: 100%;\n height: 100%;\n position: absolute;\n}\n\nwebview.visible {\n visibility: visible;\n}\n\n.etabs {\n font-family: var(--tab-font-family);\n text-rendering: optimizelegibility;\n font-feature-settings: \"liga\", \"clig\", \"kern\";\n}\n\n.nav {\n background: var(--tabgroup-background);\n box-shadow: inset 0 -1px var(--tab-border-color);\n border-top: 1px solid var(--tab-border-color);\n font-size: var(--tab-font-size);\n width: 100%;\n height: 32px;\n cursor: default;\n -webkit-user-select: none;\n user-select: none;\n display: none;\n}\n\n.nav.visible {\n display: flex;\n}\n\n.tabs {\n height: 100%;\n}\n\n.tab {\n background: var(--tab-background);\n box-shadow: inset 0 -1px var(--tab-border-color);\n color: var(--tab-color);\n cursor: var(--tab-cursor);\n font-size: var(--tab-font-size);\n transition: var(--tab-transition);\n box-sizing: border-box;\n height: 100%;\n align-items: center;\n padding: 5px 9px;\n display: none;\n position: relative;\n}\n\n.tab:first-child {\n border-left: none;\n}\n\n.tab.visible {\n display: inline-flex;\n}\n\n.tab.active {\n color: var(--tab-active-color);\n background: var(--tab-active-background);\n border-left: 1px solid var(--tab-border-color);\n border-right: 1px solid var(--tab-border-color);\n box-shadow: none;\n padding-left: 8px;\n padding-right: 8px;\n}\n\n.tab.active:last-child {\n border-right: none;\n}\n\n.tab.visible:not(.active) + .tab.visible:not(.active) {\n border-left: 1px solid var(--tab-border-color);\n padding-left: 8px;\n}\n\n.tab:not(.active):hover {\n background: var(--tab-hover-background);\n color: var(--tab-hover-color);\n}\n\n.tab-badge {\n background: var(--badge-background);\n color: var(--badge-color);\n text-align: center;\n border-radius: 5px;\n margin-left: 5px;\n padding: 1px 4px;\n font-size: 8px;\n font-weight: bold;\n line-height: 1.2;\n}\n\n.tab-badge.hidden {\n display: none;\n}\n\n.tab-icon {\n height: 16px;\n display: inline-block;\n}\n\n.tab-icon img {\n max-width: 16px;\n max-height: 16px;\n}\n\n.tab-title, .tab-close {\n margin-left: 10px;\n display: inline-block;\n}\n\n.tab-close button {\n background: var(--button-background);\n border-radius: var(--button-border-radius);\n color: var(--button-color);\n cursor: var(--button-cursor);\n font-size: var(--button-font-size);\n width: 20px;\n height: 20px;\n text-align: center;\n border: none;\n padding: 1px 0 0;\n display: inline-block;\n}\n\n.tab-close button:hover {\n color: var(--button-hover-color);\n background: var(--button-hover-background);\n}\n\n.buttons {\n border-left: 1px solid var(--tab-border-color);\n padding: 5px;\n display: flex;\n}\n\n.buttons button {\n color: var(--button-color);\n background: var(--button-background);\n border-radius: var(--button-border-radius);\n cursor: var(--button-cursor);\n font-size: var(--button-font-size);\n width: 20px;\n height: 20px;\n text-align: center;\n border: none;\n margin: 0;\n padding: 1px 0 0;\n font-family: inherit;\n line-height: 1;\n display: block;\n}\n\n.buttons button:hover {\n color: var(--button-hover-color);\n background: var(--button-hover-background);\n}\n\n.views {\n height: calc(100vh - 33px);\n position: relative;\n}\n\n"; + + +if (!document) throw Error("electron-tabs module must be called in renderer process"); +const $eda442ba39f881a8$var$CLASSNAMES = { + ROOT: "etabs", + NAV: "nav", + TABS: "tabs", + TAB: "tab", + BUTTONS: "buttons", + VIEWS: "views", + VIEW: "view" +}; +function $eda442ba39f881a8$var$emit(emitter, type, args) { + if (type === "ready") emitter.isReady = true; + emitter.dispatchEvent(new CustomEvent(type, { + detail: args + })); +} +function $eda442ba39f881a8$var$on(emitter, type, fn, options) { + if (type === "ready" && emitter.isReady === true) fn.apply(emitter, [ + emitter + ]); + emitter.addEventListener(type, (e)=>fn.apply(emitter, e.detail) + , options); +} +class $eda442ba39f881a8$var$TabGroup extends HTMLElement { + constructor(){ + super(); + this.isReady = false; + // Options + this.options = { + closeButtonText: this.getAttribute("close-button-text") || "×", + defaultTab: { + title: "New Tab", + active: true + }, + newTabButton: !!this.getAttribute("new-tab-button") === true || false, + newTabButtonText: this.getAttribute("new-tab-button-text") || "+", + sortable: !!this.getAttribute("sortable") === true || false, + visibilityThreshold: Number(this.getAttribute("visibility-threshold")) || 0 + }; + this.tabs = []; + this.newTabId = 0; + this.createComponent(); + this.initVisibility(); + if (this.options.sortable) this.initSortable(); + this.emit("ready", this); + } + emit(type, ...args) { + return $eda442ba39f881a8$var$emit(this, type, args); + } + on(type, fn) { + return $eda442ba39f881a8$var$on(this, type, fn); + } + once(type, fn) { + return $eda442ba39f881a8$var$on(this, type, fn, { + once: true + }); + } + connectedCallback() { + // Support custom styles + const style = this.querySelector("style"); + if (style) this.shadow.appendChild(style); + } + createComponent() { + const shadow = this.attachShadow({ + mode: "open" + }); + this.shadow = shadow; + const wrapper = document.createElement("div"); + wrapper.setAttribute("class", $eda442ba39f881a8$var$CLASSNAMES.ROOT); + const tabgroup = document.createElement("nav"); + tabgroup.setAttribute("class", $eda442ba39f881a8$var$CLASSNAMES.NAV); + wrapper.appendChild(tabgroup); + const tabContainer = document.createElement("div"); + tabContainer.setAttribute("class", $eda442ba39f881a8$var$CLASSNAMES.TABS); + tabgroup.appendChild(tabContainer); + this.tabContainer = tabContainer; + const buttonContainer = document.createElement("div"); + buttonContainer.setAttribute("class", $eda442ba39f881a8$var$CLASSNAMES.BUTTONS); + tabgroup.appendChild(buttonContainer); + this.buttonContainer = buttonContainer; + if (this.options.newTabButton) { + const button = this.buttonContainer.appendChild(document.createElement("button")); + button.innerHTML = this.options.newTabButtonText; + button.addEventListener("click", this.addTab.bind(this, undefined), false); + } + const viewContainer = document.createElement("div"); + viewContainer.setAttribute("class", $eda442ba39f881a8$var$CLASSNAMES.VIEWS); + wrapper.appendChild(viewContainer); + this.viewContainer = viewContainer; + const style = document.createElement("style"); + style.textContent = (/*@__PURE__*/$parcel$interopDefault($0648b347057451f2$exports)); + shadow.appendChild(style); + shadow.appendChild(wrapper); + } + initVisibility() { + function toggleTabsVisibility(tab, tabGroup) { + const visibilityThreshold = this.options.visibilityThreshold; + const el = tabGroup.tabContainer.parentElement; + if (this.tabs.length >= visibilityThreshold) el.classList.add("visible"); + else el.classList.remove("visible"); + } + this.on("tab-added", toggleTabsVisibility); + this.on("tab-removed", toggleTabsVisibility); + } + initSortable() { + const createNewSortable = ()=>{ + const options = Object.assign({ + direction: "horizontal", + animation: 150, + swapThreshold: 0.20 + }, this.options.sortableOptions); + new $64afbd09cd65a300$export$2e2bcd8739ae039(this.tabContainer, options); + }; + if ($64afbd09cd65a300$export$2e2bcd8739ae039) createNewSortable(); + else document.addEventListener("DOMContentLoaded", createNewSortable); + } + setDefaultTab(tab) { + this.options.defaultTab = tab; + } + addTab(args = this.options.defaultTab) { + if (typeof args === "function") args = args(this); + const id = this.newTabId; + this.newTabId++; + const tab = new $eda442ba39f881a8$var$Tab(this, id, args); + this.tabs.push(tab); + // Don't call tab.activate() before a tab is referenced in this.tabs + if (args.active === true) tab.activate(); + this.emit("tab-added", tab, this); + return tab; + } + getTab(id) { + for(let i in this.tabs){ + if (this.tabs[i].id === id) return this.tabs[i]; + } + return null; + } + getTabByPosition(position) { + const fromRight = position < 0; + for(let i in this.tabs){ + if (this.tabs[i].getPosition(fromRight) === position) return this.tabs[i]; + } + return null; + } + getTabByRelPosition(position) { + position = this.getActiveTab().getPosition() + position; + if (position <= 0) return null; + return this.getTabByPosition(position); + } + getNextTab() { + return this.getTabByRelPosition(1); + } + getPreviousTab() { + return this.getTabByRelPosition(-1); + } + getTabs() { + return this.tabs.slice(); + } + eachTab(fn) { + this.getTabs().forEach(fn); + } + getActiveTab() { + if (this.tabs.length === 0) return null; + return this.tabs[0]; + } + setActiveTab(tab) { + this.removeTab(tab); + this.tabs.unshift(tab); + this.emit("tab-active", tab, this); + } + removeTab(tab, triggerEvent = false) { + const id = tab.id; + const index = this.tabs.findIndex((t)=>t.id === id + ); + this.tabs.splice(index, 1); + if (triggerEvent) this.emit("tab-removed", tab, this); + } + activateRecentTab() { + if (this.tabs.length > 0) this.tabs[0].activate(); + } +} +class $eda442ba39f881a8$var$Tab extends EventTarget { + constructor(tabGroup, id, args){ + super(); + this.badge = args.badge; + this.closable = args.closable === false ? false : true; + this.icon = args.icon; + this.iconURL = args.iconURL; + this.id = id; + this.isClosed = false; + this.isReady = false; + this.spans = {}; + this.tabGroup = tabGroup; + this.title = args.title; + this.webviewAttributes = args.webviewAttributes || {}; + this.webviewAttributes.src = args.src; + this.initTab(); + this.initWebview(); + if (args.visible !== false) this.show(); + if (typeof args.ready === "function") args.ready(this); + else this.emit("ready", this); + } + emit(type, ...args) { + return $eda442ba39f881a8$var$emit(this, type, args); + } + on(type, fn) { + return $eda442ba39f881a8$var$on(this, type, fn); + } + once(type, fn) { + return $eda442ba39f881a8$var$on(this, type, fn, { + once: true + }); + } + initTab() { + const tab = this.element = document.createElement("div"); + tab.classList.add($eda442ba39f881a8$var$CLASSNAMES.TAB); + for (let el of [ + "icon", + "title", + "badge", + "close" + ]){ + const span = tab.appendChild(document.createElement("span")); + span.classList.add(`${$eda442ba39f881a8$var$CLASSNAMES.TAB}-${el}`); + this.spans[el] = span; + } + this.setTitle(this.title); + this.setBadge(this.badge); + this.setIcon(this.iconURL, this.icon); + this.initTabCloseButton(); + this.initTabClickHandler(); + this.tabGroup.tabContainer.appendChild(this.element); + } + initTabCloseButton() { + const container = this.spans.close; + if (this.closable) { + const button = container.appendChild(document.createElement("button")); + button.innerHTML = this.tabGroup.options.closeButtonText; + button.addEventListener("click", this.close.bind(this, false), false); + } + } + initTabClickHandler() { + // Mouse up + const tabClickHandler = function(e) { + if (this.isClosed) return; + if (e.which === 2) this.close(); + }; + this.element.addEventListener("mouseup", tabClickHandler.bind(this), false); + // Mouse down + const tabMouseDownHandler = function(e) { + if (this.isClosed) return; + if (e.which === 1) { + if (e.target.matches("button")) return; + this.activate(); + } + }; + this.element.addEventListener("mousedown", tabMouseDownHandler.bind(this), false); + } + initWebview() { + const webview = this.webview = document.createElement("webview"); + const tabWebviewDidFinishLoadHandler = function(e) { + this.emit("webview-ready", this); + }; + this.webview.addEventListener("did-finish-load", tabWebviewDidFinishLoadHandler.bind(this), false); + const tabWebviewDomReadyHandler = function(e) { + // Remove this once https://github.com/electron/electron/issues/14474 is fixed + webview.blur(); + webview.focus(); + this.emit("webview-dom-ready", this); + }; + this.webview.addEventListener("dom-ready", tabWebviewDomReadyHandler.bind(this), false); + this.webview.classList.add($eda442ba39f881a8$var$CLASSNAMES.VIEW); + if (this.webviewAttributes) { + const attrs = this.webviewAttributes; + for(let key in attrs){ + const attr = attrs[key]; + if (attr === false) continue; + this.webview.setAttribute(key, attr); + } + } + this.tabGroup.viewContainer.appendChild(this.webview); + } + setTitle(title) { + if (this.isClosed) return; + const span = this.spans.title; + span.innerHTML = title; + span.title = title; + this.title = title; + this.emit("title-changed", title, this); + return this; + } + getTitle() { + if (this.isClosed) return; + return this.title; + } + setBadge(badge) { + if (this.isClosed) return; + const span = this.spans.badge; + this.badge = badge; + if (badge) { + span.innerHTML = badge.text; + span.classList.add(badge.classname); + span.classList.remove("hidden"); + } else span.classList.add("hidden"); + this.emit("badge-changed", badge, this); + } + getBadge() { + if (this.isClosed) return; + return this.badge; + } + setIcon(iconURL, icon) { + if (this.isClosed) return; + this.iconURL = iconURL; + this.icon = icon; + const span = this.spans.icon; + if (iconURL) { + span.innerHTML = ``; + this.emit("icon-changed", iconURL, this); + } else if (icon) { + span.innerHTML = ``; + this.emit("icon-changed", icon, this); + } + return this; + } + getIcon() { + if (this.isClosed) return; + if (this.iconURL) return this.iconURL; + return this.icon; + } + setPosition(newPosition) { + const tabContainer = this.tabGroup.tabContainer; + const length = tabContainer.childElementCount; + const thisPosition = this.getPosition(); + const tabs = Array.from(tabContainer.children); + tabs.splice(thisPosition, 1); + if (newPosition < 0) { + newPosition += length; + if (newPosition < 0) newPosition = 0; + } + if (newPosition < length) tabContainer.insertBefore(this.element, tabs[newPosition]); + else tabContainer.appendChild(this.element); + return this; + } + getPosition(fromRight = false) { + let position = 0; + let tab = this.element; + while((tab = tab.previousSibling) != null)position++; + if (fromRight === true) position -= this.tabGroup.tabContainer.childElementCount; + return position; + } + activate() { + if (this.isClosed) return; + const activeTab = this.tabGroup.getActiveTab(); + if (activeTab) { + activeTab.element.classList.remove("active"); + activeTab.webview.classList.remove("visible"); + activeTab.emit("inactive", activeTab); + } + this.tabGroup.setActiveTab(this); + this.element.classList.add("active"); + this.webview.classList.add("visible"); + this.webview.focus(); + this.emit("active", this); + return this; + } + show(flag = true) { + if (this.isClosed) return; + if (flag) { + this.element.classList.add("visible"); + this.emit("visible", this); + } else { + this.element.classList.remove("visible"); + this.emit("hidden", this); + } + return this; + } + hide() { + return this.show(false); + } + hasClass(classname) { + return this.element.classList.contains(classname); + } + close(force) { + const abortController = new AbortController(); + const abort = ()=>abortController.abort() + ; + this.emit("closing", this, abort); + const abortSignal = abortController.signal; + if (this.isClosed || !this.closable && !force || abortSignal.aborted) return; + this.isClosed = true; + const tabGroup = this.tabGroup; + tabGroup.tabContainer.removeChild(this.element); + tabGroup.viewContainer.removeChild(this.webview); + const activeTab = this.tabGroup.getActiveTab(); + tabGroup.removeTab(this, true); + this.emit("close", this); + if (activeTab.id === this.id) tabGroup.activateRecentTab(); + } +} +customElements.define("tab-group", $eda442ba39f881a8$var$TabGroup); + + +//# sourceMappingURL=electron-tabs.js.map diff --git a/dist/electron-tabs.js.map b/dist/electron-tabs.js.map new file mode 100644 index 0000000..c88414f --- /dev/null +++ b/dist/electron-tabs.js.map @@ -0,0 +1 @@ +{"mappings":";;;ACAA;;;;;GAKG,CACH,SAAS,6BAAO,CAAC,MAAM,EAAE,cA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AQ,GAAG,IAAI,CAAC;QACrB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,AAAC;QAC/B,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChD,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjD,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,AAAC;QAC/C,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAE/B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAEzB,IAAI,SAAS,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,EAC1B,QAAQ,CAAC,iBAAiB,EAAE,CAAC;KAEhC;CACF;AAED,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,8BAAQ,CAAC,CAAC","sources":["src/index.ts","node_modules/sortablejs/modular/sortable.esm.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-82301af45c0136ec.js"],"sourcesContent":["import Sortable from \"sortablejs\";\n// @ts-ignore\nimport styles from \"bundle-text:./style.css\";\n\nif (!document) {\n throw Error(\"electron-tabs module must be called in renderer process\");\n}\n\ninterface TabGroupOptions {\n closeButtonText: string,\n defaultTab: TabOptions | ((tabGroup: TabGroup) => TabOptions),\n newTabButton: boolean,\n newTabButtonText: string,\n sortable: boolean,\n sortableOptions?: Sortable.Options\n visibilityThreshold: number,\n}\n\ninterface TabOptions {\n active?: boolean;\n badge?: Badge;\n closable?: boolean;\n icon?: string;\n iconURL?: string;\n ready?: ((tab: Tab) => void);\n src?: string;\n title?: string;\n visible?: boolean;\n webviewAttributes?: { [key: string]: any };\n}\n\ninterface Badge {\n text: string,\n classname: string\n}\n\nconst CLASSNAMES = {\n ROOT: \"etabs\",\n NAV: \"nav\",\n TABS: \"tabs\",\n TAB: \"tab\",\n BUTTONS: \"buttons\",\n VIEWS: \"views\",\n VIEW: \"view\"\n}\n\nfunction emit(emitter: TabGroup | Tab, type: string, args: any[]) {\n if (type === \"ready\") {\n emitter.isReady = true;\n }\n emitter.dispatchEvent(new CustomEvent(type, { detail: args }));\n}\n\nfunction on(emitter: TabGroup | Tab, type: string, fn: (detail: string) => void, options?: { [key: string]: any }) {\n if (type === \"ready\" && emitter.isReady === true) {\n fn.apply(emitter, [emitter]);\n }\n emitter.addEventListener(type, ((e: CustomEvent) => fn.apply(emitter, e.detail)) as EventListener, options);\n}\n\nclass TabGroup extends HTMLElement {\n buttonContainer: HTMLDivElement;\n isReady: boolean;\n newTabId: number;\n options: TabGroupOptions;\n shadow: ShadowRoot;\n tabContainer: HTMLDivElement;\n tabs: Array;\n viewContainer: HTMLDivElement;\n\n constructor() {\n super();\n\n this.isReady = false;\n\n // Options\n this.options = {\n closeButtonText: this.getAttribute(\"close-button-text\") || \"×\",\n defaultTab: { title: \"New Tab\", active: true },\n newTabButton: !!this.getAttribute(\"new-tab-button\") === true || false,\n newTabButtonText: this.getAttribute(\"new-tab-button-text\") || \"+\",\n sortable: !!this.getAttribute(\"sortable\") === true || false,\n visibilityThreshold: Number(this.getAttribute(\"visibility-threshold\")) || 0\n };\n\n this.tabs = [];\n this.newTabId = 0;\n\n this.createComponent();\n this.initVisibility();\n if (this.options.sortable) {\n this.initSortable();\n }\n\n this.emit(\"ready\", this);\n }\n\n emit(type: string, ...args: any[]) {\n return emit(this, type, args);\n }\n\n on(type: string, fn: (...detail: any[]) => void) {\n return on(this, type, fn);\n }\n\n once(type: string, fn: (detail: string) => void) {\n return on(this, type, fn, { once: true });\n }\n\n connectedCallback() {\n // Support custom styles\n const style = this.querySelector(\"style\");\n if (style) {\n this.shadow.appendChild(style);\n }\n }\n\n private createComponent() {\n const shadow = this.attachShadow({mode: \"open\"});\n this.shadow = shadow;\n\n const wrapper = document.createElement(\"div\");\n wrapper.setAttribute(\"class\", CLASSNAMES.ROOT);\n\n const tabgroup = document.createElement(\"nav\");\n tabgroup.setAttribute(\"class\", CLASSNAMES.NAV);\n wrapper.appendChild(tabgroup);\n\n const tabContainer = document.createElement(\"div\");\n tabContainer.setAttribute(\"class\", CLASSNAMES.TABS);\n tabgroup.appendChild(tabContainer);\n this.tabContainer = tabContainer;\n\n const buttonContainer = document.createElement(\"div\");\n buttonContainer.setAttribute(\"class\", CLASSNAMES.BUTTONS);\n tabgroup.appendChild(buttonContainer);\n this.buttonContainer = buttonContainer;\n\n if (this.options.newTabButton) {\n const button = this.buttonContainer.appendChild(document.createElement(\"button\"));\n button.innerHTML = this.options.newTabButtonText;\n button.addEventListener(\"click\", this.addTab.bind(this, undefined), false);\n }\n\n const viewContainer = document.createElement(\"div\");\n viewContainer.setAttribute(\"class\", CLASSNAMES.VIEWS);\n wrapper.appendChild(viewContainer);\n this.viewContainer = viewContainer;\n\n const style = document.createElement(\"style\");\n style.textContent = styles;\n\n shadow.appendChild(style);\n shadow.appendChild(wrapper);\n }\n\n private initVisibility() {\n function toggleTabsVisibility(tab: Tab, tabGroup: TabGroup) {\n const visibilityThreshold = this.options.visibilityThreshold;\n const el = tabGroup.tabContainer.parentElement;\n if (this.tabs.length >= visibilityThreshold) {\n el.classList.add(\"visible\");\n } else {\n el.classList.remove(\"visible\");\n }\n }\n\n this.on(\"tab-added\", toggleTabsVisibility);\n this.on(\"tab-removed\", toggleTabsVisibility);\n }\n\n initSortable() {\n const createNewSortable = () => {\n const options = Object.assign({\n direction: \"horizontal\",\n animation: 150,\n swapThreshold: 0.20\n }, this.options.sortableOptions);\n new Sortable(this.tabContainer, options);\n };\n\n if (Sortable) {\n createNewSortable();\n } else {\n document.addEventListener(\"DOMContentLoaded\", createNewSortable);\n }\n }\n\n setDefaultTab(tab: TabOptions) {\n this.options.defaultTab = tab;\n }\n\n addTab(args = this.options.defaultTab) {\n if (typeof args === \"function\") {\n args = args(this);\n }\n const id = this.newTabId;\n this.newTabId++;\n const tab = new Tab(this, id, args);\n this.tabs.push(tab);\n // Don't call tab.activate() before a tab is referenced in this.tabs\n if (args.active === true) {\n tab.activate();\n }\n this.emit(\"tab-added\", tab, this);\n return tab;\n }\n\n getTab(id: number) {\n for (let i in this.tabs) {\n if (this.tabs[i].id === id) {\n return this.tabs[i];\n }\n }\n return null;\n }\n\n getTabByPosition(position: number) {\n const fromRight = position < 0;\n for (let i in this.tabs) {\n if (this.tabs[i].getPosition(fromRight) === position) {\n return this.tabs[i];\n }\n }\n return null;\n }\n\n getTabByRelPosition(position: number) {\n position = this.getActiveTab().getPosition() + position;\n if (position <= 0) {\n return null;\n }\n return this.getTabByPosition(position);\n }\n\n getNextTab() {\n return this.getTabByRelPosition(1);\n }\n\n getPreviousTab() {\n return this.getTabByRelPosition(-1);\n }\n\n getTabs() {\n return this.tabs.slice();\n }\n\n eachTab(fn: (tab: Tab) => void) {\n this.getTabs().forEach(fn);\n }\n\n getActiveTab() {\n if (this.tabs.length === 0) return null;\n return this.tabs[0];\n }\n\n setActiveTab(tab: Tab) {\n this.removeTab(tab);\n this.tabs.unshift(tab);\n this.emit(\"tab-active\", tab, this);\n }\n\n removeTab(tab: Tab, triggerEvent = false) {\n const id = tab.id;\n const index = this.tabs.findIndex((t: Tab) => t.id === id);\n this.tabs.splice(index, 1);\n if (triggerEvent) {\n this.emit(\"tab-removed\", tab, this);\n }\n }\n\n activateRecentTab() {\n if (this.tabs.length > 0) {\n this.tabs[0].activate();\n }\n }\n}\n\nclass Tab extends EventTarget {\n badge: Badge;\n closable: boolean;\n element: HTMLDivElement;\n icon: string;\n iconURL: string;\n id: number;\n isClosed: boolean;\n isReady: boolean;\n spans: { [key: string]: HTMLSpanElement };\n tabGroup: TabGroup;\n title: string;\n webview: HTMLElement;\n webviewAttributes: { [key: string]: any };\n\n constructor(tabGroup: TabGroup, id: number, args: TabOptions) {\n super();\n this.badge = args.badge;\n this.closable = args.closable === false ? false : true;\n this.icon = args.icon;\n this.iconURL = args.iconURL;\n this.id = id;\n this.isClosed = false;\n this.isReady = false;\n this.spans = {};\n this.tabGroup = tabGroup;\n this.title = args.title;\n this.webviewAttributes = args.webviewAttributes || {};\n this.webviewAttributes.src = args.src;\n\n this.initTab();\n this.initWebview();\n\n if (args.visible !== false) {\n this.show();\n }\n if (typeof args.ready === \"function\") {\n args.ready(this);\n } else {\n this.emit(\"ready\", this);\n }\n }\n\n emit(type: string, ...args: any[]) {\n return emit(this, type, args);\n }\n\n on(type: string, fn: (...detail: any[]) => void) {\n return on(this, type, fn);\n }\n\n once(type: string, fn: (detail: string) => void) {\n return on(this, type, fn, { once: true });\n }\n\n private initTab() {\n const tab = this.element = document.createElement(\"div\");\n tab.classList.add(CLASSNAMES.TAB);\n for (let el of [\"icon\", \"title\", \"badge\", \"close\"]) {\n const span = tab.appendChild(document.createElement(\"span\"));\n span.classList.add(`${CLASSNAMES.TAB}-${el}`);\n this.spans[el] = span;\n }\n\n this.setTitle(this.title);\n this.setBadge(this.badge);\n this.setIcon(this.iconURL, this.icon);\n this.initTabCloseButton();\n this.initTabClickHandler();\n\n this.tabGroup.tabContainer.appendChild(this.element);\n }\n\n private initTabCloseButton() {\n const container = this.spans.close;\n if (this.closable) {\n const button = container.appendChild(document.createElement(\"button\"));\n button.innerHTML = this.tabGroup.options.closeButtonText;\n button.addEventListener(\"click\", this.close.bind(this, false), false);\n }\n }\n\n private initTabClickHandler() {\n // Mouse up\n const tabClickHandler = function(e: KeyboardEvent) {\n if (this.isClosed) return;\n if (e.which === 2) {\n this.close();\n }\n };\n this.element.addEventListener(\"mouseup\", tabClickHandler.bind(this), false);\n // Mouse down\n const tabMouseDownHandler = function(e: KeyboardEvent) {\n if (this.isClosed) return;\n if (e.which === 1) {\n if ((e.target as HTMLElement).matches(\"button\")) return;\n this.activate();\n }\n };\n this.element.addEventListener(\"mousedown\", tabMouseDownHandler.bind(this), false);\n }\n\n initWebview() {\n const webview = this.webview = document.createElement(\"webview\");\n\n const tabWebviewDidFinishLoadHandler = function(e: Event) {\n this.emit(\"webview-ready\", this);\n };\n\n this.webview.addEventListener(\"did-finish-load\", tabWebviewDidFinishLoadHandler.bind(this), false);\n\n const tabWebviewDomReadyHandler = function(e: Event) {\n // Remove this once https://github.com/electron/electron/issues/14474 is fixed\n webview.blur();\n webview.focus();\n this.emit(\"webview-dom-ready\", this);\n };\n\n this.webview.addEventListener(\"dom-ready\", tabWebviewDomReadyHandler.bind(this), false);\n\n this.webview.classList.add(CLASSNAMES.VIEW);\n if (this.webviewAttributes) {\n const attrs = this.webviewAttributes;\n for (let key in attrs) {\n const attr = attrs[key];\n if (attr === false) continue;\n this.webview.setAttribute(key, attr);\n }\n }\n\n this.tabGroup.viewContainer.appendChild(this.webview);\n }\n\n setTitle(title: string) {\n if (this.isClosed) return;\n const span = this.spans.title;\n span.innerHTML = title;\n span.title = title;\n this.title = title;\n this.emit(\"title-changed\", title, this);\n return this;\n }\n\n getTitle() {\n if (this.isClosed) return;\n return this.title;\n }\n\n setBadge(badge?: Badge) {\n if (this.isClosed) return;\n const span = this.spans.badge;\n this.badge = badge;\n\n if (badge) {\n span.innerHTML = badge.text;\n span.classList.add(badge.classname);\n span.classList.remove(\"hidden\");\n } else {\n span.classList.add(\"hidden\");\n }\n\n this.emit(\"badge-changed\", badge, this);\n }\n\n getBadge() {\n if (this.isClosed) return;\n return this.badge;\n }\n\n setIcon(iconURL: string, icon: string) {\n if (this.isClosed) return;\n this.iconURL = iconURL;\n this.icon = icon;\n const span = this.spans.icon;\n if (iconURL) {\n span.innerHTML = ``;\n this.emit(\"icon-changed\", iconURL, this);\n } else if (icon) {\n span.innerHTML = ``;\n this.emit(\"icon-changed\", icon, this);\n }\n\n return this;\n }\n\n getIcon() {\n if (this.isClosed) return;\n if (this.iconURL) return this.iconURL;\n return this.icon;\n }\n\n setPosition(newPosition: number) {\n const tabContainer = this.tabGroup.tabContainer;\n const length = tabContainer.childElementCount;\n const thisPosition = this.getPosition();\n const tabs = Array.from(tabContainer.children)\n tabs.splice(thisPosition, 1);\n\n if (newPosition < 0) {\n newPosition += length;\n if (newPosition < 0) {\n newPosition = 0;\n }\n }\n\n if (newPosition < length) {\n tabContainer.insertBefore(this.element, tabs[newPosition]);\n } else {\n tabContainer.appendChild(this.element);\n }\n\n return this;\n }\n\n getPosition(fromRight = false) {\n let position = 0;\n let tab = this.element;\n while ((tab = tab.previousSibling as HTMLDivElement) != null) position++;\n\n if (fromRight === true) {\n position -= this.tabGroup.tabContainer.childElementCount;\n }\n\n return position;\n }\n\n activate() {\n if (this.isClosed) return;\n const activeTab = this.tabGroup.getActiveTab();\n if (activeTab) {\n activeTab.element.classList.remove(\"active\");\n activeTab.webview.classList.remove(\"visible\");\n activeTab.emit(\"inactive\", activeTab);\n }\n this.tabGroup.setActiveTab(this);\n this.element.classList.add(\"active\");\n this.webview.classList.add(\"visible\");\n this.webview.focus();\n this.emit(\"active\", this);\n return this;\n }\n\n show(flag = true) {\n if (this.isClosed) return;\n if (flag) {\n this.element.classList.add(\"visible\");\n this.emit(\"visible\", this);\n } else {\n this.element.classList.remove(\"visible\");\n this.emit(\"hidden\", this);\n }\n return this;\n }\n\n hide() {\n return this.show(false);\n }\n\n hasClass(classname: string) {\n return this.element.classList.contains(classname);\n }\n\n close(force: boolean) {\n const abortController = new AbortController();\n const abort = () => abortController.abort();\n this.emit(\"closing\", this, abort);\n\n const abortSignal = abortController.signal;\n if (this.isClosed || (!this.closable && !force) || abortSignal.aborted) return;\n\n this.isClosed = true;\n const tabGroup = this.tabGroup;\n tabGroup.tabContainer.removeChild(this.element);\n tabGroup.viewContainer.removeChild(this.webview);\n const activeTab = this.tabGroup.getActiveTab();\n tabGroup.removeTab(this, true);\n\n this.emit(\"close\", this);\n\n if (activeTab.id === this.id) {\n tabGroup.activateRecentTab();\n }\n }\n}\n\ncustomElements.define(\"tab-group\", TabGroup);\n\nexport type { TabGroup, Tab };\n","/**!\n * Sortable 1.15.0\n * @author\tRubaXa \n * @author\towenm \n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _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\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\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\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\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}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\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.0\";\n\nfunction userAgent(pattern) {\n if (typeof window !== 'undefined' && window.navigator) {\n return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n }\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};\n\nfunction on(el, event, fn) {\n el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction off(el, event, fn) {\n el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction matches(\n/**HTMLElement*/\nel,\n/**String*/\nselector) {\n if (!selector) return;\n selector[0] === '>' && (selector = selector.substring(1));\n\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\n return false;\n}\n\nfunction getParentOrHost(el) {\n return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\n\nfunction closest(\n/**HTMLElement*/\nel,\n/**String*/\nselector,\n/**HTMLElement*/\nctx, includeCTX) {\n if (el) {\n ctx = ctx || document;\n\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\n if (el === ctx) break;\n /* jshint boss:true */\n } while (el = getParentOrHost(el));\n }\n\n return null;\n}\n\nvar R_SPACE = /\\s+/g;\n\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}\n\nfunction css(el, prop, val) {\n var style = el && el.style;\n\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\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\n style[prop] = val + (typeof val === 'string' ? '' : 'px');\n }\n }\n}\n\nfunction matrix(el, selfOnly) {\n var appliedTransforms = '';\n\n if (typeof el === 'string') {\n appliedTransforms = el;\n } else {\n do {\n var transform = css(el, 'transform');\n\n if (transform && transform !== 'none') {\n appliedTransforms = transform + ' ' + appliedTransforms;\n }\n /* jshint boss:true */\n\n } while (!selfOnly && (el = el.parentNode));\n }\n\n var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n /*jshint -W056 */\n\n return matrixFn && new matrixFn(appliedTransforms);\n}\n\nfunction find(ctx, tagName, iterator) {\n if (ctx) {\n var list = ctx.getElementsByTagName(tagName),\n i = 0,\n n = list.length;\n\n if (iterator) {\n for (; i < n; i++) {\n iterator(list[i], i);\n }\n }\n\n return list;\n }\n\n return [];\n}\n\nfunction getWindowScrollingElement() {\n var scrollingElement = document.scrollingElement;\n\n if (scrollingElement) {\n return scrollingElement;\n } else {\n return document.documentElement;\n }\n}\n/**\n * Returns the \"bounding client rect\" of given element\n * @param {HTMLElement} el The element whose boundingClientRect is wanted\n * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container\n * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr\n * @param {[Boolean]} undoScale Whether the container's scale() should be undone\n * @param {[HTMLElement]} container The parent the element will be placed in\n * @return {Object} The boundingClientRect of el, with specified adjustments\n */\n\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\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\n if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n // Adjust for translate()\n container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n // Not needed on <= IE11\n\n if (!IE11OrLess) {\n do {\n if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container\n\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\n } while (container = container.parentNode);\n }\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\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\n return {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n width: width,\n height: height\n };\n}\n/**\n * Checks if a side of an element is scrolled past a side of its parents\n * @param {HTMLElement} el The element who's side being scrolled out of view is in question\n * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')\n * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')\n * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element\n */\n\n\nfunction isScrolledPast(el, elSide, parentSide) {\n var parent = getParentAutoScrollElement(el, true),\n elSideVal = getRect(el)[elSide];\n /* jshint boss:true */\n\n while (parent) {\n var parentSideVal = getRect(parent)[parentSide],\n visible = void 0;\n\n if (parentSide === 'top' || parentSide === 'left') {\n visible = elSideVal >= parentSideVal;\n } else {\n visible = elSideVal <= parentSideVal;\n }\n\n if (!visible) return parent;\n if (parent === getWindowScrollingElement()) break;\n parent = getParentAutoScrollElement(parent, false);\n }\n\n return false;\n}\n/**\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\n * and non-draggable elements\n * @param {HTMLElement} el The parent element\n * @param {Number} childNum The index of the child\n * @param {Object} options Parent Sortable's options\n * @return {HTMLElement} The child at index childNum, or null if not found\n */\n\n\nfunction getChild(el, childNum, options, includeDragEl) {\n var currentChild = 0,\n i = 0,\n children = el.children;\n\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\n currentChild++;\n }\n\n i++;\n }\n\n return null;\n}\n/**\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\n * @param {HTMLElement} el Parent element\n * @param {selector} selector Any other elements that should be ignored\n * @return {HTMLElement} The last child, ignoring ghostEl\n */\n\n\nfunction lastChild(el, selector) {\n var last = el.lastElementChild;\n\n while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n last = last.previousElementSibling;\n }\n\n return last || null;\n}\n/**\n * Returns the index of an element within its parent for a selected set of\n * elements\n * @param {HTMLElement} el\n * @param {selector} selector\n * @return {number}\n */\n\n\nfunction index(el, selector) {\n var index = 0;\n\n if (!el || !el.parentNode) {\n return -1;\n }\n /* jshint boss:true */\n\n\n while (el = el.previousElementSibling) {\n if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n index++;\n }\n }\n\n return index;\n}\n/**\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\n * The value is returned in real pixels.\n * @param {HTMLElement} el\n * @return {Array} Offsets in the format of [left, top]\n */\n\n\nfunction getRelativeScrollOffset(el) {\n var offsetLeft = 0,\n offsetTop = 0,\n winScroller = getWindowScrollingElement();\n\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\n return [offsetLeft, offsetTop];\n}\n/**\n * Returns the index of the object within the given array\n * @param {Array} arr Array that may or may not hold the object\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\n * @return {Number} The index of the object in the array, or -1\n */\n\n\nfunction indexOfObject(arr, obj) {\n for (var i in arr) {\n if (!arr.hasOwnProperty(i)) continue;\n\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n }\n }\n\n return -1;\n}\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\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\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\n } while (elem = elem.parentNode);\n\n return getWindowScrollingElement();\n}\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\n return dst;\n}\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}\n\nvar _throttleTimeout;\n\nfunction throttle(callback, ms) {\n return function () {\n if (!_throttleTimeout) {\n var args = arguments,\n _this = this;\n\n if (args.length === 1) {\n callback.call(_this, args[0]);\n } else {\n callback.apply(_this, args);\n }\n\n _throttleTimeout = setTimeout(function () {\n _throttleTimeout = void 0;\n }, ms);\n }\n };\n}\n\nfunction cancelThrottle() {\n clearTimeout(_throttleTimeout);\n _throttleTimeout = void 0;\n}\n\nfunction scrollBy(el, x, y) {\n el.scrollLeft += x;\n el.scrollTop += y;\n}\n\nfunction clone(el) {\n var Polymer = window.Polymer;\n var $ = window.jQuery || window.Zepto;\n\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}\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}\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}\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\n var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation\n\n\n if (child.thisAnimationDuration) {\n var childMatrix = matrix(child, true);\n\n if (childMatrix) {\n fromRect.top -= childMatrix.f;\n fromRect.left -= childMatrix.e;\n }\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\n if (!this.options.animation) {\n clearTimeout(animationCallbackId);\n if (typeof callback === 'function') callback();\n return;\n }\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\n if (targetMatrix) {\n // Compensate for current animation\n toRect.top -= targetMatrix.f;\n toRect.left -= targetMatrix.e;\n }\n\n target.toRect = toRect;\n\n if (target.thisAnimationDuration) {\n // Could also check if animatingRect is between fromRect and toRect\n if (isRectEqual(prevFromRect, toRect) && !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)) {\n // If returning to same place as started from animation and on same axis\n time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n }\n } // if fromRect != toRect: animate\n\n\n if (!isRectEqual(toRect, fromRect)) {\n target.prevFromRect = fromRect;\n target.prevToRect = toRect;\n\n if (!time) {\n time = _this.options.animation;\n }\n\n _this.animate(target, animatingRect, toRect, time);\n }\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\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\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}\n\nfunction repaint(target) {\n return target.offsetWidth;\n}\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\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\n this.eventCanceled = false;\n\n evt.cancel = function () {\n _this.eventCanceled = true;\n };\n\n var eventNameGlobal = eventName + 'Global';\n plugins.forEach(function (plugin) {\n if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable\n\n if (sortable[plugin.pluginName][eventNameGlobal]) {\n sortable[plugin.pluginName][eventNameGlobal](_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\n\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; // Add default options from plugin\n\n _extends(defaults, initialized.defaults);\n });\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\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\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; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n\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); // Support for new CustomEvent feature\n\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\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\n var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n\n for (var option in allEventProperties) {\n evt[option] = allEventProperties[option];\n }\n\n if (rootEl) {\n rootEl.dispatchEvent(evt);\n }\n\n if (options[onName]) {\n options[onName].call(sortable, evt);\n }\n}\n\nvar _excluded = [\"evt\"];\n\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\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};\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}\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\nghostRelativeParent,\n ghostRelativeParentInitialScroll = [],\n // (left, top)\n_silent = false,\n savedInputChecked = [];\n/** @const */\n\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\nsupportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n supportCssPointerEvents = function () {\n if (!documentExists) return; // false when <= IE11\n\n if (IE11OrLess) {\n return false;\n }\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\n if (elCSS.display === 'flex') {\n return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n }\n\n if (elCSS.display === 'grid') {\n return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n }\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\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\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\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\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\n var group = {};\n var originalGroup = options.group;\n\n if (!originalGroup || _typeof(originalGroup) != 'object') {\n originalGroup = {\n name: originalGroup\n };\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}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position\n\n\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}\n\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n if (dragEl) {\n evt = evt.touches ? evt.touches[0] : evt;\n\n var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n\n if (nearest) {\n // Create imitation event\n var event = {};\n\n for (var i in evt) {\n if (evt.hasOwnProperty(i)) {\n event[i] = evt[i];\n }\n }\n\n event.target = event.rootEl = nearest;\n event.preventDefault = void 0;\n event.stopPropagation = void 0;\n\n nearest[expando]._onDragOver(event);\n }\n }\n};\n\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n if (dragEl) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n }\n};\n/**\r\n * @class Sortable\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\n\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\n this.el = el; // root element\n\n this.options = options = _extends({}, options); // Export instance\n\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); // Set default options\n\n for (var name in defaults) {\n !(name in options) && (options[name] = defaults[name]);\n }\n\n _prepareGroup(options); // Bind all private methods\n\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n } // Setup drag mode\n\n\n this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n\n if (this.nativeDraggable) {\n // Touch start threshold cannot be greater than the native dragstart threshold\n this.options.touchStartThreshold = 1;\n } // Bind events\n\n\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\n if (this.nativeDraggable) {\n on(el, 'dragover', this);\n on(el, 'dragenter', this);\n }\n\n sortables.push(this.el); // Restore sorting\n\n options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager\n\n _extends(this, AnimationStateManager());\n}\n\nSortable.prototype =\n/** @lends Sortable.prototype */\n{\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(\n /** Event|TouchEvent */\n evt) {\n if (!evt.cancelable) return;\n\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\n _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n\n\n if (dragEl) {\n return;\n }\n\n if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n return; // only left button and enabled\n } // cancel dnd if original target is content editable\n\n\n if (originalTarget.isContentEditable) {\n return;\n } // Safari ignores further event handling after mousedown\n\n\n if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n return;\n }\n\n target = closest(target, options.draggable, el, false);\n\n if (target && target.animated) {\n return;\n }\n\n if (lastDownEl === target) {\n // Ignoring duplicate `down`\n return;\n } // Get the index of the dragged element within its parent\n\n\n oldIndex = index(target);\n oldDraggableIndex = index(target, options.draggable); // Check filter\n\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\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\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\n pluginEvent('filter', _this, {\n evt: evt\n });\n return true;\n }\n });\n\n if (filter) {\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n }\n\n if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n return;\n } // Prepare `dragstart`\n\n\n this._prepareDragStart(evt, touch, target);\n },\n _prepareDragStart: function _prepareDragStart(\n /** Event */\n evt,\n /** Touch */\n touch,\n /** HTMLElement */\n target) {\n var _this = this,\n el = _this.el,\n options = _this.options,\n ownerDocument = el.ownerDocument,\n dragStartFn;\n\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\n dragStartFn = function dragStartFn() {\n pluginEvent('delayEnded', _this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n _this._onDrop();\n\n return;\n } // Delayed drag has been triggered\n // we can re-enable the events: touchmove/mousemove\n\n\n _this._disableDelayedDragEvents();\n\n if (!FireFox && _this.nativeDraggable) {\n dragEl.draggable = true;\n } // Bind the events: dragstart/dragend\n\n\n _this._triggerDragStart(evt, touch); // Drag start event\n\n\n _dispatchEvent({\n sortable: _this,\n name: 'choose',\n originalEvent: evt\n }); // Chosen item\n\n\n toggleClass(dragEl, options.chosenClass, true);\n }; // Disable \"draggable\"\n\n\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); // Make dragEl draggable (must be before delay for FireFox)\n\n if (FireFox && this.nativeDraggable) {\n this.options.touchStartThreshold = 4;\n dragEl.draggable = true;\n }\n\n pluginEvent('delayStart', this, {\n evt: evt\n }); // Delay is impossible for native DnD in Edge or IE\n\n if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\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\n\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(\n /** TouchEvent|PointerEvent **/\n e) {\n var touch = e.touches ? e.touches[0] : e;\n\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\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(\n /** Event */\n evt,\n /** Touch */\n touch) {\n touch = touch || evt.pointerType == 'touch' && evt;\n\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\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\n awaitingDragStarted = false;\n\n if (rootEl && dragEl) {\n pluginEvent('dragStarted', this, {\n evt: evt\n });\n\n if (this.nativeDraggable) {\n on(document, 'dragover', _checkOutsideTargetEl);\n }\n\n var options = this.options; // Apply effect\n\n !fallback && toggleClass(dragEl, options.dragClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n Sortable.active = this;\n fallback && this._appendGhost(); // Drag start event\n\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\n _hideGhostForTarget();\n\n var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n var parent = target;\n\n while (target && target.shadowRoot) {\n target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n if (target === parent) break;\n parent = target;\n }\n\n dragEl.parentNode[expando]._isOutsideThisEl(target);\n\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\n if (inserted && !this.options.dragoverBubble) {\n break;\n }\n }\n\n target = parent; // store last element\n }\n /* jshint boss:true */\n while (parent = parent.parentNode);\n }\n\n _unhideGhostForTarget();\n }\n },\n _onTouchMove: function _onTouchMove(\n /**TouchEvent*/\n 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); // only set the status to dragging, when we are actually dragging\n\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\n this._onDragStart(evt, true);\n }\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\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\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; // Position absolutely\n\n if (PositionGhostAbsolutely) {\n // Get relatively positioned parent\n ghostRelativeParent = container;\n\n while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n ghostRelativeParent = ghostRelativeParent.parentNode;\n }\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\n ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n }\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); // Set transform-origin\n\n css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n }\n },\n _onDragStart: function _onDragStart(\n /**Event*/\n evt,\n /**boolean*/\n fallback) {\n var _this = this;\n\n var dataTransfer = evt.dataTransfer;\n var options = _this.options;\n pluginEvent('dragStart', this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n }\n\n pluginEvent('setupClone', this);\n\n if (!Sortable.eventCanceled) {\n cloneEl = clone(dragEl);\n cloneEl.removeAttribute(\"id\");\n cloneEl.draggable = false;\n cloneEl.style['will-change'] = '';\n\n this._hideClone();\n\n toggleClass(cloneEl, this.options.chosenClass, false);\n Sortable.clone = cloneEl;\n } // #1143: IFrame support workaround\n\n\n _this.cloneId = _nextTick(function () {\n pluginEvent('clone', _this);\n if (Sortable.eventCanceled) return;\n\n if (!_this.options.removeCloneOnHide) {\n rootEl.insertBefore(cloneEl, dragEl);\n }\n\n _this._hideClone();\n\n _dispatchEvent({\n sortable: _this,\n name: 'clone'\n });\n });\n !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events\n\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\n if (dataTransfer) {\n dataTransfer.effectAllowed = 'move';\n options.setData && options.setData.call(_this, dataTransfer, dragEl);\n }\n\n on(document, 'drop', _this); // #1276 fix:\n\n css(dragEl, 'transform', 'translateZ(0)');\n }\n\n awaitingDragStarted = true;\n _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n on(document, 'selectstart', _this);\n moved = true;\n\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(\n /**Event*/\n 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\n if (_silent) return;\n\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 } // Capture animation state\n\n\n function capture() {\n dragOverEvent('dragOverAnimationCapture');\n\n _this.captureAnimationState();\n\n if (_this !== fromSortable) {\n fromSortable.captureAnimationState();\n }\n } // Return invocation when dragEl is inserted (or completed)\n\n\n function completed(insertion) {\n dragOverEvent('dragOverCompleted', {\n insertion: insertion\n });\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\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\n if (putSortable !== _this && _this !== Sortable.active) {\n putSortable = _this;\n } else if (_this === Sortable.active && putSortable) {\n putSortable = null;\n } // Animation\n\n\n if (fromSortable === _this) {\n _this._ignoreWhileAnimating = target;\n }\n\n _this.animateAll(function () {\n dragOverEvent('dragOverAnimationComplete');\n _this._ignoreWhileAnimating = null;\n });\n\n if (_this !== fromSortable) {\n fromSortable.animateAll();\n fromSortable._ignoreWhileAnimating = null;\n }\n } // Null lastTarget if it is not inside a previously swapped element\n\n\n if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n lastTarget = null;\n } // no bubbling and not fallback\n\n\n if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted\n\n\n !insertion && nearestEmptyInsertDetectEvent(evt);\n }\n\n !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n return completedFired = true;\n } // Call when dragEl has been inserted\n\n\n function changed() {\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n _dispatchEvent({\n sortable: _this,\n name: 'change',\n toEl: el,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n originalEvent: evt\n });\n }\n\n if (evt.preventDefault !== void 0) {\n evt.cancelable && evt.preventDefault();\n }\n\n target = closest(target, options.draggable, el, true);\n dragOverEvent('dragOver');\n if (Sortable.eventCanceled) return completedFired;\n\n if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n return completed(false);\n }\n\n ignoreNextClick = false;\n\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\n if (revert) {\n parentEl = rootEl; // actualization\n\n capture();\n\n this._hideClone();\n\n dragOverEvent('revert');\n\n if (!Sortable.eventCanceled) {\n if (nextEl) {\n rootEl.insertBefore(dragEl, nextEl);\n } else {\n rootEl.appendChild(dragEl);\n }\n }\n\n return completed(true);\n }\n\n var elLastChild = lastChild(el, options.draggable);\n\n if (!elLastChild || _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 === dragEl) {\n return completed(false);\n } // if there is a last element, it is the target\n\n\n if (elLastChild && el === evt.target) {\n target = elLastChild;\n }\n\n if (target) {\n targetRect = getRect(target);\n }\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n capture();\n\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\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\n if (firstChild === dragEl) {\n return completed(false);\n }\n\n target = firstChild;\n targetRect = getRect(target);\n\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\n if (lastTarget !== target) {\n targetBeforeFirstSwap = targetRect[side1];\n pastFirstInvertThresh = false;\n isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n }\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\n if (direction !== 0) {\n // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n var dragIndex = index(dragEl);\n\n do {\n dragIndex -= direction;\n sibling = parentEl.children[dragIndex];\n } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n } // If dragEl is already beside target: Do not insert\n\n\n if (direction === 0 || sibling === target) {\n return completed(false);\n }\n\n lastTarget = target;\n lastDirection = direction;\n var nextSibling = target.nextElementSibling,\n after = false;\n after = direction === 1;\n\n var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n\n if (moveVector !== false) {\n if (moveVector === 1 || moveVector === -1) {\n after = moveVector === 1;\n }\n\n _silent = true;\n setTimeout(_unsilent, 30);\n capture();\n\n if (after && !nextSibling) {\n el.appendChild(dragEl);\n } else {\n target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n } // Undo chrome's scroll adjustment (has no effect on other browsers)\n\n\n if (scrolledPastTop) {\n scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n }\n\n parentEl = dragEl.parentNode; // actualization\n // must be done before animation\n\n if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n }\n\n changed();\n return completed(true);\n }\n }\n\n if (el.contains(dragEl)) {\n return completed(false);\n }\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(\n /**Event*/\n evt) {\n var el = this.el,\n options = this.options; // Get the index of the dragged element within its parent\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n pluginEvent('drop', this, {\n evt: evt\n });\n parentEl = dragEl && dragEl.parentNode; // Get again after plugin event\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n if (Sortable.eventCanceled) {\n this._nulling();\n\n return;\n }\n\n awaitingDragStarted = false;\n isCircumstantialInvert = false;\n pastFirstInvertThresh = false;\n clearInterval(this._loopId);\n clearTimeout(this._dragStartTimer);\n\n _cancelNextTick(this.cloneId);\n\n _cancelNextTick(this._dragStartId); // Unbind events\n\n\n if (this.nativeDraggable) {\n off(document, 'drop', this);\n off(el, 'dragstart', this._onDragStart);\n }\n\n this._offMoveEvents();\n\n this._offUpEvents();\n\n if (Safari) {\n css(document.body, 'user-select', '');\n }\n\n css(dragEl, 'transform', '');\n\n if (evt) {\n if (moved) {\n evt.cancelable && evt.preventDefault();\n !options.dropBubble && evt.stopPropagation();\n }\n\n ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n // Remove clone(s)\n cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n }\n\n if (dragEl) {\n if (this.nativeDraggable) {\n off(dragEl, 'dragend', this);\n }\n\n _disableDraggable(dragEl);\n\n dragEl.style['will-change'] = ''; // Remove classes\n // ghostClass is added in dragStarted\n\n if (moved && !awaitingDragStarted) {\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n }\n\n toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event\n\n _dispatchEvent({\n sortable: this,\n name: 'unchoose',\n toEl: parentEl,\n newIndex: null,\n newDraggableIndex: null,\n originalEvent: evt\n });\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 }); // Remove event\n\n\n _dispatchEvent({\n sortable: this,\n name: 'remove',\n toEl: parentEl,\n originalEvent: evt\n }); // drag from one list and drop into another\n\n\n _dispatchEvent({\n rootEl: parentEl,\n name: 'sort',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\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\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\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\n _dispatchEvent({\n sortable: this,\n name: 'end',\n toEl: parentEl,\n originalEvent: evt\n }); // Save sorting\n\n\n this.save();\n }\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(\n /**Event*/\n evt) {\n switch (evt.type) {\n case 'drop':\n case 'dragend':\n this._onDrop(evt);\n\n break;\n\n case 'dragenter':\n case 'dragover':\n if (dragEl) {\n this._onDragOver(evt);\n\n _globalDragOver(evt);\n }\n\n break;\n\n case 'selectstart':\n evt.preventDefault();\n break;\n }\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\n for (; i < n; i++) {\n el = children[i];\n\n if (closest(el, options.draggable, this.el, false)) {\n order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n }\n }\n\n return order;\n },\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\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\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\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\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\n if (value === void 0) {\n return options[name];\n } else {\n var modifiedValue = PluginManager.modifyOption(this, name, value);\n\n if (typeof modifiedValue !== 'undefined') {\n options[name] = modifiedValue;\n } else {\n options[name] = value;\n }\n\n if (name === 'group') {\n _prepareGroup(options);\n }\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\n if (this.nativeDraggable) {\n off(el, 'dragover', this);\n off(el, 'dragenter', this);\n } // Remove draggable attributes\n\n\n Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n el.removeAttribute('draggable');\n });\n\n this._onDrop();\n\n this._disableDelayedDragEvents();\n\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\n if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n cloneEl.parentNode.removeChild(cloneEl);\n }\n\n cloneHidden = true;\n }\n },\n _showClone: function _showClone(putSortable) {\n if (putSortable.lastPutMode !== 'clone') {\n this._hideClone();\n\n return;\n }\n\n if (cloneHidden) {\n pluginEvent('showClone', this);\n if (Sortable.eventCanceled) return; // show clone at dragEl or original position\n\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\n if (this.options.group.revertClone) {\n this.animate(dragEl, cloneEl);\n }\n\n css(cloneEl, 'display', '');\n cloneHidden = false;\n }\n }\n};\n\nfunction _globalDragOver(\n/**Event*/\nevt) {\n if (evt.dataTransfer) {\n evt.dataTransfer.dropEffect = 'move';\n }\n\n evt.cancelable && evt.preventDefault();\n}\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; // Support for new CustomEvent feature\n\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\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\n if (onMoveFn) {\n retVal = onMoveFn.call(sortable, evt, originalEvent);\n }\n\n return retVal;\n}\n\nfunction _disableDraggable(el) {\n el.draggable = false;\n}\n\nfunction _unsilent() {\n _silent = false;\n}\n\nfunction _ghostIsFirst(evt, vertical, sortable) {\n var rect = getRect(getChild(sortable.el, 0, sortable.options, true));\n var spacer = 10;\n return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;\n}\n\nfunction _ghostIsLast(evt, vertical, sortable) {\n var rect = getRect(lastChild(sortable.el, sortable.options.draggable));\n var spacer = 10;\n return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;\n}\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\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\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\n invert = invert || invertSwap;\n\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\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 */\n\n\nfunction _getInsertDirection(target) {\n if (index(dragEl) < index(target)) {\n return 1;\n } else {\n return -1;\n }\n}\n/**\r\n * Generate id\r\n * @param {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\n\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\n while (i--) {\n sum += str.charCodeAt(i);\n }\n\n return sum.toString(36);\n}\n\nfunction _saveInputCheckedState(root) {\n savedInputChecked.length = 0;\n var inputs = root.getElementsByTagName('input');\n var idx = inputs.length;\n\n while (idx--) {\n var el = inputs[idx];\n el.checked && savedInputChecked.push(el);\n }\n}\n\nfunction _nextTick(fn) {\n return setTimeout(fn, 0);\n}\n\nfunction _cancelNextTick(id) {\n return clearTimeout(id);\n} // Fixed #973:\n\n\nif (documentExists) {\n on(document, 'touchmove', function (evt) {\n if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n evt.preventDefault();\n }\n });\n} // Export utils\n\n\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/**\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 */\n\nSortable.get = function (element) {\n return element[expando];\n};\n/**\r\n * Mount a plugin to Sortable\r\n * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted\r\n */\n\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\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\n if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n PluginManager.mount(plugin);\n });\n};\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\n\n\nSortable.create = function (el, options) {\n return new Sortable(el, options);\n}; // Export\n\n\nSortable.version = version;\n\nvar autoScrolls = [],\n scrollEl,\n scrollRootEl,\n scrolling = false,\n lastAutoScrollX,\n lastAutoScrollY,\n touchEvt$1,\n pointerElemChangedInterval;\n\nfunction AutoScrollPlugin() {\n function AutoScroll() {\n this.defaults = {\n scroll: true,\n forceAutoScrollFallback: false,\n scrollSensitivity: 30,\n scrollSpeed: 10,\n bubbleScroll: true\n }; // Bind all private methods\n\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\n AutoScroll.prototype = {\n dragStarted: function dragStarted(_ref) {\n var originalEvent = _ref.originalEvent;\n\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\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\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\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; // 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\n if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change\n\n var ogElemScroller = getParentAutoScrollElement(elem, true);\n\n if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour\n\n pointerElemChangedInterval = setInterval(function () {\n var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n\n if (newElem !== ogElemScroller) {\n ogElemScroller = newElem;\n clearAutoScrolls();\n }\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\n autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n }\n }\n };\n return _extends(AutoScroll, {\n pluginName: 'scroll',\n initializeByDefault: true\n });\n}\n\nfunction clearAutoScrolls() {\n autoScrolls.forEach(function (autoScroll) {\n clearInterval(autoScroll.pid);\n });\n autoScrolls = [];\n}\n\nfunction clearPointerElemChangedInterval() {\n clearInterval(pointerElemChangedInterval);\n}\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; // New scroll root, set scrollEl\n\n if (scrollRootEl !== rootEl) {\n scrollRootEl = rootEl;\n clearAutoScrolls();\n scrollEl = options.scroll;\n scrollCustomFn = options.scrollFn;\n\n if (scrollEl === true) {\n scrollEl = getParentAutoScrollElement(rootEl, true);\n }\n }\n\n var layersOut = 0;\n var currentParent = scrollEl;\n\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\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\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\n if (!autoScrolls[layersOut]) {\n for (var i = 0; i <= layersOut; i++) {\n if (!autoScrolls[i]) {\n autoScrolls[i] = {};\n }\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\n if (vx != 0 || vy != 0) {\n scrollThisInstance = true;\n /* jshint loopfunc:true */\n\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 }\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\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\n scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n }.bind({\n layer: layersOut\n }), 24);\n }\n }\n\n layersOut++;\n } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n\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\n if (toSortable && !toSortable.el.contains(target)) {\n dispatchSortableEvent('spill');\n this.onSpill({\n dragEl: dragEl,\n putSortable: putSortable\n });\n }\n};\n\nfunction Revert() {}\n\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\n if (putSortable) {\n putSortable.captureAnimationState();\n }\n\n var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n\n if (nextSibling) {\n this.sortable.el.insertBefore(dragEl, nextSibling);\n } else {\n this.sortable.el.appendChild(dragEl);\n }\n\n this.sortable.animateAll();\n\n if (putSortable) {\n putSortable.animateAll();\n }\n },\n drop: drop\n};\n\n_extends(Revert, {\n pluginName: 'revertOnSpill'\n});\n\nfunction Remove() {}\n\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\n_extends(Remove, {\n pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\n\nfunction SwapPlugin() {\n function Swap() {\n this.defaults = {\n swapClass: 'sortable-swap-highlight'\n };\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\n if (target && target !== el) {\n var prevSwapEl = lastSwapEl;\n\n if (onMove(target) !== false) {\n toggleClass(target, options.swapClass, true);\n lastSwapEl = target;\n } else {\n lastSwapEl = null;\n }\n\n if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n toggleClass(prevSwapEl, options.swapClass, false);\n }\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\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}\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\n if (p1.isEqualNode(p2) && i1 < i2) {\n i2++;\n }\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)\nmultiDragSortable,\n initialFolding = false,\n // Initial multi-drag fold when drag started\nfolding = false,\n // Folding any other time\ndragStarted = false,\n dragEl$1,\n clonesFromRect,\n clonesHidden;\n\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\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\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\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\n dataTransfer.setData('Text', data);\n }\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\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\n sortable._hideClone();\n\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\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\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\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\n if (!this.isMultiDrag && multiDragSortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n }\n\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.sortableIndex = index(multiDragElement);\n }); // Sort multi-drag elements\n\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\n var sortable = _ref7.sortable;\n if (!this.isMultiDrag) return;\n\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\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\n sortable.animateAll(function () {\n folding = false;\n initialFolding = false;\n\n if (_this2.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n } // Remove all auxiliary multidrag items from el, if sorting enabled\n\n\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\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\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\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n }\n\n initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location\n\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); // 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\n parentEl.appendChild(multiDragElement);\n });\n folding = true;\n } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n\n\n if (!isOwner) {\n // Only remove if not folding (folding will remove them anyways)\n if (!folding) {\n removeMultiDragElements();\n }\n\n if (multiDragElements.length > 1) {\n var clonesHiddenBefore = clonesHidden;\n\n activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden\n\n\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\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; // Multi-drag selection\n\n if (!dragStarted) {\n if (options.multiDragKey && !this.multiDragKeyDown) {\n this._deselectMultiDrag();\n }\n\n toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n\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 }); // Modifier activated, select from last to dragEl\n\n if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n var lastIndex = index(lastMultiDragSelect),\n currentIndex = index(dragEl$1);\n\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\n if (currentIndex > lastIndex) {\n i = lastIndex;\n n = currentIndex;\n } else {\n i = currentIndex;\n n = lastIndex + 1;\n }\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\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 } // Multi-drag drop\n\n\n if (dragStarted && this.isMultiDrag) {\n folding = false; // Do not \"unfold\" after around dragEl if reverted\n\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\n if (!initialFolding) {\n if (options.animation) {\n dragEl$1.fromRect = dragRect;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n\n if (multiDragElement !== dragEl$1) {\n var rect = folding ? getRect(multiDragElement) : dragRect;\n multiDragElement.fromRect = rect; // Prepare unfold animation\n\n toSortable.addAnimationState({\n target: multiDragElement,\n rect: rect\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\n\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\n multiDragIndex++;\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\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\n if (update) {\n dispatchSortableEvent('update');\n }\n }\n } // Must be done after capturing individual rects (scroll bar)\n\n\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n toSortable.animateAll();\n }\n\n multiDragSortable = toSortable;\n } // Remove clones if necessary\n\n\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\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; // Only deselect if selection is in this sortable\n\n if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable\n\n if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click\n\n if (evt && evt.button !== 0) return;\n\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\n if (multiDragSortable && multiDragSortable !== sortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n\n multiDragSortable = sortable;\n }\n\n toggleClass(el, sortable.options.selectedClass, true);\n multiDragElements.push(el);\n },\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\n var oldIndicies = [],\n newIndicies = [];\n multiDragElements.forEach(function (multiDragElement) {\n oldIndicies.push({\n multiDragElement: multiDragElement,\n index: multiDragElement.sortableIndex\n }); // multiDragElements will already be sorted if folding\n\n var newIndex;\n\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\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\n if (key === 'ctrl') {\n key = 'Control';\n } else if (key.length > 1) {\n key = key.charAt(0).toUpperCase() + key.substr(1);\n }\n\n return key;\n }\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\n if (target) {\n rootEl.insertBefore(multiDragElement, target);\n } else {\n rootEl.appendChild(multiDragElement);\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 */\n\n\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n multiDragClones.forEach(function (clone, i) {\n var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(clone, target);\n } else {\n rootEl.appendChild(clone);\n }\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","module.exports = \"605b1218c05c82dd\";"],"names":[],"version":3,"file":"electron-tabs.js.map","sourceRoot":"../"} \ No newline at end of file diff --git a/electron-tabs.css b/electron-tabs.css deleted file mode 100644 index 8b91f7f..0000000 --- a/electron-tabs.css +++ /dev/null @@ -1,139 +0,0 @@ -.etabs-tabgroup { - width: 100%; - height: 32px; - background-color: #ccc; - cursor: default; - font: caption; - font-size: 14px; - -webkit-user-select: none; - user-select: none; - display: none; -} - -.etabs-tabgroup.visible { - display: block; -} - -.etabs-tabs { -} - -.etabs-tab { - display: none; - position: relative; - color: #333; - height: 22px; - padding: 6px 8px 4px; - border: 1px solid #aaa; - border-bottom: none; - border-left: none; - background: linear-gradient(to bottom, rgba(234,234,234,1) 0%,rgba(204,204,204,1) 100%); - font: caption; - font-size: 14px; - background-color: #ccc; - cursor: default; -} - -/* Dragula */ -.etabs-tab.gu-mirror { - padding-bottom: 0; -} - -.etabs-tab:first-child { - border-left: none; -} - -.etabs-tab.visible { - display: inline-block; - float: left; -} - -.etabs-tab.active { - background: #fff; -} - -.etabs-tab.flash { - background: linear-gradient(to bottom, rgba(255,243,170,1) 0%,rgba(255,227,37,1) 100%); -} - -.etabs-buttons { - float: left; -} - -.etabs-buttons button { - float: left; - color: #333; - background: none; - border: none; - font-size: 12px; - margin-top: 6px; - border-radius: 2px; - margin-left: 4px; - width: 20px; - text-align: center; - padding: 4px 0; -} - -.etabs-buttons button:hover { - color: #eee; - background-color: #aaa; -} - -.etabs-tab-badge { - position: absolute; - right: 0; - top: -7px; - background: red; - border-radius: 100%; - text-align: center; - font-size: 10px; - padding: 0 5px; -} - -.etabs-tab-badge.hidden { - display: none; -} - -.etabs-tab-icon { - display: inline-block; - height: 16px; -} - -.etabs-tab-icon img { - max-width: 16px; - max-height: 16px; -} - -.etabs-tab-title { - display: inline-block; - margin-left: 10px; -} - -.etabs-tab-buttons { - display: inline-block; - margin-left: 10px; -} - -.etabs-tab-buttons button { - display: inline-block; - color: #333; - background: none; - border: none; - width: 20px; - text-align: center; - border-radius: 2px; -} - -.etabs-tab-buttons button:hover { - color: #eee; - background-color: #aaa; -} - -.etabs-views { - position: relative; - border-top: 1px solid #aaa; - height: calc(100vh - 33px); -} - -.etab-view { - position: relative; -} diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 8725abf..0000000 --- a/index.d.ts +++ /dev/null @@ -1,118 +0,0 @@ -declare class EventEmitter extends EventTarget { - - emit(event: string, ...args: any[]): boolean; - emit(event: "tab-added", tab: ElectronTabs.Tab, tabGroup: ElectronTabs): boolean; - emit(event: "tab-removed", tab: ElectronTabs.Tab, tabGroup: ElectronTabs): boolean; - emit(event: "tab-active", tab: ElectronTabs.Tab, tabGroup: ElectronTabs): boolean; - - emit(event: "webview-ready", tab: ElectronTabs.Tab): boolean; - emit(event: "webview-dom-ready", tab: ElectronTabs.Tab): boolean; - emit(event: "title-changed", title: string, tab: ElectronTabs.Tab): boolean; - emit(event: "badge-changed", badge: string, tab: ElectronTabs.Tab): boolean; - emit(event: "icon-changed", icon: string, tab: ElectronTabs.Tab): boolean; - emit(event: "active", tab: ElectronTabs.Tab): boolean; - emit(event: "inactive", tab: ElectronTabs.Tab): boolean; - emit(event: "visible", tab: ElectronTabs.Tab): boolean; - emit(event: "hidden", tab: ElectronTabs.Tab): boolean; - emit(event: "flash", tab: ElectronTabs.Tab): boolean; - emit(event: "unflash", tab: ElectronTabs.Tab): boolean; - emit(event: "close", tab: ElectronTabs.Tab, abort: () => void): boolean; - emit(event: "closing", tab: ElectronTabs.Tab, abort: () => void): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "tab-added", listener: (tab: ElectronTabs.Tab, tabGroup: ElectronTabs) => void): this; - on(event: "tab-removed", listener: (tab: ElectronTabs.Tab, tabGroup: ElectronTabs) => void): this; - on(event: "tab-active", listener: (tab: ElectronTabs.Tab, tabGroup: ElectronTabs) => void): this; - - on(event: "webview-ready", listener: (tab: ElectronTabs.Tab) => void): this; - on(event: "webview-dom-ready", listener: (tab: ElectronTabs.Tab) => void): this; - on(event: "title-changed", listener: (title: string, tab: ElectronTabs.Tab) => void): this; - on(event: "badge-changed", listener: (badge: string, tab: ElectronTabs.Tab) => void): this; - on(event: "icon-changed", listener: (icon: string, tab: ElectronTabs.Tab) => void): this; - on(event: "active", listener: (tab: ElectronTabs.Tab) => void): this; - on(event: "inactive", listener: (tab: ElectronTabs.Tab) => void): this; - on(event: "visible", listener: (tab: ElectronTabs.Tab) => void): this; - on(event: "hidden", listener: (tab: ElectronTabs.Tab) => void): this; - on(event: "flash", listener: (tab: ElectronTabs.Tab) => void): this; - on(event: "unflash", listener: (tab: ElectronTabs.Tab) => void): this; - on(event: "close", listener: (tab: ElectronTabs.Tab, abort: () => void) => void): this; - on(event: "closing", listener: (tab: ElectronTabs.Tab, abort: () => void) => void): this; - - once(event: "webview-ready", listener: (tab: ElectronTabs.Tab) => void): this; - once(event: "webview-dom-ready", listener: (tab: ElectronTabs.Tab) => void): this; - once(event: "title-changed", listener: (title: string, tab: ElectronTabs.Tab) => void): this; - once(event: "badge-changed", listener: (badge: string, tab: ElectronTabs.Tab) => void): this; - once(event: "icon-changed", listener: (icon: string, tab: ElectronTabs.Tab) => void): this; - once(event: "active", listener: (tab: ElectronTabs.Tab) => void): this; - once(event: "inactive", listener: (tab: ElectronTabs.Tab) => void): this; - once(event: "visible", listener: (tab: ElectronTabs.Tab) => void): this; - once(event: "hidden", listener: (tab: ElectronTabs.Tab) => void): this; - once(event: "flash", listener: (tab: ElectronTabs.Tab) => void): this; - once(event: "unflash", listener: (tab: ElectronTabs.Tab) => void): this; - once(event: "close", listener: (tab: ElectronTabs.Tab, abort: () => void) => void): this; - once(event: "closing", listener: (tab: ElectronTabs.Tab, abort: () => void) => void): this; -} - -declare class ElectronTabs extends EventEmitter { - constructor(options?: ElectronTabs.TabGroupOptions); - addTab(options?: ElectronTabs.TabOptions): ElectronTabs.Tab; - getTab(id: number): ElectronTabs.Tab | null; - getTabByPosition(position: number): ElectronTabs.Tab | null; - getTabByRelPosition(position: number): ElectronTabs.Tab | null; - getActiveTab(): ElectronTabs.Tab | null; - getTabs(): ElectronTabs.Tab[]; - eachTab( - fn: (this: T, currentTab: ElectronTabs.Tab, index: number, tabs: ElectronTabs.Tab[]) => void, - thisArg?: T, - ): void; - tabContainer: HTMLElement; -} - -declare namespace ElectronTabs { - export interface TabGroupOptions { - tabContainerSelector?: string; - buttonsContainerSelector?: string; - viewContainerSelector?: string; - tabClass?: string; - viewClass?: string; - closeButtonText?: string; - newTabButtonText?: string; - newTab?: TabOptions | (() => TabOptions); - ready?: (tabGroup: ElectronTabs) => void; - } - - export interface TabOptions { - title?: string; - src?: string; - badge?: string; - iconURL?: string; - icon?: string; - closable?: boolean; - webviewAttributes?: {[key: string]: any}; - visible?: boolean; - active?: boolean; - ready?: (tab: Tab) => void; - } - - export interface Tab extends EventEmitter { - id: number; - setTitle(title: string): void; - getTitle(): string; - setBadge(badge: string): void; - getBadge(): string; - setIcon(iconURL?: string, icon?: undefined | null): void; - setIcon(iconURL: undefined | null, icon: string): void; - getIcon(): string; - setPosition(position: number): Tab | null; - getPosition(fromRight?: boolean): number; - activate(): void; - show(shown?: boolean): void; - hide(): void; - flash(shown?: boolean): void; - unflash(): void; - close(force?: boolean): void; - webview: Electron.WebviewTag; - } -} - -export = ElectronTabs; diff --git a/index.js b/index.js deleted file mode 100644 index 020d5fb..0000000 --- a/index.js +++ /dev/null @@ -1,472 +0,0 @@ -if (!document) { - throw Error("electron-tabs module must be called in renderer process"); -} - -// Inject styles -(function () { - const styles = ` - webview { - position: absolute; - visibility: hidden; - width: 100%; - height: 100%; - } - webview.visible { - visibility: visible; - } - `; - let styleTag = document.createElement("style"); - styleTag.innerHTML = styles; - document.getElementsByTagName("head")[0].appendChild(styleTag); -})(); - -/** - * This makes the browser EventTarget API work similar to EventEmitter - */ -class EventEmitter extends EventTarget { - emit (type, ...args) { - this.dispatchEvent(new CustomEvent(type, { detail: args })); - } - - on (type, fn) { - this.addEventListener(type, ({ detail }) => fn.apply(this, detail)); - } - - once (type, fn) { - this.addEventListener(type, ({ detail }) => fn.apply(this, detail), { once: true }); - } -} - -class TabGroup extends EventEmitter { - constructor (args = {}) { - super(); - let options = this.options = { - tabContainerSelector: args.tabContainerSelector || ".etabs-tabs", - buttonsContainerSelector: args.buttonsContainerSelector || ".etabs-buttons", - viewContainerSelector: args.viewContainerSelector || ".etabs-views", - tabClass: args.tabClass || "etabs-tab", - viewClass: args.viewClass || "etabs-view", - closeButtonText: args.closeButtonText || "×", - newTab: args.newTab, - newTabButtonText: args.newTabButtonText || "+", - visibilityThreshold: args.visibilityThreshold || 0, - ready: args.ready - }; - this.tabContainer = document.querySelector(options.tabContainerSelector); - this.viewContainer = document.querySelector(options.viewContainerSelector); - this.tabs = []; - this.newTabId = 0; - TabGroupPrivate.initNewTabButton.bind(this)(); - TabGroupPrivate.initVisibility.bind(this)(); - if (typeof this.options.ready === "function") { - this.options.ready(this); - } - } - - addTab (args = this.options.newTab) { - if (typeof args === "function") { - args = args(this); - } - let id = this.newTabId; - this.newTabId++; - let tab = new Tab(this, id, args); - this.tabs.push(tab); - // Don't call tab.activate() before a tab is referenced in this.tabs - if (args.active === true) { - tab.activate(); - } - this.emit("tab-added", tab, this); - return tab; - } - - getTab (id) { - for (let i in this.tabs) { - if (this.tabs[i].id === id) { - return this.tabs[i]; - } - } - return null; - } - - getTabByPosition (position) { - let fromRight = position < 0; - for (let i in this.tabs) { - if (this.tabs[i].getPosition(fromRight) === position) { - return this.tabs[i]; - } - } - return null; - } - - getTabByRelPosition (position) { - position = this.getActiveTab().getPosition() + position; - if (position <= 0) { - return null; - } - return this.getTabByPosition(position); - } - - getNextTab () { - return this.getTabByRelPosition(1); - } - - getPreviousTab () { - return this.getTabByRelPosition(-1); - } - - getTabs () { - return this.tabs.slice(); - } - - eachTab (fn) { - this.getTabs().forEach(fn); - return this; - } - - getActiveTab () { - if (this.tabs.length === 0) return null; - return this.tabs[0]; - } -} - -const TabGroupPrivate = { - initNewTabButton: function () { - if (!this.options.newTab) return; - let container = document.querySelector(this.options.buttonsContainerSelector); - let button = container.appendChild(document.createElement("button")); - button.classList.add(`${this.options.tabClass}-button-new`); - button.innerHTML = this.options.newTabButtonText; - button.addEventListener("click", this.addTab.bind(this, undefined), false); - }, - - initVisibility: function () { - function toggleTabsVisibility(tab, tabGroup) { - var visibilityThreshold = this.options.visibilityThreshold; - var el = tabGroup.tabContainer.parentNode; - if (this.tabs.length >= visibilityThreshold) { - el.classList.add("visible"); - } else { - el.classList.remove("visible"); - } - } - - this.on("tab-added", toggleTabsVisibility); - this.on("tab-removed", toggleTabsVisibility); - }, - - removeTab: function (tab, triggerEvent) { - let id = tab.id; - for (let i in this.tabs) { - if (this.tabs[i].id === id) { - this.tabs.splice(i, 1); - break; - } - } - if (triggerEvent) { - this.emit("tab-removed", tab, this); - } - return this; - }, - - setActiveTab: function (tab) { - TabGroupPrivate.removeTab.bind(this)(tab); - this.tabs.unshift(tab); - this.emit("tab-active", tab, this); - return this; - }, - - activateRecentTab: function (tab) { - if (this.tabs.length > 0) { - this.tabs[0].activate(); - } - return this; - } -}; - -class Tab extends EventEmitter { - constructor (tabGroup, id, args) { - super(); - this.tabGroup = tabGroup; - this.id = id; - this.title = args.title; - this.badge = args.badge; - this.iconURL = args.iconURL; - this.icon = args.icon; - this.closable = args.closable === false ? false : true; - this.webviewAttributes = args.webviewAttributes || {}; - this.webviewAttributes.src = args.src; - this.tabElements = {}; - TabPrivate.initTab.bind(this)(); - TabPrivate.initWebview.bind(this)(); - if (args.visible !== false) { - this.show(); - } - if (typeof args.ready === "function") { - args.ready(this); - } - } - - setTitle (title) { - if (this.isClosed) return; - let span = this.tabElements.title; - span.innerHTML = title; - span.title = title; - this.title = title; - this.emit("title-changed", title, this); - return this; - } - - getTitle () { - if (this.isClosed) return; - return this.title; - } - - setBadge (badge) { - if (this.isClosed) return; - let span = this.tabElements.badge; - this.badge = badge; - - if (badge) { - span.innerHTML = badge; - span.classList.remove('hidden'); - } else { - span.classList.add('hidden'); - } - - this.emit("badge-changed", badge, this); - } - - getBadge () { - if (this.isClosed) return; - return this.badge; - } - - setIcon (iconURL, icon) { - if (this.isClosed) return; - this.iconURL = iconURL; - this.icon = icon; - let span = this.tabElements.icon; - if (iconURL) { - span.innerHTML = ``; - this.emit("icon-changed", iconURL, this); - } else if (icon) { - span.innerHTML = ``; - this.emit("icon-changed", icon, this); - } - - return this; - } - - getIcon () { - if (this.isClosed) return; - if (this.iconURL) return this.iconURL; - return this.icon; - } - - setPosition (newPosition) { - let tabContainer = this.tabGroup.tabContainer; - let tabs = tabContainer.children; - let oldPosition = this.getPosition() - 1; - - if (newPosition < 0) { - newPosition += tabContainer.childElementCount; - - if (newPosition < 0) { - newPosition = 0; - } - } else { - if (newPosition > tabContainer.childElementCount) { - newPosition = tabContainer.childElementCount; - } - - // Make 1 be leftmost position - newPosition--; - } - - if (newPosition > oldPosition) { - newPosition++; - } - - tabContainer.insertBefore(tabs[oldPosition], tabs[newPosition]); - - return this; - } - - getPosition (fromRight) { - let position = 0; - let tab = this.tab; - while ((tab = tab.previousSibling) != null) position++; - - if (fromRight === true) { - position -= this.tabGroup.tabContainer.childElementCount; - } - - if (position >= 0) { - position++; - } - - return position; - } - - activate () { - if (this.isClosed) return; - let activeTab = this.tabGroup.getActiveTab(); - if (activeTab) { - activeTab.tab.classList.remove("active"); - activeTab.webview.classList.remove("visible"); - activeTab.emit("inactive", activeTab); - } - TabGroupPrivate.setActiveTab.bind(this.tabGroup)(this); - this.tab.classList.add("active"); - this.webview.classList.add("visible"); - this.webview.focus(); - this.emit("active", this); - return this; - } - - show (flag) { - if (this.isClosed) return; - if (flag !== false) { - this.tab.classList.add("visible"); - this.emit("visible", this); - } else { - this.tab.classList.remove("visible"); - this.emit("hidden", this); - } - return this; - } - - hide () { - return this.show(false); - } - - flash (flag) { - if (this.isClosed) return; - if (flag !== false) { - this.tab.classList.add("flash"); - this.emit("flash", this); - } else { - this.tab.classList.remove("flash"); - this.emit("unflash", this); - } - return this; - } - - unflash () { - return this.flash(false); - } - - hasClass (classname) { - return this.tab.classList.contains(classname); - } - - close (force) { - const abortController = new AbortController(); - const abort = () => abortController.abort(); - this.emit("closing", this, abort); - - const abortSignal = abortController.signal; - if (this.isClosed || (!this.closable && !force) || abortSignal.aborted) return; - - this.isClosed = true; - let tabGroup = this.tabGroup; - tabGroup.tabContainer.removeChild(this.tab); - tabGroup.viewContainer.removeChild(this.webview); - let activeTab = this.tabGroup.getActiveTab(); - TabGroupPrivate.removeTab.bind(tabGroup)(this, true); - - this.emit("close", this); - - if (activeTab.id === this.id) { - TabGroupPrivate.activateRecentTab.bind(tabGroup)(); - } - } -} - -const TabPrivate = { - initTab: function () { - let tabClass = this.tabGroup.options.tabClass; - - // Create tab element - let tab = this.tab = document.createElement("div"); - tab.classList.add(tabClass); - for (let el of ["icon", "title", "buttons", "badge"]) { - let span = tab.appendChild(document.createElement("span")); - span.classList.add(`${tabClass}-${el}`); - this.tabElements[el] = span; - } - - this.setTitle(this.title); - this.setBadge(this.badge); - this.setIcon(this.iconURL, this.icon); - TabPrivate.initTabButtons.bind(this)(); - TabPrivate.initTabClickHandler.bind(this)(); - - this.tabGroup.tabContainer.appendChild(this.tab); - }, - - initTabButtons: function () { - let container = this.tabElements.buttons; - let tabClass = this.tabGroup.options.tabClass; - if (this.closable) { - let button = container.appendChild(document.createElement("button")); - button.classList.add(`${tabClass}-button-close`); - button.innerHTML = this.tabGroup.options.closeButtonText; - button.addEventListener("click", this.close.bind(this, false), false); - } - }, - - initTabClickHandler: function () { - // Mouse up - const tabClickHandler = function (e) { - if (this.isClosed) return; - if (e.which === 2) { - this.close(); - } - }; - this.tab.addEventListener("mouseup", tabClickHandler.bind(this), false); - // Mouse down - const tabMouseDownHandler = function (e) { - if (this.isClosed) return; - if (e.which === 1) { - if (e.target.matches("button")) return; - this.activate(); - } - }; - this.tab.addEventListener("mousedown", tabMouseDownHandler.bind(this), false); - }, - - initWebview: function () { - const webview = this.webview = document.createElement("webview"); - - const tabWebviewDidFinishLoadHandler = function (e) { - this.emit("webview-ready", this); - }; - - this.webview.addEventListener("did-finish-load", tabWebviewDidFinishLoadHandler.bind(this), false); - - const tabWebviewDomReadyHandler = function (e) { - // Remove this once https://github.com/electron/electron/issues/14474 is fixed - webview.blur(); - webview.focus(); - this.emit("webview-dom-ready", this); - }; - - this.webview.addEventListener("dom-ready", tabWebviewDomReadyHandler.bind(this), false); - - this.webview.classList.add(this.tabGroup.options.viewClass); - if (this.webviewAttributes) { - let attrs = this.webviewAttributes; - for (let key in attrs) { - const attr = attrs[key]; - if (attr === false) continue; - this.webview.setAttribute(key, attr); - } - } - - this.tabGroup.viewContainer.appendChild(this.webview); - } -}; - -module.exports = TabGroup; - diff --git a/package-lock.json b/package-lock.json index d4b7438..4c8cb20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,734 +1,93 @@ { "name": "electron-tabs", - "version": "0.16.0", - "lockfileVersion": 2, + "version": "1.0.0-dev", + "lockfileVersion": 1, "requires": true, - "packages": { - "": { - "version": "0.16.0", - "license": "MIT", - "devDependencies": { - "electron": "^17.1.2" - } - }, - "node_modules/@electron/get": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.14.1.tgz", - "integrity": "sha512-BrZYyL/6m0ZXz/lDxy/nlVhQz+WF+iPS6qXolEU8atw7h6v1aYkjwJZ63m+bJMBTxDE66X+r2tPS4a/8C82sZw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "env-paths": "^2.2.0", - "fs-extra": "^8.1.0", - "got": "^9.6.0", - "progress": "^2.0.3", - "semver": "^6.2.0", - "sumchecker": "^3.0.1" - }, - "optionalDependencies": { - "global-agent": "^3.0.0", - "global-tunnel-ng": "^2.7.1" - } - }, - "node_modules/@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true - }, - "node_modules/@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "dependencies": { - "defer-to-connect": "^1.0.1" - } - }, - "node_modules/@types/node": { - "version": "14.18.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.12.tgz", - "integrity": "sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==", - "dev": true - }, - "node_modules/boolean": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", - "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", - "dev": true, - "optional": true - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true - }, - "node_modules/buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "node_modules/cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - } - }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - } - }, - "node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - }, - "node_modules/clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - } - }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", - "dev": true, - "optional": true, - "dependencies": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - } - }, - "node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - } - }, - "node_modules/defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, - "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "optional": true, - "dependencies": { - "object-keys": "^1.0.12" - } - }, - "node_modules/detect-node": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", - "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", - "dev": true, - "optional": true - }, - "node_modules/duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, - "node_modules/electron": { - "version": "17.1.2", - "resolved": "https://registry.npmjs.org/electron/-/electron-17.1.2.tgz", - "integrity": "sha512-hqKQaUIRWX5Y2eAD8FZINWD/e5TKdpkbBYbkcZmJS4Bd1PKQsaDVc9h5xoA8zZQkPymE9rss+swjRpAFurOPGQ==", - "dev": true, - "dependencies": { - "@electron/get": "^1.13.0", - "@types/node": "^14.6.2", - "extract-zip": "^1.0.3" - } - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true, - "optional": true - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true - }, - "node_modules/es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true, - "optional": true - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "optional": true - }, - "node_modules/extract-zip": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", - "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==", - "dev": true, - "dependencies": { - "concat-stream": "^1.6.2", - "debug": "^2.6.9", - "mkdirp": "^0.5.4", - "yauzl": "^2.10.0" - } - }, - "node_modules/extract-zip/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/extract-zip/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", - "dev": true, - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - } - }, - "node_modules/global-agent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz", - "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==", - "dev": true, - "optional": true, - "dependencies": { - "boolean": "^3.0.1", - "es6-error": "^4.1.1", - "matcher": "^3.0.0", - "roarr": "^2.15.3", - "semver": "^7.3.2", - "serialize-error": "^7.0.1" - } - }, - "node_modules/global-agent/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "optional": true, - "dependencies": { - "lru-cache": "^6.0.0" - } - }, - "node_modules/global-tunnel-ng": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz", - "integrity": "sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==", - "dev": true, - "optional": true, - "dependencies": { - "encodeurl": "^1.0.2", - "lodash": "^4.17.10", - "npm-conf": "^1.1.3", - "tunnel": "^0.0.6" - } - }, - "node_modules/globalthis": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.2.tgz", - "integrity": "sha512-ZQnSFO1la8P7auIOQECnm0sSuoMeaSq0EEdXMBFF2QJO4uNcwbyhSgG3MruWNbFTqCLmxVwGOl7LZ9kASvHdeQ==", - "dev": true, - "optional": true, - "dependencies": { - "define-properties": "^1.1.3" - } - }, - "node_modules/got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", - "dev": true - }, - "node_modules/http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", - "dev": true - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true, - "optional": true - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "node_modules/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true, - "optional": true - }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.0" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true, - "optional": true - }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "optional": true, - "dependencies": { - "yallist": "^4.0.0" - } - }, - "node_modules/matcher": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", - "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", - "dev": true, - "optional": true, - "dependencies": { - "escape-string-regexp": "^4.0.0" - } - }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true - }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, - "node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", - "dev": true - }, - "node_modules/npm-conf": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", - "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", - "dev": true, - "optional": true, - "dependencies": { - "config-chain": "^1.1.11", - "pify": "^3.0.0" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "optional": true - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true - }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "dev": true - }, - "node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "optional": true - }, - "node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "node_modules/proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", - "dev": true, - "optional": true - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "dependencies": { - "lowercase-keys": "^1.0.0" - } - }, - "node_modules/roarr": { - "version": "2.15.4", - "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz", - "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==", - "dev": true, - "optional": true, - "dependencies": { - "boolean": "^3.0.1", - "detect-node": "^2.0.4", - "globalthis": "^1.0.1", - "json-stringify-safe": "^5.0.1", - "semver-compare": "^1.0.0", - "sprintf-js": "^1.1.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "node_modules/semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true, - "optional": true - }, - "node_modules/serialize-error": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", - "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==", - "dev": true, - "optional": true, - "dependencies": { - "type-fest": "^0.13.1" - } - }, - "node_modules/sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true, - "optional": true - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/sumchecker": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz", - "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==", - "dev": true, - "dependencies": { - "debug": "^4.1.0" - } - }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true - }, - "node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "dev": true, - "optional": true - }, - "node_modules/type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "dev": true, - "optional": true - }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, - "dependencies": { - "prepend-http": "^2.0.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true, - "optional": true - }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", - "dev": true, - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - } - }, "dependencies": { + "@babel/code-frame": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.16.7" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.12.tgz", + "integrity": "sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "@electron/get": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.14.1.tgz", @@ -746,12 +105,950 @@ "sumchecker": "^3.0.1" } }, + "@lezer/common": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-0.15.12.tgz", + "integrity": "sha512-edfwCxNLnzq5pBA/yaIhwJ3U3Kz8VAUOTRg0hhxaizaI1N+qxV7EXDv/kLCkLeq2RzSFvxexlaj5Mzfn2kY0Ig==", + "dev": true + }, + "@lezer/lr": { + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-0.15.8.tgz", + "integrity": "sha512-bM6oE6VQZ6hIFxDNKk8bKPa14hqFrV07J/vHGOeiAbJReIaQXmkVb6xQu4MR+JBTLa5arGRyAAjJe1qaQt3Uvg==", + "dev": true, + "requires": { + "@lezer/common": "^0.15.0" + } + }, + "@mischnic/json-sourcemap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@mischnic/json-sourcemap/-/json-sourcemap-0.1.0.tgz", + "integrity": "sha512-dQb3QnfNqmQNYA4nFSN/uLaByIic58gOXq4Y4XqLOWmOrw73KmJPt/HLyG0wvn1bnR6mBKs/Uwvkh+Hns1T0XA==", + "dev": true, + "requires": { + "@lezer/common": "^0.15.7", + "@lezer/lr": "^0.15.4", + "json5": "^2.2.1" + } + }, + "@msgpackr-extract/msgpackr-extract-darwin-arm64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-2.0.2.tgz", + "integrity": "sha512-FMX5i7a+ojIguHpWbzh5MCsCouJkwf4z4ejdUY/fsgB9Vkdak4ZnoIEskOyOUMMB4lctiZFGszFQJXUeFL8tRg==", + "dev": true, + "optional": true + }, + "@msgpackr-extract/msgpackr-extract-darwin-x64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-2.0.2.tgz", + "integrity": "sha512-DznYtF3lHuZDSRaIOYeif4JgO0NtO2Xf8DsngAugMx/bUdTFbg86jDTmkVJBNmV+cxszz6OjGvinnS8AbJ342g==", + "dev": true, + "optional": true + }, + "@msgpackr-extract/msgpackr-extract-linux-arm": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-2.0.2.tgz", + "integrity": "sha512-Gy9+c3Wj+rUlD3YvCZTi92gs+cRX7ZQogtwq0IhRenloTTlsbpezNgk6OCkt59V4ATEWSic9rbU92H/l7XsRvA==", + "dev": true, + "optional": true + }, + "@msgpackr-extract/msgpackr-extract-linux-arm64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-2.0.2.tgz", + "integrity": "sha512-b0jMEo566YdM2K+BurSed7bswjo3a6bcdw5ETqoIfSuxKuRLPfAiOjVbZyZBgx3J/TAM/QrvEQ/VN89A0ZAxSg==", + "dev": true, + "optional": true + }, + "@msgpackr-extract/msgpackr-extract-linux-x64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-2.0.2.tgz", + "integrity": "sha512-zrBHaePwcv4cQXxzYgNj0+A8I1uVN97E7/3LmkRocYZ+rMwUsnPpp4RuTAHSRoKlTQV3nSdCQW4Qdt4MXw/iHw==", + "dev": true, + "optional": true + }, + "@msgpackr-extract/msgpackr-extract-win32-x64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-2.0.2.tgz", + "integrity": "sha512-fpnI00dt+yO1cKx9qBXelKhPBdEgvc8ZPav1+0r09j0woYQU2N79w/jcGawSY5UGlgQ3vjaJsFHnGbGvvqdLzg==", + "dev": true, + "optional": true + }, + "@parcel/bundler-default": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/bundler-default/-/bundler-default-2.5.0.tgz", + "integrity": "sha512-7CJzE17SirCXjcRgBcnqWO/5EOA1raq/3OIKtT4cxbjpDQGHZpjpEEZiMNRpEpdNMxDSlsG8mAkXTYGL2VVWRw==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/hash": "2.5.0", + "@parcel/plugin": "2.5.0", + "@parcel/utils": "2.5.0", + "nullthrows": "^1.1.1" + } + }, + "@parcel/cache": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/cache/-/cache-2.5.0.tgz", + "integrity": "sha512-3kOO3cZQv0FAKhrMHGLdb4Qtzpmy78Q6jPN3u8eCY4yqeDTnyQBZvWNHoyCm5WlmL8y6Q6REYMbETLxSH1ggAQ==", + "dev": true, + "requires": { + "@parcel/fs": "2.5.0", + "@parcel/logger": "2.5.0", + "@parcel/utils": "2.5.0", + "lmdb": "2.2.4" + } + }, + "@parcel/codeframe": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/codeframe/-/codeframe-2.5.0.tgz", + "integrity": "sha512-qafqL8Vu2kr932cCWESoDEEoAeKVi7/xdzTBuhzEJng1AfmRT0rCbt/P4ao3RjiDyozPSjXsHOqM6GDZcto4eQ==", + "dev": true, + "requires": { + "chalk": "^4.1.0" + } + }, + "@parcel/compressor-raw": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/compressor-raw/-/compressor-raw-2.5.0.tgz", + "integrity": "sha512-I5Zs+2f1ue4sTPdfT8BNsLfTZl48sMWLk2Io3elUJjH/SS9kO7ut5ChkuJtt77ZS35m0OF+ZCt3ICTJdnDG8eA==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0" + } + }, + "@parcel/config-default": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/config-default/-/config-default-2.5.0.tgz", + "integrity": "sha512-r30V61958SONvP9I8KV8s44ZOFq0H219VyFjPysraSabHjZ+KMaCTQOuqaDtUMa272sHUQkBcZxKYj5jYPJlZg==", + "dev": true, + "requires": { + "@parcel/bundler-default": "2.5.0", + "@parcel/compressor-raw": "2.5.0", + "@parcel/namer-default": "2.5.0", + "@parcel/optimizer-css": "2.5.0", + "@parcel/optimizer-htmlnano": "2.5.0", + "@parcel/optimizer-image": "2.5.0", + "@parcel/optimizer-svgo": "2.5.0", + "@parcel/optimizer-terser": "2.5.0", + "@parcel/packager-css": "2.5.0", + "@parcel/packager-html": "2.5.0", + "@parcel/packager-js": "2.5.0", + "@parcel/packager-raw": "2.5.0", + "@parcel/packager-svg": "2.5.0", + "@parcel/reporter-dev-server": "2.5.0", + "@parcel/resolver-default": "2.5.0", + "@parcel/runtime-browser-hmr": "2.5.0", + "@parcel/runtime-js": "2.5.0", + "@parcel/runtime-react-refresh": "2.5.0", + "@parcel/runtime-service-worker": "2.5.0", + "@parcel/transformer-babel": "2.5.0", + "@parcel/transformer-css": "2.5.0", + "@parcel/transformer-html": "2.5.0", + "@parcel/transformer-image": "2.5.0", + "@parcel/transformer-js": "2.5.0", + "@parcel/transformer-json": "2.5.0", + "@parcel/transformer-postcss": "2.5.0", + "@parcel/transformer-posthtml": "2.5.0", + "@parcel/transformer-raw": "2.5.0", + "@parcel/transformer-react-refresh-wrap": "2.5.0", + "@parcel/transformer-svg": "2.5.0" + } + }, + "@parcel/core": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.5.0.tgz", + "integrity": "sha512-dygDmPsfAYJKTnUftcbEzjCik7AAaPbFvJW8ETYz8diyjkAG9y6hvCAZIrJE5pNOjFzg32en4v4UWv8Sqlzl9g==", + "dev": true, + "requires": { + "@mischnic/json-sourcemap": "^0.1.0", + "@parcel/cache": "2.5.0", + "@parcel/diagnostic": "2.5.0", + "@parcel/events": "2.5.0", + "@parcel/fs": "2.5.0", + "@parcel/graph": "2.5.0", + "@parcel/hash": "2.5.0", + "@parcel/logger": "2.5.0", + "@parcel/package-manager": "2.5.0", + "@parcel/plugin": "2.5.0", + "@parcel/source-map": "^2.0.0", + "@parcel/types": "2.5.0", + "@parcel/utils": "2.5.0", + "@parcel/workers": "2.5.0", + "abortcontroller-polyfill": "^1.1.9", + "base-x": "^3.0.8", + "browserslist": "^4.6.6", + "clone": "^2.1.1", + "dotenv": "^7.0.0", + "dotenv-expand": "^5.1.0", + "json5": "^2.2.0", + "msgpackr": "^1.5.4", + "nullthrows": "^1.1.1", + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/css": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@parcel/css/-/css-1.8.3.tgz", + "integrity": "sha512-6qUN4iicr8f9Q6UUZttwwHMzrb65BRX46PHWq0icA4KEmvmfR9cSYlp/hJH8F4stg3Wncx12Bnw+EuPf5OAEPQ==", + "dev": true, + "requires": { + "@parcel/css-darwin-arm64": "1.8.3", + "@parcel/css-darwin-x64": "1.8.3", + "@parcel/css-linux-arm-gnueabihf": "1.8.3", + "@parcel/css-linux-arm64-gnu": "1.8.3", + "@parcel/css-linux-arm64-musl": "1.8.3", + "@parcel/css-linux-x64-gnu": "1.8.3", + "@parcel/css-linux-x64-musl": "1.8.3", + "@parcel/css-win32-x64-msvc": "1.8.3", + "detect-libc": "^1.0.3" + } + }, + "@parcel/css-darwin-arm64": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@parcel/css-darwin-arm64/-/css-darwin-arm64-1.8.3.tgz", + "integrity": "sha512-qh/Ig6GfVjGoiGSWjIYDo6Ghwmyy/9BXvYS1l3R+Bp50F300cq84Czfl6wxaL+aFmghdHzhjJuGfWmZlcYliPA==", + "dev": true, + "optional": true + }, + "@parcel/css-darwin-x64": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@parcel/css-darwin-x64/-/css-darwin-x64-1.8.3.tgz", + "integrity": "sha512-gTUIoRgwyYr4UuH7sSn3gOuMlIshJBOJLmjL+E/mR5lqdYabguiKiRORvkrnb/gHBmOUF9re0RcTaFmJ2VOAlg==", + "dev": true, + "optional": true + }, + "@parcel/css-linux-arm-gnueabihf": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@parcel/css-linux-arm-gnueabihf/-/css-linux-arm-gnueabihf-1.8.3.tgz", + "integrity": "sha512-4P1r0BvL9dPz70py2xLg/jEvWJmKNyokPgafyrDP+GbpPTfH5NYJJkVRGo/TkKsp3Rv8SJhV9fdlpFKC6BI92A==", + "dev": true, + "optional": true + }, + "@parcel/css-linux-arm64-gnu": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@parcel/css-linux-arm64-gnu/-/css-linux-arm64-gnu-1.8.3.tgz", + "integrity": "sha512-1fUy94eaqdzum+C7bsYVF2AgxjLGR/qppArn/4HTQyydHR5QeV+Uoyqo5vdnO5Vclj8eQwlgR9OyAOlmzXxFDA==", + "dev": true, + "optional": true + }, + "@parcel/css-linux-arm64-musl": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@parcel/css-linux-arm64-musl/-/css-linux-arm64-musl-1.8.3.tgz", + "integrity": "sha512-ct1QRK5gAP8sO22NZ7RULZQB7dbHpou+WMa4z0LJb+Fho13a1JNw931vNHbeI5cRr1fCTDq76pz/+Valgetzcw==", + "dev": true, + "optional": true + }, + "@parcel/css-linux-x64-gnu": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@parcel/css-linux-x64-gnu/-/css-linux-x64-gnu-1.8.3.tgz", + "integrity": "sha512-pg/mahoogzjbaZcW76rrTZ64tEu8Wok4Gm0sW/dXHJEJD2QVJ6GxLP4UVNBuhaV0GrNFHggp9pcdhTtLGkKl/g==", + "dev": true, + "optional": true + }, + "@parcel/css-linux-x64-musl": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@parcel/css-linux-x64-musl/-/css-linux-x64-musl-1.8.3.tgz", + "integrity": "sha512-4Iwawy28HQ2yAgbuyR60bgO+8oE+OiWpE02eNjbgqnDpTsfmXFMt4l5OYgZwJJ7DlaZqm+/yO8RPMd+EzwtNzg==", + "dev": true, + "optional": true + }, + "@parcel/css-win32-x64-msvc": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@parcel/css-win32-x64-msvc/-/css-win32-x64-msvc-1.8.3.tgz", + "integrity": "sha512-vnHUdzIVjqONa5ALFzMJ3ZHt6NiaYTHW/lqzP+AR4l+bq+UTXD2Q75/RgirY5NYwdfy1VPy/jI82jAtLOCymkw==", + "dev": true, + "optional": true + }, + "@parcel/diagnostic": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.5.0.tgz", + "integrity": "sha512-KiMGGRpEV7wl5gjcxBKcgX84a+cG+IEn94gwy5LK3lENR09nuKShqqgKGAmj/17CobJgw1QNP94/H4Md+oxIWg==", + "dev": true, + "requires": { + "@mischnic/json-sourcemap": "^0.1.0", + "nullthrows": "^1.1.1" + } + }, + "@parcel/events": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/events/-/events-2.5.0.tgz", + "integrity": "sha512-Gc2LPwL1H34Ony5MENbKZg7wvCscZ4x9y7Fu92sfbdWpLo3K13hVtsX3TMIIgYt3B7R7OmO8yR880U2T+JfVkQ==", + "dev": true + }, + "@parcel/fs": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/fs/-/fs-2.5.0.tgz", + "integrity": "sha512-YYr14BWtx/bJ+hu6PPQQ6G/3omOTWgVqEw+UFI3iQH3P6+e0LRXW/Ja1yAcJeepGcTwIP0opnXZBQOm8PBQ2SA==", + "dev": true, + "requires": { + "@parcel/fs-search": "2.5.0", + "@parcel/types": "2.5.0", + "@parcel/utils": "2.5.0", + "@parcel/watcher": "^2.0.0", + "@parcel/workers": "2.5.0" + } + }, + "@parcel/fs-search": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/fs-search/-/fs-search-2.5.0.tgz", + "integrity": "sha512-uBONkz9ZCNSOqbPGWJY3MNl+pqBTfvzHH9+4UhzHEHPArvK2oD0+syYPVE60+zGrxybXTESYMCJp4bHvH6Z2hA==", + "dev": true, + "requires": { + "detect-libc": "^1.0.3" + } + }, + "@parcel/graph": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/graph/-/graph-2.5.0.tgz", + "integrity": "sha512-qa2VtG08dJyTaWrxYAkMIlkoDRSPoiqLDNxxHKplkcxAjXBUw0/AkWaz82VO5r1G6jfOj+nM30ajH9uygZYwbw==", + "dev": true, + "requires": { + "@parcel/utils": "2.5.0", + "nullthrows": "^1.1.1" + } + }, + "@parcel/hash": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/hash/-/hash-2.5.0.tgz", + "integrity": "sha512-47JL0XpB7UvIW6Ijf8vv+yVMt9dLvB/lRlBHFmAkmovisueVMVbYD7smxVZnCSehD8UH8BcymKbMzyL5dimgoQ==", + "dev": true, + "requires": { + "detect-libc": "^1.0.3", + "xxhash-wasm": "^0.4.2" + } + }, + "@parcel/logger": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/logger/-/logger-2.5.0.tgz", + "integrity": "sha512-pT1L3ceH6trL1N3I3r2HawPjz/PCubOo/Kazu7IeXsMsKVjj1a6AeieZHzkNZIbhiGPtm/cHbBNLz2zTWDLeOA==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/events": "2.5.0" + } + }, + "@parcel/markdown-ansi": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/markdown-ansi/-/markdown-ansi-2.5.0.tgz", + "integrity": "sha512-ixkNF3KWIqxMlfxTe9Gb2cp/uNmklQev8VEUxujMVxmUfGyQs4859zdJIQlIinabWYhArhsXATkVf3MzCUN6TQ==", + "dev": true, + "requires": { + "chalk": "^4.1.0" + } + }, + "@parcel/namer-default": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/namer-default/-/namer-default-2.5.0.tgz", + "integrity": "sha512-ahGQqHJzsWE5Qux8zXMAU+lyNBOl+ZpcOFzRGE2DWOsmAlytsHl7DBVCQvzUyNBFg1/HmIj+7D4efv2kjR7rTg==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/plugin": "2.5.0", + "nullthrows": "^1.1.1" + } + }, + "@parcel/node-resolver-core": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/node-resolver-core/-/node-resolver-core-2.5.0.tgz", + "integrity": "sha512-XQvpguiIwQcu75cscLDFOVhjsjuPzXbuMaaZ7XxxUEl0PscIgu/GfKYxTfTruN3cRl+CaQH6qBAMfjLaFng6lQ==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/utils": "2.5.0", + "nullthrows": "^1.1.1" + } + }, + "@parcel/optimizer-css": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-css/-/optimizer-css-2.5.0.tgz", + "integrity": "sha512-J00bLF+4SsnKc+YbYrNuBr44/zz3cg++CoXteXhH27PxP1rScGQx36Rui8WORgil5mlX2VYN79DuqJC7V3Ynbg==", + "dev": true, + "requires": { + "@parcel/css": "^1.8.1", + "@parcel/diagnostic": "2.5.0", + "@parcel/plugin": "2.5.0", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.5.0", + "browserslist": "^4.6.6", + "nullthrows": "^1.1.1" + } + }, + "@parcel/optimizer-htmlnano": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.5.0.tgz", + "integrity": "sha512-Fr0zPqgxoNaOVdROAjNGDWCts3+wByNQ82Mxhu8Tzc25A2cPjcr1H2sa/TE3hf79c92DxdKf2FaC1ZOgR5YPdg==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "htmlnano": "^2.0.0", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5", + "svgo": "^2.4.0" + } + }, + "@parcel/optimizer-image": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-image/-/optimizer-image-2.5.0.tgz", + "integrity": "sha512-nbo2pdnAt21WLGjzTpsE8ZEL0xNoP7c3wBj9y70Pysmasg1SrRVCbfE8jTy+lHBQwq2yjC6lV/Usv+9lfA7S/w==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/plugin": "2.5.0", + "@parcel/utils": "2.5.0", + "@parcel/workers": "2.5.0", + "detect-libc": "^1.0.3" + } + }, + "@parcel/optimizer-svgo": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-svgo/-/optimizer-svgo-2.5.0.tgz", + "integrity": "sha512-pgZqwU0RLc/wr4WcQY/W1GJmddnEANDEpz1mdppUOqBz1EfTQ7zh5NgUA3hV1i05Hbecp3mHSvXJPV0mhNOl5Q==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/plugin": "2.5.0", + "@parcel/utils": "2.5.0", + "svgo": "^2.4.0" + } + }, + "@parcel/optimizer-terser": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-terser/-/optimizer-terser-2.5.0.tgz", + "integrity": "sha512-PZ3UHBGfjE49/Jloopsd38Hxg4qzsrdepWP53mCuVP7Aw605Y4QtYuB1ho3VV0oXfKQVq+uI7lVIBsuW4K6vqA==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/plugin": "2.5.0", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.5.0", + "nullthrows": "^1.1.1", + "terser": "^5.2.0" + } + }, + "@parcel/package-manager": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/package-manager/-/package-manager-2.5.0.tgz", + "integrity": "sha512-zTuF55/lITUjw9dUU/X0HiF++589xbPXw/zUiG9T6s8BQThLvrxAhYP89S719pw7cTqDimGkTxnIuK+a0djEkg==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/fs": "2.5.0", + "@parcel/logger": "2.5.0", + "@parcel/types": "2.5.0", + "@parcel/utils": "2.5.0", + "@parcel/workers": "2.5.0", + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/packager-css": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/packager-css/-/packager-css-2.5.0.tgz", + "integrity": "sha512-c0mGBFdVSPhAxaX3+zN8KEIqOOUhkIPKbZex1pnGYfy03Qe2/Mb4nyt5DAGlw9gjka1UCHIN/wszLmKC8YyUeg==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.5.0", + "nullthrows": "^1.1.1" + } + }, + "@parcel/packager-html": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/packager-html/-/packager-html-2.5.0.tgz", + "integrity": "sha512-ZFGUPRMWKrm8kQHdkEJ5S22C05qpSymx+o+57EfuNjCrGyj3M59WyGYYXYJ175bFYZ/jp5yy+VxMh6fZefe+Pw==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "@parcel/types": "2.5.0", + "@parcel/utils": "2.5.0", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5" + } + }, + "@parcel/packager-js": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/packager-js/-/packager-js-2.5.0.tgz", + "integrity": "sha512-aJAKOTgXdxO3V9O7+2DCVOtne128WwXmUAOVThnMRo7f3zMVSAR7Mxc9pEsuTzPfj8UBXgFBRfdJUSCgsMxiSw==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/hash": "2.5.0", + "@parcel/plugin": "2.5.0", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.5.0", + "globals": "^13.2.0", + "nullthrows": "^1.1.1" + } + }, + "@parcel/packager-raw": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/packager-raw/-/packager-raw-2.5.0.tgz", + "integrity": "sha512-aHV0oogeiqxhxS1lsttw15EvG3DDWK3FV7+F+7hoaAy+xg89K56NTp6j43Jtw9iyU1/HnZRGBE2hF3C7N73oKw==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0" + } + }, + "@parcel/packager-svg": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/packager-svg/-/packager-svg-2.5.0.tgz", + "integrity": "sha512-XSMFn30K/kpjcPpQqt88GmPJsNUSVL3RNeigXkIAcLpfO6Tb2eV4iOt4yVCagaDrRJ19alXut0TxjMm5bm41/g==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "@parcel/types": "2.5.0", + "@parcel/utils": "2.5.0", + "posthtml": "^0.16.4" + } + }, + "@parcel/packager-ts": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/packager-ts/-/packager-ts-2.5.0.tgz", + "integrity": "sha512-BrH2Gum5EKlWJEJ92dFrH7QTSc7A7LxyElv6c2LPc5sI3z52JDdjQsUMEHqm5Fz25D79Ca/xzVvTWQaYA7XyRA==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0" + } + }, + "@parcel/plugin": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/plugin/-/plugin-2.5.0.tgz", + "integrity": "sha512-obtb6/Gql6YFQ86bdv75A2Noabx8679reFZeyfKKf0L7Lppx4DFQetXwM9XVy7Gx6hJ1Ekm3UMuuIyVJk33YHQ==", + "dev": true, + "requires": { + "@parcel/types": "2.5.0" + } + }, + "@parcel/reporter-cli": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/reporter-cli/-/reporter-cli-2.5.0.tgz", + "integrity": "sha512-miJt2YbRJBmYSVeoUWUj8YL85Pwj1CmGQB0/btqhulGLH/Fvkbv6T4sJ4gl4l5xIt9mJQsZ70pOWwa8BId3rWw==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "@parcel/types": "2.5.0", + "@parcel/utils": "2.5.0", + "chalk": "^4.1.0", + "term-size": "^2.2.1" + } + }, + "@parcel/reporter-dev-server": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/reporter-dev-server/-/reporter-dev-server-2.5.0.tgz", + "integrity": "sha512-wvxAiW42AxJ3B8jtvowJcP4/cTV8zY48SfKg61YKYu1yUO+TtyJIjHQzDW2XuT34cIGFY97Gr0i+AVu44RyUuQ==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "@parcel/utils": "2.5.0" + } + }, + "@parcel/resolver-default": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/resolver-default/-/resolver-default-2.5.0.tgz", + "integrity": "sha512-39PkZpVr/+iYS11u+lA84vIsKm/yisltTVmUjlYsDnExiuV1c8OSbSdYZ3JMx+7CYPE0bWbosX2AGilIwIMWpQ==", + "dev": true, + "requires": { + "@parcel/node-resolver-core": "2.5.0", + "@parcel/plugin": "2.5.0" + } + }, + "@parcel/runtime-browser-hmr": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.5.0.tgz", + "integrity": "sha512-oPAo8Zf06gXCpt41nyvK7kv2HH1RrHAGgOqttyjStwAFlm5MZKs7BgtJzO58LfJN8g3sMY0cNdG17fB/4f8q6Q==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "@parcel/utils": "2.5.0" + } + }, + "@parcel/runtime-js": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/runtime-js/-/runtime-js-2.5.0.tgz", + "integrity": "sha512-gPC2PbNAiooULP71wF5twe4raekuXsR1Hw/ahITDoqsZdXHzG3CkoCjYL3CkmBGiKQgMMocCyN1E2oBzAH8Kyw==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "@parcel/utils": "2.5.0", + "nullthrows": "^1.1.1" + } + }, + "@parcel/runtime-react-refresh": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.5.0.tgz", + "integrity": "sha512-+8RuDKFdFYIQTrXG4MRhG9XqkkYEHn0zxKyOJ/IkDDfSEhY0na+EyhrneFUwIvDX63gLPkxceXAg0gwBqXPK/Q==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "@parcel/utils": "2.5.0", + "react-refresh": "^0.9.0" + } + }, + "@parcel/runtime-service-worker": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/runtime-service-worker/-/runtime-service-worker-2.5.0.tgz", + "integrity": "sha512-STuDlU0fPXeWpAmbayY7o04F0eHy6FTOFeT5KQ0PTxtdEa3Ey8QInP/NVE52Yv0aVQtesWukGrNEFCERlkbFRw==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "@parcel/utils": "2.5.0", + "nullthrows": "^1.1.1" + } + }, + "@parcel/source-map": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@parcel/source-map/-/source-map-2.0.5.tgz", + "integrity": "sha512-DRVlCFKLpqBSIbMxUoVlHgfiv12HTW/U7nnhzw52YgzDVXUX9OA41dXS1PU0pJ1si+D1k8msATUC+AoldN43mg==", + "dev": true, + "requires": { + "detect-libc": "^1.0.3" + } + }, + "@parcel/transformer-babel": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/transformer-babel/-/transformer-babel-2.5.0.tgz", + "integrity": "sha512-EFb866C9jCoBHIcebWF7goAcYj1wkObx0GDxshlazFtvym1RM27xSWWjRYyqb5+HNOxB3voaNvQOVjcD+DXjCA==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/plugin": "2.5.0", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.5.0", + "browserslist": "^4.6.6", + "json5": "^2.2.0", + "nullthrows": "^1.1.1", + "semver": "^5.7.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/transformer-css": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/transformer-css/-/transformer-css-2.5.0.tgz", + "integrity": "sha512-p8FOvKWWSbS6H8PbD9a0KZqyaKNpSD2BUTzSRYnNj3TBUv7/ZXaP6Om295XTQ/MPht1o7XTQzvfpF/7yEhr02Q==", + "dev": true, + "requires": { + "@parcel/css": "^1.8.1", + "@parcel/diagnostic": "2.5.0", + "@parcel/plugin": "2.5.0", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.5.0", + "browserslist": "^4.6.6", + "nullthrows": "^1.1.1" + } + }, + "@parcel/transformer-html": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/transformer-html/-/transformer-html-2.5.0.tgz", + "integrity": "sha512-iEjNyAF0wQmY3DMw7FS+UzoOMng76UsSngh+WWA1E5lv5XyqrP8Mk2QLTJp1nWetUhSLhZr58LGmPYBTB4l9ZQ==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/hash": "2.5.0", + "@parcel/plugin": "2.5.0", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5", + "posthtml-parser": "^0.10.1", + "posthtml-render": "^3.0.0", + "semver": "^5.7.1" + }, + "dependencies": { + "posthtml-parser": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.10.2.tgz", + "integrity": "sha512-PId6zZ/2lyJi9LiKfe+i2xv57oEjJgWbsHGGANwos5AvdQp98i6AtamAl8gzSVFGfQ43Glb5D614cvZf012VKg==", + "dev": true, + "requires": { + "htmlparser2": "^7.1.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/transformer-image": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/transformer-image/-/transformer-image-2.5.0.tgz", + "integrity": "sha512-vVEXTHZl8m/9yopgK0dWHLOQX2zOnghq6pZnWdWVG6fsvXZln7kP1YN5iwWDoADQYkiKzP+Ymn6UwP9pZpHFzA==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "@parcel/workers": "2.5.0", + "nullthrows": "^1.1.1" + } + }, + "@parcel/transformer-inline-string": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/transformer-inline-string/-/transformer-inline-string-2.5.0.tgz", + "integrity": "sha512-nBvzbAEIQ8qTSNEbFrxm+9XyOgGTaLOm1+dmBln75+OML4yn9TRUa8w2VxPKWyImPYAwRRZ2CZXAnGKfhwr+LA==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0" + } + }, + "@parcel/transformer-js": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/transformer-js/-/transformer-js-2.5.0.tgz", + "integrity": "sha512-Cp8Ic+Au3OcskCRZszmo47z3bqcZ7rfPv2xZYXpXY2TzEc3IV0bKje57bZektoY8LW9LkYM9iBO/WhkVoT6LIg==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/plugin": "2.5.0", + "@parcel/source-map": "^2.0.0", + "@parcel/utils": "2.5.0", + "@parcel/workers": "2.5.0", + "@swc/helpers": "^0.3.6", + "browserslist": "^4.6.6", + "detect-libc": "^1.0.3", + "nullthrows": "^1.1.1", + "regenerator-runtime": "^0.13.7", + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/transformer-json": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/transformer-json/-/transformer-json-2.5.0.tgz", + "integrity": "sha512-661sByA7TkR6Lmxt+hqV4h2SAt+7lgc58DzmUYArpEl1fQnMuQuaB0kQeHzi6fDD2+2G6o7EC+DuwBZKa479TA==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "json5": "^2.2.0" + } + }, + "@parcel/transformer-postcss": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/transformer-postcss/-/transformer-postcss-2.5.0.tgz", + "integrity": "sha512-IPNlWElekdQHMTBqhdwJNBCQomuYyo7xgNBdnTrt9VJ+R5ihy6n7ZJSWIAJXAH9VZxETTtunfrzRtgkmtjTeZQ==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/hash": "2.5.0", + "@parcel/plugin": "2.5.0", + "@parcel/utils": "2.5.0", + "clone": "^2.1.1", + "nullthrows": "^1.1.1", + "postcss-value-parser": "^4.2.0", + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/transformer-posthtml": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/transformer-posthtml/-/transformer-posthtml-2.5.0.tgz", + "integrity": "sha512-AZxg1XD8OXOS4bEGEmBBR+X9T9qoFdVsbVUg498zzejYSka1ZQHF7TgLI/+pUnE+ZVYNIp7/G0xXqsRVKMKmdQ==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "@parcel/utils": "2.5.0", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5", + "posthtml-parser": "^0.10.1", + "posthtml-render": "^3.0.0", + "semver": "^5.7.1" + }, + "dependencies": { + "posthtml-parser": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.10.2.tgz", + "integrity": "sha512-PId6zZ/2lyJi9LiKfe+i2xv57oEjJgWbsHGGANwos5AvdQp98i6AtamAl8gzSVFGfQ43Glb5D614cvZf012VKg==", + "dev": true, + "requires": { + "htmlparser2": "^7.1.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/transformer-raw": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/transformer-raw/-/transformer-raw-2.5.0.tgz", + "integrity": "sha512-I3zjE1u9+Wj90Qqs1V2FTm6iC6SAyOVUthwVZkZey+qbQG/ok682Ez2XjLu7MyQCo9BJNwF/nfOa1hHr3MaJEQ==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0" + } + }, + "@parcel/transformer-react-refresh-wrap": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.5.0.tgz", + "integrity": "sha512-VPqVBxhTN4OQwcjsdyxrv+smjAm4s6dbSWAplgPwdOITMv+a0tjhhJU37WnRC+xxTrbEqRcOt96JvGOkPb8i7g==", + "dev": true, + "requires": { + "@parcel/plugin": "2.5.0", + "@parcel/utils": "2.5.0", + "react-refresh": "^0.9.0" + } + }, + "@parcel/transformer-svg": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/transformer-svg/-/transformer-svg-2.5.0.tgz", + "integrity": "sha512-zCGJcrCpICFe0Q/dgjQZfW7sYFkbJEC7NGT4zEJnMo8Cm/kq8Qh6+2ApX6c+vv5Q0WZn5Ic+N0OvxIMkvgdC/w==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/hash": "2.5.0", + "@parcel/plugin": "2.5.0", + "nullthrows": "^1.1.1", + "posthtml": "^0.16.5", + "posthtml-parser": "^0.10.1", + "posthtml-render": "^3.0.0", + "semver": "^5.7.1" + }, + "dependencies": { + "posthtml-parser": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.10.2.tgz", + "integrity": "sha512-PId6zZ/2lyJi9LiKfe+i2xv57oEjJgWbsHGGANwos5AvdQp98i6AtamAl8gzSVFGfQ43Glb5D614cvZf012VKg==", + "dev": true, + "requires": { + "htmlparser2": "^7.1.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@parcel/transformer-typescript-types": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.5.0.tgz", + "integrity": "sha512-O+v+vEvgQDj5U1O8C12nYeU9kYOdYaznobWgE21WYSPEV2JD9ppaJVTDoNTI5Lx58gmjc1hndY169o6N6RaV6A==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/plugin": "2.5.0", + "@parcel/source-map": "^2.0.0", + "@parcel/ts-utils": "2.5.0", + "nullthrows": "^1.1.1" + } + }, + "@parcel/ts-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/ts-utils/-/ts-utils-2.5.0.tgz", + "integrity": "sha512-YITx84Olg27PDxvJlXzzPVgqTtW3tEqQFh+wE2g7+Mwk4Q8vd/jL+mjDBF/5LEnGCk2WvjkcuBK/QOv7Y+YDsg==", + "dev": true, + "requires": { + "nullthrows": "^1.1.1" + } + }, + "@parcel/types": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/types/-/types-2.5.0.tgz", + "integrity": "sha512-bA0fhG6aXSGYEVo5Dt96x6lseUQHeVZVzgmiRdZsvb614Gvx22ItfaKhPmAVbM9vzbObZDHl9l9G2Ovw8Xve4g==", + "dev": true, + "requires": { + "@parcel/cache": "2.5.0", + "@parcel/diagnostic": "2.5.0", + "@parcel/fs": "2.5.0", + "@parcel/package-manager": "2.5.0", + "@parcel/source-map": "^2.0.0", + "@parcel/workers": "2.5.0", + "utility-types": "^3.10.0" + } + }, + "@parcel/utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/utils/-/utils-2.5.0.tgz", + "integrity": "sha512-kaLGXtQuOOH55KZqXdYDvczhh3mk2eeTVqrrXuuihGjbLKYFlUW2tFDm+5r2s9nCPwTQxOO43ZEOCKSnia+e4w==", + "dev": true, + "requires": { + "@parcel/codeframe": "2.5.0", + "@parcel/diagnostic": "2.5.0", + "@parcel/hash": "2.5.0", + "@parcel/logger": "2.5.0", + "@parcel/markdown-ansi": "2.5.0", + "@parcel/source-map": "^2.0.0", + "chalk": "^4.1.0" + } + }, + "@parcel/watcher": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.0.5.tgz", + "integrity": "sha512-x0hUbjv891omnkcHD7ZOhiyyUqUUR6MNjq89JhEI3BxppeKWAm6NPQsqqRrAkCJBogdT/o/My21sXtTI9rJIsw==", + "dev": true, + "requires": { + "node-addon-api": "^3.2.1", + "node-gyp-build": "^4.3.0" + } + }, + "@parcel/workers": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/workers/-/workers-2.5.0.tgz", + "integrity": "sha512-/Ow5OKJWs+9OzV3Jy4J++VnbNx0j3ls/M1CGVBLiBWyCada9DMtquYoBQ4Sk6Uam50BKkIFYetGOeXPNQyyMjg==", + "dev": true, + "requires": { + "@parcel/diagnostic": "2.5.0", + "@parcel/logger": "2.5.0", + "@parcel/types": "2.5.0", + "@parcel/utils": "2.5.0", + "chrome-trace-event": "^1.0.2", + "nullthrows": "^1.1.1" + } + }, "@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", "dev": true }, + "@swc/helpers": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.3.13.tgz", + "integrity": "sha512-A1wswJhnqaLRn8uYVQ8YiNTtY5i/JIPmV08EXXjjTresIkUVUEUaFv/wXVhGXfRNYMvHPkuoMR1Nb6NgpxGjNg==", + "dev": true, + "requires": { + "tslib": "^2.4.0" + } + }, "@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", @@ -761,12 +1058,66 @@ "defer-to-connect": "^1.0.1" } }, + "@trysound/sax": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", + "dev": true + }, "@types/node": { "version": "14.18.12", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.12.tgz", "integrity": "sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==", "dev": true }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "@types/sortablejs": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@types/sortablejs/-/sortablejs-1.13.0.tgz", + "integrity": "sha512-C3064MH72iEfeGCYEGCt7FCxXoAXaMPG0QPnstcxvPmbl54erpISu06d++FY37Smja64iWy5L8wOyHHBghWbJQ==", + "dev": true + }, + "abortcontroller-polyfill": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz", + "integrity": "sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q==", + "dev": true + }, + "acorn": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, "boolean": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", @@ -774,6 +1125,19 @@ "dev": true, "optional": true }, + "browserslist": { + "version": "4.20.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.3.tgz", + "integrity": "sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001332", + "electron-to-chromium": "^1.4.118", + "escalade": "^3.1.1", + "node-releases": "^2.0.3", + "picocolors": "^1.0.0" + } + }, "buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", @@ -818,6 +1182,40 @@ } } }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001342", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001342.tgz", + "integrity": "sha512-bn6sOCu7L7jcbBbyNhLg0qzXdJ/PMbybZTH/BA6Roet9wxYRm6Tr9D0s0uhLkOZ6MSG+QU6txUgdpr3MXIVqjA==", + "dev": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, "clone-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", @@ -827,6 +1225,27 @@ "mimic-response": "^1.0.0" } }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true + }, "concat-stream": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", @@ -856,6 +1275,57 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, + "cosmiconfig": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", + "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + } + }, + "css-select": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + } + }, + "css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dev": true, + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + } + }, + "css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true + }, + "csso": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "dev": true, + "requires": { + "css-tree": "^1.1.2" + } + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -890,6 +1360,12 @@ "object-keys": "^1.0.12" } }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "dev": true + }, "detect-node": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", @@ -897,6 +1373,63 @@ "dev": true, "optional": true }, + "dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "dependencies": { + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true + } + } + }, + "domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true + }, + "domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "dev": true, + "requires": { + "domelementtype": "^2.2.0" + } + }, + "domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dev": true, + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + } + }, + "dotenv": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz", + "integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==", + "dev": true + }, + "dotenv-expand": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", + "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", + "dev": true + }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", @@ -914,6 +1447,12 @@ "extract-zip": "^1.0.3" } }, + "electron-to-chromium": { + "version": "1.4.137", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.137.tgz", + "integrity": "sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==", + "dev": true + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -930,12 +1469,27 @@ "once": "^1.4.0" } }, + "entities": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", + "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", + "dev": true + }, "env-paths": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", "dev": true }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, "es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", @@ -943,6 +1497,12 @@ "dev": true, "optional": true }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -999,6 +1559,12 @@ "universalify": "^0.1.0" } }, + "get-port": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-4.2.0.tgz", + "integrity": "sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==", + "dev": true + }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -1048,6 +1614,23 @@ "tunnel": "^0.0.6" } }, + "globals": { + "version": "13.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", + "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + }, + "dependencies": { + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, "globalthis": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.2.tgz", @@ -1083,12 +1666,51 @@ "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "dev": true }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "htmlnano": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/htmlnano/-/htmlnano-2.0.2.tgz", + "integrity": "sha512-+ZrQFS4Ub+zd+/fWwfvoYCEGNEa0/zrpys6CyXxvZDwtL7Pl+pOtRkiujyvBQ7Lmfp7/iEPxtOFgxWA16Gkj3w==", + "dev": true, + "requires": { + "cosmiconfig": "^7.0.1", + "posthtml": "^0.16.5", + "timsort": "^0.3.0" + } + }, + "htmlparser2": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", + "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.2", + "domutils": "^2.8.0", + "entities": "^3.0.1" + } + }, "http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", "dev": true }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -1102,18 +1724,42 @@ "dev": true, "optional": true }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-json": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz", + "integrity": "sha1-a+Fm0USCihMdaGiRuYPfYsOUkf8=", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, "json-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", "dev": true }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -1121,6 +1767,12 @@ "dev": true, "optional": true }, + "json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true + }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -1139,6 +1791,25 @@ "json-buffer": "3.0.0" } }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "lmdb": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-2.2.4.tgz", + "integrity": "sha512-gto+BB2uEob8qRiTlOq+R3uX0YNHsX9mjxj9Sbdue/LIKqu6IlZjrsjKeGyOMquc/474GEqFyX2pdytpydp0rQ==", + "dev": true, + "requires": { + "msgpackr": "^1.5.4", + "nan": "^2.14.2", + "node-gyp-build": "^4.2.3", + "ordered-binary": "^1.2.4", + "weak-lru-cache": "^1.2.2" + } + }, "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -1146,6 +1817,12 @@ "dev": true, "optional": true }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "dev": true + }, "lowercase-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", @@ -1172,6 +1849,12 @@ "escape-string-regexp": "^4.0.0" } }, + "mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true + }, "mimic-response": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", @@ -1199,6 +1882,70 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "msgpackr": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.6.0.tgz", + "integrity": "sha512-CJs2OuaIuwpP2iLZx6vl/jfl7WqFNFrYpkp/BC1ctzCbYAACyT9lYMACstgvH4pTcBrCFk4uzOoOZj0gFP/0EA==", + "dev": true, + "requires": { + "msgpackr-extract": "^2.0.2" + } + }, + "msgpackr-extract": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-2.0.2.tgz", + "integrity": "sha512-coskCeJG2KDny23zWeu+6tNy7BLnAiOGgiwzlgdm4oeSsTpqEJJPguHIuKZcCdB7tzhZbXNYSg6jZAXkZErkJA==", + "dev": true, + "optional": true, + "requires": { + "@msgpackr-extract/msgpackr-extract-darwin-arm64": "2.0.2", + "@msgpackr-extract/msgpackr-extract-darwin-x64": "2.0.2", + "@msgpackr-extract/msgpackr-extract-linux-arm": "2.0.2", + "@msgpackr-extract/msgpackr-extract-linux-arm64": "2.0.2", + "@msgpackr-extract/msgpackr-extract-linux-x64": "2.0.2", + "@msgpackr-extract/msgpackr-extract-win32-x64": "2.0.2", + "node-gyp-build-optional-packages": "5.0.2" + }, + "dependencies": { + "node-gyp-build-optional-packages": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.2.tgz", + "integrity": "sha512-PiN4NWmlQPqvbEFcH/omQsswWQbe5Z9YK/zdB23irp5j2XibaA2IrGvpSWmVVG4qMZdmPdwPctSy4a86rOMn6g==", + "dev": true, + "optional": true + } + } + }, + "nan": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", + "dev": true + }, + "nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "dev": true + }, + "node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "dev": true + }, + "node-gyp-build": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.4.0.tgz", + "integrity": "sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ==", + "dev": true + }, + "node-releases": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.4.tgz", + "integrity": "sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==", + "dev": true + }, "normalize-url": { "version": "4.5.1", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", @@ -1216,6 +1963,21 @@ "pify": "^3.0.0" } }, + "nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "requires": { + "boolbase": "^1.0.0" + } + }, + "nullthrows": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz", + "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==", + "dev": true + }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -1232,18 +1994,79 @@ "wrappy": "1" } }, + "ordered-binary": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.2.5.tgz", + "integrity": "sha512-djRmZoEpOGvIRW7ufsCDHtvcUa18UC9TxnPbHhSVFZHsoyg0dtut1bWtBZ/fmxdPN62oWXrV6adM7NoWU+CneA==", + "dev": true + }, "p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", "dev": true }, + "parcel": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/parcel/-/parcel-2.5.0.tgz", + "integrity": "sha512-er0mj/BaMjWyzQ/jedLUi/LNAuQcFT8lCvoNqANF+jTaX9rohaBwxIvKVJVAZgyCnmyfbbldp496wPMW0R0+CA==", + "dev": true, + "requires": { + "@parcel/config-default": "2.5.0", + "@parcel/core": "2.5.0", + "@parcel/diagnostic": "2.5.0", + "@parcel/events": "2.5.0", + "@parcel/fs": "2.5.0", + "@parcel/logger": "2.5.0", + "@parcel/package-manager": "2.5.0", + "@parcel/reporter-cli": "2.5.0", + "@parcel/reporter-dev-server": "2.5.0", + "@parcel/utils": "2.5.0", + "chalk": "^4.1.0", + "commander": "^7.0.0", + "get-port": "^4.2.0", + "v8-compile-cache": "^2.0.0" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, "pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", "dev": true }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -1251,6 +2074,51 @@ "dev": true, "optional": true }, + "postcss": { + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", + "dev": true, + "requires": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, + "postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "posthtml": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/posthtml/-/posthtml-0.16.6.tgz", + "integrity": "sha512-JcEmHlyLK/o0uGAlj65vgg+7LIms0xKXe60lcDOTU7oVX/3LuEuLwrQpW3VJ7de5TaFKiW4kWkaIpJL42FEgxQ==", + "dev": true, + "requires": { + "posthtml-parser": "^0.11.0", + "posthtml-render": "^3.0.0" + } + }, + "posthtml-parser": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.11.0.tgz", + "integrity": "sha512-QecJtfLekJbWVo/dMAA+OSwY79wpRmbqS5TeXvXSX+f0c6pW4/SE6inzZ2qkU7oAMCPqIDkZDvd/bQsSFUnKyw==", + "dev": true, + "requires": { + "htmlparser2": "^7.1.1" + } + }, + "posthtml-render": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/posthtml-render/-/posthtml-render-3.0.0.tgz", + "integrity": "sha512-z+16RoxK3fUPgwaIgH9NGnK1HKY9XIDpydky5eQGgAFVXTCSezalv9U2jQuNV+Z9qV1fDWNzldcw4eK0SSbqKA==", + "dev": true, + "requires": { + "is-json": "^2.0.1" + } + }, "prepend-http": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", @@ -1286,6 +2154,18 @@ "once": "^1.3.1" } }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "react-refresh": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.9.0.tgz", + "integrity": "sha512-Gvzk7OZpiqKSkxsQvO/mbTN1poglhmAV7gR/DdIrRrSMXraRQQlfikRJOr3Nb9GTMPC5kof948Zy6jJZIFtDvQ==", + "dev": true + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -1301,6 +2181,18 @@ "util-deprecate": "~1.0.1" } }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, "responselike": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", @@ -1354,6 +2246,34 @@ "type-fest": "^0.13.1" } }, + "sortablejs": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.0.tgz", + "integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true + }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "sprintf-js": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", @@ -1361,6 +2281,12 @@ "dev": true, "optional": true }, + "stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -1379,12 +2305,92 @@ "debug": "^4.1.0" } }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "svgo": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", + "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", + "dev": true, + "requires": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.3", + "csso": "^4.2.0", + "picocolors": "^1.0.0", + "stable": "^0.1.8" + } + }, + "term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true + }, + "terser": { + "version": "5.13.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.13.1.tgz", + "integrity": "sha512-hn4WKOfwnwbYfe48NgrQjqNOH9jzLqRcIfbYytOXCOv46LBfWr9bDS17MQqOi+BWGD0sJK3Sj5NC/gJjiojaoA==", + "dev": true, + "requires": { + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map": "~0.8.0-beta.0", + "source-map-support": "~0.5.20" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "requires": { + "whatwg-url": "^7.0.0" + } + } + } + }, + "timsort": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", + "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", + "dev": true + }, "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", "dev": true }, + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + }, "tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -1405,6 +2411,12 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, + "typescript": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.2.tgz", + "integrity": "sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==", + "dev": true + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -1426,12 +2438,53 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "utility-types": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.10.0.tgz", + "integrity": "sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg==", + "dev": true + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "weak-lru-cache": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz", + "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==", + "dev": true + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "xxhash-wasm": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-0.4.2.tgz", + "integrity": "sha512-/eyHVRJQCirEkSZ1agRSCwriMhwlyUcFkXD5TPVSLP+IPzjsqMVzZwdoczLp1SoQU0R3dxz1RpIK+4YNQbCVOA==", + "dev": true + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -1439,6 +2492,12 @@ "dev": true, "optional": true }, + "yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true + }, "yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", diff --git a/package.json b/package.json index 72f33e8..d4732f7 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,23 @@ { "name": "electron-tabs", - "version": "0.17.0", + "version": "1.0.0", "description": "Simple tabs for Electron applications", - "main": "index.js", + "main": "dist/electron-tabs.js", + "types": "dist/electron-tabs.d.ts", + "source": "src/index.ts", + "targets": { + "main": { + "includeNodeModules": true + } + }, "repository": { "type": "git", "url": "https://github.com/brrd/electron-tabs" }, "scripts": { "demo": "electron ./demo", - "test": "echo \"Error: no test specified\" && exit 1" + "watch": "parcel watch", + "build": "parcel build" }, "keywords": [ "electron", @@ -20,6 +28,14 @@ "author": "brrd", "license": "MIT", "devDependencies": { - "electron": "^17.1.2" + "@parcel/packager-ts": "^2.5.0", + "@parcel/transformer-inline-string": "^2.5.0", + "@parcel/transformer-typescript-types": "^2.5.0", + "@types/sortablejs": "^1.13.0", + "electron": "^17.1.2", + "parcel": "^2.5.0", + "postcss": "^8.4.14", + "sortablejs": "^1.15.0", + "typescript": "^4.7.2" } } diff --git a/screenshot.jpg b/screenshot.jpg index f227982..76c777b 100644 Binary files a/screenshot.jpg and b/screenshot.jpg differ diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..8016925 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,566 @@ +import Sortable from "sortablejs"; +// @ts-ignore +import styles from "bundle-text:./style.css"; + +if (!document) { + throw Error("electron-tabs module must be called in renderer process"); +} + +interface TabGroupOptions { + closeButtonText: string, + defaultTab: TabOptions | ((tabGroup: TabGroup) => TabOptions), + newTabButton: boolean, + newTabButtonText: string, + sortable: boolean, + sortableOptions?: Sortable.Options + visibilityThreshold: number, +} + +interface TabOptions { + active?: boolean; + badge?: Badge; + closable?: boolean; + icon?: string; + iconURL?: string; + ready?: ((tab: Tab) => void); + src?: string; + title?: string; + visible?: boolean; + webviewAttributes?: { [key: string]: any }; +} + +interface Badge { + text: string, + classname: string +} + +const CLASSNAMES = { + ROOT: "etabs", + NAV: "nav", + TABS: "tabs", + TAB: "tab", + BUTTONS: "buttons", + VIEWS: "views", + VIEW: "view" +} + +function emit(emitter: TabGroup | Tab, type: string, args: any[]) { + if (type === "ready") { + emitter.isReady = true; + } + emitter.dispatchEvent(new CustomEvent(type, { detail: args })); +} + +function on(emitter: TabGroup | Tab, type: string, fn: (detail: string) => void, options?: { [key: string]: any }) { + if (type === "ready" && emitter.isReady === true) { + fn.apply(emitter, [emitter]); + } + emitter.addEventListener(type, ((e: CustomEvent) => fn.apply(emitter, e.detail)) as EventListener, options); +} + +class TabGroup extends HTMLElement { + buttonContainer: HTMLDivElement; + isReady: boolean; + newTabId: number; + options: TabGroupOptions; + shadow: ShadowRoot; + tabContainer: HTMLDivElement; + tabs: Array; + viewContainer: HTMLDivElement; + + constructor() { + super(); + + this.isReady = false; + + // Options + this.options = { + closeButtonText: this.getAttribute("close-button-text") || "×", + defaultTab: { title: "New Tab", active: true }, + newTabButton: !!this.getAttribute("new-tab-button") === true || false, + newTabButtonText: this.getAttribute("new-tab-button-text") || "+", + sortable: !!this.getAttribute("sortable") === true || false, + visibilityThreshold: Number(this.getAttribute("visibility-threshold")) || 0 + }; + + this.tabs = []; + this.newTabId = 0; + + this.createComponent(); + this.initVisibility(); + if (this.options.sortable) { + this.initSortable(); + } + + this.emit("ready", this); + } + + emit(type: string, ...args: any[]) { + return emit(this, type, args); + } + + on(type: string, fn: (...detail: any[]) => void) { + return on(this, type, fn); + } + + once(type: string, fn: (detail: string) => void) { + return on(this, type, fn, { once: true }); + } + + connectedCallback() { + // Support custom styles + const style = this.querySelector("style"); + if (style) { + this.shadow.appendChild(style); + } + } + + private createComponent() { + const shadow = this.attachShadow({mode: "open"}); + this.shadow = shadow; + + const wrapper = document.createElement("div"); + wrapper.setAttribute("class", CLASSNAMES.ROOT); + + const tabgroup = document.createElement("nav"); + tabgroup.setAttribute("class", CLASSNAMES.NAV); + wrapper.appendChild(tabgroup); + + const tabContainer = document.createElement("div"); + tabContainer.setAttribute("class", CLASSNAMES.TABS); + tabgroup.appendChild(tabContainer); + this.tabContainer = tabContainer; + + const buttonContainer = document.createElement("div"); + buttonContainer.setAttribute("class", CLASSNAMES.BUTTONS); + tabgroup.appendChild(buttonContainer); + this.buttonContainer = buttonContainer; + + if (this.options.newTabButton) { + const button = this.buttonContainer.appendChild(document.createElement("button")); + button.innerHTML = this.options.newTabButtonText; + button.addEventListener("click", this.addTab.bind(this, undefined), false); + } + + const viewContainer = document.createElement("div"); + viewContainer.setAttribute("class", CLASSNAMES.VIEWS); + wrapper.appendChild(viewContainer); + this.viewContainer = viewContainer; + + const style = document.createElement("style"); + style.textContent = styles; + + shadow.appendChild(style); + shadow.appendChild(wrapper); + } + + private initVisibility() { + function toggleTabsVisibility(tab: Tab, tabGroup: TabGroup) { + const visibilityThreshold = this.options.visibilityThreshold; + const el = tabGroup.tabContainer.parentElement; + if (this.tabs.length >= visibilityThreshold) { + el.classList.add("visible"); + } else { + el.classList.remove("visible"); + } + } + + this.on("tab-added", toggleTabsVisibility); + this.on("tab-removed", toggleTabsVisibility); + } + + initSortable() { + const createNewSortable = () => { + const options = Object.assign({ + direction: "horizontal", + animation: 150, + swapThreshold: 0.20 + }, this.options.sortableOptions); + new Sortable(this.tabContainer, options); + }; + + if (Sortable) { + createNewSortable(); + } else { + document.addEventListener("DOMContentLoaded", createNewSortable); + } + } + + setDefaultTab(tab: TabOptions) { + this.options.defaultTab = tab; + } + + addTab(args = this.options.defaultTab) { + if (typeof args === "function") { + args = args(this); + } + const id = this.newTabId; + this.newTabId++; + const tab = new Tab(this, id, args); + this.tabs.push(tab); + // Don't call tab.activate() before a tab is referenced in this.tabs + if (args.active === true) { + tab.activate(); + } + this.emit("tab-added", tab, this); + return tab; + } + + getTab(id: number) { + for (let i in this.tabs) { + if (this.tabs[i].id === id) { + return this.tabs[i]; + } + } + return null; + } + + getTabByPosition(position: number) { + const fromRight = position < 0; + for (let i in this.tabs) { + if (this.tabs[i].getPosition(fromRight) === position) { + return this.tabs[i]; + } + } + return null; + } + + getTabByRelPosition(position: number) { + position = this.getActiveTab().getPosition() + position; + if (position <= 0) { + return null; + } + return this.getTabByPosition(position); + } + + getNextTab() { + return this.getTabByRelPosition(1); + } + + getPreviousTab() { + return this.getTabByRelPosition(-1); + } + + getTabs() { + return this.tabs.slice(); + } + + eachTab(fn: (tab: Tab) => void) { + this.getTabs().forEach(fn); + } + + getActiveTab() { + if (this.tabs.length === 0) return null; + return this.tabs[0]; + } + + setActiveTab(tab: Tab) { + this.removeTab(tab); + this.tabs.unshift(tab); + this.emit("tab-active", tab, this); + } + + removeTab(tab: Tab, triggerEvent = false) { + const id = tab.id; + const index = this.tabs.findIndex((t: Tab) => t.id === id); + this.tabs.splice(index, 1); + if (triggerEvent) { + this.emit("tab-removed", tab, this); + } + } + + activateRecentTab() { + if (this.tabs.length > 0) { + this.tabs[0].activate(); + } + } +} + +class Tab extends EventTarget { + badge: Badge; + closable: boolean; + element: HTMLDivElement; + icon: string; + iconURL: string; + id: number; + isClosed: boolean; + isReady: boolean; + spans: { [key: string]: HTMLSpanElement }; + tabGroup: TabGroup; + title: string; + webview: HTMLElement; + webviewAttributes: { [key: string]: any }; + + constructor(tabGroup: TabGroup, id: number, args: TabOptions) { + super(); + this.badge = args.badge; + this.closable = args.closable === false ? false : true; + this.icon = args.icon; + this.iconURL = args.iconURL; + this.id = id; + this.isClosed = false; + this.isReady = false; + this.spans = {}; + this.tabGroup = tabGroup; + this.title = args.title; + this.webviewAttributes = args.webviewAttributes || {}; + this.webviewAttributes.src = args.src; + + this.initTab(); + this.initWebview(); + + if (args.visible !== false) { + this.show(); + } + if (typeof args.ready === "function") { + args.ready(this); + } else { + this.emit("ready", this); + } + } + + emit(type: string, ...args: any[]) { + return emit(this, type, args); + } + + on(type: string, fn: (...detail: any[]) => void) { + return on(this, type, fn); + } + + once(type: string, fn: (detail: string) => void) { + return on(this, type, fn, { once: true }); + } + + private initTab() { + const tab = this.element = document.createElement("div"); + tab.classList.add(CLASSNAMES.TAB); + for (let el of ["icon", "title", "badge", "close"]) { + const span = tab.appendChild(document.createElement("span")); + span.classList.add(`${CLASSNAMES.TAB}-${el}`); + this.spans[el] = span; + } + + this.setTitle(this.title); + this.setBadge(this.badge); + this.setIcon(this.iconURL, this.icon); + this.initTabCloseButton(); + this.initTabClickHandler(); + + this.tabGroup.tabContainer.appendChild(this.element); + } + + private initTabCloseButton() { + const container = this.spans.close; + if (this.closable) { + const button = container.appendChild(document.createElement("button")); + button.innerHTML = this.tabGroup.options.closeButtonText; + button.addEventListener("click", this.close.bind(this, false), false); + } + } + + private initTabClickHandler() { + // Mouse up + const tabClickHandler = function(e: KeyboardEvent) { + if (this.isClosed) return; + if (e.which === 2) { + this.close(); + } + }; + this.element.addEventListener("mouseup", tabClickHandler.bind(this), false); + // Mouse down + const tabMouseDownHandler = function(e: KeyboardEvent) { + if (this.isClosed) return; + if (e.which === 1) { + if ((e.target as HTMLElement).matches("button")) return; + this.activate(); + } + }; + this.element.addEventListener("mousedown", tabMouseDownHandler.bind(this), false); + } + + initWebview() { + const webview = this.webview = document.createElement("webview"); + + const tabWebviewDidFinishLoadHandler = function(e: Event) { + this.emit("webview-ready", this); + }; + + this.webview.addEventListener("did-finish-load", tabWebviewDidFinishLoadHandler.bind(this), false); + + const tabWebviewDomReadyHandler = function(e: Event) { + // Remove this once https://github.com/electron/electron/issues/14474 is fixed + webview.blur(); + webview.focus(); + this.emit("webview-dom-ready", this); + }; + + this.webview.addEventListener("dom-ready", tabWebviewDomReadyHandler.bind(this), false); + + this.webview.classList.add(CLASSNAMES.VIEW); + if (this.webviewAttributes) { + const attrs = this.webviewAttributes; + for (let key in attrs) { + const attr = attrs[key]; + if (attr === false) continue; + this.webview.setAttribute(key, attr); + } + } + + this.tabGroup.viewContainer.appendChild(this.webview); + } + + setTitle(title: string) { + if (this.isClosed) return; + const span = this.spans.title; + span.innerHTML = title; + span.title = title; + this.title = title; + this.emit("title-changed", title, this); + return this; + } + + getTitle() { + if (this.isClosed) return; + return this.title; + } + + setBadge(badge?: Badge) { + if (this.isClosed) return; + const span = this.spans.badge; + this.badge = badge; + + if (badge) { + span.innerHTML = badge.text; + span.classList.add(badge.classname); + span.classList.remove("hidden"); + } else { + span.classList.add("hidden"); + } + + this.emit("badge-changed", badge, this); + } + + getBadge() { + if (this.isClosed) return; + return this.badge; + } + + setIcon(iconURL: string, icon: string) { + if (this.isClosed) return; + this.iconURL = iconURL; + this.icon = icon; + const span = this.spans.icon; + if (iconURL) { + span.innerHTML = ``; + this.emit("icon-changed", iconURL, this); + } else if (icon) { + span.innerHTML = ``; + this.emit("icon-changed", icon, this); + } + + return this; + } + + getIcon() { + if (this.isClosed) return; + if (this.iconURL) return this.iconURL; + return this.icon; + } + + setPosition(newPosition: number) { + const tabContainer = this.tabGroup.tabContainer; + const length = tabContainer.childElementCount; + const thisPosition = this.getPosition(); + const tabs = Array.from(tabContainer.children) + tabs.splice(thisPosition, 1); + + if (newPosition < 0) { + newPosition += length; + if (newPosition < 0) { + newPosition = 0; + } + } + + if (newPosition < length) { + tabContainer.insertBefore(this.element, tabs[newPosition]); + } else { + tabContainer.appendChild(this.element); + } + + return this; + } + + getPosition(fromRight = false) { + let position = 0; + let tab = this.element; + while ((tab = tab.previousSibling as HTMLDivElement) != null) position++; + + if (fromRight === true) { + position -= this.tabGroup.tabContainer.childElementCount; + } + + return position; + } + + activate() { + if (this.isClosed) return; + const activeTab = this.tabGroup.getActiveTab(); + if (activeTab) { + activeTab.element.classList.remove("active"); + activeTab.webview.classList.remove("visible"); + activeTab.emit("inactive", activeTab); + } + this.tabGroup.setActiveTab(this); + this.element.classList.add("active"); + this.webview.classList.add("visible"); + this.webview.focus(); + this.emit("active", this); + return this; + } + + show(flag = true) { + if (this.isClosed) return; + if (flag) { + this.element.classList.add("visible"); + this.emit("visible", this); + } else { + this.element.classList.remove("visible"); + this.emit("hidden", this); + } + return this; + } + + hide() { + return this.show(false); + } + + hasClass(classname: string) { + return this.element.classList.contains(classname); + } + + close(force: boolean) { + const abortController = new AbortController(); + const abort = () => abortController.abort(); + this.emit("closing", this, abort); + + const abortSignal = abortController.signal; + if (this.isClosed || (!this.closable && !force) || abortSignal.aborted) return; + + this.isClosed = true; + const tabGroup = this.tabGroup; + tabGroup.tabContainer.removeChild(this.element); + tabGroup.viewContainer.removeChild(this.webview); + const activeTab = this.tabGroup.getActiveTab(); + tabGroup.removeTab(this, true); + + this.emit("close", this); + + if (activeTab.id === this.id) { + tabGroup.activateRecentTab(); + } + } +} + +customElements.define("tab-group", TabGroup); + +export type { TabGroup, Tab }; diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..bd4f81f --- /dev/null +++ b/src/style.css @@ -0,0 +1,208 @@ +/* CUSTOM PROPERTIES */ +/* ================= */ + +:host { + --tabgroup-background: #E7EAED; + --tab-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + --tab-font-size: 13px; + --tab-background: #E7EAED; + --tab-color: #696A6C; + --tab-border-color: #DADCE0; + --tab-transition: background-color 200ms ease-out, color 200ms ease-out; + --tab-cursor: pointer; + --tab-active-color: currentcolor; + --tab-active-background: #FFF; + --tag-hover-color: currentcolor; + --tag-hover-background: #F1F3F4; + --button-font-size: 15px; + --button-background: none; + --button-color: #696A6C; + --button-hover-background: #DADCE0; + --button-hover-color: #383a3e; + --button-border-radius: 50%; + --button-cursor: pointer; + --badge-background: #383a3e; + --badge-color: #fff; + --close-button-visibility: visible; +} + +/* STYLES */ +/* ====== */ + +webview { + position: absolute; + visibility: hidden; + width: 100%; + height: 100%; +} + +webview.visible { + visibility: visible; +} + +.etabs { + font-family: var(--tab-font-family); + text-rendering: optimizeLegibility; + font-feature-settings: 'liga', 'clig', 'kern'; +} + +.nav { + background: var(--tabgroup-background); + box-shadow: inset 0 -1px var(--tab-border-color); + border-top: 1px solid var(--tab-border-color); + font-size: var(--tab-font-size); + display: none; + width: 100%; + height: 32px; + cursor: default; + -webkit-user-select: none; + user-select: none; +} + +.nav.visible { + display: flex; +} + +.tabs { + height: 100%; +} + +.tab { + background: var(--tab-background); + box-shadow: inset 0 -1px var(--tab-border-color); + color: var(--tab-color); + cursor: var(--tab-cursor); + font-size: var(--tab-font-size); + transition: var(--tab-transition); + display: none; + position: relative; + box-sizing: border-box; + height: 100%; + padding: 5px 9px; + align-items: center; +} + +.tab:first-child { + border-left: none; +} + +.tab.visible { + display: inline-flex; +} + +.tab.active { + color: var(--tab-active-color); + background: var(--tab-active-background); + border-left: 1px solid var(--tab-border-color); + border-right: 1px solid var(--tab-border-color); + padding-left: 8px; + padding-right: 8px; + box-shadow: none; +} + +.tab.active:last-child { + border-right: none; +} + +.tab.visible:not(.active)+.tab.visible:not(.active) { + border-left: 1px solid var(--tab-border-color); + padding-left: 8px; +} + +.tab:not(.active):hover { + background: var(--tab-hover-background); + color: var(--tab-hover-color); +} + +.tab-badge { + background: var(--badge-background); + color: var(--badge-color); + text-align: center; + border-radius: 5px; + margin-left: 5px; + padding: 1px 4px; + font-size: 8px; + font-weight: bold; + line-height: 1.2; +} + +.tab-badge.hidden { + display: none; +} + +.tab-icon { + display: inline-block; + height: 16px; +} + +.tab-icon img { + max-width: 16px; + max-height: 16px; +} + +.tab-title { + display: inline-block; + margin-left: 10px; +} + +.tab-close { + display: inline-block; + margin-left: 10px; +} + +.tab-close button { + background: var(--button-background); + border-radius: var(--button-border-radius); + color: var(--button-color); + cursor: var(--button-cursor); + font-size: var(--button-font-size); + display: inline-block; + border: none; + width: 20px; + height: 20px; + text-align: center; + padding: 1px 0 0 0; + visibility: var(--close-button-visibility); +} + +.tab.active .tab-close button { + visibility: visible; +} + +.tab-close button:hover { + color: var(--button-hover-color); + background: var(--button-hover-background); +} + +.buttons { + display: flex; + padding: 5px; + border-left: 1px solid var(--tab-border-color); +} + +.buttons button { + color: var(--button-color); + background: var(--button-background); + border-radius: var(--button-border-radius); + cursor: var(--button-cursor); + font-size: var(--button-font-size); + display: block; + font-family: inherit; + border: none; + margin: 0; + width: 20px; + height: 20px; + text-align: center; + line-height: 1; + padding: 1px 0 0 0; +} + +.buttons button:hover { + color: var(--button-hover-color); + background: var(--button-hover-background); +} + +.views { + position: relative; + height: calc(100vh - 33px); +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..bb1d977 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "target": "es2021", + "noImplicitAny": true, + "noUnusedParameters": false, + "allowSyntheticDefaultImports": true + } +}