From 0fca885313a061ede5455f626b0d9ce4b8473d57 Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 10 May 2022 16:30:39 -0400 Subject: [PATCH 01/23] [ENH] add I/O code, beta visualization code, some unit tests, started doc/type hinting overhaul, added more CircleCI runners. omnibus commit that will never happen again --- .circleci/config.yml | 40 +- .gitignore | 8 +- .tox/.package.lock | 0 docs/make.bat | 0 plspy/__init__.py | 8 +- plspy/core/class_functions.py | 7 +- plspy/core/pls.py | 41 +- plspy/core/pls_classes.py | 97 ++-- plspy/io/__init__.py | 0 plspy/io/io.py | 739 +++++++++++++++++++++++++++ plspy/tests/test_io.py | 37 ++ plspy/visualize/__init__.py | 0 plspy/visualize/visualize.py | 24 + plspy/visualize/visualize_classes.py | 529 +++++++++++++++++++ 14 files changed, 1463 insertions(+), 67 deletions(-) mode change 100755 => 100644 .tox/.package.lock mode change 100644 => 100755 docs/make.bat create mode 100644 plspy/io/__init__.py create mode 100644 plspy/io/io.py create mode 100644 plspy/tests/test_io.py create mode 100644 plspy/visualize/__init__.py create mode 100644 plspy/visualize/visualize.py create mode 100644 plspy/visualize/visualize_classes.py diff --git a/.circleci/config.yml b/.circleci/config.yml index 28e8d18..bf7b16f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ orbs: # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: - build-and-test: + build-and-test-3.10: docker: - image: cimg/python:3.10.2 steps: @@ -25,6 +25,39 @@ jobs: - run: name: Run tests command: pytest + build-and-test-3.9: + docker: + - image: cimg/python:3.9 + steps: + - checkout + - python/install-packages: + pkg-manager: pip + pip-dependency-file: requirements.txt + - run: + name: Run tests + command: pytest + build-and-test-3.8: + docker: + - image: cimg/python:3.8 + steps: + - checkout + - python/install-packages: + pkg-manager: pip + pip-dependency-file: requirements.txt + - run: + name: Run tests + command: pytest + build-and-test-3.7: + docker: + - image: cimg/python:3.7 + steps: + - checkout + - python/install-packages: + pkg-manager: pip + pip-dependency-file: requirements.txt + - run: + name: Run tests + command: pytest build-docs: docker: - image: cimg/python:3.10.2 @@ -45,6 +78,9 @@ workflows: run-tests-and-build-docs: # Inside the workflow, you define the jobs you want to run. jobs: - - build-and-test + - build-and-test-3.10 + - build-and-test-3.9 + - build-and-test-3.8 + - build-and-test-3.7 - build-docs diff --git a/.gitignore b/.gitignore index 1ea4ef7..b778ba2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,12 @@ __pycache__/ plspy/__pycache__/ *.py[cod] -plspy/.*.py[cod] -plspy/.*.sw[op] +plspy/*/.*.py[cod] +plspy/.*.sw[klmnop] +plspy/io/.*.sw[klmnop] +plspy/core/.*.sw[klmnop] +plspy/visualize/.*.sw[klmnop] +plspy/tests/.*.sw[klmnop] plspy/.nfs* example_*/ diff --git a/.tox/.package.lock b/.tox/.package.lock old mode 100755 new mode 100644 diff --git a/docs/make.bat b/docs/make.bat old mode 100644 new mode 100755 diff --git a/plspy/__init__.py b/plspy/__init__.py index d7906e3..6ef38a5 100644 --- a/plspy/__init__.py +++ b/plspy/__init__.py @@ -1,4 +1,3 @@ - from .core import exceptions from .core import gsvd from .core import decorators @@ -10,6 +9,10 @@ from .core import pls from .core.pls import PLS from .core.pls import methods + +from .io import io +from .visualize import visualize + from . import __docs__ import sys @@ -21,4 +24,5 @@ from . import _version -__version__ = _version.get_versions()['version'] + +__version__ = _version.get_versions()["version"] diff --git a/plspy/core/class_functions.py b/plspy/core/class_functions.py index b0c653e..b058366 100644 --- a/plspy/core/class_functions.py +++ b/plspy/core/class_functions.py @@ -181,7 +181,7 @@ def _compute_X_latents(I, EV): return dotp -def _compute_corr(X, Y, cond_order): +def _compute_corr(X, Y, cond_order): # , n_cond): """Compute per-condition correlation matrices (concatenated as R, in the case of Behavioural, to pass into GSVD). @@ -210,6 +210,11 @@ def _compute_corr(X, Y, cond_order): order_all = cond_order.reshape(-1) start = 0 start_R = 0 + # if n_cond == 1: + # X_zsc = (X - X.mean(axis=0)) / X.std(axis=0, ddof=1) + # Y_zsc = (Y - Y.mean(axis=0)) / Y.std(axis=0, ddof=1) + # R = (Y_zsc.T @ X_zsc) / (X_zsc.shape[0] - 1) + # else: for i in range(len(order_all)): # X and Y zscored within each condition Xc_zsc = scipy.stats.zscore(X[start : order_all[i] + start,]) diff --git a/plspy/core/pls.py b/plspy/core/pls.py index fcf84b8..613a08a 100644 --- a/plspy/core/pls.py +++ b/plspy/core/pls.py @@ -1,4 +1,5 @@ -# import numpy as np +import numpy as np +from typing import Optional, Tuple, List, Union, Type # project imports from . import pls_classes @@ -6,16 +7,35 @@ # dictionary holding PLS methods; used with help() methods = { - "mct" : pls_classes._MeanCentreTaskPLS, - "rb" : pls_classes._RegularBehaviourPLS, - "cst" : pls_classes._ContrastTaskPLS, - "csb" : pls_classes._ContrastBehaviourPLS, - "mb" : pls_classes._MultiblockPLS, - "cmb" : pls_classes._ContrastMultiblockPLS - } + "mct": pls_classes._MeanCentreTaskPLS, + "rb": pls_classes._RegularBehaviourPLS, + "cst": pls_classes._ContrastTaskPLS, + "csb": pls_classes._ContrastBehaviourPLS, + "mb": pls_classes._MultiblockPLS, + "cmb": pls_classes._ContrastMultiblockPLS, +} -def PLS(*args, **kwargs): +def PLS(*args: np.ndarray, **kwargs: str) -> Type[pls_classes.PLSBase]: + """ + Driver function for PLS. This function collects arguments from the user, + passes them to the specified version of PLS, and returns the result. + + To read more on each flavour of PLS, see the docs for them under + `pls_classes`. + + Parameters + ---------- + *args : np.ndarray + Positional (required) arguments for PLS. Passed into `pls_classes`. + **kwargs : str + Keyword (optional) arguments for PLS. Passed into `pls_classes`. + Returns + ------- + Type[pls_classes.PLSBase] + PLS result structure from the specified PLS version. See + docs of `pls_classes` for info on exact return values/types. + """ # TODO: handle first argument being pls method # print(f"arg1:{args[0]}") @@ -40,7 +60,8 @@ def PLS(*args, **kwargs): # return finished PLS class with user-specified method return pls_classes.PLSBase._create(pls_method, *args, **kwargs) + # __init__.py docstring assembled using blocks also used in # other files. Docstrings found in __docs__.py -PLS.__doc__ = __docs__.pls_wrapper_header +PLS.__doc__ = __docs__.pls_wrapper_header PLS.__doc__ += __docs__.plspy_body diff --git a/plspy/core/pls_classes.py b/plspy/core/pls_classes.py index 641c156..9416dea 100644 --- a/plspy/core/pls_classes.py +++ b/plspy/core/pls_classes.py @@ -1,6 +1,7 @@ import abc import numpy as np import scipy.stats +from typing import Optional, Tuple, List, Union, Type # project imports from . import bootstrap_permutation @@ -185,7 +186,7 @@ def __init__( num_boot: int = 1000, rotate_method: int = 0, mctype: int = 0, - **kwargs, + **kwargs: str, ): for k, v in kwargs.items(): setattr(self, k, v) @@ -229,19 +230,14 @@ def __init__( self.num_boot = num_boot self.mctype = mctype - # assign functions to class - self._mean_centre = class_functions._mean_centre - self._run_pls = class_functions._run_pls - self._compute_X_latents = class_functions._compute_X_latents - # compute X means and X mean-centred values - self.X_means, self.X_mc = self._mean_centre( + self.X_means, self.X_mc = class_functions._mean_centre( self.X, self.cond_order, mctype=self.mctype ) - self.U, self.s, self.V = self._run_pls(self.X_mc) + self.U, self.s, self.V = class_functions._run_pls(self.X_mc) print(f"X_mc shape: {self.X_mc.shape}") # self.X_latent = np.dot(self.X_mc, self.V) - self.X_latent = self._compute_X_latents(self.X_mc, self.V) + self.X_latent = class_functions._compute_X_latents(self.X_mc, self.V) self.resample_tests = bootstrap_permutation.ResampleTest._create( self.pls_alg, self.X, @@ -250,7 +246,7 @@ def __init__( self.s, self.V, self.cond_order, - preprocess=self._mean_centre, + preprocess=class_functions._mean_centre, nperm=self.num_perm, nboot=self.num_boot, rotate_method=rotate_method, @@ -477,20 +473,21 @@ def __init__( # assign functions to class # TODO: decide whether or not these should be applied # or if users should import from class_functions module - self._compute_R = class_functions._compute_corr - self._run_pls = class_functions._run_pls - self._compute_X_latents = class_functions._compute_X_latents - self._compute_Y_latents = class_functions._compute_Y_latents + class_functions._compute_R = class_functions._compute_corr # compute R correlation matrix - self.R = self._compute_R(self.X, self.Y, self.cond_order) + self.R = class_functions._compute_R(self.X, self.Y, self.cond_order) - self.U, self.s, self.V = self._run_pls(self.R) + self.U, self.s, self.V = class_functions._run_pls(self.R) # self.X_latent = np.dot(self.X_mc, self.V) - self.X_latent = self._compute_X_latents(self.X, self.V) - self.Y_latent = self._compute_Y_latents(self.Y, self.U, self.cond_order) + self.X_latent = class_functions._compute_X_latents(self.X, self.V) + self.Y_latent = class_functions._compute_Y_latents( + self.Y, self.U, self.cond_order + ) # compute latent variable correlation matrix for V using compute_R - self.lvcorrs = self._compute_R(self.X_latent, self.Y, self.cond_order) + self.lvcorrs = class_functions._compute_R( + self.X_latent, self.Y, self.cond_order + ) # self.lvcorrs[:, 1:] = self.lvcorrs[:, 1:] * -1 # self.lvcorrs[:, 0] = np.abs(self.lvcorrs[:, 0]) @@ -502,7 +499,7 @@ def __init__( self.s, self.V, self.cond_order, - preprocess=self._compute_R, + preprocess=class_functions._compute_R, nperm=self.num_perm, nboot=self.num_boot, rotate_method=rotate_method, @@ -680,16 +677,14 @@ def __init__( self.mctype = mctype # TODO: catch extraneous keyword args - self._mean_centre = class_functions._mean_centre - self._run_pls_contrast = class_functions._run_pls_contrast - self._compute_X_latents = class_functions._compute_X_latents - # self._compute_Y_latents = class_functions._compute_Y_latents # compute R correlation matrix - self.R = self._mean_centre( + self.R = class_functions._mean_centre( self.X, self.cond_order, return_means=False, mctype=self.mctype ) - self.U, self.s, self.V = self._run_pls_contrast(self.R, self.contrasts) + self.U, self.s, self.V = class_functions._run_pls_contrast( + self.R, self.contrasts + ) # norm lvintercorrs if rotate method is # Procrustes or derived if rotate_method in [1, 2]: @@ -698,8 +693,8 @@ def __init__( else: self.lvintercorrs = self.U.T @ self.U # self.X_latent = np.dot(self.X_mc, self.V) - self.X_latent = self._compute_X_latents(self.X, self.V) - # self.Y_latent = self._compute_Y_latents(self.Y, self.U, self.cond_order) + self.X_latent = class_functions._compute_X_latents(self.X, self.V) + # self.Y_latent = class_functions._compute_Y_latents(self.Y, self.U, self.cond_order) self.resample_tests = bootstrap_permutation.ResampleTest._create( self.pls_alg, self.X, @@ -708,7 +703,7 @@ def __init__( self.s, self.V, self.cond_order, - preprocess=self._mean_centre, + preprocess=class_functions._mean_centre, nperm=self.num_perm, nboot=self.num_boot, rotate_method=rotate_method, @@ -883,15 +878,14 @@ def __init__( for k, v in kwargs.items(): setattr(self, k, v) - self._compute_R = class_functions._compute_corr - self._run_pls_contrast = class_functions._run_pls_contrast - self._compute_X_latents = class_functions._compute_X_latents - self._compute_Y_latents = class_functions._compute_Y_latents + class_functions._compute_R = class_functions._compute_corr # compute R correlation matrix - self.R = self._compute_R(self.X, self.Y, self.cond_order) + self.R = class_functions._compute_R(self.X, self.Y, self.cond_order) - self.U, self.s, self.V = self._run_pls_contrast(self.R, self.contrasts) + self.U, self.s, self.V = class_functions._run_pls_contrast( + self.R, self.contrasts + ) # norm lvintercorrs if rotate method is # Procrustes or derived if rotate_method in [1, 2]: @@ -900,8 +894,10 @@ def __init__( else: self.lvintercorrs = self.U.T @ self.U # self.X_latent = np.dot(self.X_mc, self.V) - self.X_latent = self._compute_X_latents(self.X, self.V) - self.Y_latent = self._compute_Y_latents(self.Y, self.U, self.cond_order) + self.X_latent = class_functions._compute_X_latents(self.X, self.V) + self.Y_latent = class_functions._compute_Y_latents( + self.Y, self.U, self.cond_order + ) self.resample_tests = bootstrap_permutation.ResampleTest._create( self.pls_alg, self.X, @@ -910,7 +906,7 @@ def __init__( self.s, self.V, self.cond_order, - preprocess=self._compute_R, + preprocess=class_functions._compute_R, nperm=self.num_perm, nboot=self.num_boot, rotate_method=rotate_method, @@ -1083,17 +1079,16 @@ def __init__( # or if users should import from class_functions module self._create_multiblock = class_functions._create_multiblock self._compute_corr = class_functions._compute_corr - self._run_pls = class_functions._run_pls - self._compute_X_latents = class_functions._compute_X_latents - self._compute_Y_latents = class_functions._compute_Y_latents # compute R correlation matrix self.multiblock = self._create_multiblock(self.X, self.Y, self.cond_order) - self.U, self.s, self.V = self._run_pls(self.multiblock) + self.U, self.s, self.V = class_functions._run_pls(self.multiblock) # self.X_latent = np.dot(self.X_mc, self.V) - self.X_latent = self._compute_X_latents(self.X, self.V) - self.Y_latent = self._compute_Y_latents(self.Y, self.U, self.cond_order) + self.X_latent = class_functions._compute_X_latents(self.X, self.V) + self.Y_latent = class_functions._compute_Y_latents( + self.Y, self.U, self.cond_order + ) # compute latent variable correlation matrix for V using compute_R self.lvcorrs = self._compute_corr(self.X_latent, self.Y, self.cond_order) # self.lvcorrs[:, 1:] = self.lvcorrs[:, 1:] * -1 @@ -1285,9 +1280,7 @@ def __init__( # or if users should import from class_functions module self._create_multiblock = class_functions._create_multiblock self._compute_corr = class_functions._compute_corr - self._run_pls_contrast = class_functions._run_pls_contrast - self._compute_X_latents = class_functions._compute_X_latents - self._compute_Y_latents = class_functions._compute_Y_latents + class_functions._compute_Y_latents = class_functions._compute_Y_latents # compute R correlation matrix self.multiblock = self._create_multiblock(self.X, self.Y, self.cond_order) @@ -1295,7 +1288,9 @@ def __init__( self.contrasts = self.contrasts / np.linalg.norm(self.contrasts, axis=0) print(self.contrasts) - self.U, self.s, self.V = self._run_pls_contrast(self.multiblock, self.contrasts) + self.U, self.s, self.V = class_functions._run_pls_contrast( + self.multiblock, self.contrasts + ) # norm lvintercorrs if rotate method is # Procrustes or derived if rotate_method in [1, 2]: @@ -1304,8 +1299,10 @@ def __init__( else: self.lvintercorrs = self.U.T @ self.U # self.X_latent = np.dot(self.X_mc, self.V) - self.X_latent = self._compute_X_latents(self.X, self.V) - self.Y_latent = self._compute_Y_latents(self.Y, self.U, self.cond_order) + self.X_latent = class_functions._compute_X_latents(self.X, self.V) + self.Y_latent = class_functions._compute_Y_latents( + self.Y, self.U, self.cond_order + ) # compute latent variable correlation matrix for V using compute_R self.lvcorrs = self._compute_corr(self.X_latent, self.Y, self.cond_order) # self.lvcorrs[:, 1:] = self.lvcorrs[:, 1:] * -1 diff --git a/plspy/io/__init__.py b/plspy/io/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/plspy/io/io.py b/plspy/io/io.py new file mode 100644 index 0000000..19c9460 --- /dev/null +++ b/plspy/io/io.py @@ -0,0 +1,739 @@ +import os +import nibabel +import numpy as np +from typing import Optional, Tuple, List, Union + +from .. import exceptions + + +def open_images_in_dir( + dir_path: str, +) -> Tuple[List[nibabel.nifti1.Nifti1Image], List[str]]: + """ + Open all images in a directory and return them as a list. + + Filenames are sorted alphanumerically and Nifti images are loaded + in using same ordering. + + Parameters + ---------- + dir_path : str + Full path to directory containing neuro image files. + + Returns + ------- + images : List[nibabel.nifti1.Nifti1Image] + List of images loaded in as Nifti image files. + filenames : List[str] + List of file paths of respective loaded images. + """ + # TODO : check if fpath exists; throw error if not + + # grab all files in directory and omit .hdr files + # sort alphanumerically + filenames = sorted( + [ + f.name + for f in os.scandir(dir_path) + if f.is_file() and not f.name.endswith(".hdr") + ] + ) + + # use nibabel.load to load in each file using list comprehension + images = [nibabel.load(f"{dir_path}/{fl}") for fl in filenames] + + return images, filenames + + +def open_single_image_in_dir(fpath: str) -> nibabel.nifti1.Nifti1Image: + """ + Open single image in a directory and return it. + + Essentially a wrapper for nibabel.load() + + Parameters + ---------- + fpath : str + Full path to image file. + + Returns + ------- + image : nibabel.nifti1.Nifti1Image + image loaded in as Nifti image files. + + """ + # TODO : check if fpath exists; throw error if not + + # grab sinle file + + image = nibabel.load(f"{fpath}") + + return image + + +def open_images_from_paths_list(fpaths: List[str]) -> List[nibabel.nifti1.Nifti1Image]: + """ + Take list of file paths and open each image. + + Returns list of opened images. Sort is unchanged from input. + + Parameters + ---------- + fpaths : List[str] + List of full paths to invidual image files. + + Returns + ------- + images : List[nibabel.nifti1.Nifti1Image] + list of images loaded in as Nifti image files. + + """ + images = [open_single_image_in_dir(pth) for pth in fpaths] + return images + + +def concat_images( + *args: List[nibabel.nifti1.Nifti1Image], **kwargs: str +) -> nibabel.nifti1.Nifti1Image: + """ + Use nibabel.concat_images to concatenate separate images. + + For reference, see the nibabel documentation on + `nibabel.concat_images https://nipy.org/nibabel/reference/nibabel.funcs.html#concat-images`_ + + Parameters + ---------- + *args : tuple + Any argument passed into nibabel.concat_images. For our purposes it's usually + one arg of type List[nibabel.nifti1.Nifti1Image] + **kwargs : dict, optional + Any keyword arg passed into nibabel.concat_images. + + Returns + ------- + nibabel.nifti1.Nifti1Image + Concatenated image composed of original input images. + """ + return nibabel.concat_images(*args, **kwargs) + + +def read_dir_to_one_image( + fpath: str, *args: List[nibabel.nifti1.Nifti1Image], **kwargs: str +) -> nibabel.nifti1.Nifti1Image: + """ + Load all image files from a directory and concatenate them into + a single image. + + Use nibabel.concat_images to concatenate separate images. + + For reference, see the nibabel documentation on + `nibabel.concat_images https://nipy.org/nibabel/reference/nibabel.funcs.html#concat-images`_ + + Parameters + ---------- + fpath : str + Full path to image file. + *args : tuple + Any argument passed into nibabel.concat_images. For our purposes it's usually + one arg of type List[nibabel.nifti1.Nifti1Image] + **kwargs : dict, optional + Any keyword arg passed into nibabel.concat_images. + + Returns + ------- + nibabel.nifti1.Nifti1Image + Concatenated image composed of original input images. + """ + + images = open_images_in_dir(fpath) + + single_image = concat_images(images, *args, **kwargs) + + return single_image + + +def open_multiple_imgs_from_dirs( + dir_list: List[str], *args: List[nibabel.nifti1.Nifti1Image], **kwargs: str +) -> List[nibabel.nifti1.Nifti1Image]: + """ + Open multiple directories full of images and return a list of concatenated images. + Must all be valid filepaths. + + Use nibabel.concat_images to concatenate separate images. + + For reference, see the nibabel documentation on + `nibabel.concat_images https://nipy.org/nibabel/reference/nibabel.funcs.html#concat-images`_ + + Parameters + ---------- + dir_list : List[str] + List of full paths to directories of image files. + *args : tuple + Any argument passed into nibabel.concat_images. For our purposes it's usually + one arg of type List[nibabel.nifti1.Nifti1Image] + **kwargs : dict, optional + Any keyword arg passed into nibabel.concat_images. + + Returns + ------- + nibabel.nifti1.Nifti1Image + Concatenated image composed of original input images. + + Parameters + ---------- + *args : tuple + Any argument passed into nibabel.concat_images. For our purposes it's usually + one arg of type List[nibabel.nifti1.Nifti1Image] + **kwargs : dict, optional + Any keyword arg passed into nibabel.concat_images. + + Returns + ------- + nibabel.nifti1.Nifti1Image + Concatenated image composed of original input images. + """ + + img_list = [] + + for i in range(len(dir_list)): + img_list.append(read_dir_to_one_image(dir_list[i])) + + return img_list + + +def extract_single_matrix(img: nibabel.nifti1.Nifti1Image) -> np.ndarray: + """ + Grab NumPy array from nibabel object. + + Parameters + ---------- + img : nibabel.nifti1.Nifti1Image + image from which to extract NumPy array. + + Returns + ------- + mat : np.ndarray + NumPy array extracted from image. + + """ + + mat = img.dataobj + + # remove extra single dimension at end if present + if mat.shape[-1] == 1: + print(f"Shape before : {mat.shape}") + images[i].dataobj = mat.reshape(mat.shape[:-1]) + print(f"Shape after : {mat.shape}") + + return mat + + +def extract_matrices_from_image_list( + img_list: List[nibabel.nifti1.Nifti1Image], +) -> List[np.ndarray]: + """ + Run extract_single_matrix on each item in passed in list and + return a list of matrices. + + Parameters + ---------- + img_list : List[nibabel.nifti1.Nifti1Image + list of nibabel images. + + Returns + ------- + mats : List[np.ndarray] + List of extracted NumPy arrays. + + """ + + mats = [] + + for img in img_list: + # extract the matrix + mat = extract_single_matrix(img) + # squeeze matrix (remove axes with length 1) and append + mats.append(np.squeeze(mat)) + + return mats + + +def realign_axes_time_first(matrix: np.ndarray) -> np.ndarray: + """ + Realign matrix axes so that time is the first axis and the rest follow normally + + Parameters + ---------- + matrix : np.ndarray + NumPy array to be reshaped. + + Returns + ------- + matrix_reshaped : np.ndarray + Reshaped NumPy array with time as first axis. + + """ + # matrix = matrix.transpose( + # matrix.shape[3], matrix.shape[:3] + # ) + matrix_reshaped = np.transpose(matrix, (3, 0, 1, 2)) + return matrix_reshaped + + +def extract_matrices_image_list_realign( + img_list: List[nibabel.nifti1.Nifti1Image], +) -> Tuple[List[nibabel.nifti1.Nifti1Image], Tuple[int]]: + """ + Extract matrices from a list of nibabel image objects and then + realign the axes so that time is the first axis. + + Parameters + ---------- + img_list : List[nibabel.nifti1.Nifti1Image] + list of nibabel image objects loaded in from + + Returns + ------- + mats : List[nibabel.nifti1.Nifti1Image] + list of NumPy arrays containing time-aligned extracted matrices for + each subject. + shape : Tuple[int] + tuple containing shape of single subject's shape, of form + (time-point, x, y, z). + """ + + mats = extract_matrices_from_image_list(img_list) + + for i in range(len(mats)): + mats[i] = realign_axes_time_first(mats[i]) + + return (mats, mats[0].shape) + + +def create_binary_mask_from_matrices(matrices: List[np.ndarray]) -> np.ndarray: + """ + Create mask from list of matrices. + + Mask will only include values where, for each index, a value does not + equal 0 for any subject in the list. + + TODO: finish implementing + + Parameters + ---------- + matrices : List[np.ndarray] + matrices to use to create binary mask. + + Returns + ------- + mask : np.ndarray + NumPy array mask containing True/False values corresponding to + each value in the brain space. + + """ + + mats = np.array(matrices) + + # reshape to concat all images along time axis + mats_concat = mats.reshape((-1,) + mats.shape[2:]) + + # get the mask + mask = np.ma.masked_where(cond, mean_all) + + return mask.mask + + +def create_threshold_mask_from_matrices( + matrices: List[np.ndarray], threshold: float = 0.15 +) -> np.ndarray: + """ + Creates mask where only values above the threshold value are included. + Threshold is user-specifiable but defaults to 0.15. + + Parameters + ---------- + matrices : List[np.ndarray] + Matrices to use to create threshold mask. + threshold : float + Floating-point value used as cutoff for threshold mask. + + Returns + ------- + mask : np.ndarray + Mask filled with True/False values depending on whether or not + the mean of the values at that index are greater than the + threshold value. + + + """ + + if threshold < 0 or threshold > 1: + raise exceptions.OutOfRangeError( + f"threshold must be greater than 0 or less than 1. Value passed in : {threshold}" + ) + + mats = np.array(matrices) + # individual means across all time points for each subject + mats_time_mean = np.mean(mats, axis=1) + # global means for all subjects + mean_all = np.mean(mats_time_mean, axis=0) + + # returns true/false matrix where values are True if they're above the threshold + # formula : threshold * (max - min) + min + cond = mean_all > ( + threshold * (np.max(mean_all) - np.min(mean_all)) + np.min(mean_all) + ) + + # get the mask + mask = np.ma.masked_where(cond, mean_all) + + # return mask.mask + return mask.mask + + +def apply_mask_matrices_deprecated(matrices, mask, fill_value): + """ + This will be removed in future versions of plspy, do not use. + + Parameters + ---------- + + Returns + ------- + + + """ + + masked = [] + + for i in range(len(matrices)): + # broadcast mask to time axis + mask_all = np.broadcast_to(mask.mask, matrices[i].shape) + masked_single = np.ma.MaskedArray( + data=matrices[i], mask=mask_all, fill_value=fill_value + ) + masked.append(masked_single.data) + + return masked + + +def apply_mask_matrices( + matrices: List[np.ndarray], mask: np.ndarray +) -> List[np.ndarray]: + """ + Apply a mask to a list of matrices. + + This implementation excludes values that do not meet the mask's + threshold/binary constraints. It flattens and returns the masked arrays + as individual arrays in a list. + + Parameters + ---------- + matrices : List[np.ndarray] + List of NumPy matrices to mask. + mask : np.ndarray + List of True/False values to use for masking matrices. + + Returns + ------- + masked : List[np.ndarray] + list of masked NumPy arrays. + + """ + + # return np.array([m[mask] for m in matrices]) + + masked = [] + + for i in range(len(matrices)): + # broadcast mask to time axis + mask_all = np.broadcast_to(mask, matrices[i].shape) + masked.append(matrices[i][mask_all]) + + return masked + + +def create_and_apply_mask_list( + matrices: List[np.ndarray], mask_type: str = "threshold", threshold: float = 0.15 +) -> np.ndarray: + """Creates a mask and applies it to a list of matrices. + + Takes the mask to use, a threshold value if using thresholding, and + returns masked and stacked neural matrices. + + + Parameters + ---------- + matrices : List[np.ndarray] + Matrices to use to create threshold mask. + threshold : float + Floating-point value used as cutoff for threshold mask. + + Returns + ------- + masked_array : np.ndarray + Return flattened, masked matrices in np.ndarra. + + """ + + if mask_type == "threshold": + mask = create_threshold_mask_from_matrices(matrices, threshold=threshold) + elif mask_type == "binary": + pass + else: + raise exceptions.NotImplementedError( + f"Mask type {mask_type} is not implemented." + ) + + return np.array(apply_mask_matrices(matrices, mask)) + + +def open_onsets_txt(filepath: str, tr: float) -> List[np.ndarray]: + """Open onsets file for each subject from directory path. + + Onset .txts must be in single columns, one for each condition. + + Parameters + ---------- + filepath : str + file path to directory containing onset files + tr : float + TR value used to convert from time to slice index + + Returns + ------- + onsets_inds : List[np.ndarray] + List of NumPy arrays containing onset arrays + """ + + # grab file paths from directory `filepath` + files = sorted( + [ + f.path + for f in os.scandir(filepath) + if f.is_file() and f.name.endswith(".txt") + ] + ) + + # load each onset file into index in list + onsets = [np.loadtxt(f, dtype=float) for f in files] + + # divide onset by TR, cast to float, and transpose for each subject + onsets_inds = [np.rint(onset / tr).astype(int).T for onset in onsets] + + return onsets_inds + + +def extract_onset_slices_single_subject( + matrix: np.ndarray, + onsets: np.ndarray, + onset_length: int, + tr: float, + return_indiv: bool = True, +) -> Union[np.ndarray, List[np.ndarray]]: + """ + Extract the onsets from a subject's matrix and reorder them according to + condition. + + Can return slices in concatenated (False) or list (True) form depending + on value of `return_indiv`. + + + Parameters + ---------- + matrix : np.ndarray + Matrix to slice using onset info. + onsets : List[np.ndarray] + List of condition-based onset times. + onset_lenth: int + Duration of time to select after onset. + tr : float + Repition time value. + return_indiv: bool + True returns a list of invidual slices, False returns a + concatenated np.ndarray. + + Returns + ------- + onset_slices_conditions : Union[np.ndarray, List[np.ndarray]] + Either list of Numpy arrays or NumPy array depending on value + of return_indiv (concatenated or list form). + + """ + + # convert onset duration to number of volumes to select + num_vols = int(np.rint(onset_length * tr)) + + # generate indices by creating ranges from onset time to onset_length + indices = np.array( + [ + np.array( + [ + np.arange(onsets[i, j], onsets[i, j] + num_vols) + for j in range(onsets[i].shape[0]) + ] + ) + for i in range(onsets.shape[0]) + ] + ) + + # apply indices ranges to matrix to get conditions in list form + onsets_slices_conditions = [ + matrix[indices[i]].reshape( + -1, matrix.shape[-3], matrix.shape[-2], matrix.shape[-1] + ) + for i in range(len(indices)) + ] + # return concatenated or list form depending on `retur_indiv` + if not return_indiv: + return np.array(onsets_slices_conditions) + else: + return onsets_slices_conditions + + +def extract_onset_slices_list( + matrices: List[np.ndarray], + onsets: List[np.ndarray], + onset_length: int, + tr: float, + use_one: bool = False, +) -> List[np.ndarray]: + """ + Extract the onsets from a list of subject matrices and reorder them according to + condition. + + + Parameters + ---------- + matrix : np.ndarray + Matrix to slice using onset info. + onsets : List[np.ndarray] + List of condition-based onset times. + onset_lenth: int + Length of onset slice from start of onset. + tr : float + Repition time value. + use_one : bool + If True, only use first set of onset values. TODO: allow user to + specify which index. + + Returns + ------- + condition_lists : List[np.ndarray] + List of Numpy arrays where each sliced subject is an index. + + """ + condition_lists = [] + + # use first onsets as reference + if use_one: + onset = onsets[0] + for i in range(len(matrices)): + if not use_one: + onset = onsets[i] + # use single extraction function and append to list + condition_lists.append( + extract_onset_slices_single_subject( + matrices[i], onset, onset_length, tr, return_indiv=True + ) + ) + return condition_lists + + +def concat_assemble_group(matrices: List[np.ndarray]) -> np.ndarray: + """ + Take list of matrices with condition sets and turn into single-group + matrix. + + Parameters + ---------- + matrices : List[np.ndarray] + List of NumPy matrices to concatenate into single-group array + + Returns + ------- + matrices_concat : np.ndarray + Concatenated, single-group NumPy matrix + + """ + group_list = [] + + # concat condition-wise + for j in range(len(matrices[0])): + for i in range(len(matrices)): + group_list.append(matrices[i][j]) + + return np.array(group_list) + + +def concat_flatten_all_groups(groups_list: List[np.ndarray]) -> np.ndarray: + """ + Concatenate all groups and return as single matrix. + + Parameters + ---------- + groups_list : List[np.ndarray] + List of numpy arrays where each index is its own group of subjects. + + Returns + ------- + full_flat : np.ndarray + Flattened array of all subjects across all groups/conditions. + Ready for input to PLS. + + """ + full_unflat = np.concatenate(groups_list, axis=0) + full_flat = full_unflat.reshape(full_unflat.shape[0], -1) + return full_flat + + +def remap_vectorized_subject_to_4d( + vector: np.ndarray, mask: np.ndarray, original_shape: Tuple[int] +) -> np.ndarray: + """Remaps indices in the vector to its original, unmasked 4D space. + + Takes masked, vectorized subject and uses the global mask and original + shape to map the vector indices to its original 4D space. The previously + masked values are initialized to zeros. + + Parameters + ---------- + vector : np.ndarray + 1D array/vector containing the masked and vectorized indices for + a single subject + mask : np.ndarray + a 3D global mask with the same dimensions as a single time slice. + Contains the True/False values for whether not a value should have + been masked from the original 4D subject. + original_shape : Tuple[int] + a list/tuple containing the 4 dimensions from the original subject, + time first. + + Returns + ------- + reconstituted : np.ndarray + 4D array with the vector values placed in the original indices from + the unmasked 4D array. + """ + + # create list of tuples where each tuple corresponds to t,x,y,z coord + # in original 4D dimension + # mask == True means that index was added into the vector; + # this is recovering that information + vector_indices = np.where(mask == True) + + reconstructed = np.zeros(original_shape) + + # reshape into time slices + vector_time_sliced = vector.reshape(original_shape[0], -1) + + # iterate over time slices + for i in range(reconstructed.shape[0]): + # iterate over sets of indices using 0th list as reference length + for j in range(len(vector_indices[0])): + # map index in vector to 4D space + reconstructed[ + i, vector_indices[0][j], vector_indices[1][j], vector_indices[2][j] + ] = vector_time_sliced[i][j] + + return reconstructed diff --git a/plspy/tests/test_io.py b/plspy/tests/test_io.py new file mode 100644 index 0000000..60ce106 --- /dev/null +++ b/plspy/tests/test_io.py @@ -0,0 +1,37 @@ +import numpy as np +import pytest + +import plspy + +rand_s = np.random.RandomState(950613) + + +def test_remap_vectorized_subject_to_4d(): + # create 5 mock subjects to use to create the mask + # we'll just be testing on the first subject + mock_subjects = [rand_s.rand(20, 10, 10, 10) for i in range(5)] + + # create mask from 5 subjects + mask = plspy.io.create_threshold_mask_from_matrices(mock_subjects, threshold=0.15) + + # generate masked and vectorized subjects + mock_masked = plspy.io.apply_mask_matrices(mock_subjects, mask) + + # recover masked, vectorized subject into 4d space + recovered = plspy.io.remap_vectorized_subject_to_4d( + mock_masked[0], mask, mock_subjects[0].shape + ) + + # check every index in original and recovered + for i in range(mock_subjects[0].shape[0]): + for j in range(mock_subjects[0].shape[1]): + for k in range(mock_subjects[0].shape[2]): + for l in range(mock_subjects[0].shape[3]): + # check equality if the values were masked initially + if mask[j, k, l]: + assert np.allclose( + mock_subjects[0][i, j, k, l], recovered[i, j, k, l] + ) + # otherwise, make sure all other values are 0 + else: + assert recovered[i, j, k, l] == 0 diff --git a/plspy/visualize/__init__.py b/plspy/visualize/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/plspy/visualize/visualize.py b/plspy/visualize/visualize.py new file mode 100644 index 0000000..70aed96 --- /dev/null +++ b/plspy/visualize/visualize.py @@ -0,0 +1,24 @@ +from . import visualize_classes + +methods = { + "svs": visualize_classes._SingularValuesPlot, + "psvs": visualize_classes._PermutedSingularValuesPlot, + "dsc": visualize_classes._DesignScoresPlot, + "vir": visualize_classes._VoxelIntensityPlot, + "blv": visualize_classes._BrainLVPlot, + # "bsc": visualize_classes._Brain, +} + + +def visualize(*args, **kwargs): + + try: + plot = kwargs.pop("plot") + + except KeyError: + # default to singular values + print("Unrecognized plot type. Defaulting to Singular Values.") + plot = "svs" + + # return finished PLS viz class with user-specified method + return visualize_classes._SBPlotBase._create(plot, *args, **kwargs) diff --git a/plspy/visualize/visualize_classes.py b/plspy/visualize/visualize_classes.py new file mode 100644 index 0000000..0ccd0ac --- /dev/null +++ b/plspy/visualize/visualize_classes.py @@ -0,0 +1,529 @@ +import abc + +import plspy +import numpy as np +import seaborn as sns +import nilearn +import nibabel as nib +import scipy.io as sio +import matplotlib.pyplot as plt +import pandas as pd +import matplotlib + + +class _SBPlotBase(abc.ABC): + """Abstract base class and factory for PLS plots. Registers and + keeps track of different defined methods/implementations of plots + using Seaborn, and enforces use of base functions that all PLS + plots should use. + """ + + # tracks registered SBPlotBase subclasses + _subclasses = {} + + # maps abbreviated user-specified classnames to full SBPlotBase variant + # names + _sbplot_types = { + "svs": "Singular Value Plot", + "psvs": "Permuted Singular Values Probabilities Plot", + "dlv": "Design LV Plot", + "dsc": "Design Scores Plot", + "bsc": "Brain Scores Plot", + "vir": "Voxel Intensity Response Plot", + "brlv": "Brain LV Plot", + "belv": "Behaviour LV Plot", + "cor": "Correlation Plot", + } + + @abc.abstractmethod + def _construct_plot(self): + pass + + @abc.abstractmethod + def plot(self): + pass + + @abc.abstractmethod + def __str__(self): + pass + + @abc.abstractmethod + def __repr__(self): + pass + + # register valid decorated PLS method as a subclass of SBPlotBase + @classmethod + def _register_subclass(cls, sbplot_method): + def decorator(subclass): + cls._subclasses[sbplot_method] = subclass + return subclass + + return decorator + + # instantiate and return valid registered PLS method specified by user + @classmethod + def _create(cls, sbplot_method, *args, **kwargs): + if sbplot_method not in cls._subclasses and sbplot_method in cls._sbplot_types: + raise exceptions.NotImplementedError( + f"Specified SBPlotBase method {cls._sbplot_types[sbplot_method]} " + "has not yet been implemented." + ) + elif sbplot_method not in cls._subclasses: + raise ValueError(f"Invalid SBplotBase method {sbplot_method}") + kwargs["sbplot_method"] = sbplot_method + return cls._subclasses[sbplot_method](*args, **kwargs) + + +@_SBPlotBase._register_subclass("svs") +class _SingularValuesPlot(_SBPlotBase): + """ """ + + def __init__( + self, pls_result, dim=(1000, 650), **kwargs, + ): + self.dim = dim + + for k, v in kwargs.items(): + setattr(self, k, v) + # self.pls_result = pls_result + self.fig, self.ax = self._construct_plot(pls_result) + + def _construct_plot(self, pls_result, **kwargs): + px = 1 / plt.rcParams["figure.dpi"] + f, ax = plt.subplots(figsize=(self.dim[0] * px, self.dim[1] * px)) + sv = pls_result.s + pal = sns.color_palette("husl", n_colors=sv.shape[0]) + svt = pd.DataFrame(data={"x": list(range(1, len(sv) + 1)), "y": sv.reshape(-1)}) + bp = sns.barplot(data=svt, x="x", y="y", palette=pal) + Ax = bp.axes + boxes = [ + item + for item in Ax.get_children() + if isinstance(item, matplotlib.patches.Rectangle) + ] + ax.set( + xlabel="Latent Variable", + ylabel="Observed Singular Values", + title="Observed Singular Values", + ) + labels = [f"LV{svt['x'][i]}: {svt['y'][i]:.4f}" for i in range(len(svt["x"]))] + patches = [ + matplotlib.patches.Patch(color=C, label=L) + for C, L in zip([item.get_facecolor() for item in boxes], labels) + ] + bp.legend( + handles=patches, + bbox_to_anchor=(1, 1), + loc=2, + title="SVs", + fontsize=8, + handlelength=0.0, + ) + + return f, ax + + def plot(self): + self.fig.show() + + def __str__(self): + info = f"Plot type: {self._sbplot_types[self.sbplot_method]}" + return info + + def __repr__(self): + return self.__str__() + + +@_SBPlotBase._register_subclass("psvs") +class _PermutedSingularValuesPlot(_SingularValuesPlot): + """ """ + + def __init__( + self, pls_result, dim=(1000, 650), **kwargs, + ): + super().__init__(pls_result, dim, **kwargs) + + def _construct_plot(self, pls_result, **kwargs): + px = 1 / plt.rcParams["figure.dpi"] + f, ax = plt.subplots(figsize=(self.dim[0] * px, self.dim[1] * px)) + perm_sv = pls_result.resample_tests.permute_ratio + pal = sns.color_palette("husl", n_colors=perm_sv.shape[0]) + svt = pd.DataFrame( + data={"x": list(range(1, len(perm_sv) + 1)), "y": perm_sv.reshape(-1)} + ) + bp = sns.barplot(data=svt, x="x", y="y", palette=pal) + Ax = bp.axes + boxes = [ + item + for item in Ax.get_children() + if isinstance(item, matplotlib.patches.Rectangle) + ] + ax.set( + xlabel="Latent Variable", + ylabel="Probability", + title=f"Permuted values greater than observed, {pls_result.num_perm} permutation tests", + ylim=[0, 1], + ) + labels = [f"LV{svt['x'][i]}: {svt['y'][i]:.4f}" for i in range(len(svt["x"]))] + patches = [ + matplotlib.patches.Patch(color=C, label=L) + for C, L in zip([item.get_facecolor() for item in boxes], labels) + ] + bp.legend( + handles=patches, + bbox_to_anchor=(1, 1), + loc=2, + title="SVs", + fontsize=8, + handlelength=0.0, + ) + + return f, ax + + def plot(self): + self.fig.show() + + +@_SBPlotBase._register_subclass("dsc") +class _DesignScoresPlot(_SingularValuesPlot): + """ """ + + def __init__( + self, pls_result, lv=1, dim=(1000, 650), **kwargs, + ): + self.lv = lv + super().__init__(pls_result, dim, **kwargs) + + def _construct_plot(self, pls_result, **kwargs): + px = 1 / plt.rcParams["figure.dpi"] + axes = () * pls_result.num_groups + f, axes = plt.subplots( + figsize=(self.dim[0] * px, self.dim[1] * px), + ncols=pls_result.num_groups, + sharey=True, + ) + axes[0].set_ylabel("Design Scores") + f.suptitle(f"LV {self.lv}", fontsize=14) + splt = int(pls_result.U[self.lv - 1].shape[0] / pls_result.num_groups) + bar_plots = [] + scores = [] + for i in range(pls_result.num_groups): + # stays in loop since it has to be reset every iteration + pal = sns.color_palette("husl", n_colors=splt) + scores.append( + pd.DataFrame( + data={ + "x": list(range(1, splt + 1)), + "y": pls_result.U[self.lv - 1][ + i * splt : (i + 1) * splt + ].reshape(-1), + } + ) + ) + bar_plots.append( + sns.barplot(data=scores[i], x="x", y="y", palette=pal, ax=axes[i]) + ) + axes[i].set_xlabel(f"Group {i + 1}") + axes[i].set_ylabel(f"") + # pal = sns.color_palette("husl", n_colors=splt) + # dv2 = pd.DataFrame(data={"x": list(range(1, splt + 1)), "y": dlv[0][splt:].reshape(-1)}) + # bp1 = sns.barplot(data=dv1, x="x", y="y", palette=pal, ax=ax1) + # bp2 = sns.barplot(data=dv2, x="x", y="y", palette=pal, ax=ax2) + # ax2.set_ylabel("") + # ax1.set_xlabel("Group 1") + # ax2.set_xlabel("Group 2") + axes[0].set_ylabel(f"Design Scores") + Ax = bar_plots[0].axes + boxes = [ + item + for item in Ax.get_children() + if isinstance(item, matplotlib.patches.Rectangle) + ] + # axes[0].set(xlabel="Latent Variable", ylabel="Observed Singular Values", title="Observed Singular Values") + labels = [f"c{scores[i]['x'][i]}" for i in range(len(scores[i]["x"]))] + patches = [ + matplotlib.patches.Patch(color=C, label=L) + for C, L in zip([item.get_facecolor() for item in boxes], labels) + ] + bar_plots[2].legend( + handles=patches, + bbox_to_anchor=(1, 1), + loc=2, + title="DSCs", + fontsize=8, + handlelength=0.5, + ) + + return f, axes + + def plot(self): + self.fig.show() + + +@_SBPlotBase._register_subclass("cor") +class _CorrelationPlot(_SingularValuesPlot): + """ """ + + def __init__( + self, pls_result, dim=(1000, 650), **kwargs, + ): + super().__init__(pls_result, dim, **kwargs) + + def _construct_plot(self, pls_result, **kwargs): + px = 1 / plt.rcParams["figure.dpi"] + axes = () * pls_result.num_groups + f, axes = plt.subplots( + figsize=(self.dim[0] * px, self.dim[1] * px), + ncols=pls_result.num_groups, + sharey=True, + ) + axes[0].set_ylabel("Correlations") + f.suptitle(f"Correlation Plot", fontsize=14) + splt = int(pls_result.lvcorrs.shape[0] / pls_result.num_groups) + bar_plots = [] + scores = [] + for i in range(pls_result.num_groups): + # stays in loop since it has to be reset every iteration + pal = sns.color_palette("husl", n_colors=splt) + y_mat = pls_result.lvcorrs[i * splt : (i + 1) * splt].reshape(-1) + scores.append( + pd.DataFrame(data={"x": list(range(1, y_mat.shape[0] + 1)), "y": y_mat}) + ) + axes[i].set_xlabel(f"Group {i + 1}") + axes[i].set_ylabel(f"") + # pal = sns.color_palette("husl", n_colors=splt) + # dv2 = pd.DataFrame(data={"x": list(range(1, splt + 1)), "y": dlv[0][splt:].reshape(-1)}) + # bp1 = sns.barplot(data=dv1, x="x", y="y", palette=pal, ax=ax1) + # bp2 = sns.barplot(data=dv2, x="x", y="y", palette=pal, ax=ax2) + # ax2.set_ylabel("") + # ax1.set_xlabel("Group 1") + # ax2.set_xlabel("Group 2") + + # Ax = bar_plots[0].axes + # boxes = [ + # item + # for item in Ax.get_children() + # if isinstance(item, matplotlib.patches.Rectangle) + # ] + # # axes[0].set(xlabel="Latent Variable", ylabel="Observed Singular Values", title="Observed Singular Values") + # labels = [f"c{scores[i]['x'][i]}" for i in range(len(scores[i]["x"]))] + # patches = [ + # matplotlib.patches.Patch(color=C, label=L) + # for C, L in zip([item.get_facecolor() for item in boxes], labels) + # ] + # bar_plots[2].legend( + # handles=patches, + # bbox_to_anchor=(1, 1), + # loc=2, + # title="Corrs", + # fontsize=8, + # handlelength=0.5, + # ) + + return f, axes + + def plot(self): + self.fig.show() + + +@_SBPlotBase._register_subclass("brlv") +class _BrainLVPlot(_SingularValuesPlot): + """ """ + + def __init__( + self, pls_result, dim=(1000, 650), **kwargs, + ): + super().__init__(pls_result, dim, **kwargs) + + def _construct_plot(self, pls_result, **kwargs): + px = 1 / plt.rcParams["figure.dpi"] + axes = () * pls_result.num_groups + f, axes = plt.subplots( + figsize=(self.dim[0] * px, self.dim[1] * px), + ncols=pls_result.num_groups, + sharey=True, + ) + axes[0].set_ylabel("Brain LVs") + f.suptitle(f"Brain LV Plot", fontsize=14) + splt = int(pls_result.lvcorrs.shape[0] / pls_result.num_groups) + bar_plots = [] + scores = [] + for i in range(pls_result.num_groups): + # stays in loop since it has to be reset every iteration + colours = int(pls_result.lvcorrs.shape[0] / pls_result.num_conditions) + pal = sns.color_palette("husl", n_colors=colours) + y_mat = pls_result.X_latent[i * splt : (i + 1) * splt].reshape(-1) + scores.append( + pd.DataFrame( + data={"x": list(range(1, y_mat.shape[0] + 1)), "y": y_mat,} + ) + ) + bar_plots.append( + sns.barplot(data=scores[i], x="x", y="y", palette=pal, ax=axes[i]) + ) + axes[i].set_xlabel(f"Group {i + 1}") + axes[i].set_ylabel(f"") + # pal = sns.color_palette("husl", n_colors=splt) + # dv2 = pd.DataFrame(data={"x": list(range(1, splt + 1)), "y": dlv[0][splt:].reshape(-1)}) + # bp1 = sns.barplot(data=dv1, x="x", y="y", palette=pal, ax=ax1) + # bp2 = sns.barplot(data=dv2, x="x", y="y", palette=pal, ax=ax2) + # ax2.set_ylabel("") + # ax1.set_xlabel("Group 1") + # ax2.set_xlabel("Group 2") + + # Ax = bar_plots[0].axes + # boxes = [ + # item + # for item in Ax.get_children() + # if isinstance(item, matplotlib.patches.Rectangle) + # ] + # # axes[0].set(xlabel="Latent Variable", ylabel="Observed Singular Values", title="Observed Singular Values") + # labels = [f"c{scores[i]['x'][i]}" for i in range(len(scores[i]["x"]))] + # patches = [ + # matplotlib.patches.Patch(color=C, label=L) + # for C, L in zip([item.get_facecolor() for item in boxes], labels) + # ] + # bar_plots[2].legend( + # handles=patches, + # bbox_to_anchor=(1, 1), + # loc=2, + # title="Corrs", + # fontsize=8, + # handlelength=0.5, + # ) + + return f, axes + + def plot(self): + self.fig.show() + + +@_SBPlotBase._register_subclass("belv") +class _BehavLVPlot(_SingularValuesPlot): + """ """ + + def __init__( + self, pls_result, dim=(1000, 650), **kwargs, + ): + super().__init__(pls_result, dim, **kwargs) + + def _construct_plot(self, pls_result, **kwargs): + px = 1 / plt.rcParams["figure.dpi"] + axes = () * pls_result.num_groups + f, axes = plt.subplots( + figsize=(self.dim[0] * px, self.dim[1] * px), + ncols=pls_result.num_groups, + sharey=True, + ) + axes[0].set_ylabel("Behaviour LVs") + f.suptitle(f"Behaviour LV Plot", fontsize=14) + splt = int(pls_result.Y_latent.shape[0] / pls_result.num_groups) + bar_plots = [] + scores = [] + for i in range(pls_result.num_groups): + # stays in loop since it has to be reset every iteration + colours = int(pls_result.lvcorrs.shape[0] / pls_result.num_conditions) + pal = sns.color_palette("husl", n_colors=colours) + y_mat = pls_result.Y_latent[i * splt : (i + 1) * splt].reshape(-1) + scores.append( + pd.DataFrame( + data={"x": list(range(1, y_mat.shape[0] + 1)), "y": y_mat,} + ) + ) + bar_plots.append( + sns.barplot(data=scores[i], x="x", y="y", palette=pal, ax=axes[i]) + ) + axes[i].set_xlabel(f"Group {i + 1} conditions") + axes[i].set_ylabel(f"") + # pal = sns.color_palette("husl", n_colors=splt) + # dv2 = pd.DataFrame(data={"x": list(range(1, splt + 1)), "y": dlv[0][splt:].reshape(-1)}) + # bp1 = sns.barplot(data=dv1, x="x", y="y", palette=pal, ax=ax1) + # bp2 = sns.barplot(data=dv2, x="x", y="y", palette=pal, ax=ax2) + # ax2.set_ylabel("") + # ax1.set_xlabel("Group 1") + # ax2.set_xlabel("Group 2") + + # Ax = bar_plots[0].axes + # boxes = [ + # item + # for item in Ax.get_children() + # if isinstance(item, matplotlib.patches.Rectangle) + # ] + # # axes[0].set(xlabel="Latent Variable", ylabel="Observed Singular Values", title="Observed Singular Values") + # labels = [f"c{scores[i]['x'][i]}" for i in range(len(scores[i]["x"]))] + # patches = [ + # matplotlib.patches.Patch(color=C, label=L) + # for C, L in zip([item.get_facecolor() for item in boxes], labels) + # ] + # bar_plots[2].legend( + # handles=patches, + # bbox_to_anchor=(1, 1), + # loc=2, + # title="Corrs", + # fontsize=8, + # handlelength=0.5, + # ) + + return f, axes + + def plot(self): + self.fig.show() + + +@_SBPlotBase._register_subclass("vir") +class _VoxelIntensityPlot(_DesignScoresPlot): + """ """ + + def __init__( + pls_result, coords, dim=(1000, 650), **kwargs, + ): + self.coords = coords + super().__init__(self, pls_result, dim, **kwargs) + + def _construct_plot(self, pls_result, **kwargs): + pass + + def plot(self): + self.fig.show() + + def mean_neighbourhood(mat, pos, num): + """ + TODO: add masking/threshold functionality + """ + if num == 0: + return mat[pos[0], pos[1], pos[2]] + + x, y, z = pos[0], pos[1], pos[2] + # creates 3d cube around central index that is neighbourhood + nhood = mat[x - num - 1 : x + num, y - num - 1 : y + num, z - num - 1 : z + num] + nsum = np.sum(nhood) + avg = nsum / (nhood.shape[0] * nhood.shape[1] * nhood.shape[2]) + + return avg + + +@_SBPlotBase._register_subclass("blv") +class _BrainLVPlot(_SBPlotBase): + """ """ + + def __init__( + self, pls_result, threshold, dim=(1000, 650), **kwargs, + ): + super().__init__(pls_result, dim, **kwargs) + self.threshold = threshold + + def _construct_plot(self, pls_result, **kwargs): + pass + + def plot(self): + self.fig.show() + + def save_html(self): + pass + + def __str__(self): + info = f"Plot type: {self._sbplot_types[self.sbplot_method]}" + stg += info + return stg + + def __repr__(self): + return self.__str__() From e49ac593503e9c4598694740cb5d081d6803bd90 Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 10 May 2022 16:37:35 -0400 Subject: [PATCH 02/23] updated CircleCI job names to be compliant --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bf7b16f..572d4bd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ orbs: # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: - build-and-test-3.10: + build-and-test-3_10: docker: - image: cimg/python:3.10.2 steps: @@ -25,7 +25,7 @@ jobs: - run: name: Run tests command: pytest - build-and-test-3.9: + build-and-test-3_9: docker: - image: cimg/python:3.9 steps: @@ -36,7 +36,7 @@ jobs: - run: name: Run tests command: pytest - build-and-test-3.8: + build-and-test-3_8: docker: - image: cimg/python:3.8 steps: @@ -47,7 +47,7 @@ jobs: - run: name: Run tests command: pytest - build-and-test-3.7: + build-and-test-3_7: docker: - image: cimg/python:3.7 steps: From 4ce188cab75f9235a4befca915caf4a17ef03071 Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 10 May 2022 16:38:24 -0400 Subject: [PATCH 03/23] updated CircleCI job calls to match job names --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 572d4bd..b60ebc1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -78,9 +78,9 @@ workflows: run-tests-and-build-docs: # Inside the workflow, you define the jobs you want to run. jobs: - - build-and-test-3.10 - - build-and-test-3.9 - - build-and-test-3.8 - - build-and-test-3.7 + - build-and-test-3_10 + - build-and-test-3_9 + - build-and-test-3_8 + - build-and-test-3_7 - build-docs From 0530c1c7dd890e26746b292ba3c648f00b077021 Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 10 May 2022 16:40:28 -0400 Subject: [PATCH 04/23] added nibabel as dependency --- requirements.txt | 1 + requirements_dev.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index 77909df..b9e3d6f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ numpy scipy pytest +nibabel diff --git a/requirements_dev.txt b/requirements_dev.txt index f081727..7451f91 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,6 +1,7 @@ numpy scipy pytest +nibabel sphinx sphinx-rtd-theme versioneer From 7be57a74ae772e521231bfed02597b658076c3bb Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 10 May 2022 16:42:32 -0400 Subject: [PATCH 05/23] added seaborn, matplotlib, pandas as dependencies --- requirements.txt | 3 +++ requirements_dev.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/requirements.txt b/requirements.txt index b9e3d6f..53ad968 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,6 @@ numpy scipy pytest nibabel +seaborn +matplotlib +pandas diff --git a/requirements_dev.txt b/requirements_dev.txt index 7451f91..68ce4c6 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -2,6 +2,9 @@ numpy scipy pytest nibabel +seaborn +matplotlib +pandas sphinx sphinx-rtd-theme versioneer From e8560ba5ec8721de4b182f2f4817579d066f28eb Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 10 May 2022 16:44:27 -0400 Subject: [PATCH 06/23] added nilearn as dependency --- requirements.txt | 1 + requirements_dev.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index 53ad968..6772a99 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ nibabel seaborn matplotlib pandas +nilearn diff --git a/requirements_dev.txt b/requirements_dev.txt index 68ce4c6..3591161 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -5,6 +5,7 @@ nibabel seaborn matplotlib pandas +nilearn sphinx sphinx-rtd-theme versioneer From e453cda0293be7f5e1cdf3283453535ef2868eba Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 10 May 2022 16:51:45 -0400 Subject: [PATCH 07/23] update README.md with CircleCI badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 01556e1..890540c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) +[![CircleCI](https://circleci.com/gh/McIntosh-Lab/plspy/tree/main.svg?style=svg&circle-token=3b9c7e2a597b381d8b388e0fae83552ee89e07d3)](https://circleci.com/gh/McIntosh-Lab/plspy/tree/main) # Partial Least Squares - McIntosh Lab From d827343d0bc10efddda3ce9d8d2d141b52717085 Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 10 May 2022 16:54:03 -0400 Subject: [PATCH 08/23] requested fewer resources for CircleCI runners --- .circleci/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index b60ebc1..238fe76 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,6 +17,7 @@ jobs: build-and-test-3_10: docker: - image: cimg/python:3.10.2 + resource_class: medium steps: - checkout - python/install-packages: @@ -28,6 +29,7 @@ jobs: build-and-test-3_9: docker: - image: cimg/python:3.9 + resource_class: medium steps: - checkout - python/install-packages: @@ -39,6 +41,7 @@ jobs: build-and-test-3_8: docker: - image: cimg/python:3.8 + resource_class: medium steps: - checkout - python/install-packages: @@ -50,6 +53,7 @@ jobs: build-and-test-3_7: docker: - image: cimg/python:3.7 + resource_class: medium steps: - checkout - python/install-packages: @@ -61,6 +65,7 @@ jobs: build-docs: docker: - image: cimg/python:3.10.2 + resource_class: medium steps: - checkout - python/install-packages: From 029fa2ec69b55473cf3a1e57d4dd74f17f90b797 Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 26 Jul 2022 12:20:53 -0400 Subject: [PATCH 09/23] [FIX] Adjust threshold mask functionality - Entirely remove values outside of threshold and to harmonize dropped indices across all subjects. - Some small indentation changes. --- .circleci/config.yml | 13 +- .github/ISSUE_TEMPLATE.md | 6 +- .github/workflows/mega-linter.yml | 82 +++++++++ .../workflows/sphinx_docs_to_gh_pages.yaml | 6 +- README.md | 12 +- plspy/__docs__.py | 22 +-- plspy/__init__.py | 29 ++- plspy/_version.py | 172 +++++++++++------- plspy/core/.pls_classes.py.swi | Bin 0 -> 16384 bytes plspy/core/.pls_classes.py.swj | Bin 0 -> 16384 bytes plspy/core/bootstrap_permutation.py | 63 +++++-- plspy/core/check_inputs.py | 3 +- plspy/core/class_functions.py | 70 +++++-- plspy/core/exceptions.py | 21 ++- plspy/core/gsvd.py | 11 +- plspy/core/pls.py | 6 +- plspy/core/pls_classes.py | 153 +++++++++++----- plspy/io/io.py | 100 +++++----- plspy/tests/test_class_functions.py | 21 ++- plspy/tests/test_io.py | 22 ++- plspy/visualize/visualize_classes.py | 44 ++--- setup.py | 8 +- 22 files changed, 563 insertions(+), 301 deletions(-) create mode 100644 .github/workflows/mega-linter.yml create mode 100644 plspy/core/.pls_classes.py.swi create mode 100644 plspy/core/.pls_classes.py.swj diff --git a/.circleci/config.yml b/.circleci/config.yml index 238fe76..c61d429 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ orbs: # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: - build-and-test-3_10: + build-and-test-3_10: docker: - image: cimg/python:3.10.2 resource_class: medium @@ -26,7 +26,7 @@ jobs: - run: name: Run tests command: pytest - build-and-test-3_9: + build-and-test-3_9: docker: - image: cimg/python:3.9 resource_class: medium @@ -38,7 +38,7 @@ jobs: - run: name: Run tests command: pytest - build-and-test-3_8: + build-and-test-3_8: docker: - image: cimg/python:3.8 resource_class: medium @@ -50,7 +50,7 @@ jobs: - run: name: Run tests command: pytest - build-and-test-3_7: + build-and-test-3_7: docker: - image: cimg/python:3.7 resource_class: medium @@ -62,7 +62,7 @@ jobs: - run: name: Run tests command: pytest - build-docs: + build-docs: docker: - image: cimg/python:3.10.2 resource_class: medium @@ -72,7 +72,7 @@ jobs: pkg-manager: pip pip-dependency-file: requirements_dev.txt - run: - name: build documentation + name: build documentation command: | cd docs sphinx-build -M html . _build @@ -88,4 +88,3 @@ workflows: - build-and-test-3_8 - build-and-test-3_7 - build-docs - diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index eb164e8..eafcc37 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -2,7 +2,7 @@ -### Reproducing code example: +### Reproducing code example @@ -14,10 +14,10 @@ import plspy -### Error message: +### Error message -### plspy/Python version information: +### plspy/Python version information diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml new file mode 100644 index 0000000..9bd6e66 --- /dev/null +++ b/.github/workflows/mega-linter.yml @@ -0,0 +1,82 @@ +--- +# MegaLinter GitHub Action configuration file +# More info at https://megalinter.github.io +name: MegaLinter + +on: + # Trigger mega-linter at every push. Action will also be visible from Pull Requests to master + push: # Comment this line to trigger action only on pull-requests (not recommended if you don't pay for GH Actions) + pull_request: + branches: [master, main] + +env: # Comment env block if you do not want to apply fixes + # Apply linter fixes configuration + APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool) + APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all) + APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request) + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + build: + name: MegaLinter + runs-on: ubuntu-latest + steps: + # Git Checkout + - name: Checkout Code + uses: actions/checkout@v3 + with: + token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} + fetch-depth: 0 + + # MegaLinter + - name: MegaLinter + id: ml + # You can override MegaLinter flavor used to have faster performances + # More info at https://megalinter.github.io/flavors/ + uses: megalinter/megalinter/flavors/python@v5 + env: + # All available variables are described in documentation + # https://megalinter.github.io/configuration/ + VALIDATE_ALL_CODEBASE: true # Set ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} to validate only diff with main branch + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY + + # Upload MegaLinter artifacts + - name: Archive production artifacts + if: ${{ success() }} || ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: MegaLinter reports + path: | + report + mega-linter.log + + # Create pull request if applicable (for now works only on PR from same repository, not from forks) + - name: Create Pull Request with applied fixes + id: cpr + if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') + uses: peter-evans/create-pull-request@v4 + with: + token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} + commit-message: "[MegaLinter] Apply linters automatic fixes" + title: "[MegaLinter] Apply linters automatic fixes" + labels: bot + - name: Create PR output + if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" + + # Push new commit if applicable (for now works only on PR from same repository, not from forks) + - name: Prepare commit + if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') + run: sudo chown -Rc $UID .git/ + - name: Commit and push applied linter fixes + if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }} + commit_message: "[MegaLinter] Apply linters fixes" diff --git a/.github/workflows/sphinx_docs_to_gh_pages.yaml b/.github/workflows/sphinx_docs_to_gh_pages.yaml index cfa2c68..55f004e 100644 --- a/.github/workflows/sphinx_docs_to_gh_pages.yaml +++ b/.github/workflows/sphinx_docs_to_gh_pages.yaml @@ -18,8 +18,8 @@ jobs: - name: Make conda environment uses: conda-incubator/setup-miniconda@v2 with: - python-version: 3.9 # Python version to build the html sphinx documentation - environment-file: devtools/conda-envs/docs_env.yaml # Path to the documentation conda environment + python-version: 3.9 # Python version to build the html sphinx documentation + environment-file: devtools/conda-envs/docs_env.yaml # Path to the documentation conda environment auto-update-conda: false auto-activate-base: false show-channel-urls: true @@ -32,4 +32,4 @@ jobs: with: branch: main dir_docs: docs - sphinxopts: '' + sphinxopts: "" diff --git a/README.md b/README.md index 890540c..de155ea 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The following steps will download and install plspy to your computer: Basic usage examples: Note: There are 3 required arguments, used in the following order: - + 1) X - 2-d task matrix 2) a list containing the number of subjects in each group @@ -48,19 +48,19 @@ Basic usage examples: Multiblock PLS: >>> result = plspy.PLS(X, [10, 10], 3, Y=Y, pls_method="mb") - - -To see documentation on additional arguments and fields available, + + +To see documentation on additional arguments and fields available, call help on a specific PLS method (see below for details). Documentation is available both in help() form and will also be available -in website form. More information on how to access online documentation is +in website form. More information on how to access online documentation is forthcoming. Information on how to use help() is below. To get help documentation on a particular version of PLS, type the following in a Python interpreter after loading the module: >>> import plspy >>> help(plspy.methods[""]) - + Where is the string of one of the PLS versions shown below. Available methods: diff --git a/plspy/__docs__.py b/plspy/__docs__.py index c7b49ab..d8be514 100644 --- a/plspy/__docs__.py +++ b/plspy/__docs__.py @@ -1,6 +1,6 @@ """ File containing docstrings for various methods, modules, and files -in plspy. Can be combined as needed to make full docstrings for +in plspy. Can be combined as needed to make full docstrings for functions and modules. """ @@ -8,8 +8,8 @@ plspy ====== -plspy is a Partial Least Squares package developed at the Rotman -Research Institute at Baycrest Health Sciences. +plspy is a Partial Least Squares package developed at the Institute for +Neuroscience and Neurotechnology at Simon Fraser University. In addition to core PLS functionality, this package also contains the following modules: @@ -44,30 +44,30 @@ Example arguments are used below. Mean-Centred Task PLS: - + >>> result = plspy.PLS(X, [10, 10], 3, num_perm=500, num_boot=500, pls_method="mct") Behavioural PLS: - + >>> result = plspy.PLS(X, [10, 10], 3, Y=Y, pls_method="rb") Contrast Task PLS: - + >>> result = plspy.PLS(X, [10, 10], 3, contrasts=C, pls_method="cst") Contrast Behavioural PLS: - + >>> result = plspy.PLS(X, [10, 10], 3, Y=Y, contrasts=C, pls_method="csb") Multiblock PLS: - + >>> result = plspy.PLS(X, [10, 10], 3, Y=Y, pls_method="mb") -To see documentation on additional arguments and fields available, +To see documentation on additional arguments and fields available, call help on a specific PLS method (see below for details). Documentation is available both in help() form and will also be available -in website form. More information on how to access online documentation is +in website form. More information on how to access online documentation is forthcoming. Information on how to use help() is below. To get help documentation on a particular version of PLS, type the following @@ -93,7 +93,7 @@ Note: calling - >>> help(plspy.PLS) + >>> help(plspy.PLS) will show you this same help page. diff --git a/plspy/__init__.py b/plspy/__init__.py index 6ef38a5..d99a31b 100644 --- a/plspy/__init__.py +++ b/plspy/__init__.py @@ -1,22 +1,21 @@ -from .core import exceptions -from .core import gsvd -from .core import decorators -from .core import check_inputs -from .core import class_functions -from .core import resample -from .core import bootstrap_permutation -from .core import pls_classes -from .core import pls -from .core.pls import PLS -from .core.pls import methods +import sys +from . import __docs__ +from .core import ( + bootstrap_permutation, + check_inputs, + class_functions, + decorators, + exceptions, + gsvd, + pls, + pls_classes, + resample, +) +from .core.pls import PLS, methods from .io import io from .visualize import visualize -from . import __docs__ - -import sys - # __init__.py docstring assembled using blocks also used in # other files. Docstrings found in __docs__.py sys.modules[__name__].__doc__ = __docs__.plspy_header diff --git a/plspy/_version.py b/plspy/_version.py index 038e9fb..3990fb0 100644 --- a/plspy/_version.py +++ b/plspy/_version.py @@ -1,4 +1,3 @@ - # This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build @@ -11,12 +10,12 @@ """Git implementation of _version.py.""" import errno +import functools import os import re import subprocess import sys from typing import Callable, Dict -import functools def get_keywords(): @@ -60,17 +59,20 @@ class NotThisMethod(Exception): def register_vcs_handler(vcs, method): # decorator """Create decorator to mark a method as the handler of a VCS.""" + def decorate(f): """Store f in HANDLERS[vcs][method].""" if vcs not in HANDLERS: HANDLERS[vcs] = {} HANDLERS[vcs][method] = f return f + return decorate -def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, - env=None): +def run_command( + commands, args, cwd=None, verbose=False, hide_stderr=False, env=None +): """Call the given command(s).""" assert isinstance(commands, list) process = None @@ -81,15 +83,20 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW popen_kwargs["startupinfo"] = startupinfo + dispcmd = "" for command in commands: try: dispcmd = str([command] + args) # remember shell=False, so use git.cmd on windows, not just git - process = subprocess.Popen([command] + args, cwd=cwd, env=env, - stdout=subprocess.PIPE, - stderr=(subprocess.PIPE if hide_stderr - else None), **popen_kwargs) + process = subprocess.Popen( + [command] + args, + cwd=cwd, + env=env, + stdout=subprocess.PIPE, + stderr=(subprocess.PIPE if hide_stderr else None), + **popen_kwargs + ) break except OSError: e = sys.exc_info()[1] @@ -124,15 +131,21 @@ def versions_from_parentdir(parentdir_prefix, root, verbose): for _ in range(3): dirname = os.path.basename(root) if dirname.startswith(parentdir_prefix): - return {"version": dirname[len(parentdir_prefix):], - "full-revisionid": None, - "dirty": False, "error": None, "date": None} + return { + "version": dirname[len(parentdir_prefix) :], + "full-revisionid": None, + "dirty": False, + "error": None, + "date": None, + } rootdirs.append(root) root = os.path.dirname(root) # up a level if verbose: - print("Tried directories %s but none started with prefix %s" % - (str(rootdirs), parentdir_prefix)) + print( + "Tried directories %s but none started with prefix %s" + % (str(rootdirs), parentdir_prefix) + ) raise NotThisMethod("rootdir doesn't start with parentdir_prefix") @@ -191,7 +204,7 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose): # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of # just "foo-1.0". If we see a "tag: " prefix, prefer those. TAG = "tag: " - tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} + tags = {r[len(TAG) :] for r in refs if r.startswith(TAG)} if not tags: # Either we're using git < 1.8.3, or there really are no tags. We use # a heuristic: assume all version tags have a digit. The old git %d @@ -200,7 +213,7 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose): # between branches and tags. By ignoring refnames without digits, we # filter out many common branch names like "release" and # "stabilization", as well as "HEAD" and "master". - tags = {r for r in refs if re.search(r'\d', r)} + tags = {r for r in refs if re.search(r"\d", r)} if verbose: print("discarding '%s', no digits" % ",".join(refs - tags)) if verbose: @@ -208,24 +221,31 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose): for ref in sorted(tags): # sorting will prefer e.g. "2.0" over "2.0rc1" if ref.startswith(tag_prefix): - r = ref[len(tag_prefix):] + r = ref[len(tag_prefix) :] # Filter out refs that exactly match prefix or that don't start # with a number once the prefix is stripped (mostly a concern # when prefix is '') - if not re.match(r'\d', r): + if not re.match(r"\d", r): continue if verbose: print("picking %s" % r) - return {"version": r, - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": None, - "date": date} + return { + "version": r, + "full-revisionid": keywords["full"].strip(), + "dirty": False, + "error": None, + "date": date, + } # no suitable tags, so version is "0+unknown", but full hex is still there if verbose: print("no suitable tags, using unknown + full revision id") - return {"version": "0+unknown", - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": "no suitable tags", "date": None} + return { + "version": "0+unknown", + "full-revisionid": keywords["full"].strip(), + "dirty": False, + "error": "no suitable tags", + "date": None, + } @register_vcs_handler("git", "pieces_from_vcs") @@ -247,8 +267,9 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): env.pop("GIT_DIR", None) runner = functools.partial(runner, env=env) - _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, - hide_stderr=True) + _, rc = runner( + GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True + ) if rc != 0: if verbose: print("Directory %s not under git control" % root) @@ -258,9 +279,11 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] # if there isn't one, this yields HEX[-dirty] (no NUM) - describe_out, rc = runner(GITS, ["describe", "--tags", "--dirty", - "--always", "--long", *MATCH_ARGS], - cwd=root) + describe_out, rc = runner( + GITS, + ["describe", "--tags", "--dirty", "--always", "--long", *MATCH_ARGS], + cwd=root, + ) # --long was added in git-1.5.5 if describe_out is None: raise NotThisMethod("'git describe' failed") @@ -275,8 +298,9 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): pieces["short"] = full_out[:7] # maybe improved later pieces["error"] = None - branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], - cwd=root) + branch_name, rc = runner( + GITS, ["rev-parse", "--abbrev-ref", "HEAD"], cwd=root + ) # --abbrev-ref was added in git-1.6.3 if rc != 0 or branch_name is None: raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") @@ -316,17 +340,18 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): dirty = git_describe.endswith("-dirty") pieces["dirty"] = dirty if dirty: - git_describe = git_describe[:git_describe.rindex("-dirty")] + git_describe = git_describe[: git_describe.rindex("-dirty")] # now we have TAG-NUM-gHEX or HEX if "-" in git_describe: # TAG-NUM-gHEX - mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) + mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe) if not mo: # unparsable. Maybe git-describe is misbehaving? - pieces["error"] = ("unable to parse git-describe output: '%s'" - % describe_out) + pieces["error"] = ( + "unable to parse git-describe output: '%s'" % describe_out + ) return pieces # tag @@ -335,10 +360,12 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): if verbose: fmt = "tag '%s' doesn't start with prefix '%s'" print(fmt % (full_tag, tag_prefix)) - pieces["error"] = ("tag '%s' doesn't start with prefix '%s'" - % (full_tag, tag_prefix)) + pieces["error"] = "tag '%s' doesn't start with prefix '%s'" % ( + full_tag, + tag_prefix, + ) return pieces - pieces["closest-tag"] = full_tag[len(tag_prefix):] + pieces["closest-tag"] = full_tag[len(tag_prefix) :] # distance: number of commits since tag pieces["distance"] = int(mo.group(2)) @@ -353,7 +380,9 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): pieces["distance"] = int(count_out) # total number of commits # commit date: see ISO-8601 comment in git_versions_from_keywords() - date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip() + date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[ + 0 + ].strip() # Use only the last line. Previous lines may contain GPG signature # information. date = date.splitlines()[-1] @@ -387,8 +416,7 @@ def render_pep440(pieces): rendered += ".dirty" else: # exception #1 - rendered = "0+untagged.%d.g%s" % (pieces["distance"], - pieces["short"]) + rendered = "0+untagged.%d.g%s" % (pieces["distance"], pieces["short"]) if pieces["dirty"]: rendered += ".dirty" return rendered @@ -417,8 +445,7 @@ def render_pep440_branch(pieces): rendered = "0" if pieces["branch"] != "master": rendered += ".dev0" - rendered += "+untagged.%d.g%s" % (pieces["distance"], - pieces["short"]) + rendered += "+untagged.%d.g%s" % (pieces["distance"], pieces["short"]) if pieces["dirty"]: rendered += ".dirty" return rendered @@ -443,10 +470,15 @@ def render_pep440_pre(pieces): if pieces["closest-tag"]: if pieces["distance"]: # update the post release segment - tag_version, post_version = pep440_split_post(pieces["closest-tag"]) + tag_version, post_version = pep440_split_post( + pieces["closest-tag"] + ) rendered = tag_version if post_version is not None: - rendered += ".post%d.dev%d" % (post_version+1, pieces["distance"]) + rendered += ".post%d.dev%d" % ( + post_version + 1, + pieces["distance"], + ) else: rendered += ".post0.dev%d" % (pieces["distance"]) else: @@ -579,11 +611,13 @@ def render_git_describe_long(pieces): def render(pieces, style): """Render the given version pieces into the requested style.""" if pieces["error"]: - return {"version": "unknown", - "full-revisionid": pieces.get("long"), - "dirty": None, - "error": pieces["error"], - "date": None} + return { + "version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, + "error": pieces["error"], + "date": None, + } if not style or style == "default": style = "pep440" # the default @@ -607,9 +641,13 @@ def render(pieces, style): else: raise ValueError("unknown style '%s'" % style) - return {"version": rendered, "full-revisionid": pieces["long"], - "dirty": pieces["dirty"], "error": None, - "date": pieces.get("date")} + return { + "version": rendered, + "full-revisionid": pieces["long"], + "dirty": pieces["dirty"], + "error": None, + "date": pieces.get("date"), + } def get_versions(): @@ -623,8 +661,9 @@ def get_versions(): verbose = cfg.verbose try: - return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, - verbose) + return git_versions_from_keywords( + get_keywords(), cfg.tag_prefix, verbose + ) except NotThisMethod: pass @@ -633,13 +672,16 @@ def get_versions(): # versionfile_source is the relative path from the top of the source # tree (where the .git directory might live) to this file. Invert # this to find the root from __file__. - for _ in cfg.versionfile_source.split('/'): + for _ in cfg.versionfile_source.split("/"): root = os.path.dirname(root) except NameError: - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, - "error": "unable to find root of source tree", - "date": None} + return { + "version": "0+unknown", + "full-revisionid": None, + "dirty": None, + "error": "unable to find root of source tree", + "date": None, + } try: pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) @@ -653,6 +695,10 @@ def get_versions(): except NotThisMethod: pass - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, - "error": "unable to compute version", "date": None} + return { + "version": "0+unknown", + "full-revisionid": None, + "dirty": None, + "error": "unable to compute version", + "date": None, + } diff --git a/plspy/core/.pls_classes.py.swi b/plspy/core/.pls_classes.py.swi new file mode 100644 index 0000000000000000000000000000000000000000..64bdbc2cf6ac8d85be479233eaa58c1fad251971 GIT binary patch literal 16384 zcmeH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AKzljDRTn??wg+BMbxmn@vCOg0#9O+{yGM Ib;g|k0Ik_dxc~qF literal 0 HcmV?d00001 diff --git a/plspy/core/.pls_classes.py.swj b/plspy/core/.pls_classes.py.swj new file mode 100644 index 0000000000000000000000000000000000000000..a8d23d7f4144691d19a7cde4226c5e6110a1553b GIT binary patch literal 16384 zcmeHNTZ|k>74100JVHotkPt7aJcHy}XSR3O#)K>~^7;jf;)iVSvKxCd?wP5X>1
vJz8 zy~2n!qbQMy@M1=sY}JQqP)7_xHV6YQWh&{~)1y(tLBB~e>@Yv!!Xrya*1?2{m=2ZrXMBGHNkM+Go_-igZhy~JH2o^o$infwPjPCwH7^Z zg^yCYE22RR)rYut<))VDo8M%)=|k(J=Os)@bJ+p6>(WeW_txKE-!)d(?QAO53BP<2 zT*fe$atO~bkQLSJwf`!qoYBgx!?wd+Qb{KUunZZV)`dJu`k&yEydX13o!nnQ5E)iW zGolmftz;?9WkdI#W*LFu(Th=Ml4I658ru=MM;;gWRU5;zPyHqhih4l+o#`MM?I`TT zk^M)enb&T!K7P=~$keWuQK?k+3x5TtlKO?)b%Z#Yp+Q4vS0qQod}_d6Px7&8XOH>U zZ3y1=B~)$5K~r_CRr;-@GKPzRRHsMqWFSI}E8Ucf%ai!|ojKT-YTG^0m36j#`!ar+ z*OgS+E5kB;_vxzp^B@i#;52EH6EAQBE}C@Gj-sIv1l}Ek_R0-ve#_6UXucvR$>-Kb)Y#EdV}dzckc3} zK__q{5^XMCr3NI#9Q=ORiEc_tl_rwSq-qvs5H_%thb2_mo)Na7&Q&@HTey$b=oAa_ zA52a0US|-tD16ZNKI;%OJ(X6!S(#>)eYoa?hwJ1JLP@_FL@gDoRO*gmBTmhDZF)=Q zCGF*i4E$&yXsw3@wPcbT(gsGuJVMDj#=C>S6YQFz=xm1e+4Vv9bU_|jPoGQhj5BIJ zRorngc4V_D_zL-QTSeC6nX4+#4{>d&C_)AGbU3eg!iW1aMbWlQ9R{qBuT5KJv`d#I zd|2Nn+8gM)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core/bootstrap_permutation.py @@ -1,14 +1,13 @@ import abc + import numpy as np import scipy import scipy.stats -# import scipy.io as sio # project imports -from . import gsvd -from . import resample -from . import exceptions -from . import class_functions +from . import class_functions, exceptions, gsvd, resample + +# import scipy.io as sio class ResampleTest(abc.ABC): @@ -119,7 +118,7 @@ class _ResampleTestTaskPLS(ResampleTest): std_errs : np.array Element-wise standard errors for the resampled right singular vectors. boot_ratios : np.array - NumPy array containing element-wise ratios of + NumPy array containing element-wise ratios of """ @@ -259,7 +258,9 @@ def _permutation_test( # after sampling if Y is None: - permuted = preprocess(X_new, cond_order, mctype=mctype, return_means=False) + permuted = preprocess( + X_new, cond_order, mctype=mctype, return_means=False + ) else: permuted = preprocess(X_new, Y_new, cond_order) @@ -268,7 +269,7 @@ def _permutation_test( sum_perm[i] = np.sum(np.power(permuted, 2)) # print(f"permuted shape: {permuted.shape}") - + if rotate_method == 0: # run GSVD on mean-centered, resampled matrix # U_hat, s_hat, V_hat = gsvd.gsvd(permuted) @@ -289,12 +290,16 @@ def _permutation_test( permuted, contrast ) else: - U_hat, s_hat, V_hat = np.linalg.svd(permuted, full_matrices=False) + U_hat, s_hat, V_hat = np.linalg.svd( + permuted, full_matrices=False + ) V_hat = V_hat.T # procustes # U_bar, s_bar, V_bar = gsvd.gsvd(V.T @ V_hat) # U_bar, s_bar, V_bar = np.linalg.svd(V.T @ V_hat, full_matrices=False) - U_bar, s_bar, V_bar = np.linalg.svd(U.T @ U_hat, full_matrices=False) + U_bar, s_bar, V_bar = np.linalg.svd( + U.T @ U_hat, full_matrices=False + ) V_bar = V_bar.T # print(X_new_mc.shape) rot = V_bar @ U_bar.T @@ -342,7 +347,9 @@ def _permutation_test( # greatersum += s_hat >= np.mean(s) greatersum += s_hat >= s if debug: - s_list[i:,] = s_hat + s_list[ + i:, + ] = s_hat sum_s[i] = np.sum(np.power(s_hat, 2)) permute_ratio = greatersum / niter @@ -433,7 +440,9 @@ def _bootstrap_test( # after sampling if Y is None: - permuted = preprocess(X_new, cond_order, mctype=mctype, return_means=False) + permuted = preprocess( + X_new, cond_order, mctype=mctype, return_means=False + ) else: permuted = preprocess(X_new, Y_new, cond_order) @@ -447,16 +456,22 @@ def _bootstrap_test( # run GSVD on mean-centered, resampled matrix # U_hat, s_hat, V_hat = gsvd.gsvd(permuted) - U_hat, s_hat, V_hat = np.linalg.svd(permuted, full_matrices=False) + U_hat, s_hat, V_hat = np.linalg.svd( + permuted, full_matrices=False + ) V_hat = V_hat.T elif rotate_method == 1: # U_hat, s_hat, V_hat = gsvd.gsvd(permuted) - U_hat, s_hat, V_hat = np.linalg.svd(permuted, full_matrices=False) + U_hat, s_hat, V_hat = np.linalg.svd( + permuted, full_matrices=False + ) V_hat = V_hat.T # procustes # U_bar, s_bar, V_bar = gsvd.gsvd(V.T @ V_hat) # U_bar, s_bar, V_bar = np.linalg.svd(V.T @ V_hat, full_matrices=False) - U_bar, s_bar, V_bar = np.linalg.svd(U.T @ U_hat, full_matrices=False) + U_bar, s_bar, V_bar = np.linalg.svd( + U.T @ U_hat, full_matrices=False + ) # s_pro = np.sqrt(np.sum(np.power(V_bar, 2), axis=0)) # print(X_new_mc.shape) # rot = U_bar @ V.T @@ -477,7 +492,9 @@ def _bootstrap_test( # US_hat = V.T @ permuted.T # s_hat = np.sqrt(np.sum(np.power(US_hat, 2), axis=0)) V_hat_der = VS_hat / s_hat - U_hat = (np.linalg.inv(np.diag(s_hat)) @ (V_hat_der.T @ permuted.T)).T + U_hat = ( + np.linalg.inv(np.diag(s_hat)) @ (V_hat_der.T @ permuted.T) + ).T # V_hat = (X_new_mc.T @ U_hat_der) / s_hat # potential fix for sign issues V_hat = V_hat_der @@ -501,7 +518,9 @@ def _bootstrap_test( # insert left singular vector into tracking np.array # print(f"dst: {right_sv_sampled[i].shape}; src: {V_hat.shape}") # left_sv_sampled[i] = U_hat * s_hat - left_sv_sampled[i] = class_functions._compute_X_latents(X_new, V_hat) + left_sv_sampled[i] = class_functions._compute_X_latents( + X_new, V_hat + ) right_sv_sampled[i] = V_hat * s_hat if Y is not None: # compute X latents for use in correlation computation @@ -546,7 +565,15 @@ def _bootstrap_test( return (conf_int, std_errs, boot_ratios, debug_dict) else: llcorr, ulcorr = resample.confidence_interval(LVcorr, conf=dist) - return (conf_int, std_errs, boot_ratios, LVcorr, llcorr, ulcorr, debug_dict) + return ( + conf_int, + std_errs, + boot_ratios, + LVcorr, + llcorr, + ulcorr, + debug_dict, + ) def __repr__(self): stg = "" diff --git a/plspy/core/check_inputs.py b/plspy/core/check_inputs.py index 9aec4cf..f327047 100644 --- a/plspy/core/check_inputs.py +++ b/plspy/core/check_inputs.py @@ -2,8 +2,7 @@ def check_input_cond_order_match(X, cond_order, groups_sizes): - """ - """ + """ """ # check dimensions match if len(cond_order.shape) != len(X.shape): diff --git a/plspy/core/class_functions.py b/plspy/core/class_functions.py index b058366..567963c 100644 --- a/plspy/core/class_functions.py +++ b/plspy/core/class_functions.py @@ -1,7 +1,7 @@ -import scipy.stats import numpy as np +import scipy.stats -from . import exceptions +from . import exceptions, gsvd def _mean_centre(X, cond_order, mctype=0, return_means=True): @@ -29,7 +29,7 @@ def _mean_centre(X, cond_order, mctype=0, return_means=True): return_means : boolean, optional Optionally specify whether or not to return the means along with the mean-centred matrix. - + Returns ------- X_means: np.array @@ -87,7 +87,8 @@ def _mean_centre(X, cond_order, mctype=0, return_means=True): X_mc = X - x_repeats - gm_repeats else: raise exceptions.NotImplementedError( - "Specified mean-centring method is either not implemented " "or is invalid." + "Specified mean-centring method is either not implemented " + "or is invalid." ) if return_means: @@ -119,6 +120,7 @@ def _run_pls(M): Eigenvectors of matrix `M`^T*`M`; right singular vectors. """ + # U, s, V = gsvd.gsvd(M, full_matrices=False) U, s, V = np.linalg.svd(M, full_matrices=False) return (U, s, V.T) @@ -161,13 +163,13 @@ def _run_pls_contrast(M, C, compute_uv=True): return s -def _compute_X_latents(I, EV): - """Computes latent values of original mxn input matrix `I` +def _compute_X_latents(X, EV): + """Computes latent values of original mxn input matrix `X` and corresponding nxn eigenvector `EV` by performing a dot-product. Parameters ---------- - I : np.array + X : np.array Input matrix of shape mxn. EV : np.array Corresponding eigenvector of shape nxn. @@ -175,9 +177,9 @@ def _compute_X_latents(I, EV): Returns ------- dotp: np.array - Computed dot-product of I and EV. + Computed dot-product of X and EV. """ - dotp = np.dot(I, EV) + dotp = np.dot(X, EV) return dotp @@ -217,17 +219,27 @@ def _compute_corr(X, Y, cond_order): # , n_cond): # else: for i in range(len(order_all)): # X and Y zscored within each condition - Xc_zsc = scipy.stats.zscore(X[start : order_all[i] + start,]) + Xc_zsc = scipy.stats.zscore( + X[ + start : order_all[i] + start, + ] + ) Xc_zsc /= np.sqrt(order_all[i]) # Xc_zsc *= -1 # print(f"Xc_zsc: \n{Xc_zsc.shape}\n") - Yc_zsc = scipy.stats.zscore(Y[start : order_all[i] + start,]) + Yc_zsc = scipy.stats.zscore( + Y[ + start : order_all[i] + start, + ] + ) Yc_zsc /= np.sqrt(order_all[i]) # Yc_zsc *= -1 # print(f"Yc_zsc: \n{Yc_zsc.shape}\n") np.nan_to_num(Xc_zsc, copy=False) np.nan_to_num(Yc_zsc, copy=False) - R[start_R : Y.shape[1] + start_R,] = np.matmul(Yc_zsc.T, Xc_zsc) + R[ + start_R : Y.shape[1] + start_R, + ] = np.matmul(Yc_zsc.T, Xc_zsc) # print(f"R part: \n{R[start_R : Y.shape[1] + start_R,]}\n") start += order_all[i] start_R += Y.shape[1] @@ -250,7 +262,12 @@ def _compute_Y_latents(Y, U, cond_order): for i in range(len(order_all)): Y_latent[start : order_all[i] + start,] = np.matmul( - Y[start : order_all[i] + start,], U[start_U : Y.shape[1] + start_U,] + Y[ + start : order_all[i] + start, + ], + U[ + start_U : Y.shape[1] + start_U, + ], ) start += order_all[i] start_R += Y.shape[0] @@ -271,7 +288,7 @@ def _mean_single_group(x, sg_cond_order): x : np.array 2-dimensional np.array of a single group. sg_cond_order : 1-dimensional np.array - Single-group condition order corresponding to the input `x`. + Single-group condition order corresponding to the input `x`. Specifies the number of subjects per condition in a single group. Returns @@ -284,7 +301,12 @@ def _mean_single_group(x, sg_cond_order): start = 0 for i in range(len(sg_cond_order)): # store in each row of meaned the column-wise mean of each condition - meaned[i,] = np.mean(x[start : sg_cond_order[i] + start,], axis=0) + meaned[i,] = np.mean( + x[ + start : sg_cond_order[i] + start, + ], + axis=0, + ) start += sg_cond_order[i] return meaned @@ -317,7 +339,12 @@ def _get_group_means(X, cond_order): start = 0 for i in range(len(cond_order)): - group_means[i,] = np.mean(X[start : start + group_sums[i],], axis=0) + group_means[i,] = np.mean( + X[ + start : start + group_sums[i], + ], + axis=0, + ) start += group_sums[i] return group_means @@ -344,7 +371,7 @@ def _get_group_condition_means(X, cond_order): """ grp_cond_means = np.empty((np.product(cond_order.shape), X.shape[-1])) - group_means = _get_group_means(X, cond_order) + # group_means = _get_group_means(X, cond_order) group_sums = np.sum(cond_order, axis=1) # index counters for X_means and X, respectively mc = 0 @@ -352,7 +379,10 @@ def _get_group_condition_means(X, cond_order): for i in range(len(cond_order)): grp_cond_means[mc : mc + len(cond_order[i]),] = _mean_single_group( - X[xc : xc + group_sums[i],], cond_order[i] + X[ + xc : xc + group_sums[i], + ], + cond_order[i], ) mc += len(cond_order[i]) xc += group_sums[i] @@ -435,5 +465,7 @@ def _create_multiblock(X, Y, cond_order, mctype=0): R_norm = (R.T @ np.linalg.inv(np.diag(np.linalg.norm(R, axis=1)))).T # stack mc and R - mb = np.array([mc_norm, R_norm]).reshape(mc_norm.shape[0] + R_norm.shape[0], -1) + mb = np.array([mc_norm, R_norm]).reshape( + mc_norm.shape[0] + R_norm.shape[0], -1 + ) return mb diff --git a/plspy/core/exceptions.py b/plspy/core/exceptions.py index 9d90229..ce9fda4 100644 --- a/plspy/core/exceptions.py +++ b/plspy/core/exceptions.py @@ -2,8 +2,7 @@ class Error(Exception): - """Base class for the following excpetions. - """ + """Base class for the following exceptions.""" pass @@ -17,28 +16,30 @@ class InputMatrixDimensionMismatchError(Error): class ImproperShapeError(Error): - """Exception raised when a matrix has the incorrect shape. - """ + """Exception raised when a matrix has the incorrect shape.""" pass class ConditionMatrixMalformedError(Error): - """Raised when the Condition matrix is not of shape (n,). - """ + """Raised when the Condition matrix is not of shape (n,).""" pass class NotImplementedError(Error): - """Raised when a function has yet to be implemented. - """ + """Raised when a function has yet to be implemented.""" pass class MissingParameterError(Error): - """Raised when a required parameter is not passed in. - """ + """Raised when a required parameter is not passed in.""" + + pass + + +class OutOfRangeError(Error): + """Raised when an out-of-range index is referenced.""" pass diff --git a/plspy/core/gsvd.py b/plspy/core/gsvd.py index 4ceff20..13fc420 100644 --- a/plspy/core/gsvd.py +++ b/plspy/core/gsvd.py @@ -1,6 +1,5 @@ import numpy as np -from scipy.linalg import fractional_matrix_power -from scipy.linalg import lapack +from scipy.linalg import fractional_matrix_power, lapack from . import exceptions @@ -35,20 +34,20 @@ def gsvd(A, M=None, W=None, exp=0.5, full_matrices=False, compute_uv=True): Eigenvectors of matrix `A`^T*`A`; right singular vectors """ - user_spec_m = True - user_spec_w = True + # user_spec_m = True + # user_spec_w = True A = np.array(A) # if no M/W matrix specified, use identity matrix if M is None or M == []: M = np.identity(A.shape[0]) - user_spec_m = False + # user_spec_m = False # cast to numpy array else: M = np.array(M) if W is None or W == []: W = np.identity(A.shape[1]) - user_spec_w = False + # user_spec_w = False else: W = np.array(W) diff --git a/plspy/core/pls.py b/plspy/core/pls.py index 613a08a..6aecfe7 100644 --- a/plspy/core/pls.py +++ b/plspy/core/pls.py @@ -1,9 +1,11 @@ +from typing import List, Optional, Tuple, Type, Union + import numpy as np -from typing import Optional, Tuple, List, Union, Type + +from .. import __docs__ # project imports from . import pls_classes -from .. import __docs__ # dictionary holding PLS methods; used with help() methods = { diff --git a/plspy/core/pls_classes.py b/plspy/core/pls_classes.py index 9416dea..ed205ee 100644 --- a/plspy/core/pls_classes.py +++ b/plspy/core/pls_classes.py @@ -1,15 +1,12 @@ import abc +from typing import List, Optional, Tuple, Type, Union + import numpy as np import scipy.stats -from typing import Optional, Tuple, List, Union, Type - -# project imports -from . import bootstrap_permutation -from . import gsvd # import helpers -from . import exceptions -from . import class_functions +# project imports +from . import bootstrap_permutation, class_functions, exceptions, gsvd class PLSBase(abc.ABC): @@ -106,9 +103,9 @@ class _MeanCentreTaskPLS(PLSBase): otherwise specified by the user. rotate_method : int, optional Optional value specifying whether or not full GSVD should be used - during bootstrap and permutation tests ("rotated" method). + during bootstrap and permutation tests ("rotated" method). rotate_method options: - + 0 - compute s using SVD/GSVD 1 - compute s using Procrustes rotation @@ -117,7 +114,7 @@ class _MeanCentreTaskPLS(PLSBase): mctype : int, optional mctype options: - + 0 - within each group remove group means from condition means (default) 1 - remove grand condition means from each group condition mean @@ -125,7 +122,7 @@ class _MeanCentreTaskPLS(PLSBase): 2 - remove grand mean (over all subjects and conditions) 3 - remove all main effects - subtract condition and group means (group by condition) - + Attributes ---------- @@ -188,11 +185,15 @@ def __init__( mctype: int = 0, **kwargs: str, ): + # so pylint will shut up + self.pls_alg = kwargs["pls_alg"] for k, v in kwargs.items(): setattr(self, k, v) - if len(X.shape) != 2: # or len(X.shape) < 2: - raise exceptions.ImproperShapeError("Input matrix must be 2-dimensional.") + if len(X.shape) != 2: # or len(X.shape) < 2: + raise exceptions.ImproperShapeError( + "Input matrix must be 2-dimensional." + ) self.X = X if Y is not None: @@ -206,7 +207,9 @@ def __init__( f"Do not provide a contrast matrix " f"for {self._pls_types[self.pls_alg]}." ) - self.groups_sizes, self.num_groups = self._get_groups_info(groups_sizes) + self.groups_sizes, self.num_groups = self._get_groups_info( + groups_sizes + ) self.num_conditions = num_conditions # if no user-specified condition list, generate one if cond_order is None: @@ -279,7 +282,9 @@ def _get_cond_order(X_shape, groups_tuple, num_conditions): "X's row count. Please specify a custom cond_order field." ) - cond_order = np.array([np.array([i] * num_conditions) for i in groups_tuple]) + cond_order = np.array( + [np.array([i] * num_conditions) for i in groups_tuple] + ) return cond_order # cond_order = [] # # print(f"GT: {groups_tuple}") @@ -345,9 +350,9 @@ class _RegularBehaviourPLS(_MeanCentreTaskPLS): otherwise specified by the user. rotate_method : int, optional Optional value specifying whether or not full GSVD should be used - during bootstrap and permutation tests ("rotated" method). + during bootstrap and permutation tests ("rotated" method). rotate_method options: - + 0 - compute s using SVD/GSVD 1 - compute s using Procrustes rotation @@ -421,6 +426,8 @@ def __init__( rotate_method: int = 0, **kwargs, ): + # so pylint will shut up + self.pls_alg = kwargs["pls_alg"] for k, v in kwargs.items(): setattr(self, k, v) @@ -439,12 +446,16 @@ def __init__( f"for {self._pls_types[self.pls_alg]}." ) - if len(X.shape) != 2 or len(Y.shape) != 2: # or len(X.shape) < 2: - raise exceptions.ImproperShapeError("Input matrices must be 2-dimensional.") + if len(X.shape) != 2 or len(Y.shape) != 2: # or len(X.shape) < 2: + raise exceptions.ImproperShapeError( + "Input matrices must be 2-dimensional." + ) self.X = X self.Y = Y - self.groups_sizes, self.num_groups = self._get_groups_info(groups_sizes) + self.groups_sizes, self.num_groups = self._get_groups_info( + groups_sizes + ) self.num_conditions = num_conditions # if no user-specified condition list, generate one if cond_order is None: @@ -539,9 +550,9 @@ class _ContrastTaskPLS(_MeanCentreTaskPLS): otherwise specified by the user. rotate_method : int, optional Optional value specifying whether or not full GSVD should be used - during bootstrap and permutation tests ("rotated" method). + during bootstrap and permutation tests ("rotated" method). rotate_method options: - + 0 - compute s using SVD/GSVD 1 - compute s using Procrustes rotation @@ -550,7 +561,7 @@ class _ContrastTaskPLS(_MeanCentreTaskPLS): mctype : int, optional mctype options: - + 0 - within each group remove group means from condition means (default) 1 - remove grand condition means from each group condition mean @@ -562,7 +573,7 @@ class _ContrastTaskPLS(_MeanCentreTaskPLS): contrasts: np.array contrast matrix for use in Contrast Task PLS. Used to create different methods of comparison. - + Attributes ---------- @@ -632,6 +643,8 @@ def __init__( contrasts: list = None, **kwargs, ): + # so pylint will shut up + self.pls_alg = kwargs["pls_alg"] for k, v in kwargs.items(): setattr(self, k, v) @@ -642,11 +655,15 @@ def __init__( f"for {self._pls_types[self.pls_alg]}." ) - if len(X.shape) != 2: # or len(X.shape) < 2: - raise exceptions.ImproperShapeError("Input matrix must be 2-dimensional.") + if len(X.shape) != 2: # or len(X.shape) < 2: + raise exceptions.ImproperShapeError( + "Input matrix must be 2-dimensional." + ) self.X = X - self.groups_sizes, self.num_groups = self._get_groups_info(groups_sizes) + self.groups_sizes, self.num_groups = self._get_groups_info( + groups_sizes + ) self.num_conditions = num_conditions # if no user-specified condition list, generate one if cond_order is None: @@ -669,7 +686,9 @@ def __init__( self.cond_order = cond_order if contrasts is None: - raise exceptions.MissingParameterError("Please provide a contrast matrix.") + raise exceptions.MissingParameterError( + "Please provide a contrast matrix." + ) self.contrasts = contrasts self.num_perm = num_perm @@ -747,9 +766,9 @@ class _ContrastBehaviourPLS(_ContrastTaskPLS): otherwise specified by the user. rotate_method : int, optional Optional value specifying whether or not full GSVD should be used - during bootstrap and permutation tests ("rotated" method). + during bootstrap and permutation tests ("rotated" method). rotate_method options: - + 0 - compute s using SVD/GSVD 1 - compute s using Procrustes rotation @@ -759,7 +778,7 @@ class _ContrastBehaviourPLS(_ContrastTaskPLS): contrasts: np.array contrast matrix for use in Contrast Task PLS. Used to create different methods of comparison. - + Attributes ---------- @@ -828,6 +847,8 @@ def __init__( contrasts: list = None, **kwargs, ): + # so pylint will shut up + self.pls_alg = kwargs["pls_alg"] for k, v in kwargs.items(): setattr(self, k, v) @@ -841,12 +862,16 @@ def __init__( # ) if len(X.shape) != 2 or len(Y.shape) != 2: # or len(X.shape) < 2: - raise exceptions.ImproperShapeError("Input matrices must be 2-dimensional.") + raise exceptions.ImproperShapeError( + "Input matrices must be 2-dimensional." + ) self.X = X self.Y = Y - self.groups_sizes, self.num_groups = self._get_groups_info(groups_sizes) + self.groups_sizes, self.num_groups = self._get_groups_info( + groups_sizes + ) self.num_conditions = num_conditions # if no user-specified condition list, generate one if cond_order is None: @@ -869,11 +894,15 @@ def __init__( self.cond_order = cond_order if contrasts is None: - raise exceptions.MissingParameterError("Please provide a contrast matrix.") + raise exceptions.MissingParameterError( + "Please provide a contrast matrix." + ) self.contrasts = contrasts self.num_perm = num_perm self.num_boot = num_boot + # so pylint will shut up + self.pls_alg = kwargs["pls_alg"] # TODO: catch extraneous keyword args for k, v in kwargs.items(): setattr(self, k, v) @@ -949,9 +978,9 @@ class _MultiblockPLS(_RegularBehaviourPLS): otherwise specified by the user. rotate_method : int, optional Optional value specifying whether or not full GSVD should be used - during bootstrap and permutation tests ("rotated" method). + during bootstrap and permutation tests ("rotated" method). rotate_method options: - + 0 - compute s using SVD/GSVD 1 - compute s using Procrustes rotation @@ -1024,6 +1053,8 @@ def __init__( rotate_method: int = 0, **kwargs, ): + # so pylint will shut up + self.pls_alg = kwargs["pls_alg"] # TODO: catch extraneous keyword args for k, v in kwargs.items(): @@ -1043,13 +1074,17 @@ def __init__( f"for {self._pls_types[self.pls_alg]}." ) - if len(X.shape) != 2 or len(Y.shape) != 2: # or len(X.shape) < 2: - raise exceptions.ImproperShapeError("Input matrices must be 2-dimensional.") + if len(X.shape) != 2 or len(Y.shape) != 2: # or len(X.shape) < 2: + raise exceptions.ImproperShapeError( + "Input matrices must be 2-dimensional." + ) self.X = X self.Y = Y - self.groups_sizes, self.num_groups = self._get_groups_info(groups_sizes) + self.groups_sizes, self.num_groups = self._get_groups_info( + groups_sizes + ) self.num_conditions = num_conditions # if no user-specified condition list, generate one if cond_order is None: @@ -1081,7 +1116,9 @@ def __init__( self._compute_corr = class_functions._compute_corr # compute R correlation matrix - self.multiblock = self._create_multiblock(self.X, self.Y, self.cond_order) + self.multiblock = self._create_multiblock( + self.X, self.Y, self.cond_order + ) self.U, self.s, self.V = class_functions._run_pls(self.multiblock) # self.X_latent = np.dot(self.X_mc, self.V) @@ -1090,7 +1127,9 @@ def __init__( self.Y, self.U, self.cond_order ) # compute latent variable correlation matrix for V using compute_R - self.lvcorrs = self._compute_corr(self.X_latent, self.Y, self.cond_order) + self.lvcorrs = self._compute_corr( + self.X_latent, self.Y, self.cond_order + ) # self.lvcorrs[:, 1:] = self.lvcorrs[:, 1:] * -1 # self.lvcorrs[:, 0] = np.abs(self.lvcorrs[:, 0]) @@ -1145,9 +1184,9 @@ class _ContrastMultiblockPLS(_MultiblockPLS): otherwise specified by the user. rotate_method : int, optional Optional value specifying whether or not full GSVD should be used - during bootstrap and permutation tests ("rotated" method). + during bootstrap and permutation tests ("rotated" method). rotate_method options: - + 0 - compute s using SVD/GSVD 1 - compute s using Procrustes rotation @@ -1224,6 +1263,8 @@ def __init__( contrasts: list = None, **kwargs, ): + # so pylint will shut up + self.pls_alg = kwargs["pls_alg"] # TODO: catch extraneous keyword args for k, v in kwargs.items(): @@ -1238,12 +1279,16 @@ def __init__( # ) if len(X.shape) != 2 or len(Y.shape) != 2: # or len(X.shape) < 2: - raise exceptions.ImproperShapeError("Input matrices must be 2-dimensional.") + raise exceptions.ImproperShapeError( + "Input matrices must be 2-dimensional." + ) self.X = X self.Y = Y - self.groups_sizes, self.num_groups = self._get_groups_info(groups_sizes) + self.groups_sizes, self.num_groups = self._get_groups_info( + groups_sizes + ) self.num_conditions = num_conditions # if no user-specified condition list, generate one if cond_order is None: @@ -1266,11 +1311,15 @@ def __init__( self.cond_order = cond_order if contrasts is None: - raise exceptions.MissingParameterError("Please provide a contrast matrix.") + raise exceptions.MissingParameterError( + "Please provide a contrast matrix." + ) self.contrasts = contrasts self.num_perm = num_perm self.num_boot = num_boot + # so pylint will shut up + self.pls_alg = kwargs["pls_alg"] # TODO: catch extraneous keyword args for k, v in kwargs.items(): setattr(self, k, v) @@ -1283,9 +1332,13 @@ def __init__( class_functions._compute_Y_latents = class_functions._compute_Y_latents # compute R correlation matrix - self.multiblock = self._create_multiblock(self.X, self.Y, self.cond_order) + self.multiblock = self._create_multiblock( + self.X, self.Y, self.cond_order + ) - self.contrasts = self.contrasts / np.linalg.norm(self.contrasts, axis=0) + self.contrasts = self.contrasts / np.linalg.norm( + self.contrasts, axis=0 + ) print(self.contrasts) self.U, self.s, self.V = class_functions._run_pls_contrast( @@ -1304,7 +1357,9 @@ def __init__( self.Y, self.U, self.cond_order ) # compute latent variable correlation matrix for V using compute_R - self.lvcorrs = self._compute_corr(self.X_latent, self.Y, self.cond_order) + self.lvcorrs = self._compute_corr( + self.X_latent, self.Y, self.cond_order + ) # self.lvcorrs[:, 1:] = self.lvcorrs[:, 1:] * -1 # self.lvcorrs[:, 0] = np.abs(self.lvcorrs[:, 0]) diff --git a/plspy/io/io.py b/plspy/io/io.py index 19c9460..bd46951 100644 --- a/plspy/io/io.py +++ b/plspy/io/io.py @@ -1,7 +1,8 @@ import os +from typing import List, Optional, Tuple, Union + import nibabel import numpy as np -from typing import Optional, Tuple, List, Union from .. import exceptions @@ -14,7 +15,7 @@ def open_images_in_dir( Filenames are sorted alphanumerically and Nifti images are loaded in using same ordering. - + Parameters ---------- dir_path : str @@ -50,7 +51,7 @@ def open_single_image_in_dir(fpath: str) -> nibabel.nifti1.Nifti1Image: Open single image in a directory and return it. Essentially a wrapper for nibabel.load() - + Parameters ---------- fpath : str @@ -71,7 +72,9 @@ def open_single_image_in_dir(fpath: str) -> nibabel.nifti1.Nifti1Image: return image -def open_images_from_paths_list(fpaths: List[str]) -> List[nibabel.nifti1.Nifti1Image]: +def open_images_from_paths_list( + fpaths: List[str], +) -> List[nibabel.nifti1.Nifti1Image]: """ Take list of file paths and open each image. @@ -101,16 +104,16 @@ def concat_images( For reference, see the nibabel documentation on `nibabel.concat_images https://nipy.org/nibabel/reference/nibabel.funcs.html#concat-images`_ - Parameters - ---------- - *args : tuple - Any argument passed into nibabel.concat_images. For our purposes it's usually + Parameters + ---------- + *args : tuple + Any argument passed into nibabel.concat_images. For our purposes it's usually one arg of type List[nibabel.nifti1.Nifti1Image] - **kwargs : dict, optional + **kwargs : dict, optional Any keyword arg passed into nibabel.concat_images. - Returns - ------- + Returns + ------- nibabel.nifti1.Nifti1Image Concatenated image composed of original input images. """ @@ -129,18 +132,18 @@ def read_dir_to_one_image( For reference, see the nibabel documentation on `nibabel.concat_images https://nipy.org/nibabel/reference/nibabel.funcs.html#concat-images`_ - Parameters - ---------- + Parameters + ---------- fpath : str Full path to image file. - *args : tuple - Any argument passed into nibabel.concat_images. For our purposes it's usually + *args : tuple + Any argument passed into nibabel.concat_images. For our purposes it's usually one arg of type List[nibabel.nifti1.Nifti1Image] - **kwargs : dict, optional + **kwargs : dict, optional Any keyword arg passed into nibabel.concat_images. - Returns - ------- + Returns + ------- nibabel.nifti1.Nifti1Image Concatenated image composed of original input images. """ @@ -164,31 +167,31 @@ def open_multiple_imgs_from_dirs( For reference, see the nibabel documentation on `nibabel.concat_images https://nipy.org/nibabel/reference/nibabel.funcs.html#concat-images`_ - Parameters - ---------- + Parameters + ---------- dir_list : List[str] List of full paths to directories of image files. - *args : tuple - Any argument passed into nibabel.concat_images. For our purposes it's usually + *args : tuple + Any argument passed into nibabel.concat_images. For our purposes it's usually one arg of type List[nibabel.nifti1.Nifti1Image] - **kwargs : dict, optional + **kwargs : dict, optional Any keyword arg passed into nibabel.concat_images. - Returns - ------- + Returns + ------- nibabel.nifti1.Nifti1Image Concatenated image composed of original input images. - Parameters - ---------- - *args : tuple - Any argument passed into nibabel.concat_images. For our purposes it's usually + Parameters + ---------- + *args : tuple + Any argument passed into nibabel.concat_images. For our purposes it's usually one arg of type List[nibabel.nifti1.Nifti1Image] - **kwargs : dict, optional + **kwargs : dict, optional Any keyword arg passed into nibabel.concat_images. - Returns - ------- + Returns + ------- nibabel.nifti1.Nifti1Image Concatenated image composed of original input images. """ @@ -222,7 +225,7 @@ def extract_single_matrix(img: nibabel.nifti1.Nifti1Image) -> np.ndarray: # remove extra single dimension at end if present if mat.shape[-1] == 1: print(f"Shape before : {mat.shape}") - images[i].dataobj = mat.reshape(mat.shape[:-1]) + img.dataobj = mat.reshape(mat.shape[:-1]) print(f"Shape after : {mat.shape}") return mat @@ -290,15 +293,15 @@ def extract_matrices_image_list_realign( Parameters ---------- img_list : List[nibabel.nifti1.Nifti1Image] - list of nibabel image objects loaded in from + list of nibabel image objects loaded in from Returns ------- mats : List[nibabel.nifti1.Nifti1Image] - list of NumPy arrays containing time-aligned extracted matrices for + list of NumPy arrays containing time-aligned extracted matrices for each subject. shape : Tuple[int] - tuple containing shape of single subject's shape, of form + tuple containing shape of single subject's shape, of form (time-point, x, y, z). """ @@ -315,7 +318,7 @@ def create_binary_mask_from_matrices(matrices: List[np.ndarray]) -> np.ndarray: Create mask from list of matrices. Mask will only include values where, for each index, a value does not - equal 0 for any subject in the list. + equal 0 for any subject in the list. TODO: finish implementing @@ -338,9 +341,13 @@ def create_binary_mask_from_matrices(matrices: List[np.ndarray]) -> np.ndarray: mats_concat = mats.reshape((-1,) + mats.shape[2:]) # get the mask - mask = np.ma.masked_where(cond, mean_all) + # mask = np.ma.masked_where(mats_concat, ) - return mask.mask + # create mask where values are False if all values throughout all + # subjects' time series for a particular index are 0 + mask = np.logical_and.reduce(mats_concat, where=(mats_concat != 0), axis=0) + + return mask def create_threshold_mask_from_matrices( @@ -393,7 +400,7 @@ def create_threshold_mask_from_matrices( def apply_mask_matrices_deprecated(matrices, mask, fill_value): """ - This will be removed in future versions of plspy, do not use. + This will be removed in future versions of plspy, do not use. Parameters ---------- @@ -454,7 +461,9 @@ def apply_mask_matrices( def create_and_apply_mask_list( - matrices: List[np.ndarray], mask_type: str = "threshold", threshold: float = 0.15 + matrices: List[np.ndarray], + mask_type: str = "threshold", + threshold: float = 0.15, ) -> np.ndarray: """Creates a mask and applies it to a list of matrices. @@ -477,7 +486,9 @@ def create_and_apply_mask_list( """ if mask_type == "threshold": - mask = create_threshold_mask_from_matrices(matrices, threshold=threshold) + mask = create_threshold_mask_from_matrices( + matrices, threshold=threshold + ) elif mask_type == "binary": pass else: @@ -733,7 +744,10 @@ def remap_vectorized_subject_to_4d( for j in range(len(vector_indices[0])): # map index in vector to 4D space reconstructed[ - i, vector_indices[0][j], vector_indices[1][j], vector_indices[2][j] + i, + vector_indices[0][j], + vector_indices[1][j], + vector_indices[2][j], ] = vector_time_sliced[i][j] return reconstructed diff --git a/plspy/tests/test_class_functions.py b/plspy/tests/test_class_functions.py index 70deea1..18ababe 100644 --- a/plspy/tests/test_class_functions.py +++ b/plspy/tests/test_class_functions.py @@ -1,22 +1,25 @@ # TODO: build out unit tests and end-to-end tests import numpy as np -import pytest - import plspy +import pytest rand_s = np.random.RandomState(950613) # basic placeholder test for now def test_mean_centre(): - X = rand_s.rand(50,100) - cond_order = np.array([[5,5]]*5) - res = plspy.class_functions._mean_centre(X, cond_order, mctype=0, return_means=False) + X = rand_s.rand(50, 100) + cond_order = np.array([[5, 5]] * 5) + res = plspy.class_functions._mean_centre( + X, cond_order, mctype=0, return_means=False + ) assert res.shape == (10, 100) - res = plspy.class_functions._mean_centre(X, cond_order, mctype=1, return_means=False) + res = plspy.class_functions._mean_centre( + X, cond_order, mctype=1, return_means=False + ) assert res.shape == (10, 100) - res = plspy.class_functions._mean_centre(X, cond_order, mctype=2, return_means=False) + res = plspy.class_functions._mean_centre( + X, cond_order, mctype=2, return_means=False + ) assert res.shape == (50, 100) - - diff --git a/plspy/tests/test_io.py b/plspy/tests/test_io.py index 60ce106..55cb254 100644 --- a/plspy/tests/test_io.py +++ b/plspy/tests/test_io.py @@ -1,7 +1,6 @@ import numpy as np -import pytest - import plspy +import pytest rand_s = np.random.RandomState(950613) @@ -12,7 +11,9 @@ def test_remap_vectorized_subject_to_4d(): mock_subjects = [rand_s.rand(20, 10, 10, 10) for i in range(5)] # create mask from 5 subjects - mask = plspy.io.create_threshold_mask_from_matrices(mock_subjects, threshold=0.15) + mask = plspy.io.create_threshold_mask_from_matrices( + mock_subjects, threshold=0.15 + ) # generate masked and vectorized subjects mock_masked = plspy.io.apply_mask_matrices(mock_subjects, mask) @@ -23,15 +24,16 @@ def test_remap_vectorized_subject_to_4d(): ) # check every index in original and recovered - for i in range(mock_subjects[0].shape[0]): - for j in range(mock_subjects[0].shape[1]): - for k in range(mock_subjects[0].shape[2]): - for l in range(mock_subjects[0].shape[3]): + for time in range(mock_subjects[0].shape[0]): + for x in range(mock_subjects[0].shape[1]): + for y in range(mock_subjects[0].shape[2]): + for z in range(mock_subjects[0].shape[3]): # check equality if the values were masked initially - if mask[j, k, l]: + if mask[x, y, z]: assert np.allclose( - mock_subjects[0][i, j, k, l], recovered[i, j, k, l] + mock_subjects[0][time, x, y, l], + recovered[time, x, y, z], ) # otherwise, make sure all other values are 0 else: - assert recovered[i, j, k, l] == 0 + assert recovered[time, x, y, z] == 0 diff --git a/plspy/visualize/visualize_classes.py b/plspy/visualize/visualize_classes.py index 0ccd0ac..7f2e2ca 100644 --- a/plspy/visualize/visualize_classes.py +++ b/plspy/visualize/visualize_classes.py @@ -1,14 +1,15 @@ import abc -import plspy -import numpy as np -import seaborn as sns -import nilearn -import nibabel as nib -import scipy.io as sio +import matplotlib import matplotlib.pyplot as plt +import nibabel as nib +import nilearn +import numpy as np import pandas as pd -import matplotlib +import scipy.io as sio +import seaborn as sns + +from ..core import exceptions class _SBPlotBase(abc.ABC): @@ -148,7 +149,7 @@ def _construct_plot(self, pls_result, **kwargs): perm_sv = pls_result.resample_tests.permute_ratio pal = sns.color_palette("husl", n_colors=perm_sv.shape[0]) svt = pd.DataFrame( - data={"x": list(range(1, len(perm_sv) + 1)), "y": perm_sv.reshape(-1)} + data={"x": list(range(1, len(perm_sv) + 1)), "y": perm_sv.reshape(-1),} ) bp = sns.barplot(data=svt, x="x", y="y", palette=pal) Ax = bp.axes @@ -223,7 +224,7 @@ def _construct_plot(self, pls_result, **kwargs): sns.barplot(data=scores[i], x="x", y="y", palette=pal, ax=axes[i]) ) axes[i].set_xlabel(f"Group {i + 1}") - axes[i].set_ylabel(f"") + axes[i].set_ylabel("") # pal = sns.color_palette("husl", n_colors=splt) # dv2 = pd.DataFrame(data={"x": list(range(1, splt + 1)), "y": dlv[0][splt:].reshape(-1)}) # bp1 = sns.barplot(data=dv1, x="x", y="y", palette=pal, ax=ax1) @@ -231,7 +232,7 @@ def _construct_plot(self, pls_result, **kwargs): # ax2.set_ylabel("") # ax1.set_xlabel("Group 1") # ax2.set_xlabel("Group 2") - axes[0].set_ylabel(f"Design Scores") + axes[0].set_ylabel("Design Scores") Ax = bar_plots[0].axes boxes = [ item @@ -277,9 +278,9 @@ def _construct_plot(self, pls_result, **kwargs): sharey=True, ) axes[0].set_ylabel("Correlations") - f.suptitle(f"Correlation Plot", fontsize=14) + f.suptitle("Correlation Plot", fontsize=14) splt = int(pls_result.lvcorrs.shape[0] / pls_result.num_groups) - bar_plots = [] + # bar_plots = [] scores = [] for i in range(pls_result.num_groups): # stays in loop since it has to be reset every iteration @@ -289,7 +290,7 @@ def _construct_plot(self, pls_result, **kwargs): pd.DataFrame(data={"x": list(range(1, y_mat.shape[0] + 1)), "y": y_mat}) ) axes[i].set_xlabel(f"Group {i + 1}") - axes[i].set_ylabel(f"") + axes[i].set_ylabel("") # pal = sns.color_palette("husl", n_colors=splt) # dv2 = pd.DataFrame(data={"x": list(range(1, splt + 1)), "y": dlv[0][splt:].reshape(-1)}) # bp1 = sns.barplot(data=dv1, x="x", y="y", palette=pal, ax=ax1) @@ -343,7 +344,7 @@ def _construct_plot(self, pls_result, **kwargs): sharey=True, ) axes[0].set_ylabel("Brain LVs") - f.suptitle(f"Brain LV Plot", fontsize=14) + f.suptitle("Brain LV Plot", fontsize=14) splt = int(pls_result.lvcorrs.shape[0] / pls_result.num_groups) bar_plots = [] scores = [] @@ -361,7 +362,7 @@ def _construct_plot(self, pls_result, **kwargs): sns.barplot(data=scores[i], x="x", y="y", palette=pal, ax=axes[i]) ) axes[i].set_xlabel(f"Group {i + 1}") - axes[i].set_ylabel(f"") + axes[i].set_ylabel("") # pal = sns.color_palette("husl", n_colors=splt) # dv2 = pd.DataFrame(data={"x": list(range(1, splt + 1)), "y": dlv[0][splt:].reshape(-1)}) # bp1 = sns.barplot(data=dv1, x="x", y="y", palette=pal, ax=ax1) @@ -415,7 +416,7 @@ def _construct_plot(self, pls_result, **kwargs): sharey=True, ) axes[0].set_ylabel("Behaviour LVs") - f.suptitle(f"Behaviour LV Plot", fontsize=14) + f.suptitle("Behaviour LV Plot", fontsize=14) splt = int(pls_result.Y_latent.shape[0] / pls_result.num_groups) bar_plots = [] scores = [] @@ -433,7 +434,7 @@ def _construct_plot(self, pls_result, **kwargs): sns.barplot(data=scores[i], x="x", y="y", palette=pal, ax=axes[i]) ) axes[i].set_xlabel(f"Group {i + 1} conditions") - axes[i].set_ylabel(f"") + axes[i].set_ylabel("") # pal = sns.color_palette("husl", n_colors=splt) # dv2 = pd.DataFrame(data={"x": list(range(1, splt + 1)), "y": dlv[0][splt:].reshape(-1)}) # bp1 = sns.barplot(data=dv1, x="x", y="y", palette=pal, ax=ax1) @@ -474,7 +475,7 @@ class _VoxelIntensityPlot(_DesignScoresPlot): """ """ def __init__( - pls_result, coords, dim=(1000, 650), **kwargs, + self, pls_result, coords, dim=(1000, 650), **kwargs, ): self.coords = coords super().__init__(self, pls_result, dim, **kwargs) @@ -502,7 +503,7 @@ def mean_neighbourhood(mat, pos, num): @_SBPlotBase._register_subclass("blv") -class _BrainLVPlot(_SBPlotBase): +class _BLVPlot(_SBPlotBase): """ """ def __init__( @@ -522,8 +523,9 @@ def save_html(self): def __str__(self): info = f"Plot type: {self._sbplot_types[self.sbplot_method]}" - stg += info - return stg + # stg += info + # return stg + return info def __repr__(self): return self.__str__() diff --git a/setup.py b/setup.py index 788055c..be250e4 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,8 @@ import setuptools import versioneer -version=versioneer.get_version(), -cmdclass=versioneer.get_cmdclass(), +version = (versioneer.get_version(),) +cmdclass = (versioneer.get_cmdclass(),) # import os @@ -16,8 +16,8 @@ version="0.2", author="Noah Frazier-Logue", author_email="noah_frazier-logue@sfu.ca", - description="Implementation of McIntosh Lab's Partial Least Squares " - "neuroimaging tool", + description="Implementation of McIntosh Lab's Partial Least Squares " + "neuroimaging tool", # long_description=long_description, # long_description_content_type="text/markdown", url="https://github.com/McIntosh-Lab/plspy", From 70691c42d219c3ece184b67b4447c01ca695009e Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 26 Jul 2022 12:48:52 -0400 Subject: [PATCH 10/23] [FIX] added megalinter configs and pytest config --- .bandit.yml | 4 ++++ .cspell.json | 15 +++++++++++++++ .flake8 | 5 +++++ .gitignore | 4 +++- .jscpd.json | 15 +++++++++++++++ .mega-linter.yml | 29 +++++++++++++++++++++++++++++ docs/conf.py | 10 +++++----- pytest.ini | 2 ++ 8 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 .bandit.yml create mode 100644 .cspell.json create mode 100644 .flake8 create mode 100644 .jscpd.json create mode 100644 .mega-linter.yml create mode 100644 pytest.ini diff --git a/.bandit.yml b/.bandit.yml new file mode 100644 index 0000000..523fd8b --- /dev/null +++ b/.bandit.yml @@ -0,0 +1,4 @@ +exclude_dirs: + - plspy/_version.py + - versioneer.py + - plspy/tests diff --git a/.cspell.json b/.cspell.json new file mode 100644 index 0000000..c312eab --- /dev/null +++ b/.cspell.json @@ -0,0 +1,15 @@ +{ + "ignorePaths": [ + "**/node_modules/**", + "**/vscode-extension/**", + "**/.git/**", + ".vscode", + "megalinter", + "package-lock.json", + "report" + ], + "language": "en", + "noConfigSearch": true, + "words": [], + "version": "0.2" +} diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..d9ad0b4 --- /dev/null +++ b/.flake8 @@ -0,0 +1,5 @@ +[flake8] +ignore = E203, E266, E501, W503, F403, F401 +max-line-length = 79 +max-complexity = 18 +select = B,C,E,F,W,T4,B9 diff --git a/.gitignore b/.gitignore index b778ba2..f8bceee 100644 --- a/.gitignore +++ b/.gitignore @@ -9,12 +9,14 @@ plspy/visualize/.*.sw[klmnop] plspy/tests/.*.sw[klmnop] plspy/.nfs* +report/* + example_*/ *-info/ target/ .tox/ .pre-commit* - +.coverage build/ dist/ diff --git a/.jscpd.json b/.jscpd.json new file mode 100644 index 0000000..2cee5f5 --- /dev/null +++ b/.jscpd.json @@ -0,0 +1,15 @@ +{ + "threshold": 0, + "reporters": ["html", "markdown"], + "ignore": [ + "**/node_modules/**", + "**/.git/**", + "**/.rbenv/**", + "**/.venv/**", + "**/*cache*/**", + "**/.github/**", + "**/.idea/**", + "**/report/**", + "**/*.svg" + ] +} diff --git a/.mega-linter.yml b/.mega-linter.yml new file mode 100644 index 0000000..ae4ccab --- /dev/null +++ b/.mega-linter.yml @@ -0,0 +1,29 @@ +# Configuration file for MegaLinter +# See all available variables at https://megalinter.github.io/configuration/ and in linters documentation + +APPLY_FIXES: all # all, none, or list of linter keys +# ENABLE: # If you use ENABLE variable, all other languages/formats/tooling-formats will be disabled by default +ENABLE_LINTERS: # If you use ENABLE_LINTERS variable, all other linters will be disabled by default + - PYTHON_PYLINT + - PYTHON_BLACK + - PYTHON_FLAKE8 + - PYTHON_ISORT + - PYTHON_BANDIT + - PYTHON_MYPY + - JSON + - MARKDOWN + - SPELL_MISSPELL +# DISABLE: +# - COPYPASTE # Uncomment to disable checks of excessive copy-pastes +# - SPELL # Uncomment to disable checks of spelling mistakes +SHOW_ELAPSED_TIME: true +FILEIO_REPORTER: false +DEFAULT_WORKSPACE: "~/.mega-linter/lint" +DISABLE_ERRORS: true # Uncomment if you want MegaLinter to detect errors but not block CI to pass + +ADDITIONAL_EXCLUDED_DIRECTORIES: + - build + - dist + - docs + - devtools + - report diff --git a/docs/conf.py b/docs/conf.py index 5f9f5f7..512845e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,18 +13,19 @@ # import os # import sys # sys.path.insert(0, os.path.abspath('.')) - -autodoc_mock_imports = ["pybuilder", "numpy", "scipy", "scipy.stats"] import os import sys -from os.path import join, pardir, dirname +from os.path import dirname, join, pardir + +from versioneer import get_version + +autodoc_mock_imports = ["pybuilder", "numpy", "scipy", "scipy.stats"] sys.path.insert(0, join(dirname(__file__), pardir)) # sys.path.insert(0, os.path.abspath("../../plspy")) # sys.path.insert(0, os.path.abspath("../..")) -from versioneer import get_version # -- Project information ----------------------------------------------------- @@ -79,4 +80,3 @@ napoleon_use_ivar = False napoleon_use_param = True napoleon_use_rtype = False - diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..f069749 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +addopts = --ignore=report From 61a27af62dc2216c58ab1b1dc870db80779d89cf Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 26 Jul 2022 12:54:42 -0400 Subject: [PATCH 11/23] [FIX] fix index issue in unit test; linter - Fixed old variable reference in 4d reconstitution unit test - Modified linter so it will not commit changes --- .github/workflows/mega-linter.yml | 8 ++++---- plspy/tests/test_io.py | 7 ++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index 9bd6e66..097e22d 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -9,11 +9,11 @@ on: pull_request: branches: [master, main] -env: # Comment env block if you do not want to apply fixes +# env: # Comment env block if you do not want to apply fixes # Apply linter fixes configuration - APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool) - APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all) - APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request) + # APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool) + # APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all) + # APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request) concurrency: group: ${{ github.ref }}-${{ github.workflow }} diff --git a/plspy/tests/test_io.py b/plspy/tests/test_io.py index 55cb254..2f3f7a9 100644 --- a/plspy/tests/test_io.py +++ b/plspy/tests/test_io.py @@ -11,9 +11,7 @@ def test_remap_vectorized_subject_to_4d(): mock_subjects = [rand_s.rand(20, 10, 10, 10) for i in range(5)] # create mask from 5 subjects - mask = plspy.io.create_threshold_mask_from_matrices( - mock_subjects, threshold=0.15 - ) + mask = plspy.io.create_threshold_mask_from_matrices(mock_subjects, threshold=0.15) # generate masked and vectorized subjects mock_masked = plspy.io.apply_mask_matrices(mock_subjects, mask) @@ -31,8 +29,7 @@ def test_remap_vectorized_subject_to_4d(): # check equality if the values were masked initially if mask[x, y, z]: assert np.allclose( - mock_subjects[0][time, x, y, l], - recovered[time, x, y, z], + mock_subjects[0][time, x, y, z], recovered[time, x, y, z], ) # otherwise, make sure all other values are 0 else: From 081261b556c8fca038f3de8984d560837c4c29fb Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 26 Jul 2022 14:56:31 -0400 Subject: [PATCH 12/23] [FIX] fixed versioneer/sphinx interaction - Fixed Versioneer import so that it correctly fetches the current plspy version --- build.py | 2 +- devtools/conda-envs/docs_env.yaml | 2 - docs/_build/doctrees/environment.pickle | Bin 42612 -> 42386 bytes docs/_build/doctrees/index.doctree | Bin 16800 -> 17876 bytes docs/_build/doctrees/modules.doctree | Bin 2578 -> 2661 bytes docs/_build/doctrees/plspy.doctree | Bin 331571 -> 329528 bytes docs/_build/html/.buildinfo | 2 +- .../_sphinx_javascript_frameworks_compat.js | 134 + docs/_build/html/_static/basic.css | 54 +- docs/_build/html/_static/doctools.js | 450 +- .../html/_static/documentation_options.js | 8 +- docs/_build/html/_static/jquery-3.5.1.js | 20712 ++++++++-------- docs/_build/html/_static/jquery-3.6.0.js | 10881 ++++++++ docs/_build/html/_static/jquery.js | 4 +- docs/_build/html/_static/language_data.js | 100 +- docs/_build/html/_static/searchtools.js | 788 +- docs/_build/html/genindex.html | 3 +- docs/_build/html/index.html | 28 +- docs/_build/html/modules.html | 12 +- docs/_build/html/plspy.html | 298 +- docs/_build/html/py-modindex.html | 3 +- docs/_build/html/search.html | 3 +- docs/_build/html/searchindex.js | 2 +- docs/conf.py | 9 +- plsenv.yml | 175 - versioneer.py | 308 +- 26 files changed, 22157 insertions(+), 11821 deletions(-) create mode 100644 docs/_build/html/_static/_sphinx_javascript_frameworks_compat.js create mode 100644 docs/_build/html/_static/jquery-3.6.0.js delete mode 100644 plsenv.yml diff --git a/build.py b/build.py index 77b9531..db84cbb 100644 --- a/build.py +++ b/build.py @@ -1,4 +1,4 @@ -from pybuilder.core import use_plugin, init, Author +from pybuilder.core import Author, init, use_plugin use_plugin("python.core") use_plugin("python.unittest") diff --git a/devtools/conda-envs/docs_env.yaml b/devtools/conda-envs/docs_env.yaml index a794851..2146247 100644 --- a/devtools/conda-envs/docs_env.yaml +++ b/devtools/conda-envs/docs_env.yaml @@ -1,12 +1,10 @@ name: docs channels: - - conda-forge - defaults dependencies: - - python=3.9 - sphinx - sphinx_rtd_theme diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle index f6ff04968ed3518db3402fbb2ee5c5fc7081c430..d7cb4c1165e5fe9d02cedd63f6e7a520f53a122c 100644 GIT binary patch literal 42386 zcmcg#d5j!aT6cWR=^4+A?4akZ7y*yTCuPK!Lot{X_pnS2m}%c#A+qbN+1LX#C-_~34Y%@s_J#W z?yj!!#DBP_-|>Cl``-7y@Atmx;Hk&s}xuop?sbD!-3C%_|b&CcW#H?>jYc zc(W7l3al_Jl^)bhE;{?cQLJX;>oJlUiY24jk3$fjvhPqKuSnQo02gjUsdy{1=Rf1q^1X?bqxS>FsSzjVoUpsK(LA=enj zV|x&JVFfctEnasl|Hyf-9$Apnw=j+Xf8Boc{>Tl@dflp(A30X8pLozb_K3M!#yk?4 z+0bgWn`USQM%xT+XgZ!UlCq8&&sl5LW>mANI<$N-8DrcwFyf1L)T#vKS_OZX&s{Js zgq~0Op0dMMQ)u5l7|*e8VJ#SFJC zl+If1sA5!uz*vQOlhwzwY(A8t8CKNDG@1##$gf&P5Us8{Ygh|aui1pbvo#q{zv$N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n^;-Ibc_OJdtuAnv|I;-PCJH^mzKZ zc4TE~ss4UVOG}rU(aF`<>pNPqy2!61+sF5}v_y3q*M3C%L;zn)xU95&;y|D!s#_ra zq%A~)c*`UUF=1Uxvh3{{U1WGuOHmh2b>l8%r9Q4DSJv3oDDib$qNT=)Z`=|sHDbJ@ zrB&8cv~lB`wnS1JJ-$UtvaG4-V#vE%ie(q{fJpLbEn!{SOlO1oc=8=unzQ^+Udp04 z`|m=J?3zLBeh9X_N(@*>{^if1#10qgpAxRq^$N2dur)w zLst98J+*X~A*=nPbE}p#@`0M)_RvNTDhO05mCMSzv-|4ga6*?zTK_8LqA3DH@F;-dSfa5h96Y_ z9yD9*>6=V*lc@Bk{`nmBvCuMuy4`hu6ovgr?!L$xRbHf@N!Q8y|8f)+A>E%~WRtxw zZs0w%UPY1Z9lS*xKgf+ADNbjdO|_Wsx4Z7=(A)h%MgreRL?I`>5oJOC?JiS#vJ1cZ zjaP}|?c{MX=CmO#-g~-RXf2K$O!}T@ot8yE|NXM(y#9<+kN6Klf2xa@rZ-yr=b7DK z1nFev8ULEs^34YI2zj$)!4I6K!4r I!MIlaZ=(RiSO5S3 diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree index 6f57f5d76f6643285ae995099e8c224122f86655..d96d115bceba64f11473ac64ea253ed9182faac8 100644 GIT binary patch delta 4779 zcmb_gZ)_W98LyMri7!bVr->6cv2$^}#Lgc(aoZ$I)24rxC~Fh9X*(3POOvyG$=%KN zrS^GUg+{w|ZP(46HlFJML17i3u>nHWKuB%HHt_*yw=t;!R0aq>09yrxNg$*Fg6H++ z&c2HszR(Zp>ABzYdw$Pz&-=XZ>sQX2R-QMR&zLX&Wc-@BwX7y zfvIe_1vv-TtC%<++P+yXdB*a#>|}ASk&122{{5y*gzND?B|j@qzA)8>)G4=2+SFJ&Z_UKCSQn9Zcbbd+b4QI=+sF*;|E z*eI72LFc zYs}f*@R!O7@L0p>c2)1Da#QH`Wta)k<}c+4PH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CJ2S!yA2UVbqi} zPSL_Hg&Ei3^dOpYR^^xy>G$dG(yRTR{F_#6r!Vw-b?x-G{mv@6a$ZQp6EWd4S^7@D z!;BLXNP0m+I|lAE?ch@Wax9%zr)*3Kr(?-zR{SHq(U+kAhsvM^g4vw4~~-``G6v?z^umkNWP(cHE`JjM_>vWQ*yqV{jz+EZYaD;JZo z&0Kys=y35|B0v<6F~2xS|2^2Drg!pv(_2J(y`ADXxC&I*Q!hxFZJg$cQf9VUCFRGq zPPt%q$<;%s>d+~EraQH{!OG>mf&kuIjht0e4I}4J4}87q@BHD7J?ho>FVA(QJXHlx zpIYu8@hHVmNsCJ11oO3`QZU=HQi{gXrNExp>649-%)){oWo2D=ma#Uol=D5s`7qA=XLW&F{}_IyOxHz!I^w0>qwQ`tk));cP%wD*?AgH5If*0_ zfn;hv7!%F}mxQG>jgEee-W%zrWn(w27GW_W#7@Q+!}CHqdzC&v_Jdg?A`x~i$wn!hninLxrf<AmZg%6RN#8iZ1ILPsCjH-O##H};KJ z^2IP`U@Ni$8(|!k*!NaCw%_Xx%jFC4gpi#WV-^1d6W5$f=x6u$)SF{MG?@xZ@nj-9 K%?3{<68JCKdL(oJ diff --git a/docs/_build/doctrees/modules.doctree b/docs/_build/doctrees/modules.doctree index 09e3d850c4ae646bb2e8d5c6b8de5d4330e9e8ea..f25704896a5669a5ea4dfe0c021e66bae8ef1572 100644 GIT binary patch delta 552 zcmZ9IL2DE-7={^lcecA#w6tssww1O@)lN6igOmlO;IY_)heE|=$!5~|1~W-INho_L z_2NOurA<7l|G-NR-n{6|-{Dd8Czx4^TYC5i`N;FUFFBw4HCKPz`0(ni{$<|A5|@-~ z4>PtkNCh!Pbvyfh^kflguw)YiqM(Qi42KLUaj1_2fFx6Lgu;7;3XvK{Rku{Zvg}Co ztaIn!Y!%0h@ul3FD5HXU`1je}!#~>jmgCf3g@C>FBSy*4^uPbzuRtma2!4 zq*8U|NQ2;AQD*K_{MlvAkDXh2fwKS$oaQ|9wjNw>yqlf+ws-*h%C3xZpj}2 delta 469 zcmZ9HPfJ2U6vdg;XNpjgw8_HCLbTpci-;E0u7%)EXd^ND2Cvb3GtJCPT=WN81#e?B zEu#+*v~l06P4qQt-6sf|BvM)&E*v<&bM8m(HW$B2+$H<*rz|93CUQ6tG*AYzfcmee z7(op3(Fz9UQyee?xZP2hpGe-r9&1VLGcP=$(iPH%<~2vVvkT{@1cioyC99&Zzx^X)IHa*ZM5HYuHbPV<{?8cij2y{A(V_+_wti5IeIj%*$R#!rs^|k} zSwA|9g#swW1?P`*|j8 Fy5B(MqqYD5 diff --git a/docs/_build/doctrees/plspy.doctree b/docs/_build/doctrees/plspy.doctree index b5c1d5fc86796b0f4c2949026a9bdcec976f4aea..d760800275c301f1ecacad3c5f431232d14e45b2 100644 GIT binary patch literal 329528 zcmeFa37lNTbuKOmEu#TRtYVP`R|2e-JTqEA2nHk;A#4l?43ZcOc+@l9Qun2&d+6?w z5EvqCW5DjL3)!5>;63yEF}i(kRh?7kocc~Jr>YLldvNxw*|X@s){@3#sa(BnC|@X4YlUKCy46>x zjZaM!tIg>LrdQuRedlzpwXmMw->6O1$BWagSx7NnDpv~iVs-lF>DFRO-Yi!dLn8lz zMsd7Zu2rM#rFo_Kr3E)n=SmA(^P1&mrKo*sEt;$}CJzLY`SDxwdyCVQ5b5UbDBea4 z*q`s2<{ZtR%!7V&x^zry;b_Eg>4?^R!RPkY+)BAxoZdb)mT&dvo6UN8Y^sU+QGJdm z7aGL-g7Hee(ZEYQ&#UGq_)}kDYEu0e17r2#9!fLSTF}hzrBBnPC8cGhqe?F-9Z_1| zTC=uPn<%cW*7Bu2m9>r9p5}gVx0Y3GEtqTY$Dw)y44-<%oT;(WkzBG$G)K!9ttD60 z3R9J0FkY)RQN;!q$~kawEtG*W~NXa=sE=SjV^~UV<_IWh)YD62fhLWGttExx9%^k6!f2%o*pjY50oKCS z@m8YIaaw}?qv~%-@-B~Z`4l@k4#NL?G-195!hC(y_%7Mo*jMPkd}6X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FbaN5!DAGBa|FS6 zDahs#__PE6j=*Q) zV|(>9RbNxas$(|5`w0NePkk|%*fmjI5S&B7ZDG0 zL6{^P-Bm2;88;sFSnEd}d#)jIuF91sI>wOCJLohK{xn;bd~-x~4yIb=AM-G6nJHn0 zQjQZyU{`!wIez;XCR8!Ag<%3FxzwU4-Se;e-t5HxwdI-hJot7`Jl%0WvMM|7GdFM9 za>W*!Etj7;cB)R;1vC>R`s^cD2)rBF39x$>{FMd^jQV?w*qWm*qt=tF9-}9iqgJZU X(?9bGzYaM)fT8(hKgpih)%*Vel2&30 diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo index a006dc8..72d2925 100644 --- a/docs/_build/html/.buildinfo +++ b/docs/_build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 0b9c2597d631133e36a9ce51e5b8d2f7 +config: 2f8cdf47662c76cb66b22e320160bda8 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/html/_static/_sphinx_javascript_frameworks_compat.js b/docs/_build/html/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 0000000..8549469 --- /dev/null +++ b/docs/_build/html/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,134 @@ +/* + * _sphinx_javascript_frameworks_compat.js + * ~~~~~~~~~~ + * + * Compatability shim for jQuery and underscores.js. + * + * WILL BE REMOVED IN Sphinx 6.0 + * xref RemovedInSphinx60Warning + * + */ + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} diff --git a/docs/_build/html/_static/basic.css b/docs/_build/html/_static/basic.css index bf18350..0889677 100644 --- a/docs/_build/html/_static/basic.css +++ b/docs/_build/html/_static/basic.css @@ -222,7 +222,7 @@ table.modindextable td { /* -- general body styles --------------------------------------------------- */ div.body { - min-width: 450px; + min-width: 360px; max-width: 800px; } @@ -237,16 +237,6 @@ a.headerlink { visibility: hidden; } -a.brackets:before, -span.brackets > a:before{ - content: "["; -} - -a.brackets:after, -span.brackets > a:after { - content: "]"; -} - h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, @@ -334,12 +324,16 @@ aside.sidebar { p.sidebar-title { font-weight: bold; } +nav.contents, +aside.topic, div.admonition, div.topic, blockquote { clear: left; } /* -- topics ---------------------------------------------------------------- */ +nav.contents, +aside.topic, div.topic { border: 1px solid #ccc; @@ -379,6 +373,9 @@ div.body p.centered { div.sidebar > :last-child, aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, + div.topic > :last-child, div.admonition > :last-child { margin-bottom: 0; @@ -386,6 +383,9 @@ div.admonition > :last-child { div.sidebar::after, aside.sidebar::after, +nav.contents::after, +aside.topic::after, + div.topic::after, div.admonition::after, blockquote::after { @@ -428,10 +428,6 @@ table.docutils td, table.docutils th { border-bottom: 1px solid #aaa; } -table.footnote td, table.footnote th { - border: 0 !important; -} - th { text-align: left; padding-right: 5px; @@ -615,6 +611,7 @@ ul.simple p { margin-bottom: 0; } +/* Docutils 0.17 and older (footnotes & citations) */ dl.footnote > dt, dl.citation > dt { float: left; @@ -632,6 +629,33 @@ dl.citation > dd:after { clear: both; } +/* Docutils 0.18+ (footnotes & citations) */ +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +/* Footnotes & citations ends */ + dl.field-list { display: grid; grid-template-columns: fit-content(30%) auto; diff --git a/docs/_build/html/_static/doctools.js b/docs/_build/html/_static/doctools.js index e509e48..c3db08d 100644 --- a/docs/_build/html/_static/doctools.js +++ b/docs/_build/html/_static/doctools.js @@ -2,325 +2,263 @@ * doctools.js * ~~~~~~~~~~~ * - * Sphinx JavaScript utilities for all documentation. + * Base JavaScript utilities for all Sphinx HTML documentation. * * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ +"use strict"; -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - * - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL - */ -jQuery.urldecode = function(x) { - if (!x) { - return x +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); } - return decodeURIComponent(x.replace(/\+/g, ' ')); }; /** - * small helper function to urlencode strings + * highlight a given string on a node by wrapping it in + * span elements with the given class name. */ -jQuery.urlencode = encodeURIComponent; +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; -/** - * This function returns the parsed url parameters of the - * current request. Multiple values per key are supported, - * it will always return arrays of strings for the value parts. - */ -jQuery.getQueryParameters = function(s) { - if (typeof s === 'undefined') - s = document.location.search; - var parts = s.substr(s.indexOf('?') + 1).split('&'); - var result = {}; - for (var i = 0; i < parts.length; i++) { - var tmp = parts[i].split('=', 2); - var key = jQuery.urldecode(tmp[0]); - var value = jQuery.urldecode(tmp[1]); - if (key in result) - result[key].push(value); - else - result[key] = [value]; - } - return result; -}; + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } -/** - * highlight a given string on a jquery object by wrapping it in - * span elements with the given class name. - */ -jQuery.fn.highlightText = function(text, className) { - function highlight(node, addItems) { - if (node.nodeType === 3) { - var val = node.nodeValue; - var pos = val.toLowerCase().indexOf(text); - if (pos >= 0 && - !jQuery(node.parentNode).hasClass(className) && - !jQuery(node.parentNode).hasClass("nohighlight")) { - var span; - var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); - if (isInSVG) { - span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - } else { - span = document.createElement("span"); - span.className = className; - } - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - node.parentNode.insertBefore(span, node.parentNode.insertBefore( + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + parent.insertBefore( + span, + parent.insertBefore( document.createTextNode(val.substr(pos + text.length)), - node.nextSibling)); - node.nodeValue = val.substr(0, pos); - if (isInSVG) { - var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); - var bbox = node.parentElement.getBBox(); - rect.x.baseVal.value = bbox.x; - rect.y.baseVal.value = bbox.y; - rect.width.baseVal.value = bbox.width; - rect.height.baseVal.value = bbox.height; - rect.setAttribute('class', className); - addItems.push({ - "parent": node.parentNode, - "target": rect}); - } + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); } } - else if (!jQuery(node).is("button, select, textarea")) { - jQuery.each(node.childNodes, function() { - highlight(this, addItems); - }); - } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); } - var addItems = []; - var result = this.each(function() { - highlight(this, addItems); - }); - for (var i = 0; i < addItems.length; ++i) { - jQuery(addItems[i].parent).before(addItems[i].target); - } - return result; }; - -/* - * backward compatibility for jQuery.browser - * This will be supported until firefox bug is fixed. - */ -if (!jQuery.browser) { - jQuery.uaMatch = function(ua) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || - /(webkit)[ \/]([\w.]+)/.exec(ua) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || - /(msie) ([\w.]+)/.exec(ua) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; - }; - jQuery.browser = {}; - jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; -} +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; /** * Small JavaScript module for the documentation. */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { - this.initOnKeyListeners(); - } +const Documentation = { + init: () => { + Documentation.highlightSearchWords(); + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); }, /** * i18n support */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, - LOCALE : 'unknown', + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", // gettext and ngettext don't access this so that the functions // can safely bound to a different name (_ = Documentation.gettext) - gettext : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated === 'undefined') - return string; - return (typeof translated === 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated === 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } }, - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; }, - /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; }, /** * highlight the search words provided in the url in the text */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); - } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('

') - .appendTo($('#searchbox')); - } - }, + highlightSearchWords: () => { + const highlight = + new URLSearchParams(window.location.search).get("highlight") || ""; + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) === 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); }, /** * helper function to hide the search marks again */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - var url = new URL(window.location); - url.searchParams.delete('highlight'); - window.history.replaceState({}, '', url); + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + const url = new URL(window.location); + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); }, /** - * make the url absolute + * helper function to focus on search bar */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); }, /** - * get the current relative url + * Initialise the domain index toggle buttons */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this === '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); }, - initOnKeyListeners: function() { - $(document).keydown(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box, textarea, dropdown or button - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' - && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey - && !event.shiftKey) { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + const blacklistedElements = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", + ]); + document.addEventListener("keydown", (event) => { + if (blacklistedElements.has(document.activeElement.tagName)) return; // bail for input elements + if (event.altKey || event.ctrlKey || event.metaKey) return; // bail with special keys + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); } break; - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); } break; + case "Escape": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.hideSearchWords(); + event.preventDefault(); } } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } }); - } + }, }; // quick alias for translations -_ = Documentation.gettext; +const _ = Documentation.gettext; -$(document).ready(function() { - Documentation.init(); -}); +_ready(Documentation.init); diff --git a/docs/_build/html/_static/documentation_options.js b/docs/_build/html/_static/documentation_options.js index 644d3a4..121f621 100644 --- a/docs/_build/html/_static/documentation_options.js +++ b/docs/_build/html/_static/documentation_options.js @@ -1,12 +1,14 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '0+untagged.53.g1437bad.dirty', - LANGUAGE: 'None', + VERSION: '0+untagged.72.g61a27af.dirty', + LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', FILE_SUFFIX: '.html', LINK_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt', - NAVIGATION_WITH_KEYS: false + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: false, }; \ No newline at end of file diff --git a/docs/_build/html/_static/jquery-3.5.1.js b/docs/_build/html/_static/jquery-3.5.1.js index 5093733..9784e08 100644 --- a/docs/_build/html/_static/jquery-3.5.1.js +++ b/docs/_build/html/_static/jquery-3.5.1.js @@ -11,512 +11,493 @@ * * Date: 2020-05-04T22:49Z */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } +(function (global, factory) { + 'use strict' + + if (typeof module === 'object' && typeof module.exports === 'object') { + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document + ? factory(global, true) + : function (w) { + if (!w.document) { + throw new Error('jQuery requires a window with a document') + } + return factory(w) + } + } else { + factory(global) + } // Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - +})(typeof window !== 'undefined' ? window : this, function (window, noGlobal) { // Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var flat = arr.flat ? function( array ) { - return arr.flat.call( array ); -} : function( array ) { - return arr.concat.apply( [], array ); -}; - - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - -var isFunction = function isFunction( obj ) { - - // Support: Chrome <=57, Firefox <=52 - // In some browsers, typeof returns "function" for HTML elements - // (i.e., `typeof document.createElement( "object" ) === "function"`). - // We don't want to classify *any* DOM node as a function. - return typeof obj === "function" && typeof obj.nodeType !== "number"; - }; - - -var isWindow = function isWindow( obj ) { - return obj != null && obj === obj.window; - }; - - -var document = window.document; - - - - var preservedScriptAttributes = { - type: true, - src: true, - nonce: true, - noModule: true - }; - - function DOMEval( code, node, doc ) { - doc = doc || document; - - var i, val, - script = doc.createElement( "script" ); - - script.text = code; - if ( node ) { - for ( i in preservedScriptAttributes ) { - - // Support: Firefox 64+, Edge 18+ - // Some browsers don't support the "nonce" property on scripts. - // On the other hand, just using `getAttribute` is not enough as - // the `nonce` attribute is reset to an empty string whenever it - // becomes browsing-context connected. - // See https://github.com/whatwg/html/issues/2369 - // See https://html.spec.whatwg.org/#nonce-attributes - // The `node.getAttribute` check was added for the sake of - // `jQuery.globalEval` so that it can fake a nonce-containing node - // via an object. - val = node[ i ] || node.getAttribute && node.getAttribute( i ); - if ( val ) { - script.setAttribute( i, val ); - } - } - } - doc.head.appendChild( script ).parentNode.removeChild( script ); - } - - -function toType( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; -} -/* global Symbol */ -// Defining this global in .eslintrc.json would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.5.1", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - - // Return all the elements in a clean array - if ( num == null ) { - return slice.call( this ); - } - - // Return just the one element from the set - return num < 0 ? this[ num + this.length ] : this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - even: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return ( i + 1 ) % 2; - } ) ); - }, - - odd: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return i % 2; - } ) ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - copy = options[ name ]; - - // Prevent Object.prototype pollution - // Prevent never-ending loop - if ( name === "__proto__" || target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = Array.isArray( copy ) ) ) ) { - src = target[ name ]; - - // Ensure proper type for the source value - if ( copyIsArray && !Array.isArray( src ) ) { - clone = []; - } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { - clone = {}; - } else { - clone = src; - } - copyIsArray = false; - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - // Evaluates a script in a provided context; falls back to the global one - // if not specified. - globalEval: function( code, options, doc ) { - DOMEval( code, { nonce: options && options.nonce }, doc ); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return flat( ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( _i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = toType( obj ); - - if ( isFunction( obj ) || isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = + // throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode + // arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common + // enough that all such attempts are guarded in a try block. + 'use strict' + + var arr = [] + + var getProto = Object.getPrototypeOf + + var slice = arr.slice + + var flat = arr.flat ? function (array) { + return arr.flat.call(array) + } : function (array) { + return arr.concat.apply([], array) + } + + var push = arr.push + + var indexOf = arr.indexOf + + var class2type = {} + + var toString = class2type.toString + + var hasOwn = class2type.hasOwnProperty + + var fnToString = hasOwn.toString + + var ObjectFunctionString = fnToString.call(Object) + + var support = {} + + var isFunction = function isFunction (obj) { + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + return typeof obj === 'function' && typeof obj.nodeType !== 'number' + } + + var isWindow = function isWindow (obj) { + return obj != null && obj === obj.window + } + + var document = window.document + + var preservedScriptAttributes = { + type: true, + src: true, + nonce: true, + noModule: true + } + + function DOMEval (code, node, doc) { + doc = doc || document + + var i; var val + var script = doc.createElement('script') + + script.text = code + if (node) { + for (i in preservedScriptAttributes) { + // Support: Firefox 64+, Edge 18+ + // Some browsers don't support the "nonce" property on scripts. + // On the other hand, just using `getAttribute` is not enough as + // the `nonce` attribute is reset to an empty string whenever it + // becomes browsing-context connected. + // See https://github.com/whatwg/html/issues/2369 + // See https://html.spec.whatwg.org/#nonce-attributes + // The `node.getAttribute` check was added for the sake of + // `jQuery.globalEval` so that it can fake a nonce-containing node + // via an object. + val = node[i] || node.getAttribute && node.getAttribute(i) + if (val) { + script.setAttribute(i, val) + } + } + } + doc.head.appendChild(script).parentNode.removeChild(script) + } + + function toType (obj) { + if (obj == null) { + return obj + '' + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === 'object' || typeof obj === 'function' + ? class2type[toString.call(obj)] || 'object' + : typeof obj + } + /* global Symbol */ + // Defining this global in .eslintrc.json would create a danger of using the global + // unguarded in another place, it seems safer to define global only for this module + + var + version = '3.5.1' + + // Define a local copy of jQuery + var jQuery = function (selector, context) { + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init(selector, context) + } + + jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function () { + return slice.call(this) + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function (num) { + // Return all the elements in a clean array + if (num == null) { + return slice.call(this) + } + + // Return just the one element from the set + return num < 0 ? this[num + this.length] : this[num] + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function (elems) { + // Build a new jQuery matched element set + var ret = jQuery.merge(this.constructor(), elems) + + // Add the old object onto the stack (as a reference) + ret.prevObject = this + + // Return the newly-formed element set + return ret + }, + + // Execute a callback for every element in the matched set. + each: function (callback) { + return jQuery.each(this, callback) + }, + + map: function (callback) { + return this.pushStack(jQuery.map(this, function (elem, i) { + return callback.call(elem, i, elem) + })) + }, + + slice: function () { + return this.pushStack(slice.apply(this, arguments)) + }, + + first: function () { + return this.eq(0) + }, + + last: function () { + return this.eq(-1) + }, + + even: function () { + return this.pushStack(jQuery.grep(this, function (_elem, i) { + return (i + 1) % 2 + })) + }, + + odd: function () { + return this.pushStack(jQuery.grep(this, function (_elem, i) { + return i % 2 + })) + }, + + eq: function (i) { + var len = this.length + var j = +i + (i < 0 ? len : 0) + return this.pushStack(j >= 0 && j < len ? [this[j]] : []) + }, + + end: function () { + return this.prevObject || this.constructor() + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice + } + + jQuery.extend = jQuery.fn.extend = function () { + var options; var name; var src; var copy; var copyIsArray; var clone + var target = arguments[0] || {} + var i = 1 + var length = arguments.length + var deep = false + + // Handle a deep copy situation + if (typeof target === 'boolean') { + deep = target + + // Skip the boolean and the target + target = arguments[i] || {} + i++ + } + + // Handle case when target is a string or something (possible in deep copy) + if (typeof target !== 'object' && !isFunction(target)) { + target = {} + } + + // Extend jQuery itself if only one argument is passed + if (i === length) { + target = this + i-- + } + + for (; i < length; i++) { + // Only deal with non-null/undefined values + if ((options = arguments[i]) != null) { + // Extend the base object + for (name in options) { + copy = options[name] + + // Prevent Object.prototype pollution + // Prevent never-ending loop + if (name === '__proto__' || target === copy) { + continue + } + + // Recurse if we're merging plain objects or arrays + if (deep && copy && (jQuery.isPlainObject(copy) || + (copyIsArray = Array.isArray(copy)))) { + src = target[name] + + // Ensure proper type for the source value + if (copyIsArray && !Array.isArray(src)) { + clone = [] + } else if (!copyIsArray && !jQuery.isPlainObject(src)) { + clone = {} + } else { + clone = src + } + copyIsArray = false + + // Never move original objects, clone them + target[name] = jQuery.extend(deep, clone, copy) + + // Don't bring in undefined values + } else if (copy !== undefined) { + target[name] = copy + } + } + } + } + + // Return the modified object + return target + } + + jQuery.extend({ + + // Unique for each copy of jQuery on the page + expando: 'jQuery' + (version + Math.random()).replace(/\D/g, ''), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function (msg) { + throw new Error(msg) + }, + + noop: function () {}, + + isPlainObject: function (obj) { + var proto, Ctor + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if (!obj || toString.call(obj) !== '[object Object]') { + return false + } + + proto = getProto(obj) + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if (!proto) { + return true + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call(proto, 'constructor') && proto.constructor + return typeof Ctor === 'function' && fnToString.call(Ctor) === ObjectFunctionString + }, + + isEmptyObject: function (obj) { + var name + + for (name in obj) { + return false + } + return true + }, + + // Evaluates a script in a provided context; falls back to the global one + // if not specified. + globalEval: function (code, options, doc) { + DOMEval(code, { nonce: options && options.nonce }, doc) + }, + + each: function (obj, callback) { + var length; var i = 0 + + if (isArrayLike(obj)) { + length = obj.length + for (; i < length; i++) { + if (callback.call(obj[i], i, obj[i]) === false) { + break + } + } + } else { + for (i in obj) { + if (callback.call(obj[i], i, obj[i]) === false) { + break + } + } + } + + return obj + }, + + // results is for internal usage only + makeArray: function (arr, results) { + var ret = results || [] + + if (arr != null) { + if (isArrayLike(Object(arr))) { + jQuery.merge(ret, + typeof arr === 'string' + ? [arr] : arr + ) + } else { + push.call(ret, arr) + } + } + + return ret + }, + + inArray: function (elem, arr, i) { + return arr == null ? -1 : indexOf.call(arr, elem, i) + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function (first, second) { + var len = +second.length + var j = 0 + var i = first.length + + for (; j < len; j++) { + first[i++] = second[j] + } + + first.length = i + + return first + }, + + grep: function (elems, callback, invert) { + var callbackInverse + var matches = [] + var i = 0 + var length = elems.length + var callbackExpect = !invert + + // Go through the array, only saving the items + // that pass the validator function + for (; i < length; i++) { + callbackInverse = !callback(elems[i], i) + if (callbackInverse !== callbackExpect) { + matches.push(elems[i]) + } + } + + return matches + }, + + // arg is for internal usage only + map: function (elems, callback, arg) { + var length; var value + var i = 0 + var ret = [] + + // Go through the array, translating each of the items to their new values + if (isArrayLike(elems)) { + length = elems.length + for (; i < length; i++) { + value = callback(elems[i], i, arg) + + if (value != null) { + ret.push(value) + } + } + + // Go through every key on the object, + } else { + for (i in elems) { + value = callback(elems[i], i, arg) + + if (value != null) { + ret.push(value) + } + } + } + + // Flatten any nested arrays + return flat(ret) + }, + + // A global GUID counter for objects + guid: 1, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support + }) + + if (typeof Symbol === 'function') { + jQuery.fn[Symbol.iterator] = arr[Symbol.iterator] + } + + // Populate the class2type map + jQuery.each('Boolean Number String Function Array Date RegExp Object Error Symbol'.split(' '), + function (_i, name) { + class2type['[object ' + name + ']'] = name.toLowerCase() + }) + + function isArrayLike (obj) { + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && 'length' in obj && obj.length + var type = toType(obj) + + if (isFunction(obj) || isWindow(obj)) { + return false + } + + return type === 'array' || length === 0 || + typeof length === 'number' && length > 0 && (length - 1) in obj + } + var Sizzle = /*! * Sizzle CSS Selector Engine v2.3.5 * https://sizzlejs.com/ @@ -527,1267 +508,1222 @@ var Sizzle = * * Date: 2020-03-14 */ -( function( window ) { -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - nonnativeSelectorCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ( {} ).hasOwnProperty, - arr = [], - pop = arr.pop, - pushNative = arr.push, - push = arr.push, - slice = arr.slice, - - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[ i ] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + - "ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram - identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + - "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + +(function (window) { + var i + var support + var Expr + var getText + var isXML + var tokenize + var compile + var select + var outermostContext + var sortInput + var hasDuplicate + + // Local document vars + var setDocument + var document + var docElem + var documentIsHTML + var rbuggyQSA + var rbuggyMatches + var matches + var contains + + // Instance-specific data + var expando = 'sizzle' + 1 * new Date() + var preferredDoc = window.document + var dirruns = 0 + var done = 0 + var classCache = createCache() + var tokenCache = createCache() + var compilerCache = createCache() + var nonnativeSelectorCache = createCache() + var sortOrder = function (a, b) { + if (a === b) { + hasDuplicate = true + } + return 0 + } + + // Instance methods + var hasOwn = ({}).hasOwnProperty + var arr = [] + var pop = arr.pop + var pushNative = arr.push + var push = arr.push + var slice = arr.slice + + // Use a stripped-down indexOf as it's faster than native + // https://jsperf.com/thor-indexof-vs-for/5 + var indexOf = function (list, elem) { + var i = 0 + var len = list.length + for (; i < len; i++) { + if (list[i] === elem) { + return i + } + } + return -1 + } + + var booleans = 'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|' + + 'ismap|loop|multiple|open|readonly|required|scoped' + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + var whitespace = '[\\x20\\t\\r\\n\\f]' + + // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram + var identifier = '(?:\\\\[\\da-fA-F]{1,6}' + whitespace + + '?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+' + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + var attributes = '\\[' + whitespace + '*(' + identifier + ')(?:' + whitespace + // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + + '*([*^$|!~]?=)' + whitespace + // "Attribute values must be CSS identifiers [capture 5] // or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + - whitespace + "*\\]", + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + '))|)' + + whitespace + '*\\]' - pseudos = ":(" + identifier + ")(?:\\((" + + var pseudos = ':(' + identifier + ')(?:\\((' + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: // 1. quoted (capture 3; capture 4 or capture 5) "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + '((?:\\\\.|[^\\\\()[\\]]|' + attributes + ')*)|' + // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + - whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + - "*" ), - rdescend = new RegExp( whitespace + "|>" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + - whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + - whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + - "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + - "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rhtml = /HTML$/i, - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), - funescape = function( escape, nonHex ) { - var high = "0x" + escape.slice( 1 ) - 0x10000; - - return nonHex ? - - // Strip the backslash prefix from a non-hex escape sequence - nonHex : - - // Replace a hexadecimal escape sequence with the encoded Unicode code point - // Support: IE <=11+ - // For values outside the Basic Multilingual Plane (BMP), manually construct a - // surrogate pair - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + - ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - inDisabledFieldset = addCombinator( - function( elem ) { - return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - ( arr = slice.call( preferredDoc.childNodes ) ), - preferredDoc.childNodes - ); - - // Support: Android<4.0 - // Detect silently failing push.apply - // eslint-disable-next-line no-unused-expressions - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - pushNative.apply( target, slice.call( els ) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - - // Can't trust NodeList.length - while ( ( target[ j++ ] = els[ i++ ] ) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - setDocument( context ); - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { - - // ID selector - if ( ( m = match[ 1 ] ) ) { - - // Document context - if ( nodeType === 9 ) { - if ( ( elem = context.getElementById( m ) ) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && ( elem = newContext.getElementById( m ) ) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[ 2 ] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !nonnativeSelectorCache[ selector + " " ] && - ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && + '.*' + + ')\\)|)' + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + var rwhitespace = new RegExp(whitespace + '+', 'g') + var rtrim = new RegExp('^' + whitespace + '+|((?:^|[^\\\\])(?:\\\\.)*)' + + whitespace + '+$', 'g') + + var rcomma = new RegExp('^' + whitespace + '*,' + whitespace + '*') + var rcombinators = new RegExp('^' + whitespace + '*([>+~]|' + whitespace + ')' + whitespace + + '*') + var rdescend = new RegExp(whitespace + '|>') + + var rpseudo = new RegExp(pseudos) + var ridentifier = new RegExp('^' + identifier + '$') + + var matchExpr = { + ID: new RegExp('^#(' + identifier + ')'), + CLASS: new RegExp('^\\.(' + identifier + ')'), + TAG: new RegExp('^(' + identifier + '|[*])'), + ATTR: new RegExp('^' + attributes), + PSEUDO: new RegExp('^' + pseudos), + CHILD: new RegExp('^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' + + whitespace + '*(even|odd|(([+-]|)(\\d*)n|)' + whitespace + '*(?:([+-]|)' + + whitespace + '*(\\d+)|))' + whitespace + '*\\)|)', 'i'), + bool: new RegExp('^(?:' + booleans + ')$', 'i'), + + // For use in libraries implementing .is() + // We use this for POS matching in `select` + needsContext: new RegExp('^' + whitespace + + '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' + whitespace + + '*((?:-\\d)?\\d*)' + whitespace + '*\\)|)(?=[^-]|$)', 'i') + } + + var rhtml = /HTML$/i + var rinputs = /^(?:input|select|textarea|button)$/i + var rheader = /^h\d$/i + + var rnative = /^[^{]+\{\s*\[native \w/ + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + var rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/ + + var rsibling = /[+~]/ + + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + var runescape = new RegExp('\\\\[\\da-fA-F]{1,6}' + whitespace + '?|\\\\([^\\r\\n\\f])', 'g') + var funescape = function (escape, nonHex) { + var high = '0x' + escape.slice(1) - 0x10000 + + return nonHex || (high < 0 + ? String.fromCharCode(high + 0x10000) + : String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00)) + } + + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g + var fcssescape = function (ch, asCodePoint) { + if (asCodePoint) { + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if (ch === '\0') { + return '\uFFFD' + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice(0, -1) + '\\' + + ch.charCodeAt(ch.length - 1).toString(16) + ' ' + } + + // Other potentially-special ASCII characters get backslash-escaped + return '\\' + ch + } + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + var unloadHandler = function () { + setDocument() + } + + var inDisabledFieldset = addCombinator( + function (elem) { + return elem.disabled === true && elem.nodeName.toLowerCase() === 'fieldset' + }, + { dir: 'parentNode', next: 'legend' } + ) + + // Optimize for push.apply( _, NodeList ) + try { + push.apply( + (arr = slice.call(preferredDoc.childNodes)), + preferredDoc.childNodes + ) + + // Support: Android<4.0 + // Detect silently failing push.apply + // eslint-disable-next-line no-unused-expressions + arr[preferredDoc.childNodes.length].nodeType + } catch (e) { + push = { + apply: arr.length + + // Leverage slice if possible + ? function (target, els) { + pushNative.apply(target, slice.call(els)) + } + + // Support: IE<9 + // Otherwise append directly + : function (target, els) { + var j = target.length + var i = 0 + + // Can't trust NodeList.length + while ((target[j++] = els[i++])) {} + target.length = j - 1 + } + } + } + + function Sizzle (selector, context, results, seed) { + var m; var i; var elem; var nid; var match; var groups; var newSelector + var newContext = context && context.ownerDocument + + // nodeType defaults to 9, since context defaults to document + var nodeType = context ? context.nodeType : 9 + + results = results || [] + + // Return early from calls with invalid selector or context + if (typeof selector !== 'string' || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11) { + return results + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if (!seed) { + setDocument(context) + context = context || document + + if (documentIsHTML) { + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if (nodeType !== 11 && (match = rquickExpr.exec(selector))) { + // ID selector + if ((m = match[1])) { + // Document context + if (nodeType === 9) { + if ((elem = context.getElementById(m))) { + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if (elem.id === m) { + results.push(elem) + return results + } + } else { + return results + } + + // Element context + } else { + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if (newContext && (elem = newContext.getElementById(m)) && + contains(context, elem) && + elem.id === m) { + results.push(elem) + return results + } + } + + // Type selector + } else if (match[2]) { + push.apply(results, context.getElementsByTagName(selector)) + return results + + // Class selector + } else if ((m = match[3]) && support.getElementsByClassName && + context.getElementsByClassName) { + push.apply(results, context.getElementsByClassName(m)) + return results + } + } + + // Take advantage of querySelectorAll + if (support.qsa && + !nonnativeSelectorCache[selector + ' '] && + (!rbuggyQSA || !rbuggyQSA.test(selector)) && // Support: IE 8 only // Exclude object elements - ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { - - newSelector = selector; - newContext = context; - - // qSA considers elements outside a scoping root when evaluating child or - // descendant combinators, which is not what we want. - // In such cases, we work around the behavior by prefixing every selector in the - // list with an ID selector referencing the scope context. - // The technique has to be used as well when a leading combinator is used - // as such selectors are not recognized by querySelectorAll. - // Thanks to Andrew Dupont for this technique. - if ( nodeType === 1 && - ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - - // We can use :scope instead of the ID hack if the browser - // supports it & if we're not changing the context. - if ( newContext !== context || !support.scope ) { - - // Capture the context ID, setting it first if necessary - if ( ( nid = context.getAttribute( "id" ) ) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", ( nid = expando ) ); - } - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + - toSelector( groups[ i ] ); - } - newSelector = groups.join( "," ); - } - - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - nonnativeSelectorCache( selector, true ); - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** + (nodeType !== 1 || context.nodeName.toLowerCase() !== 'object')) { + newSelector = selector + newContext = context + + // qSA considers elements outside a scoping root when evaluating child or + // descendant combinators, which is not what we want. + // In such cases, we work around the behavior by prefixing every selector in the + // list with an ID selector referencing the scope context. + // The technique has to be used as well when a leading combinator is used + // as such selectors are not recognized by querySelectorAll. + // Thanks to Andrew Dupont for this technique. + if (nodeType === 1 && + (rdescend.test(selector) || rcombinators.test(selector))) { + // Expand context for sibling selectors + newContext = rsibling.test(selector) && testContext(context.parentNode) || + context + + // We can use :scope instead of the ID hack if the browser + // supports it & if we're not changing the context. + if (newContext !== context || !support.scope) { + // Capture the context ID, setting it first if necessary + if ((nid = context.getAttribute('id'))) { + nid = nid.replace(rcssescape, fcssescape) + } else { + context.setAttribute('id', (nid = expando)) + } + } + + // Prefix every selector in the list + groups = tokenize(selector) + i = groups.length + while (i--) { + groups[i] = (nid ? '#' + nid : ':scope') + ' ' + + toSelector(groups[i]) + } + newSelector = groups.join(',') + } + + try { + push.apply(results, + newContext.querySelectorAll(newSelector) + ) + return results + } catch (qsaError) { + nonnativeSelectorCache(selector, true) + } finally { + if (nid === expando) { + context.removeAttribute('id') + } + } + } + } + } + + // All others + return select(selector.replace(rtrim, '$1'), context, results, seed) + } + + /** * Create key-value caches of limited size * @returns {function(string, object)} Returns the Object data after storing it on itself with * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) * deleting the oldest entry */ -function createCache() { - var keys = []; - - function cache( key, value ) { - - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return ( cache[ key + " " ] = value ); - } - return cache; -} - -/** + function createCache () { + var keys = [] + + function cache (key, value) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if (keys.push(key + ' ') > Expr.cacheLength) { + // Only keep the most recent entries + delete cache[keys.shift()] + } + return (cache[key + ' '] = value) + } + return cache + } + + /** * Mark a function for special use by Sizzle * @param {Function} fn The function to mark */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} + function markFunction (fn) { + fn[expando] = true + return fn + } -/** + /** * Support testing using an element * @param {Function} fn Passed the created element and returns a boolean result */ -function assert( fn ) { - var el = document.createElement( "fieldset" ); - - try { - return !!fn( el ); - } catch ( e ) { - return false; - } finally { - - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - - // release memory in IE - el = null; - } -} - -/** + function assert (fn) { + var el = document.createElement('fieldset') + + try { + return !!fn(el) + } catch (e) { + return false + } finally { + // Remove from its parent by default + if (el.parentNode) { + el.parentNode.removeChild(el) + } + + // release memory in IE + el = null + } + } + + /** * Adds the same handler for all of the specified attrs * @param {String} attrs Pipe-separated list of attributes * @param {Function} handler The method that will be applied */ -function addHandle( attrs, handler ) { - var arr = attrs.split( "|" ), - i = arr.length; + function addHandle (attrs, handler) { + var arr = attrs.split('|') + var i = arr.length - while ( i-- ) { - Expr.attrHandle[ arr[ i ] ] = handler; - } -} + while (i--) { + Expr.attrHandle[arr[i]] = handler + } + } -/** + /** * Checks document order of two siblings * @param {Element} a * @param {Element} b * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( ( cur = cur.nextSibling ) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** + function siblingCheck (a, b) { + var cur = b && a + var diff = cur && a.nodeType === 1 && b.nodeType === 1 && + a.sourceIndex - b.sourceIndex + + // Use IE sourceIndex if available on both nodes + if (diff) { + return diff + } + + // Check if b follows a + if (cur) { + while ((cur = cur.nextSibling)) { + if (cur === b) { + return -1 + } + } + } + + return a ? 1 : -1 + } + + /** * Returns a function to use in pseudos for input types * @param {String} type */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** + function createInputPseudo (type) { + return function (elem) { + var name = elem.nodeName.toLowerCase() + return name === 'input' && elem.type === type + } + } + + /** * Returns a function to use in pseudos for buttons * @param {String} type */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return ( name === "input" || name === "button" ) && elem.type === type; - }; -} - -/** + function createButtonPseudo (type) { + return function (elem) { + var name = elem.nodeName.toLowerCase() + return (name === 'input' || name === 'button') && elem.type === type + } + } + + /** * Returns a function to use in pseudos for :enabled/:disabled * @param {Boolean} disabled true for :disabled; false for :enabled */ -function createDisabledPseudo( disabled ) { - - // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Only certain elements can match :enabled or :disabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled - if ( "form" in elem ) { - - // Check for inherited disabledness on relevant non-disabled elements: - // * listed form-associated elements in a disabled fieldset - // https://html.spec.whatwg.org/multipage/forms.html#category-listed - // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled - // * option elements in a disabled optgroup - // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled - // All such elements have a "form" property. - if ( elem.parentNode && elem.disabled === false ) { - - // Option elements defer to a parent optgroup if present - if ( "label" in elem ) { - if ( "label" in elem.parentNode ) { - return elem.parentNode.disabled === disabled; - } else { - return elem.disabled === disabled; - } - } - - // Support: IE 6 - 11 - // Use the isDisabled shortcut property to check for disabled fieldset ancestors - return elem.isDisabled === disabled || + function createDisabledPseudo (disabled) { + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function (elem) { + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ('form' in elem) { + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if (elem.parentNode && elem.disabled === false) { + // Option elements defer to a parent optgroup if present + if ('label' in elem) { + if ('label' in elem.parentNode) { + return elem.parentNode.disabled === disabled + } else { + return elem.disabled === disabled + } + } + + // Support: IE 6 - 11 + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || // Where there is no isDisabled, check manually /* jshint -W018 */ elem.isDisabled !== !disabled && - inDisabledFieldset( elem ) === disabled; - } + inDisabledFieldset(elem) === disabled + } - return elem.disabled === disabled; + return elem.disabled === disabled - // Try to winnow out elements that can't be disabled before trusting the disabled property. - // Some victims get caught in our net (label, legend, menu, track), but it shouldn't - // even exist on them, let alone have a boolean value. - } else if ( "label" in elem ) { - return elem.disabled === disabled; - } + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ('label' in elem) { + return elem.disabled === disabled + } - // Remaining elements are neither :enabled nor :disabled - return false; - }; -} + // Remaining elements are neither :enabled nor :disabled + return false + } + } -/** + /** * Returns a function to use in pseudos for positionals * @param {Function} fn */ -function createPositionalPseudo( fn ) { - return markFunction( function( argument ) { - argument = +argument; - return markFunction( function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ ( j = matchIndexes[ i ] ) ] ) { - seed[ j ] = !( matches[ j ] = seed[ j ] ); - } - } - } ); - } ); -} - -/** + function createPositionalPseudo (fn) { + return markFunction(function (argument) { + argument = +argument + return markFunction(function (seed, matches) { + var j + var matchIndexes = fn([], seed.length, argument) + var i = matchIndexes.length + + // Match elements found at the specified indexes + while (i--) { + if (seed[(j = matchIndexes[i])]) { + seed[j] = !(matches[j] = seed[j]) + } + } + }) + }) + } + + /** * Checks a node for validity as a Sizzle context * @param {Element|Object=} context * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} + function testContext (context) { + return context && typeof context.getElementsByTagName !== 'undefined' && context + } -// Expose support vars for convenience -support = Sizzle.support = {}; + // Expose support vars for convenience + support = Sizzle.support = {} -/** + /** * Detects XML nodes * @param {Element|Object} elem An element or a document * @returns {Boolean} True iff elem is a non-HTML XML node */ -isXML = Sizzle.isXML = function( elem ) { - var namespace = elem.namespaceURI, - docElem = ( elem.ownerDocument || elem ).documentElement; + isXML = Sizzle.isXML = function (elem) { + var namespace = elem.namespaceURI + var docElem = (elem.ownerDocument || elem).documentElement - // Support: IE <=8 - // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes - // https://bugs.jquery.com/ticket/4833 - return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); -}; + // Support: IE <=8 + // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes + // https://bugs.jquery.com/ticket/4833 + return !rhtml.test(namespace || docElem && docElem.nodeName || 'HTML') + } -/** + /** * Sets document-related variables once based on the current document * @param {Element|Object} [doc] An element or document object to use to set the document * @returns {Object} Returns the current document */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, subWindow, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9 - 11+, Edge 12 - 18+ - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( preferredDoc != document && - ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { - - // Support: IE 11, Edge - if ( subWindow.addEventListener ) { - subWindow.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( subWindow.attachEvent ) { - subWindow.attachEvent( "onunload", unloadHandler ); - } - } - - // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, - // Safari 4 - 5 only, Opera <=11.6 - 12.x only - // IE/Edge & older browsers don't support the :scope pseudo-class. - // Support: Safari 6.0 only - // Safari 6.0 supports :scope but it's an alias of :root there. - support.scope = assert( function( el ) { - docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); - return typeof el.querySelectorAll !== "undefined" && - !el.querySelectorAll( ":scope fieldset div" ).length; - } ); - - /* Attributes + setDocument = Sizzle.setDocument = function (node) { + var hasCompare; var subWindow + var doc = node ? node.ownerDocument || node : preferredDoc + + // Return early if doc is invalid or already selected + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if (doc == document || doc.nodeType !== 9 || !doc.documentElement) { + return document + } + + // Update global variables + document = doc + docElem = document.documentElement + documentIsHTML = !isXML(document) + + // Support: IE 9 - 11+, Edge 12 - 18+ + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if (preferredDoc != document && + (subWindow = document.defaultView) && subWindow.top !== subWindow) { + // Support: IE 11, Edge + if (subWindow.addEventListener) { + subWindow.addEventListener('unload', unloadHandler, false) + + // Support: IE 9 - 10 only + } else if (subWindow.attachEvent) { + subWindow.attachEvent('onunload', unloadHandler) + } + } + + // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, + // Safari 4 - 5 only, Opera <=11.6 - 12.x only + // IE/Edge & older browsers don't support the :scope pseudo-class. + // Support: Safari 6.0 only + // Safari 6.0 supports :scope but it's an alias of :root there. + support.scope = assert(function (el) { + docElem.appendChild(el).appendChild(document.createElement('div')) + return typeof el.querySelectorAll !== 'undefined' && + !el.querySelectorAll(':scope fieldset div').length + }) + + /* Attributes ---------------------------------------------------------------------- */ - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert( function( el ) { - el.className = "i"; - return !el.getAttribute( "className" ); - } ); + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert(function (el) { + el.className = 'i' + return !el.getAttribute('className') + }) - /* getElement(s)By* + /* getElement(s)By* ---------------------------------------------------------------------- */ - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert( function( el ) { - el.appendChild( document.createComment( "" ) ); - return !el.getElementsByTagName( "*" ).length; - } ); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programmatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert( function( el ) { - docElem.appendChild( el ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - } ); - - // ID filter and find - if ( support.getById ) { - Expr.filter[ "ID" ] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute( "id" ) === attrId; - }; - }; - Expr.find[ "ID" ] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var elem = context.getElementById( id ); - return elem ? [ elem ] : []; - } - }; - } else { - Expr.filter[ "ID" ] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode( "id" ); - return node && node.value === attrId; - }; - }; - - // Support: IE 6 - 7 only - // getElementById is not reliable as a find shortcut - Expr.find[ "ID" ] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var node, i, elems, - elem = context.getElementById( id ); - - if ( elem ) { - - // Verify the id attribute - node = elem.getAttributeNode( "id" ); - if ( node && node.value === id ) { - return [ elem ]; - } - - // Fall back on getElementsByName - elems = context.getElementsByName( id ); - i = 0; - while ( ( elem = elems[ i++ ] ) ) { - node = elem.getAttributeNode( "id" ); - if ( node && node.value === id ) { - return [ elem ]; - } - } - } - - return []; - } - }; - } - - // Tag - Expr.find[ "TAG" ] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( ( elem = results[ i++ ] ) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function (el) { + el.appendChild(document.createComment('')) + return !el.getElementsByTagName('*').length + }) + + // Support: IE<9 + support.getElementsByClassName = rnative.test(document.getElementsByClassName) + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function (el) { + docElem.appendChild(el).id = expando + return !document.getElementsByName || !document.getElementsByName(expando).length + }) + + // ID filter and find + if (support.getById) { + Expr.filter.ID = function (id) { + var attrId = id.replace(runescape, funescape) + return function (elem) { + return elem.getAttribute('id') === attrId + } + } + Expr.find.ID = function (id, context) { + if (typeof context.getElementById !== 'undefined' && documentIsHTML) { + var elem = context.getElementById(id) + return elem ? [elem] : [] + } + } + } else { + Expr.filter.ID = function (id) { + var attrId = id.replace(runescape, funescape) + return function (elem) { + var node = typeof elem.getAttributeNode !== 'undefined' && + elem.getAttributeNode('id') + return node && node.value === attrId + } + } + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find.ID = function (id, context) { + if (typeof context.getElementById !== 'undefined' && documentIsHTML) { + var node; var i; var elems + var elem = context.getElementById(id) + + if (elem) { + // Verify the id attribute + node = elem.getAttributeNode('id') + if (node && node.value === id) { + return [elem] + } + + // Fall back on getElementsByName + elems = context.getElementsByName(id) + i = 0 + while ((elem = elems[i++])) { + node = elem.getAttributeNode('id') + if (node && node.value === id) { + return [elem] + } + } + } + + return [] + } + } + } + + // Tag + Expr.find.TAG = support.getElementsByTagName + ? function (tag, context) { + if (typeof context.getElementsByTagName !== 'undefined') { + return context.getElementsByTagName(tag) + + // DocumentFragment nodes don't have gEBTN + } else if (support.qsa) { + return context.querySelectorAll(tag) + } + } + + : function (tag, context) { + var elem + var tmp = [] + var i = 0 + + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + var results = context.getElementsByTagName(tag) + + // Filter out possible comments + if (tag === '*') { + while ((elem = results[i++])) { + if (elem.nodeType === 1) { + tmp.push(elem) + } + } + + return tmp + } + return results + } + + // Class + Expr.find.CLASS = support.getElementsByClassName && function (className, context) { + if (typeof context.getElementsByClassName !== 'undefined' && documentIsHTML) { + return context.getElementsByClassName(className) + } + } + + /* QSA/matchesSelector ---------------------------------------------------------------------- */ - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See https://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { - - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert( function( el ) { - - var input; - - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // https://bugs.jquery.com/ticket/12359 - docElem.appendChild( el ).innerHTML = "" + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = [] + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See https://bugs.jquery.com/ticket/13378 + rbuggyQSA = [] + + if ((support.qsa = rnative.test(document.querySelectorAll))) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function (el) { + var input + + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // https://bugs.jquery.com/ticket/12359 + docElem.appendChild(el).innerHTML = "" + ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll( "[selected]" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push( "~=" ); - } - - // Support: IE 11+, Edge 15 - 18+ - // IE 11/Edge don't find elements on a `[name='']` query in some cases. - // Adding a temporary attribute to the document before the selection works - // around the issue. - // Interestingly, IE 10 & older don't seem to have the issue. - input = document.createElement( "input" ); - input.setAttribute( "name", "" ); - el.appendChild( input ); - if ( !el.querySelectorAll( "[name='']" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + - whitespace + "*(?:''|\"\")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll( ":checked" ).length ) { - rbuggyQSA.push( ":checked" ); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibling-combinator selector` fails - if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push( ".#.+[+~]" ); - } - - // Support: Firefox <=3.6 - 5 only - // Old Firefox doesn't throw on a badly-escaped identifier. - el.querySelectorAll( "\\\f" ); - rbuggyQSA.push( "[\\r\\n\\f]" ); - } ); - - assert( function( el ) { - el.innerHTML = "" + - ""; - - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement( "input" ); - input.setAttribute( "type", "hidden" ); - el.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll( "[name=d]" ).length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: IE9-11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: Opera 10 - 11 only - // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll( "*,:x" ); - rbuggyQSA.push( ",.*:" ); - } ); - } - - if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || + "" + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if (el.querySelectorAll("[msallowcapture^='']").length) { + rbuggyQSA.push('[*^$]=' + whitespace + "*(?:''|\"\")") + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if (!el.querySelectorAll('[selected]').length) { + rbuggyQSA.push('\\[' + whitespace + '*(?:value|' + booleans + ')') + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if (!el.querySelectorAll('[id~=' + expando + '-]').length) { + rbuggyQSA.push('~=') + } + + // Support: IE 11+, Edge 15 - 18+ + // IE 11/Edge don't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + // Interestingly, IE 10 & older don't seem to have the issue. + input = document.createElement('input') + input.setAttribute('name', '') + el.appendChild(input) + if (!el.querySelectorAll("[name='']").length) { + rbuggyQSA.push('\\[' + whitespace + '*name' + whitespace + '*=' + + whitespace + "*(?:''|\"\")") + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if (!el.querySelectorAll(':checked').length) { + rbuggyQSA.push(':checked') + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if (!el.querySelectorAll('a#' + expando + '+*').length) { + rbuggyQSA.push('.#.+[+~]') + } + + // Support: Firefox <=3.6 - 5 only + // Old Firefox doesn't throw on a badly-escaped identifier. + el.querySelectorAll('\\\f') + rbuggyQSA.push('[\\r\\n\\f]') + }) + + assert(function (el) { + el.innerHTML = "" + + "" + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement('input') + input.setAttribute('type', 'hidden') + el.appendChild(input).setAttribute('name', 'D') + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if (el.querySelectorAll('[name=d]').length) { + rbuggyQSA.push('name' + whitespace + '*[*^$|!~]?=') + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if (el.querySelectorAll(':enabled').length !== 2) { + rbuggyQSA.push(':enabled', ':disabled') + } + + // Support: IE9-11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + docElem.appendChild(el).disabled = true + if (el.querySelectorAll(':disabled').length !== 2) { + rbuggyQSA.push(':enabled', ':disabled') + } + + // Support: Opera 10 - 11 only + // Opera 10-11 does not throw on post-comma invalid pseudos + el.querySelectorAll('*,:x') + rbuggyQSA.push(',.*:') + }) + } + + if ((support.matchesSelector = rnative.test((matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || - docElem.msMatchesSelector ) ) ) ) { - - assert( function( el ) { - - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( el, "*" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( el, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - } ); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); - - /* Contains + docElem.msMatchesSelector)))) { + assert(function (el) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call(el, '*') + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call(el, "[s!='']:x") + rbuggyMatches.push('!=', pseudos) + }) + } + + rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join('|')) + rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join('|')) + + /* Contains ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - ) ); - } : - function( a, b ) { - if ( b ) { - while ( ( b = b.parentNode ) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting + hasCompare = rnative.test(docElem.compareDocumentPosition) + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test(docElem.contains) + ? function (a, b) { + var adown = a.nodeType === 9 ? a.documentElement : a + var bup = b && b.parentNode + return a === bup || !!(bup && bup.nodeType === 1 && ( + adown.contains + ? adown.contains(bup) + : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16 + )) + } + : function (a, b) { + if (b) { + while ((b = b.parentNode)) { + if (b === a) { + return true + } + } + } + return false + } + + /* Sorting ---------------------------------------------------------------------- */ - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { - - // Choose the first element that is related to our preferred document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( a == document || a.ownerDocument == preferredDoc && - contains( preferredDoc, a ) ) { - return -1; - } - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( b == document || b.ownerDocument == preferredDoc && - contains( preferredDoc, b ) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - return a == document ? -1 : - b == document ? 1 : - /* eslint-enable eqeqeq */ - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( ( cur = cur.parentNode ) ) { - ap.unshift( cur ); - } - cur = b; - while ( ( cur = cur.parentNode ) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[ i ] === bp[ i ] ) { - i++; - } - - return i ? - - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[ i ], bp[ i ] ) : - - // Otherwise nodes in our document sort first - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - ap[ i ] == preferredDoc ? -1 : - bp[ i ] == preferredDoc ? 1 : - /* eslint-enable eqeqeq */ - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - setDocument( elem ); - - if ( support.matchesSelector && documentIsHTML && - !nonnativeSelectorCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || + // Document order sorting + sortOrder = hasCompare + ? function (a, b) { + // Flag for duplicate removal + if (a === b) { + hasDuplicate = true + return 0 + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition + if (compare) { + return compare + } + + // Calculate position if both inputs belong to the same document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + compare = (a.ownerDocument || a) == (b.ownerDocument || b) + ? a.compareDocumentPosition(b) + + // Otherwise we know they are disconnected + : 1 + + // Disconnected nodes + if (compare & 1 || + (!support.sortDetached && b.compareDocumentPosition(a) === compare)) { + // Choose the first element that is related to our preferred document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if (a == document || a.ownerDocument == preferredDoc && + contains(preferredDoc, a)) { + return -1 + } + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if (b == document || b.ownerDocument == preferredDoc && + contains(preferredDoc, b)) { + return 1 + } + + // Maintain original order + return sortInput + ? (indexOf(sortInput, a) - indexOf(sortInput, b)) + : 0 + } + + return compare & 4 ? -1 : 1 + } + : function (a, b) { + // Exit early if the nodes are identical + if (a === b) { + hasDuplicate = true + return 0 + } + + var cur + var i = 0 + var aup = a.parentNode + var bup = b.parentNode + var ap = [a] + var bp = [b] + + // Parentless nodes are either documents or disconnected + if (!aup || !bup) { + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + return a == document ? -1 + : b == document ? 1 + /* eslint-enable eqeqeq */ + : aup ? -1 + : bup ? 1 + : sortInput + ? (indexOf(sortInput, a) - indexOf(sortInput, b)) + : 0 + + // If the nodes are siblings, we can do a quick check + } else if (aup === bup) { + return siblingCheck(a, b) + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a + while ((cur = cur.parentNode)) { + ap.unshift(cur) + } + cur = b + while ((cur = cur.parentNode)) { + bp.unshift(cur) + } + + // Walk down the tree looking for a discrepancy + while (ap[i] === bp[i]) { + i++ + } + + return i + + // Do a sibling check if the nodes have a common ancestor + ? siblingCheck(ap[i], bp[i]) + + // Otherwise nodes in our document sort first + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + : ap[i] == preferredDoc ? -1 + : bp[i] == preferredDoc ? 1 + /* eslint-enable eqeqeq */ + : 0 + } + + return document + } + + Sizzle.matches = function (expr, elements) { + return Sizzle(expr, null, null, elements) + } + + Sizzle.matchesSelector = function (elem, expr) { + setDocument(elem) + + if (support.matchesSelector && documentIsHTML && + !nonnativeSelectorCache[expr + ' '] && + (!rbuggyMatches || !rbuggyMatches.test(expr)) && + (!rbuggyQSA || !rbuggyQSA.test(expr))) { + try { + var ret = matches.call(elem, expr) + + // IE 9's matchesSelector returns false on disconnected nodes + if (ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch ( e ) { - nonnativeSelectorCache( expr, true ); - } - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( context.ownerDocument || context ) != document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( elem.ownerDocument || elem ) != document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - ( val = elem.getAttributeNode( name ) ) && val.specified ? - val.value : - null; -}; - -Sizzle.escape = function( sel ) { - return ( sel + "" ).replace( rcssescape, fcssescape ); -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** + elem.document && elem.document.nodeType !== 11) { + return ret + } + } catch (e) { + nonnativeSelectorCache(expr, true) + } + } + + return Sizzle(expr, document, null, [elem]).length > 0 + } + + Sizzle.contains = function (context, elem) { + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ((context.ownerDocument || context) != document) { + setDocument(context) + } + return contains(context, elem) + } + + Sizzle.attr = function (elem, name) { + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ((elem.ownerDocument || elem) != document) { + setDocument(elem) + } + + var fn = Expr.attrHandle[name.toLowerCase()] + + // Don't get fooled by Object.prototype properties (jQuery #13807) + var val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) + ? fn(elem, name, !documentIsHTML) + : undefined + + return val !== undefined + ? val + : support.attributes || !documentIsHTML + ? elem.getAttribute(name) + : (val = elem.getAttributeNode(name)) && val.specified + ? val.value + : null + } + + Sizzle.escape = function (sel) { + return (sel + '').replace(rcssescape, fcssescape) + } + + Sizzle.error = function (msg) { + throw new Error('Syntax error, unrecognized expression: ' + msg) + } + + /** * Document sorting and removing duplicates * @param {ArrayLike} results */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( ( elem = results[ i++ ] ) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** + Sizzle.uniqueSort = function (results) { + var elem + var duplicates = [] + var j = 0 + var i = 0 + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates + sortInput = !support.sortStable && results.slice(0) + results.sort(sortOrder) + + if (hasDuplicate) { + while ((elem = results[i++])) { + if (elem === results[i]) { + j = duplicates.push(i) + } + } + while (j--) { + results.splice(duplicates[j], 1) + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null + + return results + } + + /** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - - // If no nodeType, this is expected to be an array - while ( ( node = elem[ i++ ] ) ) { - - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[ 1 ] = match[ 1 ].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[ 3 ] = ( match[ 3 ] || match[ 4 ] || - match[ 5 ] || "" ).replace( runescape, funescape ); - - if ( match[ 2 ] === "~=" ) { - match[ 3 ] = " " + match[ 3 ] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - - /* matches from matchExpr["CHILD"] + getText = Sizzle.getText = function (elem) { + var node + var ret = '' + var i = 0 + var nodeType = elem.nodeType + + if (!nodeType) { + // If no nodeType, this is expected to be an array + while ((node = elem[i++])) { + // Do not traverse comment nodes + ret += getText(node) + } + } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if (typeof elem.textContent === 'string') { + return elem.textContent + } else { + // Traverse its children + for (elem = elem.firstChild; elem; elem = elem.nextSibling) { + ret += getText(elem) + } + } + } else if (nodeType === 3 || nodeType === 4) { + return elem.nodeValue + } + + // Do not include comment or processing instruction nodes + + return ret + } + + Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + '>': { dir: 'parentNode', first: true }, + ' ': { dir: 'parentNode' }, + '+': { dir: 'previousSibling', first: true }, + '~': { dir: 'previousSibling' } + }, + + preFilter: { + ATTR: function (match) { + match[1] = match[1].replace(runescape, funescape) + + // Move the given value to match[3] whether quoted or unquoted + match[3] = (match[3] || match[4] || + match[5] || '').replace(runescape, funescape) + + if (match[2] === '~=') { + match[3] = ' ' + match[3] + ' ' + } + + return match.slice(0, 4) + }, + + CHILD: function (match) { + /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) @@ -1797,1033 +1733,1000 @@ Expr = Sizzle.selectors = { 7 sign of y-component 8 y of y-component */ - match[ 1 ] = match[ 1 ].toLowerCase(); - - if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { + match[1] = match[1].toLowerCase() - // nth-* requires argument - if ( !match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); - } + if (match[1].slice(0, 3) === 'nth') { + // nth-* requires argument + if (!match[3]) { + Sizzle.error(match[0]) + } - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[ 4 ] = +( match[ 4 ] ? - match[ 5 ] + ( match[ 6 ] || 1 ) : - 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); - match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +(match[4] + ? match[5] + (match[6] || 1) + : 2 * (match[3] === 'even' || match[3] === 'odd')) + match[5] = +((match[7] + match[8]) || match[3] === 'odd') - // other types prohibit arguments - } else if ( match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); - } + // other types prohibit arguments + } else if (match[3]) { + Sizzle.error(match[0]) + } - return match; - }, + return match + }, - "PSEUDO": function( match ) { - var excess, - unquoted = !match[ 6 ] && match[ 2 ]; + PSEUDO: function (match) { + var excess + var unquoted = !match[6] && match[2] - if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { - return null; - } + if (matchExpr.CHILD.test(match[0])) { + return null + } - // Accept quoted arguments as-is - if ( match[ 3 ] ) { - match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; + // Accept quoted arguments as-is + if (match[3]) { + match[2] = match[4] || match[5] || '' - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && + // Strip excess characters from unquoted arguments + } else if (unquoted && rpseudo.test(unquoted) && // Get excess from tokenize (recursively) - ( excess = tokenize( unquoted, true ) ) && + (excess = tokenize(unquoted, true)) && // advance to the next closing parenthesis - ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { - - // excess is a negative index - match[ 0 ] = match[ 0 ].slice( 0, excess ); - match[ 2 ] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { - return true; - } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - ( pattern = new RegExp( "(^|" + whitespace + - ")" + className + "(" + whitespace + "|$)" ) ) && classCache( - className, function( elem ) { - return pattern.test( - typeof elem.className === "string" && elem.className || - typeof elem.getAttribute !== "undefined" && - elem.getAttribute( "class" ) || - "" - ); - } ); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - /* eslint-disable max-len */ - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - /* eslint-enable max-len */ - - }; - }, - - "CHILD": function( type, what, _argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, _context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( ( node = node[ dir ] ) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( ( node = ++nodeIndex && node && node[ dir ] || + (excess = unquoted.indexOf(')', unquoted.length - excess) - unquoted.length)) { + // excess is a negative index + match[0] = match[0].slice(0, excess) + match[2] = unquoted.slice(0, excess) + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice(0, 3) + } + }, + + filter: { + + TAG: function (nodeNameSelector) { + var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase() + return nodeNameSelector === '*' + ? function () { + return true + } + : function (elem) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName + } + }, + + CLASS: function (className) { + var pattern = classCache[className + ' '] + + return pattern || + (pattern = new RegExp('(^|' + whitespace + + ')' + className + '(' + whitespace + '|$)')) && classCache( + className, function (elem) { + return pattern.test( + typeof elem.className === 'string' && elem.className || + typeof elem.getAttribute !== 'undefined' && + elem.getAttribute('class') || + '' + ) + }) + }, + + ATTR: function (name, operator, check) { + return function (elem) { + var result = Sizzle.attr(elem, name) + + if (result == null) { + return operator === '!=' + } + if (!operator) { + return true + } + + result += '' + + /* eslint-disable max-len */ + + return operator === '=' ? result === check + : operator === '!=' ? result !== check + : operator === '^=' ? check && result.indexOf(check) === 0 + : operator === '*=' ? check && result.indexOf(check) > -1 + : operator === '$=' ? check && result.slice(-check.length) === check + : operator === '~=' ? (' ' + result.replace(rwhitespace, ' ') + ' ').indexOf(check) > -1 + : operator === '|=' ? result === check || result.slice(0, check.length + 1) === check + '-' + : false + /* eslint-enable max-len */ + } + }, + + CHILD: function (type, what, _argument, first, last) { + var simple = type.slice(0, 3) !== 'nth' + var forward = type.slice(-4) !== 'last' + var ofType = what === 'of-type' + + return first === 1 && last === 0 + + // Shortcut for :nth-*(n) + ? function (elem) { + return !!elem.parentNode + } + + : function (elem, _context, xml) { + var cache; var uniqueCache; var outerCache; var node; var nodeIndex; var start + var dir = simple !== forward ? 'nextSibling' : 'previousSibling' + var parent = elem.parentNode + var name = ofType && elem.nodeName.toLowerCase() + var useCache = !xml && !ofType + var diff = false + + if (parent) { + // :(first|last|only)-(child|of-type) + if (simple) { + while (dir) { + node = elem + while ((node = node[dir])) { + if (ofType + ? node.nodeName.toLowerCase() === name + : node.nodeType === 1) { + return false + } + } + + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === 'only' && !start && 'nextSibling' + } + return true + } + + start = [forward ? parent.firstChild : parent.lastChild] + + // non-xml :nth-child(...) stores cache data on `parent` + if (forward && useCache) { + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent + outerCache = node[expando] || (node[expando] = {}) + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[node.uniqueID] || + (outerCache[node.uniqueID] = {}) + + cache = uniqueCache[type] || [] + nodeIndex = cache[0] === dirruns && cache[1] + diff = nodeIndex && cache[2] + node = nodeIndex && parent.childNodes[nodeIndex] + + while ((node = ++nodeIndex && node && node[dir] || // Fallback to seeking `elem` from the start - ( diff = nodeIndex = 0 ) || start.pop() ) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - - // Use previously-cached element index if available - if ( useCache ) { - - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - - // Use the same loop as above to seek `elem` from the start - while ( ( node = ++nodeIndex && node && node[ dir ] || - ( diff = nodeIndex = 0 ) || start.pop() ) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || - ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction( function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[ i ] ); - seed[ idx ] = !( matches[ idx ] = matched[ i ] ); - } - } ) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - - // Potentially complex pseudos - "not": markFunction( function( selector ) { - - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction( function( seed, matches, _context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( ( elem = unmatched[ i ] ) ) { - seed[ i ] = !( matches[ i ] = elem ); - } - } - } ) : - function( elem, _context, xml ) { - input[ 0 ] = elem; - matcher( input, null, xml, results ); - - // Don't keep the element (issue #299) - input[ 0 ] = null; - return !results.pop(); - }; - } ), - - "has": markFunction( function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - } ), - - "contains": markFunction( function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; - }; - } ), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - - // lang value must be a valid identifier - if ( !ridentifier.test( lang || "" ) ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( ( elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); - return false; - }; - } ), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && - ( !document.hasFocus || document.hasFocus() ) && - !!( elem.type || elem.href || ~elem.tabIndex ); - }, - - // Boolean properties - "enabled": createDisabledPseudo( false ), - "disabled": createDisabledPseudo( true ), - - "checked": function( elem ) { - - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return ( nodeName === "input" && !!elem.checked ) || - ( nodeName === "option" && !!elem.selected ); - }, - - "selected": function( elem ) { - - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - // eslint-disable-next-line no-unused-expressions - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos[ "empty" ]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && + (diff = nodeIndex = 0) || start.pop())) { + // When found, cache indexes on `parent` and break + if (node.nodeType === 1 && ++diff && node === elem) { + uniqueCache[type] = [dirruns, nodeIndex, diff] + break + } + } + } else { + // Use previously-cached element index if available + if (useCache) { + // ...in a gzip-friendly way + node = elem + outerCache = node[expando] || (node[expando] = {}) + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[node.uniqueID] || + (outerCache[node.uniqueID] = {}) + + cache = uniqueCache[type] || [] + nodeIndex = cache[0] === dirruns && cache[1] + diff = nodeIndex + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if (diff === false) { + // Use the same loop as above to seek `elem` from the start + while ((node = ++nodeIndex && node && node[dir] || + (diff = nodeIndex = 0) || start.pop())) { + if ((ofType + ? node.nodeName.toLowerCase() === name + : node.nodeType === 1) && + ++diff) { + // Cache the index of each encountered element + if (useCache) { + outerCache = node[expando] || + (node[expando] = {}) + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[node.uniqueID] || + (outerCache[node.uniqueID] = {}) + + uniqueCache[type] = [dirruns, diff] + } + + if (node === elem) { + break + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last + return diff === first || (diff % first === 0 && diff / first >= 0) + } + } + }, + + PSEUDO: function (pseudo, argument) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args + var fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || + Sizzle.error('unsupported pseudo: ' + pseudo) + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if (fn[expando]) { + return fn(argument) + } + + // But maintain support for old signatures + if (fn.length > 1) { + args = [pseudo, pseudo, '', argument] + return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) + ? markFunction(function (seed, matches) { + var idx + var matched = fn(seed, argument) + var i = matched.length + while (i--) { + idx = indexOf(seed, matched[i]) + seed[idx] = !(matches[idx] = matched[i]) + } + }) + : function (elem) { + return fn(elem, 0, args) + } + } + + return fn + } + }, + + pseudos: { + + // Potentially complex pseudos + not: markFunction(function (selector) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [] + var results = [] + var matcher = compile(selector.replace(rtrim, '$1')) + + return matcher[expando] + ? markFunction(function (seed, matches, _context, xml) { + var elem + var unmatched = matcher(seed, null, xml, []) + var i = seed.length + + // Match elements unmatched by `matcher` + while (i--) { + if ((elem = unmatched[i])) { + seed[i] = !(matches[i] = elem) + } + } + }) + : function (elem, _context, xml) { + input[0] = elem + matcher(input, null, xml, results) + + // Don't keep the element (issue #299) + input[0] = null + return !results.pop() + } + }), + + has: markFunction(function (selector) { + return function (elem) { + return Sizzle(selector, elem).length > 0 + } + }), + + contains: markFunction(function (text) { + text = text.replace(runescape, funescape) + return function (elem) { + return (elem.textContent || getText(elem)).indexOf(text) > -1 + } + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + lang: markFunction(function (lang) { + // lang value must be a valid identifier + if (!ridentifier.test(lang || '')) { + Sizzle.error('unsupported lang: ' + lang) + } + lang = lang.replace(runescape, funescape).toLowerCase() + return function (elem) { + var elemLang + do { + if ((elemLang = documentIsHTML + ? elem.lang + : elem.getAttribute('xml:lang') || elem.getAttribute('lang'))) { + elemLang = elemLang.toLowerCase() + return elemLang === lang || elemLang.indexOf(lang + '-') === 0 + } + } while ((elem = elem.parentNode) && elem.nodeType === 1) + return false + } + }), + + // Miscellaneous + target: function (elem) { + var hash = window.location && window.location.hash + return hash && hash.slice(1) === elem.id + }, + + root: function (elem) { + return elem === docElem + }, + + focus: function (elem) { + return elem === document.activeElement && + (!document.hasFocus || document.hasFocus()) && + !!(elem.type || elem.href || ~elem.tabIndex) + }, + + // Boolean properties + enabled: createDisabledPseudo(false), + disabled: createDisabledPseudo(true), + + checked: function (elem) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase() + return (nodeName === 'input' && !!elem.checked) || + (nodeName === 'option' && !!elem.selected) + }, + + selected: function (elem) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if (elem.parentNode) { + // eslint-disable-next-line no-unused-expressions + elem.parentNode.selectedIndex + } + + return elem.selected === true + }, + + // Contents + empty: function (elem) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for (elem = elem.firstChild; elem; elem = elem.nextSibling) { + if (elem.nodeType < 6) { + return false + } + } + return true + }, + + parent: function (elem) { + return !Expr.pseudos.empty(elem) + }, + + // Element/input types + header: function (elem) { + return rheader.test(elem.nodeName) + }, + + input: function (elem) { + return rinputs.test(elem.nodeName) + }, + + button: function (elem) { + var name = elem.nodeName.toLowerCase() + return name === 'input' && elem.type === 'button' || name === 'button' + }, + + text: function (elem) { + var attr + return elem.nodeName.toLowerCase() === 'input' && + elem.type === 'text' && // Support: IE<8 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( ( attr = elem.getAttribute( "type" ) ) == null || - attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo( function() { - return [ 0 ]; - } ), - - "last": createPositionalPseudo( function( _matchIndexes, length ) { - return [ length - 1 ]; - } ), - - "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - } ), - - "even": createPositionalPseudo( function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "odd": createPositionalPseudo( function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { - var i = argument < 0 ? - argument + length : - argument > length ? - length : - argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ) - } -}; - -Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || ( match = rcomma.exec( soFar ) ) ) { - if ( match ) { - - // Don't consume trailing commas as valid - soFar = soFar.slice( match[ 0 ].length ) || soFar; - } - groups.push( ( tokens = [] ) ); - } - - matched = false; - - // Combinators - if ( ( match = rcombinators.exec( soFar ) ) ) { - matched = match.shift(); - tokens.push( { - value: matched, - - // Cast descendant combinators to space - type: match[ 0 ].replace( rtrim, " " ) - } ); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || - ( match = preFilters[ type ]( match ) ) ) ) { - matched = match.shift(); - tokens.push( { - value: matched, - type: type, - matches: match - } ); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[ i ].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - skip = combinator.next, - key = skip || dir, - checkNonElements = base && key === "parentNode", - doneName = done++; - - return combinator.first ? - - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - return false; - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || ( elem[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || - ( outerCache[ elem.uniqueID ] = {} ); - - if ( skip && skip === elem.nodeName.toLowerCase() ) { - elem = elem[ dir ] || elem; - } else if ( ( oldCache = uniqueCache[ key ] ) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return ( newCache[ 2 ] = oldCache[ 2 ] ); - } else { - - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ key ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { - return true; - } - } - } - } - } - return false; - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[ i ]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[ 0 ]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[ i ], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( ( elem = unmatched[ i ] ) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction( function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( - selector || "*", - context.nodeType ? [ context ] : context, - [] - ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( ( elem = temp[ i ] ) ) { - matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) ) { - - // Restore matcherIn since elem is not yet a final match - temp.push( ( matcherIn[ i ] = elem ) ); - } - } - postFinder( null, ( matcherOut = [] ), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) && - ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { - - seed[ temp ] = !( results[ temp ] = elem ); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - } ); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[ 0 ].type ], - implicitRelative = leadingRelative || Expr.relative[ " " ], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - ( checkContext = context ).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { - matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; - } else { - matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[ j ].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens - .slice( 0, i - 1 ) - .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), - - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), - len = elems.length; - - if ( outermost ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - outermostContext = context == document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( !context && elem.ownerDocument != document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( ( matcher = elementMatchers[ j++ ] ) ) { - if ( matcher( elem, context || document, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - - // They will have gone through all possible matchers - if ( ( elem = !matcher && elem ) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( ( matcher = setMatchers[ j++ ] ) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !( unmatched[ i ] || setMatched[ i ] ) ) { - setMatched[ i ] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[ i ] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( - selector, - matcherFromGroupMatchers( elementMatchers, setMatchers ) - ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** + ((attr = elem.getAttribute('type')) == null || + attr.toLowerCase() === 'text') + }, + + // Position-in-collection + first: createPositionalPseudo(function () { + return [0] + }), + + last: createPositionalPseudo(function (_matchIndexes, length) { + return [length - 1] + }), + + eq: createPositionalPseudo(function (_matchIndexes, length, argument) { + return [argument < 0 ? argument + length : argument] + }), + + even: createPositionalPseudo(function (matchIndexes, length) { + var i = 0 + for (; i < length; i += 2) { + matchIndexes.push(i) + } + return matchIndexes + }), + + odd: createPositionalPseudo(function (matchIndexes, length) { + var i = 1 + for (; i < length; i += 2) { + matchIndexes.push(i) + } + return matchIndexes + }), + + lt: createPositionalPseudo(function (matchIndexes, length, argument) { + var i = argument < 0 + ? argument + length + : argument > length + ? length + : argument + for (; --i >= 0;) { + matchIndexes.push(i) + } + return matchIndexes + }), + + gt: createPositionalPseudo(function (matchIndexes, length, argument) { + var i = argument < 0 ? argument + length : argument + for (; ++i < length;) { + matchIndexes.push(i) + } + return matchIndexes + }) + } + } + + Expr.pseudos.nth = Expr.pseudos.eq + + // Add button/input type pseudos + for (i in { radio: true, checkbox: true, file: true, password: true, image: true }) { + Expr.pseudos[i] = createInputPseudo(i) + } + for (i in { submit: true, reset: true }) { + Expr.pseudos[i] = createButtonPseudo(i) + } + + // Easy API for creating new setFilters + function setFilters () {} + setFilters.prototype = Expr.filters = Expr.pseudos + Expr.setFilters = new setFilters() + + tokenize = Sizzle.tokenize = function (selector, parseOnly) { + var matched; var match; var tokens; var type + var soFar; var groups; var preFilters + var cached = tokenCache[selector + ' '] + + if (cached) { + return parseOnly ? 0 : cached.slice(0) + } + + soFar = selector + groups = [] + preFilters = Expr.preFilter + + while (soFar) { + // Comma and first run + if (!matched || (match = rcomma.exec(soFar))) { + if (match) { + // Don't consume trailing commas as valid + soFar = soFar.slice(match[0].length) || soFar + } + groups.push((tokens = [])) + } + + matched = false + + // Combinators + if ((match = rcombinators.exec(soFar))) { + matched = match.shift() + tokens.push({ + value: matched, + + // Cast descendant combinators to space + type: match[0].replace(rtrim, ' ') + }) + soFar = soFar.slice(matched.length) + } + + // Filters + for (type in Expr.filter) { + if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || + (match = preFilters[type](match)))) { + matched = match.shift() + tokens.push({ + value: matched, + type: type, + matches: match + }) + soFar = soFar.slice(matched.length) + } + } + + if (!matched) { + break + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly + ? soFar.length + : soFar + ? Sizzle.error(selector) + + // Cache the tokens + : tokenCache(selector, groups).slice(0) + } + + function toSelector (tokens) { + var i = 0 + var len = tokens.length + var selector = '' + for (; i < len; i++) { + selector += tokens[i].value + } + return selector + } + + function addCombinator (matcher, combinator, base) { + var dir = combinator.dir + var skip = combinator.next + var key = skip || dir + var checkNonElements = base && key === 'parentNode' + var doneName = done++ + + return combinator.first + + // Check against closest ancestor/preceding element + ? function (elem, context, xml) { + while ((elem = elem[dir])) { + if (elem.nodeType === 1 || checkNonElements) { + return matcher(elem, context, xml) + } + } + return false + } + + // Check against all ancestor/preceding elements + : function (elem, context, xml) { + var oldCache; var uniqueCache; var outerCache + var newCache = [dirruns, doneName] + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if (xml) { + while ((elem = elem[dir])) { + if (elem.nodeType === 1 || checkNonElements) { + if (matcher(elem, context, xml)) { + return true + } + } + } + } else { + while ((elem = elem[dir])) { + if (elem.nodeType === 1 || checkNonElements) { + outerCache = elem[expando] || (elem[expando] = {}) + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[elem.uniqueID] || + (outerCache[elem.uniqueID] = {}) + + if (skip && skip === elem.nodeName.toLowerCase()) { + elem = elem[dir] || elem + } else if ((oldCache = uniqueCache[key]) && + oldCache[0] === dirruns && oldCache[1] === doneName) { + // Assign to newCache so results back-propagate to previous elements + return (newCache[2] = oldCache[2]) + } else { + // Reuse newcache so results back-propagate to previous elements + uniqueCache[key] = newCache + + // A match means we're done; a fail means we have to keep checking + if ((newCache[2] = matcher(elem, context, xml))) { + return true + } + } + } + } + } + return false + } + } + + function elementMatcher (matchers) { + return matchers.length > 1 + ? function (elem, context, xml) { + var i = matchers.length + while (i--) { + if (!matchers[i](elem, context, xml)) { + return false + } + } + return true + } + : matchers[0] + } + + function multipleContexts (selector, contexts, results) { + var i = 0 + var len = contexts.length + for (; i < len; i++) { + Sizzle(selector, contexts[i], results) + } + return results + } + + function condense (unmatched, map, filter, context, xml) { + var elem + var newUnmatched = [] + var i = 0 + var len = unmatched.length + var mapped = map != null + + for (; i < len; i++) { + if ((elem = unmatched[i])) { + if (!filter || filter(elem, context, xml)) { + newUnmatched.push(elem) + if (mapped) { + map.push(i) + } + } + } + } + + return newUnmatched + } + + function setMatcher (preFilter, selector, matcher, postFilter, postFinder, postSelector) { + if (postFilter && !postFilter[expando]) { + postFilter = setMatcher(postFilter) + } + if (postFinder && !postFinder[expando]) { + postFinder = setMatcher(postFinder, postSelector) + } + return markFunction(function (seed, results, context, xml) { + var temp; var i; var elem + var preMap = [] + var postMap = [] + var preexisting = results.length + + // Get initial elements from seed or context + var elems = seed || multipleContexts( + selector || '*', + context.nodeType ? [context] : context, + [] + ) + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + var matcherIn = preFilter && (seed || !selector) + ? condense(elems, preMap, preFilter, context, xml) + : elems + + var matcherOut = matcher + + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + ? postFinder || (seed ? preFilter : preexisting || postFilter) + + // ...intermediate processing is necessary + ? [] + + // ...otherwise use results directly + : results + : matcherIn + + // Find primary matches + if (matcher) { + matcher(matcherIn, matcherOut, context, xml) + } + + // Apply postFilter + if (postFilter) { + temp = condense(matcherOut, postMap) + postFilter(temp, [], context, xml) + + // Un-match failing elements by moving them back to matcherIn + i = temp.length + while (i--) { + if ((elem = temp[i])) { + matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem) + } + } + } + + if (seed) { + if (postFinder || preFilter) { + if (postFinder) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = [] + i = matcherOut.length + while (i--) { + if ((elem = matcherOut[i])) { + // Restore matcherIn since elem is not yet a final match + temp.push((matcherIn[i] = elem)) + } + } + postFinder(null, (matcherOut = []), temp, xml) + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length + while (i--) { + if ((elem = matcherOut[i]) && + (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) { + seed[temp] = !(results[temp] = elem) + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results + ? matcherOut.splice(preexisting, matcherOut.length) + : matcherOut + ) + if (postFinder) { + postFinder(null, results, matcherOut, xml) + } else { + push.apply(results, matcherOut) + } + } + }) + } + + function matcherFromTokens (tokens) { + var checkContext; var matcher; var j + var len = tokens.length + var leadingRelative = Expr.relative[tokens[0].type] + var implicitRelative = leadingRelative || Expr.relative[' '] + var i = leadingRelative ? 1 : 0 + + // The foundational matcher ensures that elements are reachable from top-level context(s) + var matchContext = addCombinator(function (elem) { + return elem === checkContext + }, implicitRelative, true) + var matchAnyContext = addCombinator(function (elem) { + return indexOf(checkContext, elem) > -1 + }, implicitRelative, true) + var matchers = [function (elem, context, xml) { + var ret = (!leadingRelative && (xml || context !== outermostContext)) || ( + (checkContext = context).nodeType + ? matchContext(elem, context, xml) + : matchAnyContext(elem, context, xml)) + + // Avoid hanging onto element (issue #299) + checkContext = null + return ret + }] + + for (; i < len; i++) { + if ((matcher = Expr.relative[tokens[i].type])) { + matchers = [addCombinator(elementMatcher(matchers), matcher)] + } else { + matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches) + + // Return special upon seeing a positional matcher + if (matcher[expando]) { + // Find the next relative operator (if any) for proper handling + j = ++i + for (; j < len; j++) { + if (Expr.relative[tokens[j].type]) { + break + } + } + return setMatcher( + i > 1 && elementMatcher(matchers), + i > 1 && toSelector( + + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens + .slice(0, i - 1) + .concat({ value: tokens[i - 2].type === ' ' ? '*' : '' }) + ).replace(rtrim, '$1'), + matcher, + i < j && matcherFromTokens(tokens.slice(i, j)), + j < len && matcherFromTokens((tokens = tokens.slice(j))), + j < len && toSelector(tokens) + ) + } + matchers.push(matcher) + } + } + + return elementMatcher(matchers) + } + + function matcherFromGroupMatchers (elementMatchers, setMatchers) { + var bySet = setMatchers.length > 0 + var byElement = elementMatchers.length > 0 + var superMatcher = function (seed, context, xml, results, outermost) { + var elem; var j; var matcher + var matchedCount = 0 + var i = '0' + var unmatched = seed && [] + var setMatched = [] + var contextBackup = outermostContext + + // We must always have either seed elements or outermost context + var elems = seed || byElement && Expr.find.TAG('*', outermost) + + // Use integer dirruns iff this is the outermost matcher + var dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1) + var len = elems.length + + if (outermost) { + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + outermostContext = context == document || context || outermost + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for (; i !== len && (elem = elems[i]) != null; i++) { + if (byElement && elem) { + j = 0 + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if (!context && elem.ownerDocument != document) { + setDocument(elem) + xml = !documentIsHTML + } + while ((matcher = elementMatchers[j++])) { + if (matcher(elem, context || document, xml)) { + results.push(elem) + break + } + } + if (outermost) { + dirruns = dirrunsUnique + } + } + + // Track unmatched elements for set filters + if (bySet) { + // They will have gone through all possible matchers + if ((elem = !matcher && elem)) { + matchedCount-- + } + + // Lengthen the array for every element, matched or not + if (seed) { + unmatched.push(elem) + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if (bySet && i !== matchedCount) { + j = 0 + while ((matcher = setMatchers[j++])) { + matcher(unmatched, setMatched, context, xml) + } + + if (seed) { + // Reintegrate element matches to eliminate the need for sorting + if (matchedCount > 0) { + while (i--) { + if (!(unmatched[i] || setMatched[i])) { + setMatched[i] = pop.call(results) + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense(setMatched) + } + + // Add matches to results + push.apply(results, setMatched) + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if (outermost && !seed && setMatched.length > 0 && + (matchedCount + setMatchers.length) > 1) { + Sizzle.uniqueSort(results) + } + } + + // Override manipulation of globals by nested matchers + if (outermost) { + dirruns = dirrunsUnique + outermostContext = contextBackup + } + + return unmatched + } + + return bySet + ? markFunction(superMatcher) + : superMatcher + } + + compile = Sizzle.compile = function (selector, match /* Internal Use Only */) { + var i + var setMatchers = [] + var elementMatchers = [] + var cached = compilerCache[selector + ' '] + + if (!cached) { + // Generate a function of recursive functions that can be used to check each element + if (!match) { + match = tokenize(selector) + } + i = match.length + while (i--) { + cached = matcherFromTokens(match[i]) + if (cached[expando]) { + setMatchers.push(cached) + } else { + elementMatchers.push(cached) + } + } + + // Cache the compiled function + cached = compilerCache( + selector, + matcherFromGroupMatchers(elementMatchers, setMatchers) + ) + + // Save selector and tokenization + cached.selector = selector + } + return cached + } + + /** * A low-level selection function that works with Sizzle's compiled * selector functions * @param {String|Function} selector A selector or a pre-compiled @@ -2832,603 +2735,569 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { * @param {Array} [results] * @param {Array} [seed] A set of elements to match against */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( ( selector = compiled.selector || selector ) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[ 0 ] = match[ 0 ].slice( 0 ); - if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { - - context = ( Expr.find[ "ID" ]( token.matches[ 0 ] - .replace( runescape, funescape ), context ) || [] )[ 0 ]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[ i ]; - - // Abort if we hit a combinator - if ( Expr.relative[ ( type = token.type ) ] ) { - break; - } - if ( ( find = Expr.find[ type ] ) ) { - - // Search, expanding context for leading sibling combinators - if ( ( seed = find( - token.matches[ 0 ].replace( runescape, funescape ), - rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || + select = Sizzle.select = function (selector, context, results, seed) { + var i; var tokens; var token; var type; var find + var compiled = typeof selector === 'function' && selector + var match = !seed && tokenize((selector = compiled.selector || selector)) + + results = results || [] + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if (match.length === 1) { + // Reduce context if the leading compound selector is an ID + tokens = match[0] = match[0].slice(0) + if (tokens.length > 2 && (token = tokens[0]).type === 'ID' && + context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) { + context = (Expr.find.ID(token.matches[0] + .replace(runescape, funescape), context) || [])[0] + if (!context) { + return results + + // Precompiled matchers will still verify ancestry, so step up a level + } else if (compiled) { + context = context.parentNode + } + + selector = selector.slice(tokens.shift().value.length) + } + + // Fetch a seed set for right-to-left matching + i = matchExpr.needsContext.test(selector) ? 0 : tokens.length + while (i--) { + token = tokens[i] + + // Abort if we hit a combinator + if (Expr.relative[(type = token.type)]) { + break + } + if ((find = Expr.find[type])) { + // Search, expanding context for leading sibling combinators + if ((seed = find( + token.matches[0].replace(runescape, funescape), + rsibling.test(tokens[0].type) && testContext(context.parentNode) || context - ) ) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert( function( el ) { - - // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; -} ); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert( function( el ) { - el.innerHTML = ""; - return el.firstChild.getAttribute( "href" ) === "#"; -} ) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - } ); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert( function( el ) { - el.innerHTML = ""; - el.firstChild.setAttribute( "value", "" ); - return el.firstChild.getAttribute( "value" ) === ""; -} ) ) { - addHandle( "value", function( elem, _name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - } ); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert( function( el ) { - return el.getAttribute( "disabled" ) == null; -} ) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - ( val = elem.getAttributeNode( name ) ) && val.specified ? - val.value : - null; - } - } ); -} - -return Sizzle; - -} )( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; - -// Deprecated -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; -jQuery.escapeSelector = Sizzle.escape; - - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - - - -function nodeName( elem, name ) { - - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - -}; -var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); - - - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - return !!qualifier.call( elem, i, elem ) !== not; - } ); - } - - // Single element - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - } - - // Arraylike of elements (jQuery, arguments, Array) - if ( typeof qualifier !== "string" ) { - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); - } - - // Filtered directly for both simple and complex selectors - return jQuery.filter( qualifier, elements, not ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - if ( elems.length === 1 && elem.nodeType === 1 ) { - return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; - } - - return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, ret, - len = this.length, - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - ret = this.pushStack( [] ); - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - return len > 1 ? jQuery.uniqueSort( ret ) : ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - // Shortcut simple #id case for speed - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - if ( elem ) { - - // Inject the element directly into the jQuery object - this[ 0 ] = elem; - this.length = 1; - } - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - targets = typeof selectors !== "string" && jQuery( selectors ); - - // Positional selectors never match, since there's no _selection_ context - if ( !rneedsContext.test( selectors ) ) { - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( targets ? - targets.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, _i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, _i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, _i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - if ( elem.contentDocument != null && + ))) { + // If seed is empty or no tokens remain, we can return early + tokens.splice(i, 1) + selector = seed.length && toSelector(tokens) + if (!selector) { + push.apply(results, seed) + return results + } + + break + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + (compiled || compile(selector, match))( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test(selector) && testContext(context.parentNode) || context + ) + return results + } + + // One-time assignments + + // Sort stability + support.sortStable = expando.split('').sort(sortOrder).join('') === expando + + // Support: Chrome 14-35+ + // Always assume duplicates if they aren't passed to the comparison function + support.detectDuplicates = !!hasDuplicate + + // Initialize against the default document + setDocument() + + // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) + // Detached nodes confoundingly follow *each other* + support.sortDetached = assert(function (el) { + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition(document.createElement('fieldset')) & 1 + }) + + // Support: IE<8 + // Prevent attribute/property "interpolation" + // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx + if (!assert(function (el) { + el.innerHTML = "" + return el.firstChild.getAttribute('href') === '#' + })) { + addHandle('type|href|height|width', function (elem, name, isXML) { + if (!isXML) { + return elem.getAttribute(name, name.toLowerCase() === 'type' ? 1 : 2) + } + }) + } + + // Support: IE<9 + // Use defaultValue in place of getAttribute("value") + if (!support.attributes || !assert(function (el) { + el.innerHTML = '' + el.firstChild.setAttribute('value', '') + return el.firstChild.getAttribute('value') === '' + })) { + addHandle('value', function (elem, _name, isXML) { + if (!isXML && elem.nodeName.toLowerCase() === 'input') { + return elem.defaultValue + } + }) + } + + // Support: IE<9 + // Use getAttributeNode to fetch booleans when getAttribute lies + if (!assert(function (el) { + return el.getAttribute('disabled') == null + })) { + addHandle(booleans, function (elem, name, isXML) { + var val + if (!isXML) { + return elem[name] === true ? name.toLowerCase() + : (val = elem.getAttributeNode(name)) && val.specified + ? val.value + : null + } + }) + } + + return Sizzle +})(window) + + jQuery.find = Sizzle + jQuery.expr = Sizzle.selectors + + // Deprecated + jQuery.expr[':'] = jQuery.expr.pseudos + jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort + jQuery.text = Sizzle.getText + jQuery.isXMLDoc = Sizzle.isXML + jQuery.contains = Sizzle.contains + jQuery.escapeSelector = Sizzle.escape + + var dir = function (elem, dir, until) { + var matched = [] + var truncate = until !== undefined + + while ((elem = elem[dir]) && elem.nodeType !== 9) { + if (elem.nodeType === 1) { + if (truncate && jQuery(elem).is(until)) { + break + } + matched.push(elem) + } + } + return matched + } + + var siblings = function (n, elem) { + var matched = [] + + for (; n; n = n.nextSibling) { + if (n.nodeType === 1 && n !== elem) { + matched.push(n) + } + } + + return matched + } + + var rneedsContext = jQuery.expr.match.needsContext + + function nodeName (elem, name) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase() + }; + var rsingleTag = (/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i) + + // Implement the identical functionality for filter and not + function winnow (elements, qualifier, not) { + if (isFunction(qualifier)) { + return jQuery.grep(elements, function (elem, i) { + return !!qualifier.call(elem, i, elem) !== not + }) + } + + // Single element + if (qualifier.nodeType) { + return jQuery.grep(elements, function (elem) { + return (elem === qualifier) !== not + }) + } + + // Arraylike of elements (jQuery, arguments, Array) + if (typeof qualifier !== 'string') { + return jQuery.grep(elements, function (elem) { + return (indexOf.call(qualifier, elem) > -1) !== not + }) + } + + // Filtered directly for both simple and complex selectors + return jQuery.filter(qualifier, elements, not) + } + + jQuery.filter = function (expr, elems, not) { + var elem = elems[0] + + if (not) { + expr = ':not(' + expr + ')' + } + + if (elems.length === 1 && elem.nodeType === 1) { + return jQuery.find.matchesSelector(elem, expr) ? [elem] : [] + } + + return jQuery.find.matches(expr, jQuery.grep(elems, function (elem) { + return elem.nodeType === 1 + })) + } + + jQuery.fn.extend({ + find: function (selector) { + var i; var ret + var len = this.length + var self = this + + if (typeof selector !== 'string') { + return this.pushStack(jQuery(selector).filter(function () { + for (i = 0; i < len; i++) { + if (jQuery.contains(self[i], this)) { + return true + } + } + })) + } + + ret = this.pushStack([]) + + for (i = 0; i < len; i++) { + jQuery.find(selector, self[i], ret) + } + + return len > 1 ? jQuery.uniqueSort(ret) : ret + }, + filter: function (selector) { + return this.pushStack(winnow(this, selector || [], false)) + }, + not: function (selector) { + return this.pushStack(winnow(this, selector || [], true)) + }, + is: function (selector) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === 'string' && rneedsContext.test(selector) + ? jQuery(selector) + : selector || [], + false + ).length + } + }) + + // Initialize a jQuery object + + // A central reference to the root jQuery(document) + var rootjQuery + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + // Shortcut simple #id case for speed + var rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/ + + var init = jQuery.fn.init = function (selector, context, root) { + var match, elem + + // HANDLE: $(""), $(null), $(undefined), $(false) + if (!selector) { + return this + } + + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery + + // Handle HTML strings + if (typeof selector === 'string') { + if (selector[0] === '<' && + selector[selector.length - 1] === '>' && + selector.length >= 3) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [null, selector, null] + } else { + match = rquickExpr.exec(selector) + } + + // Match html or make sure no context is specified for #id + if (match && (match[1] || !context)) { + // HANDLE: $(html) -> $(array) + if (match[1]) { + context = context instanceof jQuery ? context[0] : context + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge(this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + )) + + // HANDLE: $(html, props) + if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) { + for (match in context) { + // Properties of context are called as methods if possible + if (isFunction(this[match])) { + this[match](context[match]) + + // ...and otherwise set as attributes + } else { + this.attr(match, context[match]) + } + } + } + + return this + + // HANDLE: $(#id) + } else { + elem = document.getElementById(match[2]) + + if (elem) { + // Inject the element directly into the jQuery object + this[0] = elem + this.length = 1 + } + return this + } + + // HANDLE: $(expr, $(...)) + } else if (!context || context.jquery) { + return (context || root).find(selector) + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor(context).find(selector) + } + + // HANDLE: $(DOMElement) + } else if (selector.nodeType) { + this[0] = selector + this.length = 1 + return this + + // HANDLE: $(function) + // Shortcut for document ready + } else if (isFunction(selector)) { + return root.ready !== undefined + ? root.ready(selector) + + // Execute immediately if ready is not present + : selector(jQuery) + } + + return jQuery.makeArray(selector, this) + } + + // Give the init function the jQuery prototype for later instantiation + init.prototype = jQuery.fn + + // Initialize central reference + rootjQuery = jQuery(document) + + var rparentsprev = /^(?:parents|prev(?:Until|All))/ + + // Methods guaranteed to produce a unique set when starting from a unique set + var guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + } + + jQuery.fn.extend({ + has: function (target) { + var targets = jQuery(target, this) + var l = targets.length + + return this.filter(function () { + var i = 0 + for (; i < l; i++) { + if (jQuery.contains(this, targets[i])) { + return true + } + } + }) + }, + + closest: function (selectors, context) { + var cur + var i = 0 + var l = this.length + var matched = [] + var targets = typeof selectors !== 'string' && jQuery(selectors) + + // Positional selectors never match, since there's no _selection_ context + if (!rneedsContext.test(selectors)) { + for (; i < l; i++) { + for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) { + // Always skip document fragments + if (cur.nodeType < 11 && (targets + ? targets.index(cur) > -1 + + // Don't pass non-elements to Sizzle + : cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors))) { + matched.push(cur) + break + } + } + } + } + + return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched) + }, + + // Determine the position of an element within the set + index: function (elem) { + // No argument, return index in parent + if (!elem) { + return (this[0] && this[0].parentNode) ? this.first().prevAll().length : -1 + } + + // Index in selector + if (typeof elem === 'string') { + return indexOf.call(jQuery(elem), this[0]) + } + + // Locate the position of the desired element + return indexOf.call(this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem + ) + }, + + add: function (selector, context) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge(this.get(), jQuery(selector, context)) + ) + ) + }, + + addBack: function (selector) { + return this.add(selector == null + ? this.prevObject : this.prevObject.filter(selector) + ) + } + }) + + function sibling (cur, dir) { + while ((cur = cur[dir]) && cur.nodeType !== 1) {} + return cur + } + + jQuery.each({ + parent: function (elem) { + var parent = elem.parentNode + return parent && parent.nodeType !== 11 ? parent : null + }, + parents: function (elem) { + return dir(elem, 'parentNode') + }, + parentsUntil: function (elem, _i, until) { + return dir(elem, 'parentNode', until) + }, + next: function (elem) { + return sibling(elem, 'nextSibling') + }, + prev: function (elem) { + return sibling(elem, 'previousSibling') + }, + nextAll: function (elem) { + return dir(elem, 'nextSibling') + }, + prevAll: function (elem) { + return dir(elem, 'previousSibling') + }, + nextUntil: function (elem, _i, until) { + return dir(elem, 'nextSibling', until) + }, + prevUntil: function (elem, _i, until) { + return dir(elem, 'previousSibling', until) + }, + siblings: function (elem) { + return siblings((elem.parentNode || {}).firstChild, elem) + }, + children: function (elem) { + return siblings(elem.firstChild) + }, + contents: function (elem) { + if (elem.contentDocument != null && // Support: IE 11+ // elements with no `data` attribute has an object // `contentDocument` with a `null` prototype. - getProto( elem.contentDocument ) ) { - - return elem.contentDocument; - } - - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } - - return jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* + getProto(elem.contentDocument)) { + return elem.contentDocument + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if (nodeName(elem, 'template')) { + elem = elem.content || elem + } + + return jQuery.merge([], elem.childNodes) + } + }, function (name, fn) { + jQuery.fn[name] = function (until, selector) { + var matched = jQuery.map(this, fn, until) + + if (name.slice(-5) !== 'Until') { + selector = until + } + + if (selector && typeof selector === 'string') { + matched = jQuery.filter(selector, matched) + } + + if (this.length > 1) { + // Remove duplicates + if (!guaranteedUnique[name]) { + jQuery.uniqueSort(matched) + } + + // Reverse order for parents* and prev-derivatives + if (rparentsprev.test(name)) { + matched.reverse() + } + } + + return this.pushStack(matched) + } + }) + var rnothtmlwhite = (/[^\x20\t\r\n\f]+/g) + + // Convert String-formatted options into Object-formatted ones + function createOptions (options) { + var object = {} + jQuery.each(options.match(rnothtmlwhite) || [], function (_, flag) { + object[flag] = true + }) + return object + } + + /* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how @@ -3450,2010 +3319,1913 @@ function createOptions( options ) { * stopOnFalse: interrupt callings when a callback returns false * */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = locked || options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && toType( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory && !firing ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -function Identity( v ) { - return v; -} -function Thrower( ex ) { - throw ex; -} - -function adoptValue( value, resolve, reject, noValue ) { - var method; - - try { - - // Check for promise aspect first to privilege synchronous behavior - if ( value && isFunction( ( method = value.promise ) ) ) { - method.call( value ).done( resolve ).fail( reject ); - - // Other thenables - } else if ( value && isFunction( ( method = value.then ) ) ) { - method.call( value, resolve, reject ); - - // Other non-thenables - } else { - - // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: - // * false: [ value ].slice( 0 ) => resolve( value ) - // * true: [ value ].slice( 1 ) => resolve() - resolve.apply( undefined, [ value ].slice( noValue ) ); - } - - // For Promises/A+, convert exceptions into rejections - // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in - // Deferred#then to conditionally suppress rejection. - } catch ( value ) { - - // Support: Android 4.0 only - // Strict mode functions invoked without .call/.apply get global-object context - reject.apply( undefined, [ value ] ); - } -} - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, callbacks, - // ... .then handlers, argument index, [final state] - [ "notify", "progress", jQuery.Callbacks( "memory" ), - jQuery.Callbacks( "memory" ), 2 ], - [ "resolve", "done", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 0, "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 1, "rejected" ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - "catch": function( fn ) { - return promise.then( null, fn ); - }, - - // Keep pipe for back-compat - pipe: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( _i, tuple ) { - - // Map tuples (progress, done, fail) to arguments (done, fail, progress) - var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; - - // deferred.progress(function() { bind to newDefer or newDefer.notify }) - // deferred.done(function() { bind to newDefer or newDefer.resolve }) - // deferred.fail(function() { bind to newDefer or newDefer.reject }) - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - then: function( onFulfilled, onRejected, onProgress ) { - var maxDepth = 0; - function resolve( depth, deferred, handler, special ) { - return function() { - var that = this, - args = arguments, - mightThrow = function() { - var returned, then; - - // Support: Promises/A+ section 2.3.3.3.3 - // https://promisesaplus.com/#point-59 - // Ignore double-resolution attempts - if ( depth < maxDepth ) { - return; - } - - returned = handler.apply( that, args ); - - // Support: Promises/A+ section 2.3.1 - // https://promisesaplus.com/#point-48 - if ( returned === deferred.promise() ) { - throw new TypeError( "Thenable self-resolution" ); - } - - // Support: Promises/A+ sections 2.3.3.1, 3.5 - // https://promisesaplus.com/#point-54 - // https://promisesaplus.com/#point-75 - // Retrieve `then` only once - then = returned && + jQuery.Callbacks = function (options) { + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === 'string' + ? createOptions(options) + : jQuery.extend({}, options) + + var // Flag to know if list is currently firing + firing + + // Last fire value for non-forgettable lists + var memory + + // Flag to know if list was already fired + var fired + + // Flag to prevent firing + var locked + + // Actual callback list + var list = [] + + // Queue of execution data for repeatable lists + var queue = [] + + // Index of currently firing callback (modified by add/remove as needed) + var firingIndex = -1 + + // Fire callbacks + var fire = function () { + // Enforce single-firing + locked = locked || options.once + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true + for (; queue.length; firingIndex = -1) { + memory = queue.shift() + while (++firingIndex < list.length) { + // Run callback and check for early termination + if (list[firingIndex].apply(memory[0], memory[1]) === false && + options.stopOnFalse) { + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length + memory = false + } + } + } + + // Forget the data if we're done with it + if (!options.memory) { + memory = false + } + + firing = false + + // Clean up if we're done firing for good + if (locked) { + // Keep an empty list if we have data for future add calls + if (memory) { + list = [] + + // Otherwise, this object is spent + } else { + list = '' + } + } + } + + // Actual Callbacks object + var self = { + + // Add a callback or a collection of callbacks to the list + add: function () { + if (list) { + // If we have memory from a past run, we should fire after adding + if (memory && !firing) { + firingIndex = list.length - 1 + queue.push(memory) + } + + (function add (args) { + jQuery.each(args, function (_, arg) { + if (isFunction(arg)) { + if (!options.unique || !self.has(arg)) { + list.push(arg) + } + } else if (arg && arg.length && toType(arg) !== 'string') { + // Inspect recursively + add(arg) + } + }) + })(arguments) + + if (memory && !firing) { + fire() + } + } + return this + }, + + // Remove a callback from the list + remove: function () { + jQuery.each(arguments, function (_, arg) { + var index + while ((index = jQuery.inArray(arg, list, index)) > -1) { + list.splice(index, 1) + + // Handle firing indexes + if (index <= firingIndex) { + firingIndex-- + } + } + }) + return this + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function (fn) { + return fn + ? jQuery.inArray(fn, list) > -1 + : list.length > 0 + }, + + // Remove all callbacks from the list + empty: function () { + if (list) { + list = [] + } + return this + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function () { + locked = queue = [] + list = memory = '' + return this + }, + disabled: function () { + return !list + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function () { + locked = queue = [] + if (!memory && !firing) { + list = memory = '' + } + return this + }, + locked: function () { + return !!locked + }, + + // Call all callbacks with the given context and arguments + fireWith: function (context, args) { + if (!locked) { + args = args || [] + args = [context, args.slice ? args.slice() : args] + queue.push(args) + if (!firing) { + fire() + } + } + return this + }, + + // Call all the callbacks with the given arguments + fire: function () { + self.fireWith(this, arguments) + return this + }, + + // To know if the callbacks have already been called at least once + fired: function () { + return !!fired + } + } + + return self + } + + function Identity (v) { + return v + } + function Thrower (ex) { + throw ex + } + + function adoptValue (value, resolve, reject, noValue) { + var method + + try { + // Check for promise aspect first to privilege synchronous behavior + if (value && isFunction((method = value.promise))) { + method.call(value).done(resolve).fail(reject) + + // Other thenables + } else if (value && isFunction((method = value.then))) { + method.call(value, resolve, reject) + + // Other non-thenables + } else { + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply(undefined, [value].slice(noValue)) + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch (value) { + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply(undefined, [value]) + } + } + + jQuery.extend({ + + Deferred: function (func) { + var tuples = [ + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + ['notify', 'progress', jQuery.Callbacks('memory'), + jQuery.Callbacks('memory'), 2], + ['resolve', 'done', jQuery.Callbacks('once memory'), + jQuery.Callbacks('once memory'), 0, 'resolved'], + ['reject', 'fail', jQuery.Callbacks('once memory'), + jQuery.Callbacks('once memory'), 1, 'rejected'] + ] + var state = 'pending' + var promise = { + state: function () { + return state + }, + always: function () { + deferred.done(arguments).fail(arguments) + return this + }, + catch: function (fn) { + return promise.then(null, fn) + }, + + // Keep pipe for back-compat + pipe: function (/* fnDone, fnFail, fnProgress */) { + var fns = arguments + + return jQuery.Deferred(function (newDefer) { + jQuery.each(tuples, function (_i, tuple) { + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = isFunction(fns[tuple[4]]) && fns[tuple[4]] + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[tuple[1]](function () { + var returned = fn && fn.apply(this, arguments) + if (returned && isFunction(returned.promise)) { + returned.promise() + .progress(newDefer.notify) + .done(newDefer.resolve) + .fail(newDefer.reject) + } else { + newDefer[tuple[0] + 'With']( + this, + fn ? [returned] : arguments + ) + } + }) + }) + fns = null + }).promise() + }, + then: function (onFulfilled, onRejected, onProgress) { + var maxDepth = 0 + function resolve (depth, deferred, handler, special) { + return function () { + var that = this + var args = arguments + var mightThrow = function () { + var returned, then + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if (depth < maxDepth) { + return + } + + returned = handler.apply(that, args) + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if (returned === deferred.promise()) { + throw new TypeError('Thenable self-resolution') + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && // Support: Promises/A+ section 2.3.4 // https://promisesaplus.com/#point-64 // Only check objects and functions for thenability - ( typeof returned === "object" || - typeof returned === "function" ) && - returned.then; - - // Handle a returned thenable - if ( isFunction( then ) ) { - - // Special processors (notify) just wait for resolution - if ( special ) { - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ) - ); - - // Normal processors (resolve) also hook into progress - } else { - - // ...and disregard older resolution values - maxDepth++; - - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ), - resolve( maxDepth, deferred, Identity, - deferred.notifyWith ) - ); - } - - // Handle all other returned values - } else { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Identity ) { - that = undefined; - args = [ returned ]; - } - - // Process the value(s) - // Default process is resolve - ( special || deferred.resolveWith )( that, args ); - } - }, - - // Only normal processors (resolve) catch and reject exceptions - process = special ? - mightThrow : - function() { - try { - mightThrow(); - } catch ( e ) { - - if ( jQuery.Deferred.exceptionHook ) { - jQuery.Deferred.exceptionHook( e, - process.stackTrace ); - } - - // Support: Promises/A+ section 2.3.3.3.4.1 - // https://promisesaplus.com/#point-61 - // Ignore post-resolution exceptions - if ( depth + 1 >= maxDepth ) { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Thrower ) { - that = undefined; - args = [ e ]; - } - - deferred.rejectWith( that, args ); - } - } - }; - - // Support: Promises/A+ section 2.3.3.3.1 - // https://promisesaplus.com/#point-57 - // Re-resolve promises immediately to dodge false rejection from - // subsequent errors - if ( depth ) { - process(); - } else { - - // Call an optional hook to record the stack, in case of exception - // since it's otherwise lost when execution goes async - if ( jQuery.Deferred.getStackHook ) { - process.stackTrace = jQuery.Deferred.getStackHook(); - } - window.setTimeout( process ); - } - }; - } - - return jQuery.Deferred( function( newDefer ) { - - // progress_handlers.add( ... ) - tuples[ 0 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onProgress ) ? - onProgress : - Identity, - newDefer.notifyWith - ) - ); - - // fulfilled_handlers.add( ... ) - tuples[ 1 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onFulfilled ) ? - onFulfilled : - Identity - ) - ); - - // rejected_handlers.add( ... ) - tuples[ 2 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onRejected ) ? - onRejected : - Thrower - ) - ); - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 5 ]; - - // promise.progress = list.add - // promise.done = list.add - // promise.fail = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( - function() { - - // state = "resolved" (i.e., fulfilled) - // state = "rejected" - state = stateString; - }, - - // rejected_callbacks.disable - // fulfilled_callbacks.disable - tuples[ 3 - i ][ 2 ].disable, - - // rejected_handlers.disable - // fulfilled_handlers.disable - tuples[ 3 - i ][ 3 ].disable, - - // progress_callbacks.lock - tuples[ 0 ][ 2 ].lock, - - // progress_handlers.lock - tuples[ 0 ][ 3 ].lock - ); - } - - // progress_handlers.fire - // fulfilled_handlers.fire - // rejected_handlers.fire - list.add( tuple[ 3 ].fire ); - - // deferred.notify = function() { deferred.notifyWith(...) } - // deferred.resolve = function() { deferred.resolveWith(...) } - // deferred.reject = function() { deferred.rejectWith(...) } - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); - return this; - }; - - // deferred.notifyWith = list.fireWith - // deferred.resolveWith = list.fireWith - // deferred.rejectWith = list.fireWith - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( singleValue ) { - var - - // count of uncompleted subordinates - remaining = arguments.length, - - // count of unprocessed arguments - i = remaining, - - // subordinate fulfillment data - resolveContexts = Array( i ), - resolveValues = slice.call( arguments ), - - // the master Deferred - master = jQuery.Deferred(), - - // subordinate callback factory - updateFunc = function( i ) { - return function( value ) { - resolveContexts[ i ] = this; - resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( !( --remaining ) ) { - master.resolveWith( resolveContexts, resolveValues ); - } - }; - }; - - // Single- and empty arguments are adopted like Promise.resolve - if ( remaining <= 1 ) { - adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, - !remaining ); - - // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( master.state() === "pending" || - isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - - return master.then(); - } - } - - // Multiple arguments are aggregated like Promise.all array elements - while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); - } - - return master.promise(); - } -} ); - - -// These usually indicate a programmer mistake during development, -// warn about them ASAP rather than swallowing them by default. -var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - -jQuery.Deferred.exceptionHook = function( error, stack ) { - - // Support: IE 8 - 9 only - // Console exists when dev tools are open, which can happen at any time - if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { - window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); - } -}; - - - - -jQuery.readyException = function( error ) { - window.setTimeout( function() { - throw error; - } ); -}; - - - - -// The deferred used on DOM ready -var readyList = jQuery.Deferred(); - -jQuery.fn.ready = function( fn ) { - - readyList - .then( fn ) - - // Wrap jQuery.readyException in a function so that the lookup - // happens at the time of error handling instead of callback - // registration. - .catch( function( error ) { - jQuery.readyException( error ); - } ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - } -} ); - -jQuery.ready.then = readyList.then; - -// The ready event handler and self cleanup method -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -// Catch cases where $(document).ready() is called -// after the browser event has already occurred. -// Support: IE <=9 - 10 only -// Older IE sometimes signals "interactive" too soon -if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - -} else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); -} - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( toType( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, _key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - if ( chainable ) { - return elems; - } - - // Gets - if ( bulk ) { - return fn.call( elems ); - } - - return len ? fn( elems[ 0 ], key ) : emptyGet; -}; - - -// Matches dashed string for camelizing -var rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g; - -// Used by camelCase as callback to replace() -function fcamelCase( _all, letter ) { - return letter.toUpperCase(); -} - -// Convert dashed to camelCase; used by the css and data modules -// Support: IE <=9 - 11, Edge 12 - 15 -// Microsoft forgot to hump their vendor prefix (#9572) -function camelCase( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); -} -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - cache: function( owner ) { - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - // Always use camelCase key (gh-2257) - if ( typeof data === "string" ) { - cache[ camelCase( data ) ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ camelCase( prop ) ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - - // Always use camelCase key (gh-2257) - owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; - }, - access: function( owner, key, value ) { - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - return this.get( owner, key ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key !== undefined ) { - - // Support array or space separated string of keys - if ( Array.isArray( key ) ) { - - // If key is an array of keys... - // We always set camelCase keys, so remove that. - key = key.map( camelCase ); - } else { - key = camelCase( key ); - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - key = key in cache ? - [ key ] : - ( key.match( rnothtmlwhite ) || [] ); - } - - i = key.length; - - while ( i-- ) { - delete cache[ key[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <=35 - 45 - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function getData( data ) { - if ( data === "true" ) { - return true; - } - - if ( data === "false" ) { - return false; - } - - if ( data === "null" ) { - return null; - } - - // Only convert to a number if it doesn't change the string - if ( data === +data + "" ) { - return +data; - } - - if ( rbrace.test( data ) ) { - return JSON.parse( data ); - } - - return data; -} - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = getData( data ); - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE 11 only - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // The key will always be camelCased in Data - data = dataUser.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, key ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each( function() { - - // We always store the camelCased key - dataUser.set( this, key, value ); - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || Array.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var documentElement = document.documentElement; - - - - var isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ); - }, - composed = { composed: true }; - - // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only - // Check attachment across shadow DOM boundaries when possible (gh-3504) - // Support: iOS 10.0-10.2 only - // Early iOS 10 versions support `attachShadow` but not `getRootNode`, - // leading to errors. We need to check for `getRootNode`. - if ( documentElement.getRootNode ) { - isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ) || - elem.getRootNode( composed ) === elem.ownerDocument; - }; - } -var isHiddenWithinTree = function( elem, el ) { - - // isHiddenWithinTree might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - - // Inline style trumps all - return elem.style.display === "none" || - elem.style.display === "" && + (typeof returned === 'object' || + typeof returned === 'function') && + returned.then + + // Handle a returned thenable + if (isFunction(then)) { + // Special processors (notify) just wait for resolution + if (special) { + then.call( + returned, + resolve(maxDepth, deferred, Identity, special), + resolve(maxDepth, deferred, Thrower, special) + ) + + // Normal processors (resolve) also hook into progress + } else { + // ...and disregard older resolution values + maxDepth++ + + then.call( + returned, + resolve(maxDepth, deferred, Identity, special), + resolve(maxDepth, deferred, Thrower, special), + resolve(maxDepth, deferred, Identity, + deferred.notifyWith) + ) + } + + // Handle all other returned values + } else { + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if (handler !== Identity) { + that = undefined + args = [returned] + } + + // Process the value(s) + // Default process is resolve + (special || deferred.resolveWith)(that, args) + } + } + + // Only normal processors (resolve) catch and reject exceptions + var process = special + ? mightThrow + : function () { + try { + mightThrow() + } catch (e) { + if (jQuery.Deferred.exceptionHook) { + jQuery.Deferred.exceptionHook(e, + process.stackTrace) + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if (depth + 1 >= maxDepth) { + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if (handler !== Thrower) { + that = undefined + args = [e] + } + + deferred.rejectWith(that, args) + } + } + } + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if (depth) { + process() + } else { + // Call an optional hook to record the stack, in case of exception + // since it's otherwise lost when execution goes async + if (jQuery.Deferred.getStackHook) { + process.stackTrace = jQuery.Deferred.getStackHook() + } + window.setTimeout(process) + } + } + } + + return jQuery.Deferred(function (newDefer) { + // progress_handlers.add( ... ) + tuples[0][3].add( + resolve( + 0, + newDefer, + isFunction(onProgress) + ? onProgress + : Identity, + newDefer.notifyWith + ) + ) + + // fulfilled_handlers.add( ... ) + tuples[1][3].add( + resolve( + 0, + newDefer, + isFunction(onFulfilled) + ? onFulfilled + : Identity + ) + ) + + // rejected_handlers.add( ... ) + tuples[2][3].add( + resolve( + 0, + newDefer, + isFunction(onRejected) + ? onRejected + : Thrower + ) + ) + }).promise() + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function (obj) { + return obj != null ? jQuery.extend(obj, promise) : promise + } + } + var deferred = {} + + // Add list-specific methods + jQuery.each(tuples, function (i, tuple) { + var list = tuple[2] + var stateString = tuple[5] + + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[tuple[1]] = list.add + + // Handle state + if (stateString) { + list.add( + function () { + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[3 - i][2].disable, + + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[3 - i][3].disable, + + // progress_callbacks.lock + tuples[0][2].lock, + + // progress_handlers.lock + tuples[0][3].lock + ) + } + + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add(tuple[3].fire) + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[tuple[0]] = function () { + deferred[tuple[0] + 'With'](this === deferred ? undefined : this, arguments) + return this + } + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[tuple[0] + 'With'] = list.fireWith + }) + + // Make the deferred a promise + promise.promise(deferred) + + // Call given func if any + if (func) { + func.call(deferred, deferred) + } + + // All done! + return deferred + }, + + // Deferred helper + when: function (singleValue) { + var + + // count of uncompleted subordinates + remaining = arguments.length + + // count of unprocessed arguments + var i = remaining + + // subordinate fulfillment data + var resolveContexts = Array(i) + var resolveValues = slice.call(arguments) + + // the master Deferred + var master = jQuery.Deferred() + + // subordinate callback factory + var updateFunc = function (i) { + return function (value) { + resolveContexts[i] = this + resolveValues[i] = arguments.length > 1 ? slice.call(arguments) : value + if (!(--remaining)) { + master.resolveWith(resolveContexts, resolveValues) + } + } + } + + // Single- and empty arguments are adopted like Promise.resolve + if (remaining <= 1) { + adoptValue(singleValue, master.done(updateFunc(i)).resolve, master.reject, + !remaining) + + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if (master.state() === 'pending' || + isFunction(resolveValues[i] && resolveValues[i].then)) { + return master.then() + } + } + + // Multiple arguments are aggregated like Promise.all array elements + while (i--) { + adoptValue(resolveValues[i], updateFunc(i), master.reject) + } + + return master.promise() + } + }) + + // These usually indicate a programmer mistake during development, + // warn about them ASAP rather than swallowing them by default. + var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/ + + jQuery.Deferred.exceptionHook = function (error, stack) { + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if (window.console && window.console.warn && error && rerrorNames.test(error.name)) { + window.console.warn('jQuery.Deferred exception: ' + error.message, error.stack, stack) + } + } + + jQuery.readyException = function (error) { + window.setTimeout(function () { + throw error + }) + } + + // The deferred used on DOM ready + var readyList = jQuery.Deferred() + + jQuery.fn.ready = function (fn) { + readyList + .then(fn) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch(function (error) { + jQuery.readyException(error) + }) + + return this + } + + jQuery.extend({ + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function (wait) { + // Abort if there are pending holds or we're already ready + if (wait === true ? --jQuery.readyWait : jQuery.isReady) { + return + } + + // Remember that the DOM is ready + jQuery.isReady = true + + // If a normal DOM Ready event fired, decrement, and wait if need be + if (wait !== true && --jQuery.readyWait > 0) { + return + } + + // If there are functions bound, to execute + readyList.resolveWith(document, [jQuery]) + } + }) + + jQuery.ready.then = readyList.then + + // The ready event handler and self cleanup method + function completed () { + document.removeEventListener('DOMContentLoaded', completed) + window.removeEventListener('load', completed) + jQuery.ready() + } + + // Catch cases where $(document).ready() is called + // after the browser event has already occurred. + // Support: IE <=9 - 10 only + // Older IE sometimes signals "interactive" too soon + if (document.readyState === 'complete' || + (document.readyState !== 'loading' && !document.documentElement.doScroll)) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout(jQuery.ready) + } else { + // Use the handy event callback + document.addEventListener('DOMContentLoaded', completed) + + // A fallback to window.onload, that will always work + window.addEventListener('load', completed) + } + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + var access = function (elems, fn, key, value, chainable, emptyGet, raw) { + var i = 0 + var len = elems.length + var bulk = key == null + + // Sets many values + if (toType(key) === 'object') { + chainable = true + for (i in key) { + access(elems, fn, i, key[i], true, emptyGet, raw) + } + + // Sets one value + } else if (value !== undefined) { + chainable = true + + if (!isFunction(value)) { + raw = true + } + + if (bulk) { + // Bulk operations run against the entire set + if (raw) { + fn.call(elems, value) + fn = null + + // ...except when executing function values + } else { + bulk = fn + fn = function (elem, _key, value) { + return bulk.call(jQuery(elem), value) + } + } + } + + if (fn) { + for (; i < len; i++) { + fn( + elems[i], key, raw + ? value + : value.call(elems[i], i, fn(elems[i], key)) + ) + } + } + } + + if (chainable) { + return elems + } + + // Gets + if (bulk) { + return fn.call(elems) + } + + return len ? fn(elems[0], key) : emptyGet + } + + // Matches dashed string for camelizing + var rmsPrefix = /^-ms-/ + var rdashAlpha = /-([a-z])/g + + // Used by camelCase as callback to replace() + function fcamelCase (_all, letter) { + return letter.toUpperCase() + } + + // Convert dashed to camelCase; used by the css and data modules + // Support: IE <=9 - 11, Edge 12 - 15 + // Microsoft forgot to hump their vendor prefix (#9572) + function camelCase (string) { + return string.replace(rmsPrefix, 'ms-').replace(rdashAlpha, fcamelCase) + } + var acceptData = function (owner) { + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !(+owner.nodeType) + } + + function Data () { + this.expando = jQuery.expando + Data.uid++ + } + + Data.uid = 1 + + Data.prototype = { + + cache: function (owner) { + // Check if the owner object already has a cache + var value = owner[this.expando] + + // If not, create one + if (!value) { + value = {} + + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return an empty object. + if (acceptData(owner)) { + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if (owner.nodeType) { + owner[this.expando] = value + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty(owner, this.expando, { + value: value, + configurable: true + }) + } + } + } + + return value + }, + set: function (owner, data, value) { + var prop + var cache = this.cache(owner) + + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if (typeof data === 'string') { + cache[camelCase(data)] = value + + // Handle: [ owner, { properties } ] args + } else { + // Copy the properties one-by-one to the cache object + for (prop in data) { + cache[camelCase(prop)] = data[prop] + } + } + return cache + }, + get: function (owner, key) { + return key === undefined + ? this.cache(owner) + + // Always use camelCase key (gh-2257) + : owner[this.expando] && owner[this.expando][camelCase(key)] + }, + access: function (owner, key, value) { + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if (key === undefined || + ((key && typeof key === 'string') && value === undefined)) { + return this.get(owner, key) + } + + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set(owner, key, value) + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key + }, + remove: function (owner, key) { + var i + var cache = owner[this.expando] + + if (cache === undefined) { + return + } + + if (key !== undefined) { + // Support array or space separated string of keys + if (Array.isArray(key)) { + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map(camelCase) + } else { + key = camelCase(key) + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache + ? [key] + : (key.match(rnothtmlwhite) || []) + } + + i = key.length + + while (i--) { + delete cache[key[i]] + } + } + + // Remove the expando if there's no more data + if (key === undefined || jQuery.isEmptyObject(cache)) { + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if (owner.nodeType) { + owner[this.expando] = undefined + } else { + delete owner[this.expando] + } + } + }, + hasData: function (owner) { + var cache = owner[this.expando] + return cache !== undefined && !jQuery.isEmptyObject(cache) + } + } + var dataPriv = new Data() + + var dataUser = new Data() + + // Implementation Summary + // + // 1. Enforce API surface and semantic compatibility with 1.9.x branch + // 2. Improve the module's maintainability by reducing the storage + // paths to a single mechanism. + // 3. Use the same single mechanism to support "private" and "user" data. + // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) + // 5. Avoid exposing implementation details on user objects (eg. expando properties) + // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + + var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/ + var rmultiDash = /[A-Z]/g + + function getData (data) { + if (data === 'true') { + return true + } + + if (data === 'false') { + return false + } + + if (data === 'null') { + return null + } + + // Only convert to a number if it doesn't change the string + if (data === +data + '') { + return +data + } + + if (rbrace.test(data)) { + return JSON.parse(data) + } + + return data + } + + function dataAttr (elem, key, data) { + var name + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if (data === undefined && elem.nodeType === 1) { + name = 'data-' + key.replace(rmultiDash, '-$&').toLowerCase() + data = elem.getAttribute(name) + + if (typeof data === 'string') { + try { + data = getData(data) + } catch (e) {} + + // Make sure we set the data so it isn't changed later + dataUser.set(elem, key, data) + } else { + data = undefined + } + } + return data + } + + jQuery.extend({ + hasData: function (elem) { + return dataUser.hasData(elem) || dataPriv.hasData(elem) + }, + + data: function (elem, name, data) { + return dataUser.access(elem, name, data) + }, + + removeData: function (elem, name) { + dataUser.remove(elem, name) + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. + _data: function (elem, name, data) { + return dataPriv.access(elem, name, data) + }, + + _removeData: function (elem, name) { + dataPriv.remove(elem, name) + } + }) + + jQuery.fn.extend({ + data: function (key, value) { + var i; var name; var data + var elem = this[0] + var attrs = elem && elem.attributes + + // Gets all values + if (key === undefined) { + if (this.length) { + data = dataUser.get(elem) + + if (elem.nodeType === 1 && !dataPriv.get(elem, 'hasDataAttrs')) { + i = attrs.length + while (i--) { + // Support: IE 11 only + // The attrs elements can be null (#14894) + if (attrs[i]) { + name = attrs[i].name + if (name.indexOf('data-') === 0) { + name = camelCase(name.slice(5)) + dataAttr(elem, name, data[name]) + } + } + } + dataPriv.set(elem, 'hasDataAttrs', true) + } + } + + return data + } + + // Sets multiple values + if (typeof key === 'object') { + return this.each(function () { + dataUser.set(this, key) + }) + } + + return access(this, function (value) { + var data + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if (elem && value === undefined) { + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get(elem, key) + if (data !== undefined) { + return data + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr(elem, key) + if (data !== undefined) { + return data + } + + // We tried really hard, but the data doesn't exist. + return + } + + // Set the data... + this.each(function () { + // We always store the camelCased key + dataUser.set(this, key, value) + }) + }, null, value, arguments.length > 1, null, true) + }, + + removeData: function (key) { + return this.each(function () { + dataUser.remove(this, key) + }) + } + }) + + jQuery.extend({ + queue: function (elem, type, data) { + var queue + + if (elem) { + type = (type || 'fx') + 'queue' + queue = dataPriv.get(elem, type) + + // Speed up dequeue by getting out quickly if this is just a lookup + if (data) { + if (!queue || Array.isArray(data)) { + queue = dataPriv.access(elem, type, jQuery.makeArray(data)) + } else { + queue.push(data) + } + } + return queue || [] + } + }, + + dequeue: function (elem, type) { + type = type || 'fx' + + var queue = jQuery.queue(elem, type) + var startLength = queue.length + var fn = queue.shift() + var hooks = jQuery._queueHooks(elem, type) + var next = function () { + jQuery.dequeue(elem, type) + } + + // If the fx queue is dequeued, always remove the progress sentinel + if (fn === 'inprogress') { + fn = queue.shift() + startLength-- + } + + if (fn) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if (type === 'fx') { + queue.unshift('inprogress') + } + + // Clear up the last queue stop function + delete hooks.stop + fn.call(elem, next, hooks) + } + + if (!startLength && hooks) { + hooks.empty.fire() + } + }, + + // Not public - generate a queueHooks object, or return the current one + _queueHooks: function (elem, type) { + var key = type + 'queueHooks' + return dataPriv.get(elem, key) || dataPriv.access(elem, key, { + empty: jQuery.Callbacks('once memory').add(function () { + dataPriv.remove(elem, [type + 'queue', key]) + }) + }) + } + }) + + jQuery.fn.extend({ + queue: function (type, data) { + var setter = 2 + + if (typeof type !== 'string') { + data = type + type = 'fx' + setter-- + } + + if (arguments.length < setter) { + return jQuery.queue(this[0], type) + } + + return data === undefined + ? this + : this.each(function () { + var queue = jQuery.queue(this, type, data) + + // Ensure a hooks for this queue + jQuery._queueHooks(this, type) + + if (type === 'fx' && queue[0] !== 'inprogress') { + jQuery.dequeue(this, type) + } + }) + }, + dequeue: function (type) { + return this.each(function () { + jQuery.dequeue(this, type) + }) + }, + clearQueue: function (type) { + return this.queue(type || 'fx', []) + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function (type, obj) { + var tmp + var count = 1 + var defer = jQuery.Deferred() + var elements = this + var i = this.length + var resolve = function () { + if (!(--count)) { + defer.resolveWith(elements, [elements]) + } + } + + if (typeof type !== 'string') { + obj = type + type = undefined + } + type = type || 'fx' + + while (i--) { + tmp = dataPriv.get(elements[i], type + 'queueHooks') + if (tmp && tmp.empty) { + count++ + tmp.empty.add(resolve) + } + } + resolve() + return defer.promise(obj) + } + }) + var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source + + var rcssNum = new RegExp('^(?:([+-])=|)(' + pnum + ')([a-z%]*)$', 'i') + + var cssExpand = ['Top', 'Right', 'Bottom', 'Left'] + + var documentElement = document.documentElement + + var isAttached = function (elem) { + return jQuery.contains(elem.ownerDocument, elem) + } + var composed = { composed: true } + + // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only + // Check attachment across shadow DOM boundaries when possible (gh-3504) + // Support: iOS 10.0-10.2 only + // Early iOS 10 versions support `attachShadow` but not `getRootNode`, + // leading to errors. We need to check for `getRootNode`. + if (documentElement.getRootNode) { + isAttached = function (elem) { + return jQuery.contains(elem.ownerDocument, elem) || + elem.getRootNode(composed) === elem.ownerDocument + } + } + var isHiddenWithinTree = function (elem, el) { + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem + + // Inline style trumps all + return elem.style.display === 'none' || + elem.style.display === '' && // Otherwise, check computed style // Support: Firefox <=43 - 45 // Disconnected elements can have computed display: none, so first confirm that elem is // in the document. - isAttached( elem ) && - - jQuery.css( elem, "display" ) === "none"; - }; - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, scale, - maxIterations = 20, - currentValue = tween ? - function() { - return tween.cur(); - } : - function() { - return jQuery.css( elem, prop, "" ); - }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = elem.nodeType && - ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Support: Firefox <=54 - // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) - initial = initial / 2; - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - while ( maxIterations-- ) { - - // Evaluate and update our best guess (doubling guesses that zero out). - // Finish if the scale equals or crosses 1 (making the old*new product non-positive). - jQuery.style( elem, prop, initialInUnit + unit ); - if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { - maxIterations = 0; - } - initialInUnit = initialInUnit / scale; - - } - - initialInUnit = initialInUnit * 2; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} - - -var defaultDisplayMap = {}; - -function getDefaultDisplay( elem ) { - var temp, - doc = elem.ownerDocument, - nodeName = elem.nodeName, - display = defaultDisplayMap[ nodeName ]; - - if ( display ) { - return display; - } - - temp = doc.body.appendChild( doc.createElement( nodeName ) ); - display = jQuery.css( temp, "display" ); - - temp.parentNode.removeChild( temp ); - - if ( display === "none" ) { - display = "block"; - } - defaultDisplayMap[ nodeName ] = display; - - return display; -} - -function showHide( elements, show ) { - var display, elem, - values = [], - index = 0, - length = elements.length; - - // Determine new display value for elements that need to change - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - display = elem.style.display; - if ( show ) { - - // Since we force visibility upon cascade-hidden elements, an immediate (and slow) - // check is required in this first loop unless we have a nonempty display value (either - // inline or about-to-be-restored) - if ( display === "none" ) { - values[ index ] = dataPriv.get( elem, "display" ) || null; - if ( !values[ index ] ) { - elem.style.display = ""; - } - } - if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { - values[ index ] = getDefaultDisplay( elem ); - } - } else { - if ( display !== "none" ) { - values[ index ] = "none"; - - // Remember what we're overwriting - dataPriv.set( elem, "display", display ); - } - } - } - - // Set the display of the elements in a second loop to avoid constant reflow - for ( index = 0; index < length; index++ ) { - if ( values[ index ] != null ) { - elements[ index ].style.display = values[ index ]; - } - } - - return elements; -} - -jQuery.fn.extend( { - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each( function() { - if ( isHiddenWithinTree( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - } ); - } -} ); -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); - -var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); - - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; - - // Support: IE <=9 only - // IE <=9 replaces "; - support.option = !!div.lastChild; -} )(); - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
" ], - col: [ 2, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - _default: [ 0, "", "" ] -}; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// Support: IE <=9 only -if ( !support.option ) { - wrapMap.optgroup = wrapMap.option = [ 1, "" ]; -} - - -function getAll( context, tag ) { - - // Support: IE <=9 - 11 only - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret; - - if ( typeof context.getElementsByTagName !== "undefined" ) { - ret = context.getElementsByTagName( tag || "*" ); - - } else if ( typeof context.querySelectorAll !== "undefined" ) { - ret = context.querySelectorAll( tag || "*" ); - - } else { - ret = []; - } - - if ( tag === undefined || tag && nodeName( context, tag ) ) { - return jQuery.merge( [ context ], ret ); - } - - return ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, attached, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( toType( elem ) === "object" ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - attached = isAttached( elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( attached ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE <=9 - 11+ -// focus() and blur() are asynchronous, except when they are no-op. -// So expect focus to be synchronous when the element is already active, -// and blur to be synchronous when the element is not already active. -// (focus and blur are always synchronous in other supported browsers, -// this just defines when we can count on it). -function expectSync( elem, type ) { - return ( elem === safeActiveElement() ) === ( type === "focus" ); -} - -// Support: IE <=9 only -// Accessing document.activeElement can throw unexpectedly -// https://bugs.jquery.com/ticket/13393 -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* + isAttached(elem) && + + jQuery.css(elem, 'display') === 'none' + } + + function adjustCSS (elem, prop, valueParts, tween) { + var adjusted; var scale + var maxIterations = 20 + var currentValue = tween + ? function () { + return tween.cur() + } + : function () { + return jQuery.css(elem, prop, '') + } + var initial = currentValue() + var unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? '' : 'px') + + // Starting value computation is required for potential unit mismatches + var initialInUnit = elem.nodeType && + (jQuery.cssNumber[prop] || unit !== 'px' && +initial) && + rcssNum.exec(jQuery.css(elem, prop)) + + if (initialInUnit && initialInUnit[3] !== unit) { + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2 + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[3] + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1 + + while (maxIterations--) { + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). + jQuery.style(elem, prop, initialInUnit + unit) + if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) { + maxIterations = 0 + } + initialInUnit = initialInUnit / scale + } + + initialInUnit = initialInUnit * 2 + jQuery.style(elem, prop, initialInUnit + unit) + + // Make sure we update the tween properties later on + valueParts = valueParts || [] + } + + if (valueParts) { + initialInUnit = +initialInUnit || +initial || 0 + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[1] + ? initialInUnit + (valueParts[1] + 1) * valueParts[2] + : +valueParts[2] + if (tween) { + tween.unit = unit + tween.start = initialInUnit + tween.end = adjusted + } + } + return adjusted + } + + var defaultDisplayMap = {} + + function getDefaultDisplay (elem) { + var temp + var doc = elem.ownerDocument + var nodeName = elem.nodeName + var display = defaultDisplayMap[nodeName] + + if (display) { + return display + } + + temp = doc.body.appendChild(doc.createElement(nodeName)) + display = jQuery.css(temp, 'display') + + temp.parentNode.removeChild(temp) + + if (display === 'none') { + display = 'block' + } + defaultDisplayMap[nodeName] = display + + return display + } + + function showHide (elements, show) { + var display; var elem + var values = [] + var index = 0 + var length = elements.length + + // Determine new display value for elements that need to change + for (; index < length; index++) { + elem = elements[index] + if (!elem.style) { + continue + } + + display = elem.style.display + if (show) { + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if (display === 'none') { + values[index] = dataPriv.get(elem, 'display') || null + if (!values[index]) { + elem.style.display = '' + } + } + if (elem.style.display === '' && isHiddenWithinTree(elem)) { + values[index] = getDefaultDisplay(elem) + } + } else { + if (display !== 'none') { + values[index] = 'none' + + // Remember what we're overwriting + dataPriv.set(elem, 'display', display) + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for (index = 0; index < length; index++) { + if (values[index] != null) { + elements[index].style.display = values[index] + } + } + + return elements + } + + jQuery.fn.extend({ + show: function () { + return showHide(this, true) + }, + hide: function () { + return showHide(this) + }, + toggle: function (state) { + if (typeof state === 'boolean') { + return state ? this.show() : this.hide() + } + + return this.each(function () { + if (isHiddenWithinTree(this)) { + jQuery(this).show() + } else { + jQuery(this).hide() + } + }) + } + }) + var rcheckableType = (/^(?:checkbox|radio)$/i) + + var rtagName = (/<([a-z][^\/\0>\x20\t\r\n\f]*)/i) + + var rscriptType = (/^$|^module$|\/(?:java|ecma)script/i); + + (function () { + var fragment = document.createDocumentFragment() + var div = fragment.appendChild(document.createElement('div')) + var input = document.createElement('input') + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute('type', 'radio') + input.setAttribute('checked', 'checked') + input.setAttribute('name', 't') + + div.appendChild(input) + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = '' + support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue + + // Support: IE <=9 only + // IE <=9 replaces ' + support.option = !!div.lastChild + })() + + // We have to close these tags to support XHTML (#13200) + var wrapMap = { + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting or other required elements. + thead: [1, '', '
'], + col: [2, '', '
'], + tr: [2, '', '
'], + td: [3, '', '
'], + + _default: [0, '', ''] + } + + wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead + wrapMap.th = wrapMap.td + + // Support: IE <=9 only + if (!support.option) { + wrapMap.optgroup = wrapMap.option = [1, "'] + } + + function getAll (context, tag) { + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret + + if (typeof context.getElementsByTagName !== 'undefined') { + ret = context.getElementsByTagName(tag || '*') + } else if (typeof context.querySelectorAll !== 'undefined') { + ret = context.querySelectorAll(tag || '*') + } else { + ret = [] + } + + if (tag === undefined || tag && nodeName(context, tag)) { + return jQuery.merge([context], ret) + } + + return ret + } + + // Mark scripts as having already been evaluated + function setGlobalEval (elems, refElements) { + var i = 0 + var l = elems.length + + for (; i < l; i++) { + dataPriv.set( + elems[i], + 'globalEval', + !refElements || dataPriv.get(refElements[i], 'globalEval') + ) + } + } + + var rhtml = /<|&#?\w+;/ + + function buildFragment (elems, context, scripts, selection, ignored) { + var elem; var tmp; var tag; var wrap; var attached; var j + var fragment = context.createDocumentFragment() + var nodes = [] + var i = 0 + var l = elems.length + + for (; i < l; i++) { + elem = elems[i] + + if (elem || elem === 0) { + // Add nodes directly + if (toType(elem) === 'object') { + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge(nodes, elem.nodeType ? [elem] : elem) + + // Convert non-html into a text node + } else if (!rhtml.test(elem)) { + nodes.push(context.createTextNode(elem)) + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild(context.createElement('div')) + + // Deserialize a standard representation + tag = (rtagName.exec(elem) || ['', ''])[1].toLowerCase() + wrap = wrapMap[tag] || wrapMap._default + tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2] + + // Descend through wrappers to the right content + j = wrap[0] + while (j--) { + tmp = tmp.lastChild + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge(nodes, tmp.childNodes) + + // Remember the top-level container + tmp = fragment.firstChild + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = '' + } + } + } + + // Remove wrapper from fragment + fragment.textContent = '' + + i = 0 + while ((elem = nodes[i++])) { + // Skip elements already in the context collection (trac-4087) + if (selection && jQuery.inArray(elem, selection) > -1) { + if (ignored) { + ignored.push(elem) + } + continue + } + + attached = isAttached(elem) + + // Append to fragment + tmp = getAll(fragment.appendChild(elem), 'script') + + // Preserve script evaluation history + if (attached) { + setGlobalEval(tmp) + } + + // Capture executables + if (scripts) { + j = 0 + while ((elem = tmp[j++])) { + if (rscriptType.test(elem.type || '')) { + scripts.push(elem) + } + } + } + } + + return fragment + } + + var + rkeyEvent = /^key/ + var rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/ + var rtypenamespace = /^([^.]*)(?:\.(.+)|)/ + + function returnTrue () { + return true + } + + function returnFalse () { + return false + } + + // Support: IE <=9 - 11+ + // focus() and blur() are asynchronous, except when they are no-op. + // So expect focus to be synchronous when the element is already active, + // and blur to be synchronous when the element is not already active. + // (focus and blur are always synchronous in other supported browsers, + // this just defines when we can count on it). + function expectSync (elem, type) { + return (elem === safeActiveElement()) === (type === 'focus') + } + + // Support: IE <=9 only + // Accessing document.activeElement can throw unexpectedly + // https://bugs.jquery.com/ticket/13393 + function safeActiveElement () { + try { + return document.activeElement + } catch (err) { } + } + + function on (elem, types, selector, data, fn, one) { + var origFn, type + + // Types can be a map of types/handlers + if (typeof types === 'object') { + // ( types-Object, selector, data ) + if (typeof selector !== 'string') { + // ( types-Object, data ) + data = data || selector + selector = undefined + } + for (type in types) { + on(elem, type, selector, data, types[type], one) + } + return elem + } + + if (data == null && fn == null) { + // ( types, fn ) + fn = selector + data = selector = undefined + } else if (fn == null) { + if (typeof selector === 'string') { + // ( types, selector, fn ) + fn = data + data = undefined + } else { + // ( types, data, fn ) + fn = data + data = selector + selector = undefined + } + } + if (fn === false) { + fn = returnFalse + } else if (!fn) { + return elem + } + + if (one === 1) { + origFn = fn + fn = function (event) { + // Can use an empty set, since event contains the info + jQuery().off(event) + return origFn.apply(this, arguments) + } + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || (origFn.guid = jQuery.guid++) + } + return elem.each(function () { + jQuery.event.add(this, types, fn, data, selector) + }) + } + + /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Only attach events to objects that accept data - if ( !acceptData( elem ) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Ensure that invalid selectors throw exceptions at attach time - // Evaluate against documentElement in case elem is a non-element node (e.g., document) - if ( selector ) { - jQuery.find.matchesSelector( documentElement, selector ); - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = Object.create( null ); - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( nativeEvent ) { - - var i, j, ret, matched, handleObj, handlerQueue, - args = new Array( arguments.length ), - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( nativeEvent ), - - handlers = ( - dataPriv.get( this, "events" ) || Object.create( null ) - )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - - for ( i = 1; i < arguments.length; i++ ) { - args[ i ] = arguments[ i ]; - } - - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // If the event is namespaced, then each handler is only invoked if it is - // specially universal or its namespaces are a superset of the event's. - if ( !event.rnamespace || handleObj.namespace === false || - event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, handleObj, sel, matchedHandlers, matchedSelectors, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - if ( delegateCount && + jQuery.event = { + + global: {}, + + add: function (elem, types, handler, data, selector) { + var handleObjIn; var eventHandle; var tmp + var events; var t; var handleObj + var special; var handlers; var type; var namespaces; var origType + var elemData = dataPriv.get(elem) + + // Only attach events to objects that accept data + if (!acceptData(elem)) { + return + } + + // Caller can pass in an object of custom data in lieu of the handler + if (handler.handler) { + handleObjIn = handler + handler = handleObjIn.handler + selector = handleObjIn.selector + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if (selector) { + jQuery.find.matchesSelector(documentElement, selector) + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if (!handler.guid) { + handler.guid = jQuery.guid++ + } + + // Init the element's event structure and main handler, if this is the first + if (!(events = elemData.events)) { + events = elemData.events = Object.create(null) + } + if (!(eventHandle = elemData.handle)) { + eventHandle = elemData.handle = function (e) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== 'undefined' && jQuery.event.triggered !== e.type + ? jQuery.event.dispatch.apply(elem, arguments) : undefined + } + } + + // Handle multiple events separated by a space + types = (types || '').match(rnothtmlwhite) || [''] + t = types.length + while (t--) { + tmp = rtypenamespace.exec(types[t]) || [] + type = origType = tmp[1] + namespaces = (tmp[2] || '').split('.').sort() + + // There *must* be a type, no attaching namespace-only handlers + if (!type) { + continue + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[type] || {} + + // If selector defined, determine special event api type, otherwise given type + type = (selector ? special.delegateType : special.bindType) || type + + // Update special based on newly reset type + special = jQuery.event.special[type] || {} + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test(selector), + namespace: namespaces.join('.') + }, handleObjIn) + + // Init the event handler queue if we're the first + if (!(handlers = events[type])) { + handlers = events[type] = [] + handlers.delegateCount = 0 + + // Only use addEventListener if the special events handler returns false + if (!special.setup || + special.setup.call(elem, data, namespaces, eventHandle) === false) { + if (elem.addEventListener) { + elem.addEventListener(type, eventHandle) + } + } + } + + if (special.add) { + special.add.call(elem, handleObj) + + if (!handleObj.handler.guid) { + handleObj.handler.guid = handler.guid + } + } + + // Add to the element's handler list, delegates in front + if (selector) { + handlers.splice(handlers.delegateCount++, 0, handleObj) + } else { + handlers.push(handleObj) + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[type] = true + } + }, + + // Detach an event or set of events from an element + remove: function (elem, types, handler, selector, mappedTypes) { + var j; var origCount; var tmp + var events; var t; var handleObj + var special; var handlers; var type; var namespaces; var origType + var elemData = dataPriv.hasData(elem) && dataPriv.get(elem) + + if (!elemData || !(events = elemData.events)) { + return + } + + // Once for each type.namespace in types; type may be omitted + types = (types || '').match(rnothtmlwhite) || [''] + t = types.length + while (t--) { + tmp = rtypenamespace.exec(types[t]) || [] + type = origType = tmp[1] + namespaces = (tmp[2] || '').split('.').sort() + + // Unbind all events (on this namespace, if provided) for the element + if (!type) { + for (type in events) { + jQuery.event.remove(elem, type + types[t], handler, selector, true) + } + continue + } + + special = jQuery.event.special[type] || {} + type = (selector ? special.delegateType : special.bindType) || type + handlers = events[type] || [] + tmp = tmp[2] && + new RegExp('(^|\\.)' + namespaces.join('\\.(?:.*\\.|)') + '(\\.|$)') + + // Remove matching events + origCount = j = handlers.length + while (j--) { + handleObj = handlers[j] + + if ((mappedTypes || origType === handleObj.origType) && + (!handler || handler.guid === handleObj.guid) && + (!tmp || tmp.test(handleObj.namespace)) && + (!selector || selector === handleObj.selector || + selector === '**' && handleObj.selector)) { + handlers.splice(j, 1) + + if (handleObj.selector) { + handlers.delegateCount-- + } + if (special.remove) { + special.remove.call(elem, handleObj) + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if (origCount && !handlers.length) { + if (!special.teardown || + special.teardown.call(elem, namespaces, elemData.handle) === false) { + jQuery.removeEvent(elem, type, elemData.handle) + } + + delete events[type] + } + } + + // Remove data and the expando if it's no longer used + if (jQuery.isEmptyObject(events)) { + dataPriv.remove(elem, 'handle events') + } + }, + + dispatch: function (nativeEvent) { + var i; var j; var ret; var matched; var handleObj; var handlerQueue + var args = new Array(arguments.length) + + // Make a writable jQuery.Event from the native event object + var event = jQuery.event.fix(nativeEvent) + + var handlers = ( + dataPriv.get(this, 'events') || Object.create(null) + )[event.type] || [] + var special = jQuery.event.special[event.type] || {} + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event + + for (i = 1; i < arguments.length; i++) { + args[i] = arguments[i] + } + + event.delegateTarget = this + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if (special.preDispatch && special.preDispatch.call(this, event) === false) { + return + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call(this, event, handlers) + + // Run delegates first; they may want to stop propagation beneath us + i = 0 + while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) { + event.currentTarget = matched.elem + + j = 0 + while ((handleObj = matched.handlers[j++]) && + !event.isImmediatePropagationStopped()) { + // If the event is namespaced, then each handler is only invoked if it is + // specially universal or its namespaces are a superset of the event's. + if (!event.rnamespace || handleObj.namespace === false || + event.rnamespace.test(handleObj.namespace)) { + event.handleObj = handleObj + event.data = handleObj.data + + ret = ((jQuery.event.special[handleObj.origType] || {}).handle || + handleObj.handler).apply(matched.elem, args) + + if (ret !== undefined) { + if ((event.result = ret) === false) { + event.preventDefault() + event.stopPropagation() + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if (special.postDispatch) { + special.postDispatch.call(this, event) + } + + return event.result + }, + + handlers: function (event, handlers) { + var i; var handleObj; var sel; var matchedHandlers; var matchedSelectors + var handlerQueue = [] + var delegateCount = handlers.delegateCount + var cur = event.target + + // Find delegate handlers + if (delegateCount && // Support: IE <=9 // Black-hole SVG instance trees (trac-13180) @@ -5464,1556 +5236,1498 @@ jQuery.event = { // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click // Support: IE 11 only // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) - !( event.type === "click" && event.button >= 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { - matchedHandlers = []; - matchedSelectors = {}; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matchedSelectors[ sel ] === undefined ) { - matchedSelectors[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matchedSelectors[ sel ] ) { - matchedHandlers.push( handleObj ); - } - } - if ( matchedHandlers.length ) { - handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - cur = this; - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - addProp: function( name, hook ) { - Object.defineProperty( jQuery.Event.prototype, name, { - enumerable: true, - configurable: true, - - get: isFunction( hook ) ? - function() { - if ( this.originalEvent ) { - return hook( this.originalEvent ); - } - } : - function() { - if ( this.originalEvent ) { - return this.originalEvent[ name ]; - } - }, - - set: function( value ) { - Object.defineProperty( this, name, { - enumerable: true, - configurable: true, - writable: true, - value: value - } ); - } - } ); - }, - - fix: function( originalEvent ) { - return originalEvent[ jQuery.expando ] ? - originalEvent : - new jQuery.Event( originalEvent ); - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - - // Utilize native event to ensure correct state for checkable inputs - setup: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Claim the first handler - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - // dataPriv.set( el, "click", ... ) - leverageNative( el, "click", returnTrue ); - } - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Force setup before triggering a click - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - leverageNative( el, "click" ); - } - - // Return non-false to allow normal event-path propagation - return true; - }, - - // For cross-browser consistency, suppress native .click() on links - // Also prevent it if we're currently inside a leveraged native-event stack - _default: function( event ) { - var target = event.target; - return rcheckableType.test( target.type ) && - target.click && nodeName( target, "input" ) && - dataPriv.get( target, "click" ) || - nodeName( target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -// Ensure the presence of an event listener that handles manually-triggered -// synthetic events by interrupting progress until reinvoked in response to -// *native* events that it fires directly, ensuring that state changes have -// already occurred before other listeners are invoked. -function leverageNative( el, type, expectSync ) { - - // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add - if ( !expectSync ) { - if ( dataPriv.get( el, type ) === undefined ) { - jQuery.event.add( el, type, returnTrue ); - } - return; - } - - // Register the controller as a special universal handler for all event namespaces - dataPriv.set( el, type, false ); - jQuery.event.add( el, type, { - namespace: false, - handler: function( event ) { - var notAsync, result, - saved = dataPriv.get( this, type ); - - if ( ( event.isTrigger & 1 ) && this[ type ] ) { - - // Interrupt processing of the outer synthetic .trigger()ed event - // Saved data should be false in such cases, but might be a leftover capture object - // from an async native handler (gh-4350) - if ( !saved.length ) { - - // Store arguments for use when handling the inner native event - // There will always be at least one argument (an event object), so this array - // will not be confused with a leftover capture object. - saved = slice.call( arguments ); - dataPriv.set( this, type, saved ); - - // Trigger the native event and capture its result - // Support: IE <=9 - 11+ - // focus() and blur() are asynchronous - notAsync = expectSync( this, type ); - this[ type ](); - result = dataPriv.get( this, type ); - if ( saved !== result || notAsync ) { - dataPriv.set( this, type, false ); - } else { - result = {}; - } - if ( saved !== result ) { - - // Cancel the outer synthetic event - event.stopImmediatePropagation(); - event.preventDefault(); - return result.value; - } - - // If this is an inner synthetic event for an event with a bubbling surrogate - // (focus or blur), assume that the surrogate already propagated from triggering the - // native event and prevent that from happening again here. - // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the - // bubbling surrogate propagates *after* the non-bubbling base), but that seems - // less bad than duplication. - } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { - event.stopPropagation(); - } - - // If this is a native event triggered above, everything is now in order - // Fire an inner synthetic event with the original arguments - } else if ( saved.length ) { - - // ...and capture the result - dataPriv.set( this, type, { - value: jQuery.event.trigger( - - // Support: IE <=9 - 11+ - // Extend with the prototype to reset the above stopImmediatePropagation() - jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), - saved.slice( 1 ), - this - ) - } ); - - // Abort handling of the native event - event.stopImmediatePropagation(); - } - } - } ); -} - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || + !(event.type === 'click' && event.button >= 1)) { + for (; cur !== this; cur = cur.parentNode || this) { + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if (cur.nodeType === 1 && !(event.type === 'click' && cur.disabled === true)) { + matchedHandlers = [] + matchedSelectors = {} + for (i = 0; i < delegateCount; i++) { + handleObj = handlers[i] + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + ' ' + + if (matchedSelectors[sel] === undefined) { + matchedSelectors[sel] = handleObj.needsContext + ? jQuery(sel, this).index(cur) > -1 + : jQuery.find(sel, this, null, [cur]).length + } + if (matchedSelectors[sel]) { + matchedHandlers.push(handleObj) + } + } + if (matchedHandlers.length) { + handlerQueue.push({ elem: cur, handlers: matchedHandlers }) + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this + if (delegateCount < handlers.length) { + handlerQueue.push({ elem: cur, handlers: handlers.slice(delegateCount) }) + } + + return handlerQueue + }, + + addProp: function (name, hook) { + Object.defineProperty(jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: isFunction(hook) + ? function () { + if (this.originalEvent) { + return hook(this.originalEvent) + } + } + : function () { + if (this.originalEvent) { + return this.originalEvent[name] + } + }, + + set: function (value) { + Object.defineProperty(this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + }) + } + }) + }, + + fix: function (originalEvent) { + return originalEvent[jQuery.expando] + ? originalEvent + : new jQuery.Event(originalEvent) + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + click: { + + // Utilize native event to ensure correct state for checkable inputs + setup: function (data) { + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data + + // Claim the first handler + if (rcheckableType.test(el.type) && + el.click && nodeName(el, 'input')) { + // dataPriv.set( el, "click", ... ) + leverageNative(el, 'click', returnTrue) + } + + // Return false to allow normal processing in the caller + return false + }, + trigger: function (data) { + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data + + // Force setup before triggering a click + if (rcheckableType.test(el.type) && + el.click && nodeName(el, 'input')) { + leverageNative(el, 'click') + } + + // Return non-false to allow normal event-path propagation + return true + }, + + // For cross-browser consistency, suppress native .click() on links + // Also prevent it if we're currently inside a leveraged native-event stack + _default: function (event) { + var target = event.target + return rcheckableType.test(target.type) && + target.click && nodeName(target, 'input') && + dataPriv.get(target, 'click') || + nodeName(target, 'a') + } + }, + + beforeunload: { + postDispatch: function (event) { + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if (event.result !== undefined && event.originalEvent) { + event.originalEvent.returnValue = event.result + } + } + } + } + } + + // Ensure the presence of an event listener that handles manually-triggered + // synthetic events by interrupting progress until reinvoked in response to + // *native* events that it fires directly, ensuring that state changes have + // already occurred before other listeners are invoked. + function leverageNative (el, type, expectSync) { + // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add + if (!expectSync) { + if (dataPriv.get(el, type) === undefined) { + jQuery.event.add(el, type, returnTrue) + } + return + } + + // Register the controller as a special universal handler for all event namespaces + dataPriv.set(el, type, false) + jQuery.event.add(el, type, { + namespace: false, + handler: function (event) { + var notAsync; var result + var saved = dataPriv.get(this, type) + + if ((event.isTrigger & 1) && this[type]) { + // Interrupt processing of the outer synthetic .trigger()ed event + // Saved data should be false in such cases, but might be a leftover capture object + // from an async native handler (gh-4350) + if (!saved.length) { + // Store arguments for use when handling the inner native event + // There will always be at least one argument (an event object), so this array + // will not be confused with a leftover capture object. + saved = slice.call(arguments) + dataPriv.set(this, type, saved) + + // Trigger the native event and capture its result + // Support: IE <=9 - 11+ + // focus() and blur() are asynchronous + notAsync = expectSync(this, type) + this[type]() + result = dataPriv.get(this, type) + if (saved !== result || notAsync) { + dataPriv.set(this, type, false) + } else { + result = {} + } + if (saved !== result) { + // Cancel the outer synthetic event + event.stopImmediatePropagation() + event.preventDefault() + return result.value + } + + // If this is an inner synthetic event for an event with a bubbling surrogate + // (focus or blur), assume that the surrogate already propagated from triggering the + // native event and prevent that from happening again here. + // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the + // bubbling surrogate propagates *after* the non-bubbling base), but that seems + // less bad than duplication. + } else if ((jQuery.event.special[type] || {}).delegateType) { + event.stopPropagation() + } + + // If this is a native event triggered above, everything is now in order + // Fire an inner synthetic event with the original arguments + } else if (saved.length) { + // ...and capture the result + dataPriv.set(this, type, { + value: jQuery.event.trigger( + + // Support: IE <=9 - 11+ + // Extend with the prototype to reset the above stopImmediatePropagation() + jQuery.extend(saved[0], jQuery.Event.prototype), + saved.slice(1), + this + ) + }) + + // Abort handling of the native event + event.stopImmediatePropagation() + } + } + }) + } + + jQuery.removeEvent = function (elem, type, handle) { + // This "if" is needed for plain objects + if (elem.removeEventListener) { + elem.removeEventListener(type, handle) + } + } + + jQuery.Event = function (src, props) { + // Allow instantiation without the 'new' keyword + if (!(this instanceof jQuery.Event)) { + return new jQuery.Event(src, props) + } + + // Event object + if (src && src.type) { + this.originalEvent = src + this.type = src.type + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: Android <=2.3 only - src.returnValue === false ? - returnTrue : - returnFalse; - - // Create target properties - // Support: Safari <=6 - 7 only - // Target should not be a text node (#504, #13143) - this.target = ( src.target && src.target.nodeType === 3 ) ? - src.target.parentNode : - src.target; - - this.currentTarget = src.currentTarget; - this.relatedTarget = src.relatedTarget; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || Date.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && !this.isSimulated ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Includes all common event props including KeyEvent and MouseEvent specific props -jQuery.each( { - altKey: true, - bubbles: true, - cancelable: true, - changedTouches: true, - ctrlKey: true, - detail: true, - eventPhase: true, - metaKey: true, - pageX: true, - pageY: true, - shiftKey: true, - view: true, - "char": true, - code: true, - charCode: true, - key: true, - keyCode: true, - button: true, - buttons: true, - clientX: true, - clientY: true, - offsetX: true, - offsetY: true, - pointerId: true, - pointerType: true, - screenX: true, - screenY: true, - targetTouches: true, - toElement: true, - touches: true, - - which: function( event ) { - var button = event.button; - - // Add which for key events - if ( event.which == null && rkeyEvent.test( event.type ) ) { - return event.charCode != null ? event.charCode : event.keyCode; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { - if ( button & 1 ) { - return 1; - } - - if ( button & 2 ) { - return 3; - } - - if ( button & 4 ) { - return 2; - } - - return 0; - } - - return event.which; - } -}, jQuery.event.addProp ); - -jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { - jQuery.event.special[ type ] = { - - // Utilize native event if possible so blur/focus sequence is correct - setup: function() { - - // Claim the first handler - // dataPriv.set( this, "focus", ... ) - // dataPriv.set( this, "blur", ... ) - leverageNative( this, type, expectSync ); - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function() { - - // Force setup before trigger - leverageNative( this, type ); - - // Return non-false to allow normal event-path propagation - return true; - }, - - delegateType: delegateType - }; -} ); - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - - // Support: IE <=10 - 11, Edge 12 - 13 only - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Prefer a tbody over its parent table for containing new rows -function manipulationTarget( elem, content ) { - if ( nodeName( elem, "table" ) && - nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return jQuery( elem ).children( "tbody" )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { - elem.type = elem.type.slice( 5 ); - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.get( src ); - events = pdataOld.events; - - if ( events ) { - dataPriv.remove( dest, "handle events" ); - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = flat( args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - valueIsFunction = isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( valueIsFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( valueIsFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl && !node.noModule ) { - jQuery._evalUrl( node.src, { - nonce: node.nonce || node.getAttribute( "nonce" ) - }, doc ); - } - } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && isAttached( node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html; - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = isAttached( elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: Android <=4.0 only, PhantomJS 1 only - // .get() because push.apply(_, arraylike) throws on ancient WebKit - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); -var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); - -var getStyles = function( elem ) { - - // Support: IE <=11 only, Firefox <=30 (#15098, #14150) - // IE throws on elements created in popups - // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - var view = elem.ownerDocument.defaultView; - - if ( !view || !view.opener ) { - view = window; - } - - return view.getComputedStyle( elem ); - }; - -var swap = function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - -var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); - - - -( function() { - - // Executing both pixelPosition & boxSizingReliable tests require only one layout - // so they're executed at the same time to save the second computation. - function computeStyleTests() { - - // This is a singleton, we need to execute it only once - if ( !div ) { - return; - } - - container.style.cssText = "position:absolute;left:-11111px;width:60px;" + - "margin-top:1px;padding:0;border:0"; - div.style.cssText = - "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + - "margin:auto;border:1px;padding:1px;" + - "width:60%;top:1%"; - documentElement.appendChild( container ).appendChild( div ); - - var divStyle = window.getComputedStyle( div ); - pixelPositionVal = divStyle.top !== "1%"; - - // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 - reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; - - // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 - // Some styles come back with percentage values, even though they shouldn't - div.style.right = "60%"; - pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; - - // Support: IE 9 - 11 only - // Detect misreporting of content dimensions for box-sizing:border-box elements - boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; - - // Support: IE 9 only - // Detect overflow:scroll screwiness (gh-3699) - // Support: Chrome <=64 - // Don't get tricked when zoom affects offsetWidth (gh-4029) - div.style.position = "absolute"; - scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; - - documentElement.removeChild( container ); - - // Nullify the div so it wouldn't be stored in the memory and - // it will also be a sign that checks already performed - div = null; - } - - function roundPixelMeasures( measure ) { - return Math.round( parseFloat( measure ) ); - } - - var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, - reliableTrDimensionsVal, reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - // Support: IE <=9 - 11 only - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - jQuery.extend( support, { - boxSizingReliable: function() { - computeStyleTests(); - return boxSizingReliableVal; - }, - pixelBoxStyles: function() { - computeStyleTests(); - return pixelBoxStylesVal; - }, - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, - reliableMarginLeft: function() { - computeStyleTests(); - return reliableMarginLeftVal; - }, - scrollboxSize: function() { - computeStyleTests(); - return scrollboxSizeVal; - }, - - // Support: IE 9 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Behavior in IE 9 is more subtle than in newer versions & it passes - // some versions of this test; make sure not to make it pass there! - reliableTrDimensions: function() { - var table, tr, trChild, trStyle; - if ( reliableTrDimensionsVal == null ) { - table = document.createElement( "table" ); - tr = document.createElement( "tr" ); - trChild = document.createElement( "div" ); - - table.style.cssText = "position:absolute;left:-11111px"; - tr.style.height = "1px"; - trChild.style.height = "9px"; - - documentElement - .appendChild( table ) - .appendChild( tr ) - .appendChild( trChild ); - - trStyle = window.getComputedStyle( tr ); - reliableTrDimensionsVal = parseInt( trStyle.height ) > 3; - - documentElement.removeChild( table ); - } - return reliableTrDimensionsVal; - } - } ); -} )(); - - -function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - - // Support: Firefox 51+ - // Retrieving style before computed somehow - // fixes an issue with getting wrong values - // on detached elements - style = elem.style; - - computed = computed || getStyles( elem ); - - // getPropertyValue is needed for: - // .css('filter') (IE 9 only, #12537) - // .css('--customProperty) (#3144) - if ( computed ) { - ret = computed.getPropertyValue( name ) || computed[ name ]; - - if ( ret === "" && !isAttached( elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Android Browser returns percentage for some values, - // but width seems to be reliably pixels. - // This is against the CSSOM draft spec: - // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret !== undefined ? - - // Support: IE <=9 - 11 only - // IE returns zIndex value as an integer. - ret + "" : - ret; -} - - -function addGetHookIf( conditionFn, hookFn ) { - - // Define the hook, we'll check on the first run if it's really needed. - return { - get: function() { - if ( conditionFn() ) { - - // Hook not needed (or it's not possible to use it due - // to missing dependency), remove it. - delete this.get; - return; - } - - // Hook needed; redefine it so that the support test is not executed again. - return ( this.get = hookFn ).apply( this, arguments ); - } - }; -} - - -var cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style, - vendorProps = {}; - -// Return a vendor-prefixed property or undefined -function vendorPropName( name ) { - - // Check for vendor prefixed names - var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in emptyStyle ) { - return name; - } - } -} - -// Return a potentially-mapped jQuery.cssProps or vendor prefixed property -function finalPropName( name ) { - var final = jQuery.cssProps[ name ] || vendorProps[ name ]; - - if ( final ) { - return final; - } - if ( name in emptyStyle ) { - return name; - } - return vendorProps[ name ] = vendorPropName( name ) || name; -} - - -var - - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }; - -function setPositiveNumber( _elem, value, subtract ) { - - // Any relative (+/-) values have already been - // normalized at this point - var matches = rcssNum.exec( value ); - return matches ? - - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : - value; -} - -function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { - var i = dimension === "width" ? 1 : 0, - extra = 0, - delta = 0; - - // Adjustment may not be necessary - if ( box === ( isBorderBox ? "border" : "content" ) ) { - return 0; - } - - for ( ; i < 4; i += 2 ) { - - // Both box models exclude margin - if ( box === "margin" ) { - delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); - } - - // If we get here with a content-box, we're seeking "padding" or "border" or "margin" - if ( !isBorderBox ) { - - // Add padding - delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // For "border" or "margin", add border - if ( box !== "padding" ) { - delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - - // But still keep track of it otherwise - } else { - extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - - // If we get here with a border-box (content + padding + border), we're seeking "content" or - // "padding" or "margin" - } else { - - // For "content", subtract padding - if ( box === "content" ) { - delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // For "content" or "padding", subtract border - if ( box !== "margin" ) { - delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - // Account for positive content-box scroll gutter when requested by providing computedVal - if ( !isBorderBox && computedVal >= 0 ) { - - // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border - // Assuming integer scroll gutter, subtract the rest and round down - delta += Math.max( 0, Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + src.returnValue === false + ? returnTrue + : returnFalse + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = (src.target && src.target.nodeType === 3) + ? src.target.parentNode + : src.target + + this.currentTarget = src.currentTarget + this.relatedTarget = src.relatedTarget + + // Event type + } else { + this.type = src + } + + // Put explicitly provided properties onto the event object + if (props) { + jQuery.extend(this, props) + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || Date.now() + + // Mark it as fixed + this[jQuery.expando] = true + } + + // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding + // https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html + jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function () { + var e = this.originalEvent + + this.isDefaultPrevented = returnTrue + + if (e && !this.isSimulated) { + e.preventDefault() + } + }, + stopPropagation: function () { + var e = this.originalEvent + + this.isPropagationStopped = returnTrue + + if (e && !this.isSimulated) { + e.stopPropagation() + } + }, + stopImmediatePropagation: function () { + var e = this.originalEvent + + this.isImmediatePropagationStopped = returnTrue + + if (e && !this.isSimulated) { + e.stopImmediatePropagation() + } + + this.stopPropagation() + } + } + + // Includes all common event props including KeyEvent and MouseEvent specific props + jQuery.each({ + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + char: true, + code: true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + + which: function (event) { + var button = event.button + + // Add which for key events + if (event.which == null && rkeyEvent.test(event.type)) { + return event.charCode != null ? event.charCode : event.keyCode + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + if (!event.which && button !== undefined && rmouseEvent.test(event.type)) { + if (button & 1) { + return 1 + } + + if (button & 2) { + return 3 + } + + if (button & 4) { + return 2 + } + + return 0 + } + + return event.which + } + }, jQuery.event.addProp) + + jQuery.each({ focus: 'focusin', blur: 'focusout' }, function (type, delegateType) { + jQuery.event.special[type] = { + + // Utilize native event if possible so blur/focus sequence is correct + setup: function () { + // Claim the first handler + // dataPriv.set( this, "focus", ... ) + // dataPriv.set( this, "blur", ... ) + leverageNative(this, type, expectSync) + + // Return false to allow normal processing in the caller + return false + }, + trigger: function () { + // Force setup before trigger + leverageNative(this, type) + + // Return non-false to allow normal event-path propagation + return true + }, + + delegateType: delegateType + } + }) + + // Create mouseenter/leave events using mouseover/out and event-time checks + // so that event delegation works in jQuery. + // Do the same for pointerenter/pointerleave and pointerover/pointerout + // + // Support: Safari 7 only + // Safari sends mouseenter too often; see: + // https://bugs.chromium.org/p/chromium/issues/detail?id=470258 + // for the description of the bug (it existed in older Chrome versions as well). + jQuery.each({ + mouseenter: 'mouseover', + mouseleave: 'mouseout', + pointerenter: 'pointerover', + pointerleave: 'pointerout' + }, function (orig, fix) { + jQuery.event.special[orig] = { + delegateType: fix, + bindType: fix, + + handle: function (event) { + var ret + var target = this + var related = event.relatedTarget + var handleObj = event.handleObj + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if (!related || (related !== target && !jQuery.contains(target, related))) { + event.type = handleObj.origType + ret = handleObj.handler.apply(this, arguments) + event.type = fix + } + return ret + } + } + }) + + jQuery.fn.extend({ + + on: function (types, selector, data, fn) { + return on(this, types, selector, data, fn) + }, + one: function (types, selector, data, fn) { + return on(this, types, selector, data, fn, 1) + }, + off: function (types, selector, fn) { + var handleObj, type + if (types && types.preventDefault && types.handleObj) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj + jQuery(types.delegateTarget).off( + handleObj.namespace + ? handleObj.origType + '.' + handleObj.namespace + : handleObj.origType, + handleObj.selector, + handleObj.handler + ) + return this + } + if (typeof types === 'object') { + // ( types-object [, selector] ) + for (type in types) { + this.off(type, selector, types[type]) + } + return this + } + if (selector === false || typeof selector === 'function') { + // ( types [, fn] ) + fn = selector + selector = undefined + } + if (fn === false) { + fn = returnFalse + } + return this.each(function () { + jQuery.event.remove(this, types, fn, selector) + }) + } + }) + + var + + // Support: IE <=10 - 11, Edge 12 - 13 only + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g + + // Prefer a tbody over its parent table for containing new rows + function manipulationTarget (elem, content) { + if (nodeName(elem, 'table') && + nodeName(content.nodeType !== 11 ? content : content.firstChild, 'tr')) { + return jQuery(elem).children('tbody')[0] || elem + } + + return elem + } + + // Replace/restore the type attribute of script elements for safe DOM manipulation + function disableScript (elem) { + elem.type = (elem.getAttribute('type') !== null) + '/' + elem.type + return elem + } + function restoreScript (elem) { + if ((elem.type || '').slice(0, 5) === 'true/') { + elem.type = elem.type.slice(5) + } else { + elem.removeAttribute('type') + } + + return elem + } + + function cloneCopyEvent (src, dest) { + var i, l, type, pdataOld, udataOld, udataCur, events + + if (dest.nodeType !== 1) { + return + } + + // 1. Copy private data: events, handlers, etc. + if (dataPriv.hasData(src)) { + pdataOld = dataPriv.get(src) + events = pdataOld.events + + if (events) { + dataPriv.remove(dest, 'handle events') + + for (type in events) { + for (i = 0, l = events[type].length; i < l; i++) { + jQuery.event.add(dest, type, events[type][i]) + } + } + } + } + + // 2. Copy user data + if (dataUser.hasData(src)) { + udataOld = dataUser.access(src) + udataCur = jQuery.extend({}, udataOld) + + dataUser.set(dest, udataCur) + } + } + + // Fix IE bugs, see support tests + function fixInput (src, dest) { + var nodeName = dest.nodeName.toLowerCase() + + // Fails to persist the checked state of a cloned checkbox or radio button. + if (nodeName === 'input' && rcheckableType.test(src.type)) { + dest.checked = src.checked + + // Fails to return the selected option to the default selected state when cloning options + } else if (nodeName === 'input' || nodeName === 'textarea') { + dest.defaultValue = src.defaultValue + } + } + + function domManip (collection, args, callback, ignored) { + // Flatten any nested arrays + args = flat(args) + + var fragment; var first; var scripts; var hasScripts; var node; var doc + var i = 0 + var l = collection.length + var iNoClone = l - 1 + var value = args[0] + var valueIsFunction = isFunction(value) + + // We can't cloneNode fragments that contain checked, in WebKit + if (valueIsFunction || + (l > 1 && typeof value === 'string' && + !support.checkClone && rchecked.test(value))) { + return collection.each(function (index) { + var self = collection.eq(index) + if (valueIsFunction) { + args[0] = value.call(this, index, self.html()) + } + domManip(self, args, callback, ignored) + }) + } + + if (l) { + fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored) + first = fragment.firstChild + + if (fragment.childNodes.length === 1) { + fragment = first + } + + // Require either new content or an interest in ignored elements to invoke the callback + if (first || ignored) { + scripts = jQuery.map(getAll(fragment, 'script'), disableScript) + hasScripts = scripts.length + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for (; i < l; i++) { + node = fragment + + if (i !== iNoClone) { + node = jQuery.clone(node, true, true) + + // Keep references to cloned scripts for later restoration + if (hasScripts) { + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge(scripts, getAll(node, 'script')) + } + } + + callback.call(collection[i], node, i) + } + + if (hasScripts) { + doc = scripts[scripts.length - 1].ownerDocument + + // Reenable scripts + jQuery.map(scripts, restoreScript) + + // Evaluate executable scripts on first document insertion + for (i = 0; i < hasScripts; i++) { + node = scripts[i] + if (rscriptType.test(node.type || '') && + !dataPriv.access(node, 'globalEval') && + jQuery.contains(doc, node)) { + if (node.src && (node.type || '').toLowerCase() !== 'module') { + // Optional AJAX dependency, but won't run scripts if not present + if (jQuery._evalUrl && !node.noModule) { + jQuery._evalUrl(node.src, { + nonce: node.nonce || node.getAttribute('nonce') + }, doc) + } + } else { + DOMEval(node.textContent.replace(rcleanScript, ''), node, doc) + } + } + } + } + } + } + + return collection + } + + function remove (elem, selector, keepData) { + var node + var nodes = selector ? jQuery.filter(selector, elem) : elem + var i = 0 + + for (; (node = nodes[i]) != null; i++) { + if (!keepData && node.nodeType === 1) { + jQuery.cleanData(getAll(node)) + } + + if (node.parentNode) { + if (keepData && isAttached(node)) { + setGlobalEval(getAll(node, 'script')) + } + node.parentNode.removeChild(node) + } + } + + return elem + } + + jQuery.extend({ + htmlPrefilter: function (html) { + return html + }, + + clone: function (elem, dataAndEvents, deepDataAndEvents) { + var i; var l; var srcElements; var destElements + var clone = elem.cloneNode(true) + var inPage = isAttached(elem) + + // Fix IE cloning issues + if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && + !jQuery.isXMLDoc(elem)) { + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll(clone) + srcElements = getAll(elem) + + for (i = 0, l = srcElements.length; i < l; i++) { + fixInput(srcElements[i], destElements[i]) + } + } + + // Copy the events from the original to the clone + if (dataAndEvents) { + if (deepDataAndEvents) { + srcElements = srcElements || getAll(elem) + destElements = destElements || getAll(clone) + + for (i = 0, l = srcElements.length; i < l; i++) { + cloneCopyEvent(srcElements[i], destElements[i]) + } + } else { + cloneCopyEvent(elem, clone) + } + } + + // Preserve script evaluation history + destElements = getAll(clone, 'script') + if (destElements.length > 0) { + setGlobalEval(destElements, !inPage && getAll(elem, 'script')) + } + + // Return the cloned set + return clone + }, + + cleanData: function (elems) { + var data; var elem; var type + var special = jQuery.event.special + var i = 0 + + for (; (elem = elems[i]) !== undefined; i++) { + if (acceptData(elem)) { + if ((data = elem[dataPriv.expando])) { + if (data.events) { + for (type in data.events) { + if (special[type]) { + jQuery.event.remove(elem, type) + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent(elem, type, data.handle) + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[dataPriv.expando] = undefined + } + if (elem[dataUser.expando]) { + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[dataUser.expando] = undefined + } + } + } + } + }) + + jQuery.fn.extend({ + detach: function (selector) { + return remove(this, selector, true) + }, + + remove: function (selector) { + return remove(this, selector) + }, + + text: function (value) { + return access(this, function (value) { + return value === undefined + ? jQuery.text(this) + : this.empty().each(function () { + if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { + this.textContent = value + } + }) + }, null, value, arguments.length) + }, + + append: function () { + return domManip(this, arguments, function (elem) { + if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { + var target = manipulationTarget(this, elem) + target.appendChild(elem) + } + }) + }, + + prepend: function () { + return domManip(this, arguments, function (elem) { + if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { + var target = manipulationTarget(this, elem) + target.insertBefore(elem, target.firstChild) + } + }) + }, + + before: function () { + return domManip(this, arguments, function (elem) { + if (this.parentNode) { + this.parentNode.insertBefore(elem, this) + } + }) + }, + + after: function () { + return domManip(this, arguments, function (elem) { + if (this.parentNode) { + this.parentNode.insertBefore(elem, this.nextSibling) + } + }) + }, + + empty: function () { + var elem + var i = 0 + + for (; (elem = this[i]) != null; i++) { + if (elem.nodeType === 1) { + // Prevent memory leaks + jQuery.cleanData(getAll(elem, false)) + + // Remove any remaining nodes + elem.textContent = '' + } + } + + return this + }, + + clone: function (dataAndEvents, deepDataAndEvents) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents + + return this.map(function () { + return jQuery.clone(this, dataAndEvents, deepDataAndEvents) + }) + }, + + html: function (value) { + return access(this, function (value) { + var elem = this[0] || {} + var i = 0 + var l = this.length + + if (value === undefined && elem.nodeType === 1) { + return elem.innerHTML + } + + // See if we can take a shortcut and just use innerHTML + if (typeof value === 'string' && !rnoInnerhtml.test(value) && + !wrapMap[(rtagName.exec(value) || ['', ''])[1].toLowerCase()]) { + value = jQuery.htmlPrefilter(value) + + try { + for (; i < l; i++) { + elem = this[i] || {} + + // Remove element nodes and prevent memory leaks + if (elem.nodeType === 1) { + jQuery.cleanData(getAll(elem, false)) + elem.innerHTML = value + } + } + + elem = 0 + + // If using innerHTML throws an exception, use the fallback method + } catch (e) {} + } + + if (elem) { + this.empty().append(value) + } + }, null, value, arguments.length) + }, + + replaceWith: function () { + var ignored = [] + + // Make the changes, replacing each non-ignored context element with the new content + return domManip(this, arguments, function (elem) { + var parent = this.parentNode + + if (jQuery.inArray(this, ignored) < 0) { + jQuery.cleanData(getAll(this)) + if (parent) { + parent.replaceChild(elem, this) + } + } + + // Force callback invocation + }, ignored) + } + }) + + jQuery.each({ + appendTo: 'append', + prependTo: 'prepend', + insertBefore: 'before', + insertAfter: 'after', + replaceAll: 'replaceWith' + }, function (name, original) { + jQuery.fn[name] = function (selector) { + var elems + var ret = [] + var insert = jQuery(selector) + var last = insert.length - 1 + var i = 0 + + for (; i <= last; i++) { + elems = i === last ? this : this.clone(true) + jQuery(insert[i])[original](elems) + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply(ret, elems.get()) + } + + return this.pushStack(ret) + } + }) + var rnumnonpx = new RegExp('^(' + pnum + ')(?!px)[a-z%]+$', 'i') + + var getStyles = function (elem) { + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView + + if (!view || !view.opener) { + view = window + } + + return view.getComputedStyle(elem) + } + + var swap = function (elem, options, callback) { + var ret; var name + var old = {} + + // Remember the old values, and insert the new ones + for (name in options) { + old[name] = elem.style[name] + elem.style[name] = options[name] + } + + ret = callback.call(elem) + + // Revert the old values + for (name in options) { + elem.style[name] = old[name] + } + + return ret + } + + var rboxStyle = new RegExp(cssExpand.join('|'), 'i'); + + (function () { + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests () { + // This is a singleton, we need to execute it only once + if (!div) { + return + } + + container.style.cssText = 'position:absolute;left:-11111px;width:60px;' + + 'margin-top:1px;padding:0;border:0' + div.style.cssText = + 'position:relative;display:block;box-sizing:border-box;overflow:scroll;' + + 'margin:auto;border:1px;padding:1px;' + + 'width:60%;top:1%' + documentElement.appendChild(container).appendChild(div) + + var divStyle = window.getComputedStyle(div) + pixelPositionVal = divStyle.top !== '1%' + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12 + + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 + // Some styles come back with percentage values, even though they shouldn't + div.style.right = '60%' + pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36 + + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36 + + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + // Support: Chrome <=64 + // Don't get tricked when zoom affects offsetWidth (gh-4029) + div.style.position = 'absolute' + scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12 + + documentElement.removeChild(container) + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null + } + + function roundPixelMeasures (measure) { + return Math.round(parseFloat(measure)) + } + + var pixelPositionVal; var boxSizingReliableVal; var scrollboxSizeVal; var pixelBoxStylesVal + var reliableTrDimensionsVal; var reliableMarginLeftVal + var container = document.createElement('div') + var div = document.createElement('div') + + // Finish early in limited (non-browser) environments + if (!div.style) { + return + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = 'content-box' + div.cloneNode(true).style.backgroundClip = '' + support.clearCloneStyle = div.style.backgroundClip === 'content-box' + + jQuery.extend(support, { + boxSizingReliable: function () { + computeStyleTests() + return boxSizingReliableVal + }, + pixelBoxStyles: function () { + computeStyleTests() + return pixelBoxStylesVal + }, + pixelPosition: function () { + computeStyleTests() + return pixelPositionVal + }, + reliableMarginLeft: function () { + computeStyleTests() + return reliableMarginLeftVal + }, + scrollboxSize: function () { + computeStyleTests() + return scrollboxSizeVal + }, + + // Support: IE 9 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Behavior in IE 9 is more subtle than in newer versions & it passes + // some versions of this test; make sure not to make it pass there! + reliableTrDimensions: function () { + var table, tr, trChild, trStyle + if (reliableTrDimensionsVal == null) { + table = document.createElement('table') + tr = document.createElement('tr') + trChild = document.createElement('div') + + table.style.cssText = 'position:absolute;left:-11111px' + tr.style.height = '1px' + trChild.style.height = '9px' + + documentElement + .appendChild(table) + .appendChild(tr) + .appendChild(trChild) + + trStyle = window.getComputedStyle(tr) + reliableTrDimensionsVal = parseInt(trStyle.height) > 3 + + documentElement.removeChild(table) + } + return reliableTrDimensionsVal + } + }) + })() + + function curCSS (elem, name, computed) { + var width; var minWidth; var maxWidth; var ret + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + var style = elem.style + + computed = computed || getStyles(elem) + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if (computed) { + ret = computed.getPropertyValue(name) || computed[name] + + if (ret === '' && !isAttached(elem)) { + ret = jQuery.style(elem, name) + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if (!support.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name)) { + // Remember the original values + width = style.width + minWidth = style.minWidth + maxWidth = style.maxWidth + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret + ret = computed.width + + // Revert the changed values + style.width = width + style.minWidth = minWidth + style.maxWidth = maxWidth + } + } + + return ret !== undefined + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ? ret + '' + : ret + } + + function addGetHookIf (conditionFn, hookFn) { + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function () { + if (conditionFn()) { + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get + return + } + + // Hook needed; redefine it so that the support test is not executed again. + return (this.get = hookFn).apply(this, arguments) + } + } + } + + var cssPrefixes = ['Webkit', 'Moz', 'ms'] + var emptyStyle = document.createElement('div').style + var vendorProps = {} + + // Return a vendor-prefixed property or undefined + function vendorPropName (name) { + // Check for vendor prefixed names + var capName = name[0].toUpperCase() + name.slice(1) + var i = cssPrefixes.length + + while (i--) { + name = cssPrefixes[i] + capName + if (name in emptyStyle) { + return name + } + } + } + + // Return a potentially-mapped jQuery.cssProps or vendor prefixed property + function finalPropName (name) { + var final = jQuery.cssProps[name] || vendorProps[name] + + if (final) { + return final + } + if (name in emptyStyle) { + return name + } + return vendorProps[name] = vendorPropName(name) || name + } + + var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/ + var rcustomProp = /^--/ + var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' } + var cssNormalTransform = { + letterSpacing: '0', + fontWeight: '400' + } + + function setPositiveNumber (_elem, value, subtract) { + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec(value) + return matches + + // Guard against undefined "subtract", e.g., when used as in cssHooks + ? Math.max(0, matches[2] - (subtract || 0)) + (matches[3] || 'px') + : value + } + + function boxModelAdjustment (elem, dimension, box, isBorderBox, styles, computedVal) { + var i = dimension === 'width' ? 1 : 0 + var extra = 0 + var delta = 0 + + // Adjustment may not be necessary + if (box === (isBorderBox ? 'border' : 'content')) { + return 0 + } + + for (; i < 4; i += 2) { + // Both box models exclude margin + if (box === 'margin') { + delta += jQuery.css(elem, box + cssExpand[i], true, styles) + } + + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if (!isBorderBox) { + // Add padding + delta += jQuery.css(elem, 'padding' + cssExpand[i], true, styles) + + // For "border" or "margin", add border + if (box !== 'padding') { + delta += jQuery.css(elem, 'border' + cssExpand[i] + 'Width', true, styles) + + // But still keep track of it otherwise + } else { + extra += jQuery.css(elem, 'border' + cssExpand[i] + 'Width', true, styles) + } + + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" + } else { + // For "content", subtract padding + if (box === 'content') { + delta -= jQuery.css(elem, 'padding' + cssExpand[i], true, styles) + } + + // For "content" or "padding", subtract border + if (box !== 'margin') { + delta -= jQuery.css(elem, 'border' + cssExpand[i] + 'Width', true, styles) + } + } + } + + // Account for positive content-box scroll gutter when requested by providing computedVal + if (!isBorderBox && computedVal >= 0) { + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max(0, Math.ceil( + elem['offset' + dimension[0].toUpperCase() + dimension.slice(1)] - computedVal - delta - extra - 0.5 - // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter - // Use an explicit zero to avoid NaN (gh-3964) - ) ) || 0; - } - - return delta; -} - -function getWidthOrHeight( elem, dimension, extra ) { - - // Start with computed style - var styles = getStyles( elem ), - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). - // Fake content-box until we know it's needed to know the true value. - boxSizingNeeded = !support.boxSizingReliable() || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - valueIsBorderBox = isBorderBox, - - val = curCSS( elem, dimension, styles ), - offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); - - // Support: Firefox <=54 - // Return a confounding non-pixel value or feign ignorance, as appropriate. - if ( rnumnonpx.test( val ) ) { - if ( !extra ) { - return val; - } - val = "auto"; - } - - - // Support: IE 9 - 11 only - // Use offsetWidth/offsetHeight for when box sizing is unreliable. - // In those cases, the computed value can be trusted to be border-box. - if ( ( !support.boxSizingReliable() && isBorderBox || + // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter + // Use an explicit zero to avoid NaN (gh-3964) + )) || 0 + } + + return delta + } + + function getWidthOrHeight (elem, dimension, extra) { + // Start with computed style + var styles = getStyles(elem) + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). + // Fake content-box until we know it's needed to know the true value. + var boxSizingNeeded = !support.boxSizingReliable() || extra + var isBorderBox = boxSizingNeeded && + jQuery.css(elem, 'boxSizing', false, styles) === 'border-box' + var valueIsBorderBox = isBorderBox + + var val = curCSS(elem, dimension, styles) + var offsetProp = 'offset' + dimension[0].toUpperCase() + dimension.slice(1) + + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if (rnumnonpx.test(val)) { + if (!extra) { + return val + } + val = 'auto' + } + + // Support: IE 9 - 11 only + // Use offsetWidth/offsetHeight for when box sizing is unreliable. + // In those cases, the computed value can be trusted to be border-box. + if ((!support.boxSizingReliable() && isBorderBox || // Support: IE 10 - 11+, Edge 15 - 18+ // IE/Edge misreport `getComputedStyle` of table rows with width/height // set in CSS while `offset*` properties report correct values. // Interestingly, in some cases IE 9 doesn't suffer from this issue. - !support.reliableTrDimensions() && nodeName( elem, "tr" ) || + !support.reliableTrDimensions() && nodeName(elem, 'tr') || // Fall back to offsetWidth/offsetHeight when value is "auto" // This happens for inline elements with no explicit setting (gh-3571) - val === "auto" || + val === 'auto' || // Support: Android <=4.1 - 4.3 only // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) - !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + !parseFloat(val) && jQuery.css(elem, 'display', false, styles) === 'inline') && // Make sure the element is visible & connected - elem.getClientRects().length ) { - - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // Where available, offsetWidth/offsetHeight approximate border box dimensions. - // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the - // retrieved value as a content box dimension. - valueIsBorderBox = offsetProp in elem; - if ( valueIsBorderBox ) { - val = elem[ offsetProp ]; - } - } - - // Normalize "" and auto - val = parseFloat( val ) || 0; - - // Adjust for the element's box model - return ( val + + elem.getClientRects().length) { + isBorderBox = jQuery.css(elem, 'boxSizing', false, styles) === 'border-box' + + // Where available, offsetWidth/offsetHeight approximate border box dimensions. + // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the + // retrieved value as a content box dimension. + valueIsBorderBox = offsetProp in elem + if (valueIsBorderBox) { + val = elem[offsetProp] + } + } + + // Normalize "" and auto + val = parseFloat(val) || 0 + + // Adjust for the element's box model + return (val + boxModelAdjustment( - elem, - dimension, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles, - - // Provide the current computed size to request scroll gutter calculation (gh-3589) - val + elem, + dimension, + extra || (isBorderBox ? 'border' : 'content'), + valueIsBorderBox, + styles, + + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val ) - ) + "px"; -} - -jQuery.extend( { - - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "animationIterationCount": true, - "columnCount": true, - "fillOpacity": true, - "flexGrow": true, - "flexShrink": true, - "fontWeight": true, - "gridArea": true, - "gridColumn": true, - "gridColumnEnd": true, - "gridColumnStart": true, - "gridRow": true, - "gridRowEnd": true, - "gridRowStart": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: {}, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ), - style = elem.style; - - // Make sure that we're working with the right name. We don't - // want to query the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Gets hook for the prefixed version, then unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // Convert "+=" or "-=" to relative numbers (#7345) - if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { - value = adjustCSS( elem, name, ret ); - - // Fixes bug #9237 - type = "number"; - } - - // Make sure that null and NaN values aren't set (#7116) - if ( value == null || value !== value ) { - return; - } - - // If a number was passed in, add the unit (except for certain CSS properties) - // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append - // "px" to a few hardcoded values. - if ( type === "number" && !isCustomProp ) { - value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); - } - - // background-* props affect original clone's values - if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !( "set" in hooks ) || - ( value = hooks.set( elem, value, extra ) ) !== undefined ) { - - if ( isCustomProp ) { - style.setProperty( name, value ); - } else { - style[ name ] = value; - } - } - - } else { - - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && - ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { - - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ); - - // Make sure that we're working with the right name. We don't - // want to modify the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Try prefixed name followed by the unprefixed name - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - // Convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Make numeric if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || isFinite( num ) ? num || 0 : val; - } - - return val; - } -} ); - -jQuery.each( [ "height", "width" ], function( _i, dimension ) { - jQuery.cssHooks[ dimension ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - - // Certain elements can have dimension info if we invisibly show them - // but it must have a current display style that would benefit - return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + ) + 'px' + } + + jQuery.extend({ + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function (elem, computed) { + if (computed) { + // We should always get a number back from opacity + var ret = curCSS(elem, 'opacity') + return ret === '' ? '1' : ret + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + animationIterationCount: true, + columnCount: true, + fillOpacity: true, + flexGrow: true, + flexShrink: true, + fontWeight: true, + gridArea: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnStart: true, + gridRow: true, + gridRowEnd: true, + gridRowStart: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + widows: true, + zIndex: true, + zoom: true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: {}, + + // Get and set the style property on a DOM Node + style: function (elem, name, value, extra) { + // Don't set styles on text and comment nodes + if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) { + return + } + + // Make sure that we're working with the right name + var ret; var type; var hooks + var origName = camelCase(name) + var isCustomProp = rcustomProp.test(name) + var style = elem.style + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if (!isCustomProp) { + name = finalPropName(origName) + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName] + + // Check if we're setting a value + if (value !== undefined) { + type = typeof value + + // Convert "+=" or "-=" to relative numbers (#7345) + if (type === 'string' && (ret = rcssNum.exec(value)) && ret[1]) { + value = adjustCSS(elem, name, ret) + + // Fixes bug #9237 + type = 'number' + } + + // Make sure that null and NaN values aren't set (#7116) + if (value == null || value !== value) { + return + } + + // If a number was passed in, add the unit (except for certain CSS properties) + // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append + // "px" to a few hardcoded values. + if (type === 'number' && !isCustomProp) { + value += ret && ret[3] || (jQuery.cssNumber[origName] ? '' : 'px') + } + + // background-* props affect original clone's values + if (!support.clearCloneStyle && value === '' && name.indexOf('background') === 0) { + style[name] = 'inherit' + } + + // If a hook was provided, use that value, otherwise just set the specified value + if (!hooks || !('set' in hooks) || + (value = hooks.set(elem, value, extra)) !== undefined) { + if (isCustomProp) { + style.setProperty(name, value) + } else { + style[name] = value + } + } + } else { + // If a hook was provided get the non-computed value from there + if (hooks && 'get' in hooks && + (ret = hooks.get(elem, false, extra)) !== undefined) { + return ret + } + + // Otherwise just get the value from the style object + return style[name] + } + }, + + css: function (elem, name, extra, styles) { + var val; var num; var hooks + var origName = camelCase(name) + var isCustomProp = rcustomProp.test(name) + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if (!isCustomProp) { + name = finalPropName(origName) + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName] + + // If a hook was provided get the computed value from there + if (hooks && 'get' in hooks) { + val = hooks.get(elem, true, extra) + } + + // Otherwise, if a way to get the computed value exists, use that + if (val === undefined) { + val = curCSS(elem, name, styles) + } + + // Convert "normal" to computed value + if (val === 'normal' && name in cssNormalTransform) { + val = cssNormalTransform[name] + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if (extra === '' || extra) { + num = parseFloat(val) + return extra === true || isFinite(num) ? num || 0 : val + } + + return val + } + }) + + jQuery.each(['height', 'width'], function (_i, dimension) { + jQuery.cssHooks[dimension] = { + get: function (elem, computed, extra) { + if (computed) { + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test(jQuery.css(elem, 'display')) && // Support: Safari 8+ // Table columns in Safari have non-zero offsetWidth & zero @@ -7021,1996 +6735,1916 @@ jQuery.each( [ "height", "width" ], function( _i, dimension ) { // Support: IE <=11 only // Running getBoundingClientRect on a disconnected node // in IE throws an error. - ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, dimension, extra ); - } ) : - getWidthOrHeight( elem, dimension, extra ); - } - }, - - set: function( elem, value, extra ) { - var matches, - styles = getStyles( elem ), - - // Only read styles.position if the test has a chance to fail - // to avoid forcing a reflow. - scrollboxSizeBuggy = !support.scrollboxSize() && - styles.position === "absolute", - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) - boxSizingNeeded = scrollboxSizeBuggy || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - subtract = extra ? - boxModelAdjustment( - elem, - dimension, - extra, - isBorderBox, - styles - ) : - 0; - - // Account for unreliable border-box dimensions by comparing offset* to computed and - // faking a content-box to get border and padding (gh-3699) - if ( isBorderBox && scrollboxSizeBuggy ) { - subtract -= Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - parseFloat( styles[ dimension ] ) - - boxModelAdjustment( elem, dimension, "border", false, styles ) - + (!elem.getClientRects().length || !elem.getBoundingClientRect().width) + ? swap(elem, cssShow, function () { + return getWidthOrHeight(elem, dimension, extra) + }) + : getWidthOrHeight(elem, dimension, extra) + } + }, + + set: function (elem, value, extra) { + var matches + var styles = getStyles(elem) + + // Only read styles.position if the test has a chance to fail + // to avoid forcing a reflow. + var scrollboxSizeBuggy = !support.scrollboxSize() && + styles.position === 'absolute' + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) + var boxSizingNeeded = scrollboxSizeBuggy || extra + var isBorderBox = boxSizingNeeded && + jQuery.css(elem, 'boxSizing', false, styles) === 'border-box' + var subtract = extra + ? boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) + : 0 + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if (isBorderBox && scrollboxSizeBuggy) { + subtract -= Math.ceil( + elem['offset' + dimension[0].toUpperCase() + dimension.slice(1)] - + parseFloat(styles[dimension]) - + boxModelAdjustment(elem, dimension, 'border', false, styles) - 0.5 - ); - } - - // Convert to pixels if value adjustment is needed - if ( subtract && ( matches = rcssNum.exec( value ) ) && - ( matches[ 3 ] || "px" ) !== "px" ) { - - elem.style[ dimension ] = value; - value = jQuery.css( elem, dimension ); - } - - return setPositiveNumber( elem, value, subtract ); - } - }; -} ); - -jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, - function( elem, computed ) { - if ( computed ) { - return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + ) + } + + // Convert to pixels if value adjustment is needed + if (subtract && (matches = rcssNum.exec(value)) && + (matches[3] || 'px') !== 'px') { + elem.style[dimension] = value + value = jQuery.css(elem, dimension) + } + + return setPositiveNumber(elem, value, subtract) + } + } + }) + + jQuery.cssHooks.marginLeft = addGetHookIf(support.reliableMarginLeft, + function (elem, computed) { + if (computed) { + return (parseFloat(curCSS(elem, 'marginLeft')) || elem.getBoundingClientRect().left - - swap( elem, { marginLeft: 0 }, function() { - return elem.getBoundingClientRect().left; - } ) - ) + "px"; - } - } -); - -// These hooks are used by animate to expand properties -jQuery.each( { - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // Assumes a single number if not a string - parts = typeof value === "string" ? value.split( " " ) : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( prefix !== "margin" ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -} ); - -jQuery.fn.extend( { - css: function( name, value ) { - return access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( Array.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - } -} ); - - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || jQuery.easing._default; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - // Use a property on the element directly when it is not a DOM element, - // or when there is no matching style property that exists. - if ( tween.elem.nodeType !== 1 || - tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { - return tween.elem[ tween.prop ]; - } - - // Passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails. - // Simple values such as "10px" are parsed to Float; - // complex values such as "rotate(1rad)" are returned as-is. - result = jQuery.css( tween.elem, tween.prop, "" ); - - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - - // Use step hook for back compat. - // Use cssHook if its there. - // Use .style if available and use plain properties where available. - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && ( - jQuery.cssHooks[ tween.prop ] || - tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Support: IE <=9 only -// Panic based approach to setting things on disconnected nodes -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p * Math.PI ) / 2; - }, - _default: "swing" -}; - -jQuery.fx = Tween.prototype.init; - -// Back compat <1.8 extension point -jQuery.fx.step = {}; - - - - -var - fxNow, inProgress, - rfxtypes = /^(?:toggle|show|hide)$/, - rrun = /queueHooks$/; - -function schedule() { - if ( inProgress ) { - if ( document.hidden === false && window.requestAnimationFrame ) { - window.requestAnimationFrame( schedule ); - } else { - window.setTimeout( schedule, jQuery.fx.interval ); - } - - jQuery.fx.tick(); - } -} - -// Animations created synchronously will run synchronously -function createFxNow() { - window.setTimeout( function() { - fxNow = undefined; - } ); - return ( fxNow = Date.now() ); -} - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - i = 0, - attrs = { height: type }; - - // If we include width, step value is 1 to do all cssExpand values, - // otherwise step value is 2 to skip over Left and Right - includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -function createTween( value, prop, animation ) { - var tween, - collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { - - // We're done with this property - return tween; - } - } -} - -function defaultPrefilter( elem, props, opts ) { - var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, - isBox = "width" in props || "height" in props, - anim = this, - orig = {}, - style = elem.style, - hidden = elem.nodeType && isHiddenWithinTree( elem ), - dataShow = dataPriv.get( elem, "fxshow" ); - - // Queue-skipping animations hijack the fx hooks - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always( function() { - - // Ensure the complete handler is called before this completes - anim.always( function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - } ); - } ); - } - - // Detect show/hide animations - for ( prop in props ) { - value = props[ prop ]; - if ( rfxtypes.test( value ) ) { - delete props[ prop ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - - // Pretend to be hidden if this is a "show" and - // there is still data from a stopped show/hide - if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { - hidden = true; - - // Ignore all other no-op show/hide data - } else { - continue; - } - } - orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); - } - } - - // Bail out if this is a no-op like .hide().hide() - propTween = !jQuery.isEmptyObject( props ); - if ( !propTween && jQuery.isEmptyObject( orig ) ) { - return; - } - - // Restrict "overflow" and "display" styles during box animations - if ( isBox && elem.nodeType === 1 ) { - - // Support: IE <=9 - 11, Edge 12 - 15 - // Record all 3 overflow attributes because IE does not infer the shorthand - // from identically-valued overflowX and overflowY and Edge just mirrors - // the overflowX value there. - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Identify a display type, preferring old show/hide data over the CSS cascade - restoreDisplay = dataShow && dataShow.display; - if ( restoreDisplay == null ) { - restoreDisplay = dataPriv.get( elem, "display" ); - } - display = jQuery.css( elem, "display" ); - if ( display === "none" ) { - if ( restoreDisplay ) { - display = restoreDisplay; - } else { - - // Get nonempty value(s) by temporarily forcing visibility - showHide( [ elem ], true ); - restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery.css( elem, "display" ); - showHide( [ elem ] ); - } - } - - // Animate inline elements as inline-block - if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { - if ( jQuery.css( elem, "float" ) === "none" ) { - - // Restore the original display value at the end of pure show/hide animations - if ( !propTween ) { - anim.done( function() { - style.display = restoreDisplay; - } ); - if ( restoreDisplay == null ) { - display = style.display; - restoreDisplay = display === "none" ? "" : display; - } - } - style.display = "inline-block"; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - anim.always( function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - } ); - } - - // Implement show/hide animations - propTween = false; - for ( prop in orig ) { - - // General show/hide setup for this element animation - if ( !propTween ) { - if ( dataShow ) { - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - } else { - dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); - } - - // Store hidden/visible for toggle so `.stop().toggle()` "reverses" - if ( toggle ) { - dataShow.hidden = !hidden; - } - - // Show elements before animating them - if ( hidden ) { - showHide( [ elem ], true ); - } - - /* eslint-disable no-loop-func */ - - anim.done( function() { - - /* eslint-enable no-loop-func */ - - // The final step of a "hide" animation is actually hiding the element - if ( !hidden ) { - showHide( [ elem ] ); - } - dataPriv.remove( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - } ); - } - - // Per-property setup - propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = propTween.start; - if ( hidden ) { - propTween.end = propTween.start; - propTween.start = 0; - } - } - } -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( Array.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // Not quite $.extend, this won't overwrite existing keys. - // Reusing 'index' because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = Animation.prefilters.length, - deferred = jQuery.Deferred().always( function() { - - // Don't match elem in the :animated selector - delete tick.elem; - } ), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - - // Support: Android 2.3 only - // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ] ); - - // If there's more to do, yield - if ( percent < 1 && length ) { - return remaining; - } - - // If this was an empty animation, synthesize a final progress notification - if ( !length ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - } - - // Resolve the animation and report its conclusion - deferred.resolveWith( elem, [ animation ] ); - return false; - }, - animation = deferred.promise( { - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { - specialEasing: {}, - easing: jQuery.easing._default - }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - - // If we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // Resolve when we played the last frame; otherwise, reject - if ( gotoEnd ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - } ), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length; index++ ) { - result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - if ( isFunction( result.stop ) ) { - jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = - result.stop.bind( result ); - } - return result; - } - } - - jQuery.map( props, createTween, animation ); - - if ( isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - // Attach callbacks from options - animation - .progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - } ) - ); - - return animation; -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweeners: { - "*": [ function( prop, value ) { - var tween = this.createTween( prop, value ); - adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); - return tween; - } ] - }, - - tweener: function( props, callback ) { - if ( isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.match( rnothtmlwhite ); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length; index++ ) { - prop = props[ index ]; - Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; - Animation.tweeners[ prop ].unshift( callback ); - } - }, - - prefilters: [ defaultPrefilter ], - - prefilter: function( callback, prepend ) { - if ( prepend ) { - Animation.prefilters.unshift( callback ); - } else { - Animation.prefilters.push( callback ); - } - } -} ); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !isFunction( easing ) && easing - }; - - // Go to the end state if fx are off - if ( jQuery.fx.off ) { - opt.duration = 0; - - } else { - if ( typeof opt.duration !== "number" ) { - if ( opt.duration in jQuery.fx.speeds ) { - opt.duration = jQuery.fx.speeds[ opt.duration ]; - - } else { - opt.duration = jQuery.fx.speeds._default; - } - } - } - - // Normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.fn.extend( { - fadeTo: function( speed, to, easing, callback ) { - - // Show any hidden elements after setting opacity to 0 - return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() - - // Animate to the value specified - .end().animate( { opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations, or finishing resolves immediately - if ( empty || dataPriv.get( this, "finish" ) ) { - anim.stop( true ); - } - }; - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue ) { - this.queue( type || "fx", [] ); - } - - return this.each( function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = dataPriv.get( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && - ( type == null || timers[ index ].queue === type ) ) { - - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // Start the next in the queue if the last step wasn't forced. - // Timers currently will call their complete callbacks, which - // will dequeue but only if they were gotoEnd. - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - } ); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each( function() { - var index, - data = dataPriv.get( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // Enable finishing flag on private data - data.finish = true; - - // Empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.stop ) { - hooks.stop.call( this, true ); - } - - // Look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // Look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // Turn off finishing flag - delete data.finish; - } ); - } -} ); - -jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -} ); - -// Generate shortcuts for custom animations -jQuery.each( { - slideDown: genFx( "show" ), - slideUp: genFx( "hide" ), - slideToggle: genFx( "toggle" ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -} ); - -jQuery.timers = []; -jQuery.fx.tick = function() { - var timer, - i = 0, - timers = jQuery.timers; - - fxNow = Date.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - - // Run the timer and safely remove it when done (allowing for external removal) - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - jQuery.timers.push( timer ); - jQuery.fx.start(); -}; - -jQuery.fx.interval = 13; -jQuery.fx.start = function() { - if ( inProgress ) { - return; - } - - inProgress = true; - schedule(); -}; - -jQuery.fx.stop = function() { - inProgress = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - - // Default speed - _default: 400 -}; - - -// Based off of the plugin by Clint Helfers, with permission. -// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ -jQuery.fn.delay = function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = window.setTimeout( next, time ); - hooks.stop = function() { - window.clearTimeout( timeout ); - }; - } ); -}; - - -( function() { - var input = document.createElement( "input" ), - select = document.createElement( "select" ), - opt = select.appendChild( document.createElement( "option" ) ); - - input.type = "checkbox"; - - // Support: Android <=4.3 only - // Default value for a checkbox should be "on" - support.checkOn = input.value !== ""; - - // Support: IE <=11 only - // Must access selectedIndex to make default options select - support.optSelected = opt.selected; - - // Support: IE <=11 only - // An input loses its value after becoming a radio - input = document.createElement( "input" ); - input.value = "t"; - input.type = "radio"; - support.radioValue = input.value === "t"; -} )(); - - -var boolHook, - attrHandle = jQuery.expr.attrHandle; - -jQuery.fn.extend( { - attr: function( name, value ) { - return access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each( function() { - jQuery.removeAttr( this, name ); - } ); - } -} ); - -jQuery.extend( { - attr: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set attributes on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - // Attribute hooks are determined by the lowercase version - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - hooks = jQuery.attrHooks[ name.toLowerCase() ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); - } - - if ( value !== undefined ) { - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - } - - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - elem.setAttribute( name, value + "" ); - return value; - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? undefined : ret; - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !support.radioValue && value === "radio" && - nodeName( elem, "input" ) ) { - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - removeAttr: function( elem, value ) { - var name, - i = 0, - - // Attribute names can contain non-HTML whitespace characters - // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 - attrNames = value && value.match( rnothtmlwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( ( name = attrNames[ i++ ] ) ) { - elem.removeAttribute( name ); - } - } - } -} ); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - elem.setAttribute( name, name ); - } - return name; - } -}; - -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { - var getter = attrHandle[ name ] || jQuery.find.attr; - - attrHandle[ name ] = function( elem, name, isXML ) { - var ret, handle, - lowercaseName = name.toLowerCase(); - - if ( !isXML ) { - - // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ lowercaseName ]; - attrHandle[ lowercaseName ] = ret; - ret = getter( elem, name, isXML ) != null ? - lowercaseName : - null; - attrHandle[ lowercaseName ] = handle; - } - return ret; - }; -} ); - - - - -var rfocusable = /^(?:input|select|textarea|button)$/i, - rclickable = /^(?:a|area)$/i; - -jQuery.fn.extend( { - prop: function( name, value ) { - return access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - return this.each( function() { - delete this[ jQuery.propFix[ name ] || name ]; - } ); - } -} ); - -jQuery.extend( { - prop: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set properties on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - return ( elem[ name ] = value ); - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - return elem[ name ]; - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - - // Support: IE <=9 - 11 only - // elem.tabIndex doesn't always return the - // correct value when it hasn't been explicitly set - // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - if ( tabindex ) { - return parseInt( tabindex, 10 ); - } - - if ( - rfocusable.test( elem.nodeName ) || - rclickable.test( elem.nodeName ) && + swap(elem, { marginLeft: 0 }, function () { + return elem.getBoundingClientRect().left + }) + ) + 'px' + } + } + ) + + // These hooks are used by animate to expand properties + jQuery.each({ + margin: '', + padding: '', + border: 'Width' + }, function (prefix, suffix) { + jQuery.cssHooks[prefix + suffix] = { + expand: function (value) { + var i = 0 + var expanded = {} + + // Assumes a single number if not a string + var parts = typeof value === 'string' ? value.split(' ') : [value] + + for (; i < 4; i++) { + expanded[prefix + cssExpand[i] + suffix] = + parts[i] || parts[i - 2] || parts[0] + } + + return expanded + } + } + + if (prefix !== 'margin') { + jQuery.cssHooks[prefix + suffix].set = setPositiveNumber + } + }) + + jQuery.fn.extend({ + css: function (name, value) { + return access(this, function (elem, name, value) { + var styles; var len + var map = {} + var i = 0 + + if (Array.isArray(name)) { + styles = getStyles(elem) + len = name.length + + for (; i < len; i++) { + map[name[i]] = jQuery.css(elem, name[i], false, styles) + } + + return map + } + + return value !== undefined + ? jQuery.style(elem, name, value) + : jQuery.css(elem, name) + }, name, value, arguments.length > 1) + } + }) + + function Tween (elem, options, prop, end, easing) { + return new Tween.prototype.init(elem, options, prop, end, easing) + } + jQuery.Tween = Tween + + Tween.prototype = { + constructor: Tween, + init: function (elem, options, prop, end, easing, unit) { + this.elem = elem + this.prop = prop + this.easing = easing || jQuery.easing._default + this.options = options + this.start = this.now = this.cur() + this.end = end + this.unit = unit || (jQuery.cssNumber[prop] ? '' : 'px') + }, + cur: function () { + var hooks = Tween.propHooks[this.prop] + + return hooks && hooks.get + ? hooks.get(this) + : Tween.propHooks._default.get(this) + }, + run: function (percent) { + var eased + var hooks = Tween.propHooks[this.prop] + + if (this.options.duration) { + this.pos = eased = jQuery.easing[this.easing]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ) + } else { + this.pos = eased = percent + } + this.now = (this.end - this.start) * eased + this.start + + if (this.options.step) { + this.options.step.call(this.elem, this.now, this) + } + + if (hooks && hooks.set) { + hooks.set(this) + } else { + Tween.propHooks._default.set(this) + } + return this + } + } + + Tween.prototype.init.prototype = Tween.prototype + + Tween.propHooks = { + _default: { + get: function (tween) { + var result + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if (tween.elem.nodeType !== 1 || + tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) { + return tween.elem[tween.prop] + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css(tween.elem, tween.prop, '') + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === 'auto' ? 0 : result + }, + set: function (tween) { + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if (jQuery.fx.step[tween.prop]) { + jQuery.fx.step[tween.prop](tween) + } else if (tween.elem.nodeType === 1 && ( + jQuery.cssHooks[tween.prop] || + tween.elem.style[finalPropName(tween.prop)] != null)) { + jQuery.style(tween.elem, tween.prop, tween.now + tween.unit) + } else { + tween.elem[tween.prop] = tween.now + } + } + } + } + + // Support: IE <=9 only + // Panic based approach to setting things on disconnected nodes + Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function (tween) { + if (tween.elem.nodeType && tween.elem.parentNode) { + tween.elem[tween.prop] = tween.now + } + } + } + + jQuery.easing = { + linear: function (p) { + return p + }, + swing: function (p) { + return 0.5 - Math.cos(p * Math.PI) / 2 + }, + _default: 'swing' + } + + jQuery.fx = Tween.prototype.init + + // Back compat <1.8 extension point + jQuery.fx.step = {} + + var + fxNow; var inProgress + var rfxtypes = /^(?:toggle|show|hide)$/ + var rrun = /queueHooks$/ + + function schedule () { + if (inProgress) { + if (document.hidden === false && window.requestAnimationFrame) { + window.requestAnimationFrame(schedule) + } else { + window.setTimeout(schedule, jQuery.fx.interval) + } + + jQuery.fx.tick() + } + } + + // Animations created synchronously will run synchronously + function createFxNow () { + window.setTimeout(function () { + fxNow = undefined + }) + return (fxNow = Date.now()) + } + + // Generate parameters to create a standard animation + function genFx (type, includeWidth) { + var which + var i = 0 + var attrs = { height: type } + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0 + for (; i < 4; i += 2 - includeWidth) { + which = cssExpand[i] + attrs['margin' + which] = attrs['padding' + which] = type + } + + if (includeWidth) { + attrs.opacity = attrs.width = type + } + + return attrs + } + + function createTween (value, prop, animation) { + var tween + var collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners['*']) + var index = 0 + var length = collection.length + for (; index < length; index++) { + if ((tween = collection[index].call(animation, prop, value))) { + // We're done with this property + return tween + } + } + } + + function defaultPrefilter (elem, props, opts) { + var prop; var value; var toggle; var hooks; var oldfire; var propTween; var restoreDisplay; var display + var isBox = 'width' in props || 'height' in props + var anim = this + var orig = {} + var style = elem.style + var hidden = elem.nodeType && isHiddenWithinTree(elem) + var dataShow = dataPriv.get(elem, 'fxshow') + + // Queue-skipping animations hijack the fx hooks + if (!opts.queue) { + hooks = jQuery._queueHooks(elem, 'fx') + if (hooks.unqueued == null) { + hooks.unqueued = 0 + oldfire = hooks.empty.fire + hooks.empty.fire = function () { + if (!hooks.unqueued) { + oldfire() + } + } + } + hooks.unqueued++ + + anim.always(function () { + // Ensure the complete handler is called before this completes + anim.always(function () { + hooks.unqueued-- + if (!jQuery.queue(elem, 'fx').length) { + hooks.empty.fire() + } + }) + }) + } + + // Detect show/hide animations + for (prop in props) { + value = props[prop] + if (rfxtypes.test(value)) { + delete props[prop] + toggle = toggle || value === 'toggle' + if (value === (hidden ? 'hide' : 'show')) { + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if (value === 'show' && dataShow && dataShow[prop] !== undefined) { + hidden = true + + // Ignore all other no-op show/hide data + } else { + continue + } + } + orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop) + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject(props) + if (!propTween && jQuery.isEmptyObject(orig)) { + return + } + + // Restrict "overflow" and "display" styles during box animations + if (isBox && elem.nodeType === 1) { + // Support: IE <=9 - 11, Edge 12 - 15 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. + opts.overflow = [style.overflow, style.overflowX, style.overflowY] + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display + if (restoreDisplay == null) { + restoreDisplay = dataPriv.get(elem, 'display') + } + display = jQuery.css(elem, 'display') + if (display === 'none') { + if (restoreDisplay) { + display = restoreDisplay + } else { + // Get nonempty value(s) by temporarily forcing visibility + showHide([elem], true) + restoreDisplay = elem.style.display || restoreDisplay + display = jQuery.css(elem, 'display') + showHide([elem]) + } + } + + // Animate inline elements as inline-block + if (display === 'inline' || display === 'inline-block' && restoreDisplay != null) { + if (jQuery.css(elem, 'float') === 'none') { + // Restore the original display value at the end of pure show/hide animations + if (!propTween) { + anim.done(function () { + style.display = restoreDisplay + }) + if (restoreDisplay == null) { + display = style.display + restoreDisplay = display === 'none' ? '' : display + } + } + style.display = 'inline-block' + } + } + } + + if (opts.overflow) { + style.overflow = 'hidden' + anim.always(function () { + style.overflow = opts.overflow[0] + style.overflowX = opts.overflow[1] + style.overflowY = opts.overflow[2] + }) + } + + // Implement show/hide animations + propTween = false + for (prop in orig) { + // General show/hide setup for this element animation + if (!propTween) { + if (dataShow) { + if ('hidden' in dataShow) { + hidden = dataShow.hidden + } + } else { + dataShow = dataPriv.access(elem, 'fxshow', { display: restoreDisplay }) + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if (toggle) { + dataShow.hidden = !hidden + } + + // Show elements before animating them + if (hidden) { + showHide([elem], true) + } + + /* eslint-disable no-loop-func */ + + anim.done(function () { + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if (!hidden) { + showHide([elem]) + } + dataPriv.remove(elem, 'fxshow') + for (prop in orig) { + jQuery.style(elem, prop, orig[prop]) + } + }) + } + + // Per-property setup + propTween = createTween(hidden ? dataShow[prop] : 0, prop, anim) + if (!(prop in dataShow)) { + dataShow[prop] = propTween.start + if (hidden) { + propTween.end = propTween.start + propTween.start = 0 + } + } + } + } + + function propFilter (props, specialEasing) { + var index, name, easing, value, hooks + + // camelCase, specialEasing and expand cssHook pass + for (index in props) { + name = camelCase(index) + easing = specialEasing[name] + value = props[index] + if (Array.isArray(value)) { + easing = value[1] + value = props[index] = value[0] + } + + if (index !== name) { + props[name] = value + delete props[index] + } + + hooks = jQuery.cssHooks[name] + if (hooks && 'expand' in hooks) { + value = hooks.expand(value) + delete props[name] + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for (index in value) { + if (!(index in props)) { + props[index] = value[index] + specialEasing[index] = easing + } + } + } else { + specialEasing[name] = easing + } + } + } + + function Animation (elem, properties, options) { + var result + var stopped + var index = 0 + var length = Animation.prefilters.length + var deferred = jQuery.Deferred().always(function () { + // Don't match elem in the :animated selector + delete tick.elem + }) + var tick = function () { + if (stopped) { + return false + } + var currentTime = fxNow || createFxNow() + var remaining = Math.max(0, animation.startTime + animation.duration - currentTime) + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) + var temp = remaining / animation.duration || 0 + var percent = 1 - temp + var index = 0 + var length = animation.tweens.length + + for (; index < length; index++) { + animation.tweens[index].run(percent) + } + + deferred.notifyWith(elem, [animation, percent, remaining]) + + // If there's more to do, yield + if (percent < 1 && length) { + return remaining + } + + // If this was an empty animation, synthesize a final progress notification + if (!length) { + deferred.notifyWith(elem, [animation, 1, 0]) + } + + // Resolve the animation and report its conclusion + deferred.resolveWith(elem, [animation]) + return false + } + var animation = deferred.promise({ + elem: elem, + props: jQuery.extend({}, properties), + opts: jQuery.extend(true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function (prop, end) { + var tween = jQuery.Tween(elem, animation.opts, prop, end, + animation.opts.specialEasing[prop] || animation.opts.easing) + animation.tweens.push(tween) + return tween + }, + stop: function (gotoEnd) { + var index = 0 + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + var length = gotoEnd ? animation.tweens.length : 0 + if (stopped) { + return this + } + stopped = true + for (; index < length; index++) { + animation.tweens[index].run(1) + } + + // Resolve when we played the last frame; otherwise, reject + if (gotoEnd) { + deferred.notifyWith(elem, [animation, 1, 0]) + deferred.resolveWith(elem, [animation, gotoEnd]) + } else { + deferred.rejectWith(elem, [animation, gotoEnd]) + } + return this + } + }) + var props = animation.props + + propFilter(props, animation.opts.specialEasing) + + for (; index < length; index++) { + result = Animation.prefilters[index].call(animation, elem, props, animation.opts) + if (result) { + if (isFunction(result.stop)) { + jQuery._queueHooks(animation.elem, animation.opts.queue).stop = + result.stop.bind(result) + } + return result + } + } + + jQuery.map(props, createTween, animation) + + if (isFunction(animation.opts.start)) { + animation.opts.start.call(elem, animation) + } + + // Attach callbacks from options + animation + .progress(animation.opts.progress) + .done(animation.opts.done, animation.opts.complete) + .fail(animation.opts.fail) + .always(animation.opts.always) + + jQuery.fx.timer( + jQuery.extend(tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + }) + ) + + return animation + } + + jQuery.Animation = jQuery.extend(Animation, { + + tweeners: { + '*': [function (prop, value) { + var tween = this.createTween(prop, value) + adjustCSS(tween.elem, prop, rcssNum.exec(value), tween) + return tween + }] + }, + + tweener: function (props, callback) { + if (isFunction(props)) { + callback = props + props = ['*'] + } else { + props = props.match(rnothtmlwhite) + } + + var prop + var index = 0 + var length = props.length + + for (; index < length; index++) { + prop = props[index] + Animation.tweeners[prop] = Animation.tweeners[prop] || [] + Animation.tweeners[prop].unshift(callback) + } + }, + + prefilters: [defaultPrefilter], + + prefilter: function (callback, prepend) { + if (prepend) { + Animation.prefilters.unshift(callback) + } else { + Animation.prefilters.push(callback) + } + } + }) + + jQuery.speed = function (speed, easing, fn) { + var opt = speed && typeof speed === 'object' ? jQuery.extend({}, speed) : { + complete: fn || !fn && easing || + isFunction(speed) && speed, + duration: speed, + easing: fn && easing || easing && !isFunction(easing) && easing + } + + // Go to the end state if fx are off + if (jQuery.fx.off) { + opt.duration = 0 + } else { + if (typeof opt.duration !== 'number') { + if (opt.duration in jQuery.fx.speeds) { + opt.duration = jQuery.fx.speeds[opt.duration] + } else { + opt.duration = jQuery.fx.speeds._default + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if (opt.queue == null || opt.queue === true) { + opt.queue = 'fx' + } + + // Queueing + opt.old = opt.complete + + opt.complete = function () { + if (isFunction(opt.old)) { + opt.old.call(this) + } + + if (opt.queue) { + jQuery.dequeue(this, opt.queue) + } + } + + return opt + } + + jQuery.fn.extend({ + fadeTo: function (speed, to, easing, callback) { + // Show any hidden elements after setting opacity to 0 + return this.filter(isHiddenWithinTree).css('opacity', 0).show() + + // Animate to the value specified + .end().animate({ opacity: to }, speed, easing, callback) + }, + animate: function (prop, speed, easing, callback) { + var empty = jQuery.isEmptyObject(prop) + var optall = jQuery.speed(speed, easing, callback) + var doAnimation = function () { + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation(this, jQuery.extend({}, prop), optall) + + // Empty animations, or finishing resolves immediately + if (empty || dataPriv.get(this, 'finish')) { + anim.stop(true) + } + } + doAnimation.finish = doAnimation + + return empty || optall.queue === false + ? this.each(doAnimation) + : this.queue(optall.queue, doAnimation) + }, + stop: function (type, clearQueue, gotoEnd) { + var stopQueue = function (hooks) { + var stop = hooks.stop + delete hooks.stop + stop(gotoEnd) + } + + if (typeof type !== 'string') { + gotoEnd = clearQueue + clearQueue = type + type = undefined + } + if (clearQueue) { + this.queue(type || 'fx', []) + } + + return this.each(function () { + var dequeue = true + var index = type != null && type + 'queueHooks' + var timers = jQuery.timers + var data = dataPriv.get(this) + + if (index) { + if (data[index] && data[index].stop) { + stopQueue(data[index]) + } + } else { + for (index in data) { + if (data[index] && data[index].stop && rrun.test(index)) { + stopQueue(data[index]) + } + } + } + + for (index = timers.length; index--;) { + if (timers[index].elem === this && + (type == null || timers[index].queue === type)) { + timers[index].anim.stop(gotoEnd) + dequeue = false + timers.splice(index, 1) + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if (dequeue || !gotoEnd) { + jQuery.dequeue(this, type) + } + }) + }, + finish: function (type) { + if (type !== false) { + type = type || 'fx' + } + return this.each(function () { + var index + var data = dataPriv.get(this) + var queue = data[type + 'queue'] + var hooks = data[type + 'queueHooks'] + var timers = jQuery.timers + var length = queue ? queue.length : 0 + + // Enable finishing flag on private data + data.finish = true + + // Empty the queue first + jQuery.queue(this, type, []) + + if (hooks && hooks.stop) { + hooks.stop.call(this, true) + } + + // Look for any active animations, and finish them + for (index = timers.length; index--;) { + if (timers[index].elem === this && timers[index].queue === type) { + timers[index].anim.stop(true) + timers.splice(index, 1) + } + } + + // Look for any animations in the old queue and finish them + for (index = 0; index < length; index++) { + if (queue[index] && queue[index].finish) { + queue[index].finish.call(this) + } + } + + // Turn off finishing flag + delete data.finish + }) + } + }) + + jQuery.each(['toggle', 'show', 'hide'], function (_i, name) { + var cssFn = jQuery.fn[name] + jQuery.fn[name] = function (speed, easing, callback) { + return speed == null || typeof speed === 'boolean' + ? cssFn.apply(this, arguments) + : this.animate(genFx(name, true), speed, easing, callback) + } + }) + + // Generate shortcuts for custom animations + jQuery.each({ + slideDown: genFx('show'), + slideUp: genFx('hide'), + slideToggle: genFx('toggle'), + fadeIn: { opacity: 'show' }, + fadeOut: { opacity: 'hide' }, + fadeToggle: { opacity: 'toggle' } + }, function (name, props) { + jQuery.fn[name] = function (speed, easing, callback) { + return this.animate(props, speed, easing, callback) + } + }) + + jQuery.timers = [] + jQuery.fx.tick = function () { + var timer + var i = 0 + var timers = jQuery.timers + + fxNow = Date.now() + + for (; i < timers.length; i++) { + timer = timers[i] + + // Run the timer and safely remove it when done (allowing for external removal) + if (!timer() && timers[i] === timer) { + timers.splice(i--, 1) + } + } + + if (!timers.length) { + jQuery.fx.stop() + } + fxNow = undefined + } + + jQuery.fx.timer = function (timer) { + jQuery.timers.push(timer) + jQuery.fx.start() + } + + jQuery.fx.interval = 13 + jQuery.fx.start = function () { + if (inProgress) { + return + } + + inProgress = true + schedule() + } + + jQuery.fx.stop = function () { + inProgress = null + } + + jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 + } + + // Based off of the plugin by Clint Helfers, with permission. + // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ + jQuery.fn.delay = function (time, type) { + time = jQuery.fx ? jQuery.fx.speeds[time] || time : time + type = type || 'fx' + + return this.queue(type, function (next, hooks) { + var timeout = window.setTimeout(next, time) + hooks.stop = function () { + window.clearTimeout(timeout) + } + }) + }; + + (function () { + var input = document.createElement('input') + var select = document.createElement('select') + var opt = select.appendChild(document.createElement('option')) + + input.type = 'checkbox' + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== '' + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement('input') + input.value = 't' + input.type = 'radio' + support.radioValue = input.value === 't' + })() + + var boolHook + var attrHandle = jQuery.expr.attrHandle + + jQuery.fn.extend({ + attr: function (name, value) { + return access(this, jQuery.attr, name, value, arguments.length > 1) + }, + + removeAttr: function (name) { + return this.each(function () { + jQuery.removeAttr(this, name) + }) + } + }) + + jQuery.extend({ + attr: function (elem, name, value) { + var ret; var hooks + var nType = elem.nodeType + + // Don't get/set attributes on text, comment and attribute nodes + if (nType === 3 || nType === 8 || nType === 2) { + return + } + + // Fallback to prop when attributes are not supported + if (typeof elem.getAttribute === 'undefined') { + return jQuery.prop(elem, name, value) + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if (nType !== 1 || !jQuery.isXMLDoc(elem)) { + hooks = jQuery.attrHooks[name.toLowerCase()] || + (jQuery.expr.match.bool.test(name) ? boolHook : undefined) + } + + if (value !== undefined) { + if (value === null) { + jQuery.removeAttr(elem, name) + return + } + + if (hooks && 'set' in hooks && + (ret = hooks.set(elem, value, name)) !== undefined) { + return ret + } + + elem.setAttribute(name, value + '') + return value + } + + if (hooks && 'get' in hooks && (ret = hooks.get(elem, name)) !== null) { + return ret + } + + ret = jQuery.find.attr(elem, name) + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret + }, + + attrHooks: { + type: { + set: function (elem, value) { + if (!support.radioValue && value === 'radio' && + nodeName(elem, 'input')) { + var val = elem.value + elem.setAttribute('type', value) + if (val) { + elem.value = val + } + return value + } + } + } + }, + + removeAttr: function (elem, value) { + var name + var i = 0 + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + var attrNames = value && value.match(rnothtmlwhite) + + if (attrNames && elem.nodeType === 1) { + while ((name = attrNames[i++])) { + elem.removeAttribute(name) + } + } + } + }) + + // Hooks for boolean attributes + boolHook = { + set: function (elem, value, name) { + if (value === false) { + // Remove boolean attributes when set to false + jQuery.removeAttr(elem, name) + } else { + elem.setAttribute(name, name) + } + return name + } + } + + jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function (_i, name) { + var getter = attrHandle[name] || jQuery.find.attr + + attrHandle[name] = function (elem, name, isXML) { + var ret; var handle + var lowercaseName = name.toLowerCase() + + if (!isXML) { + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[lowercaseName] + attrHandle[lowercaseName] = ret + ret = getter(elem, name, isXML) != null + ? lowercaseName + : null + attrHandle[lowercaseName] = handle + } + return ret + } + }) + + var rfocusable = /^(?:input|select|textarea|button)$/i + var rclickable = /^(?:a|area)$/i + + jQuery.fn.extend({ + prop: function (name, value) { + return access(this, jQuery.prop, name, value, arguments.length > 1) + }, + + removeProp: function (name) { + return this.each(function () { + delete this[jQuery.propFix[name] || name] + }) + } + }) + + jQuery.extend({ + prop: function (elem, name, value) { + var ret; var hooks + var nType = elem.nodeType + + // Don't get/set properties on text, comment and attribute nodes + if (nType === 3 || nType === 8 || nType === 2) { + return + } + + if (nType !== 1 || !jQuery.isXMLDoc(elem)) { + // Fix name and attach hooks + name = jQuery.propFix[name] || name + hooks = jQuery.propHooks[name] + } + + if (value !== undefined) { + if (hooks && 'set' in hooks && + (ret = hooks.set(elem, value, name)) !== undefined) { + return ret + } + + return (elem[name] = value) + } + + if (hooks && 'get' in hooks && (ret = hooks.get(elem, name)) !== null) { + return ret + } + + return elem[name] + }, + + propHooks: { + tabIndex: { + get: function (elem) { + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr(elem, 'tabindex') + + if (tabindex) { + return parseInt(tabindex, 10) + } + + if ( + rfocusable.test(elem.nodeName) || + rclickable.test(elem.nodeName) && elem.href - ) { - return 0; - } - - return -1; - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - } -} ); - -// Support: IE <=11 only -// Accessing the selectedIndex property -// forces the browser to respect setting selected -// on the option -// The getter ensures a default option is selected -// when in an optgroup -// eslint rule "no-unused-expressions" is disabled for this code -// since it considers such accessions noop -if ( !support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent && parent.parentNode ) { - parent.parentNode.selectedIndex; - } - return null; - }, - set: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - }; -} - -jQuery.each( [ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -} ); - - - - - // Strip and collapse whitespace according to HTML spec - // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace - function stripAndCollapse( value ) { - var tokens = value.match( rnothtmlwhite ) || []; - return tokens.join( " " ); - } - - -function getClass( elem ) { - return elem.getAttribute && elem.getAttribute( "class" ) || ""; -} - -function classesToArray( value ) { - if ( Array.isArray( value ) ) { - return value; - } - if ( typeof value === "string" ) { - return value.match( rnothtmlwhite ) || []; - } - return []; -} - -jQuery.fn.extend( { - addClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( !arguments.length ) { - return this.attr( "class", "" ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) > -1 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isValidValue = type === "string" || Array.isArray( value ); - - if ( typeof stateVal === "boolean" && isValidValue ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( isFunction( value ) ) { - return this.each( function( i ) { - jQuery( this ).toggleClass( - value.call( this, i, getClass( this ), stateVal ), - stateVal - ); - } ); - } - - return this.each( function() { - var className, i, self, classNames; - - if ( isValidValue ) { - - // Toggle individual class names - i = 0; - self = jQuery( this ); - classNames = classesToArray( value ); - - while ( ( className = classNames[ i++ ] ) ) { - - // Check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( value === undefined || type === "boolean" ) { - className = getClass( this ); - if ( className ) { - - // Store className if set - dataPriv.set( this, "__className__", className ); - } - - // If the element has a class name or if we're passed `false`, - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - if ( this.setAttribute ) { - this.setAttribute( "class", - className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" - ); - } - } - } ); - }, - - hasClass: function( selector ) { - var className, elem, - i = 0; - - className = " " + selector + " "; - while ( ( elem = this[ i++ ] ) ) { - if ( elem.nodeType === 1 && - ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; - } - } - - return false; - } -} ); - - - - -var rreturn = /\r/g; - -jQuery.fn.extend( { - val: function( value ) { - var hooks, ret, valueIsFunction, - elem = this[ 0 ]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || - jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && - "get" in hooks && - ( ret = hooks.get( elem, "value" ) ) !== undefined - ) { - return ret; - } - - ret = elem.value; - - // Handle most common string cases - if ( typeof ret === "string" ) { - return ret.replace( rreturn, "" ); - } - - // Handle cases where value is null/undef or number - return ret == null ? "" : ret; - } - - return; - } - - valueIsFunction = isFunction( value ); - - return this.each( function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( valueIsFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - - } else if ( typeof val === "number" ) { - val += ""; - - } else if ( Array.isArray( val ) ) { - val = jQuery.map( val, function( value ) { - return value == null ? "" : value + ""; - } ); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - } ); - } -} ); - -jQuery.extend( { - valHooks: { - option: { - get: function( elem ) { - - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - - // Support: IE <=10 - 11 only - // option.text throws exceptions (#14686, #14858) - // Strip and collapse whitespace - // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse( jQuery.text( elem ) ); - } - }, - select: { - get: function( elem ) { - var value, option, i, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one", - values = one ? null : [], - max = one ? index + 1 : options.length; - - if ( index < 0 ) { - i = max; - - } else { - i = one ? index : 0; - } - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Support: IE <=9 only - // IE8-9 doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && + ) { + return 0 + } + + return -1 + } + } + }, + + propFix: { + for: 'htmlFor', + class: 'className' + } + }) + + // Support: IE <=11 only + // Accessing the selectedIndex property + // forces the browser to respect setting selected + // on the option + // The getter ensures a default option is selected + // when in an optgroup + // eslint rule "no-unused-expressions" is disabled for this code + // since it considers such accessions noop + if (!support.optSelected) { + jQuery.propHooks.selected = { + get: function (elem) { + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode + if (parent && parent.parentNode) { + parent.parentNode.selectedIndex + } + return null + }, + set: function (elem) { + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode + if (parent) { + parent.selectedIndex + + if (parent.parentNode) { + parent.parentNode.selectedIndex + } + } + } + } + } + + jQuery.each([ + 'tabIndex', + 'readOnly', + 'maxLength', + 'cellSpacing', + 'cellPadding', + 'rowSpan', + 'colSpan', + 'useMap', + 'frameBorder', + 'contentEditable' + ], function () { + jQuery.propFix[this.toLowerCase()] = this + }) + + // Strip and collapse whitespace according to HTML spec + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace + function stripAndCollapse (value) { + var tokens = value.match(rnothtmlwhite) || [] + return tokens.join(' ') + } + + function getClass (elem) { + return elem.getAttribute && elem.getAttribute('class') || '' + } + + function classesToArray (value) { + if (Array.isArray(value)) { + return value + } + if (typeof value === 'string') { + return value.match(rnothtmlwhite) || [] + } + return [] + } + + jQuery.fn.extend({ + addClass: function (value) { + var classes; var elem; var cur; var curValue; var clazz; var j; var finalValue + var i = 0 + + if (isFunction(value)) { + return this.each(function (j) { + jQuery(this).addClass(value.call(this, j, getClass(this))) + }) + } + + classes = classesToArray(value) + + if (classes.length) { + while ((elem = this[i++])) { + curValue = getClass(elem) + cur = elem.nodeType === 1 && (' ' + stripAndCollapse(curValue) + ' ') + + if (cur) { + j = 0 + while ((clazz = classes[j++])) { + if (cur.indexOf(' ' + clazz + ' ') < 0) { + cur += clazz + ' ' + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse(cur) + if (curValue !== finalValue) { + elem.setAttribute('class', finalValue) + } + } + } + } + + return this + }, + + removeClass: function (value) { + var classes; var elem; var cur; var curValue; var clazz; var j; var finalValue + var i = 0 + + if (isFunction(value)) { + return this.each(function (j) { + jQuery(this).removeClass(value.call(this, j, getClass(this))) + }) + } + + if (!arguments.length) { + return this.attr('class', '') + } + + classes = classesToArray(value) + + if (classes.length) { + while ((elem = this[i++])) { + curValue = getClass(elem) + + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && (' ' + stripAndCollapse(curValue) + ' ') + + if (cur) { + j = 0 + while ((clazz = classes[j++])) { + // Remove *all* instances + while (cur.indexOf(' ' + clazz + ' ') > -1) { + cur = cur.replace(' ' + clazz + ' ', ' ') + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse(cur) + if (curValue !== finalValue) { + elem.setAttribute('class', finalValue) + } + } + } + } + + return this + }, + + toggleClass: function (value, stateVal) { + var type = typeof value + var isValidValue = type === 'string' || Array.isArray(value) + + if (typeof stateVal === 'boolean' && isValidValue) { + return stateVal ? this.addClass(value) : this.removeClass(value) + } + + if (isFunction(value)) { + return this.each(function (i) { + jQuery(this).toggleClass( + value.call(this, i, getClass(this), stateVal), + stateVal + ) + }) + } + + return this.each(function () { + var className, i, self, classNames + + if (isValidValue) { + // Toggle individual class names + i = 0 + self = jQuery(this) + classNames = classesToArray(value) + + while ((className = classNames[i++])) { + // Check each className given, space separated list + if (self.hasClass(className)) { + self.removeClass(className) + } else { + self.addClass(className) + } + } + + // Toggle whole class name + } else if (value === undefined || type === 'boolean') { + className = getClass(this) + if (className) { + // Store className if set + dataPriv.set(this, '__className__', className) + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if (this.setAttribute) { + this.setAttribute('class', + className || value === false + ? '' + : dataPriv.get(this, '__className__') || '' + ) + } + } + }) + }, + + hasClass: function (selector) { + var className; var elem + var i = 0 + + className = ' ' + selector + ' ' + while ((elem = this[i++])) { + if (elem.nodeType === 1 && + (' ' + stripAndCollapse(getClass(elem)) + ' ').indexOf(className) > -1) { + return true + } + } + + return false + } + }) + + var rreturn = /\r/g + + jQuery.fn.extend({ + val: function (value) { + var hooks; var ret; var valueIsFunction + var elem = this[0] + + if (!arguments.length) { + if (elem) { + hooks = jQuery.valHooks[elem.type] || + jQuery.valHooks[elem.nodeName.toLowerCase()] + + if (hooks && + 'get' in hooks && + (ret = hooks.get(elem, 'value')) !== undefined + ) { + return ret + } + + ret = elem.value + + // Handle most common string cases + if (typeof ret === 'string') { + return ret.replace(rreturn, '') + } + + // Handle cases where value is null/undef or number + return ret == null ? '' : ret + } + + return + } + + valueIsFunction = isFunction(value) + + return this.each(function (i) { + var val + + if (this.nodeType !== 1) { + return + } + + if (valueIsFunction) { + val = value.call(this, i, jQuery(this).val()) + } else { + val = value + } + + // Treat null/undefined as ""; convert numbers to string + if (val == null) { + val = '' + } else if (typeof val === 'number') { + val += '' + } else if (Array.isArray(val)) { + val = jQuery.map(val, function (value) { + return value == null ? '' : value + '' + }) + } + + hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()] + + // If set returns undefined, fall back to normal setting + if (!hooks || !('set' in hooks) || hooks.set(this, val, 'value') === undefined) { + this.value = val + } + }) + } + }) + + jQuery.extend({ + valHooks: { + option: { + get: function (elem) { + var val = jQuery.find.attr(elem, 'value') + return val != null + ? val + + // Support: IE <=10 - 11 only + // option.text throws exceptions (#14686, #14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + : stripAndCollapse(jQuery.text(elem)) + } + }, + select: { + get: function (elem) { + var value; var option; var i + var options = elem.options + var index = elem.selectedIndex + var one = elem.type === 'select-one' + var values = one ? null : [] + var max = one ? index + 1 : options.length + + if (index < 0) { + i = max + } else { + i = one ? index : 0 + } + + // Loop through all the selected options + for (; i < max; i++) { + option = options[i] + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) + if ((option.selected || i === index) && // Don't return options that are disabled or in a disabled optgroup !option.disabled && - ( !option.parentNode.disabled || - !nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - - /* eslint-disable no-cond-assign */ - - if ( option.selected = - jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 - ) { - optionSet = true; - } - - /* eslint-enable no-cond-assign */ - } - - // Force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - } -} ); - -// Radios and checkboxes getter/setter -jQuery.each( [ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( Array.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); - } - } - }; - if ( !support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - return elem.getAttribute( "value" ) === null ? "on" : elem.value; - }; - } -} ); - - - - -// Return jQuery for attributes-only inclusion - - -support.focusin = "onfocusin" in window; - - -var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - stopPropagationCallback = function( e ) { - e.stopPropagation(); - }; - -jQuery.extend( jQuery.event, { - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - - cur = lastElement = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "." ) > -1 ) { - - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split( "." ); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf( ":" ) < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join( "." ); - event.rnamespace = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === ( elem.ownerDocument || document ) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { - lastElement = cur; - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( - dataPriv.get( cur, "events" ) || Object.create( null ) - )[ event.type ] && - dataPriv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( ( !special._default || - special._default.apply( eventPath.pop(), data ) === false ) && - acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - - if ( event.isPropagationStopped() ) { - lastElement.addEventListener( type, stopPropagationCallback ); - } - - elem[ type ](); - - if ( event.isPropagationStopped() ) { - lastElement.removeEventListener( type, stopPropagationCallback ); - } - - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - // Piggyback on a donor event to simulate a different one - // Used only for `focus(in | out)` events - simulate: function( type, elem, event ) { - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true - } - ); - - jQuery.event.trigger( e, null, elem ); - } - -} ); - -jQuery.fn.extend( { - - trigger: function( type, data ) { - return this.each( function() { - jQuery.event.trigger( type, data, this ); - } ); - }, - triggerHandler: function( type, data ) { - var elem = this[ 0 ]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -} ); - - -// Support: Firefox <=44 -// Firefox doesn't have focus(in | out) events -// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 -// -// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 -// focus(in | out) events fire after focus & blur events, -// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order -// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 -if ( !support.focusin ) { - jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - - // Handle: regular nodes (via `this.ownerDocument`), window - // (via `this.document`) & document (via `this`). - var doc = this.ownerDocument || this.document || this, - attaches = dataPriv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this.document || this, - attaches = dataPriv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - dataPriv.remove( doc, fix ); - - } else { - dataPriv.access( doc, fix, attaches ); - } - } - }; - } ); -} -var location = window.location; - -var nonce = { guid: Date.now() }; - -var rquery = ( /\?/ ); - - - -// Cross-browser xml parsing -jQuery.parseXML = function( data ) { - var xml; - if ( !data || typeof data !== "string" ) { - return null; - } - - // Support: IE 9 - 11 only - // IE throws on parseFromString with invalid input. - try { - xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) { - xml = undefined; - } - - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; -}; - - -var - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( Array.isArray( obj ) ) { - - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - - // Item is non-scalar (array or object), encode its numeric index. - buildParams( - prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", - v, - traditional, - add - ); - } - } ); - - } else if ( !traditional && toType( obj ) === "object" ) { - - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - - // Serialize scalar item. - add( prefix, obj ); - } -} - -// Serialize an array of form elements or a set of -// key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, valueOrFunction ) { - - // If value is a function, invoke it and use its return value - var value = isFunction( valueOrFunction ) ? - valueOrFunction() : - valueOrFunction; - - s[ s.length ] = encodeURIComponent( key ) + "=" + - encodeURIComponent( value == null ? "" : value ); - }; - - if ( a == null ) { - return ""; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - } ); - - } else { - - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ); -}; - -jQuery.fn.extend( { - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map( function() { - - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - } ) - .filter( function() { - var type = this.type; - - // Use .is( ":disabled" ) so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !rcheckableType.test( type ) ); - } ) - .map( function( _i, elem ) { - var val = jQuery( this ).val(); - - if ( val == null ) { - return null; - } - - if ( Array.isArray( val ) ) { - return jQuery.map( val, function( val ) { - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ); - } - - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ).get(); - } -} ); - - -var - r20 = /%20/g, - rhash = /#.*$/, - rantiCache = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, - - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - - /* Prefilters + (!option.parentNode.disabled || + !nodeName(option.parentNode, 'optgroup'))) { + // Get the specific value for the option + value = jQuery(option).val() + + // We don't need an array for one selects + if (one) { + return value + } + + // Multi-Selects return an array + values.push(value) + } + } + + return values + }, + + set: function (elem, value) { + var optionSet; var option + var options = elem.options + var values = jQuery.makeArray(value) + var i = options.length + + while (i--) { + option = options[i] + + /* eslint-disable no-cond-assign */ + + if (option.selected = + jQuery.inArray(jQuery.valHooks.option.get(option), values) > -1 + ) { + optionSet = true + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if (!optionSet) { + elem.selectedIndex = -1 + } + return values + } + } + } + }) + + // Radios and checkboxes getter/setter + jQuery.each(['radio', 'checkbox'], function () { + jQuery.valHooks[this] = { + set: function (elem, value) { + if (Array.isArray(value)) { + return (elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1) + } + } + } + if (!support.checkOn) { + jQuery.valHooks[this].get = function (elem) { + return elem.getAttribute('value') === null ? 'on' : elem.value + } + } + }) + + // Return jQuery for attributes-only inclusion + + support.focusin = 'onfocusin' in window + + var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/ + var stopPropagationCallback = function (e) { + e.stopPropagation() + } + + jQuery.extend(jQuery.event, { + + trigger: function (event, data, elem, onlyHandlers) { + var i; var cur; var tmp; var bubbleType; var ontype; var handle; var special; var lastElement + var eventPath = [elem || document] + var type = hasOwn.call(event, 'type') ? event.type : event + var namespaces = hasOwn.call(event, 'namespace') ? event.namespace.split('.') : [] + + cur = lastElement = tmp = elem = elem || document + + // Don't do events on text and comment nodes + if (elem.nodeType === 3 || elem.nodeType === 8) { + return + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if (rfocusMorph.test(type + jQuery.event.triggered)) { + return + } + + if (type.indexOf('.') > -1) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split('.') + type = namespaces.shift() + namespaces.sort() + } + ontype = type.indexOf(':') < 0 && 'on' + type + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[jQuery.expando] + ? event + : new jQuery.Event(type, typeof event === 'object' && event) + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3 + event.namespace = namespaces.join('.') + event.rnamespace = event.namespace + ? new RegExp('(^|\\.)' + namespaces.join('\\.(?:.*\\.|)') + '(\\.|$)') + : null + + // Clean up the event in case it is being reused + event.result = undefined + if (!event.target) { + event.target = elem + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null + ? [event] + : jQuery.makeArray(data, [event]) + + // Allow special events to draw outside the lines + special = jQuery.event.special[type] || {} + if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) { + return + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if (!onlyHandlers && !special.noBubble && !isWindow(elem)) { + bubbleType = special.delegateType || type + if (!rfocusMorph.test(bubbleType + type)) { + cur = cur.parentNode + } + for (; cur; cur = cur.parentNode) { + eventPath.push(cur) + tmp = cur + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if (tmp === (elem.ownerDocument || document)) { + eventPath.push(tmp.defaultView || tmp.parentWindow || window) + } + } + + // Fire handlers on the event path + i = 0 + while ((cur = eventPath[i++]) && !event.isPropagationStopped()) { + lastElement = cur + event.type = i > 1 + ? bubbleType + : special.bindType || type + + // jQuery handler + handle = ( + dataPriv.get(cur, 'events') || Object.create(null) + )[event.type] && + dataPriv.get(cur, 'handle') + if (handle) { + handle.apply(cur, data) + } + + // Native handler + handle = ontype && cur[ontype] + if (handle && handle.apply && acceptData(cur)) { + event.result = handle.apply(cur, data) + if (event.result === false) { + event.preventDefault() + } + } + } + event.type = type + + // If nobody prevented the default action, do it now + if (!onlyHandlers && !event.isDefaultPrevented()) { + if ((!special._default || + special._default.apply(eventPath.pop(), data) === false) && + acceptData(elem)) { + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if (ontype && isFunction(elem[type]) && !isWindow(elem)) { + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ontype] + + if (tmp) { + elem[ontype] = null + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type + + if (event.isPropagationStopped()) { + lastElement.addEventListener(type, stopPropagationCallback) + } + + elem[type]() + + if (event.isPropagationStopped()) { + lastElement.removeEventListener(type, stopPropagationCallback) + } + + jQuery.event.triggered = undefined + + if (tmp) { + elem[ontype] = tmp + } + } + } + } + + return event.result + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function (type, elem, event) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ) + + jQuery.event.trigger(e, null, elem) + } + + }) + + jQuery.fn.extend({ + + trigger: function (type, data) { + return this.each(function () { + jQuery.event.trigger(type, data, this) + }) + }, + triggerHandler: function (type, data) { + var elem = this[0] + if (elem) { + return jQuery.event.trigger(type, data, elem, true) + } + } + }) + + // Support: Firefox <=44 + // Firefox doesn't have focus(in | out) events + // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 + // + // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 + // focus(in | out) events fire after focus & blur events, + // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order + // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 + if (!support.focusin) { + jQuery.each({ focus: 'focusin', blur: 'focusout' }, function (orig, fix) { + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function (event) { + jQuery.event.simulate(fix, event.target, jQuery.event.fix(event)) + } + + jQuery.event.special[fix] = { + setup: function () { + // Handle: regular nodes (via `this.ownerDocument`), window + // (via `this.document`) & document (via `this`). + var doc = this.ownerDocument || this.document || this + var attaches = dataPriv.access(doc, fix) + + if (!attaches) { + doc.addEventListener(orig, handler, true) + } + dataPriv.access(doc, fix, (attaches || 0) + 1) + }, + teardown: function () { + var doc = this.ownerDocument || this.document || this + var attaches = dataPriv.access(doc, fix) - 1 + + if (!attaches) { + doc.removeEventListener(orig, handler, true) + dataPriv.remove(doc, fix) + } else { + dataPriv.access(doc, fix, attaches) + } + } + } + }) + } + var location = window.location + + var nonce = { guid: Date.now() } + + var rquery = (/\?/) + + // Cross-browser xml parsing + jQuery.parseXML = function (data) { + var xml + if (!data || typeof data !== 'string') { + return null + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = (new window.DOMParser()).parseFromString(data, 'text/xml') + } catch (e) { + xml = undefined + } + + if (!xml || xml.getElementsByTagName('parsererror').length) { + jQuery.error('Invalid XML: ' + data) + } + return xml + } + + var + rbracket = /\[\]$/ + var rCRLF = /\r?\n/g + var rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i + var rsubmittable = /^(?:input|select|textarea|keygen)/i + + function buildParams (prefix, obj, traditional, add) { + var name + + if (Array.isArray(obj)) { + // Serialize array item. + jQuery.each(obj, function (i, v) { + if (traditional || rbracket.test(prefix)) { + // Treat each array item as a scalar. + add(prefix, v) + } else { + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + '[' + (typeof v === 'object' && v != null ? i : '') + ']', + v, + traditional, + add + ) + } + }) + } else if (!traditional && toType(obj) === 'object') { + // Serialize object item. + for (name in obj) { + buildParams(prefix + '[' + name + ']', obj[name], traditional, add) + } + } else { + // Serialize scalar item. + add(prefix, obj) + } + } + + // Serialize an array of form elements or a set of + // key/values into a query string + jQuery.param = function (a, traditional) { + var prefix + var s = [] + var add = function (key, valueOrFunction) { + // If value is a function, invoke it and use its return value + var value = isFunction(valueOrFunction) + ? valueOrFunction() + : valueOrFunction + + s[s.length] = encodeURIComponent(key) + '=' + + encodeURIComponent(value == null ? '' : value) + } + + if (a == null) { + return '' + } + + // If an array was passed in, assume that it is an array of form elements. + if (Array.isArray(a) || (a.jquery && !jQuery.isPlainObject(a))) { + // Serialize the form elements + jQuery.each(a, function () { + add(this.name, this.value) + }) + } else { + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for (prefix in a) { + buildParams(prefix, a[prefix], traditional, add) + } + } + + // Return the resulting serialization + return s.join('&') + } + + jQuery.fn.extend({ + serialize: function () { + return jQuery.param(this.serializeArray()) + }, + serializeArray: function () { + return this.map(function () { + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop(this, 'elements') + return elements ? jQuery.makeArray(elements) : this + }) + .filter(function () { + var type = this.type + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery(this).is(':disabled') && + rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && + (this.checked || !rcheckableType.test(type)) + }) + .map(function (_i, elem) { + var val = jQuery(this).val() + + if (val == null) { + return null + } + + if (Array.isArray(val)) { + return jQuery.map(val, function (val) { + return { name: elem.name, value: val.replace(rCRLF, '\r\n') } + }) + } + + return { name: elem.name, value: val.replace(rCRLF, '\r\n') } + }).get() + } + }) + + var + r20 = /%20/g + var rhash = /#.*$/ + var rantiCache = /([?&])_=[^&]*/ + var rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg + + // #7653, #8125, #8152: local protocol detection + var rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/ + var rnoContent = /^(?:GET|HEAD)$/ + var rprotocol = /^\/\// + + /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport @@ -9019,279 +8653,263 @@ var * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */ - prefilters = {}, + var prefilters = {} - /* Transports bindings + /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat( "*" ), - - // Anchor tag for parsing the document origin - originAnchor = document.createElement( "a" ); - originAnchor.href = location.href; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; - - if ( isFunction( func ) ) { - - // For each dataType in the dataTypeExpression - while ( ( dataType = dataTypes[ i++ ] ) ) { - - // Prepend if requested - if ( dataType[ 0 ] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); - - // Otherwise append - } else { - ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if ( typeof dataTypeOrTransport === "string" && - !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - } ); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -/* Handles responses to an ajax request: + var transports = {} + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + var allTypes = '*/'.concat('*') + + // Anchor tag for parsing the document origin + var originAnchor = document.createElement('a') + originAnchor.href = location.href + + // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport + function addToPrefiltersOrTransports (structure) { + // dataTypeExpression is optional and defaults to "*" + return function (dataTypeExpression, func) { + if (typeof dataTypeExpression !== 'string') { + func = dataTypeExpression + dataTypeExpression = '*' + } + + var dataType + var i = 0 + var dataTypes = dataTypeExpression.toLowerCase().match(rnothtmlwhite) || [] + + if (isFunction(func)) { + // For each dataType in the dataTypeExpression + while ((dataType = dataTypes[i++])) { + // Prepend if requested + if (dataType[0] === '+') { + dataType = dataType.slice(1) || '*'; + (structure[dataType] = structure[dataType] || []).unshift(func) + + // Otherwise append + } else { + (structure[dataType] = structure[dataType] || []).push(func) + } + } + } + } + } + + // Base inspection function for prefilters and transports + function inspectPrefiltersOrTransports (structure, options, originalOptions, jqXHR) { + var inspected = {} + var seekingTransport = (structure === transports) + + function inspect (dataType) { + var selected + inspected[dataType] = true + jQuery.each(structure[dataType] || [], function (_, prefilterOrFactory) { + var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR) + if (typeof dataTypeOrTransport === 'string' && + !seekingTransport && !inspected[dataTypeOrTransport]) { + options.dataTypes.unshift(dataTypeOrTransport) + inspect(dataTypeOrTransport) + return false + } else if (seekingTransport) { + return !(selected = dataTypeOrTransport) + } + }) + return selected + } + + return inspect(options.dataTypes[0]) || !inspected['*'] && inspect('*') + } + + // A special extend for ajax options + // that takes "flat" options (not to be deep extended) + // Fixes #9887 + function ajaxExtend (target, src) { + var key; var deep + var flatOptions = jQuery.ajaxSettings.flatOptions || {} + + for (key in src) { + if (src[key] !== undefined) { + (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key] + } + } + if (deep) { + jQuery.extend(true, target, deep) + } + + return target + } + + /* Handles responses to an ajax request: * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes; - - // Remove auto dataType and get content-type in the process - while ( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -/* Chain conversions given the request and the original response + function ajaxHandleResponses (s, jqXHR, responses) { + var ct; var type; var finalDataType; var firstDataType + var contents = s.contents + var dataTypes = s.dataTypes + + // Remove auto dataType and get content-type in the process + while (dataTypes[0] === '*') { + dataTypes.shift() + if (ct === undefined) { + ct = s.mimeType || jqXHR.getResponseHeader('Content-Type') + } + } + + // Check if we're dealing with a known content-type + if (ct) { + for (type in contents) { + if (contents[type] && contents[type].test(ct)) { + dataTypes.unshift(type) + break + } + } + } + + // Check to see if we have a response for the expected dataType + if (dataTypes[0] in responses) { + finalDataType = dataTypes[0] + } else { + // Try convertible dataTypes + for (type in responses) { + if (!dataTypes[0] || s.converters[type + ' ' + dataTypes[0]]) { + finalDataType = type + break + } + if (!firstDataType) { + firstDataType = type + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if (finalDataType) { + if (finalDataType !== dataTypes[0]) { + dataTypes.unshift(finalDataType) + } + return responses[finalDataType] + } + } + + /* Chain conversions given the request and the original response * Also sets the responseXXX fields on the jqXHR instance */ -function ajaxConvert( s, response, jqXHR, isSuccess ) { - var conv2, current, conv, tmp, prev, - converters = {}, - - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(); - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - current = dataTypes.shift(); - - // Convert to each sequential dataType - while ( current ) { - - if ( s.responseFields[ current ] ) { - jqXHR[ s.responseFields[ current ] ] = response; - } - - // Apply the dataFilter if provided - if ( !prev && isSuccess && s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - prev = current; - current = dataTypes.shift(); - - if ( current ) { - - // There's only work to do if current dataType is non-auto - if ( current === "*" ) { - - current = prev; - - // Convert response if prev dataType is non-auto and differs from current - } else if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split( " " ); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.unshift( tmp[ 1 ] ); - } - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s.throws ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { - state: "parsererror", - error: conv ? e : "No conversion from " + prev + " to " + current - }; - } - } - } - } - } - } - - return { state: "success", data: response }; -} - -jQuery.extend( { - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: location.href, - type: "GET", - isLocal: rlocalProtocol.test( location.protocol ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - - /* + function ajaxConvert (s, response, jqXHR, isSuccess) { + var conv2; var current; var conv; var tmp; var prev + var converters = {} + + // Work with a copy of dataTypes in case we need to modify it for conversion + var dataTypes = s.dataTypes.slice() + + // Create converters map with lowercased keys + if (dataTypes[1]) { + for (conv in s.converters) { + converters[conv.toLowerCase()] = s.converters[conv] + } + } + + current = dataTypes.shift() + + // Convert to each sequential dataType + while (current) { + if (s.responseFields[current]) { + jqXHR[s.responseFields[current]] = response + } + + // Apply the dataFilter if provided + if (!prev && isSuccess && s.dataFilter) { + response = s.dataFilter(response, s.dataType) + } + + prev = current + current = dataTypes.shift() + + if (current) { + // There's only work to do if current dataType is non-auto + if (current === '*') { + current = prev + + // Convert response if prev dataType is non-auto and differs from current + } else if (prev !== '*' && prev !== current) { + // Seek a direct converter + conv = converters[prev + ' ' + current] || converters['* ' + current] + + // If none found, seek a pair + if (!conv) { + for (conv2 in converters) { + // If conv2 outputs current + tmp = conv2.split(' ') + if (tmp[1] === current) { + // If prev can be converted to accepted input + conv = converters[prev + ' ' + tmp[0]] || + converters['* ' + tmp[0]] + if (conv) { + // Condense equivalence converters + if (conv === true) { + conv = converters[conv2] + + // Otherwise, insert the intermediate dataType + } else if (converters[conv2] !== true) { + current = tmp[0] + dataTypes.unshift(tmp[1]) + } + break + } + } + } + } + + // Apply converter (if not an equivalence) + if (conv !== true) { + // Unless errors are allowed to bubble, catch and return them + if (conv && s.throws) { + response = conv(response) + } else { + try { + response = conv(response) + } catch (e) { + return { + state: 'parsererror', + error: conv ? e : 'No conversion from ' + prev + ' to ' + current + } + } + } + } + } + } + } + + return { state: 'success', data: response } + } + + jQuery.extend({ + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: 'GET', + isLocal: rlocalProtocol.test(location.protocol), + global: true, + processData: true, + async: true, + contentType: 'application/x-www-form-urlencoded; charset=UTF-8', + + /* timeout: 0, data: null, dataType: null, @@ -9303,1570 +8921,1492 @@ jQuery.extend( { headers: {}, */ - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, + accepts: { + '*': allTypes, + 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/ - }, + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ + }, - responseFields: { - xml: "responseXML", - text: "responseText", - json: "responseJSON" - }, + responseFields: { + xml: 'responseXML', + text: 'responseText', + json: 'responseJSON' + }, - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { - // Convert anything to text - "* text": String, + // Convert anything to text + '* text': String, - // Text to html (true = no transformation) - "text html": true, + // Text to html (true = no transformation) + 'text html': true, - // Evaluate text as a json expression - "text json": JSON.parse, + // Evaluate text as a json expression + 'text json': JSON.parse, - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - - // URL without anti-cache param - cacheURL, - - // Response headers - responseHeadersString, - responseHeaders, - - // timeout handle - timeoutTimer, - - // Url cleanup var - urlAnchor, - - // Request state (becomes false upon send and true upon completion) - completed, - - // To know if global events are to be dispatched - fireGlobals, - - // Loop variable - i, - - // uncached part of the url - uncached, - - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - - // Callbacks context - callbackContext = s.context || s, - - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && - ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - - // Status-dependent callbacks - statusCode = s.statusCode || {}, - - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - - // Default abort message - strAbort = "canceled", - - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( completed ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() + " " ] = - ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) - .concat( match[ 2 ] ); - } - } - match = responseHeaders[ key.toLowerCase() + " " ]; - } - return match == null ? null : match.join( ", " ); - }, - - // Raw string - getAllResponseHeaders: function() { - return completed ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( completed == null ) { - name = requestHeadersNames[ name.toLowerCase() ] = - requestHeadersNames[ name.toLowerCase() ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( completed == null ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( completed ) { - - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } else { - - // Lazy-add the new callbacks in a way that preserves old ones - for ( code in map ) { - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ); - - // Add protocol if not provided (prefilters might expect it) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || location.href ) + "" ) - .replace( rprotocol, location.protocol + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - - // A cross-domain request is in order when the origin doesn't match the current origin. - if ( s.crossDomain == null ) { - urlAnchor = document.createElement( "a" ); - - // Support: IE <=8 - 11, Edge 12 - 15 - // IE throws exception on accessing the href property if url is malformed, - // e.g. http://example.com:80x/ - try { - urlAnchor.href = s.url; - - // Support: IE <=8 - 11 only - // Anchor's host property isn't correctly set when s.url is relative - urlAnchor.href = urlAnchor.href; - s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== - urlAnchor.protocol + "//" + urlAnchor.host; - } catch ( e ) { - - // If there is an error parsing the URL, assume it is crossDomain, - // it can be rejected by the transport if it is invalid - s.crossDomain = true; - } - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( completed ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) - fireGlobals = jQuery.event && s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - // Remove hash to simplify url manipulation - cacheURL = s.url.replace( rhash, "" ); - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // Remember the hash so we can put it back - uncached = s.url.slice( cacheURL.length ); - - // If data is available and should be processed, append data to url - if ( s.data && ( s.processData || typeof s.data === "string" ) ) { - cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; - - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add or update anti-cache param if needed - if ( s.cache === false ) { - cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + - uncached; - } - - // Put hash and anti-cache on the URL that will be requested (gh-1732) - s.url = cacheURL + uncached; - - // Change '%20' to '+' if this is encoded form body content (gh-2658) - } else if ( s.data && s.processData && - ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { - s.data = s.data.replace( r20, "+" ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? - s.accepts[ s.dataTypes[ 0 ] ] + - ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && - ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { - - // Abort if not done already and return - return jqXHR.abort(); - } - - // Aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - completeDeferred.add( s.complete ); - jqXHR.done( s.success ); - jqXHR.fail( s.error ); - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - - // If request was aborted inside ajaxSend, stop there - if ( completed ) { - return jqXHR; - } - - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = window.setTimeout( function() { - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - completed = false; - transport.send( requestHeaders, done ); - } catch ( e ) { - - // Rethrow post-completion exceptions - if ( completed ) { - throw e; - } - - // Propagate others as results - done( -1, e ); - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Ignore repeat invocations - if ( completed ) { - return; - } - - completed = true; - - // Clear timeout if it exists - if ( timeoutTimer ) { - window.clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Determine if successful - isSuccess = status >= 200 && status < 300 || status === 304; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // Use a noop converter for missing script - if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) { - s.converters[ "text script" ] = function() {}; - } - - // Convert no matter what (that way responseXXX fields are always set) - response = ajaxConvert( s, response, jqXHR, isSuccess ); - - // If successful, handle type chaining - if ( isSuccess ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader( "Last-Modified" ); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader( "etag" ); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // if no content - if ( status === 204 || s.type === "HEAD" ) { - statusText = "nocontent"; - - // if not modified - } else if ( status === 304 ) { - statusText = "notmodified"; - - // If we have data, let's convert it - } else { - statusText = response.state; - success = response.data; - error = response.error; - isSuccess = !error; - } - } else { - - // Extract error from statusText and normalize for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - return jqXHR; - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - } -} ); - -jQuery.each( [ "get", "post" ], function( _i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - - // Shift arguments if data argument was omitted - if ( isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - // The url can be an options object (which then must have .url) - return jQuery.ajax( jQuery.extend( { - url: url, - type: method, - dataType: type, - data: data, - success: callback - }, jQuery.isPlainObject( url ) && url ) ); - }; -} ); - -jQuery.ajaxPrefilter( function( s ) { - var i; - for ( i in s.headers ) { - if ( i.toLowerCase() === "content-type" ) { - s.contentType = s.headers[ i ] || ""; - } - } -} ); - - -jQuery._evalUrl = function( url, options, doc ) { - return jQuery.ajax( { - url: url, - - // Make this explicit, since user can override this through ajaxSetup (#11264) - type: "GET", - dataType: "script", - cache: true, - async: false, - global: false, - - // Only evaluate the response if it is successful (gh-4126) - // dataFilter is not invoked for failure responses, so using it instead - // of the default converter is kludgy but it works. - converters: { - "text script": function() {} - }, - dataFilter: function( response ) { - jQuery.globalEval( response, options, doc ); - } - } ); -}; - - -jQuery.fn.extend( { - wrapAll: function( html ) { - var wrap; - - if ( this[ 0 ] ) { - if ( isFunction( html ) ) { - html = html.call( this[ 0 ] ); - } - - // The elements to wrap the target around - wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); - - if ( this[ 0 ].parentNode ) { - wrap.insertBefore( this[ 0 ] ); - } - - wrap.map( function() { - var elem = this; - - while ( elem.firstElementChild ) { - elem = elem.firstElementChild; - } - - return elem; - } ).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( isFunction( html ) ) { - return this.each( function( i ) { - jQuery( this ).wrapInner( html.call( this, i ) ); - } ); - } - - return this.each( function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - } ); - }, - - wrap: function( html ) { - var htmlIsFunction = isFunction( html ); - - return this.each( function( i ) { - jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); - } ); - }, - - unwrap: function( selector ) { - this.parent( selector ).not( "body" ).each( function() { - jQuery( this ).replaceWith( this.childNodes ); - } ); - return this; - } -} ); - - -jQuery.expr.pseudos.hidden = function( elem ) { - return !jQuery.expr.pseudos.visible( elem ); -}; -jQuery.expr.pseudos.visible = function( elem ) { - return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); -}; - - - - -jQuery.ajaxSettings.xhr = function() { - try { - return new window.XMLHttpRequest(); - } catch ( e ) {} -}; - -var xhrSuccessStatus = { - - // File protocol always yields status code 0, assume 200 - 0: 200, - - // Support: IE <=9 only - // #1450: sometimes IE returns 1223 when it should be 204 - 1223: 204 - }, - xhrSupported = jQuery.ajaxSettings.xhr(); - -support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -support.ajax = xhrSupported = !!xhrSupported; - -jQuery.ajaxTransport( function( options ) { - var callback, errorCallback; - - // Cross domain only allowed if supported through XMLHttpRequest - if ( support.cors || xhrSupported && !options.crossDomain ) { - return { - send: function( headers, complete ) { - var i, - xhr = options.xhr(); - - xhr.open( - options.type, - options.url, - options.async, - options.username, - options.password - ); - - // Apply custom fields if provided - if ( options.xhrFields ) { - for ( i in options.xhrFields ) { - xhr[ i ] = options.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( options.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( options.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Set headers - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - - // Callback - callback = function( type ) { - return function() { - if ( callback ) { - callback = errorCallback = xhr.onload = + // Parse text as xml + 'text xml': jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function (target, settings) { + return settings + + // Building a settings object + ? ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) + + // Extending ajaxSettings + : ajaxExtend(jQuery.ajaxSettings, target) + }, + + ajaxPrefilter: addToPrefiltersOrTransports(prefilters), + ajaxTransport: addToPrefiltersOrTransports(transports), + + // Main method + ajax: function (url, options) { + // If url is an object, simulate pre-1.5 signature + if (typeof url === 'object') { + options = url + url = undefined + } + + // Force options to be an object + options = options || {} + + var transport + + // URL without anti-cache param + var cacheURL + + // Response headers + var responseHeadersString + var responseHeaders + + // timeout handle + var timeoutTimer + + // Url cleanup var + var urlAnchor + + // Request state (becomes false upon send and true upon completion) + var completed + + // To know if global events are to be dispatched + var fireGlobals + + // Loop variable + var i + + // uncached part of the url + var uncached + + // Create the final options object + var s = jQuery.ajaxSetup({}, options) + + // Callbacks context + var callbackContext = s.context || s + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + var globalEventContext = s.context && + (callbackContext.nodeType || callbackContext.jquery) + ? jQuery(callbackContext) + : jQuery.event + + // Deferreds + var deferred = jQuery.Deferred() + var completeDeferred = jQuery.Callbacks('once memory') + + // Status-dependent callbacks + var statusCode = s.statusCode || {} + + // Headers (they are sent all at once) + var requestHeaders = {} + var requestHeadersNames = {} + + // Default abort message + var strAbort = 'canceled' + + // Fake xhr + var jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function (key) { + var match + if (completed) { + if (!responseHeaders) { + responseHeaders = {} + while ((match = rheaders.exec(responseHeadersString))) { + responseHeaders[match[1].toLowerCase() + ' '] = + (responseHeaders[match[1].toLowerCase() + ' '] || []) + .concat(match[2]) + } + } + match = responseHeaders[key.toLowerCase() + ' '] + } + return match == null ? null : match.join(', ') + }, + + // Raw string + getAllResponseHeaders: function () { + return completed ? responseHeadersString : null + }, + + // Caches the header + setRequestHeader: function (name, value) { + if (completed == null) { + name = requestHeadersNames[name.toLowerCase()] = + requestHeadersNames[name.toLowerCase()] || name + requestHeaders[name] = value + } + return this + }, + + // Overrides response content-type header + overrideMimeType: function (type) { + if (completed == null) { + s.mimeType = type + } + return this + }, + + // Status-dependent callbacks + statusCode: function (map) { + var code + if (map) { + if (completed) { + // Execute the appropriate callbacks + jqXHR.always(map[jqXHR.status]) + } else { + // Lazy-add the new callbacks in a way that preserves old ones + for (code in map) { + statusCode[code] = [statusCode[code], map[code]] + } + } + } + return this + }, + + // Cancel the request + abort: function (statusText) { + var finalText = statusText || strAbort + if (transport) { + transport.abort(finalText) + } + done(0, finalText) + return this + } + } + + // Attach deferreds + deferred.promise(jqXHR) + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ((url || s.url || location.href) + '') + .replace(rprotocol, location.protocol + '//') + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type + + // Extract dataTypes list + s.dataTypes = (s.dataType || '*').toLowerCase().match(rnothtmlwhite) || [''] + + // A cross-domain request is in order when the origin doesn't match the current origin. + if (s.crossDomain == null) { + urlAnchor = document.createElement('a') + + // Support: IE <=8 - 11, Edge 12 - 15 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href + s.crossDomain = originAnchor.protocol + '//' + originAnchor.host !== + urlAnchor.protocol + '//' + urlAnchor.host + } catch (e) { + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true + } + } + + // Convert data if not already a string + if (s.data && s.processData && typeof s.data !== 'string') { + s.data = jQuery.param(s.data, s.traditional) + } + + // Apply prefilters + inspectPrefiltersOrTransports(prefilters, s, options, jqXHR) + + // If request was aborted inside a prefilter, stop there + if (completed) { + return jqXHR + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global + + // Watch for a new set of requests + if (fireGlobals && jQuery.active++ === 0) { + jQuery.event.trigger('ajaxStart') + } + + // Uppercase the type + s.type = s.type.toUpperCase() + + // Determine if request has content + s.hasContent = !rnoContent.test(s.type) + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace(rhash, '') + + // More options handling for requests with no content + if (!s.hasContent) { + // Remember the hash so we can put it back + uncached = s.url.slice(cacheURL.length) + + // If data is available and should be processed, append data to url + if (s.data && (s.processData || typeof s.data === 'string')) { + cacheURL += (rquery.test(cacheURL) ? '&' : '?') + s.data + + // #9682: remove data so that it's not used in an eventual retry + delete s.data + } + + // Add or update anti-cache param if needed + if (s.cache === false) { + cacheURL = cacheURL.replace(rantiCache, '$1') + uncached = (rquery.test(cacheURL) ? '&' : '?') + '_=' + (nonce.guid++) + + uncached + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if (s.data && s.processData && + (s.contentType || '').indexOf('application/x-www-form-urlencoded') === 0) { + s.data = s.data.replace(r20, '+') + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if (s.ifModified) { + if (jQuery.lastModified[cacheURL]) { + jqXHR.setRequestHeader('If-Modified-Since', jQuery.lastModified[cacheURL]) + } + if (jQuery.etag[cacheURL]) { + jqXHR.setRequestHeader('If-None-Match', jQuery.etag[cacheURL]) + } + } + + // Set the correct header, if data is being sent + if (s.data && s.hasContent && s.contentType !== false || options.contentType) { + jqXHR.setRequestHeader('Content-Type', s.contentType) + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + 'Accept', + s.dataTypes[0] && s.accepts[s.dataTypes[0]] + ? s.accepts[s.dataTypes[0]] + + (s.dataTypes[0] !== '*' ? ', ' + allTypes + '; q=0.01' : '') + : s.accepts['*'] + ) + + // Check for headers option + for (i in s.headers) { + jqXHR.setRequestHeader(i, s.headers[i]) + } + + // Allow custom headers/mimetypes and early abort + if (s.beforeSend && + (s.beforeSend.call(callbackContext, jqXHR, s) === false || completed)) { + // Abort if not done already and return + return jqXHR.abort() + } + + // Aborting is no longer a cancellation + strAbort = 'abort' + + // Install callbacks on deferreds + completeDeferred.add(s.complete) + jqXHR.done(s.success) + jqXHR.fail(s.error) + + // Get transport + transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR) + + // If no transport, we auto-abort + if (!transport) { + done(-1, 'No Transport') + } else { + jqXHR.readyState = 1 + + // Send global event + if (fireGlobals) { + globalEventContext.trigger('ajaxSend', [jqXHR, s]) + } + + // If request was aborted inside ajaxSend, stop there + if (completed) { + return jqXHR + } + + // Timeout + if (s.async && s.timeout > 0) { + timeoutTimer = window.setTimeout(function () { + jqXHR.abort('timeout') + }, s.timeout) + } + + try { + completed = false + transport.send(requestHeaders, done) + } catch (e) { + // Rethrow post-completion exceptions + if (completed) { + throw e + } + + // Propagate others as results + done(-1, e) + } + } + + // Callback for when everything is done + function done (status, nativeStatusText, responses, headers) { + var isSuccess; var success; var error; var response; var modified + var statusText = nativeStatusText + + // Ignore repeat invocations + if (completed) { + return + } + + completed = true + + // Clear timeout if it exists + if (timeoutTimer) { + window.clearTimeout(timeoutTimer) + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined + + // Cache response headers + responseHeadersString = headers || '' + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0 + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304 + + // Get response data + if (responses) { + response = ajaxHandleResponses(s, jqXHR, responses) + } + + // Use a noop converter for missing script + if (!isSuccess && jQuery.inArray('script', s.dataTypes) > -1) { + s.converters['text script'] = function () {} + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert(s, response, jqXHR, isSuccess) + + // If successful, handle type chaining + if (isSuccess) { + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if (s.ifModified) { + modified = jqXHR.getResponseHeader('Last-Modified') + if (modified) { + jQuery.lastModified[cacheURL] = modified + } + modified = jqXHR.getResponseHeader('etag') + if (modified) { + jQuery.etag[cacheURL] = modified + } + } + + // if no content + if (status === 204 || s.type === 'HEAD') { + statusText = 'nocontent' + + // if not modified + } else if (status === 304) { + statusText = 'notmodified' + + // If we have data, let's convert it + } else { + statusText = response.state + success = response.data + error = response.error + isSuccess = !error + } + } else { + // Extract error from statusText and normalize for non-aborts + error = statusText + if (status || !statusText) { + statusText = 'error' + if (status < 0) { + status = 0 + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status + jqXHR.statusText = (nativeStatusText || statusText) + '' + + // Success/Error + if (isSuccess) { + deferred.resolveWith(callbackContext, [success, statusText, jqXHR]) + } else { + deferred.rejectWith(callbackContext, [jqXHR, statusText, error]) + } + + // Status-dependent callbacks + jqXHR.statusCode(statusCode) + statusCode = undefined + + if (fireGlobals) { + globalEventContext.trigger(isSuccess ? 'ajaxSuccess' : 'ajaxError', + [jqXHR, s, isSuccess ? success : error]) + } + + // Complete + completeDeferred.fireWith(callbackContext, [jqXHR, statusText]) + + if (fireGlobals) { + globalEventContext.trigger('ajaxComplete', [jqXHR, s]) + + // Handle the global AJAX counter + if (!(--jQuery.active)) { + jQuery.event.trigger('ajaxStop') + } + } + } + + return jqXHR + }, + + getJSON: function (url, data, callback) { + return jQuery.get(url, data, callback, 'json') + }, + + getScript: function (url, callback) { + return jQuery.get(url, undefined, callback, 'script') + } + }) + + jQuery.each(['get', 'post'], function (_i, method) { + jQuery[method] = function (url, data, callback, type) { + // Shift arguments if data argument was omitted + if (isFunction(data)) { + type = type || callback + callback = data + data = undefined + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax(jQuery.extend({ + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject(url) && url)) + } + }) + + jQuery.ajaxPrefilter(function (s) { + var i + for (i in s.headers) { + if (i.toLowerCase() === 'content-type') { + s.contentType = s.headers[i] || '' + } + } + }) + + jQuery._evalUrl = function (url, options, doc) { + return jQuery.ajax({ + url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) + type: 'GET', + dataType: 'script', + cache: true, + async: false, + global: false, + + // Only evaluate the response if it is successful (gh-4126) + // dataFilter is not invoked for failure responses, so using it instead + // of the default converter is kludgy but it works. + converters: { + 'text script': function () {} + }, + dataFilter: function (response) { + jQuery.globalEval(response, options, doc) + } + }) + } + + jQuery.fn.extend({ + wrapAll: function (html) { + var wrap + + if (this[0]) { + if (isFunction(html)) { + html = html.call(this[0]) + } + + // The elements to wrap the target around + wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true) + + if (this[0].parentNode) { + wrap.insertBefore(this[0]) + } + + wrap.map(function () { + var elem = this + + while (elem.firstElementChild) { + elem = elem.firstElementChild + } + + return elem + }).append(this) + } + + return this + }, + + wrapInner: function (html) { + if (isFunction(html)) { + return this.each(function (i) { + jQuery(this).wrapInner(html.call(this, i)) + }) + } + + return this.each(function () { + var self = jQuery(this) + var contents = self.contents() + + if (contents.length) { + contents.wrapAll(html) + } else { + self.append(html) + } + }) + }, + + wrap: function (html) { + var htmlIsFunction = isFunction(html) + + return this.each(function (i) { + jQuery(this).wrapAll(htmlIsFunction ? html.call(this, i) : html) + }) + }, + + unwrap: function (selector) { + this.parent(selector).not('body').each(function () { + jQuery(this).replaceWith(this.childNodes) + }) + return this + } + }) + + jQuery.expr.pseudos.hidden = function (elem) { + return !jQuery.expr.pseudos.visible(elem) + } + jQuery.expr.pseudos.visible = function (elem) { + return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length) + } + + jQuery.ajaxSettings.xhr = function () { + try { + return new window.XMLHttpRequest() + } catch (e) {} + } + + var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + } + var xhrSupported = jQuery.ajaxSettings.xhr() + + support.cors = !!xhrSupported && ('withCredentials' in xhrSupported) + support.ajax = xhrSupported = !!xhrSupported + + jQuery.ajaxTransport(function (options) { + var callback, errorCallback + + // Cross domain only allowed if supported through XMLHttpRequest + if (support.cors || xhrSupported && !options.crossDomain) { + return { + send: function (headers, complete) { + var i + var xhr = options.xhr() + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ) + + // Apply custom fields if provided + if (options.xhrFields) { + for (i in options.xhrFields) { + xhr[i] = options.xhrFields[i] + } + } + + // Override mime type if needed + if (options.mimeType && xhr.overrideMimeType) { + xhr.overrideMimeType(options.mimeType) + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if (!options.crossDomain && !headers['X-Requested-With']) { + headers['X-Requested-With'] = 'XMLHttpRequest' + } + + // Set headers + for (i in headers) { + xhr.setRequestHeader(i, headers[i]) + } + + // Callback + callback = function (type) { + return function () { + if (callback) { + callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = - xhr.onreadystatechange = null; - - if ( type === "abort" ) { - xhr.abort(); - } else if ( type === "error" ) { - - // Support: IE <=9 only - // On a manual native abort, IE9 throws - // errors on any property access that is not readyState - if ( typeof xhr.status !== "number" ) { - complete( 0, "error" ); - } else { - complete( - - // File: protocol always yields status 0; see #8605, #14207 - xhr.status, - xhr.statusText - ); - } - } else { - complete( - xhrSuccessStatus[ xhr.status ] || xhr.status, - xhr.statusText, - - // Support: IE <=9 only - // IE9 has no XHR2 but throws on binary (trac-11426) - // For XHR2 non-text, let the caller handle it (gh-2498) - ( xhr.responseType || "text" ) !== "text" || - typeof xhr.responseText !== "string" ? - { binary: xhr.response } : - { text: xhr.responseText }, - xhr.getAllResponseHeaders() - ); - } - } - }; - }; - - // Listen to events - xhr.onload = callback(); - errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); - - // Support: IE 9 only - // Use onreadystatechange to replace onabort - // to handle uncaught aborts - if ( xhr.onabort !== undefined ) { - xhr.onabort = errorCallback; - } else { - xhr.onreadystatechange = function() { - - // Check readyState before timeout as it changes - if ( xhr.readyState === 4 ) { - - // Allow onerror to be called first, - // but that will not handle a native abort - // Also, save errorCallback to a variable - // as xhr.onerror cannot be accessed - window.setTimeout( function() { - if ( callback ) { - errorCallback(); - } - } ); - } - }; - } - - // Create the abort callback - callback = callback( "abort" ); - - try { - - // Do send the request (this may raise an exception) - xhr.send( options.hasContent && options.data || null ); - } catch ( e ) { - - // #14683: Only rethrow if this hasn't been notified as an error yet - if ( callback ) { - throw e; - } - } - }, - - abort: function() { - if ( callback ) { - callback(); - } - } - }; - } -} ); - - - - -// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) -jQuery.ajaxPrefilter( function( s ) { - if ( s.crossDomain ) { - s.contents.script = false; - } -} ); - -// Install script dataType -jQuery.ajaxSetup( { - accepts: { - script: "text/javascript, application/javascript, " + - "application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /\b(?:java|ecma)script\b/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -} ); - -// Handle cache's special case and crossDomain -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - } -} ); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function( s ) { - - // This transport only deals with cross domain or forced-by-attrs requests - if ( s.crossDomain || s.scriptAttrs ) { - var script, callback; - return { - send: function( _, complete ) { - script = jQuery( " + diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html index 89103ff..2a4da5a 100644 --- a/docs/_build/html/index.html +++ b/docs/_build/html/index.html @@ -5,10 +5,11 @@ - + + - Welcome to plspy’s documentation! — plspy 0+untagged.53.g1437bad.dirty documentation + Welcome to plspy’s documentation! — plspy 0+untagged.72.g61a27af.dirty documentation @@ -24,6 +25,7 @@ + @@ -149,12 +151,12 @@
-
-

Welcome to plspy’s documentation!¶

-
-

plspy¶

-

plspy is a Partial Least Squares package developed at the Rotman -Research Institute at Baycrest Health Sciences.

+
+

Welcome to plspy’s documentation!¶

+
+

plspy¶

+

plspy is a Partial Least Squares package developed at the Institute for +Neuroscience and Neurotechnology at Simon Fraser University.

In addition to core PLS functionality, this package also contains the following modules:

class_functions

core PLS functions, such as mean-centring, calling SVD/GSVD, etc.

@@ -229,7 +231,7 @@

plspy

will show you this same help page.

Author: Noah Frazier-Logue

-
+ -
- +
diff --git a/docs/_build/html/modules.html b/docs/_build/html/modules.html index ed101ae..e519cb0 100644 --- a/docs/_build/html/modules.html +++ b/docs/_build/html/modules.html @@ -5,10 +5,11 @@ - + + - plspy — plspy 0+untagged.53.g1437bad.dirty documentation + plspy — plspy 0+untagged.72.g61a27af.dirty documentation @@ -24,6 +25,7 @@ + @@ -152,8 +154,8 @@
-
-

plspy¶

+
+

plspy¶

-
+
diff --git a/docs/_build/html/plspy.html b/docs/_build/html/plspy.html index 805bdf9..8f9a2e6 100644 --- a/docs/_build/html/plspy.html +++ b/docs/_build/html/plspy.html @@ -5,10 +5,11 @@ - + + - plspy package — plspy 0+untagged.53.g1437bad.dirty documentation + plspy package — plspy 0+untagged.72.g61a27af.dirty documentation @@ -24,6 +25,7 @@ + @@ -183,14 +185,14 @@
-
-

plspy package¶

-
-

Module contents¶

-
-

plspy¶

-

plspy is a Partial Least Squares package developed at the Rotman -Research Institute at Baycrest Health Sciences.

+
+

plspy package¶

+
+

Module contents¶

+
+

plspy¶

+

plspy is a Partial Least Squares package developed at the Institute for +Neuroscience and Neurotechnology at Simon Fraser University.

In addition to core PLS functionality, this package also contains the following modules:

class_functions

core PLS functions, such as mean-centring, calling SVD/GSVD, etc.

@@ -265,23 +267,23 @@

plspy

will show you this same help page.

Author: Noah Frazier-Logue

-
-
- -
-

plspy.bootstrap_permutation module¶

+ + +
+

Submodules¶

+
+
+

plspy.bootstrap_permutation module¶

class plspy.bootstrap_permutation._ResampleTestTaskPLS(X, Y, U, s, V, cond_order, contrast=None, preprocess=None, nperm=1000, nboot=1000, dist=(0.05, 0.95), rotate_method=0, mctype=0)¶
-

Bases: plspy.core.bootstrap_permutation.ResampleTest

+

Bases: ResampleTest

Class that runs permutation and bootstrap tests for Task PLS. When run, this class generates fields for permutation test information (permutation ratio, etc.) and for bootstrap test informtaion (confidence intervals, standard errors, bootstrap ratios, etc.).

-
Parameters
+
Parameters:
@@ -321,7 +323,7 @@

Submodules -
Type
+
Type:

float

@@ -333,7 +335,7 @@

Submodules -
Type
+
Type:

2-tuple of np.arrays

@@ -344,7 +346,7 @@

Submodulesstd_errs¶

Element-wise standard errors for the resampled right singular vectors.

-
Type
+
Type:

np.array

@@ -355,7 +357,7 @@

Submodulesboot_ratios¶

NumPy array containing element-wise ratios of

-
Type
+
Type:

np.array

@@ -385,32 +387,32 @@

Submodules -

plspy.check_inputs module¶

-

-
-

plspy.decorators module¶

-
-
-

plspy.exceptions module¶

-
-
-

plspy.gsvd module¶

-
-
-

plspy.pls module¶

-
-
-

plspy.pls_classes module¶

+ +
+

plspy.check_inputs module¶

+
+
+

plspy.decorators module¶

+
+
+

plspy.exceptions module¶

+
+
+

plspy.gsvd module¶

+
+
+

plspy.pls module¶

+
+
+

plspy.pls_classes module¶

-class plspy.pls_classes._ContrastBehaviourPLS(X: numpy.array, groups_sizes: tuple, num_conditions: int, Y: Optional[list] = None, cond_order: Optional[list] = None, num_perm: int = 1000, num_boot: int = 1000, rotate_method: int = 0, contrasts: Optional[list] = None, **kwargs)¶
-

Bases: plspy.core.pls_classes._ContrastTaskPLS

+class plspy.pls_classes._ContrastBehaviourPLS(X: array, groups_sizes: tuple, num_conditions: int, Y: Optional[list] = None, cond_order: Optional[list] = None, num_perm: int = 1000, num_boot: int = 1000, rotate_method: int = 0, contrasts: Optional[list] = None, **kwargs)¶ +

Bases: _ContrastTaskPLS

Driver class for Contrast Behaviour PLS.

Class called for Contrast Behaviour PLS. TODO: add more here.

-
Parameters
+
Parameters:
  • X (np.array) – Input neural matrix for use with PLS. Each participant’s data must be flattened and concatenated to form a single 2-dimensional @@ -449,7 +451,7 @@

    Submodules -
    Type
    +
    Type:

    np.array

@@ -462,7 +464,7 @@

Submodules -
Type
+
Type:

np.array

@@ -476,7 +478,7 @@

Submodules -
Type
+
Type:

tuple

@@ -487,7 +489,7 @@

Submodulesnum_groups¶

Value specifying the number of groups in the input data.

-
Type
+
Type:

int

@@ -499,7 +501,7 @@

Submodules -
Type
+
Type:

int

@@ -511,7 +513,7 @@

Submodules -
Type
+
Type:

array-like

@@ -524,7 +526,7 @@

Submodules -
Type
+
Type:

int

@@ -537,7 +539,7 @@

Submodules -
Type
+
Type:

int

@@ -548,7 +550,7 @@

SubmodulesX_means¶

Mean-values of X array on axis-0 (column-wise).

-
Type
+
Type:

np.array

@@ -559,7 +561,7 @@

SubmodulesX_mc¶

Mean-centred values corresponding to input matrix X.

-
Type
+
Type:

np.array

@@ -571,7 +573,7 @@

Submodules`X_mc`*`X_mc`^T; left singular vectors.

-
Type
+
Type:

np.array

@@ -582,7 +584,7 @@

Submoduless¶

Vector containing diagonal of the singular values.

-
Type
+
Type:

np.array

@@ -594,7 +596,7 @@

Submodules -
Type
+
Type:

np.array

@@ -605,7 +607,7 @@

SubmodulesY_latent¶

Latent variables for contrasts.

-
Type
+
Type:

np.array

@@ -616,7 +618,7 @@

SubmodulesX_latent¶

Latent variables of input X; dot-product of X_mc and V.

-
Type
+
Type:

np.array

@@ -627,7 +629,7 @@

Submoduleslvintercorrs¶

U.T * U. Optionally normed if rotate in [1,2].

-
Type
+
Type:

np.array

@@ -639,7 +641,7 @@

Submodules -
Type
+
Type:

class

@@ -654,12 +656,12 @@

Submodules
-class plspy.pls_classes._ContrastMultiblockPLS(X: numpy.array, groups_sizes: tuple, num_conditions: int, Y: Optional[list] = None, cond_order: Optional[list] = None, num_perm: int = 1000, num_boot: int = 1000, rotate_method: int = 0, contrasts: Optional[list] = None, **kwargs)¶
-

Bases: plspy.core.pls_classes._MultiblockPLS

+class plspy.pls_classes._ContrastMultiblockPLS(X: array, groups_sizes: tuple, num_conditions: int, Y: Optional[list] = None, cond_order: Optional[list] = None, num_perm: int = 1000, num_boot: int = 1000, rotate_method: int = 0, contrasts: Optional[list] = None, **kwargs)¶ +

Bases: _MultiblockPLS

Driver class for Multiblock PLS.

Class called for Multiblock PLS. TODO: add more here.

-
Parameters
+
Parameters:
  • X (np.array) – Input neural matrix for use with PLS. Each participant’s data must be flattened and concatenated to form a single 2-dimensional @@ -696,7 +698,7 @@

    Submodules -
    Type
    +
    Type:

    np.array

@@ -709,7 +711,7 @@

Submodules -
Type
+
Type:

np.array

@@ -723,7 +725,7 @@

Submodules -
Type
+
Type:

tuple

@@ -734,7 +736,7 @@

Submodulesnum_groups¶

Value specifying the number of groups in the input data.

-
Type
+
Type:

int

@@ -746,7 +748,7 @@

Submodules -
Type
+
Type:

int

@@ -758,7 +760,7 @@

Submodules -
Type
+
Type:

array-like

@@ -771,7 +773,7 @@

Submodules -
Type
+
Type:

int

@@ -784,7 +786,7 @@

Submodules -
Type
+
Type:

int

@@ -795,7 +797,7 @@

SubmodulesX_means¶

Mean-values of X array on axis-0 (column-wise).

-
Type
+
Type:

np.array

@@ -806,7 +808,7 @@

SubmodulesX_mc¶

Mean-centred values corresponding to input matrix X.

-
Type
+
Type:

np.array

@@ -818,7 +820,7 @@

Submodules`X_mc`*`X_mc`^T; left singular vectors.

-
Type
+
Type:

np.array

@@ -829,7 +831,7 @@

Submoduless¶

Vector containing diagonal of the singular values.

-
Type
+
Type:

np.array

@@ -841,7 +843,7 @@

Submodules -
Type
+
Type:

np.array

@@ -852,7 +854,7 @@

SubmodulesY_latent¶

Latent variables for contrasts.

-
Type
+
Type:

np.array

@@ -863,7 +865,7 @@

SubmodulesX_latent¶

Latent variables of input X; dot-product of X_mc and V.

-
Type
+
Type:

np.array

@@ -874,7 +876,7 @@

Submoduleslvcorrs¶

Computed latent variable correlations

-
Type
+
Type:

np.array

@@ -885,7 +887,7 @@

Submoduleslvintercorrs¶

U.T * U. Optionally normed if rotate in [1,2].

-
Type
+
Type:

np.array

@@ -897,7 +899,7 @@

Submodules -
Type
+
Type:

class

@@ -912,12 +914,12 @@

Submodules
-class plspy.pls_classes._ContrastTaskPLS(X: numpy.array, groups_sizes: tuple, num_conditions: int, Y: Optional[list] = None, cond_order: Optional[list] = None, num_perm: int = 1000, num_boot: int = 1000, rotate_method: int = 0, mctype: int = 0, contrasts: Optional[list] = None, **kwargs)¶
-

Bases: plspy.core.pls_classes._MeanCentreTaskPLS

+class plspy.pls_classes._ContrastTaskPLS(X: array, groups_sizes: tuple, num_conditions: int, Y: Optional[list] = None, cond_order: Optional[list] = None, num_perm: int = 1000, num_boot: int = 1000, rotate_method: int = 0, mctype: int = 0, contrasts: Optional[list] = None, **kwargs)¶ +

Bases: _MeanCentreTaskPLS

Driver class for Contrast Task PLS.

Class called for Contrast Task PLS. TODO: add more here.

-
Parameters
+
Parameters:
  • X (np.array) – Input neural matrix for use with PLS. Each participant’s data must be flattened and concatenated to form a single 2-dimensional @@ -960,7 +962,7 @@

    Submodules -
    Type
    +
    Type:

    np.array

@@ -973,7 +975,7 @@

Submodules -
Type
+
Type:

np.array

@@ -987,7 +989,7 @@

Submodules -
Type
+
Type:

tuple

@@ -998,7 +1000,7 @@

Submodulesnum_groups¶

Value specifying the number of groups in the input data.

-
Type
+
Type:

int

@@ -1010,7 +1012,7 @@

Submodules -
Type
+
Type:

int

@@ -1022,7 +1024,7 @@

Submodules -
Type
+
Type:

array-like

@@ -1035,7 +1037,7 @@

Submodules -
Type
+
Type:

int

@@ -1048,7 +1050,7 @@

Submodules -
Type
+
Type:

int

@@ -1059,7 +1061,7 @@

SubmodulesX_means¶

Mean-values of X array on axis-0 (column-wise).

-
Type
+
Type:

np.array

@@ -1070,7 +1072,7 @@

SubmodulesX_mc¶

Mean-centred values corresponding to input matrix X.

-
Type
+
Type:

np.array

@@ -1082,7 +1084,7 @@

Submodules`X_mc`*`X_mc`^T; left singular vectors.

-
Type
+
Type:

np.array

@@ -1093,7 +1095,7 @@

Submoduless¶

Vector containing diagonal of the singular values.

-
Type
+
Type:

np.array

@@ -1105,7 +1107,7 @@

Submodules -
Type
+
Type:

np.array

@@ -1116,7 +1118,7 @@

SubmodulesY_latent¶

Latent variables for contrasts.

-
Type
+
Type:

np.array

@@ -1127,7 +1129,7 @@

SubmodulesX_latent¶

Latent variables of input X; dot-product of X_mc and V.

-
Type
+
Type:

np.array

@@ -1138,7 +1140,7 @@

Submoduleslvintercorrs¶

U.T * U. Optionally normed if rotate in [1,2].

-
Type
+
Type:

np.array

@@ -1150,7 +1152,7 @@

Submodules -
Type
+
Type:

class

@@ -1165,12 +1167,12 @@

Submodules
-class plspy.pls_classes._MultiblockPLS(X: numpy.array, groups_sizes: tuple, num_conditions: int, Y: Optional[list] = None, cond_order: Optional[list] = None, num_perm: int = 1000, num_boot: int = 1000, rotate_method: int = 0, **kwargs)¶
-

Bases: plspy.core.pls_classes._RegularBehaviourPLS

+class plspy.pls_classes._MultiblockPLS(X: array, groups_sizes: tuple, num_conditions: int, Y: Optional[list] = None, cond_order: Optional[list] = None, num_perm: int = 1000, num_boot: int = 1000, rotate_method: int = 0, **kwargs)¶ +

Bases: _RegularBehaviourPLS

Driver class for Multiblock PLS.

Class called for Multiblock PLS. TODO: add more here.

-
Parameters
+
Parameters:
  • X (np.array) – Input neural matrix for use with PLS. Each participant’s data must be flattened and concatenated to form a single 2-dimensional @@ -1207,7 +1209,7 @@

    Submodules -
    Type
    +
    Type:

    np.array

@@ -1220,7 +1222,7 @@

Submodules -
Type
+
Type:

np.array

@@ -1234,7 +1236,7 @@

Submodules -
Type
+
Type:

tuple

@@ -1245,7 +1247,7 @@

Submodulesnum_groups¶

Value specifying the number of groups in the input data.

-
Type
+
Type:

int

@@ -1257,7 +1259,7 @@

Submodules -
Type
+
Type:

int

@@ -1269,7 +1271,7 @@

Submodules -
Type
+
Type:

array-like

@@ -1282,7 +1284,7 @@

Submodules -
Type
+
Type:

int

@@ -1295,7 +1297,7 @@

Submodules -
Type
+
Type:

int

@@ -1306,7 +1308,7 @@

SubmodulesX_means¶

Mean-values of X array on axis-0 (column-wise).

-
Type
+
Type:

np.array

@@ -1317,7 +1319,7 @@

SubmodulesX_mc¶

Mean-centred values corresponding to input matrix X.

-
Type
+
Type:

np.array

@@ -1329,7 +1331,7 @@

Submodules`X_mc`*`X_mc`^T; left singular vectors.

-
Type
+
Type:

np.array

@@ -1340,7 +1342,7 @@

Submoduless¶

Vector containing diagonal of the singular values.

-
Type
+
Type:

np.array

@@ -1352,7 +1354,7 @@

Submodules -
Type
+
Type:

np.array

@@ -1363,7 +1365,7 @@

SubmodulesY_latent¶

Latent variables for contrasts.

-
Type
+
Type:

np.array

@@ -1373,7 +1375,7 @@

Submodules X_latent¶
-
Type
+
Type:

np.array

@@ -1384,7 +1386,7 @@

Submoduleslvcorrs¶

Computed latent variable correlations

-
Type
+
Type:

np.array

@@ -1396,7 +1398,7 @@

Submodules -
Type
+
Type:

class

@@ -1411,12 +1413,12 @@

Submodules
-class plspy.pls_classes._RegularBehaviourPLS(X: numpy.array, groups_sizes: tuple, num_conditions: int, Y: Optional[list] = None, cond_order: Optional[list] = None, num_perm: int = 1000, num_boot: int = 1000, rotate_method: int = 0, **kwargs)¶
-

Bases: plspy.core.pls_classes._MeanCentreTaskPLS

+class plspy.pls_classes._RegularBehaviourPLS(X: array, groups_sizes: tuple, num_conditions: int, Y: Optional[list] = None, cond_order: Optional[list] = None, num_perm: int = 1000, num_boot: int = 1000, rotate_method: int = 0, **kwargs)¶ +

Bases: _MeanCentreTaskPLS

Driver class for Behavioural PLS.

Class called for Behavioural PLS. TODO: add more here.

-
Parameters
+
Parameters:
  • X (np.array) – Input neural matrix for use with PLS. Each participant’s data must be flattened and concatenated to form a single 2-dimensional @@ -1453,7 +1455,7 @@

    Submodules -
    Type
    +
    Type:

    np.array

@@ -1466,7 +1468,7 @@

Submodules -
Type
+
Type:

np.array

@@ -1480,7 +1482,7 @@

Submodules -
Type
+
Type:

tuple

@@ -1491,7 +1493,7 @@

Submodulesnum_groups¶

Value specifying the number of groups in the input data.

-
Type
+
Type:

int

@@ -1503,7 +1505,7 @@

Submodules -
Type
+
Type:

int

@@ -1515,7 +1517,7 @@

Submodules -
Type
+
Type:

array-like

@@ -1528,7 +1530,7 @@

Submodules -
Type
+
Type:

int

@@ -1541,7 +1543,7 @@

Submodules -
Type
+
Type:

int

@@ -1552,7 +1554,7 @@

SubmodulesX_means¶

Mean-values of X array on axis-0 (column-wise).

-
Type
+
Type:

np.array

@@ -1563,7 +1565,7 @@

SubmodulesX_mc¶

Mean-centred values corresponding to input matrix X.

-
Type
+
Type:

np.array

@@ -1575,7 +1577,7 @@

Submodules`X_mc`*`X_mc`^T; left singular vectors.

-
Type
+
Type:

np.array

@@ -1586,7 +1588,7 @@

Submoduless¶

Vector containing diagonal of the singular values.

-
Type
+
Type:

np.array

@@ -1598,7 +1600,7 @@

Submodules -
Type
+
Type:

np.array

@@ -1609,7 +1611,7 @@

SubmodulesY_latent¶

Latent variables for contrasts.

-
Type
+
Type:

np.array

@@ -1620,7 +1622,7 @@

SubmodulesX_latent¶

Latent variables of input X; dot-product of X_mc and V.

-
Type
+
Type:

np.array

@@ -1631,7 +1633,7 @@

Submoduleslvcorrs¶

Computed latent variable correlations

-
Type
+
Type:

np.array

@@ -1643,7 +1645,7 @@

Submodules -
Type
+
Type:

class

@@ -1656,11 +1658,11 @@

Submodules -

plspy.resample module¶

-

-
+ +
+

plspy.resample module¶

+
+
diff --git a/docs/_build/html/py-modindex.html b/docs/_build/html/py-modindex.html index 6164319..3efc58b 100644 --- a/docs/_build/html/py-modindex.html +++ b/docs/_build/html/py-modindex.html @@ -8,7 +8,7 @@ - Python Module Index — plspy 0+untagged.53.g1437bad.dirty documentation + Python Module Index — plspy 0+untagged.72.g61a27af.dirty documentation @@ -24,6 +24,7 @@ + diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html index 6b5b081..509b859 100644 --- a/docs/_build/html/search.html +++ b/docs/_build/html/search.html @@ -8,7 +8,7 @@ - Search — plspy 0+untagged.53.g1437bad.dirty documentation + Search — plspy 0+untagged.72.g61a27af.dirty documentation @@ -24,6 +24,7 @@ + diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js index d74c4c1..2708831 100644 --- a/docs/_build/html/searchindex.js +++ b/docs/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["index","modules","plspy"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["index.rst","modules.rst","plspy.rst"],objects:{"":[[2,0,0,"-","plspy"]],"plspy.bootstrap_permutation":[[2,1,1,"","_ResampleTestTaskPLS"]],"plspy.bootstrap_permutation._ResampleTestTaskPLS":[[2,2,1,"","_abc_impl"],[2,3,1,"","_bootstrap_test"],[2,3,1,"","_permutation_test"],[2,2,1,"","boot_ratios"],[2,2,1,"","conf_ints"],[2,2,1,"","dist"],[2,2,1,"","permute_ratio"],[2,2,1,"","std_errs"]],"plspy.pls_classes":[[2,1,1,"","_ContrastBehaviourPLS"],[2,1,1,"","_ContrastMultiblockPLS"],[2,1,1,"","_ContrastTaskPLS"],[2,1,1,"","_MultiblockPLS"],[2,1,1,"","_RegularBehaviourPLS"]],"plspy.pls_classes._ContrastBehaviourPLS":[[2,2,1,"","U"],[2,2,1,"","V"],[2,2,1,"","X"],[2,2,1,"","X_latent"],[2,2,1,"","X_mc"],[2,2,1,"","X_means"],[2,2,1,"","Y"],[2,2,1,"","Y_latent"],[2,2,1,"","_abc_impl"],[2,2,1,"","cond_order"],[2,2,1,"","groups_sizes"],[2,2,1,"","lvintercorrs"],[2,2,1,"","num_boot"],[2,2,1,"","num_conditions"],[2,2,1,"","num_groups"],[2,2,1,"","num_perm"],[2,2,1,"","resample_tests"],[2,2,1,"","s"]],"plspy.pls_classes._ContrastMultiblockPLS":[[2,2,1,"","U"],[2,2,1,"","V"],[2,2,1,"","X"],[2,2,1,"","X_latent"],[2,2,1,"","X_mc"],[2,2,1,"","X_means"],[2,2,1,"","Y"],[2,2,1,"","Y_latent"],[2,2,1,"","_abc_impl"],[2,2,1,"","cond_order"],[2,2,1,"","groups_sizes"],[2,2,1,"","lvcorrs"],[2,2,1,"","lvintercorrs"],[2,2,1,"","num_boot"],[2,2,1,"","num_conditions"],[2,2,1,"","num_groups"],[2,2,1,"","num_perm"],[2,2,1,"","resample_tests"],[2,2,1,"","s"]],"plspy.pls_classes._ContrastTaskPLS":[[2,2,1,"","U"],[2,2,1,"","V"],[2,2,1,"","X"],[2,2,1,"","X_latent"],[2,2,1,"","X_mc"],[2,2,1,"","X_means"],[2,2,1,"","Y"],[2,2,1,"","Y_latent"],[2,2,1,"","_abc_impl"],[2,2,1,"","cond_order"],[2,2,1,"","groups_sizes"],[2,2,1,"","lvintercorrs"],[2,2,1,"","num_boot"],[2,2,1,"","num_conditions"],[2,2,1,"","num_groups"],[2,2,1,"","num_perm"],[2,2,1,"","resample_tests"],[2,2,1,"","s"]],"plspy.pls_classes._MultiblockPLS":[[2,2,1,"","U"],[2,2,1,"","V"],[2,2,1,"","X"],[2,2,1,"","X_latent"],[2,2,1,"","X_mc"],[2,2,1,"","X_means"],[2,2,1,"","Y"],[2,2,1,"","Y_latent"],[2,2,1,"","_abc_impl"],[2,2,1,"","cond_order"],[2,2,1,"","groups_sizes"],[2,2,1,"","lvcorrs"],[2,2,1,"","num_boot"],[2,2,1,"","num_conditions"],[2,2,1,"","num_groups"],[2,2,1,"","num_perm"],[2,2,1,"","resample_tests"],[2,2,1,"","s"]],"plspy.pls_classes._RegularBehaviourPLS":[[2,2,1,"","U"],[2,2,1,"","V"],[2,2,1,"","X"],[2,2,1,"","X_latent"],[2,2,1,"","X_mc"],[2,2,1,"","X_means"],[2,2,1,"","Y"],[2,2,1,"","Y_latent"],[2,2,1,"","_abc_impl"],[2,2,1,"","cond_order"],[2,2,1,"","groups_sizes"],[2,2,1,"","lvcorrs"],[2,2,1,"","num_boot"],[2,2,1,"","num_conditions"],[2,2,1,"","num_groups"],[2,2,1,"","num_perm"],[2,2,1,"","resample_tests"],[2,2,1,"","s"]],plspy:[[2,0,0,"-","bootstrap_permutation"],[2,0,0,"-","check_inputs"],[2,0,0,"-","decorators"],[2,0,0,"-","exceptions"],[2,0,0,"-","gsvd"],[2,0,0,"-","pls"],[2,0,0,"-","pls_classes"],[2,0,0,"-","resample"]]},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","attribute","Python attribute"],"3":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:class","2":"py:attribute","3":"py:method"},terms:{"0":2,"05":2,"1":2,"10":[0,2],"1000":2,"12":2,"1e":2,"2":[0,2],"21":2,"3":[0,2],"5":2,"500":[0,2],"6":2,"7":2,"95":2,"boolean":2,"class":2,"default":2,"float":2,"function":[0,2],"import":[0,2],"int":[0,2],"static":2,A:2,For:2,In:[0,2],Not:2,There:[0,2],To:[0,2],_abc:2,_abc_data:2,_abc_impl:2,_bootstrap_test:2,_contrastbehaviourpl:2,_contrastmultiblockpl:2,_contrasttaskpl:2,_meancentretaskpl:2,_multiblockpl:2,_permutation_test:2,_regularbehaviourpl:2,_resampletesttaskpl:2,access:[0,2],accord:2,add:2,addit:[0,2],after:[0,2],all:2,also:[0,2],an:[0,2],ar:[0,2],argument:[0,2],arrai:2,author:[0,2],avail:[0,2],axi:2,base:2,basic:[0,2],baycrest:[0,2],behaviour:[0,2],below:[0,2],boostrap:2,boot_ratio:2,bootstrap:[0,2],bootstrap_permut:[0,1],both:[0,2],c:[0,2],calcul:2,call:[0,2],centr:[0,2],check_input:[0,1],class_funct:[0,2],cmb:[0,2],code:[0,2],column:2,comparison:2,comput:2,concaten:2,cond_ord:2,condit:[0,2],conf_int:2,confid:2,construct:[0,2],contain:[0,2],content:1,contrast:[0,2],core:[0,2],correl:2,correspond:2,creat:2,csb:[0,2],cst:[0,2],custom:[0,2],d:[0,2],data:2,decor:[0,1],deriv:2,detail:[0,2],develop:[0,2],diagon:2,differ:2,dimension:2,dist:2,distribut:2,divid:2,document:2,dot:2,driver:2,dure:2,e:2,each:[0,2],effect:2,eigenvector:2,element:2,entri:2,error:2,estim:2,etc:[0,2],exampl:[0,2],except:[0,1],field:[0,2],flatten:2,follow:[0,2],form:[0,2],forthcom:[0,2],fortran:[0,2],frazier:[0,2],from:2,full:2,g:2,gener:2,get:[0,2],grand:2,greater:2,group:[0,2],groups_siz:2,gsvd:[0,1],have:2,health:[0,2],help:[0,2],here:2,higher:2,hold:2,hous:[0,2],how:[0,2],implememt:2,implement:[0,2],index:0,indic:2,inform:[0,2],informtaion:2,input:2,institut:[0,2],interpret:[0,2],interv:2,iter:2,kwarg:2,latent:2,least:[0,2],left:2,length:2,level:2,like:2,list:[0,2],load:[0,2],logu:[0,2],lower:2,lvcorr:2,lvintercorr:2,main:2,matric:2,matrix:[0,2],mb:[0,2],mct:[0,2],mctype:2,mean:[0,2],method:[0,2],methodnam:[0,2],modul:[0,1],more:[0,2],multiblock:[0,2],must:2,nboot:2,neural:2,niter:2,noah:[0,2],none:2,nonrot:2,norm:2,note:[0,2],np:2,nperm:2,num_boot:[0,2],num_condit:2,num_group:2,num_perm:[0,2],number:[0,2],numpi:[0,2],object:[0,2],observ:2,one:[0,2],onlin:[0,2],option:2,order:[0,2],otherwis:2,over:2,packag:[0,1],page:[0,2],paramet:2,partial:[0,2],particip:2,particular:[0,2],pass:2,per:2,permut:[0,2],permute_ratio:2,pl:[0,1],pls_alg:2,pls_class:[0,1],pls_method:[0,2],preprocess:2,prior:2,procrust:2,product:2,python:[0,2],random:2,ratio:2,rb:[0,2],regular:[0,2],remov:2,replac:2,requir:[0,2],resampl:[0,1],resample_test:2,resampletest:2,research:[0,2],result:[0,2],right:2,rotat:2,rotate_method:2,rotman:[0,2],run:2,s:2,same:[0,2],scienc:[0,2],search:0,see:[0,2],separ:2,should:2,show:[0,2],shown:[0,2],singl:2,singular:2,size:2,sourc:[0,2],specif:[0,2],specifi:2,squar:[0,2],standard:2,std_err:2,string:[0,2],subject:[0,2],submodul:[0,1],subtract:2,svd:[0,2],t:2,task:[0,2],test:2,than:2,thi:[0,2],threshold:2,time:2,todo:2,tupl:2,type:[0,2],u:2,under:[0,2],unless:2,upper:2,us:[0,2],usag:[0,2],user:2,v:2,valu:2,variabl:2,vector:2,version:[0,2],websit:[0,2],when:2,where:[0,2],whether:2,wise:2,within:[0,2],without:2,would:2,x:[0,2],x_latent:2,x_mc:2,x_mean:2,y:[0,2],y_latent:2,yet:2,you:[0,2]},titles:["Welcome to plspy\u2019s documentation!","plspy","plspy package"],titleterms:{bootstrap_permut:2,check_input:2,content:[0,2],decor:2,document:0,except:2,gsvd:2,indic:0,modul:2,packag:2,pl:2,pls_class:2,plspy:[0,1,2],resampl:2,s:0,submodul:2,tabl:0,welcom:0}}) \ No newline at end of file +Search.setIndex({"docnames": ["index", "modules", "plspy"], "filenames": ["index.rst", "modules.rst", "plspy.rst"], "titles": ["Welcome to plspy\u2019s documentation!", "plspy", "plspy package"], "terms": {"packag": [0, 1], "modul": [0, 1], "submodul": [0, 1], "bootstrap_permut": [0, 1], "check_input": [0, 1], "decor": [0, 1], "except": [0, 1], "gsvd": [0, 1], "pl": [0, 1], "pls_class": [0, 1], "resampl": [0, 1], "index": 0, "search": 0, "page": [0, 2], "content": 1, "partial": [0, 2], "least": [0, 2], "squar": [0, 2], "develop": [0, 2], "institut": [0, 2], "neurosci": [0, 2], "neurotechnolog": [0, 2], "simon": [0, 2], "fraser": [0, 2], "univers": [0, 2], "In": [0, 2], "addit": [0, 2], "core": [0, 2], "function": [0, 2], "thi": [0, 2], "also": [0, 2], "contain": [0, 2], "follow": [0, 2], "class_funct": [0, 2], "mean": [0, 2], "centr": [0, 2], "call": [0, 2], "svd": [0, 2], "etc": [0, 2], "implement": [0, 2], "us": [0, 2], "numpi": [0, 2], "fortran": [0, 2], "permut": [0, 2], "bootstrap": [0, 2], "hous": [0, 2], "object": [0, 2], "sourc": [0, 2], "code": [0, 2], "each": [0, 2], "version": [0, 2], "custom": [0, 2], "within": [0, 2], "basic": [0, 2], "usag": [0, 2], "exampl": [0, 2], "note": [0, 2], "There": [0, 2], "ar": [0, 2], "3": [0, 2], "requir": [0, 2], "argument": [0, 2], "order": [0, 2], "x": [0, 2], "2": [0, 2], "d": [0, 2], "task": [0, 2], "matrix": [0, 2], "list": [0, 2], "number": [0, 2], "subject": [0, 2], "group": [0, 2], "an": [0, 2], "int": [0, 2], "condit": [0, 2], "below": [0, 2], "result": [0, 2], "10": [0, 2], "num_perm": [0, 2], "500": [0, 2], "num_boot": [0, 2], "pls_method": [0, 2], "mct": [0, 2], "behaviour": [0, 2], "y": [0, 2], "rb": [0, 2], "contrast": [0, 2], "c": [0, 2], "cst": [0, 2], "csb": [0, 2], "multiblock": [0, 2], "mb": [0, 2], "To": [0, 2], "see": [0, 2], "field": [0, 2], "avail": [0, 2], "help": [0, 2], "specif": [0, 2], "method": [0, 2], "detail": [0, 2], "both": [0, 2], "form": [0, 2], "websit": [0, 2], "more": [0, 2], "inform": [0, 2], "how": [0, 2], "access": [0, 2], "onlin": [0, 2], "forthcom": [0, 2], "get": [0, 2], "particular": [0, 2], "type": [0, 2], "python": [0, 2], "interpret": [0, 2], "after": [0, 2], "load": [0, 2], "import": [0, 2], "methodnam": [0, 2], "where": [0, 2], "string": [0, 2], "one": [0, 2], "shown": [0, 2], "regular": [0, 2], "cmb": [0, 2], "under": [0, 2], "construct": [0, 2], "show": [0, 2], "you": [0, 2], "same": [0, 2], "author": [0, 2], "noah": [0, 2], "frazier": [0, 2], "logu": [0, 2], "s": 2, "indic": 2, "document": 2, "class": 2, "_resampletesttaskpl": 2, "u": 2, "v": 2, "cond_ord": 2, "none": 2, "preprocess": 2, "nperm": 2, "1000": 2, "nboot": 2, "dist": 2, "0": 2, "05": 2, "95": 2, "rotate_method": 2, "mctype": 2, "base": 2, "resampletest": 2, "run": 2, "test": 2, "when": 2, "gener": 2, "ratio": 2, "informtaion": 2, "confid": 2, "interv": 2, "standard": 2, "error": 2, "paramet": 2, "np": 2, "arrai": 2, "input": 2, "neural": 2, "matric": 2, "pass": 2, "from": 2, "left": 2, "singular": 2, "vector": 2, "valu": 2, "comput": 2, "right": 2, "like": 2, "option": 2, "prior": 2, "boostrap": 2, "specifi": 2, "iter": 2, "default": 2, "nonrot": 2, "boolean": 2, "Not": 2, "implememt": 2, "yet": 2, "tupl": 2, "float": 2, "distribut": 2, "calcul": 2, "permute_ratio": 2, "greater": 2, "than": 2, "observ": 2, "divid": 2, "A": 2, "higher": 2, "level": 2, "random": 2, "conf_int": 2, "upper": 2, "lower": 2, "element": 2, "wise": 2, "std_err": 2, "boot_ratio": 2, "_abc_impl": 2, "_abc": 2, "_abc_data": 2, "static": 2, "_bootstrap_test": 2, "niter": 2, "pls_alg": 2, "estim": 2, "replac": 2, "accord": 2, "_permutation_test": 2, "threshold": 2, "1e": 2, "12": 2, "without": 2, "time": 2, "_contrastbehaviourpl": 2, "groups_siz": 2, "num_condit": 2, "kwarg": 2, "_contrasttaskpl": 2, "driver": 2, "todo": 2, "add": 2, "here": 2, "particip": 2, "data": 2, "must": 2, "flatten": 2, "concaten": 2, "singl": 2, "dimension": 2, "separ": 2, "size": 2, "entri": 2, "correspond": 2, "e": 2, "g": 2, "7": 2, "6": 2, "5": 2, "1": 2, "would": 2, "have": 2, "For": 2, "length": 2, "21": 2, "unless": 2, "otherwis": 2, "user": 2, "whether": 2, "full": 2, "should": 2, "dure": 2, "rotat": 2, "procrust": 2, "deriv": 2, "creat": 2, "differ": 2, "comparison": 2, "num_group": 2, "hold": 2, "per": 2, "x_mean": 2, "axi": 2, "column": 2, "x_mc": 2, "eigenvector": 2, "t": 2, "diagon": 2, "y_latent": 2, "latent": 2, "variabl": 2, "x_latent": 2, "dot": 2, "product": 2, "lvintercorr": 2, "norm": 2, "resample_test": 2, "_contrastmultiblockpl": 2, "_multiblockpl": 2, "lvcorr": 2, "correl": 2, "_meancentretaskpl": 2, "remov": 2, "grand": 2, "over": 2, "all": 2, "main": 2, "effect": 2, "subtract": 2, "_regularbehaviourpl": 2}, "objects": {"": [[2, 0, 0, "-", "plspy"]], "plspy": [[2, 0, 0, "-", "bootstrap_permutation"], [2, 0, 0, "-", "check_inputs"], [2, 0, 0, "-", "decorators"], [2, 0, 0, "-", "exceptions"], [2, 0, 0, "-", "gsvd"], [2, 0, 0, "-", "pls"], [2, 0, 0, "-", "pls_classes"], [2, 0, 0, "-", "resample"]], "plspy.bootstrap_permutation": [[2, 1, 1, "", "_ResampleTestTaskPLS"]], "plspy.bootstrap_permutation._ResampleTestTaskPLS": [[2, 2, 1, "", "_abc_impl"], [2, 3, 1, "", "_bootstrap_test"], [2, 3, 1, "", "_permutation_test"], [2, 2, 1, "", "boot_ratios"], [2, 2, 1, "", "conf_ints"], [2, 2, 1, "", "dist"], [2, 2, 1, "", "permute_ratio"], [2, 2, 1, "", "std_errs"]], "plspy.pls_classes": [[2, 1, 1, "", "_ContrastBehaviourPLS"], [2, 1, 1, "", "_ContrastMultiblockPLS"], [2, 1, 1, "", "_ContrastTaskPLS"], [2, 1, 1, "", "_MultiblockPLS"], [2, 1, 1, "", "_RegularBehaviourPLS"]], "plspy.pls_classes._ContrastBehaviourPLS": [[2, 2, 1, "", "U"], [2, 2, 1, "", "V"], [2, 2, 1, "", "X"], [2, 2, 1, "", "X_latent"], [2, 2, 1, "", "X_mc"], [2, 2, 1, "", "X_means"], [2, 2, 1, "", "Y"], [2, 2, 1, "", "Y_latent"], [2, 2, 1, "", "_abc_impl"], [2, 2, 1, "", "cond_order"], [2, 2, 1, "", "groups_sizes"], [2, 2, 1, "", "lvintercorrs"], [2, 2, 1, "", "num_boot"], [2, 2, 1, "", "num_conditions"], [2, 2, 1, "", "num_groups"], [2, 2, 1, "", "num_perm"], [2, 2, 1, "", "resample_tests"], [2, 2, 1, "", "s"]], "plspy.pls_classes._ContrastMultiblockPLS": [[2, 2, 1, "", "U"], [2, 2, 1, "", "V"], [2, 2, 1, "", "X"], [2, 2, 1, "", "X_latent"], [2, 2, 1, "", "X_mc"], [2, 2, 1, "", "X_means"], [2, 2, 1, "", "Y"], [2, 2, 1, "", "Y_latent"], [2, 2, 1, "", "_abc_impl"], [2, 2, 1, "", "cond_order"], [2, 2, 1, "", "groups_sizes"], [2, 2, 1, "", "lvcorrs"], [2, 2, 1, "", "lvintercorrs"], [2, 2, 1, "", "num_boot"], [2, 2, 1, "", "num_conditions"], [2, 2, 1, "", "num_groups"], [2, 2, 1, "", "num_perm"], [2, 2, 1, "", "resample_tests"], [2, 2, 1, "", "s"]], "plspy.pls_classes._ContrastTaskPLS": [[2, 2, 1, "", "U"], [2, 2, 1, "", "V"], [2, 2, 1, "", "X"], [2, 2, 1, "", "X_latent"], [2, 2, 1, "", "X_mc"], [2, 2, 1, "", "X_means"], [2, 2, 1, "", "Y"], [2, 2, 1, "", "Y_latent"], [2, 2, 1, "", "_abc_impl"], [2, 2, 1, "", "cond_order"], [2, 2, 1, "", "groups_sizes"], [2, 2, 1, "", "lvintercorrs"], [2, 2, 1, "", "num_boot"], [2, 2, 1, "", "num_conditions"], [2, 2, 1, "", "num_groups"], [2, 2, 1, "", "num_perm"], [2, 2, 1, "", "resample_tests"], [2, 2, 1, "", "s"]], "plspy.pls_classes._MultiblockPLS": [[2, 2, 1, "", "U"], [2, 2, 1, "", "V"], [2, 2, 1, "", "X"], [2, 2, 1, "", "X_latent"], [2, 2, 1, "", "X_mc"], [2, 2, 1, "", "X_means"], [2, 2, 1, "", "Y"], [2, 2, 1, "", "Y_latent"], [2, 2, 1, "", "_abc_impl"], [2, 2, 1, "", "cond_order"], [2, 2, 1, "", "groups_sizes"], [2, 2, 1, "", "lvcorrs"], [2, 2, 1, "", "num_boot"], [2, 2, 1, "", "num_conditions"], [2, 2, 1, "", "num_groups"], [2, 2, 1, "", "num_perm"], [2, 2, 1, "", "resample_tests"], [2, 2, 1, "", "s"]], "plspy.pls_classes._RegularBehaviourPLS": [[2, 2, 1, "", "U"], [2, 2, 1, "", "V"], [2, 2, 1, "", "X"], [2, 2, 1, "", "X_latent"], [2, 2, 1, "", "X_mc"], [2, 2, 1, "", "X_means"], [2, 2, 1, "", "Y"], [2, 2, 1, "", "Y_latent"], [2, 2, 1, "", "_abc_impl"], [2, 2, 1, "", "cond_order"], [2, 2, 1, "", "groups_sizes"], [2, 2, 1, "", "lvcorrs"], [2, 2, 1, "", "num_boot"], [2, 2, 1, "", "num_conditions"], [2, 2, 1, "", "num_groups"], [2, 2, 1, "", "num_perm"], [2, 2, 1, "", "resample_tests"], [2, 2, 1, "", "s"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:attribute", "3": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "method", "Python method"]}, "titleterms": {"welcom": 0, "plspy": [0, 1, 2], "s": 0, "document": 0, "content": [0, 2], "indic": 0, "tabl": 0, "packag": 2, "modul": 2, "submodul": 2, "bootstrap_permut": 2, "check_input": 2, "decor": 2, "except": 2, "gsvd": 2, "pl": 2, "pls_class": 2, "resampl": 2}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}}) \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 512845e..b2d70d1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,9 +17,8 @@ import sys from os.path import dirname, join, pardir -from versioneer import get_version -autodoc_mock_imports = ["pybuilder", "numpy", "scipy", "scipy.stats"] +autodoc_mock_imports = ["pybuilder", "nilearn", "scipy", "scipy.stats", "nibabel", "nilearn"] sys.path.insert(0, join(dirname(__file__), pardir)) @@ -36,7 +35,9 @@ # The full version, including alpha/beta/rc tags # get from code generated by versioneer os.chdir("..") -release = get_version() +from versioneer import get_versions + +release = get_versions()["version"] os.chdir("./docs") # -- General configuration --------------------------------------------------- @@ -79,4 +80,4 @@ napoleon_use_admonition_for_references = False napoleon_use_ivar = False napoleon_use_param = True -napoleon_use_rtype = False +napoleon_use_rtype = True diff --git a/plsenv.yml b/plsenv.yml deleted file mode 100644 index 6995cc9..0000000 --- a/plsenv.yml +++ /dev/null @@ -1,175 +0,0 @@ -name: dev -channels: - - conda-forge - - defaults -dependencies: - - _libgcc_mutex=0.1 - - appdirs=1.4.3 - - aspy.yaml=1.3.0 - - attrs=19.3.0 - - backcall=0.1.0 - - black=19.3b0 - - blas=1.0 - - bleach=3.1.0 - - ca-certificates=2020.1.1 - - cached-property=1.5.1 - - certifi=2020.4.5.1 - - cfgv=2.0.1 - - click=7.0 - - cycler=0.10.0 - - dbus=1.13.12 - - decorator=4.4.1 - - defusedxml=0.6.0 - - editdistance=0.5.3 - - entrypoints=0.3 - - expat=2.2.6 - - filelock=3.0.12 - - flake8=3.7.9 - - fontconfig=2.13.0 - - freetype=2.9.1 - - git=2.23.0 - - glib=2.63.1 - - gmp=6.1.2 - - gst-plugins-base=1.14.0 - - gstreamer=1.14.0 - - htop=2.2.0 - - icu=58.2 - - identify=1.4.7 - - importlib_metadata=0.23 - - importlib_resources=1.0.2 - - intel-openmp=2019.4 - - ipykernel=5.1.3 - - ipython=7.11.1 - - ipython_genutils=0.2.0 - - jedi=0.15.2 - - jinja2=2.10.3 - - joblib=0.14.1 - - jpeg=9b - - json5=0.8.5 - - jsonschema=3.2.0 - - jupyter_client=5.3.4 - - jupyter_core=4.6.1 - - jupyterlab=1.2.5 - - jupyterlab_server=1.0.6 - - kiwisolver=1.1.0 - - krb5=1.16.4 - - ld_impl_linux-64=2.33.1 - - libcurl=7.67.0 - - libedit=3.1.20181209 - - libevent=2.1.10 - - libffi=3.2.1 - - libgcc-ng=9.1.0 - - libgfortran-ng=7.3.0 - - libpng=1.6.37 - - libsodium=1.0.16 - - libssh2=1.8.2 - - libstdcxx-ng=9.1.0 - - libuuid=1.0.3 - - libxcb=1.13 - - libxml2=2.9.9 - - markupsafe=1.1.1 - - matplotlib=3.1.3 - - matplotlib-base=3.1.3 - - mccabe=0.6.1 - - mistune=0.8.4 - - mkl=2019.4 - - mkl-service=2.3.0 - - mkl_fft=1.0.15 - - mkl_random=1.1.0 - - more-itertools=8.0.2 - - nbconvert=5.6.1 - - nbformat=4.4.0 - - ncurses=6.1 - - nodeenv=1.3.3 - - notebook=6.0.2 - - numpy=1.18.1 - - numpy-base=1.18.1 - - openssl=1.1.1g - - packaging=20.0 - - pandoc=2.2.3.2 - - pandocfilters=1.4.2 - - parso=0.5.2 - - pcre=8.43 - - perl=5.26.2 - - pexpect=4.7.0 - - pickleshare=0.7.5 - - pip=19.3.1 - - pluggy=0.13.1 - - pre-commit=1.20.0 - - prometheus_client=0.7.1 - - prompt_toolkit=3.0.2 - - ptyprocess=0.6.0 - - py=1.8.1 - - pybuilder=0.11.17 - - pycodestyle=2.5.0 - - pyflakes=2.1.1 - - pygments=2.5.2 - - pyparsing=2.4.6 - - pyqt=5.9.2 - - pyrsistent=0.15.6 - - pytest=5.4.2 - - python=3.6.10 - - python-dateutil=2.8.1 - - pyyaml=5.2 - - pyzmq=18.1.0 - - qt=5.9.7 - - readline=7.0 - - scipy=1.3.2 - - send2trash=1.5.0 - - setuptools=44.0.0 - - sip=4.19.8 - - six=1.13.0 - - sqlite=3.30.1 - - tblib=1.6.0 - - terminado=0.8.3 - - testpath=0.4.4 - - tk=8.6.8 - - tmux=2.9 - - toml=0.10.0 - - tornado=6.0.3 - - tox=3.14.1 - - traitlets=4.3.3 - - vim=8.1.1343 - - virtualenv=16.7.5 - - wcwidth=0.1.7 - - webencodings=0.5.1 - - wheel=0.33.6 - - xz=5.2.4 - - yaml=0.1.7 - - zeromq=4.3.1 - - zipp=0.6.0 - - zlib=1.2.11 - - pip: - - alabaster==0.7.12 - - babel==2.8.0 - - bids-validator==1.3.12 - - chardet==3.0.4 - - coverage==4.5.4 - - docopt==0.6.2 - - docutils==0.16 - - h5py==2.10.0 - - idna==2.8 - - imagesize==1.2.0 - - nibabel==2.5.1 - - num2words==0.5.10 - - pandas==0.25.3 - - patsy==0.5.1 - - pybids==0.10.0 - - pypandoc==1.3.3 - - pytz==2019.3 - - requests==2.22.0 - - scikit-learn==0.22 - - snowballstemmer==2.0.0 - - sphinx==2.4.0 - - sphinx-rtd-theme==0.4.3 - - sphinxcontrib-applehelp==1.0.1 - - sphinxcontrib-devhelp==1.0.1 - - sphinxcontrib-htmlhelp==1.0.2 - - sphinxcontrib-jsmath==1.0.1 - - sphinxcontrib-qthelp==1.0.2 - - sphinxcontrib-serializinghtml==1.1.3 - - sqlalchemy==1.3.11 - - tqdm==4.40.0 - - unittest-xml-reporting==2.5.2 - - urllib3==1.25.8 - diff --git a/versioneer.py b/versioneer.py index a142bf5..e34b887 100644 --- a/versioneer.py +++ b/versioneer.py @@ -1,4 +1,3 @@ - # Version: 0.22 """The Versioneer - like a rocketeer, but for versions. @@ -282,13 +281,13 @@ import configparser import errno +import functools import json import os import re import subprocess import sys from typing import Callable, Dict -import functools class VersioneerConfig: @@ -310,11 +309,13 @@ def get_root(): setup_py = os.path.join(root, "setup.py") versioneer_py = os.path.join(root, "versioneer.py") if not (os.path.exists(setup_py) or os.path.exists(versioneer_py)): - err = ("Versioneer was unable to run the project root directory. " - "Versioneer requires setup.py to be executed from " - "its immediate directory (like 'python setup.py COMMAND'), " - "or in a way that lets it use sys.argv[0] to find the root " - "(like 'python path/to/setup.py COMMAND').") + err = ( + "Versioneer was unable to run the project root directory. " + "Versioneer requires setup.py to be executed from " + "its immediate directory (like 'python setup.py COMMAND'), " + "or in a way that lets it use sys.argv[0] to find the root " + "(like 'python path/to/setup.py COMMAND')." + ) raise VersioneerBadRootError(err) try: # Certain runtime workflows (setup.py install/develop in a setuptools @@ -327,8 +328,10 @@ def get_root(): me_dir = os.path.normcase(os.path.splitext(my_path)[0]) vsr_dir = os.path.normcase(os.path.splitext(versioneer_py)[0]) if me_dir != vsr_dir: - print("Warning: build in %s is using versioneer.py from %s" - % (os.path.dirname(my_path), versioneer_py)) + print( + "Warning: build in %s is using versioneer.py from %s" + % (os.path.dirname(my_path), versioneer_py) + ) except NameError: pass return root @@ -373,15 +376,18 @@ class NotThisMethod(Exception): def register_vcs_handler(vcs, method): # decorator """Create decorator to mark a method as the handler of a VCS.""" + def decorate(f): """Store f in HANDLERS[vcs][method].""" HANDLERS.setdefault(vcs, {})[method] = f return f + return decorate -def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, - env=None): +def run_command( + commands, args, cwd=None, verbose=False, hide_stderr=False, env=None +): """Call the given command(s).""" assert isinstance(commands, list) process = None @@ -397,10 +403,14 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, try: dispcmd = str([command] + args) # remember shell=False, so use git.cmd on windows, not just git - process = subprocess.Popen([command] + args, cwd=cwd, env=env, - stdout=subprocess.PIPE, - stderr=(subprocess.PIPE if hide_stderr - else None), **popen_kwargs) + process = subprocess.Popen( + [command] + args, + cwd=cwd, + env=env, + stdout=subprocess.PIPE, + stderr=(subprocess.PIPE if hide_stderr else None), + **popen_kwargs, + ) break except OSError: e = sys.exc_info()[1] @@ -423,7 +433,9 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, return stdout, process.returncode -LONG_VERSION_PY['git'] = r''' +LONG_VERSION_PY[ + "git" +] = r''' # This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build @@ -1139,7 +1151,7 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose): # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of # just "foo-1.0". If we see a "tag: " prefix, prefer those. TAG = "tag: " - tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} + tags = {r[len(TAG) :] for r in refs if r.startswith(TAG)} if not tags: # Either we're using git < 1.8.3, or there really are no tags. We use # a heuristic: assume all version tags have a digit. The old git %d @@ -1148,7 +1160,7 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose): # between branches and tags. By ignoring refnames without digits, we # filter out many common branch names like "release" and # "stabilization", as well as "HEAD" and "master". - tags = {r for r in refs if re.search(r'\d', r)} + tags = {r for r in refs if re.search(r"\d", r)} if verbose: print("discarding '%s', no digits" % ",".join(refs - tags)) if verbose: @@ -1156,24 +1168,31 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose): for ref in sorted(tags): # sorting will prefer e.g. "2.0" over "2.0rc1" if ref.startswith(tag_prefix): - r = ref[len(tag_prefix):] + r = ref[len(tag_prefix) :] # Filter out refs that exactly match prefix or that don't start # with a number once the prefix is stripped (mostly a concern # when prefix is '') - if not re.match(r'\d', r): + if not re.match(r"\d", r): continue if verbose: print("picking %s" % r) - return {"version": r, - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": None, - "date": date} + return { + "version": r, + "full-revisionid": keywords["full"].strip(), + "dirty": False, + "error": None, + "date": date, + } # no suitable tags, so version is "0+unknown", but full hex is still there if verbose: print("no suitable tags, using unknown + full revision id") - return {"version": "0+unknown", - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": "no suitable tags", "date": None} + return { + "version": "0+unknown", + "full-revisionid": keywords["full"].strip(), + "dirty": False, + "error": "no suitable tags", + "date": None, + } @register_vcs_handler("git", "pieces_from_vcs") @@ -1195,8 +1214,9 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): env.pop("GIT_DIR", None) runner = functools.partial(runner, env=env) - _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, - hide_stderr=True) + _, rc = runner( + GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True + ) if rc != 0: if verbose: print("Directory %s not under git control" % root) @@ -1206,9 +1226,11 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] # if there isn't one, this yields HEX[-dirty] (no NUM) - describe_out, rc = runner(GITS, ["describe", "--tags", "--dirty", - "--always", "--long", *MATCH_ARGS], - cwd=root) + describe_out, rc = runner( + GITS, + ["describe", "--tags", "--dirty", "--always", "--long", *MATCH_ARGS], + cwd=root, + ) # --long was added in git-1.5.5 if describe_out is None: raise NotThisMethod("'git describe' failed") @@ -1223,8 +1245,9 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): pieces["short"] = full_out[:7] # maybe improved later pieces["error"] = None - branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], - cwd=root) + branch_name, rc = runner( + GITS, ["rev-parse", "--abbrev-ref", "HEAD"], cwd=root + ) # --abbrev-ref was added in git-1.6.3 if rc != 0 or branch_name is None: raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") @@ -1264,17 +1287,18 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): dirty = git_describe.endswith("-dirty") pieces["dirty"] = dirty if dirty: - git_describe = git_describe[:git_describe.rindex("-dirty")] + git_describe = git_describe[: git_describe.rindex("-dirty")] # now we have TAG-NUM-gHEX or HEX if "-" in git_describe: # TAG-NUM-gHEX - mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) + mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe) if not mo: # unparsable. Maybe git-describe is misbehaving? - pieces["error"] = ("unable to parse git-describe output: '%s'" - % describe_out) + pieces["error"] = ( + "unable to parse git-describe output: '%s'" % describe_out + ) return pieces # tag @@ -1283,10 +1307,12 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): if verbose: fmt = "tag '%s' doesn't start with prefix '%s'" print(fmt % (full_tag, tag_prefix)) - pieces["error"] = ("tag '%s' doesn't start with prefix '%s'" - % (full_tag, tag_prefix)) + pieces["error"] = "tag '%s' doesn't start with prefix '%s'" % ( + full_tag, + tag_prefix, + ) return pieces - pieces["closest-tag"] = full_tag[len(tag_prefix):] + pieces["closest-tag"] = full_tag[len(tag_prefix) :] # distance: number of commits since tag pieces["distance"] = int(mo.group(2)) @@ -1301,7 +1327,9 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): pieces["distance"] = int(count_out) # total number of commits # commit date: see ISO-8601 comment in git_versions_from_keywords() - date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip() + date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[ + 0 + ].strip() # Use only the last line. Previous lines may contain GPG signature # information. date = date.splitlines()[-1] @@ -1359,15 +1387,21 @@ def versions_from_parentdir(parentdir_prefix, root, verbose): for _ in range(3): dirname = os.path.basename(root) if dirname.startswith(parentdir_prefix): - return {"version": dirname[len(parentdir_prefix):], - "full-revisionid": None, - "dirty": False, "error": None, "date": None} + return { + "version": dirname[len(parentdir_prefix) :], + "full-revisionid": None, + "dirty": False, + "error": None, + "date": None, + } rootdirs.append(root) root = os.path.dirname(root) # up a level if verbose: - print("Tried directories %s but none started with prefix %s" % - (str(rootdirs), parentdir_prefix)) + print( + "Tried directories %s but none started with prefix %s" + % (str(rootdirs), parentdir_prefix) + ) raise NotThisMethod("rootdir doesn't start with parentdir_prefix") @@ -1396,11 +1430,17 @@ def versions_from_file(filename): contents = f.read() except OSError: raise NotThisMethod("unable to read _version.py") - mo = re.search(r"version_json = '''\n(.*)''' # END VERSION_JSON", - contents, re.M | re.S) + mo = re.search( + r"version_json = '''\n(.*)''' # END VERSION_JSON", + contents, + re.M | re.S, + ) if not mo: - mo = re.search(r"version_json = '''\r\n(.*)''' # END VERSION_JSON", - contents, re.M | re.S) + mo = re.search( + r"version_json = '''\r\n(.*)''' # END VERSION_JSON", + contents, + re.M | re.S, + ) if not mo: raise NotThisMethod("no version_json in _version.py") return json.loads(mo.group(1)) @@ -1409,8 +1449,9 @@ def versions_from_file(filename): def write_to_version_file(filename, versions): """Write the given version number to the given _version.py file.""" os.unlink(filename) - contents = json.dumps(versions, sort_keys=True, - indent=1, separators=(",", ": ")) + contents = json.dumps( + versions, sort_keys=True, indent=1, separators=(",", ": ") + ) with open(filename, "w") as f: f.write(SHORT_VERSION_PY % contents) @@ -1442,8 +1483,7 @@ def render_pep440(pieces): rendered += ".dirty" else: # exception #1 - rendered = "0+untagged.%d.g%s" % (pieces["distance"], - pieces["short"]) + rendered = "0+untagged.%d.g%s" % (pieces["distance"], pieces["short"]) if pieces["dirty"]: rendered += ".dirty" return rendered @@ -1472,8 +1512,7 @@ def render_pep440_branch(pieces): rendered = "0" if pieces["branch"] != "master": rendered += ".dev0" - rendered += "+untagged.%d.g%s" % (pieces["distance"], - pieces["short"]) + rendered += "+untagged.%d.g%s" % (pieces["distance"], pieces["short"]) if pieces["dirty"]: rendered += ".dirty" return rendered @@ -1498,10 +1537,15 @@ def render_pep440_pre(pieces): if pieces["closest-tag"]: if pieces["distance"]: # update the post release segment - tag_version, post_version = pep440_split_post(pieces["closest-tag"]) + tag_version, post_version = pep440_split_post( + pieces["closest-tag"] + ) rendered = tag_version if post_version is not None: - rendered += ".post%d.dev%d" % (post_version+1, pieces["distance"]) + rendered += ".post%d.dev%d" % ( + post_version + 1, + pieces["distance"], + ) else: rendered += ".post0.dev%d" % (pieces["distance"]) else: @@ -1634,11 +1678,13 @@ def render_git_describe_long(pieces): def render(pieces, style): """Render the given version pieces into the requested style.""" if pieces["error"]: - return {"version": "unknown", - "full-revisionid": pieces.get("long"), - "dirty": None, - "error": pieces["error"], - "date": None} + return { + "version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, + "error": pieces["error"], + "date": None, + } if not style or style == "default": style = "pep440" # the default @@ -1662,9 +1708,13 @@ def render(pieces, style): else: raise ValueError("unknown style '%s'" % style) - return {"version": rendered, "full-revisionid": pieces["long"], - "dirty": pieces["dirty"], "error": None, - "date": pieces.get("date")} + return { + "version": rendered, + "full-revisionid": pieces["long"], + "dirty": pieces["dirty"], + "error": None, + "date": pieces.get("date"), + } class VersioneerBadRootError(Exception): @@ -1687,8 +1737,9 @@ def get_versions(verbose=False): handlers = HANDLERS.get(cfg.VCS) assert handlers, "unrecognized VCS '%s'" % cfg.VCS verbose = verbose or cfg.verbose - assert cfg.versionfile_source is not None, \ - "please set versioneer.versionfile_source" + assert ( + cfg.versionfile_source is not None + ), "please set versioneer.versionfile_source" assert cfg.tag_prefix is not None, "please set versioneer.tag_prefix" versionfile_abs = os.path.join(root, cfg.versionfile_source) @@ -1742,9 +1793,13 @@ def get_versions(verbose=False): if verbose: print("unable to compute version") - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, "error": "unable to compute version", - "date": None} + return { + "version": "0+unknown", + "full-revisionid": None, + "dirty": None, + "error": "unable to compute version", + "date": None, + } def get_version(): @@ -1800,6 +1855,7 @@ def run(self): print(" date: %s" % vers.get("date")) if vers["error"]: print(" error: %s" % vers["error"]) + cmds["version"] = cmd_version # we override "build_py" in both distutils and setuptools @@ -1818,8 +1874,8 @@ def run(self): # setup.py egg_info -> ? # we override different "build_py" commands for both environments - if 'build_py' in cmds: - _build_py = cmds['build_py'] + if "build_py" in cmds: + _build_py = cmds["build_py"] elif "setuptools" in sys.modules: from setuptools.command.build_py import build_py as _build_py else: @@ -1834,14 +1890,16 @@ def run(self): # now locate _version.py in the new build/ directory and replace # it with an updated value if cfg.versionfile_build: - target_versionfile = os.path.join(self.build_lib, - cfg.versionfile_build) + target_versionfile = os.path.join( + self.build_lib, cfg.versionfile_build + ) print("UPDATING %s" % target_versionfile) write_to_version_file(target_versionfile, versions) + cmds["build_py"] = cmd_build_py - if 'build_ext' in cmds: - _build_ext = cmds['build_ext'] + if "build_ext" in cmds: + _build_ext = cmds["build_ext"] elif "setuptools" in sys.modules: from setuptools.command.build_ext import build_ext as _build_ext else: @@ -1861,14 +1919,17 @@ def run(self): return # now locate _version.py in the new build/ directory and replace # it with an updated value - target_versionfile = os.path.join(self.build_lib, - cfg.versionfile_build) + target_versionfile = os.path.join( + self.build_lib, cfg.versionfile_build + ) print("UPDATING %s" % target_versionfile) write_to_version_file(target_versionfile, versions) + cmds["build_ext"] = cmd_build_ext if "cx_Freeze" in sys.modules: # cx_freeze enabled? from cx_Freeze.dist import build_exe as _build_exe + # nczeczulin reports that py2exe won't like the pep440-style string # as FILEVERSION, but it can be used for PRODUCTVERSION, e.g. # setup(console=[{ @@ -1889,17 +1950,21 @@ def run(self): os.unlink(target_versionfile) with open(cfg.versionfile_source, "w") as f: LONG = LONG_VERSION_PY[cfg.VCS] - f.write(LONG % - {"DOLLAR": "$", - "STYLE": cfg.style, - "TAG_PREFIX": cfg.tag_prefix, - "PARENTDIR_PREFIX": cfg.parentdir_prefix, - "VERSIONFILE_SOURCE": cfg.versionfile_source, - }) + f.write( + LONG + % { + "DOLLAR": "$", + "STYLE": cfg.style, + "TAG_PREFIX": cfg.tag_prefix, + "PARENTDIR_PREFIX": cfg.parentdir_prefix, + "VERSIONFILE_SOURCE": cfg.versionfile_source, + } + ) + cmds["build_exe"] = cmd_build_exe del cmds["build_py"] - if 'py2exe' in sys.modules: # py2exe enabled? + if "py2exe" in sys.modules: # py2exe enabled? from py2exe.distutils_buildexe import py2exe as _py2exe class cmd_py2exe(_py2exe): @@ -1915,18 +1980,22 @@ def run(self): os.unlink(target_versionfile) with open(cfg.versionfile_source, "w") as f: LONG = LONG_VERSION_PY[cfg.VCS] - f.write(LONG % - {"DOLLAR": "$", - "STYLE": cfg.style, - "TAG_PREFIX": cfg.tag_prefix, - "PARENTDIR_PREFIX": cfg.parentdir_prefix, - "VERSIONFILE_SOURCE": cfg.versionfile_source, - }) + f.write( + LONG + % { + "DOLLAR": "$", + "STYLE": cfg.style, + "TAG_PREFIX": cfg.tag_prefix, + "PARENTDIR_PREFIX": cfg.parentdir_prefix, + "VERSIONFILE_SOURCE": cfg.versionfile_source, + } + ) + cmds["py2exe"] = cmd_py2exe # we override different "sdist" commands for both environments - if 'sdist' in cmds: - _sdist = cmds['sdist'] + if "sdist" in cmds: + _sdist = cmds["sdist"] elif "setuptools" in sys.modules: from setuptools.command.sdist import sdist as _sdist else: @@ -1950,8 +2019,10 @@ def make_release_tree(self, base_dir, files): # updated value target_versionfile = os.path.join(base_dir, cfg.versionfile_source) print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, - self._versioneer_generated_versions) + write_to_version_file( + target_versionfile, self._versioneer_generated_versions + ) + cmds["sdist"] = cmd_sdist return cmds @@ -2011,11 +2082,15 @@ def do_setup(): root = get_root() try: cfg = get_config_from_root(root) - except (OSError, configparser.NoSectionError, - configparser.NoOptionError) as e: + except ( + OSError, + configparser.NoSectionError, + configparser.NoOptionError, + ) as e: if isinstance(e, (OSError, configparser.NoSectionError)): - print("Adding sample versioneer config to setup.cfg", - file=sys.stderr) + print( + "Adding sample versioneer config to setup.cfg", file=sys.stderr + ) with open(os.path.join(root, "setup.cfg"), "a") as f: f.write(SAMPLE_CONFIG) print(CONFIG_ERROR, file=sys.stderr) @@ -2024,15 +2099,18 @@ def do_setup(): print(" creating %s" % cfg.versionfile_source) with open(cfg.versionfile_source, "w") as f: LONG = LONG_VERSION_PY[cfg.VCS] - f.write(LONG % {"DOLLAR": "$", - "STYLE": cfg.style, - "TAG_PREFIX": cfg.tag_prefix, - "PARENTDIR_PREFIX": cfg.parentdir_prefix, - "VERSIONFILE_SOURCE": cfg.versionfile_source, - }) - - ipy = os.path.join(os.path.dirname(cfg.versionfile_source), - "__init__.py") + f.write( + LONG + % { + "DOLLAR": "$", + "STYLE": cfg.style, + "TAG_PREFIX": cfg.tag_prefix, + "PARENTDIR_PREFIX": cfg.parentdir_prefix, + "VERSIONFILE_SOURCE": cfg.versionfile_source, + } + ) + + ipy = os.path.join(os.path.dirname(cfg.versionfile_source), "__init__.py") if os.path.exists(ipy): try: with open(ipy, "r") as f: @@ -2080,8 +2158,10 @@ def do_setup(): else: print(" 'versioneer.py' already in MANIFEST.in") if cfg.versionfile_source not in simple_includes: - print(" appending versionfile_source ('%s') to MANIFEST.in" % - cfg.versionfile_source) + print( + " appending versionfile_source ('%s') to MANIFEST.in" + % cfg.versionfile_source + ) with open(manifest_in, "a") as f: f.write("include %s\n" % cfg.versionfile_source) else: From c9a1b303651f09404051dd6086922210dfc2c547 Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 26 Jul 2022 16:16:46 -0400 Subject: [PATCH 13/23] [MAINT] adding GH action for uploading to Test PyPI --- .github/workflows/github-deploy.yml | 67 +++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/github-deploy.yml diff --git a/.github/workflows/github-deploy.yml b/.github/workflows/github-deploy.yml new file mode 100644 index 0000000..6d2edda --- /dev/null +++ b/.github/workflows/github-deploy.yml @@ -0,0 +1,67 @@ +name: Build and upload to PyPI + +# Build on every branch push, tag push, and pull request change: +on: + push: + branches: + - staging +# Alternatively, to publish when a (published) GitHub Release is created, use the following: +# on: +# push: +# pull_request: +# release: +# types: +# - published + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04, windows-2019, macos-11] + + steps: + - uses: actions/checkout@v3 + + - name: Build wheels + uses: pypa/cibuildwheel@v2.8.1 + + - uses: actions/upload-artifact@v3 + with: + path: ./wheelhouse/*.whl + + build_sdist: + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Build sdist + run: pipx run build --sdist + + - uses: actions/upload-artifact@v3 + with: + path: dist/*.tar.gz + + upload_pypi: + needs: [build_wheels, build_sdist] + runs-on: ubuntu-latest + # upload to PyPI on every tag starting with 'v' + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + # alternatively, to publish when a GitHub Release is created, use the following rule: + # if: github.event_name == 'release' && github.event.action == 'published' + steps: + - uses: actions/download-artifact@v3 + with: + # unpacks default artifact into dist/ + # if `name: artifact` is omitted, the action will create extra parent dir + name: artifact + path: dist + + - uses: pypa/gh-action-pypi-publish@v1.5.0 + with: + user: __token__ + password: ${{ secrets.test_pypi_password }} + # To test: + repository_url: https://test.pypi.org/legacy/ From 939b2abd3dcedf37abf9dce85b72f06abffa7b8e Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 26 Jul 2022 16:28:57 -0400 Subject: [PATCH 14/23] [MAINT] changing test PyPI to sdist only --- .github/workflows/github-deploy.yml | 38 ++++++++++++++++------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/github-deploy.yml b/.github/workflows/github-deploy.yml index 6d2edda..3b96450 100644 --- a/.github/workflows/github-deploy.yml +++ b/.github/workflows/github-deploy.yml @@ -14,22 +14,22 @@ on: # - published jobs: - build_wheels: - name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04, windows-2019, macos-11] - - steps: - - uses: actions/checkout@v3 - - - name: Build wheels - uses: pypa/cibuildwheel@v2.8.1 - - - uses: actions/upload-artifact@v3 - with: - path: ./wheelhouse/*.whl + # build_wheels: + # name: Build wheels on ${{ matrix.os }} + # runs-on: ${{ matrix.os }} + # strategy: + # matrix: + # os: [ubuntu-20.04, windows-2019, macos-11] + # + # steps: + # - uses: actions/checkout@v3 + # + # - name: Build wheels + # uses: pypa/cibuildwheel@v2.8.1 + # + # - uses: actions/upload-artifact@v3 + # with: + # path: ./wheelhouse/*.whl build_sdist: name: Build source distribution @@ -38,7 +38,11 @@ jobs: - uses: actions/checkout@v3 - name: Build sdist - run: pipx run build --sdist + run: + pip install pybuilder + pip install -r requirements_dev.txt + pipx run build --sdist + - uses: actions/upload-artifact@v3 with: From 14c318e2753a666f7391c7f182019defd392d246 Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 26 Jul 2022 16:44:50 -0400 Subject: [PATCH 15/23] [MAINT] changing PyPI deploy from GH Actions to CircleCI --- .circleci/config.yml | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c61d429..ee2d3a1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -76,7 +76,28 @@ jobs: command: | cd docs sphinx-build -M html . _build - + test_pypi_publish-3_10: + docker: + - image: circleci/python:3.10 + steps: + - checkout # checkout source code to working directory + - run: + command: | # create whl, install twine and publish to Test PyPI + python setup.py sdist bdist_wheel + sudo pip install pipenv + pipenv install twine + pipenv run twine upload --repository testpypi dist/* + pypi_publish-3_10: + docker: + - image: circleci/python:3.10 + steps: + - checkout # checkout source code to working directory + - run: + command: | # create whl, install twine and publish to PyPI + python setup.py sdist bdist_wheel + sudo pip install pipenv + pipenv install twine + pipenv run twine upload dist/* # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: @@ -88,3 +109,15 @@ workflows: - build-and-test-3_8 - build-and-test-3_7 - build-docs + - test_pypi_publish-3_10: + requires: + - build-and-test-3_10 + filters: + branches: + - staging + - pypi_publish-3_10: + requires: + - build-and-test-3_10 + filters: + branches: + - main From f5dacca09c13b333f7840d6158b03a9908618863 Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 26 Jul 2022 16:47:10 -0400 Subject: [PATCH 16/23] [MAINT] fixing tab/spacing in CircleCI config --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ee2d3a1..4d447ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -110,14 +110,14 @@ workflows: - build-and-test-3_7 - build-docs - test_pypi_publish-3_10: - requires: - - build-and-test-3_10 + requires: + - build-and-test-3_10 filters: branches: - staging - pypi_publish-3_10: requires: - - build-and-test-3_10 + - build-and-test-3_10 filters: branches: - main From 672261e50c58045af21856ea7367c4b38c459bc2 Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 26 Jul 2022 16:49:06 -0400 Subject: [PATCH 17/23] [MAINT] fixing tab/spacing in CircleCI config... again --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4d447ae..3d48fe4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -116,7 +116,7 @@ workflows: branches: - staging - pypi_publish-3_10: - requires: + requires: - build-and-test-3_10 filters: branches: From cbaa5d36f17444bbabe36a5f5869acea69516a05 Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 26 Jul 2022 16:53:53 -0400 Subject: [PATCH 18/23] Updated config.yml --- .circleci/config.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3d48fe4..e3cffea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -114,10 +114,13 @@ workflows: - build-and-test-3_10 filters: branches: - - staging + only: + - staging + - pypi_publish-3_10: requires: - build-and-test-3_10 filters: branches: - - main + only: + - main From 33ce8baba0ef578520f6ba125a9135246998d60f Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 26 Jul 2022 17:08:59 -0400 Subject: [PATCH 19/23] [MAINT] adding PyPI login support for CircleCI --- .circleci/config.yml | 2 +- .github/workflows/github-deploy.yml | 71 ----------------------------- 2 files changed, 1 insertion(+), 72 deletions(-) delete mode 100644 .github/workflows/github-deploy.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index e3cffea..6fc6206 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -86,7 +86,7 @@ jobs: python setup.py sdist bdist_wheel sudo pip install pipenv pipenv install twine - pipenv run twine upload --repository testpypi dist/* + pipenv run twine upload --repository testpypi dist/* -u __token__ -P $TEST_PYPI_TOKEN pypi_publish-3_10: docker: - image: circleci/python:3.10 diff --git a/.github/workflows/github-deploy.yml b/.github/workflows/github-deploy.yml deleted file mode 100644 index 3b96450..0000000 --- a/.github/workflows/github-deploy.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Build and upload to PyPI - -# Build on every branch push, tag push, and pull request change: -on: - push: - branches: - - staging -# Alternatively, to publish when a (published) GitHub Release is created, use the following: -# on: -# push: -# pull_request: -# release: -# types: -# - published - -jobs: - # build_wheels: - # name: Build wheels on ${{ matrix.os }} - # runs-on: ${{ matrix.os }} - # strategy: - # matrix: - # os: [ubuntu-20.04, windows-2019, macos-11] - # - # steps: - # - uses: actions/checkout@v3 - # - # - name: Build wheels - # uses: pypa/cibuildwheel@v2.8.1 - # - # - uses: actions/upload-artifact@v3 - # with: - # path: ./wheelhouse/*.whl - - build_sdist: - name: Build source distribution - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Build sdist - run: - pip install pybuilder - pip install -r requirements_dev.txt - pipx run build --sdist - - - - uses: actions/upload-artifact@v3 - with: - path: dist/*.tar.gz - - upload_pypi: - needs: [build_wheels, build_sdist] - runs-on: ubuntu-latest - # upload to PyPI on every tag starting with 'v' - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') - # alternatively, to publish when a GitHub Release is created, use the following rule: - # if: github.event_name == 'release' && github.event.action == 'published' - steps: - - uses: actions/download-artifact@v3 - with: - # unpacks default artifact into dist/ - # if `name: artifact` is omitted, the action will create extra parent dir - name: artifact - path: dist - - - uses: pypa/gh-action-pypi-publish@v1.5.0 - with: - user: __token__ - password: ${{ secrets.test_pypi_password }} - # To test: - repository_url: https://test.pypi.org/legacy/ From 35cdb71c548b2aac65044a3dea907b0890d6d03e Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 26 Jul 2022 17:14:30 -0400 Subject: [PATCH 20/23] [MAINT] fix typo in CircleCI twine command --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6fc6206..076436d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -86,7 +86,7 @@ jobs: python setup.py sdist bdist_wheel sudo pip install pipenv pipenv install twine - pipenv run twine upload --repository testpypi dist/* -u __token__ -P $TEST_PYPI_TOKEN + pipenv run twine upload --repository testpypi dist/* -u __token__ -p $TEST_PYPI_TOKEN pypi_publish-3_10: docker: - image: circleci/python:3.10 From f86e0641d268b05357f163145f051a078fceaf21 Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Tue, 26 Jul 2022 17:46:01 -0400 Subject: [PATCH 21/23] [PKG] update to v0.3.0 --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index be250e4..8a2d2a7 100644 --- a/setup.py +++ b/setup.py @@ -12,8 +12,8 @@ # long_description = fh.read() setuptools.setup( - name="plspy", # Replace with your own username - version="0.2", + name="plspy", + version="0.3.0", author="Noah Frazier-Logue", author_email="noah_frazier-logue@sfu.ca", description="Implementation of McIntosh Lab's Partial Least Squares " @@ -27,5 +27,5 @@ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", ], - python_requires=">=3.8", + python_requires=">=3.7", ) From ca8a4500989ea24403ffd372558c7c56761724bb Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Wed, 27 Jul 2022 16:55:01 -0400 Subject: [PATCH 22/23] [MAINT] updated PyPI publishing conditions - added requirements for all tests to pass before publishing to PyPI Test repo and live PyPI repo - updated .gitignore to ignore all vim swap files --- .circleci/config.yml | 10 +++++++++- .gitignore | 10 +++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 076436d..e780dcd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -97,7 +97,7 @@ jobs: python setup.py sdist bdist_wheel sudo pip install pipenv pipenv install twine - pipenv run twine upload dist/* + pipenv run twine upload dist/* -u __token__ -p $PYPI_TOKEN # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: @@ -112,6 +112,10 @@ workflows: - test_pypi_publish-3_10: requires: - build-and-test-3_10 + - build-and-test-3_9 + - build-and-test-3_8 + - build-and-test-3_7 + - build-docs filters: branches: only: @@ -120,6 +124,10 @@ workflows: - pypi_publish-3_10: requires: - build-and-test-3_10 + - build-and-test-3_9 + - build-and-test-3_8 + - build-and-test-3_7 + - build-docs filters: branches: only: diff --git a/.gitignore b/.gitignore index f8bceee..cc2636a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,11 +2,11 @@ __pycache__/ plspy/__pycache__/ *.py[cod] plspy/*/.*.py[cod] -plspy/.*.sw[klmnop] -plspy/io/.*.sw[klmnop] -plspy/core/.*.sw[klmnop] -plspy/visualize/.*.sw[klmnop] -plspy/tests/.*.sw[klmnop] +plspy/.*.sw[a-z] +plspy/io/.*.sw[a-z] +plspy/core/.*.sw[a-z] +plspy/visualize/.*.sw[a-z] +plspy/tests/.*.sw[a-z] plspy/.nfs* report/* From 2c214077a99220090650b982812015b848a25d0d Mon Sep 17 00:00:00 2001 From: Noah Frazier-Logue Date: Wed, 27 Jul 2022 17:30:27 -0400 Subject: [PATCH 23/23] [DOC] update README with new badges and pip/doc info --- README.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index de155ea..a71db5d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) -[![CircleCI](https://circleci.com/gh/McIntosh-Lab/plspy/tree/main.svg?style=svg&circle-token=3b9c7e2a597b381d8b388e0fae83552ee89e07d3)](https://circleci.com/gh/McIntosh-Lab/plspy/tree/main) +[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![CircleCI](https://circleci.com/gh/McIntosh-Lab/plspy/tree/main.svg?style=svg&circle-token=3b9c7e2a597b381d8b388e0fae83552ee89e07d3)](https://circleci.com/gh/McIntosh-Lab/plspy/tree/main) [![Documentation Status](https://readthedocs.org/projects/plspy/badge/?version=latest)](https://plspy.readthedocs.io/en/latest/?badge=latest) [![PyPI version](https://badge.fury.io/py/plspy.svg)](https://badge.fury.io/py/plspy) ![versions](https://img.shields.io/pypi/pyversions/pybadges.svg) [![GitHub license](https://badgen.net/github/license/Naereen/Strapdown.js)](https://github.com/McIntosh-Lab/plspy/blob/master/LICENSE) # Partial Least Squares - McIntosh Lab @@ -7,17 +6,22 @@ plspy is a Partial Least Squares package developed to replicate and extend the PLS MATLAB package created by Randy McIntosh, et al for use in neuroimaging applications. . -## Installation +Checkout the documentation for `plspy` at https://plspy.readthedocs.io/en/latest/ -The following steps will download and install plspy to your computer: -`git clone https://github.com/McIntosh-LabI/plspy.git` +## Installation -`cd plspy` +The following steps will download and install plspy to your computer: -`python setup.py install` +`pip install plspy` +If you prefer to build from source, run these commands: +``` +git clone https://github.com/McIntosh-LabI/plspy.git +cd plspy +python setup.py install +``` ## Usage