From c522954b44b23b677915c00f0358e7019b08564b Mon Sep 17 00:00:00 2001 From: haakel Date: Sun, 23 Mar 2025 00:11:43 +0330 Subject: [PATCH] Version 2(add Google_Service_Drive ) --- .gitignore | 2 +- assets/css/style.css | 287 +++-- assets/js/audio-diary.js | 714 ++++++------ audio-diary.php | 1 + classes/class_admin_page.php | 395 ++++--- composer.json | 5 + composer.lock | 1281 ++++++++++++++++++++++ modules/audio-diary-admin-list-page.php | 28 +- modules/setting-admin-page.php | 224 ++++ vendor/autoload.php | 25 + vendor/composer/ClassLoader.php | 579 ++++++++++ vendor/composer/InstalledVersions.php | 378 +++++++ vendor/composer/LICENSE | 21 + vendor/composer/autoload_classmap.php | 30 + vendor/composer/autoload_files.php | 15 + vendor/composer/autoload_namespaces.php | 9 + vendor/composer/autoload_psr4.php | 23 + vendor/composer/autoload_real.php | 50 + vendor/composer/autoload_static.php | 143 +++ vendor/composer/installed.json | 1322 +++++++++++++++++++++++ vendor/composer/installed.php | 209 ++++ vendor/composer/platform_check.php | 26 + 22 files changed, 5208 insertions(+), 559 deletions(-) create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 modules/setting-admin-page.php create mode 100644 vendor/autoload.php create mode 100644 vendor/composer/ClassLoader.php create mode 100644 vendor/composer/InstalledVersions.php create mode 100644 vendor/composer/LICENSE create mode 100644 vendor/composer/autoload_classmap.php create mode 100644 vendor/composer/autoload_files.php create mode 100644 vendor/composer/autoload_namespaces.php create mode 100644 vendor/composer/autoload_psr4.php create mode 100644 vendor/composer/autoload_real.php create mode 100644 vendor/composer/autoload_static.php create mode 100644 vendor/composer/installed.json create mode 100644 vendor/composer/installed.php create mode 100644 vendor/composer/platform_check.php diff --git a/.gitignore b/.gitignore index 51e7ab2..ca0225d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /node_modules - +config/service-account.json package-lock.json \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css index a1d90d1..07ac270 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1,155 +1,270 @@ .audio-diary-admin-page { - max-width: 600px; - margin: 0 auto; - text-align: center; + max-width: 600px; + margin: 0 auto; + text-align: center; } .audio-diary-admin-page body { - background-color: #000; - color: #fff; - font-family: Arial, sans-serif; + background-color: #000; + color: #fff; + font-family: Arial, sans-serif; } .audio-diary-admin-page #recording-button { - background-color: red; - color: white; - border: none; - padding: 20px; - font-size: 20px; - border-radius: 50%; - cursor: pointer; - margin-top: 20px; - width: 100px; - height: 100px; - background-image: url('../img/microphone.png'); /* آدرس تصویر میکروفون */ - background-repeat: no-repeat; - background-position: center; - background-size: 50%; - display: block; - margin: 20px auto; /* برای قرارگیری در وسط صفحه */ + background-color: red; + color: white; + border: none; + padding: 20px; + font-size: 20px; + border-radius: 50%; + cursor: pointer; + margin-top: 20px; + width: 100px; + height: 100px; + background-image: url("../img/microphone.png"); /* آدرس تصویر میکروفون */ + background-repeat: no-repeat; + background-position: center; + background-size: 50%; + display: block; + margin: 20px auto; /* برای قرارگیری در وسط صفحه */ } .audio-diary-admin-page #visualizer { - display: none; - margin-top: 20px; + display: none; + margin-top: 20px; } .audio-diary-admin-page audio { - display: none; - margin: 20px auto; - width: 300px; + display: none; + margin: 20px auto; + width: 300px; } .audio-diary-admin-page audio.show { - display: block; + display: block; } .audio-diary-admin-page canvas { - display: block; - margin: 20px auto; - border: 2px solid #c5c3c3; /* مثال: خط قرمز دور canvas */ - border-radius: 10px; /* مثال: گوشه‌های گرد */ - width: 100%; /* عرض 100% از والد */ - max-width: 600px; /* حداکثر عرض 600px */ - height: 100px; /* ارتفاع 100px */ - background-color: rgba(255, 255, 255, 0.1); /* مثال: زمینه نیمه شفاف سفید */ - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* سایه برای دادن عمق */ + display: block; + margin: 20px auto; + border: 2px solid #c5c3c3; /* مثال: خط قرمز دور canvas */ + border-radius: 10px; /* مثال: گوشه‌های گرد */ + width: 100%; /* عرض 100% از والد */ + max-width: 600px; /* حداکثر عرض 600px */ + height: 100px; /* ارتفاع 100px */ + background-color: rgba(255, 255, 255, 0.1); /* مثال: زمینه نیمه شفاف سفید */ + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* سایه برای دادن عمق */ } .audio-diary-admin-list-page #visualizer { - background-color: #f9f9f9; /* پس‌زمینه ملایم */ - border-radius: 8px; - border: 1px solid #ccc; + background-color: #f9f9f9; /* پس‌زمینه ملایم */ + border-radius: 8px; + border: 1px solid #ccc; } /* تنظیمات کلی صفحه مدیریت */ .audio-diary-admin-list-page { - max-width: 800px; - margin: 0 auto; - padding: 20px; - background-color: #f4f4f9; - border-radius: 10px; - box-shadow: 0 0 20px rgba(0, 0, 0, 0.1); - font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; - color: #333; + max-width: 800px; + margin: 0 auto; + padding: 20px; + background-color: #f4f4f9; + border-radius: 10px; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.1); + font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; + color: #333; } .audio-diary-admin-list-page h1 { - color: #333; - font-size: 24px; - margin-bottom: 20px; + color: #333; + font-size: 24px; + margin-bottom: 20px; } .audio-diary-admin-list-page button { - background-color: #0073aa; - color: white; - border: none; - padding: 10px 20px; - font-size: 14px; - border-radius: 5px; - cursor: pointer; - transition: background-color 0.3s ease; + background-color: #0073aa; + color: white; + border: none; + padding: 10px 20px; + font-size: 14px; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; } .audio-diary-admin-list-page button:hover { - background-color: #005177; + background-color: #005177; } .audio-diary-admin-list-page table { - width: 100%; - border-collapse: collapse; - margin-top: 20px; + width: 100%; + border-collapse: collapse; + margin-top: 20px; } .audio-diary-admin-list-page th, .audio-diary-admin-list-page td { - border: 1px solid #ddd; - padding: 10px; - text-align: center; + border: 1px solid #ddd; + padding: 10px; + text-align: center; } .audio-diary-admin-list-page th { - background-color: #0073aa; - color: white; - font-weight: bold; + background-color: #0073aa; + color: white; + font-weight: bold; } .audio-diary-admin-list-page tr:nth-child(even) { - background-color: #f9f9f9; + background-color: #f9f9f9; } -.audio-diary-admin-li st-page tr:hover { - background-color: #f1f1f1; +.audio-diary-admin-li st-page tr:hover { + background-color: #f1f1f1; } .audio-diary-admin-list-page td audio { - display: block; - margin: 0 auto; + display: block; + margin: 0 auto; } /* استایل‌های اضافی برای ورودی‌های چک‌باکس و دکمه حذف */ .audio-diary-admin-list-page .select-audio { - cursor: pointer; + cursor: pointer; } .audio-diary-admin-list-page .delete-audio { - background-color: #dc3545; - color: white; - border: none; - padding: 5px 10px; - border-radius: 5px; - cursor: pointer; - transition: background-color 0.3s ease; + background-color: #dc3545; + color: white; + border: none; + padding: 5px 10px; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; } .audio-diary-admin-list-page .delete-audio:hover { - background-color: #c82333; + background-color: #c82333; } /* استایل‌های برای فوتر و هدر جدول */ .audio-diary-admin-list-page thead { - border-bottom: 2px solid #0073aa; + border-bottom: 2px solid #0073aa; } .audio-diary-admin-list-page tfoot { - border-top: 2px solid #0073aa; - background-color: #f2f2f2; + border-top: 2px solid #0073aa; + background-color: #f2f2f2; +} +.audio-diary-admin-list-page { + max-width: 900px; + margin: 20px auto; + padding: 20px; + background-color: #fff; + border-radius: 12px; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); + font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; + color: #333; +} + +.audio-diary-admin-list-page h1 { + font-size: 26px; + margin-bottom: 20px; + color: #2c3e50; +} + +.action-buttons { + display: flex; + gap: 10px; + margin-bottom: 20px; +} + +.btn { + padding: 10px 20px; + font-size: 14px; + border: none; + border-radius: 6px; + cursor: pointer; + transition: all 0.3s ease; +} + +.btn-primary { + background-color: #0073aa; + color: white; +} +.btn-primary:hover { + background-color: #005177; +} +.btn-danger { + background-color: #e74c3c; + color: white; +} +.btn-danger:hover { + background-color: #c0392b; +} +.btn-secondary { + background-color: #7f8c8d; + color: white; +} +.btn-secondary:hover { + background-color: #6c757d; +} +.btn-small { + padding: 6px 12px; + font-size: 12px; +} + +.btn-upload { + background-color: #27ae60; + color: white; +} +.btn-upload:hover { + background-color: #219653; +} +.btn-upload.uploaded { + background-color: #95a5a6; + cursor: not-allowed; +} + +.selected-count { + font-size: 14px; + color: #7f8c8d; + margin-bottom: 15px; +} + +table { + width: 100%; + border-collapse: collapse; + background-color: #fff; +} + +th, +td { + border: 1px solid #e0e0e0; + padding: 12px; + text-align: center; +} + +th { + background-color: #34495e; + color: white; + font-weight: 600; +} + +tr:nth-child(even) { + background-color: #f9f9f9; +} +tr:hover { + background-color: #f1f1f1; +} + +.action-cell { + display: flex; + gap: 8px; + justify-content: center; +} + +audio { + width: 200px; +} + +.select-audio { + cursor: pointer; } diff --git a/assets/js/audio-diary.js b/assets/js/audio-diary.js index fe63ade..6a9f646 100644 --- a/assets/js/audio-diary.js +++ b/assets/js/audio-diary.js @@ -1,353 +1,427 @@ -jQuery(document).ready(function($) { - let mediaRecorder; - let audioChunks = []; - let isRecording = false; - let audioContext, analyser, dataArray, bufferLength, source; +jQuery(document).ready(function ($) { + let mediaRecorder; + let audioChunks = []; + let isRecording = false; + let audioContext, analyser, dataArray, bufferLength, source; + let isVisualizing = false; - function visualize(stream) { - audioContext = new (window.AudioContext || window.webkitAudioContext)(); - analyser = audioContext.createAnalyser(); - source = audioContext.createMediaStreamSource(stream); - source.connect(analyser); - analyser.fftSize = 2048; - bufferLength = analyser.frequencyBinCount; - dataArray = new Uint8Array(bufferLength); + function visualize(stream) { + audioContext = new (window.AudioContext || window.webkitAudioContext)(); + analyser = audioContext.createAnalyser(); + source = audioContext.createMediaStreamSource(stream); + source.connect(analyser); + analyser.fftSize = 2048; + bufferLength = analyser.frequencyBinCount; + dataArray = new Uint8Array(bufferLength); - const canvas = document.getElementById('visualizer'); - const canvasCtx = canvas.getContext('2d'); + const canvas = document.getElementById("visualizer"); + const canvasCtx = canvas.getContext("2d"); - function draw() { - requestAnimationFrame(draw); - analyser.getByteTimeDomainData(dataArray); + function draw() { + if (!isVisualizing) return; + requestAnimationFrame(draw); + analyser.getByteTimeDomainData(dataArray); - canvasCtx.clearRect(0, 0, canvas.width, canvas.height); + canvasCtx.clearRect(0, 0, canvas.width, canvas.height); - const centerY = canvas.height / 2; - canvasCtx.beginPath(); - canvasCtx.moveTo(0, centerY); - canvasCtx.lineTo(canvas.width, centerY); - canvasCtx.strokeStyle = 'rgba(0, 0, 0, 0.2)'; - canvasCtx.lineWidth = 1; - canvasCtx.stroke(); + const centerY = canvas.height / 2; + canvasCtx.beginPath(); + canvasCtx.moveTo(0, centerY); + canvasCtx.lineTo(canvas.width, centerY); + canvasCtx.strokeStyle = "rgba(0, 0, 0, 0.2)"; + canvasCtx.lineWidth = 1; + canvasCtx.stroke(); - canvasCtx.lineWidth = 2; - canvasCtx.strokeStyle = 'rgb(0, 0, 0)'; + canvasCtx.lineWidth = 2; + canvasCtx.strokeStyle = "rgb(0, 0, 0)"; - canvasCtx.beginPath(); - let sliceWidth = canvas.width * 1.0 / bufferLength; - let x = 0; + canvasCtx.beginPath(); + let sliceWidth = (canvas.width * 1.0) / bufferLength; + let x = 0; - for (let i = 0; i < bufferLength; i++) { - let v = dataArray[i] / 128.0; - let y = v * canvas.height / 2; + for (let i = 0; i < bufferLength; i++) { + let v = dataArray[i] / 128.0; + let y = (v * canvas.height) / 2; - if (i === 0) { - canvasCtx.moveTo(x, y); - } else { - canvasCtx.lineTo(x, y); - } - - x += sliceWidth; - } - - canvasCtx.lineTo(canvas.width, canvas.height / 2); - canvasCtx.stroke(); + if (i === 0) { + canvasCtx.moveTo(x, y); + } else { + canvasCtx.lineTo(x, y); } - draw(); + x += sliceWidth; + } + + canvasCtx.lineTo(canvas.width, canvas.height / 2); + canvasCtx.stroke(); } - - $('#download-zip').on('click', function() { - var selectedFiles = []; - $('.select-audio:checked').each(function() { - selectedFiles.push($(this).val()); - }); + isVisualizing = true; + draw(); + } - if (selectedFiles.length > 0) { - var form = document.createElement('form'); - form.method = 'POST'; - form.action = ''; + function showToast(message, type) { + $.toast({ + text: message, + heading: "Note", + icon: type, + showHideTransition: "fade", + allowToastClose: true, + hideAfter: 3000, + stack: 3, + position: "bottom-center", + textAlign: "left", + loader: true, + loaderBg: type === "success" ? "#9EC600" : "#FF0000", + }); + } - selectedFiles.forEach(function(file) { - var input = document.createElement('input'); - input.type = 'hidden'; - input.name = 'selected_files[]'; - input.value = file; - form.appendChild(input); - }); + $(".download-single").on("click", function () { + var $button = $(this); + var fileUrl = $button.data("url"); + var fileName = $button.data("name"); - document.body.appendChild(form); - form.submit(); - } else { - $.toast({ - text: "Please select at least one audio file to download.", - heading: 'Note', - icon: 'error', - showHideTransition: 'fade', - allowToastClose: true, - hideAfter: 3000, - stack: 3, - position: 'bottom-center', - textAlign: 'left', - loader: true, - loaderBg: '#FF0000', - }); - } + var downloadLink = document.createElement("a"); + downloadLink.href = fileUrl; + downloadLink.download = fileName; + document.body.appendChild(downloadLink); + downloadLink.click(); + document.body.removeChild(downloadLink); + }); + + $("#download-zip").on("click", function () { + var selectedFiles = []; + $(".select-audio:checked").each(function () { + selectedFiles.push($(this).val()); }); + if (selectedFiles.length > 0) { + $.ajax({ + url: ajaxurl, + type: "POST", + data: { + action: "download_zip", + files: selectedFiles, + }, + success: function (response) { + if (response.success) { + showToast("Zip file created successfully", "success"); + var downloadLink = document.createElement("a"); + downloadLink.href = response.data.zip_url; + downloadLink.download = response.data.zip_url.split("/").pop(); + document.body.appendChild(downloadLink); + downloadLink.click(); + document.body.removeChild(downloadLink); + $(".select-audio").prop("checked", false); + } else { + showToast("Failed to create zip file: " + response.data, "error"); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + showToast("AJAX Error: " + textStatus + ": " + errorThrown, "error"); + }, + }); + } else { + showToast("Please select at least one audio file to download.", "error"); + } + }); + $("#recording-button").on("click", function () { + if (!isRecording) { + navigator.mediaDevices + .getUserMedia({ audio: true }) + .then((stream) => { + mediaRecorder = new MediaRecorder(stream); + audioChunks = []; + mediaRecorder.start(); + visualize(stream); - $('#recording-button').on('click', function() { - if (!isRecording) { - navigator.mediaDevices.getUserMedia({ audio: true }) - .then(stream => { - mediaRecorder = new MediaRecorder(stream); - mediaRecorder.start(); - visualize(stream); - - mediaRecorder.ondataavailable = function(event) { - audioChunks.push(event.data); - }; + mediaRecorder.ondataavailable = function (event) { + audioChunks.push(event.data); + }; - mediaRecorder.onstop = function() { - const audioBlob = new Blob(audioChunks, { type: 'audio/wav' }); - audioChunks = []; - const audioUrl = URL.createObjectURL(audioBlob); - $('#audio-player').attr('src', audioUrl).addClass('show'); + mediaRecorder.onstop = function () { + stream.getTracks().forEach((track) => track.stop()); + const audioBlob = new Blob(audioChunks, { type: "audio/wav" }); + audioChunks = []; + const audioUrl = URL.createObjectURL(audioBlob); + $("#audio-player").attr("src", audioUrl).addClass("show"); - let formData = new FormData(); - formData.append('audio_data', audioBlob, 'audio.wav'); - formData.append('action', 'save_audio'); + let formData = new FormData(); + formData.append("audio_data", audioBlob, "audio.wav"); + formData.append("action", "save_audio"); - $.ajax({ - url: ajaxurl, - type: 'POST', - data: formData, - processData: false, - contentType: false, - success: function(response) { - if (response.success) { - $.toast({ - text: "Audio saved successfully", - heading: 'Note', - icon: 'success', - showHideTransition: 'fade', - allowToastClose: true, - hideAfter: 3000, - stack: 3, - position: 'bottom-center', - textAlign: 'left', - loader: true, - loaderBg: '#9EC600', - }); - } else { - $.toast({ - text: "Failed to save audio", - heading: 'Note', - icon: 'error', - showHideTransition: 'fade', - allowToastClose: true, - hideAfter: 3000, - stack: 3, - position: 'bottom-center', - textAlign: 'left', - loader: true, - loaderBg: '#9EC600', - }); - } - } - }); - }; - - $('#visualizer').show(); - isRecording = true; - $('#recording-button').css('background-color', 'green'); - }); - } else { - mediaRecorder.stop(); - $('#visualizer').hide(); - isRecording = false; - $('#recording-button').css('background-color', 'red'); - } - }); - - $('#download-selected').on('click', function() { - let selectedFiles = []; - $('.select-audio:checked').each(function() { - selectedFiles.push($(this).val()); - }); - - if (selectedFiles.length > 0) { $.ajax({ - url: ajaxurl, - type: 'POST', - data: { - action: 'download_zip', - files: selectedFiles - }, - success: function(response) { - if (response.success) { - $.toast({ - text: "Zip file created successfully", - heading: 'Note', - icon: 'success', - showHideTransition: 'fade', - allowToastClose: true, - hideAfter: 3000, - stack: 3, - position: 'bottom-center', - textAlign: 'left', - loader: true, - loaderBg: '#9EC600', - }); - - // ایجاد لینک دانلود - let downloadLink = document.createElement('a'); - downloadLink.href = response.data.zip_url; - downloadLink.download = response.data.zip_url.split('/').pop(); - document.body.appendChild(downloadLink); - downloadLink.click(); - document.body.removeChild(downloadLink); - - // برداشتن انتخاب فایل‌های صوتی - $('.select-audio').prop('checked', false); - } else { - $.toast({ - text: "Failed to create zip file: " + response.data, - heading: 'Error', - icon: 'error', - showHideTransition: 'fade', - allowToastClose: true, - hideAfter: 3000, - stack: 3, - position: 'bottom-center', - textAlign: 'left', - loader: true, - loaderBg: '#FF0000', - }); - } - }, - error: function(jqXHR, textStatus, errorThrown) { - console.log('AJAX Error: ' + textStatus + ': ' + errorThrown); - $.toast({ - text: "AJAX Error: " + textStatus + ": " + errorThrown, - heading: 'Error', - icon: 'error', - showHideTransition: 'fade', - allowToastClose: true, - hideAfter: 3000, - stack: 3, - position: 'bottom-center', - textAlign: 'left', - loader: true, - loaderBg: '#FF0000', - }); + url: ajaxurl, + type: "POST", + data: formData, + processData: false, + contentType: false, + success: function (response) { + if (response.success) { + showToast("Audio saved successfully", "success"); + } else { + showToast("Failed to save audio", "error"); } + }, }); - } + }; + + $("#visualizer").show(); + isRecording = true; + $("#recording-button").css("background-color", "green"); + }) + .catch((error) => { + showToast("Unable to access microphone: " + error.message, "error"); + }); + } else { + mediaRecorder.stop(); + $("#visualizer").hide(); + isVisualizing = false; + audioContext.close(); + isRecording = false; + $("#recording-button").css("background-color", "red"); + } + }); + + $("#download-selected").on("click", function () { + let selectedFiles = []; + $(".select-audio:checked").each(function () { + selectedFiles.push($(this).val()); }); - $('#select-all').on('click', function() { - let isSelectAll = $(this).data('select-all'); - - if (isSelectAll) { - $('.select-audio').prop('checked', true); - $(this).text('Unselect All'); - } else { - $('.select-audio').prop('checked', false); - $(this).text('Select All'); - } - - // تغییر حالت دکمه - $(this).data('select-all', !isSelectAll); + if (selectedFiles.length > 0) { + $.ajax({ + url: ajaxurl, + type: "POST", + data: { + action: "download_zip", + files: selectedFiles, + }, + success: function (response) { + if (response.success) { + showToast("Zip file created successfully", "success"); + let downloadLink = document.createElement("a"); + downloadLink.href = response.data.zip_url; + downloadLink.download = response.data.zip_url.split("/").pop(); + document.body.appendChild(downloadLink); + downloadLink.click(); + document.body.removeChild(downloadLink); + $(".select-audio").prop("checked", false); + } else { + showToast("Failed to create zip file: " + response.data, "error"); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + showToast("AJAX Error: " + textStatus + ": " + errorThrown, "error"); + }, + }); + } + }); + + $("#select-all").on("click", function () { + let isSelectAll = $(this).data("select-all"); + if (isSelectAll) { + $(".select-audio").prop("checked", true); + $(this).text("Unselect All"); + } else { + $(".select-audio").prop("checked", false); + $(this).text("Select All"); + } + $(this).data("select-all", !isSelectAll); + }); + + // فقط یه رویداد برای #delete-selected + $("#delete-selected").on("click", function () { + const selectedFiles = []; + $(".select-audio:checked").each(function () { + selectedFiles.push($(this).val()); }); - - - // حذف فایل‌های انتخاب‌شده - $('#delete-selected').on('click', function() { - let selectedFiles = []; - $('.select-audio:checked').each(function() { - selectedFiles.push($(this).val()); - }); - - if (selectedFiles.length > 0 && confirm("Are you sure you want to delete selected audio files?")) { - $.ajax({ - url: ajaxurl, - type: 'POST', - data: { - action: 'delete_selected_audios', - files: selectedFiles - }, - success: function(response) { - if (response.success) { - $.toast({ - text: "Selected audio files deleted successfully", - heading: 'Note', - icon: 'success', - showHideTransition: 'fade', - allowToastClose: true, - hideAfter: 3000, - stack: 3, - position: 'bottom-center', - textAlign: 'left', - loader: true, - loaderBg: '#9EC600', - }); - - // پس از حذف موفق فایل‌ها، لیست را به‌روزرسانی کنید - selectedFiles.forEach(function(fileName) { - $('.delete-audio[data-file="' + fileName + '"]').closest('tr').fadeOut(400, function() { - $(this).remove(); - }); - }); - } else { - $.toast({ - text: "Failed to delete selected audio files: " + response.data, - heading: 'Error', - icon: 'error', - showHideTransition: 'fade', - allowToastClose: true, - hideAfter: 3000, - stack: 3, - position: 'bottom-center', - textAlign: 'left', - loader: true, - loaderBg: '#FF0000', - }); - } - }, - error: function(jqXHR, textStatus, errorThrown) { - console.log('AJAX Error: ' + textStatus + ': ' + errorThrown); - $.toast({ - text: "AJAX Error: " + textStatus + ": " + errorThrown, - heading: 'Error', - icon: 'error', - showHideTransition: 'fade', - allowToastClose: true, - hideAfter: 3000, - stack: 3, - position: 'bottom-center', - textAlign: 'left', - loader: true, - loaderBg: '#FF0000', - }); - } + + if (selectedFiles.length === 0) { + showToast("Please select at least one audio file to delete.", "error"); + return; + } + + const confirmDialog = confirm( + "Are you sure you want to delete " + + selectedFiles.length + + " selected file(s)?\nPress OK to delete only locally, or Cancel and choose below." + ); + if (!confirmDialog) { + const deleteFromDrive = confirm( + "Also delete these files from Google Drive?" + ); + deleteFiles(selectedFiles, deleteFromDrive); + } else { + deleteFiles(selectedFiles, false); + } + }); + + function deleteFiles(files, deleteFromDrive) { + $.ajax({ + url: ajaxurl, + type: "POST", + data: { + action: "audio_diary_delete_selected_audios", + files: files, + delete_from_drive: deleteFromDrive, + }, + success: function (response) { + if (response.success) { + showToast( + "Deleted " + + (response.deleted_local || 0) + + " local file(s) and " + + (response.deleted_drive || 0) + + " Google Drive file(s) successfully!", + "success" + ); + files.forEach(function (fileName) { + const $row = $('tr[data-file="' + fileName + '"]'); + $row + .find(".upload-to-drive") + .text("Upload to Drive") + .removeClass("uploaded") + .prop("disabled", false); + $row.fadeOut(400, function () { + $(this).remove(); }); + }); + if (response.data && response.data.drive_errors) { + showToast(response.data.drive_errors, "warning"); + } } else { - $.toast({ - text: "Please select at least one audio file to delete.", - heading: 'Error', - icon: 'error', - showHideTransition: 'fade', - allowToastClose: true, - hideAfter: 3000, - stack: 3, - position: 'bottom-center', - textAlign: 'left', - loader: true, - loaderBg: '#FF0000', - }); + showToast( + "Failed to delete files: " + (response.data || "Unknown error"), + "error" + ); } + }, + error: function (jqXHR, textStatus, errorThrown) { + showToast("AJAX Error: " + textStatus + " - " + errorThrown, "error"); + }, }); -}); \ No newline at end of file + } + + $(".upload-to-drive").on("click", function () { + const $button = $(this); + const fileName = $button.data("name"); + + if ($button.hasClass("uploaded")) { + showToast("This file is already uploaded to Google Drive.", "error"); + return; + } + + $button.text("Uploading...").prop("disabled", true); + + $.ajax({ + url: ajaxurl, + type: "POST", + data: { + action: "upload_to_google_drive", + file: fileName, + }, + success: function (response) { + if (response.success) { + showToast("File uploaded to Google Drive successfully!", "success"); + $button.text("Uploaded").addClass("uploaded").prop("disabled", true); + } else { + if (response.data === "File already exists in Google Drive.") { + showToast("This file already exists in Google Drive.", "error"); + $button + .text("Uploaded") + .addClass("uploaded") + .prop("disabled", true); + } else { + showToast("Failed to upload: " + response.data, "error"); + $button.text("Upload to Drive").prop("disabled", false); + } + } + }, + error: function (jqXHR, textStatus, errorThrown) { + showToast("Upload Error: " + textStatus, "error"); + $button.text("Upload to Drive").prop("disabled", false); + }, + }); + }); + + $("button#audioduration").on("click", function () { + var $button = $(this); + if ($button.data("loaded")) return; + var audioUrl = $button.closest("td").find(".audio-duration").data("url"); + + if (!audioUrl) { + $button.text("خطا"); + return; + } + + $button.text("در حال بارگذاری..."); + var audio = new Audio(audioUrl); + + audio.addEventListener("canplaythrough", function () { + var duration = audio.duration; + + if (isNaN(duration) || duration <= 0) { + $button.text("خطا"); + return; + } + + var minutes = Math.floor(duration / 60); + var seconds = Math.floor(duration % 60); + var formattedDuration = + minutes + ":" + (seconds < 10 ? "0" : "") + seconds; + + $button.text(formattedDuration); + $button.data("loaded", true); + }); + + audio.addEventListener("error", function () { + $button.text("خطا"); + }); + + audio.load(); + }); + + $("button.audioduration").on("click", function () { + var $button = $(this); + if ($button.data("loaded")) return; + + var audioUrl = $button.closest("td").find(".audio-duration").data("url"); + if (!audioUrl) { + $button.text("خطا"); + return; + } + + $button.text("در حال بارگذاری..."); + var audio = new Audio(audioUrl); + + audio.addEventListener("canplaythrough", function () { + var duration = audio.duration; + + if (isNaN(duration) || duration <= 0) { + $button.text("خطا"); + return; + } + + var minutes = Math.floor(duration / 60); + var seconds = Math.floor(duration % 60); + var formattedDuration = + minutes + ":" + (seconds < 10 ? "0" : "") + seconds; + + $button.text(formattedDuration); + $button.data("loaded", true); + }); + + audio.addEventListener("error", function () { + $button.text("خطا"); + }); + + audio.load(); + }); + + $(".select-audio").on("change", function () { + let count = $(".select-audio:checked").length; + $("#selected-count").text(`Selected: ${count}`); + }); +}); diff --git a/audio-diary.php b/audio-diary.php index 26617a7..2a31c26 100644 --- a/audio-diary.php +++ b/audio-diary.php @@ -3,6 +3,7 @@ Plugin Name: Audio diary Description: پلاگین دفترچه خاطرات. Author: haakel +Version: 2.0.0 */ if ( ! defined( 'ABSPATH' ) ) { diff --git a/classes/class_admin_page.php b/classes/class_admin_page.php index db53eb9..c69deb1 100644 --- a/classes/class_admin_page.php +++ b/classes/class_admin_page.php @@ -1,46 +1,191 @@ -create_audio_folder(); } + public function test_connection() { + check_ajax_referer('audio_diary_test_connection_nonce', 'nonce'); + if (!isset($_POST['folder_id']) || empty($_POST['folder_id'])) { + wp_send_json_error(__('Invalid Folder ID.', 'audio-diary')); + } + + $folder_id = sanitize_text_field($_POST['folder_id']); + require_once plugin_dir_path(__FILE__) . '../vendor/autoload.php'; + $client = new Google_Client(); + $client->setAuthConfig(plugin_dir_path(__FILE__) . '../config/service-account.json'); + $client->addScope(Google_Service_Drive::DRIVE_METADATA_READONLY); + $service = new Google_Service_Drive($client); + + try { + $folder = $service->files->get($folder_id, ['fields' => 'id,name']); + error_log("Test connection successful for folder ID: $folder_id, Name: " . $folder->getName()); + wp_send_json_success(); + } catch (Google_Service_Exception $e) { + error_log("Test connection failed for $folder_id: " . $e->getMessage()); + if ($e->getCode() == 404) { + wp_send_json_error(__('Folder not found. Check the Folder ID.', 'audio-diary')); + } elseif ($e->getCode() == 403) { + wp_send_json_error(__('Permission denied. Ensure the Service Account has access to this folder.', 'audio-diary')); + } else { + wp_send_json_error(__('Failed to connect: ' . $e->getMessage(), 'audio-diary')); + } + } + } + + function audio_diary_upload_to_google_drive() { + $file_name = isset($_POST['file']) ? sanitize_file_name($_POST['file']) : ''; + if (!$file_name) { + error_log('Upload Error: No file specified.'); + wp_send_json_error('No file specified.'); + } + + $uploads = wp_upload_dir(); + $file_path = $uploads['basedir'] . '/audio-diary/' . $file_name; + + if (!file_exists($file_path)) { + error_log("Upload Error: File not found on server - $file_path"); + wp_send_json_error('File not found on server.'); + } + + require_once plugin_dir_path(__FILE__) . '../vendor/autoload.php'; + $client = new Google_Client(); + $client->setAuthConfig(plugin_dir_path(__FILE__) . '../config/service-account.json'); + $client->addScope(Google_Service_Drive::DRIVE); // تغییر به DRIVE برای دسترسی کامل + $service = new Google_Service_Drive($client); + + $target_folder_id = get_option('audio_diary_google_drive_folder_id', '1sBE78fuxRlcWouLs0mw12zLqTbWJg9jB'); + $drive_file_id = get_option('google_drive_' . $file_name); + error_log("Checking file: $file_name, Drive ID: " . ($drive_file_id ? $drive_file_id : 'None')); + + if ($drive_file_id) { + try { + $file = $service->files->get($drive_file_id, ['fields' => 'id,name,parents,trashed']); + $parents = $file->getParents(); + $trashed = $file->getTrashed(); + error_log("File $file_name exists in Google Drive with ID: $drive_file_id, Name: " . $file->getName() . ", Parents: " . implode(',', $parents) . ", Trashed: " . ($trashed ? 'Yes' : 'No')); + + if (in_array($target_folder_id, $parents) && !$trashed) { + wp_send_json_error('File already exists in the target Google Drive folder.'); + } else { + error_log("File $file_name is not in target folder or is trashed, proceeding to upload."); + delete_option('google_drive_' . $file_name); + } + } catch (Google_Service_Exception $e) { + error_log("Google Drive check failed for $file_name: " . $e->getMessage() . " (Code: " . $e->getCode() . ")"); + if ($e->getCode() == 404) { + delete_option('google_drive_' . $file_name); + error_log("Deleted option for $file_name as it was not found in Google Drive."); + } else { + wp_send_json_error('Error checking file in Google Drive: ' . $e->getMessage()); + } + } + } else { + error_log("No Drive ID found for $file_name, proceeding to upload."); + } + + error_log("Uploading $file_name to Google Drive..."); + $file = new Google_Service_Drive_DriveFile(); + $file->setName($file_name); + $file->setParents([$target_folder_id]); + + $result = $service->files->create($file, [ + 'data' => file_get_contents($file_path), + 'mimeType' => 'audio/wav', + 'uploadType' => 'multipart' + ]); + + if ($result) { + update_option('google_drive_' . $file_name, $result->id); + error_log("Upload successful for $file_name, new ID: " . $result->id); + wp_send_json_success(['file_id' => $result->id]); + } else { + error_log("Upload failed for $file_name"); + wp_send_json_error('Upload failed.'); + } + } + + function audio_diary_delete_selected_audios() { + $files = isset($_POST['files']) ? (array)$_POST['files'] : []; + $delete_from_drive = isset($_POST['delete_from_drive']) && $_POST['delete_from_drive'] === 'true'; + + if (empty($files)) { + wp_send_json_error('No files selected.'); + } + + $uploads = wp_upload_dir(); + $deleted_local = 0; + $deleted_drive = 0; + $drive_errors = []; + + if ($delete_from_drive) { + require_once plugin_dir_path(__FILE__) . '../vendor/autoload.php'; + $client = new Google_Client(); + $client->setAuthConfig(plugin_dir_path(__FILE__) . '../config/service-account.json'); + $client->addScope(Google_Service_Drive::DRIVE); + $service = new Google_Service_Drive($client); + } + + foreach ($files as $file) { + $file_path = $uploads['basedir'] . '/audio-diary/' . sanitize_file_name($file); + $drive_file_id = get_option('google_drive_' . $file); + + if ($delete_from_drive && $drive_file_id) { + try { + $service->files->delete($drive_file_id); + delete_option('google_drive_' . $file); + $deleted_drive++; + error_log("Successfully deleted file $drive_file_id from Google Drive for $file."); + } catch (Google_Service_Exception $e) { + $drive_errors[] = "Failed to delete $file from Google Drive: " . $e->getMessage() . " (Code: " . $e->getCode() . ")"; + error_log($drive_errors[count($drive_errors) - 1]); + } + } + + if (file_exists($file_path) && unlink($file_path)) { + $deleted_local++; + error_log("Successfully deleted local file: $file_path"); + } else { + error_log("No local file to delete or failed: $file_path"); + } + } + + if ($deleted_local > 0 || $deleted_drive > 0) { + $response = ['success' => true, 'deleted_local' => $deleted_local, 'deleted_drive' => $deleted_drive]; + if (!empty($drive_errors)) { + $response['data'] = ['drive_errors' => implode("; ", $drive_errors)]; + } + wp_send_json($response); + } else { + wp_send_json_error('Failed to delete any files.'); + } + } + function delete_old_zip_files() { $uploads = wp_upload_dir(); $files = glob($uploads['basedir'] . '/audio-diary-selected-*.zip'); $time_limit = 3600; // 1 hour in seconds - + foreach ($files as $file) { if (filemtime($file) < (time() - $time_limit)) { unlink($file); @@ -49,57 +194,47 @@ class Audio_Diary_Admin_Page { } function handle_download_zip() { - if (!current_user_can('manage_options')) { - wp_send_json_error(['message' => 'Unauthorized']); - return; + $files = isset($_POST['files']) ? (array)$_POST['files'] : []; + if (empty($files)) { + wp_send_json_error('No files selected.'); } - - if (!isset($_POST['files']) || !is_array($_POST['files'])) { - wp_send_json_error(['message' => 'Invalid request']); - return; - } - - $selected_files = $_POST['files']; + $uploads = wp_upload_dir(); + $zip_name = 'audio-diary-' . time() . '.zip'; + $zip_path = $uploads['basedir'] . '/' . $zip_name; $zip = new ZipArchive(); - $zip_filename = 'audio-diary-selected-' . time() . '.zip'; - $zip_filepath = $uploads['basedir'] . '/' . $zip_filename; - - if ($zip->open($zip_filepath, ZipArchive::CREATE) !== TRUE) { - wp_send_json_error(['message' => 'Cannot create zip file']); - return; - } - - foreach ($selected_files as $file) { - $file_path = $uploads['basedir'] . '/audio-diary/' . $file; - if (file_exists($file_path)) { - $zip->addFile($file_path, $file); + + if ($zip->open($zip_path, ZipArchive::CREATE) === TRUE) { + foreach ($files as $file) { + $file_path = $uploads['basedir'] . '/audio-diary/' . sanitize_file_name($file); + if (file_exists($file_path)) { + $zip->addFile($file_path, $file); + } } + $zip->close(); + + $zip_url = $uploads['baseurl'] . '/' . $zip_name; + wp_send_json_success(['zip_url' => $zip_url]); + } else { + wp_send_json_error('Failed to create ZIP file.'); } - - $zip->close(); - - $zip_url = $uploads['baseurl'] . '/' . $zip_filename; - - wp_send_json_success(['zip_url' => $zip_url]); } - - + function delete_audio() { if (!current_user_can('manage_options')) { wp_send_json_error('Unauthorized'); return; } - + if (empty($_POST['file_name'])) { wp_send_json_error('No file specified'); return; } - + $file_name = sanitize_file_name($_POST['file_name']); $uploads = wp_upload_dir(); $file_path = $uploads['basedir'] . '/audio-diary/' . $file_name; - + if (file_exists($file_path) && unlink($file_path)) { wp_send_json_success('File deleted'); } else { @@ -107,70 +242,39 @@ class Audio_Diary_Admin_Page { wp_send_json_error($error); } } - + function delete_selected_audios() { - if (!current_user_can('manage_options')) { - wp_send_json_error('Unauthorized'); - return; + $files = isset($_POST['files']) ? (array)$_POST['files'] : []; + if (empty($files)) { + wp_send_json_error('No files selected.'); } - - if (empty($_POST['files']) || !is_array($_POST['files'])) { - wp_send_json_error('No files specified'); - return; - } - + $uploads = wp_upload_dir(); - $base_path = wp_normalize_path($uploads['basedir'] . '/audio-diary/'); - $errors = []; - - // Print existing files in the directory - $existing_files = glob($base_path . '*'); - error_log("Existing files in audio-diary directory:"); - foreach ($existing_files as $file) { - error_log(basename($file)); - } - - foreach ($_POST['files'] as $file_name) { - $file_name = sanitize_file_name($file_name); - - // اصلاح نام فایل، جایگزین کردن فاصله با خط تیره - $file_name = str_replace(' ', '-', $file_name); - - $file_path = wp_normalize_path($base_path . $file_name); - - error_log("Trying to delete: " . $file_path); - - if (file_exists($file_path)) { - if (!unlink($file_path)) { - error_log("Failed to delete: " . $file_path); - $errors[] = $file_name; - } else { - error_log("Deleted: " . $file_path); - } - } else { - error_log("File not found: " . $file_path); - $errors[] = $file_name; + $deleted = 0; + + foreach ($files as $file) { + $file_path = $uploads['basedir'] . '/audio-diary/' . sanitize_file_name($file); + if (file_exists($file_path) && unlink($file_path)) { + $deleted++; } } - - if (empty($errors)) { - wp_send_json_success('All files deleted successfully.'); + + if ($deleted > 0) { + wp_send_json_success('Deleted ' . $deleted . ' files.'); } else { - wp_send_json_error('Failed to delete files: ' . implode(', ', $errors)); + wp_send_json_error('Failed to delete files.'); } } - - - + public function add_menu_item() { add_menu_page( - 'Audio Diary', // عنوان صفحه - 'Audio Diary', // عنوان منو - 'manage_options', // سطح دسترسی - 'audio-diary', // اسلاگ صفحه - array($this, 'render_page'), // تابعی که محتوای صفحه را نمایش می‌دهد - 'dashicons-media-audio', // آیکون منو - 6 + 'Audio Diary', + 'Audio Diary', + 'manage_options', + 'audio-diary', + array($this, 'render_page'), + 'dashicons-media-audio', + 6 ); add_submenu_page( @@ -181,22 +285,33 @@ class Audio_Diary_Admin_Page { 'audio-diary-list', array($this, 'render_list_page') ); + add_submenu_page( + 'audio-diary', + __('setting', 'audio-diary'), + __('setting', 'audio-diary'), + 'manage_options', + 'setting', + array($this, 'setting_page') + ); } public function enqueue_scripts() { wp_enqueue_style('audio-diary-style', plugin_dir_url(__FILE__) . '../assets/css/style.css'); wp_enqueue_style('audio-diary-toast-style', plugin_dir_url(__FILE__) . '../assets/css/jquery.toast.css'); - wp_enqueue_script('audio-diary-script', plugin_dir_url(__FILE__) ."../assets/js/audio-diary.js", array('jquery'), '1.0', true); - wp_enqueue_script('audio-diary-toast-script', plugin_dir_url(__FILE__) ."../assets/js/jquery.toast.js", array('jquery'), '1.0', true); - + wp_enqueue_script('audio-diary-script', plugin_dir_url(__FILE__) . "../assets/js/audio-diary.js", array('jquery'), '1.0', true); + wp_enqueue_script('audio-diary-toast-script', plugin_dir_url(__FILE__) . "../assets/js/jquery.toast.js", array('jquery'), '1.0', true); } public function render_page() { - include_once AUDIO_DIARY_MODULES_PATH."audio-diary-admin-page.php"; + include_once AUDIO_DIARY_MODULES_PATH . "audio-diary-admin-page.php"; } public function render_list_page() { - include_once AUDIO_DIARY_MODULES_PATH."audio-diary-admin-list-page.php"; + include_once AUDIO_DIARY_MODULES_PATH . "audio-diary-admin-list-page.php"; + } + + public function setting_page() { + include_once AUDIO_DIARY_MODULES_PATH . "setting-admin-page.php"; } private function create_audio_folder() { @@ -206,35 +321,33 @@ class Audio_Diary_Admin_Page { if (!file_exists($audio_dir)) { wp_mkdir_p($audio_dir); } -} - -public function save_audio() { - if (!current_user_can('manage_options')) { - wp_send_json_error('Unauthorized'); - return; } - if (empty($_FILES['audio_data'])) { - wp_send_json_error('No file uploaded'); - return; - } + public function save_audio() { + if (!current_user_can('manage_options')) { + wp_send_json_error('Unauthorized'); + return; + } - $file = $_FILES['audio_data']; - $uploads = wp_upload_dir(); - $upload_path = $uploads['basedir'] . '/audio-diary/'; + if (empty($_FILES['audio_data'])) { + wp_send_json_error('No file uploaded'); + return; + } - $date_time = date('Y-m-d-H-i-s'); - $file_name = 'memory-' . $date_time . '.wav'; - $file_path = $upload_path . $file_name; + $file = $_FILES['audio_data']; + $uploads = wp_upload_dir(); + $upload_path = $uploads['basedir'] . '/audio-diary/'; - if (move_uploaded_file($file['tmp_name'], $file_path)) { - wp_send_json_success(['message' => 'File uploaded', 'file_name' => $file_name]); - } else { - wp_send_json_error('File upload failed'); + $date_time = date('Y-m-d-H-i-s'); + $file_name = 'memory-' . $date_time . '.wav'; + $file_path = $upload_path . $file_name; + + if (move_uploaded_file($file['tmp_name'], $file_path)) { + wp_send_json_success(['message' => 'File uploaded', 'file_name' => $file_name]); + } else { + wp_send_json_error('File upload failed'); + } } } - - -} Audio_Diary_Admin_Page::get_instance(); \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..04bb3c6 --- /dev/null +++ b/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "google/apiclient": "^2.0" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..5ec8449 --- /dev/null +++ b/composer.lock @@ -0,0 +1,1281 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "3e6e79e410cd98a8d86f36f772fe3690", + "packages": [ + { + "name": "firebase/php-jwt", + "version": "v6.11.0", + "source": { + "type": "git", + "url": "https://github.com/firebase/php-jwt.git", + "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/8f718f4dfc9c5d5f0c994cdfd103921b43592712", + "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.4", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "psr/cache": "^2.0||^3.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-sodium": "Support EdDSA (Ed25519) signatures", + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, + "type": "library", + "autoload": { + "psr-4": { + "Firebase\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Neuman Vong", + "email": "neuman+pear@twilio.com", + "role": "Developer" + }, + { + "name": "Anant Narayanan", + "email": "anant@php.net", + "role": "Developer" + } + ], + "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", + "homepage": "https://github.com/firebase/php-jwt", + "keywords": [ + "jwt", + "php" + ], + "support": { + "issues": "https://github.com/firebase/php-jwt/issues", + "source": "https://github.com/firebase/php-jwt/tree/v6.11.0" + }, + "time": "2025-01-23T05:11:06+00:00" + }, + { + "name": "google/apiclient", + "version": "v2.18.2", + "source": { + "type": "git", + "url": "https://github.com/googleapis/google-api-php-client.git", + "reference": "d8d201ba8a189a3cd7fb34e4da569f2ed440eee7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/d8d201ba8a189a3cd7fb34e4da569f2ed440eee7", + "reference": "d8d201ba8a189a3cd7fb34e4da569f2ed440eee7", + "shasum": "" + }, + "require": { + "firebase/php-jwt": "^6.0", + "google/apiclient-services": "~0.350", + "google/auth": "^1.37", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.6", + "monolog/monolog": "^2.9||^3.0", + "php": "^8.0", + "phpseclib/phpseclib": "^3.0.36" + }, + "require-dev": { + "cache/filesystem-adapter": "^1.1", + "composer/composer": "^1.10.23", + "phpcompatibility/php-compatibility": "^9.2", + "phpspec/prophecy-phpunit": "^2.1", + "phpunit/phpunit": "^9.6", + "squizlabs/php_codesniffer": "^3.8", + "symfony/css-selector": "~2.1", + "symfony/dom-crawler": "~2.1" + }, + "suggest": { + "cache/filesystem-adapter": "For caching certs and tokens (using Google\\Client::setCache)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "autoload": { + "files": [ + "src/aliases.php" + ], + "psr-4": { + "Google\\": "src/" + }, + "classmap": [ + "src/aliases.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "Client library for Google APIs", + "homepage": "http://developers.google.com/api-client-library/php", + "keywords": [ + "google" + ], + "support": { + "issues": "https://github.com/googleapis/google-api-php-client/issues", + "source": "https://github.com/googleapis/google-api-php-client/tree/v2.18.2" + }, + "time": "2024-12-16T22:52:40+00:00" + }, + { + "name": "google/apiclient-services", + "version": "v0.396.0", + "source": { + "type": "git", + "url": "https://github.com/googleapis/google-api-php-client-services.git", + "reference": "ceb2e432e4326c6775d24f62d554395a1a9ad3dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/ceb2e432e4326c6775d24f62d554395a1a9ad3dd", + "reference": "ceb2e432e4326c6775d24f62d554395a1a9ad3dd", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "type": "library", + "autoload": { + "files": [ + "autoload.php" + ], + "psr-4": { + "Google\\Service\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "Client library for Google APIs", + "homepage": "http://developers.google.com/api-client-library/php", + "keywords": [ + "google" + ], + "support": { + "issues": "https://github.com/googleapis/google-api-php-client-services/issues", + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.396.0" + }, + "time": "2025-02-24T01:10:27+00:00" + }, + { + "name": "google/auth", + "version": "v1.46.0", + "source": { + "type": "git", + "url": "https://github.com/googleapis/google-auth-library-php.git", + "reference": "7fafae99a41984cbfb92508174263cf7bf3049b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/7fafae99a41984cbfb92508174263cf7bf3049b9", + "reference": "7fafae99a41984cbfb92508174263cf7bf3049b9", + "shasum": "" + }, + "require": { + "firebase/php-jwt": "^6.0", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.4.5", + "php": "^8.0", + "psr/cache": "^2.0||^3.0", + "psr/http-message": "^1.1||^2.0", + "psr/log": "^3.0" + }, + "require-dev": { + "guzzlehttp/promises": "^2.0", + "kelvinmo/simplejwt": "0.7.1", + "phpseclib/phpseclib": "^3.0.35", + "phpspec/prophecy-phpunit": "^2.1", + "phpunit/phpunit": "^9.6", + "sebastian/comparator": ">=1.2.3", + "squizlabs/php_codesniffer": "^3.5", + "symfony/process": "^6.0||^7.0", + "webmozart/assert": "^1.11" + }, + "suggest": { + "phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2." + }, + "type": "library", + "autoload": { + "psr-4": { + "Google\\Auth\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "Google Auth Library for PHP", + "homepage": "https://github.com/google/google-auth-library-php", + "keywords": [ + "Authentication", + "google", + "oauth2" + ], + "support": { + "docs": "https://cloud.google.com/php/docs/reference/auth/latest", + "issues": "https://github.com/googleapis/google-auth-library-php/issues", + "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.46.0" + }, + "time": "2025-02-12T22:21:37+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.9.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2024-07-24T11:22:20+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2024-10-17T10:06:22+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.7.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2024-07-18T11:15:46+00:00" + }, + { + "name": "monolog/monolog", + "version": "3.8.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/aef6ee73a77a66e404dd6540934a9ef1b3c855b4", + "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^2.0 || ^3.0" + }, + "provide": { + "psr/log-implementation": "3.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2 || ^2.0", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.2", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4 || ^3", + "php-console/php-console": "^3.1.8", + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.17 || ^11.0.7", + "predis/predis": "^1.1 || ^2", + "rollbar/rollbar": "^4.0", + "ruflin/elastica": "^7 || ^8", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/3.8.1" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2024-12-05T17:15:07+00:00" + }, + { + "name": "paragonie/constant_time_encoding", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "df1e7fde177501eee2037dd159cf04f5f301a512" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/df1e7fde177501eee2037dd159cf04f5f301a512", + "reference": "df1e7fde177501eee2037dd159cf04f5f301a512", + "shasum": "" + }, + "require": { + "php": "^8" + }, + "require-dev": { + "phpunit/phpunit": "^9", + "vimeo/psalm": "^4|^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "time": "2024-05-08T12:36:18+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" + }, + { + "name": "phpseclib/phpseclib", + "version": "3.0.43", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "709ec107af3cb2f385b9617be72af8cf62441d02" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02", + "reference": "709ec107af3cb2f385b9617be72af8cf62441d02", + "shasum": "" + }, + "require": { + "paragonie/constant_time_encoding": "^1|^2|^3", + "paragonie/random_compat": "^1.4|^2.0|^9.99.99", + "php": ">=5.6.1" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "ext-dom": "Install the DOM extension to load XML formatted public keys.", + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "type": "library", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib3\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "support": { + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.43" + }, + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "time": "2024-12-14T21:12:59+00:00" + }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "psr/log", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.2" + }, + "time": "2024-09-11T13:17:53+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.5.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:20:29+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": false, + "prefer-lowest": false, + "platform": {}, + "platform-dev": {}, + "plugin-api-version": "2.6.0" +} diff --git a/modules/audio-diary-admin-list-page.php b/modules/audio-diary-admin-list-page.php index caa3a27..6dd69df 100644 --- a/modules/audio-diary-admin-list-page.php +++ b/modules/audio-diary-admin-list-page.php @@ -14,36 +14,42 @@ usort($audio_files, function($a, $b) { ?>

- - - - +
+ + + +
+
Selected: 0
+
- + - + - diff --git a/modules/setting-admin-page.php b/modules/setting-admin-page.php new file mode 100644 index 0000000..e81ddba --- /dev/null +++ b/modules/setting-admin-page.php @@ -0,0 +1,224 @@ +folder_id_option, $new_folder_id); + echo '

' . __('Settings saved successfully!', 'audio-diary') . '

'; + } + + $folder_id = get_option($this->folder_id_option, $this->default_folder_id); + $folder_info = $this->get_folder_info($folder_id); + ?> + +
+

+

+ + + +
+ + +
+

+
- + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + +

+ +

+ + +
+ +
+ +
+ +
+
+ +

+ +

+ + + + + + +setAuthConfig(plugin_dir_path(__FILE__) . '../config/service-account.json'); + $client->addScope(Google_Service_Drive::DRIVE_METADATA_READONLY); // تغییر Scope + $service = new Google_Service_Drive($client); + + $folder = $service->files->get($folder_id, ['fields' => 'id,name,webViewLink']); + return [ + 'name' => $folder->getName(), + 'url' => $folder->getWebViewLink() + ]; + } catch (Exception $e) { + error_log("Failed to get folder info for $folder_id: " . $e->getMessage()); + return false; + } + } +} + +$settings = new AudioDiarySettings(); +$settings->render(); +?> \ No newline at end of file diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 0000000..19287a1 --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,25 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + /** @var \Closure(string):void */ + private static $includeFile; + + /** @var string|null */ + private $vendorDir; + + // PSR-4 + /** + * @var array> + */ + private $prefixLengthsPsr4 = array(); + /** + * @var array> + */ + private $prefixDirsPsr4 = array(); + /** + * @var list + */ + private $fallbackDirsPsr4 = array(); + + // PSR-0 + /** + * List of PSR-0 prefixes + * + * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) + * + * @var array>> + */ + private $prefixesPsr0 = array(); + /** + * @var list + */ + private $fallbackDirsPsr0 = array(); + + /** @var bool */ + private $useIncludePath = false; + + /** + * @var array + */ + private $classMap = array(); + + /** @var bool */ + private $classMapAuthoritative = false; + + /** + * @var array + */ + private $missingClasses = array(); + + /** @var string|null */ + private $apcuPrefix; + + /** + * @var array + */ + private static $registeredLoaders = array(); + + /** + * @param string|null $vendorDir + */ + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + self::initializeIncludeClosure(); + } + + /** + * @return array> + */ + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + /** + * @return array> + */ + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + /** + * @return list + */ + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + /** + * @return list + */ + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + /** + * @return array Array of classname => path + */ + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + * + * @return void + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void + */ + public function add($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 base directories + * + * @return void + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + * + * @return void + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + * + * @return void + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + * + * @return void + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } + } + + /** + * Unregisters this instance as an autoloader. + * + * @return void + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return true|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + $includeFile = self::$includeFile; + $includeFile($file); + + return true; + } + + return null; + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + /** + * Returns the currently registered loaders keyed by their corresponding vendor directories. + * + * @return array + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + /** + * @param string $class + * @param string $ext + * @return string|false + */ + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } + + /** + * @return void + */ + private static function initializeIncludeClosure() + { + if (self::$includeFile !== null) { + return; + } + + /** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + */ + self::$includeFile = \Closure::bind(static function($file) { + include $file; + }, null, null); + } +} diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php new file mode 100644 index 0000000..6d29bff --- /dev/null +++ b/vendor/composer/InstalledVersions.php @@ -0,0 +1,378 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + +/** + * This class is copied in every Composer installed project and available to all + * + * See also https://getcomposer.org/doc/07-runtime.md#installed-versions + * + * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final + */ +class InstalledVersions +{ + /** + * @var mixed[]|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null + */ + private static $installed; + + /** + * @var bool + */ + private static $installedIsLocalDir; + + /** + * @var bool|null + */ + private static $canGetVendors; + + /** + * @var array[] + * @psalm-var array}> + */ + private static $installedByVendor = array(); + + /** + * Returns a list of all package names which are present, either by being installed, replaced or provided + * + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackages() + { + $packages = array(); + foreach (self::getInstalled() as $installed) { + $packages[] = array_keys($installed['versions']); + } + + if (1 === \count($packages)) { + return $packages[0]; + } + + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); + } + + /** + * Returns a list of all package names with a specific type e.g. 'library' + * + * @param string $type + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackagesByType($type) + { + $packagesByType = array(); + + foreach (self::getInstalled() as $installed) { + foreach ($installed['versions'] as $name => $package) { + if (isset($package['type']) && $package['type'] === $type) { + $packagesByType[] = $name; + } + } + } + + return $packagesByType; + } + + /** + * Checks whether the given package is installed + * + * This also returns true if the package name is provided or replaced by another package + * + * @param string $packageName + * @param bool $includeDevRequirements + * @return bool + */ + public static function isInstalled($packageName, $includeDevRequirements = true) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; + } + } + + return false; + } + + /** + * Checks whether the given package satisfies a version constraint + * + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: + * + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') + * + * @param VersionParser $parser Install composer/semver to have access to this class and functionality + * @param string $packageName + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package + * @return bool + */ + public static function satisfies(VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints((string) $constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + + return $provided->matches($constraint); + } + + /** + * Returns a version constraint representing all the range(s) which are installed for a given package + * + * It is easier to use this via isInstalled() with the $constraint argument if you need to check + * whether a given version of a package is installed, and not just whether it exists + * + * @param string $packageName + * @return string Version constraint usable with composer/semver + */ + public static function getVersionRanges($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + $ranges = array(); + if (isset($installed['versions'][$packageName]['pretty_version'])) { + $ranges[] = $installed['versions'][$packageName]['pretty_version']; + } + if (array_key_exists('aliases', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); + } + if (array_key_exists('replaced', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); + } + if (array_key_exists('provided', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); + } + + return implode(' || ', $ranges); + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['version'])) { + return null; + } + + return $installed['versions'][$packageName]['version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getPrettyVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['pretty_version'])) { + return null; + } + + return $installed['versions'][$packageName]['pretty_version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference + */ + public static function getReference($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['reference'])) { + return null; + } + + return $installed['versions'][$packageName]['reference']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. + */ + public static function getInstallPath($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @return array + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + */ + public static function getRootPackage() + { + $installed = self::getInstalled(); + + return $installed[0]['root']; + } + + /** + * Returns the raw installed.php data for custom implementations + * + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. + * @return array[] + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} + */ + public static function getRawData() + { + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + + return self::$installed; + } + + /** + * Returns the raw data of all installed.php which are currently loaded for custom implementations + * + * @return array[] + * @psalm-return list}> + */ + public static function getAllRawData() + { + return self::getInstalled(); + } + + /** + * Lets you reload the static array from another file + * + * This is only useful for complex integrations in which a project needs to use + * this class but then also needs to execute another project's autoloader in process, + * and wants to ensure both projects have access to their version of installed.php. + * + * A typical case would be PHPUnit, where it would need to make sure it reads all + * the data it needs from this class, then call reload() with + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure + * the project in which it runs can then also use this class safely, without + * interference between PHPUnit's dependencies and the project's dependencies. + * + * @param array[] $data A vendor/composer/installed.php data set + * @return void + * + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + + // when using reload, we disable the duplicate protection to ensure that self::$installed data is + // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, + // so we have to assume it does not, and that may result in duplicate data being returned when listing + // all installed packages for example + self::$installedIsLocalDir = false; + } + + /** + * @return array[] + * @psalm-return list}> + */ + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); + } + + $installed = array(); + $copiedLocalDir = false; + + if (self::$canGetVendors) { + $selfDir = strtr(__DIR__, '\\', '/'); + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + $vendorDir = strtr($vendorDir, '\\', '/'); + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (is_file($vendorDir.'/composer/installed.php')) { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require $vendorDir.'/composer/installed.php'; + self::$installedByVendor[$vendorDir] = $required; + $installed[] = $required; + if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { + self::$installed = $required; + self::$installedIsLocalDir = true; + } + } + if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { + $copiedLocalDir = true; + } + } + } + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require __DIR__ . '/installed.php'; + self::$installed = $required; + } else { + self::$installed = array(); + } + } + + if (self::$installed !== array() && !$copiedLocalDir) { + $installed[] = self::$installed; + } + + return $installed; + } +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 0000000..f27399a --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..cb4928f --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,30 @@ + $vendorDir . '/composer/InstalledVersions.php', + 'Google_AccessToken_Revoke' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_AccessToken_Verify' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_AuthHandler_AuthHandlerFactory' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_AuthHandler_Guzzle6AuthHandler' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_AuthHandler_Guzzle7AuthHandler' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Client' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Collection' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Exception' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Http_Batch' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Http_MediaFileUpload' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Http_REST' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Model' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Service' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Service_Exception' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Service_Resource' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Task_Composer' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Task_Exception' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Task_Retryable' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Task_Runner' => $vendorDir . '/google/apiclient/src/aliases.php', + 'Google_Utils_UriTemplate' => $vendorDir . '/google/apiclient/src/aliases.php', +); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php new file mode 100644 index 0000000..250bcb6 --- /dev/null +++ b/vendor/composer/autoload_files.php @@ -0,0 +1,15 @@ + $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', + '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', + '1f87db08236948d07391152dccb70f04' => $vendorDir . '/google/apiclient-services/autoload.php', + 'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php', + 'a8d3953fd9959404dd22d3dfcd0a79f0' => $vendorDir . '/google/apiclient/src/aliases.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000..15a2ff3 --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($vendorDir . '/phpseclib/phpseclib/phpseclib'), + 'Psr\\Log\\' => array($vendorDir . '/psr/log/src'), + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), + 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), + 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), + 'ParagonIE\\ConstantTime\\' => array($vendorDir . '/paragonie/constant_time_encoding/src'), + 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), + 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), + 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), + 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), + 'Google\\Service\\' => array($vendorDir . '/google/apiclient-services/src'), + 'Google\\Auth\\' => array($vendorDir . '/google/auth/src'), + 'Google\\' => array($vendorDir . '/google/apiclient/src'), + 'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'), +); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php new file mode 100644 index 0000000..5cdaa3d --- /dev/null +++ b/vendor/composer/autoload_real.php @@ -0,0 +1,50 @@ +register(true); + + $filesToLoad = \Composer\Autoload\ComposerStaticInit3e6e79e410cd98a8d86f36f772fe3690::$files; + $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } + }, null, null); + foreach ($filesToLoad as $fileIdentifier => $file) { + $requireFile($fileIdentifier, $file); + } + + return $loader; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 0000000..0911f0f --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,143 @@ + __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', + '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', + '1f87db08236948d07391152dccb70f04' => __DIR__ . '/..' . '/google/apiclient-services/autoload.php', + 'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php', + 'a8d3953fd9959404dd22d3dfcd0a79f0' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'p' => + array ( + 'phpseclib3\\' => 11, + ), + 'P' => + array ( + 'Psr\\Log\\' => 8, + 'Psr\\Http\\Message\\' => 17, + 'Psr\\Http\\Client\\' => 16, + 'Psr\\Cache\\' => 10, + 'ParagonIE\\ConstantTime\\' => 23, + ), + 'M' => + array ( + 'Monolog\\' => 8, + ), + 'G' => + array ( + 'GuzzleHttp\\Psr7\\' => 16, + 'GuzzleHttp\\Promise\\' => 19, + 'GuzzleHttp\\' => 11, + 'Google\\Service\\' => 15, + 'Google\\Auth\\' => 12, + 'Google\\' => 7, + ), + 'F' => + array ( + 'Firebase\\JWT\\' => 13, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'phpseclib3\\' => + array ( + 0 => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib', + ), + 'Psr\\Log\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/log/src', + ), + 'Psr\\Http\\Message\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/http-factory/src', + 1 => __DIR__ . '/..' . '/psr/http-message/src', + ), + 'Psr\\Http\\Client\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/http-client/src', + ), + 'Psr\\Cache\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/cache/src', + ), + 'ParagonIE\\ConstantTime\\' => + array ( + 0 => __DIR__ . '/..' . '/paragonie/constant_time_encoding/src', + ), + 'Monolog\\' => + array ( + 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', + ), + 'GuzzleHttp\\Psr7\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', + ), + 'GuzzleHttp\\Promise\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', + ), + 'GuzzleHttp\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', + ), + 'Google\\Service\\' => + array ( + 0 => __DIR__ . '/..' . '/google/apiclient-services/src', + ), + 'Google\\Auth\\' => + array ( + 0 => __DIR__ . '/..' . '/google/auth/src', + ), + 'Google\\' => + array ( + 0 => __DIR__ . '/..' . '/google/apiclient/src', + ), + 'Firebase\\JWT\\' => + array ( + 0 => __DIR__ . '/..' . '/firebase/php-jwt/src', + ), + ); + + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'Google_AccessToken_Revoke' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_AccessToken_Verify' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_AuthHandler_AuthHandlerFactory' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_AuthHandler_Guzzle6AuthHandler' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_AuthHandler_Guzzle7AuthHandler' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Client' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Collection' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Exception' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Http_Batch' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Http_MediaFileUpload' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Http_REST' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Model' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Service' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Service_Exception' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Service_Resource' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Task_Composer' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Task_Exception' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Task_Retryable' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Task_Runner' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + 'Google_Utils_UriTemplate' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit3e6e79e410cd98a8d86f36f772fe3690::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit3e6e79e410cd98a8d86f36f772fe3690::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit3e6e79e410cd98a8d86f36f772fe3690::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 0000000..d93d646 --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,1322 @@ +{ + "packages": [ + { + "name": "firebase/php-jwt", + "version": "v6.11.0", + "version_normalized": "6.11.0.0", + "source": { + "type": "git", + "url": "https://github.com/firebase/php-jwt.git", + "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/8f718f4dfc9c5d5f0c994cdfd103921b43592712", + "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.4", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "psr/cache": "^2.0||^3.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-sodium": "Support EdDSA (Ed25519) signatures", + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, + "time": "2025-01-23T05:11:06+00:00", + "type": "library", + "installation-source": "source", + "autoload": { + "psr-4": { + "Firebase\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Neuman Vong", + "email": "neuman+pear@twilio.com", + "role": "Developer" + }, + { + "name": "Anant Narayanan", + "email": "anant@php.net", + "role": "Developer" + } + ], + "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", + "homepage": "https://github.com/firebase/php-jwt", + "keywords": [ + "jwt", + "php" + ], + "support": { + "issues": "https://github.com/firebase/php-jwt/issues", + "source": "https://github.com/firebase/php-jwt/tree/v6.11.0" + }, + "install-path": "../firebase/php-jwt" + }, + { + "name": "google/apiclient", + "version": "v2.18.2", + "version_normalized": "2.18.2.0", + "source": { + "type": "git", + "url": "https://github.com/googleapis/google-api-php-client.git", + "reference": "d8d201ba8a189a3cd7fb34e4da569f2ed440eee7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/d8d201ba8a189a3cd7fb34e4da569f2ed440eee7", + "reference": "d8d201ba8a189a3cd7fb34e4da569f2ed440eee7", + "shasum": "" + }, + "require": { + "firebase/php-jwt": "^6.0", + "google/apiclient-services": "~0.350", + "google/auth": "^1.37", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.6", + "monolog/monolog": "^2.9||^3.0", + "php": "^8.0", + "phpseclib/phpseclib": "^3.0.36" + }, + "require-dev": { + "cache/filesystem-adapter": "^1.1", + "composer/composer": "^1.10.23", + "phpcompatibility/php-compatibility": "^9.2", + "phpspec/prophecy-phpunit": "^2.1", + "phpunit/phpunit": "^9.6", + "squizlabs/php_codesniffer": "^3.8", + "symfony/css-selector": "~2.1", + "symfony/dom-crawler": "~2.1" + }, + "suggest": { + "cache/filesystem-adapter": "For caching certs and tokens (using Google\\Client::setCache)" + }, + "time": "2024-12-16T22:52:40+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "installation-source": "source", + "autoload": { + "files": [ + "src/aliases.php" + ], + "psr-4": { + "Google\\": "src/" + }, + "classmap": [ + "src/aliases.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "Client library for Google APIs", + "homepage": "http://developers.google.com/api-client-library/php", + "keywords": [ + "google" + ], + "support": { + "issues": "https://github.com/googleapis/google-api-php-client/issues", + "source": "https://github.com/googleapis/google-api-php-client/tree/v2.18.2" + }, + "install-path": "../google/apiclient" + }, + { + "name": "google/apiclient-services", + "version": "v0.396.0", + "version_normalized": "0.396.0.0", + "source": { + "type": "git", + "url": "https://github.com/googleapis/google-api-php-client-services.git", + "reference": "ceb2e432e4326c6775d24f62d554395a1a9ad3dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/ceb2e432e4326c6775d24f62d554395a1a9ad3dd", + "reference": "ceb2e432e4326c6775d24f62d554395a1a9ad3dd", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "time": "2025-02-24T01:10:27+00:00", + "type": "library", + "installation-source": "source", + "autoload": { + "files": [ + "autoload.php" + ], + "psr-4": { + "Google\\Service\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "Client library for Google APIs", + "homepage": "http://developers.google.com/api-client-library/php", + "keywords": [ + "google" + ], + "support": { + "issues": "https://github.com/googleapis/google-api-php-client-services/issues", + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.396.0" + }, + "install-path": "../google/apiclient-services" + }, + { + "name": "google/auth", + "version": "v1.46.0", + "version_normalized": "1.46.0.0", + "source": { + "type": "git", + "url": "https://github.com/googleapis/google-auth-library-php.git", + "reference": "7fafae99a41984cbfb92508174263cf7bf3049b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/7fafae99a41984cbfb92508174263cf7bf3049b9", + "reference": "7fafae99a41984cbfb92508174263cf7bf3049b9", + "shasum": "" + }, + "require": { + "firebase/php-jwt": "^6.0", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.4.5", + "php": "^8.0", + "psr/cache": "^2.0||^3.0", + "psr/http-message": "^1.1||^2.0", + "psr/log": "^3.0" + }, + "require-dev": { + "guzzlehttp/promises": "^2.0", + "kelvinmo/simplejwt": "0.7.1", + "phpseclib/phpseclib": "^3.0.35", + "phpspec/prophecy-phpunit": "^2.1", + "phpunit/phpunit": "^9.6", + "sebastian/comparator": ">=1.2.3", + "squizlabs/php_codesniffer": "^3.5", + "symfony/process": "^6.0||^7.0", + "webmozart/assert": "^1.11" + }, + "suggest": { + "phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2." + }, + "time": "2025-02-12T22:21:37+00:00", + "type": "library", + "installation-source": "source", + "autoload": { + "psr-4": { + "Google\\Auth\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "Google Auth Library for PHP", + "homepage": "https://github.com/google/google-auth-library-php", + "keywords": [ + "Authentication", + "google", + "oauth2" + ], + "support": { + "docs": "https://cloud.google.com/php/docs/reference/auth/latest", + "issues": "https://github.com/googleapis/google-auth-library-php/issues", + "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.46.0" + }, + "install-path": "../google/auth" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.9.2", + "version_normalized": "7.9.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "time": "2024-07-24T11:22:20+00:00", + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "installation-source": "source", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "install-path": "../guzzlehttp/guzzle" + }, + { + "name": "guzzlehttp/promises", + "version": "2.0.4", + "version_normalized": "2.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "time": "2024-10-17T10:06:22+00:00", + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "installation-source": "source", + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "install-path": "../guzzlehttp/promises" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.7.0", + "version_normalized": "2.7.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "time": "2024-07-18T11:15:46+00:00", + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "installation-source": "source", + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.7.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "install-path": "../guzzlehttp/psr7" + }, + { + "name": "monolog/monolog", + "version": "3.8.1", + "version_normalized": "3.8.1.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/aef6ee73a77a66e404dd6540934a9ef1b3c855b4", + "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^2.0 || ^3.0" + }, + "provide": { + "psr/log-implementation": "3.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2 || ^2.0", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.2", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4 || ^3", + "php-console/php-console": "^3.1.8", + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.17 || ^11.0.7", + "predis/predis": "^1.1 || ^2", + "rollbar/rollbar": "^4.0", + "ruflin/elastica": "^7 || ^8", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "time": "2024-12-05T17:15:07+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "installation-source": "source", + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/3.8.1" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "install-path": "../monolog/monolog" + }, + { + "name": "paragonie/constant_time_encoding", + "version": "v3.0.0", + "version_normalized": "3.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "df1e7fde177501eee2037dd159cf04f5f301a512" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/df1e7fde177501eee2037dd159cf04f5f301a512", + "reference": "df1e7fde177501eee2037dd159cf04f5f301a512", + "shasum": "" + }, + "require": { + "php": "^8" + }, + "require-dev": { + "phpunit/phpunit": "^9", + "vimeo/psalm": "^4|^5" + }, + "time": "2024-05-08T12:36:18+00:00", + "type": "library", + "installation-source": "source", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "install-path": "../paragonie/constant_time_encoding" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "version_normalized": "9.99.100.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "time": "2020-10-15T08:29:30+00:00", + "type": "library", + "installation-source": "source", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "install-path": "../paragonie/random_compat" + }, + { + "name": "phpseclib/phpseclib", + "version": "3.0.43", + "version_normalized": "3.0.43.0", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "709ec107af3cb2f385b9617be72af8cf62441d02" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02", + "reference": "709ec107af3cb2f385b9617be72af8cf62441d02", + "shasum": "" + }, + "require": { + "paragonie/constant_time_encoding": "^1|^2|^3", + "paragonie/random_compat": "^1.4|^2.0|^9.99.99", + "php": ">=5.6.1" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "ext-dom": "Install the DOM extension to load XML formatted public keys.", + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "time": "2024-12-14T21:12:59+00:00", + "type": "library", + "installation-source": "source", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib3\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "support": { + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.43" + }, + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "install-path": "../phpseclib/phpseclib" + }, + { + "name": "psr/cache", + "version": "3.0.0", + "version_normalized": "3.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "time": "2021-02-03T23:26:27+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "source", + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "install-path": "../psr/cache" + }, + { + "name": "psr/http-client", + "version": "1.0.3", + "version_normalized": "1.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "time": "2023-09-23T14:17:50+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "source", + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "install-path": "../psr/http-client" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "time": "2024-04-15T12:06:14+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "source", + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "install-path": "../psr/http-factory" + }, + { + "name": "psr/http-message", + "version": "2.0", + "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "time": "2023-04-04T09:54:51+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "source", + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "install-path": "../psr/http-message" + }, + { + "name": "psr/log", + "version": "3.0.2", + "version_normalized": "3.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "time": "2024-09-11T13:17:53+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "installation-source": "source", + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.2" + }, + "install-path": "../psr/log" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "version_normalized": "3.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "time": "2019-03-08T08:55:37+00:00", + "type": "library", + "installation-source": "source", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "install-path": "../ralouphie/getallheaders" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.5.1", + "version_normalized": "3.5.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "time": "2024-09-25T14:20:29+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" + } + }, + "installation-source": "source", + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/deprecation-contracts" + } + ], + "dev": true, + "dev-package-names": [] +} diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php new file mode 100644 index 0000000..a4c01b0 --- /dev/null +++ b/vendor/composer/installed.php @@ -0,0 +1,209 @@ + array( + 'name' => '__root__', + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', + 'reference' => '97074b8725c52a7110cbc94b2f0a244672943834', + 'type' => 'library', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev' => true, + ), + 'versions' => array( + '__root__' => array( + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', + 'reference' => '97074b8725c52a7110cbc94b2f0a244672943834', + 'type' => 'library', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'firebase/php-jwt' => array( + 'pretty_version' => 'v6.11.0', + 'version' => '6.11.0.0', + 'reference' => '8f718f4dfc9c5d5f0c994cdfd103921b43592712', + 'type' => 'library', + 'install_path' => __DIR__ . '/../firebase/php-jwt', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'google/apiclient' => array( + 'pretty_version' => 'v2.18.2', + 'version' => '2.18.2.0', + 'reference' => 'd8d201ba8a189a3cd7fb34e4da569f2ed440eee7', + 'type' => 'library', + 'install_path' => __DIR__ . '/../google/apiclient', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'google/apiclient-services' => array( + 'pretty_version' => 'v0.396.0', + 'version' => '0.396.0.0', + 'reference' => 'ceb2e432e4326c6775d24f62d554395a1a9ad3dd', + 'type' => 'library', + 'install_path' => __DIR__ . '/../google/apiclient-services', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'google/auth' => array( + 'pretty_version' => 'v1.46.0', + 'version' => '1.46.0.0', + 'reference' => '7fafae99a41984cbfb92508174263cf7bf3049b9', + 'type' => 'library', + 'install_path' => __DIR__ . '/../google/auth', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'guzzlehttp/guzzle' => array( + 'pretty_version' => '7.9.2', + 'version' => '7.9.2.0', + 'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b', + 'type' => 'library', + 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'guzzlehttp/promises' => array( + 'pretty_version' => '2.0.4', + 'version' => '2.0.4.0', + 'reference' => 'f9c436286ab2892c7db7be8c8da4ef61ccf7b455', + 'type' => 'library', + 'install_path' => __DIR__ . '/../guzzlehttp/promises', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'guzzlehttp/psr7' => array( + 'pretty_version' => '2.7.0', + 'version' => '2.7.0.0', + 'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201', + 'type' => 'library', + 'install_path' => __DIR__ . '/../guzzlehttp/psr7', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'monolog/monolog' => array( + 'pretty_version' => '3.8.1', + 'version' => '3.8.1.0', + 'reference' => 'aef6ee73a77a66e404dd6540934a9ef1b3c855b4', + 'type' => 'library', + 'install_path' => __DIR__ . '/../monolog/monolog', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'paragonie/constant_time_encoding' => array( + 'pretty_version' => 'v3.0.0', + 'version' => '3.0.0.0', + 'reference' => 'df1e7fde177501eee2037dd159cf04f5f301a512', + 'type' => 'library', + 'install_path' => __DIR__ . '/../paragonie/constant_time_encoding', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'paragonie/random_compat' => array( + 'pretty_version' => 'v9.99.100', + 'version' => '9.99.100.0', + 'reference' => '996434e5492cb4c3edcb9168db6fbb1359ef965a', + 'type' => 'library', + 'install_path' => __DIR__ . '/../paragonie/random_compat', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'phpseclib/phpseclib' => array( + 'pretty_version' => '3.0.43', + 'version' => '3.0.43.0', + 'reference' => '709ec107af3cb2f385b9617be72af8cf62441d02', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpseclib/phpseclib', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/cache' => array( + 'pretty_version' => '3.0.0', + 'version' => '3.0.0.0', + 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/cache', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/http-client' => array( + 'pretty_version' => '1.0.3', + 'version' => '1.0.3.0', + 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/http-client', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/http-client-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0', + ), + ), + 'psr/http-factory' => array( + 'pretty_version' => '1.1.0', + 'version' => '1.1.0.0', + 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/http-factory', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/http-factory-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0', + ), + ), + 'psr/http-message' => array( + 'pretty_version' => '2.0', + 'version' => '2.0.0.0', + 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/http-message', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/http-message-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0', + ), + ), + 'psr/log' => array( + 'pretty_version' => '3.0.2', + 'version' => '3.0.2.0', + 'reference' => 'f16e1d5863e37f8d8c2a01719f5b34baa2b714d3', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/log', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/log-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '3.0.0', + ), + ), + 'ralouphie/getallheaders' => array( + 'pretty_version' => '3.0.3', + 'version' => '3.0.3.0', + 'reference' => '120b605dfeb996808c31b6477290a714d356e822', + 'type' => 'library', + 'install_path' => __DIR__ . '/../ralouphie/getallheaders', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/deprecation-contracts' => array( + 'pretty_version' => 'v3.5.1', + 'version' => '3.5.1.0', + 'reference' => '74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', + 'aliases' => array(), + 'dev_requirement' => false, + ), + ), +); diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php new file mode 100644 index 0000000..4c3a5d6 --- /dev/null +++ b/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 80100)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +}