diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..b196c135c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,28 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false +insert_final_newline = false + +[*.{yml,yaml}] +indent_size = 2 + +[*.{ts,js,jsx,tsx}] +quote_type = double +continuation_indent_size = 2 +curly_brace_next_line = false +indent_brace_style = BSD +spaces_around_operators = true +spaces_around_brackets = true + +[*.{pl,pm,t,PL}] +max_line_length = off +continuation_indent_size = 4 diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index bbf6f23e2..000000000 --- a/.eslintignore +++ /dev/null @@ -1,11 +0,0 @@ -public -src/frontend/components/dashboard/lib/react/polyfills -babel.config.js -webpack.config.js -jest.config.js -tsconfig.json -src/frontend/js/lib/jqplot -src/frontend/js/lib/jquery -src/frontend/js/lib/plotly -src/frontend/components/timeline -fengari-web.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 9d2f57a34..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,46 +0,0 @@ -module.exports = { - "env": { - "browser": true, - "es6": true, - "jest": true, - "jquery": true, - }, - "settings": { - "react": { - "version": "detect" - } - }, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:react/recommended" - ], - "overrides": [ - { - "env": { - "node": true, - }, - "files": [ - ".eslintrc.{js,cjs}" - ], - "parserOptions": { - "sourceType": "script" - } - } - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": "es6", - "sourceType": "module" - }, - "plugins": [ - "@typescript-eslint", - "react" - ], - "rules": { - "react/prop-types": 0, - "@typescript-eslint/no-explicit-any": 0, - "no-prototype-builtins": 0, - "@typescript-eslint/ban-types": 0, - } -}; diff --git a/.github/workflows/install.sh b/.github/workflows/install.sh index 17bfa6ab1..f5215043d 100755 --- a/.github/workflows/install.sh +++ b/.github/workflows/install.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + apt-get update apt-get install -y curl gpg curl -o- https://debian.ctrlo.com/repos/apt/debian/whatever.gpg.key | gpg --dearmor -o /usr/share/keyrings/ctrlo-keyring.gpg @@ -18,4 +20,4 @@ apt-get install -y libmoox-types-mooselike-datetime-perl libdatetime-format-date apt-get install -y libfile-slurp-perl libfile-mimeinfo-perl liblist-compare-perl libnet-oauth2-authorizationserver-perl libfontconfig1 apt-get install -y libctrlo-pdf-perl libpdf-builder-perl fonts-liberation libdate-holidays-gb-perl libcgi-deurl-xs-perl libfile-bom-perl apt-get install -y libdatetime-format-iso8601-perl liblog-log4perl-perl libwww-mechanize-chrome-perl chromium libfile-libmagic-perl libnet-saml2-perl -apt-get install -y liburl-encode-perl libtext-markdown-perl libtest-tempdir-tiny-perl libtest-mocktime-perl +apt-get install -y liburl-encode-perl libtext-markdown-perl libtest-tempdir-tiny-perl libtest-mocktime-perl libdancer2-plugin-logreport-perl diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6a11290d6..3492dd262 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,10 +1,11 @@ name: 'GADS Tests' -on: +on: push: branches: - master - dev - hotfix + - dev-bootstrap paths-ignore: - '*.md' - VERSION @@ -13,6 +14,7 @@ on: - master - dev - hotfix + - dev-bootstrap paths-ignore: - '*.md' - VERSION @@ -115,6 +117,7 @@ jobs: browser: - name: 'chrome' os: 'ubuntu-22.04' + node_version: 24.x services: postgres: @@ -185,7 +188,7 @@ jobs: strategy: matrix: - node-version: [20.x, 22.x] + node-version: [22.x, 24.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: diff --git a/VERSION b/VERSION index 834f26295..9f8d8a916 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.8.0 +2.8.3 diff --git a/changelist.md b/changelist.md index 51afe23de..924f01154 100644 --- a/changelist.md +++ b/changelist.md @@ -1,4 +1,16 @@ # GADS Changelist +-------- +**Version**: 2.8.3 +**Released**: 13-05-2026 + +# Fixes + +- Fix for error in JS logging +- Fix error in drag and drop +- Better error for when duplicate curval ID's are present + +# QoL Fixes + -------- **Version**: 2.8.2 **Released**: 01-05-2026 diff --git a/cypress.config.ts b/cypress.config.ts index d8489da64..099ca4329 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -6,5 +6,6 @@ export default defineConfig({ setupNodeEvents(on, config) { // implement node event listeners here }, + allowCypressEnv: false }, }); diff --git a/cypress/e2e/functionality/02-homepage.cy.ts b/cypress/e2e/functionality/02-homepage.cy.ts index 5c3c4eaab..3b088b3d2 100644 --- a/cypress/e2e/functionality/02-homepage.cy.ts +++ b/cypress/e2e/functionality/02-homepage.cy.ts @@ -3,9 +3,7 @@ import { goodPassword, goodUser } from "../../support/constants"; describe('Dashboard Tests', () => { const bigLipsum = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque accumsan, sem et vulputate imperdiet, enim ipsum rhoncus massa, sit amet pellentesque lacus urna sit amet enim. In tristique mollis tincidunt. Sed eget ligula metus. Integer sodales placerat erat. Aliquam erat volutpat. Curabitur varius lacinia diam fringilla efficitur. Sed euismod purus vel turpis molestie, ac fringilla nisi vestibulum. Maecenas ullamcorper ornare dui sodales gravida. Donec maximus egestas eleifend. Etiam in ultrices ante. Duis quis volutpat turpis. Nulla dignissim ornare aliquet. Fusce interdum gravida est, sit amet vehicula nisi suscipit at. Pellentesque nec fermentum leo, in vehicula nulla. Nam dapibus ultricies tortor in maximus. Donec enim velit, molestie nec feugiat sed, posuere non ex. Nulla pellentesque gravida feugiat. Sed ornare purus vel libero semper aliquet. Nulla rutrum nunc sed vulputate gravida. Cras lobortis, lacus non tincidunt suscipit, leo quam vehicula libero, in vehicula diam justo ac est. -Mauris tempus, mi nec sodales semper, metus neque blandit sem, non scelerisque nunc libero eu augue. Cras ornare ut lectus in mattis. Quisque magna elit, efficitur nec dolor sed, semper dictum nunc. Cras ultricies, augue eget interdum aliquam, quam ex blandit sem, nec sollicitudin ex elit non mauris. Fusce dui justo, feugiat id lacus sit amet, pulvinar tristique felis. Etiam rhoncus ex ut congue aliquet. Sed at felis eget neque rhoncus malesuada. Aliquam commodo condimentum massa, sed volutpat nibh congue et. Maecenas blandit massa sed nisl pulvinar, vitae consectetur tortor placerat. Nulla laoreet diam ipsum, sit amet consectetur sem condimentum quis. Nullam et justo sem. Sed et sapien tempus, scelerisque nisl ac, pretium arcu. -Donec quis finibus ante. Nulla et dui posuere, semper elit quis, maximus ipsum. Aliquam ante nulla, pellentesque sed neque sit amet, finibus cursus est. Aliquam sed sollicitudin orci. Nulla malesuada augue lectus, ac tincidunt orci fermentum ac. Nullam pulvinar diam felis, sed condimentum arcu ornare sit amet. Praesent eget lobortis purus. In hac habitasse platea dictumst. Ut lorem nisl, fringilla vitae quam lobortis, vehicula egestas magna. Sed convallis placerat ante quis convallis. Vivamus pharetra quam diam, ut ultricies neque mollis vitae. Morbi augue tellus, feugiat a interdum a, tincidunt vel ante. -Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut porttitor risus, at pulvinar tortor. Integer eleifend volutpat efficitur. Maecenas massa odio, pharetra eu eleifend eu, volutpat sed dui. Donec efficitur sed risus sit amet imperdiet. Pellentesque nec arcu non nibh congue cursus et a sapien. Phasellus ullamcorper magna nec varius facilisis. Curabitur et tempus est. Nulla tincidunt porttitor mollis. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean vitae pretium felis. Aliquam vehicula et nisl sit amet pharetra. Nulla ac sollicitudin velit. Cras egestas ac sem vitae sollicitudin. Nullam convallis risus id massa vestibulum imperdiet. Cras in enim sit amet ligula placerat eleifend.` +Mauris tempus, mi nec sodales semper, metus neque blandit sem, non scelerisque nunc libero eu augue. Cras ornare ut lectus in mattis. Quisque magna elit, efficitur nec dolor sed, semper dictum nunc. Cras ultricies, augue eget interdum aliquam, quam ex blandit sem, nec sollicitudin ex elit non mauris. Fusce dui justo, feugiat id lacus sit amet, pulvinar tristique felis. Etiam rhoncus ex ut congue aliquet. Sed at felis eget neque rhoncus malesuada. Aliquam commodo condimentum massa, sed volutpat nibh congue et. Maecenas blandit massa sed nisl pulvinar, vitae consectetur tortor placerat. Nulla laoreet diam ipsum, sit amet consectetur sem condimentum quis. Nullam et justo sem. Sed et sapien tempus, scelerisque nisl ac, pretium arcu.` beforeEach(() => { cy.loginAndGoTo(goodUser, goodPassword, 'http://localhost:3000/?did=1'); @@ -21,61 +19,73 @@ Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut }) it('Displays the home page correctly', () => { - cy.get("li.list__item").eq(0) + cy.get("a.nav-link").eq(0) .should("exist") - .contains("Home dashboard (shared)") - .should("have.class", "link--active"); - cy.get("li.list__item").eq(1) + .should("have.class", "active") + .contains("Home dashboard (shared)"); + cy.get("a.nav-link").eq(1) .should("exist") - .contains("Home dashboard (personal)") - .should("not.have.class", "link--active"); + .should("not.have.class", "active") + .contains("Home dashboard (personal)"); }); it('Should navigate to the personal dashboard', () => { - cy.get("li.list__item").eq(1) + cy.get("a.nav-link").eq(1) .should("exist") - .should("not.have.class", "link--active") + .should("not.have.class", "active") .click(); + cy.get("a.nav-link").eq(1) + .should("exist") + .should("have.class", "active") + .contains("Home dashboard (personal)"); }); it('Should navigate to the shared dashboard', () => { - cy.get("li.list__item").eq(0) + cy.get("a.nav-link").eq(1) + .click(); + cy.get("a.nav-link").eq(0) .should("exist") - .should("not.have.class", "link--active") + .should("not.have.class", "active") .click(); + cy.get("a.nav-link").eq(0) + .should("exist") + .should("have.class", "active") + .contains("Home dashboard (shared)"); }); context("Shared Dashboard", () => { it('Should cancel creation of a shared dashboard widget', () => { + cy.wait(1000); cy.get(".ld-footer-container") .find("button") .eq(1) .click(); cy.get(".ld-footer-container") - .find(".dropdown__menu") + .find(".dropdown-menu.show") .find("a") - .eq(1) + .eq(0) .click(); cy.get("[aria-label='Edit Modal']").find("button.btn-cancel").click(); cy.get(".ld-widget").should("have.length", 0); }); it("Should create a shared dashboard widget", () => { + cy.wait(1000); cy.get(".ld-footer-container") .find("button") .eq(1) .click(); cy.get(".ld-footer-container") - .find(".dropdown__menu") + .find(".dropdown-menu.show") .find("a") - .eq(1) + .eq(0) .click(); cy.get("[aria-label='Edit Modal']") .find("input[name='title']", { timeout: 10000 }) .should("be.visible"); cy.get("[aria-label='Edit Modal']") .find(".modal-footer__right") - .find("button.btn-default").click(); + .find("button.btn-primary").click(); cy.get(".ld-widget").should("have.length", 1); cy.get(".ld-widget").find("div").contains("This is a new notice widget - click edit to update the contents"); }); @@ -90,7 +100,7 @@ Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut .type("With a new title"); cy.get("[aria-label='Edit Modal']") .find(".modal-footer__right") - .find("button.btn-default").click(); + .find("button.btn-primary").click(); cy.get(".ld-widget").find("h4").contains("With a new title"); }); @@ -105,7 +115,7 @@ Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut .type(bigLipsum); cy.get("[aria-label='Edit Modal']") .find(".modal-footer__right") - .find("button.btn-default").click(); + .find("button.btn-primary").click(); }); it("Should delete a shared dashboard widget", () => { @@ -120,43 +130,45 @@ Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut context("Personal Dashboard", () => { it('Should cancel creation of a personal dashboard widget', () => { - cy.get("a.link--primary").click(); + cy.get("a.nav-link").eq(1).click(); + cy.wait(1000); cy.get(".ld-footer-container") .find("button") .eq(1) .click(); cy.get(".ld-footer-container") - .find(".dropdown__menu") + .find(".dropdown-menu.show") .find("a") - .eq(1) + .eq(0) .click(); cy.get("[aria-label='Edit Modal']").find("button.btn-cancel").click(); cy.get(".ld-widget").should("have.length", 1); }); it("Should create a personal dashboard widget", () => { - cy.get("a.link--primary").click(); + cy.get("a.nav-link").eq(1).click(); + cy.wait(1000); cy.get(".ld-footer-container") .find("button") .eq(1) .click(); cy.get(".ld-footer-container") - .find(".dropdown__menu") + .find(".dropdown-menu.show") .find("a") - .eq(1) + .eq(0) .click(); cy.get("[aria-label='Edit Modal']") .find("input[name='title']", { timeout: 10000 }) .should("be.visible"); cy.get("[aria-label='Edit Modal']") .find(".modal-footer__right") - .find("button.btn-default").click(); + .find("button.btn-primary").click(); cy.get(".ld-widget").should("have.length", 2); cy.get(".ld-widget").eq(1).find("div").contains("This is a new notice widget - click edit to update the contents"); }); it("Should edit a personal dashboard widget", () => { - cy.get("a.link--primary").click(); + cy.get("a.nav-link").eq(1).click(); cy.get(".ld-widget").eq(1).find(".ld-edit-button").click(); cy.get("[aria-label='Edit Modal']") .find("input[name='title']", { timeout: 10000 }) @@ -166,12 +178,12 @@ Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut .type("With a new title"); cy.get("[aria-label='Edit Modal']") .find(".modal-footer__right") - .find("button.btn-default").click(); + .find("button.btn-primary").click(); cy.get(".ld-widget").eq(1).find("h4").contains("With a new title"); }); it("Should edit a personal dashboard widget with a lot of text", () => { - cy.get("a.link--primary").click(); + cy.get("a.nav-link").eq(1).click(); cy.get(".ld-widget").eq(1).find(".ld-edit-button").click(); cy.get("[aria-label='Edit Modal']") .find("input[name='title']", { timeout: 10000 }) @@ -182,11 +194,11 @@ Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut .type(bigLipsum); cy.get("[aria-label='Edit Modal']") .find(".modal-footer__right") - .find("button.btn-default").click(); + .find("button.btn-primary").click(); }); it("Should delete a personal dashboard widget", () => { - cy.get("a.link--primary").click(); + cy.get("a.nav-link").eq(1).click(); cy.get(".ld-widget").eq(1).find(".ld-edit-button").click(); cy.get("[aria-label='Edit Modal']") .find("input[name='title']", { timeout: 10000 }) diff --git a/cypress/e2e/functionality/03-settings.cy.ts b/cypress/e2e/functionality/03-settings.cy.ts index adc39509c..a555b23e4 100644 --- a/cypress/e2e/functionality/03-settings.cy.ts +++ b/cypress/e2e/functionality/03-settings.cy.ts @@ -65,7 +65,7 @@ describe("settings tests", () => { .find("tr") .contains("No titles available"); cy.mainHeader() - .find(".btn-default") + .find(".btn-primary") .should("exist") .click(); cy.location("pathname").should("include", "/title_add"); @@ -93,7 +93,7 @@ describe("settings tests", () => { .find("tr") .contains("No titles available"); cy.mainHeader() - .find(".btn-default") + .find(".btn-primary") .should("exist") .click(); cy.location("pathname").should("include", "/title_add"); @@ -191,7 +191,7 @@ describe("settings tests", () => { .find("tr") .contains("No organisations available"); cy.mainHeader() - .find(".btn-default") + .find(".btn-primary") .should("exist") .click(); cy.location("pathname").should("include", "/organisation_add"); @@ -219,7 +219,7 @@ describe("settings tests", () => { .find("tr") .contains("No organisations available"); cy.mainHeader() - .find(".btn-default") + .find(".btn-primary") .should("exist") .click(); cy.location("pathname").should("include", "/organisation_add"); diff --git a/cypress/e2e/functionality/06-tables-and-wizard.cy.ts b/cypress/e2e/functionality/06-tables-and-wizard.cy.ts index 715778acb..1905d7050 100644 --- a/cypress/e2e/functionality/06-tables-and-wizard.cy.ts +++ b/cypress/e2e/functionality/06-tables-and-wizard.cy.ts @@ -8,7 +8,7 @@ describe('Another Test Suite', () => { //attempt save with incorrect (fails) it.skip('should fail to save new table with invalid shortname ', () => { - cy.get('[data-target="#newTableModal"]').click(); + cy.get('[data-bs-target="#newTableModal"]').click(); cy.get('#shortName').type('This value wont $4v£'); cy.get("#name").type("table to fail"); cy.get('.btn-js-next').eq(0).click(); @@ -19,7 +19,7 @@ describe('Another Test Suite', () => { }); it('should save a new table successfully', () => { - cy.get('[data-target="#newTableModal"]').click(); + cy.get('[data-bs-target="#newTableModal"]').click(); cy.get('#shortName').type('1-test_table'); cy.get("#name").type("1-test-table"); cy.get('.btn-js-next').eq(0).click(); diff --git a/cypress/e2e/functionality/08-data-view.cy.ts b/cypress/e2e/functionality/08-data-view.cy.ts deleted file mode 100644 index f5b4dd9d1..000000000 --- a/cypress/e2e/functionality/08-data-view.cy.ts +++ /dev/null @@ -1,66 +0,0 @@ -import "../../support/commands"; -import { goodPassword, goodUser } from "../../support/constants" - -// This test suite is just to ensure the data table menu items are present and correct -describe('Data table', () => { - // This section is for the admin user in order to check all permissions work and can be applied correctly - describe('Admin user', () => { - beforeEach(() => { - cy.loginAndGoTo(goodUser, goodPassword, 'http://localhost:3000/table1/data'); - }); - - it('All expected tabs and title are present', () => { - cy.get('.table-header__title').should('exist').contains('WebDriverTestSheet'); - const tb = cy.get('.table-header-bottom'); - tb.should('exist'); - const tabs = tb.find('ul').find('li'); - tabs.should('exist').should('have.length', 4); - const tabContent = ['Records', 'Dashboard', 'Edit table', 'Reports']; - tabs.each((tab, idx) => { - cy.wrap(tab).should('exist').contains(tabContent[idx]); - }); - }); - - it('Has the correct items in the left navigation', () => { - const nl = cy.get('.content-block__navigation-left'); - nl.should('exist'); - nl.find('.dropdown').should('exist').contains('Current view'); - const vt = cy.get('.content-block__navigation-left').find('ul').find('li').eq(1); - vt.should('exist'); - vt.find('ul').find('li').should('exist').should('have.length', 3); - const viewTypes = ['Table', 'Graph', 'Timeline']; - cy.get('.content-block__navigation-left').find('ul').find('li').eq(1).find('ul').find('li').each((li, idx) => { - cy.wrap(li).should('exist').contains(viewTypes[idx]); - }); - }); - - it('Has the correct items in the right navigation', () => { - // Add the user to the group - cy.addUserToGroup('test@example.com', 'basic', 'http://localhost:3000/table1/data'); - // Set all table permissions - cy.setAllTablePermissions(); - // Check everything is as expected - cy.get('.content-block__navigation-right').should('exist'); - cy.get('.content-block__navigation-right').find('.dropdown').should('exist').should('have.length', 2); - const dropdowns = ['Manage views', 'Actions']; - cy.get('.content-block__navigation-right').find('.dropdown').each((dropdown,idx)=>{ - cy.wrap(dropdown).should('exist').contains(dropdowns[idx]); - }); - }); - - it('Has the correct items in the right navigation dropdowns', ()=>{ - const dropdownData = { - 'Manage views': ['Add a view', 'Manage views of another user', 'Historic view'], - 'Actions': ['Import records','Delete all records in this view','Update all records in this view','Clone all records in this view','Download records','Manage deleted records','Field Data Purge'] - } - for(const key in dropdownData) { - cy.get('.content-block__navigation-right').find('.dropdown').contains(key).click(); - cy.get('.dropdown-menu').should('exist'); - cy.get('.content-block__navigation-right').find('.dropdown').contains(key).parent().find('li').each((li, idx) => { - cy.wrap(li).should('exist').contains(dropdownData[key][idx]); - }); - cy.get('.content-block__navigation-right').find('.dropdown').contains(key).click(); - } - }); - }); -}); \ No newline at end of file diff --git a/cypress/support/builders/layout/LayoutBuilder.ts b/cypress/support/builders/layout/LayoutBuilder.ts index a9a04c0fe..a42eed8cb 100644 --- a/cypress/support/builders/layout/LayoutBuilder.ts +++ b/cypress/support/builders/layout/LayoutBuilder.ts @@ -68,7 +68,7 @@ abstract class LayoutBuilderBase implements ILayoutBuilder { .type(this.name); this.setType(); if (this.shortName) { - cy.get("button") + cy.get("span") .contains("Advanced settings") .click(); cy.get("input[name='name_short']") @@ -101,7 +101,7 @@ abstract class LayoutBuilderBase implements ILayoutBuilder { } protected setPermissions(): void { - cy.get("button") + cy.get("span") .contains("Permissions") .click(); cy.getDataTable() @@ -135,14 +135,14 @@ class CodeLayoutBuilder extends LayoutBuilderBase implements ICodeLayoutBuilder buildSpecific() { // Expand the code editor if (this.layoutType === "RAG") { - cy.get("button") + cy.get("span") .contains("Field settings for RAG") .click(); // Enter the code cy.get("textarea[name='code_rag']") .type(this.code); } else if (this.layoutType === "CALC") { - cy.get("button") + cy.get("span") .contains("Field settings for calculated value") .click(); cy.get("textarea[name='code_calc']") @@ -174,18 +174,20 @@ class DropdownLayoutBuilder extends LayoutBuilderBase implements IDropdownLayout buildSpecific() { // Expand the options - cy.get("button") + cy.get("span") .contains("Field settings for dropdown list") .click(); // Enter the options - for(let i; i -import { IBuildable } from "./builders/layout/interfaces"; -import { instanceMode } from "./constants"; +import 'cypress-axe'; +import { LayoutDefinition } from "./builders/layout/definitions"; +import { IBuildable, IDropdownLayoutBuilder } from "./builders/layout/interfaces"; +import { LayoutBuilder } from "./builders/layout/LayoutBuilder"; +import { instanceMode, tablePermissions } from "./constants"; +import { goodPassword, goodUser } from "./constants"; export { } declare global { namespace Cypress { interface Chainable { - /** - * Get a component by name - * @param name The name of the element to get - * @example cy.getByName('username') - */ - getByName(name: string): Chainable>; - /** - * Get a component by title - * @param title The title of the element to get - * @example cy.getByTitle('username') - */ - getByTitle(title: string): Chainable>; - /** - * Login to the application - * @param email The email to use to login - * @param password The password to use to login - * @example cy.login('username@example.com','password') - */ - login(email: string, password: string): void; - /** - * Login then navigate to a page - * @param email The email to use to login - * @param password The password to use to login - * @param path The location to navigate to after login - * @example cy.loginAndGoTo('username@example.com','password','/home') - */ - loginAndGoTo(email: string, password: string, path: string): void; - /** - * Get the main body of the page - * @example cy.mainBody() - this is the same as `cy.get('.content-block__main')` - * @see login - */ - mainBody(): Chainable>; - /** - * Get the main header of the page - * @example cy.mainHeader() - this is the same as `cy.get('.content-block__head')` - */ - mainHeader(): Chainable>; - /** - * Get the data table of the page - * @example cy.getDataTable() - this is the same as `cy.mainBody().find('.data-table')` - */ - getDataTable(): Chainable>; - /** - * Create a title in the system - * @param title The title to create in the system - * @example cy.createTitle('New Title') - */ - createTitle(title: string): void; - /** - * Create an organisation in the system - * @param title The title of the organisation to create - * @example cy.createOrganisation('New Organisation') - */ - createOrganisation(title: string): void; - /** - * Create a group in the system - * @param title The title of the group to create - * @example cy.createGroup('New Group') - */ - createGroup(title: string): void; - /** - * Add a user to a group - * @param email The email of the user to add to the group - * @param group The name of the group to add the user to - * @example cy.addUserGroup('bob@home.com','Admin') - * @see createGroup - */ - addUserGroup(email: string, group: string): void; - /** - * Delete a group from the system - * @param title The title of the group to delete - * @example cy.deleteGroup('Admin') - */ - deleteGroup(title: string): void; - /** - * Create a layout in the system - * @param builder The layout builder to use to create the layout - * @example cy.createLayout(LayoutBuilder.createBuilder('TEXT').setName('test').setShortName('t')) - */ - createLayout(builder: IBuildable): void; - /** - * Create a layout in the system - * @param builder The layout builder to use to create the layout - * @param navigate Whether to navigate to the layout page before creating the layout - * @example cy.createLayout(LayoutBuilder.createBuilder('TEXT').setName('test').setShortName('t'), true) - */ - createLayout(builder: IBuildable, navigate: boolean): void; - /** - * Delete a layout by short name - * @param shortName The short name of the layout to delete - * @example cy.deleteLayoutByShortName('t') - */ - deleteLayoutByShortName(shortName: string): void; - /** - * Delete a layout by short name - * @param shortName The short name of the layout to delete - * @param navigate Whether to navigate to the layout page before deleting the layout - * @example cy.deleteLayoutByShortName('t') - */ - deleteLayoutByShortName(shortName: string, navigate: boolean): void; - /** - * Create an instance in the system - * @param instanceName The name of the instance to create - * @example cy.createInstance('Test Instance') - */ - createInstance(instanceName: string, shortName?: string): void; - /** - * Go to an instance by short name - * @param shortName The short name of the instance to go to - * @example cy.gotoInstanceByShortName('test') - */ - gotoInstanceByShortName(shortName: string, mode: instanceMode): void; - /** - * Delete a instance by short name - * @param shortName The short name of the instance to delete - * @example cy.deleteInstanceByShortName('t') - */ - deleteInstanceByShortName(shortName: string): void; - /** - * Navigate to the table permissions page and check all boxes that are unchecked - * @example cy.setAllTablePermissions() - */ - setAllTablePermissions(): void; - /** - * Add a user to a group - * @param user The user to add to a group - * @param name The name of the group to add the user to - * @param location The location to navigate to after adding the user to the group (optional) - * @example cy.addUserToGroup('test@example.com', 'basic') - * @example cy.addUserToGroup('test@example.com', 'basic', '/user_overview/') - */ - addUserToGroup(user: string, name: string, location?: string): void; + getByName(name: string): Chainable; + getByTitle(title: string): Chainable; + login(email: string, password: string): Chainable; + loginAndGoTo(email: string, password: string, path: string): Chainable; + mainBody(): Chainable; + mainHeader(): Chainable; + getDataTable(): Chainable; + createTitle(title: string): Chainable; + createOrganisation(title: string): Chainable; + createGroup(title: string): Chainable; + addUserGroup(email: string, group: string): Chainable; + deleteGroup(title: string): Chainable; + createLayout(builder: IBuildable, navigate?: boolean): Chainable; + deleteLayoutByShortName(shortName: string, navigate?: boolean): Chainable; + createInstance(instanceName: string, shortName?: string): Chainable; + gotoInstanceByShortName(shortName: string, mode: instanceMode): Chainable; + deleteInstanceByShortName(shortName: string): Chainable; + setFieldValueByShortName(shortName: string, value: string | { to: string, from: string }): Chainable; + setTablePermissionsByShortName(shortName: string, permissions: { [key in tablePermissions]?: boolean }): Chainable; + createLayoutsFromDefinition(layoutDefs: LayoutDefinition): Chainable; + addUserToDefaultGroup(user: string, CheckOrUncheck?: 'check' | 'uncheck'): Chainable; + addDataToLayoutFromDefinition(layoutDefs: LayoutDefinition): Chainable; + deleteAllData(table: string): Chainable; + purgeAllDeletedData(shortName: string): Chainable; + deleteLayoutsFromDefinitions(layoutDefs: LayoutDefinition): Chainable; + clearAllTablePermissions(shortName: string): Chainable; + populateTableWithLayouts(shortName: string): Chainable; + cleanTableOfLayouts(shortName: string): Chainable; + clearImports(shortName: string): Chainable; + bulkImportRecords(csvFilePath?: string): Chainable; + logout(): Chainable; + deleteCurrentView(): Chainable; + deleteAllViewsForTable(tableName: string): Chainable; } } } -Cypress.Commands.add('getByName', (name: string) => cy.get(`[name=${name}]`)); +Cypress.Commands.add('getByName', (name: string) => { + return cy.get(`[name=${name}]`); +}); -Cypress.Commands.add('getByTitle', (title: string) => cy.get(`[title=${title}]`)); +Cypress.Commands.add('getByTitle', (title: string) => { + return cy.get(`[title=${title}]`); +}); Cypress.Commands.add("login", (email: string, password: string) => { - cy.visit('http://localhost:3000'); - cy.get("#username").type(email); - cy.get("#password").type(password); - cy.getByName("signin").click(); - cy.location("pathname").should("not.include", "/login"); + return cy.visit('http://localhost:3000') + .get("#username").type(email) + .get("#password").type(password) + .getByName("signin").click() + .location("pathname").should("not.include", "/login"); }); Cypress.Commands.add('loginAndGoTo', (email: string, password: string, path: string) => { - cy.login(email, password); - cy.visit(path); + return cy.login(email, password).visit(path); }); -Cypress.Commands.add('mainBody', () => cy.get(".content-block__main")); +Cypress.Commands.add('mainBody', () => { + return cy.get(".content-block__main"); +}); -Cypress.Commands.add('mainHeader', () => cy.get(".content-block__head")); +Cypress.Commands.add('mainHeader', () => { + return cy.get(".content-block__head"); +}); -Cypress.Commands.add('getDataTable', () => cy.mainBody().find(".data-table")); +Cypress.Commands.add('getDataTable', () => { + return cy.mainBody().find(".data-table"); +}); Cypress.Commands.add('createTitle', (title: string) => { if (!location.pathname.match(/title_add/)) { cy.visit('http://localhost:3000/settings/title_add/'); } - cy.mainBody().find("input[name='title']").type(title); - cy.mainBody().find("button[type='submit']").click(); - cy.getDataTable().find("tbody").find("tr").contains(title); + return cy.mainBody().find("input[name='title']").type(title) + .mainBody().find("button[type='submit']").click() + .getDataTable().find("tbody tr").contains(title); }); Cypress.Commands.add('createOrganisation', (title: string) => { if (!location.pathname.match(/organisation_add/)) { cy.visit('http://localhost:3000/settings/organisation_add/'); } - cy.mainBody().find("input[name='title']").type(title); - cy.mainBody().find("button[type='submit']").click(); - cy.getDataTable().find("tbody").find("tr").contains(title); + return cy.mainBody().find("input[name='title']").type(title) + .mainBody().find("button[type='submit']").click() + .getDataTable().find("tbody tr").contains(title); }); Cypress.Commands.add('createGroup', (title: string) => { if (!location.pathname.match(/group_add/)) { cy.visit('http://localhost:3000/group_add/'); } - cy.mainBody().find('input[name="name"]').type(title); - cy.mainBody().find("button[type='submit']").click(); - cy.getDataTable().find("tbody").find("tr").contains(title); + return cy.mainBody().find('input[name="name"]').type(title) + .mainBody().find("button[type='submit']").click() + .getDataTable().find("tbody tr").contains(title); }); Cypress.Commands.add('addUserGroup', (email: string, group: string) => { if (!location.pathname.match('/user_overview/')) { cy.visit('http://localhost:3000/user_overview/'); } - cy.get('tr').contains('td', email).parent().click(); - cy.get('label.checkbox-label').contains(group).prev('input[type="checkbox"]').check({ force: true }); - cy.mainBody().find("button[type='submit']").click(); + return cy.get('tr').contains('td', email).parent().click() + .get('label.checkbox-label').contains(group).prev('input[type="checkbox"]').check({ force: true }) + .mainBody().find("button[type='submit']").click(); }); - Cypress.Commands.add('deleteGroup', (title: string) => { if (!location.pathname.match(/group_overview/)) { cy.visit('http://localhost:3000/group_overview/'); } - cy.contains('a', title).click(); - cy.get('.btn-delete').click(); - cy.get('.btn.btn-danger').click(); + return cy.contains('a', title).click() + .get('.btn-delete').click() + .get('.btn.btn-danger').click(); }); -Cypress.Commands.add('createLayout', (builder: IBuildable, navigate: boolean = false) => { +Cypress.Commands.add('createLayout', (builder: IBuildable, navigate = false) => { builder.build(navigate); + return cy.mainBody(); }); -Cypress.Commands.add('deleteLayoutByShortName', (shortName: string, navigate: boolean = false) => { +Cypress.Commands.add('deleteLayoutByShortName', (shortName: string, navigate = false) => { if (navigate) { - cy.visit("http://localhost:3000/table"); - cy.getDataTable() - .find("a") - .contains("Edit table") - .click(); - cy.get("a") - .contains("Fields") - .click(); + cy.visit("http://localhost:3000/table") + .getDataTable().find("a").contains("Edit table").click(); + cy.get("a").contains("Fields").click(); } - cy.getDataTable() - .find("tbody") - .find("tr") - .find("td") - .contains(shortName) - .click(); - cy.get(".btn-danger") - .contains("Delete field") - .click(); - cy.get(".modal") - .find(".btn-danger") - .contains("Delete") - .click(); -}); - -Cypress.Commands.add("createInstance", (instanceName: string, shortname: string = instanceName.toLocaleLowerCase().replace(" ", "")) => { - cy.visit("http://localhost:3000/table"); - cy.get("button") - .contains("New table") - .click(); - cy.get(".modal") - .should("be.visible") - .find("input#name[name=name]") - .type(instanceName); - cy.get("input[name=shortName]") - .type(shortname); - cy.get("button.btn-js-next") - .contains("Next") - .should("be.visible") - .click(); - cy.get("button.btn-js-save") - .contains("Save table") - .should("be.visible") - .click(); + return cy.getDataTable().find("tbody tr td").contains(shortName).click() + .get(".btn-danger").contains("Delete field").click() + .get(".modal .btn-danger").contains("Delete").click(); +}); + +Cypress.Commands.add("createInstance", (instanceName: string, shortname: string = instanceName.toLowerCase().replace(" ", "")) => { + return cy.visit("http://localhost:3000/table") + .get("button").contains("New table").click() + .get(".modal").should("be.visible") + .find("input#name[name=name]").type(instanceName) + .get("input[name=shortName]").type(shortname) + .get("button.btn-js-next").contains("Next").click() + .get("button.btn-js-save").contains("Save table").click(); }); Cypress.Commands.add("gotoInstanceByShortName", (shortName: string, mode: instanceMode) => { - cy.visit(`http://localhost:3000/${shortName}/${mode ? mode : ""}`); + return cy.visit(`http://localhost:3000/${shortName}/${mode ? mode : ""}`); }); Cypress.Commands.add("deleteInstanceByShortName", (shortName: string) => { - cy.gotoInstanceByShortName(shortName, "edit"); - cy.get("button") - .contains("Delete table") - .click(); - cy.get(".modal") - .should("be.visible") - .find("button") - .contains("Delete") - .click(); -}); - -Cypress.Commands.add("setAllTablePermissions", () => { - cy.location('pathname').should('include', '/table'); - cy.get('.table-header-bottom').find('ul').find('li').contains('Edit table').click(); - cy.get('.content-block__navigation-left').find('ul').find('li').contains('Permissions').click(); - cy.get('.card__title').contains('Group').click(); - cy.get('.card__content').find('input[type="checkbox"]').each((el: HTMLInputElement) => { - cy.wrap(el).check({ force: true }); + return cy.gotoInstanceByShortName(shortName, "edit") + .get("button").contains("Delete table").click() + .get(".modal").should("be.visible") + .find("button").contains("Delete").click(); +}); + +Cypress.Commands.add("setFieldValueByShortName", (shortName: string, value: string | { to: string, from: string }) => { + return cy.get(`[data-name-short="${shortName}"]`).then(($el) => { + const type = $el.data('column-type'); + if (["string", "intgr", "date", "daterange"].includes(type)) { + const input = $el.find("input"); + cy.wrap(input).then(($input) => { + if (type === "daterange") { + if (typeof value !== "object") throw new Error("Value must be an object with 'to' and 'from'"); + cy.wrap($input).eq(0).type(value.from); + cy.wrap($input).eq(1).type(value.to); + } else { + if (typeof value !== "string") throw new Error("Value must be a string"); + cy.wrap($input).type(value); + } + }); + } else if (type === "enum") { + cy.wrap($el.find(".form-control")).click(); + cy.get(`[data-value="${value}"]`).click({ force: true }); + } }); - cy.get('.btn').contains('Save').click(); - cy.get('.table-header-bottom').find('ul').find('li').contains('Records').click(); -}); - -Cypress.Commands.add("addUserToGroup", (user: string, name: string, location?: string) => { - cy.visit('http://localhost:3000/user_overview/'); - cy.get('td').contains(user).click(); - const group = cy.get('label').contains(name).prev('input[type="checkbox"]'); - group.should('exist'); - group.check({ force: true }); - cy.get('.btn').contains('Save changes').click(); - location && cy.visit(location); -}); \ No newline at end of file +}); + +Cypress.Commands.add("setTablePermissionsByShortName", (shortName: string, permissions: { [key in tablePermissions]?: boolean }) => { + cy.gotoInstanceByShortName(shortName, "edit") + .get("a").contains("Permissions").click() + .get("span").contains('basic').click(); + for (const [group, permission] of Object.entries(permissions)) { + cy.get("label").contains(group).then(($label) => { + const target = $label.attr("for"); + cy.get(`input#${target}`)[permission ? "check" : "uncheck"]({ force: true }); + }); + } + return cy.get("button").contains("Save").click(); +}); + +Cypress.Commands.add("createLayoutsFromDefinition", (layoutDefs: LayoutDefinition) => { + for (const [layoutType, layoutDef] of Object.entries(layoutDefs)) { + const builder = LayoutBuilder.create(layoutType).withName(layoutDef.name).withShortName(layoutDef.shortName); + if ("options" in layoutDef && layoutDef.options) { + for (const option of layoutDef.options.values) { + (builder as IDropdownLayoutBuilder).addOption(option); + } + } + cy.createLayout(builder, true); + builder.checkField(); + } + return cy.mainBody(); +}); + +Cypress.Commands.add("addUserToDefaultGroup", (user: string, CheckOrUncheck: 'check' | 'uncheck' = 'check') => { + return cy.visit('http://localhost:3000/user_overview/') + .get('td').contains(user).click() + .get('input#groups_1')[CheckOrUncheck]({ force: true }) + .get('button[name="submit"]').click(); +}); + +Cypress.Commands.add("addDataToLayoutFromDefinition", (layoutDefs: LayoutDefinition) => { + cy.visit('http://localhost:3000/table1/data'); + cy.get('a.btn-add').contains('Add a record').click(); + for (const layoutDef of Object.values(layoutDefs)) { + cy.setFieldValueByShortName(layoutDef.shortName, layoutDef.data!); + } + return cy.get('button[name="submit"]').contains("Submit and exit").click(); +}); + +Cypress.Commands.add("deleteAllData", (table: string) => { + return cy.setTablePermissionsByShortName(table, { "Delete records": true, "Purge deleted records": true, "Bulk delete records": true }) + .gotoInstanceByShortName(table, "data") + .get("button").contains("Actions").click() + .get("a[data-bs-target='#bulkDelete']").click() + .get("button[type='submit']").contains("Delete").click(); +}); + +Cypress.Commands.add("purgeAllDeletedData", (shortName: string) => { + return cy.visit(`http://localhost:3000/${shortName}/purge`) + .get("input[type='checkbox']").check({ force: true }) + .get("button[data-bs-target='#purge']").click() + .get("button[type='submit']").contains("Confirm").click(); +}); + +Cypress.Commands.add("deleteLayoutsFromDefinitions", (layoutDefs: LayoutDefinition) => { + for (const layoutDef of Object.values(layoutDefs)) { + cy.deleteLayoutByShortName(layoutDef.shortName, true); + } + return cy.mainBody(); +}); + +Cypress.Commands.add("clearAllTablePermissions", (shortName: string) => { + const permissions: { [key in tablePermissions]?: boolean } = { + "Delete records": false, "Purge deleted records": false, "Download records": false, + "Bulk import records": false, "Bulk update records": false, "Bulk delete records": false, + "Manage linked records": false, "Manage child records": false, "Manage views": false, + "Manage group views": false, "Select extra view limits": false, "Manage fields": false, + "Send messages": false + }; + cy.setTablePermissionsByShortName(shortName, permissions); + return cy.mainBody(); +}); + +Cypress.Commands.add("populateTableWithLayouts", () => { + const layoutDefs: LayoutDefinition = { + "TEXT": { name: "Text Field", shortName: "txt_fd" }, + "INTEGER": { name: "Number Field", shortName: "int_fd" }, + "DROPDOWN": { name: "Dropdown Field", shortName: "drop_fd", options: { values: ["Red", "Green", "Blue"]}}, + "DATE": { name: "Date Field", shortName: "date_fd" }, + "DATE-RANGE": { name: "Range Field", shortName: "range_fd" }, + }; + return cy.createLayoutsFromDefinition(layoutDefs); +}); + +Cypress.Commands.add("cleanTableOfLayouts", () => { + const layoutDefs: LayoutDefinition = { + "TEXT": { name: "Text Field", shortName: "txt_fd" }, + "INTEGER": { name: "Number Field", shortName: "int_fd" }, + "DATE": { name: "Date Field", shortName: "date_fd" }, + "DATE-RANGE": { name: "Range Field", shortName: "range_fd" }, + "DROPDOWN": { name: "Dropdown Field", shortName: "drop_fd", options: { values: ["Red", "Green", "Blue"]}} + }; + return cy.deleteLayoutsFromDefinitions(layoutDefs); +}); + +Cypress.Commands.add("clearImports", (shortName) => { + cy.visit(`http://localhost:3000/${shortName}/import`); + cy.contains('button.btn-danger', 'Clear completed reports').click(); + cy.get('#deleteModal').should('be.visible').within(() => { + cy.contains('button', 'Confirm').click(); + }); + return cy.get('td.dt-empty').should('contain.text', 'No imports to show'); +}); + +Cypress.Commands.add("bulkImportRecords", (csvFilePath = 'cypress/fixtures/Import-test-data.csv') => { + cy.visit('http://localhost:3000/table1/data'); + cy.get('button#bulk_actions').click(); + cy.get('a[href="/table1/import/"]').click(); + cy.get('h2.table-header__page-title').should('contain.text', 'Import records'); + cy.get('a[href="/table1/import/data/"]').click(); + cy.get('h2.table-header__page-title').should('contain.text', 'Upload'); + cy.get("label").contains("Dry run").then(($label) => { + const target = $label.attr("for"); + cy.get(`input#${target}`).uncheck({ force: true }); + }); + cy.get('input[type="file"]').selectFile(csvFilePath, { force: true }); + cy.contains('Submit').click(); + cy.get('.alert.alert-success').should('be.visible').and('contain.text', 'The file import process has been started'); + cy.wait(5000); + cy.visit('http://localhost:3000/table1/import'); + cy.get('a.link--plain').contains('Completed').should('exist'); + cy.get('a.link--plain').contains(/errors:\s*0/); + cy.get('a.link--plain').contains(/skipped:\s*0/); + return cy.mainBody(); +}); + +Cypress.Commands.add('logout', () => { + return cy.get('a[href="/logout"]').click(); +}); + +Cypress.Commands.add('deleteCurrentView', () => { + cy.contains("Manage views").click(); + cy.get('a[role="menuitem"]').contains("Edit current view").click(); + cy.get(".btn-js-delete").contains("Delete view").click(); + return cy.get('button[type="submit"]').contains("Delete").click(); +}); + +Cypress.Commands.add('deleteAllViewsForTable', (tableName: string) => { + cy.logout(); + cy.login(goodUser, goodPassword); + cy.visit(`http://localhost:3000/${tableName}/data`); + const checkAndDelete = () => { + cy.get('.dropdown__toggle span').invoke('text').then((text) => { + if (!text.includes('All data')) { + cy.deleteCurrentView(); + checkAndDelete(); + } + }); + }; + checkAndDelete(); + return cy.mainBody(); +}); diff --git a/cypress/support/constants.ts b/cypress/support/constants.ts index 21d58c5c9..5877560ea 100644 --- a/cypress/support/constants.ts +++ b/cypress/support/constants.ts @@ -1,4 +1,9 @@ export const goodUser = "test@example.com"; export const goodPassword = "xyz123"; +export const baseUser = "basic@example.com"; +export const basePassword = "xyz123"; + export type instanceMode = "layout" | "permissions" | "topics" | "edit" | "data" | "report" | undefined; + +export type tablePermissions = "Bulk import records" | "Purge deleted records" | "Download records" | "Delete records" | "Bulk update records" | "Bulk delete records" | "Manage linked records" | "Manage child records" | "Manage views" | "Manage group views" | "Select extra view limits" | "Manage fields" | "Send messages"; \ No newline at end of file diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts index f80f74f8e..d2b57b01e 100644 --- a/cypress/support/e2e.ts +++ b/cypress/support/e2e.ts @@ -17,4 +17,8 @@ import './commands' // Alternatively you can use CommonJS syntax: -// require('./commands') \ No newline at end of file +// require('./commands') + +cy.on('window:confirm', () => { + return true; // Automatically confirm the confirmation dialog +}); diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 000000000..44b4d0fb7 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,51 @@ +import js from "@eslint/js"; +import globals from "globals"; +import tseslint from "typescript-eslint"; +import pluginReact from "eslint-plugin-react"; +import css from "@eslint/css"; +import { defineConfig } from "eslint/config"; +import stylistic from "@stylistic/eslint-plugin"; +import jsdoc from "eslint-plugin-jsdoc"; + +export default defineConfig([ + { settings: { react: { version: "19" } } }, + { ignores: ["*.cjs", "eslint.config.mjs", "**/public/**", "**/node_modules/**", "**/cypress/**", "cypress.config.ts", ".stylelintrc.js", "src/frontend/testing/**", "src/frontend/css/stylesheets/external/**", "src/frontend/components/dashboard/lib/react/polyfills/**", "babel.config.js", "webpack.config.js", "jest.config.js", "tsconfig.json", "src/frontend/js/lib/jqplot/**", "src/frontend/js/lib/jquery/**", "src/frontend/js/lib/plotly/**", "src/frontend/components/timeline/**", "fengari-web.js", "**/*.test.{js,ts,jsx,tsx}"] }, + { files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], plugins: { js }, extends: ["js/recommended"] }, + { files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], languageOptions: { globals: { ...globals.browser, ...globals.jquery } } }, + tseslint.configs.recommended, + pluginReact.configs.flat.recommended, + { files: ["**/*.css"], plugins: { css }, language: "css/css", extends: ["css/recommended"] }, + { plugins: {'@stylistic': stylistic, jsdoc} }, + { + languageOptions: { + parserOptions: { + projectService: true + } + } + }, + { + rules: { + "@typescript-eslint/no-explicit-any": "off", + 'react/prop-types': 'off', + '@stylistic/quotes': ['error', 'single'], + '@stylistic/no-extra-semi': 'error', + '@stylistic/semi': ['error', 'always'], + '@stylistic/curly-newline': 'error', + '@stylistic/indent': ['error', 4], + '@stylistic/comma-dangle': ['error', 'never'], + "jsdoc/require-jsdoc": [ + "error", + { + require: { + FunctionDeclaration: true, + MethodDefinition: true, + ClassDeclaration: true, + ArrowFunctionExpression: false, + FunctionExpression: false + } + } + ], + "@typescript-eslint/no-deprecated": "error" + } + } +]); diff --git a/jest.config.js b/jest.config.js index f7fea59ff..4a0879c5c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -5,202 +5,206 @@ /** @type {import('jest').Config} */ const config = { - // All imported modules in your tests should be mocked automatically - // automock: false, + // All imported modules in your tests should be mocked automatically + // automock: false, + + // Stop running tests after `n` failures + // bail: 0, + + // The directory where Jest should store its cached dependency information + // cacheDirectory: "/tmp/jest_rt", + + // Automatically clear mock calls, instances, contexts and results before every test + // clearMocks: false, + + // Indicates whether the coverage information should be collected while executing the test + // collectCoverage: false, - // Stop running tests after `n` failures - // bail: 0, + // An array of glob patterns indicating a set of files for which coverage information should be collected + // collectCoverageFrom: undefined, - // The directory where Jest should store its cached dependency information - // cacheDirectory: "/tmp/jest_rt", + // The directory where Jest should output its coverage files + // coverageDirectory: undefined, - // Automatically clear mock calls, instances, contexts and results before every test - // clearMocks: false, + // An array of regexp pattern strings used to skip coverage collection + // coveragePathIgnorePatterns: [ + // "/node_modules/" + // ], - // Indicates whether the coverage information should be collected while executing the test - // collectCoverage: false, + // Indicates which provider should be used to instrument code for coverage + // coverageProvider: "babel", - // An array of glob patterns indicating a set of files for which coverage information should be collected - // collectCoverageFrom: undefined, + // A list of reporter names that Jest uses when writing coverage reports + // coverageReporters: [ + // "json", + // "text", + // "lcov", + // "clover" + // ], - // The directory where Jest should output its coverage files - // coverageDirectory: undefined, + // An object that configures minimum threshold enforcement for coverage results + // coverageThreshold: undefined, - // An array of regexp pattern strings used to skip coverage collection - // coveragePathIgnorePatterns: [ - // "/node_modules/" - // ], + // A path to a custom dependency extractor + // dependencyExtractor: undefined, - // Indicates which provider should be used to instrument code for coverage - // coverageProvider: "babel", + // Make calling deprecated APIs throw helpful error messages + // errorOnDeprecated: false, - // A list of reporter names that Jest uses when writing coverage reports - // coverageReporters: [ - // "json", - // "text", - // "lcov", - // "clover" - // ], + // The default configuration for fake timers + // fakeTimers: { + // "enableGlobally": false + // }, - // An object that configures minimum threshold enforcement for coverage results - // coverageThreshold: undefined, + // Force coverage collection from ignored files using an array of glob patterns + // forceCoverageMatch: [], - // A path to a custom dependency extractor - // dependencyExtractor: undefined, + // A path to a module which exports an async function that is triggered once before all test suites + // globalSetup: undefined, - // Make calling deprecated APIs throw helpful error messages - // errorOnDeprecated: false, + // A path to a module which exports an async function that is triggered once after all test suites + // globalTeardown: undefined, - // The default configuration for fake timers - // fakeTimers: { - // "enableGlobally": false - // }, + // A set of global variables that need to be available in all test environments + // globals: {}, - // Force coverage collection from ignored files using an array of glob patterns - // forceCoverageMatch: [], + // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers. + // maxWorkers: "50%", - // A path to a module which exports an async function that is triggered once before all test suites - // globalSetup: undefined, + // An array of directory names to be searched recursively up from the requiring module's location + // moduleDirectories: [ + // "node_modules" + // ], - // A path to a module which exports an async function that is triggered once after all test suites - // globalTeardown: undefined, + // An array of file extensions your modules use + // moduleFileExtensions: [ + // "js", + // "mjs", + // "cjs", + // "jsx", + // "ts", + // "tsx", + // "json", + // "node" + // ], - // A set of global variables that need to be available in all test environments - // globals: {}, + // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module + moduleNameMapper: { + "^component$": "/src/frontend/js/lib/component", + "^validation$": "/src/frontend/js/lib/validation", + "^logging$": "/src/frontend/js/lib/logging", + "^util/(.*)$": "/src/frontend/js/lib/util/$1", + "^components/(.*)$": "/src/frontend/components/$1", + "^set-field-values$": "/src/frontend/js/lib/set-field-values", + "^guid$": "/src/frontend/js/lib/guid", + "^testing/(.*)$": "/src/frontend/testing/$1", + }, - // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers. - // maxWorkers: "50%", + // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader + // modulePathIgnorePatterns: [], - // An array of directory names to be searched recursively up from the requiring module's location - // moduleDirectories: [ - // "node_modules" - // ], + // Activates notifications for test results + // notify: false, - // An array of file extensions your modules use - // moduleFileExtensions: [ - // "js", - // "mjs", - // "cjs", - // "jsx", - // "ts", - // "tsx", - // "json", - // "node" - // ], + // An enum that specifies notification mode. Requires { notify: true } + // notifyMode: "failure-change", - // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module - moduleNameMapper: { - "^component$": "/src/frontend/js/lib/component", - "^validation$": "/src/frontend/js/lib/validation", - "^logging$": "/src/frontend/js/lib/logging", - "^util/(.*)$": "/src/frontend/js/lib/util/$1", - "^components/(.*)$": "/src/frontend/components/$1", - "^set-field-values$": "/src/frontend/js/lib/set-field-values", - "^guid$": "/src/frontend/js/lib/guid", - }, + // A preset that is used as a base for Jest's configuration + // preset: undefined, - // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader - // modulePathIgnorePatterns: [], + // Run tests from one or more projects + // projects: undefined, - // Activates notifications for test results - // notify: false, + // Use this configuration option to add custom reporters to Jest + // reporters: undefined, - // An enum that specifies notification mode. Requires { notify: true } - // notifyMode: "failure-change", + // Automatically reset mock state before every test + // resetMocks: false, - // A preset that is used as a base for Jest's configuration - // preset: undefined, + // Reset the module registry before running each individual test + // resetModules: false, - // Run tests from one or more projects - // projects: undefined, + // A path to a custom resolver + // resolver: undefined, - // Use this configuration option to add custom reporters to Jest - // reporters: undefined, + // Automatically restore mock state and implementation before every test + // restoreMocks: false, - // Automatically reset mock state before every test - // resetMocks: false, + // The root directory that Jest should scan for tests and modules within + // rootDir: undefined, - // Reset the module registry before running each individual test - // resetModules: false, + // A list of paths to directories that Jest should use to search for files in + // roots: [ + // "" + // ], - // A path to a custom resolver - // resolver: undefined, + // Allows you to use a custom runner instead of Jest's default test runner + // runner: "jest-runner", - // Automatically restore mock state and implementation before every test - // restoreMocks: false, + // The paths to modules that run some code to configure or set up the testing environment before each test + setupFiles: ['/src/frontend/testing/setup.ts'], - // The root directory that Jest should scan for tests and modules within - // rootDir: undefined, + // A list of paths to modules that run some code to configure or set up the testing framework before each test + // setupFilesAfterEnv: [], - // A list of paths to directories that Jest should use to search for files in - // roots: [ - // "" - // ], + // The number of seconds after which a test is considered as slow and reported as such in the results. + // slowTestThreshold: 5, - // Allows you to use a custom runner instead of Jest's default test runner - // runner: "jest-runner", + // A list of paths to snapshot serializer modules Jest should use for snapshot testing + // snapshotSerializers: [], - // The paths to modules that run some code to configure or set up the testing environment before each test - // setupFiles: [], + // The test environment that will be used for testing + testEnvironment: "jsdom", - // A list of paths to modules that run some code to configure or set up the testing framework before each test - // setupFilesAfterEnv: [], + // Options that will be passed to the testEnvironment + // testEnvironmentOptions: {}, - // The number of seconds after which a test is considered as slow and reported as such in the results. - // slowTestThreshold: 5, + // Adds a location field to test results + // testLocationInResults: false, - // A list of paths to snapshot serializer modules Jest should use for snapshot testing - // snapshotSerializers: [], + // The glob patterns Jest uses to detect test files + // testMatch: [ + // "**/__tests__/**/*.[jt]s?(x)", + // "**/?(*.)+(spec|test).[tj]s?(x)" + // ], - // The test environment that will be used for testing - testEnvironment: "jsdom", + // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped + testPathIgnorePatterns: [ + "/node_modules", + "/cypress", + "/public", + "/handlebars" + ], - // Options that will be passed to the testEnvironment - // testEnvironmentOptions: {}, + // The regexp pattern or array of patterns that Jest uses to detect test files + // testRegex: [], - // Adds a location field to test results - // testLocationInResults: false, + // This option allows the use of a custom results processor + // testResultsProcessor: undefined, - // The glob patterns Jest uses to detect test files - // testMatch: [ - // "**/__tests__/**/*.[jt]s?(x)", - // "**/?(*.)+(spec|test).[tj]s?(x)" - // ], + // This option allows use of a custom test runner + // testRunner: "jest-circus/runner", - // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped - // testPathIgnorePatterns: [ - // "/node_modules/" - // ], + // A map from regular expressions to paths to transformers + // transform: undefined, - // The regexp pattern or array of patterns that Jest uses to detect test files - // testRegex: [], + // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation + // transformIgnorePatterns: [ + // "/node_modules/", + // "\\.pnp\\.[^\\/]+$" + // ], - // This option allows the use of a custom results processor - // testResultsProcessor: undefined, + // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them + // unmockedModulePathPatterns: undefined, - // This option allows use of a custom test runner - // testRunner: "jest-circus/runner", + // Indicates whether each individual test should be reported during the run + // verbose: undefined, - // A map from regular expressions to paths to transformers - // transform: undefined, + // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode + // watchPathIgnorePatterns: [], - // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation - // transformIgnorePatterns: [ - // "/node_modules/", - // "\\.pnp\\.[^\\/]+$" - // ], - - // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them - // unmockedModulePathPatterns: undefined, - - // Indicates whether each individual test should be reported during the run - // verbose: undefined, - - // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode - // watchPathIgnorePatterns: [], - - // Whether to use watchman for file crawling - // watchman: true, + // Whether to use watchman for file crawling + // watchman: true, }; module.exports = config; diff --git a/lib/GADS.pm b/lib/GADS.pm index 9592bb03b..da1715702 100644 --- a/lib/GADS.pm +++ b/lib/GADS.pm @@ -116,7 +116,7 @@ tie %{schema->storage->dbh->{CachedKids}}, 'Tie::Cache', 100; # required for that) GADS::DB->setup(schema); -our $VERSION = '0.1'; +our $VERSION = '2.8.3'; # set serializer => 'JSON'; set behind_proxy => config->{behind_proxy}; # XXX Why doesn't this work in config file @@ -418,7 +418,7 @@ get '/' => require_login sub { dashboards_json => schema->resultset('Dashboard')->dashboards_json(%params), page => 'index', 'content_block_main_custom_classes' => 'pt-0', - 'content_block_custom_classes' => 'pl-0' + 'content_block_custom_classes' => 'ps-0' }; if (my $download = param('download')) @@ -1760,7 +1760,7 @@ put '/api/file/:id' => require_login sub { } else { - my $file = schema->resultset('Fileval')->find_with_permission($id, logged_in_user, + my $file = schema->resultset('Fileval')->find_with_permission($id, logged_in_user, rename_existing => 1) or error __x"File ID {id} cannot be found", id => $id; @@ -2145,7 +2145,7 @@ prefix '/:layout_name' => sub { dashboards_json => schema->resultset('Dashboard')->dashboards_json(%params), page => 'table_index', header_type => "table_tabs", - content_block_custom_classes => "pl-0", + content_block_custom_classes => "ps-0", content_block_main_custom_classes => "pt-0", header_back_url => "${base_url}table", layout_obj => $layout, @@ -2317,7 +2317,7 @@ prefix '/:layout_name' => sub { any ['get', 'post'] => '/data' => require_login sub { my $layout = var('layout') or pass; - + my $user = logged_in_user; my @additional_filters; @@ -3121,10 +3121,10 @@ prefix '/:layout_name' => sub { } } - return template "historic_purge/initial" => { - columns_view => \@columns, - count => $records->count, - columns_selected => $columns_selected + return template "historic_purge/initial" => { + columns_view => \@columns, + count => $records->count, + columns_selected => $columns_selected }; }; diff --git a/package.json b/package.json index 08d0428c1..d14d1565e 100644 --- a/package.json +++ b/package.json @@ -3,97 +3,97 @@ "version": "0.0.1", "private": true, "scripts": { - "build": "NODE_ENV=production webpack --progress --watch", + "build": "NODE_ENV=production webpack --progress", "lint": "eslint src", "test": "jest", - "build:dev": "webpack --env development --progress -c webpack.config.js -w", + "build:dev": "webpack --env development --progress -w", "test:watch": "jest --watch", - "e2e": "yarn cypress run", - "e2e:open": "yarn cypress open", - "e2e:chrome": "yarn cypress run --browser chrome", - "e2e:firefox": "yarn cypress run --browser firefox", - "e2e:edge": "yarn cypress run --browser edge", - "e2e:electron": "yarn cypress run --browser electron" + "e2e": "yarn cypress run" }, "dependencies": { - "@egjs/hammerjs": "^2.0.0", - "@lol768/jquery-querybuilder-no-eval": "^2.6.0", - "bootstrap": "4.6", + "@egjs/hammerjs": "^2.0.17", + "@popperjs/core": "^2.11.8", + "axe-core": "^4.12.1", + "bootstrap": "^5.3.8", "bootstrap-datepicker": "^1.9.0", - "bootstrap-html5sortable": "^1.0.0", - "bootstrap-select": "^1.13.18", "component-emitter": "^1.3.0", - "datatables.net-bs4": "^2.0.8", - "datatables.net-buttons-bs4": "^3.0.2", - "datatables.net-responsive-bs4": "^3.0.2", - "datatables.net-rowreorder-bs4": "^1.5.0", + "datatables.net-bs5": "^2.3.8", + "datatables.net-responsive-bs5": "^3.0.8", + "datatables.net-rowreorder-bs5": "^1.5.1", "form-serialize": "^0.7.2", - "handlebars": "^4.7.7", - "imports-loader": "^1.2.0", + "handlebars": "^4.7.9", + "jQuery-QueryBuilder": "^3.0.0", "jquery": "^3.6.0", "jquery-ui-sortable-npm": "^1.0.0", - "jstree": "^3.3.12", - "keycharm": "^0.3.0", - "marked": "^9.1.1", - "moment": "^2.24.0", + "jstree": "^3.3.17", + "keycharm": "^0.4.0", + "marked": "^15.0.12", + "moment": "^2.30.1", "popper.js": "^1.16.1", - "propagating-hammerjs": "^1.4.0", - "react": "^16.13.1", - "react-app-polyfill": "^1.0.6", - "react-dom": "^16.13.1", - "react-grid-layout": "^0.18.3", - "react-modal": "^3.11.2", - "regenerator-runtime": "^0.13.11", - "summernote": "^0.8.20", + "propagating-hammerjs": "^3.0.0", + "react": "^19.2.7", + "react-bootstrap": "^2.10.10", + "react-dom": "^19.2.7", + "react-grid-layout": "^1.0.0", + "react-modal": "^3.16.3", + "regenerator-runtime": "^0.14.1", + "summernote": "^0.9.1", "tippy.js": "^6.3.7", "typeahead.js": "^0.11.1", - "uuid": "^7.0.0", - "vis-data": "^6.3.0", - "vis-timeline": "7.4.3", - "vis-util": "^4.0.0" + "uuid": "^14.0.0", + "vis-data": "^8.0.4", + "vis-timeline": "^8.5.1", + "vis-util": "^6.0.0", + "xss": "^1.0.15" }, "devDependencies": { - "@babel/core": "^7.14.6", - "@babel/plugin-transform-react-jsx": "^7.22.15", - "@babel/preset-env": "^7.14.7", - "@babel/preset-react": "^7.16.7", - "@babel/preset-typescript": "^7.16.7", - "@babel/runtime-corejs3": "^7.14.7", - "@jest/globals": "^29.7.0", - "@types/jest": "^29.5.6", - "@types/jquery": "^3.5.24", + "@babel/core": "^7.29.7", + "@babel/highlight": "^7.25.9", + "@babel/preset-env": "^7.29.7", + "@babel/preset-react": "^7.29.7", + "@babel/preset-typescript": "^7.29.7", + "@eslint/css": "^1.3.0", + "@eslint/js": "^10.0.1", + "@jest/globals": "^30.4.1", + "@stylistic/eslint-plugin": "^5.10.0", + "@testing-library/dom": "^10.4.1", + "@testing-library/react": "^16.3.2", + "@types/jest": "^30.0.0", + "@types/jquery": "^4.0.1", "@types/jstree": "^3.3.46", - "@types/react": "^17.0.41", - "@types/react-dom": "^17.0.14", - "@types/react-grid-layout": "^1.3.2", + "@types/node": "^25.9.2", + "@types/react": "^19.2.17", + "@types/react-dom": "^19.2.3", + "@types/react-grid-layout": "^1.0.0", "@types/typeahead.js": "^0.11.6", - "@typescript-eslint/eslint-plugin": "^7.7.0", - "@typescript-eslint/parser": "^7.7.0", + "@typescript-eslint/type-utils": "^8.61.1", "@webpack-cli/serve": "^2.0.1", - "autoprefixer": "^9.8.8", - "babel-jest": "^29.7.0", - "babel-loader": "^8.2.2", + "autoprefixer": "^10.5.0", + "babel-loader": "^10.1.1", "buffer": "^6.0.3", "clean-webpack-plugin": "^4.0.0", - "copy-webpack-plugin": "6", - "core-js": "^3.15.2", - "css-loader": "^3.2.0", - "cypress": "^13.7.2", - "eslint": "^8.57.0", - "eslint-plugin-react": "^7.34.1", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", - "mini-css-extract-plugin": "^2.7.2", - "postcss-loader": "^3.0.0", - "sass": "^1.23.7", - "sass-loader": "^8.0.0", - "terser-webpack-plugin": "^5.3.6", - "ts-loader": "~8.2.0", - "typescript": "5.4.3", - "webpack": "^5.75.0", - "webpack-cli": "^5.0.1", - "webpack-dev-server": "^4.11.1", - "webpack-manifest-plugin": "^5.0.0" + "copy-webpack-plugin": "^14.0.0", + "core-js": "^3.49.0", + "css-loader": "^7.1.4", + "cypress": "^15.16.0", + "cypress-axe": "^1.7.0", + "eslint": "^10.5.0", + "eslint-plugin-jsdoc": "^63.0.5", + "eslint-plugin-react": "^7.37.5", + "globals": "^17.6.0", + "jest": "^30.4.2", + "jest-environment-jsdom": "^30.4.1", + "mini-css-extract-plugin": "^2.10.2", + "postcss": "^8.5.15", + "postcss-loader": "^8.2.1", + "sass": "^1.100.0", + "sass-loader": "^17.0.0", + "terser-webpack-plugin": "^5.6.1", + "ts-loader": "~9.5.2", + "typescript": "~5.8.0", + "typescript-eslint": "^8.61.1", + "webpack": "^5.107.2", + "webpack-cli": "^7.0.3" }, "browserslist": [ "last 2 versions", diff --git a/public/js/site.js b/public/js/site.js index 2f665c294..f7af64049 100644 --- a/public/js/site.js +++ b/public/js/site.js @@ -1 +1 @@ -(()=>{var e,t,n={49616:(e,t,n)=>{"use strict";n.d(t,{Y:()=>AlertBase});class Hidable{constructor(){this.element=null}hide(){this.element&&this.element.remove()}}class AlertBase extends Hidable{constructor(e,t,n=!1){super(),this.message=e,this.type=t,this.transparent=n}render(){if(this.element)throw new Error("AlertBase.render() should not be called multiple times without resetting the element.");const e=document.createElement("div");e.classList.add("alert",`alert-${this.type}`),this.transparent&&e.classList.add("alert-no-bg");for(const t of this.message.split("\n")){const n=document.createElement("p");n.textContent=t,e.appendChild(n)}return this.element=e,e}}},27e3:(e,t,n)=>{"use strict";n.d(t,{Bt:()=>r,Rf:()=>a,kl:()=>s});var i=n(74692);const r=e=>{const t=i(e);t.hasClass("hidden")||(t.addClass("hidden"),t.attr("aria-hidden","true"),t.css("display","none"),t.css("visibility","hidden"))},s=e=>{const t=i(e);t.hasClass("hidden")&&(t.removeClass("hidden"),t.removeAttr("aria-hidden"),t.removeAttr("style"))},a=e=>{try{return e&&""!==e?"string"==typeof e?JSON.parse(e):e:{}}catch(e){return{}}}},68298:(e,t,n)=>{"use strict";async function i(e,t){const n=s(t,"encrypt"),i=crypto.getRandomValues(new Uint8Array(12)),r=(new TextEncoder).encode(e),a=crypto.subtle.encrypt({name:"AES-GCM",iv:i},await n,r),o=Array.from(i),l=Array.from(new Uint8Array(await a)),d=o.concat(l);return btoa(JSON.stringify(d))}async function r(e,t){const n=s(t,"decrypt"),i=JSON.parse(atob(e)),r=new Uint8Array(i.slice(0,12)),a=new Uint8Array(i.slice(12)),o=crypto.subtle.decrypt({name:"AES-GCM",iv:r},await n,a);return(new TextDecoder).decode(await o)}async function s(e,t){const n=(new TextEncoder).encode("salt"),i=new TextEncoder,r=crypto.subtle.importKey("raw",i.encode(e),"PBKDF2",!1,["deriveKey"]),s=crypto.subtle.deriveKey({name:"PBKDF2",salt:n,iterations:1e5,hash:"SHA-256"},await r,{name:"AES-GCM",length:256},!0,[t]);return await s}n.d(t,{A:()=>a});class EncryptedStorage{static instance(){return EncryptedStorage._instance||(EncryptedStorage._instance=new EncryptedStorage(i,r)),EncryptedStorage._instance}constructor(e,t,n){this.encrypt=e,this.decrypt=t,this.storage=n||window.localStorage}async setItem(e,t,n){const i=await this.encrypt(t,n);this.storage.setItem(e,i)}async getItem(e,t){const n=this.storage.getItem(e);return n?await this.decrypt(n,t):null}removeItem(e){this.storage.removeItem(e)}clear(){this.storage.clear()}key(e){return this.storage.key(e)}get length(){return this.storage.length}}class GadsStorage{constructor(){this.test=!1,this.enabled=!0,this.test&&console.log("Using localStorage"),this.storage=this.test?localStorage:EncryptedStorage.instance()}async getStorageKey(){if(window.test)return void(this.storageKey="test");const e=await fetch("/api/get_key"),t=await e.json();if(0!==t.error)throw new Error("Failed to get storage key");this.storageKey=t.key}async setItem(e,t){await this.getItem("recovering")||await this.getItem(e)!==t&&(this.storageKey||await this.getStorageKey(),await this.storage.setItem(e,t,this.storageKey))}async getItem(e){return this.storageKey||await this.getStorageKey(),await this.storage.getItem(e,this.storageKey)}removeItem(e){this.storage.removeItem(e)}clear(){this.storage.clear()}key(e){return this.storage.key(e)}get length(){return this.storage.length}}class NullStorage{constructor(){this.enabled=!1,this.length=0}setItem(){return Promise.resolve()}getItem(){return Promise.resolve(null)}removeItem(){}clear(){}key(){return null}}const a=class AppStorage{static CreateStorageInstance(){return crypto.subtle&&void 0!==crypto.subtle?new GadsStorage:new NullStorage}}.CreateStorageInstance()},40242:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});var i=n(48329);const r=async e=>{const t={description:e,url:window.location.href},n=new i.d("/api/script_error","POST"),r=new MessageUploader(n);return await r.uploadMessage(t.description)};class MessageUploader{constructor(e){this.uploader=e}async uploadMessage(e){const t=document.body.dataset.csrf,n={description:e,url:window.location.href,csrf_token:t};try{return await this.uploader.upload(n)}catch(e){console.error("Failed to upload message:",e)}}}const s=(e,t,n,i,r)=>{let s=`Error: ${e}\nSource: ${t}\nLine: ${n}, Column: ${i}`;return r&&r?.stack&&(s+=`\nStack: ${r?.stack}`),s};window.onerror=function(e,t,n,i,a){if("localhost"===location.host&&console.error("Script error occurred:",e,t,n,i,a),"/api/script_error"===location.pathname||"/login"===location.pathname)return console.error("Script error occurred but not logged to avoid recursion."),void console.error(s(e,t,n,i,a));const o=s(e,t,n,i,a);r(o).catch((e=>{console.error("Failed to upload script error:",e)}))}},84573:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(68298),r=n(27e3);const s=class StorageProvider{get provider(){return this.storage}constructor(e,t=i.A){this.instance=e,this.storage=t}async setItem(e,t){let n=await this.storage.getItem(this.instance);n||(n="{}");const i=(0,r.Rf)(n);i[e]=t,await this.storage.setItem(this.instance,JSON.stringify(i))}async getItem(e){const t=await this.storage.getItem(this.instance);if(!t)return;return(0,r.Rf)(t)[e]||void 0}async getAll(){const e=await this.storage.getItem(this.instance);return e?(0,r.Rf)(e):{}}async clear(){this.storage.removeItem(this.instance)}async removeItem(e){const t=await this.storage.getItem(this.instance);if(!t)return;const n=(0,r.Rf)(t);delete n[e],await this.storage.setItem(this.instance,JSON.stringify(n))}}},48329:(e,t,n)=>{"use strict";n.d(t,{S:()=>r,d:()=>Uploader});var i=n(27e3);async function r(e,t,n="POST",i=(()=>{})){const r=new Uploader(e,n);return r.onProgress(i),r.upload(t)}class Uploader{constructor(e,t){this.url=e,this.method=t}onProgress(e){this.onProgressCallback=e}async upload(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open(this.method,this.url.toString()),r.onabort=()=>n("aborted"),r.onerror=()=>n("error"),r.upload.onprogress=e=>{e.lengthComputable||this.onProgressCallback?.(e.loaded,0),this.onProgressCallback?.(e.loaded,e.total)},r.onreadystatechange=()=>{4===r.readyState&&(200===r.status?t((0,i.Rf)(r.responseText)):n(r.responseText))},e instanceof FormData?r.send(e):(r.setRequestHeader("Content-Type","application/json"),r.send(JSON.stringify(e)))}))}}},56420:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var i=n(74692);const r=window.do_plot_json=function(e,t){((e,t)=>{const n=e.xlabels;let r={};const a="line"==t.type;r.highlighter={showMarker:a,tooltipContentEditor:(e,t,n,i)=>i._plotData[t][n][1]};const o=s();t.type in o?r.seriesDefaults=o[t.type]:r.seriesDefaults=o.default,"donut"!=t.type&&"pie"!=t.type&&(r.series=e.labels,r.axes={xaxis:{renderer:i.jqplot.CategoryAxisRenderer,ticks:n,label:t.x_axis_name,labelRenderer:i.jqplot.CanvasAxisLabelRenderer},yaxis:{label:t.y_axis_label,labelRenderer:i.jqplot.CanvasAxisLabelRenderer}},e.options.y_max&&(r.axes.yaxis.max=e.options.y_max),e.options.is_metric&&(r.axes.yaxis.tickOptions={formatString:"%d%"}),r.axesDefaults={tickRenderer:i.jqplot.CanvasAxisTickRenderer,tickOptions:{angle:-30,fontSize:"8pt"}}),r.stackSeries=t.stackseries,r.legend={renderer:i.jqplot.EnhancedLegendRenderer,show:t.showlegend,location:"ne",placement:"inside"},r.grid={background:"#ffffff",shadow:!1},i(`[data-chart-id=${t.id}]`).jqplot(e.points,r)})(e=JSON.parse(atob(e)),t=JSON.parse(atob(t)))},s=()=>({bar:{renderer:i.jqplot.BarRenderer,rendererOptions:{shadow:!1,fillToZero:!0,barMinWidth:10},pointLabels:{show:!1,hideZeros:!0}},donut:{renderer:i.jqplot.DonutRenderer,rendererOptions:{sliceMargin:3,showDataLabels:!0,dataLabels:"value",shadow:!1}},pie:{renderer:i.jqplot.PieRenderer,rendererOptions:{showDataLabels:!0,startAngle:-90,dataLabels:"value",shadow:!1}},default:{pointLabels:{show:!1}}})},28817:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(17527),r=n(97468);class Frame{constructor(e,t){this.object=e,this.step=e.data("config").step,this.number=e.data("config").frame,this.item=e.data("config").item||null,this.skip=e.data("config").skip||null,this.back=t,this.requiredFields=e.find("input[required]"),this.isValid=!0,this.error=[],this.buttons={next:e.find(".modal-footer .btn-js-next"),back:e.find(".modal-footer .btn-js-back"),skip:e.find(".modal-footer .btn-js-skip"),addNext:e.find(".modal-footer .btn-js-add-next"),invisible:e.find(".modal-footer .btn-js-add-next"),save:e.find(".modal-footer .btn-js-save")}}}var s=n(11977),a=n(74692);class ModalComponent extends i.uA{static get allowReinitialization(){return!0}constructor(e){super(e),this.el=a(this.element),this.isWizzard=this.el.hasClass("modal--wizzard"),this.isForm=this.el.hasClass("modal--form"),this.frames=this.el.find(".modal-frame"),this.typingTimer=null,this.wasInitialized||this.initModal()}initModal(){this.el.on("show.bs.modal",(()=>{if(r.y.addSubscriber(this),this.isWizzard){try{this.activateFrame(1,0)}catch(e){s.m.error(e),this.preventModalToOpen()}this.el.on("hide.bs.modal",(e=>{this.dataHasChanged()&&(confirm("Are you sure you want to close this popup? Any unsaved data will be lost.")||e.preventDefault())}))}(this.isWizzard||this.isForm)&&this.el.on("hidden.bs.modal",(()=>{this.el.off("hide.bs.modal"),r.y.close()})),this.hideContent(!0)}))}dataHasChanged(){const e=a(this.el).find("input, textarea");let t=!1;return e.each(((e,n)=>{if(a(n).val())if("hidden"!==a(n).attr("type")&&"checkbox"!==a(n).attr("type")&&"radio"!==a(n).attr("type")||"hidden"===a(n).attr("type")&&a(n).parents(".select").length){if(a(n).data("original-value")&&a(n).val().toString()!==a(n).data("original-value").toString()||!a(n).data("original-value"))return t=!0,!1}else if("hidden"!==a(n).attr("type")&&(a(n).data("original-value")&&a(n).prop("checked")&&a(n).val()!==a(n).data("original-value").toString()||!a(n).data("original-value")&&a(n).prop("checked")))return t=!0,!1})),t}hideContent(e){e?a("body").children().attr("aria-hidden",!0):a("body").children().removeAttr("aria-hidden")}preventModalToOpen(){const e=this.el.attr("id")||"";a(`.btn[data-target="#${e}"]`).on("click",(function(e){e.stopPropagation()}))}clearFields(e){a(e).find("input, textarea").each(((e,t)=>{const n=a(t);"radio"===n.attr("type")?n.prop("checked",!1):"checkbox"===n.attr("type")?n.is(":checked")&&n.trigger("click"):(n.data("restore-value")?n.val(n.data("restore-value")):n.val(""),a(t).removeData("original-value"),n.trigger("change")),n.is(":invalid")&&(n.attr("aria-invalid",!1),n.closest(".input").removeClass("input--invalid"))}))}clearFrames(e){e?a(e).each(((e,t)=>{const n=this.getFrameByNumber(t);n&&this.clearFields(n)})):this.frames.each(((e,t)=>{this.clearFields(t)}))}getFrameNumber(e){const t=a(e).data("config");if(t.frame&&!isNaN(t.frame))return t.frame}getFrameByNumber(e){let t=null;return this.frames.each(((n,i)=>{if(a(i).data("config").frame===e)return t=i,!1})),t}activateFrame(e,t,n){this.frames.each(((i,r)=>{const o=a(r).data("config");if(!o.frame||isNaN(o.frame))throw"activateFrame: frame is not a number!";if(this.unbindEventHandlers(a(r)),o.frame===e){try{this.frame=this.createFrame(r,t)}catch(e){s.m.error(e)}this.frame.object.removeClass("invisible"),this.frame.object.find(".alert").hide(),this.activateStep(this.frame.step),this.bindEventHandlers(),this.frame.requiredFields.length&&(this.frame.buttons.next&&this.setNextButtonState(!1),this.frame.buttons.invisible&&this.setInvisibleButtonState(!1)),n&&(this.clearFields(r),this.validateFrame())}else a(r).addClass("invisible")}))}createFrame(e,t){if(isNaN(a(e).data("config").step)||isNaN(a(e).data("config").frame))throw"createFrame: Parameter is not a number!";if(a(e).data("config").skip&&isNaN(a(e).data("config").skip))throw"createFrame: Skip parameter is not a number!";return new Frame(a(e),t)}bindEventHandlers(){this.frame.buttons.next.click((()=>{r.y.next(this.frame.object)})),this.frame.buttons.back.click((()=>{r.y.back(this.frame.object)})),this.frame.buttons.skip.click((()=>{this.frame.skip&&r.y.skip(this.frame.skip)})),this.frame.buttons.addNext.click((()=>{r.y.add(this.frame.object)})),this.frame.buttons.save.click((()=>{r.y.save()})),this.frame.requiredFields.bind("keyup.modalEvent",(e=>{this.handleKeyup(e)})),this.frame.requiredFields.bind("keydown.modalEvent",(()=>{this.handleKeydown()})),this.frame.requiredFields.bind("blur.modalEvent",(e=>{this.handleBlur(e)}))}handleKeyup(e){const t=e.target;clearTimeout(this.typingTimer),this.typingTimer=setTimeout((()=>{a(t).val()&&this.validateField(t)}),1e3)}handleKeydown(){clearTimeout(this.typingTimer)}handleBlur(e){const t=e.target;clearTimeout(this.typingTimer),a(t).val()&&this.validateField(t)}isValidField(e){return!a(e).is(":invalid")&&""!=a(e).val()}validateField(e){const t=this.isValidField(e);if(this.frame.error=[],!t){const t=a(e).closest(".input").find("label").html();this.frame.error.push(`${t} is invalid`)}this.setInputState(a(e),t),this.validateFrame()}validateFrame(){this.frame&&(this.frame.isValid=!0,this.frame.requiredFields.each(((e,t)=>{this.isValidField(a(t))||(this.frame.isValid=!1)})),this.setFrameState())}setInputState(e){e.is(":invalid")?(e.attr("aria-invalid",!0),e.closest(".input").addClass("input--invalid")):(e.attr("aria-invalid",!1),e.closest(".input").removeClass("input--invalid"))}setFrameState(){const e=this.frame.object.find(".alert");if(this.frame.buttons.next&&this.setNextButtonState(this.frame.isValid),this.frame.buttons.invisible&&this.setInvisibleButtonState(this.frame.isValid),!this.frame.isValid&&this.frame.error.length>0){const t="

There were problems with the following fields:

";let n="";a.each(this.frame.error,((e,t)=>{const i=a("").text(t).html();n+=`
  • ${i}
  • `})),e.html(`
    ${t}
      ${n}
    `),e.show(),this.el.animate({scrollTop:e.offset().top},500)}else e.hide()}unbindEventHandlers(e){e.find(".modal-footer .btn").unbind(),e.find("input[required]").unbind(".modalEvent")}setNextButtonState(e){e?(this.frame.buttons.next.removeAttr("disabled"),this.frame.buttons.next.removeClass("btn-disabled"),this.frame.buttons.next.addClass("btn-default")):(this.frame.buttons.next.attr("disabled","disabled"),this.frame.buttons.next.addClass("btn-disabled"),this.frame.buttons.next.removeClass("btn-default"))}setInvisibleButtonState(e){e?this.frame.buttons.invisible.removeClass("btn-invisible"):this.frame.buttons.invisible.addClass("btn-invisible")}activateStep(e){this.el.find(".modal__step").each(((t,n)=>{a(n).data("step")===e?a(n).addClass("modal__step--active"):a(n).removeClass("modal__step--active")}))}handleUpload(e){const t=this,n=this.el.data("config").url,i=this.el.data("config").id,r=a("body").data("csrf").toString();e.csrf_token=r||"";const s=JSON.stringify(e),o=i?`${n}/${i}`:n;a.ajax({method:"POST",contentType:"application/json",url:o,data:s,processData:!1}).done((function(){location.reload()})).fail((function(e){const n=e.responseJSON.message;t.showError(n)}))}showError(e){const t=this.frame.object.find(".alert"),n=a("").text(e).html();t.html(`

    Error: ${n}

    `),t.show(),this.el.animate({scrollTop:t.offset().top},500)}handleNext(){const e=this.frame.number+1;this.frames.length>=e&&this.activateFrame(e,this.frame.number)}handleBack(){this.frame.back>0&&this.activateFrame(this.frame.back,this.frame.back-1),this.validateFrame()}handleSkip(e){this.activateFrame(e,this.frame.number)}handleAdd(e){r.y.update(e),this.clearFields(e),this.validateFrame()}handleActivate(e,t){this.activateFrame(e,this.frame.number,t)}handleShow(e){a(e).modal("show")}handleClear(e){this.clearFrames(e)}handleValidate(){this.validateFrame()}handleClose(){this.clearFrames(),this.isWizzard&&(this.activateFrame(1,0,!0),this.el.data("config")&&this.el.data("config").id&&(this.el.data("config").id=null)),this.el.unbind("hide.bs.modal hidden.bs.modal"),r.y.unsubscribe(this)}}const o=ModalComponent},97468:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});const i=new class Modal{constructor(){this.observers=[]}addSubscriber(e){this.observers.push(e)}unsubscribe(e){var t=this.observers.indexOf(e);this.observers.splice(t,1)}activate(e,t,n){this.observers.forEach((i=>i.handleActivate?.(e,t,n)))}add(e){this.observers.forEach((t=>t.handleAdd?.(e)))}back(e){this.observers.forEach((t=>t.handleBack?.(e)))}next(e){this.observers.forEach((t=>t.handleNext?.(e)))}show(e){this.observers.forEach((t=>t.handleShow?.(e)))}save(){this.observers.forEach((e=>e.handleSave?.()))}upload(e){this.observers.forEach((t=>t.handleUpload?.(e)))}clear(e){this.observers.forEach((t=>t.handleClear?.(e)))}close(){this.observers.forEach((e=>e.handleClose?.()))}skip(e){this.observers.forEach((t=>t.handleSkip?.(e)))}validate(){this.observers.forEach((e=>e.handleValidate?.()))}update(e){this.observers.forEach((t=>t.handleUpdate?.(e)))}}},22224:(e,t,n)=>{"use strict";n.d(t,{n:()=>a,o:()=>d});var i=n(74692);const r=function(e,t,n){const i=t+"px",r=e+n+"px";if(this.css({left:i,top:r}),document.body&&document.body.clientWidth&&this.get(0).getBoundingClientRect){const e=document.body.clientWidth-this.get(0).getBoundingClientRect().right;e<0&&this.css({left:t+e+"px"})}},s=function(e,t,n,i){t.attr("aria-expanded",n),t.toggleClass("expanded--permanent",n&&i);const s=t.data("label-expanded"),a=t.data("label-collapsed");a&&s&&t.text(n?s:a);const o=t.siblings(".expandable").first();if(o.toggleClass("expanded",n),o.hasClass("popover")){const e=t.offset();let n=e.top,i=e.left;const s=t.offsetParent();if(s){const e=s.offset();n-=e.top,i-=e.left}r.call(o,n,i,t.outerHeight()+6)}t.trigger(n?"expand":"collapse",o),e.stopPropagation()},a=function(e){const t=i(this),n=t.hasClass("expanded--permanent");s(e,t,!n,!0)},o=function(e){const t=i(this);"true"===t.attr("aria-expanded")||s(e,t,!0,!1)},l=function(e){const t=i(this),n="true"===t.attr("aria-expanded"),r=t.hasClass("expanded--permanent");n&&!r&&s(e,t,!1,!1)},d=function(e){i(".trigger[aria-expanded]",e).on("click keydown",(function(e){"click"!==e.type&&("keydown"!==e.type||13!==e.which&&32!==e.which)||(e.preventDefault(),a.call(this,e))})),i(".trigger[aria-expanded][data-expand-on-hover=true]",e).on("mouseover",o),i(".trigger[aria-expanded][data-expand-on-hover=true]",e).on("mouseout",l)}},96688:(e,t,n)=>{"use strict";n.d(t,{B:()=>i});const i=new class MoreLess{constructor(){this.observers=[]}addSubscriber(e){this.observers.push(e)}unsubscribe(e){var t=this.observers.indexOf(e);this.observers.splice(t,1)}reinitialize(){this.observers.forEach((e=>e.reInitMoreLess?.()))}}},63513:(e,t,n)=>{"use strict";n.d(t,{W:()=>i});const i=new class SidebarObservable{constructor(){this.observers=[]}addSubscriber(e){this.observers.push(e)}sideBarChange(){this.observers.forEach((e=>e.handleSideBarChange?.()))}}},30410:(e,t,n)=>{"use strict";n.d(t,{A:()=>pt});var i=n(17527);function r(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function s(e){return e instanceof r(e).Element||e instanceof Element}function a(e){return e instanceof r(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof r(e).ShadowRoot||e instanceof ShadowRoot)}var l=Math.max,d=Math.min,c=Math.round;function h(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function u(){return!/^((?!chrome|android).)*safari/i.test(h())}function f(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),o=1,l=1;t&&a(e)&&(o=e.offsetWidth>0&&c(i.width)/e.offsetWidth||1,l=e.offsetHeight>0&&c(i.height)/e.offsetHeight||1);var d=(s(e)?r(e):window).visualViewport,h=!u()&&n,f=(i.left+(h&&d?d.offsetLeft:0))/o,p=(i.top+(h&&d?d.offsetTop:0))/l,g=i.width/o,m=i.height/l;return{width:g,height:m,top:p,right:f+g,bottom:p+m,left:f,x:f,y:p}}function p(e){var t=r(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function g(e){return e?(e.nodeName||"").toLowerCase():null}function m(e){return((s(e)?e.ownerDocument:e.document)||window.document).documentElement}function _(e){return f(m(e)).left+p(e).scrollLeft}function v(e){return r(e).getComputedStyle(e)}function y(e){var t=v(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function b(e,t,n){void 0===n&&(n=!1);var i,s,o=a(t),l=a(t)&&function(e){var t=e.getBoundingClientRect(),n=c(t.width)/e.offsetWidth||1,i=c(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),d=m(t),h=f(e,l,n),u={scrollLeft:0,scrollTop:0},v={x:0,y:0};return(o||!o&&!n)&&(("body"!==g(t)||y(d))&&(u=(i=t)!==r(i)&&a(i)?{scrollLeft:(s=i).scrollLeft,scrollTop:s.scrollTop}:p(i)),a(t)?((v=f(t,!0)).x+=t.clientLeft,v.y+=t.clientTop):d&&(v.x=_(d))),{x:h.left+u.scrollLeft-v.x,y:h.top+u.scrollTop-v.y,width:h.width,height:h.height}}function w(e){var t=f(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function k(e){return"html"===g(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||m(e)}function x(e){return["html","body","#document"].indexOf(g(e))>=0?e.ownerDocument.body:a(e)&&y(e)?e:x(k(e))}function j(e,t){var n;void 0===t&&(t=[]);var i=x(e),s=i===(null==(n=e.ownerDocument)?void 0:n.body),a=r(i),o=s?[a].concat(a.visualViewport||[],y(i)?i:[]):i,l=t.concat(o);return s?l:l.concat(j(k(o)))}function C(e){return["table","td","th"].indexOf(g(e))>=0}function T(e){return a(e)&&"fixed"!==v(e).position?e.offsetParent:null}function E(e){for(var t=r(e),n=T(e);n&&C(n)&&"static"===v(n).position;)n=T(n);return n&&("html"===g(n)||"body"===g(n)&&"static"===v(n).position)?t:n||function(e){var t=/firefox/i.test(h());if(/Trident/i.test(h())&&a(e)&&"fixed"===v(e).position)return null;var n=k(e);for(o(n)&&(n=n.host);a(n)&&["html","body"].indexOf(g(n))<0;){var i=v(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}var D="top",S="bottom",A="right",O="left",N="auto",L=[D,S,A,O],M="start",I="end",P="clippingParents",F="viewport",$="popper",R="reference",q=L.reduce((function(e,t){return e.concat([t+"-"+M,t+"-"+I])}),[]),H=[].concat(L,[N]).reduce((function(e,t){return e.concat([t,t+"-"+M,t+"-"+I])}),[]),U=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function B(e){var t=new Map,n=new Set,i=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var i=t.get(e);i&&r(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),i}var z={placement:"bottom",modifiers:[],strategy:"absolute"};function W(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function J(e){var t,n=e.reference,i=e.element,r=e.placement,s=r?K(r):null,a=r?X(r):null,o=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(s){case D:t={x:o,y:n.y-i.height};break;case S:t={x:o,y:n.y+n.height};break;case A:t={x:n.x+n.width,y:l};break;case O:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var d=s?Q(s):null;if(null!=d){var c="y"===d?"height":"width";switch(a){case M:t[d]=t[d]-(n[c]/2-i[c]/2);break;case I:t[d]=t[d]+(n[c]/2-i[c]/2)}}return t}var Z={top:"auto",right:"auto",bottom:"auto",left:"auto"};function G(e){var t,n=e.popper,i=e.popperRect,s=e.placement,a=e.variation,o=e.offsets,l=e.position,d=e.gpuAcceleration,h=e.adaptive,u=e.roundOffsets,f=e.isFixed,p=o.x,g=void 0===p?0:p,_=o.y,y=void 0===_?0:_,b="function"==typeof u?u({x:g,y}):{x:g,y};g=b.x,y=b.y;var w=o.hasOwnProperty("x"),k=o.hasOwnProperty("y"),x=O,j=D,C=window;if(h){var T=E(n),N="clientHeight",L="clientWidth";if(T===r(n)&&"static"!==v(T=m(n)).position&&"absolute"===l&&(N="scrollHeight",L="scrollWidth"),s===D||(s===O||s===A)&&a===I)j=S,y-=(f&&T===C&&C.visualViewport?C.visualViewport.height:T[N])-i.height,y*=d?1:-1;if(s===O||(s===D||s===S)&&a===I)x=A,g-=(f&&T===C&&C.visualViewport?C.visualViewport.width:T[L])-i.width,g*=d?1:-1}var M,P=Object.assign({position:l},h&&Z),F=!0===u?function(e,t){var n=e.x,i=e.y,r=t.devicePixelRatio||1;return{x:c(n*r)/r||0,y:c(i*r)/r||0}}({x:g,y},r(n)):{x:g,y};return g=F.x,y=F.y,d?Object.assign({},P,((M={})[j]=k?"0":"",M[x]=w?"0":"",M.transform=(C.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",M)):Object.assign({},P,((t={})[j]=k?y+"px":"",t[x]=w?g+"px":"",t.transform="",t))}const ee={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},r=t.elements[e];a(r)&&g(r)&&(Object.assign(r.style,n),Object.keys(i).forEach((function(e){var t=i[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],r=t.attributes[e]||{},s=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});a(i)&&g(i)&&(Object.assign(i.style,s),Object.keys(r).forEach((function(e){i.removeAttribute(e)})))}))}},requires:["computeStyles"]};const te={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.offset,s=void 0===r?[0,0]:r,a=H.reduce((function(e,n){return e[n]=function(e,t,n){var i=K(e),r=[O,D].indexOf(i)>=0?-1:1,s="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=s[0],o=s[1];return a=a||0,o=(o||0)*r,[O,A].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}(n,t.rects,s),e}),{}),o=a[t.placement],l=o.x,d=o.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=a}};var ne={left:"right",right:"left",bottom:"top",top:"bottom"};function ie(e){return e.replace(/left|right|bottom|top/g,(function(e){return ne[e]}))}var re={start:"end",end:"start"};function se(e){return e.replace(/start|end/g,(function(e){return re[e]}))}function ae(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function oe(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function le(e,t,n){return t===F?oe(function(e,t){var n=r(e),i=m(e),s=n.visualViewport,a=i.clientWidth,o=i.clientHeight,l=0,d=0;if(s){a=s.width,o=s.height;var c=u();(c||!c&&"fixed"===t)&&(l=s.offsetLeft,d=s.offsetTop)}return{width:a,height:o,x:l+_(e),y:d}}(e,n)):s(t)?function(e,t){var n=f(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):oe(function(e){var t,n=m(e),i=p(e),r=null==(t=e.ownerDocument)?void 0:t.body,s=l(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=l(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-i.scrollLeft+_(e),d=-i.scrollTop;return"rtl"===v(r||n).direction&&(o+=l(n.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:o,y:d}}(m(e)))}function de(e,t,n,i){var r="clippingParents"===t?function(e){var t=j(k(e)),n=["absolute","fixed"].indexOf(v(e).position)>=0&&a(e)?E(e):e;return s(n)?t.filter((function(e){return s(e)&&ae(e,n)&&"body"!==g(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),c=o[0],h=o.reduce((function(t,n){var r=le(e,n,i);return t.top=l(r.top,t.top),t.right=d(r.right,t.right),t.bottom=d(r.bottom,t.bottom),t.left=l(r.left,t.left),t}),le(e,c,i));return h.width=h.right-h.left,h.height=h.bottom-h.top,h.x=h.left,h.y=h.top,h}function ce(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function he(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ue(e,t){void 0===t&&(t={});var n=t,i=n.placement,r=void 0===i?e.placement:i,a=n.strategy,o=void 0===a?e.strategy:a,l=n.boundary,d=void 0===l?P:l,c=n.rootBoundary,h=void 0===c?F:c,u=n.elementContext,p=void 0===u?$:u,g=n.altBoundary,_=void 0!==g&&g,v=n.padding,y=void 0===v?0:v,b=ce("number"!=typeof y?y:he(y,L)),w=p===$?R:$,k=e.rects.popper,x=e.elements[_?w:p],j=de(s(x)?x:x.contextElement||m(e.elements.popper),d,h,o),C=f(e.elements.reference),T=J({reference:C,element:k,strategy:"absolute",placement:r}),E=oe(Object.assign({},k,T)),O=p===$?E:C,N={top:j.top-O.top+b.top,bottom:O.bottom-j.bottom+b.bottom,left:j.left-O.left+b.left,right:O.right-j.right+b.right},M=e.modifiersData.offset;if(p===$&&M){var I=M[r];Object.keys(N).forEach((function(e){var t=[A,S].indexOf(e)>=0?1:-1,n=[D,S].indexOf(e)>=0?"y":"x";N[e]+=I[n]*t}))}return N}function fe(e,t,n){return l(e,d(t,n))}const pe={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.mainAxis,s=void 0===r||r,a=n.altAxis,o=void 0!==a&&a,c=n.boundary,h=n.rootBoundary,u=n.altBoundary,f=n.padding,p=n.tether,g=void 0===p||p,m=n.tetherOffset,_=void 0===m?0:m,v=ue(t,{boundary:c,rootBoundary:h,padding:f,altBoundary:u}),y=K(t.placement),b=X(t.placement),k=!b,x=Q(y),j="x"===x?"y":"x",C=t.modifiersData.popperOffsets,T=t.rects.reference,N=t.rects.popper,L="function"==typeof _?_(Object.assign({},t.rects,{placement:t.placement})):_,I="number"==typeof L?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(C){if(s){var $,R="y"===x?D:O,q="y"===x?S:A,H="y"===x?"height":"width",U=C[x],B=U+v[R],z=U-v[q],W=g?-N[H]/2:0,V=b===M?T[H]:N[H],Y=b===M?-N[H]:-T[H],J=t.elements.arrow,Z=g&&J?w(J):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=G[R],te=G[q],ne=fe(0,T[H],Z[H]),ie=k?T[H]/2-W-ne-ee-I.mainAxis:V-ne-ee-I.mainAxis,re=k?-T[H]/2+W+ne+te+I.mainAxis:Y+ne+te+I.mainAxis,se=t.elements.arrow&&E(t.elements.arrow),ae=se?"y"===x?se.clientTop||0:se.clientLeft||0:0,oe=null!=($=null==P?void 0:P[x])?$:0,le=U+re-oe,de=fe(g?d(B,U+ie-oe-ae):B,U,g?l(z,le):z);C[x]=de,F[x]=de-U}if(o){var ce,he="x"===x?D:O,pe="x"===x?S:A,ge=C[j],me="y"===j?"height":"width",_e=ge+v[he],ve=ge-v[pe],ye=-1!==[D,O].indexOf(y),be=null!=(ce=null==P?void 0:P[j])?ce:0,we=ye?_e:ge-T[me]-N[me]-be+I.altAxis,ke=ye?ge+T[me]+N[me]-be-I.altAxis:ve,xe=g&&ye?function(e,t,n){var i=fe(e,t,n);return i>n?n:i}(we,ge,ke):fe(g?we:_e,ge,g?ke:ve);C[j]=xe,F[j]=xe-ge}t.modifiersData[i]=F}},requiresIfExists:["offset"]};const ge={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,r=e.options,s=n.elements.arrow,a=n.modifiersData.popperOffsets,o=K(n.placement),l=Q(o),d=[O,A].indexOf(o)>=0?"height":"width";if(s&&a){var c=function(e,t){return ce("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:he(e,L))}(r.padding,n),h=w(s),u="y"===l?D:O,f="y"===l?S:A,p=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],g=a[l]-n.rects.reference[l],m=E(s),_=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,v=p/2-g/2,y=c[u],b=_-h[d]-c[f],k=_/2-h[d]/2+v,x=fe(y,k,b),j=l;n.modifiersData[i]=((t={})[j]=x,t.centerOffset=x-k,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&ae(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function me(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function _e(e){return[D,A,S,O].some((function(t){return e[t]>=0}))}var ve=V({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,i=e.options,s=i.scroll,a=void 0===s||s,o=i.resize,l=void 0===o||o,d=r(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach((function(e){e.addEventListener("scroll",n.update,Y)})),l&&d.addEventListener("resize",n.update,Y),function(){a&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Y)})),l&&d.removeEventListener("resize",n.update,Y)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=J({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,i=n.gpuAcceleration,r=void 0===i||i,s=n.adaptive,a=void 0===s||s,o=n.roundOffsets,l=void 0===o||o,d={placement:K(t.placement),variation:X(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,G(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,G(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ee,te,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=n.mainAxis,s=void 0===r||r,a=n.altAxis,o=void 0===a||a,l=n.fallbackPlacements,d=n.padding,c=n.boundary,h=n.rootBoundary,u=n.altBoundary,f=n.flipVariations,p=void 0===f||f,g=n.allowedAutoPlacements,m=t.options.placement,_=K(m),v=l||(_===m||!p?[ie(m)]:function(e){if(K(e)===N)return[];var t=ie(e);return[se(e),t,se(t)]}(m)),y=[m].concat(v).reduce((function(e,n){return e.concat(K(n)===N?function(e,t){void 0===t&&(t={});var n=t,i=n.placement,r=n.boundary,s=n.rootBoundary,a=n.padding,o=n.flipVariations,l=n.allowedAutoPlacements,d=void 0===l?H:l,c=X(i),h=c?o?q:q.filter((function(e){return X(e)===c})):L,u=h.filter((function(e){return d.indexOf(e)>=0}));0===u.length&&(u=h);var f=u.reduce((function(t,n){return t[n]=ue(e,{placement:n,boundary:r,rootBoundary:s,padding:a})[K(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:c,rootBoundary:h,padding:d,flipVariations:p,allowedAutoPlacements:g}):n)}),[]),b=t.rects.reference,w=t.rects.popper,k=new Map,x=!0,j=y[0],C=0;C=0,F=P?"width":"height",$=ue(t,{placement:T,boundary:c,rootBoundary:h,altBoundary:u,padding:d}),R=P?I?A:O:I?S:D;b[F]>w[F]&&(R=ie(R));var U=ie(R),B=[];if(s&&B.push($[E]<=0),o&&B.push($[R]<=0,$[U]<=0),B.every((function(e){return e}))){j=T,x=!1;break}k.set(T,B)}if(x)for(var z=function(e){var t=y.find((function(t){var n=k.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return j=t,"break"},W=p?3:1;W>0;W--){if("break"===z(W))break}t.placement!==j&&(t.modifiersData[i]._skip=!0,t.placement=j,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},pe,ge,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,s=t.modifiersData.preventOverflow,a=ue(t,{elementContext:"reference"}),o=ue(t,{altBoundary:!0}),l=me(a,i),d=me(o,r,s),c=_e(l),h=_e(d);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":h})}}]}),ye="tippy-content",be="tippy-backdrop",we="tippy-arrow",ke="tippy-svg-arrow",xe={passive:!0,capture:!0},je=function(){return document.body};function Ce(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function Te(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Ee(e,t){return"function"==typeof e?e.apply(void 0,t):e}function De(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout((function(){e(i)}),t)};var n}function Se(e){return[].concat(e)}function Ae(e,t){-1===e.indexOf(t)&&e.push(t)}function Oe(e){return e.split("-")[0]}function Ne(e){return[].slice.call(e)}function Le(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function Me(){return document.createElement("div")}function Ie(e){return["Element","Fragment"].some((function(t){return Te(e,t)}))}function Pe(e){return Te(e,"MouseEvent")}function Fe(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function $e(e){return Ie(e)?[e]:function(e){return Te(e,"NodeList")}(e)?Ne(e):Array.isArray(e)?e:Ne(document.querySelectorAll(e))}function Re(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function qe(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function He(e){var t,n=Se(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function Ue(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[i](t,n)}))}function Be(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=null==n.getRootNode||null==(i=n.getRootNode())?void 0:i.host}return!1}var ze={isTouch:!1},We=0;function Ve(){ze.isTouch||(ze.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ye))}function Ye(){var e=performance.now();e-We<20&&(ze.isTouch=!1,document.removeEventListener("mousemove",Ye)),We=e}function Ke(){var e=document.activeElement;if(Fe(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Xe=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Qe={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Je=Object.assign({appendTo:je,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Qe,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Ze=Object.keys(Je);function Ge(e){var t=(e.plugins||[]).reduce((function(t,n){var i,r=n.name,s=n.defaultValue;r&&(t[r]=void 0!==e[r]?e[r]:null!=(i=Je[r])?i:s);return t}),{});return Object.assign({},e,t)}function et(e,t){var n=Object.assign({},t,{content:Ee(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ge(Object.assign({},Je,{plugins:t}))):Ze).reduce((function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(e){t[n]=i}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Je.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}var tt=function(){return"innerHTML"};function nt(e,t){e[tt()]=t}function it(e){var t=Me();return!0===e?t.className=we:(t.className=ke,Ie(e)?t.appendChild(e):nt(t,e)),t}function rt(e,t){Ie(t.content)?(nt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?nt(e,t.content):e.textContent=t.content)}function st(e){var t=e.firstElementChild,n=Ne(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(ye)})),arrow:n.find((function(e){return e.classList.contains(we)||e.classList.contains(ke)})),backdrop:n.find((function(e){return e.classList.contains(be)}))}}function at(e){var t=Me(),n=Me();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=Me();function r(n,i){var r=st(t),s=r.box,a=r.content,o=r.arrow;i.theme?s.setAttribute("data-theme",i.theme):s.removeAttribute("data-theme"),"string"==typeof i.animation?s.setAttribute("data-animation",i.animation):s.removeAttribute("data-animation"),i.inertia?s.setAttribute("data-inertia",""):s.removeAttribute("data-inertia"),s.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?s.setAttribute("role",i.role):s.removeAttribute("role"),n.content===i.content&&n.allowHTML===i.allowHTML||rt(a,e.props),i.arrow?o?n.arrow!==i.arrow&&(s.removeChild(o),s.appendChild(it(i.arrow))):s.appendChild(it(i.arrow)):o&&s.removeChild(o)}return i.className=ye,i.setAttribute("data-state","hidden"),rt(i,e.props),t.appendChild(n),n.appendChild(i),r(e.props,e.props),{popper:t,onUpdate:r}}at.$$tippy=!0;var ot=1,lt=[],dt=[];function ct(e,t){var n,i,r,s,a,o,l,d,c=et(e,Object.assign({},Je,Ge(Le(t)))),h=!1,u=!1,f=!1,p=!1,g=[],m=De(Y,c.interactiveDebounce),_=ot++,v=(d=c.plugins).filter((function(e,t){return d.indexOf(e)===t})),y={id:_,reference:e,popper:Me(),popperInstance:null,props:c,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(r)},setProps:function(t){0;if(y.state.isDestroyed)return;L("onBeforeUpdate",[y,t]),W();var n=y.props,i=et(e,Object.assign({},n,Le(t),{ignoreAttributes:!0}));y.props=i,z(),n.interactiveDebounce!==i.interactiveDebounce&&(P(),m=De(Y,i.interactiveDebounce));n.triggerTarget&&!i.triggerTarget?Se(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):i.triggerTarget&&e.removeAttribute("aria-expanded");I(),N(),k&&k(n,i);y.popperInstance&&(J(),G().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));L("onAfterUpdate",[y,t])},setContent:function(e){y.setProps({content:e})},show:function(){0;var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,i=ze.isTouch&&!y.props.touch,r=Ce(y.props.duration,0,Je.duration);if(e||t||n||i)return;if(D().hasAttribute("disabled"))return;if(L("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,E()&&(w.style.visibility="visible");N(),q(),y.state.isMounted||(w.style.transition="none");if(E()){var s=A();Re([s.box,s.content],0)}o=function(){var e;if(y.state.isVisible&&!p){if(p=!0,w.offsetHeight,w.style.transition=y.props.moveTransition,E()&&y.props.animation){var t=A(),n=t.box,i=t.content;Re([n,i],r),qe([n,i],"visible")}M(),I(),Ae(dt,y),null==(e=y.popperInstance)||e.forceUpdate(),L("onMount",[y]),y.props.animation&&E()&&function(e,t){U(e,t)}(r,(function(){y.state.isShown=!0,L("onShown",[y])}))}},function(){var e,t=y.props.appendTo,n=D();e=y.props.interactive&&t===je||"parent"===t?n.parentNode:Ee(t,[n]);e.contains(w)||e.appendChild(w);y.state.isMounted=!0,J(),!1}()},hide:function(){0;var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,i=Ce(y.props.duration,1,Je.duration);if(e||t||n)return;if(L("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,p=!1,h=!1,E()&&(w.style.visibility="hidden");if(P(),H(),N(!0),E()){var r=A(),s=r.box,a=r.content;y.props.animation&&(Re([s,a],i),qe([s,a],"hidden"))}M(),I(),y.props.animation?E()&&function(e,t){U(e,(function(){!y.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&t()}))}(i,y.unmount):y.unmount()},hideWithInteractivity:function(e){0;S().addEventListener("mousemove",m),Ae(lt,m),m(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){0;y.state.isVisible&&y.hide();if(!y.state.isMounted)return;Z(),G().forEach((function(e){e._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);dt=dt.filter((function(e){return e!==y})),y.state.isMounted=!1,L("onHidden",[y])},destroy:function(){0;if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),W(),delete e._tippy,y.state.isDestroyed=!0,L("onDestroy",[y])}};if(!c.render)return y;var b=c.render(y),w=b.popper,k=b.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+y.id,y.popper=w,e._tippy=y,w._tippy=y;var x=v.map((function(e){return e.fn(y)})),j=e.hasAttribute("aria-expanded");return z(),I(),N(),L("onCreate",[y]),c.showOnCreate&&ee(),w.addEventListener("mouseenter",(function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&S().addEventListener("mousemove",m)})),y;function C(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function T(){return"hold"===C()[0]}function E(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function D(){return l||e}function S(){var e=D().parentNode;return e?He(e):document}function A(){return st(w)}function O(e){return y.state.isMounted&&!y.state.isVisible||ze.isTouch||s&&"focus"===s.type?0:Ce(y.props.delay,e?0:1,Je.delay)}function N(e){void 0===e&&(e=!1),w.style.pointerEvents=y.props.interactive&&!e?"":"none",w.style.zIndex=""+y.props.zIndex}function L(e,t,n){var i;(void 0===n&&(n=!0),x.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(i=y.props)[e].apply(i,t)}function M(){var t=y.props.aria;if(t.content){var n="aria-"+t.content,i=w.id;Se(y.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+" "+i:i);else{var r=t&&t.replace(i,"").trim();r?e.setAttribute(n,r):e.removeAttribute(n)}}))}}function I(){!j&&y.props.aria.expanded&&Se(y.props.triggerTarget||e).forEach((function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===D()?"true":"false"):e.removeAttribute("aria-expanded")}))}function P(){S().removeEventListener("mousemove",m),lt=lt.filter((function(e){return e!==m}))}function F(t){if(!ze.isTouch||!f&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!Be(w,n)){if(Se(y.props.triggerTarget||e).some((function(e){return Be(e,n)}))){if(ze.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else L("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),u=!0,setTimeout((function(){u=!1})),y.state.isMounted||H())}}}function $(){f=!0}function R(){f=!1}function q(){var e=S();e.addEventListener("mousedown",F,!0),e.addEventListener("touchend",F,xe),e.addEventListener("touchstart",R,xe),e.addEventListener("touchmove",$,xe)}function H(){var e=S();e.removeEventListener("mousedown",F,!0),e.removeEventListener("touchend",F,xe),e.removeEventListener("touchstart",R,xe),e.removeEventListener("touchmove",$,xe)}function U(e,t){var n=A().box;function i(e){e.target===n&&(Ue(n,"remove",i),t())}if(0===e)return t();Ue(n,"remove",a),Ue(n,"add",i),a=i}function B(t,n,i){void 0===i&&(i=!1),Se(y.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,i),g.push({node:e,eventType:t,handler:n,options:i})}))}function z(){var e;T()&&(B("touchstart",V,{passive:!0}),B("touchend",K,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(B(e,V),e){case"mouseenter":B("mouseleave",K);break;case"focus":B(Xe?"focusout":"blur",X);break;case"focusin":B("focusout",X)}}))}function W(){g.forEach((function(e){var t=e.node,n=e.eventType,i=e.handler,r=e.options;t.removeEventListener(n,i,r)})),g=[]}function V(e){var t,n=!1;if(y.state.isEnabled&&!Q(e)&&!u){var i="focus"===(null==(t=s)?void 0:t.type);s=e,l=e.currentTarget,I(),!y.state.isVisible&&Pe(e)&<.forEach((function(t){return t(e)})),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||h)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:ee(e),"click"===e.type&&(h=!n),n&&!i&&te(e)}}function Y(e){var t=e.target,n=D().contains(t)||w.contains(t);if("mousemove"!==e.type||!n){var i=G().concat(w).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:c}:null})).filter(Boolean);(function(e,t){var n=t.clientX,i=t.clientY;return e.every((function(e){var t=e.popperRect,r=e.popperState,s=e.props.interactiveBorder,a=Oe(r.placement),o=r.modifiersData.offset;if(!o)return!0;var l="bottom"===a?o.top.y:0,d="top"===a?o.bottom.y:0,c="right"===a?o.left.x:0,h="left"===a?o.right.x:0,u=t.top-i+l>s,f=i-t.bottom-d>s,p=t.left-n+c>s,g=n-t.right-h>s;return u||f||p||g}))})(i,e)&&(P(),te(e))}}function K(e){Q(e)||y.props.trigger.indexOf("click")>=0&&h||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function X(e){y.props.trigger.indexOf("focusin")<0&&e.target!==D()||y.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)||te(e)}function Q(e){return!!ze.isTouch&&T()!==e.type.indexOf("touch")>=0}function J(){Z();var t=y.props,n=t.popperOptions,i=t.placement,r=t.offset,s=t.getReferenceClientRect,a=t.moveTransition,l=E()?st(w).arrow:null,d=s?{getBoundingClientRect:s,contextElement:s.contextElement||D()}:e,c={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(E()){var n=A().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},c];E()&&l&&h.push({name:"arrow",options:{element:l,padding:3}}),h.push.apply(h,(null==n?void 0:n.modifiers)||[]),y.popperInstance=ve(d,w,Object.assign({},n,{placement:i,onFirstUpdate:o,modifiers:h}))}function Z(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function G(){return Ne(w.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&L("onTrigger",[y,e]),q();var t=O(!0),i=C(),r=i[0],s=i[1];ze.isTouch&&"hold"===r&&s&&(t=s),t?n=setTimeout((function(){y.show()}),t):y.show()}function te(e){if(y.clearDelayTimeouts(),L("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&h)){var t=O(!1);t?i=setTimeout((function(){y.state.isVisible&&y.hide()}),t):r=requestAnimationFrame((function(){y.hide()}))}}else H()}}function ht(e,t){void 0===t&&(t={});var n=Je.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Ve,xe),window.addEventListener("blur",Ke);var i=Object.assign({},t,{plugins:n}),r=$e(e).reduce((function(e,t){var n=t&&ct(t,i);return n&&e.push(n),e}),[]);return Ie(e)?r[0]:r}ht.defaultProps=Je,ht.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Je[t]=e[t]}))},ht.currentInput=ze;Object.assign({},ee,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});ht.setDefaultProps({render:at});const ut=ht;var ft=n(74692);class TippyComponent extends i.uA{constructor(e){super(e),this.el=ft(this.element)}initTippy(e){ut(this.element,{theme:"light",allowHTML:!0,interactive:!0,appendTo:e})}}const pt=TippyComponent},17527:(e,t,n)=>{"use strict";n.d(t,{Nj:()=>o,Rz:()=>d,VZ:()=>l,sy:()=>c,uA:()=>Component});var i=n(74692);const r=e=>"data-component-initialized-"+e,s=(e,t)=>!!e.getAttribute(r(t));class Component{static get allowReinitialization(){return!1}constructor(e){if(!(e instanceof HTMLElement))throw new Error("Components can only be initialized with an HTMLElement as argument to the constructor");this.element=e,this.wasInitialized=s(this.element,this.constructor.name),this.element.setAttribute(r(this.constructor.name),!0)}}const a=[],o=e=>{a.push(e)},l=e=>{a.forEach((t=>{t(e)}))},d=(e,t)=>{const n=e.querySelectorAll(t);return n.length?Array.from(n):[]},c=(e,t,n)=>{if(!(n.prototype instanceof Component))throw new Error("Components can only be initialized when they inherit the basecomponent");const r=(e instanceof i?e.get():[e]).flatMap((e=>"function"==typeof t?t(e):d(e,t)));return r.length?r.filter((e=>n.allowReinitialization||!s(e,n.name))).map((e=>new n(e))):[]}},11977:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});var i=n(40242);const r=new class Logging{constructor(){this.allowLogging=window.test||"localhost"===location.hostname||"127.0.0.1"===location.hostname||location.hostname.endsWith(".peek.digitpaint.nl")}log(...e){if(this.allowLogging)console.log(e);else{const e=this.formatMessage("log",...e);(0,i.v)(e)}}info(...e){if(this.allowLogging)console.info(e);else{const e=this.formatMessage("info",...e);(0,i.v)(e)}}warn(...e){if(this.allowLogging)console.warn(e);else{const e=this.formatMessage("warn",...e);(0,i.v)(e)}}error(...e){if(this.allowLogging)console.error(e);else{const e=this.formatMessage("error",...e);(0,i.v)(e)}}formatMessage(e,...t){let n=e+": ";for(let e=0;e{"use strict";n.d(t,{pT:()=>s,dg:()=>f,uO:()=>g,Px:()=>u,Rv:()=>a,Pc:()=>p});var i=n(49616);class DangerAlert extends i.Y{constructor(e){super(e,"danger")}}var r=n(74692);const s=e=>{if(e.hasClass("input--required")){const t=e.find(".input__file-label");if(e.hasClass("input--document")){const n=e.find(".list"),i=n.find('input[type="checkbox"]'),r=e.find(".form-control-file");t.on("blur",(()=>{f(n)})),r.on("change",(()=>{f(n)})),i.on("blur change",(()=>{f(n)}))}else{const t=e.find("input[required]"),n=e.find(".input__file-label");t.on("blur change",(()=>{setTimeout((()=>{h(e)}),300)})),n.on("blur",(()=>{h(e)}))}}else if(e.hasClass("textarea--required")){e.find("textarea[required]").on("blur change",(()=>{setTimeout((()=>{h(e)}),300)}))}else if(e.hasClass("select--required")){const t=e.find("button"),n=e.find("input[required]");t.on("blur",(()=>{setTimeout((()=>{h(e)}),300)})),n.on("change",(()=>{h(e)}))}else if(e.hasClass("radio-group--required")){e.find("input[required]").on("blur change",(()=>{setTimeout((()=>{u(e)}),300)}))}else if(e.hasClass("select-widget--required"))if(e.hasClass("multi")){const t=e.find(".form-control-search"),n=e.find('input[type="checkbox"]');let i;n.on("blur change",(()=>{i=setTimeout((()=>{f(e)}),300)})),t.on("blur",(()=>{i=setTimeout((()=>{f(e)}),300)})),n.on("focus",(()=>{clearTimeout(i)}))}else{const t=e.find(".form-control-search"),n=e.find("input[required]");let i;n.on("blur change",(()=>{i=setTimeout((()=>{u(e)}),300)})),t.on("blur",(()=>{i=setTimeout((()=>{u(e)}),300)})),n.on("focus",(()=>{clearTimeout(i)}))}else if(e.hasClass("tree--required")){const t=e.find(".jstree-anchor");let n;t.on("blur change",(()=>{n=setTimeout((()=>{p(e)}),300)})),t.on("focus",(()=>{clearTimeout(n)}))}},a=e=>{let t=!0;return e.find(".input--required:not(.input--document), .textarea--required, .select--required").each(((e,n)=>{h(r(n))||(m(n),t=!1)})),e.find(".input--document.input--required").each(((e,n)=>{f(r(n).closest(".fieldset").find(".list"))||(m(n),t=!1)})),e.find(".radio-group--required").each(((e,n)=>{u(r(n))||(m(n),t=!1)})),e.find(".select-widget--required").each(((e,n)=>{r(n).hasClass("multi")?f(r(n))||(m(n),t=!1):u(r(n))||(m(n),t=!1)})),e.find(".tree--required").each(((e,n)=>{p(r(n))||(r(n).closest(".card--expandable").find(".collapse").collapse("show"),t=!1)})),e.find(".checkbox-fieldset--required").each(((e,n)=>{o(r(n))||(l(r(n),r(n).find(".fieldset__legend legend").text(),r(n).attr("id")),r(n).addClass("invalid"),r(n).closest(".fieldset--required").addClass("fieldset--invalid"),t=!1)})),t},o=e=>{let t=!1;return e.find("input[type=checkbox]").each(((e,n)=>{if(n.isChecked||r(n).is(":checked"))return t=!0,!0})),t},l=(e,t,n)=>{const i=r('
    ');let s=r(``);s.text(`${t} is a required field.`),i.html(s),e.append(i)},d=e=>{e.find(".error").remove()},c=e=>e.closest(".form-group[data-has-dependency='1'][style*='display: none']").length>0,h=e=>{const t=e.find("[required]"),n=e.find("label").text()||"",i=t.attr("id")||"";return d(r(e)),""!==t.val()||c(e)?(t.removeAttr("aria-invalid"),d(e),e.removeClass("invalid"),e.closest(".fieldset--required").removeClass("fieldset--invalid"),!0):(t.attr("aria-invalid",!0),l(e,n,i),e.addClass("invalid"),e.closest(".fieldset--required").addClass("fieldset--invalid"),!1)},u=e=>{const t=e.find("input[required]"),n=e.closest(".fieldset--required").find(".fieldset__legend legend").text()||"",i=e.attr("id")||"";let s=!1;return d(r(e)),t.each(((e,t)=>{r(t).is(":checked")&&(s=!0)})),s||c(e)?(t.removeAttr("aria-invalid"),d(e),e.removeClass("invalid"),e.closest(".fieldset--required").removeClass("fieldset--invalid"),!0):(t.attr("aria-invalid",!0),l(e,n,i),e.addClass("invalid"),e.closest(".fieldset--required").addClass("fieldset--invalid"),!1)},f=e=>{const t=e.find('input[type="checkbox"]'),n=e.closest(".fieldset--required").find(".fieldset__legend legend").text()||"",i=e.attr("id")||"";let s=!1;return d(r(e)),t.each(((e,t)=>{r(t).is(":checked")&&(s=!0)})),s||c(e)?(d(e),e.removeClass("invalid"),e.closest(".fieldset--required").removeClass("fieldset--invalid"),!0):(l(e,n,i),e.addClass("invalid"),e.closest(".fieldset--required").addClass("fieldset--invalid"),!1)},p=e=>{const t=e.find('input[type="hidden"]'),n=e.closest(".fieldset--required");if(!n||!n.length)return;const i=n.find(".fieldset__legend legend").text()||"",s=e.attr("id")||"";return d(r(e)),t.length&&""!==t.val()||c(e)?(t.removeAttr("aria-invalid"),d(e),e.removeClass("invalid"),e.closest(".fieldset--required").removeClass("fieldset--invalid"),!0):(t.attr("aria-invalid",!0),l(e,i,s),e.addClass("invalid"),e.closest(".fieldset--required").addClass("fieldset--invalid"),!1)},g=e=>{if(!e||!e.length)return;if(!e.queryBuilder("validate")){if(r(".display-conditions-error").length)return!1;const t=new DangerAlert("There are errors in the conditions you have set, please fix these before submitting the form").render();return t.classList.add("mb-3","mt-0","display-conditions-error"),e.closest(".card__content").prepend(t),!1}return!0},m=e=>{const t=r(e).closest(".card--expandable").find(".collapse");if(!t||!t.collapse)return;const n=r(e).closest(".form-group").find("legend, label");t.prev().find(".btn-edit:visible").trigger("click"),t.hasClass("show")?n[0].scrollIntoView():(t.on("shown.bs.collapse.foobar",(function(){n[0].scrollIntoView(),r(this).off("shown.bs.collapse.foobar")})),t.collapse("show"))}},59780:(e,t,n)=>{var i,r,s;r=[n(74692)],void 0===(s="function"==typeof(i=function(e,t){function n(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return n(e.getFullYear(),e.getMonth(),e.getDate())}function r(e,t){return e.getUTCFullYear()===t.getUTCFullYear()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCDate()===t.getUTCDate()}function s(n,i){return function(){return i!==t&&e.fn.datepicker.deprecated(i),this[n].apply(this,arguments)}}function a(e){return e&&!isNaN(e.getTime())}var o,l=(o={get:function(e){return this.slice(e)[0]},contains:function(e){for(var t=e&&e.valueOf(),n=0,i=this.length;n]/g)||[]).length<=0||e(n).length>0)}catch(e){return!1}},_process_options:function(t){this._o=e.extend({},this._o,t);var r=this.o=e.extend({},this._o),s=r.language;_[s]||(s=s.split("-")[0],_[s]||(s=g.language)),r.language=s,r.startView=this._resolveViewName(r.startView),r.minViewMode=this._resolveViewName(r.minViewMode),r.maxViewMode=this._resolveViewName(r.maxViewMode),r.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,r.startView)),!0!==r.multidate&&(r.multidate=Number(r.multidate)||!1,!1!==r.multidate&&(r.multidate=Math.max(0,r.multidate))),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var a=v.parseFormat(r.format);r.startDate!==-1/0&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=v.parseDate(r.startDate,a,r.language,r.assumeNearbyYear):r.startDate=-1/0),r.endDate!==1/0&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=v.parseDate(r.endDate,a,r.language,r.assumeNearbyYear):r.endDate=1/0),r.daysOfWeekDisabled=this._resolveDaysOfWeek(r.daysOfWeekDisabled||[]),r.daysOfWeekHighlighted=this._resolveDaysOfWeek(r.daysOfWeekHighlighted||[]),r.datesDisabled=r.datesDisabled||[],Array.isArray(r.datesDisabled)||(r.datesDisabled=r.datesDisabled.split(",")),r.datesDisabled=e.map(r.datesDisabled,(function(e){return v.parseDate(e,a,r.language,r.assumeNearbyYear)}));var o=String(r.orientation).toLowerCase().split(/\s+/g),l=r.orientation.toLowerCase();if(o=e.grep(o,(function(e){return/^auto|left|right|top|bottom$/.test(e)})),r.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===o.length)switch(o[0]){case"top":case"bottom":r.orientation.y=o[0];break;case"left":case"right":r.orientation.x=o[0]}else l=e.grep(o,(function(e){return/^left|right$/.test(e)})),r.orientation.x=l[0]||"auto",l=e.grep(o,(function(e){return/^top|bottom$/.test(e)})),r.orientation.y=l[0]||"auto";if(r.defaultViewDate instanceof Date||"string"==typeof r.defaultViewDate)r.defaultViewDate=v.parseDate(r.defaultViewDate,a,r.language,r.assumeNearbyYear);else if(r.defaultViewDate){var d=r.defaultViewDate.year||(new Date).getFullYear(),c=r.defaultViewDate.month||0,h=r.defaultViewDate.day||1;r.defaultViewDate=n(d,c,h)}else r.defaultViewDate=i()},_applyEvents:function(e){for(var n,i,r,s=0;ss?(this.picker.addClass("datepicker-orient-right"),f+=u-t):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var g=this.o.orientation.y;if("auto"===g&&(g=-a+p-n<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+g),"top"===g?p-=n+parseInt(this.picker.css("padding-top")):p+=h,this.o.rtl){var m=s-(f+u);this.picker.css({top:p,right:m,zIndex:d})}else this.picker.css({top:p,left:f,zIndex:d});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var t=this.dates.copy(),n=[],i=!1;return arguments.length?(e.each(arguments,e.proxy((function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)}),this)),i=!0):(n=(n=this.isInput?this.element.val():this.element.data("date")||this.inputField.val())&&this.o.multidate?n.split(this.o.multidateSeparator):[n],delete this.element.data().date),n=e.map(n,e.proxy((function(e){return v.parseDate(e,this.o.format,this.o.language,this.o.assumeNearbyYear)}),this)),n=e.grep(n,e.proxy((function(e){return!this.dateWithinRange(e)||!e}),this),!0),this.dates.replace(n),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDatethis.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),i?(this.setValue(),this.element.change()):this.dates.length&&String(t)!==String(this.dates)&&i&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&t.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var t=this.o.weekStart,n="";for(this.o.calendarWeeks&&(n+=' ');t";n+="",this.picker.find(".datepicker-days thead").append(n)}},fillMonths:function(){for(var e=this._utc_to_local(this.viewDate),t="",n=0;n<12;n++)t+=''+_[this.o.language].monthsShort[n]+"";this.picker.find(".datepicker-months td").html(t)},setRange:function(t){t&&t.length?this.range=e.map(t,(function(e){return e.valueOf()})):delete this.range,this.fill()},getClassNames:function(t){var n=[],s=this.viewDate.getUTCFullYear(),a=this.viewDate.getUTCMonth(),o=i();return t.getUTCFullYear()s||t.getUTCFullYear()===s&&t.getUTCMonth()>a)&&n.push("new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("focused"),this.o.todayHighlight&&r(t,o)&&n.push("today"),-1!==this.dates.contains(t)&&n.push("active"),this.dateWithinRange(t)||n.push("disabled"),this.dateIsDisabled(t)&&n.push("disabled","disabled-date"),-1!==e.inArray(t.getUTCDay(),this.o.daysOfWeekHighlighted)&&n.push("highlighted"),this.range&&(t>this.range[0]&&to)&&d.push("disabled"),y===_&&d.push("focused"),l!==e.noop&&((h=l(new Date(y,0,1)))===t?h={}:"boolean"==typeof h?h={enabled:h}:"string"==typeof h&&(h={classes:h}),!1===h.enabled&&d.push("disabled"),h.classes&&(d=d.concat(h.classes.split(/\s+/))),h.tooltip&&(c=h.tooltip)),u+='"+y+"";p.find(".datepicker-switch").text(g+"-"+m),p.find("td").html(u)},fill:function(){var r,s,a=new Date(this.viewDate),o=a.getUTCFullYear(),l=a.getUTCMonth(),d=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,c=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,h=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,u=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,f=_[this.o.language].today||_.en.today||"",p=_[this.o.language].clear||_.en.clear||"",g=_[this.o.language].titleFormat||_.en.titleFormat,m=i(),y=(!0===this.o.todayBtn||"linked"===this.o.todayBtn)&&m>=this.o.startDate&&m<=this.o.endDate&&!this.weekOfDateIsDisabled(m);if(!isNaN(o)&&!isNaN(l)){this.picker.find(".datepicker-days .datepicker-switch").text(v.formatDate(a,g,this.o.language)),this.picker.find("tfoot .today").text(f).css("display",y?"table-cell":"none"),this.picker.find("tfoot .clear").text(p).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var b=n(o,l,0),w=b.getUTCDate();b.setUTCDate(w-(b.getUTCDay()-this.o.weekStart+7)%7);var k=new Date(b);b.getUTCFullYear()<100&&k.setUTCFullYear(b.getUTCFullYear()),k.setUTCDate(k.getUTCDate()+42),k=k.valueOf();for(var x,j,C=[];b.valueOf()"),this.o.calendarWeeks)){var T=new Date(+b+(this.o.weekStart-x-7)%7*864e5),E=new Date(Number(T)+(11-T.getUTCDay())%7*864e5),D=new Date(Number(D=n(E.getUTCFullYear(),0,1))+(11-D.getUTCDay())%7*864e5),S=(E-D)/864e5/7+1;C.push(''+S+"")}(j=this.getClassNames(b)).push("day");var A=b.getUTCDate();this.o.beforeShowDay!==e.noop&&((s=this.o.beforeShowDay(this._utc_to_local(b)))===t?s={}:"boolean"==typeof s?s={enabled:s}:"string"==typeof s&&(s={classes:s}),!1===s.enabled&&j.push("disabled"),s.classes&&(j=j.concat(s.classes.split(/\s+/))),s.tooltip&&(r=s.tooltip),s.content&&(A=s.content)),j="function"==typeof e.uniqueSort?e.uniqueSort(j):e.unique(j),C.push(''+A+""),r=null,x===this.o.weekEnd&&C.push(""),b.setUTCDate(b.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(C.join(""));var O=_[this.o.language].monthsTitle||_.en.monthsTitle||"Months",N=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?O:o).end().find("tbody span").removeClass("active");if(e.each(this.dates,(function(e,t){t.getUTCFullYear()===o&&N.eq(t.getUTCMonth()).addClass("active")})),(oh)&&N.addClass("disabled"),o===d&&N.slice(0,c).addClass("disabled"),o===h&&N.slice(u+1).addClass("disabled"),this.o.beforeShowMonth!==e.noop){var L=this;e.each(N,(function(n,i){var r=new Date(o,n,1),s=L.o.beforeShowMonth(r);s===t?s={}:"boolean"==typeof s?s={enabled:s}:"string"==typeof s&&(s={classes:s}),!1!==s.enabled||e(i).hasClass("disabled")||e(i).addClass("disabled"),s.classes&&e(i).addClass(s.classes),s.tooltip&&e(i).prop("title",s.tooltip)}))}this._fill_yearsView(".datepicker-years","year",10,o,d,h,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,o,d,h,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,o,d,h,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var e,t,n=new Date(this.viewDate),i=n.getUTCFullYear(),r=n.getUTCMonth(),s=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,a=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,o=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,d=1;switch(this.viewMode){case 4:d*=10;case 3:d*=10;case 2:d*=10;case 1:e=Math.floor(i/d)*d<=s,t=Math.floor(i/d)*d+d>o;break;case 0:e=i<=s&&r<=a,t=i>=o&&r>=l}this.picker.find(".prev").toggleClass("disabled",e),this.picker.find(".next").toggleClass("disabled",t)}},click:function(t){var r,s,a,o;t.preventDefault(),t.stopPropagation(),(r=e(t.target)).hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),r.hasClass("today")&&!r.hasClass("day")&&(this.setViewMode(0),this._setDate(i(),"linked"===this.o.todayBtn?null:"view")),r.hasClass("clear")&&this.clearDates(),r.hasClass("disabled")||(r.hasClass("month")||r.hasClass("year")||r.hasClass("decade")||r.hasClass("century"))&&(this.viewDate.setUTCDate(1),s=1,1===this.viewMode?(o=r.parent().find("span").index(r),a=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(o)):(o=0,a=Number(r.text()),this.viewDate.setUTCFullYear(a)),this._trigger(v.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(n(a,o,s)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(t){var n=e(t.currentTarget).data("date"),i=new Date(n);this.o.updateViewDate&&(i.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),i.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(i)},navArrowsClick:function(t){var n=e(t.currentTarget).hasClass("prev")?-1:1;0!==this.viewMode&&(n*=12*v.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,n),this._trigger(v.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(e){var t=this.dates.contains(e);if(e||this.dates.clear(),-1!==t?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(t):!1===this.o.multidate?(this.dates.clear(),this.dates.push(e)):this.dates.push(e),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(e,t){t&&"date"!==t||this._toggle_multidate(e&&new Date(e)),(!t&&this.o.updateViewDate||"view"===t)&&(this.viewDate=e&&new Date(e)),this.fill(),this.setValue(),t&&"view"===t||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||t&&"date"!==t||this.hide()},moveDay:function(e,t){var n=new Date(e);return n.setUTCDate(e.getUTCDate()+t),n},moveWeek:function(e,t){return this.moveDay(e,7*t)},moveMonth:function(e,t){if(!a(e))return this.o.defaultViewDate;if(!t)return e;var n,i,r=new Date(e.valueOf()),s=r.getUTCDate(),o=r.getUTCMonth(),l=Math.abs(t);if(t=t>0?1:-1,1===l)i=-1===t?function(){return r.getUTCMonth()===o}:function(){return r.getUTCMonth()!==n},n=o+t,r.setUTCMonth(n),n=(n+12)%12;else{for(var d=0;d0},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":visible")){var t,n,i=!1,r=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault(),e.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;t=37===e.keyCode||38===e.keyCode?-1:1,0===this.viewMode?e.ctrlKey?(n=this.moveAvailableDate(r,t,"moveYear"))&&this._trigger("changeYear",this.viewDate):e.shiftKey?(n=this.moveAvailableDate(r,t,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===e.keyCode||39===e.keyCode?n=this.moveAvailableDate(r,t,"moveDay"):this.weekOfDateIsDisabled(r)||(n=this.moveAvailableDate(r,t,"moveWeek")):1===this.viewMode?(38!==e.keyCode&&40!==e.keyCode||(t*=4),n=this.moveAvailableDate(r,t,"moveMonth")):2===this.viewMode&&(38!==e.keyCode&&40!==e.keyCode||(t*=4),n=this.moveAvailableDate(r,t,"moveYear")),n&&(this.focusDate=this.viewDate=n,this.setValue(),this.fill(),e.preventDefault());break;case 13:if(!this.o.forceParse)break;r=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(r),i=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),e.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}i&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))}else 40!==e.keyCode&&27!==e.keyCode||(this.show(),e.stopPropagation())},setViewMode:function(e){this.viewMode=e,this.picker.children("div").hide().filter(".datepicker-"+v.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var c=function(t,n){e.data(t,"datepicker",this),this.element=e(t),this.inputs=e.map(n.inputs,(function(e){return e.jquery?e[0]:e})),delete n.inputs,this.keepEmptyValues=n.keepEmptyValues,delete n.keepEmptyValues,p.call(e(this.inputs),n).on("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,(function(t){return e.data(t,"datepicker")})),this.updateDates()};function h(t,n){var i=e(t).data(),r={},s=new RegExp("^"+n.toLowerCase()+"([A-Z])");function a(e,t){return t.toLowerCase()}for(var o in n=new RegExp("^"+n.toLowerCase()),i)n.test(o)&&(r[o.replace(s,a)]=i[o]);return r}function u(t){var n={};if(_[t]||(t=t.split("-")[0],_[t])){var i=_[t];return e.each(m,(function(e,t){t in i&&(n[t]=i[t])})),n}}c.prototype={updateDates:function(){this.dates=e.map(this.pickers,(function(e){return e.getUTCDate()})),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,(function(e){return e.valueOf()}));e.each(this.pickers,(function(e,n){n.setRange(t)}))},clearDates:function(){e.each(this.pickers,(function(e,t){t.clearDates()}))},dateUpdated:function(n){if(!this.updating){this.updating=!0;var i=e.data(n.target,"datepicker");if(i!==t){var r=i.getUTCDate(),s=this.keepEmptyValues,a=e.inArray(n.target,this.inputs),o=a-1,l=a+1,d=this.inputs.length;if(-1!==a){if(e.each(this.pickers,(function(e,t){t.getUTCDate()||t!==i&&s||t.setUTCDate(r)})),r=0&&r0;)this.pickers[o--].setUTCDate(r);else if(r>this.dates[l])for(;lthis.dates[l]&&(this.pickers[l].element.val()||"").length>0;)this.pickers[l++].setUTCDate(r);this.updateDates(),delete this.updating}}}},destroy:function(){e.map(this.pickers,(function(e){e.destroy()})),e(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:s("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var f=e.fn.datepicker,p=function(n){var i,r=Array.apply(null,arguments);if(r.shift(),this.each((function(){var t=e(this),s=t.data("datepicker"),a="object"==typeof n&&n;if(!s){var o=h(this,"date"),l=u(e.extend({},g,o,a).language),f=e.extend({},g,l,o,a);t.hasClass("input-daterange")||f.inputs?(e.extend(f,{inputs:f.inputs||t.find("input").toArray()}),s=new c(this,f)):s=new d(this,f),t.data("datepicker",s)}"string"==typeof n&&"function"==typeof s[n]&&(i=s[n].apply(s,r))})),i===t||i instanceof d||i instanceof c)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+n+" function)");return i};e.fn.datepicker=p;var g=e.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:e.noop,beforeShowMonth:e.noop,beforeShowYear:e.noop,beforeShowDecade:e.noop,beforeShowCentury:e.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",isInline:null,keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"},showWeekDays:!0},m=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=d;var _=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},v={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(e){if("function"==typeof e.toValue&&"function"==typeof e.toDisplay)return e;var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||0===n.length)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(n,r,s,a){if(!n)return t;if(n instanceof Date)return n;if("string"==typeof r&&(r=v.parseFormat(r)),r.toValue)return r.toValue(n,r,s);var o,l,c,h,u,f={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},p={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(n in p&&(n=p[n]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(n)){for(o=n.match(/([\-+]\d+)([dmwy])/gi),n=new Date,h=0;h(new Date).getFullYear()+t&&(e-=100),e}o=n&&n.match(this.nonpunctuation)||[];var m,y,b={},w=["yyyy","yy","M","MM","m","mm","d","dd"],k={yyyy:function(e,t){return e.setUTCFullYear(a?g(t,a):t)},m:function(e,t){if(isNaN(e))return e;for(t-=1;t<0;)t+=12;for(t%=12,e.setUTCMonth(t);e.getUTCMonth()!==t;)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}};k.yy=k.yyyy,k.M=k.MM=k.mm=k.m,k.dd=k.d,n=i();var x=r.parts.slice();function j(){var e=this.slice(0,o[h].length),t=o[h].slice(0,e.length);return e.toLowerCase()===t.toLowerCase()}if(o.length!==x.length&&(x=e(x).filter((function(t,n){return-1!==e.inArray(n,w)})).toArray()),o.length===x.length){var C,T,E;for(h=0,C=x.length;h'+g.templates.leftArrow+''+g.templates.rightArrow+"",contTemplate:'',footTemplate:''};v.template='
    '+v.headTemplate+""+v.footTemplate+'
    '+v.headTemplate+v.contTemplate+v.footTemplate+'
    '+v.headTemplate+v.contTemplate+v.footTemplate+'
    '+v.headTemplate+v.contTemplate+v.footTemplate+'
    '+v.headTemplate+v.contTemplate+v.footTemplate+"
    ",e.fn.datepicker.DPGlobal=v,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=f,this},e.fn.datepicker.version="1.10.0",e.fn.datepicker.deprecated=function(e){var t=window.console;t&&t.warn&&t.warn("DEPRECATED: "+e)},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',(function(t){var n=e(this);n.data("datepicker")||(t.preventDefault(),p.call(n,"show"))})),e((function(){p.call(e('[data-provide="datepicker-inline"]'))}))})?i.apply(t,r):i)||(e.exports=s)},52754:function(e,t,n){!function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(t),s=i(n);function a(e,t){for(var n=0;n=a)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};v.jQueryDetection(),_();var y="alert",b="4.6.2",w="bs.alert",k="."+w,x=".data-api",j=r.default.fn[y],C="alert",T="fade",E="show",D="close"+k,S="closed"+k,A="click"+k+x,O='[data-dismiss="alert"]',N=function(){function e(e){this._element=e}var t=e.prototype;return t.close=function(e){var t=this._element;e&&(t=this._getRootElement(e)),this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},t.dispose=function(){r.default.removeData(this._element,w),this._element=null},t._getRootElement=function(e){var t=v.getSelectorFromElement(e),n=!1;return t&&(n=document.querySelector(t)),n||(n=r.default(e).closest("."+C)[0]),n},t._triggerCloseEvent=function(e){var t=r.default.Event(D);return r.default(e).trigger(t),t},t._removeElement=function(e){var t=this;if(r.default(e).removeClass(E),r.default(e).hasClass(T)){var n=v.getTransitionDurationFromElement(e);r.default(e).one(v.TRANSITION_END,(function(n){return t._destroyElement(e,n)})).emulateTransitionEnd(n)}else this._destroyElement(e)},t._destroyElement=function(e){r.default(e).detach().trigger(S).remove()},e._jQueryInterface=function(t){return this.each((function(){var n=r.default(this),i=n.data(w);i||(i=new e(this),n.data(w,i)),"close"===t&&i[t](this)}))},e._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},o(e,null,[{key:"VERSION",get:function(){return b}}]),e}();r.default(document).on(A,O,N._handleDismiss(new N)),r.default.fn[y]=N._jQueryInterface,r.default.fn[y].Constructor=N,r.default.fn[y].noConflict=function(){return r.default.fn[y]=j,N._jQueryInterface};var L="button",M="4.6.2",I="bs.button",P="."+I,F=".data-api",$=r.default.fn[L],R="active",q="btn",H="focus",U="click"+P+F,B="focus"+P+F+" blur"+P+F,z="load"+P+F,W='[data-toggle^="button"]',V='[data-toggle="buttons"]',Y='[data-toggle="button"]',K='[data-toggle="buttons"] .btn',X='input:not([type="hidden"])',Q=".active",J=".btn",Z=function(){function e(e){this._element=e,this.shouldAvoidTriggerChange=!1}var t=e.prototype;return t.toggle=function(){var e=!0,t=!0,n=r.default(this._element).closest(V)[0];if(n){var i=this._element.querySelector(X);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(R))e=!1;else{var s=n.querySelector(Q);s&&r.default(s).removeClass(R)}e&&("checkbox"!==i.type&&"radio"!==i.type||(i.checked=!this._element.classList.contains(R)),this.shouldAvoidTriggerChange||r.default(i).trigger("change")),i.focus(),t=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(t&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(R)),e&&r.default(this._element).toggleClass(R))},t.dispose=function(){r.default.removeData(this._element,I),this._element=null},e._jQueryInterface=function(t,n){return this.each((function(){var i=r.default(this),s=i.data(I);s||(s=new e(this),i.data(I,s)),s.shouldAvoidTriggerChange=n,"toggle"===t&&s[t]()}))},o(e,null,[{key:"VERSION",get:function(){return M}}]),e}();r.default(document).on(U,W,(function(e){var t=e.target,n=t;if(r.default(t).hasClass(q)||(t=r.default(t).closest(J)[0]),!t||t.hasAttribute("disabled")||t.classList.contains("disabled"))e.preventDefault();else{var i=t.querySelector(X);if(i&&(i.hasAttribute("disabled")||i.classList.contains("disabled")))return void e.preventDefault();"INPUT"!==n.tagName&&"LABEL"===t.tagName||Z._jQueryInterface.call(r.default(t),"toggle","INPUT"===n.tagName)}})).on(B,W,(function(e){var t=r.default(e.target).closest(J)[0];r.default(t).toggleClass(H,/^focus(in)?$/.test(e.type))})),r.default(window).on(z,(function(){for(var e=[].slice.call(document.querySelectorAll(K)),t=0,n=e.length;t0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var t=e.prototype;return t.next=function(){this._isSliding||this._slide(_e)},t.nextWhenVisible=function(){var e=r.default(this._element);!document.hidden&&e.is(":visible")&&"hidden"!==e.css("visibility")&&this.next()},t.prev=function(){this._isSliding||this._slide(ve)},t.pause=function(e){e||(this._isPaused=!0),this._element.querySelector($e)&&(v.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},t.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},t.to=function(e){var t=this;this._activeElement=this._element.querySelector(Ie);var n=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)r.default(this._element).one(ke,(function(){return t.to(e)}));else{if(n===e)return this.pause(),void this.cycle();var i=e>n?_e:ve;this._slide(i,this._items[e])}},t.dispose=function(){r.default(this._element).off(ne),r.default.removeData(this._element,te),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},t._getConfig=function(e){return e=l({},Ue,e),v.typeCheckConfig(G,e,Be),e},t._handleSwipe=function(){var e=Math.abs(this.touchDeltaX);if(!(e<=le)){var t=e/this.touchDeltaX;this.touchDeltaX=0,t>0&&this.prev(),t<0&&this.next()}},t._addEventListeners=function(){var e=this;this._config.keyboard&&r.default(this._element).on(xe,(function(t){return e._keydown(t)})),"hover"===this._config.pause&&r.default(this._element).on(je,(function(t){return e.pause(t)})).on(Ce,(function(t){return e.cycle(t)})),this._config.touch&&this._addTouchEventListeners()},t._addTouchEventListeners=function(){var e=this;if(this._touchSupported){var t=function(t){e._pointerEvent&&ze[t.originalEvent.pointerType.toUpperCase()]?e.touchStartX=t.originalEvent.clientX:e._pointerEvent||(e.touchStartX=t.originalEvent.touches[0].clientX)},n=function(t){e.touchDeltaX=t.originalEvent.touches&&t.originalEvent.touches.length>1?0:t.originalEvent.touches[0].clientX-e.touchStartX},i=function(t){e._pointerEvent&&ze[t.originalEvent.pointerType.toUpperCase()]&&(e.touchDeltaX=t.originalEvent.clientX-e.touchStartX),e._handleSwipe(),"hover"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout((function(t){return e.cycle(t)}),oe+e._config.interval))};r.default(this._element.querySelectorAll(Fe)).on(Oe,(function(e){return e.preventDefault()})),this._pointerEvent?(r.default(this._element).on(Se,(function(e){return t(e)})),r.default(this._element).on(Ae,(function(e){return i(e)})),this._element.classList.add(me)):(r.default(this._element).on(Te,(function(e){return t(e)})),r.default(this._element).on(Ee,(function(e){return n(e)})),r.default(this._element).on(De,(function(e){return i(e)})))}},t._keydown=function(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.which){case se:e.preventDefault(),this.prev();break;case ae:e.preventDefault(),this.next()}},t._getItemIndex=function(e){return this._items=e&&e.parentNode?[].slice.call(e.parentNode.querySelectorAll(Pe)):[],this._items.indexOf(e)},t._getItemByDirection=function(e,t){var n=e===_e,i=e===ve,r=this._getItemIndex(t),s=this._items.length-1;if((i&&0===r||n&&r===s)&&!this._config.wrap)return t;var a=(r+(e===ve?-1:1))%this._items.length;return-1===a?this._items[this._items.length-1]:this._items[a]},t._triggerSlideEvent=function(e,t){var n=this._getItemIndex(e),i=this._getItemIndex(this._element.querySelector(Ie)),s=r.default.Event(we,{relatedTarget:e,direction:t,from:i,to:n});return r.default(this._element).trigger(s),s},t._setActiveIndicatorElement=function(e){if(this._indicatorsElement){var t=[].slice.call(this._indicatorsElement.querySelectorAll(Me));r.default(t).removeClass(ce);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&r.default(n).addClass(ce)}},t._updateInterval=function(){var e=this._activeElement||this._element.querySelector(Ie);if(e){var t=parseInt(e.getAttribute("data-interval"),10);t?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=t):this._config.interval=this._config.defaultInterval||this._config.interval}},t._slide=function(e,t){var n,i,s,a=this,o=this._element.querySelector(Ie),l=this._getItemIndex(o),d=t||o&&this._getItemByDirection(e,o),c=this._getItemIndex(d),h=Boolean(this._interval);if(e===_e?(n=fe,i=pe,s=ye):(n=ue,i=ge,s=be),d&&r.default(d).hasClass(ce))this._isSliding=!1;else if(!this._triggerSlideEvent(d,s).isDefaultPrevented()&&o&&d){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(d),this._activeElement=d;var u=r.default.Event(ke,{relatedTarget:d,direction:s,from:l,to:c});if(r.default(this._element).hasClass(he)){r.default(d).addClass(i),v.reflow(d),r.default(o).addClass(n),r.default(d).addClass(n);var f=v.getTransitionDurationFromElement(o);r.default(o).one(v.TRANSITION_END,(function(){r.default(d).removeClass(n+" "+i).addClass(ce),r.default(o).removeClass(ce+" "+i+" "+n),a._isSliding=!1,setTimeout((function(){return r.default(a._element).trigger(u)}),0)})).emulateTransitionEnd(f)}else r.default(o).removeClass(ce),r.default(d).addClass(ce),this._isSliding=!1,r.default(this._element).trigger(u);h&&this.cycle()}},e._jQueryInterface=function(t){return this.each((function(){var n=r.default(this).data(te),i=l({},Ue,r.default(this).data());"object"==typeof t&&(i=l({},i,t));var s="string"==typeof t?t:i.slide;if(n||(n=new e(this,i),r.default(this).data(te,n)),"number"==typeof t)n.to(t);else if("string"==typeof s){if(void 0===n[s])throw new TypeError('No method named "'+s+'"');n[s]()}else i.interval&&i.ride&&(n.pause(),n.cycle())}))},e._dataApiClickHandler=function(t){var n=v.getSelectorFromElement(this);if(n){var i=r.default(n)[0];if(i&&r.default(i).hasClass(de)){var s=l({},r.default(i).data(),r.default(this).data()),a=this.getAttribute("data-slide-to");a&&(s.interval=!1),e._jQueryInterface.call(r.default(i),s),a&&r.default(i).data(te).to(a),t.preventDefault()}}},o(e,null,[{key:"VERSION",get:function(){return ee}},{key:"Default",get:function(){return Ue}}]),e}();r.default(document).on(Le,qe,We._dataApiClickHandler),r.default(window).on(Ne,(function(){for(var e=[].slice.call(document.querySelectorAll(He)),t=0,n=e.length;t0&&(this._selector=a,this._triggerArray.push(s))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t=e.prototype;return t.toggle=function(){r.default(this._element).hasClass(Ze)?this.hide():this.show()},t.show=function(){var t,n,i=this;if(!(this._isTransitioning||r.default(this._element).hasClass(Ze)||(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(dt)).filter((function(e){return"string"==typeof i._config.parent?e.getAttribute("data-parent")===i._config.parent:e.classList.contains(Ge)}))).length&&(t=null),t&&(n=r.default(t).not(this._selector).data(Ke))&&n._isTransitioning))){var s=r.default.Event(rt);if(r.default(this._element).trigger(s),!s.isDefaultPrevented()){t&&(e._jQueryInterface.call(r.default(t).not(this._selector),"hide"),n||r.default(t).data(Ke,null));var a=this._getDimension();r.default(this._element).removeClass(Ge).addClass(et),this._element.style[a]=0,this._triggerArray.length&&r.default(this._triggerArray).removeClass(tt).attr("aria-expanded",!0),this.setTransitioning(!0);var o=function(){r.default(i._element).removeClass(et).addClass(Ge+" "+Ze),i._element.style[a]="",i.setTransitioning(!1),r.default(i._element).trigger(st)},l="scroll"+(a[0].toUpperCase()+a.slice(1)),d=v.getTransitionDurationFromElement(this._element);r.default(this._element).one(v.TRANSITION_END,o).emulateTransitionEnd(d),this._element.style[a]=this._element[l]+"px"}}},t.hide=function(){var e=this;if(!this._isTransitioning&&r.default(this._element).hasClass(Ze)){var t=r.default.Event(at);if(r.default(this._element).trigger(t),!t.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",v.reflow(this._element),r.default(this._element).addClass(et).removeClass(Ge+" "+Ze);var i=this._triggerArray.length;if(i>0)for(var s=0;s0},t._getOffset=function(){var e=this,t={};return"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e._config.offset(t.offsets,e._element)),t}:t.offset=this._config.offset,t},t._getPopperConfig=function(){var e={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(e.modifiers.applyStyle={enabled:!1}),l({},e,this._config.popperConfig)},e._jQueryInterface=function(t){return this.each((function(){var n=r.default(this).data(mt);if(n||(n=new e(this,"object"==typeof t?t:null),r.default(this).data(mt,n)),"string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},e._clearMenus=function(t){if(!t||t.which!==Ct&&("keyup"!==t.type||t.which===kt))for(var n=[].slice.call(document.querySelectorAll(Ut)),i=0,s=n.length;i0&&a--,t.which===jt&&adocument.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add(mn);var i=v.getTransitionDurationFromElement(this._dialog);r.default(this._element).off(v.TRANSITION_END),r.default(this._element).one(v.TRANSITION_END,(function(){e._element.classList.remove(mn),n||r.default(e._element).one(v.TRANSITION_END,(function(){e._element.style.overflowY=""})).emulateTransitionEnd(e._element,i)})).emulateTransitionEnd(i),this._element.focus()}},t._showElement=function(e){var t=this,n=r.default(this._element).hasClass(pn),i=this._dialog?this._dialog.querySelector(An):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),r.default(this._dialog).hasClass(cn)&&i?i.scrollTop=0:this._element.scrollTop=0,n&&v.reflow(this._element),r.default(this._element).addClass(gn),this._config.focus&&this._enforceFocus();var s=r.default.Event(wn,{relatedTarget:e}),a=function(){t._config.focus&&t._element.focus(),t._isTransitioning=!1,r.default(t._element).trigger(s)};if(n){var o=v.getTransitionDurationFromElement(this._dialog);r.default(this._dialog).one(v.TRANSITION_END,a).emulateTransitionEnd(o)}else a()},t._enforceFocus=function(){var e=this;r.default(document).off(kn).on(kn,(function(t){document!==t.target&&e._element!==t.target&&0===r.default(e._element).has(t.target).length&&e._element.focus()}))},t._setEscapeEvent=function(){var e=this;this._isShown?r.default(this._element).on(Cn,(function(t){e._config.keyboard&&t.which===dn?(t.preventDefault(),e.hide()):e._config.keyboard||t.which!==dn||e._triggerBackdropTransition()})):this._isShown||r.default(this._element).off(Cn)},t._setResizeEvent=function(){var e=this;this._isShown?r.default(window).on(xn,(function(t){return e.handleUpdate(t)})):r.default(window).off(xn)},t._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){r.default(document.body).removeClass(fn),e._resetAdjustments(),e._resetScrollbar(),r.default(e._element).trigger(yn)}))},t._removeBackdrop=function(){this._backdrop&&(r.default(this._backdrop).remove(),this._backdrop=null)},t._showBackdrop=function(e){var t=this,n=r.default(this._element).hasClass(pn)?pn:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=un,n&&this._backdrop.classList.add(n),r.default(this._backdrop).appendTo(document.body),r.default(this._element).on(jn,(function(e){t._ignoreBackdropClick?t._ignoreBackdropClick=!1:e.target===e.currentTarget&&("static"===t._config.backdrop?t._triggerBackdropTransition():t.hide())})),n&&v.reflow(this._backdrop),r.default(this._backdrop).addClass(gn),!e)return;if(!n)return void e();var i=v.getTransitionDurationFromElement(this._backdrop);r.default(this._backdrop).one(v.TRANSITION_END,e).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){r.default(this._backdrop).removeClass(gn);var s=function(){t._removeBackdrop(),e&&e()};if(r.default(this._element).hasClass(pn)){var a=v.getTransitionDurationFromElement(this._backdrop);r.default(this._backdrop).one(v.TRANSITION_END,s).emulateTransitionEnd(a)}else s()}else e&&e()},t._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(e.left+e.right)
    ',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:Rn,popperConfig:null},ci={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},hi={HIDE:"hide"+Yn,HIDDEN:"hidden"+Yn,SHOW:"show"+Yn,SHOWN:"shown"+Yn,INSERTED:"inserted"+Yn,CLICK:"click"+Yn,FOCUSIN:"focusin"+Yn,FOCUSOUT:"focusout"+Yn,MOUSEENTER:"mouseenter"+Yn,MOUSELEAVE:"mouseleave"+Yn},ui=function(){function e(e,t){if(void 0===s.default)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var t=e.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(e){if(this._isEnabled)if(e){var t=this.constructor.DATA_KEY,n=r.default(e.currentTarget).data(t);n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),r.default(e.currentTarget).data(t,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(r.default(this.getTipElement()).hasClass(Gn))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),r.default.removeData(this.element,this.constructor.DATA_KEY),r.default(this.element).off(this.constructor.EVENT_KEY),r.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&r.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===r.default(this.element).css("display"))throw new Error("Please use show on visible elements");var t=r.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){r.default(this.element).trigger(t);var n=v.findShadowRoot(this.element),i=r.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var a=this.getTipElement(),o=v.getUID(this.constructor.NAME);a.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&r.default(a).addClass(Zn);var l="function"==typeof this.config.placement?this.config.placement.call(this,a,this.element):this.config.placement,d=this._getAttachment(l);this.addAttachmentClass(d);var c=this._getContainer();r.default(a).data(this.constructor.DATA_KEY,this),r.default.contains(this.element.ownerDocument.documentElement,this.tip)||r.default(a).appendTo(c),r.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new s.default(this.element,a,this._getPopperConfig(d)),r.default(a).addClass(Gn),r.default(a).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&r.default(document.body).children().on("mouseover",null,r.default.noop);var h=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,r.default(e.element).trigger(e.constructor.Event.SHOWN),t===ti&&e._leave(null,e)};if(r.default(this.tip).hasClass(Zn)){var u=v.getTransitionDurationFromElement(this.tip);r.default(this.tip).one(v.TRANSITION_END,h).emulateTransitionEnd(u)}else h()}},t.hide=function(e){var t=this,n=this.getTipElement(),i=r.default.Event(this.constructor.Event.HIDE),s=function(){t._hoverState!==ei&&n.parentNode&&n.parentNode.removeChild(n),t._cleanTipClass(),t.element.removeAttribute("aria-describedby"),r.default(t.element).trigger(t.constructor.Event.HIDDEN),null!==t._popper&&t._popper.destroy(),e&&e()};if(r.default(this.element).trigger(i),!i.isDefaultPrevented()){if(r.default(n).removeClass(Gn),"ontouchstart"in document.documentElement&&r.default(document.body).children().off("mouseover",null,r.default.noop),this._activeTrigger[ai]=!1,this._activeTrigger[si]=!1,this._activeTrigger[ri]=!1,r.default(this.tip).hasClass(Zn)){var a=v.getTransitionDurationFromElement(n);r.default(n).one(v.TRANSITION_END,s).emulateTransitionEnd(a)}else s();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(e){r.default(this.getTipElement()).addClass(Xn+"-"+e)},t.getTipElement=function(){return this.tip=this.tip||r.default(this.config.template)[0],this.tip},t.setContent=function(){var e=this.getTipElement();this.setElementContent(r.default(e.querySelectorAll(ni)),this.getTitle()),r.default(e).removeClass(Zn+" "+Gn)},t.setElementContent=function(e,t){"object"!=typeof t||!t.nodeType&&!t.jquery?this.config.html?(this.config.sanitize&&(t=Bn(t,this.config.whiteList,this.config.sanitizeFn)),e.html(t)):e.text(t):this.config.html?r.default(t).parent().is(e)||e.empty().append(t):e.text(r.default(t).text())},t.getTitle=function(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},t._getPopperConfig=function(e){var t=this;return l({},{placement:e,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:ii},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}},this.config.popperConfig)},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e.config.offset(t.offsets,e.element)),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:v.isElement(this.config.container)?r.default(this.config.container):r.default(document).find(this.config.container)},t._getAttachment=function(e){return li[e.toUpperCase()]},t._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach((function(t){if("click"===t)r.default(e.element).on(e.constructor.Event.CLICK,e.config.selector,(function(t){return e.toggle(t)}));else if(t!==oi){var n=t===ri?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,i=t===ri?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;r.default(e.element).on(n,e.config.selector,(function(t){return e._enter(t)})).on(i,e.config.selector,(function(t){return e._leave(t)}))}})),this._hideModalHandler=function(){e.element&&e.hide()},r.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var e=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(e,t){var n=this.constructor.DATA_KEY;(t=t||r.default(e.currentTarget).data(n))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),r.default(e.currentTarget).data(n,t)),e&&(t._activeTrigger["focusin"===e.type?si:ri]=!0),r.default(t.getTipElement()).hasClass(Gn)||t._hoverState===ei?t._hoverState=ei:(clearTimeout(t._timeout),t._hoverState=ei,t.config.delay&&t.config.delay.show?t._timeout=setTimeout((function(){t._hoverState===ei&&t.show()}),t.config.delay.show):t.show())},t._leave=function(e,t){var n=this.constructor.DATA_KEY;(t=t||r.default(e.currentTarget).data(n))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),r.default(e.currentTarget).data(n,t)),e&&(t._activeTrigger["focusout"===e.type?si:ri]=!1),t._isWithActiveTrigger()||(clearTimeout(t._timeout),t._hoverState=ti,t.config.delay&&t.config.delay.hide?t._timeout=setTimeout((function(){t._hoverState===ti&&t.hide()}),t.config.delay.hide):t.hide())},t._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},t._getConfig=function(e){var t=r.default(this.element).data();return Object.keys(t).forEach((function(e){-1!==Jn.indexOf(e)&&delete t[e]})),"number"==typeof(e=l({},this.constructor.Default,t,"object"==typeof e&&e?e:{})).delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),v.typeCheckConfig(zn,e,this.constructor.DefaultType),e.sanitize&&(e.template=Bn(e.template,e.whiteList,e.sanitizeFn)),e},t._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},t._cleanTipClass=function(){var e=r.default(this.getTipElement()),t=e.attr("class").match(Qn);null!==t&&t.length&&e.removeClass(t.join(""))},t._handlePopperPlacementChange=function(e){this.tip=e.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},t._fixTransition=function(){var e=this.getTipElement(),t=this.config.animation;null===e.getAttribute("x-placement")&&(r.default(e).removeClass(Zn),this.config.animation=!1,this.hide(),this.show(),this.config.animation=t)},e._jQueryInterface=function(t){return this.each((function(){var n=r.default(this),i=n.data(Vn),s="object"==typeof t&&t;if((i||!/dispose|hide/.test(t))&&(i||(i=new e(this,s),n.data(Vn,i)),"string"==typeof t)){if(void 0===i[t])throw new TypeError('No method named "'+t+'"');i[t]()}}))},o(e,null,[{key:"VERSION",get:function(){return Wn}},{key:"Default",get:function(){return di}},{key:"NAME",get:function(){return zn}},{key:"DATA_KEY",get:function(){return Vn}},{key:"Event",get:function(){return hi}},{key:"EVENT_KEY",get:function(){return Yn}},{key:"DefaultType",get:function(){return ci}}]),e}();r.default.fn[zn]=ui._jQueryInterface,r.default.fn[zn].Constructor=ui,r.default.fn[zn].noConflict=function(){return r.default.fn[zn]=Kn,ui._jQueryInterface};var fi="popover",pi="4.6.2",gi="bs.popover",mi="."+gi,_i=r.default.fn[fi],vi="bs-popover",yi=new RegExp("(^|\\s)"+vi+"\\S+","g"),bi="fade",wi="show",ki=".popover-header",xi=".popover-body",ji=l({},ui.Default,{placement:"right",trigger:"click",content:"",template:''}),Ci=l({},ui.DefaultType,{content:"(string|element|function)"}),Ti={HIDE:"hide"+mi,HIDDEN:"hidden"+mi,SHOW:"show"+mi,SHOWN:"shown"+mi,INSERTED:"inserted"+mi,CLICK:"click"+mi,FOCUSIN:"focusin"+mi,FOCUSOUT:"focusout"+mi,MOUSEENTER:"mouseenter"+mi,MOUSELEAVE:"mouseleave"+mi},Ei=function(e){function t(){return e.apply(this,arguments)||this}d(t,e);var n=t.prototype;return n.isWithContent=function(){return this.getTitle()||this._getContent()},n.addAttachmentClass=function(e){r.default(this.getTipElement()).addClass(vi+"-"+e)},n.getTipElement=function(){return this.tip=this.tip||r.default(this.config.template)[0],this.tip},n.setContent=function(){var e=r.default(this.getTipElement());this.setElementContent(e.find(ki),this.getTitle());var t=this._getContent();"function"==typeof t&&(t=t.call(this.element)),this.setElementContent(e.find(xi),t),e.removeClass(bi+" "+wi)},n._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},n._cleanTipClass=function(){var e=r.default(this.getTipElement()),t=e.attr("class").match(yi);null!==t&&t.length>0&&e.removeClass(t.join(""))},t._jQueryInterface=function(e){return this.each((function(){var n=r.default(this).data(gi),i="object"==typeof e?e:null;if((n||!/dispose|hide/.test(e))&&(n||(n=new t(this,i),r.default(this).data(gi,n)),"string"==typeof e)){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},o(t,null,[{key:"VERSION",get:function(){return pi}},{key:"Default",get:function(){return ji}},{key:"NAME",get:function(){return fi}},{key:"DATA_KEY",get:function(){return gi}},{key:"Event",get:function(){return Ti}},{key:"EVENT_KEY",get:function(){return mi}},{key:"DefaultType",get:function(){return Ci}}]),t}(ui);r.default.fn[fi]=Ei._jQueryInterface,r.default.fn[fi].Constructor=Ei,r.default.fn[fi].noConflict=function(){return r.default.fn[fi]=_i,Ei._jQueryInterface};var Di="scrollspy",Si="4.6.2",Ai="bs.scrollspy",Oi="."+Ai,Ni=".data-api",Li=r.default.fn[Di],Mi="dropdown-item",Ii="active",Pi="activate"+Oi,Fi="scroll"+Oi,$i="load"+Oi+Ni,Ri="offset",qi="position",Hi='[data-spy="scroll"]',Ui=".nav, .list-group",Bi=".nav-link",zi=".nav-item",Wi=".list-group-item",Vi=".dropdown",Yi=".dropdown-item",Ki=".dropdown-toggle",Xi={offset:10,method:"auto",target:""},Qi={offset:"number",method:"string",target:"(string|element)"},Ji=function(){function e(e,t){var n=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(t),this._selector=this._config.target+" "+Bi+","+this._config.target+" "+Wi+","+this._config.target+" "+Yi,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,r.default(this._scrollElement).on(Fi,(function(e){return n._process(e)})),this.refresh(),this._process()}var t=e.prototype;return t.refresh=function(){var e=this,t=this._scrollElement===this._scrollElement.window?Ri:qi,n="auto"===this._config.method?t:this._config.method,i=n===qi?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(e){var t,s=v.getSelectorFromElement(e);if(s&&(t=document.querySelector(s)),t){var a=t.getBoundingClientRect();if(a.width||a.height)return[r.default(t)[n]().top+i,s]}return null})).filter(Boolean).sort((function(e,t){return e[0]-t[0]})).forEach((function(t){e._offsets.push(t[0]),e._targets.push(t[1])}))},t.dispose=function(){r.default.removeData(this._element,Ai),r.default(this._scrollElement).off(Oi),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},t._getConfig=function(e){if("string"!=typeof(e=l({},Xi,"object"==typeof e&&e?e:{})).target&&v.isElement(e.target)){var t=r.default(e.target).attr("id");t||(t=v.getUID(Di),r.default(e.target).attr("id",t)),e.target="#"+t}return v.typeCheckConfig(Di,e,Qi),e},t._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},t._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},t._process=function(){var e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),n=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&e0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;)this._activeTarget!==this._targets[r]&&e>=this._offsets[r]&&(void 0===this._offsets[r+1]||e0&&t-1 in e)}function E(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}C.fn=C.prototype={jquery:x,constructor:C,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=C.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return C.each(this,e)},map:function(e){return this.pushStack(C.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(C.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(C.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+O+")"+O+"*"),H=new RegExp(O+"|>"),U=new RegExp(F),B=new RegExp("^"+L+"$"),z={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),bool:new RegExp("^(?:"+T+")$","i"),needsContext:new RegExp("^"+O+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,Y=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,X=new RegExp("\\\\[\\da-fA-F]{1,6}"+O+"?|\\\\([^\\r\\n\\f])","g"),Q=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){le()},Z=ue((function(e){return!0===e.disabled&&E(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{g.apply(s=o.call(I.childNodes),I.childNodes),s[I.childNodes.length].nodeType}catch(e){g={apply:function(e,t){P.apply(e,o.call(t))},call:function(e){P.apply(e,o.call(arguments,1))}}}function G(e,t,n,i){var r,s,a,o,d,c,f,p=t&&t.ownerDocument,v=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==v&&9!==v&&11!==v)return n;if(!i&&(le(t),t=t||l,h)){if(11!==v&&(d=Y.exec(e)))if(r=d[1]){if(9===v){if(!(a=t.getElementById(r)))return n;if(a.id===r)return g.call(n,a),n}else if(p&&(a=p.getElementById(r))&&G.contains(t,a)&&a.id===r)return g.call(n,a),n}else{if(d[2])return g.apply(n,t.getElementsByTagName(e)),n;if((r=d[3])&&t.getElementsByClassName)return g.apply(n,t.getElementsByClassName(r)),n}if(!(x[e+" "]||u&&u.test(e))){if(f=e,p=t,1===v&&(H.test(e)||q.test(e))){for((p=K.test(e)&&oe(t.parentNode)||t)==t&&m.scope||((o=t.getAttribute("id"))?o=C.escapeSelector(o):t.setAttribute("id",o=_)),s=(c=ce(e)).length;s--;)c[s]=(o?"#"+o:":scope")+" "+he(c[s]);f=c.join(",")}try{return g.apply(n,p.querySelectorAll(f)),n}catch(t){x(e,!0)}finally{o===_&&t.removeAttribute("id")}}}return ve(e.replace(N,"$1"),t,n,i)}function ee(){var e=[];return function n(i,r){return e.push(i+" ")>t.cacheLength&&delete n[e.shift()],n[i+" "]=r}}function te(e){return e[_]=!0,e}function ne(e){var t=l.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ie(e){return function(t){return E(t,"input")&&t.type===e}}function re(e){return function(t){return(E(t,"input")||E(t,"button"))&&t.type===e}}function se(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Z(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ae(e){return te((function(t){return t=+t,te((function(n,i){for(var r,s=e([],n.length,t),a=s.length;a--;)n[r=s[a]]&&(n[r]=!(i[r]=n[r]))}))}))}function oe(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var n,i=e?e.ownerDocument||e:I;return i!=l&&9===i.nodeType&&i.documentElement?(d=(l=i).documentElement,h=!C.isXMLDoc(l),p=d.matches||d.webkitMatchesSelector||d.msMatchesSelector,d.msMatchesSelector&&I!=l&&(n=l.defaultView)&&n.top!==n&&n.addEventListener("unload",J),m.getById=ne((function(e){return d.appendChild(e).id=C.expando,!l.getElementsByName||!l.getElementsByName(C.expando).length})),m.disconnectedMatch=ne((function(e){return p.call(e,"*")})),m.scope=ne((function(){return l.querySelectorAll(":scope")})),m.cssHas=ne((function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),m.getById?(t.filter.ID=function(e){var t=e.replace(X,Q);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&h){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(X,Q);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&h){var n,i,r,s=t.getElementById(e);if(s){if((n=s.getAttributeNode("id"))&&n.value===e)return[s];for(r=t.getElementsByName(e),i=0;s=r[i++];)if((n=s.getAttributeNode("id"))&&n.value===e)return[s]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&h)return t.getElementsByClassName(e)},u=[],ne((function(e){var t;d.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||u.push("\\["+O+"*(?:value|"+T+")"),e.querySelectorAll("[id~="+_+"-]").length||u.push("~="),e.querySelectorAll("a#"+_+"+*").length||u.push(".#.+[+~]"),e.querySelectorAll(":checked").length||u.push(":checked"),(t=l.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),d.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&u.push(":enabled",":disabled"),(t=l.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||u.push("\\["+O+"*name"+O+"*="+O+"*(?:''|\"\")")})),m.cssHas||u.push(":has"),u=u.length&&new RegExp(u.join("|")),j=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!m.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument==I&&G.contains(I,e)?-1:t===l||t.ownerDocument==I&&G.contains(I,t)?1:r?c.call(r,e)-c.call(r,t):0:4&n?-1:1)},l):l}for(e in G.matches=function(e,t){return G(e,null,null,t)},G.matchesSelector=function(e,t){if(le(e),h&&!x[t+" "]&&(!u||!u.test(t)))try{var n=p.call(e,t);if(n||m.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){x(t,!0)}return G(t,l,null,[e]).length>0},G.contains=function(e,t){return(e.ownerDocument||e)!=l&&le(e),C.contains(e,t)},G.attr=function(e,n){(e.ownerDocument||e)!=l&&le(e);var i=t.attrHandle[n.toLowerCase()],r=i&&f.call(t.attrHandle,n.toLowerCase())?i(e,n,!h):void 0;return void 0!==r?r:e.getAttribute(n)},G.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},C.uniqueSort=function(e){var t,n=[],i=0,s=0;if(a=!m.sortStable,r=!m.sortStable&&o.call(e,0),S.call(e,j),a){for(;t=e[s++];)t===e[s]&&(i=n.push(s));for(;i--;)A.call(e,n[i],1)}return r=null,e},C.fn.uniqueSort=function(){return this.pushStack(C.uniqueSort(o.apply(this)))},t=C.expr={cacheLength:50,createPseudo:te,match:z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(X,Q),e[3]=(e[3]||e[4]||e[5]||"").replace(X,Q),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||G.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&G.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return z.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=ce(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(X,Q).toLowerCase();return"*"===e?function(){return!0}:function(e){return E(e,t)}},CLASS:function(e){var t=b[e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&b(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(i){var r=G.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,r){var s="nth"!==e.slice(0,3),a="last"!==e.slice(-4),o="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var d,c,h,u,f,p=s!==a?"nextSibling":"previousSibling",g=t.parentNode,m=o&&t.nodeName.toLowerCase(),y=!l&&!o,b=!1;if(g){if(s){for(;p;){for(h=t;h=h[p];)if(o?E(h,m):1===h.nodeType)return!1;f=p="only"===e&&!f&&"nextSibling"}return!0}if(f=[a?g.firstChild:g.lastChild],a&&y){for(b=(u=(d=(c=g[_]||(g[_]={}))[e]||[])[0]===v&&d[1])&&d[2],h=u&&g.childNodes[u];h=++u&&h&&h[p]||(b=u=0)||f.pop();)if(1===h.nodeType&&++b&&h===t){c[e]=[v,u,b];break}}else if(y&&(b=u=(d=(c=t[_]||(t[_]={}))[e]||[])[0]===v&&d[1]),!1===b)for(;(h=++u&&h&&h[p]||(b=u=0)||f.pop())&&(!(o?E(h,m):1===h.nodeType)||!++b||(y&&((c=h[_]||(h[_]={}))[e]=[v,b]),h!==t)););return(b-=r)===i||b%i==0&&b/i>=0}}},PSEUDO:function(e,n){var i,r=t.pseudos[e]||t.setFilters[e.toLowerCase()]||G.error("unsupported pseudo: "+e);return r[_]?r(n):r.length>1?(i=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,t){for(var i,s=r(e,n),a=s.length;a--;)e[i=c.call(e,s[a])]=!(t[i]=s[a])})):function(e){return r(e,0,i)}):r}},pseudos:{not:te((function(e){var t=[],n=[],i=_e(e.replace(N,"$1"));return i[_]?te((function(e,t,n,r){for(var s,a=i(e,null,r,[]),o=e.length;o--;)(s=a[o])&&(e[o]=!(t[o]=s))})):function(e,r,s){return t[0]=e,i(t,null,s,n),t[0]=null,!n.pop()}})),has:te((function(e){return function(t){return G(e,t).length>0}})),contains:te((function(e){return e=e.replace(X,Q),function(t){return(t.textContent||C.text(t)).indexOf(e)>-1}})),lang:te((function(e){return B.test(e||"")||G.error("unsupported lang: "+e),e=e.replace(X,Q).toLowerCase(),function(t){var n;do{if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=i.location&&i.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===d},focus:function(e){return e===function(){try{return l.activeElement}catch(e){}}()&&l.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:se(!1),disabled:se(!0),checked:function(e){return E(e,"input")&&!!e.checked||E(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return V.test(e.nodeName)},input:function(e){return W.test(e.nodeName)},button:function(e){return E(e,"input")&&"button"===e.type||E(e,"button")},text:function(e){var t;return E(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ae((function(){return[0]})),last:ae((function(e,t){return[t-1]})),eq:ae((function(e,t,n){return[n<0?n+t:n]})),even:ae((function(e,t){for(var n=0;nt?t:n;--i>=0;)e.push(i);return e})),gt:ae((function(e,t,n){for(var i=n<0?n+t:n;++i1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function pe(e,t,n,i,r){for(var s,a=[],o=0,l=e.length,d=null!=t;o-1&&(s[d]=!(a[d]=u))}}else f=pe(f===a?f.splice(_,f.length):f),r?r(null,a,f,l):g.apply(a,f)}))}function me(e){for(var i,r,s,a=e.length,o=t.relative[e[0].type],l=o||t.relative[" "],d=o?1:0,h=ue((function(e){return e===i}),l,!0),u=ue((function(e){return c.call(i,e)>-1}),l,!0),f=[function(e,t,r){var s=!o&&(r||t!=n)||((i=t).nodeType?h(e,t,r):u(e,t,r));return i=null,s}];d1&&fe(f),d>1&&he(e.slice(0,d-1).concat({value:" "===e[d-2].type?"*":""})).replace(N,"$1"),r,d0,s=e.length>0,a=function(a,o,d,c,u){var f,p,m,_=0,y="0",b=a&&[],w=[],k=n,x=a||s&&t.find.TAG("*",u),j=v+=null==k?1:Math.random()||.1,T=x.length;for(u&&(n=o==l||o||u);y!==T&&null!=(f=x[y]);y++){if(s&&f){for(p=0,o||f.ownerDocument==l||(le(f),d=!h);m=e[p++];)if(m(f,o||l,d)){g.call(c,f);break}u&&(v=j)}r&&((f=!m&&f)&&_--,a&&b.push(f))}if(_+=y,r&&y!==_){for(p=0;m=i[p++];)m(b,w,o,d);if(a){if(_>0)for(;y--;)b[y]||w[y]||(w[y]=D.call(c));w=pe(w)}g.apply(c,w),u&&!a&&w.length>0&&_+i.length>1&&C.uniqueSort(c)}return u&&(v=j,n=k),b};return r?te(a):a}(a,s)),o.selector=e}return o}function ve(e,n,i,r){var s,a,o,l,d,c="function"==typeof e&&e,u=!r&&ce(e=c.selector||e);if(i=i||[],1===u.length){if((a=u[0]=u[0].slice(0)).length>2&&"ID"===(o=a[0]).type&&9===n.nodeType&&h&&t.relative[a[1].type]){if(!(n=(t.find.ID(o.matches[0].replace(X,Q),n)||[])[0]))return i;c&&(n=n.parentNode),e=e.slice(a.shift().value.length)}for(s=z.needsContext.test(e)?0:a.length;s--&&(o=a[s],!t.relative[l=o.type]);)if((d=t.find[l])&&(r=d(o.matches[0].replace(X,Q),K.test(a[0].type)&&oe(n.parentNode)||n))){if(a.splice(s,1),!(e=r.length&&he(a)))return g.apply(i,r),i;break}}return(c||_e(e,u))(r,n,!h,i,!n||K.test(e)&&oe(n.parentNode)||n),i}de.prototype=t.filters=t.pseudos,t.setFilters=new de,m.sortStable=_.split("").sort(j).join("")===_,le(),m.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(l.createElement("fieldset"))})),C.find=G,C.expr[":"]=C.expr.pseudos,C.unique=C.uniqueSort,G.compile=_e,G.select=ve,G.setDocument=le,G.tokenize=ce,G.escape=C.escapeSelector,G.getText=C.text,G.isXML=C.isXMLDoc,G.selectors=C.expr,G.support=C.support,G.uniqueSort=C.uniqueSort}();var F=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&C(e).is(n))break;i.push(e)}return i},$=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},R=C.expr.match.needsContext,q=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function H(e,t,n){return _(t)?C.grep(e,(function(e,i){return!!t.call(e,i,e)!==n})):t.nodeType?C.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?C.grep(e,(function(e){return c.call(t,e)>-1!==n})):C.filter(t,e,n)}C.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?C.find.matchesSelector(i,e)?[i]:[]:C.find.matches(e,C.grep(t,(function(e){return 1===e.nodeType})))},C.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(C(e).filter((function(){for(t=0;t1?C.uniqueSort(n):n},filter:function(e){return this.pushStack(H(this,e||[],!1))},not:function(e){return this.pushStack(H(this,e||[],!0))},is:function(e){return!!H(this,"string"==typeof e&&R.test(e)?C(e):e||[],!1).length}});var U,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||U,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:B.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof C?t[0]:t,C.merge(this,C.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:y,!0)),q.test(i[1])&&C.isPlainObject(t))for(i in t)_(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=y.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):_(e)?void 0!==n.ready?n.ready(e):e(C):C.makeArray(e,this)}).prototype=C.fn,U=C(y);var z=/^(?:parents|prev(?:Until|All))/,W={children:!0,contents:!0,next:!0,prev:!0};function V(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}C.fn.extend({has:function(e){var t=C(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&C.find.matchesSelector(n,e))){s.push(n);break}return this.pushStack(s.length>1?C.uniqueSort(s):s)},index:function(e){return e?"string"==typeof e?c.call(C(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),C.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return F(e,"parentNode")},parentsUntil:function(e,t,n){return F(e,"parentNode",n)},next:function(e){return V(e,"nextSibling")},prev:function(e){return V(e,"previousSibling")},nextAll:function(e){return F(e,"nextSibling")},prevAll:function(e){return F(e,"previousSibling")},nextUntil:function(e,t,n){return F(e,"nextSibling",n)},prevUntil:function(e,t,n){return F(e,"previousSibling",n)},siblings:function(e){return $((e.parentNode||{}).firstChild,e)},children:function(e){return $(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(E(e,"template")&&(e=e.content||e),C.merge([],e.childNodes))}},(function(e,t){C.fn[e]=function(n,i){var r=C.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=C.filter(i,r)),this.length>1&&(W[e]||C.uniqueSort(r),z.test(e)&&r.reverse()),this.pushStack(r)}}));var Y=/[^\x20\t\r\n\f]+/g;function K(e){return e}function X(e){throw e}function Q(e,t,n,i){var r;try{e&&_(r=e.promise)?r.call(e).done(t).fail(n):e&&_(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}C.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return C.each(e.match(Y)||[],(function(e,n){t[n]=!0})),t}(e):C.extend({},e);var t,n,i,r,s=[],a=[],o=-1,l=function(){for(r=r||e.once,i=t=!0;a.length;o=-1)for(n=a.shift();++o-1;)s.splice(n,1),n<=o&&o--})),this},has:function(e){return e?C.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return r=a=[],s=n="",this},disabled:function(){return!s},lock:function(){return r=a=[],n||t||(s=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d},C.extend({Deferred:function(e){var t=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return C.Deferred((function(n){C.each(t,(function(t,i){var r=_(e[i[4]])&&e[i[4]];s[i[1]]((function(){var e=r&&r.apply(this,arguments);e&&_(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,r){var s=0;function a(e,t,n,r){return function(){var o=this,l=arguments,d=function(){var i,d;if(!(e=s&&(n!==X&&(o=void 0,l=[i]),t.rejectWith(o,l))}};e?c():(C.Deferred.getErrorHook?c.error=C.Deferred.getErrorHook():C.Deferred.getStackHook&&(c.error=C.Deferred.getStackHook()),i.setTimeout(c))}}return C.Deferred((function(i){t[0][3].add(a(0,i,_(r)?r:K,i.notifyWith)),t[1][3].add(a(0,i,_(e)?e:K)),t[2][3].add(a(0,i,_(n)?n:X))})).promise()},promise:function(e){return null!=e?C.extend(e,r):r}},s={};return C.each(t,(function(e,i){var a=i[2],o=i[5];r[i[1]]=a.add,o&&a.add((function(){n=o}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(i[3].fire),s[i[0]]=function(){return s[i[0]+"With"](this===s?void 0:this,arguments),this},s[i[0]+"With"]=a.fireWith})),r.promise(s),e&&e.call(s,s),s},when:function(e){var t=arguments.length,n=t,i=Array(n),r=o.call(arguments),s=C.Deferred(),a=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?o.call(arguments):n,--t||s.resolveWith(i,r)}};if(t<=1&&(Q(e,s.done(a(n)).resolve,s.reject,!t),"pending"===s.state()||_(r[n]&&r[n].then)))return s.then();for(;n--;)Q(r[n],a(n),s.reject);return s.promise()}});var J=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(e,t){i.console&&i.console.warn&&e&&J.test(e.name)&&i.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},C.readyException=function(e){i.setTimeout((function(){throw e}))};var Z=C.Deferred();function G(){y.removeEventListener("DOMContentLoaded",G),i.removeEventListener("load",G),C.ready()}C.fn.ready=function(e){return Z.then(e).catch((function(e){C.readyException(e)})),this},C.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--C.readyWait:C.isReady)||(C.isReady=!0,!0!==e&&--C.readyWait>0||Z.resolveWith(y,[C]))}}),C.ready.then=Z.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?i.setTimeout(C.ready):(y.addEventListener("DOMContentLoaded",G),i.addEventListener("load",G));var ee=function(e,t,n,i,r,s,a){var o=0,l=e.length,d=null==n;if("object"===k(n))for(o in r=!0,n)ee(e,t,o,n[o],!0,s,a);else if(void 0!==i&&(r=!0,_(i)||(a=!0),d&&(a?(t.call(e,i),t=null):(d=t,t=function(e,t,n){return d.call(C(e),n)})),t))for(;o1,null,!0)},removeData:function(e){return this.each((function(){le.remove(this,e)}))}}),C.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=oe.get(e,t),n&&(!i||Array.isArray(n)?i=oe.access(e,t,C.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=C.queue(e,t),i=n.length,r=n.shift(),s=C._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete s.stop,r.call(e,(function(){C.dequeue(e,t)}),s)),!i&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return oe.get(e,n)||oe.access(e,n,{empty:C.Callbacks("once memory").add((function(){oe.remove(e,[t+"queue",n])}))})}}),C.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,Ee=/^$|^module$|\/(?:java|ecma)script/i;xe=y.createDocumentFragment().appendChild(y.createElement("div")),(je=y.createElement("input")).setAttribute("type","radio"),je.setAttribute("checked","checked"),je.setAttribute("name","t"),xe.appendChild(je),m.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",m.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",m.option=!!xe.lastChild;var De={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function Se(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&E(e,t)?C.merge([e],n):n}function Ae(e,t){for(var n=0,i=e.length;n",""]);var Oe=/<|&#?\w+;/;function Ne(e,t,n,i,r){for(var s,a,o,l,d,c,h=t.createDocumentFragment(),u=[],f=0,p=e.length;f-1)r&&r.push(s);else if(d=me(s),a=Se(h.appendChild(s),"script"),d&&Ae(a),n)for(c=0;s=a[c++];)Ee.test(s.type||"")&&n.push(s);return h}var Le=/^([^.]*)(?:\.(.+)|)/;function Me(){return!0}function Ie(){return!1}function Pe(e,t,n,i,r,s){var a,o;if("object"==typeof t){for(o in"string"!=typeof n&&(i=i||n,n=void 0),t)Pe(e,o,n,i,t[o],s);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Ie;else if(!r)return e;return 1===s&&(a=r,r=function(e){return C().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=C.guid++)),e.each((function(){C.event.add(this,t,r,i,n)}))}function Fe(e,t,n){n?(oe.set(e,t,!1),C.event.add(e,t,{namespace:!1,handler:function(e){var n,i=oe.get(this,t);if(1&e.isTrigger&&this[t]){if(i)(C.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=o.call(arguments),oe.set(this,t,i),this[t](),n=oe.get(this,t),oe.set(this,t,!1),i!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else i&&(oe.set(this,t,C.event.trigger(i[0],i.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Me)}})):void 0===oe.get(e,t)&&C.event.add(e,t,Me)}C.event={global:{},add:function(e,t,n,i,r){var s,a,o,l,d,c,h,u,f,p,g,m=oe.get(e);if(se(e))for(n.handler&&(n=(s=n).handler,r=s.selector),r&&C.find.matchesSelector(ge,r),n.guid||(n.guid=C.guid++),(l=m.events)||(l=m.events=Object.create(null)),(a=m.handle)||(a=m.handle=function(t){return void 0!==C&&C.event.triggered!==t.type?C.event.dispatch.apply(e,arguments):void 0}),d=(t=(t||"").match(Y)||[""]).length;d--;)f=g=(o=Le.exec(t[d])||[])[1],p=(o[2]||"").split(".").sort(),f&&(h=C.event.special[f]||{},f=(r?h.delegateType:h.bindType)||f,h=C.event.special[f]||{},c=C.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&C.expr.match.needsContext.test(r),namespace:p.join(".")},s),(u=l[f])||((u=l[f]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,i,p,a)||e.addEventListener&&e.addEventListener(f,a)),h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?u.splice(u.delegateCount++,0,c):u.push(c),C.event.global[f]=!0)},remove:function(e,t,n,i,r){var s,a,o,l,d,c,h,u,f,p,g,m=oe.hasData(e)&&oe.get(e);if(m&&(l=m.events)){for(d=(t=(t||"").match(Y)||[""]).length;d--;)if(f=g=(o=Le.exec(t[d])||[])[1],p=(o[2]||"").split(".").sort(),f){for(h=C.event.special[f]||{},u=l[f=(i?h.delegateType:h.bindType)||f]||[],o=o[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=s=u.length;s--;)c=u[s],!r&&g!==c.origType||n&&n.guid!==c.guid||o&&!o.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(u.splice(s,1),c.selector&&u.delegateCount--,h.remove&&h.remove.call(e,c));a&&!u.length&&(h.teardown&&!1!==h.teardown.call(e,p,m.handle)||C.removeEvent(e,f,m.handle),delete l[f])}else for(f in l)C.event.remove(e,f+t[d],n,i,!0);C.isEmptyObject(l)&&oe.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,s,a,o=new Array(arguments.length),l=C.event.fix(e),d=(oe.get(this,"events")||Object.create(null))[l.type]||[],c=C.event.special[l.type]||{};for(o[0]=l,t=1;t=1))for(;d!==this;d=d.parentNode||this)if(1===d.nodeType&&("click"!==e.type||!0!==d.disabled)){for(s=[],a={},n=0;n-1:C.find(r,this,null,[d]).length),a[r]&&s.push(i);s.length&&o.push({elem:d,handlers:s})}return d=this,l\s*$/g;function He(e,t){return E(e,"table")&&E(11!==t.nodeType?t:t.firstChild,"tr")&&C(e).children("tbody")[0]||e}function Ue(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Be(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function ze(e,t){var n,i,r,s,a,o;if(1===t.nodeType){if(oe.hasData(e)&&(o=oe.get(e).events))for(r in oe.remove(t,"handle events"),o)for(n=0,i=o[r].length;n1&&"string"==typeof p&&!m.checkClone&&Re.test(p))return e.each((function(r){var s=e.eq(r);g&&(t[0]=p.call(this,r,s.html())),Ve(s,t,n,i)}));if(u&&(s=(r=Ne(t,e[0].ownerDocument,!1,e,i)).firstChild,1===r.childNodes.length&&(r=s),s||i)){for(o=(a=C.map(Se(r,"script"),Ue)).length;h0&&Ae(a,!l&&Se(e,"script")),o},cleanData:function(e){for(var t,n,i,r=C.event.special,s=0;void 0!==(n=e[s]);s++)if(se(n)){if(t=n[oe.expando]){if(t.events)for(i in t.events)r[i]?C.event.remove(n,i):C.removeEvent(n,i,t.handle);n[oe.expando]=void 0}n[le.expando]&&(n[le.expando]=void 0)}}}),C.fn.extend({detach:function(e){return Ye(this,e,!0)},remove:function(e){return Ye(this,e)},text:function(e){return ee(this,(function(e){return void 0===e?C.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ve(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||He(this,e).appendChild(e)}))},prepend:function(){return Ve(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=He(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(C.cleanData(Se(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return C.clone(this,e,t)}))},html:function(e){return ee(this,(function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!$e.test(e)&&!De[(Te.exec(e)||["",""])[1].toLowerCase()]){e=C.htmlPrefilter(e);try{for(;n=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-s-l-o-.5))||0),l+d}function ct(e,t,n){var i=Qe(e),r=(!m.boxSizingReliable()||n)&&"border-box"===C.css(e,"boxSizing",!1,i),s=r,a=Ge(e,t,i),o="offset"+t[0].toUpperCase()+t.slice(1);if(Ke.test(a)){if(!n)return a;a="auto"}return(!m.boxSizingReliable()&&r||!m.reliableTrDimensions()&&E(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===C.css(e,"display",!1,i))&&e.getClientRects().length&&(r="border-box"===C.css(e,"boxSizing",!1,i),(s=o in e)&&(a=e[o])),(a=parseFloat(a)||0)+dt(e,t,n||(r?"border":"content"),s,i,a)+"px"}function ht(e,t,n,i,r){return new ht.prototype.init(e,t,n,i,r)}C.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,s,a,o=re(t),l=Xe.test(t),d=e.style;if(l||(t=rt(o)),a=C.cssHooks[t]||C.cssHooks[o],void 0===n)return a&&"get"in a&&void 0!==(r=a.get(e,!1,i))?r:d[t];"string"===(s=typeof n)&&(r=fe.exec(n))&&r[1]&&(n=ye(e,t,r),s="number"),null!=n&&n==n&&("number"!==s||l||(n+=r&&r[3]||(C.cssNumber[o]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(d[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,i))||(l?d.setProperty(t,n):d[t]=n))}},css:function(e,t,n,i){var r,s,a,o=re(t);return Xe.test(t)||(t=rt(o)),(a=C.cssHooks[t]||C.cssHooks[o])&&"get"in a&&(r=a.get(e,!0,n)),void 0===r&&(r=Ge(e,t,i)),"normal"===r&&t in ot&&(r=ot[t]),""===n||n?(s=parseFloat(r),!0===n||isFinite(s)?s||0:r):r}}),C.each(["height","width"],(function(e,t){C.cssHooks[t]={get:function(e,n,i){if(n)return!st.test(C.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ct(e,t,i):Je(e,at,(function(){return ct(e,t,i)}))},set:function(e,n,i){var r,s=Qe(e),a=!m.scrollboxSize()&&"absolute"===s.position,o=(a||i)&&"border-box"===C.css(e,"boxSizing",!1,s),l=i?dt(e,t,i,o,s):0;return o&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(s[t])-dt(e,t,"border",!1,s)-.5)),l&&(r=fe.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=C.css(e,t)),lt(0,n,l)}}})),C.cssHooks.marginLeft=et(m.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Je(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),C.each({margin:"",padding:"",border:"Width"},(function(e,t){C.cssHooks[e+t]={expand:function(n){for(var i=0,r={},s="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+pe[i]+t]=s[i]||s[i-2]||s[0];return r}},"margin"!==e&&(C.cssHooks[e+t].set=lt)})),C.fn.extend({css:function(e,t){return ee(this,(function(e,t,n){var i,r,s={},a=0;if(Array.isArray(t)){for(i=Qe(e),r=t.length;a1)}}),C.Tween=ht,ht.prototype={constructor:ht,init:function(e,t,n,i,r,s){this.elem=e,this.prop=n,this.easing=r||C.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=s||(C.cssNumber[n]?"":"px")},cur:function(){var e=ht.propHooks[this.prop];return e&&e.get?e.get(this):ht.propHooks._default.get(this)},run:function(e){var t,n=ht.propHooks[this.prop];return this.options.duration?this.pos=t=C.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ht.propHooks._default.set(this),this}},ht.prototype.init.prototype=ht.prototype,ht.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=C.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){C.fx.step[e.prop]?C.fx.step[e.prop](e):1!==e.elem.nodeType||!C.cssHooks[e.prop]&&null==e.elem.style[rt(e.prop)]?e.elem[e.prop]=e.now:C.style(e.elem,e.prop,e.now+e.unit)}}},ht.propHooks.scrollTop=ht.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},C.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},C.fx=ht.prototype.init,C.fx.step={};var ut,ft,pt=/^(?:toggle|show|hide)$/,gt=/queueHooks$/;function mt(){ft&&(!1===y.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(mt):i.setTimeout(mt,C.fx.interval),C.fx.tick())}function _t(){return i.setTimeout((function(){ut=void 0})),ut=Date.now()}function vt(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=pe[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function yt(e,t,n){for(var i,r=(bt.tweeners[t]||[]).concat(bt.tweeners["*"]),s=0,a=r.length;s1)},removeAttr:function(e){return this.each((function(){C.removeAttr(this,e)}))}}),C.extend({attr:function(e,t,n){var i,r,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===e.getAttribute?C.prop(e,t,n):(1===s&&C.isXMLDoc(e)||(r=C.attrHooks[t.toLowerCase()]||(C.expr.match.bool.test(t)?wt:void 0)),void 0!==n?null===n?void C.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=C.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&E(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(Y);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),wt={set:function(e,t,n){return!1===t?C.removeAttr(e,n):e.setAttribute(n,n),n}},C.each(C.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=kt[t]||C.find.attr;kt[t]=function(e,t,i){var r,s,a=t.toLowerCase();return i||(s=kt[a],kt[a]=r,r=null!=n(e,t,i)?a:null,kt[a]=s),r}}));var xt=/^(?:input|select|textarea|button)$/i,jt=/^(?:a|area)$/i;function Ct(e){return(e.match(Y)||[]).join(" ")}function Tt(e){return e.getAttribute&&e.getAttribute("class")||""}function Et(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(Y)||[]}C.fn.extend({prop:function(e,t){return ee(this,C.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[C.propFix[e]||e]}))}}),C.extend({prop:function(e,t,n){var i,r,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&C.isXMLDoc(e)||(t=C.propFix[t]||t,r=C.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=C.find.attr(e,"tabindex");return t?parseInt(t,10):xt.test(e.nodeName)||jt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(C.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){C.propFix[this.toLowerCase()]=this})),C.fn.extend({addClass:function(e){var t,n,i,r,s,a;return _(e)?this.each((function(t){C(this).addClass(e.call(this,t,Tt(this)))})):(t=Et(e)).length?this.each((function(){if(i=Tt(this),n=1===this.nodeType&&" "+Ct(i)+" "){for(s=0;s-1;)n=n.replace(" "+r+" "," ");a=Ct(n),i!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,i,r,s,a=typeof e,o="string"===a||Array.isArray(e);return _(e)?this.each((function(n){C(this).toggleClass(e.call(this,n,Tt(this),t),t)})):"boolean"==typeof t&&o?t?this.addClass(e):this.removeClass(e):(n=Et(e),this.each((function(){if(o)for(s=C(this),r=0;r-1)return!0;return!1}});var Dt=/\r/g;C.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=_(e),this.each((function(n){var r;1===this.nodeType&&(null==(r=i?e.call(this,n,C(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=C.map(r,(function(e){return null==e?"":e+""}))),(t=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))}))):r?(t=C.valHooks[r.type]||C.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(Dt,""):null==n?"":n:void 0}}),C.extend({valHooks:{option:{get:function(e){var t=C.find.attr(e,"value");return null!=t?t:Ct(C.text(e))}},select:{get:function(e){var t,n,i,r=e.options,s=e.selectedIndex,a="select-one"===e.type,o=a?null:[],l=a?s+1:r.length;for(i=s<0?l:a?s:0;i-1)&&(n=!0);return n||(e.selectedIndex=-1),s}}}}),C.each(["radio","checkbox"],(function(){C.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=C.inArray(C(e).val(),t)>-1}},m.checkOn||(C.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var St=i.location,At={guid:Date.now()},Ot=/\?/;C.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new i.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||C.error("Invalid XML: "+(n?C.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Nt=/^(?:focusinfocus|focusoutblur)$/,Lt=function(e){e.stopPropagation()};C.extend(C.event,{trigger:function(e,t,n,r){var s,a,o,l,d,c,h,u,p=[n||y],g=f.call(e,"type")?e.type:e,m=f.call(e,"namespace")?e.namespace.split("."):[];if(a=u=o=n=n||y,3!==n.nodeType&&8!==n.nodeType&&!Nt.test(g+C.event.triggered)&&(g.indexOf(".")>-1&&(m=g.split("."),g=m.shift(),m.sort()),d=g.indexOf(":")<0&&"on"+g,(e=e[C.expando]?e:new C.Event(g,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:C.makeArray(t,[e]),h=C.event.special[g]||{},r||!h.trigger||!1!==h.trigger.apply(n,t))){if(!r&&!h.noBubble&&!v(n)){for(l=h.delegateType||g,Nt.test(l+g)||(a=a.parentNode);a;a=a.parentNode)p.push(a),o=a;o===(n.ownerDocument||y)&&p.push(o.defaultView||o.parentWindow||i)}for(s=0;(a=p[s++])&&!e.isPropagationStopped();)u=a,e.type=s>1?l:h.bindType||g,(c=(oe.get(a,"events")||Object.create(null))[e.type]&&oe.get(a,"handle"))&&c.apply(a,t),(c=d&&a[d])&&c.apply&&se(a)&&(e.result=c.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,r||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(p.pop(),t)||!se(n)||d&&_(n[g])&&!v(n)&&((o=n[d])&&(n[d]=null),C.event.triggered=g,e.isPropagationStopped()&&u.addEventListener(g,Lt),n[g](),e.isPropagationStopped()&&u.removeEventListener(g,Lt),C.event.triggered=void 0,o&&(n[d]=o)),e.result}},simulate:function(e,t,n){var i=C.extend(new C.Event,n,{type:e,isSimulated:!0});C.event.trigger(i,null,t)}}),C.fn.extend({trigger:function(e,t){return this.each((function(){C.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return C.event.trigger(e,t,n,!0)}});var Mt=/\[\]$/,It=/\r?\n/g,Pt=/^(?:submit|button|image|reset|file)$/i,Ft=/^(?:input|select|textarea|keygen)/i;function $t(e,t,n,i){var r;if(Array.isArray(t))C.each(t,(function(t,r){n||Mt.test(e)?i(e,r):$t(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)}));else if(n||"object"!==k(t))i(e,t);else for(r in t)$t(e+"["+r+"]",t[r],n,i)}C.param=function(e,t){var n,i=[],r=function(e,t){var n=_(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!C.isPlainObject(e))C.each(e,(function(){r(this.name,this.value)}));else for(n in e)$t(n,e[n],t,r);return i.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=C.prop(this,"elements");return e?C.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!C(this).is(":disabled")&&Ft.test(this.nodeName)&&!Pt.test(e)&&(this.checked||!Ce.test(e))})).map((function(e,t){var n=C(this).val();return null==n?null:Array.isArray(n)?C.map(n,(function(e){return{name:t.name,value:e.replace(It,"\r\n")}})):{name:t.name,value:n.replace(It,"\r\n")}})).get()}});var Rt=/%20/g,qt=/#.*$/,Ht=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)$/gm,Bt=/^(?:GET|HEAD)$/,zt=/^\/\//,Wt={},Vt={},Yt="*/".concat("*"),Kt=y.createElement("a");function Xt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,s=t.toLowerCase().match(Y)||[];if(_(n))for(;i=s[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Qt(e,t,n,i){var r={},s=e===Vt;function a(o){var l;return r[o]=!0,C.each(e[o]||[],(function(e,o){var d=o(t,n,i);return"string"!=typeof d||s||r[d]?s?!(l=d):void 0:(t.dataTypes.unshift(d),a(d),!1)})),l}return a(t.dataTypes[0])||!r["*"]&&a("*")}function Jt(e,t){var n,i,r=C.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&C.extend(!0,e,i),e}Kt.href=St.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Yt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Jt(Jt(e,C.ajaxSettings),t):Jt(C.ajaxSettings,e)},ajaxPrefilter:Xt(Wt),ajaxTransport:Xt(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r,s,a,o,l,d,c,h,u,f=C.ajaxSetup({},t),p=f.context||f,g=f.context&&(p.nodeType||p.jquery)?C(p):C.event,m=C.Deferred(),_=C.Callbacks("once memory"),v=f.statusCode||{},b={},w={},k="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(d){if(!a)for(a={};t=Ut.exec(s);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return d?s:null},setRequestHeader:function(e,t){return null==d&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==d&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(d)x.always(e[x.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||k;return n&&n.abort(t),j(0,t),this}};if(m.promise(x),f.url=((e||f.url||St.href)+"").replace(zt,St.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(Y)||[""],null==f.crossDomain){l=y.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Kt.protocol+"//"+Kt.host!=l.protocol+"//"+l.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=C.param(f.data,f.traditional)),Qt(Wt,f,t,x),d)return x;for(h in(c=C.event&&f.global)&&0==C.active++&&C.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Bt.test(f.type),r=f.url.replace(qt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Rt,"+")):(u=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(Ot.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(Ht,"$1"),u=(Ot.test(r)?"&":"?")+"_="+At.guid+++u),f.url=r+u),f.ifModified&&(C.lastModified[r]&&x.setRequestHeader("If-Modified-Since",C.lastModified[r]),C.etag[r]&&x.setRequestHeader("If-None-Match",C.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&x.setRequestHeader("Content-Type",f.contentType),x.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Yt+"; q=0.01":""):f.accepts["*"]),f.headers)x.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(!1===f.beforeSend.call(p,x,f)||d))return x.abort();if(k="abort",_.add(f.complete),x.done(f.success),x.fail(f.error),n=Qt(Vt,f,t,x)){if(x.readyState=1,c&&g.trigger("ajaxSend",[x,f]),d)return x;f.async&&f.timeout>0&&(o=i.setTimeout((function(){x.abort("timeout")}),f.timeout));try{d=!1,n.send(b,j)}catch(e){if(d)throw e;j(-1,e)}}else j(-1,"No Transport");function j(e,t,a,l){var h,u,y,b,w,k=t;d||(d=!0,o&&i.clearTimeout(o),n=void 0,s=l||"",x.readyState=e>0?4:0,h=e>=200&&e<300||304===e,a&&(b=function(e,t,n){for(var i,r,s,a,o=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in o)if(o[r]&&o[r].test(i)){l.unshift(r);break}if(l[0]in n)s=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){s=r;break}a||(a=r)}s=s||a}if(s)return s!==l[0]&&l.unshift(s),n[s]}(f,x,a)),!h&&C.inArray("script",f.dataTypes)>-1&&C.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),b=function(e,t,n,i){var r,s,a,o,l,d={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)d[a.toLowerCase()]=e.converters[a];for(s=c.shift();s;)if(e.responseFields[s]&&(n[e.responseFields[s]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=s,s=c.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(a=d[l+" "+s]||d["* "+s]))for(r in d)if((o=r.split(" "))[1]===s&&(a=d[l+" "+o[0]]||d["* "+o[0]])){!0===a?a=d[r]:!0!==d[r]&&(s=o[0],c.unshift(o[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+s}}}return{state:"success",data:t}}(f,b,x,h),h?(f.ifModified&&((w=x.getResponseHeader("Last-Modified"))&&(C.lastModified[r]=w),(w=x.getResponseHeader("etag"))&&(C.etag[r]=w)),204===e||"HEAD"===f.type?k="nocontent":304===e?k="notmodified":(k=b.state,u=b.data,h=!(y=b.error))):(y=k,!e&&k||(k="error",e<0&&(e=0))),x.status=e,x.statusText=(t||k)+"",h?m.resolveWith(p,[u,k,x]):m.rejectWith(p,[x,k,y]),x.statusCode(v),v=void 0,c&&g.trigger(h?"ajaxSuccess":"ajaxError",[x,f,h?u:y]),_.fireWith(p,[x,k]),c&&(g.trigger("ajaxComplete",[x,f]),--C.active||C.event.trigger("ajaxStop")))}return x},getJSON:function(e,t,n){return C.get(e,t,n,"json")},getScript:function(e,t){return C.get(e,void 0,t,"script")}}),C.each(["get","post"],(function(e,t){C[t]=function(e,n,i,r){return _(n)&&(r=r||i,i=n,n=void 0),C.ajax(C.extend({url:e,type:t,dataType:r,data:n,success:i},C.isPlainObject(e)&&e))}})),C.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),C._evalUrl=function(e,t,n){return C.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){C.globalEval(e,t,n)}})},C.fn.extend({wrapAll:function(e){var t;return this[0]&&(_(e)&&(e=e.call(this[0])),t=C(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return _(e)?this.each((function(t){C(this).wrapInner(e.call(this,t))})):this.each((function(){var t=C(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=_(e);return this.each((function(n){C(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){C(this).replaceWith(this.childNodes)})),this}}),C.expr.pseudos.hidden=function(e){return!C.expr.pseudos.visible(e)},C.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(e){}};var Zt={0:200,1223:204},Gt=C.ajaxSettings.xhr();m.cors=!!Gt&&"withCredentials"in Gt,m.ajax=Gt=!!Gt,C.ajaxTransport((function(e){var t,n;if(m.cors||Gt&&!e.crossDomain)return{send:function(r,s){var a,o=e.xhr();if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)o[a]=e.xhrFields[a];for(a in e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)o.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(t=n=o.onload=o.onerror=o.onabort=o.ontimeout=o.onreadystatechange=null,"abort"===e?o.abort():"error"===e?"number"!=typeof o.status?s(0,"error"):s(o.status,o.statusText):s(Zt[o.status]||o.status,o.statusText,"text"!==(o.responseType||"text")||"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders()))}},o.onload=t(),n=o.onerror=o.ontimeout=t("error"),void 0!==o.onabort?o.onabort=n:o.onreadystatechange=function(){4===o.readyState&&i.setTimeout((function(){t&&n()}))},t=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),C.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return C.globalEval(e),e}}}),C.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),C.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(i,r){t=C(" - + diff --git a/views/layouts/page_overview_name_only.tt b/views/layouts/page_overview_name_only.tt index f435d1f1a..aad7e8df9 100644 --- a/views/layouts/page_overview_name_only.tt +++ b/views/layouts/page_overview_name_only.tt @@ -1,6 +1,6 @@ [%- # prepare files table config - table_dom = "t"; + table_layout = undef table_language = {emptyTable => "No " _ item_type _ "s available"}; table_show_all_records = 1; @@ -47,7 +47,7 @@ aside_buttons = [{ type = "link" target = url.page _ "/" _ add_path _ "/" - class = "btn btn-default" + class = "btn btn-primary btn-add" label = "Add " _ item_type }]; -%] diff --git a/views/layouts/page_reporting_overview.tt b/views/layouts/page_reporting_overview.tt index 380ef3e8e..4d596d4b3 100644 --- a/views/layouts/page_reporting_overview.tt +++ b/views/layouts/page_reporting_overview.tt @@ -27,16 +27,16 @@
    [% INCLUDE fields/hidden.tt name="csrf_token" value=csrf_token; %] - [% INCLUDE 'fields/input.tt' + [% INCLUDE 'fields/input.tt' value = security_marking label = "Security Marking" placeholder = "Enter Security Marking" type = "text" filter = "html" name = "security_marking" %] - +
    - \ No newline at end of file + diff --git a/views/layouts/page_save_name_only.tt b/views/layouts/page_save_name_only.tt index e5c42cffd..fffaba82a 100644 --- a/views/layouts/page_save_name_only.tt +++ b/views/layouts/page_save_name_only.tt @@ -10,12 +10,12 @@
    [%- INCLUDE fields/hidden.tt name="csrf_token" value=csrf_token; - + IF item.id; INCLUDE fields/hidden.tt name="id" value=item.id; END; -%] -
    +
    [%- @@ -36,8 +36,8 @@
    - +
    -
    -
    +
    +
    @@ -40,7 +40,7 @@
    diff --git a/views/metric.tt b/views/metric.tt index a3d1c04df..eb43065f5 100644 --- a/views/metric.tt +++ b/views/metric.tt @@ -2,7 +2,7 @@ [% INCLUDE fields/hidden.tt name="csrf_token" value=csrf_token; - + IF metricgroup.id; INCLUDE fields/hidden.tt name="id" value=metricgroup.id; END; @@ -13,18 +13,19 @@ [% IF metricgroup.id %]Edit metric[% ELSE %]Add new metric[% END %]
    - +
    -
    -

    - Metric name -

    - -
    +
    +
    +

    + Metric name +

    +
    +
    @@ -41,29 +42,29 @@
    -
    - + [% IF metricgroup.id %]

    - Add item - Delete group + Delete group

    - + @@ -72,8 +73,8 @@ [% FOREACH metric IN metricgroup.metrics %] -
    Table for metric groupsTable for metric groups
    X-axis value
    - - - + + +
    -
    -

    - Metrics help -

    - -
    +
    +
    +

    + Metrics help +

    +
    + +

    Use this page to define a set of metrics to plot graphs against. @@ -137,7 +140,7 @@

    - +
    @@ -153,7 +156,7 @@
    [% IF button_type == "button" %] - [% ELSE %] diff --git a/views/tables/basic_cell_modal_button.tt b/views/tables/basic_cell_modal_button.tt index d55f3306f..dc15a89f9 100644 --- a/views/tables/basic_cell_modal_button.tt +++ b/views/tables/basic_cell_modal_button.tt @@ -6,9 +6,9 @@