diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 97459b246..000000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.github/workflows/behat.yml b/.github/workflows/behat.yml new file mode 100644 index 000000000..2b9753d36 --- /dev/null +++ b/.github/workflows/behat.yml @@ -0,0 +1,131 @@ +name: Behat for Moodle Homework Plugin + +on: + workflow_dispatch: + push: + branches: [ "main" ] + paths: + - 'server/moodle/blocks/homework/**' + - 'server/moodle/mod/homework/**' + pull_request: + types: [opened, reopened, synchronize] + paths: + - 'server/moodle/blocks/homework/**' + - 'server/moodle/mod/homework/**' + +jobs: + homework-plugin-behat: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup PHP + id: setup-php + uses: shivammathur/setup-php@v2 + with: + extensions: mbstring, intl, iconv, gd, sodium, zip, fileinfo, phar, mysqli + tools: composer + + - name: Set up php.ini + run: > + PHP_INI_PATH=$(php --ini | grep "Loaded Configuration File" | awk '{print $4}') + + sudo sed -i \ + -e '$a max_input_vars=5000' \ + "$PHP_INI_PATH" + + - name: Install/Update Composer + run: composer self-update --2 + + - name: Set up MariaDB + uses: ankane/setup-mariadb@v1 + with: + database: moodle + + - name: Install Moodle Composer dependencies + run: | + cd ${{ github.workspace }}/server/moodle + composer install + + - name: Import MoodleSQL file + run: | + mysql moodle < ${{ github.workspace }}/MoodleSQL.sql + + - name: Run Moodle installation CLI + run: | + php ${{ github.workspace }}/server/moodle/admin/cli/install.php \ + --lang=en \ + --wwwroot="http://127.0.0.1:8000/" \ + --dbhost="127.0.0.1" \ + --dbname="moodle" \ + --dbuser="root" \ + --dbpass="" \ + --dataroot="${{ github.workspace }}/server/moodledata" \ + --skip-database \ + --non-interactive \ + --agree-license \ + --allow-unstable \ + --fullname="Tests for Moodle Homework Plugin" \ + --shortname="mhp" \ + --adminpass="Admin.123" + + - name: Install Mozilla Firefox + uses: browser-actions/setup-firefox@v1 + + - name: Install Google Chrome + uses: browser-actions/setup-chrome@v1 + + - name: Set up Selenium + run: | + wget https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.25.0/selenium-server-4.25.0.jar + + java -jar selenium-server-4.25.0.jar standalone & + + - name: Download and require moodle-browser-config + run: | + git clone https://github.com/andrewnicols/moodle-browser-config ${{ github.workspace }}/server/moodle/moodle-browser-config + + sed -i "/^require_once(__DIR__ . '\/lib\/setup.php');/i require_once('${{ github.workspace }}/server/moodle/moodle-browser-config/init.php');" ${{ github.workspace }}/server/moodle/config.php + + - name: Configure Behat + run: | + sed -i "/^require_once(__DIR__ . '\/lib\/setup.php');/i \$CFG->behat_dataroot = \$CFG->dataroot . '/bht_moodledata';" ${{ github.workspace }}/server/moodle/config.php + sed -i "/^require_once(__DIR__ . '\/lib\/setup.php');/i \$CFG->behat_wwwroot = 'http:\/\/localhost:8000';" ${{ github.workspace }}/server/moodle/config.php + sed -i "/^require_once(__DIR__ . '\/lib\/setup.php');/i \$CFG->behat_dataroot_parent = \$CFG->dataroot . '\/behat';" ${{ github.workspace }}/server/moodle/config.php + sed -i "/^require_once(__DIR__ . '\/lib\/setup.php');/i \$CFG->behat_prefix = 'bht_';" ${{ github.workspace }}/server/moodle/config.php + + - name: Initialize Behat + run: php ${{ github.workspace }}/server/moodle/admin/tool/behat/cli/init.php + + - name: Run PHP server + run: php -S 0.0.0.0:8000 -t ${{ github.workspace }}/server/moodle & + + - name: Run Behat tests on mod_homework with Mozilla Firefox + if: always() + run: | + cd ${{ github.workspace }}/server/moodle + + vendor/bin/behat --config ${{ github.workspace }}/server/moodledata/bht_moodledata/behatrun/behat/behat.yml --profile=headlessfirefox --tags=@mod_homework + + - name: Run Behat tests on mod_homework with Google Chrome + if: always() + run: | + cd ${{ github.workspace }}/server/moodle + + vendor/bin/behat --config ${{ github.workspace }}/server/moodledata/bht_moodledata/behatrun/behat/behat.yml --profile=headlesschrome --tags=@mod_homework + + - name: Run Behat tests on block_homework with Mozilla Firefox + if: always() + run: | + cd ${{ github.workspace }}/server/moodle + + vendor/bin/behat --config ${{ github.workspace }}/server/moodledata/bht_moodledata/behatrun/behat/behat.yml --profile=headlessfirefox --tags=@block_homework + + - name: Run Behat tests on block_homework with Google Chrome + if: always() + run: | + cd ${{ github.workspace }}/server/moodle + + vendor/bin/behat --config ${{ github.workspace }}/server/moodledata/bht_moodledata/behatrun/behat/behat.yml --profile=headlesschrome --tags=@block_homework diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index ccb589f6b..c32b3dc16 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -1,6 +1,7 @@ name: PHPUnit Tests for Moodle Homework Plugin on: + workflow_dispatch: push: branches: [ "main" ] paths: @@ -13,250 +14,137 @@ on: - 'server/moodle/mod/homework/**' jobs: - homework-plugin-test: - runs-on: ubuntu-latest + homework-plugin-test-windows: + runs-on: windows-latest steps: - name: Checkout repository uses: actions/checkout@v3 - - name: install mariadb - run: | - sudo apt install mariadb-server - sudo systemctl disable mariadb - sudo systemctl stop mariadb - # uses: getong/mariadb-action@v1.11 - - name: Setup PHP id: setup-php uses: shivammathur/setup-php@v2 with: - extensions: phar, iconv, mbstring, gd, intl, sodium, zip + extensions: mbstring, intl, iconv, gd, sodium, zip, fileinfo, phar, mysqli tools: composer - - name: Set up php.ini - run: > - REPO_ROOT="`pwd`" - sed -i - -e 's/;extension=gd/extension=gd/' - -e 's/;extension=intl/extension=intl/' - -e 's/;extension=sodium/extension=sodium/' - -e 's/;extension=zip/extension=zip/' - -e "s|curl\.cainfo.*|curl.cainfo=\"$REPO_ROOT/cacert.pem\"|" - -e "s|openssl\.cafile.*|openssl.cafile=\"$REPO_ROOT\"/server/apache/bin/curl-ca-bundle.crt|" - -e '$a\\max_input_vars=5000' - -e '$a\\memory_limit_256M' - -e '$a\\post_max_size=50M' - -e '$a\\upload_max_filesize=50M' - -e '$a\\extension=phar.so' - server/php/php.ini - - # - name: Install composer - # run: | - # cd server/moodle - # php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - # php composer-setup.php + run: | + $PHP_INI_PATH = (php -i | Select-String 'Loaded Configuration File' | ForEach-Object { $_.ToString().Split(' ')[-1].Trim() }) - - name: Check enabled PHP extensions - run: | - php -m | grep -E 'gd|intl|zip' - php -r "echo phpversion('phar');" - php -r "echo ini_get('max_input_vars');" - more php.ini - realpath php.ini + Add-Content -Path $PHP_INI_PATH -Value "max_input_vars=5000" - # - name: Copy php.ini to PHP-CLI directory - # run: | - # sudo cp server/php/php.ini /etc/php/8.2/cli/php.ini + - name: Install/Update Composer + run: composer self-update --2 - # - uses: "ramsey/composer-install@v3" - # with: - # working-directory: "/etc/php/8.2/cli/php.ini" + - name: Set up MariaDB + uses: ankane/setup-mariadb@v1 + with: + database: moodle - - name: install composer + - name: Install Moodle Composer dependencies run: | - cd server/moodle - sudo apt-get update - sudo apt-get install curl - sudo apt-get install php php-curl - curl -sS https://getcomposer.org/installer -o composer-setup.php - sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer - sudo composer self-update - composer -v + cd ${{ github.workspace }}/server/moodle + composer install - - name: Check enabled PHP extensions - run: | - php -m - php --ini + - name: Import MoodleSQL file + run: | + cmd.exe /c "mysql moodle < ${{ github.workspace }}\MoodleSQL.sql" - - name: Install the curl certificate - run: curl https://curl.se/ca/cacert.pem >cacert.pem - - - name: Set up the database and start mariadb + - name: Run Moodle installation CLI run: | - set -x - mariadb_data_dir="./mariadb_data" - mariadb_socket="/run/mysqld/mysqld.sock" - moodle_db_name="moodle" - moodle_sql_file="./MoodleSQL.sql" - root_username="root" - root_password="root" - - # Function to check and kill existing processes - kill_existing() { - local process=$1 - if pgrep -x "$process" > /dev/null; then - echo "Killing existing $process process..." - sudo pkill -x "$process" - sleep 2 - fi - } - - # Function to kill process using a specific port - kill_port_user() { - local port=$1 - local pid=$(lsof -ti:$port) - if [ ! -z "$pid" ]; then - echo "Killing process using port $port..." - sudo kill -9 $pid - sleep 2 - fi - } - - # Ensure MariaDB data directory exists - mkdir -p ${mariadb_data_dir} - ls -l - - # Ensure MariaDB data directory exists - mkdir -p ${mariadb_data_dir} - ls -l - - # Initialize MariaDB if not already done - if [ ! -d "${mariadb_data_dir}/mysql" ]; then - mysql_install_db --datadir=${mariadb_data_dir} - # Start MariaDB temporarily to set up the database - # sudo touch ${mariadb_socket} - sudo chmod -R 2777 `dirname ${mariadb_socket}` - mysqld --datadir=${mariadb_data_dir} --socket=${mariadb_socket} --skip-grant-tables & - TEMP_MYSQL_PID=$! - sleep 15 # Increased wait time to ensure MariaDB is ready - - mysqld --verbose --help | grep "socket" - ps aux | grep mysqld - # Set root password and authentication method - echo "Setting root password..." - mysql -uroot -S${mariadb_socket} <phpunit_prefix = 'phpu_';" + Add-Content -Path ${{ github.workspace }}/server/moodle/config.php -Value "`$CFG->phpunit_dataroot = '${{ github.workspace }}\server\moodledata\phpunit';" - # Kill existing MariaDB and PHP processes - kill_existing "mysqld" - kill_existing "php" + - name: Initialize PHPUnit + run: php ${{ github.workspace }}/server/moodle/admin/tool/phpunit/cli/init.php - # Start MariaDB - start_mariadb() { - echo "Starting MariaDB..." - mysqld --datadir=${mariadb_data_dir} --socket=${mariadb_socket} & - MARIADB_PID=$! - sleep 10 # Increased wait time to ensure MariaDB is ready + - name: Run tests on mod_homework + if: always() + run: | + cd ${{ github.workspace }}/server/moodle + vendor/bin/phpunit --testsuite mod_homework_testsuite - # Check if MariaDB socket file is created - if [ ! -S ${mariadb_socket} ]; then - echo "Error: MariaDB socket file not found at ${mariadb_socket}. Exiting..." - exit 1 - fi - } + - name: Run tests on block_homework + if: always() + run: | + cd ${{ github.workspace }}/server/moodle + vendor/bin/phpunit --testsuite block_homework_testsuite + + homework-plugin-test-ubuntu: + runs-on: ubuntu-latest - # I do not install adminer because I'm lazy + steps: + - name: Checkout repository + uses: actions/checkout@v3 - # Start PHP built-in server for Moodle - start_php_server() { - echo "Starting PHP built-in server for Moodle..." - php -S 0.0.0.0:8000 -t ./server/moodle -c ./server/php/php.ini & - PHP_SERVER_PID=$! - } + - name: Install and set up required locale + run: | + sudo apt-get update + sudo apt-get install -y locales + sudo locale-gen en_AU.UTF-8 + sudo update-locale LANG=en_AU.UTF-8 + + - name: Setup PHP + id: setup-php + uses: shivammathur/setup-php@v2 + with: + extensions: mbstring, intl, iconv, gd, sodium, zip, fileinfo, phar, mysqli + tools: composer - # Function to stop services - stop_services() { - echo "Stopping services..." - kill $MARIADB_PID $PHP_SERVER_PID 2>/dev/null - rm -f ${mariadb_socket} - } + - name: Set up php.ini + run: > + PHP_INI_PATH=$(php --ini | grep "Loaded Configuration File" | awk '{print $4}') - # Start services - start_mariadb - start_php_server + sudo sed -i \ + -e '$a max_input_vars=5000' \ + "$PHP_INI_PATH" - echo "MariaDB and PHP server are now running." - echo "Moodle is available at http://localhost:8000" - echo "To connect to MariaDB, use:" - echo " Host: 127.0.0.1 or localhost" - echo " Username: root" - echo " Password: ${root_password}" - echo " Database: ${moodle_db_name}" - echo "Press Ctrl+C to stop the services and exit." + - name: Install/Update Composer + run: composer self-update --2 - - name: Install and initialise phpunit + - name: Set up MariaDB + uses: ankane/setup-mariadb@v1 + with: + database: moodle + + - name: Install Moodle Composer dependencies run: | - echo en_AU.UTF-8 UTF-8 | sudo tee -a /etc/locale.gen - sudo locale-gen - - if [ "$(php -r "echo ini_get('max_input_vars');")" -lt 5000 ]; then - echo "max_input_vars = 5000" >> /etc/php/8.3/cli/php.ini - fi - export LANG="en_AU.UTF-8" - export LC_ALL="en_AU.UTF-8" - export PHPRC=`realpath /etc/php/8.3/cli/php.ini` - # server/php/php.ini` - - REPO_ROOT="`pwd`" - cd "$REPO_ROOT"/server/moodle - composer require --dev phpunit/phpunit ^9 + cd ${{ github.workspace }}/server/moodle + composer install - if [ ! -d "$REPO_ROOT/server/moodledata/phpunit" ]; then - mkdir "$REPO_ROOT/server/moodledata/phpunit" - fi + - name: Import MoodleSQL file + run: | + mysql moodle < ${{ github.workspace }}/MoodleSQL.sql - php admin/cli/install.php \ + - name: Run Moodle installation CLI + run: | + php ${{ github.workspace }}/server/moodle/admin/cli/install.php \ --lang=en \ --wwwroot="http://localhost:8000/" \ - --dataroot="$REPO_ROOT/server/moodledata" \ - --dbpass=root \ - --dbport=3306 \ - --dbsocket=/run/mysqld/mysqld.sock \ + --dbhost="127.0.0.1" \ + --dbname="moodle" \ + --dbuser="root" \ + --dbpass="" \ + --dataroot="${{ github.workspace }}/server/moodledata" \ --skip-database \ --non-interactive \ --agree-license \ @@ -265,29 +153,24 @@ jobs: --shortname="mhp" \ --adminpass="Admin.123" - echo "This is the path: $(realpath config.php)" - - if [ -f "$REPO_ROOT/server/moodle/config.php" ]; then - echo "File $("$REPO_ROOT/server/moodle/config.php") exist." - else - echo "Can not find $("$REPO_ROOT/server/moodle/config.php") file" - fi - - echo "\$CFG->phpunit_prefix = 'phpu_';" >>"$REPO_ROOT/server/moodle/config.php" - echo "\$CFG->phpunit_dataroot = '$(realpath "$REPO_ROOT/server/moodledata/phpunit")';">>"$REPO_ROOT/server/moodle/config.php" + - name: Configure PHPUnit + run: | + mkdir -p "${{ github.workspace }}/server/moodledata/phpunit" - php admin/tool/phpunit/cli/init.php + echo "\$CFG->phpunit_prefix = 'phpu_';" >> "${{ github.workspace }}/server/moodle/config.php" + echo "\$CFG->phpunit_dataroot = '${{ github.workspace }}/server/moodledata/phpunit';" >> "${{ github.workspace }}/server/moodle/config.php" + + - name: Initialize PHPUnit + run: php ${{ github.workspace }}/server/moodle/admin/tool/phpunit/cli/init.php - name: Run tests on mod_homework if: always() run: | - pwd - cd server/moodle + cd ${{ github.workspace }}/server/moodle vendor/bin/phpunit --testsuite mod_homework_testsuite - name: Run tests on block_homework if: always() run: | - pwd - cd server/moodle + cd ${{ github.workspace }}/server/moodle vendor/bin/phpunit --testsuite block_homework_testsuite diff --git a/MoodleSQL.sql b/MoodleSQL.sql index 7020dcd16..ec449338b 100644 --- a/MoodleSQL.sql +++ b/MoodleSQL.sql @@ -1,4 +1,4 @@ -mdl_user-- -------------------------------------------------------- +-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 11.5.2-MariaDB - mariadb.org binary distribution -- Server OS: Win64 diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index effdb4935..000000000 --- a/package-lock.json +++ /dev/null @@ -1,4832 +0,0 @@ -{ - "name": "moodle-2", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "dependencies": { - "babel-plugin-system-import-transformer": "^4.0.0", - "babel-plugin-transform-es2015-modules-amd-lazy": "^2.0.1", - "semver": "^7.6.3", - "xmldom": "^0.6.0" - }, - "devDependencies": { - "@babel/core": "^7.26.0", - "grunt": "^1.6.1", - "grunt-contrib-watch": "^1.1.0", - "grunt-eslint": "^25.0.0", - "grunt-rollup": "^12.0.0", - "grunt-sass": "^3.1.0", - "grunt-stylelint": "^0.20.1", - "grunt-xmlpoke": "^1.0.2", - "rollup-plugin-terser": "^7.0.2", - "sass": "^1.80.4" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.0.tgz", - "integrity": "sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g==", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.0.tgz", - "integrity": "sha512-qETICbZSLe7uXv9VE8T/RWOdIE5qqyTucOt4zLYMafj2MRO271VGgLd4RACJMeBO37UPWhXiKMBk7YlJ0fOzQA==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", - "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.0", - "@babel/generator": "^7.26.0", - "@babel/helper-compilation-targets": "^7.25.9", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.0", - "@babel/parser": "^7.26.0", - "@babel/template": "^7.25.9", - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.26.0", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.0.tgz", - "integrity": "sha512-/AIkAmInnWwgEAJGQr9vY0c66Mj6kjkE2ZPB1PurTRaRAh3U+J45sAQMjQDJdh4WbR3l0x5xkimXBKyBXXAu2w==", - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.26.0", - "@babel/types": "^7.26.0", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", - "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.25.9", - "@babel/helper-validator-option": "^7.25.9", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", - "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", - "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", - "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", - "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", - "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", - "license": "MIT", - "dependencies": { - "@babel/template": "^7.25.9", - "@babel/types": "^7.26.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.26.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.1.tgz", - "integrity": "sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.26.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", - "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.25.9", - "@babel/parser": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", - "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.25.9", - "@babel/generator": "^7.25.9", - "@babel/parser": "^7.25.9", - "@babel/template": "^7.25.9", - "@babel/types": "^7.25.9", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/types": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", - "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@csstools/css-parser-algorithms": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.3.tgz", - "integrity": "sha512-15WQTALDyxAwSgAvLt7BksAssiSrNNhTv4zM7qX9U6R7FtpNskVVakzWQlYODlwPwXhGpKPmB10LM943pxMe7w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@csstools/css-tokenizer": "^3.0.2" - } - }, - "node_modules/@csstools/css-tokenizer": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.3.tgz", - "integrity": "sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@csstools/media-query-list-parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz", - "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@csstools/css-parser-algorithms": "^3.0.1", - "@csstools/css-tokenizer": "^3.0.1" - } - }, - "node_modules/@csstools/selector-specificity": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-4.0.0.tgz", - "integrity": "sha512-189nelqtPd8++phaHNwYovKZI0FOzH1vQEE3QhHHkNIGrg5fSs9CbYP3RvfEH5geztnIA9Jwq91wyOIwAW5JIQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", - "peer": true, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss-selector-parser": "^6.1.0" - } - }, - "node_modules/@dual-bundle/import-meta-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@dual-bundle/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", - "integrity": "sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg==", - "dev": true, - "license": "MIT", - "peer": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", - "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^2.1.4", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/core": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.7.0.tgz", - "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", - "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/js": { - "version": "9.13.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.13.0.tgz", - "integrity": "sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", - "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.1.tgz", - "integrity": "sha512-HFZ4Mp26nbWk9d/BpvP0YNL6W4UoZF0VFcTw/aPPA8RpOxeFQgK+ClABGgAUXs9Y/RGX/l1vOmrqz1MQt9MNuw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.0.tgz", - "integrity": "sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.5", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.5.tgz", - "integrity": "sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.0", - "@humanwhocodes/retry": "^0.3.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@parcel/watcher": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.4.1.tgz", - "integrity": "sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.4.1", - "@parcel/watcher-darwin-arm64": "2.4.1", - "@parcel/watcher-darwin-x64": "2.4.1", - "@parcel/watcher-freebsd-x64": "2.4.1", - "@parcel/watcher-linux-arm-glibc": "2.4.1", - "@parcel/watcher-linux-arm64-glibc": "2.4.1", - "@parcel/watcher-linux-arm64-musl": "2.4.1", - "@parcel/watcher-linux-x64-glibc": "2.4.1", - "@parcel/watcher-linux-x64-musl": "2.4.1", - "@parcel/watcher-win32-arm64": "2.4.1", - "@parcel/watcher-win32-ia32": "2.4.1", - "@parcel/watcher-win32-x64": "2.4.1" - } - }, - "node_modules/@parcel/watcher-android-arm64": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.1.tgz", - "integrity": "sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-arm64": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.4.1.tgz", - "integrity": "sha512-ln41eihm5YXIY043vBrrHfn94SIBlqOWmoROhsMVTSXGh0QahKGy77tfEywQ7v3NywyxBBkGIfrWRHm0hsKtzA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-x64": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.4.1.tgz", - "integrity": "sha512-yrw81BRLjjtHyDu7J61oPuSoeYWR3lDElcPGJyOvIXmor6DEo7/G2u1o7I38cwlcoBHQFULqF6nesIX3tsEXMg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-freebsd-x64": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.4.1.tgz", - "integrity": "sha512-TJa3Pex/gX3CWIx/Co8k+ykNdDCLx+TuZj3f3h7eOjgpdKM+Mnix37RYsYU4LHhiYJz3DK5nFCCra81p6g050w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-glibc": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.4.1.tgz", - "integrity": "sha512-4rVYDlsMEYfa537BRXxJ5UF4ddNwnr2/1O4MHM5PjI9cvV2qymvhwZSFgXqbS8YoTk5i/JR0L0JDs69BUn45YA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-glibc": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.4.1.tgz", - "integrity": "sha512-BJ7mH985OADVLpbrzCLgrJ3TOpiZggE9FMblfO65PlOCdG++xJpKUJ0Aol74ZUIYfb8WsRlUdgrZxKkz3zXWYA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-musl": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.4.1.tgz", - "integrity": "sha512-p4Xb7JGq3MLgAfYhslU2SjoV9G0kI0Xry0kuxeG/41UfpjHGOhv7UoUDAz/jb1u2elbhazy4rRBL8PegPJFBhA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-glibc": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.4.1.tgz", - "integrity": "sha512-s9O3fByZ/2pyYDPoLM6zt92yu6P4E39a03zvO0qCHOTjxmt3GHRMLuRZEWhWLASTMSrrnVNWdVI/+pUElJBBBg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-musl": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.4.1.tgz", - "integrity": "sha512-L2nZTYR1myLNST0O632g0Dx9LyMNHrn6TOt76sYxWLdff3cB22/GZX2UPtJnaqQPdCRoszoY5rcOj4oMTtp5fQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-arm64": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.4.1.tgz", - "integrity": "sha512-Uq2BPp5GWhrq/lcuItCHoqxjULU1QYEcyjSO5jqqOK8RNFDBQnenMMx4gAl3v8GiWa59E9+uDM7yZ6LxwUIfRg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-ia32": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.4.1.tgz", - "integrity": "sha512-maNRit5QQV2kgHFSYwftmPBxiuK5u4DXjbXx7q6eKjq5dsLXZ4FJiVvlcw35QXzk0KrUecJmuVFbj4uV9oYrcw==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-x64": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.4.1.tgz", - "integrity": "sha512-+DvS92F9ezicfswqrvIRM2njcYJbd5mb9CUgtrHCHmvn7pPPa+nMDRu1o1bYYz/l5IB2NVGNJWiH7h1E58IF2A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "22.8.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.1.tgz", - "integrity": "sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.19.8" - } - }, - "node_modules/@xmldom/xmldom": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.5.tgz", - "integrity": "sha512-6g1EwSs8cr8JhP1iBxzyVAWM6BIDvx9Y3FZRIQiMDzgG43Pxi8YkWOZ0nQj2NHgNzgXDZbJewFx/n+YAvMZrfg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.6" - } - }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true, - "license": "ISC" - }, - "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/async": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", - "dev": true, - "license": "MIT" - }, - "node_modules/babel-plugin-system-import-transformer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-system-import-transformer/-/babel-plugin-system-import-transformer-4.0.0.tgz", - "integrity": "sha512-l+xJk+z1U8tWX1FZfBCd/ebKOZa7JLAQ91YBmtNO0e/e5v/RwIM+8IGBkliXcSoP7xd+CF7L6Yu4O3wmQrya8g==", - "license": "MIT", - "dependencies": { - "@babel/core": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0" - } - }, - "node_modules/babel-plugin-transform-es2015-modules-amd-lazy": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd-lazy/-/babel-plugin-transform-es2015-modules-amd-lazy-2.0.1.tgz", - "integrity": "sha512-GGUvH+zwajFsdxE1x3XteBHIFVcbcM20S00ZIF7MH7LuL8KLFl/Giu8knxdgXl6NE69gZwXGTYQESX5Uk1fixA==", - "license": "Apache-2.0", - "dependencies": { - "@babel/helper-module-transforms": "^7.0.0-beta.45" - }, - "peerDependencies": { - "@babel/core": "^7.0.0 || ^7.0.0-beta" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/body": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", - "integrity": "sha512-chUsBxGRtuElD6fmw1gHLpvnKdVLK302peeFa9ZqAEk8TyzZ3fygLyUEDDPTJvL9+Bor0dIwn6ePOsRM2y0zQQ==", - "dev": true, - "dependencies": { - "continuable-cache": "^0.3.1", - "error": "^7.0.0", - "raw-body": "~1.1.0", - "safe-json-parse": "~1.0.1" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", - "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001669", - "electron-to-chromium": "^1.5.41", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.1" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/bytes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", - "integrity": "sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ==", - "dev": true - }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001673", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001673.tgz", - "integrity": "sha512-WTrjUCSMp3LYX0nE12ECkV0a+e6LC85E0Auz75555/qr78Oc8YWhEPNfDd6SHdtlCMSzqtuXY0uyEMNRcsKpKw==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chokidar": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", - "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/colord": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", - "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/continuable-cache": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", - "integrity": "sha512-TF30kpKhTH8AGCG3dut0rdd/19B7Z+qCnrMoBLpyQu/2drZdNrrpcjPEoJeSVsQM+8KmWG5O56oPDjSSUsuTyA==", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "license": "MIT" - }, - "node_modules/cosmiconfig": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", - "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "env-paths": "^2.2.1", - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/cosmiconfig/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0", - "peer": true - }, - "node_modules/cosmiconfig/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/css-functions-list": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.3.tgz", - "integrity": "sha512-IQOkD3hbR5KrN93MtcYuad6YPuTSUhntLHDuLEbFWE+ff2/XSZNdZG+LcbbIW5AXKg/WFIfYItIzVoHngHXZzA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=12 || >=16" - } - }, - "node_modules/css-tree": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.0.0.tgz", - "integrity": "sha512-o88DVQ6GzsABn1+6+zo2ct801dBO5OASVyxbbvA2W20ue2puSh/VOuqUj90eUeMSX/xqGqBmOKiRQN7tJOuBXw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "mdn-data": "2.10.0", - "source-map-js": "^1.0.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/dateformat": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", - "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.47", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.47.tgz", - "integrity": "sha512-zS5Yer0MOYw4rtK2iq43cJagHZ8sXN0jDHDKzB+86gSBSAI4v07S97mcq+Gs2vclAxSh1j7vOAHxSVgduiiuVQ==", - "license": "ISC" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/error": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", - "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", - "dev": true, - "dependencies": { - "string-template": "~0.2.1" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "9.13.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.13.0.tgz", - "integrity": "sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.11.0", - "@eslint/config-array": "^0.18.0", - "@eslint/core": "^0.7.0", - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.13.0", - "@eslint/plugin-kit": "^0.2.0", - "@humanfs/node": "^0.16.5", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.3.1", - "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.1.0", - "eslint-visitor-keys": "^4.1.0", - "espree": "^10.2.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.1.0.tgz", - "integrity": "sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", - "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/espree": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", - "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.12.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", - "dev": true, - "license": "MIT", - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-uri": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", - "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==", - "dev": true, - "license": "BSD-3-Clause", - "peer": true - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 4.9.1" - } - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha512-Xhj93RXbMSq8urNCUq4p9l0P6hnySJ/7YNRhYNug0bLOuii7pKO7xQFb5mx9xZXWCar88pLPb805PvUkwrLZpQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "websocket-driver": ">=0.5.1" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/findup-sync": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-5.0.0.tgz", - "integrity": "sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.3", - "micromatch": "^4.0.4", - "resolve-dir": "^1.0.1" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "dev": true, - "license": "MIT", - "dependencies": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true, - "license": "ISC" - }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", - "dev": true, - "license": "MIT", - "dependencies": { - "for-in": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "globule": "^1.0.0" - }, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/getobject": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", - "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "license": "MIT", - "dependencies": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", - "dev": true, - "license": "MIT", - "dependencies": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/global-prefix/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globjoin": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", - "integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/globule": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.4.tgz", - "integrity": "sha512-OPTIfhMBh7JbBYDpa5b+Q5ptmMWKwcNcFSR/0c6t8V4f3ZAVBEsKNY37QdVqmLRYSMhOUGYrY0QhSoEpzGr/Eg==", - "dev": true, - "license": "MIT", - "dependencies": { - "glob": "~7.1.1", - "lodash": "^4.17.21", - "minimatch": "~3.0.2" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/grunt": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.6.1.tgz", - "integrity": "sha512-/ABUy3gYWu5iBmrUSRBP97JLpQUm0GgVveDCp6t3yRNIoltIYw7rEj3g5y1o2PGPR2vfTRGa7WC/LZHLTXnEzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "dateformat": "~4.6.2", - "eventemitter2": "~0.4.13", - "exit": "~0.1.2", - "findup-sync": "~5.0.0", - "glob": "~7.1.6", - "grunt-cli": "~1.4.3", - "grunt-known-options": "~2.0.0", - "grunt-legacy-log": "~3.0.0", - "grunt-legacy-util": "~2.0.1", - "iconv-lite": "~0.6.3", - "js-yaml": "~3.14.0", - "minimatch": "~3.0.4", - "nopt": "~3.0.6" - }, - "bin": { - "grunt": "bin/grunt" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/grunt-cli": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", - "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "grunt-known-options": "~2.0.0", - "interpret": "~1.1.0", - "liftup": "~3.0.1", - "nopt": "~4.0.1", - "v8flags": "~3.2.0" - }, - "bin": { - "grunt": "bin/grunt" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/grunt-cli/node_modules/nopt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", - "dev": true, - "license": "ISC", - "dependencies": { - "abbrev": "1", - "osenv": "^0.1.4" - }, - "bin": { - "nopt": "bin/nopt.js" - } - }, - "node_modules/grunt-contrib-watch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.1.0.tgz", - "integrity": "sha512-yGweN+0DW5yM+oo58fRu/XIRrPcn3r4tQx+nL7eMRwjpvk+rQY6R8o94BPK0i2UhTg9FN21hS+m8vR8v9vXfeg==", - "dev": true, - "license": "MIT", - "dependencies": { - "async": "^2.6.0", - "gaze": "^1.1.0", - "lodash": "^4.17.10", - "tiny-lr": "^1.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-contrib-watch/node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/grunt-eslint": { - "version": "25.0.0", - "resolved": "https://registry.npmjs.org/grunt-eslint/-/grunt-eslint-25.0.0.tgz", - "integrity": "sha512-JIV5IPgOuacorFLmYtUTq0n+0qGIL9FSQJ4KVnNfCg/8Fm+K1t6OWrzXXI8TxWTwq2K9E3parFVXCpn1sGLbKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.2", - "eslint": "^9.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - }, - "peerDependencies": { - "grunt": ">=1" - } - }, - "node_modules/grunt-known-options": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", - "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-legacy-log": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", - "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "colors": "~1.1.2", - "grunt-legacy-log-utils": "~2.1.0", - "hooker": "~0.2.3", - "lodash": "~4.17.19" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/grunt-legacy-log-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", - "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "~4.1.0", - "lodash": "~4.17.19" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/grunt-legacy-util": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", - "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", - "dev": true, - "license": "MIT", - "dependencies": { - "async": "~3.2.0", - "exit": "~0.1.2", - "getobject": "~1.0.0", - "hooker": "~0.2.3", - "lodash": "~4.17.21", - "underscore.string": "~3.3.5", - "which": "~2.0.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/grunt-rollup": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/grunt-rollup/-/grunt-rollup-12.0.0.tgz", - "integrity": "sha512-f2aYSxUiSf7cylK/WoOBx5DQmM+XTZzdO3xe3YHssaKwHQQLSMxGV0j/eIfrvjhRFWPBf+CCW18iSt/hapawpQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "rollup": "^2.71.1" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "grunt": ">=0.4.0" - } - }, - "node_modules/grunt-sass": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/grunt-sass/-/grunt-sass-3.1.0.tgz", - "integrity": "sha512-90s27H7FoCDcA8C8+R0GwC+ntYD3lG6S/jqcavWm3bn9RiJTmSfOvfbFa1PXx4NbBWuiGQMLfQTj/JvvqT5w6A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "peerDependencies": { - "grunt": ">=1" - } - }, - "node_modules/grunt-stylelint": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/grunt-stylelint/-/grunt-stylelint-0.20.1.tgz", - "integrity": "sha512-tDep9ceEerB+fK6CkzPBXu5qPM7RuwCRgfrtwugEyYYnxINreMZktqQU5eoTW+MhhFj81uWQQnxf+c4geyAmQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.2" - }, - "engines": { - "node": ">=18.12.0" - }, - "peerDependencies": { - "stylelint": "16.x" - } - }, - "node_modules/grunt-xmlpoke": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/grunt-xmlpoke/-/grunt-xmlpoke-1.0.2.tgz", - "integrity": "sha512-SYY+34E2E2bx5iBXpRDO5ZoX1Sg1zwF2ldnsGor4ZVpuVfenpoF2SnQ17p/iLD05nQzAUG9vcSfsG9g2VaX6uQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@xmldom/xmldom": "~0.9.0", - "xpath": "~0.0.34" - }, - "peerDependencies": { - "grunt": ">=0.4.2" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "parse-passwd": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/hooker": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/html-tags": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", - "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/http-parser-js": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", - "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/immutable": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", - "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", - "dev": true, - "license": "MIT" - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true, - "license": "ISC" - }, - "node_modules/interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "license": "MIT", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-unc-path": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "unc-path-regex": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/known-css-properties": { - "version": "0.34.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.34.0.tgz", - "integrity": "sha512-tBECoUqNFbyAY4RrbqsBQqDFpGXAEbdD5QKr8kACx3+rnArmuuR22nKQWKazvp07N9yjTyDZaw/20UIH8tL9DQ==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/liftup": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz", - "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "extend": "^3.0.2", - "findup-sync": "^4.0.0", - "fined": "^1.2.0", - "flagged-respawn": "^1.0.1", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.1", - "rechoir": "^0.7.0", - "resolve": "^1.19.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/liftup/node_modules/findup-sync": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", - "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^4.0.2", - "resolve-dir": "^1.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/livereload-js": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz", - "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==", - "dev": true, - "license": "MIT" - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "dev": true, - "license": "MIT", - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mathml-tag-names": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz", - "integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==", - "dev": true, - "license": "MIT", - "peer": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdn-data": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.10.0.tgz", - "integrity": "sha512-qq7C3EtK3yJXMwz1zAab65pjl+UhohqMOctTgcqjLOWABqmwj+me02LSsCuEUxnst9X1lCBpoE0WArGKgdGDzw==", - "dev": true, - "license": "CC0-1.0", - "peer": true - }, - "node_modules/meow": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", - "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "peer": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-addon-api": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", - "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "license": "MIT" - }, - "node_modules/nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", - "dev": true, - "license": "ISC", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "deprecated": "This package is no longer supported.", - "dev": true, - "license": "ISC", - "dependencies": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-root-regex": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/postcss": { - "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.1.0", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss-resolve-nested-selector": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz", - "integrity": "sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/postcss-safe-parser": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.1.tgz", - "integrity": "sha512-0AioNCJZ2DPYz5ABT6bddIqlhgwhpHZ/l65YAYo0BCIn0xiDpsnTHz0gnoTGk0OXZW0JRs+cDwL8u/teRdz+8A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss-safe-parser" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", - "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "peer": true - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/raw-body": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz", - "integrity": "sha512-WmJJU2e9Y6M5UzTOkHaM7xJGAPQD8PNzx3bAd2+uhZAim6wDk6dAZxPVYLF67XhbR4hmKGh33Lpmh4XWrCH5Mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "1", - "string_decoder": "0.10" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/readdirp": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", - "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve": "^1.9.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rollup": { - "version": "2.79.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz", - "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", - "dev": true, - "license": "MIT", - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=10.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/rollup-plugin-terser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", - "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", - "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.10.4", - "jest-worker": "^26.2.1", - "serialize-javascript": "^4.0.0", - "terser": "^5.0.0" - }, - "peerDependencies": { - "rollup": "^2.0.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safe-json-parse": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz", - "integrity": "sha512-o0JmTu17WGUaUOHa1l0FPGXKBfijbxK6qoHzlkihsDXxzBHvJcA7zgviKR92Xs841rX9pK16unfphLq0/KqX7A==", - "dev": true - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, - "license": "MIT" - }, - "node_modules/sass": { - "version": "1.80.4", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.80.4.tgz", - "integrity": "sha512-rhMQ2tSF5CsuuspvC94nPM9rToiAFw2h3JTrLlgmNw1MH79v8Cr3DH6KF6o6r+8oofY3iYVPUf66KzC8yuVN1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/watcher": "^2.4.1", - "chokidar": "^4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "peer": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/string-template": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", - "integrity": "sha512-Yptehjogou2xm4UJbxJ4CxgZx12HBfeystp0y3x7s4Dj32ltVVG1Gg8YhKjHZkHicuKpZX/ffilA8505VbUbpw==", - "dev": true - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stylelint": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.10.0.tgz", - "integrity": "sha512-z/8X2rZ52dt2c0stVwI9QL2AFJhLhbPkyfpDFcizs200V/g7v+UYY6SNcB9hKOLcDDX/yGLDsY/pX08sLkz9xQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/stylelint" - }, - { - "type": "github", - "url": "https://github.com/sponsors/stylelint" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "@csstools/css-parser-algorithms": "^3.0.1", - "@csstools/css-tokenizer": "^3.0.1", - "@csstools/media-query-list-parser": "^3.0.1", - "@csstools/selector-specificity": "^4.0.0", - "@dual-bundle/import-meta-resolve": "^4.1.0", - "balanced-match": "^2.0.0", - "colord": "^2.9.3", - "cosmiconfig": "^9.0.0", - "css-functions-list": "^3.2.3", - "css-tree": "^3.0.0", - "debug": "^4.3.7", - "fast-glob": "^3.3.2", - "fastest-levenshtein": "^1.0.16", - "file-entry-cache": "^9.1.0", - "global-modules": "^2.0.0", - "globby": "^11.1.0", - "globjoin": "^0.1.4", - "html-tags": "^3.3.1", - "ignore": "^6.0.2", - "imurmurhash": "^0.1.4", - "is-plain-object": "^5.0.0", - "known-css-properties": "^0.34.0", - "mathml-tag-names": "^2.1.3", - "meow": "^13.2.0", - "micromatch": "^4.0.8", - "normalize-path": "^3.0.0", - "picocolors": "^1.0.1", - "postcss": "^8.4.47", - "postcss-resolve-nested-selector": "^0.1.6", - "postcss-safe-parser": "^7.0.1", - "postcss-selector-parser": "^6.1.2", - "postcss-value-parser": "^4.2.0", - "resolve-from": "^5.0.0", - "string-width": "^4.2.3", - "supports-hyperlinks": "^3.1.0", - "svg-tags": "^1.0.0", - "table": "^6.8.2", - "write-file-atomic": "^5.0.1" - }, - "bin": { - "stylelint": "bin/stylelint.mjs" - }, - "engines": { - "node": ">=18.12.0" - } - }, - "node_modules/stylelint/node_modules/balanced-match": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", - "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/stylelint/node_modules/file-entry-cache": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.1.0.tgz", - "integrity": "sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "flat-cache": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/stylelint/node_modules/flat-cache": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz", - "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "flatted": "^3.3.1", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/stylelint/node_modules/global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "global-prefix": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/stylelint/node_modules/global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/stylelint/node_modules/ignore": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", - "integrity": "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/stylelint/node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stylelint/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/stylelint/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.1.0.tgz", - "integrity": "sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/svg-tags": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", - "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==", - "dev": true, - "peer": true - }, - "node_modules/table": { - "version": "6.8.2", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", - "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/terser": { - "version": "5.36.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", - "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, - "node_modules/tiny-lr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz", - "integrity": "sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA==", - "dev": true, - "license": "MIT", - "dependencies": { - "body": "^5.1.0", - "debug": "^3.1.0", - "faye-websocket": "~0.10.0", - "livereload-js": "^2.3.0", - "object-assign": "^4.1.0", - "qs": "^6.4.0" - } - }, - "node_modules/tiny-lr/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/underscore.string": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz", - "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "^1.1.1", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": "*" - } - }, - "node_modules/underscore.string/node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "dev": true, - "license": "MIT" - }, - "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/v8flags": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", - "dev": true, - "license": "MIT", - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/write-file-atomic": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", - "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/xmldom": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.6.0.tgz", - "integrity": "sha512-iAcin401y58LckRZ0TkI4k0VSM1Qg0KGSc3i8rU+xrxe19A/BN1zHyVSJY7uoutVlaTSzYyk/v5AmkewAP7jtg==", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/xpath": { - "version": "0.0.34", - "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.34.tgz", - "integrity": "sha512-FxF6+rkr1rNSQrhUNYrAFJpRXNzlDoMxeXN5qI84939ylEv3qqPFKa85Oxr6tDaJKqwW6KKyo2v26TSv3k6LeA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "license": "ISC" - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index bf5f1aa37..000000000 --- a/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "devDependencies": { - "@babel/core": "^7.26.0", - "grunt": "^1.6.1", - "grunt-contrib-watch": "^1.1.0", - "grunt-eslint": "^25.0.0", - "grunt-rollup": "^12.0.0", - "grunt-sass": "^3.1.0", - "grunt-stylelint": "^0.20.1", - "grunt-xmlpoke": "^1.0.2", - "rollup-plugin-terser": "^7.0.2", - "sass": "^1.80.4" - }, - "dependencies": { - "babel-plugin-system-import-transformer": "^4.0.0", - "babel-plugin-transform-es2015-modules-amd-lazy": "^2.0.1", - "semver": "^7.6.3", - "xmldom": "^0.6.0" - } -} diff --git a/server/moodle/Gruntfile.js b/server/moodle/Gruntfile.js index 7cc31e33a..1f4b5dbe2 100644 --- a/server/moodle/Gruntfile.js +++ b/server/moodle/Gruntfile.js @@ -246,6 +246,9 @@ module.exports = function(grunt) { require(path.resolve(`./.grunt/tasks/${name}.js`))(grunt); }; + // Enable force option for all tasks. + grunt.option('force', true); + // Startup tasks. grunt.moodleEnv.startupTasks = []; diff --git a/server/moodle/blocks/homework/amd/build/clickInfo.min.js b/server/moodle/blocks/homework/amd/build/clickInfo.min.js index 5e549e625..780f3d181 100644 --- a/server/moodle/blocks/homework/amd/build/clickInfo.min.js +++ b/server/moodle/blocks/homework/amd/build/clickInfo.min.js @@ -1,4 +1,4 @@ -function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}define("block_homework/clickInfo",["exports","jquery","core/ajax","block_homework/modals","core/modal_events"],(function(_exports,_jquery,_ajax,_modals,_modal_events){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=function(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function(){};return{s:F,n:function(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){t=t.call(r)},n:function(){var r=t.next();return a=r.done,r},e:function(r){u=!0,o=r},f:function(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * - */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_jquery=_interopRequireDefault(_jquery),_ajax=_interopRequireDefault(_ajax),_modals=_interopRequireDefault(_modals),_modal_events=_interopRequireDefault(_modal_events);_exports.init=(_ref=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(title,data,user_id,completions){var homeworkid,literaturelist,linkslist,videoslist,buttons,i;return _regeneratorRuntime().wrap((function(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:for(literaturelist=[],linkslist=[],videoslist=[],buttons=document.getElementsByClassName("timebutton"),i=0;i{(0,_jquery.default)(document).ready((function(){(0,_jquery.default)(".timebutton").on("click",(e=>{_ajax.default.call([{methodname:"block_homework_get_infohomework_modal",args:{homeworkID:e.target.id},done:async function(response){const modal=await _modals.default.create({title:""+response.course+": "+response.title+" | "+response.duedate,body:`${response.html}`,large:!0,removeOnClose:!0});await modal.show(),modal.getRoot().on("click",'[data-action="submit"]',(e=>{e.preventDefault(),handleFormSubmit(userID,modal)})),modal.getRoot().on("click",'[data-action="cancel"]',(e=>{e.preventDefault(),modal.destroy()}))},fail:error=>{throw new Error(`Failed to load info homework content: ${JSON.stringify(error)}`)}}])}))}))};const handleFormSubmit=(userID,modal)=>{let literatureInputFields=document.querySelectorAll(".homework-time-literature"),linksInputFields=document.querySelectorAll(".homework-time-links"),videosInputFields=document.querySelectorAll(".homework-time-videos"),timeData1=[],timeData2=[],timeData3=[];for(let inputField of literatureInputFields)""!==inputField.value&&timeData1.push({id:inputField.id,time:inputField.value});for(let inputField of linksInputFields)""!==inputField.value&&timeData2.push({id:inputField.id,time:inputField.value});for(let inputField of videosInputFields)""!==inputField.value&&timeData3.push({id:inputField.id,time:inputField.value});timeData1.length||timeData2.length||timeData3.length?_ajax.default.call([{methodname:"block_homework_save_homeworktime",args:{user:userID,timeCompletedLiterature:timeData1,timeCompletedLinks:timeData2,timeCompletedVideos:timeData3},done:function(){modal.destroy(),location.reload()},fail:function(error){console.error("Failed to save data:",error)}}]):modal.destroy()}})); //# sourceMappingURL=clickInfo.min.js.map \ No newline at end of file diff --git a/server/moodle/blocks/homework/amd/build/clickInfo.min.js.map b/server/moodle/blocks/homework/amd/build/clickInfo.min.js.map index c0acd2f44..8fb4677cc 100644 --- a/server/moodle/blocks/homework/amd/build/clickInfo.min.js.map +++ b/server/moodle/blocks/homework/amd/build/clickInfo.min.js.map @@ -1 +1 @@ -{"version":3,"file":"clickInfo.min.js","sources":["../src/clickInfo.js"],"sourcesContent":["import $ from 'jquery';\r\nimport Ajax from 'core/ajax';\r\nimport MyModal from 'block_homework/modals';\r\nimport ModalEvents from 'core/modal_events';\r\n\r\n/**\r\n * Homework/amd/src/modal_homework.js\r\n *\r\n * @package\r\n * @copyright 2024, cs-24-sw-5-01 \r\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\r\n *\r\n */\r\n\r\n\r\n/**\r\n * Fetches and initializes the completion modal for the homework module that was clicked on.\r\n * @param title Title of modal to be displayed on click\r\n * @param data Data retrieved from the database for the homework module and its materials\r\n * @param user_id ID of currently logged in user.\r\n * @param completions The completions of the currently logged in user.\r\n * @returns {Promise} A promise that, when fulfilled, opens the modal\r\n */\r\nexport const init = async(title, data, user_id, completions) => {\r\n let homeworkid;\r\n let literaturelist = [];\r\n let linkslist = [];\r\n let videoslist =[];\r\n\r\n const buttons = document.getElementsByClassName(\"timebutton\");\r\n\r\n //For each button, retrieve the ID, as it points to the homework material\r\n for(let i = 0; i < buttons.length; i++) {\r\n (function(index) {\r\n buttons[index].addEventListener(\"click\", function(event) {\r\n homeworkid = event.target.id;\r\n literaturelist = [];\r\n linkslist = [];\r\n videoslist = [];\r\n // Finding the ID of the homework module that matches the button ID.\r\n for (let item of data) {\r\n if(!(item.hasOwnProperty('id'))){\r\n throw new Error(\"missing id in homework\")\r\n }\r\n if (item.id !== homeworkid){\r\n continue;\r\n }\r\n console.log(1)\r\n if(!(item.hasOwnProperty('literature'))) {\r\n throw new Error(\"missing id in homework\")\r\n }\r\n // For each literature item, push it to the literature list if it is not in completions\r\n for (let literature of Object.values(item.literature)) {\r\n let foundLiterature = Object.values(completions).some(entry => entry.literature_id === literature.id);\r\n if (!foundLiterature) {\r\n literaturelist.push(literature);\r\n }\r\n }\r\n if(!(item.hasOwnProperty('links'))) {\r\n throw new Error(\"missing id in homework\")\r\n }\r\n // For each link item, push it to the link list if it is not in completions\r\n for (let links of Object.values(item.links)) {\r\n let foundLinks = Object.values(completions).some(entry => entry.link_id === links.id);\r\n if (!foundLinks) {\r\n linkslist.push(links);\r\n }\r\n }\r\n if(!item.hasOwnProperty('videos')) {\r\n throw new Error(\"missing id in homework\")\r\n }\r\n // For each video item, push it to the video list if it is not in completions\r\n for (let videos of Object.values(item.videos)) {\r\n let foundVideos = Object.values(completions).some(entry => entry.video_id === videos.id);\r\n if (!foundVideos) {\r\n videoslist.push(videos);\r\n }\r\n }\r\n console.log(literaturelist);\r\n\r\n }\r\n })\r\n })(i);\r\n }\r\n\r\n // Create the modal using block_homework_get_infohomework_modal\r\n $(document).ready(function() {\r\n $('.timebutton').on('click', () => {\r\n Ajax.call([{\r\n methodname: 'block_homework_get_infohomework_modal',\r\n args:{\r\n homework_id: homeworkid,\r\n data1: literaturelist,\r\n data2: linkslist,\r\n data3: videoslist,\r\n },\r\n done: async function(response) {\r\n const modal = await MyModal.create({\r\n title: title,\r\n body: `${response.html}`,\r\n large: true,\r\n removeOnClose: true,\r\n });\r\n // Show the modal.\r\n await modal.show();\r\n\r\n // Initialize elements once the modal content is rendered.\r\n modal.getRoot().on(ModalEvents.shown, () => {\r\n // Initialize the elements after modal is displayed.\r\n\r\n // Attach event listeners for page input validation.\r\n\r\n\r\n\r\n });\r\n\r\n // Attach event listeners for buttons\r\n modal.getRoot().on('click', '[data-action=\"submit\"]', (e) => {\r\n e.preventDefault();\r\n handleFormSubmit(user_id, modal);\r\n\r\n\r\n });\r\n\r\n modal.getRoot().on('click', '[data-action=\"cancel\"]', (e) => {\r\n e.preventDefault();\r\n modal.destroy();\r\n });\r\n },\r\n fail: (error) => {\r\n throw new Error(`Failed to load info homework content: ${JSON.stringify(error)}`);\r\n }\r\n }]);\r\n });\r\n });\r\n};\r\n\r\n/**\r\n * Handle clicking the submit button of the form and updating the database with completion and times\r\n * @param user_id ID of currently logged in user\r\n * @param modal The modal that is being submitted\r\n */\r\nconst handleFormSubmit = (user_id, modal) => {\r\n let literatureInputFields = document.querySelectorAll('.homework-time-literature');\r\n let linksInputFields = document.querySelectorAll('.homework-time-links');\r\n let videosInputFields = document.querySelectorAll('.homework-time-videos');\r\n let timeData1 = [];\r\n let timeData2 = [];\r\n let timeData3 = [];\r\n // Finds the data of all input fields, both literature, link and video, and adds the ID and time to an array.\r\n for (let inputField of literatureInputFields) {\r\n if(inputField.value !== \"\") {\r\n timeData1.push({\r\n id: inputField.id,\r\n time: inputField.value,\r\n })\r\n }\r\n }\r\n for (let inputField of linksInputFields) {\r\n if(inputField.value !== \"\") {\r\n timeData2.push({\r\n id: inputField.id,\r\n time: inputField.value,\r\n })\r\n }\r\n }\r\n for (let inputField of videosInputFields) {\r\n if(inputField.value !==\"\") {\r\n timeData3.push({\r\n id: inputField.id,\r\n time: inputField.value,\r\n })\r\n }\r\n }\r\n\r\n // If no data has been filled, do nothing.\r\n if(!timeData1.length && !timeData2.length && !timeData3.length){\r\n modal.destroy();\r\n return;\r\n }\r\n\r\n // If data has been filled, call block_homework_save_homeworktime with the user ID and data\r\n Ajax.call([{\r\n methodname: 'block_homework_save_homeworktime', // Your PHP function that will handle the data\r\n args: {\r\n user: user_id,\r\n timeCompletedLiterature: timeData1,\r\n timeCompletedLinks: timeData2,\r\n timeCompletedVideos: timeData3,\r\n },\r\n done: function(response) {\r\n console.log(\"Data saved successfully:\", response);\r\n // Close the modal after successful submission\r\n modal.destroy();\r\n location.reload();\r\n },\r\n fail: function(error) {\r\n console.error(\"Failed to save data:\", error);\r\n\r\n }\r\n }]);\r\n}"],"names":["_interopRequireDefault","e","__esModule","default","_regeneratorRuntime","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","this","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","delegateYield","_createForOfIteratorHelper","Array","isArray","_arrayLikeToArray","toString","from","test","_unsupportedIterableToArray","_n","F","asyncGeneratorStep","_asyncToGenerator","arguments","apply","_next","_throw","_jquery","_ajax","_modals","_modal_events","_exports","init","_ref","_callee2","title","data","user_id","completions","homeworkid","literaturelist","linkslist","videoslist","buttons","_context2","document","getElementsByClassName","addEventListener","event","target","id","_step","_iterator","item","console","log","_loop","literature","_Object$values","_i","some","entry","literature_id","_loop2","links","_Object$values2","_i2","link_id","_loop3","videos","_Object$values3","_i3","video_id","err","$","ready","on","_done","Ajax","methodname","args","homework_id","data1","data2","data3","_callee","response","modal","_context","MyModal","body","concat","html","large","removeOnClose","show","getRoot","ModalEvents","shown","preventDefault","handleFormSubmit","destroy","_x5","fail","error","JSON","stringify","_x","_x2","_x3","_x4","_step2","literatureInputFields","querySelectorAll","linksInputFields","videosInputFields","timeData1","timeData2","timeData3","_iterator2","inputField","time","_step3","_iterator3","_step4","_iterator4","user","timeCompletedLiterature","timeCompletedLinks","timeCompletedVideos","location","reload"],"mappings":"+ZAG4C,SAAAA,uBAAAC,GAAA,OAAAA,GAAAA,EAAAC,WAAAD,EAAA,CAAAE,QAAAF,EAAA,CAAA,SAAAG,sBAAAA,oBAAAA,kBAAAH,CAAA,EAAA,IAAAI,EAAAJ,EAAA,CAAA,EAAAK,EAAAC,OAAAC,UAAAC,EAAAH,EAAAI,eAAAC,EAAAJ,OAAAK,gBAAAP,SAAAA,EAAAJ,EAAAK,GAAAD,EAAAJ,GAAAK,EAAAO,KAAAC,EAAAA,EAAAC,mBAAAA,OAAAA,OAAA,CAAA,EAAAC,EAAAF,EAAAG,UAAAC,aAAAA,EAAAJ,EAAAK,iCAAAC,EAAAN,EAAAO,aAAA,gBAAA,SAAAC,OAAAjB,EAAAJ,EAAAK,GAAA,OAAAC,OAAAK,eAAAP,EAAAJ,GAAAY,MAAAP,EAAAiB,YAAA,EAAAC,cAAAC,EAAAA,UAAApB,IAAAA,EAAAJ,OAAAqB,OAAA,CAAA,EAAA,GAAA,CAAA,MAAAjB,GAAAiB,OAAA,SAAAjB,EAAAJ,EAAAK,GAAA,OAAAD,EAAAJ,GAAAK,CAAAoB,CAAAA,CAAAA,SAAAA,KAAArB,EAAAJ,EAAAK,EAAAG,OAAAK,EAAAb,GAAAA,EAAAO,qBAAAmB,UAAA1B,EAAA0B,UAAAX,EAAAT,OAAAqB,OAAAd,EAAAN,WAAAU,EAAAW,IAAAA,QAAApB,GAAA,IAAA,OAAAE,EAAAK,EAAA,UAAA,CAAAH,MAAAiB,iBAAAzB,EAAAC,EAA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AAMc,UAwBb"} \ No newline at end of file +{"version":3,"file":"clickInfo.min.js","sources":["../src/clickInfo.js"],"sourcesContent":["import $ from 'jquery';\nimport Ajax from 'core/ajax';\nimport MyModal from 'block_homework/modals';\n\n/**\n * Homework/amd/src/modal_homework.js\n *\n * @package\n * @copyright 2024, cs-24-sw-5-01 \n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n *\n */\n\n\n/**\n * Fetches and initializes the completion modal for the homework module that was clicked on.\n * @param userID ID of currently logged-in user.\n * @returns {Promise} A promise that, when fulfilled, opens the modal\n */\nexport const init = async(userID) => {\n // Create the modal using block_homework_get_infohomework_modal\n $(document).ready(function() {\n $('.timebutton').on('click', (e) => {\n Ajax.call([{\n methodname: 'block_homework_get_infohomework_modal',\n args: {\n homeworkID: e.target.id,\n },\n done: async function(response) {\n const modal = await MyModal.create({\n // eslint-disable-next-line max-len\n title: \"\" + response.course + \": \" + response.title + \" | \" + response.duedate,\n body: `${response.html}`,\n large: true,\n removeOnClose: true,\n });\n // Show the modal.\n await modal.show();\n\n // Attach event listeners for buttons\n modal.getRoot().on('click', '[data-action=\"submit\"]', (e) => {\n e.preventDefault();\n handleFormSubmit(userID, modal);\n });\n\n modal.getRoot().on('click', '[data-action=\"cancel\"]', (e) => {\n e.preventDefault();\n modal.destroy();\n });\n },\n fail: (error) => {\n throw new Error(`Failed to load info homework content: ${JSON.stringify(error)}`);\n }\n }]);\n });\n });\n};\n\n/**\n * Handle clicking the submit button of the form and updating the database with completion and times\n * @param userID ID of currently logged-in user\n * @param modal The modal that is being submitted\n */\nconst handleFormSubmit = (userID, modal) => {\n let literatureInputFields = document.querySelectorAll('.homework-time-literature');\n let linksInputFields = document.querySelectorAll('.homework-time-links');\n let videosInputFields = document.querySelectorAll('.homework-time-videos');\n let timeData1 = [];\n let timeData2 = [];\n let timeData3 = [];\n // Finds the data of all input fields, both literature, link and video, and adds the ID and time to an array.\n for (let inputField of literatureInputFields) {\n if (inputField.value !== \"\") {\n timeData1.push({\n id: inputField.id,\n time: inputField.value,\n });\n }\n }\n for (let inputField of linksInputFields) {\n if (inputField.value !== \"\") {\n timeData2.push({\n id: inputField.id,\n time: inputField.value,\n });\n }\n }\n for (let inputField of videosInputFields) {\n if (inputField.value !== \"\") {\n timeData3.push({\n id: inputField.id,\n time: inputField.value,\n });\n }\n }\n\n // If no data has been filled, do nothing.\n if (!timeData1.length && !timeData2.length && !timeData3.length) {\n modal.destroy();\n return;\n }\n\n // If data has been filled, call block_homework_save_homeworktime with the user ID and data\n Ajax.call([{\n methodname: 'block_homework_save_homeworktime', // Your PHP function that will handle the data\n args: {\n user: userID,\n timeCompletedLiterature: timeData1,\n timeCompletedLinks: timeData2,\n timeCompletedVideos: timeData3,\n },\n done: function() {\n // Close the modal after successful submission\n modal.destroy();\n location.reload();\n },\n fail: function(error) {\n console.error(\"Failed to save data:\", error);\n }\n }]);\n};\n"],"names":["_interopRequireDefault","e","__esModule","default","_jquery","_ajax","_modals","_exports","init","async","$","document","ready","on","Ajax","call","methodname","args","homeworkID","target","id","done","response","modal","MyModal","create","title","courseurl","course","homeworkurl","duedate","body","html","large","removeOnClose","show","getRoot","preventDefault","handleFormSubmit","userID","destroy","fail","error","Error","JSON","stringify","literatureInputFields","querySelectorAll","linksInputFields","videosInputFields","timeData1","timeData2","timeData3","inputField","value","push","time","length","user","timeCompletedLiterature","timeCompletedLinks","timeCompletedVideos","location","reload","console"],"mappings":"qIAE4C,SAAAA,uBAAAC,GAAAA,OAAAA,GAAAA,EAAAC,WAAAD,EAAAE,CAAAA,QAAAF,EAAA;;;;;;;;kFAF5CG,QAAAJ,uBAAAI,SACAC,MAAAL,uBAAAK,OACAC,QAAAN,uBAAAM,SAsDEC,SAAAC,KArCkBC,gBAEhB,EAAAC,iBAAEC,UAAUC,OAAM,YACd,EAAAF,QAAAA,SAAE,eAAeG,GAAG,SAAUZ,IAC1Ba,MAAIX,QAACY,KAAK,CAAC,CACPC,WAAY,wCACZC,KAAM,CACFC,WA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BAAqBT,WAEzB/B,KAAM,WAEFE,MAAMiB,UACNsB,SAASC,QACZ,EACDtB,KAAM,SAASC,OACXsB,QAAQtB,MAAM,uBAAwBA,MAC1C,KApBAnB,MAAMiB,SAqBP,CACL"} \ No newline at end of file diff --git a/server/moodle/blocks/homework/amd/build/map_link_injector.min.js b/server/moodle/blocks/homework/amd/build/map_link_injector.min.js new file mode 100644 index 000000000..221805781 --- /dev/null +++ b/server/moodle/blocks/homework/amd/build/map_link_injector.min.js @@ -0,0 +1,3 @@ +define("block_homework/map_link_injector",(function(){return{init:function(){if(!document.querySelector('[data-region="calendar"]'))return;function DisplayMapLink(){setTimeout((()=>{const locationContent=document.querySelector(".location-content");if(!locationContent)return;const regex=/,\s*(([a-zA-Zæøå 0-9]|-[^\s])+)\s*[^)]*\),\s*(.*)/,realLocation=locationContent.textContent.split("\n").map((str=>{const match=str.match(regex);if(match){return`${match[1]}, ${match[3]}`}return str})).join("\n"),link=document.createElement("a");link.href=`https://www.google.com/maps/search/?api=1&query=${realLocation}`,link.textContent=locationContent.textContent,link.target="_blank",locationContent.innerHTML="",locationContent.appendChild(link)}),500)}const observer=new MutationObserver((mutations=>{mutations.forEach((mutation=>{mutation.target.classList.contains("show")&&DisplayMapLink()}))})),observeBackdrop=()=>{const modalBackdrop=document.querySelector('[data-region="modal-backdrop"]');modalBackdrop?observer.observe(modalBackdrop,{attributes:!0,attributeFilter:["class"]}):setTimeout(observeBackdrop,100)};function addEventListenerToButtons(event){const target=event.target;(target.classList.contains("eventname")||target.closest(".eventname"))&&(DisplayMapLink(),observeBackdrop(),document.querySelectorAll("[data-region]").forEach((element=>{element.removeEventListener("click",addEventListenerToButtons)})))}DisplayMapLink(),document.querySelectorAll("[data-region]").forEach((element=>{element.addEventListener("click",addEventListenerToButtons)}))}}})); + +//# sourceMappingURL=map_link_injector.min.js.map \ No newline at end of file diff --git a/server/moodle/blocks/homework/amd/build/map_link_injector.min.js.map b/server/moodle/blocks/homework/amd/build/map_link_injector.min.js.map new file mode 100644 index 000000000..0eee8048d --- /dev/null +++ b/server/moodle/blocks/homework/amd/build/map_link_injector.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"map_link_injector.min.js","sources":["../src/map_link_injector.js"],"sourcesContent":["define(function() {\n return {\n init: function() {\n if (!document.querySelector('[data-region=\"calendar\"]')) {\n return;\n }\n\n function DisplayMapLink() {\n // Run a timeout of 500ms to make sure the modal and content are there.\n setTimeout(() => {\n // Select the element containing location details.\n const locationContent = document.querySelector('.location-content');\n\n if (!locationContent) {\n return;\n }\n\n /*\n Define a regular expression to match and extract specific parts of the location text.\n The regex is designed to capture:\n 1. The street address (e.g., \"Alfred Nobels Vej 27\").\n 2. The city name (e.g., \"Aalborg\").\n\n Example of input:\n S.B2.02 (Auditorium), Alfred Nobels Vej 27 - Novi 8 (Anv27), Aalborg\n */\n const regex = /,\\s*(([a-zA-Zæøå 0-9]|-[^\\s])+)\\s*[^)]*\\),\\s*(.*)/;\n\n const realLocation = locationContent.textContent\n .split(\"\\n\") // Split the text into an array of lines\n .map(str => {\n const match = str.match(regex);\n if (match) {\n const location = match[1];\n const city = match[3];\n return `${location}, ${city}`;\n }\n return str;\n }).join(\"\\n\");\n\n const link = document.createElement('a');\n\n // Set the Google Maps search URL as the hyperlink, using the formatted location details.\n link.href = `https://www.google.com/maps/search/?api=1&query=${realLocation}`;\n\n link.textContent = locationContent.textContent;\n\n // Open the link in a new browser tab or window.\n link.target = '_blank';\n\n locationContent.innerHTML = '';\n locationContent.appendChild(link);\n\n }, 500);\n }\n\n // Observer setup\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n // Determine if the modal is shown based on the \"show\" class\n\n if (mutation.target.classList.contains('show')) {\n DisplayMapLink();\n }\n });\n });\n\n // Observe function called when the event button is clicked\n const observeBackdrop = () => {\n // Get the modal\n const modalBackdrop = document.querySelector('[data-region=\"modal-backdrop\"]');\n\n // Determine if the modal backdrop is there\n if (modalBackdrop) {\n // Start observing when the modal has appeared\n observer.observe(modalBackdrop, {attributes: true, attributeFilter: ['class']});\n } else {\n // If the modal was not found, try again every 100 ms\n setTimeout(observeBackdrop, 100);\n }\n };\n\n // Perform an initial check for the modal\n DisplayMapLink();\n\n // Add an event listener to all event buttons\n document.querySelectorAll('[data-region]').forEach((element) => {\n element.addEventListener('click', addEventListenerToButtons);\n });\n\n function addEventListenerToButtons(event) {\n // Determine if the data region is an event button\n const target = event.target;\n if (target.classList.contains('eventname') || target.closest('.eventname')) {\n DisplayMapLink();\n observeBackdrop();\n // Remove the event listener after modal has appeared due to the observer being better\n removeEventListeners();\n }\n }\n\n function removeEventListeners() {\n document.querySelectorAll('[data-region]').forEach((element) => {\n element.removeEventListener('click', addEventListenerToButtons);\n });\n }\n }\n };\n});\n"],"names":["define","init","document","querySelector","DisplayMapLink","setTimeout","locationContent","regex","realLocation","textContent","split","map","str","match","join","link","createElement","href","target","innerHTML","appendChild","observer","MutationObserver","mutations","forEach","mutation","classList","contains","observeBackdrop","modalBackdrop","observe","attributes","attributeFilter","addEventListenerToButtons","event","closest","querySelectorAll","element","removeEventListener","addEventListener"],"mappings":"AAAAA,2CAAO,WACH,MAAO,CACHC,KAAM,WACF,IAAKC,SAASC,cAAc,4BACxB,OAGJ,SAASC,iBAELC,YAAW,KAEP,MAAMC,gBAAkBJ,SAASC,cAAc,qBAE/C,IAAKG,gBACD,OAYJ,MAAMC,MAAQ,oDAERC,aAAeF,gBAAgBG,YAChCC,MAAM,MACNC,KAAIC,MACD,MAAMC,MAAQD,IAAIC,MAAMN,OACxB,GAAIM,MAAO,CAGP,MAAO,GAFUA,MAAM,OACVA,MAAM,IAEvB,CACA,OAAOD,GAAG,IACXE,KAAK,MAENC,KAAOb,SAASc,cAAc,KAGpCD,KAAKE,KAAO,mDAAmDT,eAE/DO,KAAKN,YAAcH,gBAAgBG,YAGnCM,KAAKG,OAAS,SAEdZ,gBAAgBa,UAAY,GAC5Bb,gBAAgBc,YAAYL,KAAK,GAElC,IACP,CAGA,MAAMM,SAAW,IAAIC,kBAAkBC,YACnCA,UAAUC,SAASC,WAGXA,SAASP,OAAOQ,UAAUC,SAAS,SACnCvB,gBACJ,GACF,IAIAwB,gBAAkBA,KAEpB,MAAMC,cAAgB3B,SAASC,cAAc,kCAGzC0B,cAEAR,SAASS,QAAQD,cAAe,CAACE,YAAY,EAAMC,gBAAiB,CAAC,WAGrE3B,WAAWuB,gBAAiB,IAChC,EAWJ,SAASK,0BAA0BC,OAE/B,MAAMhB,OAASgB,MAAMhB,QACjBA,OAAOQ,UAAUC,SAAS,cAAgBT,OAAOiB,QAAQ,iBACzD/B,iBACAwB,kBAOJ1B,SAASkC,iBAAiB,iBAAiBZ,SAASa,UAChDA,QAAQC,oBAAoB,QAASL,0BAA0B,IAJvE,CAhBA7B,iBAGAF,SAASkC,iBAAiB,iBAAiBZ,SAASa,UAChDA,QAAQE,iBAAiB,QAASN,0BAA0B,GAmBpE,EAER"} \ No newline at end of file diff --git a/server/moodle/blocks/homework/amd/src/clickInfo.js b/server/moodle/blocks/homework/amd/src/clickInfo.js index 17ac2adba..45aed4b6f 100644 --- a/server/moodle/blocks/homework/amd/src/clickInfo.js +++ b/server/moodle/blocks/homework/amd/src/clickInfo.js @@ -1,7 +1,6 @@ import $ from 'jquery'; import Ajax from 'core/ajax'; import MyModal from 'block_homework/modals'; -import ModalEvents from 'core/modal_events'; /** * Homework/amd/src/modal_homework.js @@ -15,88 +14,22 @@ import ModalEvents from 'core/modal_events'; /** * Fetches and initializes the completion modal for the homework module that was clicked on. - * @param title Title of modal to be displayed on click - * @param data Data retrieved from the database for the homework module and its materials - * @param user_id ID of currently logged in user. - * @param completions The completions of the currently logged in user. + * @param userID ID of currently logged-in user. * @returns {Promise} A promise that, when fulfilled, opens the modal */ -export const init = async(title, data, user_id, completions) => { - let homeworkid; - let literaturelist = []; - let linkslist = []; - let videoslist =[]; - - const buttons = document.getElementsByClassName("timebutton"); - - //For each button, retrieve the ID, as it points to the homework material - for(let i = 0; i < buttons.length; i++) { - (function(index) { - buttons[index].addEventListener("click", function(event) { - homeworkid = event.target.id; - literaturelist = []; - linkslist = []; - videoslist = []; - // Finding the ID of the homework module that matches the button ID. - for (let item of data) { - if(!(item.hasOwnProperty('id'))){ - throw new Error("missing id in homework") - } - if (item.id !== homeworkid){ - continue; - } - console.log(1) - if(!(item.hasOwnProperty('literature'))) { - throw new Error("missing id in homework") - } - // For each literature item, push it to the literature list if it is not in completions - for (let literature of Object.values(item.literature)) { - let foundLiterature = Object.values(completions).some(entry => entry.literature_id === literature.id); - if (!foundLiterature) { - literaturelist.push(literature); - } - } - if(!(item.hasOwnProperty('links'))) { - throw new Error("missing id in homework") - } - // For each link item, push it to the link list if it is not in completions - for (let links of Object.values(item.links)) { - let foundLinks = Object.values(completions).some(entry => entry.link_id === links.id); - if (!foundLinks) { - linkslist.push(links); - } - } - if(!item.hasOwnProperty('videos')) { - throw new Error("missing id in homework") - } - // For each video item, push it to the video list if it is not in completions - for (let videos of Object.values(item.videos)) { - let foundVideos = Object.values(completions).some(entry => entry.video_id === videos.id); - if (!foundVideos) { - videoslist.push(videos); - } - } - console.log(literaturelist); - - } - }) - })(i); - } - +export const init = async(userID) => { // Create the modal using block_homework_get_infohomework_modal $(document).ready(function() { - $('.timebutton').on('click', () => { + $('.timebutton').on('click', (e) => { Ajax.call([{ methodname: 'block_homework_get_infohomework_modal', - args:{ - homework_id: homeworkid, - data1: literaturelist, - data2: linkslist, - data3: videoslist, + args: { + homeworkID: e.target.id, }, done: async function(response) { const modal = await MyModal.create({ - title: title, + // eslint-disable-next-line max-len + title: "" + response.course + ": " + response.title + " | " + response.duedate, body: `${response.html}`, large: true, removeOnClose: true, @@ -104,22 +37,10 @@ export const init = async(title, data, user_id, completions) => { // Show the modal. await modal.show(); - // Initialize elements once the modal content is rendered. - modal.getRoot().on(ModalEvents.shown, () => { - // Initialize the elements after modal is displayed. - - // Attach event listeners for page input validation. - - - - }); - // Attach event listeners for buttons modal.getRoot().on('click', '[data-action="submit"]', (e) => { e.preventDefault(); - handleFormSubmit(user_id, modal); - - + handleFormSubmit(userID, modal); }); modal.getRoot().on('click', '[data-action="cancel"]', (e) => { @@ -137,10 +58,10 @@ export const init = async(title, data, user_id, completions) => { /** * Handle clicking the submit button of the form and updating the database with completion and times - * @param user_id ID of currently logged in user + * @param userID ID of currently logged-in user * @param modal The modal that is being submitted */ -const handleFormSubmit = (user_id, modal) => { +const handleFormSubmit = (userID, modal) => { let literatureInputFields = document.querySelectorAll('.homework-time-literature'); let linksInputFields = document.querySelectorAll('.homework-time-links'); let videosInputFields = document.querySelectorAll('.homework-time-videos'); @@ -149,54 +70,52 @@ const handleFormSubmit = (user_id, modal) => { let timeData3 = []; // Finds the data of all input fields, both literature, link and video, and adds the ID and time to an array. for (let inputField of literatureInputFields) { - if(inputField.value !== "") { + if (inputField.value !== "") { timeData1.push({ id: inputField.id, time: inputField.value, - }) + }); } } for (let inputField of linksInputFields) { - if(inputField.value !== "") { + if (inputField.value !== "") { timeData2.push({ id: inputField.id, time: inputField.value, - }) + }); } } for (let inputField of videosInputFields) { - if(inputField.value !=="") { + if (inputField.value !== "") { timeData3.push({ id: inputField.id, time: inputField.value, - }) + }); } } // If no data has been filled, do nothing. - if(!timeData1.length && !timeData2.length && !timeData3.length){ + if (!timeData1.length && !timeData2.length && !timeData3.length) { modal.destroy(); return; } // If data has been filled, call block_homework_save_homeworktime with the user ID and data Ajax.call([{ - methodname: 'block_homework_save_homeworktime', // Your PHP function that will handle the data + methodname: 'block_homework_save_homeworktime', // Your PHP function that will handle the data args: { - user: user_id, + user: userID, timeCompletedLiterature: timeData1, timeCompletedLinks: timeData2, timeCompletedVideos: timeData3, }, - done: function(response) { - console.log("Data saved successfully:", response); + done: function() { // Close the modal after successful submission modal.destroy(); location.reload(); }, fail: function(error) { console.error("Failed to save data:", error); - } }]); -} \ No newline at end of file +}; diff --git a/server/moodle/blocks/homework/amd/src/homework_injector.js b/server/moodle/blocks/homework/amd/src/homework_injector.js index d361d393a..a1c7d0786 100644 --- a/server/moodle/blocks/homework/amd/src/homework_injector.js +++ b/server/moodle/blocks/homework/amd/src/homework_injector.js @@ -1,7 +1,6 @@ define(function() { return { init: function(homework) { - //Check that the current page contains a calendar to stop the code on other pages with homework block. if (document.querySelector('[data-region="calendar"]') && JSON.stringify(homework).length > 1) { diff --git a/server/moodle/blocks/homework/amd/src/map_link_injector.js b/server/moodle/blocks/homework/amd/src/map_link_injector.js new file mode 100644 index 000000000..04b2f8e9b --- /dev/null +++ b/server/moodle/blocks/homework/amd/src/map_link_injector.js @@ -0,0 +1,109 @@ +define(function() { + return { + init: function() { + if (!document.querySelector('[data-region="calendar"]')) { + return; + } + + function DisplayMapLink() { + // Run a timeout of 500ms to make sure the modal and content are there. + setTimeout(() => { + // Select the element containing location details. + const locationContent = document.querySelector('.location-content'); + + if (!locationContent) { + return; + } + + /* + Define a regular expression to match and extract specific parts of the location text. + The regex is designed to capture: + 1. The street address (e.g., "Alfred Nobels Vej 27"). + 2. The city name (e.g., "Aalborg"). + + Example of input: + S.B2.02 (Auditorium), Alfred Nobels Vej 27 - Novi 8 (Anv27), Aalborg + */ + const regex = /,\s*(([a-zA-Zæøå 0-9]|-[^\s])+)\s*[^)]*\),\s*(.*)/; + + const realLocation = locationContent.textContent + .split("\n") // Split the text into an array of lines + .map(str => { + const match = str.match(regex); + if (match) { + const location = match[1]; + const city = match[3]; + return `${location}, ${city}`; + } + return str; + }).join("\n"); + + const link = document.createElement('a'); + + // Set the Google Maps search URL as the hyperlink, using the formatted location details. + link.href = `https://www.google.com/maps/search/?api=1&query=${realLocation}`; + + link.textContent = locationContent.textContent; + + // Open the link in a new browser tab or window. + link.target = '_blank'; + + locationContent.innerHTML = ''; + locationContent.appendChild(link); + + }, 500); + } + + // Observer setup + const observer = new MutationObserver((mutations) => { + mutations.forEach((mutation) => { + // Determine if the modal is shown based on the "show" class + + if (mutation.target.classList.contains('show')) { + DisplayMapLink(); + } + }); + }); + + // Observe function called when the event button is clicked + const observeBackdrop = () => { + // Get the modal + const modalBackdrop = document.querySelector('[data-region="modal-backdrop"]'); + + // Determine if the modal backdrop is there + if (modalBackdrop) { + // Start observing when the modal has appeared + observer.observe(modalBackdrop, {attributes: true, attributeFilter: ['class']}); + } else { + // If the modal was not found, try again every 100 ms + setTimeout(observeBackdrop, 100); + } + }; + + // Perform an initial check for the modal + DisplayMapLink(); + + // Add an event listener to all event buttons + document.querySelectorAll('[data-region]').forEach((element) => { + element.addEventListener('click', addEventListenerToButtons); + }); + + function addEventListenerToButtons(event) { + // Determine if the data region is an event button + const target = event.target; + if (target.classList.contains('eventname') || target.closest('.eventname')) { + DisplayMapLink(); + observeBackdrop(); + // Remove the event listener after modal has appeared due to the observer being better + removeEventListeners(); + } + } + + function removeEventListeners() { + document.querySelectorAll('[data-region]').forEach((element) => { + element.removeEventListener('click', addEventListenerToButtons); + }); + } + } + }; +}); diff --git a/server/moodle/blocks/homework/block_homework.php b/server/moodle/blocks/homework/block_homework.php index 8bab41b5c..16e1938d6 100644 --- a/server/moodle/blocks/homework/block_homework.php +++ b/server/moodle/blocks/homework/block_homework.php @@ -1,5 +1,5 @@ . +// along with Moodle. If not, see . /** * Block definition class for the block_homework plugin. @@ -22,16 +22,6 @@ * @author group 11 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ - -// Checks for Moodle environment. -defined('MOODLE_INTERNAL') || die(); - -/** - * Class that creates the homework block - * @copyright group 1 - * @package block_homework - * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ class block_homework extends block_base { /** * Constructor for the block @@ -79,7 +69,7 @@ public function get_content() { // Retrieving all of the user's completions. - $homeworkcompletionrecords = $DB->get_records('completions', ['user_id' => $USER->id]); + $homeworkcompletionrecords = $DB->get_records('completions', ['usermodified' => $USER->id]); // Adding the details of each homework module to an associative array that will be pushed to the data array. foreach ($homeworks as $homework) { @@ -88,24 +78,22 @@ public function get_content() { $tmp['name'] = $homework->name; $tmp['duedate'] = date('d-m-Y', $homework->duedate); $tmp['intro'] = strip_tags($homework->intro); - $tmp['courseTitle'] = $DB->get_field('course', 'fullname', ['id' => $homework->course]); - + $tmp['description'] = ($homework->description); + $tmp['courseTitle'] = $DB->get_field('course', 'fullname', ['id' => $homework->course_id]); // Retrieving the records of all material of the current homework module. - $literaturerecords = $DB->get_records('homework_literature', ['homework' => $homework->id]); - $linkrecords = $DB->get_records('homework_links', ['homework' => $homework->id]); - $videorecords = $DB->get_records('homework_video', ['homework' => $homework->id]); - - + $materialrecords = $DB->get_records('homework_materials', ['homework_id' => $homework->id]); $files = []; // Get ids of homeworkfiles. $fileids = []; - $homeworkfiles = $DB->get_records('files_homework', ['homework_id' => $homework->id]); - foreach ($homeworkfiles as $homeworkfile) { - array_push($fileids, $homeworkfile->files_id); - } + // Code commented out because it is unsure if the files are necessary. + + // ...$homeworkfiles = $DB->get_records('files_homework', ['homework_id' => $homework->id]); + // foreach ($homeworkfiles as $homeworkfile) { + // array_push($fileids, $homeworkfile->files_id); + // } // Get file records. if (!empty($fileids)) { @@ -141,27 +129,26 @@ public function get_content() { } $tmp['files'] = $files; - $tmp['literature'] = $literaturerecords; - $tmp['links'] = $linkrecords; - $tmp['videos'] = $videorecords; + $tmp['materials'] = $materialrecords; $tmp['completions'] = $homeworkcompletionrecords; array_push($data, $tmp); } - // Render the content using a template and pass the homework data to it. $this->content->text = $OUTPUT->render_from_template('block_homework/data', ['data' => $data]); // Include JavaScript functionality for scrolling behavior in the block. $this->page->requires->js_call_amd('block_homework/scroll', 'init'); $this->page->requires->js_call_amd('block_homework/sort', 'init'); - $this->page->requires->js_call_amd('block_homework/homework_injector', 'init',[$homeworks]); + $this->page->requires->js_call_amd('block_homework/homework_injector', 'init', [$homeworks]); + $this->page->requires->js_call_amd('block_homework/map_link_injector', 'init'); $this->page->requires->js_call_amd( 'block_homework/clickInfo', 'init', ["homework", $data, $USER->id, $homeworkcompletionrecords] ); $this->page->requires->js_call_amd('block_homework/filter', 'init'); + $this->page->requires->js_call_amd('block_homework/clickInfo', 'init', [$USER->id]); return $this->content; } diff --git a/server/moodle/blocks/homework/classes/external/get_homework.php b/server/moodle/blocks/homework/classes/external/get_homework.php index 4ab777519..eeaf19bab 100644 --- a/server/moodle/blocks/homework/classes/external/get_homework.php +++ b/server/moodle/blocks/homework/classes/external/get_homework.php @@ -28,19 +28,20 @@ defined('MOODLE_INTERNAL') || die(); global $CFG; -require_once("$CFG->libdir/externallib.php"); use coding_exception; use dml_exception; -use external_function_parameters; -use external_value; -use external_single_structure; use JsonException; +use core_external\external_api; +use core_external\external_function_parameters; +use core_external\external_value; +use core_external\external_single_structure; + /** * */ -class get_homework extends \external_api { +class get_homework extends external_api { /** * * @return external_function_parameters Is a definition of the functions parameter type and a description of it. @@ -62,7 +63,7 @@ public static function execute($sort) { $usercourses = enrol_get_users_courses($USER->id, true); $homeworkarray = []; foreach ($usercourses as $course) { - $homeworkrecords = $DB->get_records('homework', ['course' => $course->id]); + $homeworkrecords = $DB->get_records('homework', ['course_id' => $course->id]); foreach ($homeworkrecords as $homework) { $homeworkarray[] = [ 'id' => $homework->id, @@ -76,7 +77,7 @@ public static function execute($sort) { if ($sort === 'due') { $homeworkarray = self::sortDueDate($homeworkarray); } - /*else if($sort === 'time'){ + /* else if($sort === 'time') { $homeworkArray = self::sortTime($homeworkArray); } Implement when time task is done diff --git a/server/moodle/blocks/homework/classes/external/get_infohomework_modal.php b/server/moodle/blocks/homework/classes/external/get_infohomework_modal.php index 552ace766..aa3ae85ac 100644 --- a/server/moodle/blocks/homework/classes/external/get_infohomework_modal.php +++ b/server/moodle/blocks/homework/classes/external/get_infohomework_modal.php @@ -18,13 +18,15 @@ defined('MOODLE_INTERNAL') || die(); global $CFG; -require_once("$CFG->libdir/externallib.php"); +use coding_exception; use core_external\external_api; -use external_function_parameters; -use external_multiple_structure; -use external_value; -use external_single_structure; +use dml_exception; +use core_external\external_function_parameters; +use core_external\external_value; +use core_external\external_single_structure; +use JsonException; +use Mustache_Engine; /** * The external function for requesting the modal for plugin. @@ -37,75 +39,147 @@ class get_infohomework_modal extends external_api { * Returns the parameters for the execute function. * @return external_function_parameters */ - public static function execute_parameters() { + public static function execute_parameters(): external_function_parameters { return new external_function_parameters([ - 'homework_id' => new external_value(PARAM_INT, 'The ID of the homework item'), - 'data1' => new external_multiple_structure(new external_single_structure([ - 'description' => new external_value(PARAM_TEXT, 'Description of the homework'), - 'endpage' => new external_value(PARAM_INT, 'End page number'), - 'homework_id' => new external_value(PARAM_INT, 'The homework ID'), - 'id' => new external_value(PARAM_INT, 'Unique ID'), - 'introformat' => new external_value(PARAM_INT, 'Format of the introduction'), - 'startpage' => new external_value(PARAM_INT, 'Start page number'), - 'timecreated' => new external_value(PARAM_INT, 'Timestamp when created'), - 'timemodified' => new external_value(PARAM_INT, 'Timestamp when last modified'), - ])), - 'data2' => new external_multiple_structure(new external_single_structure([ - 'description' => new external_value(PARAM_TEXT, 'Description of the homework'), - 'link' => new external_value(PARAM_TEXT, 'The link'), - 'homework_id' => new external_value(PARAM_INT, 'The homework ID'), - 'id' => new external_value(PARAM_INT, 'Unique ID'), - 'timecreated' => new external_value(PARAM_INT, 'Timestamp when created'), - 'timemodified' => new external_value(PARAM_INT, 'Timestamp when last modified'), - 'usermodified' => new external_value(PARAM_INT, 'User who last modified'), - ])), - 'data3' => new external_multiple_structure(new external_single_structure([ - 'description' => new external_value(PARAM_TEXT, 'Description of the homework'), - 'homework_id' => new external_value(PARAM_INT, 'The homework ID'), - 'fileid' => new external_value(PARAM_INT, 'The id of the file'), - 'id' => new external_value(PARAM_INT, 'Unique ID'), - 'introformat' => new external_value(PARAM_INT, 'Format of the introduction'), - 'timecreated' => new external_value(PARAM_INT, 'Timestamp when created'), - 'timemodified' => new external_value(PARAM_INT, 'Timestamp when last modified'), - ])), + 'homeworkID' => new external_value(PARAM_INT, 'The ID of the homework item'), ]); } /** * Generates the custom HTML for the homework chooser modal. - * @param int $homework_id The ID of the homework item + * + * @param int $homeworkID The ID of the homework item * @return string[] - The HTML to be shown client-side + * @throws dml_exception|JsonException */ - public static function execute($homeworkid, $data1, $data2, $data3) { - global $DB; + public static function execute(int $homeworkid): array { + global $DB, $USER; + $homework = $DB->get_record('homework', ['id' => $homeworkid]); + $course = $DB->get_record('course', ['id' => $homework->course_id]); + $materials = $DB->get_records('homework_materials', ['homework_id' => $homework->id]); + $completedmaterials = $DB->get_records('completions', ['usermodified' => $USER->id]); + $literaturearray = []; + $linksarray = []; + $videosarray = []; + foreach ($materials as $material) { + $completed = false; + foreach ($completedmaterials as $completedmaterial) { + if ($completedmaterial->material_id === $material->id) { + $completed = true; + break; + } + } + if ($completed) { + continue; + } + if ($material->startpage !== null && $material->endpage !== null) { + if ($material->file_id !== null) { + $material->fileurl = self::get_file_link_by_id($material->file_id); + } + $literaturearray[] = $material; + } else if ($material->link !== null) { + $linksarray[] = $material; + } else if ($material->starttime !== null && $material->endtime !== null) { + if ($material->file_id !== null) { + $material->fileurl = self::get_file_link_by_id($material->file_id); + } + $videosarray[] = $material; + } + } + + return self::get_info($homework, $course, $literaturearray, $linksarray, $videosarray); + } + /** + * Returns the structure of the function's response. + * @return external_single_structure - Definition of the function's return type and description + */ + public static function execute_returns(): external_single_structure { + return new external_single_structure([ + 'html' => new external_value(PARAM_RAW, 'HTML for the homework chooser modal'), + 'title' => new external_value(PARAM_TEXT, 'Title of the homework'), + 'course' => new external_value(PARAM_TEXT, 'Course name'), + 'duedate' => new external_value(PARAM_TEXT, 'Due date of the homework'), + 'courseurl' => new external_value(PARAM_TEXT, 'The URL for the course'), + 'homeworkurl' => new external_value(PARAM_TEXT, 'The URl for the homework'), + ]); + } + + /** + * + * @throws JsonException + */ + public static function get_info($homework, $course, $literaturearray, $linksarray, $videosarray): array { // Assuming you have the Mustache engine set up. - $mustache = new \Mustache_Engine(); + $mustache = new Mustache_Engine(); $nohomework = ""; - if (!$data1 && !$data2 && !$data3) { + + if (count($literaturearray) === 0 && count($linksarray) === 0 && count($videosarray) === 0) { $nohomework = "All completed"; } // Prepare data for the template. $content = [ 'nohomework' => $nohomework, - 'literature' => $data1, - 'links' => $data2, - 'videos' => $data3, + 'homeworkdescription' => strip_tags($homework->intro), + 'literature' => $literaturearray, + 'links' => $linksarray, + 'videos' => $videosarray, ]; // Render the template. $html = $mustache->render(file_get_contents(__DIR__ . "/../../templates/timeinfotemplate.mustache"), $content); - return ['html' => $html]; + $duedate = date('H:i d-m-Y', $homework->duedate); + $courseurl = "/course/view.php?id=" . $course->id; + $homeworkurl = "/mod/homework/view.php?id=" . $homework->id; + + return ['html' => $html, 'title' => $homework->name, 'course' => $course->fullname, + 'duedate' => $duedate, 'courseurl' => $courseurl, 'homeworkurl' => $homeworkurl]; } /** - * Returns the structure of the function's response. - * @return external_single_structure - Definition of the function's return type and description + * Get a direct link to a file by its file ID. + * + * @param int $fileID The ID of the file in Moodle's file storage. + * @return string|null The URL to the file or null if the file is not found. + * @throws dml_exception|coding_exception */ - public static function execute_returns() { - return new external_single_structure([ - 'html' => new external_value(PARAM_RAW, 'HTML for the homework chooser modal'), - ]); + public static function get_file_link_by_id(int $fileid): null|string { + global $DB; + + // Retrieve the file record from the database. + $file = $DB->get_record('files', ['id' => $fileid]); + + // Check if the file exists and is valid. + if (!$file || $file->filename === '.' || $file->filename === '') { + return null; + } + + // Generate the file URL. + $context = \context::instance_by_id($file->contextid); + $fs = get_file_storage(); + $storedfile = $fs->get_file( + $file->contextid, + $file->component, + $file->filearea, + $file->itemid, + $file->filepath, + $file->filename + ); + + if ($storedfile) { + // Moodle's file plugin serves the files through pluginfile.php. + $fileurl = \moodle_url::make_pluginfile_url( + $storedfile->get_contextid(), + $storedfile->get_component(), + $storedfile->get_filearea(), + $storedfile->get_itemid(), + $storedfile->get_filepath(), + $storedfile->get_filename() + ); + return $fileurl->out(); + } + + return null; } } diff --git a/server/moodle/blocks/homework/classes/external/save_homeworktime.php b/server/moodle/blocks/homework/classes/external/save_homeworktime.php index cc4af4af2..b71751212 100644 --- a/server/moodle/blocks/homework/classes/external/save_homeworktime.php +++ b/server/moodle/blocks/homework/classes/external/save_homeworktime.php @@ -19,14 +19,12 @@ defined('MOODLE_INTERNAL') || die(); global $CFG; // Comment out line below for test if phpunit does not respond to putting run in separate process. -require_once("$CFG->libdir/externallib.php"); - use core_external\external_api; -use external_function_parameters; -use external_multiple_structure; -use external_value; -use external_single_structure; +use core_external\external_multiple_structure; +use core_external\external_function_parameters; +use core_external\external_value; +use core_external\external_single_structure; /** * The class describing the external function, its parameters, and also its return value @@ -42,19 +40,10 @@ class save_homeworktime extends external_api { public static function execute_parameters() { return new external_function_parameters([ 'user' => new external_value(PARAM_INT, 'user id'), - 'timeCompletedLiterature' => new external_multiple_structure(new external_single_structure([ - 'id' => new external_value(PARAM_INT, 'literature id'), - 'time' => new external_value(PARAM_INT, 'time'), - ])), - 'timeCompletedLinks' => new external_multiple_structure(new external_single_structure([ - 'id' => new external_value(PARAM_INT, 'link id'), + 'timeCompleted' => new external_multiple_structure(new external_single_structure([ + 'id' => new external_value(PARAM_INT, 'material id'), 'time' => new external_value(PARAM_INT, 'time'), ])), - 'timeCompletedVideos' => new external_multiple_structure(new external_single_structure([ - 'id' => new external_value(PARAM_INT, 'video id'), - 'time' => new external_value(PARAM_INT, 'time'), - ])), - ]); } @@ -67,34 +56,21 @@ public static function execute_parameters() { * @return string[] Returns a success message if successful * @throws \dml_exception On error, throws a dml exception as per Moodle standards */ - public static function execute($user, $timecompletedliterature, $timecompletedlinks, $timecompletedvideos) { + public static function execute($user, $timecompleted) { global $DB; // Handle the input field value here. // For example, save to a database. // For each completed literature material, add the time taken and ID to a new completion. - foreach ($timecompletedliterature as $currtimecompletedliterature) { + foreach ($timecompleted as $currtimecompleted) { $record = new \stdClass(); - $record->user_id = $user; - $record->literature_id = $currtimecompletedliterature['id']; - $record->time_taken = $currtimecompletedliterature['time']; - $DB->insert_record('completions', $record); - } - // For each completed link material, add the time taken and ID to a new completion. - foreach ($timecompletedlinks as $timecompletedlink) { - $record = new \stdClass(); - $record->user_id = $user; - $record->link_id = $timecompletedlink['id']; - $record->time_taken = $timecompletedlink['time']; - $DB->insert_record('completions', $record); - } + $record->usermodified = $user; + $record->timecreated = time(); + $record->timemodified = time(); + + $record->material_id = $currtimecompleted['id']; + $record->timetaken = $currtimecompleted['time']; - // For each completed video material, add the time taken and ID to a new completion. - foreach ($timecompletedvideos as $timecompletedvideo) { - $record = new \stdClass(); - $record->user_id = $user; - $record->video_id = $timecompletedvideo['id']; - $record->time_taken = $timecompletedvideo['time']; $DB->insert_record('completions', $record); } diff --git a/server/moodle/blocks/homework/db/access.php b/server/moodle/blocks/homework/db/access.php index f615ffe5f..0ef0742f5 100644 --- a/server/moodle/blocks/homework/db/access.php +++ b/server/moodle/blocks/homework/db/access.php @@ -1,6 +1,5 @@ . - -defined('MOODLE_INTERNAL') || die(); - +// along with Moodle. If not, see . /** * Block definition class for the block_homework plugin. @@ -26,6 +22,7 @@ * @author group 11 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + defined('MOODLE_INTERNAL') || die(); $capabilities = [ diff --git a/server/moodle/blocks/homework/styles.css b/server/moodle/blocks/homework/styles.css index ebdd042f2..cebc1953e 100644 --- a/server/moodle/blocks/homework/styles.css +++ b/server/moodle/blocks/homework/styles.css @@ -28,4 +28,41 @@ justify-content: flex-end; gap: 10px; padding: 10px; +} +/* CSS for the time taking modal */ +#info-homework-modal .homeworkmaterialcontainer{ + display: flex; + flex-direction: column; + margin-bottom: 30px; + border: 1px solid black; + border-radius: 5px; +} + +#info-homework-modal .homeworkmaterialcontainer > div{ + display: flex; + align-items: center; + border-bottom: 1px solid black; + padding: 10px; +} + +#info-homework-modal .homeworkmaterialcontainer > div:last-child{ + border-bottom: 0; +} + +#info-homework-modal .homeworkmaterialcontainer > div i{ + font-size: 24px; + margin-right: 20px; + width: 30px; + height: 30px; +} + +#info-homework-modal .homeworkmaterialcontainer > div h3, #info-homework-modal .homeworkmaterialcontainer > div a{ + margin: 0; + flex: 1; + font-size: 20px; + font-weight: 400; +} + +#info-homework-modal .homeworkmaterialcontainer > div input{ + } \ No newline at end of file diff --git a/server/moodle/blocks/homework/templates/timeinfotemplate.mustache b/server/moodle/blocks/homework/templates/timeinfotemplate.mustache index ea4f09448..1fa9e0c38 100644 --- a/server/moodle/blocks/homework/templates/timeinfotemplate.mustache +++ b/server/moodle/blocks/homework/templates/timeinfotemplate.mustache @@ -1,34 +1,38 @@
-

Mark homework completed

-

{{nohomework}}

+

{{nohomework}}

+ {{#homeworkdescription}} +

{{homeworkdescription}}

+ {{/homeworkdescription}} +
{{#literature}}
-

{{description}}

-
- - -
+ + {{description}} +
+ +
{{/literature}} {{#links}} - + {{/links}} {{#videos}} -
-

{{description}}

-
- - -
-
+
+ + {{description}} +
+ +
+
{{/videos}} +
\ No newline at end of file diff --git a/server/moodle/blocks/homework/tests/block_homework_test.php b/server/moodle/blocks/homework/tests/block_homework_test.php index cc3d4c17a..4d0993729 100644 --- a/server/moodle/blocks/homework/tests/block_homework_test.php +++ b/server/moodle/blocks/homework/tests/block_homework_test.php @@ -1,5 +1,4 @@ . -// File: mod/myplugin/tests/sample_test.php. +// File: blocks/homework/tests/block_homework_test.php. namespace block_homework; diff --git a/server/moodle/blocks/homework/tests/block_homeworkinfomodal_test.php b/server/moodle/blocks/homework/tests/block_homeworkinfomodal_test.php index 991d60137..e09f34a3b 100644 --- a/server/moodle/blocks/homework/tests/block_homeworkinfomodal_test.php +++ b/server/moodle/blocks/homework/tests/block_homeworkinfomodal_test.php @@ -28,6 +28,7 @@ use advanced_testcase; use core\exception\coding_exception; use DOMDocument; +use stdClass; /** * Test for modal rendering. @@ -43,54 +44,46 @@ final class block_homeworkinfomodal_test extends advanced_testcase { * @runInSeparateProcess * @covers :: \block_homework\external\get_infohomework_modal */ - public function test_get_homeworkinfo_modal(): void { + public function test_get_info(): void { global $DB; // Set up necessary data for the test, such as course and module. $this->resetAfterTest(); $course = $this->getDataGenerator()->create_course(); - $homework = $this->getDataGenerator()->get_plugin_generator('block_homework')->create_instance(['course' => $course->id]); - $homeworkid = $homework->id; + $homework = new stdClass(); + $homework->id = 1; + $homework->course = $course->id; + $homework->name = 'test'; + $homework->timecreated = strtotime('2023-10-01 10:00:00'); + $homework->timemodified = strtotime('2023-10-01 10:00:00'); + $homework->intro = 'test description'; + $homework->introformat = 1; + $homework->description = 'test description'; + $homework->duedate = strtotime('2023-10-01 10:00:00'); + $homework->eventid = null; + // Data1. - $data1 = [ - [ - 'description' => 'Math homework on integrals', - 'endpage' => 10, - 'homework_id' => $homeworkid, - 'id' => 1, - 'introformat' => 1, - 'startpage' => 1, - 'timecreated' => strtotime('2023-10-01 10:00:00'), - 'timemodified' => strtotime('2023-10-02 12:00:00'), - ], - [ + $literature = [ + (object)[ 'description' => 'Science project on climate change', 'endpage' => 15, - 'homework_id' => $homeworkid, + 'homework_id' => $homework->id, 'id' => 2, 'introformat' => 1, 'startpage' => 11, 'timecreated' => strtotime('2023-10-05 11:00:00'), 'timemodified' => strtotime('2023-10-06 13:00:00'), + 'usermodified' => 4, ], ]; // Data2. - $data2 = [ - [ - 'description' => 'Project guidelines', - 'link' => 'http://example.com/guidelines', - 'homework_id' => $homeworkid, - 'id' => 1, - 'timecreated' => strtotime('2023-10-01 10:00:00'), - 'timemodified' => strtotime('2023-10-02 12:00:00'), - 'usermodified' => 5, - ], - [ + $links = [ + (object)[ 'description' => 'Reference materials', 'link' => 'http://example.com/references', - 'homework_id' => $homeworkid, + 'homework_id' => $homework->id, 'id' => 2, 'timecreated' => strtotime('2023-10-03 09:00:00'), 'timemodified' => strtotime('2023-10-04 14:00:00'), @@ -99,33 +92,22 @@ public function test_get_homeworkinfo_modal(): void { ]; // Data3. - $data3 = [ - [ - 'description' => 'Presentation for math homework', - 'homework_id' => $homeworkid, - 'fileid' => 501, - 'id' => 1, - 'introformat' => 1, - 'timecreated' => strtotime('2023-10-01 10:00:00'), - 'timemodified' => strtotime('2023-10-02 12:00:00'), - ], - [ + $videos = [ + (object) [ 'description' => 'Presentation for science project', - 'homework_id' => $homeworkid, + 'homework_id' => $homework->id, 'fileid' => 502, 'id' => 2, 'introformat' => 1, + 'starttime' => 11, 'timecreated' => strtotime('2023-10-05 11:00:00'), 'timemodified' => strtotime('2023-10-06 13:00:00'), + 'usermodified' => 8, ], ]; // Call the external function directly. - $result = \block_homework\external\get_infohomework_modal::execute($homeworkid, $data1, $data2, $data3); - - // Verify that the result contains the expected HTML structure. - $this->assertNotEmpty($result); - $this->assertArrayHasKey('html', $result); + $result = \block_homework\external\get_infohomework_modal::get_info($homework, $course, $literature, $links, $videos); // Parse the HTML using DOMDocument to check for the required elements. $dom = new DOMDocument(); @@ -133,37 +115,39 @@ public function test_get_homeworkinfo_modal(): void { // Check that each element is present in the HTML. $this->assertNotNull($dom->getElementById('info-homework-modal'), 'Modal container is missing'); - $modaltitle = $dom->getElementsByTagName('h1')->item(0); - $this->assertEquals('Mark homework completed', $modaltitle->textContent, 'Modal title is incorrect'); $xpath = new \DOMXPath($dom); - $this->assertNotNull($dom->getElementById('literature-1')); + $homeworkdescription = $xpath->query("//p[@class='homeworkdescription']")->item(0); + $this->assertEquals($homework->description, $homeworkdescription->textContent, 'Homework description is incorrect'); + $this->assertNotNull($xpath->query("//div[@class='homeworkmaterialcontainer']")->item(0)); + + // Check for input with specific attributes & their labels for literature. + $this->assertNotNull($dom->getElementById('literature-2')); // Check for input with specific attributes & their labels. - $litlabel1 = $xpath->query('//div[@id="literature-1"]//h3')->item(0); - $this->assertEquals('Math homework on integrals', $litlabel1->textContent, 'Modal title is incorrect'); - $input = $xpath->query("//input[@class='homework-time-literature'][@id='1'][@name='homework-time'][@min='1']"); - $this->assertEquals(1, $input->length, 'Expected input with class \'homework-time-literature\''); - $litlabel1 = $xpath->query('//div[@id="literature-2"]//h3')->item(0); - $this->assertEquals('Science project on climate change', $litlabel1->textContent, 'Modal title is incorrect'); + $this->assertNotNull($xpath->query("//i[@class='fa-solid fa-file-text']")->item(0)); + $lit2description = $xpath->query("//div[@id='literature-2']//a")->item(0); + $this->assertEquals($literature[0]->description, $lit2description->textContent); + $this->assertNotNull($xpath->query("//div[@id='literature-2']//form")); $input = $xpath->query("//input[@class='homework-time-literature'][@id='2'][@name='homework-time'][@min='1']"); $this->assertEquals(1, $input->length, 'Expected input with class \'homework-time-literature\''); - $this->assertNotNull($dom->getElementById('literature-1')); + // Check for input with specific attributes & their labels for links. - $litlabel1 = $xpath->query('//div[@id="links-1"]//h3')->item(0); - $this->assertEquals('Project guidelines', $litlabel1->textContent, 'Modal title is incorrect'); - $input = $xpath->query("//input[@class='homework-time-links'][@id='1'][@name='homework-time'][@min='1']"); - $this->assertEquals(1, $input->length, 'Expected input with class \'homework-time-links\''); - $litlabel1 = $xpath->query('//div[@id="links-2"]//h3')->item(0); - $this->assertEquals('Reference materials', $litlabel1->textContent, 'Modal title is incorrect'); + $this->assertNotNull($dom->getElementById('links-2')); + // Check for input with specific attributes & their labels. + $this->assertNotNull($xpath->query("//i[@class='fa-solid fa-link']")->item(0)); + $link2description = $xpath->query("//div[@id='links-2']//a")->item(0); + $this->assertEquals($links[0]->description, $link2description->textContent); + $this->assertEquals($links[0]->link, $link2description->getAttribute('href')); + $this->assertNotNull($xpath->query("//div[@id='links-2']//form")); $input = $xpath->query("//input[@class='homework-time-links'][@id='2'][@name='homework-time'][@min='1']"); $this->assertEquals(1, $input->length, 'Expected input with class \'homework-time-links\''); - $this->assertNotNull($dom->getElementById('literature-1')); + // Check for input with specific attributes & their labels, for videos. - $litlabel1 = $xpath->query('//div[@id="videos-1"]//h3')->item(0); - $this->assertEquals('Presentation for math homework', $litlabel1->textContent, 'Modal title is incorrect'); - $input = $xpath->query("//input[@class='homework-time-videos'][@id='1'][@name='homework-time'][@min='1']"); - $this->assertEquals(1, $input->length, 'Expected input with class \'homework-time-videos\''); - $litlabel1 = $xpath->query('//div[@id="videos-2"]//h3')->item(0); - $this->assertEquals('Presentation for science project', $litlabel1->textContent, 'Modal title is incorrect'); + $this->assertNotNull($dom->getElementById('videos-2')); + // Check for input with specific attributes & their labels. + $this->assertNotNull($xpath->query("//i[@class='fa-solid fa-file-video-o']")->item(0)); + $lit2description = $xpath->query("//div[@id='videos-2']//a")->item(0); + $this->assertEquals($videos[0]->description, $lit2description->textContent); + $this->assertNotNull($xpath->query("//div[@id='videos-2']//form")); $input = $xpath->query("//input[@class='homework-time-videos'][@id='2'][@name='homework-time'][@min='1']"); $this->assertEquals(1, $input->length, 'Expected input with class \'homework-time-videos\''); } diff --git a/server/moodle/blocks/homework/tests/save_homeworktime_test.php b/server/moodle/blocks/homework/tests/save_homeworktime_test.php index b72f7171e..2867acad7 100644 --- a/server/moodle/blocks/homework/tests/save_homeworktime_test.php +++ b/server/moodle/blocks/homework/tests/save_homeworktime_test.php @@ -47,50 +47,76 @@ public function test_save_timeindb(): void { ['id' => 2, 'time' => 45], ]; + // Execute the external function. + $resultliterature = save_homeworktime::execute($userid, $timecompletedliterature); + + // Check that the return structure and values are as expected. + $this->assertIsArray($resultliterature, 'Result should be an array'); + $this->assertArrayHasKey('status', $resultliterature); + $this->assertArrayHasKey('message', $resultliterature); + $this->assertEquals('success', $resultliterature['status']); + $this->assertEquals('Data saved successfully', $resultliterature['message']); + $timecompletedlinks = [ ['id' => 3, 'time' => 20], ['id' => 4, 'time' => 35], ]; + // Execute the external function. + $resultlinks = save_homeworktime::execute($userid, $timecompletedlinks); + + // Check that the return structure and values are as expected. + $this->assertIsArray($resultlinks, 'Result should be an array'); + $this->assertArrayHasKey('status', $resultlinks); + $this->assertArrayHasKey('message', $resultlinks); + $this->assertEquals('success', $resultlinks['status']); + $this->assertEquals('Data saved successfully', $resultlinks['message']); + $timecompletedvideos = [ ['id' => 5, 'time' => 50], ['id' => 6, 'time' => 25], ]; // Execute the external function. - $result = save_homeworktime::execute($userid, $timecompletedliterature, $timecompletedlinks, $timecompletedvideos); + $resultvideos = save_homeworktime::execute($userid, $timecompletedvideos); // Check that the return structure and values are as expected. - $this->assertIsArray($result, 'Result should be an array'); - $this->assertArrayHasKey('status', $result); - $this->assertArrayHasKey('message', $result); - $this->assertEquals('success', $result['status']); - $this->assertEquals('Data saved successfully', $result['message']); + $this->assertIsArray($resultvideos, 'Result should be an array'); + $this->assertArrayHasKey('status', $resultvideos); + $this->assertArrayHasKey('message', $resultvideos); + $this->assertEquals('success', $resultvideos['status']); + $this->assertEquals('Data saved successfully', $resultvideos['message']); // Verify data has been saved in the database for literature. foreach ($timecompletedliterature as $item) { $this->assertRecordExists('completions', [ - 'user_id' => $userid, - 'literature_id' => $item['id'], - 'time_taken' => $item['time'], + 'timecreated' => time(), + 'timemodified' => time(), + 'usermodified' => (int) $userid, + 'material_id' => $item['id'], + 'timetaken' => $item['time'], ]); } // Verify data has been saved in the database for links. foreach ($timecompletedlinks as $item) { $this->assertRecordExists('completions', [ - 'user_id' => $userid, - 'link_id' => $item['id'], - 'time_taken' => $item['time'], + 'timecreated' => time(), + 'timemodified' => time(), + 'usermodified' => (int) $userid, + 'material_id' => $item['id'], + 'timetaken' => $item['time'], ]); } // Verify data has been saved in the database for videos. foreach ($timecompletedvideos as $item) { $this->assertRecordExists('completions', [ - 'user_id' => $userid, - 'video_id' => $item['id'], - 'time_taken' => $item['time'], + 'timecreated' => time(), + 'timemodified' => time(), + 'usermodified' => (int) $userid, + 'material_id' => $item['id'], + 'timetaken' => $item['time'], ]); } } diff --git a/server/moodle/mod/homework/amd/build/homeworkchooser.min.js b/server/moodle/mod/homework/amd/build/homeworkchooser.min.js index e2fd37664..d35b20c37 100644 --- a/server/moodle/mod/homework/amd/build/homeworkchooser.min.js +++ b/server/moodle/mod/homework/amd/build/homeworkchooser.min.js @@ -1,10 +1,3 @@ -function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}define("mod_homework/homeworkchooser",["exports","jquery","core/ajax","mod_homework/modal_homework","core/modal_events"],(function(_exports,_jquery,_ajax,_modal_homework,_modal_events){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise((function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)}))}} -/** - * Homework/amd/src/modal_homework.js - * - * @package - * @copyright 2024, cs-24-sw-5-01 - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - * - */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_jquery=_interopRequireDefault(_jquery),_ajax=_interopRequireDefault(_ajax),_modal_homework=_interopRequireDefault(_modal_homework),_modal_events=_interopRequireDefault(_modal_events);_exports.init=(_ref=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(cmid,title,currentHomework){return _regeneratorRuntime().wrap((function(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:(0,_jquery.default)("#open-homework-chooser").on("click",(function(){var _done;_ajax.default.call([{methodname:"mod_homework_get_homework_chooser",args:{cmid:cmid},done:(_done=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(response){var modal;return _regeneratorRuntime().wrap((function(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,_modal_homework.default.create({title:title,body:"".concat(response.html),large:!0,removeOnClose:!0});case 2:return(modal=_context.sent).getRoot().on(_modal_events.default.shown,(function(){var startPageInput=modal.getRoot().find("#startPage")[0],endPageInput=modal.getRoot().find("#endPage")[0],radioButtons=modal.getRoot().find('input[name="option"]'),testTextarea=modal.getRoot().find("#page-range-input")[0],testLink=modal.getRoot().find("#linkDiv")[0];function validatePageRange(){var startPage=parseInt(startPageInput.value,10),endPage=parseInt(endPageInput.value,10);""!==endPageInput.value&&""!==startPageInput.value&&endPage{(0,_jquery.default)("#open-homework-chooser").on("click",(()=>{_ajax.default.call([{methodname:"mod_homework_get_homework_chooser",args:{cmid:cmid},done:async function(response){const modal=await _modal_homework.default.create({title:title,body:`${response.html}`,large:!0,removeOnClose:!0});modal.show(),modal.getRoot().on(_modal_events.default.shown,(()=>{const dropzoneContainer=modal.getRoot().find("#dropzone-container")[0];initializeDropzone(dropzoneContainer)})),modal.getRoot().on(_modal_events.default.hidden,(()=>{console.log("Modal closed!")})),modal.getRoot().on("click",'[data-action="submit"]',(e=>{e.preventDefault(),handleFormSubmit(modal,currentHomework)})),modal.getRoot().on("click",'[data-action="cancel"]',(e=>{e.preventDefault(),modal.destroy()}))},fail:error=>{console.error("Failed to load homework chooser content:",error)}}])}))};const initializeDropzone=container=>{const dropZone=new _dropzone.default(container,"*/*",(files=>{dropZoneFiles.push(files[0]),displayUploadedFile(files[0])}));dropZone.setLabel("Drop file here (Optional)"),dropZone.init()},displayUploadedFile=file=>{const previewContainer=document.getElementById("file-content");if(previewContainer.innerHTML="",file.name||file.filename){const fileWrapper=document.createElement("div");fileWrapper.style.position="relative",fileWrapper.style.display="ruby";const paragraph=document.createElement("p");file.name?paragraph.textContent=`${file.name}`:file.filename&&(paragraph.textContent=`${file.filename}`),fileWrapper.appendChild(paragraph);const deleteButton=document.createElement("span");deleteButton.textContent="X",deleteButton.style.cursor="pointer",deleteButton.style.background="red",deleteButton.style.color="white",deleteButton.style.padding="2px 5px",deleteButton.style.fontWeight="bold",deleteButton.style.marginLeft="5px",deleteButton.addEventListener("click",(()=>{dropZoneFiles=[],previewContainer.innerHTML=""})),fileWrapper.appendChild(deleteButton),previewContainer.appendChild(fileWrapper)}},handleFormSubmit=async(modal,currentHomework)=>{let inputField=modal.getRoot().find("#inputField")[0],linkField=modal.getRoot().find("#link")[0],startPageInput=modal.getRoot().find("#startPage")[0],endPageInput=modal.getRoot().find("#endPage")[0],startTimeInput=modal.getRoot().find("#startTime")[0],endTimeInput=modal.getRoot().find("#endTime")[0];""===inputField.value.trim()?inputField.setCustomValidity("Input field must not be empty"):inputField.setCustomValidity(""),inputField.reportValidity(),inputField.checkValidity()&&function(startPageInput,endPageInput){const startPage=parseInt(startPageInput.value,10),endPage=parseInt(endPageInput.value,10);if(""!==endPageInput.value&&""!==startPageInput.value){if(endPage{for(let file of dropZoneFiles)try{const formData=new FormData;formData.append("file",file);const response=await fetch("/mod/homework/upload_file.php",{method:"POST",body:formData}),result=await response.json();response.ok&&"success"===result.status?(console.log("File uploaded successfully:",file.name),console.log(result),uploadedFileIds.push(result.fileid)):console.error("Failed to upload file:",file.name)}catch(error){console.error("Error uploading file:",file.name,error)}dropZoneFiles=[]})(),_ajax.default.call([{methodname:"mod_homework_save_homework_material",args:{inputfield:inputField.value,link:""!==linkField.value.trim()?linkField.value.trim():null,startpage:""!==startPageInput.value.trim()?startPageInput.value.trim():null,endpage:""!==endPageInput.value.trim()?endPageInput.value.trim():null,starttime:""!==startTimeInput.value.trim()?startTimeInput.value.trim():null,endtime:""!==endTimeInput.value.trim()?endTimeInput.value.trim():null,homeworkid:currentHomework,fileid:uploadedFileIds.length?uploadedFileIds[0]:null},done:function(response){console.log("Data saved successfully:",response),modal.destroy()},fail:function(error){console.error("Failed to save data:",error)}}]))}})); + //# sourceMappingURL=homeworkchooser.min.js.map \ No newline at end of file diff --git a/server/moodle/mod/homework/amd/build/homeworkchooser.min.js.map b/server/moodle/mod/homework/amd/build/homeworkchooser.min.js.map index d1ffed8ed..ea7a19512 100644 --- a/server/moodle/mod/homework/amd/build/homeworkchooser.min.js.map +++ b/server/moodle/mod/homework/amd/build/homeworkchooser.min.js.map @@ -1 +1 @@ -{"version":3,"file":"homeworkchooser.min.js","sources":["../src/homeworkchooser.js"],"sourcesContent":["import $ from 'jquery';\r\nimport Ajax from 'core/ajax';\r\nimport MyModal from 'mod_homework/modal_homework';\r\nimport ModalEvents from 'core/modal_events';\r\n\r\n/**\r\n * Homework/amd/src/modal_homework.js\r\n *\r\n * @package\r\n * @copyright 2024, cs-24-sw-5-01 \r\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\r\n *\r\n */\r\n\r\n/**\r\n * Initializes the Homework Chooser Modal.\r\n * @param {int} cmid\r\n * @param {string} title\r\n * @param {int} currentHomework\r\n * @returns {Promise}\r\n */\r\nexport const init = async(cmid, title, currentHomework) => {\r\n $('#open-homework-chooser').on('click', () => {\r\n Ajax.call([{\r\n methodname: 'mod_homework_get_homework_chooser',\r\n args: {cmid: cmid},\r\n done: async function(response) {\r\n const modal = await MyModal.create({\r\n title: title,\r\n body: `${response.html}`,\r\n large: true,\r\n removeOnClose: true\r\n });\r\n\r\n\r\n // Initialize elements once the modal content is rendered.\r\n modal.getRoot().on(ModalEvents.shown, () => {\r\n // Initialize the elements after modal is displayed.\r\n const startPageInput = modal.getRoot().find('#startPage')[0];\r\n const endPageInput = modal.getRoot().find('#endPage')[0];\r\n const radioButtons = modal.getRoot().find('input[name=\"option\"]');\r\n const testTextarea = modal.getRoot().find('#page-range-input')[0];\r\n const testLink = modal.getRoot().find('#linkDiv')[0];\r\n\r\n // Attach event listeners for page input validation.\r\n startPageInput.addEventListener('input', validatePageRange);\r\n endPageInput.addEventListener('input', validatePageRange);\r\n\r\n // Attach event listeners for radio buttons.\r\n radioButtons.each((_, radio) => {\r\n radio.addEventListener('change', toggleInputs);\r\n });\r\n\r\n // Function to validate page range.\r\n /**\r\n *\r\n */\r\n function validatePageRange() {\r\n const startPage = parseInt(startPageInput.value, 10);\r\n const endPage = parseInt(endPageInput.value, 10);\r\n\r\n if (endPageInput.value !== \"\" && startPageInput.value !== \"\") {\r\n if (endPage < startPage) {\r\n endPageInput.setCustomValidity(\"End Page must be greater than or equal to Start Page\");\r\n } else {\r\n endPageInput.setCustomValidity(\"\"); // Clear error message if valid\r\n }\r\n } else {\r\n endPageInput.setCustomValidity(\"\"); // Clear error if either field is empty\r\n }\r\n }\r\n\r\n // Function to toggle between text and link inputs.\r\n /**\r\n *\r\n */\r\n function toggleInputs() {\r\n if (document.getElementById(\"option1\").checked) {\r\n testTextarea.style.display = \"block\";\r\n testLink.style.display = \"none\";\r\n } else if (document.getElementById(\"option2\").checked) {\r\n testTextarea.style.display = \"none\";\r\n testLink.style.display = \"block\";\r\n }\r\n }\r\n });\r\n\r\n // Show the modal.\r\n await modal.show();\r\n\r\n // Attach event listeners for buttons\r\n modal.getRoot().on('click', '[data-action=\"submit\"]', (e) => {\r\n e.preventDefault();\r\n handleFormSubmit(modal, currentHomework);\r\n });\r\n\r\n modal.getRoot().on('click', '[data-action=\"cancel\"]', (e) => {\r\n e.preventDefault();\r\n modal.destroy();\r\n });\r\n },\r\n fail: (error) => {\r\n throw new Error(`Failed to load homework chooser content: ${error}`);\r\n }\r\n }]);\r\n });\r\n};\r\n\r\n/**\r\n * Handles form submission inside the modal.\r\n *\r\n * @param {Modal} modal - The instance of the modal containing the form.\r\n * @param currentHomework - The id of the homework which is being edited.\r\n */\r\nconst handleFormSubmit = (modal, currentHomework) => {\r\n let inputField = modal.getRoot().find('#inputField')[0];\r\n\r\n if (inputField.value === \"\") {\r\n inputField.setCustomValidity(\"Please fill in the input field.\");\r\n inputField.reportValidity(); // Shows the custom message\r\n event.preventDefault(); // Prevents form submission\r\n } else {\r\n inputField.setCustomValidity(\"\"); // Clear the custom message\r\n }\r\n\r\n if (modal.getRoot().find('#option1').is(':checked')) {\r\n let startPage = modal.getRoot().find('#startPage').val();\r\n let endPage = modal.getRoot().find('#endPage').val();\r\n\r\n // AJAX call to send data to the server.\r\n Ajax.call([{\r\n methodname: 'mod_homework_save_homework_literature',\r\n args: {\r\n inputfield: inputField.value,\r\n startpage: startPage,\r\n endpage: endPage,\r\n homework: currentHomework,\r\n },\r\n done: function() {\r\n // Close the modal after successful submission.\r\n modal.hide();\r\n },\r\n fail: function(error) {\r\n throw new Error(`Failed to save data: ${error}`);\r\n }\r\n }]);\r\n } else if (modal.getRoot().find('#option2').is(':checked')) {\r\n let link = modal.getRoot().find('#link').val();\r\n\r\n // AJAX call to send data to the server.\r\n Ajax.call([{\r\n methodname: 'mod_homework_save_homework_link',\r\n args: {\r\n inputfield: inputField.value,\r\n link: link,\r\n homework: currentHomework,\r\n },\r\n done: function() {\r\n // Close the modal after successful submission.\r\n modal.hide();\r\n },\r\n fail: function(error) {\r\n throw new Error(`Failed to save data: ${error}`);\r\n }\r\n }]);\r\n }\r\n};\r\n"],"names":["_interopRequireDefault","e","__esModule","default","_regeneratorRuntime","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","this","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","_asyncToGenerator","arguments","apply","_next","_throw","_jquery","_ajax","_modal_homework","_modal_events","_exports","init","_ref","_callee2","cmid","title","currentHomework","_context2","$","on","_done","Ajax","methodname","args","_callee","response","modal","_context","MyModal","body","concat","html","large","removeOnClose","getRoot","ModalEvents","shown","startPageInput","find","endPageInput","radioButtons","testTextarea","testLink","validatePageRange","startPage","parseInt","endPage","setCustomValidity","toggleInputs","document","getElementById","checked","style","display","addEventListener","each","_","radio","show","preventDefault","handleFormSubmit","destroy","_x4","fail","error","_x","_x2","_x3","inputField","reportValidity","event","is","val","inputfield","startpage","endpage","homework","hide","link"],"mappings":"ibAG4C,SAAAA,uBAAAC,GAAA,OAAAA,GAAAA,EAAAC,WAAAD,EAAA,CAAAE,QAAAF,EAAA,CAAA,SAAAG,sBAAAA,oBAAAA,kBAAAH,CAAA,EAAA,IAAAI,EAAAJ,EAAA,CAAA,EAAAK,EAAAC,OAAAC,UAAAC,EAAAH,EAAAI,eAAAC,EAAAJ,OAAAK,gBAAAP,SAAAA,EAAAJ,EAAAK,GAAAD,EAAAJ,GAAAK,EAAAO,KAAAC,EAAAA,EAAAC,mBAAAA,OAAAA,OAAA,CAAA,EAAAC,EAAAF,EAAAG,UAAAC,aAAAA,EAAAJ,EAAAK,iCAAAC,EAAAN,EAAAO,aAAA,gBAAA,SAAAC,OAAAjB,EAAAJ,EAAAK,GAAA,OAAAC,OAAAK,eAAAP,EAAAJ,GAAAY,MAAAP,EAAAiB,YAAA,EAAAC,cAAAC,EAAAA,UAAApB,IAAAA,EAAAJ,OAAAqB,OAAA,CAAA,EAAA,GAAA,CAAA,MAAAjB,GAAAiB,OAAA,SAAAjB,EAAAJ,EAAAK,GAAA,OAAAD,EAAAJ,GAAAK,CAAAoB,CAAAA,CAAAA,SAAAA,KAAArB,EAAAJ,EAAAK,EAAAG,OAAAK,EAAAb,GAAAA,EAAAO,qBAAAmB,UAAA1B,EAAA0B,UAAAX,EAAAT,OAAAqB,OAAAd,EAAAN,WAAAU,EAAAW,IAAAA,QAAApB,GAAA,IAAA,OAAAE,EAAAK,EAAA,UAAA,CAAAH,MAAAiB,iBAAAzB,EAAAC,EAAAY,KA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AAUI,KAAK,YAAYiC,GAAG,YAAa,CACjD,IAAI3B,UAAYlB,MAAMQ,UAAUI,KAAK,cAAckC,MAC/C1B,QAAUpB,MAAMQ,UAAUI,KAAK,YAAYkC,MAG/CnD,MAAI,QAAC7F,KAAK,CAAC,CACP8F,WAAY,wCACZC,KAAM,CACFkD,WAAYL,WAAWjK,MACvBuK,UAAW9B,UACX+B,QAAS7B,QACT8B,SAAU5D,iBAEd9D,KAAM,WAEFwE,MAAMmD,MACT,EACDd,KAAM,SAASC,OACX,MAAM,IAAI/G,MAAK,wBAAA6E,OAAyBkC,OAC5C,IAER,MAAO,GAAItC,MAAMQ,UAAUI,KAAK,YAAYiC,GAAG,YAAa,CACxD,IAAIO,KAAOpD,MAAMQ,UAAUI,KAAK,SAASkC,MAGzCnD,MAAI,QAAC7F,KAAK,CAAC,CACP8F,WAAY,kCACZC,KAAM,CACFkD,WAAYL,WAAWjK,MACvB2K,KAAMA,KACNF,SAAU5D,iBAEd9D,KAAM,WAEFwE,MAAMmD,MACT,EACDd,KAAM,SAASC,OACX,MAAM,IAAI/G,MAAK,wBAAA6E,OAAyBkC,OAC5C,IAER,EACF"} \ No newline at end of file +{"version":3,"file":"homeworkchooser.min.js","sources":["../src/homeworkchooser.js"],"sourcesContent":["// homeworkchooseredit.js (Updated Version)\n\nimport $ from 'jquery';\nimport Ajax from 'core/ajax';\nimport MyModal from 'mod_homework/modal_homework';\nimport ModalEvents from 'core/modal_events';\nimport Dropzone from 'core/dropzone';\n\nlet dropZoneFiles = []; // Store files to upload later\nlet uploadedFileIds = []; // Store file IDs after successful upload\n\n/**\n * Initializes the Homework Edit Modal.\n *\n * @param {int} cmid\n * @param {string} title\n * @param {int} currentHomework\n * @returns {Promise}\n */\nexport const init = async(cmid, title, currentHomework) => {\n $('#open-homework-chooser').on('click', () => {\n Ajax.call([{\n methodname: 'mod_homework_get_homework_chooser',\n args: {cmid: cmid},\n done: async function (response) {\n const modal = await MyModal.create({\n title: title,\n body: `${response.html}`,\n // footer: 'An example footer content',\n large: true,\n removeOnClose: true\n });\n\n // Show the modal\n modal.show();\n\n // Initialize elements once the modal content is rendered\n modal.getRoot().on(ModalEvents.shown, () => {\n // Initialize the elements after modal is displayed\n const dropzoneContainer = modal.getRoot().find('#dropzone-container')[0];\n\n initializeDropzone(dropzoneContainer);\n });\n\n // Attach an event listener to handle the modal hidden event\n modal.getRoot().on(ModalEvents.hidden, () => {\n console.log('Modal closed!');\n });\n\n // Attach event listeners for buttons\n modal.getRoot().on('click', '[data-action=\"submit\"]', (e) => {\n e.preventDefault();\n\n handleFormSubmit(modal, currentHomework);\n });\n\n modal.getRoot().on('click', '[data-action=\"cancel\"]', (e) => {\n e.preventDefault();\n modal.destroy();\n });\n },\n fail: (error) => {\n console.error(\"Failed to load homework chooser content:\", error);\n }\n }]);\n });\n};\n\nconst initializeDropzone = (container) => {\n const dropZone = new Dropzone(container, \"*/*\", (files) => {\n dropZoneFiles.push(files[0]); // Store file for later upload\n\n displayUploadedFile(files[0]);\n });\n\n dropZone.setLabel(\"Drop file here (Optional)\");\n dropZone.init();\n};\n\n// Function to display the uploaded file with a delete button\nconst displayUploadedFile = (file) => {\n const previewContainer = document.getElementById(\"file-content\"); // Container for preview\n\n // Clear previous preview\n previewContainer.innerHTML = \"\";\n\n if (file.name || file.filename) {\n // Create wrapper div for the preview and delete button\n const fileWrapper = document.createElement(\"div\");\n fileWrapper.style.position = \"relative\";\n fileWrapper.style.display = \"ruby\";\n\n // Add the file preview\n const paragraph = document.createElement(\"p\");\n if (file.name) {\n paragraph.textContent = `${file.name}`;\n } else if (file.filename) {\n paragraph.textContent = `${file.filename}`;\n }\n fileWrapper.appendChild(paragraph);\n\n // Create the delete \"X\" button\n const deleteButton = document.createElement(\"span\");\n deleteButton.textContent = \"X\";\n deleteButton.style.cursor = \"pointer\";\n deleteButton.style.background = \"red\";\n deleteButton.style.color = \"white\";\n deleteButton.style.padding = \"2px 5px\";\n deleteButton.style.fontWeight = \"bold\";\n deleteButton.style.marginLeft = \"5px\";\n\n // Delete the file preview and reset dropZoneFiles when \"X\" is clicked\n deleteButton.addEventListener(\"click\", () => {\n dropZoneFiles = []; // Clear the files array\n previewContainer.innerHTML = \"\"; // Remove the preview\n });\n\n fileWrapper.appendChild(deleteButton);\n\n previewContainer.appendChild(fileWrapper);\n }\n};\n\nconst uploadDropzoneFile = async () => {\n for (let file of dropZoneFiles) {\n try {\n const formData = new FormData();\n formData.append(\"file\", file);\n\n const response = await fetch(\"/mod/homework/upload_file.php\", {\n method: \"POST\",\n body: formData\n });\n\n const result = await response.json();\n\n if (response.ok && result.status === 'success') {\n console.log(\"File uploaded successfully:\", file.name);\n console.log(result);\n uploadedFileIds.push(result.fileid); // Store the file ID\n } else {\n console.error(\"Failed to upload file:\", file.name);\n }\n } catch (error) {\n console.error(\"Error uploading file:\", file.name, error);\n }\n }\n dropZoneFiles = []; // Clear stored file after upload\n};\n\n/**\n * Handles form submission inside the modal.\n * @param {Modal} modal - The instance of the modal containing the form.\n * @param currentHomework - The id of the homework which is being edited.\n */\nconst handleFormSubmit = async (modal, currentHomework) => {\n let inputField = modal.getRoot().find('#inputField')[0];\n let linkField = modal.getRoot().find('#link')[0];\n let startPageInput = modal.getRoot().find('#startPage')[0];\n let endPageInput = modal.getRoot().find('#endPage')[0];\n let startTimeInput = modal.getRoot().find('#startTime')[0];\n let endTimeInput = modal.getRoot().find('#endTime')[0];\n\n // Set up a custom validity message if the field is empty\n if (inputField.value.trim() === \"\") {\n inputField.setCustomValidity(\"Input field must not be empty\");\n } else {\n inputField.setCustomValidity(\"\"); // Clear the custom message when input is valid\n }\n\n // Manually check the validity of the input field\n inputField.reportValidity();\n\n // If the field is invalid, stop the function execution\n if (!inputField.checkValidity()) {\n return; // Exit if input field is invalid\n }\n\n if (!validatePageRange(startPageInput, endPageInput)) {\n return;\n }\n\n if (!validateTimeRange(startTimeInput, endTimeInput)) {\n return;\n }\n\n await uploadDropzoneFile();\n\n Ajax.call([{\n methodname: 'mod_homework_save_homework_material',\n args: {\n inputfield: inputField.value,\n link: linkField.value.trim() !== \"\" ? linkField.value.trim() : null,\n startpage: startPageInput.value.trim() !== \"\" ? startPageInput.value.trim() : null,\n endpage: endPageInput.value.trim() !== \"\" ? endPageInput.value.trim() : null,\n starttime: startTimeInput.value.trim() !== \"\" ? startTimeInput.value.trim() : null,\n endtime: endTimeInput.value.trim() !== \"\" ? endTimeInput.value.trim() : null,\n homeworkid: currentHomework,\n fileid: uploadedFileIds.length ? uploadedFileIds[0] : null\n },\n done: function(response) {\n console.log(\"Data saved successfully:\", response);\n modal.destroy();\n },\n fail: function(error) {\n console.error(\"Failed to save data:\", error);\n }\n }]);\n\n function validatePageRange(startPageInput, endPageInput) {\n const startPage = parseInt(startPageInput.value, 10);\n const endPage = parseInt(endPageInput.value, 10);\n\n if (endPageInput.value !== \"\" && startPageInput.value !== \"\") {\n if (endPage < startPage) {\n endPageInput.setCustomValidity(\"End Page must be greater than or equal to Start Page\");\n endPageInput.reportValidity();\n return false;\n } else {\n endPageInput.setCustomValidity(\"\"); // Clear error message if valid\n }\n } else {\n endPageInput.setCustomValidity(\"\"); // Clear error if either field is empty\n }\n\n endPageInput.reportValidity();\n return endPageInput.checkValidity(); // Return true if valid\n }\n\n function validateTimeRange(startTimeInput, endTimeInput) {\n const startTime = parseInt(startTimeInput.value, 10);\n const endTime = parseInt(endTimeInput.value, 10);\n\n if (endTimeInput.value !== \"\" && startTimeInput.value !== \"\") {\n if (endTime < startTime) {\n endTimeInput.setCustomValidity(\"End Time must be greater than or equal to Start Time\");\n endTimeInput.reportValidity();\n return false;\n } else {\n endTimeInput.setCustomValidity(\"\"); // Clear error message if valid\n }\n } else {\n endTimeInput.setCustomValidity(\"\"); // Clear error if either field is empty\n }\n\n endTimeInput.reportValidity();\n return endTimeInput.checkValidity(); // Return true if valid\n }\n};"],"names":["_interopRequireDefault","e","__esModule","default","_jquery","_ajax","_modal_homework","_modal_events","_dropzone","dropZoneFiles","uploadedFileIds","_exports","init","async","cmid","title","currentHomework","$","on","Ajax","call","methodname","args","done","response","modal","MyModal","create","body","html","large","removeOnClose","show","getRoot","ModalEvents","shown","dropzoneContainer","find","initializeDropzone","hidden","console","log","preventDefault","handleFormSubmit","destroy","fail","error","container","dropZone","Dropzone","files","push","displayUploadedFile","setLabel","file","previewContainer","document","getElementById","innerHTML","name","filename","fileWrapper","createElement","style","position","display","paragraph","textContent","appendChild","deleteButton","cursor","background","color","padding","fontWeight","marginLeft","addEventListener","inputField","linkField","startPageInput","endPageInput","startTimeInput","endTimeInput","value","trim","setCustomValidity","reportValidity","checkValidity","startPage","parseInt","endPage","validatePageRange","startTime","endTime","validateTimeRange","formData","FormData","append","fetch","method","result","json","ok","status","fileid","uploadDropzoneFile","inputfield","link","startpage","endpage","starttime","endtime","homeworkid","length"],"mappings":"mNAMqC,SAAAA,uBAAAC,GAAAA,OAAAA,GAAAA,EAAAC,WAAAD,EAAAE,CAAAA,QAAAF,EAAA,8EAJrCG,QAAAJ,uBAAAI,SACAC,MAAAL,uBAAAK,OACAC,gBAAAN,uBAAAM,iBACAC,cAAAP,uBAAAO,eACAC,UAAAR,uBAAAQ,WAEA,IAAIC,cAAgB,GAChBC,gBAAkB,GAyDpBC,SAAAC,KA/CkBC,MAAMC,KAAMC,MAAOC,oBACnC,EAAAC,QAAAA,SAAE,0BAA0BC,GAAG,SAAS,KACpCC,MAAIhB,QAACiB,KAAK,CAAC,CACPC,WAAY,oCACZC,KAAM,CAACR,KAAMA,MACbS,KAAMV,eAAgBW,UAClB,MAAMC,YAAcC,gBAAOvB,QAACwB,OAAO,CAC/BZ,MAAOA,MACPa,KAAM,GAAGJ,SAASK,OAElBC,OAAO,EACPC,eAAe,IAInBN,MAAMO,OAGNP,MAAMQ,UAAUf,GAAGgB,cAAW/B,QAACgC,OAAO,KAElC,MAAMC,kBAAoBX,MAAMQ,UAAUI,KAAK,uBAAuB,GAEtEC,mBAAmBF,kBAAkB,IAIzCX,MAAMQ,UAAUf,GAAG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MAAM,gCAAiC,CAC1DC,OAAQ,OACRvE,KAAMmE,WAGJK,aAAe5E,SAAS6E,OAE1B7E,SAAS8E,IAAwB,YAAlBF,OAAOG,QACtB/D,QAAQC,IAAI,8BAA+Ba,KAAKK,MAChDnB,QAAQC,IAAI2D,QACZ1F,gBAAgByC,KAAKiD,OAAOI,SAE5BhE,QAAQM,MAAM,yBAA0BQ,KAAKK,KAEpD,CAAC,MAAOb,OACLN,QAAQM,MAAM,wBAAyBQ,KAAKK,KAAMb,MACtD,CAEJrC,cAAgB,EAAE,EAuCZgG,GAENtF,MAAIhB,QAACiB,KAAK,CAAC,CACPC,WAAY,sCACZC,KAAM,CACFoF,WAAY7B,WAAWM,MACvBwB,KAAiC,KAA3B7B,UAAUK,MAAMC,OAAgBN,UAAUK,MAAMC,OAAS,KAC/DwB,UAA2C,KAAhC7B,eAAeI,MAAMC,OAAgBL,eAAeI,MAAMC,OAAS,KAC9EyB,QAAuC,KAA9B7B,aAAaG,MAAMC,OAAgBJ,aAAaG,MAAMC,OAAS,KACxE0B,UAA2C,KAAhC7B,eAAeE,MAAMC,OAAgBH,eAAeE,MAAMC,OAAS,KAC9E2B,QAAuC,KAA9B7B,aAAaC,MAAMC,OAAgBF,aAAaC,MAAMC,OAAS,KACxE4B,WAAYhG,gBACZwF,OAAQ9F,gBAAgBuG,OAASvG,gBAAgB,GAAK,MAE1Da,KAAM,SAASC,UACXgB,QAAQC,IAAI,2BAA4BjB,UACxCC,MAAMmB,SACT,EACDC,KAAM,SAASC,OACXN,QAAQM,MAAM,uBAAwBA,MAC1C,KAyCJ,CACF"} \ No newline at end of file diff --git a/server/moodle/mod/homework/amd/build/homeworkchooserdelete.min.js b/server/moodle/mod/homework/amd/build/homeworkchooserdelete.min.js new file mode 100644 index 000000000..38aab6202 --- /dev/null +++ b/server/moodle/mod/homework/amd/build/homeworkchooserdelete.min.js @@ -0,0 +1,3 @@ +define("mod_homework/homeworkchooserdelete",["exports","jquery","core/ajax","../../../../lib/amd/src/key_codes"],(function(_exports,_jquery,_ajax,_key_codes){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_jquery=_interopRequireDefault(_jquery),_ajax=_interopRequireDefault(_ajax),_key_codes=_interopRequireDefault(_key_codes);_exports.init=async(cmid,homeworkids)=>{console.log(homeworkids),Object.values(homeworkids).forEach((homeworkid=>{(0,_jquery.default)("#delete-homework-chooser-"+homeworkid.id).on("click",(()=>{confirm("Are you sure you want to delete this homework record? This action cannot be undone.")&&_ajax.default.call([{methodname:"mod_homework_delete_homework_material",args:{id:homeworkid.id,fileid:homeworkid.file_id?homeworkid.file_id:null},done:async function(response){console.log("Homework record deleted successfully."),location.reload()},fail:error=>{console.error("Failed to delete homework record:",error)}}])}))}))}})); + +//# sourceMappingURL=homeworkchooserdelete.min.js.map \ No newline at end of file diff --git a/server/moodle/mod/homework/amd/build/homeworkchooserdelete.min.js.map b/server/moodle/mod/homework/amd/build/homeworkchooserdelete.min.js.map new file mode 100644 index 000000000..c5269fffd --- /dev/null +++ b/server/moodle/mod/homework/amd/build/homeworkchooserdelete.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"homeworkchooserdelete.min.js","sources":["../src/homeworkchooserdelete.js"],"sourcesContent":["// homeworkchooserdelete.js (Updated Version)\n\nimport $ from 'jquery';\nimport Ajax from 'core/ajax';\nimport home from \"../../../../lib/amd/src/key_codes\";\n\n/**\n * Initializes the Homework Delete Modal.\n *\n * @param {int} cmid\n * @param {array} homeworkids\n * @returns {Promise}\n */\nexport const init = async (cmid, homeworkids) => {\n console.log(homeworkids);\n Object.values(homeworkids).forEach(homeworkid => {\n $('#delete-homework-chooser-' + homeworkid.id).on('click', () => {\n // Show a confirmation alert\n const confirmDeletion = confirm(\"Are you sure you want to delete this homework record? This action cannot be undone.\");\n\n // Proceed only if the user confirms\n if (confirmDeletion) {\n Ajax.call([{\n methodname: 'mod_homework_delete_homework_material',\n args: {\n id: homeworkid.id,\n fileid: (homeworkid.file_id) ? homeworkid.file_id : null,\n },\n done: async function (response) {\n // Handle successful deletion here, if needed\n console.log(\"Homework record deleted successfully.\");\n location.reload();\n },\n fail: (error) => {\n console.error(\"Failed to delete homework record:\", error);\n }\n }]);\n }\n });\n });\n};\n"],"names":["_interopRequireDefault","e","__esModule","default","_jquery","_ajax","_key_codes","_exports","init","async","cmid","homeworkids","console","log","Object","values","forEach","homeworkid","$","id","on","confirm","Ajax","call","methodname","args","fileid","file_id","done","response","location","reload","fail","error"],"mappings":"8JAIqD,SAAAA,uBAAAC,GAAAA,OAAAA,GAAAA,EAAAC,WAAAD,EAAAE,CAAAA,QAAAF,EAAA,8EAFrDG,QAAAJ,uBAAAI,SACAC,MAAAL,uBAAAK,OACAC,WAAAN,uBAAAM,YAoCEC,SAAAC,KA3BkBC,MAAOC,KAAMC,eAC7BC,QAAQC,IAAIF,aACZG,OAAOC,OAAOJ,aAAaK,SAAQC,cAC/B,EAAAC,QAACf,SAAC,4BAA8Bc,WAAWE,IAAIC,GAAG,SAAS,KAE/BC,QAAQ,wFAI5BC,MAAInB,QAACoB,KAAK,CAAC,CACPC,WAAY,wCACZC,KAAM,CACFN,GAAIF,WAAWE,GACfO,OAAST,WAAWU,QAAWV,WAAWU,QAAU,MAExDC,KAAMnB,eAAgBoB,UAElBjB,QAAQC,IAAI,yCACZiB,SAASC,QACZ,EACDC,KAAOC,QACHrB,QAAQqB,MAAM,oCAAqCA,MAAM,IAGrE,GACF,GACJ,CACJ"} \ No newline at end of file diff --git a/server/moodle/mod/homework/amd/build/homeworkchooseredit.min.js b/server/moodle/mod/homework/amd/build/homeworkchooseredit.min.js new file mode 100644 index 000000000..1abe15bc4 --- /dev/null +++ b/server/moodle/mod/homework/amd/build/homeworkchooseredit.min.js @@ -0,0 +1,3 @@ +define("mod_homework/homeworkchooseredit",["exports","jquery","core/ajax","mod_homework/modal_homework","core/modal_events","core/dropzone"],(function(_exports,_jquery,_ajax,_modal_homework,_modal_events,_dropzone){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_jquery=_interopRequireDefault(_jquery),_ajax=_interopRequireDefault(_ajax),_modal_homework=_interopRequireDefault(_modal_homework),_modal_events=_interopRequireDefault(_modal_events),_dropzone=_interopRequireDefault(_dropzone);let dropZoneFiles=[],uploadedFileIds=[];_exports.init=async(cmid,title,currentHomework,homeworkids)=>{Object.values(homeworkids).forEach((homeworkid=>{(0,_jquery.default)("#edit-homework-chooser-"+homeworkid.id).on("click",(()=>{_ajax.default.call([{methodname:"mod_homework_get_homework_chooser",args:{cmid:cmid},done:async function(response){const modal=await _modal_homework.default.create({title:title,body:`${response.html}`,large:!0,removeOnClose:!0});modal.show(),modal.getRoot().on(_modal_events.default.shown,(()=>{const dropzoneContainer=modal.getRoot().find("#dropzone-container")[0];modal.getRoot().find("#inputField")[0].value=homeworkid.description,modal.getRoot().find("#link")[0].value=homeworkid.link,modal.getRoot().find("#startPage")[0].value=homeworkid.startpage,modal.getRoot().find("#endPage")[0].value=homeworkid.endpage,modal.getRoot().find("#startTime")[0].value=homeworkid.starttime,modal.getRoot().find("#endTime")[0].value=homeworkid.endtime,homeworkid.file_id&&uploadedFileIds.push(homeworkid.file_id),initializeDropzone(dropzoneContainer),displayUploadedFile(homeworkid)})),modal.getRoot().on(_modal_events.default.hidden,(()=>{console.log("Modal closed!")})),modal.getRoot().on("click",'[data-action="submit"]',(e=>{e.preventDefault(),handleFormSubmit(modal,currentHomework,homeworkid.id)})),modal.getRoot().on("click",'[data-action="cancel"]',(e=>{e.preventDefault(),modal.destroy(),location.reload()}))},fail:error=>{console.error("Failed to load homework chooser content:",error)}}])}))}))};const initializeDropzone=container=>{const dropZone=new _dropzone.default(container,"*/*",(files=>{dropZoneFiles.push(files[0]),displayUploadedFile(files[0])}));dropZone.setLabel("Drop file here (Optional)"),dropZone.init()},displayUploadedFile=file=>{const previewContainer=document.getElementById("file-content");if(previewContainer.innerHTML="",file.name||file.filename){const fileWrapper=document.createElement("div");fileWrapper.style.position="relative",fileWrapper.style.display="ruby";const paragraph=document.createElement("p");file.name?paragraph.textContent=`${file.name}`:file.filename&&(paragraph.textContent=`${file.filename}`),fileWrapper.appendChild(paragraph);const deleteButton=document.createElement("span");deleteButton.textContent="X",deleteButton.style.cursor="pointer",deleteButton.style.background="red",deleteButton.style.color="white",deleteButton.style.padding="2px 5px",deleteButton.style.fontWeight="bold",deleteButton.style.marginLeft="5px",deleteButton.addEventListener("click",(()=>{confirm("Are you sure you want to delete this file?")&&_ajax.default.call([{methodname:"mod_homework_delete_file",args:{id:file.id,file_id:file.file_id},done:function(response){console.log("File deleted successfully"),dropZoneFiles=[],previewContainer.innerHTML="",uploadedFileIds=[]},fail:function(error){console.error("Failed to delete file:",error)}}])})),fileWrapper.appendChild(deleteButton),previewContainer.appendChild(fileWrapper)}},handleFormSubmit=async(modal,currentHomework,homeworkid)=>{let inputField=modal.getRoot().find("#inputField")[0],linkField=modal.getRoot().find("#link")[0],startPageInput=modal.getRoot().find("#startPage")[0],endPageInput=modal.getRoot().find("#endPage")[0],startTimeInput=modal.getRoot().find("#startTime")[0],endTimeInput=modal.getRoot().find("#endTime")[0];""===inputField.value.trim()?inputField.setCustomValidity("Input field must not be empty"):inputField.setCustomValidity(""),inputField.reportValidity(),inputField.checkValidity()&&function(startPageInput,endPageInput){const startPage=parseInt(startPageInput.value,10),endPage=parseInt(endPageInput.value,10);if(""!==endPageInput.value&&""!==startPageInput.value){if(endPage{for(let file of dropZoneFiles)try{const formData=new FormData;formData.append("file",file);const response=await fetch("/mod/homework/upload_file.php",{method:"POST",body:formData}),result=await response.json();response.ok&&"success"===result.status?(console.log("File uploaded successfully:",file.name),console.log(result),uploadedFileIds.push(result.fileid)):console.error("Failed to upload file:",file.name)}catch(error){console.error("Error uploading file:",file.name,error)}dropZoneFiles=[]})(),_ajax.default.call([{methodname:"mod_homework_edit_homework_material",args:{id:homeworkid,inputfield:inputField.value,link:""!==linkField.value.trim()?linkField.value.trim():null,startpage:""!==startPageInput.value.trim()?startPageInput.value.trim():null,endpage:""!==endPageInput.value.trim()?endPageInput.value.trim():null,starttime:""!==startTimeInput.value.trim()?startTimeInput.value.trim():null,endtime:""!==endTimeInput.value.trim()?endTimeInput.value.trim():null,homeworkid:currentHomework,fileid:uploadedFileIds.length?uploadedFileIds[0]:null},done:function(response){console.log("Data saved successfully:",response),modal.destroy(),location.reload()},fail:function(error){console.error("Failed to save data:",error)}}]))}})); + +//# sourceMappingURL=homeworkchooseredit.min.js.map \ No newline at end of file diff --git a/server/moodle/mod/homework/amd/build/homeworkchooseredit.min.js.map b/server/moodle/mod/homework/amd/build/homeworkchooseredit.min.js.map new file mode 100644 index 000000000..431c90944 --- /dev/null +++ b/server/moodle/mod/homework/amd/build/homeworkchooseredit.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"homeworkchooseredit.min.js","sources":["../src/homeworkchooseredit.js"],"sourcesContent":["// homeworkchooseredit.js (Updated Version)\n\nimport $ from 'jquery';\nimport Ajax from 'core/ajax';\nimport MyModal from 'mod_homework/modal_homework';\nimport ModalEvents from 'core/modal_events';\nimport Dropzone from 'core/dropzone';\n\nlet dropZoneFiles = []; // Store files to upload later\nlet uploadedFileIds = []; // Store file IDs after successful upload\n\n/**\n * Initializes the Homework Edit Modal.\n *\n * @param {int} cmid\n * @param {string} title\n * @param {int} currentHomework\n * @param {array} homeworkids\n * @returns {Promise}\n */\nexport const init = async(cmid, title, currentHomework, homeworkids) => {\n Object.values(homeworkids).forEach(homeworkid => {\n $('#edit-homework-chooser-' + homeworkid.id).on('click', () => {\n Ajax.call([{\n methodname: 'mod_homework_get_homework_chooser',\n args: {cmid: cmid},\n done: async function (response) {\n const modal = await MyModal.create({\n title: title,\n body: `${response.html}`,\n // footer: 'An example footer content',\n large: true,\n removeOnClose: true\n });\n\n // Show the modal\n modal.show();\n\n // Initialize elements once the modal content is rendered\n modal.getRoot().on(ModalEvents.shown, () => {\n // Initialize the elements after modal is displayed\n const dropzoneContainer = modal.getRoot().find('#dropzone-container')[0];\n\n modal.getRoot().find('#inputField')[0].value = homeworkid.description;\n modal.getRoot().find('#link')[0].value = homeworkid.link;\n modal.getRoot().find('#startPage')[0].value = homeworkid.startpage;\n modal.getRoot().find('#endPage')[0].value = homeworkid.endpage;\n modal.getRoot().find('#startTime')[0].value = homeworkid.starttime;\n modal.getRoot().find('#endTime')[0].value = homeworkid.endtime;\n\n if (homeworkid.file_id) {\n uploadedFileIds.push(homeworkid.file_id);\n }\n\n initializeDropzone(dropzoneContainer);\n displayUploadedFile(homeworkid);\n });\n\n // Attach an event listener to handle the modal hidden event.\n modal.getRoot().on(ModalEvents.hidden, () => {\n console.log('Modal closed!');\n });\n\n // Attach event listeners for buttons\n modal.getRoot().on('click', '[data-action=\"submit\"]', (e) => {\n e.preventDefault();\n\n handleFormSubmit(modal, currentHomework, homeworkid[\"id\"]);\n });\n\n modal.getRoot().on('click', '[data-action=\"cancel\"]', (e) => {\n e.preventDefault();\n modal.destroy();\n\n location.reload();\n });\n },\n fail: (error) => {\n console.error(\"Failed to load homework chooser content:\", error);\n }\n }]);\n });\n })\n};\n\nconst initializeDropzone = (container) => {\n const dropZone = new Dropzone(container, \"*/*\", (files) => {\n dropZoneFiles.push(files[0]); // Store file for later upload\n\n displayUploadedFile(files[0]);\n });\n\n dropZone.setLabel(\"Drop file here (Optional)\");\n dropZone.init();\n};\n\n// Function to display the uploaded file with a delete button\nconst displayUploadedFile = (file) => {\n const previewContainer = document.getElementById(\"file-content\"); // Container for preview\n\n // Clear previous preview\n previewContainer.innerHTML = \"\";\n\n if (file.name || file.filename) {\n // Create wrapper div for the preview and delete button\n const fileWrapper = document.createElement(\"div\");\n fileWrapper.style.position = \"relative\";\n fileWrapper.style.display = \"ruby\";\n\n // Add the file preview\n const paragraph = document.createElement(\"p\");\n if (file.name) {\n paragraph.textContent = `${file.name}`;\n } else if (file.filename) {\n paragraph.textContent = `${file.filename}`;\n }\n fileWrapper.appendChild(paragraph);\n\n // Create the delete \"X\" button\n const deleteButton = document.createElement(\"span\");\n deleteButton.textContent = \"X\";\n deleteButton.style.cursor = \"pointer\";\n deleteButton.style.background = \"red\";\n deleteButton.style.color = \"white\";\n deleteButton.style.padding = \"2px 5px\";\n deleteButton.style.fontWeight = \"bold\";\n deleteButton.style.marginLeft = \"5px\";\n\n // Handle file deletion when \"X\" is clicked\n deleteButton.addEventListener(\"click\", () => {\n if (confirm(\"Are you sure you want to delete this file?\")) {\n // AJAX call to delete the file on the server\n Ajax.call([{\n methodname: 'mod_homework_delete_file',\n args: {\n id: file.id,\n file_id: file.file_id\n }, // Pass the correct file ID\n done: function(response) {\n console.log(\"File deleted successfully\");\n dropZoneFiles = []; // Clear the files array\n previewContainer.innerHTML = \"\"; // Remove the preview\n uploadedFileIds = []; // Clear the files array\n },\n fail: function(error) {\n console.error(\"Failed to delete file:\", error);\n }\n }]);\n }\n });\n\n fileWrapper.appendChild(deleteButton);\n previewContainer.appendChild(fileWrapper);\n }\n};\n\n\nconst uploadDropzoneFile = async () => {\n for (let file of dropZoneFiles) {\n try {\n const formData = new FormData();\n formData.append(\"file\", file);\n\n const response = await fetch(\"/mod/homework/upload_file.php\", {\n method: \"POST\",\n body: formData\n });\n\n const result = await response.json();\n\n if (response.ok && result.status === 'success') {\n console.log(\"File uploaded successfully:\", file.name);\n console.log(result);\n uploadedFileIds.push(result.fileid); // Store the file ID\n } else {\n console.error(\"Failed to upload file:\", file.name);\n }\n } catch (error) {\n console.error(\"Error uploading file:\", file.name, error);\n }\n }\n dropZoneFiles = []; // Clear stored file after upload\n};\n\n/**\n * Handles form submission inside the modal.\n * @param {Modal} modal - The instance of the modal containing the form.\n * @param currentHomework - The id of the homework which is being edited.\n */\nconst handleFormSubmit = async (modal, currentHomework, homeworkid) => {\n let inputField = modal.getRoot().find('#inputField')[0];\n let linkField = modal.getRoot().find('#link')[0];\n let startPageInput = modal.getRoot().find('#startPage')[0];\n let endPageInput = modal.getRoot().find('#endPage')[0];\n let startTimeInput = modal.getRoot().find('#startTime')[0];\n let endTimeInput = modal.getRoot().find('#endTime')[0];\n\n // Set up a custom validity message if the field is empty\n if (inputField.value.trim() === \"\") {\n inputField.setCustomValidity(\"Input field must not be empty\");\n } else {\n inputField.setCustomValidity(\"\"); // Clear the custom message when input is valid\n }\n\n // Manually check the validity of the input field\n inputField.reportValidity();\n\n // If the field is invalid, stop the function execution\n if (!inputField.checkValidity()) {\n return; // Exit if input field is invalid\n }\n\n if (!validatePageRange(startPageInput, endPageInput)) {\n return;\n }\n\n if (!validateTimeRange(startTimeInput, endTimeInput)) {\n return;\n }\n\n await uploadDropzoneFile();\n\n Ajax.call([{\n methodname: 'mod_homework_edit_homework_material',\n args: {\n id: homeworkid,\n inputfield: inputField.value,\n link: linkField.value.trim() !== \"\" ? linkField.value.trim() : null,\n startpage: startPageInput.value.trim() !== \"\" ? startPageInput.value.trim() : null,\n endpage: endPageInput.value.trim() !== \"\" ? endPageInput.value.trim() : null,\n starttime: startTimeInput.value.trim() !== \"\" ? startTimeInput.value.trim() : null,\n endtime: endTimeInput.value.trim() !== \"\" ? endTimeInput.value.trim() : null,\n homeworkid: currentHomework,\n fileid: uploadedFileIds.length ? uploadedFileIds[0] : null\n },\n done: function(response) {\n console.log(\"Data saved successfully:\", response);\n modal.destroy();\n\n location.reload();\n },\n fail: function(error) {\n console.error(\"Failed to save data:\", error);\n }\n }]);\n\n function validatePageRange(startPageInput, endPageInput) {\n const startPage = parseInt(startPageInput.value, 10);\n const endPage = parseInt(endPageInput.value, 10);\n\n if (endPageInput.value !== \"\" && startPageInput.value !== \"\") {\n if (endPage < startPage) {\n endPageInput.setCustomValidity(\"End Page must be greater than or equal to Start Page\");\n endPageInput.reportValidity();\n return false;\n } else {\n endPageInput.setCustomValidity(\"\"); // Clear error message if valid\n }\n } else {\n endPageInput.setCustomValidity(\"\"); // Clear error if either field is empty\n }\n\n endPageInput.reportValidity();\n return endPageInput.checkValidity(); // Return true if valid\n }\n\n function validateTimeRange(startTimeInput, endTimeInput) {\n const startTime = parseInt(startTimeInput.value, 10);\n const endTime = parseInt(endTimeInput.value, 10);\n\n if (endTimeInput.value !== \"\" && startTimeInput.value !== \"\") {\n if (endTime < startTime) {\n endTimeInput.setCustomValidity(\"End Time must be greater than or equal to Start Time\");\n endTimeInput.reportValidity();\n return false;\n } else {\n endTimeInput.setCustomValidity(\"\"); // Clear error message if valid\n }\n } else {\n endTimeInput.setCustomValidity(\"\"); // Clear error if either field is empty\n }\n\n endTimeInput.reportValidity();\n return endTimeInput.checkValidity(); // Return true if valid\n }\n};"],"names":["_interopRequireDefault","e","__esModule","default","_jquery","_ajax","_modal_homework","_modal_events","_dropzone","dropZoneFiles","uploadedFileIds","_exports","init","async","cmid","title","currentHomework","homeworkids","Object","values","forEach","homeworkid","$","id","on","Ajax","call","methodname","args","done","response","modal","MyModal","create","body","html","large","removeOnClose","show","getRoot","ModalEvents","shown","dropzoneContainer","find","value","description","link","startpage","endpage","starttime","endtime","file_id","push","initializeDropzone","displayUploadedFile","hidden","console","log","preventDefault","handleFormSubmit","destroy","location","reload","fail","error","container","dropZone","Dropzone","files","setLabel","file","previewContainer","document","getElementById","innerHTML","name","filename","fileWrapper","createElement","style","position","display","paragraph","textContent","appendChild","deleteButton","cursor","background","color","padding","fontWeight","marginLeft","addEventListener","confirm","inputField","linkField","startPageInput","endPageInput","startTimeInput","endTimeInput","trim","setCustomValidity","reportValidity","checkValidity","startPage","parseInt","endPage","validatePageRange","startTime","endTime","validateTimeRange","formData","FormData","append","fetch","method","result","json","ok","status","fileid","uploadDropzoneFile","inputfield","length"],"mappings":"uNAMqC,SAAAA,uBAAAC,GAAAA,OAAAA,GAAAA,EAAAC,WAAAD,EAAAE,CAAAA,QAAAF,EAAA,8EAJrCG,QAAAJ,uBAAAI,SACAC,MAAAL,uBAAAK,OACAC,gBAAAN,uBAAAM,iBACAC,cAAAP,uBAAAO,eACAC,UAAAR,uBAAAQ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MAAMsG,SAAW,IAAIC,SACrBD,SAASE,OAAO,OAAQ3C,MAExB,MAAMxC,eAAiBoF,MAAM,gCAAiC,CAC1DC,OAAQ,OACRjF,KAAM6E,WAGJK,aAAetF,SAASuF,OAE1BvF,SAASwF,IAAwB,YAAlBF,OAAOG,QACtB/D,QAAQC,IAAI,8BAA+Ba,KAAKK,MAChDnB,QAAQC,IAAI2D,QACZ1G,gBAAgB0C,KAAKgE,OAAOI,SAE5BhE,QAAQQ,MAAM,yBAA0BM,KAAKK,KAEpD,CAAC,MAAOX,OACLR,QAAQQ,MAAM,wBAAyBM,KAAKK,KAAMX,MACtD,CAEJvD,cAAgB,EAAE,EAuCZgH,GAENhG,MAAItB,QAACuB,KAAK,CAAC,CACPC,WAAY,sCACZC,KAAM,CACFL,GAAIF,WACJqG,WAAY5B,WAAWlD,MACvBE,KAAiC,KAA3BiD,UAAUnD,MAAMwD,OAAgBL,UAAUnD,MAAMwD,OAAS,KAC/DrD,UAA2C,KAAhCiD,eAAepD,MAAMwD,OAAgBJ,eAAepD,MAAMwD,OAAS,KAC9EpD,QAAuC,KAA9BiD,aAAarD,MAAMwD,OAAgBH,aAAarD,MAAMwD,OAAS,KACxEnD,UAA2C,KAAhCiD,eAAetD,MAAMwD,OAAgBF,eAAetD,MAAMwD,OAAS,KAC9ElD,QAAuC,KAA9BiD,aAAavD,MAAMwD,OAAgBD,aAAavD,MAAMwD,OAAS,KACxE/E,WAAYL,gBACZwG,OAAQ9G,gBAAgBiH,OAASjH,gBAAgB,GAAK,MAE1DmB,KAAM,SAASC,UACX0B,QAAQC,IAAI,2BAA4B3B,UACxCC,MAAM6B,UAENC,SAASC,QACZ,EACDC,KAAM,SAASC,OACXR,QAAQQ,MAAM,uBAAwBA,MAC1C,KAyCJ,CACF"} \ No newline at end of file diff --git a/server/moodle/mod/homework/amd/build/modal_homework.min.js b/server/moodle/mod/homework/amd/build/modal_homework.min.js index 080a75436..499378fa0 100644 --- a/server/moodle/mod/homework/amd/build/modal_homework.min.js +++ b/server/moodle/mod/homework/amd/build/modal_homework.min.js @@ -1,4 +1,4 @@ -define("mod_homework/modal_homework",["exports","core/modal"],(function(_exports,_modal){var e;function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _defineProperties(e,r){for(var t=0;t * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * - */(t,"string");return"symbol"==_typeof(i)?i:i+""}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_modal=(e=_modal)&&e.__esModule?e:{default:e};var MyModal=_exports.default=function(_Modal){function MyModal(){return function(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}(this,MyModal),_callSuper(this,MyModal,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}(MyModal,_Modal),function(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(MyModal)}(_modal.default);return _defineProperty(MyModal,"TYPE","mod_homework/modaltemplate"),_defineProperty(MyModal,"TEMPLATE","mod_homework/modaltemplate"),_exports.default})); + */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_modal=(e=_modal)&&e.__esModule?e:{default:e};class MyModal extends _modal.default{static TYPE="mod_homework/modaltemplate";static TEMPLATE="mod_homework/modaltemplate"}return _exports.default=MyModal,_exports.default})); //# sourceMappingURL=modal_homework.min.js.map \ No newline at end of file diff --git a/server/moodle/mod/homework/amd/build/modal_homework.min.js.map b/server/moodle/mod/homework/amd/build/modal_homework.min.js.map index 2290c4d2d..c4e3ec03b 100644 --- a/server/moodle/mod/homework/amd/build/modal_homework.min.js.map +++ b/server/moodle/mod/homework/amd/build/modal_homework.min.js.map @@ -1 +1 @@ -{"version":3,"file":"modal_homework.min.js","sources":["../src/modal_homework.js"],"sourcesContent":["import Modal from 'core/modal';\r\n\r\n/**\r\n * Homework/amd/src/modal_homework.js\r\n *\r\n * @package\r\n * @copyright 2024, cs-24-sw-5-01 \r\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\r\n *\r\n */\r\n\r\n/**\r\n * Customized modal for homework plugin\r\n */\r\nexport default class MyModal extends Modal {\r\n static TYPE = \"mod_homework/modaltemplate\";\r\n static TEMPLATE = \"mod_homework/modaltemplate\";\r\n}"],"names":["e","_typeof","o","Symbol","iterator","constructor","prototype","_defineProperties","r","t","length","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_callSuper","_getPrototypeOf","TypeError","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","apply","Boolean","valueOf","call","setPrototypeOf","getPrototypeOf","bind","__proto__","_setPrototypeOf","_defineProperty","value","i","toPrimitive","String","Number","_toPrimitive","_modal","__esModule","default","MyModal","_exports","_Modal","a","n","_classCallCheck","this","arguments","create","_inherits","_createClass","Modal"],"mappings":"yFAA+B,IAAAA,EAAA,SAAAC,QAAAC,GAAA,OAAAD,QAAA,mBAAAE,QAAAA,iBAAAA,OAAAC,kBAAAF,GAAA,cAAAA,GAAA,SAAAA,GAAAA,OAAAA,GAAAC,mBAAAA,QAAAD,EAAAG,cAAAF,QAAAD,IAAAC,OAAAG,UAAA,gBAAAJ,CAAAD,EAAAA,QAAAC,EAAA,CAAA,SAAAK,kBAAAP,EAAAQ,WAAAC,EAAA,EAAAA,EAAAD,EAAAE,OAAAD,IAAAP,CAAAA,IAAAA,EAAAM,EAAAC,GAAAP,EAAAS,WAAAT,EAAAS,aAAAT,EAAAA,EAAAU,0BAAAV,IAAAA,EAAAW,UAAA,GAAAC,OAAAC,eAAAf,EAAAgB,eAAAd,EAAA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core/modal';\n\n/**\n * Homework/amd/src/modal_homework.js\n *\n * @package\n * @copyright 2024, cs-24-sw-5-01 \n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n *\n */\n\n/**\n * Customized modal for homework plugin\n */\nexport default class MyModal extends Modal {\n static TYPE = \"mod_homework/modaltemplate\";\n static TEMPLATE = \"mod_homework/modaltemplate\";\n}"],"names":["e","_modal","__esModule","default","MyModal","Modal","static","_exports"],"mappings":"yFAA+B,IAAAA;;;;;;;;qFAA/BC,QAA+BD,EAA/BC,SAA+BD,EAAAE,WAAAF,EAAAG,CAAAA,QAAAH,GAchB,MAAMI,gBAAgBC,OAAAA,QACjCC,YAAc,6BACdA,gBAAkB,6BACrB,OAAAC,SAAAJ,QAAAC,QAAAG,SAAAJ,OAAA"} \ No newline at end of file diff --git a/server/moodle/mod/homework/amd/src/homeworkchooser.js b/server/moodle/mod/homework/amd/src/homeworkchooser.js index 803329a21..864975c8e 100644 --- a/server/moodle/mod/homework/amd/src/homeworkchooser.js +++ b/server/moodle/mod/homework/amd/src/homeworkchooser.js @@ -1,4 +1,4 @@ -// homeworkchooser.js (Updated Version) +// homeworkchooseredit.js (Updated Version) import $ from 'jquery'; import Ajax from 'core/ajax'; @@ -10,7 +10,7 @@ let dropZoneFiles = []; // Store files to upload later let uploadedFileIds = []; // Store file IDs after successful upload /** - * Initializes the Homework Chooser Modal. + * Initializes the Homework Edit Modal. * * @param {int} cmid * @param {string} title @@ -22,7 +22,7 @@ export const init = async(cmid, title, currentHomework) => { Ajax.call([{ methodname: 'mod_homework_get_homework_chooser', args: {cmid: cmid}, - done: async function(response) { + done: async function (response) { const modal = await MyModal.create({ title: title, body: `${response.html}`, @@ -37,101 +37,9 @@ export const init = async(cmid, title, currentHomework) => { // Initialize elements once the modal content is rendered modal.getRoot().on(ModalEvents.shown, () => { // Initialize the elements after modal is displayed - const startPageInput = modal.getRoot().find('#startPage')[0]; - const endPageInput = modal.getRoot().find('#endPage')[0]; - const startTimeInput = modal.getRoot().find('#startTime')[0]; - const endTimeInput = modal.getRoot().find('#endTime')[0]; - const radioButtons = modal.getRoot().find('input[name="option"]'); - const pageRangeInput = modal.getRoot().find('#page-range-input')[0]; - const videoTimeInput = modal.getRoot().find('#video-time-input')[0]; - const linkDiv = modal.getRoot().find('#linkDiv')[0]; - const dropzonePdfContainer = modal.getRoot().find('#dropzone-pdf-container')[0]; - const dropzoneVideoContainer = modal.getRoot().find('#dropzone-video-container')[0]; - - // Attach event listeners for page input validation - startPageInput.addEventListener('input', validatePageRange); - endPageInput.addEventListener('input', validatePageRange); - - // Attach event listeners for time input validation - startTimeInput.addEventListener('input', validateTimeRange); - endTimeInput.addEventListener('input', validateTimeRange); - - // Attach event listeners for radio buttons - radioButtons.each((_, radio) => { - radio.addEventListener('change', toggleInputs); - }); - - initializePDFDropzone(dropzonePdfContainer); - initializeVideoDropzone(dropzoneVideoContainer) - - // Function to validate page range - /** - * - */ - function validatePageRange() { - const startPage = parseInt(startPageInput.value, 10); - const endPage = parseInt(endPageInput.value, 10); - - if (endPageInput.value !== "" && startPageInput.value !== "") { - if (endPage < startPage) { - endPageInput.setCustomValidity("End Page must be greater than or equal to Start Page"); - } else { - endPageInput.setCustomValidity(""); // Clear error message if valid - } - } else { - endPageInput.setCustomValidity(""); // Clear error if either field is empty - } - } - - function validateTimeRange() { - const startTime = parseInt(startTimeInput.value, 10); - const endTime = parseInt(endTimeInput.value, 10); - - if (endTimeInput.value !== "" && startTimeInput.value !== "") { - if (endTime < startTime) { - endTimeInput.setCustomValidity("End Time must be greater than or equal to Start Page"); - } else { - endTimeInput.setCustomValidity(""); // Clear error message if valid - } - } else { - endTimeInput.setCustomValidity(""); // Clear error if either field is empty - } - } - - // Function to toggle between text and link inputs - /** - * - */ - function toggleInputs() { - if (document.getElementById("option1").checked) { - pageRangeInput.style.display = "block"; - videoTimeInput.style.display = "none"; - linkDiv.style.display = "none"; - dropzonePdfContainer.style.display = "block"; - dropzoneVideoContainer.style.display = "none"; - - dropZoneFiles = []; - uploadedFileIds = []; - } else if (document.getElementById("option2").checked) { - pageRangeInput.style.display = "none"; - videoTimeInput.style.display = "none"; - linkDiv.style.display = "block"; - dropzonePdfContainer.style.display = "none"; - dropzoneVideoContainer.style.display = "none"; - - dropZoneFiles = []; - uploadedFileIds = []; - } else if (document.getElementById("option3").checked) { - pageRangeInput.style.display = "none"; - videoTimeInput.style.display = "block"; - linkDiv.style.display = "none"; - dropzonePdfContainer.style.display = "none"; - dropzoneVideoContainer.style.display = "block"; - - dropZoneFiles = []; - uploadedFileIds = []; - } - } + const dropzoneContainer = modal.getRoot().find('#dropzone-container')[0]; + + initializeDropzone(dropzoneContainer); }); // Attach an event listener to handle the modal hidden event @@ -158,37 +66,62 @@ export const init = async(cmid, title, currentHomework) => { }); }; -const initializePDFDropzone = (container) => { - const dropZone = new Dropzone(container, "application/pdf", (files) => { - for (let file of files) { - if (file.type === "application/pdf") { - dropZoneFiles.push(file); // Store file for later upload - } else { - console.warn("Invalid file type:", file.type); - } - } +const initializeDropzone = (container) => { + const dropZone = new Dropzone(container, "*/*", (files) => { + dropZoneFiles.push(files[0]); // Store file for later upload + + displayUploadedFile(files[0]); }); - dropZone.setLabel("Drop PDF files here (Optional)"); + dropZone.setLabel("Drop file here (Optional)"); dropZone.init(); }; -const initializeVideoDropzone = (container) => { - const dropZone = new Dropzone(container, "video/*", (files) => { - for (let file of files) { - if (file.type.startsWith("video/")) { - dropZoneFiles.push(file); // Store file for later upload - } else { - console.warn("Invalid file type:", file.type); - } +// Function to display the uploaded file with a delete button +const displayUploadedFile = (file) => { + const previewContainer = document.getElementById("file-content"); // Container for preview + + // Clear previous preview + previewContainer.innerHTML = ""; + + if (file.name || file.filename) { + // Create wrapper div for the preview and delete button + const fileWrapper = document.createElement("div"); + fileWrapper.style.position = "relative"; + fileWrapper.style.display = "ruby"; + + // Add the file preview + const paragraph = document.createElement("p"); + if (file.name) { + paragraph.textContent = `${file.name}`; + } else if (file.filename) { + paragraph.textContent = `${file.filename}`; } - }); - - dropZone.setLabel("Drop video files here (Optional)"); - dropZone.init(); + fileWrapper.appendChild(paragraph); + + // Create the delete "X" button + const deleteButton = document.createElement("span"); + deleteButton.textContent = "X"; + deleteButton.style.cursor = "pointer"; + deleteButton.style.background = "red"; + deleteButton.style.color = "white"; + deleteButton.style.padding = "2px 5px"; + deleteButton.style.fontWeight = "bold"; + deleteButton.style.marginLeft = "5px"; + + // Delete the file preview and reset dropZoneFiles when "X" is clicked + deleteButton.addEventListener("click", () => { + dropZoneFiles = []; // Clear the files array + previewContainer.innerHTML = ""; // Remove the preview + }); + + fileWrapper.appendChild(deleteButton); + + previewContainer.appendChild(fileWrapper); + } }; -const uploadDropzoneFiles = async () => { +const uploadDropzoneFile = async () => { for (let file of dropZoneFiles) { try { const formData = new FormData(); @@ -212,119 +145,105 @@ const uploadDropzoneFiles = async () => { console.error("Error uploading file:", file.name, error); } } - dropZoneFiles = []; // Clear stored files after upload + dropZoneFiles = []; // Clear stored file after upload }; /** * Handles form submission inside the modal. - * @param {int} cminstance * @param {Modal} modal - The instance of the modal containing the form. * @param currentHomework - The id of the homework which is being edited. */ const handleFormSubmit = async (modal, currentHomework) => { let inputField = modal.getRoot().find('#inputField')[0]; + let linkField = modal.getRoot().find('#link')[0]; + let startPageInput = modal.getRoot().find('#startPage')[0]; + let endPageInput = modal.getRoot().find('#endPage')[0]; + let startTimeInput = modal.getRoot().find('#startTime')[0]; + let endTimeInput = modal.getRoot().find('#endTime')[0]; + + // Set up a custom validity message if the field is empty + if (inputField.value.trim() === "") { + inputField.setCustomValidity("Input field must not be empty"); + } else { + inputField.setCustomValidity(""); // Clear the custom message when input is valid + } - if (modal.getRoot().find('#option1').is(':checked')) { + // Manually check the validity of the input field + inputField.reportValidity(); - let startPage = modal.getRoot().find('#startPage').val(); - let endPage = modal.getRoot().find('#endPage').val(); + // If the field is invalid, stop the function execution + if (!inputField.checkValidity()) { + return; // Exit if input field is invalid + } - await uploadDropzoneFiles(); + if (!validatePageRange(startPageInput, endPageInput)) { + return; + } - // AJAX call to send data to the server - Ajax.call([{ - methodname: 'mod_homework_save_homework_literature', // Your PHP function that will handle the data - args: { - inputfield: inputField.value, - startpage: startPage, - endpage: endPage, - homework: currentHomework, - fileid: uploadedFileIds.length ? uploadedFileIds[0] : null - }, - done: function(response) { - console.log("Data saved successfully:", response); - dropZoneFiles = []; - uploadedFileIds = []; - modal.destroy(); - }, - fail: function(error) { - console.error("Failed to save data:", error); - } - }]); + if (!validateTimeRange(startTimeInput, endTimeInput)) { + return; + } - } else if (modal.getRoot().find('#option2').is(':checked')) { + await uploadDropzoneFile(); + + Ajax.call([{ + methodname: 'mod_homework_save_homework_material', + args: { + inputfield: inputField.value, + link: linkField.value.trim() !== "" ? linkField.value.trim() : null, + startpage: startPageInput.value.trim() !== "" ? startPageInput.value.trim() : null, + endpage: endPageInput.value.trim() !== "" ? endPageInput.value.trim() : null, + starttime: startTimeInput.value.trim() !== "" ? startTimeInput.value.trim() : null, + endtime: endTimeInput.value.trim() !== "" ? endTimeInput.value.trim() : null, + homeworkid: currentHomework, + fileid: uploadedFileIds.length ? uploadedFileIds[0] : null + }, + done: function(response) { + console.log("Data saved successfully:", response); + modal.destroy(); + }, + fail: function(error) { + console.error("Failed to save data:", error); + } + }]); - let link = modal.getRoot().find('#link').val(); + function validatePageRange(startPageInput, endPageInput) { + const startPage = parseInt(startPageInput.value, 10); + const endPage = parseInt(endPageInput.value, 10); - // AJAX call to send data to the server - Ajax.call([{ - methodname: 'mod_homework_save_homework_link', // Your PHP function that will handle the data - args: { - inputfield: inputField.value, - link: link, - homework: currentHomework, - }, - done: function(response) { - console.log("Data saved successfully:", response); - modal.destroy(); - }, - fail: function(error) { - console.error("Failed to save data:", error); + if (endPageInput.value !== "" && startPageInput.value !== "") { + if (endPage < startPage) { + endPageInput.setCustomValidity("End Page must be greater than or equal to Start Page"); + endPageInput.reportValidity(); + return false; + } else { + endPageInput.setCustomValidity(""); // Clear error message if valid } - }]); - } else if (modal.getRoot().find('#option3').is(':checked')) { - let startTime = modal.getRoot().find('#startTime').val(); - let endTime = modal.getRoot().find('#endTime').val(); - - await uploadDropzoneFiles(); + } else { + endPageInput.setCustomValidity(""); // Clear error if either field is empty + } - Ajax.call([{ - methodname: 'mod_homework_save_homework_video', - args: { - inputfield: inputField, - starttime: startTime, - endtime: endTime, - instance: cminstance, - fileid: uploadedFileIds.length ? uploadedFileIds[0] : null - }, - done: function(response) { - console.log("Data saved successfully:", response); - modal.destroy(); - }, - fail: function(error) { - console.error("Failed to save data:", error); - } - }]); + endPageInput.reportValidity(); + return endPageInput.checkValidity(); // Return true if valid } -}; -const initializeDropzone = (container) => { - const dropZone = new Dropzone(container, "application/pdf", async (files) => { - for (let file of files) { - if (file.type === "application/pdf") { // Validate file type - try { - const formData = new FormData(); - formData.append("file", file); - - const response = await fetch("/mod/homework/save_homework_file.php", { - method: "POST", - body: formData - }); - - if (response.ok) { - console.log("File uploaded successfully:", file.name); - } else { - console.error("Failed to upload file:", file.name); - } - } catch (error) { - console.error("Error uploading file:", file.name, error); - } + function validateTimeRange(startTimeInput, endTimeInput) { + const startTime = parseInt(startTimeInput.value, 10); + const endTime = parseInt(endTimeInput.value, 10); + + if (endTimeInput.value !== "" && startTimeInput.value !== "") { + if (endTime < startTime) { + endTimeInput.setCustomValidity("End Time must be greater than or equal to Start Time"); + endTimeInput.reportValidity(); + return false; } else { - console.warn("Invalid file type:", file.type); + endTimeInput.setCustomValidity(""); // Clear error message if valid } + } else { + endTimeInput.setCustomValidity(""); // Clear error if either field is empty } - }); - dropZone.setLabel("(Optional) Drop PDF files here"); - dropZone.init(); + endTimeInput.reportValidity(); + return endTimeInput.checkValidity(); // Return true if valid + } }; \ No newline at end of file diff --git a/server/moodle/mod/homework/amd/src/homeworkchooserdelete.js b/server/moodle/mod/homework/amd/src/homeworkchooserdelete.js new file mode 100644 index 000000000..b89671162 --- /dev/null +++ b/server/moodle/mod/homework/amd/src/homeworkchooserdelete.js @@ -0,0 +1,41 @@ +// homeworkchooserdelete.js (Updated Version) + +import $ from 'jquery'; +import Ajax from 'core/ajax'; +import home from "../../../../lib/amd/src/key_codes"; + +/** + * Initializes the Homework Delete Modal. + * + * @param {int} cmid + * @param {array} homeworkids + * @returns {Promise} + */ +export const init = async (cmid, homeworkids) => { + console.log(homeworkids); + Object.values(homeworkids).forEach(homeworkid => { + $('#delete-homework-chooser-' + homeworkid.id).on('click', () => { + // Show a confirmation alert + const confirmDeletion = confirm("Are you sure you want to delete this homework record? This action cannot be undone."); + + // Proceed only if the user confirms + if (confirmDeletion) { + Ajax.call([{ + methodname: 'mod_homework_delete_homework_material', + args: { + id: homeworkid.id, + fileid: (homeworkid.file_id) ? homeworkid.file_id : null, + }, + done: async function (response) { + // Handle successful deletion here, if needed + console.log("Homework record deleted successfully."); + location.reload(); + }, + fail: (error) => { + console.error("Failed to delete homework record:", error); + } + }]); + } + }); + }); +}; diff --git a/server/moodle/mod/homework/amd/src/homeworkchooseredit.js b/server/moodle/mod/homework/amd/src/homeworkchooseredit.js new file mode 100644 index 000000000..eb254132f --- /dev/null +++ b/server/moodle/mod/homework/amd/src/homeworkchooseredit.js @@ -0,0 +1,286 @@ +// homeworkchooseredit.js (Updated Version) + +import $ from 'jquery'; +import Ajax from 'core/ajax'; +import MyModal from 'mod_homework/modal_homework'; +import ModalEvents from 'core/modal_events'; +import Dropzone from 'core/dropzone'; + +let dropZoneFiles = []; // Store files to upload later +let uploadedFileIds = []; // Store file IDs after successful upload + +/** + * Initializes the Homework Edit Modal. + * + * @param {int} cmid + * @param {string} title + * @param {int} currentHomework + * @param {array} homeworkids + * @returns {Promise} + */ +export const init = async(cmid, title, currentHomework, homeworkids) => { + Object.values(homeworkids).forEach(homeworkid => { + $('#edit-homework-chooser-' + homeworkid.id).on('click', () => { + Ajax.call([{ + methodname: 'mod_homework_get_homework_chooser', + args: {cmid: cmid}, + done: async function (response) { + const modal = await MyModal.create({ + title: title, + body: `${response.html}`, + // footer: 'An example footer content', + large: true, + removeOnClose: true + }); + + // Show the modal + modal.show(); + + // Initialize elements once the modal content is rendered + modal.getRoot().on(ModalEvents.shown, () => { + // Initialize the elements after modal is displayed + const dropzoneContainer = modal.getRoot().find('#dropzone-container')[0]; + + modal.getRoot().find('#inputField')[0].value = homeworkid.description; + modal.getRoot().find('#link')[0].value = homeworkid.link; + modal.getRoot().find('#startPage')[0].value = homeworkid.startpage; + modal.getRoot().find('#endPage')[0].value = homeworkid.endpage; + modal.getRoot().find('#startTime')[0].value = homeworkid.starttime; + modal.getRoot().find('#endTime')[0].value = homeworkid.endtime; + + if (homeworkid.file_id) { + uploadedFileIds.push(homeworkid.file_id); + } + + initializeDropzone(dropzoneContainer); + displayUploadedFile(homeworkid); + }); + + // Attach an event listener to handle the modal hidden event. + modal.getRoot().on(ModalEvents.hidden, () => { + console.log('Modal closed!'); + }); + + // Attach event listeners for buttons + modal.getRoot().on('click', '[data-action="submit"]', (e) => { + e.preventDefault(); + + handleFormSubmit(modal, currentHomework, homeworkid["id"]); + }); + + modal.getRoot().on('click', '[data-action="cancel"]', (e) => { + e.preventDefault(); + modal.destroy(); + + location.reload(); + }); + }, + fail: (error) => { + console.error("Failed to load homework chooser content:", error); + } + }]); + }); + }) +}; + +const initializeDropzone = (container) => { + const dropZone = new Dropzone(container, "*/*", (files) => { + dropZoneFiles.push(files[0]); // Store file for later upload + + displayUploadedFile(files[0]); + }); + + dropZone.setLabel("Drop file here (Optional)"); + dropZone.init(); +}; + +// Function to display the uploaded file with a delete button +const displayUploadedFile = (file) => { + const previewContainer = document.getElementById("file-content"); // Container for preview + + // Clear previous preview + previewContainer.innerHTML = ""; + + if (file.name || file.filename) { + // Create wrapper div for the preview and delete button + const fileWrapper = document.createElement("div"); + fileWrapper.style.position = "relative"; + fileWrapper.style.display = "ruby"; + + // Add the file preview + const paragraph = document.createElement("p"); + if (file.name) { + paragraph.textContent = `${file.name}`; + } else if (file.filename) { + paragraph.textContent = `${file.filename}`; + } + fileWrapper.appendChild(paragraph); + + // Create the delete "X" button + const deleteButton = document.createElement("span"); + deleteButton.textContent = "X"; + deleteButton.style.cursor = "pointer"; + deleteButton.style.background = "red"; + deleteButton.style.color = "white"; + deleteButton.style.padding = "2px 5px"; + deleteButton.style.fontWeight = "bold"; + deleteButton.style.marginLeft = "5px"; + + // Handle file deletion when "X" is clicked + deleteButton.addEventListener("click", () => { + if (confirm("Are you sure you want to delete this file?")) { + // AJAX call to delete the file on the server + Ajax.call([{ + methodname: 'mod_homework_delete_file', + args: { + id: file.id, + file_id: file.file_id + }, // Pass the correct file ID + done: function(response) { + console.log("File deleted successfully"); + dropZoneFiles = []; // Clear the files array + previewContainer.innerHTML = ""; // Remove the preview + uploadedFileIds = []; // Clear the files array + }, + fail: function(error) { + console.error("Failed to delete file:", error); + } + }]); + } + }); + + fileWrapper.appendChild(deleteButton); + previewContainer.appendChild(fileWrapper); + } +}; + + +const uploadDropzoneFile = async () => { + for (let file of dropZoneFiles) { + try { + const formData = new FormData(); + formData.append("file", file); + + const response = await fetch("/mod/homework/upload_file.php", { + method: "POST", + body: formData + }); + + const result = await response.json(); + + if (response.ok && result.status === 'success') { + console.log("File uploaded successfully:", file.name); + console.log(result); + uploadedFileIds.push(result.fileid); // Store the file ID + } else { + console.error("Failed to upload file:", file.name); + } + } catch (error) { + console.error("Error uploading file:", file.name, error); + } + } + dropZoneFiles = []; // Clear stored file after upload +}; + +/** + * Handles form submission inside the modal. + * @param {Modal} modal - The instance of the modal containing the form. + * @param currentHomework - The id of the homework which is being edited. + */ +const handleFormSubmit = async (modal, currentHomework, homeworkid) => { + let inputField = modal.getRoot().find('#inputField')[0]; + let linkField = modal.getRoot().find('#link')[0]; + let startPageInput = modal.getRoot().find('#startPage')[0]; + let endPageInput = modal.getRoot().find('#endPage')[0]; + let startTimeInput = modal.getRoot().find('#startTime')[0]; + let endTimeInput = modal.getRoot().find('#endTime')[0]; + + // Set up a custom validity message if the field is empty + if (inputField.value.trim() === "") { + inputField.setCustomValidity("Input field must not be empty"); + } else { + inputField.setCustomValidity(""); // Clear the custom message when input is valid + } + + // Manually check the validity of the input field + inputField.reportValidity(); + + // If the field is invalid, stop the function execution + if (!inputField.checkValidity()) { + return; // Exit if input field is invalid + } + + if (!validatePageRange(startPageInput, endPageInput)) { + return; + } + + if (!validateTimeRange(startTimeInput, endTimeInput)) { + return; + } + + await uploadDropzoneFile(); + + Ajax.call([{ + methodname: 'mod_homework_edit_homework_material', + args: { + id: homeworkid, + inputfield: inputField.value, + link: linkField.value.trim() !== "" ? linkField.value.trim() : null, + startpage: startPageInput.value.trim() !== "" ? startPageInput.value.trim() : null, + endpage: endPageInput.value.trim() !== "" ? endPageInput.value.trim() : null, + starttime: startTimeInput.value.trim() !== "" ? startTimeInput.value.trim() : null, + endtime: endTimeInput.value.trim() !== "" ? endTimeInput.value.trim() : null, + homeworkid: currentHomework, + fileid: uploadedFileIds.length ? uploadedFileIds[0] : null + }, + done: function(response) { + console.log("Data saved successfully:", response); + modal.destroy(); + + location.reload(); + }, + fail: function(error) { + console.error("Failed to save data:", error); + } + }]); + + function validatePageRange(startPageInput, endPageInput) { + const startPage = parseInt(startPageInput.value, 10); + const endPage = parseInt(endPageInput.value, 10); + + if (endPageInput.value !== "" && startPageInput.value !== "") { + if (endPage < startPage) { + endPageInput.setCustomValidity("End Page must be greater than or equal to Start Page"); + endPageInput.reportValidity(); + return false; + } else { + endPageInput.setCustomValidity(""); // Clear error message if valid + } + } else { + endPageInput.setCustomValidity(""); // Clear error if either field is empty + } + + endPageInput.reportValidity(); + return endPageInput.checkValidity(); // Return true if valid + } + + function validateTimeRange(startTimeInput, endTimeInput) { + const startTime = parseInt(startTimeInput.value, 10); + const endTime = parseInt(endTimeInput.value, 10); + + if (endTimeInput.value !== "" && startTimeInput.value !== "") { + if (endTime < startTime) { + endTimeInput.setCustomValidity("End Time must be greater than or equal to Start Time"); + endTimeInput.reportValidity(); + return false; + } else { + endTimeInput.setCustomValidity(""); // Clear error message if valid + } + } else { + endTimeInput.setCustomValidity(""); // Clear error if either field is empty + } + + endTimeInput.reportValidity(); + return endTimeInput.checkValidity(); // Return true if valid + } +}; \ No newline at end of file diff --git a/server/moodle/mod/homework/classes/external/delete_file.php b/server/moodle/mod/homework/classes/external/delete_file.php new file mode 100644 index 000000000..63c186a01 --- /dev/null +++ b/server/moodle/mod/homework/classes/external/delete_file.php @@ -0,0 +1,94 @@ +. + +/** + * homework/classes/external/delete_file.php + * + * @package mod_homework + * @copyright 2024, cs-24-sw-5-01 + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace mod_homework\external; + +use core\exception\moodle_exception; +use core_external\external_api; +use core_external\external_function_parameters; +use core_external\external_value; +use context_system; + +/** + * Class to handle file deletion for mod_homework. + */ +class delete_file extends external_api { + /** + * Define the parameters for delete_file. + * + * @return external_function_parameters + */ + public static function execute_parameters() { + return new external_function_parameters( + [ + 'id' => new external_value(PARAM_INT, 'The ID of the homework to update'), + 'fileid' => new external_value(PARAM_INT, 'The ID of the file to delete'), + ] + ); + } + + /** + * Deletes the specified file. + * + * @param int $id The ID of the homework to update. + * @param int $fileid The ID of the file to delete. + * @return bool True if the file was successfully deleted, false otherwise. + */ + public static function execute($id, $fileid) { + global $DB; + + // Validate parameters. + $params = self::validate_parameters(self::execute_parameters(), [ + 'id' => $id, + 'file_id' => $fileid, + ]); + + // Ensure the user is logged in and validate context. + require_login(); + $context = context_system::instance(); + self::validate_context($context); + + // Include the library function to delete the file. + require_once(__DIR__ . '/../../lib.php'); + $success = mod_homework_delete_file( + $params['id'], + $params['file_id'] + ); + + if (!$success) { + throw new moodle_exception('deleteerror', 'mod_homework', '', null, 'File deletion failed.'); + } + + return true; + } + + /** + * Define the return type for delete_file. + * + * @return external_value + */ + public static function execute_returns() { + return new external_value(PARAM_BOOL, 'True if file was deleted successfully'); + } +} diff --git a/server/moodle/mod/homework/classes/external/save_homework_link.php b/server/moodle/mod/homework/classes/external/delete_homework_material.php similarity index 51% rename from server/moodle/mod/homework/classes/external/save_homework_link.php rename to server/moodle/mod/homework/classes/external/delete_homework_material.php index aa1f0cfd9..61a34fe70 100644 --- a/server/moodle/mod/homework/classes/external/save_homework_link.php +++ b/server/moodle/mod/homework/classes/external/delete_homework_material.php @@ -15,7 +15,7 @@ // along with Moodle. If not, see . /** - * homework/classes/external/save_homework_link.php + * homework/classes/external/delete_homework_literature.php * * @package mod_homework * @copyright 2024, cs-24-sw-5-01 @@ -27,70 +27,63 @@ defined('MOODLE_INTERNAL') || die(); global $CFG; -require_once($CFG->libdir . '/externallib.php'); -use external_api; -use external_function_parameters; -use external_value; -use external_single_structure; +use core\exception\moodle_exception; +use core_external\external_api; +use core_external\external_function_parameters; +use core_external\external_value; +use core_external\external_single_structure; /** - * + * Class for editing homework materials. */ -class save_homework_link extends \external_api { +class delete_homework_material extends external_api { /** - * Define the parameters expected by this function. + * Returns parameters id and fileid * - * @return external_function_parameters + * @return external_function_parameters Define the parameters expected by this function. */ - public static function execute_parameters() { + public static function execute_parameters(): external_function_parameters { return new external_function_parameters([ - 'inputfield' => new external_value(PARAM_TEXT, 'Input field value'), - 'link' => new external_value(PARAM_TEXT, 'link field value'), - 'homework' => new external_value(PARAM_INT, 'homework field value'), + 'id' => new external_value(PARAM_INT, 'homework id value'), + 'fileid' => new external_value(PARAM_INT, 'Uploaded file ID', VALUE_OPTIONAL), ]); } /** * The main function to handle the request. * - * @param $inputfield - * @param $link - * @param $homework + * @param $id + * @param $fileid * @return string[] * @throws \dml_exception */ - public static function execute($inputfield, $link, $homework) { + public static function execute($id, $fileid = null): array { global $DB, $USER; - // Handle the input field value here. - // For example, save to a database. - $record = new \stdClass(); - $record->description = $inputfield; - $record->link = $link; - $record->usermodified = $USER->id; - $record->timecreated = time(); - $record->timemodified = time(); - $record->homework = $homework; - - // Save to database. try { - $DB->insert_record('homework_links', $record); - } catch (\dml_exception $e) { - debugging("Error inserting into homework_links: " . $e->getMessage(), DEBUG_DEVELOPER); - return ['status' => 'error', 'message' => 'Failed to save homework record']; + // Delete the record from homework_materials. + $DB->delete_records('homework_materials', ['id' => $id]); + + // Check if fileid is not null and delete from files. + if (!empty($fileid)) { + \mod_homework\external\delete_file::execute($id, $fileid); + } + } catch (\dml_exception | moodle_exception $e) { + debugging("Error deleting record in homework_materials: " . $e->getMessage(), DEBUG_DEVELOPER); + return ['status' => 'error', 'message' => 'Failed to delete homework materials record']; } // Return a success response. - return ['status' => 'success', 'message' => 'Data saved successfully']; + return ['status' => 'success', 'message' => 'Data deleted successfully']; } /** - * Returns single structure of status and message. + * Returns status and message as single structure * * @return external_single_structure Define the return values. */ - public static function execute_returns() { + public static function execute_returns(): external_single_structure { return new external_single_structure([ 'status' => new external_value(PARAM_TEXT, 'Status of the request'), 'message' => new external_value(PARAM_TEXT, 'Message with details about the request status'), diff --git a/server/moodle/mod/homework/classes/external/save_homework_video.php b/server/moodle/mod/homework/classes/external/edit_homework_material.php similarity index 56% rename from server/moodle/mod/homework/classes/external/save_homework_video.php rename to server/moodle/mod/homework/classes/external/edit_homework_material.php index 8a851ca09..347544f23 100644 --- a/server/moodle/mod/homework/classes/external/save_homework_video.php +++ b/server/moodle/mod/homework/classes/external/edit_homework_material.php @@ -15,12 +15,11 @@ // along with Moodle. If not, see . /** - * homework/classes/external/save_homework_video.php + * homework/classes/external/edit_homework_material.php * * @package mod_homework * @copyright 2024, cs-24-sw-5-01 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - * */ namespace mod_homework\external; @@ -28,80 +27,98 @@ defined('MOODLE_INTERNAL') || die(); global $CFG; -require_once($CFG->libdir . '/externallib.php'); -use external_api; -use external_function_parameters; -use external_value; -use external_single_structure; +use core_external\external_api; +use core_external\external_function_parameters; +use core_external\external_value; +use core_external\external_single_structure; /** - * + * Class for editing homework materials. */ -class save_homework_video extends \external_api { +class edit_homework_material extends external_api { /** + * Returns parameters id, inputfield, link, startpage, endpage, starttime, endtime, homeworkid and fileid * * @return external_function_parameters Define the parameters expected by this function. */ public static function execute_parameters() { return new external_function_parameters([ + 'id' => new external_value(PARAM_INT, 'homework id value'), 'inputfield' => new external_value(PARAM_TEXT, 'Input field value'), - 'starttime' => new external_value(PARAM_INT, 'startTime field value'), - 'endtime' => new external_value(PARAM_INT, 'endTime field value'), - 'homework' => new external_value(PARAM_INT, 'homework field value'), + 'homeworkid' => new external_value(PARAM_INT, 'homeworkId field value'), + 'link' => new external_value(PARAM_TEXT, 'link field value', VALUE_OPTIONAL), + 'startpage' => new external_value(PARAM_INT, 'startPage field value', VALUE_OPTIONAL), + 'endpage' => new external_value(PARAM_INT, 'endPage field value', VALUE_OPTIONAL), + 'starttime' => new external_value(PARAM_INT, 'startTime field value', VALUE_OPTIONAL), + 'endtime' => new external_value(PARAM_INT, 'endTime field value', VALUE_OPTIONAL), 'fileid' => new external_value(PARAM_INT, 'Uploaded file ID', VALUE_OPTIONAL), ]); } /** * The main function to handle the request. + * + * @param $id * @param $inputfield + * @param $homeworkid + * @param $link + * @param $startpage + * @param $endpage * @param $starttime * @param $endtime - * @param $homework * @param $fileid * @return string[] * @throws \dml_exception */ - public static function execute($inputfield, $starttime, $endtime, $homework, $fileid = null) { + public static function execute( + $id, + $inputfield, + $homeworkid, + $link = null, + $startpage = null, + $endpage = null, + $starttime = null, + $endtime = null, + $fileid = null + ) { global $DB, $USER; $record = new \stdClass(); - $filesrecord = new \stdClass(); - $record->userid = $USER->id; + $record->id = $id; + $record->homework_id = $homeworkid; $record->description = $inputfield; - $record->starttime = $starttime; - $record->endtime = $endtime; - $record->homework = $homework; - if ($fileid) { - $record->fileid = $fileid; - - $filesrecord->files_id = $fileid; - $filesrecord->homework_id = $homework; - - try { - $DB->insert_record('files_homework', $filesrecord); - } catch (\dml_exception $e) { - debugging("Error inserting into files_homework: " . $e->getMessage(), DEBUG_DEVELOPER); - return ['status' => 'error', 'message' => 'Failed to save file record']; - } - } + $record->timecreated = time(); $record->timemodified = time(); + $record->usermodified = $USER->id; + + $record->introformat = 0; + + $record->link = $link; + + $record->startpage = $startpage; + $record->endpage = $endpage; + + $record->starttime = $starttime; + $record->endtime = $endtime; + + $record->file_id = $fileid; try { - $DB->insert_record('homework_video', $record); + $DB->update_record('homework_materials', $record); } catch (\dml_exception $e) { - debugging("Error inserting into homework_video: " . $e->getMessage(), DEBUG_DEVELOPER); - return ['status' => 'error', 'message' => 'Failed to save homework record']; + debugging("Error editing record in homework_materials: " . $e->getMessage(), DEBUG_DEVELOPER); + return ['status' => 'error', 'message' => 'Failed to edit homework materials record']; } // Return a success response. - return ['status' => 'success', 'message' => 'Data saved successfully']; + return ['status' => 'success', 'message' => 'Data edited successfully']; } /** + * Returns status and message as single structure * * @return external_single_structure Define the return values. */ diff --git a/server/moodle/mod/homework/classes/external/get_homework_chooser.php b/server/moodle/mod/homework/classes/external/get_homework_chooser.php index e89d7a5c6..eeb8f86c0 100644 --- a/server/moodle/mod/homework/classes/external/get_homework_chooser.php +++ b/server/moodle/mod/homework/classes/external/get_homework_chooser.php @@ -28,12 +28,11 @@ defined('MOODLE_INTERNAL') || die(); global $CFG; -require_once("$CFG->libdir/externallib.php"); use core_external\external_api; -use external_function_parameters; -use external_value; -use external_single_structure; +use core_external\external_function_parameters; +use core_external\external_value; +use core_external\external_single_structure; /** * @@ -63,13 +62,12 @@ public static function execute($cmid) {



-
- -
- -
- -

+
+
+
+ +
+

@@ -77,20 +75,16 @@ public static function execute($cmid) {
-