From 71d48a2cc031df177c1495aecf00bb1f43e6f2d3 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 14 Aug 2021 14:31:09 +0200 Subject: [PATCH 001/214] standalone slideshow: fix auto refresh --- slideshow/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slideshow/index.php b/slideshow/index.php index 7382fdf64..e84e071d9 100644 --- a/slideshow/index.php +++ b/slideshow/index.php @@ -20,7 +20,7 @@ - + <?=$config['ui']['branding']?> Slideshow From 828c77e840fe5d928a3595396bde6ecbd9075b16 Mon Sep 17 00:00:00 2001 From: jacques42 Date: Mon, 16 Aug 2021 14:50:39 +0200 Subject: [PATCH 002/214] bugfix: hide inner navigation panel if thrill is triggered from results screen --- src/js/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/core.js b/src/js/core.js index fc790864f..520d8d9fe 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -324,8 +324,8 @@ const photoBooth = (function () { api.thrill = function (photoStyle) { api.closeNav(); api.reset(); - api.showResultInner(false); api.closeGallery(); + api.showResultInner(false); remoteBuzzerClient.inProgress(true); From e8215cccea632dfc1d3705cb0b46a6be4906c79b Mon Sep 17 00:00:00 2001 From: jacques42 Date: Mon, 16 Aug 2021 16:08:29 +0200 Subject: [PATCH 003/214] remotebuzzer: Allow to configure GPIO debouce delay through admin panel. --- config/config.inc.php | 1 + lib/configsetup.inc.php | 13 ++++++++++++- resources/lang/en.json | 2 ++ src/js/remotebuzzer_server.js | 10 +++++----- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/config/config.inc.php b/config/config.inc.php index 3057236d1..9f7b54e69 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -248,6 +248,7 @@ $config['remotebuzzer']['shutdowngpio'] = 16; $config['remotebuzzer']['shutdownholdtime'] = '5'; $config['remotebuzzer']['port'] = 14711; +$config['remotebuzzer']['debounce'] = 30; // S Y N C T O U S B S T I C K diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 936baf80c..bc34cd2fe 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -1453,7 +1453,18 @@ 'name' => 'remotebuzzer[enable_standalonegallery]', 'value' => $config['remotebuzzer']['enable_standalonegallery'], ], - 'remotebuzzer_logfile' => [ + 'remotebuzzer_debounce' => [ + 'view' => 'expert', + 'type' => 'range', + 'placeholder' => $defaultConfig['remotebuzzer']['debounce'], + 'name' => 'remotebuzzer[debounce]', + 'value' => $config['remotebuzzer']['debounce'], + 'range_min' => 0, + 'range_max' => 100, + 'range_step' => 5, + 'unit' => 'milliseconds', + ], + 'remotebuzzer_logfile' => [ 'view' => 'expert', 'type' => 'hidden', 'name' => 'remotebuzzer[logfile]', diff --git a/resources/lang/en.json b/resources/lang/en.json index 2a8f77c5a..304bbfdf5 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -372,6 +372,7 @@ "manual:print:textonprint_rotation": "Enter a value which is used as degrees the text gets rotated at print.", "manual:remotebuzzer:remotebuzzer_collagebutton": "For COLLAGE connect the hardware button to GPIO20. Pull GPIO to ground for to trigger. If enabled, long-press on PICTURE button will not trigger collage.", "manual:remotebuzzer:remotebuzzer_collagetime": "If PICTURE button pressed less than seconds here, a picture is triggered. If pressed more seconds than here, a collage is triggered. Only works if collage is enabled in the admin settings and the collage button is disbaled.", + "manual:remotebuzzer:remotebuzzer_debounce": "Debounce time for hardware buttons [ms]", "manual:remotebuzzer:remotebuzzer_enable_standalonegallery": "Controls whether the rotary encoder is active on the standalone gallery view.", "manual:remotebuzzer:remotebuzzer_logfile": "In Dev-Mode server debugging information will be written to the logfile, located in the tmp folder and defaults to io_server.log.", "manual:remotebuzzer:remotebuzzer_picturebutton": "For PICTURE connect the hardware button to GPIO21. Pull GPIO to ground for to trigger. Long-press will trigger COLLAGE, if enabled and Collage hardware button is disabled.", @@ -487,6 +488,7 @@ "remotebuzzer": "Hardware Button", "remotebuzzer:remotebuzzer_collagebutton": "Collage Button", "remotebuzzer:remotebuzzer_collagetime": "Seconds to trigger collage", + "remotebuzzer:remotebuzzer_debounce": "Debounce time", "remotebuzzer:remotebuzzer_enable_standalonegallery": "Rotary for standalone gallery", "remotebuzzer:remotebuzzer_logfile": "Logfile", "remotebuzzer:remotebuzzer_picturebutton": "Picture Button", diff --git a/src/js/remotebuzzer_server.js b/src/js/remotebuzzer_server.js index 5ffb449aa..d2833499a 100644 --- a/src/js/remotebuzzer_server.js +++ b/src/js/remotebuzzer_server.js @@ -511,7 +511,7 @@ if (config.remotebuzzer.userotary) { log('ROTARY support active'); const rotaryClk = new Gpio(config.remotebuzzer.rotaryclkgpio, 'in', 'both'); const rotaryDt = new Gpio(config.remotebuzzer.rotarydtgpio, 'in', 'both'); - const rotaryBtn = new Gpio(config.remotebuzzer.rotarybtngpio, 'in', 'both', {debounceTimeout: 20}); + const rotaryBtn = new Gpio(config.remotebuzzer.rotarybtngpio, 'in', 'both', {debounceTimeout: config.remotebuzzer.debounce}); rotaryClkPin = 0; rotaryDtPin = 0; @@ -535,7 +535,7 @@ if (config.remotebuzzer.userotary) { if (config.remotebuzzer.usebuttons) { log('BUTTON support active'); if (config.remotebuzzer.picturebutton) { - const pictureButton = new Gpio(config.remotebuzzer.picturegpio, 'in', 'both', {debounceTimeout: 20}); + const pictureButton = new Gpio(config.remotebuzzer.picturegpio, 'in', 'both', {debounceTimeout: config.remotebuzzer.debounce}); if (!config.remotebuzzer.collagebutton && config.collage.enabled) { pictureButton.watch(watchPictureGPIOwithCollage); @@ -549,21 +549,21 @@ if (config.remotebuzzer.usebuttons) { /* COLLAGE BUTTON */ if (config.remotebuzzer.collagebutton && config.collage.enabled) { - const collageButton = new Gpio(config.remotebuzzer.collagegpio, 'in', 'both', {debounceTimeout: 20}); + const collageButton = new Gpio(config.remotebuzzer.collagegpio, 'in', 'both', {debounceTimeout: config.remotebuzzer.debounce}); collageButton.watch(watchCollageGPIO); log('Looking for Collage Button on Raspberry GPIO', config.remotebuzzer.collagegpio); } /* SHUTDOWN BUTTON */ if (config.remotebuzzer.shutdownbutton) { - const shutdownButton = new Gpio(config.remotebuzzer.shutdowngpio, 'in', 'both', {debounceTimeout: 20}); + const shutdownButton = new Gpio(config.remotebuzzer.shutdowngpio, 'in', 'both', {debounceTimeout: config.remotebuzzer.debounce}); shutdownButton.watch(watchShutdownGPIO); log('Looking for Shutdown Button on Raspberry GPIO', config.remotebuzzer.shutdowngpio); } /* PRINT BUTTON */ if (config.remotebuzzer.printbutton) { - const printButton = new Gpio(config.remotebuzzer.printgpio, 'in', 'both', {debounceTimeout: 20}); + const printButton = new Gpio(config.remotebuzzer.printgpio, 'in', 'both', {debounceTimeout: config.remotebuzzer.debounce}); printButton.watch(watchPrintGPIO); log('Looking for Print Button on Raspberry GPIO', config.remotebuzzer.printgpio); } From 38a21dc2566e0873d1a95be9302ea4daff2545b0 Mon Sep 17 00:00:00 2001 From: jacques42 Date: Mon, 16 Aug 2021 16:10:23 +0200 Subject: [PATCH 004/214] remotebuzzer: add debounce time to admin panel now linted --- lib/configsetup.inc.php | 4 ++-- src/js/remotebuzzer_server.js | 20 +++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index bc34cd2fe..860ec9949 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -1463,8 +1463,8 @@ 'range_max' => 100, 'range_step' => 5, 'unit' => 'milliseconds', - ], - 'remotebuzzer_logfile' => [ + ], + 'remotebuzzer_logfile' => [ 'view' => 'expert', 'type' => 'hidden', 'name' => 'remotebuzzer[logfile]', diff --git a/src/js/remotebuzzer_server.js b/src/js/remotebuzzer_server.js index d2833499a..ba411ef38 100644 --- a/src/js/remotebuzzer_server.js +++ b/src/js/remotebuzzer_server.js @@ -511,7 +511,9 @@ if (config.remotebuzzer.userotary) { log('ROTARY support active'); const rotaryClk = new Gpio(config.remotebuzzer.rotaryclkgpio, 'in', 'both'); const rotaryDt = new Gpio(config.remotebuzzer.rotarydtgpio, 'in', 'both'); - const rotaryBtn = new Gpio(config.remotebuzzer.rotarybtngpio, 'in', 'both', {debounceTimeout: config.remotebuzzer.debounce}); + const rotaryBtn = new Gpio(config.remotebuzzer.rotarybtngpio, 'in', 'both', { + debounceTimeout: config.remotebuzzer.debounce + }); rotaryClkPin = 0; rotaryDtPin = 0; @@ -535,7 +537,9 @@ if (config.remotebuzzer.userotary) { if (config.remotebuzzer.usebuttons) { log('BUTTON support active'); if (config.remotebuzzer.picturebutton) { - const pictureButton = new Gpio(config.remotebuzzer.picturegpio, 'in', 'both', {debounceTimeout: config.remotebuzzer.debounce}); + const pictureButton = new Gpio(config.remotebuzzer.picturegpio, 'in', 'both', { + debounceTimeout: config.remotebuzzer.debounce + }); if (!config.remotebuzzer.collagebutton && config.collage.enabled) { pictureButton.watch(watchPictureGPIOwithCollage); @@ -549,21 +553,27 @@ if (config.remotebuzzer.usebuttons) { /* COLLAGE BUTTON */ if (config.remotebuzzer.collagebutton && config.collage.enabled) { - const collageButton = new Gpio(config.remotebuzzer.collagegpio, 'in', 'both', {debounceTimeout: config.remotebuzzer.debounce}); + const collageButton = new Gpio(config.remotebuzzer.collagegpio, 'in', 'both', { + debounceTimeout: config.remotebuzzer.debounce + }); collageButton.watch(watchCollageGPIO); log('Looking for Collage Button on Raspberry GPIO', config.remotebuzzer.collagegpio); } /* SHUTDOWN BUTTON */ if (config.remotebuzzer.shutdownbutton) { - const shutdownButton = new Gpio(config.remotebuzzer.shutdowngpio, 'in', 'both', {debounceTimeout: config.remotebuzzer.debounce}); + const shutdownButton = new Gpio(config.remotebuzzer.shutdowngpio, 'in', 'both', { + debounceTimeout: config.remotebuzzer.debounce + }); shutdownButton.watch(watchShutdownGPIO); log('Looking for Shutdown Button on Raspberry GPIO', config.remotebuzzer.shutdowngpio); } /* PRINT BUTTON */ if (config.remotebuzzer.printbutton) { - const printButton = new Gpio(config.remotebuzzer.printgpio, 'in', 'both', {debounceTimeout: config.remotebuzzer.debounce}); + const printButton = new Gpio(config.remotebuzzer.printgpio, 'in', 'both', { + debounceTimeout: config.remotebuzzer.debounce + }); printButton.watch(watchPrintGPIO); log('Looking for Print Button on Raspberry GPIO', config.remotebuzzer.printgpio); } From 3e0b6c38e1469d9b617a7b5a8dca4a42477f9b58 Mon Sep 17 00:00:00 2001 From: Christian Tarne Date: Tue, 25 May 2021 10:44:40 +0200 Subject: [PATCH 005/214] install-raspbian.sh: allow silent installation Usage: sudo bash install-raspbian.sh WEBSERVER silent (replace WEBSERVER with apache, lighttpd or nginx e.g. sudo bash install-raspbian.sh apache silent) Change-Id: Ic4bbc38222678aca2427c1e986731a0832d15f02 --- install-raspbian.sh | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/install-raspbian.sh b/install-raspbian.sh index d99837c17..63f24d9a8 100755 --- a/install-raspbian.sh +++ b/install-raspbian.sh @@ -7,6 +7,7 @@ set -e # set -x RUNNING_ON_PI=true +SILENT_INSTALL=false if [ ! -z $1 ]; then webserver=$1 @@ -14,6 +15,11 @@ else webserver=apache fi +if [ "silent" = "$2" ]; then + SILENT_INSTALL=true + info "Performing silent install" +fi + function info { echo -e "\033[0;36m${1}\033[0m" } @@ -22,10 +28,19 @@ function error { echo -e "\033[0;31m${1}\033[0m" } +#Param 1: Question / Param 2: Default / silent answer +function ask_yes_no { + if [ "$SILENT_INSTALL" = false ]; then + read -p "${1}: " -n 1 -r + else + REPLY=${2} + fi +} + function no_raspberry { info "WARNING: This reset script is intended to run on a Raspberry Pi." info "Running the script on other devices running Debian / a Debian based distribution is possible, but PI specific features will be missing!" - read -p "Do you want to continue? (y/n)" -n 1 -r + ask_yes_no "Do you want to continue? (y/n)" "Y" if [[ $REPLY =~ ^[Yy]$ ]] then RUNNING_ON_PI=false @@ -199,9 +214,9 @@ for package in "${COMMON_PACKAGES[@]}"; do done echo -e "\033[0;33m### Is Photobooth the only website on this system?" -read -p "### Warning: If typing y, the whole /var/www/html folder will be removed! [y/N] " -n 1 -r deleteHtmlFolder +ask_yes_no "### Warning: If typing y, the whole /var/www/html folder will be removed! [y/N] " "Y" echo -e "\033[0m" -if [ "$deleteHtmlFolder" != "${deleteHtmlFolder#[Yy]}" ] ;then +if [ "$REPLY" != "${REPLY#[Yy]}" ] ;then info "### Ok, we will replace the html folder with the Photobooth." cd /var/www/ rm -rf html @@ -223,7 +238,7 @@ echo -e "\033[0;33m### Please select a version to install:" echo -e " 1 Install last development version" echo -e " 2 Install latest stable Release: $LATEST_VERSION" echo -e " 3 Install last v2 Release (v2.10.0)" -read -p "Please enter your choice: " -n 1 -r +ask_yes_no "Please enter your choice" "1" echo -e "\033[0m" if [[ $REPLY =~ ^[1]$ ]] then @@ -256,7 +271,7 @@ yarn build # Pi specific setup start if [ "$RUNNING_ON_PI" = true ]; then echo -e "\033[0;33m### Do you like to use a Raspberry Pi (HQ) Camera to take pictures?" -read -p "### If yes, this will generate a personal configuration with all needed changes. [y/N] " -n 1 -r +ask_yes_no "### If yes, this will generate a personal configuration with all needed changes. [y/N] " "Y" echo -e "\033[0m" if [[ $REPLY =~ ^[Yy]$ ]] then @@ -285,7 +300,7 @@ if [ -f "/usr/lib/gvfs/gvfs-gphoto2-volume-monitor" ]; then fi echo -e "\033[0;33m### You probably like to use a printer." -read -p "### You like to install CUPS and set needing printer permissions? [y/N] " -n 1 -r +ask_yes_no "### You like to install CUPS and set needing printer permissions? [y/N] " "Y" echo -e "\033[0m" if [[ $REPLY =~ ^[Yy]$ ]] then @@ -299,7 +314,7 @@ fi # Pi specific setup start if [ "$RUNNING_ON_PI" = true ]; then echo -e "\033[0;33m### You probably like to start the browser on every start." -read -p "### Open Chromium in Kiosk Mode at every boot and hide the mouse cursor? [y/N] " -n 1 -r +ask_yes_no "### Open Chromium in Kiosk Mode at every boot and hide the mouse cursor? [y/N] " "Y" echo -e "\033[0m" if [[ $REPLY =~ ^[Yy]$ ]] then @@ -367,7 +382,7 @@ fi echo -e "\033[0;33m### Sync to USB - this feature will automatically copy (sync) new pictures to a USB stick." echo -e "### The actual configuration will be done in the admin panel but we need to setup Raspberry Pi OS first" -read -p "### Would you like to enable the USB sync file backup? [y/N] " -n 1 -r +ask_yes_no "### Would you like to enable the USB sync file backup? [y/N] " "Y" echo -e "\033[0m" if [[ $REPLY =~ ^[Yy]$ ]] then @@ -402,7 +417,7 @@ info "### Congratulations you finished the install process." info "### Have fun with your Photobooth, but first restart your device." echo -e "\033[0;33m" -read -p "### Do you like to reboot now? [y/N] " -n 1 -r +ask_yes_no "### Do you like to reboot now? [y/N] " "N" echo -e "\033[0m" if [[ $REPLY =~ ^[Yy]$ ]] then From 295324a3b1410d346bfe6968052af5c6b2351ba6 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 17 Aug 2021 21:09:49 +0200 Subject: [PATCH 006/214] install-raspbian.sh: no kiosk-mode by default on silent install Change-Id: I56bdb4e9295f10e0278e56bf5dfc682b7abfbd90 --- install-raspbian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-raspbian.sh b/install-raspbian.sh index 63f24d9a8..c2735fe41 100755 --- a/install-raspbian.sh +++ b/install-raspbian.sh @@ -314,7 +314,7 @@ fi # Pi specific setup start if [ "$RUNNING_ON_PI" = true ]; then echo -e "\033[0;33m### You probably like to start the browser on every start." -ask_yes_no "### Open Chromium in Kiosk Mode at every boot and hide the mouse cursor? [y/N] " "Y" +ask_yes_no "### Open Chromium in Kiosk Mode at every boot and hide the mouse cursor? [y/N] " "N" echo -e "\033[0m" if [[ $REPLY =~ ^[Yy]$ ]] then From 3f5d3abaf532cd0885f4916e4e169588113bb29e Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 17 Aug 2021 21:25:58 +0200 Subject: [PATCH 007/214] install-rapsbian / photobooth.desktop: adjust chromium flags List of Chromium Command Line Switches: https://peter.sh/experiments/chromium-command-line-switches/ Change-Id: I21cbac69492f7681289614820d9481eb8d69b2b6 --- install-raspbian.sh | 2 +- photobooth.desktop | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install-raspbian.sh b/install-raspbian.sh index c2735fe41..209215ca7 100755 --- a/install-raspbian.sh +++ b/install-raspbian.sh @@ -325,7 +325,7 @@ then @xset s off @xset -dpms @xset s noblank -@chromium-browser --incognito --kiosk http://localhost/ +@chromium-browser --noerrdialogs --disable-infobars --disable-translate --no-first-run --check-for-update-interval=31536000 --use-fake-ui-for-media-stream --start-fullscreen --kiosk http://127.0.0.1 --incognito --touch-events=enabled @unclutter -idle 3 diff --git a/photobooth.desktop b/photobooth.desktop index 6cb2e3065..958005290 100644 --- a/photobooth.desktop +++ b/photobooth.desktop @@ -1,9 +1,9 @@ [Desktop Entry] -Version=1.0 +Version=1.1 Terminal=false Type=Application Name=Photobooth -Exec=chromium-browser --noerrdialogs --start-fullscreen --kiosk http://127.0.0.1 --incognito --disable-translate --no-first-run --fast --fast-start --disable-infobars --touch-events=enabled +Exec=chromium-browser --noerrdialogs --disable-infobars --disable-translate --no-first-run --check-for-update-interval=31536000 --use-fake-ui-for-media-stream --start-fullscreen --kiosk http://127.0.0.1 --incognito --touch-events=enabled Icon=/var/www/html/resources/img/favicon-96x96.png StartupNotify=false Terminal=false From 2da81f696c74459860bdf1b3e323879a1be7b5ec Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 17 Aug 2021 21:48:34 +0200 Subject: [PATCH 008/214] Install-raspbian: no Pi Cam by default on silent install --- install-raspbian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-raspbian.sh b/install-raspbian.sh index 209215ca7..4e70cd60f 100755 --- a/install-raspbian.sh +++ b/install-raspbian.sh @@ -271,7 +271,7 @@ yarn build # Pi specific setup start if [ "$RUNNING_ON_PI" = true ]; then echo -e "\033[0;33m### Do you like to use a Raspberry Pi (HQ) Camera to take pictures?" -ask_yes_no "### If yes, this will generate a personal configuration with all needed changes. [y/N] " "Y" +ask_yes_no "### If yes, this will generate a personal configuration with all needed changes. [y/N] " "N" echo -e "\033[0m" if [[ $REPLY =~ ^[Yy]$ ]] then From eaa6e9df2061df073eb9eb76d5e9fecb1ff8c2ce Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Wed, 18 Aug 2021 06:59:51 +0200 Subject: [PATCH 009/214] general: add config to use sample pictures instead taking a picture Dev Mode now enables advanced logging also while taking a picture without using sample pictures. Enable Dev-Mode by default. Change-Id: Ic9227bfafd9b71ff05b921dbcce0bcf4f4adc74a --- api/takePic.php | 2 +- config/config.inc.php | 3 ++- lib/configsetup.inc.php | 6 ++++++ resources/lang/en.json | 4 +++- src/js/core.js | 11 ++++++++--- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/api/takePic.php b/api/takePic.php index ee20c7d77..2e8b6c230 100644 --- a/api/takePic.php +++ b/api/takePic.php @@ -8,7 +8,7 @@ function takePicture($filename) { global $config; - if ($config['dev']['enabled']) { + if ($config['dev']['demo_images']) { $demoFolder = __DIR__ . '/../resources/img/demo/'; $devImg = array_diff(scandir($demoFolder), ['.', '..']); copy($demoFolder . $devImg[array_rand($devImg)], $filename); diff --git a/config/config.inc.php b/config/config.inc.php index 9f7b54e69..4d2a446da 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -10,7 +10,8 @@ // possible language values: de, el, en, es, fr, pl, it $config['ui']['language'] = 'en'; $config['adminpanel']['view'] = 'basic'; -$config['dev']['enabled'] = false; +$config['dev']['enabled'] = true; +$config['dev']['demo_images'] = false; $config['start_screen']['title'] = 'Photobooth'; $config['start_screen']['title_visible'] = true; $config['start_screen']['subtitle'] = NULL; diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 860ec9949..40381dcac 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -111,6 +111,12 @@ 'name' => 'dev[enabled]', 'value' => $config['dev']['enabled'], ], + 'dev_demo_images' => [ + 'view' => 'expert', + 'type' => 'checkbox', + 'name' => 'dev[demo_images]', + 'value' => $config['dev']['demo_images'], + ], 'dev_debugpanel' => [ 'view' => 'expert', 'type' => 'button', diff --git a/resources/lang/en.json b/resources/lang/en.json index 304bbfdf5..d59371fdd 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -124,6 +124,7 @@ "general:database_rebuild": "Rebuild image database", "general:delete_no_request": "Delete images without confirm request", "general:dev_debugpanel": "Debug Panel", + "general:dev_demo_images": "Use Demo Images", "general:dev_enabled": "Dev-Mode", "general:dev_error_messages": "Show error messages", "general:dev_reload_on_error": "Automatically reload Photobooth on error", @@ -265,7 +266,8 @@ "manual:general:database_rebuild": "Rebuild the images database. Normally not required but can be used to fix a corrupted database file.", "manual:general:delete_no_request": "If enabled, images will be deleted without a confirm request. Delete of images can't be undone!", "manual:general:dev_debugpanel": "Opens the debug panel in a separate window. Make sure you have Dev-Mode enabled for more information.", - "manual:general:dev_enabled": "Enables development mode. Sample pictures will be used instead taking a picture.", + "manual:general:dev_demo_images": "If enabled, sample pictures will be used instead taking a picture.", + "manual:general:dev_enabled": "Enables development mode with advanced logging.", "manual:general:dev_error_messages": "If enabled real error messages are shown on error.", "manual:general:dev_reload_on_error": "If an error occurs while taking a picture, Photobooth will reload automatically after 5 seconds.", "manual:general:diskusage_button": "This will show the actual disk space utilization through Photobooth data files (pictures, database, etc.).", diff --git a/src/js/core.js b/src/js/core.js index 520d8d9fe..2ee72d197 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -399,7 +399,12 @@ const photoBooth = (function () { api.stopPreviewVideo(); } - if (config.preview.mode === 'device_cam' && config.preview.camTakesPic && !api.stream && !config.dev.enabled) { + if ( + config.preview.mode === 'device_cam' && + config.preview.camTakesPic && + !api.stream && + !config.dev.demo_images + ) { console.log('No preview by device cam available!'); api.errorPic({ @@ -423,7 +428,7 @@ const photoBooth = (function () { remoteBuzzerClient.inProgress(true); if (config.preview.mode === 'device_cam' || config.preview.mode === 'gphoto') { - if (config.preview.camTakesPic && !config.dev.enabled) { + if (config.preview.camTakesPic && !config.dev.demo_images) { videoSensor.width = videoView.videoWidth; videoSensor.height = videoView.videoHeight; videoSensor.getContext('2d').drawImage(videoView, 0, 0); @@ -598,7 +603,7 @@ const photoBooth = (function () { loader.addClass('error'); const errormsg = api.getTranslation('error'); $('.loading').append($('

').text(errormsg)); - if (config.dev.error_messages || config.dev.enabled) { + if (config.dev.error_messages) { $('.loading').append($('

').text(data.error)); } if (config.dev.reload_on_error) { From 171baa9e1ee58db78baaee529400681548f5b315 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 19 Aug 2021 08:05:44 +0200 Subject: [PATCH 010/214] [Bugfix] picture and mail database always need a name --- api/admin.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/admin.php b/api/admin.php index 0acf40917..e230f6e1c 100644 --- a/api/admin.php +++ b/api/admin.php @@ -127,6 +127,14 @@ $newConfig['synctodrive']['enabled'] = false; } + if (isset($newConfig['database']['file']) && empty($newConfig['database']['file'])) { + $newConfig['database']['file'] = 'db'; + } + + if (isset($newConfig['mail']['file']) && empty($newConfig['mail']['file'])) { + $newConfig['mail']['file'] = 'mail-adresses'; + } + if (isset($newConfig['remotebuzzer']['port']) && empty($newConfig['remotebuzzer']['port'])) { $newConfig['remotebuzzer']['port'] = 14711; } From 8692f2e3dcddb579113cd961874de7ada42437ca Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 19 Aug 2021 19:10:07 +0200 Subject: [PATCH 011/214] (config) Switch from milliseconds to seconds the image is visible on result screen Change-Id: I78147ac8863c2bc820436e23ac7b14aa829a8b5e --- config/config.inc.php | 4 ++-- lib/configsetup.inc.php | 8 ++++---- resources/lang/en.json | 2 +- src/js/core.js | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/config.inc.php b/config/config.inc.php index 4d2a446da..9d1903042 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -25,8 +25,8 @@ $config['webserver']['ssid'] = 'Photobooth'; $config['download']['enabled'] = true; $config['download']['thumbs'] = false; -// control time in milliseconds until Photobooth reloads automatically -$config['picture']['time_to_live'] = '90000'; +// control time in seconds until Photobooth reloads automatically +$config['picture']['time_to_live'] = '90'; $config['picture']['preview_before_processing'] = false; $config['delete']['no_request'] = false; $config['database']['enabled'] = true; diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 40381dcac..a9006596d 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -210,10 +210,10 @@ 'placeholder' => $defaultConfig['picture']['time_to_live'], 'name' => 'picture[time_to_live]', 'value' => $config['picture']['time_to_live'], - 'range_min' => 1000, - 'range_max' => 90000, - 'range_step' => 1000, - 'unit' => 'milliseconds', + 'range_min' => 1, + 'range_max' => 90, + 'range_step' => 1, + 'unit' => 'seconds', ], 'picture_preview_before_processing' => [ 'view' => 'expert', diff --git a/resources/lang/en.json b/resources/lang/en.json index d59371fdd..19da14f31 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -275,7 +275,7 @@ "manual:general:download_thumbs": "If enabled, thumbnails will be used at download (if exist) instead the full sized image.", "manual:general:picture_preview_before_processing": "If enabled, images are preloaded and shown during filter processing.", "manual:general:picture_thumb_size": "Choose thumbnail size: XS = max 360px, S = max 540px, M = max 900px, L = max 1080px, XL = max 1260px", - "manual:general:picture_time_to_live": "Enter a value used as milliseconds. This value defines the time your picture is visible on the result screen after taking a picture.", + "manual:general:picture_time_to_live": "Choose a time between 1 and 90 seconds. Your picture is visible for that time on the result screen after taking it.", "manual:general:qr_enabled": "If enabled, a QR-Button is visible on the result screen and inside gallery. User can download a picture while scanning the QR-Code. If you're accessing Photobooth via \"localhost\", \"127.0.0.1\" or if you have Photobooth installed inside a subfolder, please define IP address of the Photobooth web server to make the QR-Code working.

Example if Photobooth can be accessed directly: 192.168.0.50.

Example if Photobooth is installed inside a subfolder: 192.168.0.50/photobooth.

", "manual:general:start_screen_subtitle": "Enter the subtitle visible on startpage.", "manual:general:start_screen_subtitle_visible": "If enabled, entered subtitle is visible on start screen.", diff --git a/src/js/core.js b/src/js/core.js index 2ee72d197..a47d248b2 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -71,7 +71,7 @@ const photoBooth = (function () { if (!takingPic) { timeOut = setTimeout(function () { api.reloadPage(); - }, config.picture.time_to_live); + }, config.picture.time_to_live * 1000); } }; From 2fbdac3fdbb29d8f1a6cd466ab6b02946c72febe Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 19 Aug 2021 19:48:29 +0200 Subject: [PATCH 012/214] ui: add option to show / hide button bar on result screen Change-Id: I1988943dd5832a8ea5045969f3c7cc4f0cce881f --- config/config.inc.php | 1 + lib/configsetup.inc.php | 6 ++++++ resources/lang/en.json | 2 ++ src/js/core.js | 4 +--- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/config/config.inc.php b/config/config.inc.php index 9d1903042..b894e0e4e 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -275,6 +275,7 @@ $config['ui']['style'] = 'modern'; $config['button']['show_fs'] = false; $config['button']['homescreen'] = true; +$config['ui']['result_buttons'] = true; $config['ui']['font_size'] = '16px'; $config['colors']['countdown'] = '#ffffff'; $config['colors']['background_countdown'] = '#214852'; diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index a9006596d..eeaf4486a 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -1603,6 +1603,12 @@ 'name' => 'button[homescreen]', 'value' => $config['button']['homescreen'], ], + 'ui_result_buttons' => [ + 'view' => 'advanced', + 'type' => 'checkbox', + 'name' => 'ui[result_buttons]', + 'value' => $config['ui']['result_buttons'], + ], 'ui_font_size' => [ 'view' => 'advanced', 'type' => 'input', diff --git a/resources/lang/en.json b/resources/lang/en.json index 19da14f31..da8e18626 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -402,6 +402,7 @@ "manual:userinterface:button_show_fs": "If enabled, a button to toggle fullscreenmode will be added to the start screen.", "manual:userinterface:ui_decore_lines": "If enabled, decorate lines will be visible on start page.", "manual:userinterface:ui_font_size": "Enter the default font size used for the Photobooth interface.", + "manual:userinterface:ui_result_buttons": "If enabled, post-processing buttons will be visible on the on result screen. If disabled the whole button bar will be hidden.", "manual:userinterface:ui_rounded_corners": "If enabled, the Photobooth UI uses smooth rounded edges.", "manual:userinterface:ui_style": "Choose a start page styling. To use custom styling please create and use \"/template/custom.template.php\" and \"/resources/css/custom_style.css\", if one of these files is not readable we will fallback to default theme.", "manual:version:check_version": "This will check online against the Github repository for the latest Photobooth version.", @@ -556,6 +557,7 @@ "userinterface:colors_start_font": "Start screen font color", "userinterface:ui_decore_lines": "Show decorate lines", "userinterface:ui_font_size": "Default font size", + "userinterface:ui_result_buttons": "Show button bar on result screen", "userinterface:ui_rounded_corners": "Rounded corners", "userinterface:ui_style": "Styling", "using_latest_version": "You are using the latest version of photobooth.", diff --git a/src/js/core.js b/src/js/core.js index a47d248b2..f2053e998 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -35,8 +35,6 @@ const photoBooth = (function () { $(selector).addClass('modal--show'); }, close: function (selector) { - //api.showResultInner(true); - if ($(selector).hasClass('modal--show')) { $(selector).removeClass('modal--show'); @@ -787,7 +785,7 @@ const photoBooth = (function () { startPage.hide(); resultPage.show(); - api.showResultInner(true); + api.showResultInner(config.ui.result_buttons); loader.removeClass('open'); From b52b85aad0f79e3657b58e9c4c1de6b136dee197 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 19 Aug 2021 19:52:57 +0200 Subject: [PATCH 013/214] workflows: build zip on push and pr Change-Id: I015137a0e100aa4c1e7b3ac3291d5c72c4aafabf --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..f9d146195 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build + +on: + push: + branches: + - dev + - stable2 + - stable3 + pull_request: + branches: + - dev + - stable2 + - stable3 + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository and submodules + uses: actions/checkout@v2 + with: + submodules: true + - name: Install modules + run: yarn install + - name: Build + run: yarn build + - name: Get git status + run: git status + - name: Pack zip + run: yarn pack:build + - name: Publish zip + uses: actions/upload-artifact@v2 + with: + name: photobooth + path: archives/photobooth-*.zip + From 7f0ff2916c3a8b0ba983c063694d06828b3c1ec6 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Fri, 20 Aug 2021 05:52:37 +0200 Subject: [PATCH 014/214] workflows (build): only dev branch, not on dependabot changes --- .github/workflows/build.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9d146195..a7b034317 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,13 +4,9 @@ on: push: branches: - dev - - stable2 - - stable3 pull_request: branches: - dev - - stable2 - - stable3 workflow_dispatch: jobs: @@ -31,7 +27,7 @@ jobs: run: yarn pack:build - name: Publish zip uses: actions/upload-artifact@v2 + if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' with: name: photobooth path: archives/photobooth-*.zip - From 80dcfd39cd1651d315a310686cd101bf42d8f61d Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 21 Aug 2021 13:28:04 +0200 Subject: [PATCH 015/214] private: add README to private folder Change-Id: I7cf5eaad2828696d009027db77c90094e82ce1af --- .gitignore | 3 ++- private/README.md | 4 ++++ scripts/pack-build.js | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 private/README.md diff --git a/.gitignore b/.gitignore index f92976bc6..341c8d1a0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,8 @@ digicamcontrol/ manual/faq.* node_modules/ package-lock.json -private/ +private/* +!private/README.md resources/css/* !resources/css/README.md resources/js/* diff --git a/private/README.md b/private/README.md new file mode 100644 index 000000000..56939351a --- /dev/null +++ b/private/README.md @@ -0,0 +1,4 @@ +### Photobooth private files + +All files and folders inside here will be ignored on git. Please use this folder to place your own files (e.g. own frames, own backgrounds, own font ...). + diff --git a/scripts/pack-build.js b/scripts/pack-build.js index 453a39046..6a5987d62 100644 --- a/scripts/pack-build.js +++ b/scripts/pack-build.js @@ -69,6 +69,7 @@ function createArchive(fileName, archive) { archive.file('package.json'); archive.file('photobooth.desktop'); archive.file('phpinfo.php'); + archive.file('private/README.md'); archive.file('README.md'); archive.file('update-booth.sh'); archive.directory('node_modules/@andreasremdt/simple-translator/'); From ba4e0e0e3f576a216831ee4abb40581fbed1b71c Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 21 Aug 2021 13:42:55 +0200 Subject: [PATCH 016/214] style: allow adjustments via private/overrides.css - small changes can be made here instead using a whole own theme - idea taken from https://github.com/marcel-hofer/photobooth/commit/dce54767613668fc1f019f0625cd83f669953aad , adjusted file location to ignore on github Change-Id: I9f291b445cf9e0e203d5ecc2e86e093a862df683 --- admin/debugpanel.php | 3 +++ admin/diskusage.php | 3 +++ admin/index.php | 5 ++++- chromakeying.php | 3 +++ gallery.php | 3 +++ index.php | 3 +++ livechroma.php | 3 +++ login/index.php | 3 +++ manual/index.php | 3 +++ slideshow/index.php | 3 +++ 10 files changed, 31 insertions(+), 1 deletion(-) diff --git a/admin/debugpanel.php b/admin/debugpanel.php index bb5878a33..b2dbffcd5 100644 --- a/admin/debugpanel.php +++ b/admin/debugpanel.php @@ -39,6 +39,9 @@ + + + diff --git a/admin/diskusage.php b/admin/diskusage.php index 6f7f5b4e5..0f4ca6144 100644 --- a/admin/diskusage.php +++ b/admin/diskusage.php @@ -46,6 +46,9 @@ + + + diff --git a/admin/index.php b/admin/index.php index 8204a11c2..630aea66c 100644 --- a/admin/index.php +++ b/admin/index.php @@ -34,6 +34,9 @@ + + + @@ -291,4 +294,4 @@ function isElementHidden($element_class, $setting) - \ No newline at end of file + diff --git a/chromakeying.php b/chromakeying.php index 7c9843ff4..b73fbba9d 100644 --- a/chromakeying.php +++ b/chromakeying.php @@ -57,6 +57,9 @@ + + +
diff --git a/gallery.php b/gallery.php index 73f9cc13c..a6284cffc 100644 --- a/gallery.php +++ b/gallery.php @@ -53,6 +53,9 @@ + + + diff --git a/index.php b/index.php index 66cc78c41..62768cfe9 100644 --- a/index.php +++ b/index.php @@ -70,6 +70,9 @@ + + + diff --git a/livechroma.php b/livechroma.php index e8b3b13b1..c30fd6640 100644 --- a/livechroma.php +++ b/livechroma.php @@ -60,6 +60,9 @@ + + +
diff --git a/login/index.php b/login/index.php index ca47c8b0e..f79a0ce4b 100644 --- a/login/index.php +++ b/login/index.php @@ -49,6 +49,9 @@ + + + diff --git a/manual/index.php b/manual/index.php index 0b77e0620..9a78e9069 100644 --- a/manual/index.php +++ b/manual/index.php @@ -39,6 +39,9 @@ + + +
diff --git a/slideshow/index.php b/slideshow/index.php index e84e071d9..7d05a6913 100644 --- a/slideshow/index.php +++ b/slideshow/index.php @@ -39,6 +39,9 @@ + + + From 81b5dbea9eeb6309e2f23308b22a0aefa500870c Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 21 Aug 2021 14:00:58 +0200 Subject: [PATCH 017/214] build: add "clean" task Change-Id: Ia90939cb1760c28c7e5acebd70b06b9619f46f66 --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index 9a6b63f70..787ac1af1 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,11 @@ "build:faq": "mdown --input 'faq/*.md' --output manual --header faq/header.php --footer faq/footer.html && mv manual/faq.html manual/faq.php", "build:gulp": "gulp", "build:sass": "gulp sass", + "clean": "npm-run-all --parallel clean:*", + "clean:css": "rm resources/css/*.css || echo 'resources/css/*.css can not be removed or no .css files exist!'", + "clean:faq": "rm manual/faq.php || echo 'faq.php can not be removed or does not exist!'", + "clean:js": "rm resources/js/*.js || echo 'resources/js/*.js can not be removed or no .js files exist!'", + "clean:node": "rm -rf node_modules/ || echo 'node_modules/ can not be removed or does not exist!'", "eslint": "eslint src/js/*.js", "eslint:fix": "eslint src/js/*.js --fix", "format": "npm-run-all --parallel format:*", From e364ddfa90610b21d40547be3b5f5d76a701cfce Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 21 Aug 2021 14:19:11 +0200 Subject: [PATCH 018/214] install-raspbian: don't delete INSTALLFOLDERPATH if exists Change-Id: I651f9bb417ee107d6b970b941cc392a49c10f80c --- install-raspbian.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/install-raspbian.sh b/install-raspbian.sh index 4e70cd60f..0de929277 100755 --- a/install-raspbian.sh +++ b/install-raspbian.sh @@ -8,6 +8,7 @@ set -e RUNNING_ON_PI=true SILENT_INSTALL=false +DATE=$(date +"%Y%m%d-%H-%M") if [ ! -z $1 ]; then webserver=$1 @@ -214,19 +215,35 @@ for package in "${COMMON_PACKAGES[@]}"; do done echo -e "\033[0;33m### Is Photobooth the only website on this system?" -ask_yes_no "### Warning: If typing y, the whole /var/www/html folder will be removed! [y/N] " "Y" +echo -e "### NOTE: If typing y, the whole /var/www/html folder will be renamed" +ask_yes_no " to /var/www/html-$DATE if exists! [y/N] " "Y" echo -e "\033[0m" if [ "$REPLY" != "${REPLY#[Yy]}" ] ;then info "### Ok, we will replace the html folder with the Photobooth." cd /var/www/ - rm -rf html INSTALLFOLDER="html" INSTALLFOLDERPATH="/var/www/html" + if [ -d "$INSTALLFOLDERPATH" ]; then + BACKUPFOLDER="html-$DATE" + info "${INSTALLFOLDERPATH} found. Creating backup as ${BACKUPFOLDER}." + mv "$INSTALLFOLDER" "$BACKUPFOLDER" + else + info "$INSTALLFOLDERPATH not found." + fi +fi + else info "### Ok, we will install Photobooth into /var/www/html/photobooth." cd /var/www/html/ INSTALLFOLDER="photobooth" INSTALLFOLDERPATH="/var/www/html/$INSTALLFOLDER" + if [ -d "$INSTALLFOLDERPATH" ]; then + BACKUPFOLDER="photobooth-$DATE" + info "${INSTALLFOLDERPATH} found. Creating backup as ${BACKUPFOLDER}." + mv "$INSTALLFOLDER" "$BACKUPFOLDER" + else + info "$INSTALLFOLDERPATH not found." + fi fi info "### Now we are going to install Photobooth." From cc6c8aa22fe1d4b997058e77575e1d5a218a8abe Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sun, 22 Aug 2021 10:54:50 +0200 Subject: [PATCH 019/214] install-raspbian: inform about URL to access Photobooth Change-Id: I586da155e7183835eab133e68e6ed784a0cfc291 --- install-raspbian.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install-raspbian.sh b/install-raspbian.sh index 0de929277..b2e9e791e 100755 --- a/install-raspbian.sh +++ b/install-raspbian.sh @@ -9,6 +9,7 @@ set -e RUNNING_ON_PI=true SILENT_INSTALL=false DATE=$(date +"%Y%m%d-%H-%M") +IPADDRESS=$('hostname -I | cut -d " " -f 1') if [ ! -z $1 ]; then webserver=$1 @@ -246,6 +247,12 @@ else fi fi +if [ "$INSTALLFOLDER" == "photobooth" ] ;then + $URL = "http://$IPADDRESS/photobooth" +else + $URL = "http://$IPADDRESS" +fi + info "### Now we are going to install Photobooth." git clone https://github.com/andi34/photobooth $INSTALLFOLDER cd $INSTALLFOLDERPATH @@ -431,6 +438,9 @@ fi # Pi specific setup end info "### Congratulations you finished the install process." +info " Photobooth can be accessed at:" +info " $URL" +info "###" info "### Have fun with your Photobooth, but first restart your device." echo -e "\033[0;33m" From 6c454f014ae41b35bfb618d0c0062424c1df6d8a Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sun, 22 Aug 2021 14:09:11 +0200 Subject: [PATCH 020/214] debugpanel: show latest git changes of installation Change-Id: I1d34763dc29b97d2b2dabf9c6a40164dd9c91e0d --- .gitignore | 1 + admin/debugpanel.php | 1 + api/serverInfo.php | 16 ++++++++++++++++ package.json | 4 +++- resources/lang/en.json | 1 + scripts/pack-build.js | 1 + 6 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 341c8d1a0..5640c295c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ config/* !config/config.inc.php data/ digicamcontrol/ +HEAD manual/faq.* node_modules/ package-lock.json diff --git a/admin/debugpanel.php b/admin/debugpanel.php index b2dbffcd5..d1dbf86b7 100644 --- a/admin/debugpanel.php +++ b/admin/debugpanel.php @@ -95,6 +95,7 @@ function html_src_indent($num) echo '
  • cameralog
  • '; echo '
  • serverprocesses
  • '; echo '
  • bootconfig
  • '; + echo '
  • githead
  • '; html_src_indent(--$indent); echo ''; diff --git a/api/serverInfo.php b/api/serverInfo.php index b8075e04e..7fe2c8125 100644 --- a/api/serverInfo.php +++ b/api/serverInfo.php @@ -32,6 +32,22 @@ echo dumpfile($config['foldersAbs']['tmp'] . '/' . $config['take_picture']['logfile'], null); break; + case 'nav-githead': + $get_head = shell_exec('git rev-parse --is-inside-work-tree 2>/dev/null && git log --format="%h %s" -n 20 || false'); + $file_path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'HEAD'; + $head_file = realpath($file_path); + + if (is_file($head_file)) { + echo 'Latest commits:' . "\r\n"; + echo dumpfile($head_file, null); + } elseif ($get_head) { + echo 'Latest commits:' . "\r\n"; + echo $get_head; + } else { + echo 'Can not get latest commits of this Photobooth installation.'; + } + break; + default: echo 'Unknown debug panel parameter'; break; diff --git a/package.json b/package.json index 787ac1af1..d63a3bd7f 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,15 @@ "version": "3.0.0", "description": "A Photobooth webinterface for Raspberry Pi and Windows", "scripts": { - "build": "npm-run-all --serial format build:faq build:gulp", + "build": "npm-run-all --serial format build:faq build:gulp build:head", "build:faq": "mdown --input 'faq/*.md' --output manual --header faq/header.php --footer faq/footer.html && mv manual/faq.html manual/faq.php", "build:gulp": "gulp", + "build:head": "git log --format='%h %s' -n 20 > HEAD", "build:sass": "gulp sass", "clean": "npm-run-all --parallel clean:*", "clean:css": "rm resources/css/*.css || echo 'resources/css/*.css can not be removed or no .css files exist!'", "clean:faq": "rm manual/faq.php || echo 'faq.php can not be removed or does not exist!'", + "clean:head": "rm HEAD || echo 'HEAD can not be removed or file not exist!'", "clean:js": "rm resources/js/*.js || echo 'resources/js/*.js can not be removed or no .js files exist!'", "clean:node": "rm -rf node_modules/ || echo 'node_modules/ can not be removed or does not exist!'", "eslint": "eslint src/js/*.js", diff --git a/resources/lang/en.json b/resources/lang/en.json index da8e18626..f765240d4 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -142,6 +142,7 @@ "general:ui_language": "Choose Language", "general:webserver_ip": "IP address of the Photobooth web server", "general:webserver_ssid": "Wireless network name (SSID) used to access the photobooth", + "githead": "Latest changes", "home": "Home", "insertMail": "Enter your e-mail address to receive the photo.", "jpeg_quality": "JPEG quality", diff --git a/scripts/pack-build.js b/scripts/pack-build.js index 6a5987d62..f998bfbf0 100644 --- a/scripts/pack-build.js +++ b/scripts/pack-build.js @@ -63,6 +63,7 @@ function createArchive(fileName, archive) { archive.file('chromakeying.php'); archive.file('faq/index.php'); archive.file('gallery.php'); + archive.file('HEAD'); archive.file('index.php'); archive.file('LICENSE'); archive.file('livechroma.php'); From ecfce5aada617c955fe081c5e82cf8c0b830dd6e Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sun, 22 Aug 2021 23:12:25 +0200 Subject: [PATCH 021/214] install-raspbian: fix getting hostname --- install-raspbian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-raspbian.sh b/install-raspbian.sh index b2e9e791e..3ace1504d 100755 --- a/install-raspbian.sh +++ b/install-raspbian.sh @@ -9,7 +9,7 @@ set -e RUNNING_ON_PI=true SILENT_INSTALL=false DATE=$(date +"%Y%m%d-%H-%M") -IPADDRESS=$('hostname -I | cut -d " " -f 1') +IPADDRESS=$(hostname -I | cut -d " " -f 1) if [ ! -z $1 ]; then webserver=$1 From 69ead612ffc61ca6039812284306b58b93340b1f Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sun, 22 Aug 2021 23:29:07 +0200 Subject: [PATCH 022/214] install-raspbian: one fi to much .... --- install-raspbian.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install-raspbian.sh b/install-raspbian.sh index 3ace1504d..e09e745de 100755 --- a/install-raspbian.sh +++ b/install-raspbian.sh @@ -231,8 +231,6 @@ if [ "$REPLY" != "${REPLY#[Yy]}" ] ;then else info "$INSTALLFOLDERPATH not found." fi -fi - else info "### Ok, we will install Photobooth into /var/www/html/photobooth." cd /var/www/html/ From b3cb9161e954a22daf1cf3b52240e4f859525565 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sun, 22 Aug 2021 23:37:09 +0200 Subject: [PATCH 023/214] install-raspbian: correctly define URL --- install-raspbian.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-raspbian.sh b/install-raspbian.sh index e09e745de..6afba64a2 100755 --- a/install-raspbian.sh +++ b/install-raspbian.sh @@ -246,9 +246,9 @@ else fi if [ "$INSTALLFOLDER" == "photobooth" ] ;then - $URL = "http://$IPADDRESS/photobooth" + URL="http://$IPADDRESS/photobooth" else - $URL = "http://$IPADDRESS" + URL="http://$IPADDRESS" fi info "### Now we are going to install Photobooth." From 3636ee372e66098f357242691e84f0686bebc476 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Mon, 23 Aug 2021 20:18:21 +0200 Subject: [PATCH 024/214] core: central taking picture info on error --- src/js/core.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/js/core.js b/src/js/core.js index f2053e998..a2509583d 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -604,6 +604,11 @@ const photoBooth = (function () { if (config.dev.error_messages) { $('.loading').append($('

    ').text(data.error)); } + takingPic = false; + remoteBuzzerClient.inProgress(false); + if (config.dev.enabled) { + console.log('Taking photo:', takingPic); + } if (config.dev.reload_on_error) { const reloadmsg = api.getTranslation('auto_reload'); $('.loading').append($('

    ').text(reloadmsg)); @@ -649,11 +654,6 @@ const photoBooth = (function () { if (data.error) { api.errorPic(data); - takingPic = false; - remoteBuzzerClient.inProgress(false); - if (config.dev.enabled) { - console.log('Taking photo:', takingPic); - } } else if (photoStyle === 'chroma') { api.renderChroma(data.file); } else { @@ -666,12 +666,6 @@ const photoBooth = (function () { api.errorPic({ error: 'Request failed: ' + textStatus }); - - takingPic = false; - remoteBuzzerClient.inProgress(false); - if (config.dev.enabled) { - console.log('Taking photo:', takingPic); - } } }); }; From 3a4aa16b2ad15709c911140ae311e1213ebbf5d0 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Mon, 23 Aug 2021 20:48:57 +0200 Subject: [PATCH 025/214] faq: update preview by GPhoto2 instructions --- faq/faq.md | 1 + 1 file changed, 1 insertion(+) diff --git a/faq/faq.md b/faq/faq.md index ba0cafacd..35b2001e1 100644 --- a/faq/faq.md +++ b/faq/faq.md @@ -321,6 +321,7 @@ There's different ways depending on your needs and personal setup: - Requires Photobooth v2.2.1 or later! 3. A preview can also be done using the video mode of your DSLR (Linux only), but only works if you access Photobooth via [http://localhost](http://localhost) or [http://127.0.0.1](http://localhost): + - Liveview must be supported for your camera model, [check here](http://gphoto.org/proj/libgphoto2/support.php) - install all dependencies `sudo apt install ffmpeg v4l2loopback-dkms -y` - create a virtual webcam `modprobe v4l2loopback exclusive_caps=1 card_label="GPhoto2 Webcam"` - `/dev/video0` is used by default, you can use `v4l2-ctl --list-devices` to check which `/dev/*` is the correct one: From 048b68aa5a7766f44f5d85d80613a7d5d7c37f63 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 21 Aug 2021 22:20:41 +0200 Subject: [PATCH 026/214] Add welcome screen on first access Change-Id: Ia0c7de18af15cbf36d0a3946361b9406872a911e --- .gitignore | 1 + index.php | 4 +++ scripts/pack-build.js | 1 + src/sass/welcome.scss | 23 ++++++++++++++ welcome.php | 72 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 101 insertions(+) create mode 100644 src/sass/welcome.scss create mode 100644 welcome.php diff --git a/.gitignore b/.gitignore index 5640c295c..365a080b7 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,5 @@ vendor/simple-translator/ /.htaccess .htpasswd *.patch +.skip_welcome .vscode diff --git a/index.php b/index.php index 62768cfe9..1b38a156a 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,8 @@ + + + + + + + + + + Welcome to <?=$config['ui']['branding']?> + + + + + + + + + + + + + + + + + + + + + +

    +

    Welcome to your own Photobooth

    + +

    Photobooth is an OpenSource Photobooth web interface for Linux and Windows.

    +
    +

    Photobooth was initally developped by Andre Rinas especially to run on a Raspberry Pi.
    + In 2019 Andreas Blaesius picked up the work and continued to work on the source.

    +

    With the help of the community Photobooth growed to a powerfull Photobooth software with a lot of features and possibilities.
    + By a lot of features, we mean a lot (!!!) and you might have some questions, now or later. You can find a lot of useful information inside + our Photobooth-Wiki or at our Telegram group.

    +

    +

    Here are some basic information for you:

    +

    Location of your Photobooth installation:
    + All files and folders inside this path belong to the Webserver user "www-data".

    +

    Images can be found at:

    +

    Databases are placed at:

    +

    Add your own files (e.g. background images, frames, override.css) inside:
    + All files and folders inside this path will be ignored on git and won't cause trouble while updating Photobooth.

    +

    You can change the settings and look of Photobooth via Admin panel. +
    +

    You are missing some translation or your language isn't supported yet? Don't worry! You can request new language support at GitHub, + you can translate Photobooth at Crowdin.

    +
    +

    Thanks for the reading! Enjoy your Photobooth!
    + Start Photobooth

    + +
    + + + + + + + From 6a6c4806f81a34cd6a705595ab7dcba409cc4243 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sun, 22 Aug 2021 10:38:36 +0200 Subject: [PATCH 027/214] welcome: inform about gallery and slideshow, small adjustments Change-Id: I970a3d15093ce6da9fffd0d62a5575fc9ba77059 --- welcome.php | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/welcome.php b/welcome.php index 2f4f6eb87..3fab9b34c 100644 --- a/welcome.php +++ b/welcome.php @@ -4,6 +4,25 @@ if (!is_file('.skip_welcome')) { touch('.skip_welcome'); } + +if ($os == 'linux') { + $get_ip = shell_exec('hostname -I | cut -d " " -f 1'); + + if (!$get_ip) { + $IP = $_SERVER['HTTP_HOST']; + } else { + $IP = $get_ip; + } + + if (getcwd() == '/var/www/html/photobooth') { + $URL = $IP . '/photobooth'; + } else { + $URL = $IP; + } +} else { + $URL = $_SERVER['HTTP_HOST']; +} + ?> @@ -38,14 +57,14 @@

    Welcome to your own Photobooth

    - -

    Photobooth is an OpenSource Photobooth web interface for Linux and Windows.

    -
    +

    +

    OpenSource Photobooth web interface for Linux and Windows.

    +

    Photobooth was initally developped by Andre Rinas especially to run on a Raspberry Pi.
    In 2019 Andreas Blaesius picked up the work and continued to work on the source.

    With the help of the community Photobooth growed to a powerfull Photobooth software with a lot of features and possibilities.
    - By a lot of features, we mean a lot (!!!) and you might have some questions, now or later. You can find a lot of useful information inside - our Photobooth-Wiki or at our Telegram group.

    + By a lot of features, we mean a lot (!!!) and you might have some questions - now or later. You can find a lot of useful information inside + the Photobooth-Wiki or at the Telegram group.

    Here are some basic information for you:

    Location of your Photobooth installation:
    @@ -53,15 +72,16 @@

    Images can be found at:

    Databases are placed at:

    Add your own files (e.g. background images, frames, override.css) inside:
    - All files and folders inside this path will be ignored on git and won't cause trouble while updating Photobooth.

    -

    You can change the settings and look of Photobooth via Admin panel. -
    + All files and folders inside this path will be ignored on git and won't cause trouble while updating Photobooth.

    +

    You can change the settings and look of Photobooth using the Admin panel at http:///admin.
    + A standalone gallery can be found at http:///gallery.php.
    + A standalone slideshow can be found at http:///slideshow.

    +

    You are missing some translation or your language isn't supported yet? Don't worry! You can request new language support at GitHub, you can translate Photobooth at Crowdin.

    -
    -

    Thanks for the reading! Enjoy your Photobooth!
    - Start Photobooth

    - +

    +

    Thanks for the reading! Enjoy your Photobooth!

    +

    Start Photobooth

    From b57bbf23c837101ba540b3316ede53ac0d959d5e Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sun, 22 Aug 2021 14:36:49 +0200 Subject: [PATCH 028/214] Welcome: mention FAQ --- welcome.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/welcome.php b/welcome.php index 3fab9b34c..9728e943c 100644 --- a/welcome.php +++ b/welcome.php @@ -75,7 +75,8 @@ All files and folders inside this path will be ignored on git and won't cause trouble while updating Photobooth.

    You can change the settings and look of Photobooth using the Admin panel at http:///admin.
    A standalone gallery can be found at http:///gallery.php.
    - A standalone slideshow can be found at http:///slideshow.

    + A standalone slideshow can be found at http:///slideshow.
    + An integrated FAQ to answer a lot of questions can be found at http:///faq.

    You are missing some translation or your language isn't supported yet? Don't worry! You can request new language support at GitHub, you can translate Photobooth at Crowdin.

    From 57ea5ea37d34afc42017535dc22e463f9aa45430 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sun, 15 Nov 2020 18:21:27 +0100 Subject: [PATCH 029/214] feature: add updater for linux Change-Id: I28c02af83aade3d5002e8fd889d994c3e1d61a38 --- resources/sh/checkgithub.sh | 16 ++++++ resources/sh/update.sh | 9 +++ src/sass/update.scss | 26 +++++++++ update.php | 106 ++++++++++++++++++++++++++++++++++++ 4 files changed, 157 insertions(+) create mode 100644 resources/sh/checkgithub.sh create mode 100755 resources/sh/update.sh create mode 100644 src/sass/update.scss create mode 100644 update.php diff --git a/resources/sh/checkgithub.sh b/resources/sh/checkgithub.sh new file mode 100644 index 000000000..40e6c857c --- /dev/null +++ b/resources/sh/checkgithub.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +inside_git_repo="$(git rev-parse --is-inside-work-tree 2>/dev/null)" + +if [ $inside_git_repo == 'true' ]; +then + if [ -z "$(git status --porcelain)" ]; + then + echo "1" + else + echo "2" + fi +else + echo "3" +fi + diff --git a/resources/sh/update.sh b/resources/sh/update.sh new file mode 100755 index 000000000..cd2804994 --- /dev/null +++ b/resources/sh/update.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +git fetch origin +git checkout origin/dev +git submodule update --init +yarn install +yarn build +echo "Update completed!" + diff --git a/src/sass/update.scss b/src/sass/update.scss new file mode 100644 index 000000000..b956633dc --- /dev/null +++ b/src/sass/update.scss @@ -0,0 +1,26 @@ +@import 'modules/theme'; +@import 'partials/basic'; +@import 'partials/button'; +@import 'partials/fonts'; +@import 'partials/modal'; + +.updatewrapper { + display: block; + padding: 1em 2em 2em; + position: relative; + overflow-y: auto; + width: 100%; + height: 100%; + text-align: center; + background-color: $mainColor; + background-image: $backgroundImage; + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + background-attachment: fixed; +} + +.white-box { + background-color: white; + color: black; +} diff --git a/update.php b/update.php new file mode 100644 index 000000000..4f7e366b3 --- /dev/null +++ b/update.php @@ -0,0 +1,106 @@ +&1'); + if ($gitcheck === "1") { + $message = 'Update possible! Trying to update. This might take a while...'; + $instructions = exec('bash ' . $updscript . ' 2>&1'); + } elseif ($gitcheck === "2") { + $message = 'Update impossible! Please commit your changes first!'; + $instructions = 'Open a Terminal and run the following commands, after that please try again:
    cd ' . realpath(__DIR__) . '
    sudo -u www-data -s
    git add --all
    git commit -a -m "My Changes"
    git checkout -b "backup-' . date('Ymd') . '"'; + } else { + $message = 'Can not update! This is not a git repo!'; + $instructions = 'Please install via git to use the updater.'; + } + + } else { + $status = 'Connection failure. '; + } + +} else { + $status = 'Update not possible!'; + $message = 'Updater only works on Linux!'; + $instructions = ''; +} + +?> + + + + + + + + + + <?=$config['ui']['branding']?> + + + + + + + + + + + + + + + + + + + + + + + +

    + '; + print_r($message); + echo '
    '; + echo '
    '; + print_r($instructions); + ?> +

    + +
    + +
    + + + + + + + + + + From c329b4ab9d41465e2034ae71118803021c952f5a Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 6 May 2021 12:20:27 +0200 Subject: [PATCH 030/214] updater: allow to commit changes, allow to choose a branch to update - set git user.name and git user.email if not set Change-Id: I837387aafd24abf85fc599f9476087f12dd54f79 --- resources/sh/commit.sh | 8 ++ resources/sh/setup-gitemail.sh | 13 +++ resources/sh/setup-gitname.sh | 13 +++ resources/sh/{update.sh => update-dev.sh} | 0 resources/sh/update-stable.sh | 9 ++ update.php | 115 +++++++++++++++++----- 6 files changed, 136 insertions(+), 22 deletions(-) create mode 100644 resources/sh/commit.sh create mode 100644 resources/sh/setup-gitemail.sh create mode 100644 resources/sh/setup-gitname.sh rename resources/sh/{update.sh => update-dev.sh} (100%) mode change 100755 => 100644 create mode 100644 resources/sh/update-stable.sh diff --git a/resources/sh/commit.sh b/resources/sh/commit.sh new file mode 100644 index 000000000..089adf89f --- /dev/null +++ b/resources/sh/commit.sh @@ -0,0 +1,8 @@ +#!/bin/bash +date=$(date +"%Y%m%d") + +git add --all +git commit -a -m "backup changes" +git checkout -b "backup-$date" +echo "Backup done to branch: backup-$date. Update possible now." + diff --git a/resources/sh/setup-gitemail.sh b/resources/sh/setup-gitemail.sh new file mode 100644 index 000000000..6f79a1f5d --- /dev/null +++ b/resources/sh/setup-gitemail.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +get_useremail="$(git config user.email)" +set_useremail="$(git config user.email Photobooth@localhost)" + +if [ -z $get_useremail ]; +then + $set_useremail + echo "git user.email: $get_useremail" +else + echo "git user.email: $get_useremail" +fi + diff --git a/resources/sh/setup-gitname.sh b/resources/sh/setup-gitname.sh new file mode 100644 index 000000000..f568c804c --- /dev/null +++ b/resources/sh/setup-gitname.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +get_username="$(git config user.name)" +set_username="$(git config user.name Photobooth)" + +if [ -z $get_username ]; +then + $set_username + echo "git user.name: $get_username" +else + echo "git user.name: $get_username" +fi + diff --git a/resources/sh/update.sh b/resources/sh/update-dev.sh old mode 100755 new mode 100644 similarity index 100% rename from resources/sh/update.sh rename to resources/sh/update-dev.sh diff --git a/resources/sh/update-stable.sh b/resources/sh/update-stable.sh new file mode 100644 index 000000000..4bb9335ff --- /dev/null +++ b/resources/sh/update-stable.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +git fetch origin +git checkout origin/stable3 +git submodule update --init +yarn install +yarn build +echo "Update completed!" + diff --git a/update.php b/update.php index 4f7e366b3..c24e563b8 100644 --- a/update.php +++ b/update.php @@ -2,6 +2,7 @@ require_once('lib/config.php'); $os = DIRECTORY_SEPARATOR == '\\' || strtolower(substr(PHP_OS, 0, 3)) === 'win' ? 'windows' : 'linux'; +$path = __DIR__ . DIRECTORY_SEPARATOR; function is_connected() { $connected = @fsockopen("www.google.com", 80); @@ -16,34 +17,64 @@ function is_connected() { return $is_conn; } +if ($_GET['updatedev'] === "start" || $_GET['updatestable'] === "start" ) { + $checked = true; + $needs_commit = false; + + if ($_GET['updatedev'] === "start") { + $updscript = realpath($path . 'resources/sh/update-dev.sh'); + } else { + $updscript = realpath($path . 'resources/sh/update-stable.sh'); + } + + $execute = exec('bash ' . $updscript . ' 2>&1'); +} elseif ($_GET['commit'] === "start") { + $checked = true; + $needs_commit = true; + $commitscript = realpath($path . 'resources/sh/commit.sh'); + $execute = exec('bash ' . $commitscript . ' 2>&1'); +} else { + $needs_commit = false; + $checked = false; +} + +if ($checked === false) { + if ($os === 'linux') { + if (is_connected()) { + $status = 'Connected. Trying to update...'; + $ghscript = realpath($path . 'resources/sh/checkgithub.sh'); + $ghnamescript = realpath($path . 'resources/sh/setup-gitname.sh'); + $ghemailscript = realpath($path . 'resources/sh/setup-gitemail.sh'); + $ghname = exec('bash ' . $ghnamescript . ' 2>&1'); + $ghemail = exec('bash ' . $ghemailscript . ' 2>&1'); + $gitcheck = exec('bash ' . $ghscript . ' 2>&1'); + if ($gitcheck === "1") { + $message = 'Update possible! Click to start the update! Please be Patient - this might take a while!'; + $instructions = ''; + $update_possible = true; + $can_commit = false; + } elseif ($gitcheck === "2") { + $message = 'Update impossible! Please commit your changes first!'; + $instructions = 'Commit changes and backup in branch: "backup-' . date('Ymd') . '"?'; + $update_possible = false; + $can_commit = true; + } else { + $message = 'Can not update! This is not a git repo!'; + $instructions = 'Please install via git to use the updater.'; + $update_possible = false; + $can_commit = false; + } -if ($os === 'linux') { - if (is_connected()) { - $status = 'Connected. Trying to update...'; - $path = __DIR__ . DIRECTORY_SEPARATOR; - $ghscript = realpath($path . 'resources/sh/checkgithub.sh'); - $updscript = realpath($path . 'resources/sh/update.sh'); - // $script = 'git fetch origin && && git checkout origin/dev && git submodule update --init && yarn install && yarn build'; - $gitcheck = exec('bash ' . $ghscript . ' 2>&1'); - if ($gitcheck === "1") { - $message = 'Update possible! Trying to update. This might take a while...'; - $instructions = exec('bash ' . $updscript . ' 2>&1'); - } elseif ($gitcheck === "2") { - $message = 'Update impossible! Please commit your changes first!'; - $instructions = 'Open a Terminal and run the following commands, after that please try again:
    cd ' . realpath(__DIR__) . '
    sudo -u www-data -s
    git add --all
    git commit -a -m "My Changes"
    git checkout -b "backup-' . date('Ymd') . '"'; } else { - $message = 'Can not update! This is not a git repo!'; - $instructions = 'Please install via git to use the updater.'; + $status = 'Connection failure. '; } + // WINDOWS } else { - $status = 'Connection failure. '; + $status = 'Update not possible!'; + $message = 'Updater only works on Linux!'; + $instructions = ''; } - -} else { - $status = 'Update not possible!'; - $message = 'Updater only works on Linux!'; - $instructions = ''; } ?> @@ -82,12 +113,52 @@ function is_connected() {

    '; print_r($message); echo '
    '; echo '
    '; print_r($instructions); + echo '
    '; + if ($update_possible === true) { + ?> +
    + + +
    + +
    + +
    + + +
    + '; + print_r($ghemail); + echo '
    '; + + ?> +
    +
    + + +
    + '; + print_r($execute); + if ($needs_commit === true) { + header("refresh: 10; url=update.php"); + } + + } ?>

    From e9e163e6c202f604346abb9ebc15eb4a2e872c8c Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 6 May 2021 15:53:16 +0200 Subject: [PATCH 031/214] updater: prettier buttons Change-Id: Ic89ab86c531024e63e14651f431c810c1ff6d186 --- resources/sh/commit.sh | 2 +- src/sass/partials/_button.scss | 6 ++++++ update.php | 15 ++++++++++----- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/resources/sh/commit.sh b/resources/sh/commit.sh index 089adf89f..b989dfa46 100644 --- a/resources/sh/commit.sh +++ b/resources/sh/commit.sh @@ -4,5 +4,5 @@ date=$(date +"%Y%m%d") git add --all git commit -a -m "backup changes" git checkout -b "backup-$date" -echo "Backup done to branch: backup-$date. Update possible now." +echo "Backup done to branch: backup-$date.
    Update now possible.
    Page reloads automatically." diff --git a/src/sass/partials/_button.scss b/src/sass/partials/_button.scss index 3c5b15439..4152bc2e1 100644 --- a/src/sass/partials/_button.scss +++ b/src/sass/partials/_button.scss @@ -27,6 +27,12 @@ width: 50%; } + &--submit { + padding: 10px 10px; + font-size: 0.75em; + white-space: normal; + } + &:active, &:focus, &:hover, diff --git a/update.php b/update.php index c24e563b8..42549fb35 100644 --- a/update.php +++ b/update.php @@ -41,7 +41,7 @@ function is_connected() { if ($checked === false) { if ($os === 'linux') { if (is_connected()) { - $status = 'Connected. Trying to update...'; + $status = 'Internet connection ok.
    Trying to update...'; $ghscript = realpath($path . 'resources/sh/checkgithub.sh'); $ghnamescript = realpath($path . 'resources/sh/setup-gitname.sh'); $ghemailscript = realpath($path . 'resources/sh/setup-gitemail.sh'); @@ -49,7 +49,7 @@ function is_connected() { $ghemail = exec('bash ' . $ghemailscript . ' 2>&1'); $gitcheck = exec('bash ' . $ghscript . ' 2>&1'); if ($gitcheck === "1") { - $message = 'Update possible! Click to start the update! Please be Patient - this might take a while!'; + $message = 'Update possible!
    Click to start the update!
    Please be patient - this might take a while!
    Page reloads automatically once the Update is done.'; $instructions = ''; $update_possible = true; $can_commit = false; @@ -112,6 +112,7 @@ function is_connected() {

    +
    - +

    - +
    +
    - +
    +
    '; print_r($execute); + echo '
    '; if ($needs_commit === true) { header("refresh: 10; url=update.php"); } } ?> +

    From fe3310c3fbba33005789d7c2f9a90978081003ae Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Mon, 10 May 2021 15:23:56 +0200 Subject: [PATCH 032/214] updater: switch to javascript/jQuery Change-Id: I5c8ea519ab6fc43eefb00c36a14326e44d599e0f --- api/checkConnection.php | 24 +++++ api/checkOS.php | 8 ++ api/update.php | 58 +++++++++++ resources/lang/en.json | 19 ++++ resources/sh/checkgithub.sh | 9 +- resources/sh/commit.sh | 30 +++++- resources/sh/setup-gitemail.sh | 13 --- resources/sh/setup-gitname.sh | 13 --- resources/sh/update-dev.sh | 5 + resources/sh/update-stable.sh | 3 + src/js/update.js | 178 +++++++++++++++++++++++++++++++++ src/sass/partials/_button.scss | 1 - src/sass/update.scss | 6 ++ update.php | 136 ++----------------------- 14 files changed, 344 insertions(+), 159 deletions(-) create mode 100644 api/checkConnection.php create mode 100644 api/checkOS.php create mode 100644 api/update.php delete mode 100644 resources/sh/setup-gitemail.sh delete mode 100644 resources/sh/setup-gitname.sh create mode 100644 src/js/update.js diff --git a/api/checkConnection.php b/api/checkConnection.php new file mode 100644 index 000000000..35ffbf631 --- /dev/null +++ b/api/checkConnection.php @@ -0,0 +1,24 @@ + true, + ]); +} else { + echo json_encode([ + 'success' => false, + ]); +} diff --git a/api/checkOS.php b/api/checkOS.php new file mode 100644 index 000000000..3d3aac603 --- /dev/null +++ b/api/checkOS.php @@ -0,0 +1,8 @@ + $os, +]); diff --git a/api/update.php b/api/update.php new file mode 100644 index 000000000..4fe719ddb --- /dev/null +++ b/api/update.php @@ -0,0 +1,58 @@ + $success, + 'output' => $output, + 'retval' => $retval, + 'command' => $cmd, + ]); +} else { + echo json_encode([ + 'success' => 'false', + 'command' => $cmd, + ]); +} diff --git a/resources/lang/en.json b/resources/lang/en.json index f765240d4..2b663aea9 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -412,6 +412,7 @@ "newCollage": "New Collage", "newPhoto": "New Picture", "nextPhoto": "Next Picture", + "ok": "ok", "path": "Path:", "percent": "%", "pictures": "Pictures", @@ -536,6 +537,24 @@ "test_update_available": "There is a test update available.", "toggleFullscreen": "Toggle Fullscreen", "update_available": "There is an update available.", + "update_check_connection": "Checking connection...", + "update_check_git": "Checking git repository...", + "update_commit_backup": "Commit & backup your changes to update!", + "update_committing": "Committing your changes...", + "update_done": "Updated!", + "update_error": "Something went wrong!", + "update_fail": "Failed! Check console log for more informations!", + "update_git_check": "Check for Update", + "update_git_commit": "Commit & Backup", + "update_git_commited": "Changes committed!", + "update_no_connection": "Not internect connection!", + "update_no_git": "Not a git repo! Automated update not possible!", + "update_os_check": "Checking OS...", + "update_ready": "Ready to update!", + "update_running": "Updating... Please be patient! Update might take a while! ...", + "update_to_dev": "Update to latest development Version", + "update_to_stable": "Update to latest Stable v3", + "update_unsupported_os": "Unsupported OS!", "use_button": "Use Buzzer to take a Picture", "userinterface": "User interface", "userinterface:background_admin": "Admin panel background image path", diff --git a/resources/sh/checkgithub.sh b/resources/sh/checkgithub.sh index 40e6c857c..e1941a518 100644 --- a/resources/sh/checkgithub.sh +++ b/resources/sh/checkgithub.sh @@ -1,16 +1,19 @@ #!/bin/bash +# Stop on the first sign of trouble +set -e + inside_git_repo="$(git rev-parse --is-inside-work-tree 2>/dev/null)" if [ $inside_git_repo == 'true' ]; then if [ -z "$(git status --porcelain)" ]; then - echo "1" + echo "true" else - echo "2" + echo "commit" fi else - echo "3" + echo "false" fi diff --git a/resources/sh/commit.sh b/resources/sh/commit.sh index b989dfa46..605aed134 100644 --- a/resources/sh/commit.sh +++ b/resources/sh/commit.sh @@ -1,8 +1,34 @@ #!/bin/bash -date=$(date +"%Y%m%d") + +# Stop on the first sign of trouble +set -e + +date=$(date +"%Y%m%d-%H-%M") +get_username="$(git config user.name)" +set_username="$(git config user.name Photobooth)" +get_useremail="$(git config user.email)" +set_useremail="$(git config user.email Photobooth@localhost)" + +if [ -z $get_username ]; +then + echo "git user.name not set!" + echo "Setting git user.name." + $set_username +fi + +if [ -z $get_useremail ]; +then + echo "git user.email not set!" + echo "Setting git user.email." + $set_useremail +fi + + +echo "git user.name: $get_username" +echo "git user.email: $get_useremail" git add --all git commit -a -m "backup changes" git checkout -b "backup-$date" -echo "Backup done to branch: backup-$date.
    Update now possible.
    Page reloads automatically." +echo "Backup done to branch: backup-$date" diff --git a/resources/sh/setup-gitemail.sh b/resources/sh/setup-gitemail.sh deleted file mode 100644 index 6f79a1f5d..000000000 --- a/resources/sh/setup-gitemail.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -get_useremail="$(git config user.email)" -set_useremail="$(git config user.email Photobooth@localhost)" - -if [ -z $get_useremail ]; -then - $set_useremail - echo "git user.email: $get_useremail" -else - echo "git user.email: $get_useremail" -fi - diff --git a/resources/sh/setup-gitname.sh b/resources/sh/setup-gitname.sh deleted file mode 100644 index f568c804c..000000000 --- a/resources/sh/setup-gitname.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -get_username="$(git config user.name)" -set_username="$(git config user.name Photobooth)" - -if [ -z $get_username ]; -then - $set_username - echo "git user.name: $get_username" -else - echo "git user.name: $get_username" -fi - diff --git a/resources/sh/update-dev.sh b/resources/sh/update-dev.sh index cd2804994..09a9adaab 100644 --- a/resources/sh/update-dev.sh +++ b/resources/sh/update-dev.sh @@ -1,9 +1,14 @@ #!/bin/bash +# Stop on the first sign of trouble +set -e + git fetch origin git checkout origin/dev git submodule update --init yarn install yarn build echo "Update completed!" +echo "Checked out on HEAD:" +git log --format="%h %s" -n 1 diff --git a/resources/sh/update-stable.sh b/resources/sh/update-stable.sh index 4bb9335ff..ae586bc17 100644 --- a/resources/sh/update-stable.sh +++ b/resources/sh/update-stable.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Stop on the first sign of trouble +set -e + git fetch origin git checkout origin/stable3 git submodule update --init diff --git a/src/js/update.js b/src/js/update.js new file mode 100644 index 000000000..c191de803 --- /dev/null +++ b/src/js/update.js @@ -0,0 +1,178 @@ +/* global i18n */ + +const updater = (function () { + // vars + const api = {}; + + let command; + + // init + api.init = function () { + $('.checkGit').hide(); + $('.gitCommit').hide(); + $('.updateDev').hide(); + $('.updateStable').hide(); + api.checkOS(); + }; + + api.checkOS = function () { + jQuery + .post('api/checkOS.php') + .done(function (result) { + const updateCheckConnection = api.getTranslation('update_check_connection'); + const updateUnsupportedOs = api.getTranslation('update_unsupported_os'); + console.log('result: ', result); + if (result.success == 'linux') { + $('.white-box').append($('

    ').text(result.success)); + $('.white-box').append($('

    ').text(updateCheckConnection)); + api.checkConnection(); + } else { + $('.white-box').append($('

    ').text(updateUnsupportedOs)); + $('.white-box').append($('

    ').text(result.success)); + } + }) + .fail(function (xhr, status, result) { + console.log('result: ', result); + }); + }; + + api.checkConnection = function () { + jQuery + .post('api/checkConnection.php') + .done(function (result) { + const ok = api.getTranslation('ok'); + const updateNoConnection = api.getTranslation('update_no_connection'); + console.log('result: ', result); + if (result.success === true) { + $('.white-box').append($('

    ').text(ok)); + $('.checkGit').show(); + } else { + $('.white-box').append($('

    ').text(updateNoConnection)); + } + }) + .fail(function (xhr, status, result) { + console.log('result: ', result); + }); + }; + + api.getTranslation = function (key) { + const translation = i18n(key, config.ui.language); + const fallbackTranslation = i18n(key, 'en'); + if (translation) { + return translation; + } else if (fallbackTranslation) { + return fallbackTranslation; + } + + return key; + }; + + api.runCmd = function ($mode) { + command = { + mode: $mode + }; + + console.log('Run', $mode); + + jQuery + .post('api/update.php', command) + .done(function (result) { + console.log($mode, 'result: ', result); + const updateCommitBackup = api.getTranslation('update_commit_backup'), + updateReady = api.getTranslation('update_ready'), + updateNoGit = api.getTranslation('update_no_git'), + updateGitCommited = api.getTranslation('update_git_commited'), + updateDone = api.getTranslation('update_done'), + updateError = api.getTranslation('update_error'), + ok = api.getTranslation('ok'); + + if (result.success) { + if ($mode === 'check-git') { + $('.checkGit').hide(); + if (result.output == 'commit') { + $('.white-box').append($('

    ').text(updateCommitBackup)); + $('.gitCommit').show(); + } else if (result.output == 'true') { + $('.white-box').append($('

    ').text(ok)); + $('.white-box').append($('

    ').text(updateReady)); + $('.updateDev').show(); + $('.updateStable').show(); + } else { + $('.white-box').append($('

    ').text(updateNoGit)); + } + } else if ($mode === 'commit') { + $('.checkGit').hide(); + $('.gitCommit').hide(); + if (config.dev.enabled) { + // eslint-disable-next-line + result.output.forEach(function (item, index, array) { + $('.white-box').append($('

    ').text(item)); + }); + } + $('.white-box').append($('

    ').text(updateGitCommited)); + $('.white-box').append($('

    ').text(updateReady)); + $('.updateDev').show(); + $('.updateStable').show(); + } else if ($mode === 'update-dev' || $mode === 'update-stable') { + if (config.dev.enabled) { + // eslint-disable-next-line + result.output.forEach(function (item, index, array) { + $('.white-box').append($('

    ').text(item)); + }); + } + $('.white-box').append($('

    ').text(updateDone)); + } + } else { + $('.white-box').append($('

    ').text(updateError)); + } + }) + .fail(function (xhr, status, result) { + const updateFail = api.getTranslation('update_fail'); + $('.white-box').append($('

    ').text(updateFail)); + console.log($mode, 'result: ', result); + }); + }; + + $('.checkGit').on('click', function (e) { + e.preventDefault(); + const updateCheckGit = api.getTranslation('update_check_git'); + $('.white-box').append($('

    ').text(updateCheckGit)); + api.runCmd('check-git'); + $('.checkGit').blur(); + }); + + $('.gitCommit').on('click', function (e) { + e.preventDefault(); + const updateCommitting = api.getTranslation('update_committing'); + $('.white-box').append($('

    ').text(updateCommitting)); + api.runCmd('commit'); + $('.gitCommit').blur(); + }); + + $('.updateDev').on('click', function (e) { + e.preventDefault(); + const updateRunning = api.getTranslation('update_running'); + $('.white-box').append($('

    ').text(updateRunning)); + api.runCmd('update-dev'); + $('.updateDev').blur(); + $('.updateDev').hide(); + $('.updateStable').hide(); + }); + + $('.updateStable').on('click', function (e) { + e.preventDefault(); + const updateRunning = api.getTranslation('update_running'); + $('.white-box').append($('

    ').text(updateRunning)); + api.runCmd('update-stable'); + $('.updateStable').blur(); + $('.updateDev').hide(); + $('.updateStable').hide(); + }); + + return api; +})(); + +// Init on domready +$(function () { + updater.init(); +}); diff --git a/src/sass/partials/_button.scss b/src/sass/partials/_button.scss index 4152bc2e1..18ba84e7e 100644 --- a/src/sass/partials/_button.scss +++ b/src/sass/partials/_button.scss @@ -28,7 +28,6 @@ } &--submit { - padding: 10px 10px; font-size: 0.75em; white-space: normal; } diff --git a/src/sass/update.scss b/src/sass/update.scss index b956633dc..1f058f966 100644 --- a/src/sass/update.scss +++ b/src/sass/update.scss @@ -18,9 +18,15 @@ background-repeat: no-repeat; background-size: cover; background-attachment: fixed; + .btn { + margin-top: 0.2em; + } } .white-box { background-color: white; color: black; + white-space: normal; + overflow: scroll; + max-height: 70%; } diff --git a/update.php b/update.php index 42549fb35..1a3119e33 100644 --- a/update.php +++ b/update.php @@ -1,81 +1,6 @@ &1'); -} elseif ($_GET['commit'] === "start") { - $checked = true; - $needs_commit = true; - $commitscript = realpath($path . 'resources/sh/commit.sh'); - $execute = exec('bash ' . $commitscript . ' 2>&1'); -} else { - $needs_commit = false; - $checked = false; -} - -if ($checked === false) { - if ($os === 'linux') { - if (is_connected()) { - $status = 'Internet connection ok.
    Trying to update...'; - $ghscript = realpath($path . 'resources/sh/checkgithub.sh'); - $ghnamescript = realpath($path . 'resources/sh/setup-gitname.sh'); - $ghemailscript = realpath($path . 'resources/sh/setup-gitemail.sh'); - $ghname = exec('bash ' . $ghnamescript . ' 2>&1'); - $ghemail = exec('bash ' . $ghemailscript . ' 2>&1'); - $gitcheck = exec('bash ' . $ghscript . ' 2>&1'); - if ($gitcheck === "1") { - $message = 'Update possible!
    Click to start the update!
    Please be patient - this might take a while!
    Page reloads automatically once the Update is done.'; - $instructions = ''; - $update_possible = true; - $can_commit = false; - } elseif ($gitcheck === "2") { - $message = 'Update impossible! Please commit your changes first!'; - $instructions = 'Commit changes and backup in branch: "backup-' . date('Ymd') . '"?'; - $update_possible = false; - $can_commit = true; - } else { - $message = 'Can not update! This is not a git repo!'; - $instructions = 'Please install via git to use the updater.'; - $update_possible = false; - $can_commit = false; - } - - } else { - $status = 'Connection failure. '; - } - - // WINDOWS - } else { - $status = 'Update not possible!'; - $message = 'Updater only works on Linux!'; - $instructions = ''; - } -} ?> @@ -111,61 +36,17 @@ function is_connected() { -

    -
    - '; - print_r($message); - echo '
    '; - echo '
    '; - print_r($instructions); - echo '
    '; - if ($update_possible === true) { - ?> -
    - - -
    - -
    - -
    - - -
    -
    - '; - print_r($ghemail); - echo '
    '; +
    +

    Updater

    +

    +
    + - ?> -
    -
    - - -
    -
    - - // $_GET['updatestable'] or $_GET['updatedev'] or $_GET['commit'] === "start" - } else { - echo '
    '; - print_r($execute); - echo '
    '; - if ($needs_commit === true) { - header("refresh: 10; url=update.php"); - } + - } - ?> -
    -

    +
    @@ -174,6 +55,7 @@ function is_connected() { + From ae9504f6db2f1eabcef1f91c72c15fde67b4a432 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Mon, 10 May 2021 16:15:16 +0200 Subject: [PATCH 033/214] updater: allow to protect via username & password Change-Id: I1eba4467f9755543d8d1ac2772d6e6bc080ff543 --- config/config.inc.php | 2 ++ lib/configsetup.inc.php | 12 ++++++++++++ resources/lang/en.json | 4 ++++ update.php | 15 +++++++++++++++ 4 files changed, 33 insertions(+) diff --git a/config/config.inc.php b/config/config.inc.php index b894e0e4e..34605ca41 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -264,6 +264,8 @@ $config['login']['password'] = NULL; $config['protect']['admin'] = true; $config['protect']['localhost_admin'] = true; +$config['protect']['update'] = true; +$config['protect']['localhost_update'] = true; $config['protect']['index'] = false; $config['protect']['localhost_index'] = false; $config['protect']['manual'] = false; diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index eeaf4486a..040c70e78 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -1552,6 +1552,18 @@ 'name' => 'protect[localhost_admin]', 'value' => $config['protect']['localhost_admin'], ], + 'protect_update' => [ + 'view' => 'advanced', + 'type' => 'checkbox', + 'name' => 'protect[update]', + 'value' => $config['protect']['update'], + ], + 'protect_localhost_update' => [ + 'view' => 'expert', + 'type' => 'checkbox', + 'name' => 'protect[localhost_update]', + 'value' => $config['protect']['localhost_update'], + ], 'protect_index' => [ 'view' => 'advanced', 'type' => 'checkbox', diff --git a/resources/lang/en.json b/resources/lang/en.json index 2b663aea9..08610731b 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -13,7 +13,9 @@ "authentication:protect_localhost_admin": "Protect admin panel on localhost access", "authentication:protect_localhost_index": "Protect start screen on localhost access", "authentication:protect_localhost_manual": "Protect manual & FAQ on localhost access", + "authentication:protect_localhost_update": "Protect updater on localhost access", "authentication:protect_manual": "Protect manual & FAQ", + "authentication:protect_update": "Protect updater", "auto_reload": "Photobooth reloads automatically...", "available_version": "Available:", "bootconfig": "config.txt", @@ -189,7 +191,9 @@ "manual:authentication:protect_localhost_admin": "If disabled, admin panel can be accessed without username and password from localhost.", "manual:authentication:protect_localhost_index": "If disabled, start screen can be accessed without username and password from localhost.", "manual:authentication:protect_localhost_manual": "If disabled, manual and FAQ can be accessed without username and password from localhost.", + "manual:authentication:protect_localhost_update": "If disabled, updater can be accessed without username and password from localhost.", "manual:authentication:protect_manual": "If enabled, manual and FAQ can only be accessed if a username and password is entered.", + "manual:authentication:protect_update": "If enabled, updater can only be accessed if a username and password is entered.", "manual:collage:collage_cntdwn_time": "Set your countdown time between pictures while taking a collage.", "manual:collage:collage_continuous": "Take collage without interrupption.", "manual:collage:collage_continuous_time": "Controll the time a picture is visible on continuous collage before the next picture is taken.", diff --git a/update.php b/update.php index 1a3119e33..49481b7cb 100644 --- a/update.php +++ b/update.php @@ -1,7 +1,22 @@ From 9d576ece67d3dc4e0008f06a7fcac4206b1b73d1 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Mon, 10 May 2021 16:19:19 +0200 Subject: [PATCH 034/214] updater: automatically check for git repository Change-Id: I1aae49ae0bda5258f90166e20ec6206eddd255f3 --- resources/lang/en.json | 1 - src/js/update.js | 19 +++++-------------- update.php | 1 - 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/resources/lang/en.json b/resources/lang/en.json index 08610731b..8435b0549 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -548,7 +548,6 @@ "update_done": "Updated!", "update_error": "Something went wrong!", "update_fail": "Failed! Check console log for more informations!", - "update_git_check": "Check for Update", "update_git_commit": "Commit & Backup", "update_git_commited": "Changes committed!", "update_no_connection": "Not internect connection!", diff --git a/src/js/update.js b/src/js/update.js index c191de803..77b50f9d4 100644 --- a/src/js/update.js +++ b/src/js/update.js @@ -8,7 +8,6 @@ const updater = (function () { // init api.init = function () { - $('.checkGit').hide(); $('.gitCommit').hide(); $('.updateDev').hide(); $('.updateStable').hide(); @@ -40,12 +39,14 @@ const updater = (function () { jQuery .post('api/checkConnection.php') .done(function (result) { - const ok = api.getTranslation('ok'); - const updateNoConnection = api.getTranslation('update_no_connection'); + const ok = api.getTranslation('ok'), + updateNoConnection = api.getTranslation('update_no_connection'), + updateCheckGit = api.getTranslation('update_check_git'); console.log('result: ', result); if (result.success === true) { $('.white-box').append($('

    ').text(ok)); - $('.checkGit').show(); + $('.white-box').append($('

    ').text(updateCheckGit)); + api.runCmd('check-git'); } else { $('.white-box').append($('

    ').text(updateNoConnection)); } @@ -88,7 +89,6 @@ const updater = (function () { if (result.success) { if ($mode === 'check-git') { - $('.checkGit').hide(); if (result.output == 'commit') { $('.white-box').append($('

    ').text(updateCommitBackup)); $('.gitCommit').show(); @@ -101,7 +101,6 @@ const updater = (function () { $('.white-box').append($('

    ').text(updateNoGit)); } } else if ($mode === 'commit') { - $('.checkGit').hide(); $('.gitCommit').hide(); if (config.dev.enabled) { // eslint-disable-next-line @@ -133,14 +132,6 @@ const updater = (function () { }); }; - $('.checkGit').on('click', function (e) { - e.preventDefault(); - const updateCheckGit = api.getTranslation('update_check_git'); - $('.white-box').append($('

    ').text(updateCheckGit)); - api.runCmd('check-git'); - $('.checkGit').blur(); - }); - $('.gitCommit').on('click', function (e) { e.preventDefault(); const updateCommitting = api.getTranslation('update_committing'); diff --git a/update.php b/update.php index 49481b7cb..7bd7fca19 100644 --- a/update.php +++ b/update.php @@ -55,7 +55,6 @@

    Updater

    - From 7e1dfc61e1cf55fffdade399b6daf84b0e226de6 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 11 May 2021 10:44:30 +0200 Subject: [PATCH 035/214] feature: add dependencies checker Change-Id: I2c96554ec21087698972ce3c81735a6b46e6cae7 --- api/update.php | 6 +- dependencies.php | 57 +++++++++++++ resources/lang/en.json | 9 +- resources/sh/check-dependencies.sh | 70 ++++++++++++++++ .../sh/{checkgithub.sh => check-github.sh} | 0 src/js/dependencies.js | 84 +++++++++++++++++++ src/js/update.js | 12 +-- update.php | 2 +- 8 files changed, 228 insertions(+), 12 deletions(-) create mode 100644 dependencies.php create mode 100644 resources/sh/check-dependencies.sh rename resources/sh/{checkgithub.sh => check-github.sh} (100%) create mode 100644 src/js/dependencies.js diff --git a/api/update.php b/api/update.php index 4fe719ddb..45a6c6c8e 100644 --- a/api/update.php +++ b/api/update.php @@ -3,10 +3,11 @@ require_once '../lib/config.php'; -$ghscript = __DIR__ . DIRECTORY_SEPARATOR . '../resources/sh/checkgithub.sh'; +$ghscript = __DIR__ . DIRECTORY_SEPARATOR . '../resources/sh/check-github.sh'; $commitscript = __DIR__ . DIRECTORY_SEPARATOR . '../resources/sh/commit.sh'; $upddev = __DIR__ . DIRECTORY_SEPARATOR . '../resources/sh/update-dev.sh'; $updstable = __DIR__ . DIRECTORY_SEPARATOR . '../resources/sh/update-stable.sh'; +$checkdeps = __DIR__ . DIRECTORY_SEPARATOR . '../resources/sh/check-dependencies.sh'; $mode = $_POST['mode']; @@ -23,6 +24,9 @@ case 'update-stable': $cmd = sprintf($updstable); break; + case 'check-deps': + $cmd = sprintf($checkdeps); + break; default: $cmd = 'echo "Error!"'; break; diff --git a/dependencies.php b/dependencies.php new file mode 100644 index 000000000..b8c208177 --- /dev/null +++ b/dependencies.php @@ -0,0 +1,57 @@ + + + + + + + + + + + <?=$config['ui']['branding']?> + + + + + + + + + + + + + + + + + + + + + + + +
    +

    dependencies check

    +

    +
    + +
    + +
    + + + + + + + + + + + diff --git a/resources/lang/en.json b/resources/lang/en.json index 8435b0549..107a44090 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -22,6 +22,8 @@ "busy": "Processing ...", "busyCollage": "Processing Collage ...", "cameralog": "Camera log", + "check_connection": "Checking connection...", + "check_dependencies": "Checking installed dependencies...", "check_version": "Check online", "cheese": "Cheeeeeeeese!", "cheeseCollage": "Cheeeeeeeese Collageeeeeeeeeee!", @@ -416,7 +418,9 @@ "newCollage": "New Collage", "newPhoto": "New Picture", "nextPhoto": "Next Picture", + "no_connection": "Not internect connection!", "ok": "ok", + "os_check": "Checking OS...", "path": "Path:", "percent": "%", "pictures": "Pictures", @@ -540,8 +544,8 @@ "telegram": "Community @ Telegram", "test_update_available": "There is a test update available.", "toggleFullscreen": "Toggle Fullscreen", + "unsupported_os": "Unsupported OS!", "update_available": "There is an update available.", - "update_check_connection": "Checking connection...", "update_check_git": "Checking git repository...", "update_commit_backup": "Commit & backup your changes to update!", "update_committing": "Committing your changes...", @@ -550,14 +554,11 @@ "update_fail": "Failed! Check console log for more informations!", "update_git_commit": "Commit & Backup", "update_git_commited": "Changes committed!", - "update_no_connection": "Not internect connection!", "update_no_git": "Not a git repo! Automated update not possible!", - "update_os_check": "Checking OS...", "update_ready": "Ready to update!", "update_running": "Updating... Please be patient! Update might take a while! ...", "update_to_dev": "Update to latest development Version", "update_to_stable": "Update to latest Stable v3", - "update_unsupported_os": "Unsupported OS!", "use_button": "Use Buzzer to take a Picture", "userinterface": "User interface", "userinterface:background_admin": "Admin panel background image path", diff --git a/resources/sh/check-dependencies.sh b/resources/sh/check-dependencies.sh new file mode 100644 index 000000000..0d0533843 --- /dev/null +++ b/resources/sh/check-dependencies.sh @@ -0,0 +1,70 @@ +#!/bin/bash + +# Stop on the first sign of trouble +set -e + +WEBSERVER=( + 'libapache2-mod-php' + 'nginx' + 'lighttpd' +) + +COMMON_PACKAGES=( + 'git' + 'gphoto2' + 'libimage-exiftool-perl' + 'nodejs' + 'php-gd' + 'php-zip' + 'yarn' + 'rsync' + 'udisks2' +) + +MISSING_PACKAGES=() + +echo "[Info] Checking for webserver..." +for server in "${WEBSERVER[@]}"; do + if [ $(dpkg-query -W -f='${Status}' ${server} 2>/dev/null | grep -c "ok installed") -eq 1 ]; then + echo "[Webserver] ${server} used." + if [[ ${server} == "nginx" || ${server} == "lighttpd" ]]; then + echo "[NOTE] You're using ${server} as your Webserver." + echo "[NOTE] For a no-hassle-setup Apache2 Webserver is recommend!" + if [ $(dpkg-query -W -f='${Status}' php-fpm 2>/dev/null | grep -c "ok installed") -eq 1 ]; then + echo "[Package] php-fpm installed already" + else + echo "[WARNING] Missing common package: php-fpm" + fi + fi + fi +done + +echo "" +echo "" + +echo "[Info] Checking common software..." +for package in "${COMMON_PACKAGES[@]}"; do + if [ $(dpkg-query -W -f='${Status}' ${package} 2>/dev/null | grep -c "ok installed") -eq 1 ]; then + echo "[Package] ${package} installed already" + else + echo "[WARNING] Missing common package: ${package}" + MISSING_PACKAGES+=("${package}") + fi +done + +echo "" +echo "" + +if [[ ${MISSING_PACKAGES[@]} ]]; then + echo "[RESULT] Missing common packages:" + for dependencie in "${MISSING_PACKAGES[@]}" + do + echo $dependencie + done + echo "[WARNING] Please install missing common packages!" +else + echo "[RESULT] No common packages missing." + echo "[OK]" + +fi + diff --git a/resources/sh/checkgithub.sh b/resources/sh/check-github.sh similarity index 100% rename from resources/sh/checkgithub.sh rename to resources/sh/check-github.sh diff --git a/src/js/dependencies.js b/src/js/dependencies.js new file mode 100644 index 000000000..be6eba9a0 --- /dev/null +++ b/src/js/dependencies.js @@ -0,0 +1,84 @@ +/* global i18n */ + +const dependencies = (function () { + // vars + const api = {}; + + let command; + + // init + api.init = function () { + api.checkOS(); + }; + + api.checkOS = function () { + jQuery + .post('api/checkOS.php') + .done(function (result) { + const checkDependencies = api.getTranslation('check_dependencies'); + const unsupportedOs = api.getTranslation('unsupported_os'); + console.log('result: ', result); + if (result.success == 'linux') { + $('.white-box').append($('

    ').text(result.success)); + $('.white-box').append($('

    ').text(checkDependencies)); + api.runCmd('check-deps'); + } else { + $('.white-box').append($('

    ').text(unsupportedOs)); + $('.white-box').append($('

    ').text(result.success)); + } + }) + .fail(function (xhr, status, result) { + console.log('result: ', result); + }); + }; + + api.getTranslation = function (key) { + const translation = i18n(key, config.ui.language); + const fallbackTranslation = i18n(key, 'en'); + if (translation) { + return translation; + } else if (fallbackTranslation) { + return fallbackTranslation; + } + + return key; + }; + + api.runCmd = function ($mode) { + command = { + mode: $mode + }; + + console.log('Run', $mode); + + jQuery + .post('api/update.php', command) + .done(function (result) { + console.log($mode, 'result: ', result); + const updateError = api.getTranslation('update_error'); + + if (result.success) { + if ($mode == 'check-deps') { + // eslint-disable-next-line + result.output.forEach(function (item, index, array) { + $('.white-box').append($('

    ').text(item)); + }); + } + } else { + $('.white-box').append($('

    ').text(updateError)); + } + }) + .fail(function (xhr, status, result) { + const updateFail = api.getTranslation('update_fail'); + $('.white-box').append($('

    ').text(updateFail)); + console.log($mode, 'result: ', result); + }); + }; + + return api; +})(); + +// Init on domready +$(function () { + dependencies.init(); +}); diff --git a/src/js/update.js b/src/js/update.js index 77b50f9d4..95f50e146 100644 --- a/src/js/update.js +++ b/src/js/update.js @@ -18,15 +18,15 @@ const updater = (function () { jQuery .post('api/checkOS.php') .done(function (result) { - const updateCheckConnection = api.getTranslation('update_check_connection'); - const updateUnsupportedOs = api.getTranslation('update_unsupported_os'); + const checkConnection = api.getTranslation('check_connection'); + const unsupportedOs = api.getTranslation('unsupported_os'); console.log('result: ', result); if (result.success == 'linux') { $('.white-box').append($('

    ').text(result.success)); - $('.white-box').append($('

    ').text(updateCheckConnection)); + $('.white-box').append($('

    ').text(checkConnection)); api.checkConnection(); } else { - $('.white-box').append($('

    ').text(updateUnsupportedOs)); + $('.white-box').append($('

    ').text(unsupportedOs)); $('.white-box').append($('

    ').text(result.success)); } }) @@ -40,7 +40,7 @@ const updater = (function () { .post('api/checkConnection.php') .done(function (result) { const ok = api.getTranslation('ok'), - updateNoConnection = api.getTranslation('update_no_connection'), + noConnection = api.getTranslation('no_connection'), updateCheckGit = api.getTranslation('update_check_git'); console.log('result: ', result); if (result.success === true) { @@ -48,7 +48,7 @@ const updater = (function () { $('.white-box').append($('

    ').text(updateCheckGit)); api.runCmd('check-git'); } else { - $('.white-box').append($('

    ').text(updateNoConnection)); + $('.white-box').append($('

    ').text(noConnection)); } }) .fail(function (xhr, status, result) { diff --git a/update.php b/update.php index 7bd7fca19..05db38565 100644 --- a/update.php +++ b/update.php @@ -53,7 +53,7 @@

    Updater

    -

    +

    From bf6425e4d6c2cb649ac615cbc521d01bd033983d Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 11 May 2021 10:46:05 +0200 Subject: [PATCH 036/214] Allow to access updater & dependencies checker from login panel Change-Id: I68f8be24fef2a04108b8e23223713ecebcedcca6 --- login/index.php | 4 ++++ resources/lang/en.json | 2 ++ 2 files changed, 6 insertions(+) diff --git a/login/index.php b/login/index.php index f79a0ce4b..ae7f5eb25 100644 --- a/login/index.php +++ b/login/index.php @@ -75,6 +75,10 @@

    +

    + + +

    diff --git a/resources/lang/en.json b/resources/lang/en.json index 107a44090..3c8ffcfa5 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -70,6 +70,7 @@ "debugpanel:autorefresh": "Auto-Refresh", "degrees": "°", "delete": "Delete", + "dependencies_check": "Installed dependencies", "dev_debugpanel": "Debug panel", "disk_usage": "Disk Usage", "dot": ".", @@ -559,6 +560,7 @@ "update_running": "Updating... Please be patient! Update might take a while! ...", "update_to_dev": "Update to latest development Version", "update_to_stable": "Update to latest Stable v3", + "updater": "Updater", "use_button": "Use Buzzer to take a Picture", "userinterface": "User interface", "userinterface:background_admin": "Admin panel background image path", From 39ce2955d5b06dd34779cbe1950f1129ac4bd435 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sun, 22 Aug 2021 14:22:16 +0200 Subject: [PATCH 037/214] dependencies: protect via settings for admin protection Change-Id: Ia2dbf3fa0262a8bcfaa8156061f23968c4741068 --- dependencies.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dependencies.php b/dependencies.php index b8c208177..aebdc0e75 100644 --- a/dependencies.php +++ b/dependencies.php @@ -1,7 +1,21 @@ From 5628071dbe7eb1b402eaac386d5e723a090bf084 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 11 May 2021 11:17:38 +0200 Subject: [PATCH 038/214] admin panel: add button for dependencies check & updater Change-Id: I9925b3fad6e9a71c60cf866da7382842fdc4d4b5 --- dependencies.php | 2 ++ lib/configsetup.inc.php | 14 ++++++++++++++ resources/lang/en.json | 4 ++++ src/js/admin.js | 14 ++++++++++++++ update.php | 8 +++++--- 5 files changed, 39 insertions(+), 3 deletions(-) diff --git a/dependencies.php b/dependencies.php index aebdc0e75..65b09ada9 100644 --- a/dependencies.php +++ b/dependencies.php @@ -57,6 +57,8 @@
    + +
    diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 040c70e78..cc15c3f90 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -254,6 +254,13 @@ 'name' => 'DISKUSAGEBUTTON', 'value' => 'diskusage-btn', ], + 'dependencies_button' => [ + 'view' => 'basic', + 'type' => 'button', + 'placeholder' => 'dependencies_check', + 'name' => 'DEPENDENCIESBUTTON', + 'value' => 'dependencies-btn', + ], ], 'frontpage' => [ 'view' => 'basic', @@ -1991,5 +1998,12 @@ 'name' => 'CHECKVERSIONBUTTON', 'value' => 'checkversion-btn', ], + 'updater_button' => [ + 'view' => 'basic', + 'type' => 'button', + 'placeholder' => 'updater', + 'name' => 'UPDATERBUTTON', + 'value' => 'updater-btn', + ], ], ]; diff --git a/resources/lang/en.json b/resources/lang/en.json index 3c8ffcfa5..d9f5c571b 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -128,6 +128,7 @@ "general:database_file": "Database file name", "general:database_rebuild": "Rebuild image database", "general:delete_no_request": "Delete images without confirm request", + "general:dependencies_button": "Check installed dependencies", "general:dev_debugpanel": "Debug Panel", "general:dev_demo_images": "Use Demo Images", "general:dev_enabled": "Dev-Mode", @@ -273,6 +274,7 @@ "manual:general:database_file": "Name of the database file.", "manual:general:database_rebuild": "Rebuild the images database. Normally not required but can be used to fix a corrupted database file.", "manual:general:delete_no_request": "If enabled, images will be deleted without a confirm request. Delete of images can't be undone!", + "manual:general:dependencies_button": "This will check if needed dependencies are installed.", "manual:general:dev_debugpanel": "Opens the debug panel in a separate window. Make sure you have Dev-Mode enabled for more information.", "manual:general:dev_demo_images": "If enabled, sample pictures will be used instead taking a picture.", "manual:general:dev_enabled": "Enables development mode with advanced logging.", @@ -414,6 +416,7 @@ "manual:userinterface:ui_rounded_corners": "If enabled, the Photobooth UI uses smooth rounded edges.", "manual:userinterface:ui_style": "Choose a start page styling. To use custom styling please create and use \"/template/custom.template.php\" and \"/resources/css/custom_style.css\", if one of these files is not readable we will fallback to default theme.", "manual:version:check_version": "This will check online against the Github repository for the latest Photobooth version.", + "manual:version:updater_button": "This will check if Photobooth can be updated and perform the update. Only works on Linux if Photobooth was installed via git.", "milliseconds": "ms", "myconfig": "My Config", "newCollage": "New Collage", @@ -589,5 +592,6 @@ "using_latest_version": "You are using the latest version of photobooth.", "version": "Version", "version:check_version": "Photobooth version", + "version:updater_button": "Update Photobooth (git)", "wait_message": "Please wait..." } diff --git a/src/js/admin.js b/src/js/admin.js index 048330dfc..d971e2127 100644 --- a/src/js/admin.js +++ b/src/js/admin.js @@ -73,6 +73,20 @@ $(function () { return false; }); + $('#updater-btn').on('click', function (e) { + e.preventDefault(); + location.assign('../update.php'); + + return false; + }); + + $('#dependencies-btn').on('click', function (e) { + e.preventDefault(); + location.assign('../dependencies.php'); + + return false; + }); + $('#databaserebuild-btn').on('click', function (e) { e.preventDefault(); const elem = $(this); diff --git a/update.php b/update.php index 05db38565..90d072ebc 100644 --- a/update.php +++ b/update.php @@ -56,14 +56,16 @@

    - + - + - +
    + +
    From 8ac47ffa73b4fbaf629bc8d21108ba49d8ddbc09 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 3 Aug 2021 11:58:00 +0200 Subject: [PATCH 039/214] updater: nitpicks Change-Id: Ia69f8092ab8f20eaa4e31ea724cfdcf90a69744d --- api/checkConnection.php | 4 ++-- api/checkOS.php | 4 ++-- src/js/dependencies.js | 15 ++++++++------- src/js/update.js | 22 ++++++++++++---------- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/api/checkConnection.php b/api/checkConnection.php index 35ffbf631..9b667d7f5 100644 --- a/api/checkConnection.php +++ b/api/checkConnection.php @@ -15,10 +15,10 @@ function is_connected() { if (is_connected()) { echo json_encode([ - 'success' => true, + 'connected' => true, ]); } else { echo json_encode([ - 'success' => false, + 'connected' => false, ]); } diff --git a/api/checkOS.php b/api/checkOS.php index 3d3aac603..204c8b600 100644 --- a/api/checkOS.php +++ b/api/checkOS.php @@ -1,8 +1,8 @@ $os, + 'os' => $operating_system, ]); diff --git a/src/js/dependencies.js b/src/js/dependencies.js index be6eba9a0..fe1336a3b 100644 --- a/src/js/dependencies.js +++ b/src/js/dependencies.js @@ -15,20 +15,21 @@ const dependencies = (function () { jQuery .post('api/checkOS.php') .done(function (result) { - const checkDependencies = api.getTranslation('check_dependencies'); - const unsupportedOs = api.getTranslation('unsupported_os'); - console.log('result: ', result); - if (result.success == 'linux') { - $('.white-box').append($('

    ').text(result.success)); + console.log('Operating system: ', result); + const checkDependencies = api.getTranslation('check_dependencies'), + unsupportedOs = api.getTranslation('unsupported_os'); + + if (result.os == 'linux') { + $('.white-box').append($('

    ').text(result.os)); $('.white-box').append($('

    ').text(checkDependencies)); api.runCmd('check-deps'); } else { $('.white-box').append($('

    ').text(unsupportedOs)); - $('.white-box').append($('

    ').text(result.success)); + $('.white-box').append($('

    ').text(result.os)); } }) .fail(function (xhr, status, result) { - console.log('result: ', result); + console.log('Operating system check failed: ', result); }); }; diff --git a/src/js/update.js b/src/js/update.js index 95f50e146..4a66a7d97 100644 --- a/src/js/update.js +++ b/src/js/update.js @@ -18,20 +18,21 @@ const updater = (function () { jQuery .post('api/checkOS.php') .done(function (result) { - const checkConnection = api.getTranslation('check_connection'); - const unsupportedOs = api.getTranslation('unsupported_os'); - console.log('result: ', result); - if (result.success == 'linux') { - $('.white-box').append($('

    ').text(result.success)); + console.log('Operating system: ', result); + const checkConnection = api.getTranslation('check_connection'), + unsupportedOs = api.getTranslation('unsupported_os'); + + if (result.os == 'linux') { + $('.white-box').append($('

    ').text(result.os)); $('.white-box').append($('

    ').text(checkConnection)); api.checkConnection(); } else { $('.white-box').append($('

    ').text(unsupportedOs)); - $('.white-box').append($('

    ').text(result.success)); + $('.white-box').append($('

    ').text(result.os)); } }) .fail(function (xhr, status, result) { - console.log('result: ', result); + console.log('Operating system check failed: ', result); }); }; @@ -39,11 +40,12 @@ const updater = (function () { jQuery .post('api/checkConnection.php') .done(function (result) { + console.log('Connected: ', result); const ok = api.getTranslation('ok'), noConnection = api.getTranslation('no_connection'), updateCheckGit = api.getTranslation('update_check_git'); - console.log('result: ', result); - if (result.success === true) { + + if (result.connected === true) { $('.white-box').append($('

    ').text(ok)); $('.white-box').append($('

    ').text(updateCheckGit)); api.runCmd('check-git'); @@ -52,7 +54,7 @@ const updater = (function () { } }) .fail(function (xhr, status, result) { - console.log('result: ', result); + console.log('Checking connection failed: ', result); }); }; From 74cc5ab6eb0f5800b786a40c1bfc35d928a5bae7 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 24 Aug 2021 10:21:58 +0200 Subject: [PATCH 040/214] Updater: experimental at this stage --- update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.php b/update.php index 90d072ebc..636558fd9 100644 --- a/update.php +++ b/update.php @@ -52,7 +52,7 @@

    -

    Updater

    +

    Updater (experimental)

    From ce48347604b9a0200b7c0172d3427f69be06fc82 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 24 Aug 2021 10:26:38 +0200 Subject: [PATCH 041/214] dependencies checker: allow using overrides.css --- dependencies.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dependencies.php b/dependencies.php index 65b09ada9..8f6fdbcf3 100644 --- a/dependencies.php +++ b/dependencies.php @@ -46,6 +46,9 @@ + + + From 222e7c35d2cb6ee98bfbd180624b7b768a052b4a Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 24 Aug 2021 10:27:38 +0200 Subject: [PATCH 042/214] Updater: allow using overrides.css --- update.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/update.php b/update.php index 636558fd9..4d9fda1d0 100644 --- a/update.php +++ b/update.php @@ -47,6 +47,9 @@ + + + From 8a26a0bee18865cbee807450dc382a44f5ff09b0 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 24 Aug 2021 19:07:34 +0200 Subject: [PATCH 043/214] core: prevent stopping auto reload on result page If gallery is opened on the result screen the timeout is reset and not started again, results in no auto reload to the Startpage. We now start a new countdown on click instead only clearing a running countdown. Change-Id: I79c785df87b8a1dcf10b12fb1678913186ec4fe7 --- src/js/core.js | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/js/core.js b/src/js/core.js index a2509583d..0c24e8562 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -66,7 +66,13 @@ const photoBooth = (function () { api.resetTimeOut = function () { clearTimeout(timeOut); + if (config.dev.enabled) { + console.log('Timeout for auto reload cleared.'); + } if (!takingPic) { + if (config.dev.enabled) { + console.log('Timeout for auto reload set to', config.picture.time_to_live * 1000, ' seconds.'); + } timeOut = setTimeout(function () { api.reloadPage(); }, config.picture.time_to_live * 1000); @@ -1263,10 +1269,23 @@ const photoBooth = (function () { } }); - // clear Timeout to not reset the gallery, if you clicked anywhere + // clear Timeout $(document).on('click', function () { - if (!startPage.is(':visible')) { - clearTimeout(timeOut); + if (api.isTimeOutPending()) { + if (typeof onStandaloneGalleryView !== 'undefined') { + clearTimeout(timeOut); + if (config.dev.enabled) { + console.log('Standalone Gallery: Timeout for auto reload cleared.'); + } + } else if (startPage.is(':visible')) { + clearTimeout(timeOut); + if (config.dev.enabled) { + console.log('Timeout for auto reload cleared.'); + } + } else { + // if !startPage.is(':visible') + api.resetTimeOut(); + } } }); From 7159c4f9809fbc08bc6e6110a92bbfa96c6413ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 00:01:49 +0000 Subject: [PATCH 044/214] build(deps-dev): bump @prettier/plugin-php from 0.17.3 to 0.17.4 Bumps [@prettier/plugin-php](https://github.com/prettier/prettier-php) from 0.17.3 to 0.17.4. - [Release notes](https://github.com/prettier/prettier-php/releases) - [Commits](https://github.com/prettier/prettier-php/compare/v0.17.3...v0.17.4) --- updated-dependencies: - dependency-name: "@prettier/plugin-php" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d63a3bd7f..6c189bf38 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "devDependencies": { "@babel/core": "^7.14.8", "@babel/preset-env": "^7.14.8", - "@prettier/plugin-php": "^0.17.3", + "@prettier/plugin-php": "^0.17.4", "archiver": "^5.3.0", "colors": "^1.4.0", "eslint": "^7.32.0", diff --git a/yarn.lock b/yarn.lock index e6cd3922c..5a54567e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -942,10 +942,10 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf" integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w== -"@prettier/plugin-php@^0.17.3": - version "0.17.3" - resolved "https://registry.yarnpkg.com/@prettier/plugin-php/-/plugin-php-0.17.3.tgz#193a18e308db7416f26f6e1dc0d2605d1ff01416" - integrity sha512-kD5IrGyKWF/p3XActVZ+GfbMl9knoK3XKBTG2bytpOtCO0+Q8eozimSgk/493rgFkXL3W2Ap/4GKgZf7u64+ow== +"@prettier/plugin-php@^0.17.4": + version "0.17.4" + resolved "https://registry.yarnpkg.com/@prettier/plugin-php/-/plugin-php-0.17.4.tgz#00f71c9c19ba1eb0aa960600f18b5550e474e553" + integrity sha512-hmVWJrHCnMdQe7zr2F3yo78QZJmSksy0DN8YybTRaSR/+xn2qN+it+pegYHdXsrkmLKYDAotq5in+dG3z85b9Q== dependencies: linguist-languages "^7.5.1" mem "^8.0.0" From dc81679820ecf87d82a4aaea6c6ee3baecf91c6d Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Wed, 1 Sep 2021 10:36:44 +0200 Subject: [PATCH 045/214] welcome.php: fix node_modules path --- welcome.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/welcome.php b/welcome.php index 9728e943c..22765c38e 100644 --- a/welcome.php +++ b/welcome.php @@ -86,7 +86,7 @@
    - + From 5f609bcf794017a1fdfc97fa44efed53931a97a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 08:35:54 +0000 Subject: [PATCH 046/214] build(deps-dev): bump @babel/core from 7.14.8 to 7.15.0 Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.14.8 to 7.15.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.15.0/packages/babel-core) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 120 ++++++++++++++++++++++++++++++--------------------- 2 files changed, 72 insertions(+), 50 deletions(-) diff --git a/package.json b/package.json index 6c189bf38..683502dde 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "whatwg-fetch": "^3.6.2" }, "devDependencies": { - "@babel/core": "^7.14.8", + "@babel/core": "^7.15.0", "@babel/preset-env": "^7.14.8", "@prettier/plugin-php": "^0.17.4", "archiver": "^5.3.0", diff --git a/yarn.lock b/yarn.lock index 5a54567e0..635dac364 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,25 +21,30 @@ dependencies: "@babel/highlight" "^7.14.5" -"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.14.5", "@babel/compat-data@^7.14.7": +"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.14.7": version "7.14.7" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.7.tgz#7b047d7a3a89a67d2258dc61f604f098f1bc7e08" integrity sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw== -"@babel/core@^7.14.8": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.8.tgz#20cdf7c84b5d86d83fac8710a8bc605a7ba3f010" - integrity sha512-/AtaeEhT6ErpDhInbXmjHcUQXH0L0TEgscfcxk1qbOvLuKCa5aZT0SOOtDKFY96/CLROwbLSKyFor6idgNaU4Q== +"@babel/compat-data@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" + integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA== + +"@babel/core@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.0.tgz#749e57c68778b73ad8082775561f67f5196aafa8" + integrity sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw== dependencies: "@babel/code-frame" "^7.14.5" - "@babel/generator" "^7.14.8" - "@babel/helper-compilation-targets" "^7.14.5" - "@babel/helper-module-transforms" "^7.14.8" + "@babel/generator" "^7.15.0" + "@babel/helper-compilation-targets" "^7.15.0" + "@babel/helper-module-transforms" "^7.15.0" "@babel/helpers" "^7.14.8" - "@babel/parser" "^7.14.8" + "@babel/parser" "^7.15.0" "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.8" - "@babel/types" "^7.14.8" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -47,12 +52,12 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/generator@^7.14.8": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.8.tgz#bf86fd6af96cf3b74395a8ca409515f89423e070" - integrity sha512-cYDUpvIzhBVnMzRoY1fkSEhK/HmwEVwlyULYgn/tMQYd6Obag3ylCjONle3gdErfXBW61SVTlR9QR7uWlgeIkg== +"@babel/generator@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.0.tgz#a7d0c172e0d814974bad5aa77ace543b97917f15" + integrity sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ== dependencies: - "@babel/types" "^7.14.8" + "@babel/types" "^7.15.0" jsesc "^2.5.1" source-map "^0.5.0" @@ -71,12 +76,12 @@ "@babel/helper-explode-assignable-expression" "^7.14.5" "@babel/types" "^7.14.5" -"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.5.tgz#7a99c5d0967911e972fe2c3411f7d5b498498ecf" - integrity sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw== +"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.14.5", "@babel/helper-compilation-targets@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz#973df8cbd025515f3ff25db0c05efc704fa79818" + integrity sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A== dependencies: - "@babel/compat-data" "^7.14.5" + "@babel/compat-data" "^7.15.0" "@babel/helper-validator-option" "^7.14.5" browserslist "^4.16.6" semver "^6.3.0" @@ -152,6 +157,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-member-expression-to-functions@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz#0ddaf5299c8179f27f37327936553e9bba60990b" + integrity sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg== + dependencies: + "@babel/types" "^7.15.0" + "@babel/helper-module-imports@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz#ec67e4404f41750463e455cc3203f6a32e93fcb0" @@ -166,19 +178,19 @@ dependencies: "@babel/types" "^7.14.5" -"@babel/helper-module-transforms@^7.14.5", "@babel/helper-module-transforms@^7.14.8": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.14.8.tgz#d4279f7e3fd5f4d5d342d833af36d4dd87d7dc49" - integrity sha512-RyE+NFOjXn5A9YU1dkpeBaduagTlZ0+fccnIcAGbv1KGUlReBj7utF7oEth8IdIBQPcux0DDgW5MFBH2xu9KcA== +"@babel/helper-module-transforms@^7.14.5", "@babel/helper-module-transforms@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz#679275581ea056373eddbe360e1419ef23783b08" + integrity sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg== dependencies: "@babel/helper-module-imports" "^7.14.5" - "@babel/helper-replace-supers" "^7.14.5" + "@babel/helper-replace-supers" "^7.15.0" "@babel/helper-simple-access" "^7.14.8" "@babel/helper-split-export-declaration" "^7.14.5" - "@babel/helper-validator-identifier" "^7.14.8" + "@babel/helper-validator-identifier" "^7.14.9" "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.8" - "@babel/types" "^7.14.8" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" "@babel/helper-optimise-call-expression@^7.14.5": version "7.14.5" @@ -211,6 +223,16 @@ "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" +"@babel/helper-replace-supers@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz#ace07708f5bf746bf2e6ba99572cce79b5d4e7f4" + integrity sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.15.0" + "@babel/helper-optimise-call-expression" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" + "@babel/helper-simple-access@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz#66ea85cf53ba0b4e588ba77fc813f53abcaa41c4" @@ -249,10 +271,10 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== -"@babel/helper-validator-identifier@^7.14.8": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.8.tgz#32be33a756f29e278a0d644fa08a2c9e0f88a34c" - integrity sha512-ZGy6/XQjllhYQrNw/3zfWRwZCTVSiBLZ9DHVZxn9n2gip/7ab8mv2TWlKPIBk26RwedCBoWdjLmn+t9na2Gcow== +"@babel/helper-validator-identifier@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" + integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== "@babel/helper-validator-option@^7.14.5": version "7.14.5" @@ -296,10 +318,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.14.5", "@babel/parser@^7.14.8": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.8.tgz#66fd41666b2d7b840bd5ace7f7416d5ac60208d4" - integrity sha512-syoCQFOoo/fzkWDeM0dLEZi5xqurb5vuyzwIMNZRNun+N/9A4cUZeQaE7dTrB8jGaKuJRBtEOajtnmw0I5hvvA== +"@babel/parser@^7.14.5", "@babel/parser@^7.15.0": + version "7.15.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.3.tgz#3416d9bea748052cfcb63dbcc27368105b1ed862" + integrity sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA== "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.14.5": version "7.14.5" @@ -890,27 +912,27 @@ "@babel/parser" "^7.14.5" "@babel/types" "^7.14.5" -"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5", "@babel/traverse@^7.14.8": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.8.tgz#c0253f02677c5de1a8ff9df6b0aacbec7da1a8ce" - integrity sha512-kexHhzCljJcFNn1KYAQ6A5wxMRzq9ebYpEDV4+WdNyr3i7O44tanbDOR/xjiG2F3sllan+LgwK+7OMk0EmydHg== +"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5", "@babel/traverse@^7.14.8", "@babel/traverse@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.15.0.tgz#4cca838fd1b2a03283c1f38e141f639d60b3fc98" + integrity sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw== dependencies: "@babel/code-frame" "^7.14.5" - "@babel/generator" "^7.14.8" + "@babel/generator" "^7.15.0" "@babel/helper-function-name" "^7.14.5" "@babel/helper-hoist-variables" "^7.14.5" "@babel/helper-split-export-declaration" "^7.14.5" - "@babel/parser" "^7.14.8" - "@babel/types" "^7.14.8" + "@babel/parser" "^7.15.0" + "@babel/types" "^7.15.0" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.12.13", "@babel/types@^7.14.5", "@babel/types@^7.14.8", "@babel/types@^7.4.4": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.8.tgz#38109de8fcadc06415fbd9b74df0065d4d41c728" - integrity sha512-iob4soQa7dZw8nodR/KlOQkPh9S4I8RwCxwRIFuiMRYjOzH/KJzdUfDgz6cGi5dDaclXF4P2PAhCdrBJNIg68Q== +"@babel/types@^7.12.13", "@babel/types@^7.14.5", "@babel/types@^7.14.8", "@babel/types@^7.15.0", "@babel/types@^7.4.4": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.0.tgz#61af11f2286c4e9c69ca8deb5f4375a73c72dcbd" + integrity sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ== dependencies: - "@babel/helper-validator-identifier" "^7.14.8" + "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" "@eslint/eslintrc@^0.4.3": From df10ddb08f3bdc562d9665549b5cb71218a652f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 08:43:14 +0000 Subject: [PATCH 047/214] build(deps-dev): bump @babel/preset-env from 7.14.8 to 7.15.0 Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.14.8 to 7.15.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.15.0/packages/babel-preset-env) --- updated-dependencies: - dependency-name: "@babel/preset-env" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 115 ++++++++++++++++++++++++++++++--------------------- 2 files changed, 68 insertions(+), 49 deletions(-) diff --git a/package.json b/package.json index 683502dde..a1e37683d 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ }, "devDependencies": { "@babel/core": "^7.15.0", - "@babel/preset-env": "^7.14.8", + "@babel/preset-env": "^7.15.0", "@prettier/plugin-php": "^0.17.4", "archiver": "^5.3.0", "colors": "^1.4.0", diff --git a/yarn.lock b/yarn.lock index 635dac364..3b509b14c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,12 +21,7 @@ dependencies: "@babel/highlight" "^7.14.5" -"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.14.7": - version "7.14.7" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.7.tgz#7b047d7a3a89a67d2258dc61f604f098f1bc7e08" - integrity sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw== - -"@babel/compat-data@^7.15.0": +"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.14.7", "@babel/compat-data@^7.15.0": version "7.15.0" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA== @@ -233,13 +228,6 @@ "@babel/traverse" "^7.15.0" "@babel/types" "^7.15.0" -"@babel/helper-simple-access@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz#66ea85cf53ba0b4e588ba77fc813f53abcaa41c4" - integrity sha512-nfBN9xvmCt6nrMZjfhkl7i0oTV3yxR4/FztsbOASyTvVcoYd0TRHh7eMLdlEcCqobydC0LAF3LtC92Iwxo0wyw== - dependencies: - "@babel/types" "^7.14.5" - "@babel/helper-simple-access@^7.14.8": version "7.14.8" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz#82e1fec0644a7e775c74d305f212c39f8fe73924" @@ -332,10 +320,10 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5" "@babel/plugin-proposal-optional-chaining" "^7.14.5" -"@babel/plugin-proposal-async-generator-functions@^7.14.7": - version "7.14.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.7.tgz#784a48c3d8ed073f65adcf30b57bcbf6c8119ace" - integrity sha512-RK8Wj7lXLY3bqei69/cc25gwS5puEc3dknoFPFbqfy3XxYQBQFvu4ioWpafMBAB+L9NyptQK4nMOa5Xz16og8Q== +"@babel/plugin-proposal-async-generator-functions@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz#7028dc4fa21dc199bbacf98b39bab1267d0eaf9a" + integrity sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/helper-remap-async-to-generator" "^7.14.5" @@ -588,10 +576,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-classes@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.5.tgz#0e98e82097b38550b03b483f9b51a78de0acb2cf" - integrity sha512-J4VxKAMykM06K/64z9rwiL6xnBHgB1+FVspqvlgCdwD1KUbQNfszeKVVOMh59w3sztHYIZDgnhOC4WbdEfHFDA== +"@babel/plugin-transform-classes@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.9.tgz#2a391ffb1e5292710b00f2e2c210e1435e7d449f" + integrity sha512-NfZpTcxU3foGWbl4wxmZ35mTsYJy8oQocbeIMoDAGGFarAmSQlL+LWMkDx/tj6pNotpbX3rltIA4dprgAPOq5A== dependencies: "@babel/helper-annotate-as-pure" "^7.14.5" "@babel/helper-function-name" "^7.14.5" @@ -676,14 +664,14 @@ "@babel/helper-plugin-utils" "^7.14.5" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.5.tgz#7aaee0ea98283de94da98b28f8c35701429dad97" - integrity sha512-en8GfBtgnydoao2PS+87mKyw62k02k7kJ9ltbKe0fXTHrQmG6QZZflYuGI1VVG7sVpx4E1n7KBpNlPb8m78J+A== +"@babel/plugin-transform-modules-commonjs@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz#3305896e5835f953b5cdb363acd9e8c2219a5281" + integrity sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig== dependencies: - "@babel/helper-module-transforms" "^7.14.5" + "@babel/helper-module-transforms" "^7.15.0" "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-simple-access" "^7.14.5" + "@babel/helper-simple-access" "^7.14.8" babel-plugin-dynamic-import-node "^2.3.3" "@babel/plugin-transform-modules-systemjs@^7.14.5": @@ -705,10 +693,10 @@ "@babel/helper-module-transforms" "^7.14.5" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-named-capturing-groups-regex@^7.14.7": - version "7.14.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.7.tgz#60c06892acf9df231e256c24464bfecb0908fd4e" - integrity sha512-DTNOTaS7TkW97xsDMrp7nycUVh6sn/eq22VaxWfEdzuEbRsiaOU0pqU7DlyUGHVsbQbSghvjKRpEl+nUCKGQSg== +"@babel/plugin-transform-named-capturing-groups-regex@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz#c68f5c5d12d2ebaba3762e57c2c4f6347a46e7b2" + integrity sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.14.5" @@ -806,17 +794,17 @@ "@babel/helper-create-regexp-features-plugin" "^7.14.5" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/preset-env@^7.14.8": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.14.8.tgz#254942f5ca80ccabcfbb2a9f524c74bca574005b" - integrity sha512-a9aOppDU93oArQ51H+B8M1vH+tayZbuBqzjOhntGetZVa+4tTu5jp+XTwqHGG2lxslqomPYVSjIxQkFwXzgnxg== +"@babel/preset-env@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.15.0.tgz#e2165bf16594c9c05e52517a194bf6187d6fe464" + integrity sha512-FhEpCNFCcWW3iZLg0L2NPE9UerdtsCR6ZcsGHUX6Om6kbCQeL5QZDqFDmeNHC6/fy6UH3jEge7K4qG5uC9In0Q== dependencies: - "@babel/compat-data" "^7.14.7" - "@babel/helper-compilation-targets" "^7.14.5" + "@babel/compat-data" "^7.15.0" + "@babel/helper-compilation-targets" "^7.15.0" "@babel/helper-plugin-utils" "^7.14.5" "@babel/helper-validator-option" "^7.14.5" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.14.5" - "@babel/plugin-proposal-async-generator-functions" "^7.14.7" + "@babel/plugin-proposal-async-generator-functions" "^7.14.9" "@babel/plugin-proposal-class-properties" "^7.14.5" "@babel/plugin-proposal-class-static-block" "^7.14.5" "@babel/plugin-proposal-dynamic-import" "^7.14.5" @@ -849,7 +837,7 @@ "@babel/plugin-transform-async-to-generator" "^7.14.5" "@babel/plugin-transform-block-scoped-functions" "^7.14.5" "@babel/plugin-transform-block-scoping" "^7.14.5" - "@babel/plugin-transform-classes" "^7.14.5" + "@babel/plugin-transform-classes" "^7.14.9" "@babel/plugin-transform-computed-properties" "^7.14.5" "@babel/plugin-transform-destructuring" "^7.14.7" "@babel/plugin-transform-dotall-regex" "^7.14.5" @@ -860,10 +848,10 @@ "@babel/plugin-transform-literals" "^7.14.5" "@babel/plugin-transform-member-expression-literals" "^7.14.5" "@babel/plugin-transform-modules-amd" "^7.14.5" - "@babel/plugin-transform-modules-commonjs" "^7.14.5" + "@babel/plugin-transform-modules-commonjs" "^7.15.0" "@babel/plugin-transform-modules-systemjs" "^7.14.5" "@babel/plugin-transform-modules-umd" "^7.14.5" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.14.7" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.14.9" "@babel/plugin-transform-new-target" "^7.14.5" "@babel/plugin-transform-object-super" "^7.14.5" "@babel/plugin-transform-parameters" "^7.14.5" @@ -878,11 +866,11 @@ "@babel/plugin-transform-unicode-escapes" "^7.14.5" "@babel/plugin-transform-unicode-regex" "^7.14.5" "@babel/preset-modules" "^0.1.4" - "@babel/types" "^7.14.8" + "@babel/types" "^7.15.0" babel-plugin-polyfill-corejs2 "^0.2.2" babel-plugin-polyfill-corejs3 "^0.2.2" babel-plugin-polyfill-regenerator "^0.2.2" - core-js-compat "^3.15.0" + core-js-compat "^3.16.0" semver "^6.3.0" "@babel/preset-modules@^0.1.4": @@ -1499,6 +1487,17 @@ browserslist@^4.16.6: escalade "^3.1.1" node-releases "^1.1.71" +browserslist@^4.16.8: + version "4.16.8" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.8.tgz#cb868b0b554f137ba6e33de0ecff2eda403c4fb0" + integrity sha512-sc2m9ohR/49sWEbPj14ZSSZqp+kbi16aLao42Hmn3Z8FpjuMaq2xCA2l4zl9ITfyzvnvyE0hcg62YkIGKxgaNQ== + dependencies: + caniuse-lite "^1.0.30001251" + colorette "^1.3.0" + electron-to-chromium "^1.3.811" + escalade "^3.1.1" + node-releases "^1.1.75" + buffer-crc32@^0.2.1, buffer-crc32@^0.2.13: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" @@ -1570,6 +1569,11 @@ caniuse-lite@^1.0.30001219: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001219.tgz#5bfa5d0519f41f993618bd318f606a4c4c16156b" integrity sha512-c0yixVG4v9KBc/tQ2rlbB3A/bgBFRvl8h8M4IeUbqCca4gsiCfvtaheUssbnux/Mb66Vjz7x8yYjDgYcNQOhyQ== +caniuse-lite@^1.0.30001251: + version "1.0.30001252" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001252.tgz#cb16e4e3dafe948fc4a9bb3307aea054b912019a" + integrity sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw== + cardinal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-1.0.0.tgz#50e21c1b0aa37729f9377def196b5a9cec932ee9" @@ -1738,6 +1742,11 @@ colorette@^1.2.2: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== +colorette@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.3.0.tgz#ff45d2f0edb244069d3b772adeb04fed38d0a0af" + integrity sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w== + colors@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" @@ -1815,12 +1824,12 @@ copy-props@^2.0.1: each-props "^1.3.0" is-plain-object "^2.0.1" -core-js-compat@^3.14.0, core-js-compat@^3.15.0: - version "3.15.2" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.15.2.tgz#47272fbb479880de14b4e6081f71f3492f5bd3cb" - integrity sha512-Wp+BJVvwopjI+A1EFqm2dwUmWYXrvucmtIB2LgXn/Rb+gWPKYxtmb4GKHGKG/KGF1eK9jfjzT38DITbTOCX/SQ== +core-js-compat@^3.14.0, core-js-compat@^3.16.0: + version "3.16.4" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.16.4.tgz#cf28abe0e45a43645b04b2c1a073efa03d0b3b26" + integrity sha512-IzCSomxRdahCYb6G3HiN6pl3JCiM0NMunRcNa1pIeC7g17Vd6Ue3AT9anQiENPIm/svThUVer1pIbLMDERIsFw== dependencies: - browserslist "^4.16.6" + browserslist "^4.16.8" semver "7.0.0" core-util-is@1.0.2, core-util-is@~1.0.0: @@ -2030,6 +2039,11 @@ electron-to-chromium@^1.3.723: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.725.tgz#04fc83f9189169aff50f0a00c6b4090b910cba85" integrity sha512-2BbeAESz7kc6KBzs7WVrMc1BY5waUphk4D4DX5dSQXJhsc3tP5ZFaiyuL0AB7vUKzDYpIeYwTYlEfxyjsGUrhw== +electron-to-chromium@^1.3.811: + version "1.3.826" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.826.tgz#dbe356b1546b39d83bcd47e675a9c5f61dadaed2" + integrity sha512-bpLc4QU4B8PYmdO4MSu2ZBTMD8lAaEXRS43C09lB31BvYwuk9UxgBRXbY5OJBw7VuMGcg2MZG5FyTaP9u4PQnw== + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -3772,6 +3786,11 @@ node-releases@^1.1.71: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb" integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg== +node-releases@^1.1.75: + version "1.1.75" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.75.tgz#6dd8c876b9897a1b8e5a02de26afa79bb54ebbfe" + integrity sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw== + node-sass@^4.8.3: version "4.14.1" resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.14.1.tgz#99c87ec2efb7047ed638fb4c9db7f3a42e2217b5" From cc5f4216983ccde9a417c1050c4dded4825cab1f Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 2 Sep 2021 11:34:49 +0200 Subject: [PATCH 048/214] update-booth.sh: also copy hidden files and folder Change-Id: I8800168e2a7ed5a65dce746154b8d3ba81e6a685 --- update-booth.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-booth.sh b/update-booth.sh index a021da344..71de795c9 100644 --- a/update-booth.sh +++ b/update-booth.sh @@ -142,7 +142,7 @@ else info "[Info] Skipping common software checks..." fi -cp -rf ./* "${booth_source}/" +cp -rf ./ "${booth_source}/" chown -R www-data:www-data ${booth_source} for file in "${OLDFILES[@]}"; do From 638f1c1cc0723b1cd428e62a6f8c961c5d30dd16 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 2 Sep 2021 11:35:32 +0200 Subject: [PATCH 049/214] build: also remove skip welcome message file Change-Id: I3aab0394fb560e4eeadfd5533af701749d8b1abc --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a1e37683d..00139b311 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "3.0.0", "description": "A Photobooth webinterface for Raspberry Pi and Windows", "scripts": { - "build": "npm-run-all --serial format build:faq build:gulp build:head", + "build": "npm-run-all --serial format build:faq build:gulp build:head clean:skipwelcome", "build:faq": "mdown --input 'faq/*.md' --output manual --header faq/header.php --footer faq/footer.html && mv manual/faq.html manual/faq.php", "build:gulp": "gulp", "build:head": "git log --format='%h %s' -n 20 > HEAD", @@ -14,6 +14,7 @@ "clean:head": "rm HEAD || echo 'HEAD can not be removed or file not exist!'", "clean:js": "rm resources/js/*.js || echo 'resources/js/*.js can not be removed or no .js files exist!'", "clean:node": "rm -rf node_modules/ || echo 'node_modules/ can not be removed or does not exist!'", + "clean:skipwelcome": "rm .skip_welcome || echo '.skip_welcome can not be removed or does not exist!'", "eslint": "eslint src/js/*.js", "eslint:fix": "eslint src/js/*.js --fix", "format": "npm-run-all --parallel format:*", From cf85b7d94e4e8aa9130ab96c19d00229e64c24d7 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 2 Sep 2021 11:37:53 +0200 Subject: [PATCH 050/214] welcome.php: fix typo, define $PHOTOBOOTH_HOME Change-Id: I34a886c7fa201566187a6554b4ad2b3709a44595 --- welcome.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/welcome.php b/welcome.php index 22765c38e..e457ecd4d 100644 --- a/welcome.php +++ b/welcome.php @@ -23,6 +23,8 @@ $URL = $_SERVER['HTTP_HOST']; } +$PHOTOBOOTH_HOME = getcwd(); + ?> @@ -67,11 +69,11 @@ the Photobooth-Wiki or at the Telegram group.

    Here are some basic information for you:

    -

    Location of your Photobooth installation:
    +

    Location of your Photobooth installation:
    All files and folders inside this path belong to the Webserver user "www-data".

    Images can be found at:

    Databases are placed at:

    -

    Add your own files (e.g. background images, frames, override.css) inside:
    +

    Add your own files (e.g. background images, frames, overrides.css) inside:
    All files and folders inside this path will be ignored on git and won't cause trouble while updating Photobooth.

    You can change the settings and look of Photobooth using the Admin panel at http:///admin.
    A standalone gallery can be found at http:///gallery.php.
    From b1add7ea069bfe2ad51c19113d73e15eb3ec2b3f Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 2 Sep 2021 11:47:11 +0200 Subject: [PATCH 051/214] Remove unused reset-raspbian.sh script Change-Id: I85eb01f3ee85da99a4d6bfe962dca18bd3525cdf --- reset-raspbian.sh | 65 ----------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 reset-raspbian.sh diff --git a/reset-raspbian.sh b/reset-raspbian.sh deleted file mode 100644 index fce323a62..000000000 --- a/reset-raspbian.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -# Stop on the first sign of trouble -set -e - -function info { - echo -e "\033[0;36m${1}\033[0m" -} - -function error { - echo -e "\033[0;31m${1}\033[0m" -} - -if [ $UID != 0 ]; then - error "ERROR: Only root is allowed to execute the reset script. Forgot sudo?" - exit 1 -fi - -if [ ! -f /proc/device-tree/model ]; then - error "ERROR: This reset script is only intended to run on a Raspberry Pi." - exit 2 -fi - -PI_MODEL=$(tr -d '\0' Date: Thu, 2 Sep 2021 11:47:32 +0200 Subject: [PATCH 052/214] config: allow to skip welcome screen Change-Id: If631f81d20218bd54c0387741579a55e4d390966 --- config/config.inc.php | 1 + index.php | 12 ++++++++---- lib/configsetup.inc.php | 6 ++++++ resources/lang/en.json | 2 ++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/config/config.inc.php b/config/config.inc.php index 34605ca41..f405dacae 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -35,6 +35,7 @@ // F R O N T P A G E $config['ui']['show_fork'] = true; +$config['ui']['skip_welcome'] = false; $config['event']['enabled'] = true; $config['event']['textLeft'] = 'We'; // possible event symbol values: 'fa-camera-retro', 'fa-birthday-cake', 'fa-gift', 'fa-tree', 'fa-snowflake-o', 'fa-heart-o', diff --git a/index.php b/index.php index 1b38a156a..06be604bd 100644 --- a/index.php +++ b/index.php @@ -1,13 +1,17 @@ 'ui[show_fork]', 'value' => $config['ui']['show_fork'], ], + 'ui_skip_welcome' => [ + 'view' => 'advanced', + 'type' => 'checkbox', + 'name' => 'ui[skip_welcome]', + 'value' => $config['ui']['skip_welcome'], + ], 'ui_github' => [ 'view' => 'expert', 'type' => 'hidden', diff --git a/resources/lang/en.json b/resources/lang/en.json index d9f5c571b..1daba1aff 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -95,6 +95,7 @@ "frontpage:event_textLeft": "Text left", "frontpage:event_textRight": "Text right", "frontpage:ui_show_fork": "Show Fork Badge", + "frontpage:ui_skip_welcome": "Skip welcome screen", "gallery": "Gallery", "gallery:gallery_allow_delete": "Allow deletion of images from gallery", "gallery:gallery_bottom_bar": "Show button bar inside gallery on bottom", @@ -244,6 +245,7 @@ "manual:frontpage:event_textLeft": "Enter the text visible on the left side of the chosen symbol.", "manual:frontpage:event_textRight": "Enter the text visible on the right side of the chosen symbol.", "manual:frontpage:ui_show_fork": "If enabled, a fork badge is shown on the right upper corner on the start screen.", + "manual:frontpage:ui_skip_welcome": "If enabled, a welcome screen is visible while accessing Photobooth the first time after installation / update.", "manual:gallery:gallery_allow_delete": "If enabled pictures can be deleted from the gallery at any time.", "manual:gallery:gallery_bottom_bar": "If enabled, the button bar is shown in the gallery below.", "manual:gallery:gallery_date_format": "Enter your date style.", From f1415def0ec1ea0bad8b0af7552a120aed31a53e Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 2 Sep 2021 12:10:33 +0200 Subject: [PATCH 053/214] Add script to disable automount and add polkit rules for USB Sync Change-Id: I1d51952a1e01bfae97e17091f223fa83d9cb84d4 --- enable-usb-sync.sh | 76 ++++++++++++++++++++++++++++++++++++++++++++++ faq/faq.md | 10 +++++- 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 enable-usb-sync.sh diff --git a/enable-usb-sync.sh b/enable-usb-sync.sh new file mode 100644 index 000000000..dd00b4bfa --- /dev/null +++ b/enable-usb-sync.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +# Stop on the first sign of trouble +set -e + +SILENT_INSTALL=false + +if [ "silent" = "$1" ]; then + SILENT_INSTALL=true + info "Performing silent install" +fi + +function info { + echo -e "\033[0;36m${1}\033[0m" +} + +function error { + echo -e "\033[0;31m${1}\033[0m" +} + +#Param 1: Question / Param 2: Default / silent answer +function ask_yes_no { + if [ "$SILENT_INSTALL" = false ]; then + read -p "${1}: " -n 1 -r + else + REPLY=${2} + fi +} + +if [ $UID != 0 ]; then + error "ERROR: Only root is allowed to execute the installer. Forgot sudo?" + exit 1 +fi + +if [ ! -f /proc/device-tree/model ]; then + error "ERROR: This installer is only intended to run on a Raspberry Pi." + exit 2 +fi + +PI_MODEL=$(tr -d '\0' > /home/pi/.config/pcmanfm/LXDE-pi/pcmanfm.conf <> /etc/polkit-1/localauthority/50-local.d/udisks2.pkla < Date: Thu, 2 Sep 2021 12:13:27 +0200 Subject: [PATCH 054/214] FAQ: adjust chromium flags Change-Id: I98894de03077c15a9e7345519b714375a498a61d --- faq/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faq/faq.md b/faq/faq.md index 4ec8cc7b9..b8131123c 100644 --- a/faq/faq.md +++ b/faq/faq.md @@ -252,7 +252,7 @@ and add the following lines: @xset s off @xset -dpms @xset s noblank -@chromium-browser --incognito --kiosk http://localhost/ +@chromium-browser --noerrdialogs --disable-infobars --disable-translate --no-first-run --check-for-update-interval=31536000 --use-fake-ui-for-media-stream --start-fullscreen --kiosk http://127.0.0.1 --incognito --touch-events=enabled ``` **NOTE:** If you're using QR-Code replace `http://localhost/` with your local IP-Adress (e.g. `http://192.168.4.1`), else QR-Code does not work. From bdb3f0e49939514bca0a4e03c1bb18a3f8f93ec1 Mon Sep 17 00:00:00 2001 From: flacoonb <44100356+flacoonb@users.noreply.github.com> Date: Sat, 28 Aug 2021 19:06:59 +0200 Subject: [PATCH 055/214] FAQ: Raspberry Touchpanel DSI simultaneously with HDMI Change-Id: Ib67ce775abc0eb10e87c34deddd35a4f35e1f702 --- faq/faq.md | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/faq/faq.md b/faq/faq.md index b8131123c..0944b889d 100644 --- a/faq/faq.md +++ b/faq/faq.md @@ -482,3 +482,72 @@ A USB drive / stick can be identified either by the USB stick label (e.g. `photo Pictures will be synced to the USB stick matched by the pattern, as long as it is mounted (aka USB stick is plugged in) Debugging: switch on dev settings for server logs to be written to the `data/tmp` directory of the photobooth installation (i.e. `data/tmp/synctodrive_server.log`). + +


    + +### Raspberry Touchpanel DSI simultaneously with HDMI + +When using a touchscreen on DSI and an HDMI screen simultaneously, the touch input is offset. This is because both monitors are recognized as one screen. + +The remedy is the following: +``` +xinput list +``` +remember the device id=[X] of the touchscreen. +``` +xinput list-props "Device Name" +``` +Get the ID in brackets (Y) of Coordinate Transformation Matrix + +``` +xinput set-prop [X] --type=float [Y] c0 0 c1 0 c2 c3 0 0 1 +``` + +adjust the coding c0 0 c1 0 c2 c3 0 0 1 with your own data. +You can get the values of your screens with the following command: + +``` +xrandr | grep \* # xrandr uses "*" +``` +to identify the screen being used +``` +c0 = touch_area_width / total_width +(width of touch screen divided by width of both screens) +c2 = touch_area_height / total_height +(height touch screen divided by height of both screens) +c1 = touch_area_x_offset / total_width +c3 = touch_area_y_offset / total_height +``` +and execute the above command again with your own coding! + +Example: + +``` +xinput set-prop 6 --type=float 136 0.3478260869565217 0 0 0.55555555555556 0 0 0 1 +``` + +Now unfortunately the settings are only valid for the current session. So create the following desktop startup file with your own values: + +``` +nano ~/.config/autostart/touch.desktop +``` + +``` +[Desktop Entry] +Name=TouchSettingsAutostart +Comment=Set up touch screen setting when starting desktop +Type=Application +## Adapt command to own values +Exec=xinput set-prop 6 --type=float 136 0.3478260869565217 0 0 0 0.55555555555556 0 0 0 1 +Terminal=false +``` + +If you want to use the touchscreen as photobooth and the second monitor for the standalone slideshow for example, open the autostart file: +``` +sudo nano /etc/xdg/lxsession/LXDE-pi/autostart +``` +and enter/adjust the @chromium-browser entries as followed (adjust the value _1920_ to your own resolution and URL if necessary): +``` +@chromium-browser --new-window --start-fullscreen --kiosk http://localhost --window-position=1920,0 --user-data-dir=Default +@chromium-browser --new-window --start-fullscreen --kiosk http://localhost/slideshow/ --window-position=0,0 --user-data-dir='Profile 1' +``` From fc712e28652af7ec94389bc0c046ff75d07ee6e5 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 4 Sep 2021 11:51:17 +0200 Subject: [PATCH 056/214] install-raspbian.sh: ask if remote access to CUPS should be enabled Change-Id: I5b2ac59e4655f5843e217a90c9a0befe4a8a4fca --- install-raspbian.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install-raspbian.sh b/install-raspbian.sh index 6afba64a2..15912118c 100755 --- a/install-raspbian.sh +++ b/install-raspbian.sh @@ -331,6 +331,16 @@ then apt install -y cups gpasswd -a www-data lp gpasswd -a www-data lpadmin + + echo -e "\033[0;33m### By default CUPS can only be accessed via localhost." + ask_yes_no "### You like to allow remote access to CUPS over IP from all devices inside your network? [y/N] " "Y" + echo -e "\033[0m" + if [[ $REPLY =~ ^[Yy]$ ]] + then + info "### Access to CUPS will be allowed from all devices in your network." + cupsctl --remote-any + /etc/init.d/cups restart + fi fi # Pi specific setup start From 3f2349cc8b839c4970106eb8f4e40b54bd8632c5 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 4 Sep 2021 12:45:36 +0200 Subject: [PATCH 057/214] FAQ: How to administer CUPS remotely using the web interface? Change-Id: I725ca931c9925788e29c3f23e9703173c7b73e8f --- faq/faq.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/faq/faq.md b/faq/faq.md index 0944b889d..304b00834 100644 --- a/faq/faq.md +++ b/faq/faq.md @@ -551,3 +551,15 @@ and enter/adjust the @chromium-browser entries as followed (adjust the value _19 @chromium-browser --new-window --start-fullscreen --kiosk http://localhost --window-position=1920,0 --user-data-dir=Default @chromium-browser --new-window --start-fullscreen --kiosk http://localhost/slideshow/ --window-position=0,0 --user-data-dir='Profile 1' ``` + +
    + +### How to administer CUPS remotely using the web interface? + +By default the CUPS webinterface can only be accessed via [http://localhost:631](http://localhost:631) from your local machine. +To remote access CUPS from other clients you need to run the following commands: +``` +sudo cupsctl --remote-any +sudo /etc/init.d/cups restart +``` + From 2363003ceda8d00df4a13bbaede769b7f0777de5 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 4 Sep 2021 22:00:37 +0200 Subject: [PATCH 058/214] admin: add button for reboot and shutdown on linux Change-Id: I3986c1e4e214caa8685c92f481401128a96879e7 --- allow-shutdown.sh | 23 +++++++++++++++++++++++ api/shellCommand.php | 6 ++++++ config/config.inc.php | 3 ++- install-raspbian.sh | 13 +++++++------ lib/config.php | 7 +++++++ lib/configsetup.inc.php | 25 +++++++++++++++++++++++++ resources/lang/en.json | 13 +++++++++++-- src/js/admin.js | 31 +++++++++++++++++++++++++++++++ 8 files changed, 112 insertions(+), 9 deletions(-) create mode 100644 allow-shutdown.sh diff --git a/allow-shutdown.sh b/allow-shutdown.sh new file mode 100644 index 000000000..4c13348b4 --- /dev/null +++ b/allow-shutdown.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Stop on the first sign of trouble +set -e + +function info { + echo -e "\033[0;36m${1}\033[0m" +} + +function error { + echo -e "\033[0;31m${1}\033[0m" +} + +if [ $UID != 0 ]; then + error "ERROR: Only root is allowed to execute the installer. Forgot sudo?" + exit 1 +fi + +cat > /etc/sudoers.d/020_www-data-shutdown << EOF +# Photobooth Remotebuzzer shutdown button for www-data to shutdown the system +www-data ALL=(ALL) NOPASSWD: /sbin/shutdown +EOF + diff --git a/api/shellCommand.php b/api/shellCommand.php index 7592502c4..9986ba20e 100644 --- a/api/shellCommand.php +++ b/api/shellCommand.php @@ -12,6 +12,12 @@ case 'post-command': $cmd = sprintf($config['post_photo']['cmd']); break; + case 'reboot': + $cmd = 'sudo ' . sprintf($config['reboot']['cmd']); + break; + case 'shutdown': + $cmd = 'sudo ' . sprintf($config['shutdown']['cmd']); + break; default: $cmd = 'echo "Error for mode ' . $mode . ' - command not defined in configuration"'; break; diff --git a/config/config.inc.php b/config/config.inc.php index f405dacae..0acb77690 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -318,7 +318,8 @@ $config['nodebin']['cmd'] = null; $config['pre_photo']['cmd'] = null; $config['post_photo']['cmd'] = null; - +$config['reboot']['cmd'] = null; +$config['shutdown']['cmd'] = null; // F O L D E R S $config['folders']['config'] = 'config'; diff --git a/install-raspbian.sh b/install-raspbian.sh index 15912118c..6ebcdc6a6 100755 --- a/install-raspbian.sh +++ b/install-raspbian.sh @@ -343,6 +343,13 @@ then fi fi +# Add configuration required for www-data to be able to initiate system shutdown / reboot +info "### Note: In order for the shutdown and reboot button to work we install /etc/sudoers.d/020_www-data-shutdown" +cat > /etc/sudoers.d/020_www-data-shutdown << EOF +# Photobooth buttons for www-data to shutdown or reboot the system from admin panel or via remotebuzzer +www-data ALL=(ALL) NOPASSWD: /sbin/shutdown +EOF + # Pi specific setup start if [ "$RUNNING_ON_PI" = true ]; then echo -e "\033[0;33m### You probably like to start the browser on every start." @@ -397,12 +404,6 @@ cat >> /boot/config.txt << EOF gpio=16,17,20,21,22,26,27=pu # Photobooth End EOF -# add configuration required for www-data to be able to initiate system shutdown -info "### Note: In order for the shutdown button to work we install /etc/sudoers.d/020_www-data-shutdown" -cat >> /etc/sudoers.d/020_www-data-shutdown << EOF -# Photobooth Remotebuzzer shutdown button for www-data to shutdown the system -www-data ALL=(ALL) NOPASSWD: /sbin/shutdown -EOF # update artifacts in user configuration from old remotebuzzer implementation if [ -f "$INSTALLFOLDERPATH/config/my.config.inc.php" ]; then diff --git a/lib/config.php b/lib/config.php index 79f4a4ea7..72888ca87 100644 --- a/lib/config.php +++ b/lib/config.php @@ -26,6 +26,9 @@ 'nodebin' => [ 'cmd' => '', ], + 'reboot' => [ + 'cmd' => '', + ], 'shutdown' => [ 'cmd' => '', ], @@ -50,6 +53,9 @@ 'nodebin' => [ 'cmd' => '/usr/bin/node', ], + 'reboot' => [ + 'cmd' => '/sbin/shutdown -r now', + ], 'shutdown' => [ 'cmd' => '/sbin/shutdown -h now', ], @@ -94,6 +100,7 @@ $config['preview']['cmd'] = $cmds[$os]['preview']['cmd']; $config['preview']['killcmd'] = $cmds[$os]['preview']['killcmd']; $config['nodebin']['cmd'] = $cmds[$os]['nodebin']['cmd']; +$config['reboot']['cmd'] = $cmds[$os]['reboot']['cmd']; $config['shutdown']['cmd'] = $cmds[$os]['shutdown']['cmd']; $config['adminpanel']['view_default'] = 'expert'; diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 8d7bef1dc..97e10d556 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -1893,6 +1893,13 @@ 'name' => 'nodebin[cmd]', 'value' => htmlentities($config['nodebin']['cmd']), ], + 'reboot_cmd' => [ + 'view' => 'expert', + 'type' => 'input', + 'placeholder' => $defaultConfig['reboot']['cmd'], + 'name' => 'reboot[cmd]', + 'value' => htmlentities($config['reboot']['cmd']), + ], 'shutdown_cmd' => [ 'view' => 'expert', 'type' => 'input', @@ -2012,4 +2019,22 @@ 'value' => 'updater-btn', ], ], + 'power' => [ + 'view' => 'basic', + 'platform' => 'linux', + 'reboot_button' => [ + 'view' => 'basic', + 'type' => 'button', + 'placeholder' => 'reboot_button', + 'name' => 'REBOOTBUTTON', + 'value' => 'reboot-btn', + ], + 'shutdown_button' => [ + 'view' => 'basic', + 'type' => 'button', + 'placeholder' => 'shutdown_button', + 'name' => 'SHUTDOWNBUTTON', + 'value' => 'shutdown-btn', + ], + ], ]; diff --git a/resources/lang/en.json b/resources/lang/en.json index 1daba1aff..072195950 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -61,7 +61,8 @@ "commands:preview_killcmd": "Command to kill live preview", "commands:print_cmd": "Print command", "commands:print_msg": "Success message for print", - "commands:shutdown_cmd": "Remote Buzzer shutdown command", + "commands:reboot_cmd": "Reboot command", + "commands:shutdown_cmd": "Shutdown command", "commands:take_picture_cmd": "Take picture command", "commands:take_picture_msg": "Success message for take picture", "current_version": "Installed:", @@ -228,7 +229,8 @@ "manual:commands:preview_killcmd": "Command line which is executed to kill the live preview.", "manual:commands:print_cmd": "Command line which is executed while pressing the \"Print\" button.", "manual:commands:print_msg": "Message returned from print command.", - "manual:commands:shutdown_cmd": "Command used by Remote Buzzer to initiate shutdown via button - example /sbin/shutdown -h now.", + "manual:commands:reboot_cmd": "Command used to initiate reboot via button - example /sbin/shutdown -r now.", + "manual:commands:shutdown_cmd": "Command used to initiate shutdown via button - example /sbin/shutdown -h now.", "manual:commands:take_picture_cmd": "Command line which is executed while pressing the \"Take Pic\" button. On Linux you can for example use gphoto2 to take pictures, on Windows you can use digiCamControl.", "manual:commands:take_picture_msg": "Message returned from take picture command.", "manual:folders:folders_archives": "Enter the name of your archives folder.", @@ -349,6 +351,8 @@ "manual:pictures:textonpicture_locationx": "X-Coordinates of the text while adding text to your picture.", "manual:pictures:textonpicture_locationy": "Y-Coordinates of the text while adding text to your picture.", "manual:pictures:textonpicture_rotation": "Enter a value which is used as degrees the text on your gets rotated.", + "manual:power:reboot_button": "Button to initiate a reboot.", + "manual:power:shutdown_button": "Button to initiate a shutdown.", "manual:preview:preview_asBackground": "If enabled, a stream from your device cam is used as background on start screen.", "manual:preview:preview_camTakesPic": "If enabled, a picture is taken from device cam instead executing the \"Take picture command\". Please note that the resolution depends on the given hight and width because it's acts like taking a screenshot.", "manual:preview:preview_camera_mode": "Choose between front- or back facing camera mode of your device cam.", @@ -460,6 +464,9 @@ "pictures:textonpicture_locationx": "X Coordinate", "pictures:textonpicture_locationy": "Y Coordinate", "pictures:textonpicture_rotation": "Text rotation", + "power": "Power", + "power:reboot_button": "Reboot", + "power:shutdown_button": "Shutdown", "preview": "Live preview", "preview:preview_asBackground": "Use stream from device cam as background", "preview:preview_camTakesPic": "Device cam takes picture", @@ -503,6 +510,7 @@ "qrHelp": "To download the picture to your smartphone, connect to the WiFi:", "really_delete": "Really reset according to your settings? This cannot be undone!", "really_delete_image": "will be deleted! This cannot be undone! Really delete picture?", + "reboot_button": "Reboot", "reload": "Reload Page", "remotebuzzer": "Hardware Button", "remotebuzzer:remotebuzzer_collagebutton": "Collage Button", @@ -534,6 +542,7 @@ "show_faq": "Open FAQ", "show_manual": "Open Manual", "show_wiki": "Open Wiki (internet connection required)", + "shutdown_button": "Shutdown", "slideshow": "Standalone Slideshow", "slideshow:slideshow_pictureTime": "Milliseconds an image is displayed at standalone slideshow", "slideshow:slideshow_randomPicture": "Show random pictures", diff --git a/src/js/admin.js b/src/js/admin.js index d971e2127..096bd4245 100644 --- a/src/js/admin.js +++ b/src/js/admin.js @@ -12,6 +12,23 @@ $(function () { return key; }; + const shellCommand = function ($mode) { + const command = { + mode: $mode + }; + + console.log('Run', $mode); + + jQuery + .post('../api/shellCommand.php', command) + .done(function (result) { + console.log($mode, 'result: ', result); + }) + .fail(function (xhr, status, result) { + console.log($mode, 'result: ', result); + }); + }; + $('#reset-btn').on('click', function (e) { e.preventDefault(); const msg = getTranslation('really_delete'); @@ -160,6 +177,20 @@ $(function () { return false; }); + $('#reboot-btn').on('click', function (ev) { + ev.preventDefault(); + shellCommand('reboot'); + + return false; + }); + + $('#shutdown-btn').on('click', function (ev) { + ev.preventDefault(); + shellCommand('shutdown'); + + return false; + }); + // Admin Panel active section at init $('#nav-general').addClass('active'); From 58cd2adf4d6ff001e63ac0ef40d5ff5274a26b37 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Wed, 8 Sep 2021 20:36:21 +0200 Subject: [PATCH 059/214] welcome: color links to font color --- src/sass/welcome.scss | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sass/welcome.scss b/src/sass/welcome.scss index c677cbb56..3099f675d 100644 --- a/src/sass/welcome.scss +++ b/src/sass/welcome.scss @@ -20,4 +20,15 @@ body { padding: 1em; text-align: center; color: $fontColor; + a { + color: $fontColor; + } + a:link, + a:visited { + text-decoration: none; + } + a:hover, + a:active { + text-decoration: underline; + } } From e5652ba3d9e481f73cc8dc0eeb4938d5827f4a06 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 9 Sep 2021 19:11:22 +0200 Subject: [PATCH 060/214] FAQ: Update Preview Mode section --- faq/faq.md | 83 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/faq/faq.md b/faq/faq.md index 304b00834..75e8780e4 100644 --- a/faq/faq.md +++ b/faq/faq.md @@ -300,46 +300,49 @@ You can follow the instructions [here](https://www.geeks3d.com/hacklab/20160108/ ### How to use a live stream as background at countdown? There's different ways depending on your needs and personal setup: -1. If you access Photobooth on your Raspberry Pi you could use a Raspberry Pi Camera. Raspberry Pi Camera will be detected as "device cam". - - Admin panel config "Preview mode": `from device cam` - - **Note:** - - Preview `"from device cam"` will always use the camera of the device where Photobooth get opened in a Browser (e.g. on a tablet it will always show the tablet camera while on a smartphone it will always show the smartphone camera instead)! - - Secure origin or exception required! - - [Prefer Secure Origins For Powerful New Features](https://medium.com/@Carmichaelize/enabling-the-microphone-camera-in-chrome-for-local-unsecure-origins-9c90c3149339) - - [Enabling the Microphone/Camera in Chrome for (Local) Unsecure Origins](https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features) - - Admin panel config *"Device cam takes picture"* can be used to take a picture from this preview instead using gphoto / digicamcontrol / raspistill. - -2. If you like to have the same preview independent of the device you access Photobooth from: - Make sure to have a stream available you can use (e.g. from your Webcam, Smartphone Camera or Raspberry Pi Camera) - - Admin panel config *"Preview mode"*: `from URL` - - Admin panel config *"Preview-URL"* example (add needed IP address instead): `url(http://127.0.0.1:8081)` - - **Note** - - Do NOT enable *"Device cam takes picture"* in admin panel config! - - Capture pictures via `raspistill` won't work if motion is installed! - - Requires Photobooth v2.2.1 or later! - -3. A preview can also be done using the video mode of your DSLR (Linux only), but only works if you access Photobooth via [http://localhost](http://localhost) or [http://127.0.0.1](http://localhost): - - Liveview must be supported for your camera model, [check here](http://gphoto.org/proj/libgphoto2/support.php) - - install all dependencies `sudo apt install ffmpeg v4l2loopback-dkms -y` - - create a virtual webcam `modprobe v4l2loopback exclusive_caps=1 card_label="GPhoto2 Webcam"` - - `/dev/video0` is used by default, you can use `v4l2-ctl --list-devices` to check which `/dev/*` is the correct one: - If it doesn't match the default setup you need to adjust the `Command to generate a live preview` inside the admin panel! - - Give permissions to /dev/video* `sudo gpasswd -a www-data video` (this was done automatically if you used the installation script) and reboot once - - Admin panel config *"Preview mode"*: `from gphoto2` - - **Note** - - Requires Photobooth v2.11.0 or later! - - You need to access Photobooth directly via [http://localhost](http://localhost) or [http://127.0.0.1](http://localhost) - - There's a delay of about 3 seconds until the preview starts, to avoid that disable the `Battery saving mode on gphoto2 live preview` option to generate a preview in background. **This results in a high battery usage and also a general slowdown.** - - Sometimes Chromium doesn't detect the V4l2 camera launch from php: you need to run `sudo gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0` from terminal first and load Chromium a first time with a webpage asking for the camera. - - Chromium sometimes has trouble, if there is another webcam like `bcm2835-isp`, it will take it by default instead. Disable other webcams, e.g. `rmmod bcm2835-isp`. - - To ensure that the configuration works after reboot add the following lines to `/etc/rc.local` (You have to add these lines bevor `exit 0`): - - `modprobe v4l2loopback exclusive_caps=1 card_label="GPhoto2 Webcam"` - - `rmmod bcm2835-isp` - - Make sure the countdown is long enough to start the preview and free gphoto2 at the end of the countdown to be able to take a picture (2 seconds before the countdown ends). - - For best user experience the countdown should be set at least to 8 seconds. +#### Preview _"from device cam"_ +If you access Photobooth on your Raspberry Pi you could use a Raspberry Pi Camera. Raspberry Pi Camera will be detected as "device cam". +- Admin panel config "Preview mode": `from device cam` + +**Note:** +- Preview `"from device cam"` will always use the camera of the device where Photobooth get opened in a Browser (e.g. on a tablet it will always show the tablet camera while on a smartphone it will always show the smartphone camera instead)! +- Secure origin or exception required! + - [Prefer Secure Origins For Powerful New Features](https://medium.com/@Carmichaelize/enabling-the-microphone-camera-in-chrome-for-local-unsecure-origins-9c90c3149339) + - [Enabling the Microphone/Camera in Chrome for (Local) Unsecure Origins](https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features) +- Admin panel config *"Device cam takes picture"* can be used to take a picture from this preview instead using gphoto / digicamcontrol / raspistill. + +#### Preview _"from URL"_ +If you like to have the same preview independent of the device you access Photobooth from: +Make sure to have a stream available you can use (e.g. from your Webcam, Smartphone Camera or Raspberry Pi Camera) +- Admin panel config *"Preview mode"*: `from URL` +- Admin panel config *"Preview-URL"* example (add needed IP address instead): `url(http://127.0.0.1:8081)` + +**Note** +- Do NOT enable *"Device cam takes picture"* in admin panel config! +- Capture pictures via `raspistill` won't work if motion is installed! +- Requires Photobooth v2.2.1 or later! + +#### Preview _"from gohoto2"_ +A preview can also be done using the video mode of your DSLR (Linux only), but only works if you access Photobooth via [http://localhost](http://localhost) or [http://127.0.0.1](http://localhost): +- Liveview **must** be supported for your camera model, [check here](http://gphoto.org/proj/libgphoto2/support.php) +- install all dependencies `sudo apt install ffmpeg v4l2loopback-dkms -y` +- create a virtual webcam `sudo modprobe v4l2loopback exclusive_caps=1 card_label="GPhoto2 Webcam"` + - `/dev/video0` is used by default, you can use `v4l2-ctl --list-devices` to check which `/dev/*` is the correct one: + If it doesn't match the default setup you need to adjust the `Command to generate a live preview` inside the admin panel! +- Give permissions to /dev/video* `sudo gpasswd -a www-data video` (this was done automatically if you used the installation script) and reboot once +- Admin panel config *"Preview mode"*: `from gphoto2` + +**Note** +- Requires Photobooth v2.11.0 or later! +- You need to access Photobooth directly via [http://localhost](http://localhost) or [http://127.0.0.1](http://localhost), you won't be able to see the preview on a different device (e.g. Tablet) +- There's a delay of about 3 seconds until the preview starts, to avoid that disable the `Battery saving mode on gphoto2 live preview` option to generate a preview in background. **This results in a high battery usage and also a general slowdown.** +- Sometimes Chromium doesn't detect the V4l2 camera launch from php: you need to run `sudo gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0` from terminal first and load Chromium a first time with a webpage asking for the camera. +- Chromium sometimes has trouble, if there is another webcam like `bcm2835-isp`, it will take it by default instead. Disable other webcams, e.g. ` sudo rmmod bcm2835-isp`. +- To ensure that the configuration works after reboot add the following lines to `/etc/rc.local` (You have to add these lines bevor `exit 0`): + - `modprobe v4l2loopback exclusive_caps=1 card_label="GPhoto2 Webcam"` + - `rmmod bcm2835-isp` +- Make sure the countdown is long enough to start the preview and free gphoto2 at the end of the countdown to be able to take a picture (2 seconds before the countdown ends). + - For best user experience the countdown should be set at least to 8 seconds.
    From ece2f8151cb1381d1fbdbe6e4f27595a7afe917b Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Fri, 10 Sep 2021 06:00:24 +0200 Subject: [PATCH 061/214] continuous collage: allow to disable single images being visible --- lib/configsetup.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 97e10d556..574bb597a 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -606,7 +606,7 @@ 'name' => 'collage[continuous_time]', 'placeholder' => $defaultConfig['collage']['continuous_time'], 'value' => $config['collage']['continuous_time'], - 'range_min' => 1, + 'range_min' => 0, 'range_max' => 20, 'range_step' => 1, 'unit' => 'seconds', From b327f26a9f935df1e49074244197a9fbc77658f4 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 14 Sep 2021 14:06:03 +0200 Subject: [PATCH 062/214] updater: fix commit script Change-Id: I0ebb1bb00992fa3a1e167c02a24b3c6b0264e47b --- resources/sh/commit.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/sh/commit.sh b/resources/sh/commit.sh index 605aed134..2d71e4bec 100644 --- a/resources/sh/commit.sh +++ b/resources/sh/commit.sh @@ -9,14 +9,14 @@ set_username="$(git config user.name Photobooth)" get_useremail="$(git config user.email)" set_useremail="$(git config user.email Photobooth@localhost)" -if [ -z $get_username ]; +if [ -z "$get_username" ]; then echo "git user.name not set!" echo "Setting git user.name." $set_username fi -if [ -z $get_useremail ]; +if [ -z "$get_useremail" ]; then echo "git user.email not set!" echo "Setting git user.email." From 9cbc41a5ea70d2f5126c58d9d12ce60dfa3ecdb0 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 14 Sep 2021 15:57:01 +0200 Subject: [PATCH 063/214] js(photoboothTools): add central logging function Change-Id: I0f48fd2cd8a0685e74dd21e34ba76bed4bed93e1 --- admin/debugpanel.php | 3 +- admin/diskusage.php | 1 + admin/index.php | 1 + chromakeying.php | 1 + gallery.php | 1 + index.php | 1 + livechroma.php | 1 + src/js/admin.js | 12 +-- src/js/adminshortcut.js | 3 +- src/js/chromakeying.js | 18 ++--- src/js/core.js | 140 +++++++++++++++------------------- src/js/dependencies.js | 12 +-- src/js/diskusage.js | 7 +- src/js/gallery_updatecheck.js | 8 +- src/js/livechroma.js | 31 ++++---- src/js/photoinit.js | 22 +++--- src/js/remotebuzzer_client.js | 32 ++++---- src/js/tools.js | 22 ++++++ src/js/update.js | 16 ++-- update.php | 1 + 20 files changed, 166 insertions(+), 167 deletions(-) create mode 100644 src/js/tools.js diff --git a/admin/debugpanel.php b/admin/debugpanel.php index d1dbf86b7..caa5a5c9a 100644 --- a/admin/debugpanel.php +++ b/admin/debugpanel.php @@ -110,7 +110,8 @@ function html_src_indent($num) - + + diff --git a/admin/diskusage.php b/admin/diskusage.php index 0f4ca6144..19a258012 100644 --- a/admin/diskusage.php +++ b/admin/diskusage.php @@ -84,6 +84,7 @@ + diff --git a/admin/index.php b/admin/index.php index 630aea66c..80527ca97 100644 --- a/admin/index.php +++ b/admin/index.php @@ -289,6 +289,7 @@ function isElementHidden($element_class, $setting) + diff --git a/chromakeying.php b/chromakeying.php index b73fbba9d..750aeb654 100644 --- a/chromakeying.php +++ b/chromakeying.php @@ -112,6 +112,7 @@ + diff --git a/gallery.php b/gallery.php index a6284cffc..fe8e2fa23 100644 --- a/gallery.php +++ b/gallery.php @@ -99,6 +99,7 @@ + diff --git a/index.php b/index.php index 06be604bd..511bc4df9 100644 --- a/index.php +++ b/index.php @@ -215,6 +215,7 @@ + diff --git a/livechroma.php b/livechroma.php index c30fd6640..5f6c03919 100644 --- a/livechroma.php +++ b/livechroma.php @@ -161,6 +161,7 @@ + diff --git a/src/js/admin.js b/src/js/admin.js index 096bd4245..1db3ba983 100644 --- a/src/js/admin.js +++ b/src/js/admin.js @@ -1,4 +1,4 @@ -/* globals i18n */ +/* globals i18n photoboothTools */ $(function () { const getTranslation = function (key) { const translation = i18n(key, config.ui.language); @@ -17,15 +17,15 @@ $(function () { mode: $mode }; - console.log('Run', $mode); + photoboothTools.console.log('Run' + $mode); jQuery .post('../api/shellCommand.php', command) .done(function (result) { - console.log($mode, 'result: ', result); + photoboothTools.console.log($mode, 'result: ', result); }) .fail(function (xhr, status, result) { - console.log($mode, 'result: ', result); + photoboothTools.console.log($mode, 'result: ', result); }); }; @@ -135,7 +135,7 @@ $(function () { method: 'GET', success: (data) => { $('#checkVersion').empty(); - console.log('data', data); + photoboothTools.console.log('data', data); if (!data.updateAvailable) { $('#current_version_text').text(getTranslation('using_latest_version')); } else if (/^\d+\.\d+\.\d+$/u.test(data.availableVersion)) { @@ -157,7 +157,7 @@ $(function () { }, error: (jqXHR) => { - console.log('Error checking Version: ', jqXHR.responseText); + photoboothTools.console.log('Error checking Version: ', jqXHR.responseText); elem.removeClass('saving'); elem.addClass('error'); diff --git a/src/js/adminshortcut.js b/src/js/adminshortcut.js index c1c5cb5d4..8875e39ce 100644 --- a/src/js/adminshortcut.js +++ b/src/js/adminshortcut.js @@ -1,3 +1,4 @@ +/* globals photoboothTools */ /* exported adminsettings */ let admincount = 0; @@ -10,7 +11,7 @@ function adminsettings() { if (admincount == 3) { window.location.href = 'login/index.php'; } - console.log(admincount); + photoboothTools.console.log(admincount); admincount++; setTimeout(countreset, 10000); } diff --git a/src/js/chromakeying.js b/src/js/chromakeying.js index 575010b23..cc131b5de 100644 --- a/src/js/chromakeying.js +++ b/src/js/chromakeying.js @@ -1,4 +1,4 @@ -/* globals MarvinColorModelConverter AlphaBoundary MarvinImage i18n Seriously initRemoteBuzzerFromDOM rotaryController */ +/* globals MarvinColorModelConverter AlphaBoundary MarvinImage i18n Seriously initRemoteBuzzerFromDOM rotaryController photoboothTools */ /* exported setBackgroundImage */ let mainImage; let mainImageWidth; @@ -123,10 +123,8 @@ function setMainImage(imgSrc) { const r = parseInt(color.substr(1, 2), 16) / 255; const g = parseInt(color.substr(3, 2), 16) / 255; const b = parseInt(color.substr(5, 2), 16) / 255; - if (config.dev.enabled) { - console.log('Chromakeying color:', color); - console.log('Red:', r, 'Green:', g, 'Blue:', b); - } + photoboothTools.console.logDev('Chromakeying color:', color); + photoboothTools.console.logDev('Red:', r, 'Green:', g, 'Blue:', b); chroma.screen = [r, g, b, 1]; seriously.go(); mainImage = new Image(); @@ -199,7 +197,7 @@ function printImage(filename, cb) { const errormsg = getTranslation('error'); if (isPrinting) { - console.log('Printing already: ' + isPrinting); + photoboothTools.console.log('Printing already: ' + isPrinting); } else { isPrinting = true; setTimeout(function () { @@ -210,10 +208,10 @@ function printImage(filename, cb) { filename: filename }, success: (data) => { - console.log('Picture processed: ', data); + photoboothTools.console.log('Picture processed: ', data); if (data.error) { - console.log('An error occurred: ', data.error); + photoboothTools.console.log('An error occurred: ', data.error); $('#print_mesg').empty(); $('#print_mesg').html( '' @@ -233,7 +231,7 @@ function printImage(filename, cb) { }, config.print.time); }, error: (jqXHR, textStatus) => { - console.log('An error occurred: ', textStatus); + photoboothTools.console.log('An error occurred: ', textStatus); $('#print_mesg').empty(); $('#print_mesg').html( '' @@ -316,7 +314,7 @@ function closeHandler(ev) { $(document).on('keyup', function (ev) { if (config.print.from_chromakeying && config.print.key && parseInt(config.print.key, 10) === ev.keyCode) { if (isPrinting) { - console.log('Printing already in progress!'); + photoboothTools.console.log('Printing already in progress!'); } else { $('#print-btn').trigger('click'); } diff --git a/src/js/core.js b/src/js/core.js index 0c24e8562..8bd6a34b4 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -1,4 +1,4 @@ -/* globals initPhotoSwipeFromDOM initRemoteBuzzerFromDOM i18n setMainImage remoteBuzzerClient rotaryController globalGalleryHandle */ +/* globals initPhotoSwipeFromDOM initRemoteBuzzerFromDOM i18n setMainImage remoteBuzzerClient rotaryController globalGalleryHandle photoboothTools */ const photoBooth = (function () { // vars @@ -66,13 +66,14 @@ const photoBooth = (function () { api.resetTimeOut = function () { clearTimeout(timeOut); - if (config.dev.enabled) { - console.log('Timeout for auto reload cleared.'); - } + photoboothTools.console.log('Timeout for auto reload cleared.'); + if (!takingPic) { - if (config.dev.enabled) { - console.log('Timeout for auto reload set to', config.picture.time_to_live * 1000, ' seconds.'); - } + photoboothTools.console.logDev( + 'Timeout for auto reload set to', + config.picture.time_to_live * 1000, + ' seconds.' + ); timeOut = setTimeout(function () { api.reloadPage(); }, config.picture.time_to_live * 1000); @@ -162,11 +163,11 @@ const photoBooth = (function () { jQuery .post('api/takeVideo.php', dataVideo) .done(function (result) { - console.log('Start webcam', result); + photoboothTools.console.log('Start webcam', result); pid = result.pid; }) .fail(function (xhr, status, result) { - console.log('Could not start webcam', result); + photoboothTools.console.log('Could not start webcam', result); }); } else if (!config.preview.gphoto_bsm && mode === 'view') { const getMedia = @@ -192,13 +193,13 @@ const photoBooth = (function () { api.stream = stream; }) .catch(function (error) { - console.log('Could not get user media: ', error); + photoboothTools.console.log('Could not get user media: ', error); }); } else { jQuery .post('api/takeVideo.php', dataVideo) .done(function (result) { - console.log('Start webcam', result); + photoboothTools.console.log('Start webcam', result); pid = result.pid; const getMedia = navigator.mediaDevices.getUserMedia || @@ -223,11 +224,11 @@ const photoBooth = (function () { api.stream = stream; }) .catch(function (error) { - console.log('Could not get user media: ', error); + photoboothTools.console.log('Could not get user media: ', error); }); }) .fail(function (xhr, status, result) { - console.log('Could not start webcam', result); + photoboothTools.console.log('Could not start webcam', result); }); } } else { @@ -262,7 +263,7 @@ const photoBooth = (function () { api.stream = stream; }) .catch(function (error) { - console.log('Could not get user media: ', error); + photoboothTools.console.log('Could not get user media: ', error); }); } }; @@ -289,13 +290,13 @@ const photoBooth = (function () { jQuery .post('api/takeVideo.php', dataVideo) .done(function (result) { - console.log('Stop webcam', result); + photoboothTools.console.log('Stop webcam', result); const track = api.stream.getTracks()[0]; track.stop(); $('#video--view').hide(); }) .fail(function (xhr, status, result) { - console.log('Could not stop webcam', result); + photoboothTools.console.log('Could not stop webcam', result); }); } }; @@ -313,15 +314,15 @@ const photoBooth = (function () { mode: $mode }; - console.log('Run', $mode); + photoboothTools.console.log('Run', $mode); jQuery .post('api/shellCommand.php', command) .done(function (result) { - console.log($mode, 'result: ', result); + photoboothTools.console.log($mode, 'result: ', result); }) .fail(function (xhr, status, result) { - console.log($mode, 'result: ', result); + photoboothTools.console.log($mode, 'result: ', result); }); }; @@ -339,9 +340,7 @@ const photoBooth = (function () { api.resetTimeOut(); } - if (config.dev.enabled) { - console.log('Taking photo:', takingPic); - } + photoboothTools.console.logDev('Taking photo: ' + takingPic); if (config.pre_photo.cmd) { api.shellCommand('pre-command'); @@ -379,15 +378,13 @@ const photoBooth = (function () { // Cheese api.cheese = function (photoStyle) { - if (config.dev.enabled) { - console.log(photoStyle); - } + photoboothTools.console.logDev('Photostyle: ' + photoStyle); $('#counter').empty(); $('.cheese').empty(); if (config.picture.no_cheese) { - console.log('Cheese is disabled.'); + photoboothTools.console.log('Cheese is disabled.'); } else if (photoStyle === 'photo' || photoStyle === 'chroma') { const cheesemsg = api.getTranslation('cheese'); $('.cheese').text(cheesemsg); @@ -409,7 +406,7 @@ const photoBooth = (function () { !api.stream && !config.dev.demo_images ) { - console.log('No preview by device cam available!'); + photoboothTools.console.log('No preview by device cam available!'); api.errorPic({ error: 'No preview by device cam available!' @@ -425,9 +422,7 @@ const photoBooth = (function () { // take Picture api.takePic = function (photoStyle) { - if (config.dev.enabled) { - console.log('Take Picture:' + photoStyle); - } + photoboothTools.console.log('Take Picture:', photoStyle); remoteBuzzerClient.inProgress(true); @@ -469,7 +464,7 @@ const photoBooth = (function () { jQuery .post('api/takePic.php', data) .done(function (result) { - console.log('took picture', result); + photoboothTools.console.log('took picture', result); $('.cheese').empty(); if (config.preview.flipHorizontal) { $('#video--view').removeClass('flip-horizontal'); @@ -612,9 +607,7 @@ const photoBooth = (function () { } takingPic = false; remoteBuzzerClient.inProgress(false); - if (config.dev.enabled) { - console.log('Taking photo:', takingPic); - } + photoboothTools.console.logDev('Taking photo: ' + takingPic); if (config.dev.reload_on_error) { const reloadmsg = api.getTranslation('auto_reload'); $('.loading').append($('

    ').text(reloadmsg)); @@ -656,7 +649,7 @@ const photoBooth = (function () { style: photoStyle }, success: (data) => { - console.log('picture processed', data); + photoboothTools.console.log('picture processed', data); if (data.error) { api.errorPic(data); @@ -667,7 +660,7 @@ const photoBooth = (function () { } }, error: (jqXHR, textStatus) => { - console.log('An error occurred', textStatus); + photoboothTools.console.log('An error occurred', textStatus); api.errorPic({ error: 'Request failed: ' + textStatus @@ -689,7 +682,7 @@ const photoBooth = (function () { preloadImage.onload = function () { $('body').attr('data-main-image', filename); - console.log(config.foldersRoot.keying + '/' + filename); + photoboothTools.console.log(config.foldersRoot.keying + '/' + filename); const chromaimage = config.foldersRoot.keying + '/' + filename; loader.hide(); @@ -703,10 +696,7 @@ const photoBooth = (function () { remoteBuzzerClient.inProgress(false); api.resetTimeOut(); - - if (config.dev.enabled) { - console.log('Taking photo:', takingPic); - } + photoboothTools.console.logDev('Taking photo: ' + takingPic); }; // Render Picture after taking @@ -753,12 +743,12 @@ const photoBooth = (function () { if (really) { api.deleteImage(filename, (data) => { if (data.success) { - console.log('Deleted ' + filename); + photoboothTools.console.log('Deleted ' + filename); api.reloadPage(); } else { - console.log('Error while deleting ' + filename); + photoboothTools.console.log('Error while deleting ' + filename); if (data.error) { - console.log(data.error); + photoboothTools.console.log(data.error); } setTimeout(function () { api.reloadPage(); @@ -808,9 +798,7 @@ const photoBooth = (function () { api.resetTimeOut(); - if (config.dev.enabled) { - console.log('Taking photo:', takingPic); - } + photoboothTools.console.logDev('Taking photo: ' + takingPic); if (config.preview.mode == 'gphoto' && !config.preview.gphoto_bsm) { api.startVideo('preview'); @@ -929,7 +917,7 @@ const photoBooth = (function () { const errormsg = api.getTranslation('error'); if (isPrinting) { - console.log('Printing already: ' + isPrinting); + photoboothTools.console.log('Printing already: ' + isPrinting); } else { modal.open('#print_mesg'); isPrinting = true; @@ -944,10 +932,10 @@ const photoBooth = (function () { filename: imageSrc }, success: (data) => { - console.log('Picture processed: ', data); + photoboothTools.console.log('Picture processed: ', data); if (data.error) { - console.log('An error occurred: ', data.error); + photoboothTools.console.log('An error occurred: ', data.error); $('#print_mesg').empty(); $('#print_mesg').html( '

    ' @@ -968,7 +956,7 @@ const photoBooth = (function () { }, config.print.time); }, error: (jqXHR, textStatus) => { - console.log('An error occurred: ', textStatus); + photoboothTools.console.log('An error occurred: ', textStatus); $('#print_mesg').empty(); $('#print_mesg').html( '' @@ -999,12 +987,12 @@ const photoBooth = (function () { }, success: (data) => { if (data.error) { - console.log('Error while deleting image'); + photoboothTools.console.log('Error while deleting image'); } cb(data); }, error: (jqXHR, textStatus) => { - console.log('Error while deleting image: ', textStatus); + photoboothTools.console.log('Error while deleting image: ', textStatus); setTimeout(function () { api.reloadPage(); }, 5000); @@ -1021,11 +1009,11 @@ const photoBooth = (function () { }, success: (data) => { if (data.error) { - console.log('Error while deleting image'); + photoboothTools.console.log('Error while deleting image'); } }, error: (jqXHR, textStatus) => { - console.log('Error while deleting image: ', textStatus); + photoboothTools.console.log('Error while deleting image: ', textStatus); setTimeout(function () { api.reloadPage(); }, 5000); @@ -1058,9 +1046,9 @@ const photoBooth = (function () { imgFilter = $(this).attr('id'); const result = {file: $('#result').attr('data-img')}; - if (config.dev.enabled) { - console.log('Applying filter', imgFilter, result); - } + + photoboothTools.console.logDev('Applying filter', imgFilter, result); + api.processPic(imgFilter, result); rotaryController.focusSet('#mySidenav'); @@ -1225,42 +1213,40 @@ const photoBooth = (function () { $(document).on('keyup', function (ev) { if ($('.triggerPic')[0] || $('.triggerCollage')[0]) { if (config.picture.key && parseInt(config.picture.key, 10) === ev.keyCode) { - if (!takingPic) { + if (takingPic) { + photoboothTools.console.logDev('Taking photo already in progress!'); + } else { $('.closeGallery').trigger('click'); if (config.collage.enabled && config.collage.only) { - if (config.dev.enabled) { - console.log('Picture key pressed, but only collage allowed. Triggering collage now.'); - } + photoboothTools.console.logDev( + 'Picture key pressed, but only collage allowed. Triggering collage now.' + ); $('.triggerCollage').trigger('click'); } else { $('.triggerPic').trigger('click'); } - } else if (config.dev.enabled && takingPic) { - console.log('Taking photo already in progress!'); } } if (config.collage.key && parseInt(config.collage.key, 10) === ev.keyCode) { - if (!takingPic) { + if (takingPic) { + photoboothTools.console.logDev('Taking photo already in progress!'); + } else { $('.closeGallery').trigger('click'); if (config.collage.enabled) { $('.triggerCollage').trigger('click'); } else { - if (config.dev.enabled) { - console.log( - 'Collage key pressed. Please enable collage in your config. Triggering photo now.' - ); - } + photoboothTools.console.logDev( + 'Collage key pressed. Please enable collage in your config. Triggering photo now.' + ); $('.triggerPic').trigger('click'); } - } else if (config.dev.enabled && takingPic) { - console.log('Taking photo already in progress!'); } } if (config.print.from_result && config.print.key && parseInt(config.print.key, 10) === ev.keyCode) { if (isPrinting) { - console.log('Printing already in progress!'); + photoboothTools.console.log('Printing already in progress!'); } else { $('.printbtn').trigger('click'); $('.printbtn').blur(); @@ -1274,14 +1260,10 @@ const photoBooth = (function () { if (api.isTimeOutPending()) { if (typeof onStandaloneGalleryView !== 'undefined') { clearTimeout(timeOut); - if (config.dev.enabled) { - console.log('Standalone Gallery: Timeout for auto reload cleared.'); - } + photoboothTools.console.logDev('Standalone Gallery: Timeout for auto reload cleared.'); } else if (startPage.is(':visible')) { clearTimeout(timeOut); - if (config.dev.enabled) { - console.log('Timeout for auto reload cleared.'); - } + photoboothTools.console.logDev('Timeout for auto reload cleared.'); } else { // if !startPage.is(':visible') api.resetTimeOut(); diff --git a/src/js/dependencies.js b/src/js/dependencies.js index fe1336a3b..a44631e06 100644 --- a/src/js/dependencies.js +++ b/src/js/dependencies.js @@ -1,4 +1,4 @@ -/* global i18n */ +/* global i18n photoboothTools */ const dependencies = (function () { // vars @@ -15,7 +15,7 @@ const dependencies = (function () { jQuery .post('api/checkOS.php') .done(function (result) { - console.log('Operating system: ', result); + photoboothTools.console.log('Operating system: ' + result.os); const checkDependencies = api.getTranslation('check_dependencies'), unsupportedOs = api.getTranslation('unsupported_os'); @@ -29,7 +29,7 @@ const dependencies = (function () { } }) .fail(function (xhr, status, result) { - console.log('Operating system check failed: ', result); + photoboothTools.console.log('Operating system check failed: ', result); }); }; @@ -50,12 +50,12 @@ const dependencies = (function () { mode: $mode }; - console.log('Run', $mode); + photoboothTools.console.log('Run' + $mode); jQuery .post('api/update.php', command) .done(function (result) { - console.log($mode, 'result: ', result); + photoboothTools.console.log($mode, 'result: ', result); const updateError = api.getTranslation('update_error'); if (result.success) { @@ -72,7 +72,7 @@ const dependencies = (function () { .fail(function (xhr, status, result) { const updateFail = api.getTranslation('update_fail'); $('.white-box').append($('

    ').text(updateFail)); - console.log($mode, 'result: ', result); + photoboothTools.console.log($mode, 'result: ', result); }); }; diff --git a/src/js/diskusage.js b/src/js/diskusage.js index 0c1cae044..f6d87ba07 100644 --- a/src/js/diskusage.js +++ b/src/js/diskusage.js @@ -1,3 +1,4 @@ +/* globals photoboothTools */ $(function () { $('.download-zip-btn').on('click', function (e) { e.preventDefault(); @@ -9,14 +10,14 @@ $(function () { dataType: 'json', type: 'post', success: function (response) { - console.log('data', response); + photoboothTools.console.log('data', response); setTimeout(function () { if (response.success === 'zip') { $.ajax({ url: '../' + config.folders.archives + '/' + response.file, type: 'HEAD', error: function () { - console.log('ZIP does not exist!'); + photoboothTools.console.log('ZIP does not exist!'); }, success: function () { location.href = '../' + config.folders.archives + '/' + response.file; @@ -28,7 +29,7 @@ $(function () { }, 10000); }, error: function (jqXHR, textStatus) { - console.log('Error while downloading: ', textStatus); + photoboothTools.console.log('Error while downloading: ', textStatus); $('#save_mesg').removeClass('modal--show'); } }); diff --git a/src/js/gallery_updatecheck.js b/src/js/gallery_updatecheck.js index 7a1f4de13..fcaf55b97 100644 --- a/src/js/gallery_updatecheck.js +++ b/src/js/gallery_updatecheck.js @@ -1,4 +1,4 @@ -/* globals photoBooth */ +/* globals photoBooth photoboothTools */ /* * This script checks for new pictures in regular intervals. * If changes are detected, the page will automatically be reloaded. @@ -27,7 +27,7 @@ const ajaxurl = 'gallery.php?status'; */ function dbUpdated() { - console.log('DB is updated - refreshing'); + photoboothTools.console.log('DB is updated - refreshing'); //location.reload(true); //Alternative photoBooth.reloadPage(); } @@ -35,9 +35,7 @@ function dbUpdated() { const checkForUpdates = function () { if (photoBooth.isTimeOutPending()) { // If there is user interaction, do not check for updates - if (config.dev.enabled) { - console.log('Timeout pending, waiting to refresh the standalone gallery'); - } + photoboothTools.console.logDev('Timeout pending, waiting to refresh the standalone gallery'); return; } diff --git a/src/js/livechroma.js b/src/js/livechroma.js index 414151edf..8faf26afa 100644 --- a/src/js/livechroma.js +++ b/src/js/livechroma.js @@ -1,4 +1,4 @@ -/* globals photoBooth MarvinColorModelConverter AlphaBoundary MarvinImage Seriously rotaryController */ +/* globals photoBooth MarvinColorModelConverter AlphaBoundary MarvinImage Seriously rotaryController photoboothTools */ /* exported setBackgroundImage setMainImage */ let mainImage; let mainImageWidth; @@ -57,6 +57,7 @@ function alphaBoundary(imageOut, radius) { // eslint-disable-next-line no-unused-vars function setMainImage(imgSrc) { + photoboothTools.console.logDev('[LIVECHROMA] Keying variant: ' + config.keying.variant); if (config.keying.variant === 'marvinj') { const image = new MarvinImage(); image.load(imgSrc, function () { @@ -113,10 +114,8 @@ function setMainImage(imgSrc) { const r = parseInt(color.substr(1, 2), 16) / 255; const g = parseInt(color.substr(3, 2), 16) / 255; const b = parseInt(color.substr(5, 2), 16) / 255; - if (config.dev.enabled) { - console.log('Chromakeying color:', color); - console.log('Red:', r, 'Green:', g, 'Blue:', b); - } + photoboothTools.console.logDev('Chromakeying color:', color); + photoboothTools.console.logDev('Red:', r, 'Green:', g, 'Blue:', b); chroma.screen = [r, g, b, 1]; seriously.go(); mainImage = new Image(); @@ -220,7 +219,7 @@ function saveImage(cb) { photoBooth.reloadPage(); }, 1000); } else { - console.log('Error while deleting image'); + photoboothTools.console.log('Error while deleting image'); setTimeout(function () { photoBooth.reloadPage(); }, 5000); @@ -232,7 +231,7 @@ function saveImage(cb) { }, 1000); } } else { - console.log('Error while deleting image'); + photoboothTools.console.log('Error while deleting image'); setTimeout(function () { photoBooth.reloadPage(); }, 5000); @@ -290,30 +289,28 @@ $('.takeChroma, .newchroma').on('click', function (e) { $(document).on('keyup', function (ev) { if (config.picture.key && parseInt(config.picture.key, 10) === ev.keyCode) { if (!backgroundImage) { - console.log('Please choose a background first!'); + photoboothTools.console.log('Please choose a background first!'); } else if (needsReload) { - console.log('Please reload the page to take a new Picture!'); + photoboothTools.console.log('Please reload the page to take a new Picture!'); } else if (!takingPic) { $('.closeGallery').trigger('click'); $('.takeChroma').trigger('click'); } else if (config.dev.enabled && takingPic) { - console.log('Taking photo already in progress!'); + photoboothTools.console.log('Taking photo already in progress!'); } } if (config.collage.key && parseInt(config.collage.key, 10) === ev.keyCode) { if (!backgroundImage) { - console.log('Please choose a background first!'); + photoboothTools.console.log('Please choose a background first!'); } else if (needsReload) { - console.log('Please reload the page to take a new Picture!'); + photoboothTools.console.log('Please reload the page to take a new Picture!'); } else if (!takingPic) { $('.closeGallery').trigger('click'); - if (config.dev.enabled) { - console.log('Collage key pressed. Not possible on live chroma, triggering photo now.'); - } + photoboothTools.console.logDev('Collage key pressed. Not possible on live chroma, triggering photo now.'); $('.takeChroma').trigger('click'); } else if (config.dev.enabled && takingPic) { - console.log('Taking photo already in progress!'); + photoboothTools.console.log('Taking photo already in progress!'); } } }); @@ -338,6 +335,6 @@ $('.closebtn').on('click', function () { }); $(document).ready(function () { - console.log('DOM ready'); + photoboothTools.console.log('[LIVECHROMA] DOM ready'); rotaryController.focusSet('#start'); }); diff --git a/src/js/photoinit.js b/src/js/photoinit.js index 78379bbe2..1a80b62aa 100644 --- a/src/js/photoinit.js +++ b/src/js/photoinit.js @@ -1,5 +1,5 @@ /* exported initPhotoSwipeFromDOM */ -/* global photoBooth rotaryController */ +/* global photoBooth photoboothTools rotaryController */ // eslint-disable-next-line no-unused-vars let globalGalleryHandle; @@ -153,9 +153,7 @@ function initPhotoSwipeFromDOM(gallerySelector) { gallery.listen('afterChange', function () { const img = gallery.currItem.src.split('\\').pop().split('/').pop(); - if (config.dev.enabled) { - console.log('Current image: ' + img); - } + photoboothTools.console.logDev('Current image: ' + img); $('.pswp__button--custom-download').attr({ href: 'api/download.php?image=' + img, @@ -217,12 +215,12 @@ function initPhotoSwipeFromDOM(gallerySelector) { }, success: (data) => { if (data.success) { - console.log('Deleted ' + img); + photoboothTools.console.log('Deleted ' + img); photoBooth.reloadPage(); } else { - console.log('Error while deleting ' + img); + photoboothTools.console.log('Error while deleting ' + img); if (data.error) { - console.log(data.error); + photoboothTools.console.log(data.error); } setTimeout(function () { photoBooth.reloadPage(); @@ -230,7 +228,7 @@ function initPhotoSwipeFromDOM(gallerySelector) { } }, error: (jqXHR, textStatus) => { - console.log('Error while deleting image: ', textStatus); + photoboothTools.console.log('Error while deleting image: ', textStatus); setTimeout(function () { photoBooth.reloadPage(); }, 5000); @@ -271,7 +269,7 @@ function initPhotoSwipeFromDOM(gallerySelector) { e.stopPropagation(); if (isPrinting) { - console.log('Printing already in progress!'); + photoboothTools.console.log('Printing already in progress!'); } else { isPrinting = true; const img = gallery.currItem.src.split('\\').pop().split('/').pop(); @@ -288,9 +286,7 @@ function initPhotoSwipeFromDOM(gallerySelector) { e.preventDefault(); if (gallery) { - if (config.dev.enabled) { - console.log('Closing Gallery'); - } + photoboothTools.console.logDev('Closing Gallery'); gallery.close(); } }); @@ -346,7 +342,7 @@ function initPhotoSwipeFromDOM(gallerySelector) { $(document).on('keyup', function (ev) { if (config.print.from_gallery && config.print.key && parseInt(config.print.key, 10) === ev.keyCode) { if (isPrinting) { - console.log('Printing already in progress!'); + photoboothTools.console.log('Printing already in progress!'); } else if ($('#gallery').hasClass('gallery--open') && typeof gallery !== 'undefined') { $('.pswp__button--print').trigger('click'); } diff --git a/src/js/remotebuzzer_client.js b/src/js/remotebuzzer_client.js index 50e8fd251..4a8642feb 100644 --- a/src/js/remotebuzzer_client.js +++ b/src/js/remotebuzzer_client.js @@ -1,5 +1,5 @@ /* exported rotaryController initRemoteBuzzerFromDOM remoteBuzzerClient */ -/* global photoBooth globalGalleryHandle io */ +/* global photoBooth photoboothTools globalGalleryHandle io */ let remoteBuzzerClient; let rotaryController; @@ -7,12 +7,10 @@ let buttonController; // eslint-disable-next-line no-unused-vars function initRemoteBuzzerFromDOM() { - if (config.dev.enabled) { - console.log( - 'Remote Buzzer client is', - config.remotebuzzer.usebuttons || config.remotebuzzer.userotary ? 'enabled' : 'disabled' - ); - } + photoboothTools.console.logDev( + 'Remote Buzzer client:', + config.remotebuzzer.usebuttons || config.remotebuzzer.userotary ? 'enabled' : 'disabled' + ); /* ** Communication with Remote Buzzer Server @@ -34,11 +32,9 @@ function initRemoteBuzzerFromDOM() { if (config.webserver.ip) { ioClient = io('http://' + config.webserver.ip + ':' + config.remotebuzzer.port); - if (config.dev.enabled) { - console.log( - 'Remote buzzer connecting to http://' + config.webserver.ip + ':' + config.remotebuzzer.port - ); - } + photoboothTools.console.logDev( + 'Remote buzzer connecting to http://' + config.webserver.ip + ':' + config.remotebuzzer.port + ); ioClient.on('photobooth-socket', function (data) { switch (data) { @@ -72,15 +68,15 @@ function initRemoteBuzzerFromDOM() { }); ioClient.on('connect_error', function () { - console.log( + photoboothTools.console.log( 'ERROR: remotebuzzer_client unable to connect to webserver ip - please ensure remotebuzzer_server is running on Photobooth server. Use Photobooth dev mode to create log file for debugging' ); }); ioClient.on('connect', function () { - if (config.dev.enabled) { - console.log('remotebuzzer_client successfully connected to Photobooth webserver ip'); - } + photoboothTools.console.logDev( + 'remotebuzzer_client successfully connected to Photobooth webserver ip' + ); }); buttonController.init(); @@ -88,7 +84,7 @@ function initRemoteBuzzerFromDOM() { rotaryController.focusSet('#start'); } else { - console.log( + photoboothTools.console.log( 'ERROR: remotebuzzer_client unable to connect - webserver.ip not defined in photobooth config' ); } @@ -194,7 +190,7 @@ function initRemoteBuzzerFromDOM() { api.init = function () { if (config.dev.enabled && typeof onStandaloneGalleryView !== 'undefined') { - console.log( + photoboothTools.console.log( 'Rotary Controller is ', config.remotebuzzer.enable_standalonegallery ? 'enabled' : 'disabled', ' for standalone gallery view' diff --git a/src/js/tools.js b/src/js/tools.js new file mode 100644 index 000000000..20b347164 --- /dev/null +++ b/src/js/tools.js @@ -0,0 +1,22 @@ +const photoboothTools = (function () { + // vars + const api = {}; + + api.console = { + log: function (...content) { + console.log('[', new Date().toISOString(), ']:', content); + }, + logDev: function (...content) { + if (config.dev.enabled) { + console.log('[', new Date().toISOString(), ']:', content); + } + } + }; + + return api; +})(); + +// Init on domready +$(function () { + photoboothTools.console.log('Dev mode:', config.dev.enabled ? 'enabled' : 'disabled'); +}); diff --git a/src/js/update.js b/src/js/update.js index 4a66a7d97..d61fc376c 100644 --- a/src/js/update.js +++ b/src/js/update.js @@ -1,4 +1,4 @@ -/* global i18n */ +/* globals i18n photoboothTools */ const updater = (function () { // vars @@ -18,7 +18,7 @@ const updater = (function () { jQuery .post('api/checkOS.php') .done(function (result) { - console.log('Operating system: ', result); + photoboothTools.console.log('Operating system: ' + result.os); const checkConnection = api.getTranslation('check_connection'), unsupportedOs = api.getTranslation('unsupported_os'); @@ -32,7 +32,7 @@ const updater = (function () { } }) .fail(function (xhr, status, result) { - console.log('Operating system check failed: ', result); + photoboothTools.console.log('Operating system check failed: ', result); }); }; @@ -40,7 +40,7 @@ const updater = (function () { jQuery .post('api/checkConnection.php') .done(function (result) { - console.log('Connected: ', result); + photoboothTools.console.log('Connected: ', result); const ok = api.getTranslation('ok'), noConnection = api.getTranslation('no_connection'), updateCheckGit = api.getTranslation('update_check_git'); @@ -54,7 +54,7 @@ const updater = (function () { } }) .fail(function (xhr, status, result) { - console.log('Checking connection failed: ', result); + photoboothTools.console.log('Checking connection failed: ', result); }); }; @@ -75,12 +75,12 @@ const updater = (function () { mode: $mode }; - console.log('Run', $mode); + photoboothTools.console.log('Run ' + $mode); jQuery .post('api/update.php', command) .done(function (result) { - console.log($mode, 'result: ', result); + photoboothTools.console.log($mode, 'result: ', result); const updateCommitBackup = api.getTranslation('update_commit_backup'), updateReady = api.getTranslation('update_ready'), updateNoGit = api.getTranslation('update_no_git'), @@ -130,7 +130,7 @@ const updater = (function () { .fail(function (xhr, status, result) { const updateFail = api.getTranslation('update_fail'); $('.white-box').append($('

    ').text(updateFail)); - console.log($mode, 'result: ', result); + photoboothTools.console.log($mode, 'result: ', result); }); }; diff --git a/update.php b/update.php index 4d9fda1d0..4ecf1a45b 100644 --- a/update.php +++ b/update.php @@ -73,6 +73,7 @@ + From 7236f9f5f9d1ab73ae5c2e4f38dfba10ca18b9c4 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Wed, 15 Sep 2021 10:54:12 +0200 Subject: [PATCH 064/214] js(photoboothTools): add reloadPage function Change-Id: I04bc15365f0a1f0ff764f05be411bd4d89181811 --- src/js/core.js | 18 +++++++----------- src/js/gallery.js | 4 ++-- src/js/gallery_updatecheck.js | 4 ++-- src/js/livechroma.js | 10 +++++----- src/js/photoinit.js | 6 +++--- src/js/tools.js | 4 ++++ 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/js/core.js b/src/js/core.js index 8bd6a34b4..1fb709e8f 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -53,10 +53,6 @@ const photoBooth = (function () { } }; - api.reloadPage = function () { - window.location.reload(); - }; - // Returns true when timeOut is pending api.isTimeOutPending = function () { return typeof timeOut !== 'undefined'; @@ -75,7 +71,7 @@ const photoBooth = (function () { ' seconds.' ); timeOut = setTimeout(function () { - api.reloadPage(); + photoboothTools.reloadPage(); }, config.picture.time_to_live * 1000); } }; @@ -612,7 +608,7 @@ const photoBooth = (function () { const reloadmsg = api.getTranslation('auto_reload'); $('.loading').append($('

    ').text(reloadmsg)); setTimeout(function () { - api.reloadPage(); + photoboothTools.reloadPage(); }, 5000); } else { const reloadmsg = api.getTranslation('reload'); @@ -744,14 +740,14 @@ const photoBooth = (function () { api.deleteImage(filename, (data) => { if (data.success) { photoboothTools.console.log('Deleted ' + filename); - api.reloadPage(); + photoboothTools.reloadPage(); } else { photoboothTools.console.log('Error while deleting ' + filename); if (data.error) { photoboothTools.console.log(data.error); } setTimeout(function () { - api.reloadPage(); + photoboothTools.reloadPage(); }, 5000); } }); @@ -994,7 +990,7 @@ const photoBooth = (function () { error: (jqXHR, textStatus) => { photoboothTools.console.log('Error while deleting image: ', textStatus); setTimeout(function () { - api.reloadPage(); + photoboothTools.reloadPage(); }, 5000); } }); @@ -1015,7 +1011,7 @@ const photoBooth = (function () { error: (jqXHR, textStatus) => { photoboothTools.console.log('Error while deleting image: ', textStatus); setTimeout(function () { - api.reloadPage(); + photoboothTools.reloadPage(); }, 5000); } }); @@ -1170,7 +1166,7 @@ const photoBooth = (function () { e.preventDefault(); e.stopPropagation(); - api.reloadPage(); + photoboothTools.reloadPage(); rotaryController.focusSet('#start'); }); diff --git a/src/js/gallery.js b/src/js/gallery.js index c0aed25b8..2209f7cff 100644 --- a/src/js/gallery.js +++ b/src/js/gallery.js @@ -1,9 +1,9 @@ -/* globals photoBooth */ +/* globals photoBooth photoboothTools */ $(function () { const reloadElement = $(''); reloadElement.append(''); reloadElement.attr('href', '#'); - reloadElement.on('click', () => photoBooth.reloadPage()); + reloadElement.on('click', () => photoboothTools.reloadPage()); reloadElement.appendTo('.gallery__header'); $('.gallery__close').hide(); diff --git a/src/js/gallery_updatecheck.js b/src/js/gallery_updatecheck.js index fcaf55b97..1a0e606f6 100644 --- a/src/js/gallery_updatecheck.js +++ b/src/js/gallery_updatecheck.js @@ -5,7 +5,7 @@ * * Needs: * - jQuery - * - photoBooth Javascript + * - photoBooth & photoboothTools Javascript * * Remarks: * - Not made for highly demanded pages (as pages is requested regulary @@ -29,7 +29,7 @@ const ajaxurl = 'gallery.php?status'; function dbUpdated() { photoboothTools.console.log('DB is updated - refreshing'); //location.reload(true); //Alternative - photoBooth.reloadPage(); + photoboothTools.reloadPage(); } const checkForUpdates = function () { diff --git a/src/js/livechroma.js b/src/js/livechroma.js index 8faf26afa..824f83945 100644 --- a/src/js/livechroma.js +++ b/src/js/livechroma.js @@ -216,24 +216,24 @@ function saveImage(cb) { photoBooth.deleteImage(photoBooth.chromaimage, (response) => { if (response.success) { setTimeout(function () { - photoBooth.reloadPage(); + photoboothTools.reloadPage(); }, 1000); } else { photoboothTools.console.log('Error while deleting image'); setTimeout(function () { - photoBooth.reloadPage(); + photoboothTools.reloadPage(); }, 5000); } }); } else { setTimeout(function () { - photoBooth.reloadPage(); + photoboothTools.reloadPage(); }, 1000); } } else { photoboothTools.console.log('Error while deleting image'); setTimeout(function () { - photoBooth.reloadPage(); + photoboothTools.reloadPage(); }, 5000); } }); @@ -319,7 +319,7 @@ $('.reloadPage').on('click', function (e) { e.preventDefault(); e.stopPropagation(); - photoBooth.reloadPage(); + photoboothTools.reloadPage(); }); // Open Gallery Button diff --git a/src/js/photoinit.js b/src/js/photoinit.js index 1a80b62aa..92b0f9e17 100644 --- a/src/js/photoinit.js +++ b/src/js/photoinit.js @@ -216,21 +216,21 @@ function initPhotoSwipeFromDOM(gallerySelector) { success: (data) => { if (data.success) { photoboothTools.console.log('Deleted ' + img); - photoBooth.reloadPage(); + photoboothTools.reloadPage(); } else { photoboothTools.console.log('Error while deleting ' + img); if (data.error) { photoboothTools.console.log(data.error); } setTimeout(function () { - photoBooth.reloadPage(); + photoboothTools.reloadPage(); }, 5000); } }, error: (jqXHR, textStatus) => { photoboothTools.console.log('Error while deleting image: ', textStatus); setTimeout(function () { - photoBooth.reloadPage(); + photoboothTools.reloadPage(); }, 5000); } }); diff --git a/src/js/tools.js b/src/js/tools.js index 20b347164..d4f4c46c2 100644 --- a/src/js/tools.js +++ b/src/js/tools.js @@ -13,6 +13,10 @@ const photoboothTools = (function () { } }; + api.reloadPage = function () { + window.location.reload(); + }; + return api; })(); From af8f377d622cadcbb4aaaeaf8b06c4b616ce0cd4 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Wed, 15 Sep 2021 11:01:18 +0200 Subject: [PATCH 065/214] js(photoboothTools): add modal functions Change-Id: I164f481b3471a6a1ee80d1dc2c578bfa0aa49da5 --- src/js/core.js | 39 ++++++--------------------------------- src/js/tools.js | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+), 33 deletions(-) diff --git a/src/js/core.js b/src/js/core.js index 1fb709e8f..2a792f46a 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -30,29 +30,6 @@ const photoBooth = (function () { pid, command; - const modal = { - open: function (selector) { - $(selector).addClass('modal--show'); - }, - close: function (selector) { - if ($(selector).hasClass('modal--show')) { - $(selector).removeClass('modal--show'); - - return true; - } - - return false; - }, - toggle: function (selector) { - $(selector).toggleClass('modal--show'); - }, - empty: function (selector) { - modal.close(selector); - - $(selector).find('.modal__body').empty(); - } - }; - // Returns true when timeOut is pending api.isTimeOutPending = function () { return typeof timeOut !== 'undefined'; @@ -80,7 +57,7 @@ const photoBooth = (function () { api.reset = function () { loader.removeClass('open'); loader.removeClass('error'); - modal.empty('#qrCode'); + photoboothTools.modal.empty('#qrCode'); $('.qrbtn').removeClass('active').attr('style', ''); $('.loading').text(''); gallery.removeClass('gallery--open'); @@ -699,7 +676,7 @@ const photoBooth = (function () { api.renderPic = function (filename) { // Add QR Code Image const qrCodeModal = $('#qrCode'); - modal.empty(qrCodeModal); + photoboothTools.modal.empty(qrCodeModal); $('').on('load', function () { const body = qrCodeModal.find('.modal__body'); @@ -915,7 +892,7 @@ const photoBooth = (function () { if (isPrinting) { photoboothTools.console.log('Printing already: ' + isPrinting); } else { - modal.open('#print_mesg'); + photoboothTools.modal.open('#print_mesg'); isPrinting = true; remoteBuzzerClient.inProgress(true); @@ -939,7 +916,7 @@ const photoBooth = (function () { } setTimeout(function () { - modal.close('#print_mesg'); + photoboothTools.modal.close('#print_mesg'); if (data.error) { $('#print_mesg').empty(); $('#print_mesg').html( @@ -959,7 +936,7 @@ const photoBooth = (function () { ); setTimeout(function () { - modal.close('#print_mesg'); + photoboothTools.modal.close('#print_mesg'); $('#print_mesg').empty(); $('#print_mesg').html( '

    ' @@ -1144,10 +1121,6 @@ const photoBooth = (function () { }); $('#result').on('click', function () { - if (!modal.close('#qrCode')) { - //api.showResultInner(true); - } - if (!$('#mySidenav').hasClass('sidenav--open')) { rotaryController.focusSet('#result'); } @@ -1158,7 +1131,7 @@ const photoBooth = (function () { e.preventDefault(); e.stopPropagation(); - modal.open('#qrCode'); + photoboothTools.modal.open('#qrCode'); rotaryController.focusSet('#qrCode'); }); diff --git a/src/js/tools.js b/src/js/tools.js index d4f4c46c2..19e733769 100644 --- a/src/js/tools.js +++ b/src/js/tools.js @@ -13,6 +13,29 @@ const photoboothTools = (function () { } }; + api.modal = { + open: function (selector) { + $(selector).addClass('modal--show'); + }, + close: function (selector) { + if ($(selector).hasClass('modal--show')) { + $(selector).removeClass('modal--show'); + + return true; + } + + return false; + }, + toggle: function (selector) { + $(selector).toggleClass('modal--show'); + }, + empty: function (selector) { + api.modal.close(selector); + + $(selector).find('.modal__body').empty(); + } + }; + api.reloadPage = function () { window.location.reload(); }; From 435a9a82f7e913f81f98df6c53b2e39d06e0c58f Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Wed, 15 Sep 2021 11:07:36 +0200 Subject: [PATCH 066/214] js(chromakeying/diskusage): use central modal functions Change-Id: I59da9d41bb221599558c058f6c20d45fcf6c5605 --- src/js/chromakeying.js | 18 +++++++++--------- src/js/diskusage.js | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/js/chromakeying.js b/src/js/chromakeying.js index cc131b5de..f0cd1208d 100644 --- a/src/js/chromakeying.js +++ b/src/js/chromakeying.js @@ -212,16 +212,16 @@ function printImage(filename, cb) { if (data.error) { photoboothTools.console.log('An error occurred: ', data.error); - $('#print_mesg').empty(); + photoboothTools.modal.empty('#print_mesg'); $('#print_mesg').html( '' ); } setTimeout(function () { - $('#print_mesg').removeClass('modal--show'); + photoboothTools.modal.close('#print_mesg'); if (data.error) { - $('#print_mesg').empty(); + photoboothTools.modal.empty('#print_mesg'); $('#print_mesg').html( '' ); @@ -232,14 +232,14 @@ function printImage(filename, cb) { }, error: (jqXHR, textStatus) => { photoboothTools.console.log('An error occurred: ', textStatus); - $('#print_mesg').empty(); + photoboothTools.modal.empty('#print_mesg'); $('#print_mesg').html( '' ); setTimeout(function () { - $('#print_mesg').removeClass('modal--show'); - $('#print_mesg').empty(); + photoboothTools.modal.close('#print_mesg'); + photoboothTools.modal.empty('#print_mesg'); $('#print_mesg').html( '' ); @@ -271,7 +271,7 @@ function saveImage(cb) { function printImageHandler(ev) { ev.preventDefault(); - $('#print_mesg').addClass('modal--show'); + photoboothTools.modal.open('#print_mesg'); setTimeout(function () { saveImage((data) => { @@ -289,12 +289,12 @@ function printImageHandler(ev) { function saveImageHandler(ev) { ev.preventDefault(); - $('#save_mesg').addClass('modal--show'); + photoboothTools.modal.open('#save_mesg'); setTimeout(function () { saveImage(() => { setTimeout(function () { - $('#save_mesg').removeClass('modal--show'); + photoboothTools.modal.close('#save_mesg'); $('#save-btn').blur(); }, 2000); }); diff --git a/src/js/diskusage.js b/src/js/diskusage.js index f6d87ba07..801d92f44 100644 --- a/src/js/diskusage.js +++ b/src/js/diskusage.js @@ -2,7 +2,7 @@ $(function () { $('.download-zip-btn').on('click', function (e) { e.preventDefault(); - $('#save_mesg').addClass('modal--show'); + photoboothTools.modal.open('#save_mesg'); const data = {type: 'zip'}; $.ajax({ url: '../api/diskusage.php', @@ -24,13 +24,13 @@ $(function () { } }); } - $('#save_mesg').removeClass('modal--show'); + photoboothTools.modal.close('#save_mesg'); $('.download-zip-btn').blur(); }, 10000); }, error: function (jqXHR, textStatus) { photoboothTools.console.log('Error while downloading: ', textStatus); - $('#save_mesg').removeClass('modal--show'); + photoboothTools.modal.close('#save_mesg'); } }); }); From 1aba5e5c9f6e5de2c2512da18aaedf6b8eedf0c6 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Wed, 15 Sep 2021 11:22:08 +0200 Subject: [PATCH 067/214] core: log processing times if dev mode is enabled Change-Id: I8ab257d09e507f32de55d83b992f4639bcc5ca1d --- src/js/core.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/js/core.js b/src/js/core.js index 2a792f46a..82bf4fc34 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -28,7 +28,10 @@ const photoBooth = (function () { currentCollageFile = '', imgFilter = config.filters.defaults, pid, - command; + command, + startTime, + endTime, + totalTime; // Returns true when timeOut is pending api.isTimeOutPending = function () { @@ -434,10 +437,14 @@ const photoBooth = (function () { }; api.callTakePicApi = function (data) { + startTime = new Date().getTime(); jQuery .post('api/takePic.php', data) .done(function (result) { - photoboothTools.console.log('took picture', result); + endTime = new Date().getTime(); + totalTime = endTime - startTime; + photoboothTools.console.log('took ' + data.style, result); + photoboothTools.console.logDev('Taking picture took ' + totalTime + 'ms'); $('.cheese').empty(); if (config.preview.flipHorizontal) { $('#video--view').removeClass('flip-horizontal'); @@ -595,6 +602,7 @@ const photoBooth = (function () { }; api.processPic = function (photoStyle, result) { + startTime = new Date().getTime(); const tempImageUrl = config.foldersRoot.tmp + '/' + result.file; $('.spinner').show(); @@ -622,7 +630,10 @@ const photoBooth = (function () { style: photoStyle }, success: (data) => { - photoboothTools.console.log('picture processed', data); + photoboothTools.console.log(photoStyle + ' processed', data); + endTime = new Date().getTime(); + totalTime = endTime - startTime; + photoboothTools.console.logDev('Processing ' + photoStyle + ' took ' + totalTime + 'ms'); if (data.error) { api.errorPic(data); From cd1b99e351ffc0e7944440ed85930c5b8345a47e Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Wed, 15 Sep 2021 11:37:51 +0200 Subject: [PATCH 068/214] js: use central function to get translation Change-Id: If08b550b83d7d8c00257e0d4764ae382fecc5461 --- src/js/admin.js | 24 ++++---------- src/js/chromakeying.js | 24 +++++--------- src/js/core.js | 72 +++++++++++++++++++++++------------------- src/js/dependencies.js | 22 +++---------- src/js/livechroma.js | 4 +-- src/js/photoinit.js | 4 +-- src/js/tools.js | 13 ++++++++ src/js/update.js | 46 ++++++++++----------------- 8 files changed, 92 insertions(+), 117 deletions(-) diff --git a/src/js/admin.js b/src/js/admin.js index 1db3ba983..8d707ed6f 100644 --- a/src/js/admin.js +++ b/src/js/admin.js @@ -1,17 +1,5 @@ -/* globals i18n photoboothTools */ +/* globals photoboothTools */ $(function () { - const getTranslation = function (key) { - const translation = i18n(key, config.ui.language); - const fallbackTranslation = i18n(key, 'en'); - if (translation) { - return translation; - } else if (fallbackTranslation) { - return fallbackTranslation; - } - - return key; - }; - const shellCommand = function ($mode) { const command = { mode: $mode @@ -31,7 +19,7 @@ $(function () { $('#reset-btn').on('click', function (e) { e.preventDefault(); - const msg = getTranslation('really_delete'); + const msg = photoboothTools.getTranslation('really_delete'); const really = confirm(msg); const data = {type: 'reset'}; const elem = $(this); @@ -137,14 +125,14 @@ $(function () { $('#checkVersion').empty(); photoboothTools.console.log('data', data); if (!data.updateAvailable) { - $('#current_version_text').text(getTranslation('using_latest_version')); + $('#current_version_text').text(photoboothTools.getTranslation('using_latest_version')); } else if (/^\d+\.\d+\.\d+$/u.test(data.availableVersion)) { - $('#current_version_text').text(getTranslation('current_version')); + $('#current_version_text').text(photoboothTools.getTranslation('current_version')); $('#current_version').text(data.currentVersion); - $('#available_version_text').text(getTranslation('available_version')); + $('#available_version_text').text(photoboothTools.getTranslation('available_version')); $('#available_version').text(data.availableVersion); } else { - $('#current_version_text').text(getTranslation('test_update_available')); + $('#current_version_text').text(photoboothTools.getTranslation('test_update_available')); } elem.removeClass('saving'); diff --git a/src/js/chromakeying.js b/src/js/chromakeying.js index f0cd1208d..027ab27d5 100644 --- a/src/js/chromakeying.js +++ b/src/js/chromakeying.js @@ -1,4 +1,4 @@ -/* globals MarvinColorModelConverter AlphaBoundary MarvinImage i18n Seriously initRemoteBuzzerFromDOM rotaryController photoboothTools */ +/* globals MarvinColorModelConverter AlphaBoundary MarvinImage Seriously initRemoteBuzzerFromDOM rotaryController photoboothTools */ /* exported setBackgroundImage */ let mainImage; let mainImageWidth; @@ -10,18 +10,6 @@ let target; let chroma; let seriouslyimage; -const getTranslation = function (key) { - const translation = i18n(key, config.ui.language); - const fallbackTranslation = i18n(key, 'en'); - if (translation) { - return translation; - } else if (fallbackTranslation) { - return fallbackTranslation; - } - - return key; -}; - function greenToTransparency(imageIn, imageOut) { for (let y = 0; y < imageIn.getHeight(); y++) { for (let x = 0; x < imageIn.getWidth(); x++) { @@ -194,7 +182,7 @@ function calculateAspectRatioFit(srcWidth, srcHeight, maxWidth, maxHeight) { } function printImage(filename, cb) { - const errormsg = getTranslation('error'); + const errormsg = photoboothTools.getTranslation('error'); if (isPrinting) { photoboothTools.console.log('Printing already: ' + isPrinting); @@ -223,7 +211,9 @@ function printImage(filename, cb) { if (data.error) { photoboothTools.modal.empty('#print_mesg'); $('#print_mesg').html( - '' + '' ); } cb(); @@ -241,7 +231,9 @@ function printImage(filename, cb) { photoboothTools.modal.close('#print_mesg'); photoboothTools.modal.empty('#print_mesg'); $('#print_mesg').html( - '' + '' ); cb(); isPrinting = false; diff --git a/src/js/core.js b/src/js/core.js index 82bf4fc34..24dd837fa 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -1,4 +1,4 @@ -/* globals initPhotoSwipeFromDOM initRemoteBuzzerFromDOM i18n setMainImage remoteBuzzerClient rotaryController globalGalleryHandle photoboothTools */ +/* globals initPhotoSwipeFromDOM initRemoteBuzzerFromDOM setMainImage remoteBuzzerClient rotaryController globalGalleryHandle photoboothTools */ const photoBooth = (function () { // vars @@ -92,18 +92,6 @@ const photoBooth = (function () { rotaryController.focusSet('#start'); }; - api.getTranslation = function (key) { - const translation = i18n(key, config.ui.language); - const fallbackTranslation = i18n(key, 'en'); - if (translation) { - return translation; - } else if (fallbackTranslation) { - return fallbackTranslation; - } - - return key; - }; - api.openNav = function () { $('#mySidenav').addClass('sidenav--open'); rotaryController.focusSet('#mySidenav'); @@ -362,10 +350,10 @@ const photoBooth = (function () { if (config.picture.no_cheese) { photoboothTools.console.log('Cheese is disabled.'); } else if (photoStyle === 'photo' || photoStyle === 'chroma') { - const cheesemsg = api.getTranslation('cheese'); + const cheesemsg = photoboothTools.getTranslation('cheese'); $('.cheese').text(cheesemsg); } else { - const cheesemsg = api.getTranslation('cheeseCollage'); + const cheesemsg = photoboothTools.getTranslation('cheeseCollage'); $('.cheese').text(cheesemsg); $('

    ') .text(`${nextCollageNumber + 1} / ${config.collage.limit}`) @@ -469,7 +457,7 @@ const photoBooth = (function () { let imageUrl = config.foldersRoot.tmp + '/' + result.collage_file; const preloadImage = new Image(); const picdate = Date.now; - const waitmsg = api.getTranslation('wait_message'); + const waitmsg = photoboothTools.getTranslation('wait_message'); $('.loading').append($('

    ').text(waitmsg)); preloadImage.onload = () => { $('.loaderImage').css({ @@ -505,7 +493,11 @@ const photoBooth = (function () { remoteBuzzerClient.collageWaitForNext(); if (result.current + 1 < result.limit) { - $('' + api.getTranslation('nextPhoto') + '') + $( + '' + + photoboothTools.getTranslation('nextPhoto') + + '' + ) .appendTo('.loading') .click((ev) => { ev.stopPropagation(); @@ -516,7 +508,11 @@ const photoBooth = (function () { api.thrill('collage'); }); } else { - $('' + api.getTranslation('processPhoto') + '') + $( + '' + + photoboothTools.getTranslation('processPhoto') + + '' + ) .appendTo('.loading') .click((ev) => { ev.stopPropagation(); @@ -532,7 +528,7 @@ const photoBooth = (function () { } $( '' + - api.getTranslation('retakePhoto') + + photoboothTools.getTranslation('retakePhoto') + '' ) .appendTo('.loading') @@ -547,7 +543,7 @@ const photoBooth = (function () { api.thrill('collage'); }); - const abortmsg = api.getTranslation('abort'); + const abortmsg = photoboothTools.getTranslation('abort'); $('.loading') .append($('').text(abortmsg)) .click(() => { @@ -580,7 +576,7 @@ const photoBooth = (function () { $('#video--view').hide(); $('#video--sensor').hide(); loader.addClass('error'); - const errormsg = api.getTranslation('error'); + const errormsg = photoboothTools.getTranslation('error'); $('.loading').append($('

    ').text(errormsg)); if (config.dev.error_messages) { $('.loading').append($('

    ').text(data.error)); @@ -589,13 +585,13 @@ const photoBooth = (function () { remoteBuzzerClient.inProgress(false); photoboothTools.console.logDev('Taking photo: ' + takingPic); if (config.dev.reload_on_error) { - const reloadmsg = api.getTranslation('auto_reload'); + const reloadmsg = photoboothTools.getTranslation('auto_reload'); $('.loading').append($('

    ').text(reloadmsg)); setTimeout(function () { photoboothTools.reloadPage(); }, 5000); } else { - const reloadmsg = api.getTranslation('reload'); + const reloadmsg = photoboothTools.getTranslation('reload'); $('.loading').append($('').text(reloadmsg)); } }, 500); @@ -608,8 +604,8 @@ const photoBooth = (function () { $('.spinner').show(); $('.loading').text( photoStyle === 'photo' || photoStyle === 'chroma' - ? api.getTranslation('busy') - : api.getTranslation('busyCollage') + ? photoboothTools.getTranslation('busy') + : photoboothTools.getTranslation('busyCollage') ); if (photoStyle === 'photo' && config.picture.preview_before_processing) { @@ -694,7 +690,7 @@ const photoBooth = (function () { $(this).appendTo(body); $('

    ') .css('max-width', this.width + 'px') - .html(api.getTranslation('qrHelp') + '
    ' + config.webserver.ssid + '') + .html(photoboothTools.getTranslation('qrHelp') + '
    ' + config.webserver.ssid + '') .appendTo(body); }); @@ -722,7 +718,7 @@ const photoBooth = (function () { .on('click', (ev) => { ev.preventDefault(); - const msg = api.getTranslation('really_delete_image'); + const msg = photoboothTools.getTranslation('really_delete_image'); const really = config.delete.no_request ? true : confirm(filename + ' ' + msg); if (really) { api.deleteImage(filename, (data) => { @@ -898,7 +894,7 @@ const photoBooth = (function () { }; api.printImage = function (imageSrc, cb) { - const errormsg = api.getTranslation('error'); + const errormsg = photoboothTools.getTranslation('error'); if (isPrinting) { photoboothTools.console.log('Printing already: ' + isPrinting); @@ -931,7 +927,9 @@ const photoBooth = (function () { if (data.error) { $('#print_mesg').empty(); $('#print_mesg').html( - '

    ' + '' ); } cb(); @@ -950,7 +948,9 @@ const photoBooth = (function () { photoboothTools.modal.close('#print_mesg'); $('#print_mesg').empty(); $('#print_mesg').html( - '' + '' ); cb(); isPrinting = false; @@ -1107,18 +1107,24 @@ const photoBooth = (function () { if (result.saved) { message .fadeIn() - .html('' + api.getTranslation('mailSaved') + ''); + .html( + '' + photoboothTools.getTranslation('mailSaved') + '' + ); } else { message .fadeIn() - .html('' + api.getTranslation('mailSent') + ''); + .html( + '' + photoboothTools.getTranslation('mailSent') + '' + ); } } else { message.fadeIn().html('' + result.error + ''); } }, error: function () { - message.fadeIn('fast').html('' + api.getTranslation('mailError') + ''); + message + .fadeIn('fast') + .html('' + photoboothTools.getTranslation('mailError') + ''); }, complete: function () { form.find('.btn').html(oldValue); diff --git a/src/js/dependencies.js b/src/js/dependencies.js index a44631e06..002c0ef2e 100644 --- a/src/js/dependencies.js +++ b/src/js/dependencies.js @@ -1,4 +1,4 @@ -/* global i18n photoboothTools */ +/* globals photoboothTools */ const dependencies = (function () { // vars @@ -16,8 +16,8 @@ const dependencies = (function () { .post('api/checkOS.php') .done(function (result) { photoboothTools.console.log('Operating system: ' + result.os); - const checkDependencies = api.getTranslation('check_dependencies'), - unsupportedOs = api.getTranslation('unsupported_os'); + const checkDependencies = photoboothTools.getTranslation('check_dependencies'), + unsupportedOs = photoboothTools.getTranslation('unsupported_os'); if (result.os == 'linux') { $('.white-box').append($('

    ').text(result.os)); @@ -33,18 +33,6 @@ const dependencies = (function () { }); }; - api.getTranslation = function (key) { - const translation = i18n(key, config.ui.language); - const fallbackTranslation = i18n(key, 'en'); - if (translation) { - return translation; - } else if (fallbackTranslation) { - return fallbackTranslation; - } - - return key; - }; - api.runCmd = function ($mode) { command = { mode: $mode @@ -56,7 +44,7 @@ const dependencies = (function () { .post('api/update.php', command) .done(function (result) { photoboothTools.console.log($mode, 'result: ', result); - const updateError = api.getTranslation('update_error'); + const updateError = photoboothTools.getTranslation('update_error'); if (result.success) { if ($mode == 'check-deps') { @@ -70,7 +58,7 @@ const dependencies = (function () { } }) .fail(function (xhr, status, result) { - const updateFail = api.getTranslation('update_fail'); + const updateFail = photoboothTools.getTranslation('update_fail'); $('.white-box').append($('

    ').text(updateFail)); photoboothTools.console.log($mode, 'result: ', result); }); diff --git a/src/js/livechroma.js b/src/js/livechroma.js index 824f83945..1da544452 100644 --- a/src/js/livechroma.js +++ b/src/js/livechroma.js @@ -207,7 +207,7 @@ function saveImage(cb) { .on('click', (ev) => { ev.preventDefault(); - const msg = photoBooth.getTranslation('really_delete_image'); + const msg = photoboothTools.getTranslation('really_delete_image'); const really = config.delete.no_request ? true : confirm(data.filename + ' ' + msg); if (really) { photoBooth.deleteImage(data.filename, (result) => { @@ -267,7 +267,7 @@ $('.backgroundPreview').on('click', function () { $('.takeChroma, .newchroma').on('click', function (e) { e.preventDefault(); takingPic = true; - const chromaInfo = photoBooth.getTranslation('chromaInfoAfter'); + const chromaInfo = photoboothTools.getTranslation('chromaInfoAfter'); photoBooth.thrill('chroma'); diff --git a/src/js/photoinit.js b/src/js/photoinit.js index 92b0f9e17..b7d912aa6 100644 --- a/src/js/photoinit.js +++ b/src/js/photoinit.js @@ -204,7 +204,7 @@ function initPhotoSwipeFromDOM(gallerySelector) { let img = gallery.currItem.src; img = img.split('\\').pop().split('/').pop(); - const msg = photoBooth.getTranslation('really_delete_image'); + const msg = photoboothTools.getTranslation('really_delete_image'); const really = config.delete.no_request ? true : confirm(img + ' ' + msg); if (really) { $.ajax({ @@ -256,7 +256,7 @@ function initPhotoSwipeFromDOM(gallerySelector) { .appendTo(pswpQR); $('

    ') .css('max-width', this.width + 'px') - .html(photoBooth.getTranslation('qrHelp') + '' + config.webserver.ssid + '') + .html(photoboothTools.getTranslation('qrHelp') + '' + config.webserver.ssid + '') .appendTo(pswpQR); pswpQR.addClass('qr-active').fadeIn('fast'); diff --git a/src/js/tools.js b/src/js/tools.js index 19e733769..6b3858298 100644 --- a/src/js/tools.js +++ b/src/js/tools.js @@ -1,3 +1,4 @@ +/* globals i18n */ const photoboothTools = (function () { // vars const api = {}; @@ -13,6 +14,18 @@ const photoboothTools = (function () { } }; + api.getTranslation = function (key) { + const translation = i18n(key, config.ui.language); + const fallbackTranslation = i18n(key, 'en'); + if (translation) { + return translation; + } else if (fallbackTranslation) { + return fallbackTranslation; + } + + return key; + }; + api.modal = { open: function (selector) { $(selector).addClass('modal--show'); diff --git a/src/js/update.js b/src/js/update.js index d61fc376c..40a60a471 100644 --- a/src/js/update.js +++ b/src/js/update.js @@ -1,4 +1,4 @@ -/* globals i18n photoboothTools */ +/* globals photoboothTools */ const updater = (function () { // vars @@ -19,8 +19,8 @@ const updater = (function () { .post('api/checkOS.php') .done(function (result) { photoboothTools.console.log('Operating system: ' + result.os); - const checkConnection = api.getTranslation('check_connection'), - unsupportedOs = api.getTranslation('unsupported_os'); + const checkConnection = photoboothTools.getTranslation('check_connection'), + unsupportedOs = photoboothTools.getTranslation('unsupported_os'); if (result.os == 'linux') { $('.white-box').append($('

    ').text(result.os)); @@ -41,9 +41,9 @@ const updater = (function () { .post('api/checkConnection.php') .done(function (result) { photoboothTools.console.log('Connected: ', result); - const ok = api.getTranslation('ok'), - noConnection = api.getTranslation('no_connection'), - updateCheckGit = api.getTranslation('update_check_git'); + const ok = photoboothTools.getTranslation('ok'), + noConnection = photoboothTools.getTranslation('no_connection'), + updateCheckGit = photoboothTools.getTranslation('update_check_git'); if (result.connected === true) { $('.white-box').append($('

    ').text(ok)); @@ -58,18 +58,6 @@ const updater = (function () { }); }; - api.getTranslation = function (key) { - const translation = i18n(key, config.ui.language); - const fallbackTranslation = i18n(key, 'en'); - if (translation) { - return translation; - } else if (fallbackTranslation) { - return fallbackTranslation; - } - - return key; - }; - api.runCmd = function ($mode) { command = { mode: $mode @@ -81,13 +69,13 @@ const updater = (function () { .post('api/update.php', command) .done(function (result) { photoboothTools.console.log($mode, 'result: ', result); - const updateCommitBackup = api.getTranslation('update_commit_backup'), - updateReady = api.getTranslation('update_ready'), - updateNoGit = api.getTranslation('update_no_git'), - updateGitCommited = api.getTranslation('update_git_commited'), - updateDone = api.getTranslation('update_done'), - updateError = api.getTranslation('update_error'), - ok = api.getTranslation('ok'); + const updateCommitBackup = photoboothTools.getTranslation('update_commit_backup'), + updateReady = photoboothTools.getTranslation('update_ready'), + updateNoGit = photoboothTools.getTranslation('update_no_git'), + updateGitCommited = photoboothTools.getTranslation('update_git_commited'), + updateDone = photoboothTools.getTranslation('update_done'), + updateError = photoboothTools.getTranslation('update_error'), + ok = photoboothTools.getTranslation('ok'); if (result.success) { if ($mode === 'check-git') { @@ -128,7 +116,7 @@ const updater = (function () { } }) .fail(function (xhr, status, result) { - const updateFail = api.getTranslation('update_fail'); + const updateFail = photoboothTools.getTranslation('update_fail'); $('.white-box').append($('

    ').text(updateFail)); photoboothTools.console.log($mode, 'result: ', result); }); @@ -136,7 +124,7 @@ const updater = (function () { $('.gitCommit').on('click', function (e) { e.preventDefault(); - const updateCommitting = api.getTranslation('update_committing'); + const updateCommitting = photoboothTools.getTranslation('update_committing'); $('.white-box').append($('

    ').text(updateCommitting)); api.runCmd('commit'); $('.gitCommit').blur(); @@ -144,7 +132,7 @@ const updater = (function () { $('.updateDev').on('click', function (e) { e.preventDefault(); - const updateRunning = api.getTranslation('update_running'); + const updateRunning = photoboothTools.getTranslation('update_running'); $('.white-box').append($('

    ').text(updateRunning)); api.runCmd('update-dev'); $('.updateDev').blur(); @@ -154,7 +142,7 @@ const updater = (function () { $('.updateStable').on('click', function (e) { e.preventDefault(); - const updateRunning = api.getTranslation('update_running'); + const updateRunning = photoboothTools.getTranslation('update_running'); $('.white-box').append($('

    ').text(updateRunning)); api.runCmd('update-stable'); $('.updateStable').blur(); From 3a491e7b4e8945e0d9dbb7d22655bf53c8a47289 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Wed, 15 Sep 2021 11:46:25 +0200 Subject: [PATCH 069/214] i18n: remove sub-version, use root path to get language file Change-Id: I24d7649187a81a40807815b8c8aa1cd03816065a --- admin/debugpanel.php | 2 +- admin/diskusage.php | 2 +- admin/index.php | 2 +- lib/config.php | 2 ++ login/index.php | 2 +- manual/index.php | 2 +- slideshow/index.php | 2 +- src/js/i18n-sub.js | 19 ------------------- src/js/i18n.js | 2 +- 9 files changed, 9 insertions(+), 26 deletions(-) delete mode 100644 src/js/i18n-sub.js diff --git a/admin/debugpanel.php b/admin/debugpanel.php index caa5a5c9a..5d7bbc97c 100644 --- a/admin/debugpanel.php +++ b/admin/debugpanel.php @@ -115,7 +115,7 @@ function html_src_indent($num) - + diff --git a/admin/diskusage.php b/admin/diskusage.php index 19a258012..bd10f7d59 100644 --- a/admin/diskusage.php +++ b/admin/diskusage.php @@ -89,7 +89,7 @@ - + diff --git a/admin/index.php b/admin/index.php index 80527ca97..064731a1e 100644 --- a/admin/index.php +++ b/admin/index.php @@ -293,6 +293,6 @@ function isElementHidden($element_class, $setting) - + diff --git a/lib/config.php b/lib/config.php index 72888ca87..8f19d015f 100644 --- a/lib/config.php +++ b/lib/config.php @@ -185,6 +185,8 @@ $config['foldersAbs'][$key] = $path; } +$config['folders']['lang'] = getrootpath('../resources/lang'); + function getrootpath($relative_path) { $realpath = realpath($relative_path); $rootpath = str_replace($_SERVER['DOCUMENT_ROOT'], '', $realpath); diff --git a/login/index.php b/login/index.php index ae7f5eb25..41626b4a7 100644 --- a/login/index.php +++ b/login/index.php @@ -112,6 +112,6 @@ - + diff --git a/manual/index.php b/manual/index.php index 9a78e9069..82f5e63a2 100644 --- a/manual/index.php +++ b/manual/index.php @@ -142,7 +142,7 @@ - + diff --git a/slideshow/index.php b/slideshow/index.php index 7d05a6913..087bda242 100644 --- a/slideshow/index.php +++ b/slideshow/index.php @@ -99,6 +99,6 @@ - + diff --git a/src/js/i18n-sub.js b/src/js/i18n-sub.js deleted file mode 100644 index aef278dc4..000000000 --- a/src/js/i18n-sub.js +++ /dev/null @@ -1,19 +0,0 @@ -/* globals Translator */ -const translator = new Translator({ - persist: false, - defaultLanguage: 'en', - detectLanguage: false, - registerGlobally: 'i18n', - filesLocation: '../resources/lang', - debug: config.dev.enabled -}); - -translator.fetch('en').then(() => { - translator.translatePageTo(); -}); - -if (config.ui.language !== 'en') { - translator.fetch(config.ui.language).then(() => { - translator.translatePageTo(config.ui.language); - }); -} diff --git a/src/js/i18n.js b/src/js/i18n.js index cc6460228..d31a966dd 100644 --- a/src/js/i18n.js +++ b/src/js/i18n.js @@ -4,7 +4,7 @@ const translator = new Translator({ defaultLanguage: 'en', detectLanguage: false, registerGlobally: 'i18n', - filesLocation: 'resources/lang', + filesLocation: config.folders.lang, debug: config.dev.enabled }); From 5994911c54ae6e46629df6fae0031a87aebd102e Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Wed, 15 Sep 2021 12:00:07 +0200 Subject: [PATCH 070/214] [DEV] disable version checker on dev branch Change-Id: I7e326ad665709e4f3baaea38e6fec00161a565be --- lib/configsetup.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 574bb597a..96c30fab0 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -2006,7 +2006,7 @@ 'view' => 'basic', 'check_version' => [ 'view' => 'basic', - 'type' => 'button', + 'type' => 'hidden', 'placeholder' => 'check_version', 'name' => 'CHECKVERSIONBUTTON', 'value' => 'checkversion-btn', From 5ed53ad3a7ba8d8ef28ec069264e5a550f9803da Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 16 Sep 2021 12:01:16 +0200 Subject: [PATCH 071/214] debugpanel: spell selectize.min.js correctly Change-Id: Iada021dfdc7d4ee030e8975f25d20166739a9ede --- admin/debugpanel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/debugpanel.php b/admin/debugpanel.php index 5d7bbc97c..dbe095d65 100644 --- a/admin/debugpanel.php +++ b/admin/debugpanel.php @@ -110,7 +110,7 @@ function html_src_indent($num) - + From b869f69e29424551874eae88a7392702970a325e Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 4 Sep 2021 10:27:43 +0200 Subject: [PATCH 072/214] feature: allow sending a GET request at countdown and while processing Change-Id: I2b447f7dcfabe7618ebc3372a183914f32ef94d3 --- config/config.inc.php | 7 +++++++ lib/configsetup.inc.php | 31 +++++++++++++++++++++++++++++++ resources/lang/en.json | 9 +++++++++ src/js/core.js | 18 ++++++++++++++++++ 4 files changed, 65 insertions(+) diff --git a/config/config.inc.php b/config/config.inc.php index 0acb77690..39626a8ba 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -259,6 +259,13 @@ $config['synctodrive']['interval'] = 300; +// G E T R E Q U E S T +$config['get_request']['enabled'] = false; +$config['get_request']['server'] = NULL; +$config['get_request']['picture'] = 'CNTDWNPHOTO'; +$config['get_request']['collage'] = 'CNTDWNCOLLAGE'; + + // A U T H E N T I C A T I O N $config['login']['enabled'] = false; $config['login']['username'] = 'Photo'; diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 96c30fab0..3842d14e8 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -1531,6 +1531,37 @@ 'value' => $config['synctodrive']['logfile'], ], ], + 'get_request' => [ + 'platform' => 'linux', + 'view' => 'advanced', + 'get_request_enabled' => [ + 'view' => 'basic', + 'type' => 'checkbox', + 'name' => 'get_request[enabled]', + 'value' => $config['get_request']['enabled'], + ], + 'get_request_server' => [ + 'view' => 'advanced', + 'type' => 'input', + 'placeholder' => 'http://xxx.xxx.xxx.xxx', + 'name' => 'get_request[server]', + 'value' => htmlentities($config['get_request']['server']), + ], + 'get_request_picture' => [ + 'view' => 'advanced', + 'type' => 'input', + 'placeholder' => $defaultConfig['get_request']['picture'], + 'name' => 'get_request[picture]', + 'value' => htmlentities($config['get_request']['picture']), + ], + 'get_request_collage' => [ + 'view' => 'advanced', + 'type' => 'input', + 'placeholder' => $defaultConfig['get_request']['collage'], + 'name' => 'get_request[collage]', + 'value' => htmlentities($config['get_request']['collage']), + ], + ], 'authentication' => [ 'view' => 'basic', 'login_enabled' => [ diff --git a/resources/lang/en.json b/resources/lang/en.json index 072195950..60b9895e3 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -150,6 +150,11 @@ "general:ui_language": "Choose Language", "general:webserver_ip": "IP address of the Photobooth web server", "general:webserver_ssid": "Wireless network name (SSID) used to access the photobooth", + "get_request": "GET request", + "get_request:get_request_collage": "GET request for collage", + "get_request:get_request_enabled": "Send GET request to server at countdown and after processing", + "get_request:get_request_picture": "GET request for picture", + "get_request:get_request_server": "GET request server", "githead": "Latest changes", "home": "Home", "insertMail": "Enter your e-mail address to receive the photo.", @@ -298,6 +303,10 @@ "manual:general:ui_language": "Choose interface language.

    If you're missing a language or like to help improving translations visit the \"How to update or add translations?\" inside the Photobooth Wiki for instructions.

    ", "manual:general:webserver_ip": "Please define the IP address of the Photobooth web server to make the QR-Code working if you're accessing Photobooth via \"localhost\", \"127.0.0.1\" or if you have Photobooth installed inside a subfolder.

    Example if Photobooth can be accessed directly: 192.168.0.50.

    Example if Photobooth is installed inside a subfolder: 192.168.0.50/photobooth.

    ", "manual:general:webserver_ssid": "Please define the wireless network name (SSID) to be used to access the Photobooth. The wireless network name (SSID) is displayed on the results page when the QR code is called up.", + "manual:get_request:get_request_collage": "Define GET request at countdown while taking a collage.", + "manual:get_request:get_request_enabled": "If enabled, a GET request will be made to defined Server.", + "manual:get_request:get_request_picture": "Define GET request at countdown while taking a picture.", + "manual:get_request:get_request_server": "Define the server for a GET request.", "manual:jpeg_quality:jpeg_quality_chroma": "Picture quality used for chromakeying pictures.", "manual:jpeg_quality:jpeg_quality_image": "Picture quality used for taking pictures. Value of -1 means the original file from the camera will be retained, if there is no other mods i.e. filters active.", "manual:jpeg_quality:jpeg_quality_thumb": "Picture quality used for thumbnails.", diff --git a/src/js/core.js b/src/js/core.js index 24dd837fa..f987124c9 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -631,6 +631,14 @@ const photoBooth = (function () { totalTime = endTime - startTime; photoboothTools.console.logDev('Processing ' + photoStyle + ' took ' + totalTime + 'ms'); + if (config.get_request.enabled) { + const getUrl = config.get_request.server + '/' + photoStyle; + const request = new XMLHttpRequest(); + console.log('Sending GET request to: ' + getUrl); + request.open('GET', getUrl); + request.send(); + } + if (data.error) { api.errorPic(data); } else if (photoStyle === 'chroma') { @@ -873,6 +881,16 @@ const photoBooth = (function () { let current = start; const stop = start > 2 ? start - 2 : start; + if (config.get_request.enabled) { + const getMode = + start == config.picture.cntdwn_time ? config.get_request.picture : config.get_request.collage; + const getUrl = config.get_request.server + '/' + getMode; + const request = new XMLHttpRequest(); + console.log('Sending GET request to: ' + getUrl); + request.open('GET', getUrl); + request.send(); + } + function timerFunction() { element.text(Number(current) + Number(config.picture.cntdwn_offset)); current--; From 99631f209e88a22c6bad29e7ac02cf4180895c2a Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 16 Sep 2021 12:03:49 +0200 Subject: [PATCH 073/214] get request: also allow sending a GET request on windows Change-Id: I1f431939772c644479cbced3b6a9105debcdbffe --- lib/configsetup.inc.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 3842d14e8..50e883e6c 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -1532,7 +1532,6 @@ ], ], 'get_request' => [ - 'platform' => 'linux', 'view' => 'advanced', 'get_request_enabled' => [ 'view' => 'basic', From c7ddb36d313c2c8623a3eb6ed04ebb03b735e212 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 16 Sep 2021 12:14:29 +0200 Subject: [PATCH 074/214] GET request: independent GET request at countdown & after processing Change-Id: Ic03d10a8e3ddca30886bfa0afeb3eda042471e81 --- config/config.inc.php | 3 ++- lib/configsetup.inc.php | 12 +++++++++--- resources/lang/en.json | 10 ++++++---- src/js/core.js | 8 ++++---- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/config/config.inc.php b/config/config.inc.php index 39626a8ba..d130ff19f 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -260,7 +260,8 @@ // G E T R E Q U E S T -$config['get_request']['enabled'] = false; +$config['get_request']['countdown'] = false; +$config['get_request']['processed'] = false; $config['get_request']['server'] = NULL; $config['get_request']['picture'] = 'CNTDWNPHOTO'; $config['get_request']['collage'] = 'CNTDWNCOLLAGE'; diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 50e883e6c..39b8070c4 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -1533,11 +1533,17 @@ ], 'get_request' => [ 'view' => 'advanced', - 'get_request_enabled' => [ + 'get_request_countdown' => [ 'view' => 'basic', 'type' => 'checkbox', - 'name' => 'get_request[enabled]', - 'value' => $config['get_request']['enabled'], + 'name' => 'get_request[countdown]', + 'value' => $config['get_request']['countdown'], + ], + 'get_request_processed' => [ + 'view' => 'basic', + 'type' => 'checkbox', + 'name' => 'get_request[processed]', + 'value' => $config['get_request']['processed'], ], 'get_request_server' => [ 'view' => 'advanced', diff --git a/resources/lang/en.json b/resources/lang/en.json index 60b9895e3..9d710c0d4 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -151,9 +151,10 @@ "general:webserver_ip": "IP address of the Photobooth web server", "general:webserver_ssid": "Wireless network name (SSID) used to access the photobooth", "get_request": "GET request", - "get_request:get_request_collage": "GET request for collage", - "get_request:get_request_enabled": "Send GET request to server at countdown and after processing", - "get_request:get_request_picture": "GET request for picture", + "get_request:get_request_collage": "GET request for collage at countdown", + "get_request:get_request_countdown": "Send GET request to server at countdown", + "get_request:get_request_picture": "GET request for picture at countdown", + "get_request:get_request_processed": "Send \"Photostyle\" GET request to server after processing", "get_request:get_request_server": "GET request server", "githead": "Latest changes", "home": "Home", @@ -304,8 +305,9 @@ "manual:general:webserver_ip": "Please define the IP address of the Photobooth web server to make the QR-Code working if you're accessing Photobooth via \"localhost\", \"127.0.0.1\" or if you have Photobooth installed inside a subfolder.

    Example if Photobooth can be accessed directly: 192.168.0.50.

    Example if Photobooth is installed inside a subfolder: 192.168.0.50/photobooth.

    ", "manual:general:webserver_ssid": "Please define the wireless network name (SSID) to be used to access the Photobooth. The wireless network name (SSID) is displayed on the results page when the QR code is called up.", "manual:get_request:get_request_collage": "Define GET request at countdown while taking a collage.", - "manual:get_request:get_request_enabled": "If enabled, a GET request will be made to defined Server.", + "manual:get_request:get_request_countdown": "If enabled, a GET request will be made to defined Server at countdown. GET request needs to be defined for picture and collage.", "manual:get_request:get_request_picture": "Define GET request at countdown while taking a picture.", + "manual:get_request:get_request_processed": "If enabled, a GET request will be made to defined Server after processing the picture. \"Photostyle\" (\"photo\", \"collage\" or \"chroma\") is used for the GET request.", "manual:get_request:get_request_server": "Define the server for a GET request.", "manual:jpeg_quality:jpeg_quality_chroma": "Picture quality used for chromakeying pictures.", "manual:jpeg_quality:jpeg_quality_image": "Picture quality used for taking pictures. Value of -1 means the original file from the camera will be retained, if there is no other mods i.e. filters active.", diff --git a/src/js/core.js b/src/js/core.js index f987124c9..cf245abe9 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -631,10 +631,10 @@ const photoBooth = (function () { totalTime = endTime - startTime; photoboothTools.console.logDev('Processing ' + photoStyle + ' took ' + totalTime + 'ms'); - if (config.get_request.enabled) { + if (config.get_request.processed) { const getUrl = config.get_request.server + '/' + photoStyle; const request = new XMLHttpRequest(); - console.log('Sending GET request to: ' + getUrl); + photoboothTools.console.log('Sending GET request to: ' + getUrl); request.open('GET', getUrl); request.send(); } @@ -881,12 +881,12 @@ const photoBooth = (function () { let current = start; const stop = start > 2 ? start - 2 : start; - if (config.get_request.enabled) { + if (config.get_request.countdown) { const getMode = start == config.picture.cntdwn_time ? config.get_request.picture : config.get_request.collage; const getUrl = config.get_request.server + '/' + getMode; const request = new XMLHttpRequest(); - console.log('Sending GET request to: ' + getUrl); + photoboothTools.console.log('Sending GET request to: ' + getUrl); request.open('GET', getUrl); request.send(); } From 6096655cce402fb0d2f523fd91e4dcfeefd8e926 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 16 Sep 2021 12:20:45 +0200 Subject: [PATCH 075/214] config: disable GET request if sever is not defined Change-Id: I49958db1acf923b39522e61785a6c1be963fb1ca --- api/admin.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/admin.php b/api/admin.php index e230f6e1c..bb658ffe4 100644 --- a/api/admin.php +++ b/api/admin.php @@ -139,6 +139,11 @@ $newConfig['remotebuzzer']['port'] = 14711; } + if (isset($newConfig['get_request']['server']) && empty($newConfig['get_request']['server'])) { + $newConfig['get_request']['countdown'] = false; + $newConfig['get_request']['processed'] = false; + } + if ($newConfig['collage']['layout'] === '1+2') { $newConfig['collage']['limit'] = 3; } else { From 530a5f223349b57a9ee24c7665973c708f2fc85c Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 18 Sep 2021 12:10:49 +0200 Subject: [PATCH 076/214] text on {picture,collage,print}: use color picker Change-Id: Ifa070e93a474bc3cbbd0489f95dff2bfc058785e --- config/config.inc.php | 9 +++------ lib/applyText.php | 10 +++------- lib/configsetup.inc.php | 21 +++------------------ 3 files changed, 9 insertions(+), 31 deletions(-) diff --git a/config/config.inc.php b/config/config.inc.php index d130ff19f..05733baaf 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -80,8 +80,7 @@ $config['textonpicture']['locationy'] = '80'; $config['textonpicture']['rotation'] = '0'; $config['textonpicture']['font'] = 'resources/fonts/GreatVibes-Regular.ttf'; -// possible font_color values: 'white', 'grey', 'black' -$config['textonpicture']['font_color'] = 'white'; +$config['textonpicture']['font_color'] = '#ffffff'; $config['textonpicture']['font_size'] = '80'; $config['textonpicture']['linespace'] = '90'; @@ -109,8 +108,7 @@ $config['textoncollage']['locationy'] = '250'; $config['textoncollage']['rotation'] = '0'; $config['textoncollage']['font'] = 'resources/fonts/GreatVibes-Regular.ttf'; -// possible font_color values: 'white', 'grey', 'black' -$config['textoncollage']['font_color'] = 'black'; +$config['textoncollage']['font_color'] = '#000000'; $config['textoncollage']['font_size'] = '50'; $config['textoncollage']['linespace'] = '90'; // DO NOT CHANGE limit here @@ -198,8 +196,7 @@ $config['textonprint']['locationy'] = '1050'; $config['textonprint']['rotation'] = '40'; $config['textonprint']['font'] = 'resources/fonts/GreatVibes-Regular.ttf'; -// possible font_color values: 'white', 'grey', 'black' -$config['textonprint']['font_color'] = 'black'; +$config['textonprint']['font_color'] = '#ffffff'; $config['textonprint']['font_size'] = '100'; $config['textonprint']['linespace'] = '100'; diff --git a/lib/applyText.php b/lib/applyText.php index dc84e73ae..ca5f6b3b9 100644 --- a/lib/applyText.php +++ b/lib/applyText.php @@ -4,13 +4,9 @@ function ApplyText($srcImagePath, $fontsize, $fontrot, $fontlocx, $fontlocy, $fo $quality = 100; $font = realpath(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $fontpath); $image = imagecreatefromjpeg($srcImagePath); - if ($fontcolor === 'white') { - $color = imagecolorallocate($image, 255, 255, 255); - } elseif ($fontcolor === 'grey') { - $color = imagecolorallocate($image, 128, 128, 128); - } else { - $color = imagecolorallocate($image, 0, 0, 0); - } + list($r, $g, $b) = sscanf($fontcolor, '#%02x%02x%02x'); + $color = imagecolorallocate($image, $r, $g, $b); + if (!empty($line1text)) { imagettftext($image, $fontsize, $fontrot, $fontlocx, $fontlocy, $color, $font, $line1text); } diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 39b8070c4..87524602f 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -544,14 +544,9 @@ ], 'textonpicture_font_color' => [ 'view' => 'expert', - 'type' => 'select', + 'type' => 'color', 'name' => 'textonpicture[font_color]', 'placeholder' => $defaultConfig['textonpicture']['font_color'], - 'options' => [ - 'white' => 'white', - 'grey' => 'grey', - 'black' => 'black', - ], 'value' => $config['textonpicture']['font_color'], ], 'textonpicture_font_size' => [ @@ -715,14 +710,9 @@ ], 'textoncollage_font_color' => [ 'view' => 'expert', - 'type' => 'select', + 'type' => 'color', 'name' => 'textoncollage[font_color]', 'placeholder' => $defaultConfig['textoncollage']['font_color'], - 'options' => [ - 'white' => 'white', - 'grey' => 'grey', - 'black' => 'black', - ], 'value' => $config['textoncollage']['font_color'], ], 'textoncollage_font_size' => [ @@ -1204,14 +1194,9 @@ ], 'textonprint_font_color' => [ 'view' => 'expert', - 'type' => 'select', + 'type' => 'color', 'name' => 'textonprint[font_color]', 'placeholder' => $defaultConfig['textonprint']['font_color'], - 'options' => [ - 'white' => 'white', - 'grey' => 'grey', - 'black' => 'black', - ], 'value' => $config['textonprint']['font_color'], ], 'textonprint_font_size' => [ From 1d77dbe652a1864fd52d4921e43b33c41d12bd68 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Mon, 20 Sep 2021 10:15:04 +0200 Subject: [PATCH 077/214] workflows(build): test on MacOS 11 --- .github/workflows/build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7b034317..cf610aa6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,3 +31,14 @@ jobs: with: name: photobooth path: archives/photobooth-*.zip + buildmacos: + runs-on: macos-11 + steps: + - name: Checkout repository and submodules + uses: actions/checkout@v2 + with: + submodules: true + - name: Install modules + run: yarn install + - name: Build + run: yarn build From e816079c91f3cc0bbeb967d77534fbdddc115a26 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Mon, 20 Sep 2021 09:55:12 +0200 Subject: [PATCH 078/214] build: fix build failing on macOS --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 00139b311..bb3ce1886 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,9 @@ "eslint:fix": "eslint src/js/*.js --fix", "format": "npm-run-all --parallel format:*", "format:js": "prettier src/js/*.js --write", - "format:php": "prettier {api,lib,test}/{,*/**/}*.php --write", + "format:phpapi": "prettier api/{,*/**/}*.php --write", + "format:phplib": "prettier lib/*.php --write", + "format:phptest": "prettier test/*.php --write", "format:scss": "prettier src/sass/{,*/**/}*.scss --write", "pack:build": "npm-run-all --serial eslint build pack:zip", "pack:zip": "node scripts/pack-build.js", From a835c7b421e3584a4ce3be22e47ca02dd705a521 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Tue, 21 Sep 2021 10:49:59 +0200 Subject: [PATCH 079/214] vendor: phpqrcode as submodule - no need to add a standalone project inside Photobooth source Change-Id: I7099e3ee264fe66da0e6beb9447406f62e504d4a --- .gitmodules | 3 + api/print.php | 4 +- api/qrcode.php | 2 +- vendor/phpqrcode | 1 + vendor/phpqrcode/.listing | 24 - vendor/phpqrcode/CHANGELOG | 38 - vendor/phpqrcode/INSTALL | 67 - vendor/phpqrcode/LICENSE | 165 - vendor/phpqrcode/README | 45 - vendor/phpqrcode/VERSION | 2 - vendor/phpqrcode/bindings/.listing | 3 - vendor/phpqrcode/bindings/tcpdf/.listing | 3 - vendor/phpqrcode/bindings/tcpdf/qrcode.php | 2875 --------------- vendor/phpqrcode/cache/.listing | 90 - vendor/phpqrcode/cache/frame_1.dat | 2 - vendor/phpqrcode/cache/frame_1.png | Bin 126 -> 0 bytes vendor/phpqrcode/cache/frame_10.dat | Bin 204 -> 0 bytes vendor/phpqrcode/cache/frame_10.png | Bin 202 -> 0 bytes vendor/phpqrcode/cache/frame_11.dat | Bin 210 -> 0 bytes vendor/phpqrcode/cache/frame_11.png | Bin 205 -> 0 bytes vendor/phpqrcode/cache/frame_12.dat | Bin 222 -> 0 bytes vendor/phpqrcode/cache/frame_12.png | Bin 216 -> 0 bytes vendor/phpqrcode/cache/frame_13.dat | Bin 223 -> 0 bytes vendor/phpqrcode/cache/frame_13.png | Bin 210 -> 0 bytes vendor/phpqrcode/cache/frame_14.dat | Bin 227 -> 0 bytes vendor/phpqrcode/cache/frame_14.png | Bin 213 -> 0 bytes vendor/phpqrcode/cache/frame_15.dat | Bin 242 -> 0 bytes vendor/phpqrcode/cache/frame_15.png | Bin 219 -> 0 bytes vendor/phpqrcode/cache/frame_16.dat | 1 - vendor/phpqrcode/cache/frame_16.png | Bin 211 -> 0 bytes vendor/phpqrcode/cache/frame_17.dat | Bin 237 -> 0 bytes vendor/phpqrcode/cache/frame_17.png | Bin 211 -> 0 bytes vendor/phpqrcode/cache/frame_18.dat | 2 - vendor/phpqrcode/cache/frame_18.png | Bin 228 -> 0 bytes vendor/phpqrcode/cache/frame_19.dat | 3 - vendor/phpqrcode/cache/frame_19.png | Bin 225 -> 0 bytes vendor/phpqrcode/cache/frame_2.dat | 1 - vendor/phpqrcode/cache/frame_2.png | Bin 144 -> 0 bytes vendor/phpqrcode/cache/frame_20.dat | Bin 250 -> 0 bytes vendor/phpqrcode/cache/frame_20.png | Bin 225 -> 0 bytes vendor/phpqrcode/cache/frame_21.dat | 1 - vendor/phpqrcode/cache/frame_21.png | Bin 235 -> 0 bytes vendor/phpqrcode/cache/frame_22.dat | 3 - vendor/phpqrcode/cache/frame_22.png | Bin 226 -> 0 bytes vendor/phpqrcode/cache/frame_23.dat | 3 - vendor/phpqrcode/cache/frame_23.png | Bin 220 -> 0 bytes vendor/phpqrcode/cache/frame_24.dat | 1 - vendor/phpqrcode/cache/frame_24.png | Bin 242 -> 0 bytes vendor/phpqrcode/cache/frame_25.dat | 3 - vendor/phpqrcode/cache/frame_25.png | Bin 242 -> 0 bytes vendor/phpqrcode/cache/frame_26.dat | 2 - vendor/phpqrcode/cache/frame_26.png | Bin 244 -> 0 bytes vendor/phpqrcode/cache/frame_27.dat | Bin 284 -> 0 bytes vendor/phpqrcode/cache/frame_27.png | Bin 237 -> 0 bytes vendor/phpqrcode/cache/frame_28.dat | Bin 318 -> 0 bytes vendor/phpqrcode/cache/frame_28.png | Bin 234 -> 0 bytes vendor/phpqrcode/cache/frame_29.dat | 2 - vendor/phpqrcode/cache/frame_29.png | Bin 232 -> 0 bytes vendor/phpqrcode/cache/frame_3.dat | 1 - vendor/phpqrcode/cache/frame_3.png | Bin 147 -> 0 bytes vendor/phpqrcode/cache/frame_30.dat | Bin 324 -> 0 bytes vendor/phpqrcode/cache/frame_30.png | Bin 255 -> 0 bytes vendor/phpqrcode/cache/frame_31.dat | 1 - vendor/phpqrcode/cache/frame_31.png | Bin 260 -> 0 bytes vendor/phpqrcode/cache/frame_32.dat | 2 - vendor/phpqrcode/cache/frame_32.png | Bin 262 -> 0 bytes vendor/phpqrcode/cache/frame_33.dat | 14 - vendor/phpqrcode/cache/frame_33.png | Bin 253 -> 0 bytes vendor/phpqrcode/cache/frame_34.dat | Bin 331 -> 0 bytes vendor/phpqrcode/cache/frame_34.png | Bin 256 -> 0 bytes vendor/phpqrcode/cache/frame_35.dat | Bin 342 -> 0 bytes vendor/phpqrcode/cache/frame_35.png | Bin 243 -> 0 bytes vendor/phpqrcode/cache/frame_36.dat | Bin 370 -> 0 bytes vendor/phpqrcode/cache/frame_36.png | Bin 272 -> 0 bytes vendor/phpqrcode/cache/frame_37.dat | Bin 376 -> 0 bytes vendor/phpqrcode/cache/frame_37.png | Bin 279 -> 0 bytes vendor/phpqrcode/cache/frame_38.dat | 1 - vendor/phpqrcode/cache/frame_38.png | Bin 279 -> 0 bytes vendor/phpqrcode/cache/frame_39.dat | Bin 404 -> 0 bytes vendor/phpqrcode/cache/frame_39.png | Bin 264 -> 0 bytes vendor/phpqrcode/cache/frame_4.dat | 1 - vendor/phpqrcode/cache/frame_4.png | Bin 149 -> 0 bytes vendor/phpqrcode/cache/frame_40.dat | 2 - vendor/phpqrcode/cache/frame_40.png | Bin 267 -> 0 bytes vendor/phpqrcode/cache/frame_5.dat | 1 - vendor/phpqrcode/cache/frame_5.png | Bin 150 -> 0 bytes vendor/phpqrcode/cache/frame_6.dat | Bin 132 -> 0 bytes vendor/phpqrcode/cache/frame_6.png | Bin 151 -> 0 bytes vendor/phpqrcode/cache/frame_7.dat | Bin 196 -> 0 bytes vendor/phpqrcode/cache/frame_7.png | Bin 189 -> 0 bytes vendor/phpqrcode/cache/frame_8.dat | Bin 201 -> 0 bytes vendor/phpqrcode/cache/frame_8.png | Bin 204 -> 0 bytes vendor/phpqrcode/cache/frame_9.dat | Bin 206 -> 0 bytes vendor/phpqrcode/cache/frame_9.png | Bin 199 -> 0 bytes vendor/phpqrcode/cache/mask_0/.listing | 42 - vendor/phpqrcode/cache/mask_0/mask_101_0.dat | Bin 157 -> 0 bytes vendor/phpqrcode/cache/mask_0/mask_105_0.dat | Bin 162 -> 0 bytes vendor/phpqrcode/cache/mask_0/mask_109_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_113_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_117_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_121_0.dat | 1 - vendor/phpqrcode/cache/mask_0/mask_125_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_129_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_133_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_137_0.dat | 1 - vendor/phpqrcode/cache/mask_0/mask_141_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_145_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_149_0.dat | 3 - vendor/phpqrcode/cache/mask_0/mask_153_0.dat | 1 - vendor/phpqrcode/cache/mask_0/mask_157_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_161_0.dat | Bin 241 -> 0 bytes vendor/phpqrcode/cache/mask_0/mask_165_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_169_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_173_0.dat | 1 - vendor/phpqrcode/cache/mask_0/mask_177_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_21_0.dat | Bin 48 -> 0 bytes vendor/phpqrcode/cache/mask_0/mask_25_0.dat | Bin 57 -> 0 bytes vendor/phpqrcode/cache/mask_0/mask_29_0.dat | Bin 59 -> 0 bytes vendor/phpqrcode/cache/mask_0/mask_33_0.dat | Bin 62 -> 0 bytes vendor/phpqrcode/cache/mask_0/mask_37_0.dat | Bin 65 -> 0 bytes vendor/phpqrcode/cache/mask_0/mask_41_0.dat | Bin 68 -> 0 bytes vendor/phpqrcode/cache/mask_0/mask_45_0.dat | Bin 106 -> 0 bytes vendor/phpqrcode/cache/mask_0/mask_49_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_53_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_57_0.dat | 4 - vendor/phpqrcode/cache/mask_0/mask_61_0.dat | Bin 119 -> 0 bytes vendor/phpqrcode/cache/mask_0/mask_65_0.dat | Bin 123 -> 0 bytes vendor/phpqrcode/cache/mask_0/mask_69_0.dat | 1 - vendor/phpqrcode/cache/mask_0/mask_73_0.dat | 1 - vendor/phpqrcode/cache/mask_0/mask_77_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_81_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_85_0.dat | 2 - vendor/phpqrcode/cache/mask_0/mask_89_0.dat | 1 - vendor/phpqrcode/cache/mask_0/mask_93_0.dat | 3 - vendor/phpqrcode/cache/mask_0/mask_97_0.dat | Bin 150 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_101_1.dat | 2 - vendor/phpqrcode/cache/mask_1/mask_105_1.dat | 1 - vendor/phpqrcode/cache/mask_1/mask_109_1.dat | 1 - vendor/phpqrcode/cache/mask_1/mask_113_1.dat | 1 - vendor/phpqrcode/cache/mask_1/mask_117_1.dat | 2 - vendor/phpqrcode/cache/mask_1/mask_121_1.dat | 2 - vendor/phpqrcode/cache/mask_1/mask_125_1.dat | 2 - vendor/phpqrcode/cache/mask_1/mask_129_1.dat | Bin 164 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_133_1.dat | 1 - vendor/phpqrcode/cache/mask_1/mask_137_1.dat | 3 - vendor/phpqrcode/cache/mask_1/mask_141_1.dat | 2 - vendor/phpqrcode/cache/mask_1/mask_145_1.dat | 1 - vendor/phpqrcode/cache/mask_1/mask_149_1.dat | 1 - vendor/phpqrcode/cache/mask_1/mask_153_1.dat | 2 - vendor/phpqrcode/cache/mask_1/mask_157_1.dat | 2 - vendor/phpqrcode/cache/mask_1/mask_161_1.dat | 1 - vendor/phpqrcode/cache/mask_1/mask_165_1.dat | 1 - vendor/phpqrcode/cache/mask_1/mask_169_1.dat | 1 - vendor/phpqrcode/cache/mask_1/mask_173_1.dat | 1 - vendor/phpqrcode/cache/mask_1/mask_177_1.dat | 1 - vendor/phpqrcode/cache/mask_1/mask_21_1.dat | Bin 42 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_25_1.dat | Bin 48 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_29_1.dat | Bin 50 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_33_1.dat | Bin 53 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_37_1.dat | Bin 56 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_41_1.dat | Bin 58 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_45_1.dat | Bin 82 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_49_1.dat | Bin 84 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_53_1.dat | Bin 87 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_57_1.dat | Bin 92 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_61_1.dat | 1 - vendor/phpqrcode/cache/mask_1/mask_65_1.dat | Bin 99 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_69_1.dat | Bin 102 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_73_1.dat | Bin 104 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_77_1.dat | Bin 110 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_81_1.dat | Bin 114 -> 0 bytes vendor/phpqrcode/cache/mask_1/mask_85_1.dat | 2 - vendor/phpqrcode/cache/mask_1/mask_89_1.dat | 1 - vendor/phpqrcode/cache/mask_1/mask_93_1.dat | 2 - vendor/phpqrcode/cache/mask_1/mask_97_1.dat | 2 - vendor/phpqrcode/cache/mask_2/mask_101_2.dat | 3 - vendor/phpqrcode/cache/mask_2/mask_105_2.dat | 1 - vendor/phpqrcode/cache/mask_2/mask_109_2.dat | 2 - vendor/phpqrcode/cache/mask_2/mask_113_2.dat | 1 - vendor/phpqrcode/cache/mask_2/mask_117_2.dat | 2 - vendor/phpqrcode/cache/mask_2/mask_121_2.dat | Bin 127 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_125_2.dat | 1 - vendor/phpqrcode/cache/mask_2/mask_129_2.dat | 2 - vendor/phpqrcode/cache/mask_2/mask_133_2.dat | 10 - vendor/phpqrcode/cache/mask_2/mask_137_2.dat | 2 - vendor/phpqrcode/cache/mask_2/mask_141_2.dat | 2 - vendor/phpqrcode/cache/mask_2/mask_145_2.dat | 4 - vendor/phpqrcode/cache/mask_2/mask_149_2.dat | 1 - vendor/phpqrcode/cache/mask_2/mask_153_2.dat | 2 - vendor/phpqrcode/cache/mask_2/mask_157_2.dat | 3 - vendor/phpqrcode/cache/mask_2/mask_161_2.dat | Bin 190 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_165_2.dat | 2 - vendor/phpqrcode/cache/mask_2/mask_169_2.dat | Bin 196 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_173_2.dat | 1 - vendor/phpqrcode/cache/mask_2/mask_177_2.dat | 2 - vendor/phpqrcode/cache/mask_2/mask_21_2.dat | Bin 35 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_25_2.dat | Bin 41 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_29_2.dat | Bin 45 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_33_2.dat | Bin 47 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_37_2.dat | Bin 47 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_41_2.dat | 1 - vendor/phpqrcode/cache/mask_2/mask_45_2.dat | Bin 68 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_49_2.dat | Bin 70 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_53_2.dat | Bin 73 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_57_2.dat | Bin 76 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_61_2.dat | Bin 78 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_65_2.dat | Bin 89 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_69_2.dat | Bin 88 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_73_2.dat | Bin 94 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_77_2.dat | 1 - vendor/phpqrcode/cache/mask_2/mask_81_2.dat | 2 - vendor/phpqrcode/cache/mask_2/mask_85_2.dat | 2 - vendor/phpqrcode/cache/mask_2/mask_89_2.dat | 1 - vendor/phpqrcode/cache/mask_2/mask_93_2.dat | Bin 103 -> 0 bytes vendor/phpqrcode/cache/mask_2/mask_97_2.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_101_3.dat | 1 - vendor/phpqrcode/cache/mask_3/mask_105_3.dat | 1 - vendor/phpqrcode/cache/mask_3/mask_109_3.dat | 1 - vendor/phpqrcode/cache/mask_3/mask_113_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_117_3.dat | 4 - vendor/phpqrcode/cache/mask_3/mask_121_3.dat | Bin 212 -> 0 bytes vendor/phpqrcode/cache/mask_3/mask_125_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_129_3.dat | 8 - vendor/phpqrcode/cache/mask_3/mask_133_3.dat | Bin 216 -> 0 bytes vendor/phpqrcode/cache/mask_3/mask_137_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_141_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_145_3.dat | 3 - vendor/phpqrcode/cache/mask_3/mask_149_3.dat | 1 - vendor/phpqrcode/cache/mask_3/mask_153_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_157_3.dat | Bin 248 -> 0 bytes vendor/phpqrcode/cache/mask_3/mask_161_3.dat | 3 - vendor/phpqrcode/cache/mask_3/mask_165_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_169_3.dat | 1 - vendor/phpqrcode/cache/mask_3/mask_173_3.dat | 1 - vendor/phpqrcode/cache/mask_3/mask_177_3.dat | Bin 312 -> 0 bytes vendor/phpqrcode/cache/mask_3/mask_21_3.dat | Bin 60 -> 0 bytes vendor/phpqrcode/cache/mask_3/mask_25_3.dat | Bin 75 -> 0 bytes vendor/phpqrcode/cache/mask_3/mask_29_3.dat | Bin 75 -> 0 bytes vendor/phpqrcode/cache/mask_3/mask_33_3.dat | Bin 79 -> 0 bytes vendor/phpqrcode/cache/mask_3/mask_37_3.dat | Bin 83 -> 0 bytes vendor/phpqrcode/cache/mask_3/mask_41_3.dat | Bin 85 -> 0 bytes vendor/phpqrcode/cache/mask_3/mask_45_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_49_3.dat | Bin 127 -> 0 bytes vendor/phpqrcode/cache/mask_3/mask_53_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_57_3.dat | Bin 126 -> 0 bytes vendor/phpqrcode/cache/mask_3/mask_61_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_65_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_69_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_73_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_77_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_81_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_85_3.dat | Bin 160 -> 0 bytes vendor/phpqrcode/cache/mask_3/mask_89_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_93_3.dat | 2 - vendor/phpqrcode/cache/mask_3/mask_97_3.dat | Bin 175 -> 0 bytes vendor/phpqrcode/cache/mask_4/.listing | 42 - vendor/phpqrcode/cache/mask_4/mask_101_4.dat | 2 - vendor/phpqrcode/cache/mask_4/mask_105_4.dat | 2 - vendor/phpqrcode/cache/mask_4/mask_109_4.dat | Bin 182 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_113_4.dat | 2 - vendor/phpqrcode/cache/mask_4/mask_117_4.dat | 2 - vendor/phpqrcode/cache/mask_4/mask_121_4.dat | Bin 208 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_125_4.dat | Bin 213 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_129_4.dat | Bin 220 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_133_4.dat | 3 - vendor/phpqrcode/cache/mask_4/mask_137_4.dat | Bin 248 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_141_4.dat | Bin 254 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_145_4.dat | Bin 255 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_149_4.dat | 2 - vendor/phpqrcode/cache/mask_4/mask_153_4.dat | 2 - vendor/phpqrcode/cache/mask_4/mask_157_4.dat | 1 - vendor/phpqrcode/cache/mask_4/mask_161_4.dat | 1 - vendor/phpqrcode/cache/mask_4/mask_165_4.dat | 3 - vendor/phpqrcode/cache/mask_4/mask_169_4.dat | Bin 297 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_173_4.dat | 2 - vendor/phpqrcode/cache/mask_4/mask_177_4.dat | 2 - vendor/phpqrcode/cache/mask_4/mask_21_4.dat | Bin 57 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_25_4.dat | Bin 76 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_29_4.dat | Bin 78 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_33_4.dat | Bin 89 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_37_4.dat | Bin 86 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_41_4.dat | Bin 89 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_45_4.dat | Bin 120 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_49_4.dat | Bin 124 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_53_4.dat | Bin 128 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_57_4.dat | Bin 130 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_61_4.dat | Bin 132 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_65_4.dat | 2 - vendor/phpqrcode/cache/mask_4/mask_69_4.dat | 1 - vendor/phpqrcode/cache/mask_4/mask_73_4.dat | 3 - vendor/phpqrcode/cache/mask_4/mask_77_4.dat | 2 - vendor/phpqrcode/cache/mask_4/mask_81_4.dat | 3 - vendor/phpqrcode/cache/mask_4/mask_85_4.dat | Bin 154 -> 0 bytes vendor/phpqrcode/cache/mask_4/mask_89_4.dat | 2 - vendor/phpqrcode/cache/mask_4/mask_93_4.dat | 2 - vendor/phpqrcode/cache/mask_4/mask_97_4.dat | Bin 176 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_101_5.dat | 2 - vendor/phpqrcode/cache/mask_5/mask_105_5.dat | Bin 224 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_109_5.dat | Bin 211 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_113_5.dat | 9 - vendor/phpqrcode/cache/mask_5/mask_117_5.dat | 1 - vendor/phpqrcode/cache/mask_5/mask_121_5.dat | Bin 256 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_125_5.dat | 2 - vendor/phpqrcode/cache/mask_5/mask_129_5.dat | Bin 259 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_133_5.dat | 2 - vendor/phpqrcode/cache/mask_5/mask_137_5.dat | 3 - vendor/phpqrcode/cache/mask_5/mask_141_5.dat | Bin 297 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_145_5.dat | Bin 300 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_149_5.dat | 3 - vendor/phpqrcode/cache/mask_5/mask_153_5.dat | 2 - vendor/phpqrcode/cache/mask_5/mask_157_5.dat | 1 - vendor/phpqrcode/cache/mask_5/mask_161_5.dat | 2 - vendor/phpqrcode/cache/mask_5/mask_165_5.dat | Bin 332 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_169_5.dat | 1 - vendor/phpqrcode/cache/mask_5/mask_173_5.dat | 4 - vendor/phpqrcode/cache/mask_5/mask_177_5.dat | 11 - vendor/phpqrcode/cache/mask_5/mask_21_5.dat | Bin 74 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_25_5.dat | 2 - vendor/phpqrcode/cache/mask_5/mask_29_5.dat | 2 - vendor/phpqrcode/cache/mask_5/mask_33_5.dat | Bin 106 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_37_5.dat | Bin 103 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_41_5.dat | 2 - vendor/phpqrcode/cache/mask_5/mask_45_5.dat | 1 - vendor/phpqrcode/cache/mask_5/mask_49_5.dat | Bin 146 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_53_5.dat | 1 - vendor/phpqrcode/cache/mask_5/mask_57_5.dat | 2 - vendor/phpqrcode/cache/mask_5/mask_61_5.dat | 1 - vendor/phpqrcode/cache/mask_5/mask_65_5.dat | Bin 163 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_69_5.dat | Bin 167 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_73_5.dat | Bin 184 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_77_5.dat | 1 - vendor/phpqrcode/cache/mask_5/mask_81_5.dat | 3 - vendor/phpqrcode/cache/mask_5/mask_85_5.dat | Bin 186 -> 0 bytes vendor/phpqrcode/cache/mask_5/mask_89_5.dat | 2 - vendor/phpqrcode/cache/mask_5/mask_93_5.dat | 2 - vendor/phpqrcode/cache/mask_5/mask_97_5.dat | 1 - vendor/phpqrcode/cache/mask_6/mask_101_6.dat | 2 - vendor/phpqrcode/cache/mask_6/mask_105_6.dat | 3 - vendor/phpqrcode/cache/mask_6/mask_109_6.dat | 1 - vendor/phpqrcode/cache/mask_6/mask_113_6.dat | 3 - vendor/phpqrcode/cache/mask_6/mask_117_6.dat | 1 - vendor/phpqrcode/cache/mask_6/mask_121_6.dat | Bin 309 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_125_6.dat | 1 - vendor/phpqrcode/cache/mask_6/mask_129_6.dat | Bin 310 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_133_6.dat | Bin 296 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_137_6.dat | 2 - vendor/phpqrcode/cache/mask_6/mask_141_6.dat | 10 - vendor/phpqrcode/cache/mask_6/mask_145_6.dat | Bin 357 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_149_6.dat | 2 - vendor/phpqrcode/cache/mask_6/mask_153_6.dat | Bin 367 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_157_6.dat | 1 - vendor/phpqrcode/cache/mask_6/mask_161_6.dat | Bin 399 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_165_6.dat | Bin 400 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_169_6.dat | 1 - vendor/phpqrcode/cache/mask_6/mask_173_6.dat | 1 - vendor/phpqrcode/cache/mask_6/mask_177_6.dat | 14 - vendor/phpqrcode/cache/mask_6/mask_21_6.dat | 1 - vendor/phpqrcode/cache/mask_6/mask_25_6.dat | 1 - vendor/phpqrcode/cache/mask_6/mask_29_6.dat | 3 - vendor/phpqrcode/cache/mask_6/mask_33_6.dat | Bin 124 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_37_6.dat | 1 - vendor/phpqrcode/cache/mask_6/mask_41_6.dat | Bin 132 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_45_6.dat | Bin 189 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_49_6.dat | 2 - vendor/phpqrcode/cache/mask_6/mask_53_6.dat | Bin 195 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_57_6.dat | 2 - vendor/phpqrcode/cache/mask_6/mask_61_6.dat | 2 - vendor/phpqrcode/cache/mask_6/mask_65_6.dat | 1 - vendor/phpqrcode/cache/mask_6/mask_69_6.dat | 1 - vendor/phpqrcode/cache/mask_6/mask_73_6.dat | Bin 230 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_77_6.dat | 1 - vendor/phpqrcode/cache/mask_6/mask_81_6.dat | 3 - vendor/phpqrcode/cache/mask_6/mask_85_6.dat | Bin 229 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_89_6.dat | Bin 263 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_93_6.dat | Bin 276 -> 0 bytes vendor/phpqrcode/cache/mask_6/mask_97_6.dat | 2 - vendor/phpqrcode/cache/mask_7/mask_101_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_105_7.dat | 2 - vendor/phpqrcode/cache/mask_7/mask_109_7.dat | 2 - vendor/phpqrcode/cache/mask_7/mask_113_7.dat | 11 - vendor/phpqrcode/cache/mask_7/mask_117_7.dat | 2 - vendor/phpqrcode/cache/mask_7/mask_121_7.dat | 2 - vendor/phpqrcode/cache/mask_7/mask_125_7.dat | Bin 288 -> 0 bytes vendor/phpqrcode/cache/mask_7/mask_129_7.dat | Bin 282 -> 0 bytes vendor/phpqrcode/cache/mask_7/mask_133_7.dat | Bin 281 -> 0 bytes vendor/phpqrcode/cache/mask_7/mask_137_7.dat | 5 - vendor/phpqrcode/cache/mask_7/mask_141_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_145_7.dat | 2 - vendor/phpqrcode/cache/mask_7/mask_149_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_153_7.dat | 2 - vendor/phpqrcode/cache/mask_7/mask_157_7.dat | 2 - vendor/phpqrcode/cache/mask_7/mask_161_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_165_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_169_7.dat | Bin 383 -> 0 bytes vendor/phpqrcode/cache/mask_7/mask_173_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_177_7.dat | Bin 407 -> 0 bytes vendor/phpqrcode/cache/mask_7/mask_21_7.dat | 4 - vendor/phpqrcode/cache/mask_7/mask_25_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_29_7.dat | 2 - vendor/phpqrcode/cache/mask_7/mask_33_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_37_7.dat | Bin 122 -> 0 bytes vendor/phpqrcode/cache/mask_7/mask_41_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_45_7.dat | Bin 173 -> 0 bytes vendor/phpqrcode/cache/mask_7/mask_49_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_53_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_57_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_61_7.dat | 2 - vendor/phpqrcode/cache/mask_7/mask_65_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_69_7.dat | Bin 202 -> 0 bytes vendor/phpqrcode/cache/mask_7/mask_73_7.dat | Bin 221 -> 0 bytes vendor/phpqrcode/cache/mask_7/mask_77_7.dat | Bin 226 -> 0 bytes vendor/phpqrcode/cache/mask_7/mask_81_7.dat | 1 - vendor/phpqrcode/cache/mask_7/mask_85_7.dat | Bin 213 -> 0 bytes vendor/phpqrcode/cache/mask_7/mask_89_7.dat | Bin 244 -> 0 bytes vendor/phpqrcode/cache/mask_7/mask_93_7.dat | Bin 248 -> 0 bytes vendor/phpqrcode/cache/mask_7/mask_97_7.dat | 2 - vendor/phpqrcode/index.php | 94 - vendor/phpqrcode/phpqrcode.php | 3312 ------------------ vendor/phpqrcode/qrbitstream.php | 180 - vendor/phpqrcode/qrconfig.php | 17 - vendor/phpqrcode/qrconst.php | 54 - vendor/phpqrcode/qrencode.php | 502 --- vendor/phpqrcode/qrimage.php | 95 - vendor/phpqrcode/qrinput.php | 729 ---- vendor/phpqrcode/qrlib.php | 43 - vendor/phpqrcode/qrmask.php | 328 -- vendor/phpqrcode/qrrscode.php | 210 -- vendor/phpqrcode/qrspec.php | 592 ---- vendor/phpqrcode/qrsplit.php | 311 -- vendor/phpqrcode/qrtools.php | 172 - vendor/phpqrcode/tools/merge.bat | 2 - vendor/phpqrcode/tools/merge.php | 70 - vendor/phpqrcode/tools/merge.sh | 2 - vendor/phpqrcode/tools/merged_config.php | 17 - vendor/phpqrcode/tools/merged_header.php | 36 - 435 files changed, 7 insertions(+), 10623 deletions(-) create mode 160000 vendor/phpqrcode delete mode 100644 vendor/phpqrcode/.listing delete mode 100644 vendor/phpqrcode/CHANGELOG delete mode 100644 vendor/phpqrcode/INSTALL delete mode 100644 vendor/phpqrcode/LICENSE delete mode 100644 vendor/phpqrcode/README delete mode 100644 vendor/phpqrcode/VERSION delete mode 100644 vendor/phpqrcode/bindings/.listing delete mode 100644 vendor/phpqrcode/bindings/tcpdf/.listing delete mode 100644 vendor/phpqrcode/bindings/tcpdf/qrcode.php delete mode 100644 vendor/phpqrcode/cache/.listing delete mode 100644 vendor/phpqrcode/cache/frame_1.dat delete mode 100644 vendor/phpqrcode/cache/frame_1.png delete mode 100644 vendor/phpqrcode/cache/frame_10.dat delete mode 100644 vendor/phpqrcode/cache/frame_10.png delete mode 100644 vendor/phpqrcode/cache/frame_11.dat delete mode 100644 vendor/phpqrcode/cache/frame_11.png delete mode 100644 vendor/phpqrcode/cache/frame_12.dat delete mode 100644 vendor/phpqrcode/cache/frame_12.png delete mode 100644 vendor/phpqrcode/cache/frame_13.dat delete mode 100644 vendor/phpqrcode/cache/frame_13.png delete mode 100644 vendor/phpqrcode/cache/frame_14.dat delete mode 100644 vendor/phpqrcode/cache/frame_14.png delete mode 100644 vendor/phpqrcode/cache/frame_15.dat delete mode 100644 vendor/phpqrcode/cache/frame_15.png delete mode 100644 vendor/phpqrcode/cache/frame_16.dat delete mode 100644 vendor/phpqrcode/cache/frame_16.png delete mode 100644 vendor/phpqrcode/cache/frame_17.dat delete mode 100644 vendor/phpqrcode/cache/frame_17.png delete mode 100644 vendor/phpqrcode/cache/frame_18.dat delete mode 100644 vendor/phpqrcode/cache/frame_18.png delete mode 100644 vendor/phpqrcode/cache/frame_19.dat delete mode 100644 vendor/phpqrcode/cache/frame_19.png delete mode 100644 vendor/phpqrcode/cache/frame_2.dat delete mode 100644 vendor/phpqrcode/cache/frame_2.png delete mode 100644 vendor/phpqrcode/cache/frame_20.dat delete mode 100644 vendor/phpqrcode/cache/frame_20.png delete mode 100644 vendor/phpqrcode/cache/frame_21.dat delete mode 100644 vendor/phpqrcode/cache/frame_21.png delete mode 100644 vendor/phpqrcode/cache/frame_22.dat delete mode 100644 vendor/phpqrcode/cache/frame_22.png delete mode 100644 vendor/phpqrcode/cache/frame_23.dat delete mode 100644 vendor/phpqrcode/cache/frame_23.png delete mode 100644 vendor/phpqrcode/cache/frame_24.dat delete mode 100644 vendor/phpqrcode/cache/frame_24.png delete mode 100644 vendor/phpqrcode/cache/frame_25.dat delete mode 100644 vendor/phpqrcode/cache/frame_25.png delete mode 100644 vendor/phpqrcode/cache/frame_26.dat delete mode 100644 vendor/phpqrcode/cache/frame_26.png delete mode 100644 vendor/phpqrcode/cache/frame_27.dat delete mode 100644 vendor/phpqrcode/cache/frame_27.png delete mode 100644 vendor/phpqrcode/cache/frame_28.dat delete mode 100644 vendor/phpqrcode/cache/frame_28.png delete mode 100644 vendor/phpqrcode/cache/frame_29.dat delete mode 100644 vendor/phpqrcode/cache/frame_29.png delete mode 100644 vendor/phpqrcode/cache/frame_3.dat delete mode 100644 vendor/phpqrcode/cache/frame_3.png delete mode 100644 vendor/phpqrcode/cache/frame_30.dat delete mode 100644 vendor/phpqrcode/cache/frame_30.png delete mode 100644 vendor/phpqrcode/cache/frame_31.dat delete mode 100644 vendor/phpqrcode/cache/frame_31.png delete mode 100644 vendor/phpqrcode/cache/frame_32.dat delete mode 100644 vendor/phpqrcode/cache/frame_32.png delete mode 100644 vendor/phpqrcode/cache/frame_33.dat delete mode 100644 vendor/phpqrcode/cache/frame_33.png delete mode 100644 vendor/phpqrcode/cache/frame_34.dat delete mode 100644 vendor/phpqrcode/cache/frame_34.png delete mode 100644 vendor/phpqrcode/cache/frame_35.dat delete mode 100644 vendor/phpqrcode/cache/frame_35.png delete mode 100644 vendor/phpqrcode/cache/frame_36.dat delete mode 100644 vendor/phpqrcode/cache/frame_36.png delete mode 100644 vendor/phpqrcode/cache/frame_37.dat delete mode 100644 vendor/phpqrcode/cache/frame_37.png delete mode 100644 vendor/phpqrcode/cache/frame_38.dat delete mode 100644 vendor/phpqrcode/cache/frame_38.png delete mode 100644 vendor/phpqrcode/cache/frame_39.dat delete mode 100644 vendor/phpqrcode/cache/frame_39.png delete mode 100644 vendor/phpqrcode/cache/frame_4.dat delete mode 100644 vendor/phpqrcode/cache/frame_4.png delete mode 100644 vendor/phpqrcode/cache/frame_40.dat delete mode 100644 vendor/phpqrcode/cache/frame_40.png delete mode 100644 vendor/phpqrcode/cache/frame_5.dat delete mode 100644 vendor/phpqrcode/cache/frame_5.png delete mode 100644 vendor/phpqrcode/cache/frame_6.dat delete mode 100644 vendor/phpqrcode/cache/frame_6.png delete mode 100644 vendor/phpqrcode/cache/frame_7.dat delete mode 100644 vendor/phpqrcode/cache/frame_7.png delete mode 100644 vendor/phpqrcode/cache/frame_8.dat delete mode 100644 vendor/phpqrcode/cache/frame_8.png delete mode 100644 vendor/phpqrcode/cache/frame_9.dat delete mode 100644 vendor/phpqrcode/cache/frame_9.png delete mode 100644 vendor/phpqrcode/cache/mask_0/.listing delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_101_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_105_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_109_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_113_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_117_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_121_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_125_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_129_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_133_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_137_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_141_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_145_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_149_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_153_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_157_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_161_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_165_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_169_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_173_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_177_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_21_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_25_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_29_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_33_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_37_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_41_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_45_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_49_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_53_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_57_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_61_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_65_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_69_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_73_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_77_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_81_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_85_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_89_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_93_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_0/mask_97_0.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_101_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_105_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_109_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_113_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_117_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_121_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_125_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_129_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_133_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_137_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_141_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_145_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_149_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_153_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_157_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_161_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_165_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_169_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_173_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_177_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_21_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_25_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_29_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_33_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_37_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_41_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_45_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_49_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_53_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_57_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_61_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_65_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_69_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_73_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_77_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_81_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_85_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_89_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_93_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_1/mask_97_1.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_101_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_105_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_109_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_113_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_117_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_121_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_125_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_129_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_133_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_137_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_141_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_145_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_149_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_153_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_157_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_161_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_165_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_169_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_173_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_177_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_21_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_25_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_29_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_33_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_37_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_41_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_45_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_49_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_53_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_57_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_61_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_65_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_69_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_73_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_77_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_81_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_85_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_89_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_93_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_2/mask_97_2.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_101_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_105_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_109_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_113_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_117_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_121_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_125_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_129_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_133_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_137_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_141_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_145_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_149_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_153_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_157_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_161_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_165_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_169_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_173_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_177_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_21_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_25_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_29_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_33_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_37_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_41_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_45_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_49_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_53_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_57_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_61_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_65_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_69_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_73_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_77_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_81_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_85_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_89_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_93_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_3/mask_97_3.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/.listing delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_101_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_105_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_109_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_113_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_117_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_121_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_125_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_129_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_133_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_137_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_141_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_145_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_149_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_153_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_157_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_161_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_165_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_169_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_173_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_177_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_21_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_25_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_29_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_33_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_37_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_41_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_45_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_49_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_53_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_57_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_61_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_65_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_69_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_73_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_77_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_81_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_85_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_89_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_93_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_4/mask_97_4.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_101_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_105_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_109_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_113_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_117_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_121_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_125_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_129_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_133_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_137_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_141_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_145_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_149_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_153_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_157_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_161_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_165_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_169_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_173_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_177_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_21_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_25_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_29_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_33_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_37_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_41_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_45_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_49_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_53_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_57_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_61_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_65_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_69_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_73_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_77_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_81_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_85_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_89_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_93_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_5/mask_97_5.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_101_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_105_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_109_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_113_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_117_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_121_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_125_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_129_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_133_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_137_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_141_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_145_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_149_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_153_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_157_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_161_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_165_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_169_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_173_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_177_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_21_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_25_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_29_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_33_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_37_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_41_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_45_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_49_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_53_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_57_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_61_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_65_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_69_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_73_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_77_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_81_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_85_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_89_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_93_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_6/mask_97_6.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_101_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_105_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_109_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_113_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_117_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_121_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_125_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_129_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_133_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_137_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_141_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_145_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_149_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_153_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_157_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_161_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_165_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_169_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_173_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_177_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_21_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_25_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_29_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_33_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_37_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_41_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_45_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_49_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_53_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_57_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_61_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_65_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_69_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_73_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_77_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_81_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_85_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_89_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_93_7.dat delete mode 100644 vendor/phpqrcode/cache/mask_7/mask_97_7.dat delete mode 100644 vendor/phpqrcode/index.php delete mode 100644 vendor/phpqrcode/phpqrcode.php delete mode 100644 vendor/phpqrcode/qrbitstream.php delete mode 100644 vendor/phpqrcode/qrconfig.php delete mode 100644 vendor/phpqrcode/qrconst.php delete mode 100644 vendor/phpqrcode/qrencode.php delete mode 100644 vendor/phpqrcode/qrimage.php delete mode 100644 vendor/phpqrcode/qrinput.php delete mode 100644 vendor/phpqrcode/qrlib.php delete mode 100644 vendor/phpqrcode/qrmask.php delete mode 100644 vendor/phpqrcode/qrrscode.php delete mode 100644 vendor/phpqrcode/qrspec.php delete mode 100644 vendor/phpqrcode/qrsplit.php delete mode 100644 vendor/phpqrcode/qrtools.php delete mode 100644 vendor/phpqrcode/tools/merge.bat delete mode 100644 vendor/phpqrcode/tools/merge.php delete mode 100644 vendor/phpqrcode/tools/merge.sh delete mode 100644 vendor/phpqrcode/tools/merged_config.php delete mode 100644 vendor/phpqrcode/tools/merged_header.php diff --git a/.gitmodules b/.gitmodules index 0af580df9..1004addb0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "vendor/Seriously"] path = vendor/Seriously url = https://github.com/brianchirls/Seriously.js +[submodule "vendor/phpqrcode"] + path = vendor/phpqrcode + url = https://github.com/andi34/phpqrcode diff --git a/api/print.php b/api/print.php index 023e16c0f..a651863f6 100644 --- a/api/print.php +++ b/api/print.php @@ -116,10 +116,10 @@ list($width, $height) = getimagesize($filename_print); } - if ($config['print']['qrcode']) { + if ($config['print']['qrcode'] && file_exists('../vendor/phpqrcode/lib/full/qrlib.php')) { // create qr code if (!file_exists($filename_codes)) { - include '../vendor/phpqrcode/qrlib.php'; + include '../vendor/phpqrcode/lib/full/qrlib.php'; $url = 'http://' . $SERVER_IP . '/api/download.php?image='; QRcode::png($url . $filename, $filename_codes, QR_ECLEVEL_H, 10); } diff --git a/api/qrcode.php b/api/qrcode.php index d27a457ec..4462fb503 100644 --- a/api/qrcode.php +++ b/api/qrcode.php @@ -9,6 +9,6 @@ $filename = $_GET['filename']; $api_path = getrootpath('../api'); -include '../vendor/phpqrcode/qrlib.php'; +include '../vendor/phpqrcode/lib/full/qrlib.php'; $url = 'http://' . $SERVER_IP . $api_path . '/download.php?image='; QRcode::png($url . $filename, false, QR_ECLEVEL_H, 10); diff --git a/vendor/phpqrcode b/vendor/phpqrcode new file mode 160000 index 000000000..863ffffac --- /dev/null +++ b/vendor/phpqrcode @@ -0,0 +1 @@ +Subproject commit 863ffffac4c9d22e522464e325cbcbadfbb26470 diff --git a/vendor/phpqrcode/.listing b/vendor/phpqrcode/.listing deleted file mode 100644 index 1fef36ef6..000000000 --- a/vendor/phpqrcode/.listing +++ /dev/null @@ -1,24 +0,0 @@ -drwxr-xr-x 5 10046 10046 4096 Oct 25 11:32 . -drwxr-xr-x 3 10046 10046 4096 Oct 25 11:28 .. --rw-rw-rw- 1 10046 10046 1261 Oct 25 11:28 CHANGELOG --rw-rw-rw- 1 10046 10046 2042 Oct 25 11:28 INSTALL --rw-rw-rw- 1 10046 10046 7815 Oct 25 11:32 LICENSE --rw-rw-rw- 1 10046 10046 1634 Oct 25 11:32 README --rw-rw-rw- 1 10046 10046 17 Oct 25 11:28 VERSION -drwxr-xr-x 3 10046 10046 4096 Oct 25 11:32 bindings -drwxr-xr-x 10 10046 10046 4096 Oct 25 11:32 cache --rw-rw-rw- 1 10046 10046 3657 Oct 25 11:32 index.php --rw-rw-rw- 1 10046 10046 121780 Oct 25 11:32 phpqrcode.php --rw-rw-rw- 1 10046 10046 5386 Oct 25 11:32 qrbitstream.php --rw-rw-rw- 1 10046 10046 1446 Oct 25 11:32 qrconfig.php --rw-rw-rw- 1 10046 10046 1761 Oct 25 11:28 qrconst.php --rw-rw-rw- 1 10046 10046 17506 Oct 25 11:28 qrencode.php --rw-rw-rw- 1 10046 10046 3625 Oct 25 11:32 qrimage.php --rw-rw-rw- 1 10046 10046 24803 Oct 25 11:32 qrinput.php --rw-rw-rw- 1 10046 10046 1602 Oct 25 11:28 qrlib.php --rw-rw-rw- 1 10046 10046 12584 Oct 25 11:32 qrmask.php --rw-rw-rw- 1 10046 10046 8485 Oct 25 11:28 qrrscode.php --rw-rw-rw- 1 10046 10046 26612 Oct 25 11:28 qrspec.php --rw-rw-rw- 1 10046 10046 11381 Oct 25 11:32 qrsplit.php --rw-rw-rw- 1 10046 10046 6332 Oct 25 11:32 qrtools.php -drwxr-xr-x 2 10046 10046 4096 Oct 25 11:28 tools diff --git a/vendor/phpqrcode/CHANGELOG b/vendor/phpqrcode/CHANGELOG deleted file mode 100644 index 1088530c3..000000000 --- a/vendor/phpqrcode/CHANGELOG +++ /dev/null @@ -1,38 +0,0 @@ -* 1.0.0 build 2010031920 - - - first public release - - help in readme, install - - cleanup ans separation of QRtools and QRspec - - now TCPDF binding requires minimal changes in TCPDF, having most of job - done in QRtools tcpdfBarcodeArray - - nicer QRtools::timeBenchmark output - - license and copyright notices in files - - indent cleanup - from tab to 4spc, keep it that way please :) - - sf project, repository, wiki - - simple code generator in index.php - -* 1.1.0 build 2010032113 - - - added merge tool wich generate merged version of code - located in phpqrcode.php - - splited qrconst.php from qrlib.php - -* 1.1.1 build 2010032405 - - - patch by Rick Seymour allowing saving PNG and displaying it at the same time - - added version info in VERSION file - - modified merge tool to include version info into generated file - - fixed e-mail in almost all head comments - -* 1.1.2 build 2010032722 - - - full integration with TCPDF thanks to Nicola Asuni, it's author - - fixed bug with alphanumeric encoding detection - -* 1.1.3 build 2010081807 - - - short opening tags replaced with standard ones - -* 1.1.4 build 2010100721 - - - added missing static keyword QRinput::check (found by Luke Brookhart, Onjax LLC) diff --git a/vendor/phpqrcode/INSTALL b/vendor/phpqrcode/INSTALL deleted file mode 100644 index eac6b072b..000000000 --- a/vendor/phpqrcode/INSTALL +++ /dev/null @@ -1,67 +0,0 @@ -== REQUIREMENTS == - - * PHP5 - * PHP GD2 extension with JPEG and PNG support - -== INSTALLATION == - -If you want to recreate cache by yourself make sure cache directory is -writable and you have permisions to write into it. Also make sure you are -able to read files in it if you have cache option enabled - -== CONFIGURATION == - -Feel free to modify config constants in qrconfig.php file. Read about it in -provided comments and project wiki page (links in README file) - -== QUICK START == - -Notice: probably you should'nt use all of this in same script :) - -encode('PHP QR Code :)'); -QRspec::debug($tab, true); - -== TCPDF INTEGRATION == - -Inside bindings/tcpdf you will find slightly modified 2dbarcodes.php. -Instal phpqrcode liblaty inside tcpdf folder, then overwrite (or merge) -2dbarcodes.php - -Then use similar as example #50 from TCPDF examples: - - true, - 'padding' => 4, - 'fgcolor' => array(0,0,0), - 'bgcolor' => false, //array(255,255,255) -); - -//code name: QR, specify error correction level after semicolon (L,M,Q,H) -$pdf->write2DBarcode('PHP QR Code :)', 'QR,L', '', '', 30, 30, $style, 'N'); diff --git a/vendor/phpqrcode/LICENSE b/vendor/phpqrcode/LICENSE deleted file mode 100644 index 188330326..000000000 --- a/vendor/phpqrcode/LICENSE +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/vendor/phpqrcode/README b/vendor/phpqrcode/README deleted file mode 100644 index a022fb5e7..000000000 --- a/vendor/phpqrcode/README +++ /dev/null @@ -1,45 +0,0 @@ -This is PHP implementation of QR Code 2-D barcode generator. It is pure-php -LGPL-licensed implementation based on C libqrencode by Kentaro Fukuchi. - -== LICENSING == - -Copyright (C) 2010 by Dominik Dzienia - -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or any later version. - -This library is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU Lesser General Public License (LICENSE file) -for more details. - -You should have received a copy of the GNU Lesser General Public License along -with this library; if not, write to the Free Software Foundation, Inc., 51 -Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -== INSTALATION AND USAGE == - - * INSTALL file - * http://sourceforge.net/apps/mediawiki/phpqrcode/index.php?title=Main_Page - -== CONTACT == - -Fell free to contact me via e-mail (deltalab at poczta dot fm) or using -folowing project pages: - - * http://sourceforge.net/projects/phpqrcode/ - * http://phpqrcode.sourceforge.net/ - -== ACKNOWLEDGMENTS == - -Based on C libqrencode library (ver. 3.1.1) -Copyright (C) 2006-2010 by Kentaro Fukuchi -http://megaui.net/fukuchi/works/qrencode/index.en.html - -QR Code is registered trademarks of DENSO WAVE INCORPORATED in JAPAN and other -countries. - -Reed-Solomon code encoder is written by Phil Karn, KA9Q. -Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q - \ No newline at end of file diff --git a/vendor/phpqrcode/VERSION b/vendor/phpqrcode/VERSION deleted file mode 100644 index 9f99279ea..000000000 --- a/vendor/phpqrcode/VERSION +++ /dev/null @@ -1,2 +0,0 @@ -1.1.4 -2010100721 \ No newline at end of file diff --git a/vendor/phpqrcode/bindings/.listing b/vendor/phpqrcode/bindings/.listing deleted file mode 100644 index 781f5e50c..000000000 --- a/vendor/phpqrcode/bindings/.listing +++ /dev/null @@ -1,3 +0,0 @@ -drwxr-xr-x 3 10046 10046 4096 Oct 25 11:32 . -drwxr-xr-x 5 10046 10046 4096 Oct 25 11:32 .. -drwxr-xr-x 2 10046 10046 4096 Oct 25 11:32 tcpdf diff --git a/vendor/phpqrcode/bindings/tcpdf/.listing b/vendor/phpqrcode/bindings/tcpdf/.listing deleted file mode 100644 index 5891f7f32..000000000 --- a/vendor/phpqrcode/bindings/tcpdf/.listing +++ /dev/null @@ -1,3 +0,0 @@ -drwxr-xr-x 2 10046 10046 4096 Oct 25 11:32 . -drwxr-xr-x 3 10046 10046 4096 Oct 25 11:32 .. --rw-rw-rw- 1 10046 10046 82952 Oct 25 11:32 qrcode.php diff --git a/vendor/phpqrcode/bindings/tcpdf/qrcode.php b/vendor/phpqrcode/bindings/tcpdf/qrcode.php deleted file mode 100644 index 7995460b5..000000000 --- a/vendor/phpqrcode/bindings/tcpdf/qrcode.php +++ /dev/null @@ -1,2875 +0,0 @@ - -// http://phpqrcode.sourceforge.net/ -// https://sourceforge.net/projects/phpqrcode/ -// -// The "PHP QR Code encoder" is based on -// "C libqrencode library" (ver. 3.1.1) -// License: GNU-LGPL 2.1 -// Copyright (C) 2006-2010 by Kentaro Fukuchi -// http://megaui.net/fukuchi/works/qrencode/index.en.html -// -// Reed-Solomon code encoder is written by Phil Karn, KA9Q. -// Copyright (C) 2002-2006 Phil Karn, KA9Q -// -// QR Code is registered trademark of DENSO WAVE INCORPORATED -// http://www.denso-wave.com/qrcode/index-e.html -// --------------------------------------------------------- -// -// Author: Nicola Asuni -// -// (c) Copyright 2010: -// Nicola Asuni -// Tecnick.com S.r.l. -// Via della Pace, 11 -// 09044 Quartucciu (CA) -// ITALY -// www.tecnick.com -// info@tecnick.com -//============================================================+ - -/** - * Class to create QR-code arrays for TCPDF class. - * QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. - * The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. - * This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. - * Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode. - * - * This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). - * Please read comments on this class source file for full copyright and license information. - * - * @package com.tecnick.tcpdf - * @abstract Class for generating QR-code array for TCPDF. - * @author Nicola Asuni - * @copyright 2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com - * @link http://www.tcpdf.org - * @license http://www.gnu.org/copyleft/lesser.html LGPL - * @version 1.0.002 - */ - -// definitions -if (!defined('QRCODEDEFS')) { - - /** - * Indicate that definitions for this class are set - */ - define('QRCODEDEFS', true); - - // ----------------------------------------------------- - - // Encoding modes (characters which can be encoded in QRcode) - - /** - * Encoding mode - */ - define('QR_MODE_NL', -1); - - /** - * Encoding mode numeric (0-9). 3 characters are encoded to 10bit length. In theory, 7089 characters or less can be stored in a QRcode. - */ - define('QR_MODE_NM', 0); - - /** - * Encoding mode alphanumeric (0-9A-Z $%*+-./:) 45characters. 2 characters are encoded to 11bit length. In theory, 4296 characters or less can be stored in a QRcode. - */ - define('QR_MODE_AN', 1); - - /** - * Encoding mode 8bit byte data. In theory, 2953 characters or less can be stored in a QRcode. - */ - define('QR_MODE_8B', 2); - - /** - * Encoding mode KANJI. A KANJI character (multibyte character) is encoded to 13bit length. In theory, 1817 characters or less can be stored in a QRcode. - */ - define('QR_MODE_KJ', 3); - - /** - * Encoding mode STRUCTURED (currently unsupported) - */ - define('QR_MODE_ST', 4); - - // ----------------------------------------------------- - - // Levels of error correction. - // QRcode has a function of an error correcting for miss reading that white is black. - // Error correcting is defined in 4 level as below. - - /** - * Error correction level L : About 7% or less errors can be corrected. - */ - define('QR_ECLEVEL_L', 0); - - /** - * Error correction level M : About 15% or less errors can be corrected. - */ - define('QR_ECLEVEL_M', 1); - - /** - * Error correction level Q : About 25% or less errors can be corrected. - */ - define('QR_ECLEVEL_Q', 2); - - /** - * Error correction level H : About 30% or less errors can be corrected. - */ - define('QR_ECLEVEL_H', 3); - - // ----------------------------------------------------- - - // Version. Size of QRcode is defined as version. - // Version is from 1 to 40. - // Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. - // So version 40 is 177*177 matrix. - - /** - * Maximum QR Code version. - */ - define('QRSPEC_VERSION_MAX', 40); - - /** - * Maximum matrix size for maximum version (version 40 is 177*177 matrix). - */ - define('QRSPEC_WIDTH_MAX', 177); - - // ----------------------------------------------------- - - /** - * Matrix index to get width from $capacity array. - */ - define('QRCAP_WIDTH', 0); - - /** - * Matrix index to get number of words from $capacity array. - */ - define('QRCAP_WORDS', 1); - - /** - * Matrix index to get remainder from $capacity array. - */ - define('QRCAP_REMINDER', 2); - - /** - * Matrix index to get error correction level from $capacity array. - */ - define('QRCAP_EC', 3); - - // ----------------------------------------------------- - - // Structure (currently usupported) - - /** - * Number of header bits for structured mode - */ - define('STRUCTURE_HEADER_BITS', 20); - - /** - * Max number of symbols for structured mode - */ - define('MAX_STRUCTURED_SYMBOLS', 16); - - // ----------------------------------------------------- - - // Masks - - /** - * Down point base value for case 1 mask pattern (concatenation of same color in a line or a column) - */ - define('N1', 3); - - /** - * Down point base value for case 2 mask pattern (module block of same color) - */ - define('N2', 3); - - /** - * Down point base value for case 3 mask pattern (1:1:3:1:1(dark:bright:dark:bright:dark)pattern in a line or a column) - */ - define('N3', 40); - - /** - * Down point base value for case 4 mask pattern (ration of dark modules in whole) - */ - define('N4', 10); - - // ----------------------------------------------------- - - // Optimization settings - - /** - * if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code - */ - define('QR_FIND_BEST_MASK', true); - - /** - * if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly - */ - define('QR_FIND_FROM_RANDOM', 2); - - /** - * when QR_FIND_BEST_MASK === false - */ - define('QR_DEFAULT_MASK', 2); - - // ----------------------------------------------------- - -} // end of definitions - -// #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# - -if (!class_exists('QRcode', false)) { - - // for compaibility with PHP4 - if (!function_exists('str_split')) { - /** - * Convert a string to an array (needed for PHP4 compatibility) - * @param string $string The input string. - * @param int $split_length Maximum length of the chunk. - * @return If the optional split_length parameter is specified, the returned array will be broken down into chunks with each being split_length in length, otherwise each chunk will be one character in length. FALSE is returned if split_length is less than 1. If the split_length length exceeds the length of string , the entire string is returned as the first (and only) array element. - */ - function str_split($string, $split_length=1) { - if ((strlen($string) > $split_length) OR (!$split_length)) { - do { - $c = strlen($string); - $parts[] = substr($string, 0, $split_length); - $string = substr($string, $split_length); - } while ($string !== false); - } else { - $parts = array($string); - } - return $parts; - } - } - - // ##################################################### - - /** - * Class to create QR-code arrays for TCPDF class. - * QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. - * The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. - * This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. - * Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode. - * - * This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). - * Please read comments on this class source file for full copyright and license information. - * - * @name QRcode - * @package com.tecnick.tcpdf - * @abstract Class for generating QR-code array for TCPDF. - * @author Nicola Asuni - * @copyright 2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com - * @link http://www.tcpdf.org - * @license http://www.gnu.org/copyleft/lesser.html LGPL - * @version 1.0.002 - */ - class QRcode { - - /** - * @var barcode array to be returned which is readable by TCPDF - * @access protected - */ - protected $barcode_array = array(); - - /** - * @var QR code version. Size of QRcode is defined as version. Version is from 1 to 40. Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. So version 40 is 177*177 matrix. - * @access protected - */ - protected $version = 0; - - /** - * @var Levels of error correction. See definitions for possible values. - * @access protected - */ - protected $level = QR_ECLEVEL_L; - - /** - * @var Encoding mode - * @access protected - */ - protected $hint = QR_MODE_8B; - - /** - * @var if true the input string will be converted to uppercase - * @access protected - */ - protected $casesensitive = true; - - /** - * @var structured QR code (not supported yet) - * @access protected - */ - protected $structured = 0; - - /** - * @var mask data - * @access protected - */ - protected $data; - - // FrameFiller - - /** - * @var width - * @access protected - */ - protected $width; - - /** - * @var frame - * @access protected - */ - protected $frame; - - /** - * @var X position of bit - * @access protected - */ - protected $x; - - /** - * @var Y position of bit - * @access protected - */ - protected $y; - - /** - * @var direction - * @access protected - */ - protected $dir; - - /** - * @var single bit - * @access protected - */ - protected $bit; - - // ---- QRrawcode ---- - - /** - * @var data code - * @access protected - */ - protected $datacode = array(); - - /** - * @var error correction code - * @access protected - */ - protected $ecccode = array(); - - /** - * @var blocks - * @access protected - */ - protected $blocks; - - /** - * @var Reed-Solomon blocks - * @access protected - */ - protected $rsblocks = array(); //of RSblock - - /** - * @var counter - * @access protected - */ - protected $count; - - /** - * @var data length - * @access protected - */ - protected $dataLength; - - /** - * @var error correction length - * @access protected - */ - protected $eccLength; - - /** - * @var b1 - * @access protected - */ - protected $b1; - - // ---- QRmask ---- - - /** - * @var run length - * @access protected - */ - protected $runLength = array(); - - // ---- QRsplit ---- - - /** - * @var input data string - * @access protected - */ - protected $dataStr = ''; - - /** - * @var input items - * @access protected - */ - protected $items; - - // Reed-Solomon items - - /** - * @var Reed-Solomon items - * @access protected - */ - protected $rsitems = array(); - - /** - * @var array of frames - * @access protected - */ - protected $frames = array(); - - /** - * @var alphabet-numeric convesion table - * @access protected - */ - protected $anTable = array( - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // - 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, // - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, // - -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, // - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // - ); - - /** - * @var array Table of the capacity of symbols - * See Table 1 (pp.13) and Table 12-16 (pp.30-36), JIS X0510:2004. - * @access protected - */ - protected $capacity = array( - array( 0, 0, 0, array( 0, 0, 0, 0)), // - array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 - array( 25, 44, 7, array( 10, 16, 22, 28)), // - array( 29, 70, 7, array( 15, 26, 36, 44)), // - array( 33, 100, 7, array( 20, 36, 52, 64)), // - array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 - array( 41, 172, 7, array( 36, 64, 96, 112)), // - array( 45, 196, 0, array( 40, 72, 108, 130)), // - array( 49, 242, 0, array( 48, 88, 132, 156)), // - array( 53, 292, 0, array( 60, 110, 160, 192)), // - array( 57, 346, 0, array( 72, 130, 192, 224)), // 10 - array( 61, 404, 0, array( 80, 150, 224, 264)), // - array( 65, 466, 0, array( 96, 176, 260, 308)), // - array( 69, 532, 0, array( 104, 198, 288, 352)), // - array( 73, 581, 3, array( 120, 216, 320, 384)), // - array( 77, 655, 3, array( 132, 240, 360, 432)), // 15 - array( 81, 733, 3, array( 144, 280, 408, 480)), // - array( 85, 815, 3, array( 168, 308, 448, 532)), // - array( 89, 901, 3, array( 180, 338, 504, 588)), // - array( 93, 991, 3, array( 196, 364, 546, 650)), // - array( 97, 1085, 3, array( 224, 416, 600, 700)), // 20 - array(101, 1156, 4, array( 224, 442, 644, 750)), // - array(105, 1258, 4, array( 252, 476, 690, 816)), // - array(109, 1364, 4, array( 270, 504, 750, 900)), // - array(113, 1474, 4, array( 300, 560, 810, 960)), // - array(117, 1588, 4, array( 312, 588, 870, 1050)), // 25 - array(121, 1706, 4, array( 336, 644, 952, 1110)), // - array(125, 1828, 4, array( 360, 700, 1020, 1200)), // - array(129, 1921, 3, array( 390, 728, 1050, 1260)), // - array(133, 2051, 3, array( 420, 784, 1140, 1350)), // - array(137, 2185, 3, array( 450, 812, 1200, 1440)), // 30 - array(141, 2323, 3, array( 480, 868, 1290, 1530)), // - array(145, 2465, 3, array( 510, 924, 1350, 1620)), // - array(149, 2611, 3, array( 540, 980, 1440, 1710)), // - array(153, 2761, 3, array( 570, 1036, 1530, 1800)), // - array(157, 2876, 0, array( 570, 1064, 1590, 1890)), // 35 - array(161, 3034, 0, array( 600, 1120, 1680, 1980)), // - array(165, 3196, 0, array( 630, 1204, 1770, 2100)), // - array(169, 3362, 0, array( 660, 1260, 1860, 2220)), // - array(173, 3532, 0, array( 720, 1316, 1950, 2310)), // - array(177, 3706, 0, array( 750, 1372, 2040, 2430)) // 40 - ); - - /** - * @var array Length indicator - * @access protected - */ - protected $lengthTableBits = array( - array(10, 12, 14), - array( 9, 11, 13), - array( 8, 16, 16), - array( 8, 10, 12) - ); - - /** - * @var array Table of the error correction code (Reed-Solomon block) - * See Table 12-16 (pp.30-36), JIS X0510:2004. - * @access protected - */ - protected $eccTable = array( - array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), // - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // - array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), // - array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), // - array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 - array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), // - array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), // - array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), // - array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), // - array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), // 10 - array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), // - array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), // - array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), // - array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), // - array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), // 15 - array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), // - array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), // - array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), // - array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), // - array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), // 20 - array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), // - array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), // - array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), // - array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), // - array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), // 25 - array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), // - array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), // - array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), // - array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), // - array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), // 30 - array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), // - array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), // - array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), // - array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), // - array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), // 35 - array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), // - array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), // - array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), // - array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), // - array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)) // 40 - ); - - /** - * @var array Positions of alignment patterns. - * This array includes only the second and the third position of the alignment patterns. Rest of them can be calculated from the distance between them. - * See Table 1 in Appendix E (pp.71) of JIS X0510:2004. - * @access protected - */ - protected $alignmentPattern = array( - array( 0, 0), - array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 - array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 - array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), // 11-15 - array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), // 16-20 - array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), // 21-25 - array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), // 26-30 - array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), // 31-35 - array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58) // 35-40 - ); - - /** - * @var array Version information pattern (BCH coded). - * See Table 1 in Appendix D (pp.68) of JIS X0510:2004. - * size: [QRSPEC_VERSION_MAX - 6] - * @access protected - */ - protected $versionPattern = array( - 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, // - 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, // - 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, // - 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, // - 0x27541, 0x28c69 - ); - - /** - * @var array Format information - * @access protected - */ - protected $formatInfo = array( - array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), // - array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), // - array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), // - array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) // - ); - - - // ------------------------------------------------- - // ------------------------------------------------- - - - /** - * This is the class constructor. - * Creates a QRcode object - * @param string $code code to represent using QRcode - * @param string $eclevel error level:
    • L : About 7% or less errors can be corrected.
    • M : About 15% or less errors can be corrected.
    • Q : About 25% or less errors can be corrected.
    • H : About 30% or less errors can be corrected.
    - * @access public - * @since 1.0.000 - */ - public function __construct($code, $eclevel = 'L') { - $barcode_array = array(); - if ((is_null($code)) OR ($code == '\0') OR ($code == '')) { - return false; - } - // set error correction level - $this->level = array_search($eclevel, array('L', 'M', 'Q', 'H')); - if ($this->level === false) { - $this->level = QR_ECLEVEL_L; - } - if (($this->hint != QR_MODE_8B) AND ($this->hint != QR_MODE_KJ)) { - return false; - } - if (($this->version < 0) OR ($this->version > QRSPEC_VERSION_MAX)) { - return false; - } - $this->items = array(); - $this->encodeString($code); - $qrTab = $this->binarize($this->data); - $size = count($qrTab); - $barcode_array['num_rows'] = $size; - $barcode_array['num_cols'] = $size; - $barcode_array['bcode'] = array(); - foreach ($qrTab as $line) { - $arrAdd = array(); - foreach (str_split($line) as $char) { - $arrAdd[] = ($char=='1')?1:0; - } - $barcode_array['bcode'][] = $arrAdd; - } - $this->barcode_array = $barcode_array; - } - - /** - * Returns a barcode array which is readable by TCPDF - * @return array barcode array readable by TCPDF; - * @access public - */ - public function getBarcodeArray() { - return $this->barcode_array; - } - - /** - * Convert the frame in binary form - * @param array $frame array to binarize - * @return array frame in binary form - */ - protected function binarize($frame) { - $len = count($frame); - // the frame is square (width = height) - foreach ($frame as &$frameLine) { - for ($i=0; $i<$len; $i++) { - $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; - } - } - return $frame; - } - - /** - * Encode the input string to QR code - * @param string $string input string to encode - */ - protected function encodeString($string) { - $this->dataStr = $string; - if (!$this->casesensitive) { - $this->toUpper(); - } - $ret = $this->splitString(); - if ($ret < 0) { - return NULL; - } - $this->encodeMask(-1); - } - - /** - * Encode mask - * @param int $mask masking mode - */ - protected function encodeMask($mask) { - $spec = array(0, 0, 0, 0, 0); - $this->datacode = $this->getByteStream($this->items); - if (is_null($this->datacode)) { - return NULL; - } - $spec = $this->getEccSpec($this->version, $this->level, $spec); - $this->b1 = $this->rsBlockNum1($spec); - $this->dataLength = $this->rsDataLength($spec); - $this->eccLength = $this->rsEccLength($spec); - $this->ecccode = array_fill(0, $this->eccLength, 0); - $this->blocks = $this->rsBlockNum($spec); - $ret = $this->init($spec); - if ($ret < 0) { - return NULL; - } - $this->count = 0; - $this->width = $this->getWidth($this->version); - $this->frame = $this->newFrame($this->version); - $this->x = $this->width - 1; - $this->y = $this->width - 1; - $this->dir = -1; - $this->bit = -1; - // inteleaved data and ecc codes - for ($i=0; $i < ($this->dataLength + $this->eccLength); $i++) { - $code = $this->getCode(); - $bit = 0x80; - for ($j=0; $j<8; $j++) { - $addr = $this->getNextPosition(); - $this->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); - $bit = $bit >> 1; - } - } - // remainder bits - $j = $this->getRemainder($this->version); - for ($i=0; $i<$j; $i++) { - $addr = $this->getNextPosition(); - $this->setFrameAt($addr, 0x02); - } - // masking - $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); - if ($mask < 0) { - if (QR_FIND_BEST_MASK) { - $masked = $this->mask($this->width, $this->frame, $this->level); - } else { - $masked = $this->makeMask($this->width, $this->frame, (intval(QR_DEFAULT_MASK) % 8), $this->level); - } - } else { - $masked = $this->makeMask($this->width, $this->frame, $mask, $this->level); - } - if ($masked == NULL) { - return NULL; - } - $this->data = $masked; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // FrameFiller - - /** - * Set frame value at specified position - * @param array $at x,y position - * @param int $val value of the character to set - */ - protected function setFrameAt($at, $val) { - $this->frame[$at['y']][$at['x']] = chr($val); - } - - /** - * Get frame value at specified position - * @param array $at x,y position - * @return value at specified position - */ - protected function getFrameAt($at) { - return ord($this->frame[$at['y']][$at['x']]); - } - - /** - * Return the next frame position - * @return array of x,y coordinates - */ - protected function getNextPosition() { - do { - if ($this->bit == -1) { - $this->bit = 0; - return array('x'=>$this->x, 'y'=>$this->y); - } - $x = $this->x; - $y = $this->y; - $w = $this->width; - if ($this->bit == 0) { - $x--; - $this->bit++; - } else { - $x++; - $y += $this->dir; - $this->bit--; - } - if ($this->dir < 0) { - if ($y < 0) { - $y = 0; - $x -= 2; - $this->dir = 1; - if ($x == 6) { - $x--; - $y = 9; - } - } - } else { - if ($y == $w) { - $y = $w - 1; - $x -= 2; - $this->dir = -1; - if ($x == 6) { - $x--; - $y -= 8; - } - } - } - if (($x < 0) OR ($y < 0)) { - return NULL; - } - $this->x = $x; - $this->y = $y; - } while(ord($this->frame[$y][$x]) & 0x80); - return array('x'=>$x, 'y'=>$y); - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRrawcode - - /** - * Initialize code. - * @param array $spec array of ECC specification - * @return 0 in case of success, -1 in case of error - */ - protected function init($spec) { - $dl = $this->rsDataCodes1($spec); - $el = $this->rsEccCodes1($spec); - $rs = $this->init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - $blockNo = 0; - $dataPos = 0; - $eccPos = 0; - $endfor = $this->rsBlockNum1($spec); - for ($i=0; $i < $endfor; ++$i) { - $ecc = array_slice($this->ecccode, $eccPos); - $this->rsblocks[$blockNo] = array(); - $this->rsblocks[$blockNo]['dataLength'] = $dl; - $this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos); - $this->rsblocks[$blockNo]['eccLength'] = $el; - $ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc); - $this->rsblocks[$blockNo]['ecc'] = $ecc; - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - if ($this->rsBlockNum2($spec) == 0) { - return 0; - } - $dl = $this->rsDataCodes2($spec); - $el = $this->rsEccCodes2($spec); - $rs = $this->init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - if ($rs == NULL) { - return -1; - } - $endfor = $this->rsBlockNum2($spec); - for ($i=0; $i < $endfor; ++$i) { - $ecc = array_slice($this->ecccode, $eccPos); - $this->rsblocks[$blockNo] = array(); - $this->rsblocks[$blockNo]['dataLength'] = $dl; - $this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos); - $this->rsblocks[$blockNo]['eccLength'] = $el; - $ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc); - $this->rsblocks[$blockNo]['ecc'] = $ecc; - $this->ecccode = array_merge(array_slice($this->ecccode, 0, $eccPos), $ecc); - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - return 0; - } - - /** - * Return Reed-Solomon block code. - * @return array rsblocks - */ - protected function getCode() { - if ($this->count < $this->dataLength) { - $row = $this->count % $this->blocks; - $col = $this->count / $this->blocks; - if ($col >= $this->rsblocks[0]['dataLength']) { - $row += $this->b1; - } - $ret = $this->rsblocks[$row]['data'][$col]; - } elseif ($this->count < $this->dataLength + $this->eccLength) { - $row = ($this->count - $this->dataLength) % $this->blocks; - $col = ($this->count - $this->dataLength) / $this->blocks; - $ret = $this->rsblocks[$row]['ecc'][$col]; - } else { - return 0; - } - $this->count++; - return $ret; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRmask - - /** - * Write Format Information on frame and returns the number of black bits - * @param int $width frame width - * @param array $frame frame - * @param array $mask masking mode - * @param int $level error correction level - * @return int blacks - */ - protected function writeFormatInformation($width, &$frame, $mask, $level) { - $blacks = 0; - $format = $this->getFormatInfo($mask, $level); - for ($i=0; $i<8; ++$i) { - if ($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - $frame[8][$width - 1 - $i] = chr($v); - if ($i < 6) { - $frame[$i][8] = chr($v); - } else { - $frame[$i + 1][8] = chr($v); - } - $format = $format >> 1; - } - for ($i=0; $i<7; ++$i) { - if ($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - $frame[$width - 7 + $i][8] = chr($v); - if ($i == 0) { - $frame[8][7] = chr($v); - } else { - $frame[8][6 - $i] = chr($v); - } - $format = $format >> 1; - } - return $blacks; - } - - /** - * mask0 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask0($x, $y) { - return ($x + $y) & 1; - } - - /** - * mask1 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask1($x, $y) { - return ($y & 1); - } - - /** - * mask2 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask2($x, $y) { - return ($x % 3); - } - - /** - * mask3 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask3($x, $y) { - return ($x + $y) % 3; - } - - /** - * mask4 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask4($x, $y) { - return (((int)($y / 2)) + ((int)($x / 3))) & 1; - } - - /** - * mask5 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask5($x, $y) { - return (($x * $y) & 1) + ($x * $y) % 3; - } - - /** - * mask6 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask6($x, $y) { - return ((($x * $y) & 1) + ($x * $y) % 3) & 1; - } - - /** - * mask7 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask7($x, $y) { - return ((($x * $y) % 3) + (($x + $y) & 1)) & 1; - } - - /** - * Return bitmask - * @param int $maskNo mask number - * @param int $width width - * @param array $frame frame - * @return array bitmask - */ - protected function generateMaskNo($maskNo, $width, $frame) { - $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); - for ($y=0; $y<$width; ++$y) { - for ($x=0; $x<$width; ++$x) { - if (ord($frame[$y][$x]) & 0x80) { - $bitMask[$y][$x] = 0; - } else { - $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); - $bitMask[$y][$x] = ($maskFunc == 0)?1:0; - } - } - } - return $bitMask; - } - - /** - * makeMaskNo - * @param int $maskNo - * @param int $width - * @param int $s - * @param int $d - * @param boolean $maskGenOnly - * @return int b - */ - protected function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly=false) { - $b = 0; - $bitMask = array(); - $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); - if ($maskGenOnly) { - return; - } - $d = $s; - for ($y=0; $y<$width; ++$y) { - for ($x=0; $x<$width; ++$x) { - if ($bitMask[$y][$x] == 1) { - $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); - } - $b += (int)(ord($d[$y][$x]) & 1); - } - } - return $b; - } - - /** - * makeMask - * @param int $width - * @param array $frame - * @param int $maskNo - * @param int $level - * @return array mask - */ - protected function makeMask($width, $frame, $maskNo, $level) { - $masked = array_fill(0, $width, str_repeat("\0", $width)); - $this->makeMaskNo($maskNo, $width, $frame, $masked); - $this->writeFormatInformation($width, $masked, $maskNo, $level); - return $masked; - } - - /** - * calcN1N3 - * @param int $length - * @return int demerit - */ - protected function calcN1N3($length) { - $demerit = 0; - for ($i=0; $i<$length; ++$i) { - if ($this->runLength[$i] >= 5) { - $demerit += (N1 + ($this->runLength[$i] - 5)); - } - if ($i & 1) { - if (($i >= 3) AND ($i < ($length-2)) AND ($this->runLength[$i] % 3 == 0)) { - $fact = (int)($this->runLength[$i] / 3); - if (($this->runLength[$i-2] == $fact) - AND ($this->runLength[$i-1] == $fact) - AND ($this->runLength[$i+1] == $fact) - AND ($this->runLength[$i+2] == $fact)) { - if (($this->runLength[$i-3] < 0) OR ($this->runLength[$i-3] >= (4 * $fact))) { - $demerit += N3; - } elseif ((($i+3) >= $length) OR ($this->runLength[$i+3] >= (4 * $fact))) { - $demerit += N3; - } - } - } - } - } - return $demerit; - } - - /** - * evaluateSymbol - * @param int $width - * @param array $frame - * @return int demerit - */ - protected function evaluateSymbol($width, $frame) { - $head = 0; - $demerit = 0; - for ($y=0; $y<$width; ++$y) { - $head = 0; - $this->runLength[0] = 1; - $frameY = $frame[$y]; - if ($y > 0) { - $frameYM = $frame[$y-1]; - } - for ($x=0; $x<$width; ++$x) { - if (($x > 0) AND ($y > 0)) { - $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); - $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); - if (($b22 | ($w22 ^ 1)) & 1) { - $demerit += N2; - } - } - if (($x == 0) AND (ord($frameY[$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } elseif ($x > 0) { - if ((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - $demerit += $this->calcN1N3($head+1); - } - for ($x=0; $x<$width; ++$x) { - $head = 0; - $this->runLength[0] = 1; - for ($y=0; $y<$width; ++$y) { - if (($y == 0) AND (ord($frame[$y][$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } elseif ($y > 0) { - if ((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - $demerit += $this->calcN1N3($head+1); - } - return $demerit; - } - - /** - * mask - * @param int $width - * @param array $frame - * @param int $level - * @return array best mask - */ - protected function mask($width, $frame, $level) { - $minDemerit = PHP_INT_MAX; - $bestMaskNum = 0; - $bestMask = array(); - $checked_masks = array(0, 1, 2, 3, 4, 5, 6, 7); - if (QR_FIND_FROM_RANDOM !== false) { - $howManuOut = 8 - (QR_FIND_FROM_RANDOM % 9); - for ($i = 0; $i < $howManuOut; ++$i) { - $remPos = rand (0, count($checked_masks)-1); - unset($checked_masks[$remPos]); - $checked_masks = array_values($checked_masks); - } - } - $bestMask = $frame; - foreach ($checked_masks as $i) { - $mask = array_fill(0, $width, str_repeat("\0", $width)); - $demerit = 0; - $blacks = 0; - $blacks = $this->makeMaskNo($i, $width, $frame, $mask); - $blacks += $this->writeFormatInformation($width, $mask, $i, $level); - $blacks = (int)(100 * $blacks / ($width * $width)); - $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); - $demerit += $this->evaluateSymbol($width, $mask); - if ($demerit < $minDemerit) { - $minDemerit = $demerit; - $bestMask = $mask; - $bestMaskNum = $i; - } - } - return $bestMask; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRsplit - - /** - * Return true if the character at specified position is a number - * @param string $str string - * @param int $pos characted position - * @return boolean true of false - */ - protected function isdigitat($str, $pos) { - if ($pos >= strlen($str)) { - return false; - } - return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); - } - - /** - * Return true if the character at specified position is an alphanumeric character - * @param string $str string - * @param int $pos characted position - * @return boolean true of false - */ - protected function isalnumat($str, $pos) { - if ($pos >= strlen($str)) { - return false; - } - return ($this->lookAnTable(ord($str[$pos])) >= 0); - } - - /** - * identifyMode - * @param int $pos - * @return int mode - */ - protected function identifyMode($pos) { - if ($pos >= strlen($this->dataStr)) { - return QR_MODE_NL; - } - $c = $this->dataStr[$pos]; - if ($this->isdigitat($this->dataStr, $pos)) { - return QR_MODE_NM; - } elseif ($this->isalnumat($this->dataStr, $pos)) { - return QR_MODE_AN; - } elseif ($this->hint == QR_MODE_KJ) { - if ($pos+1 < strlen($this->dataStr)) { - $d = $this->dataStr[$pos+1]; - $word = (ord($c) << 8) | ord($d); - if (($word >= 0x8140 && $word <= 0x9ffc) OR ($word >= 0xe040 && $word <= 0xebbf)) { - return QR_MODE_KJ; - } - } - } - return QR_MODE_8B; - } - - /** - * eatNum - * @return int run - */ - protected function eatNum() { - $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); - $p = 0; - while($this->isdigitat($this->dataStr, $p)) { - $p++; - } - $run = $p; - $mode = $this->identifyMode($p); - if ($mode == QR_MODE_8B) { - $dif = $this->estimateBitsModeNum($run) + 4 + $ln - + $this->estimateBitsMode8(1) // + 4 + l8 - - $this->estimateBitsMode8($run + 1); // - 4 - l8 - if ($dif > 0) { - return $this->eat8(); - } - } - if ($mode == QR_MODE_AN) { - $dif = $this->estimateBitsModeNum($run) + 4 + $ln - + $this->estimateBitsModeAn(1) // + 4 + la - - $this->estimateBitsModeAn($run + 1);// - 4 - la - if ($dif > 0) { - return $this->eatAn(); - } - } - $this->items = $this->appendNewInputItem($this->items, QR_MODE_NM, $run, str_split($this->dataStr)); - return $run; - } - - /** - * eatAn - * @return int run - */ - protected function eatAn() { - $la = $this->lengthIndicator(QR_MODE_AN, $this->version); - $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); - $p = 0; - while($this->isalnumat($this->dataStr, $p)) { - if ($this->isdigitat($this->dataStr, $p)) { - $q = $p; - while($this->isdigitat($this->dataStr, $q)) { - $q++; - } - $dif = $this->estimateBitsModeAn($p) // + 4 + la - + $this->estimateBitsModeNum($q - $p) + 4 + $ln - - $this->estimateBitsModeAn($q); // - 4 - la - if ($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - $run = $p; - if (!$this->isalnumat($this->dataStr, $p)) { - $dif = $this->estimateBitsModeAn($run) + 4 + $la - + $this->estimateBitsMode8(1) // + 4 + l8 - - $this->estimateBitsMode8($run + 1); // - 4 - l8 - if ($dif > 0) { - return $this->eat8(); - } - } - $this->items = $this->appendNewInputItem($this->items, QR_MODE_AN, $run, str_split($this->dataStr)); - return $run; - } - - /** - * eatKanji - * @return int run - */ - protected function eatKanji() { - $p = 0; - while($this->identifyMode($p) == QR_MODE_KJ) { - $p += 2; - } - $this->items = $this->appendNewInputItem($this->items, QR_MODE_KJ, $p, str_split($this->dataStr)); - return $run; - } - - /** - * eat8 - * @return int run - */ - protected function eat8() { - $la = $this->lengthIndicator(QR_MODE_AN, $this->version); - $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); - $p = 1; - $dataStrLen = strlen($this->dataStr); - while($p < $dataStrLen) { - $mode = $this->identifyMode($p); - if ($mode == QR_MODE_KJ) { - break; - } - if ($mode == QR_MODE_NM) { - $q = $p; - while($this->isdigitat($this->dataStr, $q)) { - $q++; - } - $dif = $this->estimateBitsMode8($p) // + 4 + l8 - + $this->estimateBitsModeNum($q - $p) + 4 + $ln - - $this->estimateBitsMode8($q); // - 4 - l8 - if ($dif < 0) { - break; - } else { - $p = $q; - } - } elseif ($mode == QR_MODE_AN) { - $q = $p; - while($this->isalnumat($this->dataStr, $q)) { - $q++; - } - $dif = $this->estimateBitsMode8($p) // + 4 + l8 - + $this->estimateBitsModeAn($q - $p) + 4 + $la - - $this->estimateBitsMode8($q); // - 4 - l8 - if ($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - $run = $p; - $this->items = $this->appendNewInputItem($this->items, QR_MODE_8B, $run, str_split($this->dataStr)); - return $run; - } - - /** - * splitString - */ - protected function splitString() { - while (strlen($this->dataStr) > 0) { - if ($this->dataStr == '') { - return 0; - } - $mode = $this->identifyMode(0); - switch ($mode) { - case QR_MODE_NM: { - $length = $this->eatNum(); - break; - } - case QR_MODE_AN: { - $length = $this->eatAn(); - break; - } - case QR_MODE_KJ: { - if ($hint == QR_MODE_KJ) { - $length = $this->eatKanji(); - } else { - $length = $this->eat8(); - } - break; - } - default: { - $length = $this->eat8(); - break; - } - } - if ($length == 0) { - return 0; - } - if ($length < 0) { - return -1; - } - $this->dataStr = substr($this->dataStr, $length); - } - } - - /** - * toUpper - */ - protected function toUpper() { - $stringLen = strlen($this->dataStr); - $p = 0; - while ($p < $stringLen) { - $mode = $this->identifyMode(substr($this->dataStr, $p), $this->hint); - if ($mode == QR_MODE_KJ) { - $p += 2; - } else { - if ((ord($this->dataStr[$p]) >= ord('a')) AND (ord($this->dataStr[$p]) <= ord('z'))) { - $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); - } - $p++; - } - } - return $this->dataStr; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRinputItem - - /** - * newInputItem - * @param int $mode - * @param int $size - * @param array $data - * @param array $bstream - * @return array input item - */ - protected function newInputItem($mode, $size, $data, $bstream=null) { - $setData = array_slice($data, 0, $size); - if (count($setData) < $size) { - $setData = array_merge($setData, array_fill(0, ($size - count($setData)), 0)); - } - if (!$this->check($mode, $size, $setData)) { - return NULL; - } - $inputitem = array(); - $inputitem['mode'] = $mode; - $inputitem['size'] = $size; - $inputitem['data'] = $setData; - $inputitem['bstream'] = $bstream; - return $inputitem; - } - - /** - * encodeModeNum - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeModeNum($inputitem, $version) { - $words = (int)($inputitem['size'] / 3); - $inputitem['bstream'] = array(); - $val = 0x1; - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_NM, $version), $inputitem['size']); - for ($i=0; $i < $words; ++$i) { - $val = (ord($inputitem['data'][$i*3 ]) - ord('0')) * 100; - $val += (ord($inputitem['data'][$i*3+1]) - ord('0')) * 10; - $val += (ord($inputitem['data'][$i*3+2]) - ord('0')); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 10, $val); - } - if ($inputitem['size'] - $words * 3 == 1) { - $val = ord($inputitem['data'][$words*3]) - ord('0'); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val); - } elseif (($inputitem['size'] - ($words * 3)) == 2) { - $val = (ord($inputitem['data'][$words*3 ]) - ord('0')) * 10; - $val += (ord($inputitem['data'][$words*3+1]) - ord('0')); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 7, $val); - } - return $inputitem; - } - - /** - * encodeModeAn - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeModeAn($inputitem, $version) { - $words = (int)($inputitem['size'] / 2); - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x02); - $inputitem['bstream'] = $this->appendNum(v, $this->lengthIndicator(QR_MODE_AN, $version), $inputitem['size']); - for ($i=0; $i < $words; ++$i) { - $val = (int)$this->lookAnTable(ord($inputitem['data'][$i*2 ])) * 45; - $val += (int)$this->lookAnTable(ord($inputitem['data'][$i*2+1])); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 11, $val); - } - if ($inputitem['size'] & 1) { - $val = $this->lookAnTable(ord($inputitem['data'][($words * 2)])); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 6, $val); - } - return $inputitem; - } - - /** - * encodeMode8 - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeMode8($inputitem, $version) { - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x4); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_8B, $version), $inputitem['size']); - for ($i=0; $i < $inputitem['size']; ++$i) { - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][$i])); - } - return $inputitem; - } - - /** - * encodeModeKanji - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeModeKanji($inputitem, $version) { - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x8); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_KJ, $version), (int)($inputitem['size'] / 2)); - for ($i=0; $i<$inputitem['size']; $i+=2) { - $val = (ord($inputitem['data'][$i]) << 8) | ord($inputitem['data'][$i+1]); - if ($val <= 0x9ffc) { - $val -= 0x8140; - } else { - $val -= 0xc140; - } - $h = ($val >> 8) * 0xc0; - $val = ($val & 0xff) + $h; - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 13, $val); - } - return $inputitem; - } - - /** - * encodeModeStructure - * @param array $inputitem - * @return array input item - */ - protected function encodeModeStructure($inputitem) { - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x03); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][1]) - 1); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][0]) - 1); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][2])); - return $inputitem; - } - - /** - * encodeBitStream - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeBitStream($inputitem, $version) { - $inputitem['bstream'] = array(); - $words = $this->maximumWords($inputitem['mode'], $version); - if ($inputitem['size'] > $words) { - $st1 = $this->newInputItem($inputitem['mode'], $words, $inputitem['data']); - $st2 = $this->newInputItem($inputitem['mode'], $inputitem['size'] - $words, array_slice($inputitem['data'], $words)); - $st1 = $this->encodeBitStream($st1, $version); - $st2 = $this->encodeBitStream($st2, $version); - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st1['bstream']); - $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st2['bstream']); - } else { - switch($inputitem['mode']) { - case QR_MODE_NM: { - $inputitem = $this->encodeModeNum($inputitem, $version); - break; - } - case QR_MODE_AN: { - $inputitem = $this->encodeModeAn($inputitem, $version); - break; - } - case QR_MODE_8B: { - $inputitem = $this->encodeMode8($inputitem, $version); - break; - } - case QR_MODE_KJ: { - $inputitem = $this->encodeModeKanji($inputitem, $version); - break; - } - case QR_MODE_ST: { - $inputitem = $this->encodeModeStructure($inputitem); - break; - } - default: { - break; - } - } - } - return $inputitem; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRinput - - /** - * Append data to an input object. - * The data is copied and appended to the input object. - * @param array items input items - * @param int $mode encoding mode. - * @param int $size size of data (byte). - * @param array $data array of input data. - * @return items - * - */ - protected function appendNewInputItem($items, $mode, $size, $data) { - $items[] = $this->newInputItem($mode, $size, $data); - return $items; - } - - /** - * insertStructuredAppendHeader - * @param array $items - * @param int $size - * @param int $index - * @param int $parity - * @return array items - */ - protected function insertStructuredAppendHeader($items, $size, $index, $parity) { - if ($size > MAX_STRUCTURED_SYMBOLS) { - return -1; - } - if (($index <= 0) OR ($index > MAX_STRUCTURED_SYMBOLS)) { - return -1; - } - $buf = array($size, $index, $parity); - $entry = $this->newInputItem(QR_MODE_ST, 3, buf); - array_unshift($items, $entry); - return $items; - } - - /** - * calcParity - * @param array $items - * @return int parity - */ - protected function calcParity($items) { - $parity = 0; - foreach ($items as $item) { - if ($item['mode'] != QR_MODE_ST) { - for ($i=$item['size']-1; $i>=0; --$i) { - $parity ^= $item['data'][$i]; - } - } - } - return $parity; - } - - /** - * checkModeNum - * @param int $size - * @param array $data - * @return boolean true or false - */ - protected function checkModeNum($size, $data) { - for ($i=0; $i<$size; ++$i) { - if ((ord($data[$i]) < ord('0')) OR (ord($data[$i]) > ord('9'))){ - return false; - } - } - return true; - } - - /** - * estimateBitsModeNum - * @param int $size - * @return int number of bits - */ - protected function estimateBitsModeNum($size) { - $w = (int)$size / 3; - $bits = $w * 10; - switch($size - $w * 3) { - case 1: { - $bits += 4; - break; - } - case 2: { - $bits += 7; - break; - } - default: { - break; - } - } - return $bits; - } - - /** - * Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19). - * @param int $c character value - * @return value - */ - protected function lookAnTable($c) { - return (($c > 127)?-1:$this->anTable[$c]); - } - - /** - * checkModeAn - * @param int $size - * @param array $data - * @return boolean true or false - */ - protected function checkModeAn($size, $data) { - for ($i=0; $i<$size; ++$i) { - if ($this->lookAnTable(ord($data[$i])) == -1) { - return false; - } - } - return true; - } - - /** - * estimateBitsModeAn - * @param int $size - * @return int number of bits - */ - protected function estimateBitsModeAn($size) { - $w = (int)($size / 2); - $bits = $w * 11; - if ($size & 1) { - $bits += 6; - } - return $bits; - } - - /** - * estimateBitsMode8 - * @param int $size - * @return int number of bits - */ - protected function estimateBitsMode8($size) { - return $size * 8; - } - - /** - * estimateBitsModeKanji - * @param int $size - * @return int number of bits - */ - protected function estimateBitsModeKanji($size) { - return (int)(($size / 2) * 13); - } - - /** - * checkModeKanji - * @param int $size - * @param array $data - * @return boolean true or false - */ - protected function checkModeKanji($size, $data) { - if ($size & 1) { - return false; - } - for ($i=0; $i<$size; $i+=2) { - $val = (ord($data[$i]) << 8) | ord($data[$i+1]); - if (($val < 0x8140) OR (($val > 0x9ffc) AND ($val < 0xe040)) OR ($val > 0xebbf)) { - return false; - } - } - return true; - } - - /** - * Validate the input data. - * @param int $mode encoding mode. - * @param int $size size of data (byte). - * @param array data data to validate - * @return boolean true in case of valid data, false otherwise - */ - protected function check($mode, $size, $data) { - if ($size <= 0) { - return false; - } - switch($mode) { - case QR_MODE_NM: { - return $this->checkModeNum($size, $data); - } - case QR_MODE_AN: { - return $this->checkModeAn($size, $data); - } - case QR_MODE_KJ: { - return $this->checkModeKanji($size, $data); - } - case QR_MODE_8B: { - return true; - } - case QR_MODE_ST: { - return true; - } - default: { - break; - } - } - return false; - } - - /** - * estimateBitStreamSize - * @param array $items - * @param int $version - * @return int bits - */ - protected function estimateBitStreamSize($items, $version) { - $bits = 0; - if ($version == 0) { - $version = 1; - } - foreach ($items as $item) { - switch($item['mode']) { - case QR_MODE_NM: { - $bits = $this->estimateBitsModeNum($item['size']); - break; - } - case QR_MODE_AN: { - $bits = $this->estimateBitsModeAn($item['size']); - break; - } - case QR_MODE_8B: { - $bits = $this->estimateBitsMode8($item['size']); - break; - } - case QR_MODE_KJ: { - $bits = $this->estimateBitsModeKanji($item['size']); - break; - } - case QR_MODE_ST: { - return STRUCTURE_HEADER_BITS; - } - default: { - return 0; - } - } - $l = $this->lengthIndicator($item['mode'], $version); - $m = 1 << $l; - $num = (int)(($item['size'] + $m - 1) / $m); - $bits += $num * (4 + $l); - } - return $bits; - } - - /** - * estimateVersion - * @param array $items - * @return int version - */ - protected function estimateVersion($items) { - $version = 0; - $prev = 0; - do { - $prev = $version; - $bits = $this->estimateBitStreamSize($items, $prev); - $version = $this->getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if ($version < 0) { - return -1; - } - } while ($version > $prev); - return $version; - } - - /** - * lengthOfCode - * @param int $mode - * @param int $version - * @param int $bits - * @return int size - */ - protected function lengthOfCode($mode, $version, $bits) { - $payload = $bits - 4 - $this->lengthIndicator($mode, $version); - switch($mode) { - case QR_MODE_NM: { - $chunks = (int)($payload / 10); - $remain = $payload - $chunks * 10; - $size = $chunks * 3; - if ($remain >= 7) { - $size += 2; - } elseif ($remain >= 4) { - $size += 1; - } - break; - } - case QR_MODE_AN: { - $chunks = (int)($payload / 11); - $remain = $payload - $chunks * 11; - $size = $chunks * 2; - if ($remain >= 6) { - ++$size; - } - break; - } - case QR_MODE_8B: { - $size = (int)($payload / 8); - break; - } - case QR_MODE_KJ: { - $size = (int)(($payload / 13) * 2); - break; - } - case QR_MODE_ST: { - $size = (int)($payload / 8); - break; - } - default: { - $size = 0; - break; - } - } - $maxsize = $this->maximumWords($mode, $version); - if ($size < 0) { - $size = 0; - } - if ($size > $maxsize) { - $size = $maxsize; - } - return $size; - } - - /** - * createBitStream - * @param array $items - * @return array of items and total bits - */ - protected function createBitStream($items) { - $total = 0; - foreach ($items as $key => $item) { - $items[$key] = $this->encodeBitStream($item, $this->version); - $bits = count($items[$key]['bstream']); - $total += $bits; - } - return array($items, $total); - } - - /** - * convertData - * @param array $items - * @return array items - */ - protected function convertData($items) { - $ver = $this->estimateVersion($items); - if ($ver > $this->version) { - $this->version = $ver; - } - for (;;) { - $cbs = $this->createBitStream($items); - $items = $cbs[0]; - $bits = $cbs[1]; - if ($bits < 0) { - return -1; - } - $ver = $this->getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if ($ver < 0) { - return -1; - } elseif ($ver > $this->version) { - $this->version = $ver; - } else { - break; - } - } - return $items; - } - - /** - * Append Padding Bit to bitstream - * @param array $bstream - * @return array bitstream - */ - protected function appendPaddingBit($bstream) { - $bits = count($bstream); - $maxwords = $this->getDataLength($this->version, $this->level); - $maxbits = $maxwords * 8; - if ($maxbits == $bits) { - return 0; - } - if ($maxbits - $bits < 5) { - return $this->appendNum($bstream, $maxbits - $bits, 0); - } - $bits += 4; - $words = (int)(($bits + 7) / 8); - $padding = array(); - $padding = $this->appendNum($padding, $words * 8 - $bits + 4, 0); - $padlen = $maxwords - $words; - if ($padlen > 0) { - $padbuf = array(); - for ($i=0; $i<$padlen; ++$i) { - $padbuf[$i] = ($i&1)?0x11:0xec; - } - $padding = $this->appendBytes($padding, $padlen, $padbuf); - } - return $this->appendBitstream($bstream, $padding); - } - - /** - * mergeBitStream - * @param array $bstream - * @return array bitstream - */ - protected function mergeBitStream($items) { - $items = $this->convertData($items); - $bstream = array(); - foreach ($items as $item) { - $bstream = $this->appendBitstream($bstream, $item['bstream']); - } - return $bstream; - } - - /** - * Returns a stream of bits. - * @param int $items - * @return array padded merged byte stream - */ - protected function getBitStream($items) { - $bstream = $this->mergeBitStream($items); - return $this->appendPaddingBit($bstream); - } - - /** - * Pack all bit streams padding bits into a byte array. - * @param int $items - * @return array padded merged byte stream - */ - protected function getByteStream($items) { - $bstream = $this->getBitStream($items); - return $this->bitstreamToByte($bstream); - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRbitstream - - /** - * Return an array with zeros - * @param int $setLength array size - * @return array - */ - protected function allocate($setLength) { - return array_fill(0, $setLength, 0); - } - - /** - * Return new bitstream from number - * @param int $bits number of bits - * @param int $num number - * @return array bitstream - */ - protected function newFromNum($bits, $num) { - $bstream = $this->allocate($bits); - $mask = 1 << ($bits - 1); - for ($i=0; $i<$bits; ++$i) { - if ($num & $mask) { - $bstream[$i] = 1; - } else { - $bstream[$i] = 0; - } - $mask = $mask >> 1; - } - return $bstream; - } - - /** - * Return new bitstream from bytes - * @param int $size size - * @param array $data bytes - * @return array bitstream - */ - protected function newFromBytes($size, $data) { - $bstream = $this->allocate($size * 8); - $p=0; - for ($i=0; $i<$size; ++$i) { - $mask = 0x80; - for ($j=0; $j<8; ++$j) { - if ($data[$i] & $mask) { - $bstream[$p] = 1; - } else { - $bstream[$p] = 0; - } - $p++; - $mask = $mask >> 1; - } - } - return $bstream; - } - - /** - * Append one bitstream to another - * @param array $bitstream original bitstream - * @param array $append bitstream to append - * @return array bitstream - */ - protected function appendBitstream($bitstream, $append) { - if ((!is_array($append)) OR (count($append) == 0)) { - return $bitstream; - } - if (count($bitstream) == 0) { - return $append; - } - return array_values(array_merge($bitstream, $append)); - } - - /** - * Append one bitstream created from number to another - * @param array $bitstream original bitstream - * @param int $bits number of bits - * @param int $num number - * @return array bitstream - */ - protected function appendNum($bitstream, $bits, $num) { - if ($bits == 0) { - return 0; - } - $b = $this->newFromNum($bits, $num); - return $this->appendBitstream($bitstream, $b); - } - - /** - * Append one bitstream created from bytes to another - * @param array $bitstream original bitstream - * @param int $size size - * @param array $data bytes - * @return array bitstream - */ - protected function appendBytes($bitstream, $size, $data) { - if ($size == 0) { - return 0; - } - $b = $this->newFromBytes($size, $data); - return $this->appendBitstream($bitstream, $b); - } - - /** - * Convert bitstream to bytes - * @param array $bitstream original bitstream - * @return array of bytes - */ - protected function bitstreamToByte($bstream) { - $size = count($bstream); - if ($size == 0) { - return array(); - } - $data = array_fill(0, (int)(($size + 7) / 8), 0); - $bytes = (int)($size / 8); - $p = 0; - for ($i=0; $i<$bytes; $i++) { - $v = 0; - for ($j=0; $j<8; $j++) { - $v = $v << 1; - $v |= $bstream[$p]; - $p++; - } - $data[$i] = $v; - } - if ($size & 7) { - $v = 0; - for ($j=0; $j<($size & 7); $j++) { - $v = $v << 1; - $v |= $bstream[$p]; - $p++; - } - $data[$bytes] = $v; - } - return $data; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRspec - - /** - * Replace a value on the array at the specified position - * @param array $srctab - * @param int $x X position - * @param int $y Y position - * @param string $repl value to replace - * @param int $replLen length of the repl string - * @return array srctab - */ - protected function qrstrset($srctab, $x, $y, $repl, $replLen=false) { - $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); - return $srctab; - } - - /** - * Return maximum data code length (bytes) for the version. - * @param int $version version - * @param int $level error correction level - * @return int maximum size (bytes) - */ - protected function getDataLength($version, $level) { - return $this->capacity[$version][QRCAP_WORDS] - $this->capacity[$version][QRCAP_EC][$level]; - } - - /** - * Return maximum error correction code length (bytes) for the version. - * @param int $version version - * @param int $level error correction level - * @return int ECC size (bytes) - */ - protected function getECCLength($version, $level){ - return $this->capacity[$version][QRCAP_EC][$level]; - } - - /** - * Return the width of the symbol for the version. - * @param int $version version - * @return int width - */ - protected function getWidth($version) { - return $this->capacity[$version][QRCAP_WIDTH]; - } - - /** - * Return the numer of remainder bits. - * @param int $version version - * @return int number of remainder bits - */ - protected function getRemainder($version) { - return $this->capacity[$version][QRCAP_REMINDER]; - } - - /** - * Return a version number that satisfies the input code length. - * @param int $size input code length (byte) - * @param int $level error correction level - * @return int version number - */ - protected function getMinimumVersion($size, $level) { - for ($i=1; $i <= QRSPEC_VERSION_MAX; ++$i) { - $words = $this->capacity[$i][QRCAP_WORDS] - $this->capacity[$i][QRCAP_EC][$level]; - if ($words >= $size) { - return $i; - } - } - return -1; - } - - /** - * Return the size of length indicator for the mode and version. - * @param int $mode encoding mode - * @param int $version version - * @return int the size of the appropriate length indicator (bits). - */ - protected function lengthIndicator($mode, $version) { - if ($mode == QR_MODE_ST) { - return 0; - } - if ($version <= 9) { - $l = 0; - } elseif ($version <= 26) { - $l = 1; - } else { - $l = 2; - } - return $this->lengthTableBits[$mode][$l]; - } - - /** - * Return the maximum length for the mode and version. - * @param int $mode encoding mode - * @param int $version version - * @return int the maximum length (bytes) - */ - protected function maximumWords($mode, $version) { - if ($mode == QR_MODE_ST) { - return 3; - } - if ($version <= 9) { - $l = 0; - } else if ($version <= 26) { - $l = 1; - } else { - $l = 2; - } - $bits = $this->lengthTableBits[$mode][$l]; - $words = (1 << $bits) - 1; - if ($mode == QR_MODE_KJ) { - $words *= 2; // the number of bytes is required - } - return $words; - } - - /** - * Return an array of ECC specification. - * @param int $version version - * @param int $level error correction level - * @param array $spec an array of ECC specification contains as following: {# of type1 blocks, # of data code, # of ecc code, # of type2 blocks, # of data code} - * @return array spec - */ - protected function getEccSpec($version, $level, $spec) { - if (count($spec) < 5) { - $spec = array(0, 0, 0, 0, 0); - } - $b1 = $this->eccTable[$version][$level][0]; - $b2 = $this->eccTable[$version][$level][1]; - $data = $this->getDataLength($version, $level); - $ecc = $this->getECCLength($version, $level); - if ($b2 == 0) { - $spec[0] = $b1; - $spec[1] = (int)($data / $b1); - $spec[2] = (int)($ecc / $b1); - $spec[3] = 0; - $spec[4] = 0; - } else { - $spec[0] = $b1; - $spec[1] = (int)($data / ($b1 + $b2)); - $spec[2] = (int)($ecc / ($b1 + $b2)); - $spec[3] = $b2; - $spec[4] = $spec[1] + 1; - } - return $spec; - } - - /** - * Put an alignment marker. - * @param array $frame frame - * @param int $width width - * @param int $ox X center coordinate of the pattern - * @param int $oy Y center coordinate of the pattern - * @return array frame - */ - protected function putAlignmentMarker($frame, $ox, $oy) { - $finder = array( - "\xa1\xa1\xa1\xa1\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa0\xa1\xa0\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa1\xa1\xa1\xa1" - ); - $yStart = $oy - 2; - $xStart = $ox - 2; - for ($y=0; $y < 5; $y++) { - $frame = $this->qrstrset($frame, $xStart, $yStart+$y, $finder[$y]); - } - return $frame; - } - - /** - * Put an alignment pattern. - * @param int $version version - * @param array $fram frame - * @param int $width width - * @return array frame - */ - protected function putAlignmentPattern($version, $frame, $width) { - if ($version < 2) { - return $frame; - } - $d = $this->alignmentPattern[$version][1] - $this->alignmentPattern[$version][0]; - if ($d < 0) { - $w = 2; - } else { - $w = (int)(($width - $this->alignmentPattern[$version][0]) / $d + 2); - } - if ($w * $w - 3 == 1) { - $x = $this->alignmentPattern[$version][0]; - $y = $this->alignmentPattern[$version][0]; - $frame = $this->putAlignmentMarker($frame, $x, $y); - return $frame; - } - $cx = $this->alignmentPattern[$version][0]; - $wo = $w - 1; - for ($x=1; $x < $wo; ++$x) { - $frame = $this->putAlignmentMarker($frame, 6, $cx); - $frame = $this->putAlignmentMarker($frame, $cx, 6); - $cx += $d; - } - $cy = $this->alignmentPattern[$version][0]; - for ($y=0; $y < $wo; ++$y) { - $cx = $this->alignmentPattern[$version][0]; - for ($x=0; $x < $wo; ++$x) { - $frame = $this->putAlignmentMarker($frame, $cx, $cy); - $cx += $d; - } - $cy += $d; - } - return $frame; - } - - /** - * Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. Use lower 18 bits. - * @param int $version version - * @return BCH encoded version information pattern - */ - protected function getVersionPattern($version) { - if (($version < 7) OR ($version > QRSPEC_VERSION_MAX)) { - return 0; - } - return $this->versionPattern[($version - 7)]; - } - - /** - * Return BCH encoded format information pattern. - * @param array $mask - * @param int $level error correction level - * @return BCH encoded format information pattern - */ - protected function getFormatInfo($mask, $level) { - if (($mask < 0) OR ($mask > 7)) { - return 0; - } - if (($level < 0) OR ($level > 3)) { - return 0; - } - return $this->formatInfo[$level][$mask]; - } - - /** - * Put a finder pattern. - * @param array $frame frame - * @param int $width width - * @param int $ox X center coordinate of the pattern - * @param int $oy Y center coordinate of the pattern - * @return array frame - */ - protected function putFinderPattern($frame, $ox, $oy) { - $finder = array( - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" - ); - for ($y=0; $y < 7; $y++) { - $frame = $this->qrstrset($frame, $ox, ($oy + $y), $finder[$y]); - } - return $frame; - } - - /** - * Return a copy of initialized frame. - * @param int $version version - * @return Array of unsigned char. - */ - protected function createFrame($version) { - $width = $this->capacity[$version][QRCAP_WIDTH]; - $frameLine = str_repeat ("\0", $width); - $frame = array_fill(0, $width, $frameLine); - // Finder pattern - $frame = $this->putFinderPattern($frame, 0, 0); - $frame = $this->putFinderPattern($frame, $width - 7, 0); - $frame = $this->putFinderPattern($frame, 0, $width - 7); - // Separator - $yOffset = $width - 7; - for ($y=0; $y < 7; ++$y) { - $frame[$y][7] = "\xc0"; - $frame[$y][$width - 8] = "\xc0"; - $frame[$yOffset][7] = "\xc0"; - ++$yOffset; - } - $setPattern = str_repeat("\xc0", 8); - $frame = $this->qrstrset($frame, 0, 7, $setPattern); - $frame = $this->qrstrset($frame, $width-8, 7, $setPattern); - $frame = $this->qrstrset($frame, 0, $width - 8, $setPattern); - // Format info - $setPattern = str_repeat("\x84", 9); - $frame = $this->qrstrset($frame, 0, 8, $setPattern); - $frame = $this->qrstrset($frame, $width - 8, 8, $setPattern, 8); - $yOffset = $width - 8; - for ($y=0; $y < 8; ++$y,++$yOffset) { - $frame[$y][8] = "\x84"; - $frame[$yOffset][8] = "\x84"; - } - // Timing pattern - $wo = $width - 15; - for ($i=1; $i < $wo; ++$i) { - $frame[6][7+$i] = chr(0x90 | ($i & 1)); - $frame[7+$i][6] = chr(0x90 | ($i & 1)); - } - // Alignment pattern - $frame = $this->putAlignmentPattern($version, $frame, $width); - // Version information - if ($version >= 7) { - $vinf = $this->getVersionPattern($version); - $v = $vinf; - for ($x=0; $x<6; ++$x) { - for ($y=0; $y<3; ++$y) { - $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - $v = $vinf; - for ($y=0; $y<6; ++$y) { - for ($x=0; $x<3; ++$x) { - $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - } - // and a little bit... - $frame[$width - 8][8] = "\x81"; - return $frame; - } - - /** - * Set new frame for the specified version. - * @param int $version version - * @return Array of unsigned char. - */ - protected function newFrame($version) { - if (($version < 1) OR ($version > QRSPEC_VERSION_MAX)) { - return NULL; - } - if (!isset($this->frames[$version])) { - $this->frames[$version] = $this->createFrame($version); - } - if (is_null($this->frames[$version])) { - return NULL; - } - return $this->frames[$version]; - } - - /** - * Return block number 0 - * @param array $spec - * @return int value - */ - protected function rsBlockNum($spec) { - return ($spec[0] + $spec[3]); - } - - /** - * Return block number 1 - * @param array $spec - * @return int value - */ - protected function rsBlockNum1($spec) { - return $spec[0]; - } - - /** - * Return data codes 1 - * @param array $spec - * @return int value - */ - protected function rsDataCodes1($spec) { - return $spec[1]; - } - - /** - * Return ecc codes 1 - * @param array $spec - * @return int value - */ - protected function rsEccCodes1($spec) { - return $spec[2]; - } - - /** - * Return block number 2 - * @param array $spec - * @return int value - */ - protected function rsBlockNum2($spec) { - return $spec[3]; - } - - /** - * Return data codes 2 - * @param array $spec - * @return int value - */ - protected function rsDataCodes2($spec) { - return $spec[4]; - } - - /** - * Return ecc codes 2 - * @param array $spec - * @return int value - */ - protected function rsEccCodes2($spec) { - return $spec[2]; - } - - /** - * Return data length - * @param array $spec - * @return int value - */ - protected function rsDataLength($spec) { - return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); - } - - /** - * Return ecc length - * @param array $spec - * @return int value - */ - protected function rsEccLength($spec) { - return ($spec[0] + $spec[3]) * $spec[2]; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRrs - - /** - * Initialize a Reed-Solomon codec and add it to existing rsitems - * @param int $symsize symbol size, bits - * @param int $gfpoly Field generator polynomial coefficients - * @param int $fcr first root of RS code generator polynomial, index form - * @param int $prim primitive element to generate polynomial roots - * @param int $nroots RS code generator polynomial degree (number of roots) - * @param int $pad padding bytes at front of shortened block - * @return array Array of RS values:
    • mm = Bits per symbol;
    • nn = Symbols per block;
    • alpha_to = log lookup table array;
    • index_of = Antilog lookup table array;
    • genpoly = Generator polynomial array;
    • nroots = Number of generator;
    • roots = number of parity symbols;
    • fcr = First consecutive root, index form;
    • prim = Primitive element, index form;
    • iprim = prim-th root of 1, index form;
    • pad = Padding bytes in shortened block;
    • gfpoly
    . - */ - protected function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) { - foreach ($this->rsitems as $rs) { - if (($rs['pad'] != $pad) OR ($rs['nroots'] != $nroots) OR ($rs['mm'] != $symsize) - OR ($rs['gfpoly'] != $gfpoly) OR ($rs['fcr'] != $fcr) OR ($rs['prim'] != $prim)) { - continue; - } - return $rs; - } - $rs = $this->init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); - array_unshift($this->rsitems, $rs); - return $rs; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRrsItem - - /** - * modnn - * @param array RS values - * @param int $x X position - * @return int X osition - */ - protected function modnn($rs, $x) { - while ($x >= $rs['nn']) { - $x -= $rs['nn']; - $x = ($x >> $rs['mm']) + ($x & $rs['nn']); - } - return $x; - } - - /** - * Initialize a Reed-Solomon codec and returns an array of values. - * @param int $symsize symbol size, bits - * @param int $gfpoly Field generator polynomial coefficients - * @param int $fcr first root of RS code generator polynomial, index form - * @param int $prim primitive element to generate polynomial roots - * @param int $nroots RS code generator polynomial degree (number of roots) - * @param int $pad padding bytes at front of shortened block - * @return array Array of RS values:
    • mm = Bits per symbol;
    • nn = Symbols per block;
    • alpha_to = log lookup table array;
    • index_of = Antilog lookup table array;
    • genpoly = Generator polynomial array;
    • nroots = Number of generator;
    • roots = number of parity symbols;
    • fcr = First consecutive root, index form;
    • prim = Primitive element, index form;
    • iprim = prim-th root of 1, index form;
    • pad = Padding bytes in shortened block;
    • gfpoly
    . - */ - protected function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) { - // Based on Reed solomon encoder by Phil Karn, KA9Q (GNU-LGPLv2) - $rs = null; - // Check parameter ranges - if (($symsize < 0) OR ($symsize > 8)) { - return $rs; - } - if (($fcr < 0) OR ($fcr >= (1<<$symsize))) { - return $rs; - } - if (($prim <= 0) OR ($prim >= (1<<$symsize))) { - return $rs; - } - if (($nroots < 0) OR ($nroots >= (1<<$symsize))) { - return $rs; - } - if (($pad < 0) OR ($pad >= ((1<<$symsize) -1 - $nroots))) { - return $rs; - } - $rs = array(); - $rs['mm'] = $symsize; - $rs['nn'] = (1 << $symsize) - 1; - $rs['pad'] = $pad; - $rs['alpha_to'] = array_fill(0, ($rs['nn'] + 1), 0); - $rs['index_of'] = array_fill(0, ($rs['nn'] + 1), 0); - // PHP style macro replacement ;) - $NN =& $rs['nn']; - $A0 =& $NN; - // Generate Galois field lookup tables - $rs['index_of'][0] = $A0; // log(zero) = -inf - $rs['alpha_to'][$A0] = 0; // alpha**-inf = 0 - $sr = 1; - for ($i=0; $i<$rs['nn']; ++$i) { - $rs['index_of'][$sr] = $i; - $rs['alpha_to'][$i] = $sr; - $sr <<= 1; - if ($sr & (1 << $symsize)) { - $sr ^= $gfpoly; - } - $sr &= $rs['nn']; - } - if ($sr != 1) { - // field generator polynomial is not primitive! - return NULL; - } - // Form RS code generator polynomial from its roots - $rs['genpoly'] = array_fill(0, ($nroots + 1), 0); - $rs['fcr'] = $fcr; - $rs['prim'] = $prim; - $rs['nroots'] = $nroots; - $rs['gfpoly'] = $gfpoly; - // Find prim-th root of 1, used in decoding - for ($iprim=1; ($iprim % $prim) != 0; $iprim += $rs['nn']) { - ; // intentional empty-body loop! - } - $rs['iprim'] = (int)($iprim / $prim); - $rs['genpoly'][0] = 1; - - - for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { - $rs['genpoly'][$i+1] = 1; - // Multiply rs->genpoly[] by @**(root + x) - for ($j = $i; $j > 0; --$j) { - if ($rs['genpoly'][$j] != 0) { - $rs['genpoly'][$j] = $rs['genpoly'][$j-1] ^ $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][$j]] + $root)]; - } else { - $rs['genpoly'][$j] = $rs['genpoly'][$j-1]; - } - } - // rs->genpoly[0] can never be zero - $rs['genpoly'][0] = $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][0]] + $root)]; - } - // convert rs->genpoly[] to index form for quicker encoding - for ($i = 0; $i <= $nroots; ++$i) { - $rs['genpoly'][$i] = $rs['index_of'][$rs['genpoly'][$i]]; - } - return $rs; - } - - /** - * Encode a Reed-Solomon codec and returns the parity array - * @param array $rs RS values - * @param array $data data - * @param array $parity parity - * @return parity array - */ - protected function encode_rs_char($rs, $data, $parity) { - $MM =& $rs['mm']; // bits per symbol - $NN =& $rs['nn']; // the total number of symbols in a RS block - $ALPHA_TO =& $rs['alpha_to']; // the address of an array of NN elements to convert Galois field elements in index (log) form to polynomial form - $INDEX_OF =& $rs['index_of']; // the address of an array of NN elements to convert Galois field elements in polynomial form to index (log) form - $GENPOLY =& $rs['genpoly']; // an array of NROOTS+1 elements containing the generator polynomial in index form - $NROOTS =& $rs['nroots']; // the number of roots in the RS code generator polynomial, which is the same as the number of parity symbols in a block - $FCR =& $rs['fcr']; // first consecutive root, index form - $PRIM =& $rs['prim']; // primitive element, index form - $IPRIM =& $rs['iprim']; // prim-th root of 1, index form - $PAD =& $rs['pad']; // the number of pad symbols in a block - $A0 =& $NN; - $parity = array_fill(0, $NROOTS, 0); - for ($i=0; $i < ($NN - $NROOTS - $PAD); $i++) { - $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; - if ($feedback != $A0) { - // feedback term is non-zero - // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must - // always be for the polynomials constructed by init_rs() - $feedback = $this->modnn($rs, $NN - $GENPOLY[$NROOTS] + $feedback); - for ($j=1; $j < $NROOTS; ++$j) { - $parity[$j] ^= $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[($NROOTS - $j)])]; - } - } - // Shift - array_shift($parity); - if ($feedback != $A0) { - array_push($parity, $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[0])]); - } else { - array_push($parity, 0); - } - } - return $parity; - } - - } // end QRcode class - -} // END OF "class_exists QRcode" -?> diff --git a/vendor/phpqrcode/cache/.listing b/vendor/phpqrcode/cache/.listing deleted file mode 100644 index e27571d6f..000000000 --- a/vendor/phpqrcode/cache/.listing +++ /dev/null @@ -1,90 +0,0 @@ -drwxr-xr-x 10 10046 10046 4096 Oct 25 11:32 . -drwxr-xr-x 5 10046 10046 4096 Oct 25 11:32 .. --rw-rw-rw- 1 10046 10046 97 Oct 25 11:32 frame_1.dat --rw-rw-rw- 1 10046 10046 126 Oct 25 11:29 frame_1.png --rw-rw-rw- 1 10046 10046 204 Oct 25 11:29 frame_10.dat --rw-rw-rw- 1 10046 10046 202 Oct 25 11:29 frame_10.png --rw-rw-rw- 1 10046 10046 210 Oct 25 11:29 frame_11.dat --rw-rw-rw- 1 10046 10046 205 Oct 25 11:29 frame_11.png --rw-rw-rw- 1 10046 10046 222 Oct 25 11:31 frame_12.dat --rw-rw-rw- 1 10046 10046 216 Oct 25 11:31 frame_12.png --rw-rw-rw- 1 10046 10046 223 Oct 25 11:32 frame_13.dat --rw-rw-rw- 1 10046 10046 210 Oct 25 11:29 frame_13.png --rw-rw-rw- 1 10046 10046 227 Oct 25 11:32 frame_14.dat --rw-rw-rw- 1 10046 10046 213 Oct 25 11:31 frame_14.png --rw-rw-rw- 1 10046 10046 242 Oct 25 11:29 frame_15.dat --rw-rw-rw- 1 10046 10046 219 Oct 25 11:29 frame_15.png --rw-rw-rw- 1 10046 10046 242 Oct 25 11:28 frame_16.dat --rw-rw-rw- 1 10046 10046 211 Oct 25 11:29 frame_16.png --rw-rw-rw- 1 10046 10046 237 Oct 25 11:32 frame_17.dat --rw-rw-rw- 1 10046 10046 211 Oct 25 11:29 frame_17.png --rw-rw-rw- 1 10046 10046 251 Oct 25 11:29 frame_18.dat --rw-rw-rw- 1 10046 10046 228 Oct 25 11:31 frame_18.png --rw-rw-rw- 1 10046 10046 259 Oct 25 11:29 frame_19.dat --rw-rw-rw- 1 10046 10046 225 Oct 25 11:28 frame_19.png --rw-rw-rw- 1 10046 10046 119 Oct 25 11:32 frame_2.dat --rw-rw-rw- 1 10046 10046 144 Oct 25 11:29 frame_2.png --rw-rw-rw- 1 10046 10046 250 Oct 25 11:32 frame_20.dat --rw-rw-rw- 1 10046 10046 225 Oct 25 11:29 frame_20.png --rw-rw-rw- 1 10046 10046 260 Oct 25 11:29 frame_21.dat --rw-rw-rw- 1 10046 10046 235 Oct 25 11:30 frame_21.png --rw-rw-rw- 1 10046 10046 274 Oct 25 11:31 frame_22.dat --rw-rw-rw- 1 10046 10046 226 Oct 25 11:28 frame_22.png --rw-rw-rw- 1 10046 10046 264 Oct 25 11:31 frame_23.dat --rw-rw-rw- 1 10046 10046 220 Oct 25 11:32 frame_23.png --rw-rw-rw- 1 10046 10046 287 Oct 25 11:32 frame_24.dat --rw-rw-rw- 1 10046 10046 242 Oct 25 11:29 frame_24.png --rw-rw-rw- 1 10046 10046 278 Oct 25 11:29 frame_25.dat --rw-rw-rw- 1 10046 10046 242 Oct 25 11:29 frame_25.png --rw-rw-rw- 1 10046 10046 296 Oct 25 11:32 frame_26.dat --rw-rw-rw- 1 10046 10046 244 Oct 25 11:32 frame_26.png --rw-rw-rw- 1 10046 10046 284 Oct 25 11:31 frame_27.dat --rw-rw-rw- 1 10046 10046 237 Oct 25 11:29 frame_27.png --rw-rw-rw- 1 10046 10046 318 Oct 25 11:29 frame_28.dat --rw-rw-rw- 1 10046 10046 234 Oct 25 11:30 frame_28.png --rw-rw-rw- 1 10046 10046 309 Oct 25 11:28 frame_29.dat --rw-rw-rw- 1 10046 10046 232 Oct 25 11:30 frame_29.png --rw-rw-rw- 1 10046 10046 124 Oct 25 11:32 frame_3.dat --rw-rw-rw- 1 10046 10046 147 Oct 25 11:28 frame_3.png --rw-rw-rw- 1 10046 10046 324 Oct 25 11:31 frame_30.dat --rw-rw-rw- 1 10046 10046 255 Oct 25 11:28 frame_30.png --rw-rw-rw- 1 10046 10046 328 Oct 25 11:29 frame_31.dat --rw-rw-rw- 1 10046 10046 260 Oct 25 11:29 frame_31.png --rw-rw-rw- 1 10046 10046 329 Oct 25 11:29 frame_32.dat --rw-rw-rw- 1 10046 10046 262 Oct 25 11:29 frame_32.png --rw-rw-rw- 1 10046 10046 343 Oct 25 11:28 frame_33.dat --rw-rw-rw- 1 10046 10046 253 Oct 25 11:32 frame_33.png --rw-rw-rw- 1 10046 10046 331 Oct 25 11:29 frame_34.dat --rw-rw-rw- 1 10046 10046 256 Oct 25 11:28 frame_34.png --rw-rw-rw- 1 10046 10046 342 Oct 25 11:30 frame_35.dat --rw-rw-rw- 1 10046 10046 243 Oct 25 11:32 frame_35.png --rw-rw-rw- 1 10046 10046 370 Oct 25 11:29 frame_36.dat --rw-rw-rw- 1 10046 10046 272 Oct 25 11:28 frame_36.png --rw-rw-rw- 1 10046 10046 376 Oct 25 11:31 frame_37.dat --rw-rw-rw- 1 10046 10046 279 Oct 25 11:29 frame_37.png --rw-rw-rw- 1 10046 10046 358 Oct 25 11:31 frame_38.dat --rw-rw-rw- 1 10046 10046 279 Oct 25 11:31 frame_38.png --rw-rw-rw- 1 10046 10046 404 Oct 25 11:31 frame_39.dat --rw-rw-rw- 1 10046 10046 264 Oct 25 11:29 frame_39.png --rw-rw-rw- 1 10046 10046 129 Oct 25 11:32 frame_4.dat --rw-rw-rw- 1 10046 10046 149 Oct 25 11:32 frame_4.png --rw-rw-rw- 1 10046 10046 406 Oct 25 11:28 frame_40.dat --rw-rw-rw- 1 10046 10046 267 Oct 25 11:32 frame_40.png --rw-rw-rw- 1 10046 10046 131 Oct 25 11:31 frame_5.dat --rw-rw-rw- 1 10046 10046 150 Oct 25 11:29 frame_5.png --rw-rw-rw- 1 10046 10046 132 Oct 25 11:29 frame_6.dat --rw-rw-rw- 1 10046 10046 151 Oct 25 11:29 frame_6.png --rw-rw-rw- 1 10046 10046 196 Oct 25 11:29 frame_7.dat --rw-rw-rw- 1 10046 10046 189 Oct 25 11:32 frame_7.png --rw-rw-rw- 1 10046 10046 201 Oct 25 11:29 frame_8.dat --rw-rw-rw- 1 10046 10046 204 Oct 25 11:28 frame_8.png --rw-rw-rw- 1 10046 10046 206 Oct 25 11:31 frame_9.dat --rw-rw-rw- 1 10046 10046 199 Oct 25 11:30 frame_9.png -drwxr-xr-x 2 10046 10046 4096 Oct 25 11:29 mask_0 -drwxr-xr-x 2 10046 10046 4096 Oct 25 11:31 mask_1 -drwxr-xr-x 2 10046 10046 4096 Oct 25 11:31 mask_2 -drwxr-xr-x 2 10046 10046 4096 Oct 25 11:30 mask_3 -drwxr-xr-x 2 10046 10046 4096 Oct 25 11:32 mask_4 -drwxr-xr-x 2 10046 10046 4096 Oct 25 11:32 mask_5 -drwxr-xr-x 2 10046 10046 4096 Oct 25 11:28 mask_6 -drwxr-xr-x 2 10046 10046 4096 Oct 25 11:30 mask_7 diff --git a/vendor/phpqrcode/cache/frame_1.dat b/vendor/phpqrcode/cache/frame_1.dat deleted file mode 100644 index be28feac4..000000000 --- a/vendor/phpqrcode/cache/frame_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -xڝ E9u`"PńC牗T!0$ -EɲQmh۾9{kI" 9Ln)Ap־>^zmnŖ;mn \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_1.png b/vendor/phpqrcode/cache/frame_1.png deleted file mode 100644 index 86ce6e98d8cf7071291d5e5bb39bc3080511c8b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 126 zcmeAS@N?(olHy`uVBq!ia0vp^q9Dx33?wJtG`|X@*aCb)T!Hle|NocXoPQU{GWK+F z45^rtobc!Hfq>uNnVVn7Gg`2HlysJm`1k++!4KjchA)1}^Yl3E66=VaXwbng!p`vB WU-#~W{*xdZ7(8A5T-G@yGywobm@6p& diff --git a/vendor/phpqrcode/cache/frame_10.dat b/vendor/phpqrcode/cache/frame_10.dat deleted file mode 100644 index aff163f6882e1c842881c539160539ee97221e5b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 204 zcmV;-05ku1+U=K34ul{KMqP93Nm#TyxdGe+ZZ`bX2|6GY6RiCuCX1^|Hy)_wA3>UwXVkes{2iDcbZs(b-_ G?>v^)7G+HU diff --git a/vendor/phpqrcode/cache/frame_10.png b/vendor/phpqrcode/cache/frame_10.png deleted file mode 100644 index dbfcd70b588c9cc508d210d761ca285c962e70c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^mLSZ?3?#Q*6Fdf_*aCb)T!Hle|NocXoPQU{s`qqp z45^rNcH&0P1_Kcn{i)eEQ&eWabo5TEo z<(=q;l{2~SNFHOk7+K+Z++>o}0+W;js(lQ_L5J;4XHRbpJ@7EKSbjtGxs>0TanIFf yTerS?Jf(G)Wt_o(rC4{V)qPjP^(|O~A28=0dj4ToPRUb}EH+ z?=;|LU8z+!qM$&p(|BcWyT^0wyzYLMW@>oYiN^Dsz8hTJ4a-aiVeGGljlcQ?PgyF*WC@)ePT+&@l!`0?ief1~n6 zE|yl^gW5e`nKwIinOvP@sie!fPIxQBN@sPwvjzdvtR(AR7bMPLqt$5hLLY|jw(O$c@esqcjU~XWxX2%DQ}j2 Ypk>~2FWzvVWdEB3>HkBaKPQDn?w1{Br2qf` diff --git a/vendor/phpqrcode/cache/frame_12.png b/vendor/phpqrcode/cache/frame_12.png deleted file mode 100644 index 8ba67822cdbeb547858ff6fc50cacee24a1b7d39..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^jv&m)3?#Q$MzaAawg8_HS0MfW|No^o=iddgdOckn zLn`JZC;Z`O`p;)zaHT2o|6@ssn1en08x5|_?@qWT|MUNU=7X>P-D6i`V>=dLP>_)D zgJ10T|NV^*^<88qe3j=qkQ8w3g4pi>{%_LN%!j{MZKyvjEwPU&^5g&i?aJMXS9tf# z))chnOn-VfGWh@Dzii+24R{?7GfXmbNLp7=x~^a^N0{!Mqa4YM488*Y@7T!EMuc4o**_dv29=tg%zuR9}#CwLe ZF7lm6+oM%3(p}KSMZA}4^aZ5yN}69FYBT@< diff --git a/vendor/phpqrcode/cache/frame_13.png b/vendor/phpqrcode/cache/frame_13.png deleted file mode 100644 index 6e49d35a02fdca84cbce7cbdcc4455a8f6c7a3bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^t{}|F3?$W@cV+=8wg8_Hkl_FS|CipJe;3GV_jGX# zshD$j(m~D!10L6U|G3>D>;fX{1#EjgrWdpJzq`==!Zpb!r-Z@r!+bgW{TFJO+!qN- zO!?Nbz~r}2caWn=<;hYT--4|xm^^H6ZOHEH)LZFp|21ezZE(M-7khSp>&l1M=G~k7 z```Ke>ZO4uStq~s?ri>iZOio6Z8x~5aew=^?BI!1D~3ap?Te2HrSt=x#Ng@b=d#Wz Gp$P!f)Kr=P diff --git a/vendor/phpqrcode/cache/frame_14.dat b/vendor/phpqrcode/cache/frame_14.dat deleted file mode 100644 index e9ae093296aa29fab5e9902b6f08c589fb0ada98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 227 zcmV<90382#+U=M@3dA4`MZ5Oa11^$Xy@B3DZ#HVvL77flO`r_qyJ{$pN0cm*QcbkW zOb{?`fMilEnI}OcLM9cXSrSxIB``^d*Q8K#Sp&p|blj)ly$_eQu1|D#ZtYL-`P`_v z&)r4JoKwyYFt*0oxjyAsirGHbg&iU}F_Jo|lREvc)7@EgS~DZ_@w7&yaPY@qP1;GU zPx{8yNuAV5=eW*sedFq+PER-?LOv2s0FYrKP6Y+uPUG`wUqQUsGc*0ziH*;3-ma%} dV(p*WKJj*9?cGU|IJ?7+#M);zc>`M4w|A(xa#R2S diff --git a/vendor/phpqrcode/cache/frame_14.png b/vendor/phpqrcode/cache/frame_14.png deleted file mode 100644 index efc36c034f1a851498e5afad249adcce3d9fb04a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 213 zcmeAS@N?(olHy`uVBq!ia0vp^o*>M~3?#kx&YTaV*aCb)T!Hle|NocXoPQU{>hg4P z45^rNchW}Q1_K_Jxm}Srn$(yB6x19;G$JQ*YGh^#@P1G+>r7-mB7W`V*G+#Woopx# zaXH*8JW=$>j6!jp4LdeJ%jrLRbWNrUPz|e%?4;ffl``SFGrY?`?QLBi&=CD)URb+W z;hsD0-;#Cz-B}wlN7VYo-djpFrLW5Bvr5*ct<9@=upq-IF3r5?k;t7x_kgZq@O1Ta JS?83{1OWKuRWASl diff --git a/vendor/phpqrcode/cache/frame_15.dat b/vendor/phpqrcode/cache/frame_15.dat deleted file mode 100644 index 18727818d76dba4873f5993f6c9ba948ca4646af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 242 zcmV zjE0Ef4oN1(k{KEk$4bexVm9YiXdC56v{3T$rBr2ZX>#9!_g z`B^`!y7Nq9&A4060Wo%qv*Ufsu{CCYT^E&9np3604Q_DzFE?pw^~|@kYVIa#&+I*` zl@Y;Kkq??`U*qt@M8@#wp?=9QD&F@s(Gu5We?xHWW={>BMTjUwEzGB diff --git a/vendor/phpqrcode/cache/frame_15.png b/vendor/phpqrcode/cache/frame_15.png deleted file mode 100644 index a9f416c7cf6d12d66b42288ca30634bd231620ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 219 zcmeAS@N?(olHy`uVBq!ia0vp^z97uV3?y$Jul@|A*aCb)T!Hle|NocXoPQU{n&9c; z7*a7OIpGgKW4(k#*1|KZ|Y7;q&c({geOlq6{l_|NsB~@BeOj2?=LKg_g#L z_90*X^SA8}*y`}CUV@?f(2QoEFV40{_R4EX?7Qw<^Koy}!|cERKm4zM{J-8+&^5^V zM2+FAWR7Cxrk}D0bN=>!U_F$7K!)M7p-w2XYph^ate~2LVYZ-;n}smLZ{Gt?94;j$ Q0^P>o>FVdQ&MBb@0G@4Fe*gdg diff --git a/vendor/phpqrcode/cache/frame_16.dat b/vendor/phpqrcode/cache/frame_16.dat deleted file mode 100644 index 60af67845..000000000 --- a/vendor/phpqrcode/cache/frame_16.dat +++ /dev/null @@ -1 +0,0 @@ -xA E]sIX;n6`qW6`%A/3!!g̡1N) E|;>6⸏97$c]kkw1[mC͜cR>E,hʼnp#xFyWVWG3+˓S}Ğ#G8b^c^cpc&3YQ"vk9܇} ĿQL/ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_16.png b/vendor/phpqrcode/cache/frame_16.png deleted file mode 100644 index 6ac8fe890573bd9ec52af39a315ac3ab4ea2821f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 211 zcmeAS@N?(olHy`uVBq!ia0vp^fgsGt3?wHw-Y5l9YymzYu0Z<#|Nl#G&c6#}b$Gfs zhE&W+PWZ#m$}S<1weXDnM;@Ma0pIRB@R(Uk#Imf`XJ1(VT~b2AdEtS^#)tMHfByex zYuj(|)!|#c1w;4Yo6V7boNcfCeZ$Lh|MkLuTKNe-qW;_ev6oobrMz06=bb#S{I8Dh zN*l`;cPanr7UAppFZhu8w7WuKxXRac9?ujuXHUG*!(qm7^gY)#$(yb3fo@{(boFyt I=akR{0Keo@^#A|> diff --git a/vendor/phpqrcode/cache/frame_17.dat b/vendor/phpqrcode/cache/frame_17.dat deleted file mode 100644 index 87f0cf593bab1049b794e2cd5af31a03aed5ae4e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 237 zcmV??y z+zk`^4Hi`JDI!!RUucn1n-C-N9Fb z^_i|y`igmlD_r3USGeLnfcpUE6|QiFD_o!A%FM(h?MeyC;;xkP+jach+JBqBM9KYfaSc^$Z&>9G^P0tbL9Kb? diff --git a/vendor/phpqrcode/cache/frame_17.png b/vendor/phpqrcode/cache/frame_17.png deleted file mode 100644 index 5b929ac736efe8f6d1985337c1177744c1269ea7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 211 zcmeAS@N?(olHy`uVBq!ia0vp^p&-o23?!MXtt5dITYyi9E0F&G|NqjP^X~##9iA?Z zAr*6y6aMhChD%6fCBE4#FAy~=;3R%V0whYqvPd*ASAoyV)#iDwF3O@+^;xolwc$WL45Dpax@=q3hFS3j3^ HP6<әt3;H#љt3Y+oghٽlnF>i^#awm;g~pgNs{6zp' \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_18.png b/vendor/phpqrcode/cache/frame_18.png deleted file mode 100644 index ee0d6a35e2e6a84e715d5eb5b4fdc9b5d2749abb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^ks!>-3?%c9O1%M6YymzYu0Z<#|Nl#G&c6#}&Gd9} z45^rtobZRAwO&R-A}euD{dY-;n8Z2%#V16aW903$A%y{rCU=?+2?S zoD&%`Zq?5?^Z!3DPkmyQ!<_#d4AUG7+P3l-Ff2$saPI&Ek5tBsDdq+>Yyb1R)Ia|J zpWl75<3-~We~dpEEmriJ=c8wIT*8-4vt+_y-iROtCy{xt9gWtVsEV2B>-_MFQnAED a3kLr4d-pH(c*O{GB!j1`pUXO@geCyv16v^g diff --git a/vendor/phpqrcode/cache/frame_19.dat b/vendor/phpqrcode/cache/frame_19.dat deleted file mode 100644 index 95e26adc1..000000000 --- a/vendor/phpqrcode/cache/frame_19.dat +++ /dev/null @@ -1,3 +0,0 @@ -xA - E.No7ћiiRN2W%x@ڜ' -u6.*S;}àT zrt%,};)ZLP$qgLdJ;w.]z#[͝Og" B}};w#1Gb;w_C+w@Dfu2N9R7|pWkk \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_19.png b/vendor/phpqrcode/cache/frame_19.png deleted file mode 100644 index 20fddd84c87b089846e770d1f605bb2ad7f57c71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^u^`OI3?%>V|Iq-X*aCb)T!Hle|NocXoPQU{n&#=^ z7*a9k?UaqYhYUnq&Wq-jC5YuSB#B&dnb|T?LRr=$Z_R}Tk2{2ZJNXJK?z>}STkBod zD!Ahe?+Y#-&W#RvJnw{;%)2x3`m?>pT<459AMQBAm|$4*AhL{Qjqyw_`&^NPya`bn zXJgWHCRV@tu;iM2+Sbh*zvtZi6J38hrG4+=)_Z5WUzM+1``TYoxK{mFuJ#L=ri0wm XqQq6W4|?kYUC7|+>gTe~DWM4f0svZN diff --git a/vendor/phpqrcode/cache/frame_2.dat b/vendor/phpqrcode/cache/frame_2.dat deleted file mode 100644 index 7e42f31ca..000000000 --- a/vendor/phpqrcode/cache/frame_2.dat +++ /dev/null @@ -1 +0,0 @@ -x͒ F{v& &Y+?Z1S'y!a815&۴HٞclF1#6 f6O7C֏8gIfB\DԻ( \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_2.png b/vendor/phpqrcode/cache/frame_2.png deleted file mode 100644 index 9c150ebe3c6343f6eb7549ec855a85c65de7604d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^k|4~;3?%=liz@&rwg8_HS0MfW|No^o=iddgTs>VJ zLn`JZC;X{zXk7U1e=Qr^_5b1%IX6fouV7|A3{)sB@vn(vQN$aEu-Zyy=Ewg(ur1JZ on5OM)8&Req;!^#!TfKm!>(UHx3vIVCg!03uy4-2eap diff --git a/vendor/phpqrcode/cache/frame_20.dat b/vendor/phpqrcode/cache/frame_20.dat deleted file mode 100644 index d5ecc1d8a0be752c422607ca863710fb41e89f29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 250 zcmb=p^>&so*I@;L*3I9pv5Fh-u3+BVd2h|XrM?Rygy#mlsE%yq{QN_rm3^kbraf_K zT{CJkWkNo9UY6CcnsV--^u zOJldbdLR|gckNx0zDb^tqE2c~fteS{QV^$$s-(VRP{&d+%}!k2n8hWL&;YFRNm@X@0pL0J~;%WB>pF diff --git a/vendor/phpqrcode/cache/frame_20.png b/vendor/phpqrcode/cache/frame_20.png deleted file mode 100644 index 23a061d5442e5950dc57ae4e3f754a72b18ff53a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^i6G3#3?%=YhPDX_8iU0msvcT2m((dUcsbb;eOISnHE*Dg<1ej05g z6TelqVW*J3LxB0VBTn;T9{U-YPuzYYm+{WVu)4`tCvuk0J$+=^JinE@{pYYme)_^G zRCKb+Ysa%PrSIR~y}9%L-~0HO`-ivRxp~21a(d3@Y0=B8FU(feo3S(D-WC(-B3)aC Yhx#Rc#-1{#fi7h5boFyt=akR{0I{51asU7T diff --git a/vendor/phpqrcode/cache/frame_21.dat b/vendor/phpqrcode/cache/frame_21.dat deleted file mode 100644 index 1974dd9d4..000000000 --- a/vendor/phpqrcode/cache/frame_21.dat +++ /dev/null @@ -1 +0,0 @@ -xA E]sIX;n6Upв]٘< i-eW)ŕ…H\jvqHL\6ЅrILܹ%@Vv(P4|Xngɝ~]Du1Us S\,2N?DKF-:eJ]p_,a0` X` w,` X]5 Y4{2vJs9)u۹,]^_7$_ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_21.png b/vendor/phpqrcode/cache/frame_21.png deleted file mode 100644 index 291598c72d21bac6548d649a4c0ae361a3f3c281..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 235 zcmeAS@N?(olHy`uVBq!ia0vp^sUXbA3?%b5?e76nYymzYu0Z<#|Nl#G&c6#}E%0=4 z45^s&c8Ve2Ap-%H>!P`J6Rz)A#2UEl5$}@DKW0@L!ESpLCP{0HM08I+w9mQHp{3|< z#uoLvV(f=)_!nr4*yb$UIO$8w3qQFZD{qDu=PBg(==aGzoAaDygT+2UZ#}`II(`@a zTfYDFcHhw_Mf$&32ite~e#^+LRiYnGe^u zy!rp1m#1E^%JI(s6AU`tXJpwn$-ff(mztmOBd(vL_Y+&&`mg^F|356yrZelFIO- 7p 7$}>ɷ7p tssrs Vmҹ}R~7&?7ԦIbh{<Mi- \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_23.png b/vendor/phpqrcode/cache/frame_23.png deleted file mode 100644 index b8f16ae239dd9f4c18c18191589b0f98e896c750..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^xggBQ3?wI-)rtZswg8_HS0MfW|No^o=idcMc)B=- zRLn_E_|wl2FCmdNaYwkl!49Ruey#-t=bLuQzgozl!F}cTUb(J&bqNVPt_=cgZT~$s z{jWFp<9dnv$v=0tgvgY49MfCbML0qY4m1n4Xi4n5_TOEBC(>kZ^AY#v;4+grFO{vO z&Rv<5>-tpA?P=FPcV6u)6IiDGIq|S3riwW=Ht_4NMYDR2t#y5Bw5WhlxO>L&-&1e; Q10BcU>FVdQ&MBb@0PfXRdH?_b diff --git a/vendor/phpqrcode/cache/frame_24.dat b/vendor/phpqrcode/cache/frame_24.dat deleted file mode 100644 index 7b92e29c4..000000000 --- a/vendor/phpqrcode/cache/frame_24.dat +++ /dev/null @@ -1 +0,0 @@ -xA EMX0;nVP4HSSxU3/O LiJ4V JC%6VR&DBHjDJ??BlcDZ'UXUޏ0ywįj똳3ścj{:GqGNv;笓J <]#8#8H'GqGtr:9#8#8ؓhNt_>teS^\gQe?vuo;>*wlm \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_24.png b/vendor/phpqrcode/cache/frame_24.png deleted file mode 100644 index 397c64f8533159fe3c792420d93cab3ec64c673c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^g&@qx3?y%CxHlO{u?6^qxB}__|Nk$&IsYz@wcOLi zF{EP7+o>CQ4;cu!o)=Bt;3dWH(5PX|Xd0Tbewt9=(giM&ioPz%uZwq_{AtYK_=L;b z-~axk|Ds~-#=Rctl_DS6E<4m{++hxOxW(*z(!L?xL2jbS`@Xaf{qGdGWmpvR5thb97@%;4$j=d#Wzp$Pzhc4tul diff --git a/vendor/phpqrcode/cache/frame_25.dat b/vendor/phpqrcode/cache/frame_25.dat deleted file mode 100644 index ba125182e..000000000 --- a/vendor/phpqrcode/cache/frame_25.dat +++ /dev/null @@ -1,3 +0,0 @@ -xA - s낋]rxY51mMBG -*Sx|Ua5ƵZ-,1HPRjX5iG>WR/+uT廯 ӯ嗴u[Sa[kv5+5nJ%+VXbŊ߬u'SRtzZ++VXbŊٟٟٟ+VXb}Ŋ+VXVI+kq[toVZvoNVw}{r<ýR"R] Wr} \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_25.png b/vendor/phpqrcode/cache/frame_25.png deleted file mode 100644 index 25bc4454afbe21949bfd01d1a8bbab713486ae65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^r6A163?#iy+587mYymzYu0Z<#|Nl#G&c6#}E%$VB z45^s&cB&%ZAqN51|5`cu2Qt4gsF-;4Ir?6nTp+=+Nr<&Ydrf9n!e{G{vpig`o@IAV zpT3{+yxVcXEa?kbazcxq6{lLB{}VM?`;*JP)#Y~fCz=^>mۚ?vmg?ұηdCUIkE\Msfafa>[sӈ9쬩ެ8b]LgEo w1 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_26.png b/vendor/phpqrcode/cache/frame_26.png deleted file mode 100644 index f4a6b393861525908d76f29c6d8a3bfc2ba4f747..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^l_1Q>3?$V}WIz&Z0X`wFK>Gjx|4VPqzYAoo^mK6y zshE?T@TZ^UpG-o+3Rkfo(&rC6=+gP1FW~!t-{pbx-~a#LB)q!sxL;FM;QZsxnjpG@X|Wc^3Whe7pc$LY4HynfX%(+id5E{n0v40R%_lqrDMPR_=K#Nbs1J=Z*FW%KHev5UH0bx zvhP3A?5`T{eKs|C?=(67e>XRlv;V$O{Jat(4^}wWvJV8GgET;O7Rx~3dn=g8x81kq zTBsYH(o>B~k(w6wdiUP<-~a4d_f^K|^b>jOg|*Ku{@y(>H?~&4sQTS6>xH+g>q>Tg S)BB(oTgzV+tiQ0S`YHfvkCqVt diff --git a/vendor/phpqrcode/cache/frame_27.png b/vendor/phpqrcode/cache/frame_27.png deleted file mode 100644 index 8419ec2301e8c0278f9f86d97417d51d3df000bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 237 zcmeAS@N?(olHy`uVBq!ia0vp^wIIyM3?#Su{YwKY3Z=Ttv zWf2y7&zVY?&I!gH*lL(C<3L-FqWk?PvhJVcioOWu?Vls-VEE&Jg0;|sb157vj!F0I zoFJt8?3CA*9ZT0UM?PxZcc8vtF);OXk;vd$@?2>|KWW^(`l diff --git a/vendor/phpqrcode/cache/frame_28.dat b/vendor/phpqrcode/cache/frame_28.dat deleted file mode 100644 index 8cbaa1961bed61c3d774192448857480eb49762f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 318 zcmb=p^>&UUU$cUMYi#vvHNCX5BIcc(ch)S(P&rt#xF_>o`BhIHdwqxJ`pXR0ab3O; zyhvzU>thM$uzdDevN_u7>@yw8*(S-Z(T=tZ`1|rey6L^W%k_%NF5F|Ui=6h%{9e%d zZ;qDSdF$l&FG(-^99&vHr#0ZpbjM5kK3J?R3cg=E!9=w8_VG%C;KB!IWDhW~88k5R zBz#a~TYLY*^54yi?c%-~`hWLu-)r%Km;K+Pv$J34CnoIU-@%{2z$^h(euDc6>nEnl zMr%QcZlKHrafo2K5)VwFf<8p>oeNCgzsZd&I##GMUwz`}E2+Yy_3mfghfV%>+;#2K w_7?4#@$=nu@tm|;Z8o*f=bqOl7=Ny{aυR-rn.ꯋ\T:*)|) , ,x_}:^RUoɢu~މX`XЏЏЏЏ_`X`XЏЏЏ_`X`XЏЏЏЏwbX`PU)D"c{z3<}^?bm잃a.] -{Q6uT,9 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_29.png b/vendor/phpqrcode/cache/frame_29.png deleted file mode 100644 index ffe072c868268ea77f05f71c17088021d549090d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^tsuP;BJn$?U}wS}0TXykDcgTe~DWM4fn*mjQ diff --git a/vendor/phpqrcode/cache/frame_3.dat b/vendor/phpqrcode/cache/frame_3.dat deleted file mode 100644 index 188d531c2..000000000 --- a/vendor/phpqrcode/cache/frame_3.dat +++ /dev/null @@ -1 +0,0 @@ -x E{v& &Y+bk'ya:TXl޶$W+ӏv9}gR@H0YPBEm?s"bt2cn:ﺭ;YzQ7 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_3.png b/vendor/phpqrcode/cache/frame_3.png deleted file mode 100644 index 945ee7cb993022c3ba0081cdd6b833b92395b30c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmeAS@N?(olHy`uVBq!ia0vp^vLMXJ3?y@6zxn_vwg8_HS0MfW|No^o=iddgJUm?- zLn`JZC;a)}-nj7F|NHzr>;C`eQV>iqJa$2VtqrL1f5H!Lr4wnjD-wRh|KHox`0@XB rt_3F@rfGYe5mn(<%W`B5%F}Pb9F^HI>YU!D_xBYq^}BRWJ#p5u$@O~+U60g$ z^ZZ%%C&E6_>--Dp^Lw@H{+B%qvQk^Qjp5k3r)$sId8T^L{8KD*Wwpx3yDA4+gnbMS zvP`Zw$-FB!Z`b@c+Rxs&eZ4X_H(t}zN!in)_Pe(B-kBwv{Vn`0k`1A%fm#-_F9E_Q zHV6?QtI7cc&w)*Z5ts^pmI@a>n)4-LQd5VAxSF@+|0}%z9_8)t4X9Z8-TGsS+L_O` o3*N2iKjl*T?_}Zp7w1|m>#S{6FV2w-Q4O5Cykv#>|8j$;0GhIr$^ZZW diff --git a/vendor/phpqrcode/cache/frame_30.png b/vendor/phpqrcode/cache/frame_30.png deleted file mode 100644 index 75dbddd2416814ef91b71363c859c3dbe86f0802..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^ogmD}3?!9ab#?(Mwg8_HS0MfW|No^o=iddgws^WY zhE&XXJ8dKHAp-$deb!SFYn&!CY6Q4UH4Jk7sONJ?V2XzJ1%+7_{OTQ#YUCIa<5O*I z@1FcVdoow(KLw+VEhS36DYCp#b}QPnZQP#yZF5>L_wIw#N8!&ZL32x5J2SZFRNT#W zJ+d{@@YEHq?4aMP=C-7+TKmm!p0e&81)Cc7+)G|xes$W5z3%q9Wf`gZcFvkf-|8dM zyYV櫷:ñA8-+mTbllltM&]ll&]Ill&]y 6` 6`iuyXWi\tz>.zk t77wJϔ4w҈85 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_31.png b/vendor/phpqrcode/cache/frame_31.png deleted file mode 100644 index b14d1fa267f229a5b21beb06401aaea3c7ee4673..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 260 zcmeAS@N?(olHy`uVBq!ia0vp^y&%lU3?w&9$bJT-*aCb)T!Hle|NocXoPQU{+Ue=y z7*a9k?X-=&hYSQ<^+j{d5~R!+0*%=60@{+AM5auc(!n|5PK2l6>q3RVA30i5E;U78 zzm!b-J6oUkrH>MO^Sih(w%FVJC(3=iBOLgbf7_Y;qQm^gYNmAkvubmKsBNb!r<>aC-Pn**9g*ߚ?aOkL_<[c>c˘uLI%#0#0#otѢ}4fv_)Eph5R881#0#0itZ#0#0#0itZ#0#0#0itZl0#09q"HܜHQ"L5}-Y׾k`>z鸳4&p!!`:5 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_32.png b/vendor/phpqrcode/cache/frame_32.png deleted file mode 100644 index 58d42db3c5b755228c7565cdf8128438559cfe1b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^6G51f8A$#VJCOjS*aCb)T!Hle|NocXoPQU{+U@D$ z7*a9k?X-=&hYSQ<^`{N~#na9iwuURu!V?k}}KG;`at7keZ6HBO!j zPFw%CYT8codjH_FpLqjK{?_pC(kM^0-qBFEG_3wrT<*O&_g>F?-&noh_CE9X8vcLx zZ-?L5c<5S4(d*MS%jL4aFL*KcmFQoSBb$x~rEe4WKl3d;RlhCaH-pl}T98i}JYD@< J);T3K0RZV1Z(9HW diff --git a/vendor/phpqrcode/cache/frame_33.dat b/vendor/phpqrcode/cache/frame_33.dat deleted file mode 100644 index a2613755a..000000000 --- a/vendor/phpqrcode/cache/frame_33.dat +++ /dev/null @@ -1,14 +0,0 @@ -xA a޺@n7+*L++柮bb*LCc kHrjJ5Yi~0_TT}e>5b_w͟?\Rai+7W\wLUNL -+ -+jOkc\˩|%o} 8 -+ -+ -+ 3g -+ -+ -+3g@ -+ -+ -+:RXB9I=ko/Swؘٯ`gr_ٙYVSYzIefnmQoz > \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_33.png b/vendor/phpqrcode/cache/frame_33.png deleted file mode 100644 index 924c728e0aa0b3c22b7537d833d53f072a923640..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 253 zcmV7LUZoG!D=_b+G>~XohCiGYUA3?`$qlQw=oFH)|?GM%W=ZP z?o-WP`{JCI-1j+kVd;lds9Q_l#)_e*e%!H*n2YxP(|eQ4yd?KKF7uLH<|VmLxpSZ$ z1MOt{Gd*JG7)eOIdQ#d>d~xt^_>>*JiBA`^i7E%w2i00000NkvXXu0mjf DAwYG& diff --git a/vendor/phpqrcode/cache/frame_34.dat b/vendor/phpqrcode/cache/frame_34.dat deleted file mode 100644 index 7ceb0259d4a6f14ad6d9e5d76eb87c07b034c711..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 331 zcmb=p_4bZoU$cP#>xCNzb)OE=JWTSu!=w6LqU*^gyy-W?Z;@;Fg>L`1=l-EkZ?iVvV?C0_X=i2_ zCW9G)ljhbgx7l(nwvgX`%e6^Q_5bh5(A^bzqxMK4)(Kt#i%i{@a^9b964fc@euQ;PW=~uiO$9&bgnPb zQZeW4^o^WMjsmX#U8f~jtBEBjv`tG?seT)Aq*3=qXXlI+_hnO3Z`!AqXdKG<^zh@1 z$2a89EJ`kxb5FQ`=(boyS7nhxxW0w*`IRj*&5GUQE?a*(lXrI>tApXq$M?>eXvpg? zJ7Dnt${M{rF8!;dRI6f&a!y#e`IJAq{!imf{LG6>4VD`%_D=Lmb(?#S3j3^P65% diff --git a/vendor/phpqrcode/cache/frame_35.dat b/vendor/phpqrcode/cache/frame_35.dat deleted file mode 100644 index 56bc3e28ee83b24767b00391773560ca842f0b44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 342 zcmb=p_4e+@yk-Lt)(dC;l&Z2-bJsJ}Gu4L)&k?(_Yz24S#B<8tYk0!l*-FIIBjt?0 zZ`YVyJa2n|_x3Zdk9bXgHfz^qygTh2XweY|A-_q!&2k4t`5 zdHt-uf3>=7$NxRcHpcK?YhPbowodr?x--Th*X`3@Jbts=sCI7N@2dT+b7tjn%l`^M?L^?B>}TrgGEWxv+gtv>&1 z^SpAXK9B(~H-km1?tx8$7`Ys%2q^kG_8{C6zxh|wzed(x`wSQ9yIX(x>6}yP9JAN? zaAi*~^7>i6``g|}l``+#Pxx*7Q>a$?+fMp@&Wq;Q9mQL}|JJ)V^U3dOv#MPg=?~>E Qwf>fGyj#QM-^sTe06Gf6oB#j- diff --git a/vendor/phpqrcode/cache/frame_35.png b/vendor/phpqrcode/cache/frame_35.png deleted file mode 100644 index d29806c6037dea38b05d8211a0a45c2e0c1ff1d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 243 zcmV69g+8T9FaOlD5lXr@5A{4g21 z`3F-KR1%=7ED2boeU%@kIrD;Vui5n8>omRhI!*7rPSbn8llib6 tcmDZ{$vZ*}#x^0hn~*mYfxOG)^abWznpY06{Y3x(002ovPDHLkV1fp`ZrcC= diff --git a/vendor/phpqrcode/cache/frame_36.dat b/vendor/phpqrcode/cache/frame_36.dat deleted file mode 100644 index 282c60d23bca6a7c3ac2c3da0744992f3415d8d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 370 zcmb=p_4ck~UbBG!>xDHtOI5|b@#Qg?H_pDw$;Z^XB}m*L@cxD_oki=_lM}=$=E<9G z-R?29c-FLpVq^dBT+!v^g&NTH_@wd)yXEcGyBzK-j`OqvsA7=ytvYW@9>9b z_WqKQLf0xI)<4~MTkdf{-#UAXb5bv_XIHKgJ-y+Ial~c2Rr$$h4+rJ0P5XKC?x8T> z8}0rlCMY_$@kss?KYU%i=k@&DYZIUS(0u#r`Qg$fYBKRcefj5YDxU=N96s;-dSNve zNU2c@M9){5FJQQ)9U&%Zbfx$L7;cb*sRL;UIPVCC2diGpI|Q*2B5lhKfv>@?fNH7t zol$&B)74DpqnE3hkLL7O>+2T(ei-}yr{??h8{VJ({BR!k#40|+{iXYjd3MGhD3d#O cr#P`%x8CVcM|J%hp|(5rsloS;^$2?d0KeI-=l}o! diff --git a/vendor/phpqrcode/cache/frame_36.png b/vendor/phpqrcode/cache/frame_36.png deleted file mode 100644 index 96ecb421354bec386b535fe1e2cf4fd753142013..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 272 zcmV+r0q_2aP)#C@Z9i(!~1M zrir*qV+k70-90^>68kqFj-O|}12;kA2%H6FtI=5KdLSEeASYjjHt&ri*^^Il@nz@$ zcM<0VP`V6=a&MyY!``k&|IeMgxU(i;@#22_fZ4~6ypj)cPBagDuD;9QQOl0fagwX_p(bdJihERcvP@-vOY{Y; W&Oa>B-?9<_0000W;+CoZ{7==byZrmTWaR#jx=*j}d9!=n z?jLue-7XczO-tXCTNhVr9_xF%CU42z`5zaC*qmOutsr!7Nc8d9(}S-rUG+8hGgqu? z>hF#zI+2@FPEJzwo~AQDvGQO3&(Hs_exLZN>iNf?wdd`Eg1#-+{C#?NzFg&`r^?Tk ze!Y~>4^#=)^407M7_OO)5CclC+`bSD6Zb-m25VS)uMGyjf-Qs@QzZ?7*Sz=JBAN4V zs?k%Ey^Est6oX4n+Z;cW+cNi&e)WmBGn&?4`2F$Yr!zA>_V(^buig{cW~=_xLjUnR b%i@}2^Cua-iuB0WJUmakbVYvd1M%+wXsyHf diff --git a/vendor/phpqrcode/cache/frame_37.png b/vendor/phpqrcode/cache/frame_37.png deleted file mode 100644 index fcc51627d75b1195d79e915e5ba5a26accff30b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 279 zcmV+y0qFjTP)Q+l9uWqZrGW15EmmL1Za)FnMD)vS~08#pCh dPbukz=wHCg@a-IQ|2+Tz002ovPDHLkV1gG4c{u<8 diff --git a/vendor/phpqrcode/cache/frame_38.dat b/vendor/phpqrcode/cache/frame_38.dat deleted file mode 100644 index 71cf53eb5..000000000 --- a/vendor/phpqrcode/cache/frame_38.dat +++ /dev/null @@ -1 +0,0 @@ -xA0ЎuA2;Нk(gytp9$D\e^'t-aIFMSkIŤ:7|LkN8N7i}i,[WgӴ?31iN}}=OM:4)SL2eʔ)SL#$ JJM:}]L٧SQL2eʔ)SL2աPt(:)SL2eʔ)S:ECq2eʔ)SL2eʔECѡ8O2eʔ)SL2eTCѡPL2eʔ)SL2ݓsJCIKԂi93n_ +Ri4\g;% }an \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_38.png b/vendor/phpqrcode/cache/frame_38.png deleted file mode 100644 index 89238f3c5bd6d3fa6aea44d2037dfd3bc0a34723..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 279 zcmeAS@N?(olHy`uVBq!ia0vp^D?yl%8AxVH_vZj9wg8_HS0MfW|No^o=iddg&Um^w zhE&XXJKd1$kb{7$dT5{Gy(7n%mk6AeQJ$Kzej0N`L_}BkhKVNY?%zz+J@k*Y+f^`a z^_k}%XBzDPc}byOdLr}0>WR7QehE+CtzjSL!0mG&m*?>2?tA~Zcn+}6IBv0`eDmq~ zc}z}+JJ0WJ_POR~GP(Dkvz2Uh;m>QHUB{HvnxDHtOI5|b@#Qg?H_jFnQdbgP@~WvsW^bbC&dz=Fbh`ibKL2SI zT-|A9x%8!2QQou6xhFC&&-ym4$aD9pW82OKdqz6mnsRx4=J8U#egE%mowI%0@84xI zZ4W<8zrSnRI_rgRZWpP2x%=6e@AT!byU*{w{_FTmgQ=a_yU*CBT#j3w|M=bQ)LTYp z-zJx@O!B(5Z`GEZo10QkPt%RwHa}ta_dLm$f4^*>CH-=s6v(7v&e*fR{ ztx~zGZ*4yp{T!$et^>&Eoe;)fc50TK5C1au;(Jh&pbBm$WPVLpzUJk@F9}r!=o)#a zk*D#WWv<`r;O<;6&F5D_CzowJTRZ36gVgy2`}e(i{XD+qP1dt!Yu@B<2_N6LRd3?0 je}Av+{;~a+3#!$wOf&lxJI6os@crUlGxJ^MEBXTf`CjAm diff --git a/vendor/phpqrcode/cache/frame_39.png b/vendor/phpqrcode/cache/frame_39.png deleted file mode 100644 index 1dc9cd1bc53a2e27ad5b61791c7a76cdab408123..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 264 zcmeAS@N?(olHy`uVBq!ia0vp^YeATi8A$#}%mtDRYymzYu0Z<#|Nl#G&c6#}?e%nV z45^s&cKSvxCPM)i^QmwDPN{$JaQO_kPo;GYt#kKIo$zc&c3+{t4%5trR)KEM%_$W+ zC*PSQGk)DUdv52RwA;cz%>sV@oL27Om%5WD`n|Bh@=ZQB4@JyxmgML?8g}V+>Zb|( zXHzc5U$%Rcbzopr09yKW761SM diff --git a/vendor/phpqrcode/cache/frame_4.dat b/vendor/phpqrcode/cache/frame_4.dat deleted file mode 100644 index 67b30e82a..000000000 --- a/vendor/phpqrcode/cache/frame_4.dat +++ /dev/null @@ -1 +0,0 @@ -x E=u pجQCOM'ˏ$ @3eF\FNXRyؾC{a8R Ńa2@qkH1(`cj~0ܨعnXGĀ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_4.png b/vendor/phpqrcode/cache/frame_4.png deleted file mode 100644 index b72f9e70d374741d1d4ec4537b7a379088325669..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 149 zcmeAS@N?(olHy`uVBq!ia0vp^iXhC$3?y^40(5{BTYyi9E0F&G|NqjP^X~##UY;(F zAr*6y6aM`F&%o^b_W%Fyk`gih|L^bcaylaE>?|uG@sHV&`Ea~}XRw*|gxLT4_cSuT v*!F>Kf^<]߳bZn^AQ}[9^]ynajM܇K̘1cƌ3f̘1{W5}{7lMޚxI<Kαyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘SʑӒ7HK޼g\u_r'4[-]qL8ƝY1q!/(% \ No newline at end of file diff --git a/vendor/phpqrcode/cache/frame_40.png b/vendor/phpqrcode/cache/frame_40.png deleted file mode 100644 index 8034d862d60aed55180914d323aa4557f39c036f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 267 zcmV+m0rdWfP)xUy&%?@Zqe$Lt^IHF*f5Ycy_0y589U#OP zDOgy2<>WYTpYrhA^tGLJe{+Ghzs|!@a34iK>1DI|zE}TO_YMEQ{K#kcE&Gwr@LTpH zpW(OcM?S;hKGje=R>w-jeWqvU%KmI=|;a=Y2bm$Ju*=arXY8`~`*2(t2@u R+XVms002ovPDHLkV1jNhe*XXf diff --git a/vendor/phpqrcode/cache/frame_5.dat b/vendor/phpqrcode/cache/frame_5.dat deleted file mode 100644 index d5dafe186..000000000 --- a/vendor/phpqrcode/cache/frame_5.dat +++ /dev/null @@ -1 +0,0 @@ -x1 Eu7ЛZ|ND B0@R$l,->VKZ[Io+o1yT37=P9COrj~W-G?9JF6VLpcd diff --git a/vendor/phpqrcode/cache/frame_6.png b/vendor/phpqrcode/cache/frame_6.png deleted file mode 100644 index 05ca358b0ebc0c3a0b76df7bc0411af2d596f586..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 151 zcmeAS@N?(olHy`uVBq!ia0vp^njp-`3?wJ5o3s^3u?6^qxB}__|Nk$&IsYz@<>Tq% z7*a7OIpGgbjFGJ^N}+Uq<3Ul6SeNAsih33jb6-tP*oFY|>b2SQ8z)uR?vtd#dj@Cr|apornv1)El=m yfE)D&wC=s-ob2oKGnB!6a?|8|>$jotR__k)Tfb?1CbP75iyKQ(;+|ur1|Lo4=9^M0XYLiuS90INiM|3P! zl1w_Dw_=lP*>oFG#pgDRUYDi$t)1S^DCLO~UG_j|*#gebx3BZ+nH+yL4#Xe`MZ5Oaleo}by@B3DZ#Iau!Ks7Twck}KFFz0sl!D6kkmQ`t zEwPxAt7e4vK(tICs>9R+3CvUzZbGE0t`1I&>PRt0PIx4!4(e4n`AHE@7YTQ-GD-FT zU5Un`f|ct4S(0g==b;u6VVT$-+hayNZ>kV6cem$hSdySrt`hAq)&LF)(-K_0ARP&tIq1zdFuig-v-KQf|`xVm{I3hDX Dr=(<@ diff --git a/vendor/phpqrcode/cache/frame_8.png b/vendor/phpqrcode/cache/frame_8.png deleted file mode 100644 index db1f1877ab3aa0f221156a6c8ab461cf548b7c22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^h9Jzy3?w~+F2@5Ywg8_HS0MfW|No^o=iddg8a-Vc zLn`KMov@L&*+9hQeCRTV$kt=bOB^&Mo4IaE8~7hfU-_hp z>GjwD9k;ZU{x$DC`?c>k>SwyYUwnVQ%-n^a7#d|n|4z96z#8Zn22WQ%mvv4FO#qqh BQ^o)Q diff --git a/vendor/phpqrcode/cache/frame_9.dat b/vendor/phpqrcode/cache/frame_9.dat deleted file mode 100644 index d79295ee0f93bf3b101c220b436cc0d302b3dd72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 206 zcmV;<05Sh~+U=G>4ul{KMO}02Nm#TyxdGe+ZZ;LFff1oFD-%8|o4)*%Sp6YHdA;?7 z06sMb75pI)g+!%pq7Eks1(Ax~0~7*wDR<~T*G1Lma@N`!#dGl;n!P;E()p>G>kd7u z??pPBm5wsHKNm@}RC?UEAu(m9sO7c1-s)A`rDjb%?QOHhl&f?!YX5jm&9&Z*<@HW4 z${vU~>O~9yjCv75*xjqWU*~WAGqlU$A+xo=8}e*Zc!_gVK9@YR<##wsNwa7{iF0qJ IFSFt|>Yb-#$p8QV diff --git a/vendor/phpqrcode/cache/frame_9.png b/vendor/phpqrcode/cache/frame_9.png deleted file mode 100644 index 74ddf08da2f671de67f1fed645afe705662e8424..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^rXbA73?y%B7#ag9wg8_HS0MfW|No^o=iddgYCK&W zLn`L%ov@L!AwagA1{7>@m-%iy`qAdx51;UBica)=ne)?S3j3^P6=xt5c>OY+~gW)7igeMcUJuTaR$o&p-O;5+hmJG|D H^z#4!b%aZc diff --git a/vendor/phpqrcode/cache/mask_0/mask_105_0.dat b/vendor/phpqrcode/cache/mask_0/mask_105_0.dat deleted file mode 100644 index 97e9e5dfff667572d9451add45a3a5e05c157625..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmb=p_4bw{SAzlr%YohNFaEDz7aTYx-~rdw7iUi!E!oMQ9qZ10=B~!Y1!Xh8FbC`Z zyZK8u`25eDzn4VhGJ|J-om&>Dy5;$~&1-gk)KCM0Wh*o*?Q>r*t&Z>8Q#|w7j5+Ec zQ8l$%fAdS<5uE#%zyDF50RnO9r|hm-%}`_g>f0!1_?Y+V!H}75vy!UUpR@9hH`4Vh H(~brJDN;^O diff --git a/vendor/phpqrcode/cache/mask_0/mask_109_0.dat b/vendor/phpqrcode/cache/mask_0/mask_109_0.dat deleted file mode 100644 index eadf83a2c..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_109_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -x= -0 нi9'b$t^#ii?bK[AUF徝Ƶijx]m]2-ĖK~ Vw}X&Oɓ666666yR'%lllll/hlm dl3+mͫ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_113_0.dat b/vendor/phpqrcode/cache/mask_0/mask_113_0.dat deleted file mode 100644 index 5eb7f5de2..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_113_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -x; -0>I9+Es=ϤL1̄[FZU4?i<;7;P#W-[ݯ6ddddddc",;"sk摑Q&erw######L.摑Иy1^˲\3 v \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_117_0.dat b/vendor/phpqrcode/cache/mask_0/mask_117_0.dat deleted file mode 100644 index 781c7f875..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_117_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0 }OrR,#3,o5Cq:;;wvNJZG=m} ѱ2iRkj_YYYYYYYYe_/WVVVVVVkd-Ϻ,#OZc]|{ž$ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_121_0.dat b/vendor/phpqrcode/cache/mask_0/mask_121_0.dat deleted file mode 100644 index 68810c347..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_121_0.dat +++ /dev/null @@ -1 +0,0 @@ -x1 О/w YMS8>2SFOEcW\ۼ{cpKGBКmxhfffffff/s22W|*d1*5̬RWas\xm~8߮r0wjsdm&y \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_125_0.dat b/vendor/phpqrcode/cache/mask_0/mask_125_0.dat deleted file mode 100644 index 2c73ef1a8..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_125_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA - н_TH`3AOL4 k(ewGW. #2} \Ygggggggggg_d>j^s;;;;;;;;;;'q;;;;;;;;;'˰qu_PYw{e=dG/ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_129_0.dat b/vendor/phpqrcode/cache/mask_0/mask_129_0.dat deleted file mode 100644 index 812ee8a66..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_129_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - /*DE'hgt-}_pV \"b=s[J=8Dho۞' 0X ۴e0`  j" 0`Wf`^P0`2Ȁ  d07(Y/XLGby"pT \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_137_0.dat b/vendor/phpqrcode/cache/mask_0/mask_137_0.dat deleted file mode 100644 index f6d993b03..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_137_0.dat +++ /dev/null @@ -1 +0,0 @@ -x1 О/+FZ?J L7Ժ*Ba%L~˻ʓCJYIWJ .K]R0a„ $INTwlLaL0a„ &Ld@PO0a„ &L0e@P?a„ &L0aDe@ &L0aMIlL&)dlgacR<$v,ɺ?U2] \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_141_0.dat b/vendor/phpqrcode/cache/mask_0/mask_141_0.dat deleted file mode 100644 index 8c685c8ea..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_141_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -x= -0 нi9'EDx͘%I9+E{$m^&uS"D6ڟ]98UMbҾY[2拉Ĉ#F1bĈ%iRN潝ѳ#;#F1bĈN1i#F1bĈ#FtZ}Nk1bĈ#F1bktZ;#F1bFV-u"IoD-*7uj>bMV+ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_149_0.dat b/vendor/phpqrcode/cache/mask_0/mask_149_0.dat deleted file mode 100644 index d25835029..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_149_0.dat +++ /dev/null @@ -1,3 +0,0 @@ -xA - н_MEQXP৞.|94e{JLv#^n[ ?; -ZIV-*w˒1*+VXbŊXgwqX}JRYbŊ+VXbeΠwfeΠ^bŊ+VXbʜAʜAbŊ+VXbŊ9ٜAbŊ+VXbŊl0*0Tj`?Ϊ;X=zZr* \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_153_0.dat b/vendor/phpqrcode/cache/mask_0/mask_153_0.dat deleted file mode 100644 index fc79e9ede..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_153_0.dat +++ /dev/null @@ -1 +0,0 @@ -x1 Н/礑h&F`Ҽ@I;PZ^X͌mf.=5 [if-R+!wr˜g\j̘1cƌ3f̘1cfo.2?1z `ƌ3f̘1cƌzƌ3f̘1cƌ3fztf3f̘1cƌ3f̘kk030cƌ3f̘1c9;Ď`vf͚̆ZϘW9 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_157_0.dat b/vendor/phpqrcode/cache/mask_0/mask_157_0.dat deleted file mode 100644 index ad749f305..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_157_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA - н_QRY k*q͵=j7~nN.p%ڵsi.رcǎ;vر{.-W2={mgy+رcǎ;vɳ2;yּcǎ;vرcNɳ;vرcǎ;v2xI3`FaC~S7rJnYfY8T-%e~DHFIIc5zv^p@ZbtcP7qJ_1+9^La zKHT%7-Y-t#T{NC)k=gd2o zjNY~Ld^ftnUmGj|mU3?60jkj`HqbYoV)>#S!~tpmi%zkeFHURTr~Ks{-QatqS5&9ib(yR@{gMnQ+Lcye6Ty_ Q@^8h%UuzjeUK>3D05K(RC;$Ke diff --git a/vendor/phpqrcode/cache/mask_0/mask_165_0.dat b/vendor/phpqrcode/cache/mask_0/mask_165_0.dat deleted file mode 100644 index 3a17a0510..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_165_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -x; -0>I9+DyI4ˠ5:Wvdqߜܴ<d2x%[U%2]&K,Ydɒ%ˡ,S՗r2yd=,k_{Xdɒ%K,Yd)0m,Ydɒ%K,Yd)0m,Ydɒ%K,Yme,e%K,Ydɒ%K,eq Ò%K,Ydɒe:I9EQ=Ls I{ZtR}Sn:|R[?_*SL2eʔ)SL&ϦI O2O2eʔ)SL2e*C1PPSL2eʔ)SLP22)SL2eʔ)SLe(}2)SL2eʔ)SLe(}2)SL2eʔ)Sic7;"ޙFͦސٙvL ^2}oO'r \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_173_0.dat b/vendor/phpqrcode/cache/mask_0/mask_173_0.dat deleted file mode 100644 index 5ef85e7ad..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_173_0.dat +++ /dev/null @@ -1 +0,0 @@ -x10ޯT [4v2ƽok݇;Ӳ]f֞dljlG0n+߻mG˖-[lٲe"Y}oV[lٲe˖-[lٲeհՃ[2lٲe˖-[lٲeհՃ[2lٲe˖-[lٲeհՃ[lٲe˖-[lٲeValٲe˖-[lٲef[BmаE;N-ۜT/rl?* \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_177_0.dat b/vendor/phpqrcode/cache/mask_0/mask_177_0.dat deleted file mode 100644 index 78a26a77b..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_177_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0>I9+?߁iև d̹xֈxN/է|{ظ8d0h=cFf̘1cƌ3f̘qq=w6;l4cƕ<nj3f̘1cƌ3fXһ1ֻcƌ3f̘1cƌ3fXbwnj3f̘1cƌ3f̘M'X&1cƌ3f̘1cƌ3ֻnn1cƌ3f̘1cƌÍ3U< \7+(<OƌΊnj4@ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_21_0.dat b/vendor/phpqrcode/cache/mask_0/mask_21_0.dat deleted file mode 100644 index 368c9941fd09f695d58934eb0de062a54fd74c02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 48 zcmb=pWo*#E=&aDfq?gm=vB)I2o5jQUx&ZeRqn1^Uf@;3Hn^Ft5vfXH5Z;oPEP!;?T E0GJaIuK)l5 diff --git a/vendor/phpqrcode/cache/mask_0/mask_25_0.dat b/vendor/phpqrcode/cache/mask_0/mask_25_0.dat deleted file mode 100644 index e4a5b6d8afc4516779d7d246ebfcf7ced36029d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 57 zcmV-90LK4#+A}bK0YfN+0xnzV>=60G~7^dI6e8pX8D%7wG^1 diff --git a/vendor/phpqrcode/cache/mask_0/mask_33_0.dat b/vendor/phpqrcode/cache/mask_0/mask_33_0.dat deleted file mode 100644 index 2ec712a7adcd6edf1ce2c785adf00e3ca7c5b729..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 62 zcmV-E0Kxxw+A}bK0Yfwh1zdy_AgLHMX5awSafcxR$OTi6Q^}|q!_EwNn!%sOz-Hh| UV{|eD?iT|>N~mE50E^|%1m89on*aa+ diff --git a/vendor/phpqrcode/cache/mask_0/mask_37_0.dat b/vendor/phpqrcode/cache/mask_0/mask_37_0.dat deleted file mode 100644 index 1588cfce1318608538dbde89fa7f04d05ff574e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65 zcmV-H0KWft+A}bK0YfYh3b=?-grsWFnuP~Y*IkB0KrWabyvjz+8Z~Q>n+4Agg!2&C XEPQ!r0L+5>(SR6b)HDkKY5W93c-0$f diff --git a/vendor/phpqrcode/cache/mask_0/mask_41_0.dat b/vendor/phpqrcode/cache/mask_0/mask_41_0.dat deleted file mode 100644 index e369027e3831ce2d9ac858eaa2cdfa5e5498df07..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 68 zcmV-K0K5Nq+A}bK0Ye-R3b=?>h@^7Jm`MQ8#+`;lLN1s-f=Wlt95r*)%t2))yeuHD a3;~--s0 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_53_0.dat b/vendor/phpqrcode/cache/mask_0/mask_53_0.dat deleted file mode 100644 index 572d279ef..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_53_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK -@!йoQϺ:(m&s-6Z{m4YX.F٭XZij=:έ֋b忑VH 8 #[Y^Xe \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_57_0.dat b/vendor/phpqrcode/cache/mask_0/mask_57_0.dat deleted file mode 100644 index ea81e6dc6..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_57_0.dat +++ /dev/null @@ -1,4 +0,0 @@ -xA - {^s=YL՚ ( -ouj)  -Z7yv,ԴwVQ iGiҤDfەwo4ѤoLLȼ}4 h \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_61_0.dat b/vendor/phpqrcode/cache/mask_0/mask_61_0.dat deleted file mode 100644 index 93d2444d8249bf3c534223bc1bb339d54f7af957..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 119 zcmV--0Eqv1+U?dk3IHJt1<*dHN$!6+E5(hNrI=BE>;m7%=n!PCCC1eixx=ze|IFU^ z&9=7bWCto@OXj<~I62OGT~zl9#bLvS4O_9jbFKC1I6Jle?Kb{3*sx(Qw*P@W*om-i Z8|GT{jXc==mTf+B&fNDGb^()u!gb2GK0EGW|+U?gt4!|G?1i(A5f&YK5CmXS?mE~YV7mp;Hi4u*ftt_y*5-7lK6FzHr z>I4k)=)nLMYOw4+bP*CfgX@x(2S?CA0}V9%z<}J֞!Ŋ+V嬪.2XbŊ+VX.kBzwձ̀gkYZ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_89_0.dat b/vendor/phpqrcode/cache/mask_0/mask_89_0.dat deleted file mode 100644 index aaa4c5267..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_89_0.dat +++ /dev/null @@ -1 +0,0 @@ -x1 ὧi9'Hl?L^"&M?bq?˸,9!z]VScƌ3_c!`n3f̘1č 3f̘1/f>.Uc˻; 2;Y+7 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_93_0.dat b/vendor/phpqrcode/cache/mask_0/mask_93_0.dat deleted file mode 100644 index e218fa0ef..000000000 --- a/vendor/phpqrcode/cache/mask_0/mask_93_0.dat +++ /dev/null @@ -1,3 +0,0 @@ -xK - EyV,OmޠrPH0{2bc{tQ] -{Q{{弬֒ǎ;v_ڳ}L}l߱cǎ;v̑̑̑رcǎ.Legw3qeѾ@i \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_0/mask_97_0.dat b/vendor/phpqrcode/cache/mask_0/mask_97_0.dat deleted file mode 100644 index 74ac719d06e7ba35f7b749e668c884f291daefb7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmb=p_4cMC*8v3{my5N2lkfa5ijADYwQUyT?SDJYDA|}8ET~@TVG}wt#i2yK=7z!b z>XaF;OL-RsNjlZ?U*+(wbH1LOIxmNXjYq;D;XuQ~?`*DdR@K|)ymqtY`Of=>87kg* z$16{D`=-laMU02Hv7J?~OBUdlkQVwh=~Mq+LyI<1=UdT5U+wnXEMO=-^wS0a*1ӘK}:!iY'*3]fsmb[JƶŖK9}cccccc'u.6Ʀs6666R[^g{/lٷ 7͂ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_113_1.dat b/vendor/phpqrcode/cache/mask_1/mask_113_1.dat deleted file mode 100644 index 1dd666d9b..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_113_1.dat +++ /dev/null @@ -1 +0,0 @@ -x1  -8fL(pBlDM9";-;?1p{\%-3:@ad4*Nadddddd########c]751xYu \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_117_1.dat b/vendor/phpqrcode/cache/mask_1/mask_117_1.dat deleted file mode 100644 index 8921f6437..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_117_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -xֻ >ӘK$^ 8YQSV'z8jzʇ^]סekXYYYYYYYjݵ# -+yeeeeeeee#WVVVVVVVV;"+yeeeeeeel'e;b&^9{/J$p \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_121_1.dat b/vendor/phpqrcode/cache/mask_1/mask_121_1.dat deleted file mode 100644 index 64bd8ba04..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_121_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - н\CPbїE$DdƩYtڅλ0$ήꝝga7yٯ痽Y??{{D \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_129_1.dat b/vendor/phpqrcode/cache/mask_1/mask_129_1.dat deleted file mode 100644 index 62cd1c9a18c2367d1c2c4a125b0c7bfb7647cd07..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 164 zcmb=p_4c+Q*8v3{)(d-=d%mmRskg|fP}}X+^rc5NZJtc#aociguIS=*E7o0PY;Hez z>gn9i&b%cXe#-fTKV)dW7BEeenT946)3$`s uʮ>Wd )g'M{3\d6ubذaÆ 6lؼn]Nذ9FްaÆ 6lذa3a#oذaÆ 6lذذ5e16lذaÆ ]Sbk6lذaÆ mͤ;CcfIdsG \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_145_1.dat b/vendor/phpqrcode/cache/mask_1/mask_145_1.dat deleted file mode 100644 index 6a9950f7a..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_145_1.dat +++ /dev/null @@ -1 +0,0 @@ -x!0@k 4a)q2i.YCUO{35UZFn]fN>bdwtzJF}F1bĈ#F(F6r1bĈ#F1E1ilF1bĈ#FtF#F1bĈ#FtZ}##F1bĈleHGܣ@ٝ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_149_1.dat b/vendor/phpqrcode/cache/mask_1/mask_149_1.dat deleted file mode 100644 index 02a3cdc6e..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_149_1.dat +++ /dev/null @@ -1 +0,0 @@ -x1 Ӕ_΅qH_Xci#Gd̘Ք՛gLU^ݮVR>dKVXbŊ+VXeoXJ_bŊ+VXb;ݙ+}Ŋ+VXbŊ+VAVngŊ+VXbŊ}+ +VXbŊVj>hewf*`uTq \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_153_1.dat b/vendor/phpqrcode/cache/mask_1/mask_153_1.dat deleted file mode 100644 index 2abfca20b..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_153_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0\9btEc'HH9efߞmffM#.̘1cƌ3f̘1cf73f̘g̘1cƌ3f̘1co2c]?3f̘1cƌ3f5Mf3f̘1cƌ3f̘17utf3f̘1cƌ3f̘=lj3>V \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_157_1.dat b/vendor/phpqrcode/cache/mask_1/mask_157_1.dat deleted file mode 100644 index 17344b891..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_157_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - >94Sd/51V)SkJv7eGcǎ;vرc]Zٱc'رcǎ;vر+رg;vرcǎ;}V`N+رcǎ;v:;v;vرcǎ;;}Vޱcǎ;vص'vz#;]klwoA` \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_161_1.dat b/vendor/phpqrcode/cache/mask_1/mask_161_1.dat deleted file mode 100644 index 669ade1b8..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_161_1.dat +++ /dev/null @@ -1 +0,0 @@ -x10_΅Xš yi~Qbkvp7'M u=]([ 2dȐ +\' 2 2dȐ!C 2s0/3d() 2dȐ!C 241dh 2dȐ!C 2dhcȐSL2eʔ)SL2M SLSL2eʔ)SL2M}LSSL2eʔ)SLeSy)SŔ)SL2eʔ)S;ٔ)S;)SL2eʔ)Sv()Sv()SL2eʔ)SLdT6}a*3mljmzC' \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_173_1.dat b/vendor/phpqrcode/cache/mask_1/mask_173_1.dat deleted file mode 100644 index 436918c0b..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_173_1.dat +++ /dev/null @@ -1 +0,0 @@ -x1 Ӕ_Υ''@y]X1?"g:1犝fn˶˻mm.?lٲe˖-F>glٲ2lٲe˖-[lٲeO`˖e˖-[lٲe˖-[l lٲlٲe˖-[lٲeVO`˖e˖-[lٲe˖-[z0}[z0y˖-[lٲe˖-[Ee[hOVWö=t*| \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_177_1.dat b/vendor/phpqrcode/cache/mask_1/mask_177_1.dat deleted file mode 100644 index 12e2e522f..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_177_1.dat +++ /dev/null @@ -1 +0,0 @@ -x1 Ep0X,a#r}6}nj~\8ƌ3f̘1cƌ7{3f,y3f̘1cƌ3fX_`X&3f̘1cƌ3f̘M_1cy̘1cƌ3f̘1cƌ+3f,y3f̘1cƌ3fX_bX&3f̘1cƌ3fx2dX'x[cy| 3 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_21_1.dat b/vendor/phpqrcode/cache/mask_1/mask_21_1.dat deleted file mode 100644 index f87e0a11227bb4e1e6f46a1dbb133ca9b1cc8109..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 42 ycmb=pWo*#E^%B$z4|g)+XrS~G>tDQj I0gJJp;@7?u-2eap diff --git a/vendor/phpqrcode/cache/mask_1/mask_33_1.dat b/vendor/phpqrcode/cache/mask_1/mask_33_1.dat deleted file mode 100644 index 318949df07745528a680a428ac74ea85f016c2aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53 zcmb=pWo*#E(KTk=YPW25x~DW1ZnK;yQ#k{?W*9i^mo(k2MWv7BXK JDEWV$2>`Yr5WxTd diff --git a/vendor/phpqrcode/cache/mask_1/mask_37_1.dat b/vendor/phpqrcode/cache/mask_1/mask_37_1.dat deleted file mode 100644 index 5bd9e3aa0d08230508938e61404749c9ae72e32d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 56 zcmb=pWo*#Ec0ARA$6JzFue`IJvZq{C68loc~P O{VIfV)fhyX>>B}kGZlIO diff --git a/vendor/phpqrcode/cache/mask_1/mask_45_1.dat b/vendor/phpqrcode/cache/mask_1/mask_45_1.dat deleted file mode 100644 index b35c567dca6aa84fbd8758e1fba4ba2feb397de2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 82 zcmV-Y0ImOc+A}bK0z+KD00FoRNC61dbTS*2PX)7SsT!xdk(^GV*-*`fM1fJW2ff*Z o(g~bDg3KOGC-gI$Q0Yx=v#FI%h$&--irG{SZ{o}b0N2uhd5F*?p8x;= diff --git a/vendor/phpqrcode/cache/mask_1/mask_49_1.dat b/vendor/phpqrcode/cache/mask_1/mask_49_1.dat deleted file mode 100644 index d20d71710eecee1842e3fc1535a09df5a9bc8761..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 84 zcmV-a0IUCa+A}bK0z-Vj00FoRNCgNTbhiUtgi3bMLkC`eAbEuhJD>&_5)DS}7`1~) qJBUfUaFG#i$7s45S#}Up3)038>ZV;{>!_h=2TkIGcsl^2!^he0dm&5! diff --git a/vendor/phpqrcode/cache/mask_1/mask_53_1.dat b/vendor/phpqrcode/cache/mask_1/mask_53_1.dat deleted file mode 100644 index a676d7dfa2092a94b7a81322980eb4def98fba74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 87 zcmV-d0I2_X+A}bK0z*Q;00FoR$N>ml185hf7!~cJr!Ip2Lh>4!c0mm>Bngb#HEP!o tw~N^P1s5B&Ycw5>+BN9xBDS?bOS@>1zes5V31pqmJ6B4Gdk diff --git a/vendor/phpqrcode/cache/mask_1/mask_57_1.dat b/vendor/phpqrcode/cache/mask_1/mask_57_1.dat deleted file mode 100644 index 896ed43575bbcdf0ad49fbfabe490f0645a69df4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmV-i0HgnS+A}bK0z+be0RnItkP8qx2Zf#3M5%1&K=cx?F0b9ifGvGnJH}m diff --git a/vendor/phpqrcode/cache/mask_1/mask_61_1.dat b/vendor/phpqrcode/cache/mask_1/mask_61_1.dat deleted file mode 100644 index 4165a4bd2..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_61_1.dat +++ /dev/null @@ -1 +0,0 @@ -x30CbpPi`@&H^nadQG{nF3s~{gDf@VF{6Pqb^n%N<(VOM!% z$k4$xhh-EO4838Mg8>5u3?CSjTRkcmt{T`$3>YwEH7H+JtRd!Bt3S?PhR}V`4GpQu FA{XR~DnI}L diff --git a/vendor/phpqrcode/cache/mask_1/mask_69_1.dat b/vendor/phpqrcode/cache/mask_1/mask_69_1.dat deleted file mode 100644 index 03bba657f6d0df2a65ab63bc13715660ffc4ba1b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 102 zcmV-s0Ga=I+U?gd3IHGoh2g!^*!?fpBGuB6Ru=tl734z%QACqxBP~f*q;+|~GOlg3 z+|*@yF5PGrS+r?(1q&7|Sg<^6vEHLv!?NAN?qb1$1ZaPm@r{VZ}QxyUc>an#ExUago&HU9mj+T)Arjuh3Vye^8R7`ZVIqZ Kep3TS=JO^`WH?p; diff --git a/vendor/phpqrcode/cache/mask_1/mask_77_1.dat b/vendor/phpqrcode/cache/mask_1/mask_77_1.dat deleted file mode 100644 index 0fe0b03e868a00c5cc8f97a40528a7873b189a78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 110 zcmV-!0FnQA+U?je4ge4gh2h<4>i(Cr2nH6ODE>E!G+%@^VU`nTV>Q8)snssB^}WNL zdu^VpO`ltHbYfdB9wots4cnKt)&5pivAMDF7O-K%#>`?aFte~>!}hvu_4ni(Cr2nG^~hc@}&Xs9m@nlP)$C$XMn>hy{MjVt$j z{gE+3#iKqBt-N5Y8)R89V#J7X)2MhK+d4+qM(zwoj2JO8ubJ1(Ym68%VvJ~1{NnyH UdYUt;KT?e16B)r+06TKr<%ttFF8}}l diff --git a/vendor/phpqrcode/cache/mask_1/mask_85_1.dat b/vendor/phpqrcode/cache/mask_1/mask_85_1.dat deleted file mode 100644 index b8a20c754..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_85_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - н\]4AA hM\QjsAkUjmun2RΚ5:k;jƲ[eo[o[kZ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_89_1.dat b/vendor/phpqrcode/cache/mask_1/mask_89_1.dat deleted file mode 100644 index e9d226f35..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_89_1.dat +++ /dev/null @@ -1 +0,0 @@ -x1 Ӕ_΅Nh}%@ iDOH*c"_.4Iy킎`)-5*(of[sm}6YM ;;;;;G{zطz1vw}=wuL%?"=~ei \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_1/mask_97_1.dat b/vendor/phpqrcode/cache/mask_1/mask_97_1.dat deleted file mode 100644 index 24fa60fc3..000000000 --- a/vendor/phpqrcode/cache/mask_1/mask_97_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0н1\tncKD"H$DH$D"Q&WerH$D"*x[(?/'nd \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_117_2.dat b/vendor/phpqrcode/cache/mask_2/mask_117_2.dat deleted file mode 100644 index b4dcce46f..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_117_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - >94!m dOs\0X,la5#E>Z[ַRT*JR?Q-*T*JR?UW*JRTݟ+JRԤ~m5;S&+ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_121_2.dat b/vendor/phpqrcode/cache/mask_2/mask_121_2.dat deleted file mode 100644 index a2a0097b1fd803424ccf0a741277066f44b04dae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 127 zcmb=p_4c+Q7lR@X%YlD!!vFtUN&Z3X+ Wr*l6!Q#;$o?ELu?!b)#0qyqpqZ94e? diff --git a/vendor/phpqrcode/cache/mask_2/mask_125_2.dat b/vendor/phpqrcode/cache/mask_2/mask_125_2.dat deleted file mode 100644 index 0ea40fdae..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_125_2.dat +++ /dev/null @@ -1 +0,0 @@ -x! PӔ_@ U(kp@^Mڮ5-:VF_\t:NtyNqt:NtG;Nt:.8:NtzA}yNq;+n& \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_129_2.dat b/vendor/phpqrcode/cache/mask_2/mask_129_2.dat deleted file mode 100644 index bf048394b..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_129_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0н_KVڡ'.!w]A0X~  !࣠fK# xFy4 vey@^+  ~  L#veI \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_133_2.dat b/vendor/phpqrcode/cache/mask_2/mask_133_2.dat deleted file mode 100644 index 9e78b6de5..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_133_2.dat +++ /dev/null @@ -1,10 +0,0 @@ -x1 - н&`LQ-g=Aqbʪl fƄȚ44& )OȚYF4444444444c4~9S:3ЌטpǮ> \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_145_2.dat b/vendor/phpqrcode/cache/mask_2/mask_145_2.dat deleted file mode 100644 index 9ff2bbf3f..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_145_2.dat +++ /dev/null @@ -1,4 +0,0 @@ -x1 - нr] -,tQ^&C~ -щj~mɾ.FgMDDDDDDDDDDDST׈DHdZL+ɴDDDDDDDDDDD2-'"""""""":BתEYDd \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_149_2.dat b/vendor/phpqrcode/cache/mask_2/mask_149_2.dat deleted file mode 100644 index d52e0484b..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_149_2.dat +++ /dev/null @@ -1 +0,0 @@ -x;@/gcaGBXB'-ˆouէUQdRVOmT*ǫ;;j廝Ee2PQQQQQQQQQQQ TTTTTTTTTTTTr33R &Tskz_e2P=d \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_153_2.dat b/vendor/phpqrcode/cache/mask_2/mask_153_2.dat deleted file mode 100644 index 3b0604101..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_153_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0 Ӥ8ZP!BZu賶"bu*)]MFFFFFFFFFFFF%= #ddddddddddddr ot2yFFFFFFFFFFFF& #k5L 2222222222(Y7"d@H \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_157_2.dat b/vendor/phpqrcode/cache/mask_2/mask_157_2.dat deleted file mode 100644 index 2baf535e2..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_157_2.dat +++ /dev/null @@ -1,3 +0,0 @@ -x1 -0>s6MqUH1X&U̘f/u-'.[KGGGGGGGGGGH|NG(ttttttttttNF;::::::::::}Nz$ ->n A#^AG(t =3{ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_161_2.dat b/vendor/phpqrcode/cache/mask_2/mask_161_2.dat deleted file mode 100644 index d2df7594eafccef2dacee35dfd7b2fa20d22e1dc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 190 zcmb=p_4bY;UxNV;Yry%;UBBb`j2ojEHvT!3{p!RC?nRON7i3-Yc;zkY`Xf0}_x!$! zFE2cT6SG?D4qx=zQRnO+ECdE-0&RD4IXDluF5^{1fQ4roCj>lm@IU~K;tl%3r)17J zJ0ZZ#=G-X(&k}A4K#T&Dr(`%dQ~6pDpuA;fz2pBjgY@glDn4Sf%vz*>v-~PkmIDA9 Cq)A-> diff --git a/vendor/phpqrcode/cache/mask_2/mask_165_2.dat b/vendor/phpqrcode/cache/mask_2/mask_165_2.dat deleted file mode 100644 index 2e6cd7c6f..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_165_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0 Ӥ?BVUG%*+_fs MIIIIIIIII2d;l4()))))))))))eqJنIDIIIIIIIIIII)۠mPRRRRRRRRRRR6l JJJJJJJJJJJJن}RaQRRRRRRRRRRNeK?R퐔͔&W3U \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_169_2.dat b/vendor/phpqrcode/cache/mask_2/mask_169_2.dat deleted file mode 100644 index 4052062b8db42699eecf910b9792afd64d0db84b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 196 zcmb=p_4ckI*8v3{)(d-=cYfa=BffC9bK#GR;+rC$JQO$)A7z^D@-5td;v_x$KZRRf zZ@YKti&y>Si-EiLS+DR!2HU-y%YuV0IWJizqKN=2d5((tdS!V{oP+?U0&*@cSz;s- xgbbohG*|MpPC)`8ZBAZV&W8R7OY$eT{eSz+A@fq6m)EU$prLMGxEX}SGyvz^RrCM= diff --git a/vendor/phpqrcode/cache/mask_2/mask_173_2.dat b/vendor/phpqrcode/cache/mask_2/mask_173_2.dat deleted file mode 100644 index 0a30ba530..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_173_2.dat +++ /dev/null @@ -1 +0,0 @@ -x+@ Pift:>y &d U߬S[]5Z;a5V۞A[Z˴VՃI0ZZZZZZZZZZZZZZ=-Lhi`VFK?ݧhioJ0}o \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_177_2.dat b/vendor/phpqrcode/cache/mask_2/mask_177_2.dat deleted file mode 100644 index d2c52f990..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_177_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - E>Y4V$~ ,C&U;Ook5bϙGx9%&&&&&&&&&&&n$OL|v#&&&&&&&&&&&&&bbݍXw#&l7bbbbbbbbbbbbbbM"l7bbbbbbbbbbbbbbMa!&݈3)U0}qMK$nTp4?}1s?+4l5MclS diff --git a/vendor/phpqrcode/cache/mask_2/mask_29_2.dat b/vendor/phpqrcode/cache/mask_2/mask_29_2.dat deleted file mode 100644 index 5112d11eff0ce0631ba1000e8823e0592ee3230e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 zcmb=pWo*#EnW&mR* B5Pkpv diff --git a/vendor/phpqrcode/cache/mask_2/mask_33_2.dat b/vendor/phpqrcode/cache/mask_2/mask_33_2.dat deleted file mode 100644 index 5bac0c80d2fd997d753427178c6294dd3dd9184a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 47 zcmb=pWo*#E*F> \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_45_2.dat b/vendor/phpqrcode/cache/mask_2/mask_45_2.dat deleted file mode 100644 index ad44ff1885f2c4e0d2158824e4d2b5537e0e8eb5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 68 zcmV-K0K5Nq+A}bK0z=#g4!8^kw`w#Iid7Q>h%(!dOx19XArWX)^>9~>HN_4))uS;# aNK_M3B2!g0&U7-YR1co;#)SYYI)8L$SQ+gA diff --git a/vendor/phpqrcode/cache/mask_2/mask_49_2.dat b/vendor/phpqrcode/cache/mask_2/mask_49_2.dat deleted file mode 100644 index 6e8edff24b9344b19623318f9e10802439cf2b40..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 70 zcmV-M0J;Bo+A}bK0zFeF c>OklqvR0#s4%}&Xxa%04@qrTo0MEO|#KK}86#xJL diff --git a/vendor/phpqrcode/cache/mask_2/mask_53_2.dat b/vendor/phpqrcode/cache/mask_2/mask_53_2.dat deleted file mode 100644 index 682cae2aa6532baf02d2aa3e0c1dd2ab5227a34e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 73 zcmV-P0Ji^l+A}bK0z*Ow32+$&77oAwesj8DyK(d{NRL}|M7?Oxab&l#B)j2eE;wiyK ib&jT?QJteYsi%|F)*Fp=5-1Z!bq=xk#E$^gB4-2t4I$0| diff --git a/vendor/phpqrcode/cache/mask_2/mask_61_2.dat b/vendor/phpqrcode/cache/mask_2/mask_61_2.dat deleted file mode 100644 index 77d3815eb51a7feb77ebf8fa7001e8428c252db7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 78 zcmb=pWo*#E&42|mGA0{eU)ahq{&Zsci5AoT|sbCRL;^iky?c_QPW#8n#wmU scCwG!AOHf}SdL4%7jXKBFflomDSq>=(yS;mZJM;_nealU{J-+60Ag+8uB49o zCeM)i$;BWcAt6nrP(L9Zkl0KlBqVyA9!Ek#%9h06kgHO>pO7@^?R^TT0-T8OPY@d{ Aga7~l diff --git a/vendor/phpqrcode/cache/mask_2/mask_77_2.dat b/vendor/phpqrcode/cache/mask_2/mask_77_2.dat deleted file mode 100644 index 903cba4a0..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_77_2.dat +++ /dev/null @@ -1 +0,0 @@ -x1 н_CM>Gt ѫe+FWZEm&gއFѶhF+t/FYvFj[*7a \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_81_2.dat b/vendor/phpqrcode/cache/mask_2/mask_81_2.dat deleted file mode 100644 index 17a9ac2a1..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_81_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0н_KҩVi!O\"A]:xbW1uȦ&_T ΋6H$U^D~bׯb=gX \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_85_2.dat b/vendor/phpqrcode/cache/mask_2/mask_85_2.dat deleted file mode 100644 index 72c74ff9a..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_85_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0=1\B7O$A0$8Wwjguu槊RT*uS֧JRTJRRޢN浘V \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_2/mask_89_2.dat b/vendor/phpqrcode/cache/mask_2/mask_89_2.dat deleted file mode 100644 index 06c9a4fe3..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_89_2.dat +++ /dev/null @@ -1 +0,0 @@ -xٱ 0 >/&E*cQqŃ zf$rM6hu5#zF6@yLURBPN&o9dL&(sq|@niI{j|F;se@4&-NL5N8P;_ J=`Rs#W7tsZG`0W$ diff --git a/vendor/phpqrcode/cache/mask_2/mask_97_2.dat b/vendor/phpqrcode/cache/mask_2/mask_97_2.dat deleted file mode 100644 index 38842b989..000000000 --- a/vendor/phpqrcode/cache/mask_2/mask_97_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0н_KivH4 )_%s_d3KO1^aL,$H"$KzRPt[I&X9$H"$I$ysI$DI$ɓI$I$Dɍ%es!=LAZ5'̓IVrn/2oƅ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_113_3.dat b/vendor/phpqrcode/cache/mask_3/mask_113_3.dat deleted file mode 100644 index 023b27304..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_113_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0 D}NrnDFj2KCt?WݲZi.qoP %Smj7ަ:*N:@:***fW9d2*j*}S@`*j৪6Jlѿ}}էTUa24hnt \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_117_3.dat b/vendor/phpqrcode/cache/mask_3/mask_117_3.dat deleted file mode 100644 index 79cc04d14..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_117_3.dat +++ /dev/null @@ -1,4 +0,0 @@ -x1 -0 ]Q.xIB$?~!-~Ih^HVEgKLuZlO;cUwJKHSx)|O2B zFzfxyYi|AgTNeL2=}VZ;Ev?R7P^rty{%*guOnUQ^gxskvcVQYX$3@&ONuIXHIa)Pv zd*)?`uy^M1DbmmD%Zo4AT@Sf`A^-TAmugk}r7i9rS@ZJQ!dsI6-_8j2Oj_vmiRt9J G3$_65-fl?% diff --git a/vendor/phpqrcode/cache/mask_3/mask_125_3.dat b/vendor/phpqrcode/cache/mask_3/mask_125_3.dat deleted file mode 100644 index e2febdbdd..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_125_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - ~N3rۄ]BБ'?xFrjdA{$T!&?~Jee~GOn@z#E)RHZ@bl-)ݿ<ߧ*OUR"5&5*ie J]+ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_145_3.dat b/vendor/phpqrcode/cache/mask_3/mask_145_3.dat deleted file mode 100644 index 338b7e7a8..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_145_3.dat +++ /dev/null @@ -1,3 +0,0 @@ -x -@|:^ Jy̡yMj-' -9VS֦K9e)PyUwe-m jԨQF5jԨRi٫F4_wk}0+jRBRF5jԨQeOMBJHjԨQF5jwP״˪IH I5jԨQFͳc w5jԨQF:zS*2UZ_C*e_OZ%dIȯb \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_149_3.dat b/vendor/phpqrcode/cache/mask_3/mask_149_3.dat deleted file mode 100644 index 30bc5fabc..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_149_3.dat +++ /dev/null @@ -1 +0,0 @@ -xA0}Oܠ⦐H頯'Z2{oV|Ι%>yR{!8ÂI+JpI|#f5κ[P A $H Q})&X{ט+Wb`I)5%d \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_153_3.dat b/vendor/phpqrcode/cache/mask_3/mask_153_3.dat deleted file mode 100644 index 89cdec031..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_153_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0}Ns˹)7mJ,}8X=cW^GeNE;R(13DFEx15%o)(+gL2|3uiEv#I;;|4`apdpkS*^~xvLf_IwePW`Q`R8jLgJQhVasX}og%bb( diff --git a/vendor/phpqrcode/cache/mask_3/mask_161_3.dat b/vendor/phpqrcode/cache/mask_3/mask_161_3.dat deleted file mode 100644 index 72a26a4fc..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_161_3.dat +++ /dev/null @@ -1,3 +0,0 @@ -xA -0}NrnFTk,N Zђf7J:ƒ^`WٔUnXڤǧM-#V+ߡ+9zҖY l)SLocʱO_C?ߩ%;*KlM2eʔ)SL2Ye][bSL2eʔ)SLyVYlWG[bSL2eʔ)SL -]g+$eʔ)SL2eʔ/qBbKlʔ)SL2eqʙ]£{A/~V9\%[P#' \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_165_3.dat b/vendor/phpqrcode/cache/mask_3/mask_165_3.dat deleted file mode 100644 index 870af8f4f..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_165_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0}N3T #Z YuÏ:̛1ϱEUTT|S q)m-sG B.Cĉ'N8qğwv7['tg!.ե:qĉ'N8qv`_+.ե:qĉ'N8qv`R8qĉ'N8qΤ8"ե:qĉ'N8qĝIяہq&EKuĉ'N8q+9:}kFT?^ЏGo<0իCg/_ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_169_3.dat b/vendor/phpqrcode/cache/mask_3/mask_169_3.dat deleted file mode 100644 index 943109526..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_169_3.dat +++ /dev/null @@ -1 +0,0 @@ -xA0}O3rn񷾦 )}'31Eh]4P[ _]Kv<˙fp#y_l[geӧO>}o%uJV/{%O>}ӧO}K~O>}ӧO>Q=/ї>}ӧO>}u{ח>}ӧO>}u{蟪/%?}ӧO>}ׯ.N4჏VMmRt(1| \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_177_3.dat b/vendor/phpqrcode/cache/mask_3/mask_177_3.dat deleted file mode 100644 index 9586979a1f9d74c4e115757feeeabb74819df45b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 312 zcmb=p_4ckK*C7KDmJ79hlkfa5%Jb^v=;WB?Q=`hguxbC(hf6kRuDyQoTio}+UFQXv zzYC}H-0`hx>pHl#M}PCVx?h`vgGKGt$xx|wRV!3 zfoMp8BP)#fxJc>g$uD7oUs9|>H)gE5sHrt=^#lc>7A~z73z`r_mvKnO#w`)M&Z=su zbg*n(k1PjN^&?s|N=H{r^nS3Sqe@3D+;oUNM?Y$9iHOp<`z#Ekc_EUqAPXMxfb>qw zEAHgtRC0WyjcRYJR@RjRYnSlaR2M&;SL^DVy)i4Q+x2LaXy<=XYjqD_?+J5e|6#~G HtjGiaa;}E0 diff --git a/vendor/phpqrcode/cache/mask_3/mask_21_3.dat b/vendor/phpqrcode/cache/mask_3/mask_21_3.dat deleted file mode 100644 index bcb4eec4919b60e2c25c4e18ebb9c34423536b63..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 60 zcmb=pWo*#EQOIfiJ63sVS+xNu1fplLAA habXVvLtL={H4TR*l1wwiWg5b#xHRE54FHDyc9;xW9FqV5 diff --git a/vendor/phpqrcode/cache/mask_3/mask_29_3.dat b/vendor/phpqrcode/cache/mask_3/mask_29_3.dat deleted file mode 100644 index 6150ac1289809bad7646c662dd9cf836311f47f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 75 zcmV-R0JQ&j+A}bK0z)JO16&9u7I`jwl1Q?&GZ`D8$YeOr5DVhME(}Fn_#_QSO-42g hU)nIl9)oZ$?ieJ~WF$A^k;Gv#QfT0j2LK0SpN7|C8+8Bx diff --git a/vendor/phpqrcode/cache/mask_3/mask_33_3.dat b/vendor/phpqrcode/cache/mask_3/mask_33_3.dat deleted file mode 100644 index 6053b5e396ca957ae26193aceb85d08a43dacd9c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 79 zcmV-V0I>gf+A}bK0z(W00bB+MfK>sq3hWAyRM5v3T!1RJz`2Gv5EpJKDB>cdVAPhO lW(z#c;7?-^TkxkbL)`g=Dz?D=LP!BVTMUV{1pswi&V8ytAOipZ diff --git a/vendor/phpqrcode/cache/mask_3/mask_37_3.dat b/vendor/phpqrcode/cache/mask_3/mask_37_3.dat deleted file mode 100644 index 5dea5b9cbe14fcff482e0fe9a647359aca07547b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 83 zcmV-Z0IdIb+A}bK0z+&F3b+gq0H-2kRd@{JG8i};@d2vZ2XK(!(BO=uY7eM-(E6p3Zv0bsQxl5nw^V$$JC%}Bqlsj9DvDo{aE;P>E# hYO*WtyB%t`BNs_$5b6wWqgwwJ)C%Io3LZM{#-RD-KY#!L diff --git a/vendor/phpqrcode/cache/mask_3/mask_53_3.dat b/vendor/phpqrcode/cache/mask_3/mask_53_3.dat deleted file mode 100644 index 8800beab1..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_53_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK -0Ds ! -(.Bp&|"-t&`qQ-"9_+)Be/H8D%a~}spKFN=,;;a^t4\FSN \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_57_3.dat b/vendor/phpqrcode/cache/mask_3/mask_57_3.dat deleted file mode 100644 index 4e1e5da386a57dacaf76f93d05473ff922574488..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 126 zcmV-^0D=E_+U=Gx3cxT719!hh{{QE?gyNwnmS{-_8xJAm$PtVPuqu0fSCq8`R#F2C z`Jye^+}fgNtCnh;u5A$xa)x*4$m(#xu^rp7Rcwt+;I=%SqH*TgTz7#%(6RO)$6#_BUJmZJUz-cM|kVFF3Ae8Lopr+yDRo diff --git a/vendor/phpqrcode/cache/mask_3/mask_61_3.dat b/vendor/phpqrcode/cache/mask_3/mask_61_3.dat deleted file mode 100644 index bf1a3cc7f..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_61_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0fz4-%*dp!yZܫu(~=&ۓ)R2"/"<9FΊ=rb"/rw"2B#3-0-KW \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_65_3.dat b/vendor/phpqrcode/cache/mask_3/mask_65_3.dat deleted file mode 100644 index 85892089b..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_65_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xQ - D4\?R ,!O-Nv1:cZu "UMÕF ~jK-la[^q^Q\=o-laZpUB @IKJzɢ|1Í  \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_69_3.dat b/vendor/phpqrcode/cache/mask_3/mask_69_3.dat deleted file mode 100644 index 55318a87b..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_69_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -x -0 {&2'd l=,Fy;$쇤WE-R:%T,O2g"",Ȣ/DyĈɧ{O䮳",:NvEWN#(&,,]x؅ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_73_3.dat b/vendor/phpqrcode/cache/mask_3/mask_73_3.dat deleted file mode 100644 index 15be77f64..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_73_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xQ -0 C{g;JJ?dԬK=RasJhTJ6exka\$nIE,-/XB*х=wee4t̒tLщtt߫b gFf qoddn-? \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_77_3.dat b/vendor/phpqrcode/cache/mask_3/mask_77_3.dat deleted file mode 100644 index ec7828044..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_77_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0 &BiRaK"t`I@|fXyilE:Sza18GifK*?:YC1쌞졘(ቷJ*jl*TRIKR^ؙks)c)c)JZa \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_81_3.dat b/vendor/phpqrcode/cache/mask_3/mask_81_3.dat deleted file mode 100644 index 47bc0f793..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_81_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - F=\,JGAġhj>#3X:kԹ\FM Jhu3>TZ{PSgP'kVjժU_ۯUV=P oO:Wҝj[Wxm 5 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_85_3.dat b/vendor/phpqrcode/cache/mask_3/mask_85_3.dat deleted file mode 100644 index 02c4f8cdbbe43a99de71a77162d811d36ad4f51b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 160 zcmV;R0AK%j+U?m(3V<*SMbUXy^Sb}dIVrU|sn!>N+|q$Y2;pF8P^qqRd9N$FYg^Jj ztFhS7{Q{@rM+N5MyIOtAC{U6F+M{SU#kj+puI|W4iU0x#Ab>!sfcG@40`85I_KdmkG#TsrP@uMqv1rdge4##%ZWgv6J(FGUkB?1g^dV O%IE@ppbHjj!&bK*zf9i% diff --git a/vendor/phpqrcode/cache/mask_3/mask_89_3.dat b/vendor/phpqrcode/cache/mask_3/mask_89_3.dat deleted file mode 100644 index 2b4cb59fc..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_89_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 ὧ) *.@U |eŵ6ۢw5*) oiK4nk>1}d>@ 4XYCo ۡ1<AhFt - 4@51Wr>7G}}x7|NgN \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_93_3.dat b/vendor/phpqrcode/cache/mask_3/mask_93_3.dat deleted file mode 100644 index b4cc8a971..000000000 --- a/vendor/phpqrcode/cache/mask_3/mask_93_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0 D}NrnJɪQ~B06na<<ׇe6MRCP L̓i9M 2 LkŮdDv*"aXjBdAddZTdAdqY0exqeN&WVQvc \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_3/mask_97_3.dat b/vendor/phpqrcode/cache/mask_3/mask_97_3.dat deleted file mode 100644 index 7adc9ebaa77cfc3c6f7a54307a831fbeee0c87db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 175 zcmV;g08syU+U?rG3V&G`N=*G0-MD(Ga{FCK!(&5t$)O3EWmo!5xs*ixXZ zVA@1zxl+BnrYNa(r@cz9VNyyDD4l1cxytAa-_m)8y8uckp@b4jD53OrC10xSQX0*J zF=dt7h5IPcalDsMLJ1|5P(o>6B~s-^N^~6WC6rJ?2_=+%t0e0VeE$jDlr;7Ux}BHg dPL&$iL~p8;J5{b%n)WQo-EsPG#~oB@^PHSYS7`tM diff --git a/vendor/phpqrcode/cache/mask_4/.listing b/vendor/phpqrcode/cache/mask_4/.listing deleted file mode 100644 index 00d25dbe7..000000000 --- a/vendor/phpqrcode/cache/mask_4/.listing +++ /dev/null @@ -1,42 +0,0 @@ -drwxr-xr-x 2 10046 10046 4096 Oct 25 11:32 . -drwxr-xr-x 10 10046 10046 4096 Oct 25 11:32 .. --rw-rw-rw- 1 10046 10046 190 Oct 25 11:31 mask_101_4.dat --rw-rw-rw- 1 10046 10046 184 Oct 25 11:31 mask_105_4.dat --rw-rw-rw- 1 10046 10046 182 Oct 25 11:31 mask_109_4.dat --rw-rw-rw- 1 10046 10046 202 Oct 25 11:31 mask_113_4.dat --rw-rw-rw- 1 10046 10046 207 Oct 25 11:31 mask_117_4.dat --rw-rw-rw- 1 10046 10046 208 Oct 25 11:32 mask_121_4.dat --rw-rw-rw- 1 10046 10046 213 Oct 25 11:32 mask_125_4.dat --rw-rw-rw- 1 10046 10046 220 Oct 25 11:32 mask_129_4.dat --rw-rw-rw- 1 10046 10046 220 Oct 25 11:31 mask_133_4.dat --rw-rw-rw- 1 10046 10046 248 Oct 25 11:31 mask_137_4.dat --rw-rw-rw- 1 10046 10046 254 Oct 25 11:31 mask_141_4.dat --rw-rw-rw- 1 10046 10046 255 Oct 25 11:31 mask_145_4.dat --rw-rw-rw- 1 10046 10046 259 Oct 25 11:32 mask_149_4.dat --rw-rw-rw- 1 10046 10046 262 Oct 25 11:31 mask_153_4.dat --rw-rw-rw- 1 10046 10046 255 Oct 25 11:31 mask_157_4.dat --rw-rw-rw- 1 10046 10046 292 Oct 25 11:31 mask_161_4.dat --rw-rw-rw- 1 10046 10046 292 Oct 25 11:31 mask_165_4.dat --rw-rw-rw- 1 10046 10046 297 Oct 25 11:31 mask_169_4.dat --rw-rw-rw- 1 10046 10046 299 Oct 25 11:31 mask_173_4.dat --rw-rw-rw- 1 10046 10046 300 Oct 25 11:31 mask_177_4.dat --rw-rw-rw- 1 10046 10046 57 Oct 25 11:32 mask_21_4.dat --rw-rw-rw- 1 10046 10046 76 Oct 25 11:31 mask_25_4.dat --rw-rw-rw- 1 10046 10046 78 Oct 25 11:31 mask_29_4.dat --rw-rw-rw- 1 10046 10046 89 Oct 25 11:31 mask_33_4.dat --rw-rw-rw- 1 10046 10046 86 Oct 25 11:32 mask_37_4.dat --rw-rw-rw- 1 10046 10046 89 Oct 25 11:32 mask_41_4.dat --rw-rw-rw- 1 10046 10046 120 Oct 25 11:32 mask_45_4.dat --rw-rw-rw- 1 10046 10046 124 Oct 25 11:31 mask_49_4.dat --rw-rw-rw- 1 10046 10046 128 Oct 25 11:31 mask_53_4.dat --rw-rw-rw- 1 10046 10046 130 Oct 25 11:32 mask_57_4.dat --rw-rw-rw- 1 10046 10046 132 Oct 25 11:31 mask_61_4.dat --rw-rw-rw- 1 10046 10046 140 Oct 25 11:31 mask_65_4.dat --rw-rw-rw- 1 10046 10046 142 Oct 25 11:31 mask_69_4.dat --rw-rw-rw- 1 10046 10046 149 Oct 25 11:31 mask_73_4.dat --rw-rw-rw- 1 10046 10046 162 Oct 25 11:31 mask_77_4.dat --rw-rw-rw- 1 10046 10046 153 Oct 25 11:32 mask_81_4.dat --rw-rw-rw- 1 10046 10046 154 Oct 25 11:32 mask_85_4.dat --rw-rw-rw- 1 10046 10046 164 Oct 25 11:31 mask_89_4.dat --rw-rw-rw- 1 10046 10046 168 Oct 25 11:32 mask_93_4.dat --rw-rw-rw- 1 10046 10046 176 Oct 25 11:32 mask_97_4.dat diff --git a/vendor/phpqrcode/cache/mask_4/mask_101_4.dat b/vendor/phpqrcode/cache/mask_4/mask_101_4.dat deleted file mode 100644 index 1c97dc048..000000000 --- a/vendor/phpqrcode/cache/mask_4/mask_101_4.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA Fs^1bИ]4m+8+Ve^HR]\c -oWN#X+l HEcp \^.9qW9":.BB \0aPǨcp \ONqjpG}}$.˅ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_4/mask_105_4.dat b/vendor/phpqrcode/cache/mask_4/mask_105_4.dat deleted file mode 100644 index 0211cdb3a..000000000 --- a/vendor/phpqrcode/cache/mask_4/mask_105_4.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK -0 D=Mr˹A TeEFL2 #鹢_I!딤Ѻ-իkmO]sS T6*'8 N$'NZ^XXh%Zrr$W}rU*G9r|c[cN[_=׫5^J 1*qv \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_4/mask_117_4.dat b/vendor/phpqrcode/cache/mask_4/mask_117_4.dat deleted file mode 100644 index 386725918..000000000 --- a/vendor/phpqrcode/cache/mask_4/mask_117_4.dat +++ /dev/null @@ -1,2 +0,0 @@ -x - н_s]4Dgn2Jj}ҾRsSWGRɧ)5Em#ܯk_"z3\rʕ+r Lk|/{;'jk^zGw=K_GJACF5KEX*@<$z}?p^YqOrD6l{pq{+`&l7JcHsOy z_GM@Ox_x?b=y>Jqe}Ao?uX%DM`IXJr{-ZaqKAvlH`*6wj&*7((AW$y+_m1`VYgIgEyrCkW+Vc diff --git a/vendor/phpqrcode/cache/mask_4/mask_125_4.dat b/vendor/phpqrcode/cache/mask_4/mask_125_4.dat deleted file mode 100644 index b98dc813afe773cdcd71a8779391ca295c0d3a51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 213 zcmb=p_4c+S-ysD7)(f`F8-K^2;|+^RST%8G)>;-rsHGtPebu=wvE(Rqud?@Jdiv-z32@0r%Fa7(4|DUhVIr-8&`h2IF>D|wlymv&u|5gc>1uLtXBe(o`B(jjL zU;pLDUo3v_shtNkChn^3Ki;iZZS8BT4}Mgedi!xzR{!b=ahL8^+0UC-$jr|$aq=Dj DA0&Li diff --git a/vendor/phpqrcode/cache/mask_4/mask_129_4.dat b/vendor/phpqrcode/cache/mask_4/mask_129_4.dat deleted file mode 100644 index 8ecfa250845e8ef1add89a66c88fc9f31250a436..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 220 zcmb=p_4c+kU$cP#%Y}Q(H@>gmX_E0-a3R;c&@UP>6Fhnzw0;$t`MGk<)@^G`dv2;9 zJa>BiGETqum$vWzzWVcDA(y^F$>O^;cE3bkZ7!_If6o7~R(2)#^;-&#|1=8@FtW=O zT)5zvG5y;kg&7OBX?Mm(S)NeKczodZftUvk%zPFg;tOl7WBdj2GpxmpM2j^4FA?}L o{bhTz9Ot|H{BduueXdPB_S/#\p\p># \p\p#>qp\p.$Iq dGR_4  \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_4/mask_137_4.dat b/vendor/phpqrcode/cache/mask_4/mask_137_4.dat deleted file mode 100644 index 0c09c487c2e85488f8caf2dcc863e260cfd077d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 248 zcmb=p_4bYxEjs$#?!2-R}~*>9$YZ>m}P8_SPSlc>J(ZYVC8? zO1oo*K1q`<^UtZRwccRy_UiY^lc)4;t3SOfES@w`rW=l2^YbTRO$JKN#b*jQw`{%rV(;`b$vL{4 zXRQkQ#dOtY-ox+n-*;b@wS2d1)2vU1rN&=NV*fwfSo>q^jJZKc}*2a`@ScXA0|@PM!+Z)$&&j+uR`i+&96LlQothXU{Gd06E`pF diff --git a/vendor/phpqrcode/cache/mask_4/mask_145_4.dat b/vendor/phpqrcode/cache/mask_4/mask_145_4.dat deleted file mode 100644 index 33fb211249fd13955f9481a5af91416b0850c79f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmb=p_4bYjXH=f@| Kjo |SSWKZm׌j\Ъ2 W\qW\q"~ jvtv_\qW\qW\q%g3 }+++ r9ArW\qW\qŕA g3WA W\qW\qW]V~v{D3Ȝ!\W^Tڍ[S7vۜgq? -{peo383838{YXz,_OYfe3s38383\C!Ms38383r \C?37938383\C!07M8383q,mMrskWv3~W WB \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_4/mask_157_4.dat b/vendor/phpqrcode/cache/mask_4/mask_157_4.dat deleted file mode 100644 index ad5fcf69d..000000000 --- a/vendor/phpqrcode/cache/mask_4/mask_157_4.dat +++ /dev/null @@ -1 +0,0 @@ -x10ޯs4"FP=iRX¢X0멪u 4ftl}m➭S|юS P5<]rwqwq^QN6ÏZsߙ,wqwqǝ>Μ5g;;Y}Vgw,wqwqw>9wqwq>3gY;[ww?P3Ƙggt퐮;].3w4A \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_4/mask_161_4.dat b/vendor/phpqrcode/cache/mask_4/mask_161_4.dat deleted file mode 100644 index 7604c4540..000000000 --- a/vendor/phpqrcode/cache/mask_4/mask_161_4.dat +++ /dev/null @@ -1 +0,0 @@ -xA@ fs!AL_|,4l)iml׉0' +E ]N\x#2/_{7g9쏼ٷ}2r!?}-#Te9C9C9~6Sʇ겺!r!r!ۘse9C9C94_Ɯ|.r!r!s/s0 2r!r8}DwrDXΡ|x|!2 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_4/mask_165_4.dat b/vendor/phpqrcode/cache/mask_4/mask_165_4.dat deleted file mode 100644 index d83d63165..000000000 --- a/vendor/phpqrcode/cache/mask_4/mask_165_4.dat +++ /dev/null @@ -1,3 +0,0 @@ -xA -1 }Or."*?fPLHIkΫZQ8 -Gyqk-n5+?|֎kKnEŹK.K.?2.|EJ{2<:.Ku\K.K.ǝmu)_8\r%\r%\Џ;'2!_8\r%\r%\Џ;'2!_\r%\r%\rinC?nn9 RK.K.;.HqY'ݽNF?K㕢,R| My*3 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_4/mask_169_4.dat b/vendor/phpqrcode/cache/mask_4/mask_169_4.dat deleted file mode 100644 index 4aac95c1e3fc9ba5257f331564b211fab568c376..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 297 zcmb=p_4bw{7n30m>xEkX%lG~l?V3;+6CwFBVc+Mpz`!LezkNJB-=9zK3Cy|6dc7)c z$=5@7j?a{Q`J_AleCn>hU3Whz>;A1NtE#vC#=Q1!Zp)m1?|$5V9DCCK-|1Vc*mtaT zocL^x-SRm_r!-;2ueFy?#eVr#8L;Ge>5J}i?kE{?B4PtL69K8~&|}TJq5E>1FRHmwz3+$1r7q GdJ_PDBBetB diff --git a/vendor/phpqrcode/cache/mask_4/mask_173_4.dat b/vendor/phpqrcode/cache/mask_4/mask_173_4.dat deleted file mode 100644 index 9df4d865d..000000000 --- a/vendor/phpqrcode/cache/mask_4/mask_173_4.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK -1}Nrna ~ZY!Jt^5(/jkz[pj_?~v:|jwՖ_mXzo6?n%^4`7 P=;q=RrH8oyopw{-jJFsR diff --git a/vendor/phpqrcode/cache/mask_4/mask_25_4.dat b/vendor/phpqrcode/cache/mask_4/mask_25_4.dat deleted file mode 100644 index 0c7c44bbb5bb50a1f060373ea3ca14d083fe686e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 76 zcmV-S0JHyi+A}af07FAV1c%Fjuna^PAxDf1Irg9fvh0EKpc;@!E_4AniAM&vX|%Qn i>NlJ|HN*%VIGY$5BJ4r(4;Eo;_F$1gmjnRDU3Su2%N^nX diff --git a/vendor/phpqrcode/cache/mask_4/mask_29_4.dat b/vendor/phpqrcode/cache/mask_4/mask_29_4.dat deleted file mode 100644 index c28dc20e8248d196503c88e3e58b9048de750a16..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 78 zcmV-U0I~mg+A}af07FAVI0*(^2E@r?NRc2*iM`kWMfO73Na9E&7dAmSNkA6A$s@yF k1DFWbSimBS8G{geiIFARUKIc0kiuy%rYtrE0Gke<<${17%K!iX diff --git a/vendor/phpqrcode/cache/mask_4/mask_33_4.dat b/vendor/phpqrcode/cache/mask_4/mask_33_4.dat deleted file mode 100644 index 5834b6fb5672ddd54227a5229ad248efb56f9931..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 89 zcmV-f0H*(V+A}af07FAV1PK%5G9X?BinJkI0ZA&T;SOAYD(-+P$1ng+a^aGIlSHT> vY|E%S29rDBDF$Z>!lD9ODl{aRP7U#;Q^M{*2@gEd1l)nH0+%8HgW}HuoFyU1 diff --git a/vendor/phpqrcode/cache/mask_4/mask_37_4.dat b/vendor/phpqrcode/cache/mask_4/mask_37_4.dat deleted file mode 100644 index 4bf2e26ed0238cb7f0fa88b4a2e8d9f607c6c465..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86 zcmV-c0IC0Y+A}af07FAVG!hE93`kRjsRW^pR8`b;7d}8$cR_hr3_>Eg@JYf+B2^J* sQ04GUMNxbc& v?i_XJs5{AZrvXfsV99_*CH~R|;!aXkQtVEY@FYSRQSQW4Nk}mOMgc#BT0kV* diff --git a/vendor/phpqrcode/cache/mask_4/mask_45_4.dat b/vendor/phpqrcode/cache/mask_4/mask_45_4.dat deleted file mode 100644 index 1b921f3009656cf429e67486e59237b8dd15ff5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 120 zcmV-;0Ehp0+U=A<3IHJpMfaXY?|-@3gj12@{}N1#TnN<@9`Z@`Ei+qoFVPwup|*kU zpmqSgF*>cacXR`pI4*58TFBT1fxMG6XL7wac>{^GqK!9Q$bqGK7QU=)P)>BL}k8 eRu0aQtjeU@>+_-I`CuK_9H00P-1Gn#s>kM_-9E?w diff --git a/vendor/phpqrcode/cache/mask_4/mask_53_4.dat b/vendor/phpqrcode/cache/mask_4/mask_53_4.dat deleted file mode 100644 index 7e88826dd67c8eed58a77ecc7bd6326cd996537c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 128 zcmV-`0Du2@+U=H03cxT31^1pt?|->=VN(l5e9snI(1i&h1DSjzs%My4l0%60s2sV1 zUFvoM>Q$%8k$LTH-z$uZ_X`^svLKUJCMj-(<27Edc$MCl9xf#1?;NQB?uAn=uepcg i^-r(*&mns8lo?t9xVoWK-RMw{czy1?FmMC1XBA^pK|VMD diff --git a/vendor/phpqrcode/cache/mask_4/mask_57_4.dat b/vendor/phpqrcode/cache/mask_4/mask_57_4.dat deleted file mode 100644 index 84669c7d65c97c0b040497b32d3d3037c70d826e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 130 zcmV-|0Db>>+U=H04uCKSME9Hq?teKq4gQfCYGNWRShRhHSItD#wao0Xdx_S`3}%zb z)6ua+cp@ZJk!QRPPwS|R$7C*c-vtG{7f62E_H57pdBSPpo*a39C`!$ZCqdRc`@3z= k_I%kB_3cxT31n<5^|NpsON^2;!>e@qKa}XLb#Yw^v)q9v(qB=lyhR&g$ zouh+=UGEBA9-;T^egK`j*5&+4Z}?KB16>uQvCipDZ+dUw-O4os=_q+W=RtbJoA;dF m^rrXIyZXXjy>U8x$cKrH<+(z6K0*KBy}^0+esBPHn8I@q@JM_B diff --git a/vendor/phpqrcode/cache/mask_4/mask_65_4.dat b/vendor/phpqrcode/cache/mask_4/mask_65_4.dat deleted file mode 100644 index c24343d94..000000000 --- a/vendor/phpqrcode/cache/mask_4/mask_65_4.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK DtXЙ.4E1^hvOxW0 JHŻz[^܈[v -yyZk=`vcǃ<ȃaCe \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_4/mask_81_4.dat b/vendor/phpqrcode/cache/mask_4/mask_81_4.dat deleted file mode 100644 index dd6521613..000000000 --- a/vendor/phpqrcode/cache/mask_4/mask_81_4.dat +++ /dev/null @@ -1,3 +0,0 @@ -xA -0 yMyXE m7"892ѸQ1ݳ+xx;t35DIY1x\:u}e/ #Th< -UBz<5G<5{G<5<饫>]Urxu \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_4/mask_85_4.dat b/vendor/phpqrcode/cache/mask_4/mask_85_4.dat deleted file mode 100644 index c8d5123e26909726dbd71694e1f6697cad51529e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 154 zcmV;L0A>Gp+U=P!3cw%?MR!k=-2ZZ2N*jmT*5nJN&mmxtH#~v~YIZJnPs9LfrlsbP zk*TK+4nE7TrIxLs*SC2W7zhg5zDpNC7h5Ilh$5=S0ABHmSG?ji)1NN$BI-+pH9Di \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_4/mask_97_4.dat b/vendor/phpqrcode/cache/mask_4/mask_97_4.dat deleted file mode 100644 index 5d848caade31141b6a6d238828e0513940b9aec8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 176 zcmb=p^>&scSAzi$%llg2U;ocnYTk;AQoMQf@D~ArLUH5VhzlL*U+;ClQn_{Ld4Rh8 z>uTAu_q(T_ELu@IVU2P7<-3>5gi15Bf~CWkN@uS0RjmncZrXE$dhO>e3gqq;cwFbMH2i4?0P>DhOaK4? diff --git a/vendor/phpqrcode/cache/mask_5/mask_101_5.dat b/vendor/phpqrcode/cache/mask_5/mask_101_5.dat deleted file mode 100644 index c21869e83..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_101_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -x - E+%=M3Cbv ѬNkûgqkqq{%Oo,iKee3[|iVh]` ` 0ʕz˴T0Gu/q8F13:W>#ȕ0c0Q8E=F#+a X͞+cV%9W>Q]TkY-gLqD艋 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_105_5.dat b/vendor/phpqrcode/cache/mask_5/mask_105_5.dat deleted file mode 100644 index bc8798c64015b6595105a07645625a572c839c0c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 224 zcmV<603ZK&+U=S_3dA4~1n<6P`v0HHC0WDb$gbEE0yT;RFVdN!?Sm0#$x+d(-M&MH zb#RhAbEHXz@r$NR=-U3QPci-P|L%XEWG%ZUmG!BgbTK0LXu8R?&L*=*eAagQlk8Qg zsjyG52YayhPWDE5FUx?-`>CeAIbz1%-fVQSH_Cfi23+1R)r9Zid)&FO2Yavwd*nUx z9(fPn!}qvzVGs6T5BA7=v+3UUic`wTHUd>xK aP2TVA&wEd3Dq=6}&i9BW^E?1$d?(3j3x3!D diff --git a/vendor/phpqrcode/cache/mask_5/mask_109_5.dat b/vendor/phpqrcode/cache/mask_5/mask_109_5.dat deleted file mode 100644 index 25a394402fb8b1d0ebf02b85473522a21235736d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 211 zcmb=p^>&scSAzi$%lk^-Pyf$XZV2j*s`A*zF?pKO&MOlNBNgB2F4Ef5es`YjsdLA3 z1GmLzcQ4u+7wuKIGk@pLkJ~=o2#t=t|EsmEP`E4gbGg?&F(KW|<)*sao-4A2zw@dk z3W3o7Ln%e~oL=noQ``Tq@Y3g3w~o|0t6%gi0ZRhqKTiJP`A5a7)9;Xq4;a-6*>}!& z0V-}7~CRaH?+kXgI=m1Q4e>}I|^`+f56tjphW?I(xcpB?4RQpn(Z H=>0 0 0 Ofz3=>0 0 0.3Z$׷8\pw4:Zp:qX 7 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_121_5.dat b/vendor/phpqrcode/cache/mask_5/mask_121_5.dat deleted file mode 100644 index 9bb5c4158981760f99c1831c03ccf11a664e6053..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 256 zcmb=p^>%h3*AWFCm;c4Hp8T7ByMNb~P0`w->X-Iu1WibCj$>!PxYtGF(Dx08H@Bz! ziL_Mtn}1F*CX2(7=TOEDEbWKm# z7n3IwXBH>TO_bgSLC0^-+rs}kq59sv;^g0Fytmmr`w)|MuCvr_`^DT6m?EIk`)9ws z`TOnWP2bl(=@oqXJ10zcK~pjRkXgEU#Yr9g&b-C9Uzp__hM;esZ;0LBZFwcK^7XPb o>!)^ZQ#aoWuYBxxGe&=>)49shxbEDe|L3eseDs4sW73s<0HpnlZvX%Q diff --git a/vendor/phpqrcode/cache/mask_5/mask_125_5.dat b/vendor/phpqrcode/cache/mask_5/mask_125_5.dat deleted file mode 100644 index 2161c50a4..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_125_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA - E&fc;S$?؏Q4YahûyJ}9g==li.;nh_wz.qCWȧy uPk;<<<|*q, mkWqNl% yyyy^2䰅sX|aaaa3ϙ9lH<<<<̿웁[n`Tq8^vy \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_129_5.dat b/vendor/phpqrcode/cache/mask_5/mask_129_5.dat deleted file mode 100644 index f0c1d65020884c517fcba84b94191eaac350aaa5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 259 zcmb=p^>(%)-(dqD=JNe+fBrw;rBWIY;l}PP(iGgY;6uuWT>&yOg;TY((|V7;4|rHz z$aHnxR5q=ee-{;mpS}6Fjz8)5|GBsR+cqxEkvegY{WD8>{;97#wkaFeC|)-I_*?FJ zdDOO73mlv68dxKM=*5vkTKXxHkABpxay&a{NAkk7uziscPg`}IW$x!MWZc)F|A2b~ z0~9@B{lrw+xCbP5#sezq5T~F&LHq>w52k$wdRTBP%uhX7dcHJE;G5lvJnQRETQ@vs deIFa2`wqnRlbR99G23{{r2|{+4tV*M007v5c@F>p diff --git a/vendor/phpqrcode/cache/mask_5/mask_133_5.dat b/vendor/phpqrcode/cache/mask_5/mask_133_5.dat deleted file mode 100644 index 46be8b094..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_133_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0 DѽOcr]4%1mCTxΜ[Dv={FEϏq?ݿ9keѭ}'2^c4G:3=JK-F0`#Hw'#<{~Z4 :BG舻F0`G~:`#?#tw-`#?##t#F0r}Q}eR;M/k1mX=hsH"k M:3qOW}9ԖIH1G;- sڶ?[%M - v#;zg^3d}69Ψޙ@7҄#gv`;׳ީ\$wlv`v;ލ}7wߑa;vkA#gv`=N2wxgWӤ@n?c}SQ:Zd?+9vz)P \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_141_5.dat b/vendor/phpqrcode/cache/mask_5/mask_141_5.dat deleted file mode 100644 index 60c1a8e81acb9a104b1003fe8c362588b053abac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 297 zcmb=p_4dw1u0sYqtq*_O`hNbW|NLx;(ly@Fw~{rHnwy%g%&1?U=@uQmHZAgYPUWvV zSwa8P%uLts{p{|I6Ff?XUZ>?fOlh?Hu<*Lhj^j-g&%KHRklY zHSXJ%GR-^MUl+M`k&@0?^TfhtO`k-r;2DQRmi;?;$r6o)IJ{82> zzVP^R$E^#0m%8OX_%_jPZqDCVlYVV;i{Ag?{rvsKSBqQ(C$718!)g|LXx`R)LEA3< z-^TpyQqr?GFC*0AGYu!M2uzSo(E^bzLvI+;8@4U$WERT)%VrUu|y7`j4jj zp4qEF>;UTg{AOd_*}XaEC*vs]Ŝ_{W!zﶬ/)˙v V6V޻,f1Yb n^o>\O],,b,f1YyVgYYYb,f1+ʳ<˳<˳1YbŬ<+ʳ,,b,f1YyVgYYYb,fukys77}vmb=wsw)tW: \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_161_5.dat b/vendor/phpqrcode/cache/mask_5/mask_161_5.dat deleted file mode 100644 index 70d5fb008..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_161_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -xI -@нDp@ o|m rHk㨤~co^Jzװ#5l¦S_92 [}ZÊ=T2ƀP2[cV衆CYf'-X9>v~usK5`e,2,2,2-///o_q}K\reYfeYf峖o+/,\feYfeYfٳexB.e2,2,̲g+l\r16,2,xKGoxt!_!?`Z2*Db#6mYclucZ_V= zotdf6-&SvZv*GR8D7h;;_}1^MuiAF~^{4Rr^~KwcM;_~Y5%sO3bm!TkuUAgq{`4tJ z=-blf&CknX*3G+da{|L^pSsAbX|zx+~B?%Xj;& z;1;Iu;j^AJCF&Z`Lw*|;|Nba-v0r}8=>>Iv>dx&vf52z;Q-;T)bDuoUlH3!|5cNl~ F6aZ#Wx#j=> diff --git a/vendor/phpqrcode/cache/mask_5/mask_169_5.dat b/vendor/phpqrcode/cache/mask_5/mask_169_5.dat deleted file mode 100644 index 921a77076..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_169_5.dat +++ /dev/null @@ -1 +0,0 @@ -xj0|/niK'.r:T-m&Zx9yq3rOgvOO_zׯu`]ȷitاtiloc13j9%_g|ԧ)>>ϰ=te&_4=tU}/>>>Or5/u>/g}g}gOsvO}/g}g}ٷGo-w{r_{g}g}g_n=n]4Nkβ_M8m?SF< \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_173_5.dat b/vendor/phpqrcode/cache/mask_5/mask_173_5.dat deleted file mode 100644 index f9a674136..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_173_5.dat +++ /dev/null @@ -1,4 +0,0 @@ -x[ -0&G1gD)[CzeDѷц=RN6FJm JqP}x s_}GFy; -[;]ek[QbTmy&0 L`̄Y?رw؛ fcVN9&0 L`ׄZ}0=F=F9ANL`&0 L`BzYfI=F9AN&0 L`&0 fIsr ' L`&0 L`<i͒"9AN&0 L`VaBX",Um> -=wZgBΜP !8 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_177_5.dat b/vendor/phpqrcode/cache/mask_5/mask_177_5.dat deleted file mode 100644 index b07c636b6..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_177_5.dat +++ /dev/null @@ -1,11 +0,0 @@ -xъ0~ܾح uO,"% :$Xui=ѶՃgƸ?Ώq.So~z׉W:=h1cq]Ƕi!r8Ɓ`+X -V jj;8ƁX+ -oV`+X -V?[1^h-ֳ5Z;rmS+ -oV`+X -V;Z,YMB+ -V`+X -VZeڦ}r\!W`+X -V`+3Km>SB+ -V`+X -Vc㊛{g;^Qq5ZUݮQL0+*&YDq*6 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_21_5.dat b/vendor/phpqrcode/cache/mask_5/mask_21_5.dat deleted file mode 100644 index 04f97ea6983c85e1cf6e68150ea02bffa30a4f4b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 74 zcmV-Q0JZ;k+MSL;3IHGo1n<6P=l`E8qQc53Ts_3F*hoFpjJL@ppoFxt|L%<{=GZy:DR \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_33_5.dat b/vendor/phpqrcode/cache/mask_5/mask_33_5.dat deleted file mode 100644 index 726d7fd75da51d6bd7737a41e0120162ad66f42d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 106 zcmV-w0G0oE+U-+G4gettyYm|Q|Ibavg*ZYTH6AU510hWtK(zoJYG1SgT>VVIrQ<*s zI~>0{7>;PQoL380wan9y;(obh5mL~qPG^u~gT@LOIlD;&&=vfsD8 MtZP z6Mwy=xtNYJP8P5*q$8GTpmRmFxG+$uUgBJr@iKnar8ktiR$tD;xa+0O#TdC4Bt{5~ JuLf_z1Mr1%Fq8lQ diff --git a/vendor/phpqrcode/cache/mask_5/mask_41_5.dat b/vendor/phpqrcode/cache/mask_5/mask_41_5.dat deleted file mode 100644 index e07c6172a..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_41_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -xTA - 5?7XMtxҴx ?@7@~"N$Sɰ{+CA'r\Pp<ޏ- ͺ:S3sԉۻީz#qw > \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_45_5.dat b/vendor/phpqrcode/cache/mask_5/mask_45_5.dat deleted file mode 100644 index 5168a17f9..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_45_5.dat +++ /dev/null @@ -1 +0,0 @@ -xUA 5?U:N&Z":;4P1=bNvSGM1˛n'(κ J{Eѵs] ,sq \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_49_5.dat b/vendor/phpqrcode/cache/mask_5/mask_49_5.dat deleted file mode 100644 index 9f3f3cd7d60bcba44d9223f52747c1cc9a9feb52..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 146 zcmV;D0B!$x+U-_B3cw%?yZ1HC|3A0G94cx|E9_(x5y8cz*3P{E3|?W)+(E}-2WX#i zfHZ}}1&-ONsSXt<99&1;WS;^gJWwdf{AS1((&~d%`->c<{A($VpSL1s{ zRx%t39rs?{9Nck;b+FN)RKeb>Q2ppQ^!)JYKLg9b6OOo!Q?K^%$i!U415hQ$TboHr A)c^nh diff --git a/vendor/phpqrcode/cache/mask_5/mask_53_5.dat b/vendor/phpqrcode/cache/mask_5/mask_53_5.dat deleted file mode 100644 index 449807bae..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_53_5.dat +++ /dev/null @@ -1 +0,0 @@ -xVA " zYf5ƐJC A;l\,dR. \(e_ еaNi5\żaLP(;2שjN6O u+l{y6od^ C[%  \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_57_5.dat b/vendor/phpqrcode/cache/mask_5/mask_57_5.dat deleted file mode 100644 index c7dd81f39..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_57_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -xVA - 5?NlZHAbBZ0a Md`1z'"<Ր19nvͨ. )bݻ~;9Z#tB~ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_65_5.dat b/vendor/phpqrcode/cache/mask_5/mask_65_5.dat deleted file mode 100644 index ecd9380682523494a1f5577c6e22eff92571b446..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 163 zcmV;U09^lg+U-|C3IHJpy!#sG|DW4SODL(th;FD_Ol!+`ptx^N zLEU#+P+TP~hiEM?kDlMYCn2{Nokr`dh z=(A4`MyHt}6_aUUXNJM(G}onKt|Qlx8JUq8UCD^KPfsl&$;;O(L#`i%q&M<+dnDc& Vax;Tki-1v3l_b|f_yg_whE8s3Pu>6k diff --git a/vendor/phpqrcode/cache/mask_5/mask_73_5.dat b/vendor/phpqrcode/cache/mask_5/mask_73_5.dat deleted file mode 100644 index 00001176d018bd72f9f2128f2f0bf775aab99aa8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 184 zcmV;p07w6L+U;0d4uBvG``>BS`(MrYR@be?`f zXg4__uzEOkK6dEjx2oLg#9{`gm`?j=wt4_|87ivOHqbF%PAmBX8kw9Db&_}T?ycUn z`rYuGA*p6w>oim|H}6{gZul*glk!e^C-3Cl6W;y1W(Io8^nRzjQ{KtDFL+1JRVtmB msmjs2lzG8{6JIm^VkS0TGiPwh(`lA>@p#INaS{u_o$71/34Ϊz^'[FyglgM>OTL4ϔ{&3Wy*ʧb*`<3;Vo0/s6n0ya[mcE \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_81_5.dat b/vendor/phpqrcode/cache/mask_5/mask_81_5.dat deleted file mode 100644 index 71215e952..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_81_5.dat +++ /dev/null @@ -1,3 +0,0 @@ -x - C~M?tzU4" }tMX2|.ɋ˙F\~m4Xu -ٔ, w:EƄ>X̯=_]g>>zמ/)5ךkkkZsXXY{ܮ}~mt:S#&;U#) \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_85_5.dat b/vendor/phpqrcode/cache/mask_5/mask_85_5.dat deleted file mode 100644 index 09cf0e28127934862f45b0f155ede22e48833cd2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 186 zcmV;r07d_J+U=P^3V<*S1n+rG^8e3yuu_X!YO*T`o0cLu)Fn>SVBDKU)x4XXo;}Lz zW!EUrTdh$X>snv=m*blAkGsN*t+gK4zOfzOFOb9L?@mq&=-FzkwKE)0V`(MDRSbv$ zF(3xMXCUdfAl$J#15Y(!+RxHTimUQ~@_-l+17bi7s2)%~pgf>FAO^&M82AqZz<$9g ouBdLo$N>Dm_MjDe$NHpal&=TaS~+q3j)5w#tg{8Q4HYg~22k``-v9sr diff --git a/vendor/phpqrcode/cache/mask_5/mask_89_5.dat b/vendor/phpqrcode/cache/mask_5/mask_89_5.dat deleted file mode 100644 index 5fff53069..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_89_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -x - 45enpQ Gcfl^^;;b5;`kU͹߮j`NsO=\[a6~nLD? !6uF%w*Ȭkf77SĆbÆXodw_—mbClNۙ ck&YVoܡ׷BעبAl6 Jjx \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_5/mask_93_5.dat b/vendor/phpqrcode/cache/mask_5/mask_93_5.dat deleted file mode 100644 index ec4240bd3..000000000 --- a/vendor/phpqrcode/cache/mask_5/mask_93_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK -0 D>&&  fP^8BY5s(imҮ=f3/wۧEyYQwf[} [90303ef̙3'3=,ͼwxDַ.,;s%g,,,=Rὓ7uKKTD<(n lYhV۹sޕyPEtyY]ns ;ss,!LkԅcbL12cX91Z#XEn#;svT~L~LR11vs.1111J1&؍Ń111J1&ƞg KLƪjlk{gڞ5K1/ǐ~,ac$ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_105_6.dat b/vendor/phpqrcode/cache/mask_6/mask_105_6.dat deleted file mode 100644 index a58fec749..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_105_6.dat +++ /dev/null @@ -1,3 +0,0 @@ -xQ -@ DskBZ#o)Sd}Gܷl쯯^)G]S4S?#BZ:+{sHKNiI!me1 -RWe9!``Uyˀu:檞U=w-oԺwB}cMK蹰{{=y蹰{{=y蹰{wScaoi'fyO=CyO=Cy[{S޻=;|v4}ϯ20 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_109_6.dat b/vendor/phpqrcode/cache/mask_6/mask_109_6.dat deleted file mode 100644 index be7b4749e..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_109_6.dat +++ /dev/null @@ -1 +0,0 @@ -xA0 ~ρDBHCHV20nuol쯯˻=ۢs9[l'?7R" &2:7QqX_n ]$՚EIY*Lq0 0 0{LJз(s\ɳwX-7^ItIII$~?N0 0 0O'Itg7L$L-Iuzrfr M^'}(O~R]1YLĞu9Qӕ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_113_6.dat b/vendor/phpqrcode/cache/mask_6/mask_113_6.dat deleted file mode 100644 index 397f52741..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_113_6.dat +++ /dev/null @@ -1,3 +0,0 @@ -x E5NՉbF6on,m>gS9RWcǕ9&%1_cx= GR^w-z?dzv=,}ԥ?ǹژ:9m==@U䲉UXUXVe~by4Wi:e=+3}u4V%s*ZZGM&;I{^hb=04yIS((dxvZSQzT-ftM{l(nX+lN_8ODT@5*n+ z7_UD(asGDJ=LTuwGLL68OD>x%-!8VhX~z9)s_}nsM7#IRuTu5NlE1M}DE!~LqHV#? z>Qf#_+}0{yXSc>}`Oi7KFW*{qHhjb7t7W#OJ7->RxEgr--0aihQri-x!RWX2w$z_x z-{(K`{`B@#S%`O<>9f@NPe0F}o}Zti{rTɼÆ$<>Ov'Cytaaaa~|'9liΣ<<<<Iæ<:<<<ٕWDzy:.z= ݓʯ sVöE=ll_k0_#vίmj \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_129_6.dat b/vendor/phpqrcode/cache/mask_6/mask_129_6.dat deleted file mode 100644 index b4695c3ff0d8ebd6925d8af5e0b403d5974ed46b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmV-60m=S&+U=Xs3d1l6Mc@4z{r{iaU`b3tw}-Y`#z{*Vj)K^nc<+O%V_D@=U$Xty z&tEmqAcJ?j?v86TK^YOR_hi^6CyeFRR#Fmw^kkN5f+OzB@3mz7YhU+_46fxbXrKqJ8dEWiRRzyf{&zkpxBFVGk0 z3uq)*fCX591z5l@;1}=<_yzg`eF2RG3$OqSumB7A1^fbj0lz?Bpf8}2U;!3j0T%w4 zg_beb0}DNqzB>!qv~!(b=$i3#ztA<~>3$)bcdqjbP4mv1Uw8})+SVD`X8*k}X!oJ` I0%mGk`PF`vEdT%j diff --git a/vendor/phpqrcode/cache/mask_6/mask_133_6.dat b/vendor/phpqrcode/cache/mask_6/mask_133_6.dat deleted file mode 100644 index 40911dc575dbbb17a4a057a46521c47b159138ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 296 zcmb=p^>&UUU$X%Z%lo?CzyHr~4f5p772*@!y+W#4z-aoFvniX|)r-4>+}{b_t=?z1 za^B%Uo6C=?Bf5p+A4mDPRY%qZb+7;LH~IgZx!WufT|#LdH+*}lvf|jbWz$U;MJdj?+L60%T4~Y&jvfg5!>uf4f9dJsH`X7Hoj9}k^e4rC zS0C4C)Ev*0lXY~zAowlHfJqsIn&c1mKXCt`{DQ-(sSmClB=SSBgaxSfM)pCdp>-_w zAk_;%Y9X4Lls֪r666rҟ=vڲWy -' -Ο;q tQE>U϶f곭xN]Tc(s❮7tAw`v`v`v`kvwfwt;];;;;;!ޙ;ao];l;;;÷| ʷ(3}l.?"މr};\}S-Aw<9;EV'ם \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_141_6.dat b/vendor/phpqrcode/cache/mask_6/mask_141_6.dat deleted file mode 100644 index 0340409a4..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_141_6.dat +++ /dev/null @@ -1,10 +0,0 @@ -xa F4/c]زȐ[=[E럓sm,fn/|kj\j?g[q(NOZc5SGGP[oMVָfvL<)r%zGej;*ZC7u5PHroFXT;2T zErAz-@(#{w+P}?wqtMJ3uDW8^Zp>M}^Fr0Lpp6sHMCtS0T=zSWcURlGh1q8m6XBZP z)<+zU-@Sal+U99%rKBCNUob7{wNzPiPzs9vGH3tDF8^{p;9$q2z5quaE#u5AU!HIYpjb0cSa)^E8M?_KmSO6tj)==bYa lKD}5p(yFJjBc0i__3AFOq}<9%1{c=3R{)onxM=_Y diff --git a/vendor/phpqrcode/cache/mask_6/mask_149_6.dat b/vendor/phpqrcode/cache/mask_6/mask_149_6.dat deleted file mode 100644 index 69e988350..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_149_6.dat +++ /dev/null @@ -1,2 +0,0 @@ -x -0 E5f478UD62zmpߞk8}GӕN}?}W:guWAˌ7 ~;)Ø{̪ǿ+WPOۢrE\jwG)y˖wAAAAM%2`2dl|p}eqP : e j想=lT5ɠ : G{ddAtDaaaaa&أ&w : 1-MRb0Wf uz5&YiIѺNрAPQSL}4 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_153_6.dat b/vendor/phpqrcode/cache/mask_6/mask_153_6.dat deleted file mode 100644 index 3ab6130edd889298419b702ce1dcfddfda30cf2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 367 zcmb=p_4ZC+-eCoSmWSnj%-{FNXq%daEZUK`+NjemCo*t?dCFURVYiCx+AY&AWaXz; z#Mw80;rtkb0d8YE*wD7uX)inq9ZVuZUFDP(T@8+N1 zd)6dxd%yYT`R@txHxIga-#%q{p=18$LjAv|)HMzi=qI9z_Q`c5T9@Wu3#VwUI?XqmF<#Ov^FVyZX znO%a=0o3e&KJ815aoXF1m16oYp6*fD?Jm?ru;I^wH)p;*n7!8a0qfl_O<0VW z=e+S-gZL9m5s=WóCaz6U~һ{`nݻdvVy~rZ"qk{>g$XKU}m\bjaGx,f1Yb]z̞^.5[?嬜r,f1YY>grVb,f1Y>g,rVmYb,f,|VY9Yb,f,|VY9+g1Ybً ̦M7>2{9z϶hm3l|9xټ#f#x6 -v%N' \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_161_6.dat b/vendor/phpqrcode/cache/mask_6/mask_161_6.dat deleted file mode 100644 index ecec68b1ac0f7ae45685bed5d752ef54a48f0f3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 399 zcmb=p_4aOH-eCm+*NgRG%)jr)tiI;gamK_~Was)*2d9a$rlzvVFd(`Vxt}K4Lw&$1iobzS93uRn)?%d|f?w*sGT%NE> z{5IRU4qg|XWXaPJc9Wm(u=|#>w)ceHw=b*9PWtu#%$j?0UgYIfVgE|yed#NsPfj0ye)_BM^UK-)PTmj)Dk+(%2Qn6>@Mqw( zr>Eaf(4VdSY0^ghT|OXlU~(X3o3@I6N-cI>vvvVU=j&u7z0uK%@n+#iZgHXOO4Lz* zS5klalWD4FYUNJv>X3bV?!C6tj6Zkhb=|q?)qi3p?yJdny>uh|S+%y9&hsv>7uDKn Qv3e2bEbSR&we7b907^~O^#A|> diff --git a/vendor/phpqrcode/cache/mask_6/mask_165_6.dat b/vendor/phpqrcode/cache/mask_6/mask_165_6.dat deleted file mode 100644 index d641dfa3dde2565c932c7234b4521d35c4a1af0d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 400 zcmb=p_4e+=tY!lV)(ihDXFd5FpVz$dq?^)Rf%2utrx}%SOWEwLn>i_J`_iSlTlG_a z?5xW@^>fafr_X<_`MyU#`bPG>>Gu53mUJ)QUoZ3jlYiaKTYL1ypC5hw`u4`@;aj#{ z65c&WV*jT2f7ha_kN&Vtzwen{t6%P~`!n?0+`iwtWbQAWZ<=}1xMrHJarBp;Hbut9$M7_G_mM zcbUq6j_Pl_yVJGrbfKl*aj-TBao%v9T>btkn@|5AAOFSPyYnPS{;9>|9^-RRg7etb z$M3`Xce6j+WoQnP+#v(96>7#EW6f8E-w#x%VH*A2r>p9Yt-(CciI0n7`gVuGb;wx~J!=SaTlS=q~KG>㵾+'{է_Vˊx-J<ӛܗr_>>i;rO}/g}g}ٿ}}xO}/g}g}ٷGo/{{r_>>o/z^#}g}ٿd'ʳ|QRNS3YڳZ'msEǷj5 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_173_6.dat b/vendor/phpqrcode/cache/mask_6/mask_173_6.dat deleted file mode 100644 index 95fa97c7b..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_173_6.dat +++ /dev/null @@ -1 +0,0 @@ -xa09MrM S*:a_-5hh_)uZ֭[loےsmKN{H?x`l#f9>ڟ[eЄώߓ ?^m*/Kmhy%v-nKlkKL`&& g5(gwxYܞa¬pVcZ[#O=SN9&0 L`DŽ 'tjj]QN9&0 L`sYRc@QN9 L`&0 L`"YRc\ ' r&0 L`EH9AN&0 L`& 7p6`|hms R5Ƙȉ k\X/ )g9 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_177_6.dat b/vendor/phpqrcode/cache/mask_6/mask_177_6.dat deleted file mode 100644 index e9f0476f0..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_177_6.dat +++ /dev/null @@ -1,14 +0,0 @@ -xn {ڤ*4v۴u1{f{_,,K9o 4ǵ7lniJiggir<-MG - - - -xuV+zRCr9+Gq6QWb"Qe"WL+ - XXXXX/|~j,nmuMۤ+ - XXXXXYa,X;M+ - XXXXXe)oӘf|5H늚7/D \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_21_6.dat b/vendor/phpqrcode/cache/mask_6/mask_21_6.dat deleted file mode 100644 index 6bd505b4a..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_21_6.dat +++ /dev/null @@ -1 +0,0 @@ -xڝQ C9M{i]X1- C!D7 W ٜ&rD)~]<M 3(>{A aS \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_25_6.dat b/vendor/phpqrcode/cache/mask_6/mask_25_6.dat deleted file mode 100644 index d45083aab..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_25_6.dat +++ /dev/null @@ -1 +0,0 @@ -xڝQA 52)e+(XmZt*(ڹ;tJ<峂_ڤ3oڴ"̢azh}&qvSG֙,-J4}oS[}w \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_29_6.dat b/vendor/phpqrcode/cache/mask_6/mask_29_6.dat deleted file mode 100644 index 0408e2240..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_29_6.dat +++ /dev/null @@ -1,3 +0,0 @@ -xRA -0 XcL(4EԈB -8Cܾ޳nM+lǝՆO1]&ڍ4UD-6-$:6dZ?ylf? 8?߲bTQ5IjGy*#_+5FlYF0i|O3{~#Ory&Utx49Pb}M!qqU eGB4z0Ua0$-m+;~$`<#o+3+E#9Qgs1fkI!%T**fq5 diff --git a/vendor/phpqrcode/cache/mask_6/mask_37_6.dat b/vendor/phpqrcode/cache/mask_6/mask_37_6.dat deleted file mode 100644 index b37ff0ab6..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_37_6.dat +++ /dev/null @@ -1 +0,0 @@ -xA &T `jB{{Ok%tdtlP>c!Jq2?sR|6OyXBED_#CJGJ|{4?o|# zWi31{IkRWty7H{19EeICVF#bFBLK`Sqohq!P3c{Hxke=hL*^psZ< diff --git a/vendor/phpqrcode/cache/mask_6/mask_45_6.dat b/vendor/phpqrcode/cache/mask_6/mask_45_6.dat deleted file mode 100644 index a7da7ee0297b6371bd3ebf57467f009712e40cd6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 189 zcmV;u07CzG+U-?A4#Xe`yz?6P|L3|%6(}8a+S4YxXiTkkisJyP!>lt6lk}|T(tQNG zKksqJ*w!?R9dPAm82jdF@w%LHYmk%ah`(8LQqB>(=edn(GCywV&RxRO?k3YHLkmWk z*aT+KWsqQ$<3Gg7PA4uT3C+}K0drYmWeGYb>)1(p7ta_qgP{3eCtn>q+w^_mWM3IF rC#dT5I$?6GuTnWSVh7coK6Z$@lVax;CrT-Ws>PubeR7!xL?VGyGa6i_ diff --git a/vendor/phpqrcode/cache/mask_6/mask_49_6.dat b/vendor/phpqrcode/cache/mask_6/mask_49_6.dat deleted file mode 100644 index 64ded7093..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_49_6.dat +++ /dev/null @@ -1,2 +0,0 @@ -xVQ i{K&YX؁0̦!=tn&fpWL -`/<ϓKVrU\1bGp@ӑ&fN/+ƽq`AWSRGp_5||zxν:J+WEm4h43tܭ.Ag`\ʤ*F \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_53_6.dat b/vendor/phpqrcode/cache/mask_6/mask_53_6.dat deleted file mode 100644 index 9139e325901037a409a2a2d317141cbd9bb27807..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 195 zcmV;!06hPA+U=In4uBvCMc?@v`Tw7*ElsG)6&_ona}B4=6R_J_H(gnqCg!_cThR(n zojZKuSh^TEmcRQQKZxaCGEO}_fJWLvh7ncHkT}m%gO65*3_i=>Wv5I&JTu%XJ;$_U zq9afxnshi?de~<88-}PKQlCVXOM8jnene{dW{CPB^@+QK_CphY=i#p94>Qav8_#g2 xe}y4d8>?E5v<_ݏ`8G1`B`;+}&s]<iK'l'9%.7 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_65_6.dat b/vendor/phpqrcode/cache/mask_6/mask_65_6.dat deleted file mode 100644 index 550fc8fe7..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_65_6.dat +++ /dev/null @@ -1 +0,0 @@ -xWQ i{KNLk?e$Qik41{`+!ڮM ? 1b8 .^wsnFj5EaQX|=w@2v<ŋŞ|4w\UXBQz+TTcBz/48,5`ȱ OV$ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_69_6.dat b/vendor/phpqrcode/cache/mask_6/mask_69_6.dat deleted file mode 100644 index a3e4fa0f2..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_69_6.dat +++ /dev/null @@ -1 +0,0 @@ -xK @dTh hLSSEq eY@<+*|窮 %>z*7e6QS`.>sE '%@[6@P0h aFxtpl2 Q-g1Nfeo^0FdT>N_OwG3ug {3<[Ժ b?'6^ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_73_6.dat b/vendor/phpqrcode/cache/mask_6/mask_73_6.dat deleted file mode 100644 index ab71b70ae59ccfb23e9c4185b1e919d531fb040f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 230 zcmV6w!~0Dh_U!#`ksFaQ7m diff --git a/vendor/phpqrcode/cache/mask_6/mask_77_6.dat b/vendor/phpqrcode/cache/mask_6/mask_77_6.dat deleted file mode 100644 index ad5a660e3..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_77_6.dat +++ /dev/null @@ -1 +0,0 @@ -x E۲iVa.FpSTY4q~z=:͒ 6m8:#0PضiDy:2Š'Zs&}滜\r0\ŚXw;iPȔL)Seԕ{hDu9LbJSS))gZ{e)qJdLw+#3-V0շljڠS-S 9=ݯ5PPq1M?g \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_81_6.dat b/vendor/phpqrcode/cache/mask_6/mask_81_6.dat deleted file mode 100644 index 28a6d0752..000000000 --- a/vendor/phpqrcode/cache/mask_6/mask_81_6.dat +++ /dev/null @@ -1,3 +0,0 @@ -xQ0D9 rRLvk`0 ;i6\|_cc1huio#2}x*.Yt& -ְq/K;3ve̢ȊAH?`]5Kw!}{Zû߲W -yⷾ^_ykk^Kתb-bYSڸ'֜Nu#MfHSQ?|]IAiMyyuW \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_6/mask_85_6.dat b/vendor/phpqrcode/cache/mask_6/mask_85_6.dat deleted file mode 100644 index d5403e49a80cd825886b9cf067587297c22542b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 229 zcmVz+U=Q93IibwME~bB$^9?aLbYnE?lu`e3KJJuW7jbno{1 z6z!*@KIP;y_0^MY?(1Uq+xo)SueFNlpSwk~3kHJTZW;Jhe~*j0f6i>Ev*&T`9<+0j zJ6S`Ia)zC1@aibjTa>+X>cWZvF(3xSz)1!u`9P<`={Ia;V3iYwbtJu->xkU@m%8GB z;(!ntduS+U=Q93dA4`ME`S|1p|)V-|IyeM8#yz&a$P<5H8u1j zJvs=^zR6hA`VPFkrR{fvn^+GR9ksLtHTXo64YENt$i~~)fawi)LW)84hWko>3Nllc zx#paEz7d+7rFOyurM|GlguB4YENtj{*X=Ev^DF}ptAKX6@RpX4vjZjklMsHWS3nR)a*F|K!unUJMmO!Vn} zoTXx;{$pvl+nqFvSzoF-QmYM8VkABAis-2UASHPxZ{Wiz40ft)3ZUf;xjbgSiRJfEh3YX28r%%+%_c*_vLo*0<$@ z23~1k)EU$n%uQeh%zzm%^YhH4w^!eo$?ptXW}>e4xt^)$QRDw9atl$NB&!*=1='#`+bl]Z \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_7/mask_101_7.dat b/vendor/phpqrcode/cache/mask_7/mask_101_7.dat deleted file mode 100644 index 1f6bc5129..000000000 --- a/vendor/phpqrcode/cache/mask_7/mask_101_7.dat +++ /dev/null @@ -1 +0,0 @@ -xQ C}rm`fjT#54'tfaЇo$cmOJ23c<6Xn0F ) \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_7/mask_105_7.dat b/vendor/phpqrcode/cache/mask_7/mask_105_7.dat deleted file mode 100644 index 6b0cacfe9..000000000 --- a/vendor/phpqrcode/cache/mask_7/mask_105_7.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0EFaMҙNPx)pQ_~|ñ(bF$.aoWGNPUǖM%{oHQUlִL^>+m#{{eo&Y2soM)gncO9sZ3wo+{=f.zޣ{{=zGcskCQϞp^&{^NʷU e5}EwGn+o \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_7/mask_109_7.dat b/vendor/phpqrcode/cache/mask_7/mask_109_7.dat deleted file mode 100644 index 9875cbe8c..000000000 --- a/vendor/phpqrcode/cache/mask_7/mask_109_7.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0 D9Mr}* _x-d:"NJ-k"⨚d{ջגɬ|'rQ5+ s)c7-1nn햺qɔJtg^ʉw̘Ň-?*&Mm@ee5^ -c - -,b\13j4TZfŢo* - - -:Ut* - - -Xů0"%6ed 8rS NsUnk5XejުuVXg,l`u!hXZ\VlM|[ͬ0 0 0 #hF'c]i>Hataaa~<ÆzyqkO0 0 0 㪞Faaa)2˰fÒ%z8tO=3=3:cw -V$ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_7/mask_121_7.dat b/vendor/phpqrcode/cache/mask_7/mask_121_7.dat deleted file mode 100644 index d5d577f7e..000000000 --- a/vendor/phpqrcode/cache/mask_7/mask_121_7.dat +++ /dev/null @@ -1,2 +0,0 @@ -x[ - Edi;^az,#6ƞ^rh&^amY9_غ5Cr6t^^WlEز~ɿ|MmmS}( ۰ ۰ ۰}mQ]ZVq]vѲ"M1fG, qBmtaaazeF3cxIDmtaaamný$n۰ ۰ ۰ ۏa[}`[yޖ޻)n<4K/Oslnlm/G \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_7/mask_125_7.dat b/vendor/phpqrcode/cache/mask_7/mask_125_7.dat deleted file mode 100644 index f9ec0887b05d63190cd6ebe1bb181252db240a5b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 288 zcmb=p^>(%+-(dwFmiND<{`^0`b*j_CTqezxZ{^rj;wKcm=?PmSu=Glz<7VlslV=Y- zO8>Uu%kQn~TjKuaTl~3{$o%&7)#h8}=22b&;klFIREslqHa`A!?#mmI&via`Hb+0Y z@=dof=(6k43w+wj81s{h(%)-(dv-mfy8!@BX(Jcim*@*T8k(?P5abBdPTV55E<2nWM}-KktRmgh+FK z(J5XM>l-trubloFW*NMH^}mg5a-3Y>F9fC9#l&wam?F3O`BH_m{d}fVk6)~v_I&Hz zHJ=+cdHrqItm^WLCC8c$D{tL(Yf{g&%x7Q9 zubFPXVwyI0pF{it{Ra~h7{x%SagRfsg8l^Y7u;W1ZG?0VFoDnn@e|xnSU)k2i@PJtN|E!a-ww)M{dF^|hGkUkCJ!|~{M9*8VnoW7a`o8vg bU+c{{(Mi0VI}n?>ZnFz5Vih(RRyE z|8~uM{F%Y??j(=+_U|&*MxD6{EXooGIou3B+4rdIt<3u>@m`ky)yCCP{twlzB)65{ zxt83x+o|t_pyi`jZivc5?msx>A1W8Q07ZMC+7Tk}qrk>B3EF|xO$4cfDymCT`D{~t z*yCE}H)iGgttY-t-17O&+Wsls{yaWkCr)~=oXRV&$sJJi`D}ZpWzpFaOJp>)b53$^ I_LZ6o0K%<<o[l -Ο -07։Vl;b7fMS;1LCvR|KMH -#Н(Sqd \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_7/mask_141_7.dat b/vendor/phpqrcode/cache/mask_7/mask_141_7.dat deleted file mode 100644 index 98dffab00..000000000 --- a/vendor/phpqrcode/cache/mask_7/mask_141_7.dat +++ /dev/null @@ -1 +0,0 @@ -xA E= rITY@Ä0!|1tbG0ԗѤs2Z/oa\qzOnҋMntX"KmeM}CpPL^S0S0S0SL )ǔژY߾%b,Sl?zC)tLLLLI2zRXh@)tLLLLI1zbϷB)~0S0S0S07)|B)))3ՖL% tfwM*:~hZsnc$1UTtJg8OYE \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_7/mask_145_7.dat b/vendor/phpqrcode/cache/mask_7/mask_145_7.dat deleted file mode 100644 index 4aa2bac11..000000000 --- a/vendor/phpqrcode/cache/mask_7/mask_145_7.dat +++ /dev/null @@ -1,2 +0,0 @@ -x - E5?W6Z-^2qbGX6(Ɖu"LbbGuμGk:HwA[jmHݞ3OkQ{l|TEm JfL?2"&)kRfc̉F,z=5X5X5X7F\pUs#5X5X5XFdYk!a ` ` `o8ct ]CC gM5[N%khZp?Iܣϲ^n$Y7AZP[ fȓ0 \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_7/mask_149_7.dat b/vendor/phpqrcode/cache/mask_7/mask_149_7.dat deleted file mode 100644 index 809f00554..000000000 --- a/vendor/phpqrcode/cache/mask_7/mask_149_7.dat +++ /dev/null @@ -1 +0,0 @@ -xn {? uچ2G$ncFKb3֪tPc ̥7[?9:['9'*Ӗ Gah_/z+6XB>2qYJ0黏Bfa 1 9c7G Ol,^꽓3A:H  1A b0X4%٫#d>&C  1A b+g嬜,f1Yb|Y>+g嬜,f1Ylio.\Ɲo=gϙ-yk_TA \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_7/mask_161_7.dat b/vendor/phpqrcode/cache/mask_7/mask_161_7.dat deleted file mode 100644 index 35ba8ff48..000000000 --- a/vendor/phpqrcode/cache/mask_7/mask_161_7.dat +++ /dev/null @@ -1 +0,0 @@ -xю y/皨E)Ʈ1~493,˵+ZT=ZeC.~iߏ&>,6e~,lW] 2\;׵2j"e,rXݵV(c쵵ZӖ18ީ/,'t.ee,cX2߱,_|yt|]t.cX2e,cy/ɗys.eLe,cX2lo|Z{+2]bl,cX2e{+֊[A2]X2e,c9CXxJ+6rf>h5o6qcIQd2nm=Y_6}PsM~AQyzW1wahnqx4i9#trl79 zGTt{n-#Tkq_|`@8b@BO^-&#lQzJI&bdA?QLEw|ZnT7O=OKRfSrJL~d`Aw9u`O=epcc%X?f~g1U{2P4x`u+VC z_4Xxs=ND}`cY4xm diff --git a/vendor/phpqrcode/cache/mask_7/mask_173_7.dat b/vendor/phpqrcode/cache/mask_7/mask_173_7.dat deleted file mode 100644 index 3b5137125..000000000 --- a/vendor/phpqrcode/cache/mask_7/mask_173_7.dat +++ /dev/null @@ -1 +0,0 @@ -xj0 {=M/ RbHrj\=,mcoZ8;mm0b_ߚt$~Wu5ǚNn'?df2(oG,L6_{z? 9wq9 S!ƌ9o2 L`pOEnv8Lv8L UY"d} Kr ' L`&0 L`B'f:O8TcTc\kr ' L`&0 L`BYgIkr ' L`&0 L`"YRc\ ' r&0 L`EڳH9AN&0 L`&'!;q+Yl*ܳ=؀9j[2 Ms¤Ԅ* \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_7/mask_177_7.dat b/vendor/phpqrcode/cache/mask_7/mask_177_7.dat deleted file mode 100644 index 068477c92af080afb53465a651dd7d1815d562c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 407 zcmb=p_4e+?tY!lS)(hWjd_VoS4`&P8oD}qI!Lz*MP5ODNZExOG1+MwJb8D;p-LO8! z?c3h{D>>rL|Ffpgd7A6Xc6+Psn~m@D{rRxH?)O~%;+lWWo2OpY#{~EVH=u6 z*CeoNM;zn|YxyENS5&k1Xxh;g$7WrP-Y%=Xxj1^=`WtIKUTA-NKSlcq*G{K(1-ys2 zkTw0`)@J(M6-dz@>7=A*us5M&v*{}_V zikH1R`f1L}yvxPQidw;HV6KBY)F%BE(1c~reV&3`GXd;yxF5O}ivA8Q?Gyc+m*}Yd zYKdyZw)H0}-4ng5+!L?o?u!;XT{?T~wJmv{XFN90&I($0Ldf#T-Q#!vG0tQ&@c{s0 CYRvKg diff --git a/vendor/phpqrcode/cache/mask_7/mask_21_7.dat b/vendor/phpqrcode/cache/mask_7/mask_21_7.dat deleted file mode 100644 index 4f9f1386d..000000000 --- a/vendor/phpqrcode/cache/mask_7/mask_21_7.dat +++ /dev/null @@ -1,4 +0,0 @@ -xڝQ -0 B=r]-?]Rl2nc -[nA".j+i -~x3;QIQH8R҈G"z,&;'o97%P8%6oǽ;]NWn[f7v \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_7/mask_29_7.dat b/vendor/phpqrcode/cache/mask_7/mask_29_7.dat deleted file mode 100644 index e3d7391b7..000000000 --- a/vendor/phpqrcode/cache/mask_7/mask_29_7.dat +++ /dev/null @@ -1,2 +0,0 @@ -xR9 QpX$lŲf!I2pgSMZj"te0#ԛ`_1-cha~/Eh4"~ \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_7/mask_37_7.dat b/vendor/phpqrcode/cache/mask_7/mask_37_7.dat deleted file mode 100644 index 87d9a1a9d2c57b346aa4a8a2e03754a7f7668ab3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 122 zcmV-=0EPc}+U-<34nQFY+c^!r|K-dh{-xmXMloTrDOS>|wt{nN$p8UIKT#gc;o<{l zE|1OO;;@B_*1sBYail&HAVaMSznZ$V?+Zst%JX#@k^|V&_%v=tL+(dx9wGsNg^L)? cH0CK`8l%kV8sp6AdyF;KJ?hQK0&cYgLugGq!2kdN diff --git a/vendor/phpqrcode/cache/mask_7/mask_41_7.dat b/vendor/phpqrcode/cache/mask_7/mask_41_7.dat deleted file mode 100644 index 8acec04f0..000000000 --- a/vendor/phpqrcode/cache/mask_7/mask_41_7.dat +++ /dev/null @@ -1 +0,0 @@ -xTA 5[fDY(O^bR3/~t/L"7SQQ5j\Sib#Նȏ+ǣw#zx?㽧A-wu曑Y7$b.%A;wRoxG}? \ No newline at end of file diff --git a/vendor/phpqrcode/cache/mask_7/mask_45_7.dat b/vendor/phpqrcode/cache/mask_7/mask_45_7.dat deleted file mode 100644 index dbba31d0bfddcbed98ea5d7a9f6ee59f976e0421..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 173 zcmV;e08;;W+U-@*3cw%;e7~=;|Npr$DAUrsy$v=4K{1olOOYWhIYuypTZ?rVorcG` ziBe#%j*Q*dv)kOh(x@276Nxd&JP9U=2L~+ngMKq>jn}9{jK*jHRSM|5x5n%q5&j`e zsyWelhq7a3OJw7iYkdjosJYWIS!tZw|D3#JI49hv+1NkUa3?Dz bQL;xvA(=V?*)bSkL5FpXakG_S`^qkH-^P*%H1XEuNsLnfvAu` z`*BEI8A_NDBQX*qG5P?bYCW1Y9JBiGIs;FK@Oe8gF(1@>hQVmp28DF`j`Xh+BQX-A zPcoX-fMZmg?C*@cp*&oVxZ$(2Gpy+uA|bgw1Aot87`^rkIYy2Bj`)lr?t+Z`0Y=4# E+IH1p%m4rY diff --git a/vendor/phpqrcode/cache/mask_7/mask_73_7.dat b/vendor/phpqrcode/cache/mask_7/mask_73_7.dat deleted file mode 100644 index f414e4a5877861bd45e439125a47c52b70a0ca12..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 221 zcmV<303!c*+U;1;4#OY_e7~=O|NpsVOKWw-svJ$a1xQMLKjmF z$Fo{kZk}5~sTj*XCvO!sEAx=sT{$)7Ae9TQEOc4^f@wQ)ea)wu7H%}{#MK=l@)ASD zb^%LDMOj|2h)%FTj!en)$C=J-W^O$fr&vx@-|THnt7dOwYNfBvQ>ukv o40T%96U5*sI{`_>S?}(:yTl{G&E\6}"AX XϬQSkr0$!s zmX(et@ z$j}>#8;TpsDPluxhz+rk$AtTL3lG`X3UJ4`446UdL}WW&@+vhnbfN!;F1qj9*+b^XNIk3 z`ZsZ(ai8(tWM<5anK3hF=1a_o^~_APRcC!GK5O7o1G~?-&v25BNzV0+I1 diff --git a/vendor/phpqrcode/cache/mask_7/mask_97_7.dat b/vendor/phpqrcode/cache/mask_7/mask_97_7.dat deleted file mode 100644 index b277368bd..000000000 --- a/vendor/phpqrcode/cache/mask_7/mask_97_7.dat +++ /dev/null @@ -1,2 +0,0 @@ -x0ܲD[V.KI`'sxy$xx"= O^&pbYʬ$Kݣ8K eÌ 3:$bI,%$Yb襶 -M)T %q綦EX}jlTTKbI,%,_e[%V]R];N,%$%V@`%pam(}_%%۸4='u)ai.;M> \ No newline at end of file diff --git a/vendor/phpqrcode/index.php b/vendor/phpqrcode/index.php deleted file mode 100644 index 9e14b7eaa..000000000 --- a/vendor/phpqrcode/index.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - echo "

    PHP QR Code


    "; - - //set it to writable location, a place for temp generated PNG files - $PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR; - - //html PNG location prefix - $PNG_WEB_DIR = 'temp/'; - - include "qrlib.php"; - - //ofcourse we need rights to create temp dir - if (!file_exists($PNG_TEMP_DIR)) - mkdir($PNG_TEMP_DIR); - - - $filename = $PNG_TEMP_DIR.'test.png'; - - //processing form input - //remember to sanitize user input in real-life solution !!! - $errorCorrectionLevel = 'L'; - if (isset($_REQUEST['level']) && in_array($_REQUEST['level'], array('L','M','Q','H'))) - $errorCorrectionLevel = $_REQUEST['level']; - - $matrixPointSize = 4; - if (isset($_REQUEST['size'])) - $matrixPointSize = min(max((int)$_REQUEST['size'], 1), 10); - - - if (isset($_REQUEST['data'])) { - - //it's very important! - if (trim($_REQUEST['data']) == '') - die('data cannot be empty! back'); - - // user data - $filename = $PNG_TEMP_DIR.'test'.md5($_REQUEST['data'].'|'.$errorCorrectionLevel.'|'.$matrixPointSize).'.png'; - QRcode::png($_REQUEST['data'], $filename, $errorCorrectionLevel, $matrixPointSize, 2); - - } else { - - //default data - echo 'You can provide data in GET parameter: like that
    '; - QRcode::png('PHP QR Code :)', $filename, $errorCorrectionLevel, $matrixPointSize, 2); - - } - - //display generated file - echo '
    '; - - //config form - echo '
    - Data:   - ECC:   - Size:   -

    '; - - // benchmark - QRtools::timeBenchmark(); - - \ No newline at end of file diff --git a/vendor/phpqrcode/phpqrcode.php b/vendor/phpqrcode/phpqrcode.php deleted file mode 100644 index 80adb9df2..000000000 --- a/vendor/phpqrcode/phpqrcode.php +++ /dev/null @@ -1,3312 +0,0 @@ - - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - - -/* - * Version: 1.1.4 - * Build: 2010100721 - */ - - - -//---- qrconst.php ----------------------------- - - - - - -/* - * PHP QR Code encoder - * - * Common constants - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - // Encoding modes - - define('QR_MODE_NUL', -1); - define('QR_MODE_NUM', 0); - define('QR_MODE_AN', 1); - define('QR_MODE_8', 2); - define('QR_MODE_KANJI', 3); - define('QR_MODE_STRUCTURE', 4); - - // Levels of error correction. - - define('QR_ECLEVEL_L', 0); - define('QR_ECLEVEL_M', 1); - define('QR_ECLEVEL_Q', 2); - define('QR_ECLEVEL_H', 3); - - // Supported output formats - - define('QR_FORMAT_TEXT', 0); - define('QR_FORMAT_PNG', 1); - - class qrstr { - public static function set(&$srctab, $x, $y, $repl, $replLen = false) { - $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); - } - } - - - -//---- merged_config.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Config file, tuned-up for merged verion - */ - - define('QR_CACHEABLE', false); // use cache - more disk reads but less CPU power, masks and format templates are stored there - define('QR_CACHE_DIR', false); // used when QR_CACHEABLE === true - define('QR_LOG_DIR', false); // default error logs dir - - define('QR_FIND_BEST_MASK', true); // if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code - define('QR_FIND_FROM_RANDOM', 2); // if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly - define('QR_DEFAULT_MASK', 2); // when QR_FIND_BEST_MASK === false - - define('QR_PNG_MAXIMUM_SIZE', 1024); // maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images - - - - -//---- qrtools.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Toolset, handy and debug utilites. - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRtools { - - //---------------------------------------------------------------------- - public static function binarize($frame) - { - $len = count($frame); - foreach ($frame as &$frameLine) { - - for($i=0; $i<$len; $i++) { - $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; - } - } - - return $frame; - } - - //---------------------------------------------------------------------- - public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037') - { - $barcode_array = array(); - - if (!is_array($mode)) - $mode = explode(',', $mode); - - $eccLevel = 'L'; - - if (count($mode) > 1) { - $eccLevel = $mode[1]; - } - - $qrTab = QRcode::text($code, false, $eccLevel); - $size = count($qrTab); - - $barcode_array['num_rows'] = $size; - $barcode_array['num_cols'] = $size; - $barcode_array['bcode'] = array(); - - foreach ($qrTab as $line) { - $arrAdd = array(); - foreach(str_split($line) as $char) - $arrAdd[] = ($char=='1')?1:0; - $barcode_array['bcode'][] = $arrAdd; - } - - return $barcode_array; - } - - //---------------------------------------------------------------------- - public static function clearCache() - { - self::$frames = array(); - } - - //---------------------------------------------------------------------- - public static function buildCache() - { - QRtools::markTime('before_build_cache'); - - $mask = new QRmask(); - for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) { - $frame = QRspec::newFrame($a); - if (QR_IMAGE) { - $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; - QRimage::png(self::binarize($frame), $fileName, 1, 0); - } - - $width = count($frame); - $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); - for ($maskNo=0; $maskNo<8; $maskNo++) - $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); - } - - QRtools::markTime('after_build_cache'); - } - - //---------------------------------------------------------------------- - public static function log($outfile, $err) - { - if (QR_LOG_DIR !== false) { - if ($err != '') { - if ($outfile !== false) { - file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); - } else { - file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); - } - } - } - } - - //---------------------------------------------------------------------- - public static function dumpMask($frame) - { - $width = count($frame); - for($y=0;$y<$width;$y++) { - for($x=0;$x<$width;$x++) { - echo ord($frame[$y][$x]).','; - } - } - } - - //---------------------------------------------------------------------- - public static function markTime($markerId) - { - list($usec, $sec) = explode(" ", microtime()); - $time = ((float)$usec + (float)$sec); - - if (!isset($GLOBALS['qr_time_bench'])) - $GLOBALS['qr_time_bench'] = array(); - - $GLOBALS['qr_time_bench'][$markerId] = $time; - } - - //---------------------------------------------------------------------- - public static function timeBenchmark() - { - self::markTime('finish'); - - $lastTime = 0; - $startTime = 0; - $p = 0; - - echo ' - - '; - - foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) { - if ($p > 0) { - echo ''; - } else { - $startTime = $thisTime; - } - - $p++; - $lastTime = $thisTime; - } - - echo ' - - -
    BENCHMARK
    till '.$markerId.': '.number_format($thisTime-$lastTime, 6).'s
    TOTAL: '.number_format($lastTime-$startTime, 6).'s
    '; - } - - } - - //########################################################################## - - QRtools::markTime('start'); - - - - -//---- qrspec.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * QR Code specifications - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * The following data / specifications are taken from - * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) - * or - * "Automatic identification and data capture techniques -- - * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('QRSPEC_VERSION_MAX', 40); - define('QRSPEC_WIDTH_MAX', 177); - - define('QRCAP_WIDTH', 0); - define('QRCAP_WORDS', 1); - define('QRCAP_REMINDER', 2); - define('QRCAP_EC', 3); - - class QRspec { - - public static $capacity = array( - array( 0, 0, 0, array( 0, 0, 0, 0)), - array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 - array( 25, 44, 7, array( 10, 16, 22, 28)), - array( 29, 70, 7, array( 15, 26, 36, 44)), - array( 33, 100, 7, array( 20, 36, 52, 64)), - array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 - array( 41, 172, 7, array( 36, 64, 96, 112)), - array( 45, 196, 0, array( 40, 72, 108, 130)), - array( 49, 242, 0, array( 48, 88, 132, 156)), - array( 53, 292, 0, array( 60, 110, 160, 192)), - array( 57, 346, 0, array( 72, 130, 192, 224)), //10 - array( 61, 404, 0, array( 80, 150, 224, 264)), - array( 65, 466, 0, array( 96, 176, 260, 308)), - array( 69, 532, 0, array( 104, 198, 288, 352)), - array( 73, 581, 3, array( 120, 216, 320, 384)), - array( 77, 655, 3, array( 132, 240, 360, 432)), //15 - array( 81, 733, 3, array( 144, 280, 408, 480)), - array( 85, 815, 3, array( 168, 308, 448, 532)), - array( 89, 901, 3, array( 180, 338, 504, 588)), - array( 93, 991, 3, array( 196, 364, 546, 650)), - array( 97, 1085, 3, array( 224, 416, 600, 700)), //20 - array(101, 1156, 4, array( 224, 442, 644, 750)), - array(105, 1258, 4, array( 252, 476, 690, 816)), - array(109, 1364, 4, array( 270, 504, 750, 900)), - array(113, 1474, 4, array( 300, 560, 810, 960)), - array(117, 1588, 4, array( 312, 588, 870, 1050)), //25 - array(121, 1706, 4, array( 336, 644, 952, 1110)), - array(125, 1828, 4, array( 360, 700, 1020, 1200)), - array(129, 1921, 3, array( 390, 728, 1050, 1260)), - array(133, 2051, 3, array( 420, 784, 1140, 1350)), - array(137, 2185, 3, array( 450, 812, 1200, 1440)), //30 - array(141, 2323, 3, array( 480, 868, 1290, 1530)), - array(145, 2465, 3, array( 510, 924, 1350, 1620)), - array(149, 2611, 3, array( 540, 980, 1440, 1710)), - array(153, 2761, 3, array( 570, 1036, 1530, 1800)), - array(157, 2876, 0, array( 570, 1064, 1590, 1890)), //35 - array(161, 3034, 0, array( 600, 1120, 1680, 1980)), - array(165, 3196, 0, array( 630, 1204, 1770, 2100)), - array(169, 3362, 0, array( 660, 1260, 1860, 2220)), - array(173, 3532, 0, array( 720, 1316, 1950, 2310)), - array(177, 3706, 0, array( 750, 1372, 2040, 2430)) //40 - ); - - //---------------------------------------------------------------------- - public static function getDataLength($version, $level) - { - return self::$capacity[$version][QRCAP_WORDS] - self::$capacity[$version][QRCAP_EC][$level]; - } - - //---------------------------------------------------------------------- - public static function getECCLength($version, $level) - { - return self::$capacity[$version][QRCAP_EC][$level]; - } - - //---------------------------------------------------------------------- - public static function getWidth($version) - { - return self::$capacity[$version][QRCAP_WIDTH]; - } - - //---------------------------------------------------------------------- - public static function getRemainder($version) - { - return self::$capacity[$version][QRCAP_REMINDER]; - } - - //---------------------------------------------------------------------- - public static function getMinimumVersion($size, $level) - { - - for($i=1; $i<= QRSPEC_VERSION_MAX; $i++) { - $words = self::$capacity[$i][QRCAP_WORDS] - self::$capacity[$i][QRCAP_EC][$level]; - if($words >= $size) - return $i; - } - - return -1; - } - - //###################################################################### - - public static $lengthTableBits = array( - array(10, 12, 14), - array( 9, 11, 13), - array( 8, 16, 16), - array( 8, 10, 12) - ); - - //---------------------------------------------------------------------- - public static function lengthIndicator($mode, $version) - { - if ($mode == QR_MODE_STRUCTURE) - return 0; - - if ($version <= 9) { - $l = 0; - } else if ($version <= 26) { - $l = 1; - } else { - $l = 2; - } - - return self::$lengthTableBits[$mode][$l]; - } - - //---------------------------------------------------------------------- - public static function maximumWords($mode, $version) - { - if($mode == QR_MODE_STRUCTURE) - return 3; - - if($version <= 9) { - $l = 0; - } else if($version <= 26) { - $l = 1; - } else { - $l = 2; - } - - $bits = self::$lengthTableBits[$mode][$l]; - $words = (1 << $bits) - 1; - - if($mode == QR_MODE_KANJI) { - $words *= 2; // the number of bytes is required - } - - return $words; - } - - // Error correction code ----------------------------------------------- - // Table of the error correction code (Reed-Solomon block) - // See Table 12-16 (pp.30-36), JIS X0510:2004. - - public static $eccTable = array( - array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), - array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), - array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), - array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 - array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), - array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), - array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), - array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), - array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), //10 - array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), - array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), - array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), - array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), - array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), //15 - array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), - array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), - array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), - array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), - array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), //20 - array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), - array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), - array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), - array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), - array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), //25 - array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), - array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), - array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), - array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), - array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), //30 - array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), - array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), - array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), - array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), - array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), //35 - array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), - array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), - array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), - array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), - array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)),//40 - ); - - //---------------------------------------------------------------------- - // CACHEABLE!!! - - public static function getEccSpec($version, $level, array &$spec) - { - if (count($spec) < 5) { - $spec = array(0,0,0,0,0); - } - - $b1 = self::$eccTable[$version][$level][0]; - $b2 = self::$eccTable[$version][$level][1]; - $data = self::getDataLength($version, $level); - $ecc = self::getECCLength($version, $level); - - if($b2 == 0) { - $spec[0] = $b1; - $spec[1] = (int)($data / $b1); - $spec[2] = (int)($ecc / $b1); - $spec[3] = 0; - $spec[4] = 0; - } else { - $spec[0] = $b1; - $spec[1] = (int)($data / ($b1 + $b2)); - $spec[2] = (int)($ecc / ($b1 + $b2)); - $spec[3] = $b2; - $spec[4] = $spec[1] + 1; - } - } - - // Alignment pattern --------------------------------------------------- - - // Positions of alignment patterns. - // This array includes only the second and the third position of the - // alignment patterns. Rest of them can be calculated from the distance - // between them. - - // See Table 1 in Appendix E (pp.71) of JIS X0510:2004. - - public static $alignmentPattern = array( - array( 0, 0), - array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 - array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 - array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), //11-15 - array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), //16-20 - array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), //21-25 - array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), //26-30 - array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), //31-35 - array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58), //35-40 - ); - - - /** -------------------------------------------------------------------- - * Put an alignment marker. - * @param frame - * @param width - * @param ox,oy center coordinate of the pattern - */ - public static function putAlignmentMarker(array &$frame, $ox, $oy) - { - $finder = array( - "\xa1\xa1\xa1\xa1\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa0\xa1\xa0\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa1\xa1\xa1\xa1" - ); - - $yStart = $oy-2; - $xStart = $ox-2; - - for($y=0; $y<5; $y++) { - QRstr::set($frame, $xStart, $yStart+$y, $finder[$y]); - } - } - - //---------------------------------------------------------------------- - public static function putAlignmentPattern($version, &$frame, $width) - { - if($version < 2) - return; - - $d = self::$alignmentPattern[$version][1] - self::$alignmentPattern[$version][0]; - if($d < 0) { - $w = 2; - } else { - $w = (int)(($width - self::$alignmentPattern[$version][0]) / $d + 2); - } - - if($w * $w - 3 == 1) { - $x = self::$alignmentPattern[$version][0]; - $y = self::$alignmentPattern[$version][0]; - self::putAlignmentMarker($frame, $x, $y); - return; - } - - $cx = self::$alignmentPattern[$version][0]; - for($x=1; $x<$w - 1; $x++) { - self::putAlignmentMarker($frame, 6, $cx); - self::putAlignmentMarker($frame, $cx, 6); - $cx += $d; - } - - $cy = self::$alignmentPattern[$version][0]; - for($y=0; $y<$w-1; $y++) { - $cx = self::$alignmentPattern[$version][0]; - for($x=0; $x<$w-1; $x++) { - self::putAlignmentMarker($frame, $cx, $cy); - $cx += $d; - } - $cy += $d; - } - } - - // Version information pattern ----------------------------------------- - - // Version information pattern (BCH coded). - // See Table 1 in Appendix D (pp.68) of JIS X0510:2004. - - // size: [QRSPEC_VERSION_MAX - 6] - - public static $versionPattern = array( - 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, - 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, - 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, - 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, - 0x27541, 0x28c69 - ); - - //---------------------------------------------------------------------- - public static function getVersionPattern($version) - { - if($version < 7 || $version > QRSPEC_VERSION_MAX) - return 0; - - return self::$versionPattern[$version -7]; - } - - // Format information -------------------------------------------------- - // See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib) - - public static $formatInfo = array( - array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), - array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), - array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), - array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) - ); - - public static function getFormatInfo($mask, $level) - { - if($mask < 0 || $mask > 7) - return 0; - - if($level < 0 || $level > 3) - return 0; - - return self::$formatInfo[$level][$mask]; - } - - // Frame --------------------------------------------------------------- - // Cache of initial frames. - - public static $frames = array(); - - /** -------------------------------------------------------------------- - * Put a finder pattern. - * @param frame - * @param width - * @param ox,oy upper-left coordinate of the pattern - */ - public static function putFinderPattern(&$frame, $ox, $oy) - { - $finder = array( - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" - ); - - for($y=0; $y<7; $y++) { - QRstr::set($frame, $ox, $oy+$y, $finder[$y]); - } - } - - //---------------------------------------------------------------------- - public static function createFrame($version) - { - $width = self::$capacity[$version][QRCAP_WIDTH]; - $frameLine = str_repeat ("\0", $width); - $frame = array_fill(0, $width, $frameLine); - - // Finder pattern - self::putFinderPattern($frame, 0, 0); - self::putFinderPattern($frame, $width - 7, 0); - self::putFinderPattern($frame, 0, $width - 7); - - // Separator - $yOffset = $width - 7; - - for($y=0; $y<7; $y++) { - $frame[$y][7] = "\xc0"; - $frame[$y][$width - 8] = "\xc0"; - $frame[$yOffset][7] = "\xc0"; - $yOffset++; - } - - $setPattern = str_repeat("\xc0", 8); - - QRstr::set($frame, 0, 7, $setPattern); - QRstr::set($frame, $width-8, 7, $setPattern); - QRstr::set($frame, 0, $width - 8, $setPattern); - - // Format info - $setPattern = str_repeat("\x84", 9); - QRstr::set($frame, 0, 8, $setPattern); - QRstr::set($frame, $width - 8, 8, $setPattern, 8); - - $yOffset = $width - 8; - - for($y=0; $y<8; $y++,$yOffset++) { - $frame[$y][8] = "\x84"; - $frame[$yOffset][8] = "\x84"; - } - - // Timing pattern - - for($i=1; $i<$width-15; $i++) { - $frame[6][7+$i] = chr(0x90 | ($i & 1)); - $frame[7+$i][6] = chr(0x90 | ($i & 1)); - } - - // Alignment pattern - self::putAlignmentPattern($version, $frame, $width); - - // Version information - if($version >= 7) { - $vinf = self::getVersionPattern($version); - - $v = $vinf; - - for($x=0; $x<6; $x++) { - for($y=0; $y<3; $y++) { - $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - - $v = $vinf; - for($y=0; $y<6; $y++) { - for($x=0; $x<3; $x++) { - $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - } - - // and a little bit... - $frame[$width - 8][8] = "\x81"; - - return $frame; - } - - //---------------------------------------------------------------------- - public static function debug($frame, $binary_mode = false) - { - if ($binary_mode) { - - foreach ($frame as &$frameLine) { - $frameLine = join('  ', explode('0', $frameLine)); - $frameLine = join('██', explode('1', $frameLine)); - } - - ?> - -


            '; - echo join("
            ", $frame); - echo '






    '; - - } else { - - foreach ($frame as &$frameLine) { - $frameLine = join(' ', explode("\xc0", $frameLine)); - $frameLine = join('', explode("\xc1", $frameLine)); - $frameLine = join(' ', explode("\xa0", $frameLine)); - $frameLine = join('', explode("\xa1", $frameLine)); - $frameLine = join('', explode("\x84", $frameLine)); //format 0 - $frameLine = join('', explode("\x85", $frameLine)); //format 1 - $frameLine = join('', explode("\x81", $frameLine)); //special bit - $frameLine = join(' ', explode("\x90", $frameLine)); //clock 0 - $frameLine = join('', explode("\x91", $frameLine)); //clock 1 - $frameLine = join(' ', explode("\x88", $frameLine)); //version - $frameLine = join('', explode("\x89", $frameLine)); //version - $frameLine = join('♦', explode("\x01", $frameLine)); - $frameLine = join('⋅', explode("\0", $frameLine)); - } - - ?> - - "; - echo join("
    ", $frame); - echo "
    "; - - } - } - - //---------------------------------------------------------------------- - public static function serial($frame) - { - return gzcompress(join("\n", $frame), 9); - } - - //---------------------------------------------------------------------- - public static function unserial($code) - { - return explode("\n", gzuncompress($code)); - } - - //---------------------------------------------------------------------- - public static function newFrame($version) - { - if($version < 1 || $version > QRSPEC_VERSION_MAX) - return null; - - if(!isset(self::$frames[$version])) { - - $fileName = QR_CACHE_DIR.'frame_'.$version.'.dat'; - - if (QR_CACHEABLE) { - if (file_exists($fileName)) { - self::$frames[$version] = self::unserial(file_get_contents($fileName)); - } else { - self::$frames[$version] = self::createFrame($version); - file_put_contents($fileName, self::serial(self::$frames[$version])); - } - } else { - self::$frames[$version] = self::createFrame($version); - } - } - - if(is_null(self::$frames[$version])) - return null; - - return self::$frames[$version]; - } - - //---------------------------------------------------------------------- - public static function rsBlockNum($spec) { return $spec[0] + $spec[3]; } - public static function rsBlockNum1($spec) { return $spec[0]; } - public static function rsDataCodes1($spec) { return $spec[1]; } - public static function rsEccCodes1($spec) { return $spec[2]; } - public static function rsBlockNum2($spec) { return $spec[3]; } - public static function rsDataCodes2($spec) { return $spec[4]; } - public static function rsEccCodes2($spec) { return $spec[2]; } - public static function rsDataLength($spec) { return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); } - public static function rsEccLength($spec) { return ($spec[0] + $spec[3]) * $spec[2]; } - - } - - - -//---- qrimage.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Image output of code using GD2 - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('QR_IMAGE', true); - - class QRimage { - - //---------------------------------------------------------------------- - public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE) - { - $image = self::image($frame, $pixelPerPoint, $outerFrame); - - if ($filename === false) { - Header("Content-type: image/png"); - ImagePng($image); - } else { - if($saveandprint===TRUE){ - ImagePng($image, $filename); - header("Content-type: image/png"); - ImagePng($image); - }else{ - ImagePng($image, $filename); - } - } - - ImageDestroy($image); - } - - //---------------------------------------------------------------------- - public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85) - { - $image = self::image($frame, $pixelPerPoint, $outerFrame); - - if ($filename === false) { - Header("Content-type: image/jpeg"); - ImageJpeg($image, null, $q); - } else { - ImageJpeg($image, $filename, $q); - } - - ImageDestroy($image); - } - - //---------------------------------------------------------------------- - private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4) - { - $h = count($frame); - $w = strlen($frame[0]); - - $imgW = $w + 2*$outerFrame; - $imgH = $h + 2*$outerFrame; - - $base_image =ImageCreate($imgW, $imgH); - - $col[0] = ImageColorAllocate($base_image,255,255,255); - $col[1] = ImageColorAllocate($base_image,0,0,0); - - imagefill($base_image, 0, 0, $col[0]); - - for($y=0; $y<$h; $y++) { - for($x=0; $x<$w; $x++) { - if ($frame[$y][$x] == '1') { - ImageSetPixel($base_image,$x+$outerFrame,$y+$outerFrame,$col[1]); - } - } - } - - $target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint); - ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH); - ImageDestroy($base_image); - - return $target_image; - } - } - - - -//---- qrinput.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Input encoding class - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('STRUCTURE_HEADER_BITS', 20); - define('MAX_STRUCTURED_SYMBOLS', 16); - - class QRinputItem { - - public $mode; - public $size; - public $data; - public $bstream; - - public function __construct($mode, $size, $data, $bstream = null) - { - $setData = array_slice($data, 0, $size); - - if (count($setData) < $size) { - $setData = array_merge($setData, array_fill(0,$size-count($setData),0)); - } - - if(!QRinput::check($mode, $size, $setData)) { - throw new Exception('Error m:'.$mode.',s:'.$size.',d:'.join(',',$setData)); - return null; - } - - $this->mode = $mode; - $this->size = $size; - $this->data = $setData; - $this->bstream = $bstream; - } - - //---------------------------------------------------------------------- - public function encodeModeNum($version) - { - try { - - $words = (int)($this->size / 3); - $bs = new QRbitstream(); - - $val = 0x1; - $bs->appendNum(4, $val); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_NUM, $version), $this->size); - - for($i=0; $i<$words; $i++) { - $val = (ord($this->data[$i*3 ]) - ord('0')) * 100; - $val += (ord($this->data[$i*3+1]) - ord('0')) * 10; - $val += (ord($this->data[$i*3+2]) - ord('0')); - $bs->appendNum(10, $val); - } - - if($this->size - $words * 3 == 1) { - $val = ord($this->data[$words*3]) - ord('0'); - $bs->appendNum(4, $val); - } else if($this->size - $words * 3 == 2) { - $val = (ord($this->data[$words*3 ]) - ord('0')) * 10; - $val += (ord($this->data[$words*3+1]) - ord('0')); - $bs->appendNum(7, $val); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeModeAn($version) - { - try { - $words = (int)($this->size / 2); - $bs = new QRbitstream(); - - $bs->appendNum(4, 0x02); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_AN, $version), $this->size); - - for($i=0; $i<$words; $i++) { - $val = (int)QRinput::lookAnTable(ord($this->data[$i*2 ])) * 45; - $val += (int)QRinput::lookAnTable(ord($this->data[$i*2+1])); - - $bs->appendNum(11, $val); - } - - if($this->size & 1) { - $val = QRinput::lookAnTable(ord($this->data[$words * 2])); - $bs->appendNum(6, $val); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeMode8($version) - { - try { - $bs = new QRbitstream(); - - $bs->appendNum(4, 0x4); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_8, $version), $this->size); - - for($i=0; $i<$this->size; $i++) { - $bs->appendNum(8, ord($this->data[$i])); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeModeKanji($version) - { - try { - - $bs = new QRbitrtream(); - - $bs->appendNum(4, 0x8); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_KANJI, $version), (int)($this->size / 2)); - - for($i=0; $i<$this->size; $i+=2) { - $val = (ord($this->data[$i]) << 8) | ord($this->data[$i+1]); - if($val <= 0x9ffc) { - $val -= 0x8140; - } else { - $val -= 0xc140; - } - - $h = ($val >> 8) * 0xc0; - $val = ($val & 0xff) + $h; - - $bs->appendNum(13, $val); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeModeStructure() - { - try { - $bs = new QRbitstream(); - - $bs->appendNum(4, 0x03); - $bs->appendNum(4, ord($this->data[1]) - 1); - $bs->appendNum(4, ord($this->data[0]) - 1); - $bs->appendNum(8, ord($this->data[2])); - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function estimateBitStreamSizeOfEntry($version) - { - $bits = 0; - - if($version == 0) - $version = 1; - - switch($this->mode) { - case QR_MODE_NUM: $bits = QRinput::estimateBitsModeNum($this->size); break; - case QR_MODE_AN: $bits = QRinput::estimateBitsModeAn($this->size); break; - case QR_MODE_8: $bits = QRinput::estimateBitsMode8($this->size); break; - case QR_MODE_KANJI: $bits = QRinput::estimateBitsModeKanji($this->size);break; - case QR_MODE_STRUCTURE: return STRUCTURE_HEADER_BITS; - default: - return 0; - } - - $l = QRspec::lengthIndicator($this->mode, $version); - $m = 1 << $l; - $num = (int)(($this->size + $m - 1) / $m); - - $bits += $num * (4 + $l); - - return $bits; - } - - //---------------------------------------------------------------------- - public function encodeBitStream($version) - { - try { - - unset($this->bstream); - $words = QRspec::maximumWords($this->mode, $version); - - if($this->size > $words) { - - $st1 = new QRinputItem($this->mode, $words, $this->data); - $st2 = new QRinputItem($this->mode, $this->size - $words, array_slice($this->data, $words)); - - $st1->encodeBitStream($version); - $st2->encodeBitStream($version); - - $this->bstream = new QRbitstream(); - $this->bstream->append($st1->bstream); - $this->bstream->append($st2->bstream); - - unset($st1); - unset($st2); - - } else { - - $ret = 0; - - switch($this->mode) { - case QR_MODE_NUM: $ret = $this->encodeModeNum($version); break; - case QR_MODE_AN: $ret = $this->encodeModeAn($version); break; - case QR_MODE_8: $ret = $this->encodeMode8($version); break; - case QR_MODE_KANJI: $ret = $this->encodeModeKanji($version);break; - case QR_MODE_STRUCTURE: $ret = $this->encodeModeStructure(); break; - - default: - break; - } - - if($ret < 0) - return -1; - } - - return $this->bstream->size(); - - } catch (Exception $e) { - return -1; - } - } - }; - - //########################################################################## - - class QRinput { - - public $items; - - private $version; - private $level; - - //---------------------------------------------------------------------- - public function __construct($version = 0, $level = QR_ECLEVEL_L) - { - if ($version < 0 || $version > QRSPEC_VERSION_MAX || $level > QR_ECLEVEL_H) { - throw new Exception('Invalid version no'); - return NULL; - } - - $this->version = $version; - $this->level = $level; - } - - //---------------------------------------------------------------------- - public function getVersion() - { - return $this->version; - } - - //---------------------------------------------------------------------- - public function setVersion($version) - { - if($version < 0 || $version > QRSPEC_VERSION_MAX) { - throw new Exception('Invalid version no'); - return -1; - } - - $this->version = $version; - - return 0; - } - - //---------------------------------------------------------------------- - public function getErrorCorrectionLevel() - { - return $this->level; - } - - //---------------------------------------------------------------------- - public function setErrorCorrectionLevel($level) - { - if($level > QR_ECLEVEL_H) { - throw new Exception('Invalid ECLEVEL'); - return -1; - } - - $this->level = $level; - - return 0; - } - - //---------------------------------------------------------------------- - public function appendEntry(QRinputItem $entry) - { - $this->items[] = $entry; - } - - //---------------------------------------------------------------------- - public function append($mode, $size, $data) - { - try { - $entry = new QRinputItem($mode, $size, $data); - $this->items[] = $entry; - return 0; - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - - public function insertStructuredAppendHeader($size, $index, $parity) - { - if( $size > MAX_STRUCTURED_SYMBOLS ) { - throw new Exception('insertStructuredAppendHeader wrong size'); - } - - if( $index <= 0 || $index > MAX_STRUCTURED_SYMBOLS ) { - throw new Exception('insertStructuredAppendHeader wrong index'); - } - - $buf = array($size, $index, $parity); - - try { - $entry = new QRinputItem(QR_MODE_STRUCTURE, 3, buf); - array_unshift($this->items, $entry); - return 0; - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function calcParity() - { - $parity = 0; - - foreach($this->items as $item) { - if($item->mode != QR_MODE_STRUCTURE) { - for($i=$item->size-1; $i>=0; $i--) { - $parity ^= $item->data[$i]; - } - } - } - - return $parity; - } - - //---------------------------------------------------------------------- - public static function checkModeNum($size, $data) - { - for($i=0; $i<$size; $i++) { - if((ord($data[$i]) < ord('0')) || (ord($data[$i]) > ord('9'))){ - return false; - } - } - - return true; - } - - //---------------------------------------------------------------------- - public static function estimateBitsModeNum($size) - { - $w = (int)$size / 3; - $bits = $w * 10; - - switch($size - $w * 3) { - case 1: - $bits += 4; - break; - case 2: - $bits += 7; - break; - default: - break; - } - - return $bits; - } - - //---------------------------------------------------------------------- - public static $anTable = array( - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - ); - - //---------------------------------------------------------------------- - public static function lookAnTable($c) - { - return (($c > 127)?-1:self::$anTable[$c]); - } - - //---------------------------------------------------------------------- - public static function checkModeAn($size, $data) - { - for($i=0; $i<$size; $i++) { - if (self::lookAnTable(ord($data[$i])) == -1) { - return false; - } - } - - return true; - } - - //---------------------------------------------------------------------- - public static function estimateBitsModeAn($size) - { - $w = (int)($size / 2); - $bits = $w * 11; - - if($size & 1) { - $bits += 6; - } - - return $bits; - } - - //---------------------------------------------------------------------- - public static function estimateBitsMode8($size) - { - return $size * 8; - } - - //---------------------------------------------------------------------- - public function estimateBitsModeKanji($size) - { - return (int)(($size / 2) * 13); - } - - //---------------------------------------------------------------------- - public static function checkModeKanji($size, $data) - { - if($size & 1) - return false; - - for($i=0; $i<$size; $i+=2) { - $val = (ord($data[$i]) << 8) | ord($data[$i+1]); - if( $val < 0x8140 - || ($val > 0x9ffc && $val < 0xe040) - || $val > 0xebbf) { - return false; - } - } - - return true; - } - - /*********************************************************************** - * Validation - **********************************************************************/ - - public static function check($mode, $size, $data) - { - if($size <= 0) - return false; - - switch($mode) { - case QR_MODE_NUM: return self::checkModeNum($size, $data); break; - case QR_MODE_AN: return self::checkModeAn($size, $data); break; - case QR_MODE_KANJI: return self::checkModeKanji($size, $data); break; - case QR_MODE_8: return true; break; - case QR_MODE_STRUCTURE: return true; break; - - default: - break; - } - - return false; - } - - - //---------------------------------------------------------------------- - public function estimateBitStreamSize($version) - { - $bits = 0; - - foreach($this->items as $item) { - $bits += $item->estimateBitStreamSizeOfEntry($version); - } - - return $bits; - } - - //---------------------------------------------------------------------- - public function estimateVersion() - { - $version = 0; - $prev = 0; - do { - $prev = $version; - $bits = $this->estimateBitStreamSize($prev); - $version = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if ($version < 0) { - return -1; - } - } while ($version > $prev); - - return $version; - } - - //---------------------------------------------------------------------- - public static function lengthOfCode($mode, $version, $bits) - { - $payload = $bits - 4 - QRspec::lengthIndicator($mode, $version); - switch($mode) { - case QR_MODE_NUM: - $chunks = (int)($payload / 10); - $remain = $payload - $chunks * 10; - $size = $chunks * 3; - if($remain >= 7) { - $size += 2; - } else if($remain >= 4) { - $size += 1; - } - break; - case QR_MODE_AN: - $chunks = (int)($payload / 11); - $remain = $payload - $chunks * 11; - $size = $chunks * 2; - if($remain >= 6) - $size++; - break; - case QR_MODE_8: - $size = (int)($payload / 8); - break; - case QR_MODE_KANJI: - $size = (int)(($payload / 13) * 2); - break; - case QR_MODE_STRUCTURE: - $size = (int)($payload / 8); - break; - default: - $size = 0; - break; - } - - $maxsize = QRspec::maximumWords($mode, $version); - if($size < 0) $size = 0; - if($size > $maxsize) $size = $maxsize; - - return $size; - } - - //---------------------------------------------------------------------- - public function createBitStream() - { - $total = 0; - - foreach($this->items as $item) { - $bits = $item->encodeBitStream($this->version); - - if($bits < 0) - return -1; - - $total += $bits; - } - - return $total; - } - - //---------------------------------------------------------------------- - public function convertData() - { - $ver = $this->estimateVersion(); - if($ver > $this->getVersion()) { - $this->setVersion($ver); - } - - for(;;) { - $bits = $this->createBitStream(); - - if($bits < 0) - return -1; - - $ver = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if($ver < 0) { - throw new Exception('WRONG VERSION'); - return -1; - } else if($ver > $this->getVersion()) { - $this->setVersion($ver); - } else { - break; - } - } - - return 0; - } - - //---------------------------------------------------------------------- - public function appendPaddingBit(&$bstream) - { - $bits = $bstream->size(); - $maxwords = QRspec::getDataLength($this->version, $this->level); - $maxbits = $maxwords * 8; - - if ($maxbits == $bits) { - return 0; - } - - if ($maxbits - $bits < 5) { - return $bstream->appendNum($maxbits - $bits, 0); - } - - $bits += 4; - $words = (int)(($bits + 7) / 8); - - $padding = new QRbitstream(); - $ret = $padding->appendNum($words * 8 - $bits + 4, 0); - - if($ret < 0) - return $ret; - - $padlen = $maxwords - $words; - - if($padlen > 0) { - - $padbuf = array(); - for($i=0; $i<$padlen; $i++) { - $padbuf[$i] = ($i&1)?0x11:0xec; - } - - $ret = $padding->appendBytes($padlen, $padbuf); - - if($ret < 0) - return $ret; - - } - - $ret = $bstream->append($padding); - - return $ret; - } - - //---------------------------------------------------------------------- - public function mergeBitStream() - { - if($this->convertData() < 0) { - return null; - } - - $bstream = new QRbitstream(); - - foreach($this->items as $item) { - $ret = $bstream->append($item->bstream); - if($ret < 0) { - return null; - } - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public function getBitStream() - { - - $bstream = $this->mergeBitStream(); - - if($bstream == null) { - return null; - } - - $ret = $this->appendPaddingBit($bstream); - if($ret < 0) { - return null; - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public function getByteStream() - { - $bstream = $this->getBitStream(); - if($bstream == null) { - return null; - } - - return $bstream->toByte(); - } - } - - - - - - -//---- qrbitstream.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Bitstream class - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRbitstream { - - public $data = array(); - - //---------------------------------------------------------------------- - public function size() - { - return count($this->data); - } - - //---------------------------------------------------------------------- - public function allocate($setLength) - { - $this->data = array_fill(0, $setLength, 0); - return 0; - } - - //---------------------------------------------------------------------- - public static function newFromNum($bits, $num) - { - $bstream = new QRbitstream(); - $bstream->allocate($bits); - - $mask = 1 << ($bits - 1); - for($i=0; $i<$bits; $i++) { - if($num & $mask) { - $bstream->data[$i] = 1; - } else { - $bstream->data[$i] = 0; - } - $mask = $mask >> 1; - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public static function newFromBytes($size, $data) - { - $bstream = new QRbitstream(); - $bstream->allocate($size * 8); - $p=0; - - for($i=0; $i<$size; $i++) { - $mask = 0x80; - for($j=0; $j<8; $j++) { - if($data[$i] & $mask) { - $bstream->data[$p] = 1; - } else { - $bstream->data[$p] = 0; - } - $p++; - $mask = $mask >> 1; - } - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public function append(QRbitstream $arg) - { - if (is_null($arg)) { - return -1; - } - - if($arg->size() == 0) { - return 0; - } - - if($this->size() == 0) { - $this->data = $arg->data; - return 0; - } - - $this->data = array_values(array_merge($this->data, $arg->data)); - - return 0; - } - - //---------------------------------------------------------------------- - public function appendNum($bits, $num) - { - if ($bits == 0) - return 0; - - $b = QRbitstream::newFromNum($bits, $num); - - if(is_null($b)) - return -1; - - $ret = $this->append($b); - unset($b); - - return $ret; - } - - //---------------------------------------------------------------------- - public function appendBytes($size, $data) - { - if ($size == 0) - return 0; - - $b = QRbitstream::newFromBytes($size, $data); - - if(is_null($b)) - return -1; - - $ret = $this->append($b); - unset($b); - - return $ret; - } - - //---------------------------------------------------------------------- - public function toByte() - { - - $size = $this->size(); - - if($size == 0) { - return array(); - } - - $data = array_fill(0, (int)(($size + 7) / 8), 0); - $bytes = (int)($size / 8); - - $p = 0; - - for($i=0; $i<$bytes; $i++) { - $v = 0; - for($j=0; $j<8; $j++) { - $v = $v << 1; - $v |= $this->data[$p]; - $p++; - } - $data[$i] = $v; - } - - if($size & 7) { - $v = 0; - for($j=0; $j<($size & 7); $j++) { - $v = $v << 1; - $v |= $this->data[$p]; - $p++; - } - $data[$bytes] = $v; - } - - return $data; - } - - } - - - - -//---- qrsplit.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Input splitting classes - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * The following data / specifications are taken from - * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) - * or - * "Automatic identification and data capture techniques -- - * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - class QRsplit { - - public $dataStr = ''; - public $input; - public $modeHint; - - //---------------------------------------------------------------------- - public function __construct($dataStr, $input, $modeHint) - { - $this->dataStr = $dataStr; - $this->input = $input; - $this->modeHint = $modeHint; - } - - //---------------------------------------------------------------------- - public static function isdigitat($str, $pos) - { - if ($pos >= strlen($str)) - return false; - - return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); - } - - //---------------------------------------------------------------------- - public static function isalnumat($str, $pos) - { - if ($pos >= strlen($str)) - return false; - - return (QRinput::lookAnTable(ord($str[$pos])) >= 0); - } - - //---------------------------------------------------------------------- - public function identifyMode($pos) - { - if ($pos >= strlen($this->dataStr)) - return QR_MODE_NUL; - - $c = $this->dataStr[$pos]; - - if(self::isdigitat($this->dataStr, $pos)) { - return QR_MODE_NUM; - } else if(self::isalnumat($this->dataStr, $pos)) { - return QR_MODE_AN; - } else if($this->modeHint == QR_MODE_KANJI) { - - if ($pos+1 < strlen($this->dataStr)) - { - $d = $this->dataStr[$pos+1]; - $word = (ord($c) << 8) | ord($d); - if(($word >= 0x8140 && $word <= 0x9ffc) || ($word >= 0xe040 && $word <= 0xebbf)) { - return QR_MODE_KANJI; - } - } - } - - return QR_MODE_8; - } - - //---------------------------------------------------------------------- - public function eatNum() - { - $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); - - $p = 0; - while(self::isdigitat($this->dataStr, $p)) { - $p++; - } - - $run = $p; - $mode = $this->identifyMode($p); - - if($mode == QR_MODE_8) { - $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln - + QRinput::estimateBitsMode8(1) // + 4 + l8 - - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 - if($dif > 0) { - return $this->eat8(); - } - } - if($mode == QR_MODE_AN) { - $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln - + QRinput::estimateBitsModeAn(1) // + 4 + la - - QRinput::estimateBitsModeAn($run + 1);// - 4 - la - if($dif > 0) { - return $this->eatAn(); - } - } - - $ret = $this->input->append(QR_MODE_NUM, $run, str_split($this->dataStr)); - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function eatAn() - { - $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); - $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); - - $p = 0; - - while(self::isalnumat($this->dataStr, $p)) { - if(self::isdigitat($this->dataStr, $p)) { - $q = $p; - while(self::isdigitat($this->dataStr, $q)) { - $q++; - } - - $dif = QRinput::estimateBitsModeAn($p) // + 4 + la - + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln - - QRinput::estimateBitsModeAn($q); // - 4 - la - - if($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - - $run = $p; - - if(!self::isalnumat($this->dataStr, $p)) { - $dif = QRinput::estimateBitsModeAn($run) + 4 + $la - + QRinput::estimateBitsMode8(1) // + 4 + l8 - - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 - if($dif > 0) { - return $this->eat8(); - } - } - - $ret = $this->input->append(QR_MODE_AN, $run, str_split($this->dataStr)); - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function eatKanji() - { - $p = 0; - - while($this->identifyMode($p) == QR_MODE_KANJI) { - $p += 2; - } - - $ret = $this->input->append(QR_MODE_KANJI, $p, str_split($this->dataStr)); - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function eat8() - { - $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); - $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); - - $p = 1; - $dataStrLen = strlen($this->dataStr); - - while($p < $dataStrLen) { - - $mode = $this->identifyMode($p); - if($mode == QR_MODE_KANJI) { - break; - } - if($mode == QR_MODE_NUM) { - $q = $p; - while(self::isdigitat($this->dataStr, $q)) { - $q++; - } - $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 - + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln - - QRinput::estimateBitsMode8($q); // - 4 - l8 - if($dif < 0) { - break; - } else { - $p = $q; - } - } else if($mode == QR_MODE_AN) { - $q = $p; - while(self::isalnumat($this->dataStr, $q)) { - $q++; - } - $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 - + QRinput::estimateBitsModeAn($q - $p) + 4 + $la - - QRinput::estimateBitsMode8($q); // - 4 - l8 - if($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - - $run = $p; - $ret = $this->input->append(QR_MODE_8, $run, str_split($this->dataStr)); - - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function splitString() - { - while (strlen($this->dataStr) > 0) - { - if($this->dataStr == '') - return 0; - - $mode = $this->identifyMode(0); - - switch ($mode) { - case QR_MODE_NUM: $length = $this->eatNum(); break; - case QR_MODE_AN: $length = $this->eatAn(); break; - case QR_MODE_KANJI: - if ($hint == QR_MODE_KANJI) - $length = $this->eatKanji(); - else $length = $this->eat8(); - break; - default: $length = $this->eat8(); break; - - } - - if($length == 0) return 0; - if($length < 0) return -1; - - $this->dataStr = substr($this->dataStr, $length); - } - } - - //---------------------------------------------------------------------- - public function toUpper() - { - $stringLen = strlen($this->dataStr); - $p = 0; - - while ($p<$stringLen) { - $mode = self::identifyMode(substr($this->dataStr, $p), $this->modeHint); - if($mode == QR_MODE_KANJI) { - $p += 2; - } else { - if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) { - $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); - } - $p++; - } - } - - return $this->dataStr; - } - - //---------------------------------------------------------------------- - public static function splitStringToQRinput($string, QRinput $input, $modeHint, $casesensitive = true) - { - if(is_null($string) || $string == '\0' || $string == '') { - throw new Exception('empty string!!!'); - } - - $split = new QRsplit($string, $input, $modeHint); - - if(!$casesensitive) - $split->toUpper(); - - return $split->splitString(); - } - } - - - -//---- qrrscode.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Reed-Solomon error correction support - * - * Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q - * (libfec is released under the GNU Lesser General Public License.) - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRrsItem { - - public $mm; // Bits per symbol - public $nn; // Symbols per block (= (1<= $this->nn) { - $x -= $this->nn; - $x = ($x >> $this->mm) + ($x & $this->nn); - } - - return $x; - } - - //---------------------------------------------------------------------- - public static function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) - { - // Common code for intializing a Reed-Solomon control block (char or int symbols) - // Copyright 2004 Phil Karn, KA9Q - // May be used under the terms of the GNU Lesser General Public License (LGPL) - - $rs = null; - - // Check parameter ranges - if($symsize < 0 || $symsize > 8) return $rs; - if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs; - if($prim <= 0 || $prim >= (1<<$symsize)) return $rs; - if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values! - if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding - - $rs = new QRrsItem(); - $rs->mm = $symsize; - $rs->nn = (1<<$symsize)-1; - $rs->pad = $pad; - - $rs->alpha_to = array_fill(0, $rs->nn+1, 0); - $rs->index_of = array_fill(0, $rs->nn+1, 0); - - // PHP style macro replacement ;) - $NN =& $rs->nn; - $A0 =& $NN; - - // Generate Galois field lookup tables - $rs->index_of[0] = $A0; // log(zero) = -inf - $rs->alpha_to[$A0] = 0; // alpha**-inf = 0 - $sr = 1; - - for($i=0; $i<$rs->nn; $i++) { - $rs->index_of[$sr] = $i; - $rs->alpha_to[$i] = $sr; - $sr <<= 1; - if($sr & (1<<$symsize)) { - $sr ^= $gfpoly; - } - $sr &= $rs->nn; - } - - if($sr != 1){ - // field generator polynomial is not primitive! - $rs = NULL; - return $rs; - } - - /* Form RS code generator polynomial from its roots */ - $rs->genpoly = array_fill(0, $nroots+1, 0); - - $rs->fcr = $fcr; - $rs->prim = $prim; - $rs->nroots = $nroots; - $rs->gfpoly = $gfpoly; - - /* Find prim-th root of 1, used in decoding */ - for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn) - ; // intentional empty-body loop! - - $rs->iprim = (int)($iprim / $prim); - $rs->genpoly[0] = 1; - - for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { - $rs->genpoly[$i+1] = 1; - - // Multiply rs->genpoly[] by @**(root + x) - for ($j = $i; $j > 0; $j--) { - if ($rs->genpoly[$j] != 0) { - $rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)]; - } else { - $rs->genpoly[$j] = $rs->genpoly[$j-1]; - } - } - // rs->genpoly[0] can never be zero - $rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)]; - } - - // convert rs->genpoly[] to index form for quicker encoding - for ($i = 0; $i <= $nroots; $i++) - $rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]]; - - return $rs; - } - - //---------------------------------------------------------------------- - public function encode_rs_char($data, &$parity) - { - $MM =& $this->mm; - $NN =& $this->nn; - $ALPHA_TO =& $this->alpha_to; - $INDEX_OF =& $this->index_of; - $GENPOLY =& $this->genpoly; - $NROOTS =& $this->nroots; - $FCR =& $this->fcr; - $PRIM =& $this->prim; - $IPRIM =& $this->iprim; - $PAD =& $this->pad; - $A0 =& $NN; - - $parity = array_fill(0, $NROOTS, 0); - - for($i=0; $i< ($NN-$NROOTS-$PAD); $i++) { - - $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; - if($feedback != $A0) { - // feedback term is non-zero - - // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must - // always be for the polynomials constructed by init_rs() - $feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback); - - for($j=1;$j<$NROOTS;$j++) { - $parity[$j] ^= $ALPHA_TO[$this->modnn($feedback + $GENPOLY[$NROOTS-$j])]; - } - } - - // Shift - array_shift($parity); - if($feedback != $A0) { - array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]); - } else { - array_push($parity, 0); - } - } - } - } - - //########################################################################## - - class QRrs { - - public static $items = array(); - - //---------------------------------------------------------------------- - public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) - { - foreach(self::$items as $rs) { - if($rs->pad != $pad) continue; - if($rs->nroots != $nroots) continue; - if($rs->mm != $symsize) continue; - if($rs->gfpoly != $gfpoly) continue; - if($rs->fcr != $fcr) continue; - if($rs->prim != $prim) continue; - - return $rs; - } - - $rs = QRrsItem::init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); - array_unshift(self::$items, $rs); - - return $rs; - } - } - - - -//---- qrmask.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Masking - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('N1', 3); - define('N2', 3); - define('N3', 40); - define('N4', 10); - - class QRmask { - - public $runLength = array(); - - //---------------------------------------------------------------------- - public function __construct() - { - $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); - } - - //---------------------------------------------------------------------- - public function writeFormatInformation($width, &$frame, $mask, $level) - { - $blacks = 0; - $format = QRspec::getFormatInfo($mask, $level); - - for($i=0; $i<8; $i++) { - if($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - - $frame[8][$width - 1 - $i] = chr($v); - if($i < 6) { - $frame[$i][8] = chr($v); - } else { - $frame[$i + 1][8] = chr($v); - } - $format = $format >> 1; - } - - for($i=0; $i<7; $i++) { - if($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - - $frame[$width - 7 + $i][8] = chr($v); - if($i == 0) { - $frame[8][7] = chr($v); - } else { - $frame[8][6 - $i] = chr($v); - } - - $format = $format >> 1; - } - - return $blacks; - } - - //---------------------------------------------------------------------- - public function mask0($x, $y) { return ($x+$y)&1; } - public function mask1($x, $y) { return ($y&1); } - public function mask2($x, $y) { return ($x%3); } - public function mask3($x, $y) { return ($x+$y)%3; } - public function mask4($x, $y) { return (((int)($y/2))+((int)($x/3)))&1; } - public function mask5($x, $y) { return (($x*$y)&1)+($x*$y)%3; } - public function mask6($x, $y) { return ((($x*$y)&1)+($x*$y)%3)&1; } - public function mask7($x, $y) { return ((($x*$y)%3)+(($x+$y)&1))&1; } - - //---------------------------------------------------------------------- - private function generateMaskNo($maskNo, $width, $frame) - { - $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); - - for($y=0; $y<$width; $y++) { - for($x=0; $x<$width; $x++) { - if(ord($frame[$y][$x]) & 0x80) { - $bitMask[$y][$x] = 0; - } else { - $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); - $bitMask[$y][$x] = ($maskFunc == 0)?1:0; - } - - } - } - - return $bitMask; - } - - //---------------------------------------------------------------------- - public static function serial($bitFrame) - { - $codeArr = array(); - - foreach ($bitFrame as $line) - $codeArr[] = join('', $line); - - return gzcompress(join("\n", $codeArr), 9); - } - - //---------------------------------------------------------------------- - public static function unserial($code) - { - $codeArr = array(); - - $codeLines = explode("\n", gzuncompress($code)); - foreach ($codeLines as $line) - $codeArr[] = str_split($line); - - return $codeArr; - } - - //---------------------------------------------------------------------- - public function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly = false) - { - $b = 0; - $bitMask = array(); - - $fileName = QR_CACHE_DIR.'mask_'.$maskNo.DIRECTORY_SEPARATOR.'mask_'.$width.'_'.$maskNo.'.dat'; - - if (QR_CACHEABLE) { - if (file_exists($fileName)) { - $bitMask = self::unserial(file_get_contents($fileName)); - } else { - $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); - if (!file_exists(QR_CACHE_DIR.'mask_'.$maskNo)) - mkdir(QR_CACHE_DIR.'mask_'.$maskNo); - file_put_contents($fileName, self::serial($bitMask)); - } - } else { - $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); - } - - if ($maskGenOnly) - return; - - $d = $s; - - for($y=0; $y<$width; $y++) { - for($x=0; $x<$width; $x++) { - if($bitMask[$y][$x] == 1) { - $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); - } - $b += (int)(ord($d[$y][$x]) & 1); - } - } - - return $b; - } - - //---------------------------------------------------------------------- - public function makeMask($width, $frame, $maskNo, $level) - { - $masked = array_fill(0, $width, str_repeat("\0", $width)); - $this->makeMaskNo($maskNo, $width, $frame, $masked); - $this->writeFormatInformation($width, $masked, $maskNo, $level); - - return $masked; - } - - //---------------------------------------------------------------------- - public function calcN1N3($length) - { - $demerit = 0; - - for($i=0; $i<$length; $i++) { - - if($this->runLength[$i] >= 5) { - $demerit += (N1 + ($this->runLength[$i] - 5)); - } - if($i & 1) { - if(($i >= 3) && ($i < ($length-2)) && ($this->runLength[$i] % 3 == 0)) { - $fact = (int)($this->runLength[$i] / 3); - if(($this->runLength[$i-2] == $fact) && - ($this->runLength[$i-1] == $fact) && - ($this->runLength[$i+1] == $fact) && - ($this->runLength[$i+2] == $fact)) { - if(($this->runLength[$i-3] < 0) || ($this->runLength[$i-3] >= (4 * $fact))) { - $demerit += N3; - } else if((($i+3) >= $length) || ($this->runLength[$i+3] >= (4 * $fact))) { - $demerit += N3; - } - } - } - } - } - return $demerit; - } - - //---------------------------------------------------------------------- - public function evaluateSymbol($width, $frame) - { - $head = 0; - $demerit = 0; - - for($y=0; $y<$width; $y++) { - $head = 0; - $this->runLength[0] = 1; - - $frameY = $frame[$y]; - - if ($y>0) - $frameYM = $frame[$y-1]; - - for($x=0; $x<$width; $x++) { - if(($x > 0) && ($y > 0)) { - $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); - $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); - - if(($b22 | ($w22 ^ 1))&1) { - $demerit += N2; - } - } - if(($x == 0) && (ord($frameY[$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } else if($x > 0) { - if((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - - $demerit += $this->calcN1N3($head+1); - } - - for($x=0; $x<$width; $x++) { - $head = 0; - $this->runLength[0] = 1; - - for($y=0; $y<$width; $y++) { - if($y == 0 && (ord($frame[$y][$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } else if($y > 0) { - if((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - - $demerit += $this->calcN1N3($head+1); - } - - return $demerit; - } - - - //---------------------------------------------------------------------- - public function mask($width, $frame, $level) - { - $minDemerit = PHP_INT_MAX; - $bestMaskNum = 0; - $bestMask = array(); - - $checked_masks = array(0,1,2,3,4,5,6,7); - - if (QR_FIND_FROM_RANDOM !== false) { - - $howManuOut = 8-(QR_FIND_FROM_RANDOM % 9); - for ($i = 0; $i < $howManuOut; $i++) { - $remPos = rand (0, count($checked_masks)-1); - unset($checked_masks[$remPos]); - $checked_masks = array_values($checked_masks); - } - - } - - $bestMask = $frame; - - foreach($checked_masks as $i) { - $mask = array_fill(0, $width, str_repeat("\0", $width)); - - $demerit = 0; - $blacks = 0; - $blacks = $this->makeMaskNo($i, $width, $frame, $mask); - $blacks += $this->writeFormatInformation($width, $mask, $i, $level); - $blacks = (int)(100 * $blacks / ($width * $width)); - $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); - $demerit += $this->evaluateSymbol($width, $mask); - - if($demerit < $minDemerit) { - $minDemerit = $demerit; - $bestMask = $mask; - $bestMaskNum = $i; - } - } - - return $bestMask; - } - - //---------------------------------------------------------------------- - } - - - - -//---- qrencode.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Main encoder classes. - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRrsblock { - public $dataLength; - public $data = array(); - public $eccLength; - public $ecc = array(); - - public function __construct($dl, $data, $el, &$ecc, QRrsItem $rs) - { - $rs->encode_rs_char($data, $ecc); - - $this->dataLength = $dl; - $this->data = $data; - $this->eccLength = $el; - $this->ecc = $ecc; - } - }; - - //########################################################################## - - class QRrawcode { - public $version; - public $datacode = array(); - public $ecccode = array(); - public $blocks; - public $rsblocks = array(); //of RSblock - public $count; - public $dataLength; - public $eccLength; - public $b1; - - //---------------------------------------------------------------------- - public function __construct(QRinput $input) - { - $spec = array(0,0,0,0,0); - - $this->datacode = $input->getByteStream(); - if(is_null($this->datacode)) { - throw new Exception('null imput string'); - } - - QRspec::getEccSpec($input->getVersion(), $input->getErrorCorrectionLevel(), $spec); - - $this->version = $input->getVersion(); - $this->b1 = QRspec::rsBlockNum1($spec); - $this->dataLength = QRspec::rsDataLength($spec); - $this->eccLength = QRspec::rsEccLength($spec); - $this->ecccode = array_fill(0, $this->eccLength, 0); - $this->blocks = QRspec::rsBlockNum($spec); - - $ret = $this->init($spec); - if($ret < 0) { - throw new Exception('block alloc error'); - return null; - } - - $this->count = 0; - } - - //---------------------------------------------------------------------- - public function init(array $spec) - { - $dl = QRspec::rsDataCodes1($spec); - $el = QRspec::rsEccCodes1($spec); - $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - - - $blockNo = 0; - $dataPos = 0; - $eccPos = 0; - for($i=0; $iecccode,$eccPos); - $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - - if(QRspec::rsBlockNum2($spec) == 0) - return 0; - - $dl = QRspec::rsDataCodes2($spec); - $el = QRspec::rsEccCodes2($spec); - $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - - if($rs == NULL) return -1; - - for($i=0; $iecccode,$eccPos); - $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - - return 0; - } - - //---------------------------------------------------------------------- - public function getCode() - { - $ret; - - if($this->count < $this->dataLength) { - $row = $this->count % $this->blocks; - $col = $this->count / $this->blocks; - if($col >= $this->rsblocks[0]->dataLength) { - $row += $this->b1; - } - $ret = $this->rsblocks[$row]->data[$col]; - } else if($this->count < $this->dataLength + $this->eccLength) { - $row = ($this->count - $this->dataLength) % $this->blocks; - $col = ($this->count - $this->dataLength) / $this->blocks; - $ret = $this->rsblocks[$row]->ecc[$col]; - } else { - return 0; - } - $this->count++; - - return $ret; - } - } - - //########################################################################## - - class QRcode { - - public $version; - public $width; - public $data; - - //---------------------------------------------------------------------- - public function encodeMask(QRinput $input, $mask) - { - if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { - throw new Exception('wrong version'); - } - if($input->getErrorCorrectionLevel() > QR_ECLEVEL_H) { - throw new Exception('wrong level'); - } - - $raw = new QRrawcode($input); - - QRtools::markTime('after_raw'); - - $version = $raw->version; - $width = QRspec::getWidth($version); - $frame = QRspec::newFrame($version); - - $filler = new FrameFiller($width, $frame); - if(is_null($filler)) { - return NULL; - } - - // inteleaved data and ecc codes - for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) { - $code = $raw->getCode(); - $bit = 0x80; - for($j=0; $j<8; $j++) { - $addr = $filler->next(); - $filler->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); - $bit = $bit >> 1; - } - } - - QRtools::markTime('after_filler'); - - unset($raw); - - // remainder bits - $j = QRspec::getRemainder($version); - for($i=0; $i<$j; $i++) { - $addr = $filler->next(); - $filler->setFrameAt($addr, 0x02); - } - - $frame = $filler->frame; - unset($filler); - - - // masking - $maskObj = new QRmask(); - if($mask < 0) { - - if (QR_FIND_BEST_MASK) { - $masked = $maskObj->mask($width, $frame, $input->getErrorCorrectionLevel()); - } else { - $masked = $maskObj->makeMask($width, $frame, (intval(QR_DEFAULT_MASK) % 8), $input->getErrorCorrectionLevel()); - } - } else { - $masked = $maskObj->makeMask($width, $frame, $mask, $input->getErrorCorrectionLevel()); - } - - if($masked == NULL) { - return NULL; - } - - QRtools::markTime('after_mask'); - - $this->version = $version; - $this->width = $width; - $this->data = $masked; - - return $this; - } - - //---------------------------------------------------------------------- - public function encodeInput(QRinput $input) - { - return $this->encodeMask($input, -1); - } - - //---------------------------------------------------------------------- - public function encodeString8bit($string, $version, $level) - { - if(string == NULL) { - throw new Exception('empty string!'); - return NULL; - } - - $input = new QRinput($version, $level); - if($input == NULL) return NULL; - - $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string)); - if($ret < 0) { - unset($input); - return NULL; - } - return $this->encodeInput($input); - } - - //---------------------------------------------------------------------- - public function encodeString($string, $version, $level, $hint, $casesensitive) - { - - if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) { - throw new Exception('bad hint'); - return NULL; - } - - $input = new QRinput($version, $level); - if($input == NULL) return NULL; - - $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive); - if($ret < 0) { - return NULL; - } - - return $this->encodeInput($input); - } - - //---------------------------------------------------------------------- - public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encodePNG($text, $outfile, $saveandprint=false); - } - - //---------------------------------------------------------------------- - public static function text($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encode($text, $outfile); - } - - //---------------------------------------------------------------------- - public static function raw($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encodeRAW($text, $outfile); - } - } - - //########################################################################## - - class FrameFiller { - - public $width; - public $frame; - public $x; - public $y; - public $dir; - public $bit; - - //---------------------------------------------------------------------- - public function __construct($width, &$frame) - { - $this->width = $width; - $this->frame = $frame; - $this->x = $width - 1; - $this->y = $width - 1; - $this->dir = -1; - $this->bit = -1; - } - - //---------------------------------------------------------------------- - public function setFrameAt($at, $val) - { - $this->frame[$at['y']][$at['x']] = chr($val); - } - - //---------------------------------------------------------------------- - public function getFrameAt($at) - { - return ord($this->frame[$at['y']][$at['x']]); - } - - //---------------------------------------------------------------------- - public function next() - { - do { - - if($this->bit == -1) { - $this->bit = 0; - return array('x'=>$this->x, 'y'=>$this->y); - } - - $x = $this->x; - $y = $this->y; - $w = $this->width; - - if($this->bit == 0) { - $x--; - $this->bit++; - } else { - $x++; - $y += $this->dir; - $this->bit--; - } - - if($this->dir < 0) { - if($y < 0) { - $y = 0; - $x -= 2; - $this->dir = 1; - if($x == 6) { - $x--; - $y = 9; - } - } - } else { - if($y == $w) { - $y = $w - 1; - $x -= 2; - $this->dir = -1; - if($x == 6) { - $x--; - $y -= 8; - } - } - } - if($x < 0 || $y < 0) return null; - - $this->x = $x; - $this->y = $y; - - } while(ord($this->frame[$y][$x]) & 0x80); - - return array('x'=>$x, 'y'=>$y); - } - - } ; - - //########################################################################## - - class QRencode { - - public $casesensitive = true; - public $eightbit = false; - - public $version = 0; - public $size = 3; - public $margin = 4; - - public $structured = 0; // not supported yet - - public $level = QR_ECLEVEL_L; - public $hint = QR_MODE_8; - - //---------------------------------------------------------------------- - public static function factory($level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = new QRencode(); - $enc->size = $size; - $enc->margin = $margin; - - switch ($level.'') { - case '0': - case '1': - case '2': - case '3': - $enc->level = $level; - break; - case 'l': - case 'L': - $enc->level = QR_ECLEVEL_L; - break; - case 'm': - case 'M': - $enc->level = QR_ECLEVEL_M; - break; - case 'q': - case 'Q': - $enc->level = QR_ECLEVEL_Q; - break; - case 'h': - case 'H': - $enc->level = QR_ECLEVEL_H; - break; - } - - return $enc; - } - - //---------------------------------------------------------------------- - public function encodeRAW($intext, $outfile = false) - { - $code = new QRcode(); - - if($this->eightbit) { - $code->encodeString8bit($intext, $this->version, $this->level); - } else { - $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); - } - - return $code->data; - } - - //---------------------------------------------------------------------- - public function encode($intext, $outfile = false) - { - $code = new QRcode(); - - if($this->eightbit) { - $code->encodeString8bit($intext, $this->version, $this->level); - } else { - $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); - } - - QRtools::markTime('after_encode'); - - if ($outfile!== false) { - file_put_contents($outfile, join("\n", QRtools::binarize($code->data))); - } else { - return QRtools::binarize($code->data); - } - } - - //---------------------------------------------------------------------- - public function encodePNG($intext, $outfile = false,$saveandprint=false) - { - try { - - ob_start(); - $tab = $this->encode($intext); - $err = ob_get_contents(); - ob_end_clean(); - - if ($err != '') - QRtools::log($outfile, $err); - - $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); - - QRimage::png($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint); - - } catch (Exception $e) { - - QRtools::log($outfile, $e->getMessage()); - - } - } - } - - diff --git a/vendor/phpqrcode/qrbitstream.php b/vendor/phpqrcode/qrbitstream.php deleted file mode 100644 index 7d4ec4a6c..000000000 --- a/vendor/phpqrcode/qrbitstream.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRbitstream { - - public $data = array(); - - //---------------------------------------------------------------------- - public function size() - { - return count($this->data); - } - - //---------------------------------------------------------------------- - public function allocate($setLength) - { - $this->data = array_fill(0, $setLength, 0); - return 0; - } - - //---------------------------------------------------------------------- - public static function newFromNum($bits, $num) - { - $bstream = new QRbitstream(); - $bstream->allocate($bits); - - $mask = 1 << ($bits - 1); - for($i=0; $i<$bits; $i++) { - if($num & $mask) { - $bstream->data[$i] = 1; - } else { - $bstream->data[$i] = 0; - } - $mask = $mask >> 1; - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public static function newFromBytes($size, $data) - { - $bstream = new QRbitstream(); - $bstream->allocate($size * 8); - $p=0; - - for($i=0; $i<$size; $i++) { - $mask = 0x80; - for($j=0; $j<8; $j++) { - if($data[$i] & $mask) { - $bstream->data[$p] = 1; - } else { - $bstream->data[$p] = 0; - } - $p++; - $mask = $mask >> 1; - } - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public function append(QRbitstream $arg) - { - if (is_null($arg)) { - return -1; - } - - if($arg->size() == 0) { - return 0; - } - - if($this->size() == 0) { - $this->data = $arg->data; - return 0; - } - - $this->data = array_values(array_merge($this->data, $arg->data)); - - return 0; - } - - //---------------------------------------------------------------------- - public function appendNum($bits, $num) - { - if ($bits == 0) - return 0; - - $b = QRbitstream::newFromNum($bits, $num); - - if(is_null($b)) - return -1; - - $ret = $this->append($b); - unset($b); - - return $ret; - } - - //---------------------------------------------------------------------- - public function appendBytes($size, $data) - { - if ($size == 0) - return 0; - - $b = QRbitstream::newFromBytes($size, $data); - - if(is_null($b)) - return -1; - - $ret = $this->append($b); - unset($b); - - return $ret; - } - - //---------------------------------------------------------------------- - public function toByte() - { - - $size = $this->size(); - - if($size == 0) { - return array(); - } - - $data = array_fill(0, (int)(($size + 7) / 8), 0); - $bytes = (int)($size / 8); - - $p = 0; - - for($i=0; $i<$bytes; $i++) { - $v = 0; - for($j=0; $j<8; $j++) { - $v = $v << 1; - $v |= $this->data[$p]; - $p++; - } - $data[$i] = $v; - } - - if($size & 7) { - $v = 0; - for($j=0; $j<($size & 7); $j++) { - $v = $v << 1; - $v |= $this->data[$p]; - $p++; - } - $data[$bytes] = $v; - } - - return $data; - } - - } diff --git a/vendor/phpqrcode/qrconfig.php b/vendor/phpqrcode/qrconfig.php deleted file mode 100644 index e53dff8c2..000000000 --- a/vendor/phpqrcode/qrconfig.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - // Encoding modes - - define('QR_MODE_NUL', -1); - define('QR_MODE_NUM', 0); - define('QR_MODE_AN', 1); - define('QR_MODE_8', 2); - define('QR_MODE_KANJI', 3); - define('QR_MODE_STRUCTURE', 4); - - // Levels of error correction. - - define('QR_ECLEVEL_L', 0); - define('QR_ECLEVEL_M', 1); - define('QR_ECLEVEL_Q', 2); - define('QR_ECLEVEL_H', 3); - - // Supported output formats - - define('QR_FORMAT_TEXT', 0); - define('QR_FORMAT_PNG', 1); - - class qrstr { - public static function set(&$srctab, $x, $y, $repl, $replLen = false) { - $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); - } - } \ No newline at end of file diff --git a/vendor/phpqrcode/qrencode.php b/vendor/phpqrcode/qrencode.php deleted file mode 100644 index 4b77a5bdd..000000000 --- a/vendor/phpqrcode/qrencode.php +++ /dev/null @@ -1,502 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRrsblock { - public $dataLength; - public $data = array(); - public $eccLength; - public $ecc = array(); - - public function __construct($dl, $data, $el, &$ecc, QRrsItem $rs) - { - $rs->encode_rs_char($data, $ecc); - - $this->dataLength = $dl; - $this->data = $data; - $this->eccLength = $el; - $this->ecc = $ecc; - } - }; - - //########################################################################## - - class QRrawcode { - public $version; - public $datacode = array(); - public $ecccode = array(); - public $blocks; - public $rsblocks = array(); //of RSblock - public $count; - public $dataLength; - public $eccLength; - public $b1; - - //---------------------------------------------------------------------- - public function __construct(QRinput $input) - { - $spec = array(0,0,0,0,0); - - $this->datacode = $input->getByteStream(); - if(is_null($this->datacode)) { - throw new Exception('null imput string'); - } - - QRspec::getEccSpec($input->getVersion(), $input->getErrorCorrectionLevel(), $spec); - - $this->version = $input->getVersion(); - $this->b1 = QRspec::rsBlockNum1($spec); - $this->dataLength = QRspec::rsDataLength($spec); - $this->eccLength = QRspec::rsEccLength($spec); - $this->ecccode = array_fill(0, $this->eccLength, 0); - $this->blocks = QRspec::rsBlockNum($spec); - - $ret = $this->init($spec); - if($ret < 0) { - throw new Exception('block alloc error'); - return null; - } - - $this->count = 0; - } - - //---------------------------------------------------------------------- - public function init(array $spec) - { - $dl = QRspec::rsDataCodes1($spec); - $el = QRspec::rsEccCodes1($spec); - $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - - - $blockNo = 0; - $dataPos = 0; - $eccPos = 0; - for($i=0; $iecccode,$eccPos); - $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - - if(QRspec::rsBlockNum2($spec) == 0) - return 0; - - $dl = QRspec::rsDataCodes2($spec); - $el = QRspec::rsEccCodes2($spec); - $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - - if($rs == NULL) return -1; - - for($i=0; $iecccode,$eccPos); - $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - - return 0; - } - - //---------------------------------------------------------------------- - public function getCode() - { - $ret; - - if($this->count < $this->dataLength) { - $row = $this->count % $this->blocks; - $col = $this->count / $this->blocks; - if($col >= $this->rsblocks[0]->dataLength) { - $row += $this->b1; - } - $ret = $this->rsblocks[$row]->data[$col]; - } else if($this->count < $this->dataLength + $this->eccLength) { - $row = ($this->count - $this->dataLength) % $this->blocks; - $col = ($this->count - $this->dataLength) / $this->blocks; - $ret = $this->rsblocks[$row]->ecc[$col]; - } else { - return 0; - } - $this->count++; - - return $ret; - } - } - - //########################################################################## - - class QRcode { - - public $version; - public $width; - public $data; - - //---------------------------------------------------------------------- - public function encodeMask(QRinput $input, $mask) - { - if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { - throw new Exception('wrong version'); - } - if($input->getErrorCorrectionLevel() > QR_ECLEVEL_H) { - throw new Exception('wrong level'); - } - - $raw = new QRrawcode($input); - - QRtools::markTime('after_raw'); - - $version = $raw->version; - $width = QRspec::getWidth($version); - $frame = QRspec::newFrame($version); - - $filler = new FrameFiller($width, $frame); - if(is_null($filler)) { - return NULL; - } - - // inteleaved data and ecc codes - for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) { - $code = $raw->getCode(); - $bit = 0x80; - for($j=0; $j<8; $j++) { - $addr = $filler->next(); - $filler->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); - $bit = $bit >> 1; - } - } - - QRtools::markTime('after_filler'); - - unset($raw); - - // remainder bits - $j = QRspec::getRemainder($version); - for($i=0; $i<$j; $i++) { - $addr = $filler->next(); - $filler->setFrameAt($addr, 0x02); - } - - $frame = $filler->frame; - unset($filler); - - - // masking - $maskObj = new QRmask(); - if($mask < 0) { - - if (QR_FIND_BEST_MASK) { - $masked = $maskObj->mask($width, $frame, $input->getErrorCorrectionLevel()); - } else { - $masked = $maskObj->makeMask($width, $frame, (intval(QR_DEFAULT_MASK) % 8), $input->getErrorCorrectionLevel()); - } - } else { - $masked = $maskObj->makeMask($width, $frame, $mask, $input->getErrorCorrectionLevel()); - } - - if($masked == NULL) { - return NULL; - } - - QRtools::markTime('after_mask'); - - $this->version = $version; - $this->width = $width; - $this->data = $masked; - - return $this; - } - - //---------------------------------------------------------------------- - public function encodeInput(QRinput $input) - { - return $this->encodeMask($input, -1); - } - - //---------------------------------------------------------------------- - public function encodeString8bit($string, $version, $level) - { - if(string == NULL) { - throw new Exception('empty string!'); - return NULL; - } - - $input = new QRinput($version, $level); - if($input == NULL) return NULL; - - $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string)); - if($ret < 0) { - unset($input); - return NULL; - } - return $this->encodeInput($input); - } - - //---------------------------------------------------------------------- - public function encodeString($string, $version, $level, $hint, $casesensitive) - { - - if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) { - throw new Exception('bad hint'); - return NULL; - } - - $input = new QRinput($version, $level); - if($input == NULL) return NULL; - - $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive); - if($ret < 0) { - return NULL; - } - - return $this->encodeInput($input); - } - - //---------------------------------------------------------------------- - public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encodePNG($text, $outfile, $saveandprint=false); - } - - //---------------------------------------------------------------------- - public static function text($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encode($text, $outfile); - } - - //---------------------------------------------------------------------- - public static function raw($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encodeRAW($text, $outfile); - } - } - - //########################################################################## - - class FrameFiller { - - public $width; - public $frame; - public $x; - public $y; - public $dir; - public $bit; - - //---------------------------------------------------------------------- - public function __construct($width, &$frame) - { - $this->width = $width; - $this->frame = $frame; - $this->x = $width - 1; - $this->y = $width - 1; - $this->dir = -1; - $this->bit = -1; - } - - //---------------------------------------------------------------------- - public function setFrameAt($at, $val) - { - $this->frame[$at['y']][$at['x']] = chr($val); - } - - //---------------------------------------------------------------------- - public function getFrameAt($at) - { - return ord($this->frame[$at['y']][$at['x']]); - } - - //---------------------------------------------------------------------- - public function next() - { - do { - - if($this->bit == -1) { - $this->bit = 0; - return array('x'=>$this->x, 'y'=>$this->y); - } - - $x = $this->x; - $y = $this->y; - $w = $this->width; - - if($this->bit == 0) { - $x--; - $this->bit++; - } else { - $x++; - $y += $this->dir; - $this->bit--; - } - - if($this->dir < 0) { - if($y < 0) { - $y = 0; - $x -= 2; - $this->dir = 1; - if($x == 6) { - $x--; - $y = 9; - } - } - } else { - if($y == $w) { - $y = $w - 1; - $x -= 2; - $this->dir = -1; - if($x == 6) { - $x--; - $y -= 8; - } - } - } - if($x < 0 || $y < 0) return null; - - $this->x = $x; - $this->y = $y; - - } while(ord($this->frame[$y][$x]) & 0x80); - - return array('x'=>$x, 'y'=>$y); - } - - } ; - - //########################################################################## - - class QRencode { - - public $casesensitive = true; - public $eightbit = false; - - public $version = 0; - public $size = 3; - public $margin = 4; - - public $structured = 0; // not supported yet - - public $level = QR_ECLEVEL_L; - public $hint = QR_MODE_8; - - //---------------------------------------------------------------------- - public static function factory($level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = new QRencode(); - $enc->size = $size; - $enc->margin = $margin; - - switch ($level.'') { - case '0': - case '1': - case '2': - case '3': - $enc->level = $level; - break; - case 'l': - case 'L': - $enc->level = QR_ECLEVEL_L; - break; - case 'm': - case 'M': - $enc->level = QR_ECLEVEL_M; - break; - case 'q': - case 'Q': - $enc->level = QR_ECLEVEL_Q; - break; - case 'h': - case 'H': - $enc->level = QR_ECLEVEL_H; - break; - } - - return $enc; - } - - //---------------------------------------------------------------------- - public function encodeRAW($intext, $outfile = false) - { - $code = new QRcode(); - - if($this->eightbit) { - $code->encodeString8bit($intext, $this->version, $this->level); - } else { - $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); - } - - return $code->data; - } - - //---------------------------------------------------------------------- - public function encode($intext, $outfile = false) - { - $code = new QRcode(); - - if($this->eightbit) { - $code->encodeString8bit($intext, $this->version, $this->level); - } else { - $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); - } - - QRtools::markTime('after_encode'); - - if ($outfile!== false) { - file_put_contents($outfile, join("\n", QRtools::binarize($code->data))); - } else { - return QRtools::binarize($code->data); - } - } - - //---------------------------------------------------------------------- - public function encodePNG($intext, $outfile = false,$saveandprint=false) - { - try { - - ob_start(); - $tab = $this->encode($intext); - $err = ob_get_contents(); - ob_end_clean(); - - if ($err != '') - QRtools::log($outfile, $err); - - $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); - - QRimage::png($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint); - - } catch (Exception $e) { - - QRtools::log($outfile, $e->getMessage()); - - } - } - } diff --git a/vendor/phpqrcode/qrimage.php b/vendor/phpqrcode/qrimage.php deleted file mode 100644 index 10b0a6e1b..000000000 --- a/vendor/phpqrcode/qrimage.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('QR_IMAGE', true); - - class QRimage { - - //---------------------------------------------------------------------- - public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE) - { - $image = self::image($frame, $pixelPerPoint, $outerFrame); - - if ($filename === false) { - Header("Content-type: image/png"); - ImagePng($image); - } else { - if($saveandprint===TRUE){ - ImagePng($image, $filename); - header("Content-type: image/png"); - ImagePng($image); - }else{ - ImagePng($image, $filename); - } - } - - ImageDestroy($image); - } - - //---------------------------------------------------------------------- - public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85) - { - $image = self::image($frame, $pixelPerPoint, $outerFrame); - - if ($filename === false) { - Header("Content-type: image/jpeg"); - ImageJpeg($image, null, $q); - } else { - ImageJpeg($image, $filename, $q); - } - - ImageDestroy($image); - } - - //---------------------------------------------------------------------- - private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4) - { - $h = count($frame); - $w = strlen($frame[0]); - - $imgW = $w + 2*$outerFrame; - $imgH = $h + 2*$outerFrame; - - $base_image =ImageCreate($imgW, $imgH); - - $col[0] = ImageColorAllocate($base_image,255,255,255); - $col[1] = ImageColorAllocate($base_image,0,0,0); - - imagefill($base_image, 0, 0, $col[0]); - - for($y=0; $y<$h; $y++) { - for($x=0; $x<$w; $x++) { - if ($frame[$y][$x] == '1') { - ImageSetPixel($base_image,$x+$outerFrame,$y+$outerFrame,$col[1]); - } - } - } - - $target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint); - ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH); - ImageDestroy($base_image); - - return $target_image; - } - } \ No newline at end of file diff --git a/vendor/phpqrcode/qrinput.php b/vendor/phpqrcode/qrinput.php deleted file mode 100644 index 0f6d7f944..000000000 --- a/vendor/phpqrcode/qrinput.php +++ /dev/null @@ -1,729 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('STRUCTURE_HEADER_BITS', 20); - define('MAX_STRUCTURED_SYMBOLS', 16); - - class QRinputItem { - - public $mode; - public $size; - public $data; - public $bstream; - - public function __construct($mode, $size, $data, $bstream = null) - { - $setData = array_slice($data, 0, $size); - - if (count($setData) < $size) { - $setData = array_merge($setData, array_fill(0,$size-count($setData),0)); - } - - if(!QRinput::check($mode, $size, $setData)) { - throw new Exception('Error m:'.$mode.',s:'.$size.',d:'.join(',',$setData)); - return null; - } - - $this->mode = $mode; - $this->size = $size; - $this->data = $setData; - $this->bstream = $bstream; - } - - //---------------------------------------------------------------------- - public function encodeModeNum($version) - { - try { - - $words = (int)($this->size / 3); - $bs = new QRbitstream(); - - $val = 0x1; - $bs->appendNum(4, $val); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_NUM, $version), $this->size); - - for($i=0; $i<$words; $i++) { - $val = (ord($this->data[$i*3 ]) - ord('0')) * 100; - $val += (ord($this->data[$i*3+1]) - ord('0')) * 10; - $val += (ord($this->data[$i*3+2]) - ord('0')); - $bs->appendNum(10, $val); - } - - if($this->size - $words * 3 == 1) { - $val = ord($this->data[$words*3]) - ord('0'); - $bs->appendNum(4, $val); - } else if($this->size - $words * 3 == 2) { - $val = (ord($this->data[$words*3 ]) - ord('0')) * 10; - $val += (ord($this->data[$words*3+1]) - ord('0')); - $bs->appendNum(7, $val); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeModeAn($version) - { - try { - $words = (int)($this->size / 2); - $bs = new QRbitstream(); - - $bs->appendNum(4, 0x02); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_AN, $version), $this->size); - - for($i=0; $i<$words; $i++) { - $val = (int)QRinput::lookAnTable(ord($this->data[$i*2 ])) * 45; - $val += (int)QRinput::lookAnTable(ord($this->data[$i*2+1])); - - $bs->appendNum(11, $val); - } - - if($this->size & 1) { - $val = QRinput::lookAnTable(ord($this->data[$words * 2])); - $bs->appendNum(6, $val); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeMode8($version) - { - try { - $bs = new QRbitstream(); - - $bs->appendNum(4, 0x4); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_8, $version), $this->size); - - for($i=0; $i<$this->size; $i++) { - $bs->appendNum(8, ord($this->data[$i])); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeModeKanji($version) - { - try { - - $bs = new QRbitrtream(); - - $bs->appendNum(4, 0x8); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_KANJI, $version), (int)($this->size / 2)); - - for($i=0; $i<$this->size; $i+=2) { - $val = (ord($this->data[$i]) << 8) | ord($this->data[$i+1]); - if($val <= 0x9ffc) { - $val -= 0x8140; - } else { - $val -= 0xc140; - } - - $h = ($val >> 8) * 0xc0; - $val = ($val & 0xff) + $h; - - $bs->appendNum(13, $val); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeModeStructure() - { - try { - $bs = new QRbitstream(); - - $bs->appendNum(4, 0x03); - $bs->appendNum(4, ord($this->data[1]) - 1); - $bs->appendNum(4, ord($this->data[0]) - 1); - $bs->appendNum(8, ord($this->data[2])); - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function estimateBitStreamSizeOfEntry($version) - { - $bits = 0; - - if($version == 0) - $version = 1; - - switch($this->mode) { - case QR_MODE_NUM: $bits = QRinput::estimateBitsModeNum($this->size); break; - case QR_MODE_AN: $bits = QRinput::estimateBitsModeAn($this->size); break; - case QR_MODE_8: $bits = QRinput::estimateBitsMode8($this->size); break; - case QR_MODE_KANJI: $bits = QRinput::estimateBitsModeKanji($this->size);break; - case QR_MODE_STRUCTURE: return STRUCTURE_HEADER_BITS; - default: - return 0; - } - - $l = QRspec::lengthIndicator($this->mode, $version); - $m = 1 << $l; - $num = (int)(($this->size + $m - 1) / $m); - - $bits += $num * (4 + $l); - - return $bits; - } - - //---------------------------------------------------------------------- - public function encodeBitStream($version) - { - try { - - unset($this->bstream); - $words = QRspec::maximumWords($this->mode, $version); - - if($this->size > $words) { - - $st1 = new QRinputItem($this->mode, $words, $this->data); - $st2 = new QRinputItem($this->mode, $this->size - $words, array_slice($this->data, $words)); - - $st1->encodeBitStream($version); - $st2->encodeBitStream($version); - - $this->bstream = new QRbitstream(); - $this->bstream->append($st1->bstream); - $this->bstream->append($st2->bstream); - - unset($st1); - unset($st2); - - } else { - - $ret = 0; - - switch($this->mode) { - case QR_MODE_NUM: $ret = $this->encodeModeNum($version); break; - case QR_MODE_AN: $ret = $this->encodeModeAn($version); break; - case QR_MODE_8: $ret = $this->encodeMode8($version); break; - case QR_MODE_KANJI: $ret = $this->encodeModeKanji($version);break; - case QR_MODE_STRUCTURE: $ret = $this->encodeModeStructure(); break; - - default: - break; - } - - if($ret < 0) - return -1; - } - - return $this->bstream->size(); - - } catch (Exception $e) { - return -1; - } - } - }; - - //########################################################################## - - class QRinput { - - public $items; - - private $version; - private $level; - - //---------------------------------------------------------------------- - public function __construct($version = 0, $level = QR_ECLEVEL_L) - { - if ($version < 0 || $version > QRSPEC_VERSION_MAX || $level > QR_ECLEVEL_H) { - throw new Exception('Invalid version no'); - return NULL; - } - - $this->version = $version; - $this->level = $level; - } - - //---------------------------------------------------------------------- - public function getVersion() - { - return $this->version; - } - - //---------------------------------------------------------------------- - public function setVersion($version) - { - if($version < 0 || $version > QRSPEC_VERSION_MAX) { - throw new Exception('Invalid version no'); - return -1; - } - - $this->version = $version; - - return 0; - } - - //---------------------------------------------------------------------- - public function getErrorCorrectionLevel() - { - return $this->level; - } - - //---------------------------------------------------------------------- - public function setErrorCorrectionLevel($level) - { - if($level > QR_ECLEVEL_H) { - throw new Exception('Invalid ECLEVEL'); - return -1; - } - - $this->level = $level; - - return 0; - } - - //---------------------------------------------------------------------- - public function appendEntry(QRinputItem $entry) - { - $this->items[] = $entry; - } - - //---------------------------------------------------------------------- - public function append($mode, $size, $data) - { - try { - $entry = new QRinputItem($mode, $size, $data); - $this->items[] = $entry; - return 0; - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - - public function insertStructuredAppendHeader($size, $index, $parity) - { - if( $size > MAX_STRUCTURED_SYMBOLS ) { - throw new Exception('insertStructuredAppendHeader wrong size'); - } - - if( $index <= 0 || $index > MAX_STRUCTURED_SYMBOLS ) { - throw new Exception('insertStructuredAppendHeader wrong index'); - } - - $buf = array($size, $index, $parity); - - try { - $entry = new QRinputItem(QR_MODE_STRUCTURE, 3, buf); - array_unshift($this->items, $entry); - return 0; - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function calcParity() - { - $parity = 0; - - foreach($this->items as $item) { - if($item->mode != QR_MODE_STRUCTURE) { - for($i=$item->size-1; $i>=0; $i--) { - $parity ^= $item->data[$i]; - } - } - } - - return $parity; - } - - //---------------------------------------------------------------------- - public static function checkModeNum($size, $data) - { - for($i=0; $i<$size; $i++) { - if((ord($data[$i]) < ord('0')) || (ord($data[$i]) > ord('9'))){ - return false; - } - } - - return true; - } - - //---------------------------------------------------------------------- - public static function estimateBitsModeNum($size) - { - $w = (int)$size / 3; - $bits = $w * 10; - - switch($size - $w * 3) { - case 1: - $bits += 4; - break; - case 2: - $bits += 7; - break; - default: - break; - } - - return $bits; - } - - //---------------------------------------------------------------------- - public static $anTable = array( - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - ); - - //---------------------------------------------------------------------- - public static function lookAnTable($c) - { - return (($c > 127)?-1:self::$anTable[$c]); - } - - //---------------------------------------------------------------------- - public static function checkModeAn($size, $data) - { - for($i=0; $i<$size; $i++) { - if (self::lookAnTable(ord($data[$i])) == -1) { - return false; - } - } - - return true; - } - - //---------------------------------------------------------------------- - public static function estimateBitsModeAn($size) - { - $w = (int)($size / 2); - $bits = $w * 11; - - if($size & 1) { - $bits += 6; - } - - return $bits; - } - - //---------------------------------------------------------------------- - public static function estimateBitsMode8($size) - { - return $size * 8; - } - - //---------------------------------------------------------------------- - public function estimateBitsModeKanji($size) - { - return (int)(($size / 2) * 13); - } - - //---------------------------------------------------------------------- - public static function checkModeKanji($size, $data) - { - if($size & 1) - return false; - - for($i=0; $i<$size; $i+=2) { - $val = (ord($data[$i]) << 8) | ord($data[$i+1]); - if( $val < 0x8140 - || ($val > 0x9ffc && $val < 0xe040) - || $val > 0xebbf) { - return false; - } - } - - return true; - } - - /*********************************************************************** - * Validation - **********************************************************************/ - - public static function check($mode, $size, $data) - { - if($size <= 0) - return false; - - switch($mode) { - case QR_MODE_NUM: return self::checkModeNum($size, $data); break; - case QR_MODE_AN: return self::checkModeAn($size, $data); break; - case QR_MODE_KANJI: return self::checkModeKanji($size, $data); break; - case QR_MODE_8: return true; break; - case QR_MODE_STRUCTURE: return true; break; - - default: - break; - } - - return false; - } - - - //---------------------------------------------------------------------- - public function estimateBitStreamSize($version) - { - $bits = 0; - - foreach($this->items as $item) { - $bits += $item->estimateBitStreamSizeOfEntry($version); - } - - return $bits; - } - - //---------------------------------------------------------------------- - public function estimateVersion() - { - $version = 0; - $prev = 0; - do { - $prev = $version; - $bits = $this->estimateBitStreamSize($prev); - $version = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if ($version < 0) { - return -1; - } - } while ($version > $prev); - - return $version; - } - - //---------------------------------------------------------------------- - public static function lengthOfCode($mode, $version, $bits) - { - $payload = $bits - 4 - QRspec::lengthIndicator($mode, $version); - switch($mode) { - case QR_MODE_NUM: - $chunks = (int)($payload / 10); - $remain = $payload - $chunks * 10; - $size = $chunks * 3; - if($remain >= 7) { - $size += 2; - } else if($remain >= 4) { - $size += 1; - } - break; - case QR_MODE_AN: - $chunks = (int)($payload / 11); - $remain = $payload - $chunks * 11; - $size = $chunks * 2; - if($remain >= 6) - $size++; - break; - case QR_MODE_8: - $size = (int)($payload / 8); - break; - case QR_MODE_KANJI: - $size = (int)(($payload / 13) * 2); - break; - case QR_MODE_STRUCTURE: - $size = (int)($payload / 8); - break; - default: - $size = 0; - break; - } - - $maxsize = QRspec::maximumWords($mode, $version); - if($size < 0) $size = 0; - if($size > $maxsize) $size = $maxsize; - - return $size; - } - - //---------------------------------------------------------------------- - public function createBitStream() - { - $total = 0; - - foreach($this->items as $item) { - $bits = $item->encodeBitStream($this->version); - - if($bits < 0) - return -1; - - $total += $bits; - } - - return $total; - } - - //---------------------------------------------------------------------- - public function convertData() - { - $ver = $this->estimateVersion(); - if($ver > $this->getVersion()) { - $this->setVersion($ver); - } - - for(;;) { - $bits = $this->createBitStream(); - - if($bits < 0) - return -1; - - $ver = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if($ver < 0) { - throw new Exception('WRONG VERSION'); - return -1; - } else if($ver > $this->getVersion()) { - $this->setVersion($ver); - } else { - break; - } - } - - return 0; - } - - //---------------------------------------------------------------------- - public function appendPaddingBit(&$bstream) - { - $bits = $bstream->size(); - $maxwords = QRspec::getDataLength($this->version, $this->level); - $maxbits = $maxwords * 8; - - if ($maxbits == $bits) { - return 0; - } - - if ($maxbits - $bits < 5) { - return $bstream->appendNum($maxbits - $bits, 0); - } - - $bits += 4; - $words = (int)(($bits + 7) / 8); - - $padding = new QRbitstream(); - $ret = $padding->appendNum($words * 8 - $bits + 4, 0); - - if($ret < 0) - return $ret; - - $padlen = $maxwords - $words; - - if($padlen > 0) { - - $padbuf = array(); - for($i=0; $i<$padlen; $i++) { - $padbuf[$i] = ($i&1)?0x11:0xec; - } - - $ret = $padding->appendBytes($padlen, $padbuf); - - if($ret < 0) - return $ret; - - } - - $ret = $bstream->append($padding); - - return $ret; - } - - //---------------------------------------------------------------------- - public function mergeBitStream() - { - if($this->convertData() < 0) { - return null; - } - - $bstream = new QRbitstream(); - - foreach($this->items as $item) { - $ret = $bstream->append($item->bstream); - if($ret < 0) { - return null; - } - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public function getBitStream() - { - - $bstream = $this->mergeBitStream(); - - if($bstream == null) { - return null; - } - - $ret = $this->appendPaddingBit($bstream); - if($ret < 0) { - return null; - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public function getByteStream() - { - $bstream = $this->getBitStream(); - if($bstream == null) { - return null; - } - - return $bstream->toByte(); - } - } - - - \ No newline at end of file diff --git a/vendor/phpqrcode/qrlib.php b/vendor/phpqrcode/qrlib.php deleted file mode 100644 index d55c4af29..000000000 --- a/vendor/phpqrcode/qrlib.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - $QR_BASEDIR = dirname(__FILE__).DIRECTORY_SEPARATOR; - - // Required libs - - include $QR_BASEDIR."qrconst.php"; - include $QR_BASEDIR."qrconfig.php"; - include $QR_BASEDIR."qrtools.php"; - include $QR_BASEDIR."qrspec.php"; - include $QR_BASEDIR."qrimage.php"; - include $QR_BASEDIR."qrinput.php"; - include $QR_BASEDIR."qrbitstream.php"; - include $QR_BASEDIR."qrsplit.php"; - include $QR_BASEDIR."qrrscode.php"; - include $QR_BASEDIR."qrmask.php"; - include $QR_BASEDIR."qrencode.php"; - diff --git a/vendor/phpqrcode/qrmask.php b/vendor/phpqrcode/qrmask.php deleted file mode 100644 index b14d7ae16..000000000 --- a/vendor/phpqrcode/qrmask.php +++ /dev/null @@ -1,328 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('N1', 3); - define('N2', 3); - define('N3', 40); - define('N4', 10); - - class QRmask { - - public $runLength = array(); - - //---------------------------------------------------------------------- - public function __construct() - { - $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); - } - - //---------------------------------------------------------------------- - public function writeFormatInformation($width, &$frame, $mask, $level) - { - $blacks = 0; - $format = QRspec::getFormatInfo($mask, $level); - - for($i=0; $i<8; $i++) { - if($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - - $frame[8][$width - 1 - $i] = chr($v); - if($i < 6) { - $frame[$i][8] = chr($v); - } else { - $frame[$i + 1][8] = chr($v); - } - $format = $format >> 1; - } - - for($i=0; $i<7; $i++) { - if($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - - $frame[$width - 7 + $i][8] = chr($v); - if($i == 0) { - $frame[8][7] = chr($v); - } else { - $frame[8][6 - $i] = chr($v); - } - - $format = $format >> 1; - } - - return $blacks; - } - - //---------------------------------------------------------------------- - public function mask0($x, $y) { return ($x+$y)&1; } - public function mask1($x, $y) { return ($y&1); } - public function mask2($x, $y) { return ($x%3); } - public function mask3($x, $y) { return ($x+$y)%3; } - public function mask4($x, $y) { return (((int)($y/2))+((int)($x/3)))&1; } - public function mask5($x, $y) { return (($x*$y)&1)+($x*$y)%3; } - public function mask6($x, $y) { return ((($x*$y)&1)+($x*$y)%3)&1; } - public function mask7($x, $y) { return ((($x*$y)%3)+(($x+$y)&1))&1; } - - //---------------------------------------------------------------------- - private function generateMaskNo($maskNo, $width, $frame) - { - $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); - - for($y=0; $y<$width; $y++) { - for($x=0; $x<$width; $x++) { - if(ord($frame[$y][$x]) & 0x80) { - $bitMask[$y][$x] = 0; - } else { - $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); - $bitMask[$y][$x] = ($maskFunc == 0)?1:0; - } - - } - } - - return $bitMask; - } - - //---------------------------------------------------------------------- - public static function serial($bitFrame) - { - $codeArr = array(); - - foreach ($bitFrame as $line) - $codeArr[] = join('', $line); - - return gzcompress(join("\n", $codeArr), 9); - } - - //---------------------------------------------------------------------- - public static function unserial($code) - { - $codeArr = array(); - - $codeLines = explode("\n", gzuncompress($code)); - foreach ($codeLines as $line) - $codeArr[] = str_split($line); - - return $codeArr; - } - - //---------------------------------------------------------------------- - public function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly = false) - { - $b = 0; - $bitMask = array(); - - $fileName = QR_CACHE_DIR.'mask_'.$maskNo.DIRECTORY_SEPARATOR.'mask_'.$width.'_'.$maskNo.'.dat'; - - if (QR_CACHEABLE) { - if (file_exists($fileName)) { - $bitMask = self::unserial(file_get_contents($fileName)); - } else { - $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); - if (!file_exists(QR_CACHE_DIR.'mask_'.$maskNo)) - mkdir(QR_CACHE_DIR.'mask_'.$maskNo); - file_put_contents($fileName, self::serial($bitMask)); - } - } else { - $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); - } - - if ($maskGenOnly) - return; - - $d = $s; - - for($y=0; $y<$width; $y++) { - for($x=0; $x<$width; $x++) { - if($bitMask[$y][$x] == 1) { - $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); - } - $b += (int)(ord($d[$y][$x]) & 1); - } - } - - return $b; - } - - //---------------------------------------------------------------------- - public function makeMask($width, $frame, $maskNo, $level) - { - $masked = array_fill(0, $width, str_repeat("\0", $width)); - $this->makeMaskNo($maskNo, $width, $frame, $masked); - $this->writeFormatInformation($width, $masked, $maskNo, $level); - - return $masked; - } - - //---------------------------------------------------------------------- - public function calcN1N3($length) - { - $demerit = 0; - - for($i=0; $i<$length; $i++) { - - if($this->runLength[$i] >= 5) { - $demerit += (N1 + ($this->runLength[$i] - 5)); - } - if($i & 1) { - if(($i >= 3) && ($i < ($length-2)) && ($this->runLength[$i] % 3 == 0)) { - $fact = (int)($this->runLength[$i] / 3); - if(($this->runLength[$i-2] == $fact) && - ($this->runLength[$i-1] == $fact) && - ($this->runLength[$i+1] == $fact) && - ($this->runLength[$i+2] == $fact)) { - if(($this->runLength[$i-3] < 0) || ($this->runLength[$i-3] >= (4 * $fact))) { - $demerit += N3; - } else if((($i+3) >= $length) || ($this->runLength[$i+3] >= (4 * $fact))) { - $demerit += N3; - } - } - } - } - } - return $demerit; - } - - //---------------------------------------------------------------------- - public function evaluateSymbol($width, $frame) - { - $head = 0; - $demerit = 0; - - for($y=0; $y<$width; $y++) { - $head = 0; - $this->runLength[0] = 1; - - $frameY = $frame[$y]; - - if ($y>0) - $frameYM = $frame[$y-1]; - - for($x=0; $x<$width; $x++) { - if(($x > 0) && ($y > 0)) { - $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); - $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); - - if(($b22 | ($w22 ^ 1))&1) { - $demerit += N2; - } - } - if(($x == 0) && (ord($frameY[$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } else if($x > 0) { - if((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - - $demerit += $this->calcN1N3($head+1); - } - - for($x=0; $x<$width; $x++) { - $head = 0; - $this->runLength[0] = 1; - - for($y=0; $y<$width; $y++) { - if($y == 0 && (ord($frame[$y][$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } else if($y > 0) { - if((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - - $demerit += $this->calcN1N3($head+1); - } - - return $demerit; - } - - - //---------------------------------------------------------------------- - public function mask($width, $frame, $level) - { - $minDemerit = PHP_INT_MAX; - $bestMaskNum = 0; - $bestMask = array(); - - $checked_masks = array(0,1,2,3,4,5,6,7); - - if (QR_FIND_FROM_RANDOM !== false) { - - $howManuOut = 8-(QR_FIND_FROM_RANDOM % 9); - for ($i = 0; $i < $howManuOut; $i++) { - $remPos = rand (0, count($checked_masks)-1); - unset($checked_masks[$remPos]); - $checked_masks = array_values($checked_masks); - } - - } - - $bestMask = $frame; - - foreach($checked_masks as $i) { - $mask = array_fill(0, $width, str_repeat("\0", $width)); - - $demerit = 0; - $blacks = 0; - $blacks = $this->makeMaskNo($i, $width, $frame, $mask); - $blacks += $this->writeFormatInformation($width, $mask, $i, $level); - $blacks = (int)(100 * $blacks / ($width * $width)); - $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); - $demerit += $this->evaluateSymbol($width, $mask); - - if($demerit < $minDemerit) { - $minDemerit = $demerit; - $bestMask = $mask; - $bestMaskNum = $i; - } - } - - return $bestMask; - } - - //---------------------------------------------------------------------- - } diff --git a/vendor/phpqrcode/qrrscode.php b/vendor/phpqrcode/qrrscode.php deleted file mode 100644 index 591129a32..000000000 --- a/vendor/phpqrcode/qrrscode.php +++ /dev/null @@ -1,210 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRrsItem { - - public $mm; // Bits per symbol - public $nn; // Symbols per block (= (1<= $this->nn) { - $x -= $this->nn; - $x = ($x >> $this->mm) + ($x & $this->nn); - } - - return $x; - } - - //---------------------------------------------------------------------- - public static function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) - { - // Common code for intializing a Reed-Solomon control block (char or int symbols) - // Copyright 2004 Phil Karn, KA9Q - // May be used under the terms of the GNU Lesser General Public License (LGPL) - - $rs = null; - - // Check parameter ranges - if($symsize < 0 || $symsize > 8) return $rs; - if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs; - if($prim <= 0 || $prim >= (1<<$symsize)) return $rs; - if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values! - if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding - - $rs = new QRrsItem(); - $rs->mm = $symsize; - $rs->nn = (1<<$symsize)-1; - $rs->pad = $pad; - - $rs->alpha_to = array_fill(0, $rs->nn+1, 0); - $rs->index_of = array_fill(0, $rs->nn+1, 0); - - // PHP style macro replacement ;) - $NN =& $rs->nn; - $A0 =& $NN; - - // Generate Galois field lookup tables - $rs->index_of[0] = $A0; // log(zero) = -inf - $rs->alpha_to[$A0] = 0; // alpha**-inf = 0 - $sr = 1; - - for($i=0; $i<$rs->nn; $i++) { - $rs->index_of[$sr] = $i; - $rs->alpha_to[$i] = $sr; - $sr <<= 1; - if($sr & (1<<$symsize)) { - $sr ^= $gfpoly; - } - $sr &= $rs->nn; - } - - if($sr != 1){ - // field generator polynomial is not primitive! - $rs = NULL; - return $rs; - } - - /* Form RS code generator polynomial from its roots */ - $rs->genpoly = array_fill(0, $nroots+1, 0); - - $rs->fcr = $fcr; - $rs->prim = $prim; - $rs->nroots = $nroots; - $rs->gfpoly = $gfpoly; - - /* Find prim-th root of 1, used in decoding */ - for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn) - ; // intentional empty-body loop! - - $rs->iprim = (int)($iprim / $prim); - $rs->genpoly[0] = 1; - - for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { - $rs->genpoly[$i+1] = 1; - - // Multiply rs->genpoly[] by @**(root + x) - for ($j = $i; $j > 0; $j--) { - if ($rs->genpoly[$j] != 0) { - $rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)]; - } else { - $rs->genpoly[$j] = $rs->genpoly[$j-1]; - } - } - // rs->genpoly[0] can never be zero - $rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)]; - } - - // convert rs->genpoly[] to index form for quicker encoding - for ($i = 0; $i <= $nroots; $i++) - $rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]]; - - return $rs; - } - - //---------------------------------------------------------------------- - public function encode_rs_char($data, &$parity) - { - $MM =& $this->mm; - $NN =& $this->nn; - $ALPHA_TO =& $this->alpha_to; - $INDEX_OF =& $this->index_of; - $GENPOLY =& $this->genpoly; - $NROOTS =& $this->nroots; - $FCR =& $this->fcr; - $PRIM =& $this->prim; - $IPRIM =& $this->iprim; - $PAD =& $this->pad; - $A0 =& $NN; - - $parity = array_fill(0, $NROOTS, 0); - - for($i=0; $i< ($NN-$NROOTS-$PAD); $i++) { - - $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; - if($feedback != $A0) { - // feedback term is non-zero - - // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must - // always be for the polynomials constructed by init_rs() - $feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback); - - for($j=1;$j<$NROOTS;$j++) { - $parity[$j] ^= $ALPHA_TO[$this->modnn($feedback + $GENPOLY[$NROOTS-$j])]; - } - } - - // Shift - array_shift($parity); - if($feedback != $A0) { - array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]); - } else { - array_push($parity, 0); - } - } - } - } - - //########################################################################## - - class QRrs { - - public static $items = array(); - - //---------------------------------------------------------------------- - public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) - { - foreach(self::$items as $rs) { - if($rs->pad != $pad) continue; - if($rs->nroots != $nroots) continue; - if($rs->mm != $symsize) continue; - if($rs->gfpoly != $gfpoly) continue; - if($rs->fcr != $fcr) continue; - if($rs->prim != $prim) continue; - - return $rs; - } - - $rs = QRrsItem::init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); - array_unshift(self::$items, $rs); - - return $rs; - } - } \ No newline at end of file diff --git a/vendor/phpqrcode/qrspec.php b/vendor/phpqrcode/qrspec.php deleted file mode 100644 index 92aea0c78..000000000 --- a/vendor/phpqrcode/qrspec.php +++ /dev/null @@ -1,592 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * The following data / specifications are taken from - * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) - * or - * "Automatic identification and data capture techniques -- - * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('QRSPEC_VERSION_MAX', 40); - define('QRSPEC_WIDTH_MAX', 177); - - define('QRCAP_WIDTH', 0); - define('QRCAP_WORDS', 1); - define('QRCAP_REMINDER', 2); - define('QRCAP_EC', 3); - - class QRspec { - - public static $capacity = array( - array( 0, 0, 0, array( 0, 0, 0, 0)), - array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 - array( 25, 44, 7, array( 10, 16, 22, 28)), - array( 29, 70, 7, array( 15, 26, 36, 44)), - array( 33, 100, 7, array( 20, 36, 52, 64)), - array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 - array( 41, 172, 7, array( 36, 64, 96, 112)), - array( 45, 196, 0, array( 40, 72, 108, 130)), - array( 49, 242, 0, array( 48, 88, 132, 156)), - array( 53, 292, 0, array( 60, 110, 160, 192)), - array( 57, 346, 0, array( 72, 130, 192, 224)), //10 - array( 61, 404, 0, array( 80, 150, 224, 264)), - array( 65, 466, 0, array( 96, 176, 260, 308)), - array( 69, 532, 0, array( 104, 198, 288, 352)), - array( 73, 581, 3, array( 120, 216, 320, 384)), - array( 77, 655, 3, array( 132, 240, 360, 432)), //15 - array( 81, 733, 3, array( 144, 280, 408, 480)), - array( 85, 815, 3, array( 168, 308, 448, 532)), - array( 89, 901, 3, array( 180, 338, 504, 588)), - array( 93, 991, 3, array( 196, 364, 546, 650)), - array( 97, 1085, 3, array( 224, 416, 600, 700)), //20 - array(101, 1156, 4, array( 224, 442, 644, 750)), - array(105, 1258, 4, array( 252, 476, 690, 816)), - array(109, 1364, 4, array( 270, 504, 750, 900)), - array(113, 1474, 4, array( 300, 560, 810, 960)), - array(117, 1588, 4, array( 312, 588, 870, 1050)), //25 - array(121, 1706, 4, array( 336, 644, 952, 1110)), - array(125, 1828, 4, array( 360, 700, 1020, 1200)), - array(129, 1921, 3, array( 390, 728, 1050, 1260)), - array(133, 2051, 3, array( 420, 784, 1140, 1350)), - array(137, 2185, 3, array( 450, 812, 1200, 1440)), //30 - array(141, 2323, 3, array( 480, 868, 1290, 1530)), - array(145, 2465, 3, array( 510, 924, 1350, 1620)), - array(149, 2611, 3, array( 540, 980, 1440, 1710)), - array(153, 2761, 3, array( 570, 1036, 1530, 1800)), - array(157, 2876, 0, array( 570, 1064, 1590, 1890)), //35 - array(161, 3034, 0, array( 600, 1120, 1680, 1980)), - array(165, 3196, 0, array( 630, 1204, 1770, 2100)), - array(169, 3362, 0, array( 660, 1260, 1860, 2220)), - array(173, 3532, 0, array( 720, 1316, 1950, 2310)), - array(177, 3706, 0, array( 750, 1372, 2040, 2430)) //40 - ); - - //---------------------------------------------------------------------- - public static function getDataLength($version, $level) - { - return self::$capacity[$version][QRCAP_WORDS] - self::$capacity[$version][QRCAP_EC][$level]; - } - - //---------------------------------------------------------------------- - public static function getECCLength($version, $level) - { - return self::$capacity[$version][QRCAP_EC][$level]; - } - - //---------------------------------------------------------------------- - public static function getWidth($version) - { - return self::$capacity[$version][QRCAP_WIDTH]; - } - - //---------------------------------------------------------------------- - public static function getRemainder($version) - { - return self::$capacity[$version][QRCAP_REMINDER]; - } - - //---------------------------------------------------------------------- - public static function getMinimumVersion($size, $level) - { - - for($i=1; $i<= QRSPEC_VERSION_MAX; $i++) { - $words = self::$capacity[$i][QRCAP_WORDS] - self::$capacity[$i][QRCAP_EC][$level]; - if($words >= $size) - return $i; - } - - return -1; - } - - //###################################################################### - - public static $lengthTableBits = array( - array(10, 12, 14), - array( 9, 11, 13), - array( 8, 16, 16), - array( 8, 10, 12) - ); - - //---------------------------------------------------------------------- - public static function lengthIndicator($mode, $version) - { - if ($mode == QR_MODE_STRUCTURE) - return 0; - - if ($version <= 9) { - $l = 0; - } else if ($version <= 26) { - $l = 1; - } else { - $l = 2; - } - - return self::$lengthTableBits[$mode][$l]; - } - - //---------------------------------------------------------------------- - public static function maximumWords($mode, $version) - { - if($mode == QR_MODE_STRUCTURE) - return 3; - - if($version <= 9) { - $l = 0; - } else if($version <= 26) { - $l = 1; - } else { - $l = 2; - } - - $bits = self::$lengthTableBits[$mode][$l]; - $words = (1 << $bits) - 1; - - if($mode == QR_MODE_KANJI) { - $words *= 2; // the number of bytes is required - } - - return $words; - } - - // Error correction code ----------------------------------------------- - // Table of the error correction code (Reed-Solomon block) - // See Table 12-16 (pp.30-36), JIS X0510:2004. - - public static $eccTable = array( - array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), - array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), - array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), - array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 - array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), - array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), - array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), - array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), - array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), //10 - array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), - array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), - array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), - array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), - array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), //15 - array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), - array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), - array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), - array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), - array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), //20 - array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), - array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), - array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), - array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), - array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), //25 - array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), - array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), - array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), - array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), - array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), //30 - array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), - array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), - array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), - array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), - array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), //35 - array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), - array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), - array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), - array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), - array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)),//40 - ); - - //---------------------------------------------------------------------- - // CACHEABLE!!! - - public static function getEccSpec($version, $level, array &$spec) - { - if (count($spec) < 5) { - $spec = array(0,0,0,0,0); - } - - $b1 = self::$eccTable[$version][$level][0]; - $b2 = self::$eccTable[$version][$level][1]; - $data = self::getDataLength($version, $level); - $ecc = self::getECCLength($version, $level); - - if($b2 == 0) { - $spec[0] = $b1; - $spec[1] = (int)($data / $b1); - $spec[2] = (int)($ecc / $b1); - $spec[3] = 0; - $spec[4] = 0; - } else { - $spec[0] = $b1; - $spec[1] = (int)($data / ($b1 + $b2)); - $spec[2] = (int)($ecc / ($b1 + $b2)); - $spec[3] = $b2; - $spec[4] = $spec[1] + 1; - } - } - - // Alignment pattern --------------------------------------------------- - - // Positions of alignment patterns. - // This array includes only the second and the third position of the - // alignment patterns. Rest of them can be calculated from the distance - // between them. - - // See Table 1 in Appendix E (pp.71) of JIS X0510:2004. - - public static $alignmentPattern = array( - array( 0, 0), - array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 - array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 - array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), //11-15 - array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), //16-20 - array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), //21-25 - array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), //26-30 - array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), //31-35 - array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58), //35-40 - ); - - - /** -------------------------------------------------------------------- - * Put an alignment marker. - * @param frame - * @param width - * @param ox,oy center coordinate of the pattern - */ - public static function putAlignmentMarker(array &$frame, $ox, $oy) - { - $finder = array( - "\xa1\xa1\xa1\xa1\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa0\xa1\xa0\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa1\xa1\xa1\xa1" - ); - - $yStart = $oy-2; - $xStart = $ox-2; - - for($y=0; $y<5; $y++) { - QRstr::set($frame, $xStart, $yStart+$y, $finder[$y]); - } - } - - //---------------------------------------------------------------------- - public static function putAlignmentPattern($version, &$frame, $width) - { - if($version < 2) - return; - - $d = self::$alignmentPattern[$version][1] - self::$alignmentPattern[$version][0]; - if($d < 0) { - $w = 2; - } else { - $w = (int)(($width - self::$alignmentPattern[$version][0]) / $d + 2); - } - - if($w * $w - 3 == 1) { - $x = self::$alignmentPattern[$version][0]; - $y = self::$alignmentPattern[$version][0]; - self::putAlignmentMarker($frame, $x, $y); - return; - } - - $cx = self::$alignmentPattern[$version][0]; - for($x=1; $x<$w - 1; $x++) { - self::putAlignmentMarker($frame, 6, $cx); - self::putAlignmentMarker($frame, $cx, 6); - $cx += $d; - } - - $cy = self::$alignmentPattern[$version][0]; - for($y=0; $y<$w-1; $y++) { - $cx = self::$alignmentPattern[$version][0]; - for($x=0; $x<$w-1; $x++) { - self::putAlignmentMarker($frame, $cx, $cy); - $cx += $d; - } - $cy += $d; - } - } - - // Version information pattern ----------------------------------------- - - // Version information pattern (BCH coded). - // See Table 1 in Appendix D (pp.68) of JIS X0510:2004. - - // size: [QRSPEC_VERSION_MAX - 6] - - public static $versionPattern = array( - 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, - 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, - 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, - 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, - 0x27541, 0x28c69 - ); - - //---------------------------------------------------------------------- - public static function getVersionPattern($version) - { - if($version < 7 || $version > QRSPEC_VERSION_MAX) - return 0; - - return self::$versionPattern[$version -7]; - } - - // Format information -------------------------------------------------- - // See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib) - - public static $formatInfo = array( - array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), - array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), - array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), - array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) - ); - - public static function getFormatInfo($mask, $level) - { - if($mask < 0 || $mask > 7) - return 0; - - if($level < 0 || $level > 3) - return 0; - - return self::$formatInfo[$level][$mask]; - } - - // Frame --------------------------------------------------------------- - // Cache of initial frames. - - public static $frames = array(); - - /** -------------------------------------------------------------------- - * Put a finder pattern. - * @param frame - * @param width - * @param ox,oy upper-left coordinate of the pattern - */ - public static function putFinderPattern(&$frame, $ox, $oy) - { - $finder = array( - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" - ); - - for($y=0; $y<7; $y++) { - QRstr::set($frame, $ox, $oy+$y, $finder[$y]); - } - } - - //---------------------------------------------------------------------- - public static function createFrame($version) - { - $width = self::$capacity[$version][QRCAP_WIDTH]; - $frameLine = str_repeat ("\0", $width); - $frame = array_fill(0, $width, $frameLine); - - // Finder pattern - self::putFinderPattern($frame, 0, 0); - self::putFinderPattern($frame, $width - 7, 0); - self::putFinderPattern($frame, 0, $width - 7); - - // Separator - $yOffset = $width - 7; - - for($y=0; $y<7; $y++) { - $frame[$y][7] = "\xc0"; - $frame[$y][$width - 8] = "\xc0"; - $frame[$yOffset][7] = "\xc0"; - $yOffset++; - } - - $setPattern = str_repeat("\xc0", 8); - - QRstr::set($frame, 0, 7, $setPattern); - QRstr::set($frame, $width-8, 7, $setPattern); - QRstr::set($frame, 0, $width - 8, $setPattern); - - // Format info - $setPattern = str_repeat("\x84", 9); - QRstr::set($frame, 0, 8, $setPattern); - QRstr::set($frame, $width - 8, 8, $setPattern, 8); - - $yOffset = $width - 8; - - for($y=0; $y<8; $y++,$yOffset++) { - $frame[$y][8] = "\x84"; - $frame[$yOffset][8] = "\x84"; - } - - // Timing pattern - - for($i=1; $i<$width-15; $i++) { - $frame[6][7+$i] = chr(0x90 | ($i & 1)); - $frame[7+$i][6] = chr(0x90 | ($i & 1)); - } - - // Alignment pattern - self::putAlignmentPattern($version, $frame, $width); - - // Version information - if($version >= 7) { - $vinf = self::getVersionPattern($version); - - $v = $vinf; - - for($x=0; $x<6; $x++) { - for($y=0; $y<3; $y++) { - $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - - $v = $vinf; - for($y=0; $y<6; $y++) { - for($x=0; $x<3; $x++) { - $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - } - - // and a little bit... - $frame[$width - 8][8] = "\x81"; - - return $frame; - } - - //---------------------------------------------------------------------- - public static function debug($frame, $binary_mode = false) - { - if ($binary_mode) { - - foreach ($frame as &$frameLine) { - $frameLine = join('  ', explode('0', $frameLine)); - $frameLine = join('██', explode('1', $frameLine)); - } - - ?> - -


            '; - echo join("
            ", $frame); - echo '






    '; - - } else { - - foreach ($frame as &$frameLine) { - $frameLine = join(' ', explode("\xc0", $frameLine)); - $frameLine = join('', explode("\xc1", $frameLine)); - $frameLine = join(' ', explode("\xa0", $frameLine)); - $frameLine = join('', explode("\xa1", $frameLine)); - $frameLine = join('', explode("\x84", $frameLine)); //format 0 - $frameLine = join('', explode("\x85", $frameLine)); //format 1 - $frameLine = join('', explode("\x81", $frameLine)); //special bit - $frameLine = join(' ', explode("\x90", $frameLine)); //clock 0 - $frameLine = join('', explode("\x91", $frameLine)); //clock 1 - $frameLine = join(' ', explode("\x88", $frameLine)); //version - $frameLine = join('', explode("\x89", $frameLine)); //version - $frameLine = join('♦', explode("\x01", $frameLine)); - $frameLine = join('⋅', explode("\0", $frameLine)); - } - - ?> - - "; - echo join("
    ", $frame); - echo "
    "; - - } - } - - //---------------------------------------------------------------------- - public static function serial($frame) - { - return gzcompress(join("\n", $frame), 9); - } - - //---------------------------------------------------------------------- - public static function unserial($code) - { - return explode("\n", gzuncompress($code)); - } - - //---------------------------------------------------------------------- - public static function newFrame($version) - { - if($version < 1 || $version > QRSPEC_VERSION_MAX) - return null; - - if(!isset(self::$frames[$version])) { - - $fileName = QR_CACHE_DIR.'frame_'.$version.'.dat'; - - if (QR_CACHEABLE) { - if (file_exists($fileName)) { - self::$frames[$version] = self::unserial(file_get_contents($fileName)); - } else { - self::$frames[$version] = self::createFrame($version); - file_put_contents($fileName, self::serial(self::$frames[$version])); - } - } else { - self::$frames[$version] = self::createFrame($version); - } - } - - if(is_null(self::$frames[$version])) - return null; - - return self::$frames[$version]; - } - - //---------------------------------------------------------------------- - public static function rsBlockNum($spec) { return $spec[0] + $spec[3]; } - public static function rsBlockNum1($spec) { return $spec[0]; } - public static function rsDataCodes1($spec) { return $spec[1]; } - public static function rsEccCodes1($spec) { return $spec[2]; } - public static function rsBlockNum2($spec) { return $spec[3]; } - public static function rsDataCodes2($spec) { return $spec[4]; } - public static function rsEccCodes2($spec) { return $spec[2]; } - public static function rsDataLength($spec) { return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); } - public static function rsEccLength($spec) { return ($spec[0] + $spec[3]) * $spec[2]; } - - } \ No newline at end of file diff --git a/vendor/phpqrcode/qrsplit.php b/vendor/phpqrcode/qrsplit.php deleted file mode 100644 index d75b82737..000000000 --- a/vendor/phpqrcode/qrsplit.php +++ /dev/null @@ -1,311 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * The following data / specifications are taken from - * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) - * or - * "Automatic identification and data capture techniques -- - * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - class QRsplit { - - public $dataStr = ''; - public $input; - public $modeHint; - - //---------------------------------------------------------------------- - public function __construct($dataStr, $input, $modeHint) - { - $this->dataStr = $dataStr; - $this->input = $input; - $this->modeHint = $modeHint; - } - - //---------------------------------------------------------------------- - public static function isdigitat($str, $pos) - { - if ($pos >= strlen($str)) - return false; - - return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); - } - - //---------------------------------------------------------------------- - public static function isalnumat($str, $pos) - { - if ($pos >= strlen($str)) - return false; - - return (QRinput::lookAnTable(ord($str[$pos])) >= 0); - } - - //---------------------------------------------------------------------- - public function identifyMode($pos) - { - if ($pos >= strlen($this->dataStr)) - return QR_MODE_NUL; - - $c = $this->dataStr[$pos]; - - if(self::isdigitat($this->dataStr, $pos)) { - return QR_MODE_NUM; - } else if(self::isalnumat($this->dataStr, $pos)) { - return QR_MODE_AN; - } else if($this->modeHint == QR_MODE_KANJI) { - - if ($pos+1 < strlen($this->dataStr)) - { - $d = $this->dataStr[$pos+1]; - $word = (ord($c) << 8) | ord($d); - if(($word >= 0x8140 && $word <= 0x9ffc) || ($word >= 0xe040 && $word <= 0xebbf)) { - return QR_MODE_KANJI; - } - } - } - - return QR_MODE_8; - } - - //---------------------------------------------------------------------- - public function eatNum() - { - $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); - - $p = 0; - while(self::isdigitat($this->dataStr, $p)) { - $p++; - } - - $run = $p; - $mode = $this->identifyMode($p); - - if($mode == QR_MODE_8) { - $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln - + QRinput::estimateBitsMode8(1) // + 4 + l8 - - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 - if($dif > 0) { - return $this->eat8(); - } - } - if($mode == QR_MODE_AN) { - $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln - + QRinput::estimateBitsModeAn(1) // + 4 + la - - QRinput::estimateBitsModeAn($run + 1);// - 4 - la - if($dif > 0) { - return $this->eatAn(); - } - } - - $ret = $this->input->append(QR_MODE_NUM, $run, str_split($this->dataStr)); - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function eatAn() - { - $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); - $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); - - $p = 0; - - while(self::isalnumat($this->dataStr, $p)) { - if(self::isdigitat($this->dataStr, $p)) { - $q = $p; - while(self::isdigitat($this->dataStr, $q)) { - $q++; - } - - $dif = QRinput::estimateBitsModeAn($p) // + 4 + la - + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln - - QRinput::estimateBitsModeAn($q); // - 4 - la - - if($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - - $run = $p; - - if(!self::isalnumat($this->dataStr, $p)) { - $dif = QRinput::estimateBitsModeAn($run) + 4 + $la - + QRinput::estimateBitsMode8(1) // + 4 + l8 - - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 - if($dif > 0) { - return $this->eat8(); - } - } - - $ret = $this->input->append(QR_MODE_AN, $run, str_split($this->dataStr)); - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function eatKanji() - { - $p = 0; - - while($this->identifyMode($p) == QR_MODE_KANJI) { - $p += 2; - } - - $ret = $this->input->append(QR_MODE_KANJI, $p, str_split($this->dataStr)); - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function eat8() - { - $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); - $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); - - $p = 1; - $dataStrLen = strlen($this->dataStr); - - while($p < $dataStrLen) { - - $mode = $this->identifyMode($p); - if($mode == QR_MODE_KANJI) { - break; - } - if($mode == QR_MODE_NUM) { - $q = $p; - while(self::isdigitat($this->dataStr, $q)) { - $q++; - } - $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 - + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln - - QRinput::estimateBitsMode8($q); // - 4 - l8 - if($dif < 0) { - break; - } else { - $p = $q; - } - } else if($mode == QR_MODE_AN) { - $q = $p; - while(self::isalnumat($this->dataStr, $q)) { - $q++; - } - $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 - + QRinput::estimateBitsModeAn($q - $p) + 4 + $la - - QRinput::estimateBitsMode8($q); // - 4 - l8 - if($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - - $run = $p; - $ret = $this->input->append(QR_MODE_8, $run, str_split($this->dataStr)); - - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function splitString() - { - while (strlen($this->dataStr) > 0) - { - if($this->dataStr == '') - return 0; - - $mode = $this->identifyMode(0); - - switch ($mode) { - case QR_MODE_NUM: $length = $this->eatNum(); break; - case QR_MODE_AN: $length = $this->eatAn(); break; - case QR_MODE_KANJI: - if ($hint == QR_MODE_KANJI) - $length = $this->eatKanji(); - else $length = $this->eat8(); - break; - default: $length = $this->eat8(); break; - - } - - if($length == 0) return 0; - if($length < 0) return -1; - - $this->dataStr = substr($this->dataStr, $length); - } - } - - //---------------------------------------------------------------------- - public function toUpper() - { - $stringLen = strlen($this->dataStr); - $p = 0; - - while ($p<$stringLen) { - $mode = self::identifyMode(substr($this->dataStr, $p), $this->modeHint); - if($mode == QR_MODE_KANJI) { - $p += 2; - } else { - if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) { - $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); - } - $p++; - } - } - - return $this->dataStr; - } - - //---------------------------------------------------------------------- - public static function splitStringToQRinput($string, QRinput $input, $modeHint, $casesensitive = true) - { - if(is_null($string) || $string == '\0' || $string == '') { - throw new Exception('empty string!!!'); - } - - $split = new QRsplit($string, $input, $modeHint); - - if(!$casesensitive) - $split->toUpper(); - - return $split->splitString(); - } - } \ No newline at end of file diff --git a/vendor/phpqrcode/qrtools.php b/vendor/phpqrcode/qrtools.php deleted file mode 100644 index 3012db493..000000000 --- a/vendor/phpqrcode/qrtools.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRtools { - - //---------------------------------------------------------------------- - public static function binarize($frame) - { - $len = count($frame); - foreach ($frame as &$frameLine) { - - for($i=0; $i<$len; $i++) { - $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; - } - } - - return $frame; - } - - //---------------------------------------------------------------------- - public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037') - { - $barcode_array = array(); - - if (!is_array($mode)) - $mode = explode(',', $mode); - - $eccLevel = 'L'; - - if (count($mode) > 1) { - $eccLevel = $mode[1]; - } - - $qrTab = QRcode::text($code, false, $eccLevel); - $size = count($qrTab); - - $barcode_array['num_rows'] = $size; - $barcode_array['num_cols'] = $size; - $barcode_array['bcode'] = array(); - - foreach ($qrTab as $line) { - $arrAdd = array(); - foreach(str_split($line) as $char) - $arrAdd[] = ($char=='1')?1:0; - $barcode_array['bcode'][] = $arrAdd; - } - - return $barcode_array; - } - - //---------------------------------------------------------------------- - public static function clearCache() - { - self::$frames = array(); - } - - //---------------------------------------------------------------------- - public static function buildCache() - { - QRtools::markTime('before_build_cache'); - - $mask = new QRmask(); - for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) { - $frame = QRspec::newFrame($a); - if (QR_IMAGE) { - $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; - QRimage::png(self::binarize($frame), $fileName, 1, 0); - } - - $width = count($frame); - $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); - for ($maskNo=0; $maskNo<8; $maskNo++) - $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); - } - - QRtools::markTime('after_build_cache'); - } - - //---------------------------------------------------------------------- - public static function log($outfile, $err) - { - if (QR_LOG_DIR !== false) { - if ($err != '') { - if ($outfile !== false) { - file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); - } else { - file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); - } - } - } - } - - //---------------------------------------------------------------------- - public static function dumpMask($frame) - { - $width = count($frame); - for($y=0;$y<$width;$y++) { - for($x=0;$x<$width;$x++) { - echo ord($frame[$y][$x]).','; - } - } - } - - //---------------------------------------------------------------------- - public static function markTime($markerId) - { - list($usec, $sec) = explode(" ", microtime()); - $time = ((float)$usec + (float)$sec); - - if (!isset($GLOBALS['qr_time_bench'])) - $GLOBALS['qr_time_bench'] = array(); - - $GLOBALS['qr_time_bench'][$markerId] = $time; - } - - //---------------------------------------------------------------------- - public static function timeBenchmark() - { - self::markTime('finish'); - - $lastTime = 0; - $startTime = 0; - $p = 0; - - echo ' - - '; - - foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) { - if ($p > 0) { - echo ''; - } else { - $startTime = $thisTime; - } - - $p++; - $lastTime = $thisTime; - } - - echo ' - - -
    BENCHMARK
    till '.$markerId.': '.number_format($thisTime-$lastTime, 6).'s
    TOTAL: '.number_format($lastTime-$startTime, 6).'s
    '; - } - - } - - //########################################################################## - - QRtools::markTime('start'); - \ No newline at end of file diff --git a/vendor/phpqrcode/tools/merge.bat b/vendor/phpqrcode/tools/merge.bat deleted file mode 100644 index b60a4853c..000000000 --- a/vendor/phpqrcode/tools/merge.bat +++ /dev/null @@ -1,2 +0,0 @@ -php ./merge.php -pause \ No newline at end of file diff --git a/vendor/phpqrcode/tools/merge.php b/vendor/phpqrcode/tools/merge.php deleted file mode 100644 index 19d338b34..000000000 --- a/vendor/phpqrcode/tools/merge.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - $QR_BASEDIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR; - $QR_TOOLSDIR = dirname(__FILE__).DIRECTORY_SEPARATOR; - - $outputFile = $QR_BASEDIR.'phpqrcode.php'; - - // Required libs - - $fileList = array( - $QR_BASEDIR.'qrconst.php', - $QR_TOOLSDIR.'merged_config.php', - $QR_BASEDIR.'qrtools.php', - $QR_BASEDIR.'qrspec.php', - $QR_BASEDIR.'qrimage.php', - $QR_BASEDIR.'qrinput.php', - $QR_BASEDIR.'qrbitstream.php', - $QR_BASEDIR.'qrsplit.php', - $QR_BASEDIR.'qrrscode.php', - $QR_BASEDIR.'qrmask.php', - $QR_BASEDIR.'qrencode.php' - ); - - $headerFile = $QR_TOOLSDIR.'merged_header.php'; - $versionFile = $QR_BASEDIR.'VERSION'; - - $outputCode = ''; - - foreach($fileList as $fileName) { - $outputCode .= "\n\n".'//---- '.basename($fileName).' -----------------------------'."\n\n"; - $anotherCode = file_get_contents($fileName); - $anotherCode = preg_replace ('/^<\?php/', '', $anotherCode); - $anotherCode = preg_replace ('/\?>\*$/', '', $anotherCode); - $outputCode .= "\n\n".$anotherCode."\n\n"; - } - - $versionDataEx = explode("\n", file_get_contents($versionFile)); - - $outputContents = file_get_contents($headerFile); - $outputContents .= "\n\n/*\n * Version: ".trim($versionDataEx[0])."\n * Build: ".trim($versionDataEx[1])."\n */\n\n"; - $outputContents .= $outputCode; - - file_put_contents($outputFile, $outputContents); - - \ No newline at end of file diff --git a/vendor/phpqrcode/tools/merge.sh b/vendor/phpqrcode/tools/merge.sh deleted file mode 100644 index e4c2fbcb8..000000000 --- a/vendor/phpqrcode/tools/merge.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -php ./merge.php \ No newline at end of file diff --git a/vendor/phpqrcode/tools/merged_config.php b/vendor/phpqrcode/tools/merged_config.php deleted file mode 100644 index 55ddb4506..000000000 --- a/vendor/phpqrcode/tools/merged_config.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - \ No newline at end of file From 2a94ba55d0a7cbce697a1f2343107676b0284538 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Fri, 24 Sep 2021 12:06:47 +0200 Subject: [PATCH 080/214] fix (dependencies): we need photoboothTools Change-Id: I29d82c9987e0d8bf3a712a445191a4b65a4104bd --- dependencies.php | 1 + 1 file changed, 1 insertion(+) diff --git a/dependencies.php b/dependencies.php index 8f6fdbcf3..6417aab53 100644 --- a/dependencies.php +++ b/dependencies.php @@ -66,6 +66,7 @@ + From 623216812fc43530990cf68da8dd092984bcce8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 00:02:15 +0000 Subject: [PATCH 081/214] build(deps): bump socket.io-client from 4.1.3 to 4.2.0 Bumps [socket.io-client](https://github.com/socketio/socket.io-client) from 4.1.3 to 4.2.0. - [Release notes](https://github.com/socketio/socket.io-client/releases) - [Changelog](https://github.com/socketio/socket.io-client/blob/master/CHANGELOG.md) - [Commits](https://github.com/socketio/socket.io-client/compare/4.1.3...4.2.0) --- updated-dependencies: - dependency-name: socket.io-client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 34 ++++++++++++++++++++-------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index bb3ce1886..9aae4613a 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "onoff": "^6.0.3", "selectize": "^0.12.6", "socket.io": "^4.1.3", - "socket.io-client": "^4.1.3", + "socket.io-client": "^4.2.0", "waypoints": "^4.0.1", "whatwg-fetch": "^3.6.2" }, diff --git a/yarn.lock b/yarn.lock index 3b509b14c..a7dcc7b97 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1923,10 +1923,10 @@ debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" -debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@~4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@~4.3.1, debug@~4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== dependencies: ms "2.1.2" @@ -2061,10 +2061,10 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" -engine.io-client@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-5.1.2.tgz#27108da9b39ae03262443d945caf2caa3655c4cb" - integrity sha512-blRrgXIE0A/eurWXRzvfCLG7uUFJqfTGFsyJzXSK71srMMGJ2VraBLg8Mdw28uUxSpVicepBN9X7asqpD1mZcQ== +engine.io-client@~5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-5.2.0.tgz#ae38c79a4af16258c0300e6819c0ea8ecc1597cd" + integrity sha512-BcIBXGBkT7wKecwnfrSV79G2X5lSUSgeAGgoo60plXf8UsQEvCQww/KMwXSMhVjb98fFYNq20CC5eo8IOAPqsg== dependencies: base64-arraybuffer "0.1.4" component-emitter "~1.3.0" @@ -2074,6 +2074,7 @@ engine.io-client@~5.1.2: parseqs "0.0.6" parseuri "0.0.6" ws "~7.4.2" + xmlhttprequest-ssl "~2.0.0" yeast "0.1.2" engine.io-parser@~4.0.0, engine.io-parser@~4.0.1: @@ -4784,16 +4785,16 @@ socket.io-adapter@~2.3.1: resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.3.1.tgz#a442720cb09a4823cfb81287dda1f9b52d4ccdb2" integrity sha512-8cVkRxI8Nt2wadkY6u60Y4rpW3ejA1rxgcK2JuyIhmF+RMNpTy1QRtkHIDUOf3B4HlQwakMsWbKftMv/71VMmw== -socket.io-client@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.1.3.tgz#236daa642a9f229932e00b7221e843bf74232a62" - integrity sha512-hISFn6PDpgDifVUiNklLHVPTMv1LAk8poHArfIUdXa+gKgbr0MZbAlquDFqCqsF30yBqa+jg42wgos2FK50BHA== +socket.io-client@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.2.0.tgz#195feed3de40283b1ae3f7d02cf91d3eb2c905c1" + integrity sha512-3GJ2KMh7inJUNAOjgf8NaKJZJa9uRyfryh2LrVJyKyxmzoXlfW9DeDNqylJn0ovOFt4e/kRLNWzMt/YqqEWYSA== dependencies: "@types/component-emitter" "^1.2.10" backo2 "~1.0.2" component-emitter "~1.3.0" - debug "~4.3.1" - engine.io-client "~5.1.2" + debug "~4.3.2" + engine.io-client "~5.2.0" parseuri "0.0.6" socket.io-parser "~4.0.4" @@ -5535,6 +5536,11 @@ ws@~7.4.2: resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== +xmlhttprequest-ssl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" + integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== + xtend@~4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" From 7c65338e8f732002381cff1480a65b84fc183d1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Sep 2021 18:17:28 +0000 Subject: [PATCH 082/214] build(deps): bump socket.io from 4.1.3 to 4.2.0 Bumps [socket.io](https://github.com/socketio/socket.io) from 4.1.3 to 4.2.0. - [Release notes](https://github.com/socketio/socket.io/releases) - [Changelog](https://github.com/socketio/socket.io/blob/master/CHANGELOG.md) - [Commits](https://github.com/socketio/socket.io/compare/4.1.3...4.2.0) --- updated-dependencies: - dependency-name: socket.io dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 44 ++++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 9aae4613a..0f036dd96 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "npm-run-all": "^4.1.5", "onoff": "^6.0.3", "selectize": "^0.12.6", - "socket.io": "^4.1.3", + "socket.io": "^4.2.0", "socket.io-client": "^4.2.0", "waypoints": "^4.0.1", "whatwg-fetch": "^3.6.2" diff --git a/yarn.lock b/yarn.lock index a7dcc7b97..d3f8ca4f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -971,12 +971,12 @@ resolved "https://registry.yarnpkg.com/@types/component-emitter/-/component-emitter-1.2.10.tgz#ef5b1589b9f16544642e473db5ea5639107ef3ea" integrity sha512-bsjleuRKWmGqajMerkzox19aGbscQX5rmmvvXl3wlIp5gMG1HgkiwPxsN5p070fBDKTNSPgojVbuY1+HWMbFhg== -"@types/cookie@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.0.tgz#14f854c0f93d326e39da6e3b6f34f7d37513d108" - integrity sha512-y7mImlc/rNkvCRmg8gC3/lj87S7pTUIJ6QGjwHR9WQJcFs+ZMTOaoPrkdFA/YdbuqVEmEbb5RdhVxMkAcgOnpg== +"@types/cookie@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" + integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== -"@types/cors@^2.8.10": +"@types/cors@^2.8.12": version "2.8.12" resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.12.tgz#6b2c510a7ad7039e98e7b8d3d6598f4359e5c080" integrity sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw== @@ -2084,10 +2084,10 @@ engine.io-parser@~4.0.0, engine.io-parser@~4.0.1: dependencies: base64-arraybuffer "0.1.4" -engine.io@~5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-5.1.1.tgz#a1f97e51ddf10cbd4db8b5ff4b165aad3760cdd3" - integrity sha512-aMWot7H5aC8L4/T8qMYbLdvKlZOdJTH54FxfdFunTGvhMx1BHkJOntWArsVfgAZVwAO9LC2sryPWRcEeUzCe5w== +engine.io@~5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-5.2.0.tgz#554cdd0230d89de7b1a49a809d7ee5a129d36809" + integrity sha512-d1DexkQx87IFr1FLuV+0f5kAm1Hk1uOVijLOb+D1sDO2QMb7YjE02VHtZtxo7xIXMgcWLb+vl3HRT0rI9tr4jQ== dependencies: accepts "~1.3.4" base64id "2.0.0" @@ -4780,10 +4780,10 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -socket.io-adapter@~2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.3.1.tgz#a442720cb09a4823cfb81287dda1f9b52d4ccdb2" - integrity sha512-8cVkRxI8Nt2wadkY6u60Y4rpW3ejA1rxgcK2JuyIhmF+RMNpTy1QRtkHIDUOf3B4HlQwakMsWbKftMv/71VMmw== +socket.io-adapter@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.3.2.tgz#039cd7c71a52abad984a6d57da2c0b7ecdd3c289" + integrity sha512-PBZpxUPYjmoogY0aoaTmo1643JelsaS1CiAwNjRVdrI0X9Seuc19Y2Wife8k88avW6haG8cznvwbubAZwH4Mtg== socket.io-client@^4.2.0: version "4.2.0" @@ -4807,19 +4807,19 @@ socket.io-parser@~4.0.4: component-emitter "~1.3.0" debug "~4.3.1" -socket.io@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.1.3.tgz#d114328ef27ab31b889611792959c3fa6d502500" - integrity sha512-tLkaY13RcO4nIRh1K2hT5iuotfTaIQw7cVIe0FUykN3SuQi0cm7ALxuyT5/CtDswOMWUzMGTibxYNx/gU7In+Q== +socket.io@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.2.0.tgz#9e1c09d3ea647e24963a2e7ba8ea5c847778e2ed" + integrity sha512-sjlGfMmnaWvTRVxGRGWyhd9ctpg4APxWAxu85O/SxekkxHhfxmePWZbaYCkeX5QQX0z1YEnKOlNt6w82E4Nzug== dependencies: - "@types/cookie" "^0.4.0" - "@types/cors" "^2.8.10" + "@types/cookie" "^0.4.1" + "@types/cors" "^2.8.12" "@types/node" ">=10.0.0" accepts "~1.3.4" base64id "~2.0.0" - debug "~4.3.1" - engine.io "~5.1.1" - socket.io-adapter "~2.3.1" + debug "~4.3.2" + engine.io "~5.2.0" + socket.io-adapter "~2.3.2" socket.io-parser "~4.0.4" source-map-resolve@^0.5.0: From 123ac106e0fee11faf06aba1e4d9c2668cc86fc7 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 25 Sep 2021 14:54:18 +0200 Subject: [PATCH 083/214] kiosk mode: remove incognito flag Fix #321 Change-Id: I675cc40bafcee9954902fd239596a1c43e640f88 --- faq/faq.md | 4 ++-- photobooth.desktop | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/faq/faq.md b/faq/faq.md index 75e8780e4..f95218c11 100644 --- a/faq/faq.md +++ b/faq/faq.md @@ -252,7 +252,7 @@ and add the following lines: @xset s off @xset -dpms @xset s noblank -@chromium-browser --noerrdialogs --disable-infobars --disable-translate --no-first-run --check-for-update-interval=31536000 --use-fake-ui-for-media-stream --start-fullscreen --kiosk http://127.0.0.1 --incognito --touch-events=enabled +@chromium-browser --noerrdialogs --disable-infobars --disable-translate --no-first-run --check-for-update-interval=31536000 --use-fake-ui-for-media-stream --start-fullscreen --kiosk http://127.0.0.1 --touch-events=enabled ``` **NOTE:** If you're using QR-Code replace `http://localhost/` with your local IP-Adress (e.g. `http://192.168.4.1`), else QR-Code does not work. @@ -265,7 +265,7 @@ sudo nano /etc/xdg/lxsession/LXDE-pi/autostart ``` and add `--touch-events=enabled` for Chromium: ``` -@chromium-browser --incognito --kiosk http://localhost/ --touch-events=enabled +@chromium-browser --kiosk http://localhost/ --touch-events=enabled ```
    diff --git a/photobooth.desktop b/photobooth.desktop index 958005290..36368d643 100644 --- a/photobooth.desktop +++ b/photobooth.desktop @@ -3,7 +3,7 @@ Version=1.1 Terminal=false Type=Application Name=Photobooth -Exec=chromium-browser --noerrdialogs --disable-infobars --disable-translate --no-first-run --check-for-update-interval=31536000 --use-fake-ui-for-media-stream --start-fullscreen --kiosk http://127.0.0.1 --incognito --touch-events=enabled +Exec=chromium-browser --noerrdialogs --disable-infobars --disable-translate --no-first-run --check-for-update-interval=31536000 --use-fake-ui-for-media-stream --start-fullscreen --kiosk http://127.0.0.1 --touch-events=enabled Icon=/var/www/html/resources/img/favicon-96x96.png StartupNotify=false Terminal=false From 60e5b989d5181071d0e9c3a456149a0db634e12b Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 25 Sep 2021 15:17:10 +0200 Subject: [PATCH 084/214] configsetup: add event option to basic view Fix #320 Change-Id: I54cb708cb654ac1615c066fdd234799f97e9b6a1 --- lib/configsetup.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 87524602f..f2a74bd9a 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -283,6 +283,7 @@ 'value' => $config['ui']['github'], ], 'event_enabled' => [ + 'view' => 'basic', 'type' => 'checkbox', 'name' => 'event[enabled]', 'value' => $config['event']['enabled'], From d6869b1efa6cf3dedb8a56e675fbd47e25fa9ca4 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 25 Sep 2021 15:18:47 +0200 Subject: [PATCH 085/214] admin: fix "Skip welcome screen" description Fix #319 Change-Id: Id0ffc18ded966d739b5b84f3bd4a66a5618719e3 --- resources/lang/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/en.json b/resources/lang/en.json index 9d710c0d4..57ed90c8a 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -253,7 +253,7 @@ "manual:frontpage:event_textLeft": "Enter the text visible on the left side of the chosen symbol.", "manual:frontpage:event_textRight": "Enter the text visible on the right side of the chosen symbol.", "manual:frontpage:ui_show_fork": "If enabled, a fork badge is shown on the right upper corner on the start screen.", - "manual:frontpage:ui_skip_welcome": "If enabled, a welcome screen is visible while accessing Photobooth the first time after installation / update.", + "manual:frontpage:ui_skip_welcome": "If enabled, the welcome screen won't be visible while accessing Photobooth the first time after installation / update.", "manual:gallery:gallery_allow_delete": "If enabled pictures can be deleted from the gallery at any time.", "manual:gallery:gallery_bottom_bar": "If enabled, the button bar is shown in the gallery below.", "manual:gallery:gallery_date_format": "Enter your date style.", From a4f02ed151ef335c818205b319172592f651dbbf Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 16 Sep 2021 09:20:52 +0200 Subject: [PATCH 086/214] remotebuzzer: allow using remotebuzzer server on linux without GPIO - Software buttons now work the same way an hardware button connected to the GPIO would work to trigger pictures via remotebuzzer server. This allows us to also use HID devices for remotebuzzer if we define the key id for picture and/or collage (limitation: no longpress detection!). Change-Id: Ia005794756b8fff8249cffb611095964705fed24 --- config/config.inc.php | 1 + lib/configsetup.inc.php | 6 ++ resources/lang/en.json | 6 +- src/js/core.js | 28 +++++-- src/js/remotebuzzer_client.js | 18 +++++ src/js/remotebuzzer_server.js | 145 +++++++++++++++++----------------- 6 files changed, 126 insertions(+), 78 deletions(-) diff --git a/config/config.inc.php b/config/config.inc.php index 05733baaf..0343660ef 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -232,6 +232,7 @@ $config['remotebuzzer']['usebuttons'] = false; $config['remotebuzzer']['userotary'] = false; $config['remotebuzzer']['enable_standalonegallery'] = false; +$config['remotebuzzer']['usegpio'] = true; $config['remotebuzzer']['rotaryclkgpio'] = 27; $config['remotebuzzer']['rotarydtgpio'] = 17; $config['remotebuzzer']['rotarybtngpio'] = 22; diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index f2a74bd9a..de38ec549 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -1357,6 +1357,12 @@ 'name' => 'remotebuzzer[userotary]', 'value' => $config['remotebuzzer']['userotary'], ], + 'remotebuzzer_usegpio' => [ + 'view' => 'advanced', + 'type' => 'checkbox', + 'name' => 'remotebuzzer[usegpio]', + 'value' => $config['remotebuzzer']['usegpio'], + ], 'remotebuzzer_picturebutton' => [ 'view' => 'advanced', 'type' => 'checkbox', diff --git a/resources/lang/en.json b/resources/lang/en.json index 57ed90c8a..b8e3da7fa 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -409,8 +409,9 @@ "manual:remotebuzzer:remotebuzzer_printbutton": "For PRINT connect the hardware button to GPIO26. Pull GPIO to ground for to trigger.", "manual:remotebuzzer:remotebuzzer_shutdownbutton": "For SHUTDOWN connect the hardware button to GPIO16. Pull GPIO to ground for to trigger. Hold 5 sec (default) to trigger.", "manual:remotebuzzer:remotebuzzer_shutdownholdtime": "Seconds to hold button until system shutdown will be initiated. Setting to Zero (0) means immediate shutdown without waiting time.", - "manual:remotebuzzer:remotebuzzer_usebuttons": "This feature enables hardware button support through Raspberry GPIO pins - see FAQ for details. IMPORTANT: For WLAN connected screens you must make sure to configure the IP address of the Photobooth web server in the section \"General\", for this feature to work properly.", - "manual:remotebuzzer:remotebuzzer_userotary": "Enable Rotary Encoder support for to navigate the screen. Needs a rotary encoder switch connected to the GPIOs - see FAQ for details. IMPORTANT: For WLAN connected screens you must make sure to configure the IP address of the Photobooth web server in the section \"General\", for this feature to work properly.", + "manual:remotebuzzer:remotebuzzer_usebuttons": "This feature enables hardware button support - see FAQ for details. Please activate GPIO support for remotebuzzer. IMPORTANT: For WLAN connected screens you must make sure to configure the IP address of the Photobooth web server in the section \"General\", for this feature to work properly.", + "manual:remotebuzzer:remotebuzzer_usegpio": "This feature enables hardware support through Raspberry GPIO pins - see FAQ for details. IMPORTANT: For WLAN connected screens you must make sure to configure the IP address of the Photobooth web server in the section \"General\", for this feature to work properly.", + "manual:remotebuzzer:remotebuzzer_userotary": "Enable Rotary Encoder support for to navigate the screen. Needs a rotary encoder switch connected to the GPIOs - see FAQ for details. Please activate GPIO support for remotebuzzer. IMPORTANT: For WLAN connected screens you must make sure to configure the IP address of the Photobooth web server in the section \"General\", for this feature to work properly.", "manual:reset:reset_button": "Will execute config reset. If you like to also reset images and / or the mail address database make sure you first activate those settings and save (!) the config, then perform the config reset itself.", "manual:reset:reset_remove_config": "If enabled, personal config gets removed on reset.", "manual:reset:reset_remove_images": "If enabled, all images gets removed on reset.", @@ -535,6 +536,7 @@ "remotebuzzer:remotebuzzer_shutdownbutton": "Shutdown Button", "remotebuzzer:remotebuzzer_shutdownholdtime": "Seconds to initiate shutdown", "remotebuzzer:remotebuzzer_usebuttons": "Enable Hardware Buttons", + "remotebuzzer:remotebuzzer_usegpio": "Use GPIO for remotebuzzer", "remotebuzzer:remotebuzzer_userotary": "Enable Rotary Encoder", "reset": "Reset", "reset:reset_button": "Execute config reset", diff --git a/src/js/core.js b/src/js/core.js index cf245abe9..bbd1aa246 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -1059,8 +1059,11 @@ const photoBooth = (function () { // Take Picture Button $('.takePic, .newpic').on('click', function (e) { e.preventDefault(); - - api.thrill('photo'); + if (config.remotebuzzer.usebuttons || config.remotebuzzer.userotary) { + remoteBuzzerClient.startPicture(); + } else { + api.thrill('photo'); + } $('.newpic').blur(); }); @@ -1068,7 +1071,12 @@ const photoBooth = (function () { $('.takeCollage, .newcollage').on('click', function (e) { e.preventDefault(); - api.thrill('collage'); + if (config.remotebuzzer.usebuttons || config.remotebuzzer.userotary) { + remoteBuzzerClient.startCollage(); + } else { + api.thrill('collage'); + } + $('.newcollage').blur(); }); @@ -1203,14 +1211,24 @@ const photoBooth = (function () { $('.triggerPic').on('click', function (e) { e.preventDefault(); - api.thrill('photo'); + if (config.remotebuzzer.usebuttons || config.remotebuzzer.userotary) { + remoteBuzzerClient.startPicture(); + } else { + api.thrill('photo'); + } + $('.newpic').blur(); }); $('.triggerCollage').on('click', function (e) { e.preventDefault(); - api.thrill('collage'); + if (config.remotebuzzer.usebuttons || config.remotebuzzer.userotary) { + remoteBuzzerClient.startCollage(); + } else { + api.thrill('collage'); + } + $('.newcollage').blur(); }); diff --git a/src/js/remotebuzzer_client.js b/src/js/remotebuzzer_client.js index 4a8642feb..51ec4a774 100644 --- a/src/js/remotebuzzer_client.js +++ b/src/js/remotebuzzer_client.js @@ -106,8 +106,26 @@ function initRemoteBuzzerFromDOM() { } }; + api.startPicture = function () { + if (this.enabled()) { + this.emitToServer('start-picture'); + } + }; + + api.startCollage = function () { + if (this.enabled()) { + this.emitToServer('start-collage'); + } + }; + api.emitToServer = function (cmd) { switch (cmd) { + case 'start-picture': + ioClient.emit('photobooth-socket', 'start-picture'); + break; + case 'start-collage': + ioClient.emit('photobooth-socket', 'start-collage'); + break; case 'in-progress': ioClient.emit('photobooth-socket', 'in-progress'); break; diff --git a/src/js/remotebuzzer_server.js b/src/js/remotebuzzer_server.js index ba411ef38..df8fc97a8 100644 --- a/src/js/remotebuzzer_server.js +++ b/src/js/remotebuzzer_server.js @@ -176,13 +176,15 @@ function gpioSanity(gpioconfig) { } } -gpioSanity(config.remotebuzzer.picturegpio); -gpioSanity(config.remotebuzzer.collagegpio); -gpioSanity(config.remotebuzzer.shutdowngpio); -gpioSanity(config.remotebuzzer.printgpio); -gpioSanity(config.remotebuzzer.rotaryclkgpio); -gpioSanity(config.remotebuzzer.rotarydtgpio); -gpioSanity(config.remotebuzzer.rotarybtngpio); +if (config.remotebuzzer.usegpio) { + gpioSanity(config.remotebuzzer.picturegpio); + gpioSanity(config.remotebuzzer.collagegpio); + gpioSanity(config.remotebuzzer.shutdowngpio); + gpioSanity(config.remotebuzzer.printgpio); + gpioSanity(config.remotebuzzer.rotaryclkgpio); + gpioSanity(config.remotebuzzer.rotarydtgpio); + gpioSanity(config.remotebuzzer.rotarybtngpio); +} /* BUTTON SEMAPHORE HELPER FUNCTION */ function buttonActiveCheck(gpio, value) { @@ -504,78 +506,79 @@ const watchRotaryBtn = function watchRotaryBtn(err, gpioValue) { /* INIT ONOFF LIBRARY AND LINK CALLBACK FUNCTIONS */ const Gpio = require('onoff').Gpio; - -/* ROTARY ENCODER MODE */ -if (config.remotebuzzer.userotary) { +if (config.remotebuzzer.usegpio) { /* ROTARY ENCODER MODE */ - log('ROTARY support active'); - const rotaryClk = new Gpio(config.remotebuzzer.rotaryclkgpio, 'in', 'both'); - const rotaryDt = new Gpio(config.remotebuzzer.rotarydtgpio, 'in', 'both'); - const rotaryBtn = new Gpio(config.remotebuzzer.rotarybtngpio, 'in', 'both', { - debounceTimeout: config.remotebuzzer.debounce - }); - - rotaryClkPin = 0; - rotaryDtPin = 0; - - rotaryClk.watch(watchRotaryClk); - rotaryDt.watch(watchRotaryDt); - rotaryBtn.watch(watchRotaryBtn); - - log( - 'Looking for Rotary Encoder connected to GPIOs ', - config.remotebuzzer.rotaryclkgpio, - '(CLK) ', - config.remotebuzzer.rotarydtgpio, - '(DT) ', - config.remotebuzzer.rotarybtngpio, - '(BTN)' - ); -} - -/* NORMAL BUTTON SUPPORT */ -if (config.remotebuzzer.usebuttons) { - log('BUTTON support active'); - if (config.remotebuzzer.picturebutton) { - const pictureButton = new Gpio(config.remotebuzzer.picturegpio, 'in', 'both', { + if (config.remotebuzzer.userotary) { + /* ROTARY ENCODER MODE */ + log('ROTARY support active'); + const rotaryClk = new Gpio(config.remotebuzzer.rotaryclkgpio, 'in', 'both'); + const rotaryDt = new Gpio(config.remotebuzzer.rotarydtgpio, 'in', 'both'); + const rotaryBtn = new Gpio(config.remotebuzzer.rotarybtngpio, 'in', 'both', { debounceTimeout: config.remotebuzzer.debounce }); - if (!config.remotebuzzer.collagebutton && config.collage.enabled) { - pictureButton.watch(watchPictureGPIOwithCollage); - log('config: collage enabled for picture button'); - } else { - pictureButton.watch(watchPictureGPIO); - } + rotaryClkPin = 0; + rotaryDtPin = 0; + + rotaryClk.watch(watchRotaryClk); + rotaryDt.watch(watchRotaryDt); + rotaryBtn.watch(watchRotaryBtn); + + log( + 'Looking for Rotary Encoder connected to GPIOs ', + config.remotebuzzer.rotaryclkgpio, + '(CLK) ', + config.remotebuzzer.rotarydtgpio, + '(DT) ', + config.remotebuzzer.rotarybtngpio, + '(BTN)' + ); + } + + /* NORMAL BUTTON SUPPORT */ + if (config.remotebuzzer.usebuttons) { + log('BUTTON support active'); + if (config.remotebuzzer.picturebutton) { + const pictureButton = new Gpio(config.remotebuzzer.picturegpio, 'in', 'both', { + debounceTimeout: config.remotebuzzer.debounce + }); + + if (!config.remotebuzzer.collagebutton && config.collage.enabled) { + pictureButton.watch(watchPictureGPIOwithCollage); + log('config: collage enabled for picture button'); + } else { + pictureButton.watch(watchPictureGPIO); + } - log('Looking for Picture Button on Raspberry GPIO', config.remotebuzzer.picturegpio); - } + log('Looking for Picture Button on Raspberry GPIO', config.remotebuzzer.picturegpio); + } - /* COLLAGE BUTTON */ - if (config.remotebuzzer.collagebutton && config.collage.enabled) { - const collageButton = new Gpio(config.remotebuzzer.collagegpio, 'in', 'both', { - debounceTimeout: config.remotebuzzer.debounce - }); - collageButton.watch(watchCollageGPIO); - log('Looking for Collage Button on Raspberry GPIO', config.remotebuzzer.collagegpio); - } + /* COLLAGE BUTTON */ + if (config.remotebuzzer.collagebutton && config.collage.enabled) { + const collageButton = new Gpio(config.remotebuzzer.collagegpio, 'in', 'both', { + debounceTimeout: config.remotebuzzer.debounce + }); + collageButton.watch(watchCollageGPIO); + log('Looking for Collage Button on Raspberry GPIO', config.remotebuzzer.collagegpio); + } - /* SHUTDOWN BUTTON */ - if (config.remotebuzzer.shutdownbutton) { - const shutdownButton = new Gpio(config.remotebuzzer.shutdowngpio, 'in', 'both', { - debounceTimeout: config.remotebuzzer.debounce - }); - shutdownButton.watch(watchShutdownGPIO); - log('Looking for Shutdown Button on Raspberry GPIO', config.remotebuzzer.shutdowngpio); - } + /* SHUTDOWN BUTTON */ + if (config.remotebuzzer.shutdownbutton) { + const shutdownButton = new Gpio(config.remotebuzzer.shutdowngpio, 'in', 'both', { + debounceTimeout: config.remotebuzzer.debounce + }); + shutdownButton.watch(watchShutdownGPIO); + log('Looking for Shutdown Button on Raspberry GPIO', config.remotebuzzer.shutdowngpio); + } - /* PRINT BUTTON */ - if (config.remotebuzzer.printbutton) { - const printButton = new Gpio(config.remotebuzzer.printgpio, 'in', 'both', { - debounceTimeout: config.remotebuzzer.debounce - }); - printButton.watch(watchPrintGPIO); - log('Looking for Print Button on Raspberry GPIO', config.remotebuzzer.printgpio); + /* PRINT BUTTON */ + if (config.remotebuzzer.printbutton) { + const printButton = new Gpio(config.remotebuzzer.printgpio, 'in', 'both', { + debounceTimeout: config.remotebuzzer.debounce + }); + printButton.watch(watchPrintGPIO); + log('Looking for Print Button on Raspberry GPIO', config.remotebuzzer.printgpio); + } } } log('Initialization completed'); From 47109f68b9d92a1eb8f23e1cd5eea606f78c5a12 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 16 Sep 2021 11:51:35 +0200 Subject: [PATCH 087/214] faq: adjust FAQ for HID device button support Change-Id: I0ed36f39487dae6dc4a91934f01bd334cb81242a --- faq/faq.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/faq/faq.md b/faq/faq.md index f95218c11..117ef35cf 100644 --- a/faq/faq.md +++ b/faq/faq.md @@ -112,8 +112,53 @@ Follow the steps mentioned here: [How to Fix NGINX 413 Request Entity Too Large
    -### Can I use Hardware Button on my Raspberry Pi, to take a Picture? -Yes, the **Hardware Button** feature enables to control Photobooth through hardware buttons connected to Raspberry GPIO pins . This works for directly connected screens and as well for WLAN connected screen (i.e. iPad). Configuration takes place in the admin settings - Hardware Button section. +### Can I use Hardware Button to take a Picture? +Yes, there's different ways! + +#### Key code using connected HID devices +An HID device connected to your hardware can trigger different actions on your device. The HID device must be connected to the device you're accessing Photobooth from! +For example use https://keycode.info to find out the key id of the button you like to use. + +Related configuration: +**PICTURE section**: +- Key code which triggers a picture: **define** + +**COLLAGE section**: +- Key code which triggers a collage: **define** + +**PRINT section**: +- Key code which triggers printing: **define** + +#### Remotebuzzer Hardware Button feature using connected HID devices (Linux only) +An HID device connected to your hardware can trigger different actions. The HID device must be connected to one device you're accessing Photobooth from. +Using the Remotebuzzer feature makes the button action taking effect at the same time on all devices accessing Photobooth! +For example use https://keycode.info to find out the key id of the button you like to use. + +- Related configuration: + **GENERAL section**: + - IP address of the Photobooth web server: **define** + + **PICTURE section**: + - Key code which triggers a picture: **define** + + **COLLAGE section**: + - Key code which triggers a collage: **define** + + **HARDWARE BUTTON section**: + - Enable Hardware Buttons: **on** + - Use GPIO for remotebuzzer: **off** + +Special Notes: +- **Important: For WLAN connected screens you must make sure to set the IP address of the Photobooth web server in the admin settings - section "General"**. The loopback IP (127.0.0.1) does not work, it has to be the exact IP address of the Photobooth web server, to which the remote display connects to. +- Switch Photobooth to DEV mode. (admin screen -> expert view -> general section) +- Reload the Photobooth homepage +- Check the browser developer console for error logs +- Check the server logs for errors (file `data/tmp/remotebuzzer_server.log`) +- GPIO connected Hardware Button and Rotary Encoder don't work! + +#### Remotebuzzer Hardware Button feature using GPIO connected hardware (Raspberry Pi only) +The **Hardware Button** feature enables to control Photobooth through hardware buttons connected to Raspberry GPIO pins. This works for directly connected screens and as well for WLAN connected screen (i.e. iPad). Configuration takes place in the admin settings - Hardware Button section. +Using the Remotebuzzer feature makes the button action taking effect at the same time on all devices accessing Photobooth! The Hardware Button functionality supports two separate modes of operation (select via admin panel): - **Buttons**: Distinct hardware buttons can be connected to distinct GPIOs. Each button will trigger a separate functionality (i.e. take photo). From c47b06138715e4feadbf5157c6c60c30ade6ab83 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 16 Sep 2021 11:59:43 +0200 Subject: [PATCH 088/214] FAQ: fix formatting on all places Change-Id: Iba1455ebf010011ffc75b3d56f120897b35bacc7 --- faq/faq.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/faq/faq.md b/faq/faq.md index 117ef35cf..b6d3a6854 100644 --- a/faq/faq.md +++ b/faq/faq.md @@ -62,6 +62,7 @@ Open `http://localhost/admin` in your Webbrowser and change the configuration fo ### How to change the look of my Photobooth? Photobooth can be easylie styled for your personal needs via admin panel, open [localhost/admin](http://localhost/admin) in your browser and take a look at the `User Interface` options. To use a private custom index you need to create the following files: + - `resources/css/custom_style.css` - Optional: `src/sass/custom_style.scss` (`yarn build` will create the `resources/css/custom_style.css` out of it) - `resources/css/custom_chromakeying.css` @@ -119,15 +120,15 @@ Yes, there's different ways! An HID device connected to your hardware can trigger different actions on your device. The HID device must be connected to the device you're accessing Photobooth from! For example use https://keycode.info to find out the key id of the button you like to use. -Related configuration: -**PICTURE section**: -- Key code which triggers a picture: **define** +- Related configuration: + **PICTURE section**: + - Key code which triggers a picture: **define** -**COLLAGE section**: -- Key code which triggers a collage: **define** + **COLLAGE section**: + - Key code which triggers a collage: **define** -**PRINT section**: -- Key code which triggers printing: **define** + **PRINT section**: + - Key code which triggers printing: **define** #### Remotebuzzer Hardware Button feature using connected HID devices (Linux only) An HID device connected to your hardware can trigger different actions. The HID device must be connected to one device you're accessing Photobooth from. @@ -148,7 +149,8 @@ For example use https://keycode.i - Enable Hardware Buttons: **on** - Use GPIO for remotebuzzer: **off** -Special Notes: +Special Notes: + - **Important: For WLAN connected screens you must make sure to set the IP address of the Photobooth web server in the admin settings - section "General"**. The loopback IP (127.0.0.1) does not work, it has to be the exact IP address of the Photobooth web server, to which the remote display connects to. - Switch Photobooth to DEV mode. (admin screen -> expert view -> general section) - Reload the Photobooth homepage @@ -161,6 +163,7 @@ The **Hardware Button** feature enables to control Photobooth through hardware b Using the Remotebuzzer feature makes the button action taking effect at the same time on all devices accessing Photobooth! The Hardware Button functionality supports two separate modes of operation (select via admin panel): + - **Buttons**: Distinct hardware buttons can be connected to distinct GPIOs. Each button will trigger a separate functionality (i.e. take photo). - **Rotary Encoder**: A rotary encoder connected to GPIOs will drive the input on the screen. This enables to use the rotary to scroll through the Photobooth UI buttons, and click to select actions. @@ -206,6 +209,7 @@ The server supports up to four connected hardware buttons for the following func - Long button press (default > 2 sec) will trigger a collage in Photobooth Note: + - If collage is configured with interruption, next button presses will trigger the next collage pictures. - If collage is disabled in the admin settings, long button press also triggers a single picture - If the collage button is activated (see next), the picture button will never trigger a collage, regardless @@ -216,6 +220,7 @@ Note: - Button press will trigger a collage in Photobooth. Note: + - If collage is configured with interruption, next button presses will trigger the next collage pictures. - If collage is disabled in the admin settings (Collage section), this button will do nothing. @@ -225,6 +230,7 @@ Note: - This button will initate a safe system shutdown and halt (`shutdown -h now`). Note: + - Hold the button for a defined time to initiate the shut down (defaults to 5 seconds). This can be adjusted in the admin settings. - The shutdown button will only trigger if there is currently no action in progress in Photobooth (picture, collage). @@ -268,9 +274,11 @@ GND --- GND ``` Known limitations: + - Delete Picture: in order to be able to access the Delete button through rotary control, please activate admin setting General -> "Delete images without confirm request" The following elements are currently not supported and not accessible through rotary control navigation + - Full Screen Mode button: Looks like modern browser only allow to change to full screen mode upon user gesture. It seems not possible to change to full-screen using Javascript. - Photoswipe download button: Not needed for Rotary Control. (well, if you can come up with a decent use-case, let us know). @@ -347,9 +355,11 @@ There's different ways depending on your needs and personal setup: #### Preview _"from device cam"_ If you access Photobooth on your Raspberry Pi you could use a Raspberry Pi Camera. Raspberry Pi Camera will be detected as "device cam". + - Admin panel config "Preview mode": `from device cam` **Note:** + - Preview `"from device cam"` will always use the camera of the device where Photobooth get opened in a Browser (e.g. on a tablet it will always show the tablet camera while on a smartphone it will always show the smartphone camera instead)! - Secure origin or exception required! - [Prefer Secure Origins For Powerful New Features](https://medium.com/@Carmichaelize/enabling-the-microphone-camera-in-chrome-for-local-unsecure-origins-9c90c3149339) @@ -359,16 +369,19 @@ If you access Photobooth on your Raspberry Pi you could use a Raspberry Pi Camer #### Preview _"from URL"_ If you like to have the same preview independent of the device you access Photobooth from: Make sure to have a stream available you can use (e.g. from your Webcam, Smartphone Camera or Raspberry Pi Camera) + - Admin panel config *"Preview mode"*: `from URL` - Admin panel config *"Preview-URL"* example (add needed IP address instead): `url(http://127.0.0.1:8081)` **Note** + - Do NOT enable *"Device cam takes picture"* in admin panel config! - Capture pictures via `raspistill` won't work if motion is installed! - Requires Photobooth v2.2.1 or later! #### Preview _"from gohoto2"_ A preview can also be done using the video mode of your DSLR (Linux only), but only works if you access Photobooth via [http://localhost](http://localhost) or [http://127.0.0.1](http://localhost): + - Liveview **must** be supported for your camera model, [check here](http://gphoto.org/proj/libgphoto2/support.php) - install all dependencies `sudo apt install ffmpeg v4l2loopback-dkms -y` - create a virtual webcam `sudo modprobe v4l2loopback exclusive_caps=1 card_label="GPhoto2 Webcam"` @@ -378,6 +391,7 @@ A preview can also be done using the video mode of your DSLR (Linux only), but o - Admin panel config *"Preview mode"*: `from gphoto2` **Note** + - Requires Photobooth v2.11.0 or later! - You need to access Photobooth directly via [http://localhost](http://localhost) or [http://127.0.0.1](http://localhost), you won't be able to see the preview on a different device (e.g. Tablet) - There's a delay of about 3 seconds until the preview starts, to avoid that disable the `Battery saving mode on gphoto2 live preview` option to generate a preview in background. **This results in a high battery usage and also a general slowdown.** @@ -495,6 +509,7 @@ First head over to the hotspot directory to run the installer: cd /var/www/html/vendor/rpihotspot ``` There are a couple of flags you need to change from the example command below: + - change `password` to your desired password, make it easy enough for guests to remember. - change `country code` from `CA` to your own localization. - keep or change the ip address `10.10.10.10`. Remember what you change it to. From ebaf7841f5aef51a30e6d18f2843cfb36fcda902 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 25 Sep 2021 21:53:51 +0200 Subject: [PATCH 089/214] remotebuzzer: own config to enable HID device and software button support - there might be differen use cases, this way we can catch them all Change-Id: Ic22d34e5ef25aab4c35ec5345993b2875c9baa06 --- config/config.inc.php | 2 ++ faq/faq.md | 53 +++++++++++++++++++++++++---------- lib/configsetup.inc.php | 12 ++++++++ resources/lang/en.json | 4 +++ src/js/core.js | 8 +++--- src/js/remotebuzzer_client.js | 7 ++++- 6 files changed, 66 insertions(+), 20 deletions(-) diff --git a/config/config.inc.php b/config/config.inc.php index 0343660ef..3a5f0d41f 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -233,6 +233,8 @@ $config['remotebuzzer']['userotary'] = false; $config['remotebuzzer']['enable_standalonegallery'] = false; $config['remotebuzzer']['usegpio'] = true; +$config['remotebuzzer']['usehid'] = false; +$config['remotebuzzer']['usesoftbtn'] = false; $config['remotebuzzer']['rotaryclkgpio'] = 27; $config['remotebuzzer']['rotarydtgpio'] = 17; $config['remotebuzzer']['rotarybtngpio'] = 22; diff --git a/faq/faq.md b/faq/faq.md index b6d3a6854..f32788cca 100644 --- a/faq/faq.md +++ b/faq/faq.md @@ -130,6 +130,27 @@ For example use https://keycode.i **PRINT section**: - Key code which triggers printing: **define** +#### Remotebuzzer Software Button feature (Linux only) +Software buttons can use the Remotebuzzer feature to make the button action taking effect at the same time on all devices accessing Photobooth! + +- Related configuration: + **GENERAL section**: + - IP address of the Photobooth web server: **define** + + **HARDWARE BUTTON section**: + - Enable Software Buttons: **on** + - __Optional:__ Use GPIO for remotebuzzer: **off** + +Special Notes: + +- **Important: For WLAN connected screens you must make sure to set the IP address of the Photobooth web server in the admin settings - section "General"**. The loopback IP (127.0.0.1) does not work, it has to be the exact IP address of the Photobooth web server, to which the remote display connects to. +- Can be combined with HID-Device buttons, GPIO connected Hardware Button and Rotary Encoder! +- Having trouble? + - Switch Photobooth to DEV mode. (admin screen -> expert view -> general section) + - Reload the Photobooth homepage + - Check the browser developer console for error logs + - Check the server logs for errors at the Debug panel: [http://localhost/admin/debugpanel.php](http://localhost/admin/debugpanel.php) + #### Remotebuzzer Hardware Button feature using connected HID devices (Linux only) An HID device connected to your hardware can trigger different actions. The HID device must be connected to one device you're accessing Photobooth from. Using the Remotebuzzer feature makes the button action taking effect at the same time on all devices accessing Photobooth! @@ -146,17 +167,18 @@ For example use https://keycode.i - Key code which triggers a collage: **define** **HARDWARE BUTTON section**: - - Enable Hardware Buttons: **on** - - Use GPIO for remotebuzzer: **off** + - Enable HID-Device Buttons: **on** + - __Optional:__ Use GPIO for remotebuzzer: **off** Special Notes: - **Important: For WLAN connected screens you must make sure to set the IP address of the Photobooth web server in the admin settings - section "General"**. The loopback IP (127.0.0.1) does not work, it has to be the exact IP address of the Photobooth web server, to which the remote display connects to. -- Switch Photobooth to DEV mode. (admin screen -> expert view -> general section) -- Reload the Photobooth homepage -- Check the browser developer console for error logs -- Check the server logs for errors (file `data/tmp/remotebuzzer_server.log`) -- GPIO connected Hardware Button and Rotary Encoder don't work! +- Can be combined with GPIO connected Hardware Button and Rotary Encoder! +- Having trouble? + - Switch Photobooth to DEV mode. (admin screen -> expert view -> general section) + - Reload the Photobooth homepage + - Check the browser developer console for error logs + - Check the server logs for errors at the Debug panel: [http://localhost/admin/debugpanel.php](http://localhost/admin/debugpanel.php) #### Remotebuzzer Hardware Button feature using GPIO connected hardware (Raspberry Pi only) The **Hardware Button** feature enables to control Photobooth through hardware buttons connected to Raspberry GPIO pins. This works for directly connected screens and as well for WLAN connected screen (i.e. iPad). Configuration takes place in the admin settings - Hardware Button section. @@ -174,19 +196,20 @@ Photobooth will watch GPIOs for a PIN_DOWN event - so the hardware button needs Troubleshooting / Debugging: - **Important: For WLAN connected screens you must make sure to set the IP address of the Photobooth web server in the admin settings - section "General"**. The loopback IP (127.0.0.1) does not work, it has to be the exact IP address of the Photobooth web server, to which the remote display connects to. -- Switch Photobooth to DEV mode. (admin screen -> expert view -> general section) -- Reload the Photobooth homepage -- Check the browser developer console for error logs -- Check the server logs for errors (file `data/tmp/remotebuzzer_server.log`). -- If there is no errors logged but hardware buttons still do not trigger - - GPIO interrupts might be disabled. Check file `/boot/config.txt` and remove / disable the following overlay `dtoverlay=gpio-no-irq` to enable interrupts for GPIOs. - - GPIOs may not be configured as PULLUP. The configuration for this is done in fie `/boot/config.txt` by adding the GPIO numbers in use as follows - you **must reboot** the Raspberry Pi in order to activate changes in this setting. +- Having trouble? + - Switch Photobooth to DEV mode. (admin screen -> expert view -> general section) + - Reload the Photobooth homepage + - Check the browser developer console for error logs + - Check the server logs for errors (file `data/tmp/remotebuzzer_server.log`) + - If there is no errors logged but hardware buttons still do not trigger: + - GPIO interrupts might be disabled. Check file `/boot/config.txt` and remove / disable the following overlay `dtoverlay=gpio-no-irq` to enable interrupts for GPIOs. + - GPIOs may not be configured as PULLUP. The configuration for this is done in fie `/boot/config.txt` by adding the GPIO numbers in use as follows - you **must reboot** the Raspberry Pi in order to activate changes in this setting. ``` gpio=16,17,20,21,22,26,27=pu ``` -- For the Shutdown button to work, `www-data` needs to have the necessary sudo permissions. This is done by the `install-raspian.sh` script or can be manually added as + - For the Shutdown button to work, `www-data` needs to have the necessary sudo permissions. This is done by the `install-raspian.sh` script or can be manually added as ``` cat >> /etc/sudoers.d/020_www-data-shutdown << EOF diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index de38ec549..ceb1a3080 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -1357,6 +1357,18 @@ 'name' => 'remotebuzzer[userotary]', 'value' => $config['remotebuzzer']['userotary'], ], + 'remotebuzzer_usehid' => [ + 'view' => 'advanced', + 'type' => 'checkbox', + 'name' => 'remotebuzzer[usehid]', + 'value' => $config['remotebuzzer']['usehid'], + ], + 'remotebuzzer_usesoftbtn' => [ + 'view' => 'advanced', + 'type' => 'checkbox', + 'name' => 'remotebuzzer[usesoftbtn]', + 'value' => $config['remotebuzzer']['usesoftbtn'], + ], 'remotebuzzer_usegpio' => [ 'view' => 'advanced', 'type' => 'checkbox', diff --git a/resources/lang/en.json b/resources/lang/en.json index b8e3da7fa..3df75d592 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -411,7 +411,9 @@ "manual:remotebuzzer:remotebuzzer_shutdownholdtime": "Seconds to hold button until system shutdown will be initiated. Setting to Zero (0) means immediate shutdown without waiting time.", "manual:remotebuzzer:remotebuzzer_usebuttons": "This feature enables hardware button support - see FAQ for details. Please activate GPIO support for remotebuzzer. IMPORTANT: For WLAN connected screens you must make sure to configure the IP address of the Photobooth web server in the section \"General\", for this feature to work properly.", "manual:remotebuzzer:remotebuzzer_usegpio": "This feature enables hardware support through Raspberry GPIO pins - see FAQ for details. IMPORTANT: For WLAN connected screens you must make sure to configure the IP address of the Photobooth web server in the section \"General\", for this feature to work properly.", + "manual:remotebuzzer:remotebuzzer_usehid": "This feature enables HID Device support - see FAQ for details. Inside the picture section \"Key code which triggers a photo\" and inside collage section \"Key code which triggers a collage\" must be defined! IMPORTANT: For WLAN connected screens you must make sure to configure the IP address of the Photobooth web server in the section \"General\", for this feature to work properly.", "manual:remotebuzzer:remotebuzzer_userotary": "Enable Rotary Encoder support for to navigate the screen. Needs a rotary encoder switch connected to the GPIOs - see FAQ for details. Please activate GPIO support for remotebuzzer. IMPORTANT: For WLAN connected screens you must make sure to configure the IP address of the Photobooth web server in the section \"General\", for this feature to work properly.", + "manual:remotebuzzer:remotebuzzer_usesoftbtn": "This feature enables Software Button support - see FAQ for details. IMPORTANT: For WLAN connected screens you must make sure to configure the IP address of the Photobooth web server in the section \"General\", for this feature to work properly.", "manual:reset:reset_button": "Will execute config reset. If you like to also reset images and / or the mail address database make sure you first activate those settings and save (!) the config, then perform the config reset itself.", "manual:reset:reset_remove_config": "If enabled, personal config gets removed on reset.", "manual:reset:reset_remove_images": "If enabled, all images gets removed on reset.", @@ -537,7 +539,9 @@ "remotebuzzer:remotebuzzer_shutdownholdtime": "Seconds to initiate shutdown", "remotebuzzer:remotebuzzer_usebuttons": "Enable Hardware Buttons", "remotebuzzer:remotebuzzer_usegpio": "Use GPIO for remotebuzzer", + "remotebuzzer:remotebuzzer_usehid": "Enable HID-Device Buttons", "remotebuzzer:remotebuzzer_userotary": "Enable Rotary Encoder", + "remotebuzzer:remotebuzzer_usesoftbtn": "Enable Software Buttons", "reset": "Reset", "reset:reset_button": "Execute config reset", "reset:reset_remove_config": "Delete personal configuration (my.config.inc.php)", diff --git a/src/js/core.js b/src/js/core.js index bbd1aa246..0b7a59e03 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -1059,7 +1059,7 @@ const photoBooth = (function () { // Take Picture Button $('.takePic, .newpic').on('click', function (e) { e.preventDefault(); - if (config.remotebuzzer.usebuttons || config.remotebuzzer.userotary) { + if (config.remotebuzzer.usesoftbtn) { remoteBuzzerClient.startPicture(); } else { api.thrill('photo'); @@ -1071,7 +1071,7 @@ const photoBooth = (function () { $('.takeCollage, .newcollage').on('click', function (e) { e.preventDefault(); - if (config.remotebuzzer.usebuttons || config.remotebuzzer.userotary) { + if (config.remotebuzzer.usesoftbtn) { remoteBuzzerClient.startCollage(); } else { api.thrill('collage'); @@ -1211,7 +1211,7 @@ const photoBooth = (function () { $('.triggerPic').on('click', function (e) { e.preventDefault(); - if (config.remotebuzzer.usebuttons || config.remotebuzzer.userotary) { + if (config.remotebuzzer.usehid) { remoteBuzzerClient.startPicture(); } else { api.thrill('photo'); @@ -1223,7 +1223,7 @@ const photoBooth = (function () { $('.triggerCollage').on('click', function (e) { e.preventDefault(); - if (config.remotebuzzer.usebuttons || config.remotebuzzer.userotary) { + if (config.remotebuzzer.usehid) { remoteBuzzerClient.startCollage(); } else { api.thrill('collage'); diff --git a/src/js/remotebuzzer_client.js b/src/js/remotebuzzer_client.js index 51ec4a774..b58594311 100644 --- a/src/js/remotebuzzer_client.js +++ b/src/js/remotebuzzer_client.js @@ -21,7 +21,12 @@ function initRemoteBuzzerFromDOM() { const api = {}; api.enabled = function () { - return config.remotebuzzer.usebuttons || config.remotebuzzer.userotary; + return ( + config.remotebuzzer.usebuttons || + config.remotebuzzer.userotary || + config.remotebuzzer.usehid || + config.remotebuzzer.usesoftbtn + ); }; api.init = function () { From c993241889ca2b2b4d24e4a56727a00590b35306 Mon Sep 17 00:00:00 2001 From: F4bsi <27418829+F4bsi@users.noreply.github.com> Date: Sun, 26 Sep 2021 01:04:25 +0200 Subject: [PATCH 090/214] Fix Typo in admin.php When using a custom style and not creating '../resources/css/custom_chromakeying.css' the code tries to copy the default file, which results in an error because the path has duplicate .css and the file cannot be found:
    Warning: copy(../resources/css/modern_chromakeying.css.css): failed to open stream: No such file or directory in /var/www/html/api/admin.php on line 117
    "success" This results in the admin ui staying in the "saving" state indefinitely. Also it still returns "success" which might need to be changed. --- api/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/admin.php b/api/admin.php index bb658ffe4..a49391097 100644 --- a/api/admin.php +++ b/api/admin.php @@ -114,7 +114,7 @@ copy('../resources/css/modern_style.css', '../resources/css/custom_style.css'); } if (!file_exists('../resources/css/custom_chromakeying.css')) { - copy('../resources/css/modern_chromakeying.css.css', '../resources/css/custom_chromakeying.css'); + copy('../resources/css/modern_chromakeying.css', '../resources/css/custom_chromakeying.css'); } if (!file_exists('../resources/css/custom_live_chromakeying.css')) { copy('../resources/css/modern_live_chromakeying.css', '../resources/css/custom_live_chromakeying.css'); From 702224bb6523490f84b340e884111ad99d24a28e Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sun, 26 Sep 2021 11:10:35 +0200 Subject: [PATCH 091/214] remotebuzzer: fix HID and Software button support Change-Id: Ieb55eae20e3b926d570dcc61e7dfc327fa62a37f --- lib/services_start.php | 2 +- src/js/remotebuzzer_client.js | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/services_start.php b/lib/services_start.php index bc170faf1..94450112a 100644 --- a/lib/services_start.php +++ b/lib/services_start.php @@ -15,7 +15,7 @@ function processIsRunning($pName, $pidFile) { return count($output) - 1 ? true : false; // true if process is active } -if ($config['remotebuzzer']['usebuttons'] || $config['remotebuzzer']['userotary']) { +if ($config['remotebuzzer']['usebuttons'] || $config['remotebuzzer']['userotary'] || $config['remotebuzzer']['usehid'] || $config['remotebuzzer']['usesoftbtn']) { $connection = @fsockopen('127.0.0.1', $config['remotebuzzer']['port']); if (!is_resource($connection)) { diff --git a/src/js/remotebuzzer_client.js b/src/js/remotebuzzer_client.js index b58594311..077c70674 100644 --- a/src/js/remotebuzzer_client.js +++ b/src/js/remotebuzzer_client.js @@ -9,7 +9,12 @@ let buttonController; function initRemoteBuzzerFromDOM() { photoboothTools.console.logDev( 'Remote Buzzer client:', - config.remotebuzzer.usebuttons || config.remotebuzzer.userotary ? 'enabled' : 'disabled' + config.remotebuzzer.usebuttons || + config.remotebuzzer.userotary || + config.remotebuzzer.usehid || + config.remotebuzzer.usesoftbtn + ? 'enabled' + : 'disabled' ); /* @@ -161,7 +166,7 @@ function initRemoteBuzzerFromDOM() { api.enabled = function () { return ( - config.remotebuzzer.usebuttons && + (config.remotebuzzer.usebuttons || config.remotebuzzer.usehid || config.remotebuzzer.usesoftbtn) && typeof onStandaloneGalleryView === 'undefined' && typeof onLiveChromaKeyingView === 'undefined' ); From 909a0c0fdf8526aaf4a10cd9687d2e74f31b3eea Mon Sep 17 00:00:00 2001 From: Malte Hellmeier Date: Sun, 19 Sep 2021 21:34:44 +0200 Subject: [PATCH 092/214] Add close button to QR-Code modal --- src/js/core.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/js/core.js b/src/js/core.js index 0b7a59e03..06165cded 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -692,15 +692,16 @@ const photoBooth = (function () { // Add QR Code Image const qrCodeModal = $('#qrCode'); photoboothTools.modal.empty(qrCodeModal); + const body = qrCodeModal.find('.modal__body'); + $('