$data Route placeholders
- *
- * @return bool
- */
- public function isCurrentUrl(string $routeName, array $data = []): bool
- {
- $currentUrl = $this->basePath . $this->uri->getPath();
- $result = $this->routeParser->urlFor($routeName, $data);
-
- return $result === $currentUrl;
- }
-
- /**
- * Get current path on given Uri
- *
- * @param bool $withQueryString
- *
- * @return string
- */
- public function getCurrentUrl(bool $withQueryString = false): string
- {
- $currentUrl = $this->basePath . $this->uri->getPath();
- $query = $this->uri->getQuery();
-
- if ($withQueryString && !empty($query)) {
- $currentUrl .= '?' . $query;
- }
-
- return $currentUrl;
- }
-
- /**
- * Get the uri
- *
- * @return UriInterface
- */
- public function getUri(): UriInterface
- {
- return $this->uri;
- }
-
- /**
- * Set the uri
- *
- * @param UriInterface $uri
- *
- * @return self
- */
- public function setUri(UriInterface $uri): self
- {
- $this->uri = $uri;
-
- return $this;
- }
-
- /**
- * Get the base path
- *
- * @return string
- */
- public function getBasePath(): string
- {
- return $this->basePath;
- }
-
- /**
- * Set the base path
- *
- * @param string $basePath
- *
- * @return self
- */
- public function setBasePath(string $basePath): self
- {
- $this->basePath = $basePath;
-
- return $this;
- }
-}
diff --git a/system/vendor/slim/twig-view/src/TwigRuntimeLoader.php b/system/vendor/slim/twig-view/src/TwigRuntimeLoader.php
deleted file mode 100644
index 2ac9c08..0000000
--- a/system/vendor/slim/twig-view/src/TwigRuntimeLoader.php
+++ /dev/null
@@ -1,54 +0,0 @@
-routeParser = $routeParser;
- $this->uri = $uri;
- $this->basePath = $basePath;
- }
-
- /**
- * Create the runtime implementation of a Twig element.
- *
- * @param string $class
- *
- * @return mixed
- */
- public function load(string $class)
- {
- if (TwigRuntimeExtension::class === $class) {
- return new $class($this->routeParser, $this->uri, $this->basePath);
- }
-
- return null;
- }
-}
diff --git a/system/vendor/symfony/deprecation-contracts/.gitignore b/system/vendor/symfony/deprecation-contracts/.gitignore
deleted file mode 100644
index c49a5d8..0000000
--- a/system/vendor/symfony/deprecation-contracts/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-vendor/
-composer.lock
-phpunit.xml
diff --git a/system/vendor/symfony/deprecation-contracts/CHANGELOG.md b/system/vendor/symfony/deprecation-contracts/CHANGELOG.md
deleted file mode 100644
index 7932e26..0000000
--- a/system/vendor/symfony/deprecation-contracts/CHANGELOG.md
+++ /dev/null
@@ -1,5 +0,0 @@
-CHANGELOG
-=========
-
-The changelog is maintained for all Symfony contracts at the following URL:
-https://github.com/symfony/contracts/blob/main/CHANGELOG.md
diff --git a/system/vendor/symfony/deprecation-contracts/LICENSE b/system/vendor/symfony/deprecation-contracts/LICENSE
deleted file mode 100644
index 406242f..0000000
--- a/system/vendor/symfony/deprecation-contracts/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2020-2022 Fabien Potencier
-
-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/system/vendor/symfony/deprecation-contracts/README.md b/system/vendor/symfony/deprecation-contracts/README.md
deleted file mode 100644
index 4957933..0000000
--- a/system/vendor/symfony/deprecation-contracts/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-Symfony Deprecation Contracts
-=============================
-
-A generic function and convention to trigger deprecation notices.
-
-This package provides a single global function named `trigger_deprecation()` that triggers silenced deprecation notices.
-
-By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component,
-the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments.
-
-The function requires at least 3 arguments:
- - the name of the Composer package that is triggering the deprecation
- - the version of the package that introduced the deprecation
- - the message of the deprecation
- - more arguments can be provided: they will be inserted in the message using `printf()` formatting
-
-Example:
-```php
-trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin');
-```
-
-This will generate the following message:
-`Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.`
-
-While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty
-`function trigger_deprecation() {}` in your application.
diff --git a/system/vendor/symfony/deprecation-contracts/composer.json b/system/vendor/symfony/deprecation-contracts/composer.json
deleted file mode 100644
index cc7cc12..0000000
--- a/system/vendor/symfony/deprecation-contracts/composer.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "symfony/deprecation-contracts",
- "type": "library",
- "description": "A generic function and convention to trigger deprecation notices",
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=7.1"
- },
- "autoload": {
- "files": [
- "function.php"
- ]
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-main": "2.5-dev"
- },
- "thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
- }
- }
-}
diff --git a/system/vendor/symfony/deprecation-contracts/function.php b/system/vendor/symfony/deprecation-contracts/function.php
deleted file mode 100644
index d437150..0000000
--- a/system/vendor/symfony/deprecation-contracts/function.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (!function_exists('trigger_deprecation')) {
- /**
- * Triggers a silenced deprecation notice.
- *
- * @param string $package The name of the Composer package that is triggering the deprecation
- * @param string $version The version of the package that introduced the deprecation
- * @param string $message The message of the deprecation
- * @param mixed ...$args Values to insert in the message using printf() formatting
- *
- * @author Nicolas Grekas
- */
- function trigger_deprecation(string $package, string $version, string $message, ...$args): void
- {
- @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
- }
-}
diff --git a/system/vendor/symfony/event-dispatcher-contracts/.gitignore b/system/vendor/symfony/event-dispatcher-contracts/.gitignore
deleted file mode 100644
index c49a5d8..0000000
--- a/system/vendor/symfony/event-dispatcher-contracts/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-vendor/
-composer.lock
-phpunit.xml
diff --git a/system/vendor/symfony/event-dispatcher-contracts/CHANGELOG.md b/system/vendor/symfony/event-dispatcher-contracts/CHANGELOG.md
deleted file mode 100644
index 7932e26..0000000
--- a/system/vendor/symfony/event-dispatcher-contracts/CHANGELOG.md
+++ /dev/null
@@ -1,5 +0,0 @@
-CHANGELOG
-=========
-
-The changelog is maintained for all Symfony contracts at the following URL:
-https://github.com/symfony/contracts/blob/main/CHANGELOG.md
diff --git a/system/vendor/symfony/event-dispatcher-contracts/Event.php b/system/vendor/symfony/event-dispatcher-contracts/Event.php
deleted file mode 100644
index 46dcb2b..0000000
--- a/system/vendor/symfony/event-dispatcher-contracts/Event.php
+++ /dev/null
@@ -1,54 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Contracts\EventDispatcher;
-
-use Psr\EventDispatcher\StoppableEventInterface;
-
-/**
- * Event is the base class for classes containing event data.
- *
- * This class contains no event data. It is used by events that do not pass
- * state information to an event handler when an event is raised.
- *
- * You can call the method stopPropagation() to abort the execution of
- * further listeners in your event listener.
- *
- * @author Guilherme Blanco
- * @author Jonathan Wage
- * @author Roman Borschel
- * @author Bernhard Schussek
- * @author Nicolas Grekas
- */
-class Event implements StoppableEventInterface
-{
- private $propagationStopped = false;
-
- /**
- * {@inheritdoc}
- */
- public function isPropagationStopped(): bool
- {
- return $this->propagationStopped;
- }
-
- /**
- * Stops the propagation of the event to further event listeners.
- *
- * If multiple event listeners are connected to the same event, no
- * further event listener will be triggered once any trigger calls
- * stopPropagation().
- */
- public function stopPropagation(): void
- {
- $this->propagationStopped = true;
- }
-}
diff --git a/system/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php b/system/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php
deleted file mode 100644
index 351dc51..0000000
--- a/system/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Contracts\EventDispatcher;
-
-use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface;
-
-/**
- * Allows providing hooks on domain-specific lifecycles by dispatching events.
- */
-interface EventDispatcherInterface extends PsrEventDispatcherInterface
-{
- /**
- * Dispatches an event to all registered listeners.
- *
- * @param object $event The event to pass to the event handlers/listeners
- * @param string|null $eventName The name of the event to dispatch. If not supplied,
- * the class of $event should be used instead.
- *
- * @return object The passed $event MUST be returned
- */
- public function dispatch(object $event, string $eventName = null): object;
-}
diff --git a/system/vendor/symfony/event-dispatcher-contracts/LICENSE b/system/vendor/symfony/event-dispatcher-contracts/LICENSE
deleted file mode 100644
index 74cdc2d..0000000
--- a/system/vendor/symfony/event-dispatcher-contracts/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2018-2022 Fabien Potencier
-
-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/system/vendor/symfony/event-dispatcher-contracts/README.md b/system/vendor/symfony/event-dispatcher-contracts/README.md
deleted file mode 100644
index b1ab4c0..0000000
--- a/system/vendor/symfony/event-dispatcher-contracts/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-Symfony EventDispatcher Contracts
-=================================
-
-A set of abstractions extracted out of the Symfony components.
-
-Can be used to build on semantics that the Symfony components proved useful - and
-that already have battle tested implementations.
-
-See https://github.com/symfony/contracts/blob/main/README.md for more information.
diff --git a/system/vendor/symfony/event-dispatcher-contracts/composer.json b/system/vendor/symfony/event-dispatcher-contracts/composer.json
deleted file mode 100644
index 660df81..0000000
--- a/system/vendor/symfony/event-dispatcher-contracts/composer.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "symfony/event-dispatcher-contracts",
- "type": "library",
- "description": "Generic abstractions related to dispatching event",
- "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=7.2.5",
- "psr/event-dispatcher": "^1"
- },
- "suggest": {
- "symfony/event-dispatcher-implementation": ""
- },
- "autoload": {
- "psr-4": { "Symfony\\Contracts\\EventDispatcher\\": "" }
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-main": "2.5-dev"
- },
- "thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
- }
- }
-}
diff --git a/system/vendor/symfony/event-dispatcher/Attribute/AsEventListener.php b/system/vendor/symfony/event-dispatcher/Attribute/AsEventListener.php
deleted file mode 100644
index bb931b8..0000000
--- a/system/vendor/symfony/event-dispatcher/Attribute/AsEventListener.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\EventDispatcher\Attribute;
-
-/**
- * Service tag to autoconfigure event listeners.
- *
- * @author Alexander M. Turek
- */
-#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
-class AsEventListener
-{
- public function __construct(
- public ?string $event = null,
- public ?string $method = null,
- public int $priority = 0,
- public ?string $dispatcher = null,
- ) {
- }
-}
diff --git a/system/vendor/symfony/event-dispatcher/CHANGELOG.md b/system/vendor/symfony/event-dispatcher/CHANGELOG.md
deleted file mode 100644
index 0f98598..0000000
--- a/system/vendor/symfony/event-dispatcher/CHANGELOG.md
+++ /dev/null
@@ -1,91 +0,0 @@
-CHANGELOG
-=========
-
-5.4
----
-
- * Allow `#[AsEventListener]` attribute on methods
-
-5.3
----
-
- * Add `#[AsEventListener]` attribute for declaring listeners on PHP 8
-
-5.1.0
------
-
- * The `LegacyEventDispatcherProxy` class has been deprecated.
- * Added an optional `dispatcher` attribute to the listener and subscriber tags in `RegisterListenerPass`.
-
-5.0.0
------
-
- * The signature of the `EventDispatcherInterface::dispatch()` method has been changed to `dispatch($event, string $eventName = null): object`.
- * The `Event` class has been removed in favor of `Symfony\Contracts\EventDispatcher\Event`.
- * The `TraceableEventDispatcherInterface` has been removed.
- * The `WrappedListener` class is now final.
-
-4.4.0
------
-
- * `AddEventAliasesPass` has been added, allowing applications and bundles to extend the event alias mapping used by `RegisterListenersPass`.
- * Made the `event` attribute of the `kernel.event_listener` tag optional for FQCN events.
-
-4.3.0
------
-
- * The signature of the `EventDispatcherInterface::dispatch()` method should be updated to `dispatch($event, string $eventName = null)`, not doing so is deprecated
- * deprecated the `Event` class, use `Symfony\Contracts\EventDispatcher\Event` instead
-
-4.1.0
------
-
- * added support for invokable event listeners tagged with `kernel.event_listener` by default
- * The `TraceableEventDispatcher::getOrphanedEvents()` method has been added.
- * The `TraceableEventDispatcherInterface` has been deprecated.
-
-4.0.0
------
-
- * removed the `ContainerAwareEventDispatcher` class
- * added the `reset()` method to the `TraceableEventDispatcherInterface`
-
-3.4.0
------
-
- * Implementing `TraceableEventDispatcherInterface` without the `reset()` method has been deprecated.
-
-3.3.0
------
-
- * The ContainerAwareEventDispatcher class has been deprecated. Use EventDispatcher with closure factories instead.
-
-3.0.0
------
-
- * The method `getListenerPriority($eventName, $listener)` has been added to the
- `EventDispatcherInterface`.
- * The methods `Event::setDispatcher()`, `Event::getDispatcher()`, `Event::setName()`
- and `Event::getName()` have been removed.
- The event dispatcher and the event name are passed to the listener call.
-
-2.5.0
------
-
- * added Debug\TraceableEventDispatcher (originally in HttpKernel)
- * changed Debug\TraceableEventDispatcherInterface to extend EventDispatcherInterface
- * added RegisterListenersPass (originally in HttpKernel)
-
-2.1.0
------
-
- * added TraceableEventDispatcherInterface
- * added ContainerAwareEventDispatcher
- * added a reference to the EventDispatcher on the Event
- * added a reference to the Event name on the event
- * added fluid interface to the dispatch() method which now returns the Event
- object
- * added GenericEvent event class
- * added the possibility for subscribers to subscribe several times for the
- same event
- * added ImmutableEventDispatcher
diff --git a/system/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/system/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
deleted file mode 100644
index acfbf61..0000000
--- a/system/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
+++ /dev/null
@@ -1,366 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\EventDispatcher\Debug;
-
-use Psr\EventDispatcher\StoppableEventInterface;
-use Psr\Log\LoggerInterface;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
-use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpFoundation\RequestStack;
-use Symfony\Component\Stopwatch\Stopwatch;
-use Symfony\Contracts\Service\ResetInterface;
-
-/**
- * Collects some data about event listeners.
- *
- * This event dispatcher delegates the dispatching to another one.
- *
- * @author Fabien Potencier
- */
-class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterface
-{
- protected $logger;
- protected $stopwatch;
-
- /**
- * @var \SplObjectStorage
- */
- private $callStack;
- private $dispatcher;
- private $wrappedListeners;
- private $orphanedEvents;
- private $requestStack;
- private $currentRequestHash = '';
-
- public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, LoggerInterface $logger = null, RequestStack $requestStack = null)
- {
- $this->dispatcher = $dispatcher;
- $this->stopwatch = $stopwatch;
- $this->logger = $logger;
- $this->wrappedListeners = [];
- $this->orphanedEvents = [];
- $this->requestStack = $requestStack;
- }
-
- /**
- * {@inheritdoc}
- */
- public function addListener(string $eventName, $listener, int $priority = 0)
- {
- $this->dispatcher->addListener($eventName, $listener, $priority);
- }
-
- /**
- * {@inheritdoc}
- */
- public function addSubscriber(EventSubscriberInterface $subscriber)
- {
- $this->dispatcher->addSubscriber($subscriber);
- }
-
- /**
- * {@inheritdoc}
- */
- public function removeListener(string $eventName, $listener)
- {
- if (isset($this->wrappedListeners[$eventName])) {
- foreach ($this->wrappedListeners[$eventName] as $index => $wrappedListener) {
- if ($wrappedListener->getWrappedListener() === $listener || ($listener instanceof \Closure && $wrappedListener->getWrappedListener() == $listener)) {
- $listener = $wrappedListener;
- unset($this->wrappedListeners[$eventName][$index]);
- break;
- }
- }
- }
-
- return $this->dispatcher->removeListener($eventName, $listener);
- }
-
- /**
- * {@inheritdoc}
- */
- public function removeSubscriber(EventSubscriberInterface $subscriber)
- {
- return $this->dispatcher->removeSubscriber($subscriber);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getListeners(string $eventName = null)
- {
- return $this->dispatcher->getListeners($eventName);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getListenerPriority(string $eventName, $listener)
- {
- // we might have wrapped listeners for the event (if called while dispatching)
- // in that case get the priority by wrapper
- if (isset($this->wrappedListeners[$eventName])) {
- foreach ($this->wrappedListeners[$eventName] as $wrappedListener) {
- if ($wrappedListener->getWrappedListener() === $listener || ($listener instanceof \Closure && $wrappedListener->getWrappedListener() == $listener)) {
- return $this->dispatcher->getListenerPriority($eventName, $wrappedListener);
- }
- }
- }
-
- return $this->dispatcher->getListenerPriority($eventName, $listener);
- }
-
- /**
- * {@inheritdoc}
- */
- public function hasListeners(string $eventName = null)
- {
- return $this->dispatcher->hasListeners($eventName);
- }
-
- /**
- * {@inheritdoc}
- */
- public function dispatch(object $event, string $eventName = null): object
- {
- $eventName = $eventName ?? \get_class($event);
-
- if (null === $this->callStack) {
- $this->callStack = new \SplObjectStorage();
- }
-
- $currentRequestHash = $this->currentRequestHash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_hash($request) : '';
-
- if (null !== $this->logger && $event instanceof StoppableEventInterface && $event->isPropagationStopped()) {
- $this->logger->debug(sprintf('The "%s" event is already stopped. No listeners have been called.', $eventName));
- }
-
- $this->preProcess($eventName);
- try {
- $this->beforeDispatch($eventName, $event);
- try {
- $e = $this->stopwatch->start($eventName, 'section');
- try {
- $this->dispatcher->dispatch($event, $eventName);
- } finally {
- if ($e->isStarted()) {
- $e->stop();
- }
- }
- } finally {
- $this->afterDispatch($eventName, $event);
- }
- } finally {
- $this->currentRequestHash = $currentRequestHash;
- $this->postProcess($eventName);
- }
-
- return $event;
- }
-
- /**
- * @return array
- */
- public function getCalledListeners(Request $request = null)
- {
- if (null === $this->callStack) {
- return [];
- }
-
- $hash = $request ? spl_object_hash($request) : null;
- $called = [];
- foreach ($this->callStack as $listener) {
- [$eventName, $requestHash] = $this->callStack->getInfo();
- if (null === $hash || $hash === $requestHash) {
- $called[] = $listener->getInfo($eventName);
- }
- }
-
- return $called;
- }
-
- /**
- * @return array
- */
- public function getNotCalledListeners(Request $request = null)
- {
- try {
- $allListeners = $this->getListeners();
- } catch (\Exception $e) {
- if (null !== $this->logger) {
- $this->logger->info('An exception was thrown while getting the uncalled listeners.', ['exception' => $e]);
- }
-
- // unable to retrieve the uncalled listeners
- return [];
- }
-
- $hash = $request ? spl_object_hash($request) : null;
- $calledListeners = [];
-
- if (null !== $this->callStack) {
- foreach ($this->callStack as $calledListener) {
- [, $requestHash] = $this->callStack->getInfo();
-
- if (null === $hash || $hash === $requestHash) {
- $calledListeners[] = $calledListener->getWrappedListener();
- }
- }
- }
-
- $notCalled = [];
- foreach ($allListeners as $eventName => $listeners) {
- foreach ($listeners as $listener) {
- if (!\in_array($listener, $calledListeners, true)) {
- if (!$listener instanceof WrappedListener) {
- $listener = new WrappedListener($listener, null, $this->stopwatch, $this);
- }
- $notCalled[] = $listener->getInfo($eventName);
- }
- }
- }
-
- uasort($notCalled, [$this, 'sortNotCalledListeners']);
-
- return $notCalled;
- }
-
- public function getOrphanedEvents(Request $request = null): array
- {
- if ($request) {
- return $this->orphanedEvents[spl_object_hash($request)] ?? [];
- }
-
- if (!$this->orphanedEvents) {
- return [];
- }
-
- return array_merge(...array_values($this->orphanedEvents));
- }
-
- public function reset()
- {
- $this->callStack = null;
- $this->orphanedEvents = [];
- $this->currentRequestHash = '';
- }
-
- /**
- * Proxies all method calls to the original event dispatcher.
- *
- * @param string $method The method name
- * @param array $arguments The method arguments
- *
- * @return mixed
- */
- public function __call(string $method, array $arguments)
- {
- return $this->dispatcher->{$method}(...$arguments);
- }
-
- /**
- * Called before dispatching the event.
- */
- protected function beforeDispatch(string $eventName, object $event)
- {
- }
-
- /**
- * Called after dispatching the event.
- */
- protected function afterDispatch(string $eventName, object $event)
- {
- }
-
- private function preProcess(string $eventName): void
- {
- if (!$this->dispatcher->hasListeners($eventName)) {
- $this->orphanedEvents[$this->currentRequestHash][] = $eventName;
-
- return;
- }
-
- foreach ($this->dispatcher->getListeners($eventName) as $listener) {
- $priority = $this->getListenerPriority($eventName, $listener);
- $wrappedListener = new WrappedListener($listener instanceof WrappedListener ? $listener->getWrappedListener() : $listener, null, $this->stopwatch, $this);
- $this->wrappedListeners[$eventName][] = $wrappedListener;
- $this->dispatcher->removeListener($eventName, $listener);
- $this->dispatcher->addListener($eventName, $wrappedListener, $priority);
- $this->callStack->attach($wrappedListener, [$eventName, $this->currentRequestHash]);
- }
- }
-
- private function postProcess(string $eventName): void
- {
- unset($this->wrappedListeners[$eventName]);
- $skipped = false;
- foreach ($this->dispatcher->getListeners($eventName) as $listener) {
- if (!$listener instanceof WrappedListener) { // #12845: a new listener was added during dispatch.
- continue;
- }
- // Unwrap listener
- $priority = $this->getListenerPriority($eventName, $listener);
- $this->dispatcher->removeListener($eventName, $listener);
- $this->dispatcher->addListener($eventName, $listener->getWrappedListener(), $priority);
-
- if (null !== $this->logger) {
- $context = ['event' => $eventName, 'listener' => $listener->getPretty()];
- }
-
- if ($listener->wasCalled()) {
- if (null !== $this->logger) {
- $this->logger->debug('Notified event "{event}" to listener "{listener}".', $context);
- }
- } else {
- $this->callStack->detach($listener);
- }
-
- if (null !== $this->logger && $skipped) {
- $this->logger->debug('Listener "{listener}" was not called for event "{event}".', $context);
- }
-
- if ($listener->stoppedPropagation()) {
- if (null !== $this->logger) {
- $this->logger->debug('Listener "{listener}" stopped propagation of the event "{event}".', $context);
- }
-
- $skipped = true;
- }
- }
- }
-
- private function sortNotCalledListeners(array $a, array $b)
- {
- if (0 !== $cmp = strcmp($a['event'], $b['event'])) {
- return $cmp;
- }
-
- if (\is_int($a['priority']) && !\is_int($b['priority'])) {
- return 1;
- }
-
- if (!\is_int($a['priority']) && \is_int($b['priority'])) {
- return -1;
- }
-
- if ($a['priority'] === $b['priority']) {
- return 0;
- }
-
- if ($a['priority'] > $b['priority']) {
- return -1;
- }
-
- return 1;
- }
-}
diff --git a/system/vendor/symfony/event-dispatcher/Debug/WrappedListener.php b/system/vendor/symfony/event-dispatcher/Debug/WrappedListener.php
deleted file mode 100644
index 3c4cc13..0000000
--- a/system/vendor/symfony/event-dispatcher/Debug/WrappedListener.php
+++ /dev/null
@@ -1,129 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\EventDispatcher\Debug;
-
-use Psr\EventDispatcher\StoppableEventInterface;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
-use Symfony\Component\Stopwatch\Stopwatch;
-use Symfony\Component\VarDumper\Caster\ClassStub;
-
-/**
- * @author Fabien Potencier
- */
-final class WrappedListener
-{
- private $listener;
- private $optimizedListener;
- private $name;
- private $called;
- private $stoppedPropagation;
- private $stopwatch;
- private $dispatcher;
- private $pretty;
- private $stub;
- private $priority;
- private static $hasClassStub;
-
- public function __construct($listener, ?string $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null)
- {
- $this->listener = $listener;
- $this->optimizedListener = $listener instanceof \Closure ? $listener : (\is_callable($listener) ? \Closure::fromCallable($listener) : null);
- $this->stopwatch = $stopwatch;
- $this->dispatcher = $dispatcher;
- $this->called = false;
- $this->stoppedPropagation = false;
-
- if (\is_array($listener)) {
- $this->name = \is_object($listener[0]) ? get_debug_type($listener[0]) : $listener[0];
- $this->pretty = $this->name.'::'.$listener[1];
- } elseif ($listener instanceof \Closure) {
- $r = new \ReflectionFunction($listener);
- if (str_contains($r->name, '{closure}')) {
- $this->pretty = $this->name = 'closure';
- } elseif ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
- $this->name = $class->name;
- $this->pretty = $this->name.'::'.$r->name;
- } else {
- $this->pretty = $this->name = $r->name;
- }
- } elseif (\is_string($listener)) {
- $this->pretty = $this->name = $listener;
- } else {
- $this->name = get_debug_type($listener);
- $this->pretty = $this->name.'::__invoke';
- }
-
- if (null !== $name) {
- $this->name = $name;
- }
-
- if (null === self::$hasClassStub) {
- self::$hasClassStub = class_exists(ClassStub::class);
- }
- }
-
- public function getWrappedListener()
- {
- return $this->listener;
- }
-
- public function wasCalled(): bool
- {
- return $this->called;
- }
-
- public function stoppedPropagation(): bool
- {
- return $this->stoppedPropagation;
- }
-
- public function getPretty(): string
- {
- return $this->pretty;
- }
-
- public function getInfo(string $eventName): array
- {
- if (null === $this->stub) {
- $this->stub = self::$hasClassStub ? new ClassStub($this->pretty.'()', $this->listener) : $this->pretty.'()';
- }
-
- return [
- 'event' => $eventName,
- 'priority' => null !== $this->priority ? $this->priority : (null !== $this->dispatcher ? $this->dispatcher->getListenerPriority($eventName, $this->listener) : null),
- 'pretty' => $this->pretty,
- 'stub' => $this->stub,
- ];
- }
-
- public function __invoke(object $event, string $eventName, EventDispatcherInterface $dispatcher): void
- {
- $dispatcher = $this->dispatcher ?: $dispatcher;
-
- $this->called = true;
- $this->priority = $dispatcher->getListenerPriority($eventName, $this->listener);
-
- $e = $this->stopwatch->start($this->name, 'event_listener');
-
- try {
- ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
- } finally {
- if ($e->isStarted()) {
- $e->stop();
- }
- }
-
- if ($event instanceof StoppableEventInterface && $event->isPropagationStopped()) {
- $this->stoppedPropagation = true;
- }
- }
-}
diff --git a/system/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php b/system/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php
deleted file mode 100644
index 6e7292b..0000000
--- a/system/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php
+++ /dev/null
@@ -1,46 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\EventDispatcher\DependencyInjection;
-
-use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-/**
- * This pass allows bundles to extend the list of event aliases.
- *
- * @author Alexander M. Turek
- */
-class AddEventAliasesPass implements CompilerPassInterface
-{
- private $eventAliases;
- private $eventAliasesParameter;
-
- public function __construct(array $eventAliases, string $eventAliasesParameter = 'event_dispatcher.event_aliases')
- {
- if (1 < \func_num_args()) {
- trigger_deprecation('symfony/event-dispatcher', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
- }
-
- $this->eventAliases = $eventAliases;
- $this->eventAliasesParameter = $eventAliasesParameter;
- }
-
- public function process(ContainerBuilder $container): void
- {
- $eventAliases = $container->hasParameter($this->eventAliasesParameter) ? $container->getParameter($this->eventAliasesParameter) : [];
-
- $container->setParameter(
- $this->eventAliasesParameter,
- array_merge($eventAliases, $this->eventAliases)
- );
- }
-}
diff --git a/system/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php b/system/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php
deleted file mode 100644
index 5f44ff0..0000000
--- a/system/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php
+++ /dev/null
@@ -1,242 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\EventDispatcher\DependencyInjection;
-
-use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
-use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\EventDispatcher\EventDispatcher;
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
-use Symfony\Contracts\EventDispatcher\Event;
-
-/**
- * Compiler pass to register tagged services for an event dispatcher.
- */
-class RegisterListenersPass implements CompilerPassInterface
-{
- protected $dispatcherService;
- protected $listenerTag;
- protected $subscriberTag;
- protected $eventAliasesParameter;
-
- private $hotPathEvents = [];
- private $hotPathTagName = 'container.hot_path';
- private $noPreloadEvents = [];
- private $noPreloadTagName = 'container.no_preload';
-
- public function __construct(string $dispatcherService = 'event_dispatcher', string $listenerTag = 'kernel.event_listener', string $subscriberTag = 'kernel.event_subscriber', string $eventAliasesParameter = 'event_dispatcher.event_aliases')
- {
- if (0 < \func_num_args()) {
- trigger_deprecation('symfony/event-dispatcher', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
- }
-
- $this->dispatcherService = $dispatcherService;
- $this->listenerTag = $listenerTag;
- $this->subscriberTag = $subscriberTag;
- $this->eventAliasesParameter = $eventAliasesParameter;
- }
-
- /**
- * @return $this
- */
- public function setHotPathEvents(array $hotPathEvents)
- {
- $this->hotPathEvents = array_flip($hotPathEvents);
-
- if (1 < \func_num_args()) {
- trigger_deprecation('symfony/event-dispatcher', '5.4', 'Configuring "$tagName" in "%s" is deprecated.', __METHOD__);
- $this->hotPathTagName = func_get_arg(1);
- }
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function setNoPreloadEvents(array $noPreloadEvents): self
- {
- $this->noPreloadEvents = array_flip($noPreloadEvents);
-
- if (1 < \func_num_args()) {
- trigger_deprecation('symfony/event-dispatcher', '5.4', 'Configuring "$tagName" in "%s" is deprecated.', __METHOD__);
- $this->noPreloadTagName = func_get_arg(1);
- }
-
- return $this;
- }
-
- public function process(ContainerBuilder $container)
- {
- if (!$container->hasDefinition($this->dispatcherService) && !$container->hasAlias($this->dispatcherService)) {
- return;
- }
-
- $aliases = [];
-
- if ($container->hasParameter($this->eventAliasesParameter)) {
- $aliases = $container->getParameter($this->eventAliasesParameter);
- }
-
- $globalDispatcherDefinition = $container->findDefinition($this->dispatcherService);
-
- foreach ($container->findTaggedServiceIds($this->listenerTag, true) as $id => $events) {
- $noPreload = 0;
-
- foreach ($events as $event) {
- $priority = $event['priority'] ?? 0;
-
- if (!isset($event['event'])) {
- if ($container->getDefinition($id)->hasTag($this->subscriberTag)) {
- continue;
- }
-
- $event['method'] = $event['method'] ?? '__invoke';
- $event['event'] = $this->getEventFromTypeDeclaration($container, $id, $event['method']);
- }
-
- $event['event'] = $aliases[$event['event']] ?? $event['event'];
-
- if (!isset($event['method'])) {
- $event['method'] = 'on'.preg_replace_callback([
- '/(?<=\b|_)[a-z]/i',
- '/[^a-z0-9]/i',
- ], function ($matches) { return strtoupper($matches[0]); }, $event['event']);
- $event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']);
-
- if (null !== ($class = $container->getDefinition($id)->getClass()) && ($r = $container->getReflectionClass($class, false)) && !$r->hasMethod($event['method'])) {
- if (!$r->hasMethod('__invoke')) {
- throw new InvalidArgumentException(sprintf('None of the "%s" or "__invoke" methods exist for the service "%s". Please define the "method" attribute on "%s" tags.', $event['method'], $id, $this->listenerTag));
- }
-
- $event['method'] = '__invoke';
- }
- }
-
- $dispatcherDefinition = $globalDispatcherDefinition;
- if (isset($event['dispatcher'])) {
- $dispatcherDefinition = $container->findDefinition($event['dispatcher']);
- }
-
- $dispatcherDefinition->addMethodCall('addListener', [$event['event'], [new ServiceClosureArgument(new Reference($id)), $event['method']], $priority]);
-
- if (isset($this->hotPathEvents[$event['event']])) {
- $container->getDefinition($id)->addTag($this->hotPathTagName);
- } elseif (isset($this->noPreloadEvents[$event['event']])) {
- ++$noPreload;
- }
- }
-
- if ($noPreload && \count($events) === $noPreload) {
- $container->getDefinition($id)->addTag($this->noPreloadTagName);
- }
- }
-
- $extractingDispatcher = new ExtractingEventDispatcher();
-
- foreach ($container->findTaggedServiceIds($this->subscriberTag, true) as $id => $tags) {
- $def = $container->getDefinition($id);
-
- // We must assume that the class value has been correctly filled, even if the service is created by a factory
- $class = $def->getClass();
-
- if (!$r = $container->getReflectionClass($class)) {
- throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
- }
- if (!$r->isSubclassOf(EventSubscriberInterface::class)) {
- throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, EventSubscriberInterface::class));
- }
- $class = $r->name;
-
- $dispatcherDefinitions = [];
- foreach ($tags as $attributes) {
- if (!isset($attributes['dispatcher']) || isset($dispatcherDefinitions[$attributes['dispatcher']])) {
- continue;
- }
-
- $dispatcherDefinitions[$attributes['dispatcher']] = $container->findDefinition($attributes['dispatcher']);
- }
-
- if (!$dispatcherDefinitions) {
- $dispatcherDefinitions = [$globalDispatcherDefinition];
- }
-
- $noPreload = 0;
- ExtractingEventDispatcher::$aliases = $aliases;
- ExtractingEventDispatcher::$subscriber = $class;
- $extractingDispatcher->addSubscriber($extractingDispatcher);
- foreach ($extractingDispatcher->listeners as $args) {
- $args[1] = [new ServiceClosureArgument(new Reference($id)), $args[1]];
- foreach ($dispatcherDefinitions as $dispatcherDefinition) {
- $dispatcherDefinition->addMethodCall('addListener', $args);
- }
-
- if (isset($this->hotPathEvents[$args[0]])) {
- $container->getDefinition($id)->addTag($this->hotPathTagName);
- } elseif (isset($this->noPreloadEvents[$args[0]])) {
- ++$noPreload;
- }
- }
- if ($noPreload && \count($extractingDispatcher->listeners) === $noPreload) {
- $container->getDefinition($id)->addTag($this->noPreloadTagName);
- }
- $extractingDispatcher->listeners = [];
- ExtractingEventDispatcher::$aliases = [];
- }
- }
-
- private function getEventFromTypeDeclaration(ContainerBuilder $container, string $id, string $method): string
- {
- if (
- null === ($class = $container->getDefinition($id)->getClass())
- || !($r = $container->getReflectionClass($class, false))
- || !$r->hasMethod($method)
- || 1 > ($m = $r->getMethod($method))->getNumberOfParameters()
- || !($type = $m->getParameters()[0]->getType()) instanceof \ReflectionNamedType
- || $type->isBuiltin()
- || Event::class === ($name = $type->getName())
- ) {
- throw new InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, $this->listenerTag));
- }
-
- return $name;
- }
-}
-
-/**
- * @internal
- */
-class ExtractingEventDispatcher extends EventDispatcher implements EventSubscriberInterface
-{
- public $listeners = [];
-
- public static $aliases = [];
- public static $subscriber;
-
- public function addListener(string $eventName, $listener, int $priority = 0)
- {
- $this->listeners[] = [$eventName, $listener[1], $priority];
- }
-
- public static function getSubscribedEvents(): array
- {
- $events = [];
-
- foreach ([self::$subscriber, 'getSubscribedEvents']() as $eventName => $params) {
- $events[self::$aliases[$eventName] ?? $eventName] = $params;
- }
-
- return $events;
- }
-}
diff --git a/system/vendor/symfony/event-dispatcher/EventDispatcher.php b/system/vendor/symfony/event-dispatcher/EventDispatcher.php
deleted file mode 100644
index 8fe8fb5..0000000
--- a/system/vendor/symfony/event-dispatcher/EventDispatcher.php
+++ /dev/null
@@ -1,280 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\EventDispatcher;
-
-use Psr\EventDispatcher\StoppableEventInterface;
-use Symfony\Component\EventDispatcher\Debug\WrappedListener;
-
-/**
- * The EventDispatcherInterface is the central point of Symfony's event listener system.
- *
- * Listeners are registered on the manager and events are dispatched through the
- * manager.
- *
- * @author Guilherme Blanco
- * @author Jonathan Wage
- * @author Roman Borschel
- * @author Bernhard Schussek
- * @author Fabien Potencier
- * @author Jordi Boggiano
- * @author Jordan Alliot
- * @author Nicolas Grekas
- */
-class EventDispatcher implements EventDispatcherInterface
-{
- private $listeners = [];
- private $sorted = [];
- private $optimized;
-
- public function __construct()
- {
- if (__CLASS__ === static::class) {
- $this->optimized = [];
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function dispatch(object $event, string $eventName = null): object
- {
- $eventName = $eventName ?? \get_class($event);
-
- if (null !== $this->optimized) {
- $listeners = $this->optimized[$eventName] ?? (empty($this->listeners[$eventName]) ? [] : $this->optimizeListeners($eventName));
- } else {
- $listeners = $this->getListeners($eventName);
- }
-
- if ($listeners) {
- $this->callListeners($listeners, $eventName, $event);
- }
-
- return $event;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getListeners(string $eventName = null)
- {
- if (null !== $eventName) {
- if (empty($this->listeners[$eventName])) {
- return [];
- }
-
- if (!isset($this->sorted[$eventName])) {
- $this->sortListeners($eventName);
- }
-
- return $this->sorted[$eventName];
- }
-
- foreach ($this->listeners as $eventName => $eventListeners) {
- if (!isset($this->sorted[$eventName])) {
- $this->sortListeners($eventName);
- }
- }
-
- return array_filter($this->sorted);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getListenerPriority(string $eventName, $listener)
- {
- if (empty($this->listeners[$eventName])) {
- return null;
- }
-
- if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
- $listener[0] = $listener[0]();
- $listener[1] = $listener[1] ?? '__invoke';
- }
-
- foreach ($this->listeners[$eventName] as $priority => &$listeners) {
- foreach ($listeners as &$v) {
- if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) {
- $v[0] = $v[0]();
- $v[1] = $v[1] ?? '__invoke';
- }
- if ($v === $listener || ($listener instanceof \Closure && $v == $listener)) {
- return $priority;
- }
- }
- }
-
- return null;
- }
-
- /**
- * {@inheritdoc}
- */
- public function hasListeners(string $eventName = null)
- {
- if (null !== $eventName) {
- return !empty($this->listeners[$eventName]);
- }
-
- foreach ($this->listeners as $eventListeners) {
- if ($eventListeners) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- public function addListener(string $eventName, $listener, int $priority = 0)
- {
- $this->listeners[$eventName][$priority][] = $listener;
- unset($this->sorted[$eventName], $this->optimized[$eventName]);
- }
-
- /**
- * {@inheritdoc}
- */
- public function removeListener(string $eventName, $listener)
- {
- if (empty($this->listeners[$eventName])) {
- return;
- }
-
- if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
- $listener[0] = $listener[0]();
- $listener[1] = $listener[1] ?? '__invoke';
- }
-
- foreach ($this->listeners[$eventName] as $priority => &$listeners) {
- foreach ($listeners as $k => &$v) {
- if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) {
- $v[0] = $v[0]();
- $v[1] = $v[1] ?? '__invoke';
- }
- if ($v === $listener || ($listener instanceof \Closure && $v == $listener)) {
- unset($listeners[$k], $this->sorted[$eventName], $this->optimized[$eventName]);
- }
- }
-
- if (!$listeners) {
- unset($this->listeners[$eventName][$priority]);
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function addSubscriber(EventSubscriberInterface $subscriber)
- {
- foreach ($subscriber->getSubscribedEvents() as $eventName => $params) {
- if (\is_string($params)) {
- $this->addListener($eventName, [$subscriber, $params]);
- } elseif (\is_string($params[0])) {
- $this->addListener($eventName, [$subscriber, $params[0]], $params[1] ?? 0);
- } else {
- foreach ($params as $listener) {
- $this->addListener($eventName, [$subscriber, $listener[0]], $listener[1] ?? 0);
- }
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function removeSubscriber(EventSubscriberInterface $subscriber)
- {
- foreach ($subscriber->getSubscribedEvents() as $eventName => $params) {
- if (\is_array($params) && \is_array($params[0])) {
- foreach ($params as $listener) {
- $this->removeListener($eventName, [$subscriber, $listener[0]]);
- }
- } else {
- $this->removeListener($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]);
- }
- }
- }
-
- /**
- * Triggers the listeners of an event.
- *
- * This method can be overridden to add functionality that is executed
- * for each listener.
- *
- * @param callable[] $listeners The event listeners
- * @param string $eventName The name of the event to dispatch
- * @param object $event The event object to pass to the event handlers/listeners
- */
- protected function callListeners(iterable $listeners, string $eventName, object $event)
- {
- $stoppable = $event instanceof StoppableEventInterface;
-
- foreach ($listeners as $listener) {
- if ($stoppable && $event->isPropagationStopped()) {
- break;
- }
- $listener($event, $eventName, $this);
- }
- }
-
- /**
- * Sorts the internal list of listeners for the given event by priority.
- */
- private function sortListeners(string $eventName)
- {
- krsort($this->listeners[$eventName]);
- $this->sorted[$eventName] = [];
-
- foreach ($this->listeners[$eventName] as &$listeners) {
- foreach ($listeners as $k => &$listener) {
- if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
- $listener[0] = $listener[0]();
- $listener[1] = $listener[1] ?? '__invoke';
- }
- $this->sorted[$eventName][] = $listener;
- }
- }
- }
-
- /**
- * Optimizes the internal list of listeners for the given event by priority.
- */
- private function optimizeListeners(string $eventName): array
- {
- krsort($this->listeners[$eventName]);
- $this->optimized[$eventName] = [];
-
- foreach ($this->listeners[$eventName] as &$listeners) {
- foreach ($listeners as &$listener) {
- $closure = &$this->optimized[$eventName][];
- if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
- $closure = static function (...$args) use (&$listener, &$closure) {
- if ($listener[0] instanceof \Closure) {
- $listener[0] = $listener[0]();
- $listener[1] = $listener[1] ?? '__invoke';
- }
- ($closure = \Closure::fromCallable($listener))(...$args);
- };
- } else {
- $closure = $listener instanceof \Closure || $listener instanceof WrappedListener ? $listener : \Closure::fromCallable($listener);
- }
- }
- }
-
- return $this->optimized[$eventName];
- }
-}
diff --git a/system/vendor/symfony/event-dispatcher/EventDispatcherInterface.php b/system/vendor/symfony/event-dispatcher/EventDispatcherInterface.php
deleted file mode 100644
index cc324e1..0000000
--- a/system/vendor/symfony/event-dispatcher/EventDispatcherInterface.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\EventDispatcher;
-
-use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as ContractsEventDispatcherInterface;
-
-/**
- * The EventDispatcherInterface is the central point of Symfony's event listener system.
- * Listeners are registered on the manager and events are dispatched through the
- * manager.
- *
- * @author Bernhard Schussek
- */
-interface EventDispatcherInterface extends ContractsEventDispatcherInterface
-{
- /**
- * Adds an event listener that listens on the specified events.
- *
- * @param int $priority The higher this value, the earlier an event
- * listener will be triggered in the chain (defaults to 0)
- */
- public function addListener(string $eventName, callable $listener, int $priority = 0);
-
- /**
- * Adds an event subscriber.
- *
- * The subscriber is asked for all the events it is
- * interested in and added as a listener for these events.
- */
- public function addSubscriber(EventSubscriberInterface $subscriber);
-
- /**
- * Removes an event listener from the specified events.
- */
- public function removeListener(string $eventName, callable $listener);
-
- public function removeSubscriber(EventSubscriberInterface $subscriber);
-
- /**
- * Gets the listeners of a specific event or all listeners sorted by descending priority.
- *
- * @return array
- */
- public function getListeners(string $eventName = null);
-
- /**
- * Gets the listener priority for a specific event.
- *
- * Returns null if the event or the listener does not exist.
- *
- * @return int|null
- */
- public function getListenerPriority(string $eventName, callable $listener);
-
- /**
- * Checks whether an event has any registered listeners.
- *
- * @return bool
- */
- public function hasListeners(string $eventName = null);
-}
diff --git a/system/vendor/symfony/event-dispatcher/EventSubscriberInterface.php b/system/vendor/symfony/event-dispatcher/EventSubscriberInterface.php
deleted file mode 100644
index 2085e42..0000000
--- a/system/vendor/symfony/event-dispatcher/EventSubscriberInterface.php
+++ /dev/null
@@ -1,49 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\EventDispatcher;
-
-/**
- * An EventSubscriber knows itself what events it is interested in.
- * If an EventSubscriber is added to an EventDispatcherInterface, the manager invokes
- * {@link getSubscribedEvents} and registers the subscriber as a listener for all
- * returned events.
- *
- * @author Guilherme Blanco
- * @author Jonathan Wage
- * @author Roman Borschel
- * @author Bernhard Schussek
- */
-interface EventSubscriberInterface
-{
- /**
- * Returns an array of event names this subscriber wants to listen to.
- *
- * The array keys are event names and the value can be:
- *
- * * The method name to call (priority defaults to 0)
- * * An array composed of the method name to call and the priority
- * * An array of arrays composed of the method names to call and respective
- * priorities, or 0 if unset
- *
- * For instance:
- *
- * * ['eventName' => 'methodName']
- * * ['eventName' => ['methodName', $priority]]
- * * ['eventName' => [['methodName1', $priority], ['methodName2']]]
- *
- * The code must not depend on runtime state as it will only be called at compile time.
- * All logic depending on runtime state must be put into the individual methods handling the events.
- *
- * @return array>
- */
- public static function getSubscribedEvents();
-}
diff --git a/system/vendor/symfony/event-dispatcher/GenericEvent.php b/system/vendor/symfony/event-dispatcher/GenericEvent.php
deleted file mode 100644
index b32a301..0000000
--- a/system/vendor/symfony/event-dispatcher/GenericEvent.php
+++ /dev/null
@@ -1,182 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\EventDispatcher;
-
-use Symfony\Contracts\EventDispatcher\Event;
-
-/**
- * Event encapsulation class.
- *
- * Encapsulates events thus decoupling the observer from the subject they encapsulate.
- *
- * @author Drak
- *
- * @implements \ArrayAccess
- * @implements \IteratorAggregate
- */
-class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
-{
- protected $subject;
- protected $arguments;
-
- /**
- * Encapsulate an event with $subject and $args.
- *
- * @param mixed $subject The subject of the event, usually an object or a callable
- * @param array $arguments Arguments to store in the event
- */
- public function __construct($subject = null, array $arguments = [])
- {
- $this->subject = $subject;
- $this->arguments = $arguments;
- }
-
- /**
- * Getter for subject property.
- *
- * @return mixed
- */
- public function getSubject()
- {
- return $this->subject;
- }
-
- /**
- * Get argument by key.
- *
- * @return mixed
- *
- * @throws \InvalidArgumentException if key is not found
- */
- public function getArgument(string $key)
- {
- if ($this->hasArgument($key)) {
- return $this->arguments[$key];
- }
-
- throw new \InvalidArgumentException(sprintf('Argument "%s" not found.', $key));
- }
-
- /**
- * Add argument to event.
- *
- * @param mixed $value Value
- *
- * @return $this
- */
- public function setArgument(string $key, $value)
- {
- $this->arguments[$key] = $value;
-
- return $this;
- }
-
- /**
- * Getter for all arguments.
- *
- * @return array
- */
- public function getArguments()
- {
- return $this->arguments;
- }
-
- /**
- * Set args property.
- *
- * @return $this
- */
- public function setArguments(array $args = [])
- {
- $this->arguments = $args;
-
- return $this;
- }
-
- /**
- * Has argument.
- *
- * @return bool
- */
- public function hasArgument(string $key)
- {
- return \array_key_exists($key, $this->arguments);
- }
-
- /**
- * ArrayAccess for argument getter.
- *
- * @param string $key Array key
- *
- * @return mixed
- *
- * @throws \InvalidArgumentException if key does not exist in $this->args
- */
- #[\ReturnTypeWillChange]
- public function offsetGet($key)
- {
- return $this->getArgument($key);
- }
-
- /**
- * ArrayAccess for argument setter.
- *
- * @param string $key Array key to set
- * @param mixed $value Value
- *
- * @return void
- */
- #[\ReturnTypeWillChange]
- public function offsetSet($key, $value)
- {
- $this->setArgument($key, $value);
- }
-
- /**
- * ArrayAccess for unset argument.
- *
- * @param string $key Array key
- *
- * @return void
- */
- #[\ReturnTypeWillChange]
- public function offsetUnset($key)
- {
- if ($this->hasArgument($key)) {
- unset($this->arguments[$key]);
- }
- }
-
- /**
- * ArrayAccess has argument.
- *
- * @param string $key Array key
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function offsetExists($key)
- {
- return $this->hasArgument($key);
- }
-
- /**
- * IteratorAggregate for iterating over the object like an array.
- *
- * @return \ArrayIterator
- */
- #[\ReturnTypeWillChange]
- public function getIterator()
- {
- return new \ArrayIterator($this->arguments);
- }
-}
diff --git a/system/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php b/system/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php
deleted file mode 100644
index 568d79c..0000000
--- a/system/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php
+++ /dev/null
@@ -1,91 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\EventDispatcher;
-
-/**
- * A read-only proxy for an event dispatcher.
- *
- * @author Bernhard Schussek
- */
-class ImmutableEventDispatcher implements EventDispatcherInterface
-{
- private $dispatcher;
-
- public function __construct(EventDispatcherInterface $dispatcher)
- {
- $this->dispatcher = $dispatcher;
- }
-
- /**
- * {@inheritdoc}
- */
- public function dispatch(object $event, string $eventName = null): object
- {
- return $this->dispatcher->dispatch($event, $eventName);
- }
-
- /**
- * {@inheritdoc}
- */
- public function addListener(string $eventName, $listener, int $priority = 0)
- {
- throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
- }
-
- /**
- * {@inheritdoc}
- */
- public function addSubscriber(EventSubscriberInterface $subscriber)
- {
- throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
- }
-
- /**
- * {@inheritdoc}
- */
- public function removeListener(string $eventName, $listener)
- {
- throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
- }
-
- /**
- * {@inheritdoc}
- */
- public function removeSubscriber(EventSubscriberInterface $subscriber)
- {
- throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
- }
-
- /**
- * {@inheritdoc}
- */
- public function getListeners(string $eventName = null)
- {
- return $this->dispatcher->getListeners($eventName);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getListenerPriority(string $eventName, $listener)
- {
- return $this->dispatcher->getListenerPriority($eventName, $listener);
- }
-
- /**
- * {@inheritdoc}
- */
- public function hasListeners(string $eventName = null)
- {
- return $this->dispatcher->hasListeners($eventName);
- }
-}
diff --git a/system/vendor/symfony/event-dispatcher/LICENSE b/system/vendor/symfony/event-dispatcher/LICENSE
deleted file mode 100644
index 0138f8f..0000000
--- a/system/vendor/symfony/event-dispatcher/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2004-present Fabien Potencier
-
-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/system/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php b/system/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php
deleted file mode 100644
index 6e17c8f..0000000
--- a/system/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\EventDispatcher;
-
-use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
-
-trigger_deprecation('symfony/event-dispatcher', '5.1', '%s is deprecated, use the event dispatcher without the proxy.', LegacyEventDispatcherProxy::class);
-
-/**
- * A helper class to provide BC/FC with the legacy signature of EventDispatcherInterface::dispatch().
- *
- * @author Nicolas Grekas
- *
- * @deprecated since Symfony 5.1
- */
-final class LegacyEventDispatcherProxy
-{
- public static function decorate(?EventDispatcherInterface $dispatcher): ?EventDispatcherInterface
- {
- return $dispatcher;
- }
-}
diff --git a/system/vendor/symfony/event-dispatcher/README.md b/system/vendor/symfony/event-dispatcher/README.md
deleted file mode 100644
index dcdb68d..0000000
--- a/system/vendor/symfony/event-dispatcher/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-EventDispatcher Component
-=========================
-
-The EventDispatcher component provides tools that allow your application
-components to communicate with each other by dispatching events and listening to
-them.
-
-Resources
----------
-
- * [Documentation](https://symfony.com/doc/current/components/event_dispatcher.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/system/vendor/symfony/event-dispatcher/composer.json b/system/vendor/symfony/event-dispatcher/composer.json
deleted file mode 100644
index 32b42e4..0000000
--- a/system/vendor/symfony/event-dispatcher/composer.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "name": "symfony/event-dispatcher",
- "type": "library",
- "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
- "keywords": [],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1|^3",
- "symfony/event-dispatcher-contracts": "^2|^3",
- "symfony/polyfill-php80": "^1.16"
- },
- "require-dev": {
- "symfony/dependency-injection": "^4.4|^5.0|^6.0",
- "symfony/expression-language": "^4.4|^5.0|^6.0",
- "symfony/config": "^4.4|^5.0|^6.0",
- "symfony/error-handler": "^4.4|^5.0|^6.0",
- "symfony/http-foundation": "^4.4|^5.0|^6.0",
- "symfony/service-contracts": "^1.1|^2|^3",
- "symfony/stopwatch": "^4.4|^5.0|^6.0",
- "psr/log": "^1|^2|^3"
- },
- "conflict": {
- "symfony/dependency-injection": "<4.4"
- },
- "provide": {
- "psr/event-dispatcher-implementation": "1.0",
- "symfony/event-dispatcher-implementation": "2.0"
- },
- "suggest": {
- "symfony/dependency-injection": "",
- "symfony/http-kernel": ""
- },
- "autoload": {
- "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "minimum-stability": "dev"
-}
diff --git a/system/vendor/symfony/finder/CHANGELOG.md b/system/vendor/symfony/finder/CHANGELOG.md
deleted file mode 100644
index 6a44e87..0000000
--- a/system/vendor/symfony/finder/CHANGELOG.md
+++ /dev/null
@@ -1,87 +0,0 @@
-CHANGELOG
-=========
-
-5.4.0
------
-
- * Deprecate `Comparator::setTarget()` and `Comparator::setOperator()`
- * Add a constructor to `Comparator` that allows setting target and operator
- * Finder's iterator has now `Symfony\Component\Finder\SplFileInfo` inner type specified
- * Add recursive .gitignore files support
-
-5.0.0
------
-
- * added `$useNaturalSort` argument to `Finder::sortByName()`
-
-4.3.0
------
-
- * added Finder::ignoreVCSIgnored() to ignore files based on rules listed in .gitignore
-
-4.2.0
------
-
- * added $useNaturalSort option to Finder::sortByName() method
- * the `Finder::sortByName()` method will have a new `$useNaturalSort`
- argument in version 5.0, not defining it is deprecated
- * added `Finder::reverseSorting()` to reverse the sorting
-
-4.0.0
------
-
- * removed `ExceptionInterface`
- * removed `Symfony\Component\Finder\Iterator\FilterIterator`
-
-3.4.0
------
-
- * deprecated `Symfony\Component\Finder\Iterator\FilterIterator`
- * added Finder::hasResults() method to check if any results were found
-
-3.3.0
------
-
- * added double-star matching to Glob::toRegex()
-
-3.0.0
------
-
- * removed deprecated classes
-
-2.8.0
------
-
- * deprecated adapters and related classes
-
-2.5.0
------
- * added support for GLOB_BRACE in the paths passed to Finder::in()
-
-2.3.0
------
-
- * added a way to ignore unreadable directories (via Finder::ignoreUnreadableDirs())
- * unified the way subfolders that are not executable are handled by always throwing an AccessDeniedException exception
-
-2.2.0
------
-
- * added Finder::path() and Finder::notPath() methods
- * added finder adapters to improve performance on specific platforms
- * added support for wildcard characters (glob patterns) in the paths passed
- to Finder::in()
-
-2.1.0
------
-
- * added Finder::sortByAccessedTime(), Finder::sortByChangedTime(), and
- Finder::sortByModifiedTime()
- * added Countable to Finder
- * added support for an array of directories as an argument to
- Finder::exclude()
- * added searching based on the file content via Finder::contains() and
- Finder::notContains()
- * added support for the != operator in the Comparator
- * [BC BREAK] filter expressions (used for file name and content) are no more
- considered as regexps but glob patterns when they are enclosed in '*' or '?'
diff --git a/system/vendor/symfony/finder/Comparator/Comparator.php b/system/vendor/symfony/finder/Comparator/Comparator.php
deleted file mode 100644
index 3af551f..0000000
--- a/system/vendor/symfony/finder/Comparator/Comparator.php
+++ /dev/null
@@ -1,117 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Comparator;
-
-/**
- * @author Fabien Potencier
- */
-class Comparator
-{
- private $target;
- private $operator = '==';
-
- public function __construct(string $target = null, string $operator = '==')
- {
- if (null === $target) {
- trigger_deprecation('symfony/finder', '5.4', 'Constructing a "%s" without setting "$target" is deprecated.', __CLASS__);
- }
-
- $this->target = $target;
- $this->doSetOperator($operator);
- }
-
- /**
- * Gets the target value.
- *
- * @return string
- */
- public function getTarget()
- {
- if (null === $this->target) {
- trigger_deprecation('symfony/finder', '5.4', 'Calling "%s" without initializing the target is deprecated.', __METHOD__);
- }
-
- return $this->target;
- }
-
- /**
- * @deprecated set the target via the constructor instead
- */
- public function setTarget(string $target)
- {
- trigger_deprecation('symfony/finder', '5.4', '"%s" is deprecated. Set the target via the constructor instead.', __METHOD__);
-
- $this->target = $target;
- }
-
- /**
- * Gets the comparison operator.
- *
- * @return string
- */
- public function getOperator()
- {
- return $this->operator;
- }
-
- /**
- * Sets the comparison operator.
- *
- * @throws \InvalidArgumentException
- *
- * @deprecated set the operator via the constructor instead
- */
- public function setOperator(string $operator)
- {
- trigger_deprecation('symfony/finder', '5.4', '"%s" is deprecated. Set the operator via the constructor instead.', __METHOD__);
-
- $this->doSetOperator('' === $operator ? '==' : $operator);
- }
-
- /**
- * Tests against the target.
- *
- * @param mixed $test A test value
- *
- * @return bool
- */
- public function test($test)
- {
- if (null === $this->target) {
- trigger_deprecation('symfony/finder', '5.4', 'Calling "%s" without initializing the target is deprecated.', __METHOD__);
- }
-
- switch ($this->operator) {
- case '>':
- return $test > $this->target;
- case '>=':
- return $test >= $this->target;
- case '<':
- return $test < $this->target;
- case '<=':
- return $test <= $this->target;
- case '!=':
- return $test != $this->target;
- }
-
- return $test == $this->target;
- }
-
- private function doSetOperator(string $operator): void
- {
- if (!\in_array($operator, ['>', '<', '>=', '<=', '==', '!='])) {
- throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator));
- }
-
- $this->operator = $operator;
- }
-}
diff --git a/system/vendor/symfony/finder/Comparator/DateComparator.php b/system/vendor/symfony/finder/Comparator/DateComparator.php
deleted file mode 100644
index 8f651e1..0000000
--- a/system/vendor/symfony/finder/Comparator/DateComparator.php
+++ /dev/null
@@ -1,50 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Comparator;
-
-/**
- * DateCompare compiles date comparisons.
- *
- * @author Fabien Potencier
- */
-class DateComparator extends Comparator
-{
- /**
- * @param string $test A comparison string
- *
- * @throws \InvalidArgumentException If the test is not understood
- */
- public function __construct(string $test)
- {
- if (!preg_match('#^\s*(==|!=|[<>]=?|after|since|before|until)?\s*(.+?)\s*$#i', $test, $matches)) {
- throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a date test.', $test));
- }
-
- try {
- $date = new \DateTime($matches[2]);
- $target = $date->format('U');
- } catch (\Exception $e) {
- throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2]));
- }
-
- $operator = $matches[1] ?? '==';
- if ('since' === $operator || 'after' === $operator) {
- $operator = '>';
- }
-
- if ('until' === $operator || 'before' === $operator) {
- $operator = '<';
- }
-
- parent::__construct($target, $operator);
- }
-}
diff --git a/system/vendor/symfony/finder/Comparator/NumberComparator.php b/system/vendor/symfony/finder/Comparator/NumberComparator.php
deleted file mode 100644
index dd30820..0000000
--- a/system/vendor/symfony/finder/Comparator/NumberComparator.php
+++ /dev/null
@@ -1,78 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Comparator;
-
-/**
- * NumberComparator compiles a simple comparison to an anonymous
- * subroutine, which you can call with a value to be tested again.
- *
- * Now this would be very pointless, if NumberCompare didn't understand
- * magnitudes.
- *
- * The target value may use magnitudes of kilobytes (k, ki),
- * megabytes (m, mi), or gigabytes (g, gi). Those suffixed
- * with an i use the appropriate 2**n version in accordance with the
- * IEC standard: http://physics.nist.gov/cuu/Units/binary.html
- *
- * Based on the Perl Number::Compare module.
- *
- * @author Fabien Potencier PHP port
- * @author Richard Clamp Perl version
- * @copyright 2004-2005 Fabien Potencier
- * @copyright 2002 Richard Clamp
- *
- * @see http://physics.nist.gov/cuu/Units/binary.html
- */
-class NumberComparator extends Comparator
-{
- /**
- * @param string|null $test A comparison string or null
- *
- * @throws \InvalidArgumentException If the test is not understood
- */
- public function __construct(?string $test)
- {
- if (null === $test || !preg_match('#^\s*(==|!=|[<>]=?)?\s*([0-9\.]+)\s*([kmg]i?)?\s*$#i', $test, $matches)) {
- throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a number test.', $test ?? 'null'));
- }
-
- $target = $matches[2];
- if (!is_numeric($target)) {
- throw new \InvalidArgumentException(sprintf('Invalid number "%s".', $target));
- }
- if (isset($matches[3])) {
- // magnitude
- switch (strtolower($matches[3])) {
- case 'k':
- $target *= 1000;
- break;
- case 'ki':
- $target *= 1024;
- break;
- case 'm':
- $target *= 1000000;
- break;
- case 'mi':
- $target *= 1024 * 1024;
- break;
- case 'g':
- $target *= 1000000000;
- break;
- case 'gi':
- $target *= 1024 * 1024 * 1024;
- break;
- }
- }
-
- parent::__construct($target, $matches[1] ?: '==');
- }
-}
diff --git a/system/vendor/symfony/finder/Exception/AccessDeniedException.php b/system/vendor/symfony/finder/Exception/AccessDeniedException.php
deleted file mode 100644
index ee195ea..0000000
--- a/system/vendor/symfony/finder/Exception/AccessDeniedException.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Exception;
-
-/**
- * @author Jean-François Simon
- */
-class AccessDeniedException extends \UnexpectedValueException
-{
-}
diff --git a/system/vendor/symfony/finder/Exception/DirectoryNotFoundException.php b/system/vendor/symfony/finder/Exception/DirectoryNotFoundException.php
deleted file mode 100644
index c6cc0f2..0000000
--- a/system/vendor/symfony/finder/Exception/DirectoryNotFoundException.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Exception;
-
-/**
- * @author Andreas Erhard
- */
-class DirectoryNotFoundException extends \InvalidArgumentException
-{
-}
diff --git a/system/vendor/symfony/finder/Finder.php b/system/vendor/symfony/finder/Finder.php
deleted file mode 100644
index 0b56965..0000000
--- a/system/vendor/symfony/finder/Finder.php
+++ /dev/null
@@ -1,806 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder;
-
-use Symfony\Component\Finder\Comparator\DateComparator;
-use Symfony\Component\Finder\Comparator\NumberComparator;
-use Symfony\Component\Finder\Exception\DirectoryNotFoundException;
-use Symfony\Component\Finder\Iterator\CustomFilterIterator;
-use Symfony\Component\Finder\Iterator\DateRangeFilterIterator;
-use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator;
-use Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator;
-use Symfony\Component\Finder\Iterator\FilecontentFilterIterator;
-use Symfony\Component\Finder\Iterator\FilenameFilterIterator;
-use Symfony\Component\Finder\Iterator\LazyIterator;
-use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator;
-use Symfony\Component\Finder\Iterator\SortableIterator;
-
-/**
- * Finder allows to build rules to find files and directories.
- *
- * It is a thin wrapper around several specialized iterator classes.
- *
- * All rules may be invoked several times.
- *
- * All methods return the current Finder object to allow chaining:
- *
- * $finder = Finder::create()->files()->name('*.php')->in(__DIR__);
- *
- * @author Fabien Potencier
- *
- * @implements \IteratorAggregate
- */
-class Finder implements \IteratorAggregate, \Countable
-{
- public const IGNORE_VCS_FILES = 1;
- public const IGNORE_DOT_FILES = 2;
- public const IGNORE_VCS_IGNORED_FILES = 4;
-
- private $mode = 0;
- private $names = [];
- private $notNames = [];
- private $exclude = [];
- private $filters = [];
- private $depths = [];
- private $sizes = [];
- private $followLinks = false;
- private $reverseSorting = false;
- private $sort = false;
- private $ignore = 0;
- private $dirs = [];
- private $dates = [];
- private $iterators = [];
- private $contains = [];
- private $notContains = [];
- private $paths = [];
- private $notPaths = [];
- private $ignoreUnreadableDirs = false;
-
- private static $vcsPatterns = ['.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg'];
-
- public function __construct()
- {
- $this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES;
- }
-
- /**
- * Creates a new Finder.
- *
- * @return static
- */
- public static function create()
- {
- return new static();
- }
-
- /**
- * Restricts the matching to directories only.
- *
- * @return $this
- */
- public function directories()
- {
- $this->mode = Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES;
-
- return $this;
- }
-
- /**
- * Restricts the matching to files only.
- *
- * @return $this
- */
- public function files()
- {
- $this->mode = Iterator\FileTypeFilterIterator::ONLY_FILES;
-
- return $this;
- }
-
- /**
- * Adds tests for the directory depth.
- *
- * Usage:
- *
- * $finder->depth('> 1') // the Finder will start matching at level 1.
- * $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point.
- * $finder->depth(['>= 1', '< 3'])
- *
- * @param string|int|string[]|int[] $levels The depth level expression or an array of depth levels
- *
- * @return $this
- *
- * @see DepthRangeFilterIterator
- * @see NumberComparator
- */
- public function depth($levels)
- {
- foreach ((array) $levels as $level) {
- $this->depths[] = new Comparator\NumberComparator($level);
- }
-
- return $this;
- }
-
- /**
- * Adds tests for file dates (last modified).
- *
- * The date must be something that strtotime() is able to parse:
- *
- * $finder->date('since yesterday');
- * $finder->date('until 2 days ago');
- * $finder->date('> now - 2 hours');
- * $finder->date('>= 2005-10-15');
- * $finder->date(['>= 2005-10-15', '<= 2006-05-27']);
- *
- * @param string|string[] $dates A date range string or an array of date ranges
- *
- * @return $this
- *
- * @see strtotime
- * @see DateRangeFilterIterator
- * @see DateComparator
- */
- public function date($dates)
- {
- foreach ((array) $dates as $date) {
- $this->dates[] = new Comparator\DateComparator($date);
- }
-
- return $this;
- }
-
- /**
- * Adds rules that files must match.
- *
- * You can use patterns (delimited with / sign), globs or simple strings.
- *
- * $finder->name('/\.php$/')
- * $finder->name('*.php') // same as above, without dot files
- * $finder->name('test.php')
- * $finder->name(['test.py', 'test.php'])
- *
- * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns
- *
- * @return $this
- *
- * @see FilenameFilterIterator
- */
- public function name($patterns)
- {
- $this->names = array_merge($this->names, (array) $patterns);
-
- return $this;
- }
-
- /**
- * Adds rules that files must not match.
- *
- * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns
- *
- * @return $this
- *
- * @see FilenameFilterIterator
- */
- public function notName($patterns)
- {
- $this->notNames = array_merge($this->notNames, (array) $patterns);
-
- return $this;
- }
-
- /**
- * Adds tests that file contents must match.
- *
- * Strings or PCRE patterns can be used:
- *
- * $finder->contains('Lorem ipsum')
- * $finder->contains('/Lorem ipsum/i')
- * $finder->contains(['dolor', '/ipsum/i'])
- *
- * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns
- *
- * @return $this
- *
- * @see FilecontentFilterIterator
- */
- public function contains($patterns)
- {
- $this->contains = array_merge($this->contains, (array) $patterns);
-
- return $this;
- }
-
- /**
- * Adds tests that file contents must not match.
- *
- * Strings or PCRE patterns can be used:
- *
- * $finder->notContains('Lorem ipsum')
- * $finder->notContains('/Lorem ipsum/i')
- * $finder->notContains(['lorem', '/dolor/i'])
- *
- * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns
- *
- * @return $this
- *
- * @see FilecontentFilterIterator
- */
- public function notContains($patterns)
- {
- $this->notContains = array_merge($this->notContains, (array) $patterns);
-
- return $this;
- }
-
- /**
- * Adds rules that filenames must match.
- *
- * You can use patterns (delimited with / sign) or simple strings.
- *
- * $finder->path('some/special/dir')
- * $finder->path('/some\/special\/dir/') // same as above
- * $finder->path(['some dir', 'another/dir'])
- *
- * Use only / as dirname separator.
- *
- * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns
- *
- * @return $this
- *
- * @see FilenameFilterIterator
- */
- public function path($patterns)
- {
- $this->paths = array_merge($this->paths, (array) $patterns);
-
- return $this;
- }
-
- /**
- * Adds rules that filenames must not match.
- *
- * You can use patterns (delimited with / sign) or simple strings.
- *
- * $finder->notPath('some/special/dir')
- * $finder->notPath('/some\/special\/dir/') // same as above
- * $finder->notPath(['some/file.txt', 'another/file.log'])
- *
- * Use only / as dirname separator.
- *
- * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns
- *
- * @return $this
- *
- * @see FilenameFilterIterator
- */
- public function notPath($patterns)
- {
- $this->notPaths = array_merge($this->notPaths, (array) $patterns);
-
- return $this;
- }
-
- /**
- * Adds tests for file sizes.
- *
- * $finder->size('> 10K');
- * $finder->size('<= 1Ki');
- * $finder->size(4);
- * $finder->size(['> 10K', '< 20K'])
- *
- * @param string|int|string[]|int[] $sizes A size range string or an integer or an array of size ranges
- *
- * @return $this
- *
- * @see SizeRangeFilterIterator
- * @see NumberComparator
- */
- public function size($sizes)
- {
- foreach ((array) $sizes as $size) {
- $this->sizes[] = new Comparator\NumberComparator($size);
- }
-
- return $this;
- }
-
- /**
- * Excludes directories.
- *
- * Directories passed as argument must be relative to the ones defined with the `in()` method. For example:
- *
- * $finder->in(__DIR__)->exclude('ruby');
- *
- * @param string|array $dirs A directory path or an array of directories
- *
- * @return $this
- *
- * @see ExcludeDirectoryFilterIterator
- */
- public function exclude($dirs)
- {
- $this->exclude = array_merge($this->exclude, (array) $dirs);
-
- return $this;
- }
-
- /**
- * Excludes "hidden" directories and files (starting with a dot).
- *
- * This option is enabled by default.
- *
- * @return $this
- *
- * @see ExcludeDirectoryFilterIterator
- */
- public function ignoreDotFiles(bool $ignoreDotFiles)
- {
- if ($ignoreDotFiles) {
- $this->ignore |= static::IGNORE_DOT_FILES;
- } else {
- $this->ignore &= ~static::IGNORE_DOT_FILES;
- }
-
- return $this;
- }
-
- /**
- * Forces the finder to ignore version control directories.
- *
- * This option is enabled by default.
- *
- * @return $this
- *
- * @see ExcludeDirectoryFilterIterator
- */
- public function ignoreVCS(bool $ignoreVCS)
- {
- if ($ignoreVCS) {
- $this->ignore |= static::IGNORE_VCS_FILES;
- } else {
- $this->ignore &= ~static::IGNORE_VCS_FILES;
- }
-
- return $this;
- }
-
- /**
- * Forces Finder to obey .gitignore and ignore files based on rules listed there.
- *
- * This option is disabled by default.
- *
- * @return $this
- */
- public function ignoreVCSIgnored(bool $ignoreVCSIgnored)
- {
- if ($ignoreVCSIgnored) {
- $this->ignore |= static::IGNORE_VCS_IGNORED_FILES;
- } else {
- $this->ignore &= ~static::IGNORE_VCS_IGNORED_FILES;
- }
-
- return $this;
- }
-
- /**
- * Adds VCS patterns.
- *
- * @see ignoreVCS()
- *
- * @param string|string[] $pattern VCS patterns to ignore
- */
- public static function addVCSPattern($pattern)
- {
- foreach ((array) $pattern as $p) {
- self::$vcsPatterns[] = $p;
- }
-
- self::$vcsPatterns = array_unique(self::$vcsPatterns);
- }
-
- /**
- * Sorts files and directories by an anonymous function.
- *
- * The anonymous function receives two \SplFileInfo instances to compare.
- *
- * This can be slow as all the matching files and directories must be retrieved for comparison.
- *
- * @return $this
- *
- * @see SortableIterator
- */
- public function sort(\Closure $closure)
- {
- $this->sort = $closure;
-
- return $this;
- }
-
- /**
- * Sorts files and directories by name.
- *
- * This can be slow as all the matching files and directories must be retrieved for comparison.
- *
- * @return $this
- *
- * @see SortableIterator
- */
- public function sortByName(bool $useNaturalSort = false)
- {
- $this->sort = $useNaturalSort ? Iterator\SortableIterator::SORT_BY_NAME_NATURAL : Iterator\SortableIterator::SORT_BY_NAME;
-
- return $this;
- }
-
- /**
- * Sorts files and directories by type (directories before files), then by name.
- *
- * This can be slow as all the matching files and directories must be retrieved for comparison.
- *
- * @return $this
- *
- * @see SortableIterator
- */
- public function sortByType()
- {
- $this->sort = Iterator\SortableIterator::SORT_BY_TYPE;
-
- return $this;
- }
-
- /**
- * Sorts files and directories by the last accessed time.
- *
- * This is the time that the file was last accessed, read or written to.
- *
- * This can be slow as all the matching files and directories must be retrieved for comparison.
- *
- * @return $this
- *
- * @see SortableIterator
- */
- public function sortByAccessedTime()
- {
- $this->sort = Iterator\SortableIterator::SORT_BY_ACCESSED_TIME;
-
- return $this;
- }
-
- /**
- * Reverses the sorting.
- *
- * @return $this
- */
- public function reverseSorting()
- {
- $this->reverseSorting = true;
-
- return $this;
- }
-
- /**
- * Sorts files and directories by the last inode changed time.
- *
- * This is the time that the inode information was last modified (permissions, owner, group or other metadata).
- *
- * On Windows, since inode is not available, changed time is actually the file creation time.
- *
- * This can be slow as all the matching files and directories must be retrieved for comparison.
- *
- * @return $this
- *
- * @see SortableIterator
- */
- public function sortByChangedTime()
- {
- $this->sort = Iterator\SortableIterator::SORT_BY_CHANGED_TIME;
-
- return $this;
- }
-
- /**
- * Sorts files and directories by the last modified time.
- *
- * This is the last time the actual contents of the file were last modified.
- *
- * This can be slow as all the matching files and directories must be retrieved for comparison.
- *
- * @return $this
- *
- * @see SortableIterator
- */
- public function sortByModifiedTime()
- {
- $this->sort = Iterator\SortableIterator::SORT_BY_MODIFIED_TIME;
-
- return $this;
- }
-
- /**
- * Filters the iterator with an anonymous function.
- *
- * The anonymous function receives a \SplFileInfo and must return false
- * to remove files.
- *
- * @return $this
- *
- * @see CustomFilterIterator
- */
- public function filter(\Closure $closure)
- {
- $this->filters[] = $closure;
-
- return $this;
- }
-
- /**
- * Forces the following of symlinks.
- *
- * @return $this
- */
- public function followLinks()
- {
- $this->followLinks = true;
-
- return $this;
- }
-
- /**
- * Tells finder to ignore unreadable directories.
- *
- * By default, scanning unreadable directories content throws an AccessDeniedException.
- *
- * @return $this
- */
- public function ignoreUnreadableDirs(bool $ignore = true)
- {
- $this->ignoreUnreadableDirs = $ignore;
-
- return $this;
- }
-
- /**
- * Searches files and directories which match defined rules.
- *
- * @param string|string[] $dirs A directory path or an array of directories
- *
- * @return $this
- *
- * @throws DirectoryNotFoundException if one of the directories does not exist
- */
- public function in($dirs)
- {
- $resolvedDirs = [];
-
- foreach ((array) $dirs as $dir) {
- if (is_dir($dir)) {
- $resolvedDirs[] = [$this->normalizeDir($dir)];
- } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) {
- sort($glob);
- $resolvedDirs[] = array_map([$this, 'normalizeDir'], $glob);
- } else {
- throw new DirectoryNotFoundException(sprintf('The "%s" directory does not exist.', $dir));
- }
- }
-
- $this->dirs = array_merge($this->dirs, ...$resolvedDirs);
-
- return $this;
- }
-
- /**
- * Returns an Iterator for the current Finder configuration.
- *
- * This method implements the IteratorAggregate interface.
- *
- * @return \Iterator
- *
- * @throws \LogicException if the in() method has not been called
- */
- #[\ReturnTypeWillChange]
- public function getIterator()
- {
- if (0 === \count($this->dirs) && 0 === \count($this->iterators)) {
- throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.');
- }
-
- if (1 === \count($this->dirs) && 0 === \count($this->iterators)) {
- $iterator = $this->searchInDirectory($this->dirs[0]);
-
- if ($this->sort || $this->reverseSorting) {
- $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator();
- }
-
- return $iterator;
- }
-
- $iterator = new \AppendIterator();
- foreach ($this->dirs as $dir) {
- $iterator->append(new \IteratorIterator(new LazyIterator(function () use ($dir) {
- return $this->searchInDirectory($dir);
- })));
- }
-
- foreach ($this->iterators as $it) {
- $iterator->append($it);
- }
-
- if ($this->sort || $this->reverseSorting) {
- $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator();
- }
-
- return $iterator;
- }
-
- /**
- * Appends an existing set of files/directories to the finder.
- *
- * The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array.
- *
- * @return $this
- *
- * @throws \InvalidArgumentException when the given argument is not iterable
- */
- public function append(iterable $iterator)
- {
- if ($iterator instanceof \IteratorAggregate) {
- $this->iterators[] = $iterator->getIterator();
- } elseif ($iterator instanceof \Iterator) {
- $this->iterators[] = $iterator;
- } elseif (is_iterable($iterator)) {
- $it = new \ArrayIterator();
- foreach ($iterator as $file) {
- $file = $file instanceof \SplFileInfo ? $file : new \SplFileInfo($file);
- $it[$file->getPathname()] = $file;
- }
- $this->iterators[] = $it;
- } else {
- throw new \InvalidArgumentException('Finder::append() method wrong argument type.');
- }
-
- return $this;
- }
-
- /**
- * Check if any results were found.
- *
- * @return bool
- */
- public function hasResults()
- {
- foreach ($this->getIterator() as $_) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Counts all the results collected by the iterators.
- *
- * @return int
- */
- #[\ReturnTypeWillChange]
- public function count()
- {
- return iterator_count($this->getIterator());
- }
-
- private function searchInDirectory(string $dir): \Iterator
- {
- $exclude = $this->exclude;
- $notPaths = $this->notPaths;
-
- if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) {
- $exclude = array_merge($exclude, self::$vcsPatterns);
- }
-
- if (static::IGNORE_DOT_FILES === (static::IGNORE_DOT_FILES & $this->ignore)) {
- $notPaths[] = '#(^|/)\..+(/|$)#';
- }
-
- $minDepth = 0;
- $maxDepth = \PHP_INT_MAX;
-
- foreach ($this->depths as $comparator) {
- switch ($comparator->getOperator()) {
- case '>':
- $minDepth = $comparator->getTarget() + 1;
- break;
- case '>=':
- $minDepth = $comparator->getTarget();
- break;
- case '<':
- $maxDepth = $comparator->getTarget() - 1;
- break;
- case '<=':
- $maxDepth = $comparator->getTarget();
- break;
- default:
- $minDepth = $maxDepth = $comparator->getTarget();
- }
- }
-
- $flags = \RecursiveDirectoryIterator::SKIP_DOTS;
-
- if ($this->followLinks) {
- $flags |= \RecursiveDirectoryIterator::FOLLOW_SYMLINKS;
- }
-
- $iterator = new Iterator\RecursiveDirectoryIterator($dir, $flags, $this->ignoreUnreadableDirs);
-
- if ($exclude) {
- $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $exclude);
- }
-
- $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST);
-
- if ($minDepth > 0 || $maxDepth < \PHP_INT_MAX) {
- $iterator = new Iterator\DepthRangeFilterIterator($iterator, $minDepth, $maxDepth);
- }
-
- if ($this->mode) {
- $iterator = new Iterator\FileTypeFilterIterator($iterator, $this->mode);
- }
-
- if ($this->names || $this->notNames) {
- $iterator = new Iterator\FilenameFilterIterator($iterator, $this->names, $this->notNames);
- }
-
- if ($this->contains || $this->notContains) {
- $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains);
- }
-
- if ($this->sizes) {
- $iterator = new Iterator\SizeRangeFilterIterator($iterator, $this->sizes);
- }
-
- if ($this->dates) {
- $iterator = new Iterator\DateRangeFilterIterator($iterator, $this->dates);
- }
-
- if ($this->filters) {
- $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters);
- }
-
- if ($this->paths || $notPaths) {
- $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $notPaths);
- }
-
- if (static::IGNORE_VCS_IGNORED_FILES === (static::IGNORE_VCS_IGNORED_FILES & $this->ignore)) {
- $iterator = new Iterator\VcsIgnoredFilterIterator($iterator, $dir);
- }
-
- return $iterator;
- }
-
- /**
- * Normalizes given directory names by removing trailing slashes.
- *
- * Excluding: (s)ftp:// or ssh2.(s)ftp:// wrapper
- */
- private function normalizeDir(string $dir): string
- {
- if ('/' === $dir) {
- return $dir;
- }
-
- $dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR);
-
- if (preg_match('#^(ssh2\.)?s?ftp://#', $dir)) {
- $dir .= '/';
- }
-
- return $dir;
- }
-}
diff --git a/system/vendor/symfony/finder/Gitignore.php b/system/vendor/symfony/finder/Gitignore.php
deleted file mode 100644
index d42cca1..0000000
--- a/system/vendor/symfony/finder/Gitignore.php
+++ /dev/null
@@ -1,93 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder;
-
-/**
- * Gitignore matches against text.
- *
- * @author Michael Voříšek
- * @author Ahmed Abdou
- */
-class Gitignore
-{
- /**
- * Returns a regexp which is the equivalent of the gitignore pattern.
- *
- * Format specification: https://git-scm.com/docs/gitignore#_pattern_format
- */
- public static function toRegex(string $gitignoreFileContent): string
- {
- return self::buildRegex($gitignoreFileContent, false);
- }
-
- public static function toRegexMatchingNegatedPatterns(string $gitignoreFileContent): string
- {
- return self::buildRegex($gitignoreFileContent, true);
- }
-
- private static function buildRegex(string $gitignoreFileContent, bool $inverted): string
- {
- $gitignoreFileContent = preg_replace('~(?
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder;
-
-/**
- * Glob matches globbing patterns against text.
- *
- * if match_glob("foo.*", "foo.bar") echo "matched\n";
- *
- * // prints foo.bar and foo.baz
- * $regex = glob_to_regex("foo.*");
- * for (['foo.bar', 'foo.baz', 'foo', 'bar'] as $t)
- * {
- * if (/$regex/) echo "matched: $car\n";
- * }
- *
- * Glob implements glob(3) style matching that can be used to match
- * against text, rather than fetching names from a filesystem.
- *
- * Based on the Perl Text::Glob module.
- *
- * @author Fabien Potencier PHP port
- * @author Richard Clamp Perl version
- * @copyright 2004-2005 Fabien Potencier
- * @copyright 2002 Richard Clamp
- */
-class Glob
-{
- /**
- * Returns a regexp which is the equivalent of the glob pattern.
- *
- * @return string
- */
- public static function toRegex(string $glob, bool $strictLeadingDot = true, bool $strictWildcardSlash = true, string $delimiter = '#')
- {
- $firstByte = true;
- $escaping = false;
- $inCurlies = 0;
- $regex = '';
- $sizeGlob = \strlen($glob);
- for ($i = 0; $i < $sizeGlob; ++$i) {
- $car = $glob[$i];
- if ($firstByte && $strictLeadingDot && '.' !== $car) {
- $regex .= '(?=[^\.])';
- }
-
- $firstByte = '/' === $car;
-
- if ($firstByte && $strictWildcardSlash && isset($glob[$i + 2]) && '**' === $glob[$i + 1].$glob[$i + 2] && (!isset($glob[$i + 3]) || '/' === $glob[$i + 3])) {
- $car = '[^/]++/';
- if (!isset($glob[$i + 3])) {
- $car .= '?';
- }
-
- if ($strictLeadingDot) {
- $car = '(?=[^\.])'.$car;
- }
-
- $car = '/(?:'.$car.')*';
- $i += 2 + isset($glob[$i + 3]);
-
- if ('/' === $delimiter) {
- $car = str_replace('/', '\\/', $car);
- }
- }
-
- if ($delimiter === $car || '.' === $car || '(' === $car || ')' === $car || '|' === $car || '+' === $car || '^' === $car || '$' === $car) {
- $regex .= "\\$car";
- } elseif ('*' === $car) {
- $regex .= $escaping ? '\\*' : ($strictWildcardSlash ? '[^/]*' : '.*');
- } elseif ('?' === $car) {
- $regex .= $escaping ? '\\?' : ($strictWildcardSlash ? '[^/]' : '.');
- } elseif ('{' === $car) {
- $regex .= $escaping ? '\\{' : '(';
- if (!$escaping) {
- ++$inCurlies;
- }
- } elseif ('}' === $car && $inCurlies) {
- $regex .= $escaping ? '}' : ')';
- if (!$escaping) {
- --$inCurlies;
- }
- } elseif (',' === $car && $inCurlies) {
- $regex .= $escaping ? ',' : '|';
- } elseif ('\\' === $car) {
- if ($escaping) {
- $regex .= '\\\\';
- $escaping = false;
- } else {
- $escaping = true;
- }
-
- continue;
- } else {
- $regex .= $car;
- }
- $escaping = false;
- }
-
- return $delimiter.'^'.$regex.'$'.$delimiter;
- }
-}
diff --git a/system/vendor/symfony/finder/Iterator/CustomFilterIterator.php b/system/vendor/symfony/finder/Iterator/CustomFilterIterator.php
deleted file mode 100644
index f7bf19b..0000000
--- a/system/vendor/symfony/finder/Iterator/CustomFilterIterator.php
+++ /dev/null
@@ -1,64 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * CustomFilterIterator filters files by applying anonymous functions.
- *
- * The anonymous function receives a \SplFileInfo and must return false
- * to remove files.
- *
- * @author Fabien Potencier
- *
- * @extends \FilterIterator
- */
-class CustomFilterIterator extends \FilterIterator
-{
- private $filters = [];
-
- /**
- * @param \Iterator $iterator The Iterator to filter
- * @param callable[] $filters An array of PHP callbacks
- *
- * @throws \InvalidArgumentException
- */
- public function __construct(\Iterator $iterator, array $filters)
- {
- foreach ($filters as $filter) {
- if (!\is_callable($filter)) {
- throw new \InvalidArgumentException('Invalid PHP callback.');
- }
- }
- $this->filters = $filters;
-
- parent::__construct($iterator);
- }
-
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- $fileinfo = $this->current();
-
- foreach ($this->filters as $filter) {
- if (false === $filter($fileinfo)) {
- return false;
- }
- }
-
- return true;
- }
-}
diff --git a/system/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php b/system/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php
deleted file mode 100644
index f592e19..0000000
--- a/system/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php
+++ /dev/null
@@ -1,61 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-use Symfony\Component\Finder\Comparator\DateComparator;
-
-/**
- * DateRangeFilterIterator filters out files that are not in the given date range (last modified dates).
- *
- * @author Fabien Potencier
- *
- * @extends \FilterIterator
- */
-class DateRangeFilterIterator extends \FilterIterator
-{
- private $comparators = [];
-
- /**
- * @param \Iterator $iterator
- * @param DateComparator[] $comparators
- */
- public function __construct(\Iterator $iterator, array $comparators)
- {
- $this->comparators = $comparators;
-
- parent::__construct($iterator);
- }
-
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- $fileinfo = $this->current();
-
- if (!file_exists($fileinfo->getPathname())) {
- return false;
- }
-
- $filedate = $fileinfo->getMTime();
- foreach ($this->comparators as $compare) {
- if (!$compare->test($filedate)) {
- return false;
- }
- }
-
- return true;
- }
-}
diff --git a/system/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php b/system/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php
deleted file mode 100644
index f593a3f..0000000
--- a/system/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php
+++ /dev/null
@@ -1,51 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * DepthRangeFilterIterator limits the directory depth.
- *
- * @author Fabien Potencier
- *
- * @template-covariant TKey
- * @template-covariant TValue
- *
- * @extends \FilterIterator
- */
-class DepthRangeFilterIterator extends \FilterIterator
-{
- private $minDepth = 0;
-
- /**
- * @param \RecursiveIteratorIterator<\RecursiveIterator> $iterator The Iterator to filter
- * @param int $minDepth The min depth
- * @param int $maxDepth The max depth
- */
- public function __construct(\RecursiveIteratorIterator $iterator, int $minDepth = 0, int $maxDepth = \PHP_INT_MAX)
- {
- $this->minDepth = $minDepth;
- $iterator->setMaxDepth(\PHP_INT_MAX === $maxDepth ? -1 : $maxDepth);
-
- parent::__construct($iterator);
- }
-
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- return $this->getInnerIterator()->getDepth() >= $this->minDepth;
- }
-}
diff --git a/system/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php b/system/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php
deleted file mode 100644
index 39797c8..0000000
--- a/system/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php
+++ /dev/null
@@ -1,97 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * ExcludeDirectoryFilterIterator filters out directories.
- *
- * @author Fabien Potencier
- *
- * @extends \FilterIterator
- *
- * @implements \RecursiveIterator
- */
-class ExcludeDirectoryFilterIterator extends \FilterIterator implements \RecursiveIterator
-{
- private $iterator;
- private $isRecursive;
- private $excludedDirs = [];
- private $excludedPattern;
-
- /**
- * @param \Iterator $iterator The Iterator to filter
- * @param string[] $directories An array of directories to exclude
- */
- public function __construct(\Iterator $iterator, array $directories)
- {
- $this->iterator = $iterator;
- $this->isRecursive = $iterator instanceof \RecursiveIterator;
- $patterns = [];
- foreach ($directories as $directory) {
- $directory = rtrim($directory, '/');
- if (!$this->isRecursive || str_contains($directory, '/')) {
- $patterns[] = preg_quote($directory, '#');
- } else {
- $this->excludedDirs[$directory] = true;
- }
- }
- if ($patterns) {
- $this->excludedPattern = '#(?:^|/)(?:'.implode('|', $patterns).')(?:/|$)#';
- }
-
- parent::__construct($iterator);
- }
-
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) {
- return false;
- }
-
- if ($this->excludedPattern) {
- $path = $this->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath();
- $path = str_replace('\\', '/', $path);
-
- return !preg_match($this->excludedPattern, $path);
- }
-
- return true;
- }
-
- /**
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function hasChildren()
- {
- return $this->isRecursive && $this->iterator->hasChildren();
- }
-
- /**
- * @return self
- */
- #[\ReturnTypeWillChange]
- public function getChildren()
- {
- $children = new self($this->iterator->getChildren(), []);
- $children->excludedDirs = $this->excludedDirs;
- $children->excludedPattern = $this->excludedPattern;
-
- return $children;
- }
-}
diff --git a/system/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php b/system/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php
deleted file mode 100644
index 793ae35..0000000
--- a/system/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php
+++ /dev/null
@@ -1,56 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * FileTypeFilterIterator only keeps files, directories, or both.
- *
- * @author Fabien Potencier
- *
- * @extends \FilterIterator
- */
-class FileTypeFilterIterator extends \FilterIterator
-{
- public const ONLY_FILES = 1;
- public const ONLY_DIRECTORIES = 2;
-
- private $mode;
-
- /**
- * @param \Iterator $iterator The Iterator to filter
- * @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES)
- */
- public function __construct(\Iterator $iterator, int $mode)
- {
- $this->mode = $mode;
-
- parent::__construct($iterator);
- }
-
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- $fileinfo = $this->current();
- if (self::ONLY_DIRECTORIES === (self::ONLY_DIRECTORIES & $this->mode) && $fileinfo->isFile()) {
- return false;
- } elseif (self::ONLY_FILES === (self::ONLY_FILES & $this->mode) && $fileinfo->isDir()) {
- return false;
- }
-
- return true;
- }
-}
diff --git a/system/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php b/system/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php
deleted file mode 100644
index 79f8c29..0000000
--- a/system/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php
+++ /dev/null
@@ -1,61 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * FilecontentFilterIterator filters files by their contents using patterns (regexps or strings).
- *
- * @author Fabien Potencier
- * @author Włodzimierz Gajda
- *
- * @extends MultiplePcreFilterIterator
- */
-class FilecontentFilterIterator extends MultiplePcreFilterIterator
-{
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- if (!$this->matchRegexps && !$this->noMatchRegexps) {
- return true;
- }
-
- $fileinfo = $this->current();
-
- if ($fileinfo->isDir() || !$fileinfo->isReadable()) {
- return false;
- }
-
- $content = $fileinfo->getContents();
- if (!$content) {
- return false;
- }
-
- return $this->isAccepted($content);
- }
-
- /**
- * Converts string to regexp if necessary.
- *
- * @param string $str Pattern: string or regexp
- *
- * @return string
- */
- protected function toRegex(string $str)
- {
- return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/';
- }
-}
diff --git a/system/vendor/symfony/finder/Iterator/FilenameFilterIterator.php b/system/vendor/symfony/finder/Iterator/FilenameFilterIterator.php
deleted file mode 100644
index 77b3b24..0000000
--- a/system/vendor/symfony/finder/Iterator/FilenameFilterIterator.php
+++ /dev/null
@@ -1,50 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-use Symfony\Component\Finder\Glob;
-
-/**
- * FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string).
- *
- * @author Fabien Potencier
- *
- * @extends MultiplePcreFilterIterator
- */
-class FilenameFilterIterator extends MultiplePcreFilterIterator
-{
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- return $this->isAccepted($this->current()->getFilename());
- }
-
- /**
- * Converts glob to regexp.
- *
- * PCRE patterns are left unchanged.
- * Glob strings are transformed with Glob::toRegex().
- *
- * @param string $str Pattern: glob or regexp
- *
- * @return string
- */
- protected function toRegex(string $str)
- {
- return $this->isRegex($str) ? $str : Glob::toRegex($str);
- }
-}
diff --git a/system/vendor/symfony/finder/Iterator/LazyIterator.php b/system/vendor/symfony/finder/Iterator/LazyIterator.php
deleted file mode 100644
index 32cc37f..0000000
--- a/system/vendor/symfony/finder/Iterator/LazyIterator.php
+++ /dev/null
@@ -1,32 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * @author Jérémy Derussé
- *
- * @internal
- */
-class LazyIterator implements \IteratorAggregate
-{
- private $iteratorFactory;
-
- public function __construct(callable $iteratorFactory)
- {
- $this->iteratorFactory = $iteratorFactory;
- }
-
- public function getIterator(): \Traversable
- {
- yield from ($this->iteratorFactory)();
- }
-}
diff --git a/system/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php b/system/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php
deleted file mode 100644
index 564765d..0000000
--- a/system/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php
+++ /dev/null
@@ -1,117 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * MultiplePcreFilterIterator filters files using patterns (regexps, globs or strings).
- *
- * @author Fabien Potencier
- *
- * @template-covariant TKey
- * @template-covariant TValue
- *
- * @extends \FilterIterator
- */
-abstract class MultiplePcreFilterIterator extends \FilterIterator
-{
- protected $matchRegexps = [];
- protected $noMatchRegexps = [];
-
- /**
- * @param \Iterator $iterator The Iterator to filter
- * @param string[] $matchPatterns An array of patterns that need to match
- * @param string[] $noMatchPatterns An array of patterns that need to not match
- */
- public function __construct(\Iterator $iterator, array $matchPatterns, array $noMatchPatterns)
- {
- foreach ($matchPatterns as $pattern) {
- $this->matchRegexps[] = $this->toRegex($pattern);
- }
-
- foreach ($noMatchPatterns as $pattern) {
- $this->noMatchRegexps[] = $this->toRegex($pattern);
- }
-
- parent::__construct($iterator);
- }
-
- /**
- * Checks whether the string is accepted by the regex filters.
- *
- * If there is no regexps defined in the class, this method will accept the string.
- * Such case can be handled by child classes before calling the method if they want to
- * apply a different behavior.
- *
- * @return bool
- */
- protected function isAccepted(string $string)
- {
- // should at least not match one rule to exclude
- foreach ($this->noMatchRegexps as $regex) {
- if (preg_match($regex, $string)) {
- return false;
- }
- }
-
- // should at least match one rule
- if ($this->matchRegexps) {
- foreach ($this->matchRegexps as $regex) {
- if (preg_match($regex, $string)) {
- return true;
- }
- }
-
- return false;
- }
-
- // If there is no match rules, the file is accepted
- return true;
- }
-
- /**
- * Checks whether the string is a regex.
- *
- * @return bool
- */
- protected function isRegex(string $str)
- {
- $availableModifiers = 'imsxuADU';
-
- if (\PHP_VERSION_ID >= 80200) {
- $availableModifiers .= 'n';
- }
-
- if (preg_match('/^(.{3,}?)['.$availableModifiers.']*$/', $str, $m)) {
- $start = substr($m[1], 0, 1);
- $end = substr($m[1], -1);
-
- if ($start === $end) {
- return !preg_match('/[*?[:alnum:] \\\\]/', $start);
- }
-
- foreach ([['{', '}'], ['(', ')'], ['[', ']'], ['<', '>']] as $delimiters) {
- if ($start === $delimiters[0] && $end === $delimiters[1]) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- * Converts string into regexp.
- *
- * @return string
- */
- abstract protected function toRegex(string $str);
-}
diff --git a/system/vendor/symfony/finder/Iterator/PathFilterIterator.php b/system/vendor/symfony/finder/Iterator/PathFilterIterator.php
deleted file mode 100644
index 7974c4e..0000000
--- a/system/vendor/symfony/finder/Iterator/PathFilterIterator.php
+++ /dev/null
@@ -1,59 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * PathFilterIterator filters files by path patterns (e.g. some/special/dir).
- *
- * @author Fabien Potencier
- * @author Włodzimierz Gajda
- *
- * @extends MultiplePcreFilterIterator
- */
-class PathFilterIterator extends MultiplePcreFilterIterator
-{
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- $filename = $this->current()->getRelativePathname();
-
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $filename = str_replace('\\', '/', $filename);
- }
-
- return $this->isAccepted($filename);
- }
-
- /**
- * Converts strings to regexp.
- *
- * PCRE patterns are left unchanged.
- *
- * Default conversion:
- * 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/'
- *
- * Use only / as directory separator (on Windows also).
- *
- * @param string $str Pattern: regexp or dirname
- *
- * @return string
- */
- protected function toRegex(string $str)
- {
- return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/';
- }
-}
diff --git a/system/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php b/system/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php
deleted file mode 100644
index 886dae5..0000000
--- a/system/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php
+++ /dev/null
@@ -1,157 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-use Symfony\Component\Finder\Exception\AccessDeniedException;
-use Symfony\Component\Finder\SplFileInfo;
-
-/**
- * Extends the \RecursiveDirectoryIterator to support relative paths.
- *
- * @author Victor Berchet
- */
-class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
-{
- /**
- * @var bool
- */
- private $ignoreUnreadableDirs;
-
- /**
- * @var bool
- */
- private $ignoreFirstRewind = true;
-
- // these 3 properties take part of the performance optimization to avoid redoing the same work in all iterations
- private $rootPath;
- private $subPath;
- private $directorySeparator = '/';
-
- /**
- * @throws \RuntimeException
- */
- public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs = false)
- {
- if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) {
- throw new \RuntimeException('This iterator only support returning current as fileinfo.');
- }
-
- parent::__construct($path, $flags);
- $this->ignoreUnreadableDirs = $ignoreUnreadableDirs;
- $this->rootPath = $path;
- if ('/' !== \DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) {
- $this->directorySeparator = \DIRECTORY_SEPARATOR;
- }
- }
-
- /**
- * Return an instance of SplFileInfo with support for relative paths.
- *
- * @return SplFileInfo
- */
- #[\ReturnTypeWillChange]
- public function current()
- {
- // the logic here avoids redoing the same work in all iterations
-
- if (null === $subPathname = $this->subPath) {
- $subPathname = $this->subPath = $this->getSubPath();
- }
- if ('' !== $subPathname) {
- $subPathname .= $this->directorySeparator;
- }
- $subPathname .= $this->getFilename();
-
- if ('/' !== $basePath = $this->rootPath) {
- $basePath .= $this->directorySeparator;
- }
-
- return new SplFileInfo($basePath.$subPathname, $this->subPath, $subPathname);
- }
-
- /**
- * @param bool $allowLinks
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function hasChildren($allowLinks = false)
- {
- $hasChildren = parent::hasChildren($allowLinks);
-
- if (!$hasChildren || !$this->ignoreUnreadableDirs) {
- return $hasChildren;
- }
-
- try {
- parent::getChildren();
-
- return true;
- } catch (\UnexpectedValueException $e) {
- // If directory is unreadable and finder is set to ignore it, skip children
- return false;
- }
- }
-
- /**
- * @return \RecursiveDirectoryIterator
- *
- * @throws AccessDeniedException
- */
- #[\ReturnTypeWillChange]
- public function getChildren()
- {
- try {
- $children = parent::getChildren();
-
- if ($children instanceof self) {
- // parent method will call the constructor with default arguments, so unreadable dirs won't be ignored anymore
- $children->ignoreUnreadableDirs = $this->ignoreUnreadableDirs;
-
- // performance optimization to avoid redoing the same work in all children
- $children->rootPath = $this->rootPath;
- }
-
- return $children;
- } catch (\UnexpectedValueException $e) {
- throw new AccessDeniedException($e->getMessage(), $e->getCode(), $e);
- }
- }
-
- /**
- * @return void
- */
- #[\ReturnTypeWillChange]
- public function next()
- {
- $this->ignoreFirstRewind = false;
-
- parent::next();
- }
-
- /**
- * @return void
- */
- #[\ReturnTypeWillChange]
- public function rewind()
- {
- // some streams like FTP are not rewindable, ignore the first rewind after creation,
- // as newly created DirectoryIterator does not need to be rewound
- if ($this->ignoreFirstRewind) {
- $this->ignoreFirstRewind = false;
-
- return;
- }
-
- parent::rewind();
- }
-}
diff --git a/system/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php b/system/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php
deleted file mode 100644
index 575bf29..0000000
--- a/system/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php
+++ /dev/null
@@ -1,60 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-use Symfony\Component\Finder\Comparator\NumberComparator;
-
-/**
- * SizeRangeFilterIterator filters out files that are not in the given size range.
- *
- * @author Fabien Potencier
- *
- * @extends \FilterIterator
- */
-class SizeRangeFilterIterator extends \FilterIterator
-{
- private $comparators = [];
-
- /**
- * @param \Iterator $iterator
- * @param NumberComparator[] $comparators
- */
- public function __construct(\Iterator $iterator, array $comparators)
- {
- $this->comparators = $comparators;
-
- parent::__construct($iterator);
- }
-
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- $fileinfo = $this->current();
- if (!$fileinfo->isFile()) {
- return true;
- }
-
- $filesize = $fileinfo->getSize();
- foreach ($this->comparators as $compare) {
- if (!$compare->test($filesize)) {
- return false;
- }
- }
-
- return true;
- }
-}
diff --git a/system/vendor/symfony/finder/Iterator/SortableIterator.php b/system/vendor/symfony/finder/Iterator/SortableIterator.php
deleted file mode 100644
index 9afde5c..0000000
--- a/system/vendor/symfony/finder/Iterator/SortableIterator.php
+++ /dev/null
@@ -1,104 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * SortableIterator applies a sort on a given Iterator.
- *
- * @author Fabien Potencier
- *
- * @implements \IteratorAggregate
- */
-class SortableIterator implements \IteratorAggregate
-{
- public const SORT_BY_NONE = 0;
- public const SORT_BY_NAME = 1;
- public const SORT_BY_TYPE = 2;
- public const SORT_BY_ACCESSED_TIME = 3;
- public const SORT_BY_CHANGED_TIME = 4;
- public const SORT_BY_MODIFIED_TIME = 5;
- public const SORT_BY_NAME_NATURAL = 6;
-
- private $iterator;
- private $sort;
-
- /**
- * @param \Traversable $iterator
- * @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback)
- *
- * @throws \InvalidArgumentException
- */
- public function __construct(\Traversable $iterator, $sort, bool $reverseOrder = false)
- {
- $this->iterator = $iterator;
- $order = $reverseOrder ? -1 : 1;
-
- if (self::SORT_BY_NAME === $sort) {
- $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) {
- return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
- };
- } elseif (self::SORT_BY_NAME_NATURAL === $sort) {
- $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) {
- return $order * strnatcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
- };
- } elseif (self::SORT_BY_TYPE === $sort) {
- $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) {
- if ($a->isDir() && $b->isFile()) {
- return -$order;
- } elseif ($a->isFile() && $b->isDir()) {
- return $order;
- }
-
- return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
- };
- } elseif (self::SORT_BY_ACCESSED_TIME === $sort) {
- $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) {
- return $order * ($a->getATime() - $b->getATime());
- };
- } elseif (self::SORT_BY_CHANGED_TIME === $sort) {
- $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) {
- return $order * ($a->getCTime() - $b->getCTime());
- };
- } elseif (self::SORT_BY_MODIFIED_TIME === $sort) {
- $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) {
- return $order * ($a->getMTime() - $b->getMTime());
- };
- } elseif (self::SORT_BY_NONE === $sort) {
- $this->sort = $order;
- } elseif (\is_callable($sort)) {
- $this->sort = $reverseOrder ? static function (\SplFileInfo $a, \SplFileInfo $b) use ($sort) { return -$sort($a, $b); } : $sort;
- } else {
- throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.');
- }
- }
-
- /**
- * @return \Traversable
- */
- #[\ReturnTypeWillChange]
- public function getIterator()
- {
- if (1 === $this->sort) {
- return $this->iterator;
- }
-
- $array = iterator_to_array($this->iterator, true);
-
- if (-1 === $this->sort) {
- $array = array_reverse($array);
- } else {
- uasort($array, $this->sort);
- }
-
- return new \ArrayIterator($array);
- }
-}
diff --git a/system/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php b/system/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php
deleted file mode 100644
index e27158c..0000000
--- a/system/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php
+++ /dev/null
@@ -1,151 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-use Symfony\Component\Finder\Gitignore;
-
-final class VcsIgnoredFilterIterator extends \FilterIterator
-{
- /**
- * @var string
- */
- private $baseDir;
-
- /**
- * @var array
- */
- private $gitignoreFilesCache = [];
-
- /**
- * @var array
- */
- private $ignoredPathsCache = [];
-
- public function __construct(\Iterator $iterator, string $baseDir)
- {
- $this->baseDir = $this->normalizePath($baseDir);
-
- parent::__construct($iterator);
- }
-
- public function accept(): bool
- {
- $file = $this->current();
-
- $fileRealPath = $this->normalizePath($file->getRealPath());
-
- return !$this->isIgnored($fileRealPath);
- }
-
- private function isIgnored(string $fileRealPath): bool
- {
- if (is_dir($fileRealPath) && !str_ends_with($fileRealPath, '/')) {
- $fileRealPath .= '/';
- }
-
- if (isset($this->ignoredPathsCache[$fileRealPath])) {
- return $this->ignoredPathsCache[$fileRealPath];
- }
-
- $ignored = false;
-
- foreach ($this->parentsDirectoryDownward($fileRealPath) as $parentDirectory) {
- if ($this->isIgnored($parentDirectory)) {
- // rules in ignored directories are ignored, no need to check further.
- break;
- }
-
- $fileRelativePath = substr($fileRealPath, \strlen($parentDirectory) + 1);
-
- if (null === $regexps = $this->readGitignoreFile("{$parentDirectory}/.gitignore")) {
- continue;
- }
-
- [$exclusionRegex, $inclusionRegex] = $regexps;
-
- if (preg_match($exclusionRegex, $fileRelativePath)) {
- $ignored = true;
-
- continue;
- }
-
- if (preg_match($inclusionRegex, $fileRelativePath)) {
- $ignored = false;
- }
- }
-
- return $this->ignoredPathsCache[$fileRealPath] = $ignored;
- }
-
- /**
- * @return list
- */
- private function parentsDirectoryDownward(string $fileRealPath): array
- {
- $parentDirectories = [];
-
- $parentDirectory = $fileRealPath;
-
- while (true) {
- $newParentDirectory = \dirname($parentDirectory);
-
- // dirname('/') = '/'
- if ($newParentDirectory === $parentDirectory) {
- break;
- }
-
- $parentDirectory = $newParentDirectory;
-
- if (0 !== strpos($parentDirectory, $this->baseDir)) {
- break;
- }
-
- $parentDirectories[] = $parentDirectory;
- }
-
- return array_reverse($parentDirectories);
- }
-
- /**
- * @return array{0: string, 1: string}|null
- */
- private function readGitignoreFile(string $path): ?array
- {
- if (\array_key_exists($path, $this->gitignoreFilesCache)) {
- return $this->gitignoreFilesCache[$path];
- }
-
- if (!file_exists($path)) {
- return $this->gitignoreFilesCache[$path] = null;
- }
-
- if (!is_file($path) || !is_readable($path)) {
- throw new \RuntimeException("The \"ignoreVCSIgnored\" option cannot be used by the Finder as the \"{$path}\" file is not readable.");
- }
-
- $gitignoreFileContent = file_get_contents($path);
-
- return $this->gitignoreFilesCache[$path] = [
- Gitignore::toRegex($gitignoreFileContent),
- Gitignore::toRegexMatchingNegatedPatterns($gitignoreFileContent),
- ];
- }
-
- private function normalizePath(string $path): string
- {
- if ('\\' === \DIRECTORY_SEPARATOR) {
- return str_replace('\\', '/', $path);
- }
-
- return $path;
- }
-}
diff --git a/system/vendor/symfony/finder/LICENSE b/system/vendor/symfony/finder/LICENSE
deleted file mode 100644
index 0138f8f..0000000
--- a/system/vendor/symfony/finder/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2004-present Fabien Potencier
-
-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/system/vendor/symfony/finder/README.md b/system/vendor/symfony/finder/README.md
deleted file mode 100644
index 22bdeb9..0000000
--- a/system/vendor/symfony/finder/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-Finder Component
-================
-
-The Finder component finds files and directories via an intuitive fluent
-interface.
-
-Resources
----------
-
- * [Documentation](https://symfony.com/doc/current/components/finder.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/system/vendor/symfony/finder/SplFileInfo.php b/system/vendor/symfony/finder/SplFileInfo.php
deleted file mode 100644
index 11604a2..0000000
--- a/system/vendor/symfony/finder/SplFileInfo.php
+++ /dev/null
@@ -1,88 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder;
-
-/**
- * Extends \SplFileInfo to support relative paths.
- *
- * @author Fabien Potencier
- */
-class SplFileInfo extends \SplFileInfo
-{
- private $relativePath;
- private $relativePathname;
-
- /**
- * @param string $file The file name
- * @param string $relativePath The relative path
- * @param string $relativePathname The relative path name
- */
- public function __construct(string $file, string $relativePath, string $relativePathname)
- {
- parent::__construct($file);
- $this->relativePath = $relativePath;
- $this->relativePathname = $relativePathname;
- }
-
- /**
- * Returns the relative path.
- *
- * This path does not contain the file name.
- *
- * @return string
- */
- public function getRelativePath()
- {
- return $this->relativePath;
- }
-
- /**
- * Returns the relative path name.
- *
- * This path contains the file name.
- *
- * @return string
- */
- public function getRelativePathname()
- {
- return $this->relativePathname;
- }
-
- public function getFilenameWithoutExtension(): string
- {
- $filename = $this->getFilename();
-
- return pathinfo($filename, \PATHINFO_FILENAME);
- }
-
- /**
- * Returns the contents of the file.
- *
- * @return string
- *
- * @throws \RuntimeException
- */
- public function getContents()
- {
- set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
- try {
- $content = file_get_contents($this->getPathname());
- } finally {
- restore_error_handler();
- }
- if (false === $content) {
- throw new \RuntimeException($error);
- }
-
- return $content;
- }
-}
diff --git a/system/vendor/symfony/finder/composer.json b/system/vendor/symfony/finder/composer.json
deleted file mode 100644
index ef19911..0000000
--- a/system/vendor/symfony/finder/composer.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "symfony/finder",
- "type": "library",
- "description": "Finds files and directories via an intuitive fluent interface",
- "keywords": [],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1|^3",
- "symfony/polyfill-php80": "^1.16"
- },
- "autoload": {
- "psr-4": { "Symfony\\Component\\Finder\\": "" },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "minimum-stability": "dev"
-}
diff --git a/system/vendor/symfony/polyfill-ctype/Ctype.php b/system/vendor/symfony/polyfill-ctype/Ctype.php
deleted file mode 100644
index ba75a2c..0000000
--- a/system/vendor/symfony/polyfill-ctype/Ctype.php
+++ /dev/null
@@ -1,232 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Ctype;
-
-/**
- * Ctype implementation through regex.
- *
- * @internal
- *
- * @author Gert de Pagter
- */
-final class Ctype
-{
- /**
- * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise.
- *
- * @see https://php.net/ctype-alnum
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_alnum($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a letter, FALSE otherwise.
- *
- * @see https://php.net/ctype-alpha
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_alpha($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise.
- *
- * @see https://php.net/ctype-cntrl
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_cntrl($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text);
- }
-
- /**
- * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise.
- *
- * @see https://php.net/ctype-digit
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_digit($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise.
- *
- * @see https://php.net/ctype-graph
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_graph($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a lowercase letter.
- *
- * @see https://php.net/ctype-lower
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_lower($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all.
- *
- * @see https://php.net/ctype-print
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_print($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise.
- *
- * @see https://php.net/ctype-punct
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_punct($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters.
- *
- * @see https://php.net/ctype-space
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_space($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is an uppercase letter.
- *
- * @see https://php.net/ctype-upper
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_upper($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise.
- *
- * @see https://php.net/ctype-xdigit
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_xdigit($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text);
- }
-
- /**
- * Converts integers to their char versions according to normal ctype behaviour, if needed.
- *
- * If an integer between -128 and 255 inclusive is provided,
- * it is interpreted as the ASCII value of a single character
- * (negative values have 256 added in order to allow characters in the Extended ASCII range).
- * Any other integer is interpreted as a string containing the decimal digits of the integer.
- *
- * @param mixed $int
- * @param string $function
- *
- * @return mixed
- */
- private static function convert_int_to_char_for_ctype($int, $function)
- {
- if (!\is_int($int)) {
- return $int;
- }
-
- if ($int < -128 || $int > 255) {
- return (string) $int;
- }
-
- if (\PHP_VERSION_ID >= 80100) {
- @trigger_error($function.'(): Argument of type int will be interpreted as string in the future', \E_USER_DEPRECATED);
- }
-
- if ($int < 0) {
- $int += 256;
- }
-
- return \chr($int);
- }
-}
diff --git a/system/vendor/symfony/polyfill-ctype/LICENSE b/system/vendor/symfony/polyfill-ctype/LICENSE
deleted file mode 100644
index 7536cae..0000000
--- a/system/vendor/symfony/polyfill-ctype/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2018-present Fabien Potencier
-
-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/system/vendor/symfony/polyfill-ctype/README.md b/system/vendor/symfony/polyfill-ctype/README.md
deleted file mode 100644
index b144d03..0000000
--- a/system/vendor/symfony/polyfill-ctype/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-Symfony Polyfill / Ctype
-========================
-
-This component provides `ctype_*` functions to users who run php versions without the ctype extension.
-
-More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
-
-License
-=======
-
-This library is released under the [MIT license](LICENSE).
diff --git a/system/vendor/symfony/polyfill-ctype/bootstrap.php b/system/vendor/symfony/polyfill-ctype/bootstrap.php
deleted file mode 100644
index d54524b..0000000
--- a/system/vendor/symfony/polyfill-ctype/bootstrap.php
+++ /dev/null
@@ -1,50 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Symfony\Polyfill\Ctype as p;
-
-if (\PHP_VERSION_ID >= 80000) {
- return require __DIR__.'/bootstrap80.php';
-}
-
-if (!function_exists('ctype_alnum')) {
- function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
-}
-if (!function_exists('ctype_alpha')) {
- function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
-}
-if (!function_exists('ctype_cntrl')) {
- function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
-}
-if (!function_exists('ctype_digit')) {
- function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
-}
-if (!function_exists('ctype_graph')) {
- function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
-}
-if (!function_exists('ctype_lower')) {
- function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
-}
-if (!function_exists('ctype_print')) {
- function ctype_print($text) { return p\Ctype::ctype_print($text); }
-}
-if (!function_exists('ctype_punct')) {
- function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
-}
-if (!function_exists('ctype_space')) {
- function ctype_space($text) { return p\Ctype::ctype_space($text); }
-}
-if (!function_exists('ctype_upper')) {
- function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
-}
-if (!function_exists('ctype_xdigit')) {
- function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
-}
diff --git a/system/vendor/symfony/polyfill-ctype/bootstrap80.php b/system/vendor/symfony/polyfill-ctype/bootstrap80.php
deleted file mode 100644
index ab2f861..0000000
--- a/system/vendor/symfony/polyfill-ctype/bootstrap80.php
+++ /dev/null
@@ -1,46 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Symfony\Polyfill\Ctype as p;
-
-if (!function_exists('ctype_alnum')) {
- function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); }
-}
-if (!function_exists('ctype_alpha')) {
- function ctype_alpha(mixed $text): bool { return p\Ctype::ctype_alpha($text); }
-}
-if (!function_exists('ctype_cntrl')) {
- function ctype_cntrl(mixed $text): bool { return p\Ctype::ctype_cntrl($text); }
-}
-if (!function_exists('ctype_digit')) {
- function ctype_digit(mixed $text): bool { return p\Ctype::ctype_digit($text); }
-}
-if (!function_exists('ctype_graph')) {
- function ctype_graph(mixed $text): bool { return p\Ctype::ctype_graph($text); }
-}
-if (!function_exists('ctype_lower')) {
- function ctype_lower(mixed $text): bool { return p\Ctype::ctype_lower($text); }
-}
-if (!function_exists('ctype_print')) {
- function ctype_print(mixed $text): bool { return p\Ctype::ctype_print($text); }
-}
-if (!function_exists('ctype_punct')) {
- function ctype_punct(mixed $text): bool { return p\Ctype::ctype_punct($text); }
-}
-if (!function_exists('ctype_space')) {
- function ctype_space(mixed $text): bool { return p\Ctype::ctype_space($text); }
-}
-if (!function_exists('ctype_upper')) {
- function ctype_upper(mixed $text): bool { return p\Ctype::ctype_upper($text); }
-}
-if (!function_exists('ctype_xdigit')) {
- function ctype_xdigit(mixed $text): bool { return p\Ctype::ctype_xdigit($text); }
-}
diff --git a/system/vendor/symfony/polyfill-ctype/composer.json b/system/vendor/symfony/polyfill-ctype/composer.json
deleted file mode 100644
index e5c978f..0000000
--- a/system/vendor/symfony/polyfill-ctype/composer.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "symfony/polyfill-ctype",
- "type": "library",
- "description": "Symfony polyfill for ctype functions",
- "keywords": ["polyfill", "compatibility", "portable", "ctype"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Gert de Pagter",
- "email": "BackEndTea@gmail.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=7.1"
- },
- "provide": {
- "ext-ctype": "*"
- },
- "autoload": {
- "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" },
- "files": [ "bootstrap.php" ]
- },
- "suggest": {
- "ext-ctype": "For best performance"
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- }
-}
diff --git a/system/vendor/symfony/polyfill-mbstring/LICENSE b/system/vendor/symfony/polyfill-mbstring/LICENSE
deleted file mode 100644
index 6e3afce..0000000
--- a/system/vendor/symfony/polyfill-mbstring/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2015-present Fabien Potencier
-
-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/system/vendor/symfony/polyfill-mbstring/Mbstring.php b/system/vendor/symfony/polyfill-mbstring/Mbstring.php
deleted file mode 100644
index 2e0b969..0000000
--- a/system/vendor/symfony/polyfill-mbstring/Mbstring.php
+++ /dev/null
@@ -1,947 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Mbstring;
-
-/**
- * Partial mbstring implementation in PHP, iconv based, UTF-8 centric.
- *
- * Implemented:
- * - mb_chr - Returns a specific character from its Unicode code point
- * - mb_convert_encoding - Convert character encoding
- * - mb_convert_variables - Convert character code in variable(s)
- * - mb_decode_mimeheader - Decode string in MIME header field
- * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED
- * - mb_decode_numericentity - Decode HTML numeric string reference to character
- * - mb_encode_numericentity - Encode character to HTML numeric string reference
- * - mb_convert_case - Perform case folding on a string
- * - mb_detect_encoding - Detect character encoding
- * - mb_get_info - Get internal settings of mbstring
- * - mb_http_input - Detect HTTP input character encoding
- * - mb_http_output - Set/Get HTTP output character encoding
- * - mb_internal_encoding - Set/Get internal character encoding
- * - mb_list_encodings - Returns an array of all supported encodings
- * - mb_ord - Returns the Unicode code point of a character
- * - mb_output_handler - Callback function converts character encoding in output buffer
- * - mb_scrub - Replaces ill-formed byte sequences with substitute characters
- * - mb_strlen - Get string length
- * - mb_strpos - Find position of first occurrence of string in a string
- * - mb_strrpos - Find position of last occurrence of a string in a string
- * - mb_str_split - Convert a string to an array
- * - mb_strtolower - Make a string lowercase
- * - mb_strtoupper - Make a string uppercase
- * - mb_substitute_character - Set/Get substitution character
- * - mb_substr - Get part of string
- * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive
- * - mb_stristr - Finds first occurrence of a string within another, case insensitive
- * - mb_strrchr - Finds the last occurrence of a character in a string within another
- * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive
- * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive
- * - mb_strstr - Finds first occurrence of a string within another
- * - mb_strwidth - Return width of string
- * - mb_substr_count - Count the number of substring occurrences
- *
- * Not implemented:
- * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more)
- * - mb_ereg_* - Regular expression with multibyte support
- * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable
- * - mb_preferred_mime_name - Get MIME charset string
- * - mb_regex_encoding - Returns current encoding for multibyte regex as string
- * - mb_regex_set_options - Set/Get the default options for mbregex functions
- * - mb_send_mail - Send encoded mail
- * - mb_split - Split multibyte string using regular expression
- * - mb_strcut - Get part of string
- * - mb_strimwidth - Get truncated string with specified width
- *
- * @author Nicolas Grekas
- *
- * @internal
- */
-final class Mbstring
-{
- public const MB_CASE_FOLD = \PHP_INT_MAX;
-
- private const SIMPLE_CASE_FOLD = [
- ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"],
- ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'],
- ];
-
- private static $encodingList = ['ASCII', 'UTF-8'];
- private static $language = 'neutral';
- private static $internalEncoding = 'UTF-8';
-
- public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
- {
- if (\is_array($fromEncoding) || (null !== $fromEncoding && false !== strpos($fromEncoding, ','))) {
- $fromEncoding = self::mb_detect_encoding($s, $fromEncoding);
- } else {
- $fromEncoding = self::getEncoding($fromEncoding);
- }
-
- $toEncoding = self::getEncoding($toEncoding);
-
- if ('BASE64' === $fromEncoding) {
- $s = base64_decode($s);
- $fromEncoding = $toEncoding;
- }
-
- if ('BASE64' === $toEncoding) {
- return base64_encode($s);
- }
-
- if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) {
- if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) {
- $fromEncoding = 'Windows-1252';
- }
- if ('UTF-8' !== $fromEncoding) {
- $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s);
- }
-
- return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s);
- }
-
- if ('HTML-ENTITIES' === $fromEncoding) {
- $s = html_entity_decode($s, \ENT_COMPAT, 'UTF-8');
- $fromEncoding = 'UTF-8';
- }
-
- return iconv($fromEncoding, $toEncoding.'//IGNORE', $s);
- }
-
- public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars)
- {
- $ok = true;
- array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) {
- if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) {
- $ok = false;
- }
- });
-
- return $ok ? $fromEncoding : false;
- }
-
- public static function mb_decode_mimeheader($s)
- {
- return iconv_mime_decode($s, 2, self::$internalEncoding);
- }
-
- public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null)
- {
- trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING);
- }
-
- public static function mb_decode_numericentity($s, $convmap, $encoding = null)
- {
- if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) {
- trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING);
-
- return null;
- }
-
- if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) {
- return false;
- }
-
- if (null !== $encoding && !\is_scalar($encoding)) {
- trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING);
-
- return ''; // Instead of null (cf. mb_encode_numericentity).
- }
-
- $s = (string) $s;
- if ('' === $s) {
- return '';
- }
-
- $encoding = self::getEncoding($encoding);
-
- if ('UTF-8' === $encoding) {
- $encoding = null;
- if (!preg_match('//u', $s)) {
- $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
- }
- } else {
- $s = iconv($encoding, 'UTF-8//IGNORE', $s);
- }
-
- $cnt = floor(\count($convmap) / 4) * 4;
-
- for ($i = 0; $i < $cnt; $i += 4) {
- // collector_decode_htmlnumericentity ignores $convmap[$i + 3]
- $convmap[$i] += $convmap[$i + 2];
- $convmap[$i + 1] += $convmap[$i + 2];
- }
-
- $s = preg_replace_callback('/(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) {
- $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1];
- for ($i = 0; $i < $cnt; $i += 4) {
- if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) {
- return self::mb_chr($c - $convmap[$i + 2]);
- }
- }
-
- return $m[0];
- }, $s);
-
- if (null === $encoding) {
- return $s;
- }
-
- return iconv('UTF-8', $encoding.'//IGNORE', $s);
- }
-
- public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false)
- {
- if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) {
- trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING);
-
- return null;
- }
-
- if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) {
- return false;
- }
-
- if (null !== $encoding && !\is_scalar($encoding)) {
- trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING);
-
- return null; // Instead of '' (cf. mb_decode_numericentity).
- }
-
- if (null !== $is_hex && !\is_scalar($is_hex)) {
- trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING);
-
- return null;
- }
-
- $s = (string) $s;
- if ('' === $s) {
- return '';
- }
-
- $encoding = self::getEncoding($encoding);
-
- if ('UTF-8' === $encoding) {
- $encoding = null;
- if (!preg_match('//u', $s)) {
- $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
- }
- } else {
- $s = iconv($encoding, 'UTF-8//IGNORE', $s);
- }
-
- static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4];
-
- $cnt = floor(\count($convmap) / 4) * 4;
- $i = 0;
- $len = \strlen($s);
- $result = '';
-
- while ($i < $len) {
- $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"];
- $uchr = substr($s, $i, $ulen);
- $i += $ulen;
- $c = self::mb_ord($uchr);
-
- for ($j = 0; $j < $cnt; $j += 4) {
- if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) {
- $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3];
- $result .= $is_hex ? sprintf('%X;', $cOffset) : ''.$cOffset.';';
- continue 2;
- }
- }
- $result .= $uchr;
- }
-
- if (null === $encoding) {
- return $result;
- }
-
- return iconv('UTF-8', $encoding.'//IGNORE', $result);
- }
-
- public static function mb_convert_case($s, $mode, $encoding = null)
- {
- $s = (string) $s;
- if ('' === $s) {
- return '';
- }
-
- $encoding = self::getEncoding($encoding);
-
- if ('UTF-8' === $encoding) {
- $encoding = null;
- if (!preg_match('//u', $s)) {
- $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
- }
- } else {
- $s = iconv($encoding, 'UTF-8//IGNORE', $s);
- }
-
- if (\MB_CASE_TITLE == $mode) {
- static $titleRegexp = null;
- if (null === $titleRegexp) {
- $titleRegexp = self::getData('titleCaseRegexp');
- }
- $s = preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s);
- } else {
- if (\MB_CASE_UPPER == $mode) {
- static $upper = null;
- if (null === $upper) {
- $upper = self::getData('upperCase');
- }
- $map = $upper;
- } else {
- if (self::MB_CASE_FOLD === $mode) {
- static $caseFolding = null;
- if (null === $caseFolding) {
- $caseFolding = self::getData('caseFolding');
- }
- $s = strtr($s, $caseFolding);
- }
-
- static $lower = null;
- if (null === $lower) {
- $lower = self::getData('lowerCase');
- }
- $map = $lower;
- }
-
- static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4];
-
- $i = 0;
- $len = \strlen($s);
-
- while ($i < $len) {
- $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"];
- $uchr = substr($s, $i, $ulen);
- $i += $ulen;
-
- if (isset($map[$uchr])) {
- $uchr = $map[$uchr];
- $nlen = \strlen($uchr);
-
- if ($nlen == $ulen) {
- $nlen = $i;
- do {
- $s[--$nlen] = $uchr[--$ulen];
- } while ($ulen);
- } else {
- $s = substr_replace($s, $uchr, $i - $ulen, $ulen);
- $len += $nlen - $ulen;
- $i += $nlen - $ulen;
- }
- }
- }
- }
-
- if (null === $encoding) {
- return $s;
- }
-
- return iconv('UTF-8', $encoding.'//IGNORE', $s);
- }
-
- public static function mb_internal_encoding($encoding = null)
- {
- if (null === $encoding) {
- return self::$internalEncoding;
- }
-
- $normalizedEncoding = self::getEncoding($encoding);
-
- if ('UTF-8' === $normalizedEncoding || false !== @iconv($normalizedEncoding, $normalizedEncoding, ' ')) {
- self::$internalEncoding = $normalizedEncoding;
-
- return true;
- }
-
- if (80000 > \PHP_VERSION_ID) {
- return false;
- }
-
- throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding));
- }
-
- public static function mb_language($lang = null)
- {
- if (null === $lang) {
- return self::$language;
- }
-
- switch ($normalizedLang = strtolower($lang)) {
- case 'uni':
- case 'neutral':
- self::$language = $normalizedLang;
-
- return true;
- }
-
- if (80000 > \PHP_VERSION_ID) {
- return false;
- }
-
- throw new \ValueError(sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lang));
- }
-
- public static function mb_list_encodings()
- {
- return ['UTF-8'];
- }
-
- public static function mb_encoding_aliases($encoding)
- {
- switch (strtoupper($encoding)) {
- case 'UTF8':
- case 'UTF-8':
- return ['utf8'];
- }
-
- return false;
- }
-
- public static function mb_check_encoding($var = null, $encoding = null)
- {
- if (PHP_VERSION_ID < 70200 && \is_array($var)) {
- trigger_error('mb_check_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING);
-
- return null;
- }
-
- if (null === $encoding) {
- if (null === $var) {
- return false;
- }
- $encoding = self::$internalEncoding;
- }
-
- if (!\is_array($var)) {
- return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var);
- }
-
- foreach ($var as $key => $value) {
- if (!self::mb_check_encoding($key, $encoding)) {
- return false;
- }
- if (!self::mb_check_encoding($value, $encoding)) {
- return false;
- }
- }
-
- return true;
-
- }
-
- public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
- {
- if (null === $encodingList) {
- $encodingList = self::$encodingList;
- } else {
- if (!\is_array($encodingList)) {
- $encodingList = array_map('trim', explode(',', $encodingList));
- }
- $encodingList = array_map('strtoupper', $encodingList);
- }
-
- foreach ($encodingList as $enc) {
- switch ($enc) {
- case 'ASCII':
- if (!preg_match('/[\x80-\xFF]/', $str)) {
- return $enc;
- }
- break;
-
- case 'UTF8':
- case 'UTF-8':
- if (preg_match('//u', $str)) {
- return 'UTF-8';
- }
- break;
-
- default:
- if (0 === strncmp($enc, 'ISO-8859-', 9)) {
- return $enc;
- }
- }
- }
-
- return false;
- }
-
- public static function mb_detect_order($encodingList = null)
- {
- if (null === $encodingList) {
- return self::$encodingList;
- }
-
- if (!\is_array($encodingList)) {
- $encodingList = array_map('trim', explode(',', $encodingList));
- }
- $encodingList = array_map('strtoupper', $encodingList);
-
- foreach ($encodingList as $enc) {
- switch ($enc) {
- default:
- if (strncmp($enc, 'ISO-8859-', 9)) {
- return false;
- }
- // no break
- case 'ASCII':
- case 'UTF8':
- case 'UTF-8':
- }
- }
-
- self::$encodingList = $encodingList;
-
- return true;
- }
-
- public static function mb_strlen($s, $encoding = null)
- {
- $encoding = self::getEncoding($encoding);
- if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return \strlen($s);
- }
-
- return @iconv_strlen($s, $encoding);
- }
-
- public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null)
- {
- $encoding = self::getEncoding($encoding);
- if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return strpos($haystack, $needle, $offset);
- }
-
- $needle = (string) $needle;
- if ('' === $needle) {
- if (80000 > \PHP_VERSION_ID) {
- trigger_error(__METHOD__.': Empty delimiter', \E_USER_WARNING);
-
- return false;
- }
-
- return 0;
- }
-
- return iconv_strpos($haystack, $needle, $offset, $encoding);
- }
-
- public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null)
- {
- $encoding = self::getEncoding($encoding);
- if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return strrpos($haystack, $needle, $offset);
- }
-
- if ($offset != (int) $offset) {
- $offset = 0;
- } elseif ($offset = (int) $offset) {
- if ($offset < 0) {
- if (0 > $offset += self::mb_strlen($needle)) {
- $haystack = self::mb_substr($haystack, 0, $offset, $encoding);
- }
- $offset = 0;
- } else {
- $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding);
- }
- }
-
- $pos = '' !== $needle || 80000 > \PHP_VERSION_ID
- ? iconv_strrpos($haystack, $needle, $encoding)
- : self::mb_strlen($haystack, $encoding);
-
- return false !== $pos ? $offset + $pos : false;
- }
-
- public static function mb_str_split($string, $split_length = 1, $encoding = null)
- {
- if (null !== $string && !\is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) {
- trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING);
-
- return null;
- }
-
- if (1 > $split_length = (int) $split_length) {
- if (80000 > \PHP_VERSION_ID) {
- trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING);
-
- return false;
- }
-
- throw new \ValueError('Argument #2 ($length) must be greater than 0');
- }
-
- if (null === $encoding) {
- $encoding = mb_internal_encoding();
- }
-
- if ('UTF-8' === $encoding = self::getEncoding($encoding)) {
- $rx = '/(';
- while (65535 < $split_length) {
- $rx .= '.{65535}';
- $split_length -= 65535;
- }
- $rx .= '.{'.$split_length.'})/us';
-
- return preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY);
- }
-
- $result = [];
- $length = mb_strlen($string, $encoding);
-
- for ($i = 0; $i < $length; $i += $split_length) {
- $result[] = mb_substr($string, $i, $split_length, $encoding);
- }
-
- return $result;
- }
-
- public static function mb_strtolower($s, $encoding = null)
- {
- return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding);
- }
-
- public static function mb_strtoupper($s, $encoding = null)
- {
- return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding);
- }
-
- public static function mb_substitute_character($c = null)
- {
- if (null === $c) {
- return 'none';
- }
- if (0 === strcasecmp($c, 'none')) {
- return true;
- }
- if (80000 > \PHP_VERSION_ID) {
- return false;
- }
- if (\is_int($c) || 'long' === $c || 'entity' === $c) {
- return false;
- }
-
- throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint');
- }
-
- public static function mb_substr($s, $start, $length = null, $encoding = null)
- {
- $encoding = self::getEncoding($encoding);
- if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return (string) substr($s, $start, null === $length ? 2147483647 : $length);
- }
-
- if ($start < 0) {
- $start = iconv_strlen($s, $encoding) + $start;
- if ($start < 0) {
- $start = 0;
- }
- }
-
- if (null === $length) {
- $length = 2147483647;
- } elseif ($length < 0) {
- $length = iconv_strlen($s, $encoding) + $length - $start;
- if ($length < 0) {
- return '';
- }
- }
-
- return (string) iconv_substr($s, $start, $length, $encoding);
- }
-
- public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
- {
- [$haystack, $needle] = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], [
- self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding),
- self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding),
- ]);
-
- return self::mb_strpos($haystack, $needle, $offset, $encoding);
- }
-
- public static function mb_stristr($haystack, $needle, $part = false, $encoding = null)
- {
- $pos = self::mb_stripos($haystack, $needle, 0, $encoding);
-
- return self::getSubpart($pos, $part, $haystack, $encoding);
- }
-
- public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null)
- {
- $encoding = self::getEncoding($encoding);
- if ('CP850' === $encoding || 'ASCII' === $encoding) {
- $pos = strrpos($haystack, $needle);
- } else {
- $needle = self::mb_substr($needle, 0, 1, $encoding);
- $pos = iconv_strrpos($haystack, $needle, $encoding);
- }
-
- return self::getSubpart($pos, $part, $haystack, $encoding);
- }
-
- public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null)
- {
- $needle = self::mb_substr($needle, 0, 1, $encoding);
- $pos = self::mb_strripos($haystack, $needle, $encoding);
-
- return self::getSubpart($pos, $part, $haystack, $encoding);
- }
-
- public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null)
- {
- $haystack = self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding);
- $needle = self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding);
-
- $haystack = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $haystack);
- $needle = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $needle);
-
- return self::mb_strrpos($haystack, $needle, $offset, $encoding);
- }
-
- public static function mb_strstr($haystack, $needle, $part = false, $encoding = null)
- {
- $pos = strpos($haystack, $needle);
- if (false === $pos) {
- return false;
- }
- if ($part) {
- return substr($haystack, 0, $pos);
- }
-
- return substr($haystack, $pos);
- }
-
- public static function mb_get_info($type = 'all')
- {
- $info = [
- 'internal_encoding' => self::$internalEncoding,
- 'http_output' => 'pass',
- 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)',
- 'func_overload' => 0,
- 'func_overload_list' => 'no overload',
- 'mail_charset' => 'UTF-8',
- 'mail_header_encoding' => 'BASE64',
- 'mail_body_encoding' => 'BASE64',
- 'illegal_chars' => 0,
- 'encoding_translation' => 'Off',
- 'language' => self::$language,
- 'detect_order' => self::$encodingList,
- 'substitute_character' => 'none',
- 'strict_detection' => 'Off',
- ];
-
- if ('all' === $type) {
- return $info;
- }
- if (isset($info[$type])) {
- return $info[$type];
- }
-
- return false;
- }
-
- public static function mb_http_input($type = '')
- {
- return false;
- }
-
- public static function mb_http_output($encoding = null)
- {
- return null !== $encoding ? 'pass' === $encoding : 'pass';
- }
-
- public static function mb_strwidth($s, $encoding = null)
- {
- $encoding = self::getEncoding($encoding);
-
- if ('UTF-8' !== $encoding) {
- $s = iconv($encoding, 'UTF-8//IGNORE', $s);
- }
-
- $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide);
-
- return ($wide << 1) + iconv_strlen($s, 'UTF-8');
- }
-
- public static function mb_substr_count($haystack, $needle, $encoding = null)
- {
- return substr_count($haystack, $needle);
- }
-
- public static function mb_output_handler($contents, $status)
- {
- return $contents;
- }
-
- public static function mb_chr($code, $encoding = null)
- {
- if (0x80 > $code %= 0x200000) {
- $s = \chr($code);
- } elseif (0x800 > $code) {
- $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F);
- } elseif (0x10000 > $code) {
- $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
- } else {
- $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
- }
-
- if ('UTF-8' !== $encoding = self::getEncoding($encoding)) {
- $s = mb_convert_encoding($s, $encoding, 'UTF-8');
- }
-
- return $s;
- }
-
- public static function mb_ord($s, $encoding = null)
- {
- if ('UTF-8' !== $encoding = self::getEncoding($encoding)) {
- $s = mb_convert_encoding($s, 'UTF-8', $encoding);
- }
-
- if (1 === \strlen($s)) {
- return \ord($s);
- }
-
- $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0;
- if (0xF0 <= $code) {
- return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80;
- }
- if (0xE0 <= $code) {
- return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80;
- }
- if (0xC0 <= $code) {
- return (($code - 0xC0) << 6) + $s[2] - 0x80;
- }
-
- return $code;
- }
-
- public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, string $encoding = null): string
- {
- if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], true)) {
- throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH');
- }
-
- if (null === $encoding) {
- $encoding = self::mb_internal_encoding();
- }
-
- try {
- $validEncoding = @self::mb_check_encoding('', $encoding);
- } catch (\ValueError $e) {
- throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding));
- }
-
- // BC for PHP 7.3 and lower
- if (!$validEncoding) {
- throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding));
- }
-
- if (self::mb_strlen($pad_string, $encoding) <= 0) {
- throw new \ValueError('mb_str_pad(): Argument #3 ($pad_string) must be a non-empty string');
- }
-
- $paddingRequired = $length - self::mb_strlen($string, $encoding);
-
- if ($paddingRequired < 1) {
- return $string;
- }
-
- switch ($pad_type) {
- case \STR_PAD_LEFT:
- return self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding).$string;
- case \STR_PAD_RIGHT:
- return $string.self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding);
- default:
- $leftPaddingLength = floor($paddingRequired / 2);
- $rightPaddingLength = $paddingRequired - $leftPaddingLength;
-
- return self::mb_substr(str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding).$string.self::mb_substr(str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding);
- }
- }
-
- private static function getSubpart($pos, $part, $haystack, $encoding)
- {
- if (false === $pos) {
- return false;
- }
- if ($part) {
- return self::mb_substr($haystack, 0, $pos, $encoding);
- }
-
- return self::mb_substr($haystack, $pos, null, $encoding);
- }
-
- private static function html_encoding_callback(array $m)
- {
- $i = 1;
- $entities = '';
- $m = unpack('C*', htmlentities($m[0], \ENT_COMPAT, 'UTF-8'));
-
- while (isset($m[$i])) {
- if (0x80 > $m[$i]) {
- $entities .= \chr($m[$i++]);
- continue;
- }
- if (0xF0 <= $m[$i]) {
- $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
- } elseif (0xE0 <= $m[$i]) {
- $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
- } else {
- $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80;
- }
-
- $entities .= ''.$c.';';
- }
-
- return $entities;
- }
-
- private static function title_case(array $s)
- {
- return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8');
- }
-
- private static function getData($file)
- {
- if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) {
- return require $file;
- }
-
- return false;
- }
-
- private static function getEncoding($encoding)
- {
- if (null === $encoding) {
- return self::$internalEncoding;
- }
-
- if ('UTF-8' === $encoding) {
- return 'UTF-8';
- }
-
- $encoding = strtoupper($encoding);
-
- if ('8BIT' === $encoding || 'BINARY' === $encoding) {
- return 'CP850';
- }
-
- if ('UTF8' === $encoding) {
- return 'UTF-8';
- }
-
- return $encoding;
- }
-}
diff --git a/system/vendor/symfony/polyfill-mbstring/README.md b/system/vendor/symfony/polyfill-mbstring/README.md
deleted file mode 100644
index 478b40d..0000000
--- a/system/vendor/symfony/polyfill-mbstring/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Symfony Polyfill / Mbstring
-===========================
-
-This component provides a partial, native PHP implementation for the
-[Mbstring](https://php.net/mbstring) extension.
-
-More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
-
-License
-=======
-
-This library is released under the [MIT license](LICENSE).
diff --git a/system/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php b/system/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php
deleted file mode 100644
index 512bba0..0000000
--- a/system/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php
+++ /dev/null
@@ -1,119 +0,0 @@
- 'i̇',
- 'µ' => 'μ',
- 'ſ' => 's',
- 'ͅ' => 'ι',
- 'ς' => 'σ',
- 'ϐ' => 'β',
- 'ϑ' => 'θ',
- 'ϕ' => 'φ',
- 'ϖ' => 'π',
- 'ϰ' => 'κ',
- 'ϱ' => 'ρ',
- 'ϵ' => 'ε',
- 'ẛ' => 'ṡ',
- 'ι' => 'ι',
- 'ß' => 'ss',
- 'ʼn' => 'ʼn',
- 'ǰ' => 'ǰ',
- 'ΐ' => 'ΐ',
- 'ΰ' => 'ΰ',
- 'և' => 'եւ',
- 'ẖ' => 'ẖ',
- 'ẗ' => 'ẗ',
- 'ẘ' => 'ẘ',
- 'ẙ' => 'ẙ',
- 'ẚ' => 'aʾ',
- 'ẞ' => 'ss',
- 'ὐ' => 'ὐ',
- 'ὒ' => 'ὒ',
- 'ὔ' => 'ὔ',
- 'ὖ' => 'ὖ',
- 'ᾀ' => 'ἀι',
- 'ᾁ' => 'ἁι',
- 'ᾂ' => 'ἂι',
- 'ᾃ' => 'ἃι',
- 'ᾄ' => 'ἄι',
- 'ᾅ' => 'ἅι',
- 'ᾆ' => 'ἆι',
- 'ᾇ' => 'ἇι',
- 'ᾈ' => 'ἀι',
- 'ᾉ' => 'ἁι',
- 'ᾊ' => 'ἂι',
- 'ᾋ' => 'ἃι',
- 'ᾌ' => 'ἄι',
- 'ᾍ' => 'ἅι',
- 'ᾎ' => 'ἆι',
- 'ᾏ' => 'ἇι',
- 'ᾐ' => 'ἠι',
- 'ᾑ' => 'ἡι',
- 'ᾒ' => 'ἢι',
- 'ᾓ' => 'ἣι',
- 'ᾔ' => 'ἤι',
- 'ᾕ' => 'ἥι',
- 'ᾖ' => 'ἦι',
- 'ᾗ' => 'ἧι',
- 'ᾘ' => 'ἠι',
- 'ᾙ' => 'ἡι',
- 'ᾚ' => 'ἢι',
- 'ᾛ' => 'ἣι',
- 'ᾜ' => 'ἤι',
- 'ᾝ' => 'ἥι',
- 'ᾞ' => 'ἦι',
- 'ᾟ' => 'ἧι',
- 'ᾠ' => 'ὠι',
- 'ᾡ' => 'ὡι',
- 'ᾢ' => 'ὢι',
- 'ᾣ' => 'ὣι',
- 'ᾤ' => 'ὤι',
- 'ᾥ' => 'ὥι',
- 'ᾦ' => 'ὦι',
- 'ᾧ' => 'ὧι',
- 'ᾨ' => 'ὠι',
- 'ᾩ' => 'ὡι',
- 'ᾪ' => 'ὢι',
- 'ᾫ' => 'ὣι',
- 'ᾬ' => 'ὤι',
- 'ᾭ' => 'ὥι',
- 'ᾮ' => 'ὦι',
- 'ᾯ' => 'ὧι',
- 'ᾲ' => 'ὰι',
- 'ᾳ' => 'αι',
- 'ᾴ' => 'άι',
- 'ᾶ' => 'ᾶ',
- 'ᾷ' => 'ᾶι',
- 'ᾼ' => 'αι',
- 'ῂ' => 'ὴι',
- 'ῃ' => 'ηι',
- 'ῄ' => 'ήι',
- 'ῆ' => 'ῆ',
- 'ῇ' => 'ῆι',
- 'ῌ' => 'ηι',
- 'ῒ' => 'ῒ',
- 'ῖ' => 'ῖ',
- 'ῗ' => 'ῗ',
- 'ῢ' => 'ῢ',
- 'ῤ' => 'ῤ',
- 'ῦ' => 'ῦ',
- 'ῧ' => 'ῧ',
- 'ῲ' => 'ὼι',
- 'ῳ' => 'ωι',
- 'ῴ' => 'ώι',
- 'ῶ' => 'ῶ',
- 'ῷ' => 'ῶι',
- 'ῼ' => 'ωι',
- 'ff' => 'ff',
- 'fi' => 'fi',
- 'fl' => 'fl',
- 'ffi' => 'ffi',
- 'ffl' => 'ffl',
- 'ſt' => 'st',
- 'st' => 'st',
- 'ﬓ' => 'մն',
- 'ﬔ' => 'մե',
- 'ﬕ' => 'մի',
- 'ﬖ' => 'վն',
- 'ﬗ' => 'մխ',
-];
diff --git a/system/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/system/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
deleted file mode 100644
index fac60b0..0000000
--- a/system/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
+++ /dev/null
@@ -1,1397 +0,0 @@
- 'a',
- 'B' => 'b',
- 'C' => 'c',
- 'D' => 'd',
- 'E' => 'e',
- 'F' => 'f',
- 'G' => 'g',
- 'H' => 'h',
- 'I' => 'i',
- 'J' => 'j',
- 'K' => 'k',
- 'L' => 'l',
- 'M' => 'm',
- 'N' => 'n',
- 'O' => 'o',
- 'P' => 'p',
- 'Q' => 'q',
- 'R' => 'r',
- 'S' => 's',
- 'T' => 't',
- 'U' => 'u',
- 'V' => 'v',
- 'W' => 'w',
- 'X' => 'x',
- 'Y' => 'y',
- 'Z' => 'z',
- 'À' => 'à',
- 'Á' => 'á',
- 'Â' => 'â',
- 'Ã' => 'ã',
- 'Ä' => 'ä',
- 'Å' => 'å',
- 'Æ' => 'æ',
- 'Ç' => 'ç',
- 'È' => 'è',
- 'É' => 'é',
- 'Ê' => 'ê',
- 'Ë' => 'ë',
- 'Ì' => 'ì',
- 'Í' => 'í',
- 'Î' => 'î',
- 'Ï' => 'ï',
- 'Ð' => 'ð',
- 'Ñ' => 'ñ',
- 'Ò' => 'ò',
- 'Ó' => 'ó',
- 'Ô' => 'ô',
- 'Õ' => 'õ',
- 'Ö' => 'ö',
- 'Ø' => 'ø',
- 'Ù' => 'ù',
- 'Ú' => 'ú',
- 'Û' => 'û',
- 'Ü' => 'ü',
- 'Ý' => 'ý',
- 'Þ' => 'þ',
- 'Ā' => 'ā',
- 'Ă' => 'ă',
- 'Ą' => 'ą',
- 'Ć' => 'ć',
- 'Ĉ' => 'ĉ',
- 'Ċ' => 'ċ',
- 'Č' => 'č',
- 'Ď' => 'ď',
- 'Đ' => 'đ',
- 'Ē' => 'ē',
- 'Ĕ' => 'ĕ',
- 'Ė' => 'ė',
- 'Ę' => 'ę',
- 'Ě' => 'ě',
- 'Ĝ' => 'ĝ',
- 'Ğ' => 'ğ',
- 'Ġ' => 'ġ',
- 'Ģ' => 'ģ',
- 'Ĥ' => 'ĥ',
- 'Ħ' => 'ħ',
- 'Ĩ' => 'ĩ',
- 'Ī' => 'ī',
- 'Ĭ' => 'ĭ',
- 'Į' => 'į',
- 'İ' => 'i̇',
- 'IJ' => 'ij',
- 'Ĵ' => 'ĵ',
- 'Ķ' => 'ķ',
- 'Ĺ' => 'ĺ',
- 'Ļ' => 'ļ',
- 'Ľ' => 'ľ',
- 'Ŀ' => 'ŀ',
- 'Ł' => 'ł',
- 'Ń' => 'ń',
- 'Ņ' => 'ņ',
- 'Ň' => 'ň',
- 'Ŋ' => 'ŋ',
- 'Ō' => 'ō',
- 'Ŏ' => 'ŏ',
- 'Ő' => 'ő',
- 'Œ' => 'œ',
- 'Ŕ' => 'ŕ',
- 'Ŗ' => 'ŗ',
- 'Ř' => 'ř',
- 'Ś' => 'ś',
- 'Ŝ' => 'ŝ',
- 'Ş' => 'ş',
- 'Š' => 'š',
- 'Ţ' => 'ţ',
- 'Ť' => 'ť',
- 'Ŧ' => 'ŧ',
- 'Ũ' => 'ũ',
- 'Ū' => 'ū',
- 'Ŭ' => 'ŭ',
- 'Ů' => 'ů',
- 'Ű' => 'ű',
- 'Ų' => 'ų',
- 'Ŵ' => 'ŵ',
- 'Ŷ' => 'ŷ',
- 'Ÿ' => 'ÿ',
- 'Ź' => 'ź',
- 'Ż' => 'ż',
- 'Ž' => 'ž',
- 'Ɓ' => 'ɓ',
- 'Ƃ' => 'ƃ',
- 'Ƅ' => 'ƅ',
- 'Ɔ' => 'ɔ',
- 'Ƈ' => 'ƈ',
- 'Ɖ' => 'ɖ',
- 'Ɗ' => 'ɗ',
- 'Ƌ' => 'ƌ',
- 'Ǝ' => 'ǝ',
- 'Ə' => 'ə',
- 'Ɛ' => 'ɛ',
- 'Ƒ' => 'ƒ',
- 'Ɠ' => 'ɠ',
- 'Ɣ' => 'ɣ',
- 'Ɩ' => 'ɩ',
- 'Ɨ' => 'ɨ',
- 'Ƙ' => 'ƙ',
- 'Ɯ' => 'ɯ',
- 'Ɲ' => 'ɲ',
- 'Ɵ' => 'ɵ',
- 'Ơ' => 'ơ',
- 'Ƣ' => 'ƣ',
- 'Ƥ' => 'ƥ',
- 'Ʀ' => 'ʀ',
- 'Ƨ' => 'ƨ',
- 'Ʃ' => 'ʃ',
- 'Ƭ' => 'ƭ',
- 'Ʈ' => 'ʈ',
- 'Ư' => 'ư',
- 'Ʊ' => 'ʊ',
- 'Ʋ' => 'ʋ',
- 'Ƴ' => 'ƴ',
- 'Ƶ' => 'ƶ',
- 'Ʒ' => 'ʒ',
- 'Ƹ' => 'ƹ',
- 'Ƽ' => 'ƽ',
- 'DŽ' => 'dž',
- 'Dž' => 'dž',
- 'LJ' => 'lj',
- 'Lj' => 'lj',
- 'NJ' => 'nj',
- 'Nj' => 'nj',
- 'Ǎ' => 'ǎ',
- 'Ǐ' => 'ǐ',
- 'Ǒ' => 'ǒ',
- 'Ǔ' => 'ǔ',
- 'Ǖ' => 'ǖ',
- 'Ǘ' => 'ǘ',
- 'Ǚ' => 'ǚ',
- 'Ǜ' => 'ǜ',
- 'Ǟ' => 'ǟ',
- 'Ǡ' => 'ǡ',
- 'Ǣ' => 'ǣ',
- 'Ǥ' => 'ǥ',
- 'Ǧ' => 'ǧ',
- 'Ǩ' => 'ǩ',
- 'Ǫ' => 'ǫ',
- 'Ǭ' => 'ǭ',
- 'Ǯ' => 'ǯ',
- 'DZ' => 'dz',
- 'Dz' => 'dz',
- 'Ǵ' => 'ǵ',
- 'Ƕ' => 'ƕ',
- 'Ƿ' => 'ƿ',
- 'Ǹ' => 'ǹ',
- 'Ǻ' => 'ǻ',
- 'Ǽ' => 'ǽ',
- 'Ǿ' => 'ǿ',
- 'Ȁ' => 'ȁ',
- 'Ȃ' => 'ȃ',
- 'Ȅ' => 'ȅ',
- 'Ȇ' => 'ȇ',
- 'Ȉ' => 'ȉ',
- 'Ȋ' => 'ȋ',
- 'Ȍ' => 'ȍ',
- 'Ȏ' => 'ȏ',
- 'Ȑ' => 'ȑ',
- 'Ȓ' => 'ȓ',
- 'Ȕ' => 'ȕ',
- 'Ȗ' => 'ȗ',
- 'Ș' => 'ș',
- 'Ț' => 'ț',
- 'Ȝ' => 'ȝ',
- 'Ȟ' => 'ȟ',
- 'Ƞ' => 'ƞ',
- 'Ȣ' => 'ȣ',
- 'Ȥ' => 'ȥ',
- 'Ȧ' => 'ȧ',
- 'Ȩ' => 'ȩ',
- 'Ȫ' => 'ȫ',
- 'Ȭ' => 'ȭ',
- 'Ȯ' => 'ȯ',
- 'Ȱ' => 'ȱ',
- 'Ȳ' => 'ȳ',
- 'Ⱥ' => 'ⱥ',
- 'Ȼ' => 'ȼ',
- 'Ƚ' => 'ƚ',
- 'Ⱦ' => 'ⱦ',
- 'Ɂ' => 'ɂ',
- 'Ƀ' => 'ƀ',
- 'Ʉ' => 'ʉ',
- 'Ʌ' => 'ʌ',
- 'Ɇ' => 'ɇ',
- 'Ɉ' => 'ɉ',
- 'Ɋ' => 'ɋ',
- 'Ɍ' => 'ɍ',
- 'Ɏ' => 'ɏ',
- 'Ͱ' => 'ͱ',
- 'Ͳ' => 'ͳ',
- 'Ͷ' => 'ͷ',
- 'Ϳ' => 'ϳ',
- 'Ά' => 'ά',
- 'Έ' => 'έ',
- 'Ή' => 'ή',
- 'Ί' => 'ί',
- 'Ό' => 'ό',
- 'Ύ' => 'ύ',
- 'Ώ' => 'ώ',
- 'Α' => 'α',
- 'Β' => 'β',
- 'Γ' => 'γ',
- 'Δ' => 'δ',
- 'Ε' => 'ε',
- 'Ζ' => 'ζ',
- 'Η' => 'η',
- 'Θ' => 'θ',
- 'Ι' => 'ι',
- 'Κ' => 'κ',
- 'Λ' => 'λ',
- 'Μ' => 'μ',
- 'Ν' => 'ν',
- 'Ξ' => 'ξ',
- 'Ο' => 'ο',
- 'Π' => 'π',
- 'Ρ' => 'ρ',
- 'Σ' => 'σ',
- 'Τ' => 'τ',
- 'Υ' => 'υ',
- 'Φ' => 'φ',
- 'Χ' => 'χ',
- 'Ψ' => 'ψ',
- 'Ω' => 'ω',
- 'Ϊ' => 'ϊ',
- 'Ϋ' => 'ϋ',
- 'Ϗ' => 'ϗ',
- 'Ϙ' => 'ϙ',
- 'Ϛ' => 'ϛ',
- 'Ϝ' => 'ϝ',
- 'Ϟ' => 'ϟ',
- 'Ϡ' => 'ϡ',
- 'Ϣ' => 'ϣ',
- 'Ϥ' => 'ϥ',
- 'Ϧ' => 'ϧ',
- 'Ϩ' => 'ϩ',
- 'Ϫ' => 'ϫ',
- 'Ϭ' => 'ϭ',
- 'Ϯ' => 'ϯ',
- 'ϴ' => 'θ',
- 'Ϸ' => 'ϸ',
- 'Ϲ' => 'ϲ',
- 'Ϻ' => 'ϻ',
- 'Ͻ' => 'ͻ',
- 'Ͼ' => 'ͼ',
- 'Ͽ' => 'ͽ',
- 'Ѐ' => 'ѐ',
- 'Ё' => 'ё',
- 'Ђ' => 'ђ',
- 'Ѓ' => 'ѓ',
- 'Є' => 'є',
- 'Ѕ' => 'ѕ',
- 'І' => 'і',
- 'Ї' => 'ї',
- 'Ј' => 'ј',
- 'Љ' => 'љ',
- 'Њ' => 'њ',
- 'Ћ' => 'ћ',
- 'Ќ' => 'ќ',
- 'Ѝ' => 'ѝ',
- 'Ў' => 'ў',
- 'Џ' => 'џ',
- 'А' => 'а',
- 'Б' => 'б',
- 'В' => 'в',
- 'Г' => 'г',
- 'Д' => 'д',
- 'Е' => 'е',
- 'Ж' => 'ж',
- 'З' => 'з',
- 'И' => 'и',
- 'Й' => 'й',
- 'К' => 'к',
- 'Л' => 'л',
- 'М' => 'м',
- 'Н' => 'н',
- 'О' => 'о',
- 'П' => 'п',
- 'Р' => 'р',
- 'С' => 'с',
- 'Т' => 'т',
- 'У' => 'у',
- 'Ф' => 'ф',
- 'Х' => 'х',
- 'Ц' => 'ц',
- 'Ч' => 'ч',
- 'Ш' => 'ш',
- 'Щ' => 'щ',
- 'Ъ' => 'ъ',
- 'Ы' => 'ы',
- 'Ь' => 'ь',
- 'Э' => 'э',
- 'Ю' => 'ю',
- 'Я' => 'я',
- 'Ѡ' => 'ѡ',
- 'Ѣ' => 'ѣ',
- 'Ѥ' => 'ѥ',
- 'Ѧ' => 'ѧ',
- 'Ѩ' => 'ѩ',
- 'Ѫ' => 'ѫ',
- 'Ѭ' => 'ѭ',
- 'Ѯ' => 'ѯ',
- 'Ѱ' => 'ѱ',
- 'Ѳ' => 'ѳ',
- 'Ѵ' => 'ѵ',
- 'Ѷ' => 'ѷ',
- 'Ѹ' => 'ѹ',
- 'Ѻ' => 'ѻ',
- 'Ѽ' => 'ѽ',
- 'Ѿ' => 'ѿ',
- 'Ҁ' => 'ҁ',
- 'Ҋ' => 'ҋ',
- 'Ҍ' => 'ҍ',
- 'Ҏ' => 'ҏ',
- 'Ґ' => 'ґ',
- 'Ғ' => 'ғ',
- 'Ҕ' => 'ҕ',
- 'Җ' => 'җ',
- 'Ҙ' => 'ҙ',
- 'Қ' => 'қ',
- 'Ҝ' => 'ҝ',
- 'Ҟ' => 'ҟ',
- 'Ҡ' => 'ҡ',
- 'Ң' => 'ң',
- 'Ҥ' => 'ҥ',
- 'Ҧ' => 'ҧ',
- 'Ҩ' => 'ҩ',
- 'Ҫ' => 'ҫ',
- 'Ҭ' => 'ҭ',
- 'Ү' => 'ү',
- 'Ұ' => 'ұ',
- 'Ҳ' => 'ҳ',
- 'Ҵ' => 'ҵ',
- 'Ҷ' => 'ҷ',
- 'Ҹ' => 'ҹ',
- 'Һ' => 'һ',
- 'Ҽ' => 'ҽ',
- 'Ҿ' => 'ҿ',
- 'Ӏ' => 'ӏ',
- 'Ӂ' => 'ӂ',
- 'Ӄ' => 'ӄ',
- 'Ӆ' => 'ӆ',
- 'Ӈ' => 'ӈ',
- 'Ӊ' => 'ӊ',
- 'Ӌ' => 'ӌ',
- 'Ӎ' => 'ӎ',
- 'Ӑ' => 'ӑ',
- 'Ӓ' => 'ӓ',
- 'Ӕ' => 'ӕ',
- 'Ӗ' => 'ӗ',
- 'Ә' => 'ә',
- 'Ӛ' => 'ӛ',
- 'Ӝ' => 'ӝ',
- 'Ӟ' => 'ӟ',
- 'Ӡ' => 'ӡ',
- 'Ӣ' => 'ӣ',
- 'Ӥ' => 'ӥ',
- 'Ӧ' => 'ӧ',
- 'Ө' => 'ө',
- 'Ӫ' => 'ӫ',
- 'Ӭ' => 'ӭ',
- 'Ӯ' => 'ӯ',
- 'Ӱ' => 'ӱ',
- 'Ӳ' => 'ӳ',
- 'Ӵ' => 'ӵ',
- 'Ӷ' => 'ӷ',
- 'Ӹ' => 'ӹ',
- 'Ӻ' => 'ӻ',
- 'Ӽ' => 'ӽ',
- 'Ӿ' => 'ӿ',
- 'Ԁ' => 'ԁ',
- 'Ԃ' => 'ԃ',
- 'Ԅ' => 'ԅ',
- 'Ԇ' => 'ԇ',
- 'Ԉ' => 'ԉ',
- 'Ԋ' => 'ԋ',
- 'Ԍ' => 'ԍ',
- 'Ԏ' => 'ԏ',
- 'Ԑ' => 'ԑ',
- 'Ԓ' => 'ԓ',
- 'Ԕ' => 'ԕ',
- 'Ԗ' => 'ԗ',
- 'Ԙ' => 'ԙ',
- 'Ԛ' => 'ԛ',
- 'Ԝ' => 'ԝ',
- 'Ԟ' => 'ԟ',
- 'Ԡ' => 'ԡ',
- 'Ԣ' => 'ԣ',
- 'Ԥ' => 'ԥ',
- 'Ԧ' => 'ԧ',
- 'Ԩ' => 'ԩ',
- 'Ԫ' => 'ԫ',
- 'Ԭ' => 'ԭ',
- 'Ԯ' => 'ԯ',
- 'Ա' => 'ա',
- 'Բ' => 'բ',
- 'Գ' => 'գ',
- 'Դ' => 'դ',
- 'Ե' => 'ե',
- 'Զ' => 'զ',
- 'Է' => 'է',
- 'Ը' => 'ը',
- 'Թ' => 'թ',
- 'Ժ' => 'ժ',
- 'Ի' => 'ի',
- 'Լ' => 'լ',
- 'Խ' => 'խ',
- 'Ծ' => 'ծ',
- 'Կ' => 'կ',
- 'Հ' => 'հ',
- 'Ձ' => 'ձ',
- 'Ղ' => 'ղ',
- 'Ճ' => 'ճ',
- 'Մ' => 'մ',
- 'Յ' => 'յ',
- 'Ն' => 'ն',
- 'Շ' => 'շ',
- 'Ո' => 'ո',
- 'Չ' => 'չ',
- 'Պ' => 'պ',
- 'Ջ' => 'ջ',
- 'Ռ' => 'ռ',
- 'Ս' => 'ս',
- 'Վ' => 'վ',
- 'Տ' => 'տ',
- 'Ր' => 'ր',
- 'Ց' => 'ց',
- 'Ւ' => 'ւ',
- 'Փ' => 'փ',
- 'Ք' => 'ք',
- 'Օ' => 'օ',
- 'Ֆ' => 'ֆ',
- 'Ⴀ' => 'ⴀ',
- 'Ⴁ' => 'ⴁ',
- 'Ⴂ' => 'ⴂ',
- 'Ⴃ' => 'ⴃ',
- 'Ⴄ' => 'ⴄ',
- 'Ⴅ' => 'ⴅ',
- 'Ⴆ' => 'ⴆ',
- 'Ⴇ' => 'ⴇ',
- 'Ⴈ' => 'ⴈ',
- 'Ⴉ' => 'ⴉ',
- 'Ⴊ' => 'ⴊ',
- 'Ⴋ' => 'ⴋ',
- 'Ⴌ' => 'ⴌ',
- 'Ⴍ' => 'ⴍ',
- 'Ⴎ' => 'ⴎ',
- 'Ⴏ' => 'ⴏ',
- 'Ⴐ' => 'ⴐ',
- 'Ⴑ' => 'ⴑ',
- 'Ⴒ' => 'ⴒ',
- 'Ⴓ' => 'ⴓ',
- 'Ⴔ' => 'ⴔ',
- 'Ⴕ' => 'ⴕ',
- 'Ⴖ' => 'ⴖ',
- 'Ⴗ' => 'ⴗ',
- 'Ⴘ' => 'ⴘ',
- 'Ⴙ' => 'ⴙ',
- 'Ⴚ' => 'ⴚ',
- 'Ⴛ' => 'ⴛ',
- 'Ⴜ' => 'ⴜ',
- 'Ⴝ' => 'ⴝ',
- 'Ⴞ' => 'ⴞ',
- 'Ⴟ' => 'ⴟ',
- 'Ⴠ' => 'ⴠ',
- 'Ⴡ' => 'ⴡ',
- 'Ⴢ' => 'ⴢ',
- 'Ⴣ' => 'ⴣ',
- 'Ⴤ' => 'ⴤ',
- 'Ⴥ' => 'ⴥ',
- 'Ⴧ' => 'ⴧ',
- 'Ⴭ' => 'ⴭ',
- 'Ꭰ' => 'ꭰ',
- 'Ꭱ' => 'ꭱ',
- 'Ꭲ' => 'ꭲ',
- 'Ꭳ' => 'ꭳ',
- 'Ꭴ' => 'ꭴ',
- 'Ꭵ' => 'ꭵ',
- 'Ꭶ' => 'ꭶ',
- 'Ꭷ' => 'ꭷ',
- 'Ꭸ' => 'ꭸ',
- 'Ꭹ' => 'ꭹ',
- 'Ꭺ' => 'ꭺ',
- 'Ꭻ' => 'ꭻ',
- 'Ꭼ' => 'ꭼ',
- 'Ꭽ' => 'ꭽ',
- 'Ꭾ' => 'ꭾ',
- 'Ꭿ' => 'ꭿ',
- 'Ꮀ' => 'ꮀ',
- 'Ꮁ' => 'ꮁ',
- 'Ꮂ' => 'ꮂ',
- 'Ꮃ' => 'ꮃ',
- 'Ꮄ' => 'ꮄ',
- 'Ꮅ' => 'ꮅ',
- 'Ꮆ' => 'ꮆ',
- 'Ꮇ' => 'ꮇ',
- 'Ꮈ' => 'ꮈ',
- 'Ꮉ' => 'ꮉ',
- 'Ꮊ' => 'ꮊ',
- 'Ꮋ' => 'ꮋ',
- 'Ꮌ' => 'ꮌ',
- 'Ꮍ' => 'ꮍ',
- 'Ꮎ' => 'ꮎ',
- 'Ꮏ' => 'ꮏ',
- 'Ꮐ' => 'ꮐ',
- 'Ꮑ' => 'ꮑ',
- 'Ꮒ' => 'ꮒ',
- 'Ꮓ' => 'ꮓ',
- 'Ꮔ' => 'ꮔ',
- 'Ꮕ' => 'ꮕ',
- 'Ꮖ' => 'ꮖ',
- 'Ꮗ' => 'ꮗ',
- 'Ꮘ' => 'ꮘ',
- 'Ꮙ' => 'ꮙ',
- 'Ꮚ' => 'ꮚ',
- 'Ꮛ' => 'ꮛ',
- 'Ꮜ' => 'ꮜ',
- 'Ꮝ' => 'ꮝ',
- 'Ꮞ' => 'ꮞ',
- 'Ꮟ' => 'ꮟ',
- 'Ꮠ' => 'ꮠ',
- 'Ꮡ' => 'ꮡ',
- 'Ꮢ' => 'ꮢ',
- 'Ꮣ' => 'ꮣ',
- 'Ꮤ' => 'ꮤ',
- 'Ꮥ' => 'ꮥ',
- 'Ꮦ' => 'ꮦ',
- 'Ꮧ' => 'ꮧ',
- 'Ꮨ' => 'ꮨ',
- 'Ꮩ' => 'ꮩ',
- 'Ꮪ' => 'ꮪ',
- 'Ꮫ' => 'ꮫ',
- 'Ꮬ' => 'ꮬ',
- 'Ꮭ' => 'ꮭ',
- 'Ꮮ' => 'ꮮ',
- 'Ꮯ' => 'ꮯ',
- 'Ꮰ' => 'ꮰ',
- 'Ꮱ' => 'ꮱ',
- 'Ꮲ' => 'ꮲ',
- 'Ꮳ' => 'ꮳ',
- 'Ꮴ' => 'ꮴ',
- 'Ꮵ' => 'ꮵ',
- 'Ꮶ' => 'ꮶ',
- 'Ꮷ' => 'ꮷ',
- 'Ꮸ' => 'ꮸ',
- 'Ꮹ' => 'ꮹ',
- 'Ꮺ' => 'ꮺ',
- 'Ꮻ' => 'ꮻ',
- 'Ꮼ' => 'ꮼ',
- 'Ꮽ' => 'ꮽ',
- 'Ꮾ' => 'ꮾ',
- 'Ꮿ' => 'ꮿ',
- 'Ᏸ' => 'ᏸ',
- 'Ᏹ' => 'ᏹ',
- 'Ᏺ' => 'ᏺ',
- 'Ᏻ' => 'ᏻ',
- 'Ᏼ' => 'ᏼ',
- 'Ᏽ' => 'ᏽ',
- 'Ა' => 'ა',
- 'Ბ' => 'ბ',
- 'Გ' => 'გ',
- 'Დ' => 'დ',
- 'Ე' => 'ე',
- 'Ვ' => 'ვ',
- 'Ზ' => 'ზ',
- 'Თ' => 'თ',
- 'Ი' => 'ი',
- 'Კ' => 'კ',
- 'Ლ' => 'ლ',
- 'Მ' => 'მ',
- 'Ნ' => 'ნ',
- 'Ო' => 'ო',
- 'Პ' => 'პ',
- 'Ჟ' => 'ჟ',
- 'Რ' => 'რ',
- 'Ს' => 'ს',
- 'Ტ' => 'ტ',
- 'Უ' => 'უ',
- 'Ფ' => 'ფ',
- 'Ქ' => 'ქ',
- 'Ღ' => 'ღ',
- 'Ყ' => 'ყ',
- 'Შ' => 'შ',
- 'Ჩ' => 'ჩ',
- 'Ც' => 'ც',
- 'Ძ' => 'ძ',
- 'Წ' => 'წ',
- 'Ჭ' => 'ჭ',
- 'Ხ' => 'ხ',
- 'Ჯ' => 'ჯ',
- 'Ჰ' => 'ჰ',
- 'Ჱ' => 'ჱ',
- 'Ჲ' => 'ჲ',
- 'Ჳ' => 'ჳ',
- 'Ჴ' => 'ჴ',
- 'Ჵ' => 'ჵ',
- 'Ჶ' => 'ჶ',
- 'Ჷ' => 'ჷ',
- 'Ჸ' => 'ჸ',
- 'Ჹ' => 'ჹ',
- 'Ჺ' => 'ჺ',
- 'Ჽ' => 'ჽ',
- 'Ჾ' => 'ჾ',
- 'Ჿ' => 'ჿ',
- 'Ḁ' => 'ḁ',
- 'Ḃ' => 'ḃ',
- 'Ḅ' => 'ḅ',
- 'Ḇ' => 'ḇ',
- 'Ḉ' => 'ḉ',
- 'Ḋ' => 'ḋ',
- 'Ḍ' => 'ḍ',
- 'Ḏ' => 'ḏ',
- 'Ḑ' => 'ḑ',
- 'Ḓ' => 'ḓ',
- 'Ḕ' => 'ḕ',
- 'Ḗ' => 'ḗ',
- 'Ḙ' => 'ḙ',
- 'Ḛ' => 'ḛ',
- 'Ḝ' => 'ḝ',
- 'Ḟ' => 'ḟ',
- 'Ḡ' => 'ḡ',
- 'Ḣ' => 'ḣ',
- 'Ḥ' => 'ḥ',
- 'Ḧ' => 'ḧ',
- 'Ḩ' => 'ḩ',
- 'Ḫ' => 'ḫ',
- 'Ḭ' => 'ḭ',
- 'Ḯ' => 'ḯ',
- 'Ḱ' => 'ḱ',
- 'Ḳ' => 'ḳ',
- 'Ḵ' => 'ḵ',
- 'Ḷ' => 'ḷ',
- 'Ḹ' => 'ḹ',
- 'Ḻ' => 'ḻ',
- 'Ḽ' => 'ḽ',
- 'Ḿ' => 'ḿ',
- 'Ṁ' => 'ṁ',
- 'Ṃ' => 'ṃ',
- 'Ṅ' => 'ṅ',
- 'Ṇ' => 'ṇ',
- 'Ṉ' => 'ṉ',
- 'Ṋ' => 'ṋ',
- 'Ṍ' => 'ṍ',
- 'Ṏ' => 'ṏ',
- 'Ṑ' => 'ṑ',
- 'Ṓ' => 'ṓ',
- 'Ṕ' => 'ṕ',
- 'Ṗ' => 'ṗ',
- 'Ṙ' => 'ṙ',
- 'Ṛ' => 'ṛ',
- 'Ṝ' => 'ṝ',
- 'Ṟ' => 'ṟ',
- 'Ṡ' => 'ṡ',
- 'Ṣ' => 'ṣ',
- 'Ṥ' => 'ṥ',
- 'Ṧ' => 'ṧ',
- 'Ṩ' => 'ṩ',
- 'Ṫ' => 'ṫ',
- 'Ṭ' => 'ṭ',
- 'Ṯ' => 'ṯ',
- 'Ṱ' => 'ṱ',
- 'Ṳ' => 'ṳ',
- 'Ṵ' => 'ṵ',
- 'Ṷ' => 'ṷ',
- 'Ṹ' => 'ṹ',
- 'Ṻ' => 'ṻ',
- 'Ṽ' => 'ṽ',
- 'Ṿ' => 'ṿ',
- 'Ẁ' => 'ẁ',
- 'Ẃ' => 'ẃ',
- 'Ẅ' => 'ẅ',
- 'Ẇ' => 'ẇ',
- 'Ẉ' => 'ẉ',
- 'Ẋ' => 'ẋ',
- 'Ẍ' => 'ẍ',
- 'Ẏ' => 'ẏ',
- 'Ẑ' => 'ẑ',
- 'Ẓ' => 'ẓ',
- 'Ẕ' => 'ẕ',
- 'ẞ' => 'ß',
- 'Ạ' => 'ạ',
- 'Ả' => 'ả',
- 'Ấ' => 'ấ',
- 'Ầ' => 'ầ',
- 'Ẩ' => 'ẩ',
- 'Ẫ' => 'ẫ',
- 'Ậ' => 'ậ',
- 'Ắ' => 'ắ',
- 'Ằ' => 'ằ',
- 'Ẳ' => 'ẳ',
- 'Ẵ' => 'ẵ',
- 'Ặ' => 'ặ',
- 'Ẹ' => 'ẹ',
- 'Ẻ' => 'ẻ',
- 'Ẽ' => 'ẽ',
- 'Ế' => 'ế',
- 'Ề' => 'ề',
- 'Ể' => 'ể',
- 'Ễ' => 'ễ',
- 'Ệ' => 'ệ',
- 'Ỉ' => 'ỉ',
- 'Ị' => 'ị',
- 'Ọ' => 'ọ',
- 'Ỏ' => 'ỏ',
- 'Ố' => 'ố',
- 'Ồ' => 'ồ',
- 'Ổ' => 'ổ',
- 'Ỗ' => 'ỗ',
- 'Ộ' => 'ộ',
- 'Ớ' => 'ớ',
- 'Ờ' => 'ờ',
- 'Ở' => 'ở',
- 'Ỡ' => 'ỡ',
- 'Ợ' => 'ợ',
- 'Ụ' => 'ụ',
- 'Ủ' => 'ủ',
- 'Ứ' => 'ứ',
- 'Ừ' => 'ừ',
- 'Ử' => 'ử',
- 'Ữ' => 'ữ',
- 'Ự' => 'ự',
- 'Ỳ' => 'ỳ',
- 'Ỵ' => 'ỵ',
- 'Ỷ' => 'ỷ',
- 'Ỹ' => 'ỹ',
- 'Ỻ' => 'ỻ',
- 'Ỽ' => 'ỽ',
- 'Ỿ' => 'ỿ',
- 'Ἀ' => 'ἀ',
- 'Ἁ' => 'ἁ',
- 'Ἂ' => 'ἂ',
- 'Ἃ' => 'ἃ',
- 'Ἄ' => 'ἄ',
- 'Ἅ' => 'ἅ',
- 'Ἆ' => 'ἆ',
- 'Ἇ' => 'ἇ',
- 'Ἐ' => 'ἐ',
- 'Ἑ' => 'ἑ',
- 'Ἒ' => 'ἒ',
- 'Ἓ' => 'ἓ',
- 'Ἔ' => 'ἔ',
- 'Ἕ' => 'ἕ',
- 'Ἠ' => 'ἠ',
- 'Ἡ' => 'ἡ',
- 'Ἢ' => 'ἢ',
- 'Ἣ' => 'ἣ',
- 'Ἤ' => 'ἤ',
- 'Ἥ' => 'ἥ',
- 'Ἦ' => 'ἦ',
- 'Ἧ' => 'ἧ',
- 'Ἰ' => 'ἰ',
- 'Ἱ' => 'ἱ',
- 'Ἲ' => 'ἲ',
- 'Ἳ' => 'ἳ',
- 'Ἴ' => 'ἴ',
- 'Ἵ' => 'ἵ',
- 'Ἶ' => 'ἶ',
- 'Ἷ' => 'ἷ',
- 'Ὀ' => 'ὀ',
- 'Ὁ' => 'ὁ',
- 'Ὂ' => 'ὂ',
- 'Ὃ' => 'ὃ',
- 'Ὄ' => 'ὄ',
- 'Ὅ' => 'ὅ',
- 'Ὑ' => 'ὑ',
- 'Ὓ' => 'ὓ',
- 'Ὕ' => 'ὕ',
- 'Ὗ' => 'ὗ',
- 'Ὠ' => 'ὠ',
- 'Ὡ' => 'ὡ',
- 'Ὢ' => 'ὢ',
- 'Ὣ' => 'ὣ',
- 'Ὤ' => 'ὤ',
- 'Ὥ' => 'ὥ',
- 'Ὦ' => 'ὦ',
- 'Ὧ' => 'ὧ',
- 'ᾈ' => 'ᾀ',
- 'ᾉ' => 'ᾁ',
- 'ᾊ' => 'ᾂ',
- 'ᾋ' => 'ᾃ',
- 'ᾌ' => 'ᾄ',
- 'ᾍ' => 'ᾅ',
- 'ᾎ' => 'ᾆ',
- 'ᾏ' => 'ᾇ',
- 'ᾘ' => 'ᾐ',
- 'ᾙ' => 'ᾑ',
- 'ᾚ' => 'ᾒ',
- 'ᾛ' => 'ᾓ',
- 'ᾜ' => 'ᾔ',
- 'ᾝ' => 'ᾕ',
- 'ᾞ' => 'ᾖ',
- 'ᾟ' => 'ᾗ',
- 'ᾨ' => 'ᾠ',
- 'ᾩ' => 'ᾡ',
- 'ᾪ' => 'ᾢ',
- 'ᾫ' => 'ᾣ',
- 'ᾬ' => 'ᾤ',
- 'ᾭ' => 'ᾥ',
- 'ᾮ' => 'ᾦ',
- 'ᾯ' => 'ᾧ',
- 'Ᾰ' => 'ᾰ',
- 'Ᾱ' => 'ᾱ',
- 'Ὰ' => 'ὰ',
- 'Ά' => 'ά',
- 'ᾼ' => 'ᾳ',
- 'Ὲ' => 'ὲ',
- 'Έ' => 'έ',
- 'Ὴ' => 'ὴ',
- 'Ή' => 'ή',
- 'ῌ' => 'ῃ',
- 'Ῐ' => 'ῐ',
- 'Ῑ' => 'ῑ',
- 'Ὶ' => 'ὶ',
- 'Ί' => 'ί',
- 'Ῠ' => 'ῠ',
- 'Ῡ' => 'ῡ',
- 'Ὺ' => 'ὺ',
- 'Ύ' => 'ύ',
- 'Ῥ' => 'ῥ',
- 'Ὸ' => 'ὸ',
- 'Ό' => 'ό',
- 'Ὼ' => 'ὼ',
- 'Ώ' => 'ώ',
- 'ῼ' => 'ῳ',
- 'Ω' => 'ω',
- 'K' => 'k',
- 'Å' => 'å',
- 'Ⅎ' => 'ⅎ',
- 'Ⅰ' => 'ⅰ',
- 'Ⅱ' => 'ⅱ',
- 'Ⅲ' => 'ⅲ',
- 'Ⅳ' => 'ⅳ',
- 'Ⅴ' => 'ⅴ',
- 'Ⅵ' => 'ⅵ',
- 'Ⅶ' => 'ⅶ',
- 'Ⅷ' => 'ⅷ',
- 'Ⅸ' => 'ⅸ',
- 'Ⅹ' => 'ⅹ',
- 'Ⅺ' => 'ⅺ',
- 'Ⅻ' => 'ⅻ',
- 'Ⅼ' => 'ⅼ',
- 'Ⅽ' => 'ⅽ',
- 'Ⅾ' => 'ⅾ',
- 'Ⅿ' => 'ⅿ',
- 'Ↄ' => 'ↄ',
- 'Ⓐ' => 'ⓐ',
- 'Ⓑ' => 'ⓑ',
- 'Ⓒ' => 'ⓒ',
- 'Ⓓ' => 'ⓓ',
- 'Ⓔ' => 'ⓔ',
- 'Ⓕ' => 'ⓕ',
- 'Ⓖ' => 'ⓖ',
- 'Ⓗ' => 'ⓗ',
- 'Ⓘ' => 'ⓘ',
- 'Ⓙ' => 'ⓙ',
- 'Ⓚ' => 'ⓚ',
- 'Ⓛ' => 'ⓛ',
- 'Ⓜ' => 'ⓜ',
- 'Ⓝ' => 'ⓝ',
- 'Ⓞ' => 'ⓞ',
- 'Ⓟ' => 'ⓟ',
- 'Ⓠ' => 'ⓠ',
- 'Ⓡ' => 'ⓡ',
- 'Ⓢ' => 'ⓢ',
- 'Ⓣ' => 'ⓣ',
- 'Ⓤ' => 'ⓤ',
- 'Ⓥ' => 'ⓥ',
- 'Ⓦ' => 'ⓦ',
- 'Ⓧ' => 'ⓧ',
- 'Ⓨ' => 'ⓨ',
- 'Ⓩ' => 'ⓩ',
- 'Ⰰ' => 'ⰰ',
- 'Ⰱ' => 'ⰱ',
- 'Ⰲ' => 'ⰲ',
- 'Ⰳ' => 'ⰳ',
- 'Ⰴ' => 'ⰴ',
- 'Ⰵ' => 'ⰵ',
- 'Ⰶ' => 'ⰶ',
- 'Ⰷ' => 'ⰷ',
- 'Ⰸ' => 'ⰸ',
- 'Ⰹ' => 'ⰹ',
- 'Ⰺ' => 'ⰺ',
- 'Ⰻ' => 'ⰻ',
- 'Ⰼ' => 'ⰼ',
- 'Ⰽ' => 'ⰽ',
- 'Ⰾ' => 'ⰾ',
- 'Ⰿ' => 'ⰿ',
- 'Ⱀ' => 'ⱀ',
- 'Ⱁ' => 'ⱁ',
- 'Ⱂ' => 'ⱂ',
- 'Ⱃ' => 'ⱃ',
- 'Ⱄ' => 'ⱄ',
- 'Ⱅ' => 'ⱅ',
- 'Ⱆ' => 'ⱆ',
- 'Ⱇ' => 'ⱇ',
- 'Ⱈ' => 'ⱈ',
- 'Ⱉ' => 'ⱉ',
- 'Ⱊ' => 'ⱊ',
- 'Ⱋ' => 'ⱋ',
- 'Ⱌ' => 'ⱌ',
- 'Ⱍ' => 'ⱍ',
- 'Ⱎ' => 'ⱎ',
- 'Ⱏ' => 'ⱏ',
- 'Ⱐ' => 'ⱐ',
- 'Ⱑ' => 'ⱑ',
- 'Ⱒ' => 'ⱒ',
- 'Ⱓ' => 'ⱓ',
- 'Ⱔ' => 'ⱔ',
- 'Ⱕ' => 'ⱕ',
- 'Ⱖ' => 'ⱖ',
- 'Ⱗ' => 'ⱗ',
- 'Ⱘ' => 'ⱘ',
- 'Ⱙ' => 'ⱙ',
- 'Ⱚ' => 'ⱚ',
- 'Ⱛ' => 'ⱛ',
- 'Ⱜ' => 'ⱜ',
- 'Ⱝ' => 'ⱝ',
- 'Ⱞ' => 'ⱞ',
- 'Ⱡ' => 'ⱡ',
- 'Ɫ' => 'ɫ',
- 'Ᵽ' => 'ᵽ',
- 'Ɽ' => 'ɽ',
- 'Ⱨ' => 'ⱨ',
- 'Ⱪ' => 'ⱪ',
- 'Ⱬ' => 'ⱬ',
- 'Ɑ' => 'ɑ',
- 'Ɱ' => 'ɱ',
- 'Ɐ' => 'ɐ',
- 'Ɒ' => 'ɒ',
- 'Ⱳ' => 'ⱳ',
- 'Ⱶ' => 'ⱶ',
- 'Ȿ' => 'ȿ',
- 'Ɀ' => 'ɀ',
- 'Ⲁ' => 'ⲁ',
- 'Ⲃ' => 'ⲃ',
- 'Ⲅ' => 'ⲅ',
- 'Ⲇ' => 'ⲇ',
- 'Ⲉ' => 'ⲉ',
- 'Ⲋ' => 'ⲋ',
- 'Ⲍ' => 'ⲍ',
- 'Ⲏ' => 'ⲏ',
- 'Ⲑ' => 'ⲑ',
- 'Ⲓ' => 'ⲓ',
- 'Ⲕ' => 'ⲕ',
- 'Ⲗ' => 'ⲗ',
- 'Ⲙ' => 'ⲙ',
- 'Ⲛ' => 'ⲛ',
- 'Ⲝ' => 'ⲝ',
- 'Ⲟ' => 'ⲟ',
- 'Ⲡ' => 'ⲡ',
- 'Ⲣ' => 'ⲣ',
- 'Ⲥ' => 'ⲥ',
- 'Ⲧ' => 'ⲧ',
- 'Ⲩ' => 'ⲩ',
- 'Ⲫ' => 'ⲫ',
- 'Ⲭ' => 'ⲭ',
- 'Ⲯ' => 'ⲯ',
- 'Ⲱ' => 'ⲱ',
- 'Ⲳ' => 'ⲳ',
- 'Ⲵ' => 'ⲵ',
- 'Ⲷ' => 'ⲷ',
- 'Ⲹ' => 'ⲹ',
- 'Ⲻ' => 'ⲻ',
- 'Ⲽ' => 'ⲽ',
- 'Ⲿ' => 'ⲿ',
- 'Ⳁ' => 'ⳁ',
- 'Ⳃ' => 'ⳃ',
- 'Ⳅ' => 'ⳅ',
- 'Ⳇ' => 'ⳇ',
- 'Ⳉ' => 'ⳉ',
- 'Ⳋ' => 'ⳋ',
- 'Ⳍ' => 'ⳍ',
- 'Ⳏ' => 'ⳏ',
- 'Ⳑ' => 'ⳑ',
- 'Ⳓ' => 'ⳓ',
- 'Ⳕ' => 'ⳕ',
- 'Ⳗ' => 'ⳗ',
- 'Ⳙ' => 'ⳙ',
- 'Ⳛ' => 'ⳛ',
- 'Ⳝ' => 'ⳝ',
- 'Ⳟ' => 'ⳟ',
- 'Ⳡ' => 'ⳡ',
- 'Ⳣ' => 'ⳣ',
- 'Ⳬ' => 'ⳬ',
- 'Ⳮ' => 'ⳮ',
- 'Ⳳ' => 'ⳳ',
- 'Ꙁ' => 'ꙁ',
- 'Ꙃ' => 'ꙃ',
- 'Ꙅ' => 'ꙅ',
- 'Ꙇ' => 'ꙇ',
- 'Ꙉ' => 'ꙉ',
- 'Ꙋ' => 'ꙋ',
- 'Ꙍ' => 'ꙍ',
- 'Ꙏ' => 'ꙏ',
- 'Ꙑ' => 'ꙑ',
- 'Ꙓ' => 'ꙓ',
- 'Ꙕ' => 'ꙕ',
- 'Ꙗ' => 'ꙗ',
- 'Ꙙ' => 'ꙙ',
- 'Ꙛ' => 'ꙛ',
- 'Ꙝ' => 'ꙝ',
- 'Ꙟ' => 'ꙟ',
- 'Ꙡ' => 'ꙡ',
- 'Ꙣ' => 'ꙣ',
- 'Ꙥ' => 'ꙥ',
- 'Ꙧ' => 'ꙧ',
- 'Ꙩ' => 'ꙩ',
- 'Ꙫ' => 'ꙫ',
- 'Ꙭ' => 'ꙭ',
- 'Ꚁ' => 'ꚁ',
- 'Ꚃ' => 'ꚃ',
- 'Ꚅ' => 'ꚅ',
- 'Ꚇ' => 'ꚇ',
- 'Ꚉ' => 'ꚉ',
- 'Ꚋ' => 'ꚋ',
- 'Ꚍ' => 'ꚍ',
- 'Ꚏ' => 'ꚏ',
- 'Ꚑ' => 'ꚑ',
- 'Ꚓ' => 'ꚓ',
- 'Ꚕ' => 'ꚕ',
- 'Ꚗ' => 'ꚗ',
- 'Ꚙ' => 'ꚙ',
- 'Ꚛ' => 'ꚛ',
- 'Ꜣ' => 'ꜣ',
- 'Ꜥ' => 'ꜥ',
- 'Ꜧ' => 'ꜧ',
- 'Ꜩ' => 'ꜩ',
- 'Ꜫ' => 'ꜫ',
- 'Ꜭ' => 'ꜭ',
- 'Ꜯ' => 'ꜯ',
- 'Ꜳ' => 'ꜳ',
- 'Ꜵ' => 'ꜵ',
- 'Ꜷ' => 'ꜷ',
- 'Ꜹ' => 'ꜹ',
- 'Ꜻ' => 'ꜻ',
- 'Ꜽ' => 'ꜽ',
- 'Ꜿ' => 'ꜿ',
- 'Ꝁ' => 'ꝁ',
- 'Ꝃ' => 'ꝃ',
- 'Ꝅ' => 'ꝅ',
- 'Ꝇ' => 'ꝇ',
- 'Ꝉ' => 'ꝉ',
- 'Ꝋ' => 'ꝋ',
- 'Ꝍ' => 'ꝍ',
- 'Ꝏ' => 'ꝏ',
- 'Ꝑ' => 'ꝑ',
- 'Ꝓ' => 'ꝓ',
- 'Ꝕ' => 'ꝕ',
- 'Ꝗ' => 'ꝗ',
- 'Ꝙ' => 'ꝙ',
- 'Ꝛ' => 'ꝛ',
- 'Ꝝ' => 'ꝝ',
- 'Ꝟ' => 'ꝟ',
- 'Ꝡ' => 'ꝡ',
- 'Ꝣ' => 'ꝣ',
- 'Ꝥ' => 'ꝥ',
- 'Ꝧ' => 'ꝧ',
- 'Ꝩ' => 'ꝩ',
- 'Ꝫ' => 'ꝫ',
- 'Ꝭ' => 'ꝭ',
- 'Ꝯ' => 'ꝯ',
- 'Ꝺ' => 'ꝺ',
- 'Ꝼ' => 'ꝼ',
- 'Ᵹ' => 'ᵹ',
- 'Ꝿ' => 'ꝿ',
- 'Ꞁ' => 'ꞁ',
- 'Ꞃ' => 'ꞃ',
- 'Ꞅ' => 'ꞅ',
- 'Ꞇ' => 'ꞇ',
- 'Ꞌ' => 'ꞌ',
- 'Ɥ' => 'ɥ',
- 'Ꞑ' => 'ꞑ',
- 'Ꞓ' => 'ꞓ',
- 'Ꞗ' => 'ꞗ',
- 'Ꞙ' => 'ꞙ',
- 'Ꞛ' => 'ꞛ',
- 'Ꞝ' => 'ꞝ',
- 'Ꞟ' => 'ꞟ',
- 'Ꞡ' => 'ꞡ',
- 'Ꞣ' => 'ꞣ',
- 'Ꞥ' => 'ꞥ',
- 'Ꞧ' => 'ꞧ',
- 'Ꞩ' => 'ꞩ',
- 'Ɦ' => 'ɦ',
- 'Ɜ' => 'ɜ',
- 'Ɡ' => 'ɡ',
- 'Ɬ' => 'ɬ',
- 'Ɪ' => 'ɪ',
- 'Ʞ' => 'ʞ',
- 'Ʇ' => 'ʇ',
- 'Ʝ' => 'ʝ',
- 'Ꭓ' => 'ꭓ',
- 'Ꞵ' => 'ꞵ',
- 'Ꞷ' => 'ꞷ',
- 'Ꞹ' => 'ꞹ',
- 'Ꞻ' => 'ꞻ',
- 'Ꞽ' => 'ꞽ',
- 'Ꞿ' => 'ꞿ',
- 'Ꟃ' => 'ꟃ',
- 'Ꞔ' => 'ꞔ',
- 'Ʂ' => 'ʂ',
- 'Ᶎ' => 'ᶎ',
- 'Ꟈ' => 'ꟈ',
- 'Ꟊ' => 'ꟊ',
- 'Ꟶ' => 'ꟶ',
- 'A' => 'a',
- 'B' => 'b',
- 'C' => 'c',
- 'D' => 'd',
- 'E' => 'e',
- 'F' => 'f',
- 'G' => 'g',
- 'H' => 'h',
- 'I' => 'i',
- 'J' => 'j',
- 'K' => 'k',
- 'L' => 'l',
- 'M' => 'm',
- 'N' => 'n',
- 'O' => 'o',
- 'P' => 'p',
- 'Q' => 'q',
- 'R' => 'r',
- 'S' => 's',
- 'T' => 't',
- 'U' => 'u',
- 'V' => 'v',
- 'W' => 'w',
- 'X' => 'x',
- 'Y' => 'y',
- 'Z' => 'z',
- '𐐀' => '𐐨',
- '𐐁' => '𐐩',
- '𐐂' => '𐐪',
- '𐐃' => '𐐫',
- '𐐄' => '𐐬',
- '𐐅' => '𐐭',
- '𐐆' => '𐐮',
- '𐐇' => '𐐯',
- '𐐈' => '𐐰',
- '𐐉' => '𐐱',
- '𐐊' => '𐐲',
- '𐐋' => '𐐳',
- '𐐌' => '𐐴',
- '𐐍' => '𐐵',
- '𐐎' => '𐐶',
- '𐐏' => '𐐷',
- '𐐐' => '𐐸',
- '𐐑' => '𐐹',
- '𐐒' => '𐐺',
- '𐐓' => '𐐻',
- '𐐔' => '𐐼',
- '𐐕' => '𐐽',
- '𐐖' => '𐐾',
- '𐐗' => '𐐿',
- '𐐘' => '𐑀',
- '𐐙' => '𐑁',
- '𐐚' => '𐑂',
- '𐐛' => '𐑃',
- '𐐜' => '𐑄',
- '𐐝' => '𐑅',
- '𐐞' => '𐑆',
- '𐐟' => '𐑇',
- '𐐠' => '𐑈',
- '𐐡' => '𐑉',
- '𐐢' => '𐑊',
- '𐐣' => '𐑋',
- '𐐤' => '𐑌',
- '𐐥' => '𐑍',
- '𐐦' => '𐑎',
- '𐐧' => '𐑏',
- '𐒰' => '𐓘',
- '𐒱' => '𐓙',
- '𐒲' => '𐓚',
- '𐒳' => '𐓛',
- '𐒴' => '𐓜',
- '𐒵' => '𐓝',
- '𐒶' => '𐓞',
- '𐒷' => '𐓟',
- '𐒸' => '𐓠',
- '𐒹' => '𐓡',
- '𐒺' => '𐓢',
- '𐒻' => '𐓣',
- '𐒼' => '𐓤',
- '𐒽' => '𐓥',
- '𐒾' => '𐓦',
- '𐒿' => '𐓧',
- '𐓀' => '𐓨',
- '𐓁' => '𐓩',
- '𐓂' => '𐓪',
- '𐓃' => '𐓫',
- '𐓄' => '𐓬',
- '𐓅' => '𐓭',
- '𐓆' => '𐓮',
- '𐓇' => '𐓯',
- '𐓈' => '𐓰',
- '𐓉' => '𐓱',
- '𐓊' => '𐓲',
- '𐓋' => '𐓳',
- '𐓌' => '𐓴',
- '𐓍' => '𐓵',
- '𐓎' => '𐓶',
- '𐓏' => '𐓷',
- '𐓐' => '𐓸',
- '𐓑' => '𐓹',
- '𐓒' => '𐓺',
- '𐓓' => '𐓻',
- '𐲀' => '𐳀',
- '𐲁' => '𐳁',
- '𐲂' => '𐳂',
- '𐲃' => '𐳃',
- '𐲄' => '𐳄',
- '𐲅' => '𐳅',
- '𐲆' => '𐳆',
- '𐲇' => '𐳇',
- '𐲈' => '𐳈',
- '𐲉' => '𐳉',
- '𐲊' => '𐳊',
- '𐲋' => '𐳋',
- '𐲌' => '𐳌',
- '𐲍' => '𐳍',
- '𐲎' => '𐳎',
- '𐲏' => '𐳏',
- '𐲐' => '𐳐',
- '𐲑' => '𐳑',
- '𐲒' => '𐳒',
- '𐲓' => '𐳓',
- '𐲔' => '𐳔',
- '𐲕' => '𐳕',
- '𐲖' => '𐳖',
- '𐲗' => '𐳗',
- '𐲘' => '𐳘',
- '𐲙' => '𐳙',
- '𐲚' => '𐳚',
- '𐲛' => '𐳛',
- '𐲜' => '𐳜',
- '𐲝' => '𐳝',
- '𐲞' => '𐳞',
- '𐲟' => '𐳟',
- '𐲠' => '𐳠',
- '𐲡' => '𐳡',
- '𐲢' => '𐳢',
- '𐲣' => '𐳣',
- '𐲤' => '𐳤',
- '𐲥' => '𐳥',
- '𐲦' => '𐳦',
- '𐲧' => '𐳧',
- '𐲨' => '𐳨',
- '𐲩' => '𐳩',
- '𐲪' => '𐳪',
- '𐲫' => '𐳫',
- '𐲬' => '𐳬',
- '𐲭' => '𐳭',
- '𐲮' => '𐳮',
- '𐲯' => '𐳯',
- '𐲰' => '𐳰',
- '𐲱' => '𐳱',
- '𐲲' => '𐳲',
- '𑢠' => '𑣀',
- '𑢡' => '𑣁',
- '𑢢' => '𑣂',
- '𑢣' => '𑣃',
- '𑢤' => '𑣄',
- '𑢥' => '𑣅',
- '𑢦' => '𑣆',
- '𑢧' => '𑣇',
- '𑢨' => '𑣈',
- '𑢩' => '𑣉',
- '𑢪' => '𑣊',
- '𑢫' => '𑣋',
- '𑢬' => '𑣌',
- '𑢭' => '𑣍',
- '𑢮' => '𑣎',
- '𑢯' => '𑣏',
- '𑢰' => '𑣐',
- '𑢱' => '𑣑',
- '𑢲' => '𑣒',
- '𑢳' => '𑣓',
- '𑢴' => '𑣔',
- '𑢵' => '𑣕',
- '𑢶' => '𑣖',
- '𑢷' => '𑣗',
- '𑢸' => '𑣘',
- '𑢹' => '𑣙',
- '𑢺' => '𑣚',
- '𑢻' => '𑣛',
- '𑢼' => '𑣜',
- '𑢽' => '𑣝',
- '𑢾' => '𑣞',
- '𑢿' => '𑣟',
- '𖹀' => '𖹠',
- '𖹁' => '𖹡',
- '𖹂' => '𖹢',
- '𖹃' => '𖹣',
- '𖹄' => '𖹤',
- '𖹅' => '𖹥',
- '𖹆' => '𖹦',
- '𖹇' => '𖹧',
- '𖹈' => '𖹨',
- '𖹉' => '𖹩',
- '𖹊' => '𖹪',
- '𖹋' => '𖹫',
- '𖹌' => '𖹬',
- '𖹍' => '𖹭',
- '𖹎' => '𖹮',
- '𖹏' => '𖹯',
- '𖹐' => '𖹰',
- '𖹑' => '𖹱',
- '𖹒' => '𖹲',
- '𖹓' => '𖹳',
- '𖹔' => '𖹴',
- '𖹕' => '𖹵',
- '𖹖' => '𖹶',
- '𖹗' => '𖹷',
- '𖹘' => '𖹸',
- '𖹙' => '𖹹',
- '𖹚' => '𖹺',
- '𖹛' => '𖹻',
- '𖹜' => '𖹼',
- '𖹝' => '𖹽',
- '𖹞' => '𖹾',
- '𖹟' => '𖹿',
- '𞤀' => '𞤢',
- '𞤁' => '𞤣',
- '𞤂' => '𞤤',
- '𞤃' => '𞤥',
- '𞤄' => '𞤦',
- '𞤅' => '𞤧',
- '𞤆' => '𞤨',
- '𞤇' => '𞤩',
- '𞤈' => '𞤪',
- '𞤉' => '𞤫',
- '𞤊' => '𞤬',
- '𞤋' => '𞤭',
- '𞤌' => '𞤮',
- '𞤍' => '𞤯',
- '𞤎' => '𞤰',
- '𞤏' => '𞤱',
- '𞤐' => '𞤲',
- '𞤑' => '𞤳',
- '𞤒' => '𞤴',
- '𞤓' => '𞤵',
- '𞤔' => '𞤶',
- '𞤕' => '𞤷',
- '𞤖' => '𞤸',
- '𞤗' => '𞤹',
- '𞤘' => '𞤺',
- '𞤙' => '𞤻',
- '𞤚' => '𞤼',
- '𞤛' => '𞤽',
- '𞤜' => '𞤾',
- '𞤝' => '𞤿',
- '𞤞' => '𞥀',
- '𞤟' => '𞥁',
- '𞤠' => '𞥂',
- '𞤡' => '𞥃',
-);
diff --git a/system/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/system/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php
deleted file mode 100644
index 2a8f6e7..0000000
--- a/system/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php
+++ /dev/null
@@ -1,5 +0,0 @@
- 'A',
- 'b' => 'B',
- 'c' => 'C',
- 'd' => 'D',
- 'e' => 'E',
- 'f' => 'F',
- 'g' => 'G',
- 'h' => 'H',
- 'i' => 'I',
- 'j' => 'J',
- 'k' => 'K',
- 'l' => 'L',
- 'm' => 'M',
- 'n' => 'N',
- 'o' => 'O',
- 'p' => 'P',
- 'q' => 'Q',
- 'r' => 'R',
- 's' => 'S',
- 't' => 'T',
- 'u' => 'U',
- 'v' => 'V',
- 'w' => 'W',
- 'x' => 'X',
- 'y' => 'Y',
- 'z' => 'Z',
- 'µ' => 'Μ',
- 'à' => 'À',
- 'á' => 'Á',
- 'â' => 'Â',
- 'ã' => 'Ã',
- 'ä' => 'Ä',
- 'å' => 'Å',
- 'æ' => 'Æ',
- 'ç' => 'Ç',
- 'è' => 'È',
- 'é' => 'É',
- 'ê' => 'Ê',
- 'ë' => 'Ë',
- 'ì' => 'Ì',
- 'í' => 'Í',
- 'î' => 'Î',
- 'ï' => 'Ï',
- 'ð' => 'Ð',
- 'ñ' => 'Ñ',
- 'ò' => 'Ò',
- 'ó' => 'Ó',
- 'ô' => 'Ô',
- 'õ' => 'Õ',
- 'ö' => 'Ö',
- 'ø' => 'Ø',
- 'ù' => 'Ù',
- 'ú' => 'Ú',
- 'û' => 'Û',
- 'ü' => 'Ü',
- 'ý' => 'Ý',
- 'þ' => 'Þ',
- 'ÿ' => 'Ÿ',
- 'ā' => 'Ā',
- 'ă' => 'Ă',
- 'ą' => 'Ą',
- 'ć' => 'Ć',
- 'ĉ' => 'Ĉ',
- 'ċ' => 'Ċ',
- 'č' => 'Č',
- 'ď' => 'Ď',
- 'đ' => 'Đ',
- 'ē' => 'Ē',
- 'ĕ' => 'Ĕ',
- 'ė' => 'Ė',
- 'ę' => 'Ę',
- 'ě' => 'Ě',
- 'ĝ' => 'Ĝ',
- 'ğ' => 'Ğ',
- 'ġ' => 'Ġ',
- 'ģ' => 'Ģ',
- 'ĥ' => 'Ĥ',
- 'ħ' => 'Ħ',
- 'ĩ' => 'Ĩ',
- 'ī' => 'Ī',
- 'ĭ' => 'Ĭ',
- 'į' => 'Į',
- 'ı' => 'I',
- 'ij' => 'IJ',
- 'ĵ' => 'Ĵ',
- 'ķ' => 'Ķ',
- 'ĺ' => 'Ĺ',
- 'ļ' => 'Ļ',
- 'ľ' => 'Ľ',
- 'ŀ' => 'Ŀ',
- 'ł' => 'Ł',
- 'ń' => 'Ń',
- 'ņ' => 'Ņ',
- 'ň' => 'Ň',
- 'ŋ' => 'Ŋ',
- 'ō' => 'Ō',
- 'ŏ' => 'Ŏ',
- 'ő' => 'Ő',
- 'œ' => 'Œ',
- 'ŕ' => 'Ŕ',
- 'ŗ' => 'Ŗ',
- 'ř' => 'Ř',
- 'ś' => 'Ś',
- 'ŝ' => 'Ŝ',
- 'ş' => 'Ş',
- 'š' => 'Š',
- 'ţ' => 'Ţ',
- 'ť' => 'Ť',
- 'ŧ' => 'Ŧ',
- 'ũ' => 'Ũ',
- 'ū' => 'Ū',
- 'ŭ' => 'Ŭ',
- 'ů' => 'Ů',
- 'ű' => 'Ű',
- 'ų' => 'Ų',
- 'ŵ' => 'Ŵ',
- 'ŷ' => 'Ŷ',
- 'ź' => 'Ź',
- 'ż' => 'Ż',
- 'ž' => 'Ž',
- 'ſ' => 'S',
- 'ƀ' => 'Ƀ',
- 'ƃ' => 'Ƃ',
- 'ƅ' => 'Ƅ',
- 'ƈ' => 'Ƈ',
- 'ƌ' => 'Ƌ',
- 'ƒ' => 'Ƒ',
- 'ƕ' => 'Ƕ',
- 'ƙ' => 'Ƙ',
- 'ƚ' => 'Ƚ',
- 'ƞ' => 'Ƞ',
- 'ơ' => 'Ơ',
- 'ƣ' => 'Ƣ',
- 'ƥ' => 'Ƥ',
- 'ƨ' => 'Ƨ',
- 'ƭ' => 'Ƭ',
- 'ư' => 'Ư',
- 'ƴ' => 'Ƴ',
- 'ƶ' => 'Ƶ',
- 'ƹ' => 'Ƹ',
- 'ƽ' => 'Ƽ',
- 'ƿ' => 'Ƿ',
- 'Dž' => 'DŽ',
- 'dž' => 'DŽ',
- 'Lj' => 'LJ',
- 'lj' => 'LJ',
- 'Nj' => 'NJ',
- 'nj' => 'NJ',
- 'ǎ' => 'Ǎ',
- 'ǐ' => 'Ǐ',
- 'ǒ' => 'Ǒ',
- 'ǔ' => 'Ǔ',
- 'ǖ' => 'Ǖ',
- 'ǘ' => 'Ǘ',
- 'ǚ' => 'Ǚ',
- 'ǜ' => 'Ǜ',
- 'ǝ' => 'Ǝ',
- 'ǟ' => 'Ǟ',
- 'ǡ' => 'Ǡ',
- 'ǣ' => 'Ǣ',
- 'ǥ' => 'Ǥ',
- 'ǧ' => 'Ǧ',
- 'ǩ' => 'Ǩ',
- 'ǫ' => 'Ǫ',
- 'ǭ' => 'Ǭ',
- 'ǯ' => 'Ǯ',
- 'Dz' => 'DZ',
- 'dz' => 'DZ',
- 'ǵ' => 'Ǵ',
- 'ǹ' => 'Ǹ',
- 'ǻ' => 'Ǻ',
- 'ǽ' => 'Ǽ',
- 'ǿ' => 'Ǿ',
- 'ȁ' => 'Ȁ',
- 'ȃ' => 'Ȃ',
- 'ȅ' => 'Ȅ',
- 'ȇ' => 'Ȇ',
- 'ȉ' => 'Ȉ',
- 'ȋ' => 'Ȋ',
- 'ȍ' => 'Ȍ',
- 'ȏ' => 'Ȏ',
- 'ȑ' => 'Ȑ',
- 'ȓ' => 'Ȓ',
- 'ȕ' => 'Ȕ',
- 'ȗ' => 'Ȗ',
- 'ș' => 'Ș',
- 'ț' => 'Ț',
- 'ȝ' => 'Ȝ',
- 'ȟ' => 'Ȟ',
- 'ȣ' => 'Ȣ',
- 'ȥ' => 'Ȥ',
- 'ȧ' => 'Ȧ',
- 'ȩ' => 'Ȩ',
- 'ȫ' => 'Ȫ',
- 'ȭ' => 'Ȭ',
- 'ȯ' => 'Ȯ',
- 'ȱ' => 'Ȱ',
- 'ȳ' => 'Ȳ',
- 'ȼ' => 'Ȼ',
- 'ȿ' => 'Ȿ',
- 'ɀ' => 'Ɀ',
- 'ɂ' => 'Ɂ',
- 'ɇ' => 'Ɇ',
- 'ɉ' => 'Ɉ',
- 'ɋ' => 'Ɋ',
- 'ɍ' => 'Ɍ',
- 'ɏ' => 'Ɏ',
- 'ɐ' => 'Ɐ',
- 'ɑ' => 'Ɑ',
- 'ɒ' => 'Ɒ',
- 'ɓ' => 'Ɓ',
- 'ɔ' => 'Ɔ',
- 'ɖ' => 'Ɖ',
- 'ɗ' => 'Ɗ',
- 'ə' => 'Ə',
- 'ɛ' => 'Ɛ',
- 'ɜ' => 'Ɜ',
- 'ɠ' => 'Ɠ',
- 'ɡ' => 'Ɡ',
- 'ɣ' => 'Ɣ',
- 'ɥ' => 'Ɥ',
- 'ɦ' => 'Ɦ',
- 'ɨ' => 'Ɨ',
- 'ɩ' => 'Ɩ',
- 'ɪ' => 'Ɪ',
- 'ɫ' => 'Ɫ',
- 'ɬ' => 'Ɬ',
- 'ɯ' => 'Ɯ',
- 'ɱ' => 'Ɱ',
- 'ɲ' => 'Ɲ',
- 'ɵ' => 'Ɵ',
- 'ɽ' => 'Ɽ',
- 'ʀ' => 'Ʀ',
- 'ʂ' => 'Ʂ',
- 'ʃ' => 'Ʃ',
- 'ʇ' => 'Ʇ',
- 'ʈ' => 'Ʈ',
- 'ʉ' => 'Ʉ',
- 'ʊ' => 'Ʊ',
- 'ʋ' => 'Ʋ',
- 'ʌ' => 'Ʌ',
- 'ʒ' => 'Ʒ',
- 'ʝ' => 'Ʝ',
- 'ʞ' => 'Ʞ',
- 'ͅ' => 'Ι',
- 'ͱ' => 'Ͱ',
- 'ͳ' => 'Ͳ',
- 'ͷ' => 'Ͷ',
- 'ͻ' => 'Ͻ',
- 'ͼ' => 'Ͼ',
- 'ͽ' => 'Ͽ',
- 'ά' => 'Ά',
- 'έ' => 'Έ',
- 'ή' => 'Ή',
- 'ί' => 'Ί',
- 'α' => 'Α',
- 'β' => 'Β',
- 'γ' => 'Γ',
- 'δ' => 'Δ',
- 'ε' => 'Ε',
- 'ζ' => 'Ζ',
- 'η' => 'Η',
- 'θ' => 'Θ',
- 'ι' => 'Ι',
- 'κ' => 'Κ',
- 'λ' => 'Λ',
- 'μ' => 'Μ',
- 'ν' => 'Ν',
- 'ξ' => 'Ξ',
- 'ο' => 'Ο',
- 'π' => 'Π',
- 'ρ' => 'Ρ',
- 'ς' => 'Σ',
- 'σ' => 'Σ',
- 'τ' => 'Τ',
- 'υ' => 'Υ',
- 'φ' => 'Φ',
- 'χ' => 'Χ',
- 'ψ' => 'Ψ',
- 'ω' => 'Ω',
- 'ϊ' => 'Ϊ',
- 'ϋ' => 'Ϋ',
- 'ό' => 'Ό',
- 'ύ' => 'Ύ',
- 'ώ' => 'Ώ',
- 'ϐ' => 'Β',
- 'ϑ' => 'Θ',
- 'ϕ' => 'Φ',
- 'ϖ' => 'Π',
- 'ϗ' => 'Ϗ',
- 'ϙ' => 'Ϙ',
- 'ϛ' => 'Ϛ',
- 'ϝ' => 'Ϝ',
- 'ϟ' => 'Ϟ',
- 'ϡ' => 'Ϡ',
- 'ϣ' => 'Ϣ',
- 'ϥ' => 'Ϥ',
- 'ϧ' => 'Ϧ',
- 'ϩ' => 'Ϩ',
- 'ϫ' => 'Ϫ',
- 'ϭ' => 'Ϭ',
- 'ϯ' => 'Ϯ',
- 'ϰ' => 'Κ',
- 'ϱ' => 'Ρ',
- 'ϲ' => 'Ϲ',
- 'ϳ' => 'Ϳ',
- 'ϵ' => 'Ε',
- 'ϸ' => 'Ϸ',
- 'ϻ' => 'Ϻ',
- 'а' => 'А',
- 'б' => 'Б',
- 'в' => 'В',
- 'г' => 'Г',
- 'д' => 'Д',
- 'е' => 'Е',
- 'ж' => 'Ж',
- 'з' => 'З',
- 'и' => 'И',
- 'й' => 'Й',
- 'к' => 'К',
- 'л' => 'Л',
- 'м' => 'М',
- 'н' => 'Н',
- 'о' => 'О',
- 'п' => 'П',
- 'р' => 'Р',
- 'с' => 'С',
- 'т' => 'Т',
- 'у' => 'У',
- 'ф' => 'Ф',
- 'х' => 'Х',
- 'ц' => 'Ц',
- 'ч' => 'Ч',
- 'ш' => 'Ш',
- 'щ' => 'Щ',
- 'ъ' => 'Ъ',
- 'ы' => 'Ы',
- 'ь' => 'Ь',
- 'э' => 'Э',
- 'ю' => 'Ю',
- 'я' => 'Я',
- 'ѐ' => 'Ѐ',
- 'ё' => 'Ё',
- 'ђ' => 'Ђ',
- 'ѓ' => 'Ѓ',
- 'є' => 'Є',
- 'ѕ' => 'Ѕ',
- 'і' => 'І',
- 'ї' => 'Ї',
- 'ј' => 'Ј',
- 'љ' => 'Љ',
- 'њ' => 'Њ',
- 'ћ' => 'Ћ',
- 'ќ' => 'Ќ',
- 'ѝ' => 'Ѝ',
- 'ў' => 'Ў',
- 'џ' => 'Џ',
- 'ѡ' => 'Ѡ',
- 'ѣ' => 'Ѣ',
- 'ѥ' => 'Ѥ',
- 'ѧ' => 'Ѧ',
- 'ѩ' => 'Ѩ',
- 'ѫ' => 'Ѫ',
- 'ѭ' => 'Ѭ',
- 'ѯ' => 'Ѯ',
- 'ѱ' => 'Ѱ',
- 'ѳ' => 'Ѳ',
- 'ѵ' => 'Ѵ',
- 'ѷ' => 'Ѷ',
- 'ѹ' => 'Ѹ',
- 'ѻ' => 'Ѻ',
- 'ѽ' => 'Ѽ',
- 'ѿ' => 'Ѿ',
- 'ҁ' => 'Ҁ',
- 'ҋ' => 'Ҋ',
- 'ҍ' => 'Ҍ',
- 'ҏ' => 'Ҏ',
- 'ґ' => 'Ґ',
- 'ғ' => 'Ғ',
- 'ҕ' => 'Ҕ',
- 'җ' => 'Җ',
- 'ҙ' => 'Ҙ',
- 'қ' => 'Қ',
- 'ҝ' => 'Ҝ',
- 'ҟ' => 'Ҟ',
- 'ҡ' => 'Ҡ',
- 'ң' => 'Ң',
- 'ҥ' => 'Ҥ',
- 'ҧ' => 'Ҧ',
- 'ҩ' => 'Ҩ',
- 'ҫ' => 'Ҫ',
- 'ҭ' => 'Ҭ',
- 'ү' => 'Ү',
- 'ұ' => 'Ұ',
- 'ҳ' => 'Ҳ',
- 'ҵ' => 'Ҵ',
- 'ҷ' => 'Ҷ',
- 'ҹ' => 'Ҹ',
- 'һ' => 'Һ',
- 'ҽ' => 'Ҽ',
- 'ҿ' => 'Ҿ',
- 'ӂ' => 'Ӂ',
- 'ӄ' => 'Ӄ',
- 'ӆ' => 'Ӆ',
- 'ӈ' => 'Ӈ',
- 'ӊ' => 'Ӊ',
- 'ӌ' => 'Ӌ',
- 'ӎ' => 'Ӎ',
- 'ӏ' => 'Ӏ',
- 'ӑ' => 'Ӑ',
- 'ӓ' => 'Ӓ',
- 'ӕ' => 'Ӕ',
- 'ӗ' => 'Ӗ',
- 'ә' => 'Ә',
- 'ӛ' => 'Ӛ',
- 'ӝ' => 'Ӝ',
- 'ӟ' => 'Ӟ',
- 'ӡ' => 'Ӡ',
- 'ӣ' => 'Ӣ',
- 'ӥ' => 'Ӥ',
- 'ӧ' => 'Ӧ',
- 'ө' => 'Ө',
- 'ӫ' => 'Ӫ',
- 'ӭ' => 'Ӭ',
- 'ӯ' => 'Ӯ',
- 'ӱ' => 'Ӱ',
- 'ӳ' => 'Ӳ',
- 'ӵ' => 'Ӵ',
- 'ӷ' => 'Ӷ',
- 'ӹ' => 'Ӹ',
- 'ӻ' => 'Ӻ',
- 'ӽ' => 'Ӽ',
- 'ӿ' => 'Ӿ',
- 'ԁ' => 'Ԁ',
- 'ԃ' => 'Ԃ',
- 'ԅ' => 'Ԅ',
- 'ԇ' => 'Ԇ',
- 'ԉ' => 'Ԉ',
- 'ԋ' => 'Ԋ',
- 'ԍ' => 'Ԍ',
- 'ԏ' => 'Ԏ',
- 'ԑ' => 'Ԑ',
- 'ԓ' => 'Ԓ',
- 'ԕ' => 'Ԕ',
- 'ԗ' => 'Ԗ',
- 'ԙ' => 'Ԙ',
- 'ԛ' => 'Ԛ',
- 'ԝ' => 'Ԝ',
- 'ԟ' => 'Ԟ',
- 'ԡ' => 'Ԡ',
- 'ԣ' => 'Ԣ',
- 'ԥ' => 'Ԥ',
- 'ԧ' => 'Ԧ',
- 'ԩ' => 'Ԩ',
- 'ԫ' => 'Ԫ',
- 'ԭ' => 'Ԭ',
- 'ԯ' => 'Ԯ',
- 'ա' => 'Ա',
- 'բ' => 'Բ',
- 'գ' => 'Գ',
- 'դ' => 'Դ',
- 'ե' => 'Ե',
- 'զ' => 'Զ',
- 'է' => 'Է',
- 'ը' => 'Ը',
- 'թ' => 'Թ',
- 'ժ' => 'Ժ',
- 'ի' => 'Ի',
- 'լ' => 'Լ',
- 'խ' => 'Խ',
- 'ծ' => 'Ծ',
- 'կ' => 'Կ',
- 'հ' => 'Հ',
- 'ձ' => 'Ձ',
- 'ղ' => 'Ղ',
- 'ճ' => 'Ճ',
- 'մ' => 'Մ',
- 'յ' => 'Յ',
- 'ն' => 'Ն',
- 'շ' => 'Շ',
- 'ո' => 'Ո',
- 'չ' => 'Չ',
- 'պ' => 'Պ',
- 'ջ' => 'Ջ',
- 'ռ' => 'Ռ',
- 'ս' => 'Ս',
- 'վ' => 'Վ',
- 'տ' => 'Տ',
- 'ր' => 'Ր',
- 'ց' => 'Ց',
- 'ւ' => 'Ւ',
- 'փ' => 'Փ',
- 'ք' => 'Ք',
- 'օ' => 'Օ',
- 'ֆ' => 'Ֆ',
- 'ა' => 'Ა',
- 'ბ' => 'Ბ',
- 'გ' => 'Გ',
- 'დ' => 'Დ',
- 'ე' => 'Ე',
- 'ვ' => 'Ვ',
- 'ზ' => 'Ზ',
- 'თ' => 'Თ',
- 'ი' => 'Ი',
- 'კ' => 'Კ',
- 'ლ' => 'Ლ',
- 'მ' => 'Მ',
- 'ნ' => 'Ნ',
- 'ო' => 'Ო',
- 'პ' => 'Პ',
- 'ჟ' => 'Ჟ',
- 'რ' => 'Რ',
- 'ს' => 'Ს',
- 'ტ' => 'Ტ',
- 'უ' => 'Უ',
- 'ფ' => 'Ფ',
- 'ქ' => 'Ქ',
- 'ღ' => 'Ღ',
- 'ყ' => 'Ყ',
- 'შ' => 'Შ',
- 'ჩ' => 'Ჩ',
- 'ც' => 'Ც',
- 'ძ' => 'Ძ',
- 'წ' => 'Წ',
- 'ჭ' => 'Ჭ',
- 'ხ' => 'Ხ',
- 'ჯ' => 'Ჯ',
- 'ჰ' => 'Ჰ',
- 'ჱ' => 'Ჱ',
- 'ჲ' => 'Ჲ',
- 'ჳ' => 'Ჳ',
- 'ჴ' => 'Ჴ',
- 'ჵ' => 'Ჵ',
- 'ჶ' => 'Ჶ',
- 'ჷ' => 'Ჷ',
- 'ჸ' => 'Ჸ',
- 'ჹ' => 'Ჹ',
- 'ჺ' => 'Ჺ',
- 'ჽ' => 'Ჽ',
- 'ჾ' => 'Ჾ',
- 'ჿ' => 'Ჿ',
- 'ᏸ' => 'Ᏸ',
- 'ᏹ' => 'Ᏹ',
- 'ᏺ' => 'Ᏺ',
- 'ᏻ' => 'Ᏻ',
- 'ᏼ' => 'Ᏼ',
- 'ᏽ' => 'Ᏽ',
- 'ᲀ' => 'В',
- 'ᲁ' => 'Д',
- 'ᲂ' => 'О',
- 'ᲃ' => 'С',
- 'ᲄ' => 'Т',
- 'ᲅ' => 'Т',
- 'ᲆ' => 'Ъ',
- 'ᲇ' => 'Ѣ',
- 'ᲈ' => 'Ꙋ',
- 'ᵹ' => 'Ᵹ',
- 'ᵽ' => 'Ᵽ',
- 'ᶎ' => 'Ᶎ',
- 'ḁ' => 'Ḁ',
- 'ḃ' => 'Ḃ',
- 'ḅ' => 'Ḅ',
- 'ḇ' => 'Ḇ',
- 'ḉ' => 'Ḉ',
- 'ḋ' => 'Ḋ',
- 'ḍ' => 'Ḍ',
- 'ḏ' => 'Ḏ',
- 'ḑ' => 'Ḑ',
- 'ḓ' => 'Ḓ',
- 'ḕ' => 'Ḕ',
- 'ḗ' => 'Ḗ',
- 'ḙ' => 'Ḙ',
- 'ḛ' => 'Ḛ',
- 'ḝ' => 'Ḝ',
- 'ḟ' => 'Ḟ',
- 'ḡ' => 'Ḡ',
- 'ḣ' => 'Ḣ',
- 'ḥ' => 'Ḥ',
- 'ḧ' => 'Ḧ',
- 'ḩ' => 'Ḩ',
- 'ḫ' => 'Ḫ',
- 'ḭ' => 'Ḭ',
- 'ḯ' => 'Ḯ',
- 'ḱ' => 'Ḱ',
- 'ḳ' => 'Ḳ',
- 'ḵ' => 'Ḵ',
- 'ḷ' => 'Ḷ',
- 'ḹ' => 'Ḹ',
- 'ḻ' => 'Ḻ',
- 'ḽ' => 'Ḽ',
- 'ḿ' => 'Ḿ',
- 'ṁ' => 'Ṁ',
- 'ṃ' => 'Ṃ',
- 'ṅ' => 'Ṅ',
- 'ṇ' => 'Ṇ',
- 'ṉ' => 'Ṉ',
- 'ṋ' => 'Ṋ',
- 'ṍ' => 'Ṍ',
- 'ṏ' => 'Ṏ',
- 'ṑ' => 'Ṑ',
- 'ṓ' => 'Ṓ',
- 'ṕ' => 'Ṕ',
- 'ṗ' => 'Ṗ',
- 'ṙ' => 'Ṙ',
- 'ṛ' => 'Ṛ',
- 'ṝ' => 'Ṝ',
- 'ṟ' => 'Ṟ',
- 'ṡ' => 'Ṡ',
- 'ṣ' => 'Ṣ',
- 'ṥ' => 'Ṥ',
- 'ṧ' => 'Ṧ',
- 'ṩ' => 'Ṩ',
- 'ṫ' => 'Ṫ',
- 'ṭ' => 'Ṭ',
- 'ṯ' => 'Ṯ',
- 'ṱ' => 'Ṱ',
- 'ṳ' => 'Ṳ',
- 'ṵ' => 'Ṵ',
- 'ṷ' => 'Ṷ',
- 'ṹ' => 'Ṹ',
- 'ṻ' => 'Ṻ',
- 'ṽ' => 'Ṽ',
- 'ṿ' => 'Ṿ',
- 'ẁ' => 'Ẁ',
- 'ẃ' => 'Ẃ',
- 'ẅ' => 'Ẅ',
- 'ẇ' => 'Ẇ',
- 'ẉ' => 'Ẉ',
- 'ẋ' => 'Ẋ',
- 'ẍ' => 'Ẍ',
- 'ẏ' => 'Ẏ',
- 'ẑ' => 'Ẑ',
- 'ẓ' => 'Ẓ',
- 'ẕ' => 'Ẕ',
- 'ẛ' => 'Ṡ',
- 'ạ' => 'Ạ',
- 'ả' => 'Ả',
- 'ấ' => 'Ấ',
- 'ầ' => 'Ầ',
- 'ẩ' => 'Ẩ',
- 'ẫ' => 'Ẫ',
- 'ậ' => 'Ậ',
- 'ắ' => 'Ắ',
- 'ằ' => 'Ằ',
- 'ẳ' => 'Ẳ',
- 'ẵ' => 'Ẵ',
- 'ặ' => 'Ặ',
- 'ẹ' => 'Ẹ',
- 'ẻ' => 'Ẻ',
- 'ẽ' => 'Ẽ',
- 'ế' => 'Ế',
- 'ề' => 'Ề',
- 'ể' => 'Ể',
- 'ễ' => 'Ễ',
- 'ệ' => 'Ệ',
- 'ỉ' => 'Ỉ',
- 'ị' => 'Ị',
- 'ọ' => 'Ọ',
- 'ỏ' => 'Ỏ',
- 'ố' => 'Ố',
- 'ồ' => 'Ồ',
- 'ổ' => 'Ổ',
- 'ỗ' => 'Ỗ',
- 'ộ' => 'Ộ',
- 'ớ' => 'Ớ',
- 'ờ' => 'Ờ',
- 'ở' => 'Ở',
- 'ỡ' => 'Ỡ',
- 'ợ' => 'Ợ',
- 'ụ' => 'Ụ',
- 'ủ' => 'Ủ',
- 'ứ' => 'Ứ',
- 'ừ' => 'Ừ',
- 'ử' => 'Ử',
- 'ữ' => 'Ữ',
- 'ự' => 'Ự',
- 'ỳ' => 'Ỳ',
- 'ỵ' => 'Ỵ',
- 'ỷ' => 'Ỷ',
- 'ỹ' => 'Ỹ',
- 'ỻ' => 'Ỻ',
- 'ỽ' => 'Ỽ',
- 'ỿ' => 'Ỿ',
- 'ἀ' => 'Ἀ',
- 'ἁ' => 'Ἁ',
- 'ἂ' => 'Ἂ',
- 'ἃ' => 'Ἃ',
- 'ἄ' => 'Ἄ',
- 'ἅ' => 'Ἅ',
- 'ἆ' => 'Ἆ',
- 'ἇ' => 'Ἇ',
- 'ἐ' => 'Ἐ',
- 'ἑ' => 'Ἑ',
- 'ἒ' => 'Ἒ',
- 'ἓ' => 'Ἓ',
- 'ἔ' => 'Ἔ',
- 'ἕ' => 'Ἕ',
- 'ἠ' => 'Ἠ',
- 'ἡ' => 'Ἡ',
- 'ἢ' => 'Ἢ',
- 'ἣ' => 'Ἣ',
- 'ἤ' => 'Ἤ',
- 'ἥ' => 'Ἥ',
- 'ἦ' => 'Ἦ',
- 'ἧ' => 'Ἧ',
- 'ἰ' => 'Ἰ',
- 'ἱ' => 'Ἱ',
- 'ἲ' => 'Ἲ',
- 'ἳ' => 'Ἳ',
- 'ἴ' => 'Ἴ',
- 'ἵ' => 'Ἵ',
- 'ἶ' => 'Ἶ',
- 'ἷ' => 'Ἷ',
- 'ὀ' => 'Ὀ',
- 'ὁ' => 'Ὁ',
- 'ὂ' => 'Ὂ',
- 'ὃ' => 'Ὃ',
- 'ὄ' => 'Ὄ',
- 'ὅ' => 'Ὅ',
- 'ὑ' => 'Ὑ',
- 'ὓ' => 'Ὓ',
- 'ὕ' => 'Ὕ',
- 'ὗ' => 'Ὗ',
- 'ὠ' => 'Ὠ',
- 'ὡ' => 'Ὡ',
- 'ὢ' => 'Ὢ',
- 'ὣ' => 'Ὣ',
- 'ὤ' => 'Ὤ',
- 'ὥ' => 'Ὥ',
- 'ὦ' => 'Ὦ',
- 'ὧ' => 'Ὧ',
- 'ὰ' => 'Ὰ',
- 'ά' => 'Ά',
- 'ὲ' => 'Ὲ',
- 'έ' => 'Έ',
- 'ὴ' => 'Ὴ',
- 'ή' => 'Ή',
- 'ὶ' => 'Ὶ',
- 'ί' => 'Ί',
- 'ὸ' => 'Ὸ',
- 'ό' => 'Ό',
- 'ὺ' => 'Ὺ',
- 'ύ' => 'Ύ',
- 'ὼ' => 'Ὼ',
- 'ώ' => 'Ώ',
- 'ᾀ' => 'ἈΙ',
- 'ᾁ' => 'ἉΙ',
- 'ᾂ' => 'ἊΙ',
- 'ᾃ' => 'ἋΙ',
- 'ᾄ' => 'ἌΙ',
- 'ᾅ' => 'ἍΙ',
- 'ᾆ' => 'ἎΙ',
- 'ᾇ' => 'ἏΙ',
- 'ᾐ' => 'ἨΙ',
- 'ᾑ' => 'ἩΙ',
- 'ᾒ' => 'ἪΙ',
- 'ᾓ' => 'ἫΙ',
- 'ᾔ' => 'ἬΙ',
- 'ᾕ' => 'ἭΙ',
- 'ᾖ' => 'ἮΙ',
- 'ᾗ' => 'ἯΙ',
- 'ᾠ' => 'ὨΙ',
- 'ᾡ' => 'ὩΙ',
- 'ᾢ' => 'ὪΙ',
- 'ᾣ' => 'ὫΙ',
- 'ᾤ' => 'ὬΙ',
- 'ᾥ' => 'ὭΙ',
- 'ᾦ' => 'ὮΙ',
- 'ᾧ' => 'ὯΙ',
- 'ᾰ' => 'Ᾰ',
- 'ᾱ' => 'Ᾱ',
- 'ᾳ' => 'ΑΙ',
- 'ι' => 'Ι',
- 'ῃ' => 'ΗΙ',
- 'ῐ' => 'Ῐ',
- 'ῑ' => 'Ῑ',
- 'ῠ' => 'Ῠ',
- 'ῡ' => 'Ῡ',
- 'ῥ' => 'Ῥ',
- 'ῳ' => 'ΩΙ',
- 'ⅎ' => 'Ⅎ',
- 'ⅰ' => 'Ⅰ',
- 'ⅱ' => 'Ⅱ',
- 'ⅲ' => 'Ⅲ',
- 'ⅳ' => 'Ⅳ',
- 'ⅴ' => 'Ⅴ',
- 'ⅵ' => 'Ⅵ',
- 'ⅶ' => 'Ⅶ',
- 'ⅷ' => 'Ⅷ',
- 'ⅸ' => 'Ⅸ',
- 'ⅹ' => 'Ⅹ',
- 'ⅺ' => 'Ⅺ',
- 'ⅻ' => 'Ⅻ',
- 'ⅼ' => 'Ⅼ',
- 'ⅽ' => 'Ⅽ',
- 'ⅾ' => 'Ⅾ',
- 'ⅿ' => 'Ⅿ',
- 'ↄ' => 'Ↄ',
- 'ⓐ' => 'Ⓐ',
- 'ⓑ' => 'Ⓑ',
- 'ⓒ' => 'Ⓒ',
- 'ⓓ' => 'Ⓓ',
- 'ⓔ' => 'Ⓔ',
- 'ⓕ' => 'Ⓕ',
- 'ⓖ' => 'Ⓖ',
- 'ⓗ' => 'Ⓗ',
- 'ⓘ' => 'Ⓘ',
- 'ⓙ' => 'Ⓙ',
- 'ⓚ' => 'Ⓚ',
- 'ⓛ' => 'Ⓛ',
- 'ⓜ' => 'Ⓜ',
- 'ⓝ' => 'Ⓝ',
- 'ⓞ' => 'Ⓞ',
- 'ⓟ' => 'Ⓟ',
- 'ⓠ' => 'Ⓠ',
- 'ⓡ' => 'Ⓡ',
- 'ⓢ' => 'Ⓢ',
- 'ⓣ' => 'Ⓣ',
- 'ⓤ' => 'Ⓤ',
- 'ⓥ' => 'Ⓥ',
- 'ⓦ' => 'Ⓦ',
- 'ⓧ' => 'Ⓧ',
- 'ⓨ' => 'Ⓨ',
- 'ⓩ' => 'Ⓩ',
- 'ⰰ' => 'Ⰰ',
- 'ⰱ' => 'Ⰱ',
- 'ⰲ' => 'Ⰲ',
- 'ⰳ' => 'Ⰳ',
- 'ⰴ' => 'Ⰴ',
- 'ⰵ' => 'Ⰵ',
- 'ⰶ' => 'Ⰶ',
- 'ⰷ' => 'Ⰷ',
- 'ⰸ' => 'Ⰸ',
- 'ⰹ' => 'Ⰹ',
- 'ⰺ' => 'Ⰺ',
- 'ⰻ' => 'Ⰻ',
- 'ⰼ' => 'Ⰼ',
- 'ⰽ' => 'Ⰽ',
- 'ⰾ' => 'Ⰾ',
- 'ⰿ' => 'Ⰿ',
- 'ⱀ' => 'Ⱀ',
- 'ⱁ' => 'Ⱁ',
- 'ⱂ' => 'Ⱂ',
- 'ⱃ' => 'Ⱃ',
- 'ⱄ' => 'Ⱄ',
- 'ⱅ' => 'Ⱅ',
- 'ⱆ' => 'Ⱆ',
- 'ⱇ' => 'Ⱇ',
- 'ⱈ' => 'Ⱈ',
- 'ⱉ' => 'Ⱉ',
- 'ⱊ' => 'Ⱊ',
- 'ⱋ' => 'Ⱋ',
- 'ⱌ' => 'Ⱌ',
- 'ⱍ' => 'Ⱍ',
- 'ⱎ' => 'Ⱎ',
- 'ⱏ' => 'Ⱏ',
- 'ⱐ' => 'Ⱐ',
- 'ⱑ' => 'Ⱑ',
- 'ⱒ' => 'Ⱒ',
- 'ⱓ' => 'Ⱓ',
- 'ⱔ' => 'Ⱔ',
- 'ⱕ' => 'Ⱕ',
- 'ⱖ' => 'Ⱖ',
- 'ⱗ' => 'Ⱗ',
- 'ⱘ' => 'Ⱘ',
- 'ⱙ' => 'Ⱙ',
- 'ⱚ' => 'Ⱚ',
- 'ⱛ' => 'Ⱛ',
- 'ⱜ' => 'Ⱜ',
- 'ⱝ' => 'Ⱝ',
- 'ⱞ' => 'Ⱞ',
- 'ⱡ' => 'Ⱡ',
- 'ⱥ' => 'Ⱥ',
- 'ⱦ' => 'Ⱦ',
- 'ⱨ' => 'Ⱨ',
- 'ⱪ' => 'Ⱪ',
- 'ⱬ' => 'Ⱬ',
- 'ⱳ' => 'Ⱳ',
- 'ⱶ' => 'Ⱶ',
- 'ⲁ' => 'Ⲁ',
- 'ⲃ' => 'Ⲃ',
- 'ⲅ' => 'Ⲅ',
- 'ⲇ' => 'Ⲇ',
- 'ⲉ' => 'Ⲉ',
- 'ⲋ' => 'Ⲋ',
- 'ⲍ' => 'Ⲍ',
- 'ⲏ' => 'Ⲏ',
- 'ⲑ' => 'Ⲑ',
- 'ⲓ' => 'Ⲓ',
- 'ⲕ' => 'Ⲕ',
- 'ⲗ' => 'Ⲗ',
- 'ⲙ' => 'Ⲙ',
- 'ⲛ' => 'Ⲛ',
- 'ⲝ' => 'Ⲝ',
- 'ⲟ' => 'Ⲟ',
- 'ⲡ' => 'Ⲡ',
- 'ⲣ' => 'Ⲣ',
- 'ⲥ' => 'Ⲥ',
- 'ⲧ' => 'Ⲧ',
- 'ⲩ' => 'Ⲩ',
- 'ⲫ' => 'Ⲫ',
- 'ⲭ' => 'Ⲭ',
- 'ⲯ' => 'Ⲯ',
- 'ⲱ' => 'Ⲱ',
- 'ⲳ' => 'Ⲳ',
- 'ⲵ' => 'Ⲵ',
- 'ⲷ' => 'Ⲷ',
- 'ⲹ' => 'Ⲹ',
- 'ⲻ' => 'Ⲻ',
- 'ⲽ' => 'Ⲽ',
- 'ⲿ' => 'Ⲿ',
- 'ⳁ' => 'Ⳁ',
- 'ⳃ' => 'Ⳃ',
- 'ⳅ' => 'Ⳅ',
- 'ⳇ' => 'Ⳇ',
- 'ⳉ' => 'Ⳉ',
- 'ⳋ' => 'Ⳋ',
- 'ⳍ' => 'Ⳍ',
- 'ⳏ' => 'Ⳏ',
- 'ⳑ' => 'Ⳑ',
- 'ⳓ' => 'Ⳓ',
- 'ⳕ' => 'Ⳕ',
- 'ⳗ' => 'Ⳗ',
- 'ⳙ' => 'Ⳙ',
- 'ⳛ' => 'Ⳛ',
- 'ⳝ' => 'Ⳝ',
- 'ⳟ' => 'Ⳟ',
- 'ⳡ' => 'Ⳡ',
- 'ⳣ' => 'Ⳣ',
- 'ⳬ' => 'Ⳬ',
- 'ⳮ' => 'Ⳮ',
- 'ⳳ' => 'Ⳳ',
- 'ⴀ' => 'Ⴀ',
- 'ⴁ' => 'Ⴁ',
- 'ⴂ' => 'Ⴂ',
- 'ⴃ' => 'Ⴃ',
- 'ⴄ' => 'Ⴄ',
- 'ⴅ' => 'Ⴅ',
- 'ⴆ' => 'Ⴆ',
- 'ⴇ' => 'Ⴇ',
- 'ⴈ' => 'Ⴈ',
- 'ⴉ' => 'Ⴉ',
- 'ⴊ' => 'Ⴊ',
- 'ⴋ' => 'Ⴋ',
- 'ⴌ' => 'Ⴌ',
- 'ⴍ' => 'Ⴍ',
- 'ⴎ' => 'Ⴎ',
- 'ⴏ' => 'Ⴏ',
- 'ⴐ' => 'Ⴐ',
- 'ⴑ' => 'Ⴑ',
- 'ⴒ' => 'Ⴒ',
- 'ⴓ' => 'Ⴓ',
- 'ⴔ' => 'Ⴔ',
- 'ⴕ' => 'Ⴕ',
- 'ⴖ' => 'Ⴖ',
- 'ⴗ' => 'Ⴗ',
- 'ⴘ' => 'Ⴘ',
- 'ⴙ' => 'Ⴙ',
- 'ⴚ' => 'Ⴚ',
- 'ⴛ' => 'Ⴛ',
- 'ⴜ' => 'Ⴜ',
- 'ⴝ' => 'Ⴝ',
- 'ⴞ' => 'Ⴞ',
- 'ⴟ' => 'Ⴟ',
- 'ⴠ' => 'Ⴠ',
- 'ⴡ' => 'Ⴡ',
- 'ⴢ' => 'Ⴢ',
- 'ⴣ' => 'Ⴣ',
- 'ⴤ' => 'Ⴤ',
- 'ⴥ' => 'Ⴥ',
- 'ⴧ' => 'Ⴧ',
- 'ⴭ' => 'Ⴭ',
- 'ꙁ' => 'Ꙁ',
- 'ꙃ' => 'Ꙃ',
- 'ꙅ' => 'Ꙅ',
- 'ꙇ' => 'Ꙇ',
- 'ꙉ' => 'Ꙉ',
- 'ꙋ' => 'Ꙋ',
- 'ꙍ' => 'Ꙍ',
- 'ꙏ' => 'Ꙏ',
- 'ꙑ' => 'Ꙑ',
- 'ꙓ' => 'Ꙓ',
- 'ꙕ' => 'Ꙕ',
- 'ꙗ' => 'Ꙗ',
- 'ꙙ' => 'Ꙙ',
- 'ꙛ' => 'Ꙛ',
- 'ꙝ' => 'Ꙝ',
- 'ꙟ' => 'Ꙟ',
- 'ꙡ' => 'Ꙡ',
- 'ꙣ' => 'Ꙣ',
- 'ꙥ' => 'Ꙥ',
- 'ꙧ' => 'Ꙧ',
- 'ꙩ' => 'Ꙩ',
- 'ꙫ' => 'Ꙫ',
- 'ꙭ' => 'Ꙭ',
- 'ꚁ' => 'Ꚁ',
- 'ꚃ' => 'Ꚃ',
- 'ꚅ' => 'Ꚅ',
- 'ꚇ' => 'Ꚇ',
- 'ꚉ' => 'Ꚉ',
- 'ꚋ' => 'Ꚋ',
- 'ꚍ' => 'Ꚍ',
- 'ꚏ' => 'Ꚏ',
- 'ꚑ' => 'Ꚑ',
- 'ꚓ' => 'Ꚓ',
- 'ꚕ' => 'Ꚕ',
- 'ꚗ' => 'Ꚗ',
- 'ꚙ' => 'Ꚙ',
- 'ꚛ' => 'Ꚛ',
- 'ꜣ' => 'Ꜣ',
- 'ꜥ' => 'Ꜥ',
- 'ꜧ' => 'Ꜧ',
- 'ꜩ' => 'Ꜩ',
- 'ꜫ' => 'Ꜫ',
- 'ꜭ' => 'Ꜭ',
- 'ꜯ' => 'Ꜯ',
- 'ꜳ' => 'Ꜳ',
- 'ꜵ' => 'Ꜵ',
- 'ꜷ' => 'Ꜷ',
- 'ꜹ' => 'Ꜹ',
- 'ꜻ' => 'Ꜻ',
- 'ꜽ' => 'Ꜽ',
- 'ꜿ' => 'Ꜿ',
- 'ꝁ' => 'Ꝁ',
- 'ꝃ' => 'Ꝃ',
- 'ꝅ' => 'Ꝅ',
- 'ꝇ' => 'Ꝇ',
- 'ꝉ' => 'Ꝉ',
- 'ꝋ' => 'Ꝋ',
- 'ꝍ' => 'Ꝍ',
- 'ꝏ' => 'Ꝏ',
- 'ꝑ' => 'Ꝑ',
- 'ꝓ' => 'Ꝓ',
- 'ꝕ' => 'Ꝕ',
- 'ꝗ' => 'Ꝗ',
- 'ꝙ' => 'Ꝙ',
- 'ꝛ' => 'Ꝛ',
- 'ꝝ' => 'Ꝝ',
- 'ꝟ' => 'Ꝟ',
- 'ꝡ' => 'Ꝡ',
- 'ꝣ' => 'Ꝣ',
- 'ꝥ' => 'Ꝥ',
- 'ꝧ' => 'Ꝧ',
- 'ꝩ' => 'Ꝩ',
- 'ꝫ' => 'Ꝫ',
- 'ꝭ' => 'Ꝭ',
- 'ꝯ' => 'Ꝯ',
- 'ꝺ' => 'Ꝺ',
- 'ꝼ' => 'Ꝼ',
- 'ꝿ' => 'Ꝿ',
- 'ꞁ' => 'Ꞁ',
- 'ꞃ' => 'Ꞃ',
- 'ꞅ' => 'Ꞅ',
- 'ꞇ' => 'Ꞇ',
- 'ꞌ' => 'Ꞌ',
- 'ꞑ' => 'Ꞑ',
- 'ꞓ' => 'Ꞓ',
- 'ꞔ' => 'Ꞔ',
- 'ꞗ' => 'Ꞗ',
- 'ꞙ' => 'Ꞙ',
- 'ꞛ' => 'Ꞛ',
- 'ꞝ' => 'Ꞝ',
- 'ꞟ' => 'Ꞟ',
- 'ꞡ' => 'Ꞡ',
- 'ꞣ' => 'Ꞣ',
- 'ꞥ' => 'Ꞥ',
- 'ꞧ' => 'Ꞧ',
- 'ꞩ' => 'Ꞩ',
- 'ꞵ' => 'Ꞵ',
- 'ꞷ' => 'Ꞷ',
- 'ꞹ' => 'Ꞹ',
- 'ꞻ' => 'Ꞻ',
- 'ꞽ' => 'Ꞽ',
- 'ꞿ' => 'Ꞿ',
- 'ꟃ' => 'Ꟃ',
- 'ꟈ' => 'Ꟈ',
- 'ꟊ' => 'Ꟊ',
- 'ꟶ' => 'Ꟶ',
- 'ꭓ' => 'Ꭓ',
- 'ꭰ' => 'Ꭰ',
- 'ꭱ' => 'Ꭱ',
- 'ꭲ' => 'Ꭲ',
- 'ꭳ' => 'Ꭳ',
- 'ꭴ' => 'Ꭴ',
- 'ꭵ' => 'Ꭵ',
- 'ꭶ' => 'Ꭶ',
- 'ꭷ' => 'Ꭷ',
- 'ꭸ' => 'Ꭸ',
- 'ꭹ' => 'Ꭹ',
- 'ꭺ' => 'Ꭺ',
- 'ꭻ' => 'Ꭻ',
- 'ꭼ' => 'Ꭼ',
- 'ꭽ' => 'Ꭽ',
- 'ꭾ' => 'Ꭾ',
- 'ꭿ' => 'Ꭿ',
- 'ꮀ' => 'Ꮀ',
- 'ꮁ' => 'Ꮁ',
- 'ꮂ' => 'Ꮂ',
- 'ꮃ' => 'Ꮃ',
- 'ꮄ' => 'Ꮄ',
- 'ꮅ' => 'Ꮅ',
- 'ꮆ' => 'Ꮆ',
- 'ꮇ' => 'Ꮇ',
- 'ꮈ' => 'Ꮈ',
- 'ꮉ' => 'Ꮉ',
- 'ꮊ' => 'Ꮊ',
- 'ꮋ' => 'Ꮋ',
- 'ꮌ' => 'Ꮌ',
- 'ꮍ' => 'Ꮍ',
- 'ꮎ' => 'Ꮎ',
- 'ꮏ' => 'Ꮏ',
- 'ꮐ' => 'Ꮐ',
- 'ꮑ' => 'Ꮑ',
- 'ꮒ' => 'Ꮒ',
- 'ꮓ' => 'Ꮓ',
- 'ꮔ' => 'Ꮔ',
- 'ꮕ' => 'Ꮕ',
- 'ꮖ' => 'Ꮖ',
- 'ꮗ' => 'Ꮗ',
- 'ꮘ' => 'Ꮘ',
- 'ꮙ' => 'Ꮙ',
- 'ꮚ' => 'Ꮚ',
- 'ꮛ' => 'Ꮛ',
- 'ꮜ' => 'Ꮜ',
- 'ꮝ' => 'Ꮝ',
- 'ꮞ' => 'Ꮞ',
- 'ꮟ' => 'Ꮟ',
- 'ꮠ' => 'Ꮠ',
- 'ꮡ' => 'Ꮡ',
- 'ꮢ' => 'Ꮢ',
- 'ꮣ' => 'Ꮣ',
- 'ꮤ' => 'Ꮤ',
- 'ꮥ' => 'Ꮥ',
- 'ꮦ' => 'Ꮦ',
- 'ꮧ' => 'Ꮧ',
- 'ꮨ' => 'Ꮨ',
- 'ꮩ' => 'Ꮩ',
- 'ꮪ' => 'Ꮪ',
- 'ꮫ' => 'Ꮫ',
- 'ꮬ' => 'Ꮬ',
- 'ꮭ' => 'Ꮭ',
- 'ꮮ' => 'Ꮮ',
- 'ꮯ' => 'Ꮯ',
- 'ꮰ' => 'Ꮰ',
- 'ꮱ' => 'Ꮱ',
- 'ꮲ' => 'Ꮲ',
- 'ꮳ' => 'Ꮳ',
- 'ꮴ' => 'Ꮴ',
- 'ꮵ' => 'Ꮵ',
- 'ꮶ' => 'Ꮶ',
- 'ꮷ' => 'Ꮷ',
- 'ꮸ' => 'Ꮸ',
- 'ꮹ' => 'Ꮹ',
- 'ꮺ' => 'Ꮺ',
- 'ꮻ' => 'Ꮻ',
- 'ꮼ' => 'Ꮼ',
- 'ꮽ' => 'Ꮽ',
- 'ꮾ' => 'Ꮾ',
- 'ꮿ' => 'Ꮿ',
- 'a' => 'A',
- 'b' => 'B',
- 'c' => 'C',
- 'd' => 'D',
- 'e' => 'E',
- 'f' => 'F',
- 'g' => 'G',
- 'h' => 'H',
- 'i' => 'I',
- 'j' => 'J',
- 'k' => 'K',
- 'l' => 'L',
- 'm' => 'M',
- 'n' => 'N',
- 'o' => 'O',
- 'p' => 'P',
- 'q' => 'Q',
- 'r' => 'R',
- 's' => 'S',
- 't' => 'T',
- 'u' => 'U',
- 'v' => 'V',
- 'w' => 'W',
- 'x' => 'X',
- 'y' => 'Y',
- 'z' => 'Z',
- '𐐨' => '𐐀',
- '𐐩' => '𐐁',
- '𐐪' => '𐐂',
- '𐐫' => '𐐃',
- '𐐬' => '𐐄',
- '𐐭' => '𐐅',
- '𐐮' => '𐐆',
- '𐐯' => '𐐇',
- '𐐰' => '𐐈',
- '𐐱' => '𐐉',
- '𐐲' => '𐐊',
- '𐐳' => '𐐋',
- '𐐴' => '𐐌',
- '𐐵' => '𐐍',
- '𐐶' => '𐐎',
- '𐐷' => '𐐏',
- '𐐸' => '𐐐',
- '𐐹' => '𐐑',
- '𐐺' => '𐐒',
- '𐐻' => '𐐓',
- '𐐼' => '𐐔',
- '𐐽' => '𐐕',
- '𐐾' => '𐐖',
- '𐐿' => '𐐗',
- '𐑀' => '𐐘',
- '𐑁' => '𐐙',
- '𐑂' => '𐐚',
- '𐑃' => '𐐛',
- '𐑄' => '𐐜',
- '𐑅' => '𐐝',
- '𐑆' => '𐐞',
- '𐑇' => '𐐟',
- '𐑈' => '𐐠',
- '𐑉' => '𐐡',
- '𐑊' => '𐐢',
- '𐑋' => '𐐣',
- '𐑌' => '𐐤',
- '𐑍' => '𐐥',
- '𐑎' => '𐐦',
- '𐑏' => '𐐧',
- '𐓘' => '𐒰',
- '𐓙' => '𐒱',
- '𐓚' => '𐒲',
- '𐓛' => '𐒳',
- '𐓜' => '𐒴',
- '𐓝' => '𐒵',
- '𐓞' => '𐒶',
- '𐓟' => '𐒷',
- '𐓠' => '𐒸',
- '𐓡' => '𐒹',
- '𐓢' => '𐒺',
- '𐓣' => '𐒻',
- '𐓤' => '𐒼',
- '𐓥' => '𐒽',
- '𐓦' => '𐒾',
- '𐓧' => '𐒿',
- '𐓨' => '𐓀',
- '𐓩' => '𐓁',
- '𐓪' => '𐓂',
- '𐓫' => '𐓃',
- '𐓬' => '𐓄',
- '𐓭' => '𐓅',
- '𐓮' => '𐓆',
- '𐓯' => '𐓇',
- '𐓰' => '𐓈',
- '𐓱' => '𐓉',
- '𐓲' => '𐓊',
- '𐓳' => '𐓋',
- '𐓴' => '𐓌',
- '𐓵' => '𐓍',
- '𐓶' => '𐓎',
- '𐓷' => '𐓏',
- '𐓸' => '𐓐',
- '𐓹' => '𐓑',
- '𐓺' => '𐓒',
- '𐓻' => '𐓓',
- '𐳀' => '𐲀',
- '𐳁' => '𐲁',
- '𐳂' => '𐲂',
- '𐳃' => '𐲃',
- '𐳄' => '𐲄',
- '𐳅' => '𐲅',
- '𐳆' => '𐲆',
- '𐳇' => '𐲇',
- '𐳈' => '𐲈',
- '𐳉' => '𐲉',
- '𐳊' => '𐲊',
- '𐳋' => '𐲋',
- '𐳌' => '𐲌',
- '𐳍' => '𐲍',
- '𐳎' => '𐲎',
- '𐳏' => '𐲏',
- '𐳐' => '𐲐',
- '𐳑' => '𐲑',
- '𐳒' => '𐲒',
- '𐳓' => '𐲓',
- '𐳔' => '𐲔',
- '𐳕' => '𐲕',
- '𐳖' => '𐲖',
- '𐳗' => '𐲗',
- '𐳘' => '𐲘',
- '𐳙' => '𐲙',
- '𐳚' => '𐲚',
- '𐳛' => '𐲛',
- '𐳜' => '𐲜',
- '𐳝' => '𐲝',
- '𐳞' => '𐲞',
- '𐳟' => '𐲟',
- '𐳠' => '𐲠',
- '𐳡' => '𐲡',
- '𐳢' => '𐲢',
- '𐳣' => '𐲣',
- '𐳤' => '𐲤',
- '𐳥' => '𐲥',
- '𐳦' => '𐲦',
- '𐳧' => '𐲧',
- '𐳨' => '𐲨',
- '𐳩' => '𐲩',
- '𐳪' => '𐲪',
- '𐳫' => '𐲫',
- '𐳬' => '𐲬',
- '𐳭' => '𐲭',
- '𐳮' => '𐲮',
- '𐳯' => '𐲯',
- '𐳰' => '𐲰',
- '𐳱' => '𐲱',
- '𐳲' => '𐲲',
- '𑣀' => '𑢠',
- '𑣁' => '𑢡',
- '𑣂' => '𑢢',
- '𑣃' => '𑢣',
- '𑣄' => '𑢤',
- '𑣅' => '𑢥',
- '𑣆' => '𑢦',
- '𑣇' => '𑢧',
- '𑣈' => '𑢨',
- '𑣉' => '𑢩',
- '𑣊' => '𑢪',
- '𑣋' => '𑢫',
- '𑣌' => '𑢬',
- '𑣍' => '𑢭',
- '𑣎' => '𑢮',
- '𑣏' => '𑢯',
- '𑣐' => '𑢰',
- '𑣑' => '𑢱',
- '𑣒' => '𑢲',
- '𑣓' => '𑢳',
- '𑣔' => '𑢴',
- '𑣕' => '𑢵',
- '𑣖' => '𑢶',
- '𑣗' => '𑢷',
- '𑣘' => '𑢸',
- '𑣙' => '𑢹',
- '𑣚' => '𑢺',
- '𑣛' => '𑢻',
- '𑣜' => '𑢼',
- '𑣝' => '𑢽',
- '𑣞' => '𑢾',
- '𑣟' => '𑢿',
- '𖹠' => '𖹀',
- '𖹡' => '𖹁',
- '𖹢' => '𖹂',
- '𖹣' => '𖹃',
- '𖹤' => '𖹄',
- '𖹥' => '𖹅',
- '𖹦' => '𖹆',
- '𖹧' => '𖹇',
- '𖹨' => '𖹈',
- '𖹩' => '𖹉',
- '𖹪' => '𖹊',
- '𖹫' => '𖹋',
- '𖹬' => '𖹌',
- '𖹭' => '𖹍',
- '𖹮' => '𖹎',
- '𖹯' => '𖹏',
- '𖹰' => '𖹐',
- '𖹱' => '𖹑',
- '𖹲' => '𖹒',
- '𖹳' => '𖹓',
- '𖹴' => '𖹔',
- '𖹵' => '𖹕',
- '𖹶' => '𖹖',
- '𖹷' => '𖹗',
- '𖹸' => '𖹘',
- '𖹹' => '𖹙',
- '𖹺' => '𖹚',
- '𖹻' => '𖹛',
- '𖹼' => '𖹜',
- '𖹽' => '𖹝',
- '𖹾' => '𖹞',
- '𖹿' => '𖹟',
- '𞤢' => '𞤀',
- '𞤣' => '𞤁',
- '𞤤' => '𞤂',
- '𞤥' => '𞤃',
- '𞤦' => '𞤄',
- '𞤧' => '𞤅',
- '𞤨' => '𞤆',
- '𞤩' => '𞤇',
- '𞤪' => '𞤈',
- '𞤫' => '𞤉',
- '𞤬' => '𞤊',
- '𞤭' => '𞤋',
- '𞤮' => '𞤌',
- '𞤯' => '𞤍',
- '𞤰' => '𞤎',
- '𞤱' => '𞤏',
- '𞤲' => '𞤐',
- '𞤳' => '𞤑',
- '𞤴' => '𞤒',
- '𞤵' => '𞤓',
- '𞤶' => '𞤔',
- '𞤷' => '𞤕',
- '𞤸' => '𞤖',
- '𞤹' => '𞤗',
- '𞤺' => '𞤘',
- '𞤻' => '𞤙',
- '𞤼' => '𞤚',
- '𞤽' => '𞤛',
- '𞤾' => '𞤜',
- '𞤿' => '𞤝',
- '𞥀' => '𞤞',
- '𞥁' => '𞤟',
- '𞥂' => '𞤠',
- '𞥃' => '𞤡',
- 'ß' => 'SS',
- 'ff' => 'FF',
- 'fi' => 'FI',
- 'fl' => 'FL',
- 'ffi' => 'FFI',
- 'ffl' => 'FFL',
- 'ſt' => 'ST',
- 'st' => 'ST',
- 'և' => 'ԵՒ',
- 'ﬓ' => 'ՄՆ',
- 'ﬔ' => 'ՄԵ',
- 'ﬕ' => 'ՄԻ',
- 'ﬖ' => 'ՎՆ',
- 'ﬗ' => 'ՄԽ',
- 'ʼn' => 'ʼN',
- 'ΐ' => 'Ϊ́',
- 'ΰ' => 'Ϋ́',
- 'ǰ' => 'J̌',
- 'ẖ' => 'H̱',
- 'ẗ' => 'T̈',
- 'ẘ' => 'W̊',
- 'ẙ' => 'Y̊',
- 'ẚ' => 'Aʾ',
- 'ὐ' => 'Υ̓',
- 'ὒ' => 'Υ̓̀',
- 'ὔ' => 'Υ̓́',
- 'ὖ' => 'Υ̓͂',
- 'ᾶ' => 'Α͂',
- 'ῆ' => 'Η͂',
- 'ῒ' => 'Ϊ̀',
- 'ΐ' => 'Ϊ́',
- 'ῖ' => 'Ι͂',
- 'ῗ' => 'Ϊ͂',
- 'ῢ' => 'Ϋ̀',
- 'ΰ' => 'Ϋ́',
- 'ῤ' => 'Ρ̓',
- 'ῦ' => 'Υ͂',
- 'ῧ' => 'Ϋ͂',
- 'ῶ' => 'Ω͂',
- 'ᾈ' => 'ἈΙ',
- 'ᾉ' => 'ἉΙ',
- 'ᾊ' => 'ἊΙ',
- 'ᾋ' => 'ἋΙ',
- 'ᾌ' => 'ἌΙ',
- 'ᾍ' => 'ἍΙ',
- 'ᾎ' => 'ἎΙ',
- 'ᾏ' => 'ἏΙ',
- 'ᾘ' => 'ἨΙ',
- 'ᾙ' => 'ἩΙ',
- 'ᾚ' => 'ἪΙ',
- 'ᾛ' => 'ἫΙ',
- 'ᾜ' => 'ἬΙ',
- 'ᾝ' => 'ἭΙ',
- 'ᾞ' => 'ἮΙ',
- 'ᾟ' => 'ἯΙ',
- 'ᾨ' => 'ὨΙ',
- 'ᾩ' => 'ὩΙ',
- 'ᾪ' => 'ὪΙ',
- 'ᾫ' => 'ὫΙ',
- 'ᾬ' => 'ὬΙ',
- 'ᾭ' => 'ὭΙ',
- 'ᾮ' => 'ὮΙ',
- 'ᾯ' => 'ὯΙ',
- 'ᾼ' => 'ΑΙ',
- 'ῌ' => 'ΗΙ',
- 'ῼ' => 'ΩΙ',
- 'ᾲ' => 'ᾺΙ',
- 'ᾴ' => 'ΆΙ',
- 'ῂ' => 'ῊΙ',
- 'ῄ' => 'ΉΙ',
- 'ῲ' => 'ῺΙ',
- 'ῴ' => 'ΏΙ',
- 'ᾷ' => 'Α͂Ι',
- 'ῇ' => 'Η͂Ι',
- 'ῷ' => 'Ω͂Ι',
-);
diff --git a/system/vendor/symfony/polyfill-mbstring/bootstrap.php b/system/vendor/symfony/polyfill-mbstring/bootstrap.php
deleted file mode 100644
index ecf1a03..0000000
--- a/system/vendor/symfony/polyfill-mbstring/bootstrap.php
+++ /dev/null
@@ -1,151 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Symfony\Polyfill\Mbstring as p;
-
-if (\PHP_VERSION_ID >= 80000) {
- return require __DIR__.'/bootstrap80.php';
-}
-
-if (!function_exists('mb_convert_encoding')) {
- function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); }
-}
-if (!function_exists('mb_decode_mimeheader')) {
- function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); }
-}
-if (!function_exists('mb_encode_mimeheader')) {
- function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); }
-}
-if (!function_exists('mb_decode_numericentity')) {
- function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); }
-}
-if (!function_exists('mb_encode_numericentity')) {
- function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); }
-}
-if (!function_exists('mb_convert_case')) {
- function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); }
-}
-if (!function_exists('mb_internal_encoding')) {
- function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); }
-}
-if (!function_exists('mb_language')) {
- function mb_language($language = null) { return p\Mbstring::mb_language($language); }
-}
-if (!function_exists('mb_list_encodings')) {
- function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
-}
-if (!function_exists('mb_encoding_aliases')) {
- function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
-}
-if (!function_exists('mb_check_encoding')) {
- function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); }
-}
-if (!function_exists('mb_detect_encoding')) {
- function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); }
-}
-if (!function_exists('mb_detect_order')) {
- function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); }
-}
-if (!function_exists('mb_parse_str')) {
- function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; }
-}
-if (!function_exists('mb_strlen')) {
- function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); }
-}
-if (!function_exists('mb_strpos')) {
- function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); }
-}
-if (!function_exists('mb_strtolower')) {
- function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); }
-}
-if (!function_exists('mb_strtoupper')) {
- function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); }
-}
-if (!function_exists('mb_substitute_character')) {
- function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); }
-}
-if (!function_exists('mb_substr')) {
- function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); }
-}
-if (!function_exists('mb_stripos')) {
- function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); }
-}
-if (!function_exists('mb_stristr')) {
- function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); }
-}
-if (!function_exists('mb_strrchr')) {
- function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); }
-}
-if (!function_exists('mb_strrichr')) {
- function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); }
-}
-if (!function_exists('mb_strripos')) {
- function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); }
-}
-if (!function_exists('mb_strrpos')) {
- function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); }
-}
-if (!function_exists('mb_strstr')) {
- function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); }
-}
-if (!function_exists('mb_get_info')) {
- function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
-}
-if (!function_exists('mb_http_output')) {
- function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); }
-}
-if (!function_exists('mb_strwidth')) {
- function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); }
-}
-if (!function_exists('mb_substr_count')) {
- function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); }
-}
-if (!function_exists('mb_output_handler')) {
- function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); }
-}
-if (!function_exists('mb_http_input')) {
- function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); }
-}
-
-if (!function_exists('mb_convert_variables')) {
- function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); }
-}
-
-if (!function_exists('mb_ord')) {
- function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); }
-}
-if (!function_exists('mb_chr')) {
- function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); }
-}
-if (!function_exists('mb_scrub')) {
- function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); }
-}
-if (!function_exists('mb_str_split')) {
- function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); }
-}
-
-if (!function_exists('mb_str_pad')) {
- function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); }
-}
-
-if (extension_loaded('mbstring')) {
- return;
-}
-
-if (!defined('MB_CASE_UPPER')) {
- define('MB_CASE_UPPER', 0);
-}
-if (!defined('MB_CASE_LOWER')) {
- define('MB_CASE_LOWER', 1);
-}
-if (!defined('MB_CASE_TITLE')) {
- define('MB_CASE_TITLE', 2);
-}
diff --git a/system/vendor/symfony/polyfill-mbstring/bootstrap80.php b/system/vendor/symfony/polyfill-mbstring/bootstrap80.php
deleted file mode 100644
index 2f9fb5b..0000000
--- a/system/vendor/symfony/polyfill-mbstring/bootstrap80.php
+++ /dev/null
@@ -1,147 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Symfony\Polyfill\Mbstring as p;
-
-if (!function_exists('mb_convert_encoding')) {
- function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); }
-}
-if (!function_exists('mb_decode_mimeheader')) {
- function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); }
-}
-if (!function_exists('mb_encode_mimeheader')) {
- function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); }
-}
-if (!function_exists('mb_decode_numericentity')) {
- function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); }
-}
-if (!function_exists('mb_encode_numericentity')) {
- function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); }
-}
-if (!function_exists('mb_convert_case')) {
- function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); }
-}
-if (!function_exists('mb_internal_encoding')) {
- function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); }
-}
-if (!function_exists('mb_language')) {
- function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); }
-}
-if (!function_exists('mb_list_encodings')) {
- function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); }
-}
-if (!function_exists('mb_encoding_aliases')) {
- function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); }
-}
-if (!function_exists('mb_check_encoding')) {
- function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); }
-}
-if (!function_exists('mb_detect_encoding')) {
- function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); }
-}
-if (!function_exists('mb_detect_order')) {
- function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); }
-}
-if (!function_exists('mb_parse_str')) {
- function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; }
-}
-if (!function_exists('mb_strlen')) {
- function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); }
-}
-if (!function_exists('mb_strpos')) {
- function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
-}
-if (!function_exists('mb_strtolower')) {
- function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); }
-}
-if (!function_exists('mb_strtoupper')) {
- function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); }
-}
-if (!function_exists('mb_substitute_character')) {
- function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); }
-}
-if (!function_exists('mb_substr')) {
- function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); }
-}
-if (!function_exists('mb_stripos')) {
- function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
-}
-if (!function_exists('mb_stristr')) {
- function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
-}
-if (!function_exists('mb_strrchr')) {
- function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
-}
-if (!function_exists('mb_strrichr')) {
- function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
-}
-if (!function_exists('mb_strripos')) {
- function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
-}
-if (!function_exists('mb_strrpos')) {
- function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
-}
-if (!function_exists('mb_strstr')) {
- function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
-}
-if (!function_exists('mb_get_info')) {
- function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); }
-}
-if (!function_exists('mb_http_output')) {
- function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); }
-}
-if (!function_exists('mb_strwidth')) {
- function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); }
-}
-if (!function_exists('mb_substr_count')) {
- function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); }
-}
-if (!function_exists('mb_output_handler')) {
- function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); }
-}
-if (!function_exists('mb_http_input')) {
- function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); }
-}
-
-if (!function_exists('mb_convert_variables')) {
- function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); }
-}
-
-if (!function_exists('mb_ord')) {
- function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); }
-}
-if (!function_exists('mb_chr')) {
- function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); }
-}
-if (!function_exists('mb_scrub')) {
- function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); }
-}
-if (!function_exists('mb_str_split')) {
- function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); }
-}
-
-if (!function_exists('mb_str_pad')) {
- function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); }
-}
-
-if (extension_loaded('mbstring')) {
- return;
-}
-
-if (!defined('MB_CASE_UPPER')) {
- define('MB_CASE_UPPER', 0);
-}
-if (!defined('MB_CASE_LOWER')) {
- define('MB_CASE_LOWER', 1);
-}
-if (!defined('MB_CASE_TITLE')) {
- define('MB_CASE_TITLE', 2);
-}
diff --git a/system/vendor/symfony/polyfill-mbstring/composer.json b/system/vendor/symfony/polyfill-mbstring/composer.json
deleted file mode 100644
index 943e502..0000000
--- a/system/vendor/symfony/polyfill-mbstring/composer.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "symfony/polyfill-mbstring",
- "type": "library",
- "description": "Symfony polyfill for the Mbstring extension",
- "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=7.1"
- },
- "provide": {
- "ext-mbstring": "*"
- },
- "autoload": {
- "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" },
- "files": [ "bootstrap.php" ]
- },
- "suggest": {
- "ext-mbstring": "For best performance"
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- }
-}
diff --git a/system/vendor/symfony/polyfill-php80/LICENSE b/system/vendor/symfony/polyfill-php80/LICENSE
deleted file mode 100644
index 0ed3a24..0000000
--- a/system/vendor/symfony/polyfill-php80/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2020-present Fabien Potencier
-
-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/system/vendor/symfony/polyfill-php80/Php80.php b/system/vendor/symfony/polyfill-php80/Php80.php
deleted file mode 100644
index 362dd1a..0000000
--- a/system/vendor/symfony/polyfill-php80/Php80.php
+++ /dev/null
@@ -1,115 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Php80;
-
-/**
- * @author Ion Bazan
- * @author Nico Oelgart
- * @author Nicolas Grekas
- *
- * @internal
- */
-final class Php80
-{
- public static function fdiv(float $dividend, float $divisor): float
- {
- return @($dividend / $divisor);
- }
-
- public static function get_debug_type($value): string
- {
- switch (true) {
- case null === $value: return 'null';
- case \is_bool($value): return 'bool';
- case \is_string($value): return 'string';
- case \is_array($value): return 'array';
- case \is_int($value): return 'int';
- case \is_float($value): return 'float';
- case \is_object($value): break;
- case $value instanceof \__PHP_Incomplete_Class: return '__PHP_Incomplete_Class';
- default:
- if (null === $type = @get_resource_type($value)) {
- return 'unknown';
- }
-
- if ('Unknown' === $type) {
- $type = 'closed';
- }
-
- return "resource ($type)";
- }
-
- $class = \get_class($value);
-
- if (false === strpos($class, '@')) {
- return $class;
- }
-
- return (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous';
- }
-
- public static function get_resource_id($res): int
- {
- if (!\is_resource($res) && null === @get_resource_type($res)) {
- throw new \TypeError(sprintf('Argument 1 passed to get_resource_id() must be of the type resource, %s given', get_debug_type($res)));
- }
-
- return (int) $res;
- }
-
- public static function preg_last_error_msg(): string
- {
- switch (preg_last_error()) {
- case \PREG_INTERNAL_ERROR:
- return 'Internal error';
- case \PREG_BAD_UTF8_ERROR:
- return 'Malformed UTF-8 characters, possibly incorrectly encoded';
- case \PREG_BAD_UTF8_OFFSET_ERROR:
- return 'The offset did not correspond to the beginning of a valid UTF-8 code point';
- case \PREG_BACKTRACK_LIMIT_ERROR:
- return 'Backtrack limit exhausted';
- case \PREG_RECURSION_LIMIT_ERROR:
- return 'Recursion limit exhausted';
- case \PREG_JIT_STACKLIMIT_ERROR:
- return 'JIT stack limit exhausted';
- case \PREG_NO_ERROR:
- return 'No error';
- default:
- return 'Unknown error';
- }
- }
-
- public static function str_contains(string $haystack, string $needle): bool
- {
- return '' === $needle || false !== strpos($haystack, $needle);
- }
-
- public static function str_starts_with(string $haystack, string $needle): bool
- {
- return 0 === strncmp($haystack, $needle, \strlen($needle));
- }
-
- public static function str_ends_with(string $haystack, string $needle): bool
- {
- if ('' === $needle || $needle === $haystack) {
- return true;
- }
-
- if ('' === $haystack) {
- return false;
- }
-
- $needleLength = \strlen($needle);
-
- return $needleLength <= \strlen($haystack) && 0 === substr_compare($haystack, $needle, -$needleLength);
- }
-}
diff --git a/system/vendor/symfony/polyfill-php80/PhpToken.php b/system/vendor/symfony/polyfill-php80/PhpToken.php
deleted file mode 100644
index fe6e691..0000000
--- a/system/vendor/symfony/polyfill-php80/PhpToken.php
+++ /dev/null
@@ -1,103 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Php80;
-
-/**
- * @author Fedonyuk Anton
- *
- * @internal
- */
-class PhpToken implements \Stringable
-{
- /**
- * @var int
- */
- public $id;
-
- /**
- * @var string
- */
- public $text;
-
- /**
- * @var int
- */
- public $line;
-
- /**
- * @var int
- */
- public $pos;
-
- public function __construct(int $id, string $text, int $line = -1, int $position = -1)
- {
- $this->id = $id;
- $this->text = $text;
- $this->line = $line;
- $this->pos = $position;
- }
-
- public function getTokenName(): ?string
- {
- if ('UNKNOWN' === $name = token_name($this->id)) {
- $name = \strlen($this->text) > 1 || \ord($this->text) < 32 ? null : $this->text;
- }
-
- return $name;
- }
-
- /**
- * @param int|string|array $kind
- */
- public function is($kind): bool
- {
- foreach ((array) $kind as $value) {
- if (\in_array($value, [$this->id, $this->text], true)) {
- return true;
- }
- }
-
- return false;
- }
-
- public function isIgnorable(): bool
- {
- return \in_array($this->id, [\T_WHITESPACE, \T_COMMENT, \T_DOC_COMMENT, \T_OPEN_TAG], true);
- }
-
- public function __toString(): string
- {
- return (string) $this->text;
- }
-
- /**
- * @return static[]
- */
- public static function tokenize(string $code, int $flags = 0): array
- {
- $line = 1;
- $position = 0;
- $tokens = token_get_all($code, $flags);
- foreach ($tokens as $index => $token) {
- if (\is_string($token)) {
- $id = \ord($token);
- $text = $token;
- } else {
- [$id, $text, $line] = $token;
- }
- $tokens[$index] = new static($id, $text, $line, $position);
- $position += \strlen($text);
- }
-
- return $tokens;
- }
-}
diff --git a/system/vendor/symfony/polyfill-php80/README.md b/system/vendor/symfony/polyfill-php80/README.md
deleted file mode 100644
index 3816c55..0000000
--- a/system/vendor/symfony/polyfill-php80/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-Symfony Polyfill / Php80
-========================
-
-This component provides features added to PHP 8.0 core:
-
-- [`Stringable`](https://php.net/stringable) interface
-- [`fdiv`](https://php.net/fdiv)
-- [`ValueError`](https://php.net/valueerror) class
-- [`UnhandledMatchError`](https://php.net/unhandledmatcherror) class
-- `FILTER_VALIDATE_BOOL` constant
-- [`get_debug_type`](https://php.net/get_debug_type)
-- [`PhpToken`](https://php.net/phptoken) class
-- [`preg_last_error_msg`](https://php.net/preg_last_error_msg)
-- [`str_contains`](https://php.net/str_contains)
-- [`str_starts_with`](https://php.net/str_starts_with)
-- [`str_ends_with`](https://php.net/str_ends_with)
-- [`get_resource_id`](https://php.net/get_resource_id)
-
-More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
-
-License
-=======
-
-This library is released under the [MIT license](LICENSE).
diff --git a/system/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php b/system/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php
deleted file mode 100644
index 2b95542..0000000
--- a/system/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-#[Attribute(Attribute::TARGET_CLASS)]
-final class Attribute
-{
- public const TARGET_CLASS = 1;
- public const TARGET_FUNCTION = 2;
- public const TARGET_METHOD = 4;
- public const TARGET_PROPERTY = 8;
- public const TARGET_CLASS_CONSTANT = 16;
- public const TARGET_PARAMETER = 32;
- public const TARGET_ALL = 63;
- public const IS_REPEATABLE = 64;
-
- /** @var int */
- public $flags;
-
- public function __construct(int $flags = self::TARGET_ALL)
- {
- $this->flags = $flags;
- }
-}
diff --git a/system/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php b/system/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php
deleted file mode 100644
index bd1212f..0000000
--- a/system/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (\PHP_VERSION_ID < 80000 && extension_loaded('tokenizer')) {
- class PhpToken extends Symfony\Polyfill\Php80\PhpToken
- {
- }
-}
diff --git a/system/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php b/system/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php
deleted file mode 100644
index 7c62d75..0000000
--- a/system/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (\PHP_VERSION_ID < 80000) {
- interface Stringable
- {
- /**
- * @return string
- */
- public function __toString();
- }
-}
diff --git a/system/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php b/system/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php
deleted file mode 100644
index 01c6c6c..0000000
--- a/system/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (\PHP_VERSION_ID < 80000) {
- class UnhandledMatchError extends Error
- {
- }
-}
diff --git a/system/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php b/system/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php
deleted file mode 100644
index 783dbc2..0000000
--- a/system/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (\PHP_VERSION_ID < 80000) {
- class ValueError extends Error
- {
- }
-}
diff --git a/system/vendor/symfony/polyfill-php80/bootstrap.php b/system/vendor/symfony/polyfill-php80/bootstrap.php
deleted file mode 100644
index e5f7dbc..0000000
--- a/system/vendor/symfony/polyfill-php80/bootstrap.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Symfony\Polyfill\Php80 as p;
-
-if (\PHP_VERSION_ID >= 80000) {
- return;
-}
-
-if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) {
- define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN);
-}
-
-if (!function_exists('fdiv')) {
- function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); }
-}
-if (!function_exists('preg_last_error_msg')) {
- function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); }
-}
-if (!function_exists('str_contains')) {
- function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); }
-}
-if (!function_exists('str_starts_with')) {
- function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); }
-}
-if (!function_exists('str_ends_with')) {
- function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); }
-}
-if (!function_exists('get_debug_type')) {
- function get_debug_type($value): string { return p\Php80::get_debug_type($value); }
-}
-if (!function_exists('get_resource_id')) {
- function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); }
-}
diff --git a/system/vendor/symfony/polyfill-php80/composer.json b/system/vendor/symfony/polyfill-php80/composer.json
deleted file mode 100644
index f1801f4..0000000
--- a/system/vendor/symfony/polyfill-php80/composer.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "symfony/polyfill-php80",
- "type": "library",
- "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
- "keywords": ["polyfill", "shim", "compatibility", "portable"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Ion Bazan",
- "email": "ion.bazan@gmail.com"
- },
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=7.1"
- },
- "autoload": {
- "psr-4": { "Symfony\\Polyfill\\Php80\\": "" },
- "files": [ "bootstrap.php" ],
- "classmap": [ "Resources/stubs" ]
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- }
-}
diff --git a/system/vendor/symfony/polyfill-php81/LICENSE b/system/vendor/symfony/polyfill-php81/LICENSE
deleted file mode 100644
index 99c6bdf..0000000
--- a/system/vendor/symfony/polyfill-php81/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2021-present Fabien Potencier
-
-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/system/vendor/symfony/polyfill-php81/Php81.php b/system/vendor/symfony/polyfill-php81/Php81.php
deleted file mode 100644
index f0507b7..0000000
--- a/system/vendor/symfony/polyfill-php81/Php81.php
+++ /dev/null
@@ -1,37 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Php81;
-
-/**
- * @author Nicolas Grekas
- *
- * @internal
- */
-final class Php81
-{
- public static function array_is_list(array $array): bool
- {
- if ([] === $array || $array === array_values($array)) {
- return true;
- }
-
- $nextKey = -1;
-
- foreach ($array as $k => $v) {
- if ($k !== ++$nextKey) {
- return false;
- }
- }
-
- return true;
- }
-}
diff --git a/system/vendor/symfony/polyfill-php81/README.md b/system/vendor/symfony/polyfill-php81/README.md
deleted file mode 100644
index c07ef78..0000000
--- a/system/vendor/symfony/polyfill-php81/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-Symfony Polyfill / Php81
-========================
-
-This component provides features added to PHP 8.1 core:
-
-- [`array_is_list`](https://php.net/array_is_list)
-- [`enum_exists`](https://php.net/enum-exists)
-- [`MYSQLI_REFRESH_REPLICA`](https://php.net/mysqli.constants#constantmysqli-refresh-replica) constant
-- [`ReturnTypeWillChange`](https://wiki.php.net/rfc/internal_method_return_types)
-- [`CURLStringFile`](https://php.net/CURLStringFile) (but only if PHP >= 7.4 is used)
-
-More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
-
-License
-=======
-
-This library is released under the [MIT license](LICENSE).
diff --git a/system/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php b/system/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php
deleted file mode 100644
index eb5952e..0000000
--- a/system/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php
+++ /dev/null
@@ -1,51 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (\PHP_VERSION_ID >= 70400 && extension_loaded('curl')) {
- /**
- * @property string $data
- */
- class CURLStringFile extends CURLFile
- {
- private $data;
-
- public function __construct(string $data, string $postname, string $mime = 'application/octet-stream')
- {
- $this->data = $data;
- parent::__construct('data://application/octet-stream;base64,'.base64_encode($data), $mime, $postname);
- }
-
- public function __set(string $name, $value): void
- {
- if ('data' !== $name) {
- $this->$name = $value;
-
- return;
- }
-
- if (is_object($value) ? !method_exists($value, '__toString') : !is_scalar($value)) {
- throw new \TypeError('Cannot assign '.gettype($value).' to property CURLStringFile::$data of type string');
- }
-
- $this->name = 'data://application/octet-stream;base64,'.base64_encode($value);
- }
-
- public function __isset(string $name): bool
- {
- return isset($this->$name);
- }
-
- public function &__get(string $name)
- {
- return $this->$name;
- }
- }
-}
diff --git a/system/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php b/system/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php
deleted file mode 100644
index cb7720a..0000000
--- a/system/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (\PHP_VERSION_ID < 80100) {
- #[Attribute(Attribute::TARGET_METHOD)]
- final class ReturnTypeWillChange
- {
- public function __construct()
- {
- }
- }
-}
diff --git a/system/vendor/symfony/polyfill-php81/bootstrap.php b/system/vendor/symfony/polyfill-php81/bootstrap.php
deleted file mode 100644
index 9f872e0..0000000
--- a/system/vendor/symfony/polyfill-php81/bootstrap.php
+++ /dev/null
@@ -1,28 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Symfony\Polyfill\Php81 as p;
-
-if (\PHP_VERSION_ID >= 80100) {
- return;
-}
-
-if (defined('MYSQLI_REFRESH_SLAVE') && !defined('MYSQLI_REFRESH_REPLICA')) {
- define('MYSQLI_REFRESH_REPLICA', 64);
-}
-
-if (!function_exists('array_is_list')) {
- function array_is_list(array $array): bool { return p\Php81::array_is_list($array); }
-}
-
-if (!function_exists('enum_exists')) {
- function enum_exists(string $enum, bool $autoload = true): bool { return $autoload && class_exists($enum) && false; }
-}
diff --git a/system/vendor/symfony/polyfill-php81/composer.json b/system/vendor/symfony/polyfill-php81/composer.json
deleted file mode 100644
index e02d673..0000000
--- a/system/vendor/symfony/polyfill-php81/composer.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "name": "symfony/polyfill-php81",
- "type": "library",
- "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
- "keywords": ["polyfill", "shim", "compatibility", "portable"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=7.1"
- },
- "autoload": {
- "psr-4": { "Symfony\\Polyfill\\Php81\\": "" },
- "files": [ "bootstrap.php" ],
- "classmap": [ "Resources/stubs" ]
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- }
-}
diff --git a/system/vendor/symfony/yaml/CHANGELOG.md b/system/vendor/symfony/yaml/CHANGELOG.md
deleted file mode 100644
index b9561b2..0000000
--- a/system/vendor/symfony/yaml/CHANGELOG.md
+++ /dev/null
@@ -1,237 +0,0 @@
-CHANGELOG
-=========
-
-5.4
----
-
- * Add new `lint:yaml dirname --exclude=/dirname/foo.yaml --exclude=/dirname/bar.yaml`
- option to exclude one or more specific files from multiple file list
- * Allow negatable for the parse tags option with `--no-parse-tags`
-
-5.3
----
-
- * Added `github` format support & autodetection to render errors as annotations
- when running the YAML linter command in a Github Action environment.
-
-5.1.0
------
-
- * Added support for parsing numbers prefixed with `0o` as octal numbers.
- * Deprecated support for parsing numbers starting with `0` as octal numbers. They will be parsed as strings as of Symfony 6.0. Prefix numbers with `0o`
- so that they are parsed as octal numbers.
-
- Before:
-
- ```yaml
- Yaml::parse('072');
- ```
-
- After:
-
- ```yaml
- Yaml::parse('0o72');
- ```
-
- * Added `yaml-lint` binary.
- * Deprecated using the `!php/object` and `!php/const` tags without a value.
-
-5.0.0
------
-
- * Removed support for mappings inside multi-line strings.
- * removed support for implicit STDIN usage in the `lint:yaml` command, use `lint:yaml -` (append a dash) instead to make it explicit.
-
-4.4.0
------
-
- * Added support for parsing the inline notation spanning multiple lines.
- * Added support to dump `null` as `~` by using the `Yaml::DUMP_NULL_AS_TILDE` flag.
- * deprecated accepting STDIN implicitly when using the `lint:yaml` command, use `lint:yaml -` (append a dash) instead to make it explicit.
-
-4.3.0
------
-
- * Using a mapping inside a multi-line string is deprecated and will throw a `ParseException` in 5.0.
-
-4.2.0
------
-
- * added support for multiple files or directories in `LintCommand`
-
-4.0.0
------
-
- * The behavior of the non-specific tag `!` is changed and now forces
- non-evaluating your values.
- * complex mappings will throw a `ParseException`
- * support for the comma as a group separator for floats has been dropped, use
- the underscore instead
- * support for the `!!php/object` tag has been dropped, use the `!php/object`
- tag instead
- * duplicate mapping keys throw a `ParseException`
- * non-string mapping keys throw a `ParseException`, use the `Yaml::PARSE_KEYS_AS_STRINGS`
- flag to cast them to strings
- * `%` at the beginning of an unquoted string throw a `ParseException`
- * mappings with a colon (`:`) that is not followed by a whitespace throw a
- `ParseException`
- * the `Dumper::setIndentation()` method has been removed
- * being able to pass boolean options to the `Yaml::parse()`, `Yaml::dump()`,
- `Parser::parse()`, and `Dumper::dump()` methods to configure the behavior of
- the parser and dumper is no longer supported, pass bitmask flags instead
- * the constructor arguments of the `Parser` class have been removed
- * the `Inline` class is internal and no longer part of the BC promise
- * removed support for the `!str` tag, use the `!!str` tag instead
- * added support for tagged scalars.
-
- ```yml
- Yaml::parse('!foo bar', Yaml::PARSE_CUSTOM_TAGS);
- // returns TaggedValue('foo', 'bar');
- ```
-
-3.4.0
------
-
- * added support for parsing YAML files using the `Yaml::parseFile()` or `Parser::parseFile()` method
-
- * the `Dumper`, `Parser`, and `Yaml` classes are marked as final
-
- * Deprecated the `!php/object:` tag which will be replaced by the
- `!php/object` tag (without the colon) in 4.0.
-
- * Deprecated the `!php/const:` tag which will be replaced by the
- `!php/const` tag (without the colon) in 4.0.
-
- * Support for the `!str` tag is deprecated, use the `!!str` tag instead.
-
- * Deprecated using the non-specific tag `!` as its behavior will change in 4.0.
- It will force non-evaluating your values in 4.0. Use plain integers or `!!float` instead.
-
-3.3.0
------
-
- * Starting an unquoted string with a question mark followed by a space is
- deprecated and will throw a `ParseException` in Symfony 4.0.
-
- * Deprecated support for implicitly parsing non-string mapping keys as strings.
- Mapping keys that are no strings will lead to a `ParseException` in Symfony
- 4.0. Use quotes to opt-in for keys to be parsed as strings.
-
- Before:
-
- ```php
- $yaml = << new A(), 'bar' => 1], 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE | Yaml::DUMP_OBJECT);
- ```
-
-3.0.0
------
-
- * Yaml::parse() now throws an exception when a blackslash is not escaped
- in double-quoted strings
-
-2.8.0
------
-
- * Deprecated usage of a colon in an unquoted mapping value
- * Deprecated usage of @, \`, | and > at the beginning of an unquoted string
- * When surrounding strings with double-quotes, you must now escape `\` characters. Not
- escaping those characters (when surrounded by double-quotes) is deprecated.
-
- Before:
-
- ```yml
- class: "Foo\Var"
- ```
-
- After:
-
- ```yml
- class: "Foo\\Var"
- ```
-
-2.1.0
------
-
- * Yaml::parse() does not evaluate loaded files as PHP files by default
- anymore (call Yaml::enablePhpParsing() to get back the old behavior)
diff --git a/system/vendor/symfony/yaml/Command/LintCommand.php b/system/vendor/symfony/yaml/Command/LintCommand.php
deleted file mode 100644
index 3ebd570..0000000
--- a/system/vendor/symfony/yaml/Command/LintCommand.php
+++ /dev/null
@@ -1,289 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Command;
-
-use Symfony\Component\Console\CI\GithubActionReporter;
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Completion\CompletionInput;
-use Symfony\Component\Console\Completion\CompletionSuggestions;
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\RuntimeException;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Style\SymfonyStyle;
-use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Parser;
-use Symfony\Component\Yaml\Yaml;
-
-/**
- * Validates YAML files syntax and outputs encountered errors.
- *
- * @author Grégoire Pineau
- * @author Robin Chalas
- */
-class LintCommand extends Command
-{
- protected static $defaultName = 'lint:yaml';
- protected static $defaultDescription = 'Lint a YAML file and outputs encountered errors';
-
- private $parser;
- private $format;
- private $displayCorrectFiles;
- private $directoryIteratorProvider;
- private $isReadableProvider;
-
- public function __construct(string $name = null, callable $directoryIteratorProvider = null, callable $isReadableProvider = null)
- {
- parent::__construct($name);
-
- $this->directoryIteratorProvider = $directoryIteratorProvider;
- $this->isReadableProvider = $isReadableProvider;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function configure()
- {
- $this
- ->setDescription(self::$defaultDescription)
- ->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN')
- ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format')
- ->addOption('exclude', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path(s) to exclude')
- ->addOption('parse-tags', null, InputOption::VALUE_NEGATABLE, 'Parse custom tags', null)
- ->setHelp(<<%command.name%
command lints a YAML file and outputs to STDOUT
-the first encountered syntax error.
-
-You can validates YAML contents passed from STDIN:
-
- cat filename | php %command.full_name% -
-
-You can also validate the syntax of a file:
-
- php %command.full_name% filename
-
-Or of a whole directory:
-
- php %command.full_name% dirname
- php %command.full_name% dirname --format=json
-
-You can also exclude one or more specific files:
-
- php %command.full_name% dirname --exclude="dirname/foo.yaml" --exclude="dirname/bar.yaml"
-
-EOF
- )
- ;
- }
-
- protected function execute(InputInterface $input, OutputInterface $output)
- {
- $io = new SymfonyStyle($input, $output);
- $filenames = (array) $input->getArgument('filename');
- $excludes = $input->getOption('exclude');
- $this->format = $input->getOption('format');
- $flags = $input->getOption('parse-tags');
-
- if ('github' === $this->format && !class_exists(GithubActionReporter::class)) {
- throw new \InvalidArgumentException('The "github" format is only available since "symfony/console" >= 5.3.');
- }
-
- if (null === $this->format) {
- // Autodetect format according to CI environment
- $this->format = class_exists(GithubActionReporter::class) && GithubActionReporter::isGithubActionEnvironment() ? 'github' : 'txt';
- }
-
- $flags = $flags ? Yaml::PARSE_CUSTOM_TAGS : 0;
-
- $this->displayCorrectFiles = $output->isVerbose();
-
- if (['-'] === $filenames) {
- return $this->display($io, [$this->validate(file_get_contents('php://stdin'), $flags)]);
- }
-
- if (!$filenames) {
- throw new RuntimeException('Please provide a filename or pipe file content to STDIN.');
- }
-
- $filesInfo = [];
- foreach ($filenames as $filename) {
- if (!$this->isReadable($filename)) {
- throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename));
- }
-
- foreach ($this->getFiles($filename) as $file) {
- if (!\in_array($file->getPathname(), $excludes, true)) {
- $filesInfo[] = $this->validate(file_get_contents($file), $flags, $file);
- }
- }
- }
-
- return $this->display($io, $filesInfo);
- }
-
- private function validate(string $content, int $flags, string $file = null)
- {
- $prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) {
- if (\E_USER_DEPRECATED === $level) {
- throw new ParseException($message, $this->getParser()->getRealCurrentLineNb() + 1);
- }
-
- return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false;
- });
-
- try {
- $this->getParser()->parse($content, Yaml::PARSE_CONSTANT | $flags);
- } catch (ParseException $e) {
- return ['file' => $file, 'line' => $e->getParsedLine(), 'valid' => false, 'message' => $e->getMessage()];
- } finally {
- restore_error_handler();
- }
-
- return ['file' => $file, 'valid' => true];
- }
-
- private function display(SymfonyStyle $io, array $files): int
- {
- switch ($this->format) {
- case 'txt':
- return $this->displayTxt($io, $files);
- case 'json':
- return $this->displayJson($io, $files);
- case 'github':
- return $this->displayTxt($io, $files, true);
- default:
- throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $this->format));
- }
- }
-
- private function displayTxt(SymfonyStyle $io, array $filesInfo, bool $errorAsGithubAnnotations = false): int
- {
- $countFiles = \count($filesInfo);
- $erroredFiles = 0;
- $suggestTagOption = false;
-
- if ($errorAsGithubAnnotations) {
- $githubReporter = new GithubActionReporter($io);
- }
-
- foreach ($filesInfo as $info) {
- if ($info['valid'] && $this->displayCorrectFiles) {
- $io->comment('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : ''));
- } elseif (!$info['valid']) {
- ++$erroredFiles;
- $io->text(' ERROR '.($info['file'] ? sprintf(' in %s', $info['file']) : ''));
- $io->text(sprintf(' >> %s', $info['message']));
-
- if (false !== strpos($info['message'], 'PARSE_CUSTOM_TAGS')) {
- $suggestTagOption = true;
- }
-
- if ($errorAsGithubAnnotations) {
- $githubReporter->error($info['message'], $info['file'] ?? 'php://stdin', $info['line']);
- }
- }
- }
-
- if (0 === $erroredFiles) {
- $io->success(sprintf('All %d YAML files contain valid syntax.', $countFiles));
- } else {
- $io->warning(sprintf('%d YAML files have valid syntax and %d contain errors.%s', $countFiles - $erroredFiles, $erroredFiles, $suggestTagOption ? ' Use the --parse-tags option if you want parse custom tags.' : ''));
- }
-
- return min($erroredFiles, 1);
- }
-
- private function displayJson(SymfonyStyle $io, array $filesInfo): int
- {
- $errors = 0;
-
- array_walk($filesInfo, function (&$v) use (&$errors) {
- $v['file'] = (string) $v['file'];
- if (!$v['valid']) {
- ++$errors;
- }
-
- if (isset($v['message']) && false !== strpos($v['message'], 'PARSE_CUSTOM_TAGS')) {
- $v['message'] .= ' Use the --parse-tags option if you want parse custom tags.';
- }
- });
-
- $io->writeln(json_encode($filesInfo, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES));
-
- return min($errors, 1);
- }
-
- private function getFiles(string $fileOrDirectory): iterable
- {
- if (is_file($fileOrDirectory)) {
- yield new \SplFileInfo($fileOrDirectory);
-
- return;
- }
-
- foreach ($this->getDirectoryIterator($fileOrDirectory) as $file) {
- if (!\in_array($file->getExtension(), ['yml', 'yaml'])) {
- continue;
- }
-
- yield $file;
- }
- }
-
- private function getParser(): Parser
- {
- if (!$this->parser) {
- $this->parser = new Parser();
- }
-
- return $this->parser;
- }
-
- private function getDirectoryIterator(string $directory): iterable
- {
- $default = function ($directory) {
- return new \RecursiveIteratorIterator(
- new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS),
- \RecursiveIteratorIterator::LEAVES_ONLY
- );
- };
-
- if (null !== $this->directoryIteratorProvider) {
- return ($this->directoryIteratorProvider)($directory, $default);
- }
-
- return $default($directory);
- }
-
- private function isReadable(string $fileOrDirectory): bool
- {
- $default = function ($fileOrDirectory) {
- return is_readable($fileOrDirectory);
- };
-
- if (null !== $this->isReadableProvider) {
- return ($this->isReadableProvider)($fileOrDirectory, $default);
- }
-
- return $default($fileOrDirectory);
- }
-
- public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
- {
- if ($input->mustSuggestOptionValuesFor('format')) {
- $suggestions->suggestValues(['txt', 'json', 'github']);
- }
- }
-}
diff --git a/system/vendor/symfony/yaml/Dumper.php b/system/vendor/symfony/yaml/Dumper.php
deleted file mode 100644
index 99346aa..0000000
--- a/system/vendor/symfony/yaml/Dumper.php
+++ /dev/null
@@ -1,176 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-use Symfony\Component\Yaml\Tag\TaggedValue;
-
-/**
- * Dumper dumps PHP variables to YAML strings.
- *
- * @author Fabien Potencier
- *
- * @final
- */
-class Dumper
-{
- /**
- * The amount of spaces to use for indentation of nested nodes.
- *
- * @var int
- */
- protected $indentation;
-
- public function __construct(int $indentation = 4)
- {
- if ($indentation < 1) {
- throw new \InvalidArgumentException('The indentation must be greater than zero.');
- }
-
- $this->indentation = $indentation;
- }
-
- /**
- * Dumps a PHP value to YAML.
- *
- * @param mixed $input The PHP value
- * @param int $inline The level where you switch to inline YAML
- * @param int $indent The level of indentation (used internally)
- * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
- */
- public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0): string
- {
- $output = '';
- $prefix = $indent ? str_repeat(' ', $indent) : '';
- $dumpObjectAsInlineMap = true;
-
- if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($input instanceof \ArrayObject || $input instanceof \stdClass)) {
- $dumpObjectAsInlineMap = empty((array) $input);
- }
-
- if ($inline <= 0 || (!\is_array($input) && !$input instanceof TaggedValue && $dumpObjectAsInlineMap) || empty($input)) {
- $output .= $prefix.Inline::dump($input, $flags);
- } elseif ($input instanceof TaggedValue) {
- $output .= $this->dumpTaggedValue($input, $inline, $indent, $flags, $prefix);
- } else {
- $dumpAsMap = Inline::isHash($input);
-
- foreach ($input as $key => $value) {
- if ('' !== $output && "\n" !== $output[-1]) {
- $output .= "\n";
- }
-
- if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value) && false !== strpos($value, "\n") && false === strpos($value, "\r")) {
- $blockIndentationIndicator = $this->getBlockIndentationIndicator($value);
-
- if (isset($value[-2]) && "\n" === $value[-2] && "\n" === $value[-1]) {
- $blockChompingIndicator = '+';
- } elseif ("\n" === $value[-1]) {
- $blockChompingIndicator = '';
- } else {
- $blockChompingIndicator = '-';
- }
-
- $output .= sprintf('%s%s%s |%s%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', '', $blockIndentationIndicator, $blockChompingIndicator);
-
- foreach (explode("\n", $value) as $row) {
- if ('' === $row) {
- $output .= "\n";
- } else {
- $output .= sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row);
- }
- }
-
- continue;
- }
-
- if ($value instanceof TaggedValue) {
- $output .= sprintf('%s%s !%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', $value->getTag());
-
- if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) {
- $blockIndentationIndicator = $this->getBlockIndentationIndicator($value->getValue());
- $output .= sprintf(' |%s', $blockIndentationIndicator);
-
- foreach (explode("\n", $value->getValue()) as $row) {
- $output .= sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row);
- }
-
- continue;
- }
-
- if ($inline - 1 <= 0 || null === $value->getValue() || \is_scalar($value->getValue())) {
- $output .= ' '.$this->dump($value->getValue(), $inline - 1, 0, $flags)."\n";
- } else {
- $output .= "\n";
- $output .= $this->dump($value->getValue(), $inline - 1, $dumpAsMap ? $indent + $this->indentation : $indent + 2, $flags);
- }
-
- continue;
- }
-
- $dumpObjectAsInlineMap = true;
-
- if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \ArrayObject || $value instanceof \stdClass)) {
- $dumpObjectAsInlineMap = empty((array) $value);
- }
-
- $willBeInlined = $inline - 1 <= 0 || !\is_array($value) && $dumpObjectAsInlineMap || empty($value);
-
- $output .= sprintf('%s%s%s%s',
- $prefix,
- $dumpAsMap ? Inline::dump($key, $flags).':' : '-',
- $willBeInlined ? ' ' : "\n",
- $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $flags)
- ).($willBeInlined ? "\n" : '');
- }
- }
-
- return $output;
- }
-
- private function dumpTaggedValue(TaggedValue $value, int $inline, int $indent, int $flags, string $prefix): string
- {
- $output = sprintf('%s!%s', $prefix ? $prefix.' ' : '', $value->getTag());
-
- if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) {
- $blockIndentationIndicator = $this->getBlockIndentationIndicator($value->getValue());
- $output .= sprintf(' |%s', $blockIndentationIndicator);
-
- foreach (explode("\n", $value->getValue()) as $row) {
- $output .= sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row);
- }
-
- return $output;
- }
-
- if ($inline - 1 <= 0 || null === $value->getValue() || \is_scalar($value->getValue())) {
- return $output.' '.$this->dump($value->getValue(), $inline - 1, 0, $flags)."\n";
- }
-
- return $output."\n".$this->dump($value->getValue(), $inline - 1, $indent, $flags);
- }
-
- private function getBlockIndentationIndicator(string $value): string
- {
- $lines = explode("\n", $value);
-
- // If the first line (that is neither empty nor contains only spaces)
- // starts with a space character, the spec requires a block indentation indicator
- // http://www.yaml.org/spec/1.2/spec.html#id2793979
- foreach ($lines as $line) {
- if ('' !== trim($line, ' ')) {
- return (' ' === substr($line, 0, 1)) ? (string) $this->indentation : '';
- }
- }
-
- return '';
- }
-}
diff --git a/system/vendor/symfony/yaml/Escaper.php b/system/vendor/symfony/yaml/Escaper.php
deleted file mode 100644
index e8090d8..0000000
--- a/system/vendor/symfony/yaml/Escaper.php
+++ /dev/null
@@ -1,95 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-/**
- * Escaper encapsulates escaping rules for single and double-quoted
- * YAML strings.
- *
- * @author Matthew Lewinski
- *
- * @internal
- */
-class Escaper
-{
- // Characters that would cause a dumped string to require double quoting.
- public const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\x7f|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9";
-
- // Mapping arrays for escaping a double quoted string. The backslash is
- // first to ensure proper escaping because str_replace operates iteratively
- // on the input arrays. This ordering of the characters avoids the use of strtr,
- // which performs more slowly.
- private const ESCAPEES = ['\\', '\\\\', '\\"', '"',
- "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07",
- "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f",
- "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17",
- "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f",
- "\x7f",
- "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9",
- ];
- private const ESCAPED = ['\\\\', '\\"', '\\\\', '\\"',
- '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a',
- '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f',
- '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17',
- '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f',
- '\\x7f',
- '\\N', '\\_', '\\L', '\\P',
- ];
-
- /**
- * Determines if a PHP value would require double quoting in YAML.
- *
- * @param string $value A PHP value
- */
- public static function requiresDoubleQuoting(string $value): bool
- {
- return 0 < preg_match('/'.self::REGEX_CHARACTER_TO_ESCAPE.'/u', $value);
- }
-
- /**
- * Escapes and surrounds a PHP value with double quotes.
- *
- * @param string $value A PHP value
- */
- public static function escapeWithDoubleQuotes(string $value): string
- {
- return sprintf('"%s"', str_replace(self::ESCAPEES, self::ESCAPED, $value));
- }
-
- /**
- * Determines if a PHP value would require single quoting in YAML.
- *
- * @param string $value A PHP value
- */
- public static function requiresSingleQuoting(string $value): bool
- {
- // Determines if a PHP value is entirely composed of a value that would
- // require single quoting in YAML.
- if (\in_array(strtolower($value), ['null', '~', 'true', 'false', 'y', 'n', 'yes', 'no', 'on', 'off'])) {
- return true;
- }
-
- // Determines if the PHP value contains any single characters that would
- // cause it to require single quoting in YAML.
- return 0 < preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ \- ? | < > = ! % @ ` \p{Zs}]/xu', $value);
- }
-
- /**
- * Escapes and surrounds a PHP value with single quotes.
- *
- * @param string $value A PHP value
- */
- public static function escapeWithSingleQuotes(string $value): string
- {
- return sprintf("'%s'", str_replace('\'', '\'\'', $value));
- }
-}
diff --git a/system/vendor/symfony/yaml/Exception/DumpException.php b/system/vendor/symfony/yaml/Exception/DumpException.php
deleted file mode 100644
index cce972f..0000000
--- a/system/vendor/symfony/yaml/Exception/DumpException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Exception;
-
-/**
- * Exception class thrown when an error occurs during dumping.
- *
- * @author Fabien Potencier
- */
-class DumpException extends RuntimeException
-{
-}
diff --git a/system/vendor/symfony/yaml/Exception/ExceptionInterface.php b/system/vendor/symfony/yaml/Exception/ExceptionInterface.php
deleted file mode 100644
index 9091316..0000000
--- a/system/vendor/symfony/yaml/Exception/ExceptionInterface.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Exception;
-
-/**
- * Exception interface for all exceptions thrown by the component.
- *
- * @author Fabien Potencier
- */
-interface ExceptionInterface extends \Throwable
-{
-}
diff --git a/system/vendor/symfony/yaml/Exception/ParseException.php b/system/vendor/symfony/yaml/Exception/ParseException.php
deleted file mode 100644
index 8748d2b..0000000
--- a/system/vendor/symfony/yaml/Exception/ParseException.php
+++ /dev/null
@@ -1,132 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Exception;
-
-/**
- * Exception class thrown when an error occurs during parsing.
- *
- * @author Fabien Potencier
- */
-class ParseException extends RuntimeException
-{
- private $parsedFile;
- private $parsedLine;
- private $snippet;
- private $rawMessage;
-
- /**
- * @param string $message The error message
- * @param int $parsedLine The line where the error occurred
- * @param string|null $snippet The snippet of code near the problem
- * @param string|null $parsedFile The file name where the error occurred
- */
- public function __construct(string $message, int $parsedLine = -1, string $snippet = null, string $parsedFile = null, \Throwable $previous = null)
- {
- $this->parsedFile = $parsedFile;
- $this->parsedLine = $parsedLine;
- $this->snippet = $snippet;
- $this->rawMessage = $message;
-
- $this->updateRepr();
-
- parent::__construct($this->message, 0, $previous);
- }
-
- /**
- * Gets the snippet of code near the error.
- *
- * @return string
- */
- public function getSnippet()
- {
- return $this->snippet;
- }
-
- /**
- * Sets the snippet of code near the error.
- */
- public function setSnippet(string $snippet)
- {
- $this->snippet = $snippet;
-
- $this->updateRepr();
- }
-
- /**
- * Gets the filename where the error occurred.
- *
- * This method returns null if a string is parsed.
- *
- * @return string
- */
- public function getParsedFile()
- {
- return $this->parsedFile;
- }
-
- /**
- * Sets the filename where the error occurred.
- */
- public function setParsedFile(string $parsedFile)
- {
- $this->parsedFile = $parsedFile;
-
- $this->updateRepr();
- }
-
- /**
- * Gets the line where the error occurred.
- *
- * @return int
- */
- public function getParsedLine()
- {
- return $this->parsedLine;
- }
-
- /**
- * Sets the line where the error occurred.
- */
- public function setParsedLine(int $parsedLine)
- {
- $this->parsedLine = $parsedLine;
-
- $this->updateRepr();
- }
-
- private function updateRepr()
- {
- $this->message = $this->rawMessage;
-
- $dot = false;
- if ('.' === substr($this->message, -1)) {
- $this->message = substr($this->message, 0, -1);
- $dot = true;
- }
-
- if (null !== $this->parsedFile) {
- $this->message .= sprintf(' in %s', json_encode($this->parsedFile, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE));
- }
-
- if ($this->parsedLine >= 0) {
- $this->message .= sprintf(' at line %d', $this->parsedLine);
- }
-
- if ($this->snippet) {
- $this->message .= sprintf(' (near "%s")', $this->snippet);
- }
-
- if ($dot) {
- $this->message .= '.';
- }
- }
-}
diff --git a/system/vendor/symfony/yaml/Exception/RuntimeException.php b/system/vendor/symfony/yaml/Exception/RuntimeException.php
deleted file mode 100644
index 3f36b73..0000000
--- a/system/vendor/symfony/yaml/Exception/RuntimeException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Exception;
-
-/**
- * Exception class thrown when an error occurs during parsing.
- *
- * @author Romain Neutron
- */
-class RuntimeException extends \RuntimeException implements ExceptionInterface
-{
-}
diff --git a/system/vendor/symfony/yaml/Inline.php b/system/vendor/symfony/yaml/Inline.php
deleted file mode 100644
index 712add9..0000000
--- a/system/vendor/symfony/yaml/Inline.php
+++ /dev/null
@@ -1,815 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-use Symfony\Component\Yaml\Exception\DumpException;
-use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Tag\TaggedValue;
-
-/**
- * Inline implements a YAML parser/dumper for the YAML inline syntax.
- *
- * @author Fabien Potencier
- *
- * @internal
- */
-class Inline
-{
- public const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')';
-
- public static $parsedLineNumber = -1;
- public static $parsedFilename;
-
- private static $exceptionOnInvalidType = false;
- private static $objectSupport = false;
- private static $objectForMap = false;
- private static $constantSupport = false;
-
- public static function initialize(int $flags, int $parsedLineNumber = null, string $parsedFilename = null)
- {
- self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags);
- self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags);
- self::$objectForMap = (bool) (Yaml::PARSE_OBJECT_FOR_MAP & $flags);
- self::$constantSupport = (bool) (Yaml::PARSE_CONSTANT & $flags);
- self::$parsedFilename = $parsedFilename;
-
- if (null !== $parsedLineNumber) {
- self::$parsedLineNumber = $parsedLineNumber;
- }
- }
-
- /**
- * Converts a YAML string to a PHP value.
- *
- * @param string|null $value A YAML string
- * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior
- * @param array $references Mapping of variable names to values
- *
- * @return mixed
- *
- * @throws ParseException
- */
- public static function parse(string $value = null, int $flags = 0, array &$references = [])
- {
- if (null === $value) {
- return '';
- }
-
- self::initialize($flags);
-
- $value = trim($value);
-
- if ('' === $value) {
- return '';
- }
-
- if (2 /* MB_OVERLOAD_STRING */ & (int) \ini_get('mbstring.func_overload')) {
- $mbEncoding = mb_internal_encoding();
- mb_internal_encoding('ASCII');
- }
-
- try {
- $i = 0;
- $tag = self::parseTag($value, $i, $flags);
- switch ($value[$i]) {
- case '[':
- $result = self::parseSequence($value, $flags, $i, $references);
- ++$i;
- break;
- case '{':
- $result = self::parseMapping($value, $flags, $i, $references);
- ++$i;
- break;
- default:
- $result = self::parseScalar($value, $flags, null, $i, true, $references);
- }
-
- // some comments are allowed at the end
- if (preg_replace('/\s*#.*$/A', '', substr($value, $i))) {
- throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- if (null !== $tag && '' !== $tag) {
- return new TaggedValue($tag, $result);
- }
-
- return $result;
- } finally {
- if (isset($mbEncoding)) {
- mb_internal_encoding($mbEncoding);
- }
- }
- }
-
- /**
- * Dumps a given PHP variable to a YAML string.
- *
- * @param mixed $value The PHP variable to convert
- * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
- *
- * @throws DumpException When trying to dump PHP resource
- */
- public static function dump($value, int $flags = 0): string
- {
- switch (true) {
- case \is_resource($value):
- if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) {
- throw new DumpException(sprintf('Unable to dump PHP resources in a YAML file ("%s").', get_resource_type($value)));
- }
-
- return self::dumpNull($flags);
- case $value instanceof \DateTimeInterface:
- return $value->format('c');
- case $value instanceof \UnitEnum:
- return sprintf('!php/const %s::%s', \get_class($value), $value->name);
- case \is_object($value):
- if ($value instanceof TaggedValue) {
- return '!'.$value->getTag().' '.self::dump($value->getValue(), $flags);
- }
-
- if (Yaml::DUMP_OBJECT & $flags) {
- return '!php/object '.self::dump(serialize($value));
- }
-
- if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \stdClass || $value instanceof \ArrayObject)) {
- $output = [];
-
- foreach ($value as $key => $val) {
- $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags));
- }
-
- return sprintf('{ %s }', implode(', ', $output));
- }
-
- if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) {
- throw new DumpException('Object support when dumping a YAML file has been disabled.');
- }
-
- return self::dumpNull($flags);
- case \is_array($value):
- return self::dumpArray($value, $flags);
- case null === $value:
- return self::dumpNull($flags);
- case true === $value:
- return 'true';
- case false === $value:
- return 'false';
- case \is_int($value):
- return $value;
- case is_numeric($value) && false === strpbrk($value, "\f\n\r\t\v"):
- $locale = setlocale(\LC_NUMERIC, 0);
- if (false !== $locale) {
- setlocale(\LC_NUMERIC, 'C');
- }
- if (\is_float($value)) {
- $repr = (string) $value;
- if (is_infinite($value)) {
- $repr = str_ireplace('INF', '.Inf', $repr);
- } elseif (floor($value) == $value && $repr == $value) {
- // Preserve float data type since storing a whole number will result in integer value.
- if (false === strpos($repr, 'E')) {
- $repr = $repr.'.0';
- }
- }
- } else {
- $repr = \is_string($value) ? "'$value'" : (string) $value;
- }
- if (false !== $locale) {
- setlocale(\LC_NUMERIC, $locale);
- }
-
- return $repr;
- case '' == $value:
- return "''";
- case self::isBinaryString($value):
- return '!!binary '.base64_encode($value);
- case Escaper::requiresDoubleQuoting($value):
- return Escaper::escapeWithDoubleQuotes($value);
- case Escaper::requiresSingleQuoting($value):
- case Parser::preg_match('{^[0-9]+[_0-9]*$}', $value):
- case Parser::preg_match(self::getHexRegex(), $value):
- case Parser::preg_match(self::getTimestampRegex(), $value):
- return Escaper::escapeWithSingleQuotes($value);
- default:
- return $value;
- }
- }
-
- /**
- * Check if given array is hash or just normal indexed array.
- *
- * @param array|\ArrayObject|\stdClass $value The PHP array or array-like object to check
- */
- public static function isHash($value): bool
- {
- if ($value instanceof \stdClass || $value instanceof \ArrayObject) {
- return true;
- }
-
- $expectedKey = 0;
-
- foreach ($value as $key => $val) {
- if ($key !== $expectedKey++) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Dumps a PHP array to a YAML string.
- *
- * @param array $value The PHP array to dump
- * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
- */
- private static function dumpArray(array $value, int $flags): string
- {
- // array
- if (($value || Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE & $flags) && !self::isHash($value)) {
- $output = [];
- foreach ($value as $val) {
- $output[] = self::dump($val, $flags);
- }
-
- return sprintf('[%s]', implode(', ', $output));
- }
-
- // hash
- $output = [];
- foreach ($value as $key => $val) {
- $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags));
- }
-
- return sprintf('{ %s }', implode(', ', $output));
- }
-
- private static function dumpNull(int $flags): string
- {
- if (Yaml::DUMP_NULL_AS_TILDE & $flags) {
- return '~';
- }
-
- return 'null';
- }
-
- /**
- * Parses a YAML scalar.
- *
- * @return mixed
- *
- * @throws ParseException When malformed inline YAML string is parsed
- */
- public static function parseScalar(string $scalar, int $flags = 0, array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], bool &$isQuoted = null)
- {
- if (\in_array($scalar[$i], ['"', "'"], true)) {
- // quoted scalar
- $isQuoted = true;
- $output = self::parseQuotedScalar($scalar, $i);
-
- if (null !== $delimiters) {
- $tmp = ltrim(substr($scalar, $i), " \n");
- if ('' === $tmp) {
- throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode('', $delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
- if (!\in_array($tmp[0], $delimiters)) {
- throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
- }
- } else {
- // "normal" string
- $isQuoted = false;
-
- if (!$delimiters) {
- $output = substr($scalar, $i);
- $i += \strlen($output);
-
- // remove comments
- if (Parser::preg_match('/[ \t]+#/', $output, $match, \PREG_OFFSET_CAPTURE)) {
- $output = substr($output, 0, $match[0][1]);
- }
- } elseif (Parser::preg_match('/^(.*?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) {
- $output = $match[1];
- $i += \strlen($output);
- $output = trim($output);
- } else {
- throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $scalar), self::$parsedLineNumber + 1, null, self::$parsedFilename);
- }
-
- // a non-quoted string cannot start with @ or ` (reserved) nor with a scalar indicator (| or >)
- if ($output && ('@' === $output[0] || '`' === $output[0] || '|' === $output[0] || '>' === $output[0] || '%' === $output[0])) {
- throw new ParseException(sprintf('The reserved indicator "%s" cannot start a plain scalar; you need to quote the scalar.', $output[0]), self::$parsedLineNumber + 1, $output, self::$parsedFilename);
- }
-
- if ($evaluate) {
- $output = self::evaluateScalar($output, $flags, $references, $isQuoted);
- }
- }
-
- return $output;
- }
-
- /**
- * Parses a YAML quoted scalar.
- *
- * @throws ParseException When malformed inline YAML string is parsed
- */
- private static function parseQuotedScalar(string $scalar, int &$i = 0): string
- {
- if (!Parser::preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) {
- throw new ParseException(sprintf('Malformed inline YAML string: "%s".', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- $output = substr($match[0], 1, -1);
-
- $unescaper = new Unescaper();
- if ('"' == $scalar[$i]) {
- $output = $unescaper->unescapeDoubleQuotedString($output);
- } else {
- $output = $unescaper->unescapeSingleQuotedString($output);
- }
-
- $i += \strlen($match[0]);
-
- return $output;
- }
-
- /**
- * Parses a YAML sequence.
- *
- * @throws ParseException When malformed inline YAML string is parsed
- */
- private static function parseSequence(string $sequence, int $flags, int &$i = 0, array &$references = []): array
- {
- $output = [];
- $len = \strlen($sequence);
- ++$i;
-
- // [foo, bar, ...]
- while ($i < $len) {
- if (']' === $sequence[$i]) {
- return $output;
- }
- if (',' === $sequence[$i] || ' ' === $sequence[$i]) {
- ++$i;
-
- continue;
- }
-
- $tag = self::parseTag($sequence, $i, $flags);
- switch ($sequence[$i]) {
- case '[':
- // nested sequence
- $value = self::parseSequence($sequence, $flags, $i, $references);
- break;
- case '{':
- // nested mapping
- $value = self::parseMapping($sequence, $flags, $i, $references);
- break;
- default:
- $value = self::parseScalar($sequence, $flags, [',', ']'], $i, null === $tag, $references, $isQuoted);
-
- // the value can be an array if a reference has been resolved to an array var
- if (\is_string($value) && !$isQuoted && false !== strpos($value, ': ')) {
- // embedded mapping?
- try {
- $pos = 0;
- $value = self::parseMapping('{'.$value.'}', $flags, $pos, $references);
- } catch (\InvalidArgumentException $e) {
- // no, it's not
- }
- }
-
- if (!$isQuoted && \is_string($value) && '' !== $value && '&' === $value[0] && Parser::preg_match(Parser::REFERENCE_PATTERN, $value, $matches)) {
- $references[$matches['ref']] = $matches['value'];
- $value = $matches['value'];
- }
-
- --$i;
- }
-
- if (null !== $tag && '' !== $tag) {
- $value = new TaggedValue($tag, $value);
- }
-
- $output[] = $value;
-
- ++$i;
- }
-
- throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $sequence), self::$parsedLineNumber + 1, null, self::$parsedFilename);
- }
-
- /**
- * Parses a YAML mapping.
- *
- * @return array|\stdClass
- *
- * @throws ParseException When malformed inline YAML string is parsed
- */
- private static function parseMapping(string $mapping, int $flags, int &$i = 0, array &$references = [])
- {
- $output = [];
- $len = \strlen($mapping);
- ++$i;
- $allowOverwrite = false;
-
- // {foo: bar, bar:foo, ...}
- while ($i < $len) {
- switch ($mapping[$i]) {
- case ' ':
- case ',':
- case "\n":
- ++$i;
- continue 2;
- case '}':
- if (self::$objectForMap) {
- return (object) $output;
- }
-
- return $output;
- }
-
- // key
- $offsetBeforeKeyParsing = $i;
- $isKeyQuoted = \in_array($mapping[$i], ['"', "'"], true);
- $key = self::parseScalar($mapping, $flags, [':', ' '], $i, false);
-
- if ($offsetBeforeKeyParsing === $i) {
- throw new ParseException('Missing mapping key.', self::$parsedLineNumber + 1, $mapping);
- }
-
- if ('!php/const' === $key) {
- $key .= ' '.self::parseScalar($mapping, $flags, [':'], $i, false);
- $key = self::evaluateScalar($key, $flags);
- }
-
- if (false === $i = strpos($mapping, ':', $i)) {
- break;
- }
-
- if (!$isKeyQuoted) {
- $evaluatedKey = self::evaluateScalar($key, $flags, $references);
-
- if ('' !== $key && $evaluatedKey !== $key && !\is_string($evaluatedKey) && !\is_int($evaluatedKey)) {
- throw new ParseException('Implicit casting of incompatible mapping keys to strings is not supported. Quote your evaluable mapping keys instead.', self::$parsedLineNumber + 1, $mapping);
- }
- }
-
- if (!$isKeyQuoted && (!isset($mapping[$i + 1]) || !\in_array($mapping[$i + 1], [' ', ',', '[', ']', '{', '}', "\n"], true))) {
- throw new ParseException('Colons must be followed by a space or an indication character (i.e. " ", ",", "[", "]", "{", "}").', self::$parsedLineNumber + 1, $mapping);
- }
-
- if ('<<' === $key) {
- $allowOverwrite = true;
- }
-
- while ($i < $len) {
- if (':' === $mapping[$i] || ' ' === $mapping[$i] || "\n" === $mapping[$i]) {
- ++$i;
-
- continue;
- }
-
- $tag = self::parseTag($mapping, $i, $flags);
- switch ($mapping[$i]) {
- case '[':
- // nested sequence
- $value = self::parseSequence($mapping, $flags, $i, $references);
- // Spec: Keys MUST be unique; first one wins.
- // Parser cannot abort this mapping earlier, since lines
- // are processed sequentially.
- // But overwriting is allowed when a merge node is used in current block.
- if ('<<' === $key) {
- foreach ($value as $parsedValue) {
- $output += $parsedValue;
- }
- } elseif ($allowOverwrite || !isset($output[$key])) {
- if (null !== $tag) {
- $output[$key] = new TaggedValue($tag, $value);
- } else {
- $output[$key] = $value;
- }
- } elseif (isset($output[$key])) {
- throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping);
- }
- break;
- case '{':
- // nested mapping
- $value = self::parseMapping($mapping, $flags, $i, $references);
- // Spec: Keys MUST be unique; first one wins.
- // Parser cannot abort this mapping earlier, since lines
- // are processed sequentially.
- // But overwriting is allowed when a merge node is used in current block.
- if ('<<' === $key) {
- $output += $value;
- } elseif ($allowOverwrite || !isset($output[$key])) {
- if (null !== $tag) {
- $output[$key] = new TaggedValue($tag, $value);
- } else {
- $output[$key] = $value;
- }
- } elseif (isset($output[$key])) {
- throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping);
- }
- break;
- default:
- $value = self::parseScalar($mapping, $flags, [',', '}', "\n"], $i, null === $tag, $references, $isValueQuoted);
- // Spec: Keys MUST be unique; first one wins.
- // Parser cannot abort this mapping earlier, since lines
- // are processed sequentially.
- // But overwriting is allowed when a merge node is used in current block.
- if ('<<' === $key) {
- $output += $value;
- } elseif ($allowOverwrite || !isset($output[$key])) {
- if (!$isValueQuoted && \is_string($value) && '' !== $value && '&' === $value[0] && !self::isBinaryString($value) && Parser::preg_match(Parser::REFERENCE_PATTERN, $value, $matches)) {
- $references[$matches['ref']] = $matches['value'];
- $value = $matches['value'];
- }
-
- if (null !== $tag) {
- $output[$key] = new TaggedValue($tag, $value);
- } else {
- $output[$key] = $value;
- }
- } elseif (isset($output[$key])) {
- throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping);
- }
- --$i;
- }
- ++$i;
-
- continue 2;
- }
- }
-
- throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $mapping), self::$parsedLineNumber + 1, null, self::$parsedFilename);
- }
-
- /**
- * Evaluates scalars and replaces magic values.
- *
- * @return mixed
- *
- * @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved
- */
- private static function evaluateScalar(string $scalar, int $flags, array &$references = [], bool &$isQuotedString = null)
- {
- $isQuotedString = false;
- $scalar = trim($scalar);
-
- if (0 === strpos($scalar, '*')) {
- if (false !== $pos = strpos($scalar, '#')) {
- $value = substr($scalar, 1, $pos - 2);
- } else {
- $value = substr($scalar, 1);
- }
-
- // an unquoted *
- if (false === $value || '' === $value) {
- throw new ParseException('A reference must contain at least one character.', self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- if (!\array_key_exists($value, $references)) {
- throw new ParseException(sprintf('Reference "%s" does not exist.', $value), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- return $references[$value];
- }
-
- $scalarLower = strtolower($scalar);
-
- switch (true) {
- case 'null' === $scalarLower:
- case '' === $scalar:
- case '~' === $scalar:
- return null;
- case 'true' === $scalarLower:
- return true;
- case 'false' === $scalarLower:
- return false;
- case '!' === $scalar[0]:
- switch (true) {
- case 0 === strpos($scalar, '!!str '):
- $s = (string) substr($scalar, 6);
-
- if (\in_array($s[0] ?? '', ['"', "'"], true)) {
- $isQuotedString = true;
- $s = self::parseQuotedScalar($s);
- }
-
- return $s;
- case 0 === strpos($scalar, '! '):
- return substr($scalar, 2);
- case 0 === strpos($scalar, '!php/object'):
- if (self::$objectSupport) {
- if (!isset($scalar[12])) {
- trigger_deprecation('symfony/yaml', '5.1', 'Using the !php/object tag without a value is deprecated.');
-
- return false;
- }
-
- return unserialize(self::parseScalar(substr($scalar, 12)));
- }
-
- if (self::$exceptionOnInvalidType) {
- throw new ParseException('Object support when parsing a YAML file has been disabled.', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- return null;
- case 0 === strpos($scalar, '!php/const'):
- if (self::$constantSupport) {
- if (!isset($scalar[11])) {
- trigger_deprecation('symfony/yaml', '5.1', 'Using the !php/const tag without a value is deprecated.');
-
- return '';
- }
-
- $i = 0;
- if (\defined($const = self::parseScalar(substr($scalar, 11), 0, null, $i, false))) {
- return \constant($const);
- }
-
- throw new ParseException(sprintf('The constant "%s" is not defined.', $const), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
- if (self::$exceptionOnInvalidType) {
- throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Did you forget to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- return null;
- case 0 === strpos($scalar, '!!float '):
- return (float) substr($scalar, 8);
- case 0 === strpos($scalar, '!!binary '):
- return self::evaluateBinaryScalar(substr($scalar, 9));
- }
-
- throw new ParseException(sprintf('The string "%s" could not be parsed as it uses an unsupported built-in tag.', $scalar), self::$parsedLineNumber, $scalar, self::$parsedFilename);
- case preg_match('/^(?:\+|-)?0o(?P[0-7_]++)$/', $scalar, $matches):
- $value = str_replace('_', '', $matches['value']);
-
- if ('-' === $scalar[0]) {
- return -octdec($value);
- }
-
- return octdec($value);
- case \in_array($scalar[0], ['+', '-', '.'], true) || is_numeric($scalar[0]):
- if (Parser::preg_match('{^[+-]?[0-9][0-9_]*$}', $scalar)) {
- $scalar = str_replace('_', '', $scalar);
- }
-
- switch (true) {
- case ctype_digit($scalar):
- if (preg_match('/^0[0-7]+$/', $scalar)) {
- trigger_deprecation('symfony/yaml', '5.1', 'Support for parsing numbers prefixed with 0 as octal numbers. They will be parsed as strings as of 6.0. Use "%s" to represent the octal number.', '0o'.substr($scalar, 1));
-
- return octdec($scalar);
- }
-
- $cast = (int) $scalar;
-
- return ($scalar === (string) $cast) ? $cast : $scalar;
- case '-' === $scalar[0] && ctype_digit(substr($scalar, 1)):
- if (preg_match('/^-0[0-7]+$/', $scalar)) {
- trigger_deprecation('symfony/yaml', '5.1', 'Support for parsing numbers prefixed with 0 as octal numbers. They will be parsed as strings as of 6.0. Use "%s" to represent the octal number.', '-0o'.substr($scalar, 2));
-
- return -octdec(substr($scalar, 1));
- }
-
- $cast = (int) $scalar;
-
- return ($scalar === (string) $cast) ? $cast : $scalar;
- case is_numeric($scalar):
- case Parser::preg_match(self::getHexRegex(), $scalar):
- $scalar = str_replace('_', '', $scalar);
-
- return '0x' === $scalar[0].$scalar[1] ? hexdec($scalar) : (float) $scalar;
- case '.inf' === $scalarLower:
- case '.nan' === $scalarLower:
- return -log(0);
- case '-.inf' === $scalarLower:
- return log(0);
- case Parser::preg_match('/^(-|\+)?[0-9][0-9_]*(\.[0-9_]+)?$/', $scalar):
- return (float) str_replace('_', '', $scalar);
- case Parser::preg_match(self::getTimestampRegex(), $scalar):
- // When no timezone is provided in the parsed date, YAML spec says we must assume UTC.
- $time = new \DateTime($scalar, new \DateTimeZone('UTC'));
-
- if (Yaml::PARSE_DATETIME & $flags) {
- return $time;
- }
-
- try {
- if (false !== $scalar = $time->getTimestamp()) {
- return $scalar;
- }
- } catch (\ValueError $e) {
- // no-op
- }
-
- return $time->format('U');
- }
- }
-
- return (string) $scalar;
- }
-
- private static function parseTag(string $value, int &$i, int $flags): ?string
- {
- if ('!' !== $value[$i]) {
- return null;
- }
-
- $tagLength = strcspn($value, " \t\n[]{},", $i + 1);
- $tag = substr($value, $i + 1, $tagLength);
-
- $nextOffset = $i + $tagLength + 1;
- $nextOffset += strspn($value, ' ', $nextOffset);
-
- if ('' === $tag && (!isset($value[$nextOffset]) || \in_array($value[$nextOffset], [']', '}', ','], true))) {
- throw new ParseException('Using the unquoted scalar value "!" is not supported. You must quote it.', self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- // Is followed by a scalar and is a built-in tag
- if ('' !== $tag && (!isset($value[$nextOffset]) || !\in_array($value[$nextOffset], ['[', '{'], true)) && ('!' === $tag[0] || 'str' === $tag || 'php/const' === $tag || 'php/object' === $tag)) {
- // Manage in {@link self::evaluateScalar()}
- return null;
- }
-
- $i = $nextOffset;
-
- // Built-in tags
- if ('' !== $tag && '!' === $tag[0]) {
- throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- if ('' !== $tag && !isset($value[$i])) {
- throw new ParseException(sprintf('Missing value for tag "%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- if ('' === $tag || Yaml::PARSE_CUSTOM_TAGS & $flags) {
- return $tag;
- }
-
- throw new ParseException(sprintf('Tags support is not enabled. Enable the "Yaml::PARSE_CUSTOM_TAGS" flag to use "!%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- public static function evaluateBinaryScalar(string $scalar): string
- {
- $parsedBinaryData = self::parseScalar(preg_replace('/\s/', '', $scalar));
-
- if (0 !== (\strlen($parsedBinaryData) % 4)) {
- throw new ParseException(sprintf('The normalized base64 encoded data (data without whitespace characters) length must be a multiple of four (%d bytes given).', \strlen($parsedBinaryData)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- if (!Parser::preg_match('#^[A-Z0-9+/]+={0,2}$#i', $parsedBinaryData)) {
- throw new ParseException(sprintf('The base64 encoded data (%s) contains invalid characters.', $parsedBinaryData), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- return base64_decode($parsedBinaryData, true);
- }
-
- private static function isBinaryString(string $value): bool
- {
- return !preg_match('//u', $value) || preg_match('/[^\x00\x07-\x0d\x1B\x20-\xff]/', $value);
- }
-
- /**
- * Gets a regex that matches a YAML date.
- *
- * @see http://www.yaml.org/spec/1.2/spec.html#id2761573
- */
- private static function getTimestampRegex(): string
- {
- return <<[0-9][0-9][0-9][0-9])
- -(?P[0-9][0-9]?)
- -(?P[0-9][0-9]?)
- (?:(?:[Tt]|[ \t]+)
- (?P[0-9][0-9]?)
- :(?P[0-9][0-9])
- :(?P[0-9][0-9])
- (?:\.(?P[0-9]*))?
- (?:[ \t]*(?PZ|(?P[-+])(?P[0-9][0-9]?)
- (?::(?P[0-9][0-9]))?))?)?
- $~x
-EOF;
- }
-
- /**
- * Gets a regex that matches a YAML number in hexadecimal notation.
- */
- private static function getHexRegex(): string
- {
- return '~^0x[0-9a-f_]++$~i';
- }
-}
diff --git a/system/vendor/symfony/yaml/LICENSE b/system/vendor/symfony/yaml/LICENSE
deleted file mode 100644
index 0138f8f..0000000
--- a/system/vendor/symfony/yaml/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2004-present Fabien Potencier
-
-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/system/vendor/symfony/yaml/Parser.php b/system/vendor/symfony/yaml/Parser.php
deleted file mode 100644
index e4bacd7..0000000
--- a/system/vendor/symfony/yaml/Parser.php
+++ /dev/null
@@ -1,1308 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Tag\TaggedValue;
-
-/**
- * Parser parses YAML strings to convert them to PHP arrays.
- *
- * @author Fabien Potencier
- *
- * @final
- */
-class Parser
-{
- public const TAG_PATTERN = '(?P![\w!.\/:-]+)';
- public const BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?';
- public const REFERENCE_PATTERN = '#^&(?P[[^ ]++) *+(?P.*)#u';
-
- private $filename;
- private $offset = 0;
- private $numberOfParsedLines = 0;
- private $totalNumberOfLines;
- private $lines = [];
- private $currentLineNb = -1;
- private $currentLine = '';
- private $refs = [];
- private $skippedLineNumbers = [];
- private $locallySkippedLineNumbers = [];
- private $refsBeingParsed = [];
-
- /**
- * Parses a YAML file into a PHP value.
- *
- * @param string $filename The path to the YAML file to be parsed
- * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior
- *
- * @return mixed
- *
- * @throws ParseException If the file could not be read or the YAML is not valid
- */
- public function parseFile(string $filename, int $flags = 0)
- {
- if (!is_file($filename)) {
- throw new ParseException(sprintf('File "%s" does not exist.', $filename));
- }
-
- if (!is_readable($filename)) {
- throw new ParseException(sprintf('File "%s" cannot be read.', $filename));
- }
-
- $this->filename = $filename;
-
- try {
- return $this->parse(file_get_contents($filename), $flags);
- } finally {
- $this->filename = null;
- }
- }
-
- /**
- * Parses a YAML string to a PHP value.
- *
- * @param string $value A YAML string
- * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior
- *
- * @return mixed
- *
- * @throws ParseException If the YAML is not valid
- */
- public function parse(string $value, int $flags = 0)
- {
- if (false === preg_match('//u', $value)) {
- throw new ParseException('The YAML value does not appear to be valid UTF-8.', -1, null, $this->filename);
- }
-
- $this->refs = [];
-
- $mbEncoding = null;
-
- if (2 /* MB_OVERLOAD_STRING */ & (int) \ini_get('mbstring.func_overload')) {
- $mbEncoding = mb_internal_encoding();
- mb_internal_encoding('UTF-8');
- }
-
- try {
- $data = $this->doParse($value, $flags);
- } finally {
- if (null !== $mbEncoding) {
- mb_internal_encoding($mbEncoding);
- }
- $this->refsBeingParsed = [];
- $this->offset = 0;
- $this->lines = [];
- $this->currentLine = '';
- $this->numberOfParsedLines = 0;
- $this->refs = [];
- $this->skippedLineNumbers = [];
- $this->locallySkippedLineNumbers = [];
- $this->totalNumberOfLines = null;
- }
-
- return $data;
- }
-
- private function doParse(string $value, int $flags)
- {
- $this->currentLineNb = -1;
- $this->currentLine = '';
- $value = $this->cleanup($value);
- $this->lines = explode("\n", $value);
- $this->numberOfParsedLines = \count($this->lines);
- $this->locallySkippedLineNumbers = [];
-
- if (null === $this->totalNumberOfLines) {
- $this->totalNumberOfLines = $this->numberOfParsedLines;
- }
-
- if (!$this->moveToNextLine()) {
- return null;
- }
-
- $data = [];
- $context = null;
- $allowOverwrite = false;
-
- while ($this->isCurrentLineEmpty()) {
- if (!$this->moveToNextLine()) {
- return null;
- }
- }
-
- // Resolves the tag and returns if end of the document
- if (null !== ($tag = $this->getLineTag($this->currentLine, $flags, false)) && !$this->moveToNextLine()) {
- return new TaggedValue($tag, '');
- }
-
- do {
- if ($this->isCurrentLineEmpty()) {
- continue;
- }
-
- // tab?
- if ("\t" === $this->currentLine[0]) {
- throw new ParseException('A YAML file cannot contain tabs as indentation.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- Inline::initialize($flags, $this->getRealCurrentLineNb(), $this->filename);
-
- $isRef = $mergeNode = false;
- if ('-' === $this->currentLine[0] && self::preg_match('#^\-((?P\s+)(?P.+))?$#u', rtrim($this->currentLine), $values)) {
- if ($context && 'mapping' == $context) {
- throw new ParseException('You cannot define a sequence item when in a mapping.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
- $context = 'sequence';
-
- if (isset($values['value']) && '&' === $values['value'][0] && self::preg_match(self::REFERENCE_PATTERN, $values['value'], $matches)) {
- $isRef = $matches['ref'];
- $this->refsBeingParsed[] = $isRef;
- $values['value'] = $matches['value'];
- }
-
- if (isset($values['value'][1]) && '?' === $values['value'][0] && ' ' === $values['value'][1]) {
- throw new ParseException('Complex mappings are not supported.', $this->getRealCurrentLineNb() + 1, $this->currentLine);
- }
-
- // array
- if (isset($values['value']) && 0 === strpos(ltrim($values['value'], ' '), '-')) {
- // Inline first child
- $currentLineNumber = $this->getRealCurrentLineNb();
-
- $sequenceIndentation = \strlen($values['leadspaces']) + 1;
- $sequenceYaml = substr($this->currentLine, $sequenceIndentation);
- $sequenceYaml .= "\n".$this->getNextEmbedBlock($sequenceIndentation, true);
-
- $data[] = $this->parseBlock($currentLineNumber, rtrim($sequenceYaml), $flags);
- } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) {
- $data[] = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true) ?? '', $flags);
- } elseif (null !== $subTag = $this->getLineTag(ltrim($values['value'], ' '), $flags)) {
- $data[] = new TaggedValue(
- $subTag,
- $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true), $flags)
- );
- } else {
- if (
- isset($values['leadspaces'])
- && (
- '!' === $values['value'][0]
- || self::preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{\[].*?) *\:(\s+(?P.+?))?\s*$#u', $this->trimTag($values['value']), $matches)
- )
- ) {
- $block = $values['value'];
- if ($this->isNextLineIndented() || isset($matches['value']) && '>-' === $matches['value']) {
- $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + \strlen($values['leadspaces']) + 1);
- }
-
- $data[] = $this->parseBlock($this->getRealCurrentLineNb(), $block, $flags);
- } else {
- $data[] = $this->parseValue($values['value'], $flags, $context);
- }
- }
- if ($isRef) {
- $this->refs[$isRef] = end($data);
- array_pop($this->refsBeingParsed);
- }
- } elseif (
- self::preg_match('#^(?P(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \'"\[\{!].*?)) *\:(( |\t)++(?P.+))?$#u', rtrim($this->currentLine), $values)
- && (false === strpos($values['key'], ' #') || \in_array($values['key'][0], ['"', "'"]))
- ) {
- if ($context && 'sequence' == $context) {
- throw new ParseException('You cannot define a mapping item when in a sequence.', $this->currentLineNb + 1, $this->currentLine, $this->filename);
- }
- $context = 'mapping';
-
- try {
- $key = Inline::parseScalar($values['key']);
- } catch (ParseException $e) {
- $e->setParsedLine($this->getRealCurrentLineNb() + 1);
- $e->setSnippet($this->currentLine);
-
- throw $e;
- }
-
- if (!\is_string($key) && !\is_int($key)) {
- throw new ParseException((is_numeric($key) ? 'Numeric' : 'Non-string').' keys are not supported. Quote your evaluable mapping keys instead.', $this->getRealCurrentLineNb() + 1, $this->currentLine);
- }
-
- // Convert float keys to strings, to avoid being converted to integers by PHP
- if (\is_float($key)) {
- $key = (string) $key;
- }
-
- if ('<<' === $key && (!isset($values['value']) || '&' !== $values['value'][0] || !self::preg_match('#^&(?P][[^ ]+)#u', $values['value'], $refMatches))) {
- $mergeNode = true;
- $allowOverwrite = true;
- if (isset($values['value'][0]) && '*' === $values['value'][0]) {
- $refName = substr(rtrim($values['value']), 1);
- if (!\array_key_exists($refName, $this->refs)) {
- if (false !== $pos = array_search($refName, $this->refsBeingParsed, true)) {
- throw new ParseException(sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$refName])), $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename);
- }
-
- throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- $refValue = $this->refs[$refName];
-
- if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $refValue instanceof \stdClass) {
- $refValue = (array) $refValue;
- }
-
- if (!\is_array($refValue)) {
- throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- $data += $refValue; // array union
- } else {
- if (isset($values['value']) && '' !== $values['value']) {
- $value = $values['value'];
- } else {
- $value = $this->getNextEmbedBlock();
- }
- $parsed = $this->parseBlock($this->getRealCurrentLineNb() + 1, $value, $flags);
-
- if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsed instanceof \stdClass) {
- $parsed = (array) $parsed;
- }
-
- if (!\is_array($parsed)) {
- throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- if (isset($parsed[0])) {
- // If the value associated with the merge key is a sequence, then this sequence is expected to contain mapping nodes
- // and each of these nodes is merged in turn according to its order in the sequence. Keys in mapping nodes earlier
- // in the sequence override keys specified in later mapping nodes.
- foreach ($parsed as $parsedItem) {
- if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsedItem instanceof \stdClass) {
- $parsedItem = (array) $parsedItem;
- }
-
- if (!\is_array($parsedItem)) {
- throw new ParseException('Merge items must be arrays.', $this->getRealCurrentLineNb() + 1, $parsedItem, $this->filename);
- }
-
- $data += $parsedItem; // array union
- }
- } else {
- // If the value associated with the key is a single mapping node, each of its key/value pairs is inserted into the
- // current mapping, unless the key already exists in it.
- $data += $parsed; // array union
- }
- }
- } elseif ('<<' !== $key && isset($values['value']) && '&' === $values['value'][0] && self::preg_match(self::REFERENCE_PATTERN, $values['value'], $matches)) {
- $isRef = $matches['ref'];
- $this->refsBeingParsed[] = $isRef;
- $values['value'] = $matches['value'];
- }
-
- $subTag = null;
- if ($mergeNode) {
- // Merge keys
- } elseif (!isset($values['value']) || '' === $values['value'] || 0 === strpos($values['value'], '#') || (null !== $subTag = $this->getLineTag($values['value'], $flags)) || '<<' === $key) {
- // hash
- // if next line is less indented or equal, then it means that the current value is null
- if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) {
- // Spec: Keys MUST be unique; first one wins.
- // But overwriting is allowed when a merge node is used in current block.
- if ($allowOverwrite || !isset($data[$key])) {
- if (null !== $subTag) {
- $data[$key] = new TaggedValue($subTag, '');
- } else {
- $data[$key] = null;
- }
- } else {
- throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine);
- }
- } else {
- // remember the parsed line number here in case we need it to provide some contexts in error messages below
- $realCurrentLineNbKey = $this->getRealCurrentLineNb();
- $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $flags);
- if ('<<' === $key) {
- $this->refs[$refMatches['ref']] = $value;
-
- if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $value instanceof \stdClass) {
- $value = (array) $value;
- }
-
- $data += $value;
- } elseif ($allowOverwrite || !isset($data[$key])) {
- // Spec: Keys MUST be unique; first one wins.
- // But overwriting is allowed when a merge node is used in current block.
- if (null !== $subTag) {
- $data[$key] = new TaggedValue($subTag, $value);
- } else {
- $data[$key] = $value;
- }
- } else {
- throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $realCurrentLineNbKey + 1, $this->currentLine);
- }
- }
- } else {
- $value = $this->parseValue(rtrim($values['value']), $flags, $context);
- // Spec: Keys MUST be unique; first one wins.
- // But overwriting is allowed when a merge node is used in current block.
- if ($allowOverwrite || !isset($data[$key])) {
- $data[$key] = $value;
- } else {
- throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine);
- }
- }
- if ($isRef) {
- $this->refs[$isRef] = $data[$key];
- array_pop($this->refsBeingParsed);
- }
- } elseif ('"' === $this->currentLine[0] || "'" === $this->currentLine[0]) {
- if (null !== $context) {
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- try {
- return Inline::parse($this->lexInlineQuotedString(), $flags, $this->refs);
- } catch (ParseException $e) {
- $e->setParsedLine($this->getRealCurrentLineNb() + 1);
- $e->setSnippet($this->currentLine);
-
- throw $e;
- }
- } elseif ('{' === $this->currentLine[0]) {
- if (null !== $context) {
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- try {
- $parsedMapping = Inline::parse($this->lexInlineMapping(), $flags, $this->refs);
-
- while ($this->moveToNextLine()) {
- if (!$this->isCurrentLineEmpty()) {
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
- }
-
- return $parsedMapping;
- } catch (ParseException $e) {
- $e->setParsedLine($this->getRealCurrentLineNb() + 1);
- $e->setSnippet($this->currentLine);
-
- throw $e;
- }
- } elseif ('[' === $this->currentLine[0]) {
- if (null !== $context) {
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- try {
- $parsedSequence = Inline::parse($this->lexInlineSequence(), $flags, $this->refs);
-
- while ($this->moveToNextLine()) {
- if (!$this->isCurrentLineEmpty()) {
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
- }
-
- return $parsedSequence;
- } catch (ParseException $e) {
- $e->setParsedLine($this->getRealCurrentLineNb() + 1);
- $e->setSnippet($this->currentLine);
-
- throw $e;
- }
- } else {
- // multiple documents are not supported
- if ('---' === $this->currentLine) {
- throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine, $this->filename);
- }
-
- if ($deprecatedUsage = (isset($this->currentLine[1]) && '?' === $this->currentLine[0] && ' ' === $this->currentLine[1])) {
- throw new ParseException('Complex mappings are not supported.', $this->getRealCurrentLineNb() + 1, $this->currentLine);
- }
-
- // 1-liner optionally followed by newline(s)
- if (\is_string($value) && $this->lines[0] === trim($value)) {
- try {
- $value = Inline::parse($this->lines[0], $flags, $this->refs);
- } catch (ParseException $e) {
- $e->setParsedLine($this->getRealCurrentLineNb() + 1);
- $e->setSnippet($this->currentLine);
-
- throw $e;
- }
-
- return $value;
- }
-
- // try to parse the value as a multi-line string as a last resort
- if (0 === $this->currentLineNb) {
- $previousLineWasNewline = false;
- $previousLineWasTerminatedWithBackslash = false;
- $value = '';
-
- foreach ($this->lines as $line) {
- $trimmedLine = trim($line);
- if ('#' === ($trimmedLine[0] ?? '')) {
- continue;
- }
- // If the indentation is not consistent at offset 0, it is to be considered as a ParseError
- if (0 === $this->offset && !$deprecatedUsage && isset($line[0]) && ' ' === $line[0]) {
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- if (false !== strpos($line, ': ')) {
- throw new ParseException('Mapping values are not allowed in multi-line blocks.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- if ('' === $trimmedLine) {
- $value .= "\n";
- } elseif (!$previousLineWasNewline && !$previousLineWasTerminatedWithBackslash) {
- $value .= ' ';
- }
-
- if ('' !== $trimmedLine && '\\' === substr($line, -1)) {
- $value .= ltrim(substr($line, 0, -1));
- } elseif ('' !== $trimmedLine) {
- $value .= $trimmedLine;
- }
-
- if ('' === $trimmedLine) {
- $previousLineWasNewline = true;
- $previousLineWasTerminatedWithBackslash = false;
- } elseif ('\\' === substr($line, -1)) {
- $previousLineWasNewline = false;
- $previousLineWasTerminatedWithBackslash = true;
- } else {
- $previousLineWasNewline = false;
- $previousLineWasTerminatedWithBackslash = false;
- }
- }
-
- try {
- return Inline::parse(trim($value));
- } catch (ParseException $e) {
- // fall-through to the ParseException thrown below
- }
- }
-
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
- } while ($this->moveToNextLine());
-
- if (null !== $tag) {
- $data = new TaggedValue($tag, $data);
- }
-
- if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && 'mapping' === $context && !\is_object($data)) {
- $object = new \stdClass();
-
- foreach ($data as $key => $value) {
- $object->$key = $value;
- }
-
- $data = $object;
- }
-
- return empty($data) ? null : $data;
- }
-
- private function parseBlock(int $offset, string $yaml, int $flags)
- {
- $skippedLineNumbers = $this->skippedLineNumbers;
-
- foreach ($this->locallySkippedLineNumbers as $lineNumber) {
- if ($lineNumber < $offset) {
- continue;
- }
-
- $skippedLineNumbers[] = $lineNumber;
- }
-
- $parser = new self();
- $parser->offset = $offset;
- $parser->totalNumberOfLines = $this->totalNumberOfLines;
- $parser->skippedLineNumbers = $skippedLineNumbers;
- $parser->refs = &$this->refs;
- $parser->refsBeingParsed = $this->refsBeingParsed;
-
- return $parser->doParse($yaml, $flags);
- }
-
- /**
- * Returns the current line number (takes the offset into account).
- *
- * @internal
- */
- public function getRealCurrentLineNb(): int
- {
- $realCurrentLineNumber = $this->currentLineNb + $this->offset;
-
- foreach ($this->skippedLineNumbers as $skippedLineNumber) {
- if ($skippedLineNumber > $realCurrentLineNumber) {
- break;
- }
-
- ++$realCurrentLineNumber;
- }
-
- return $realCurrentLineNumber;
- }
-
- /**
- * Returns the current line indentation.
- */
- private function getCurrentLineIndentation(): int
- {
- if (' ' !== ($this->currentLine[0] ?? '')) {
- return 0;
- }
-
- return \strlen($this->currentLine) - \strlen(ltrim($this->currentLine, ' '));
- }
-
- /**
- * Returns the next embed block of YAML.
- *
- * @param int|null $indentation The indent level at which the block is to be read, or null for default
- * @param bool $inSequence True if the enclosing data structure is a sequence
- *
- * @throws ParseException When indentation problem are detected
- */
- private function getNextEmbedBlock(int $indentation = null, bool $inSequence = false): string
- {
- $oldLineIndentation = $this->getCurrentLineIndentation();
-
- if (!$this->moveToNextLine()) {
- return '';
- }
-
- if (null === $indentation) {
- $newIndent = null;
- $movements = 0;
-
- do {
- $EOF = false;
-
- // empty and comment-like lines do not influence the indentation depth
- if ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) {
- $EOF = !$this->moveToNextLine();
-
- if (!$EOF) {
- ++$movements;
- }
- } else {
- $newIndent = $this->getCurrentLineIndentation();
- }
- } while (!$EOF && null === $newIndent);
-
- for ($i = 0; $i < $movements; ++$i) {
- $this->moveToPreviousLine();
- }
-
- $unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem();
-
- if (!$this->isCurrentLineEmpty() && 0 === $newIndent && !$unindentedEmbedBlock) {
- throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
- } else {
- $newIndent = $indentation;
- }
-
- $data = [];
-
- if ($this->getCurrentLineIndentation() >= $newIndent) {
- $data[] = substr($this->currentLine, $newIndent ?? 0);
- } elseif ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) {
- $data[] = $this->currentLine;
- } else {
- $this->moveToPreviousLine();
-
- return '';
- }
-
- if ($inSequence && $oldLineIndentation === $newIndent && isset($data[0][0]) && '-' === $data[0][0]) {
- // the previous line contained a dash but no item content, this line is a sequence item with the same indentation
- // and therefore no nested list or mapping
- $this->moveToPreviousLine();
-
- return '';
- }
-
- $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem();
- $isItComment = $this->isCurrentLineComment();
-
- while ($this->moveToNextLine()) {
- if ($isItComment && !$isItUnindentedCollection) {
- $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem();
- $isItComment = $this->isCurrentLineComment();
- }
-
- $indent = $this->getCurrentLineIndentation();
-
- if ($isItUnindentedCollection && !$this->isCurrentLineEmpty() && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) {
- $this->moveToPreviousLine();
- break;
- }
-
- if ($this->isCurrentLineBlank()) {
- $data[] = substr($this->currentLine, $newIndent);
- continue;
- }
-
- if ($indent >= $newIndent) {
- $data[] = substr($this->currentLine, $newIndent);
- } elseif ($this->isCurrentLineComment()) {
- $data[] = $this->currentLine;
- } elseif (0 == $indent) {
- $this->moveToPreviousLine();
-
- break;
- } else {
- throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
- }
-
- return implode("\n", $data);
- }
-
- private function hasMoreLines(): bool
- {
- return (\count($this->lines) - 1) > $this->currentLineNb;
- }
-
- /**
- * Moves the parser to the next line.
- */
- private function moveToNextLine(): bool
- {
- if ($this->currentLineNb >= $this->numberOfParsedLines - 1) {
- return false;
- }
-
- $this->currentLine = $this->lines[++$this->currentLineNb];
-
- return true;
- }
-
- /**
- * Moves the parser to the previous line.
- */
- private function moveToPreviousLine(): bool
- {
- if ($this->currentLineNb < 1) {
- return false;
- }
-
- $this->currentLine = $this->lines[--$this->currentLineNb];
-
- return true;
- }
-
- /**
- * Parses a YAML value.
- *
- * @param string $value A YAML value
- * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior
- * @param string $context The parser context (either sequence or mapping)
- *
- * @return mixed
- *
- * @throws ParseException When reference does not exist
- */
- private function parseValue(string $value, int $flags, string $context)
- {
- if (0 === strpos($value, '*')) {
- if (false !== $pos = strpos($value, '#')) {
- $value = substr($value, 1, $pos - 2);
- } else {
- $value = substr($value, 1);
- }
-
- if (!\array_key_exists($value, $this->refs)) {
- if (false !== $pos = array_search($value, $this->refsBeingParsed, true)) {
- throw new ParseException(sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$value])), $value), $this->currentLineNb + 1, $this->currentLine, $this->filename);
- }
-
- throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine, $this->filename);
- }
-
- return $this->refs[$value];
- }
-
- if (\in_array($value[0], ['!', '|', '>'], true) && self::preg_match('/^(?:'.self::TAG_PATTERN.' +)?'.self::BLOCK_SCALAR_HEADER_PATTERN.'$/', $value, $matches)) {
- $modifiers = $matches['modifiers'] ?? '';
-
- $data = $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), abs((int) $modifiers));
-
- if ('' !== $matches['tag'] && '!' !== $matches['tag']) {
- if ('!!binary' === $matches['tag']) {
- return Inline::evaluateBinaryScalar($data);
- }
-
- return new TaggedValue(substr($matches['tag'], 1), $data);
- }
-
- return $data;
- }
-
- try {
- if ('' !== $value && '{' === $value[0]) {
- $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value));
-
- return Inline::parse($this->lexInlineMapping($cursor), $flags, $this->refs);
- } elseif ('' !== $value && '[' === $value[0]) {
- $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value));
-
- return Inline::parse($this->lexInlineSequence($cursor), $flags, $this->refs);
- }
-
- switch ($value[0] ?? '') {
- case '"':
- case "'":
- $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value));
- $parsedValue = Inline::parse($this->lexInlineQuotedString($cursor), $flags, $this->refs);
-
- if (isset($this->currentLine[$cursor]) && preg_replace('/\s*(#.*)?$/A', '', substr($this->currentLine, $cursor))) {
- throw new ParseException(sprintf('Unexpected characters near "%s".', substr($this->currentLine, $cursor)));
- }
-
- return $parsedValue;
- default:
- $lines = [];
-
- while ($this->moveToNextLine()) {
- // unquoted strings end before the first unindented line
- if (0 === $this->getCurrentLineIndentation()) {
- $this->moveToPreviousLine();
-
- break;
- }
-
- $lines[] = trim($this->currentLine);
- }
-
- for ($i = 0, $linesCount = \count($lines), $previousLineBlank = false; $i < $linesCount; ++$i) {
- if ('' === $lines[$i]) {
- $value .= "\n";
- $previousLineBlank = true;
- } elseif ($previousLineBlank) {
- $value .= $lines[$i];
- $previousLineBlank = false;
- } else {
- $value .= ' '.$lines[$i];
- $previousLineBlank = false;
- }
- }
-
- Inline::$parsedLineNumber = $this->getRealCurrentLineNb();
-
- $parsedValue = Inline::parse($value, $flags, $this->refs);
-
- if ('mapping' === $context && \is_string($parsedValue) && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && false !== strpos($parsedValue, ': ')) {
- throw new ParseException('A colon cannot be used in an unquoted mapping value.', $this->getRealCurrentLineNb() + 1, $value, $this->filename);
- }
-
- return $parsedValue;
- }
- } catch (ParseException $e) {
- $e->setParsedLine($this->getRealCurrentLineNb() + 1);
- $e->setSnippet($this->currentLine);
-
- throw $e;
- }
- }
-
- /**
- * Parses a block scalar.
- *
- * @param string $style The style indicator that was used to begin this block scalar (| or >)
- * @param string $chomping The chomping indicator that was used to begin this block scalar (+ or -)
- * @param int $indentation The indentation indicator that was used to begin this block scalar
- */
- private function parseBlockScalar(string $style, string $chomping = '', int $indentation = 0): string
- {
- $notEOF = $this->moveToNextLine();
- if (!$notEOF) {
- return '';
- }
-
- $isCurrentLineBlank = $this->isCurrentLineBlank();
- $blockLines = [];
-
- // leading blank lines are consumed before determining indentation
- while ($notEOF && $isCurrentLineBlank) {
- // newline only if not EOF
- if ($notEOF = $this->moveToNextLine()) {
- $blockLines[] = '';
- $isCurrentLineBlank = $this->isCurrentLineBlank();
- }
- }
-
- // determine indentation if not specified
- if (0 === $indentation) {
- $currentLineLength = \strlen($this->currentLine);
-
- for ($i = 0; $i < $currentLineLength && ' ' === $this->currentLine[$i]; ++$i) {
- ++$indentation;
- }
- }
-
- if ($indentation > 0) {
- $pattern = sprintf('/^ {%d}(.*)$/', $indentation);
-
- while (
- $notEOF && (
- $isCurrentLineBlank ||
- self::preg_match($pattern, $this->currentLine, $matches)
- )
- ) {
- if ($isCurrentLineBlank && \strlen($this->currentLine) > $indentation) {
- $blockLines[] = substr($this->currentLine, $indentation);
- } elseif ($isCurrentLineBlank) {
- $blockLines[] = '';
- } else {
- $blockLines[] = $matches[1];
- }
-
- // newline only if not EOF
- if ($notEOF = $this->moveToNextLine()) {
- $isCurrentLineBlank = $this->isCurrentLineBlank();
- }
- }
- } elseif ($notEOF) {
- $blockLines[] = '';
- }
-
- if ($notEOF) {
- $blockLines[] = '';
- $this->moveToPreviousLine();
- } elseif (!$notEOF && !$this->isCurrentLineLastLineInDocument()) {
- $blockLines[] = '';
- }
-
- // folded style
- if ('>' === $style) {
- $text = '';
- $previousLineIndented = false;
- $previousLineBlank = false;
-
- for ($i = 0, $blockLinesCount = \count($blockLines); $i < $blockLinesCount; ++$i) {
- if ('' === $blockLines[$i]) {
- $text .= "\n";
- $previousLineIndented = false;
- $previousLineBlank = true;
- } elseif (' ' === $blockLines[$i][0]) {
- $text .= "\n".$blockLines[$i];
- $previousLineIndented = true;
- $previousLineBlank = false;
- } elseif ($previousLineIndented) {
- $text .= "\n".$blockLines[$i];
- $previousLineIndented = false;
- $previousLineBlank = false;
- } elseif ($previousLineBlank || 0 === $i) {
- $text .= $blockLines[$i];
- $previousLineIndented = false;
- $previousLineBlank = false;
- } else {
- $text .= ' '.$blockLines[$i];
- $previousLineIndented = false;
- $previousLineBlank = false;
- }
- }
- } else {
- $text = implode("\n", $blockLines);
- }
-
- // deal with trailing newlines
- if ('' === $chomping) {
- $text = preg_replace('/\n+$/', "\n", $text);
- } elseif ('-' === $chomping) {
- $text = preg_replace('/\n+$/', '', $text);
- }
-
- return $text;
- }
-
- /**
- * Returns true if the next line is indented.
- */
- private function isNextLineIndented(): bool
- {
- $currentIndentation = $this->getCurrentLineIndentation();
- $movements = 0;
-
- do {
- $EOF = !$this->moveToNextLine();
-
- if (!$EOF) {
- ++$movements;
- }
- } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()));
-
- if ($EOF) {
- for ($i = 0; $i < $movements; ++$i) {
- $this->moveToPreviousLine();
- }
-
- return false;
- }
-
- $ret = $this->getCurrentLineIndentation() > $currentIndentation;
-
- for ($i = 0; $i < $movements; ++$i) {
- $this->moveToPreviousLine();
- }
-
- return $ret;
- }
-
- /**
- * Returns true if the current line is blank or if it is a comment line.
- */
- private function isCurrentLineEmpty(): bool
- {
- return $this->isCurrentLineBlank() || $this->isCurrentLineComment();
- }
-
- /**
- * Returns true if the current line is blank.
- */
- private function isCurrentLineBlank(): bool
- {
- return '' === $this->currentLine || '' === trim($this->currentLine, ' ');
- }
-
- /**
- * Returns true if the current line is a comment line.
- */
- private function isCurrentLineComment(): bool
- {
- // checking explicitly the first char of the trim is faster than loops or strpos
- $ltrimmedLine = '' !== $this->currentLine && ' ' === $this->currentLine[0] ? ltrim($this->currentLine, ' ') : $this->currentLine;
-
- return '' !== $ltrimmedLine && '#' === $ltrimmedLine[0];
- }
-
- private function isCurrentLineLastLineInDocument(): bool
- {
- return ($this->offset + $this->currentLineNb) >= ($this->totalNumberOfLines - 1);
- }
-
- /**
- * Cleanups a YAML string to be parsed.
- *
- * @param string $value The input YAML string
- */
- private function cleanup(string $value): string
- {
- $value = str_replace(["\r\n", "\r"], "\n", $value);
-
- // strip YAML header
- $count = 0;
- $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#u', '', $value, -1, $count);
- $this->offset += $count;
-
- // remove leading comments
- $trimmedValue = preg_replace('#^(\#.*?\n)+#s', '', $value, -1, $count);
- if (1 === $count) {
- // items have been removed, update the offset
- $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n");
- $value = $trimmedValue;
- }
-
- // remove start of the document marker (---)
- $trimmedValue = preg_replace('#^\-\-\-.*?\n#s', '', $value, -1, $count);
- if (1 === $count) {
- // items have been removed, update the offset
- $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n");
- $value = $trimmedValue;
-
- // remove end of the document marker (...)
- $value = preg_replace('#\.\.\.\s*$#', '', $value);
- }
-
- return $value;
- }
-
- /**
- * Returns true if the next line starts unindented collection.
- */
- private function isNextLineUnIndentedCollection(): bool
- {
- $currentIndentation = $this->getCurrentLineIndentation();
- $movements = 0;
-
- do {
- $EOF = !$this->moveToNextLine();
-
- if (!$EOF) {
- ++$movements;
- }
- } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()));
-
- if ($EOF) {
- return false;
- }
-
- $ret = $this->getCurrentLineIndentation() === $currentIndentation && $this->isStringUnIndentedCollectionItem();
-
- for ($i = 0; $i < $movements; ++$i) {
- $this->moveToPreviousLine();
- }
-
- return $ret;
- }
-
- /**
- * Returns true if the string is un-indented collection item.
- */
- private function isStringUnIndentedCollectionItem(): bool
- {
- return '-' === rtrim($this->currentLine) || 0 === strpos($this->currentLine, '- ');
- }
-
- /**
- * A local wrapper for "preg_match" which will throw a ParseException if there
- * is an internal error in the PCRE engine.
- *
- * This avoids us needing to check for "false" every time PCRE is used
- * in the YAML engine
- *
- * @throws ParseException on a PCRE internal error
- *
- * @see preg_last_error()
- *
- * @internal
- */
- public static function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int
- {
- if (false === $ret = preg_match($pattern, $subject, $matches, $flags, $offset)) {
- switch (preg_last_error()) {
- case \PREG_INTERNAL_ERROR:
- $error = 'Internal PCRE error.';
- break;
- case \PREG_BACKTRACK_LIMIT_ERROR:
- $error = 'pcre.backtrack_limit reached.';
- break;
- case \PREG_RECURSION_LIMIT_ERROR:
- $error = 'pcre.recursion_limit reached.';
- break;
- case \PREG_BAD_UTF8_ERROR:
- $error = 'Malformed UTF-8 data.';
- break;
- case \PREG_BAD_UTF8_OFFSET_ERROR:
- $error = 'Offset doesn\'t correspond to the begin of a valid UTF-8 code point.';
- break;
- default:
- $error = 'Error.';
- }
-
- throw new ParseException($error);
- }
-
- return $ret;
- }
-
- /**
- * Trim the tag on top of the value.
- *
- * Prevent values such as "!foo {quz: bar}" to be considered as
- * a mapping block.
- */
- private function trimTag(string $value): string
- {
- if ('!' === $value[0]) {
- return ltrim(substr($value, 1, strcspn($value, " \r\n", 1)), ' ');
- }
-
- return $value;
- }
-
- private function getLineTag(string $value, int $flags, bool $nextLineCheck = true): ?string
- {
- if ('' === $value || '!' !== $value[0] || 1 !== self::preg_match('/^'.self::TAG_PATTERN.' *( +#.*)?$/', $value, $matches)) {
- return null;
- }
-
- if ($nextLineCheck && !$this->isNextLineIndented()) {
- return null;
- }
-
- $tag = substr($matches['tag'], 1);
-
- // Built-in tags
- if ($tag && '!' === $tag[0]) {
- throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), $this->getRealCurrentLineNb() + 1, $value, $this->filename);
- }
-
- if (Yaml::PARSE_CUSTOM_TAGS & $flags) {
- return $tag;
- }
-
- throw new ParseException(sprintf('Tags support is not enabled. You must use the flag "Yaml::PARSE_CUSTOM_TAGS" to use "%s".', $matches['tag']), $this->getRealCurrentLineNb() + 1, $value, $this->filename);
- }
-
- private function lexInlineQuotedString(int &$cursor = 0): string
- {
- $quotation = $this->currentLine[$cursor];
- $value = $quotation;
- ++$cursor;
-
- $previousLineWasNewline = true;
- $previousLineWasTerminatedWithBackslash = false;
- $lineNumber = 0;
-
- do {
- if (++$lineNumber > 1) {
- $cursor += strspn($this->currentLine, ' ', $cursor);
- }
-
- if ($this->isCurrentLineBlank()) {
- $value .= "\n";
- } elseif (!$previousLineWasNewline && !$previousLineWasTerminatedWithBackslash) {
- $value .= ' ';
- }
-
- for (; \strlen($this->currentLine) > $cursor; ++$cursor) {
- switch ($this->currentLine[$cursor]) {
- case '\\':
- if ("'" === $quotation) {
- $value .= '\\';
- } elseif (isset($this->currentLine[++$cursor])) {
- $value .= '\\'.$this->currentLine[$cursor];
- }
-
- break;
- case $quotation:
- ++$cursor;
-
- if ("'" === $quotation && isset($this->currentLine[$cursor]) && "'" === $this->currentLine[$cursor]) {
- $value .= "''";
- break;
- }
-
- return $value.$quotation;
- default:
- $value .= $this->currentLine[$cursor];
- }
- }
-
- if ($this->isCurrentLineBlank()) {
- $previousLineWasNewline = true;
- $previousLineWasTerminatedWithBackslash = false;
- } elseif ('\\' === $this->currentLine[-1]) {
- $previousLineWasNewline = false;
- $previousLineWasTerminatedWithBackslash = true;
- } else {
- $previousLineWasNewline = false;
- $previousLineWasTerminatedWithBackslash = false;
- }
-
- if ($this->hasMoreLines()) {
- $cursor = 0;
- }
- } while ($this->moveToNextLine());
-
- throw new ParseException('Malformed inline YAML string.');
- }
-
- private function lexUnquotedString(int &$cursor): string
- {
- $offset = $cursor;
- $cursor += strcspn($this->currentLine, '[]{},: ', $cursor);
-
- if ($cursor === $offset) {
- throw new ParseException('Malformed unquoted YAML string.');
- }
-
- return substr($this->currentLine, $offset, $cursor - $offset);
- }
-
- private function lexInlineMapping(int &$cursor = 0): string
- {
- return $this->lexInlineStructure($cursor, '}');
- }
-
- private function lexInlineSequence(int &$cursor = 0): string
- {
- return $this->lexInlineStructure($cursor, ']');
- }
-
- private function lexInlineStructure(int &$cursor, string $closingTag): string
- {
- $value = $this->currentLine[$cursor];
- ++$cursor;
-
- do {
- $this->consumeWhitespaces($cursor);
-
- while (isset($this->currentLine[$cursor])) {
- switch ($this->currentLine[$cursor]) {
- case '"':
- case "'":
- $value .= $this->lexInlineQuotedString($cursor);
- break;
- case ':':
- case ',':
- $value .= $this->currentLine[$cursor];
- ++$cursor;
- break;
- case '{':
- $value .= $this->lexInlineMapping($cursor);
- break;
- case '[':
- $value .= $this->lexInlineSequence($cursor);
- break;
- case $closingTag:
- $value .= $this->currentLine[$cursor];
- ++$cursor;
-
- return $value;
- case '#':
- break 2;
- default:
- $value .= $this->lexUnquotedString($cursor);
- }
-
- if ($this->consumeWhitespaces($cursor)) {
- $value .= ' ';
- }
- }
-
- if ($this->hasMoreLines()) {
- $cursor = 0;
- }
- } while ($this->moveToNextLine());
-
- throw new ParseException('Malformed inline YAML string.');
- }
-
- private function consumeWhitespaces(int &$cursor): bool
- {
- $whitespacesConsumed = 0;
-
- do {
- $whitespaceOnlyTokenLength = strspn($this->currentLine, ' ', $cursor);
- $whitespacesConsumed += $whitespaceOnlyTokenLength;
- $cursor += $whitespaceOnlyTokenLength;
-
- if (isset($this->currentLine[$cursor])) {
- return 0 < $whitespacesConsumed;
- }
-
- if ($this->hasMoreLines()) {
- $cursor = 0;
- }
- } while ($this->moveToNextLine());
-
- return 0 < $whitespacesConsumed;
- }
-}
diff --git a/system/vendor/symfony/yaml/README.md b/system/vendor/symfony/yaml/README.md
deleted file mode 100644
index ac25024..0000000
--- a/system/vendor/symfony/yaml/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Yaml Component
-==============
-
-The Yaml component loads and dumps YAML files.
-
-Resources
----------
-
- * [Documentation](https://symfony.com/doc/current/components/yaml.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/system/vendor/symfony/yaml/Resources/bin/yaml-lint b/system/vendor/symfony/yaml/Resources/bin/yaml-lint
deleted file mode 100644
index 143869e..0000000
--- a/system/vendor/symfony/yaml/Resources/bin/yaml-lint
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env php
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if ('cli' !== \PHP_SAPI) {
- throw new Exception('This script must be run from the command line.');
-}
-
-/**
- * Runs the Yaml lint command.
- *
- * @author Jan Schädlich
- */
-
-use Symfony\Component\Console\Application;
-use Symfony\Component\Yaml\Command\LintCommand;
-
-function includeIfExists(string $file): bool
-{
- return file_exists($file) && include $file;
-}
-
-if (
- !includeIfExists(__DIR__ . '/../../../../autoload.php') &&
- !includeIfExists(__DIR__ . '/../../vendor/autoload.php') &&
- !includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php')
-) {
- fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL);
- exit(1);
-}
-
-if (!class_exists(Application::class)) {
- fwrite(STDERR, 'You need the "symfony/console" component in order to run the Yaml linter.'.PHP_EOL);
- exit(1);
-}
-
-(new Application())->add($command = new LintCommand())
- ->getApplication()
- ->setDefaultCommand($command->getName(), true)
- ->run()
-;
diff --git a/system/vendor/symfony/yaml/Tag/TaggedValue.php b/system/vendor/symfony/yaml/Tag/TaggedValue.php
deleted file mode 100644
index 4ea3406..0000000
--- a/system/vendor/symfony/yaml/Tag/TaggedValue.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Tag;
-
-/**
- * @author Nicolas Grekas ]
- * @author Guilhem N.
- */
-final class TaggedValue
-{
- private $tag;
- private $value;
-
- public function __construct(string $tag, $value)
- {
- $this->tag = $tag;
- $this->value = $value;
- }
-
- public function getTag(): string
- {
- return $this->tag;
- }
-
- public function getValue()
- {
- return $this->value;
- }
-}
diff --git a/system/vendor/symfony/yaml/Unescaper.php b/system/vendor/symfony/yaml/Unescaper.php
deleted file mode 100644
index d1ef041..0000000
--- a/system/vendor/symfony/yaml/Unescaper.php
+++ /dev/null
@@ -1,132 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-use Symfony\Component\Yaml\Exception\ParseException;
-
-/**
- * Unescaper encapsulates unescaping rules for single and double-quoted
- * YAML strings.
- *
- * @author Matthew Lewinski
- *
- * @internal
- */
-class Unescaper
-{
- /**
- * Regex fragment that matches an escaped character in a double quoted string.
- */
- public const REGEX_ESCAPED_CHARACTER = '\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)';
-
- /**
- * Unescapes a single quoted string.
- *
- * @param string $value A single quoted string
- */
- public function unescapeSingleQuotedString(string $value): string
- {
- return str_replace('\'\'', '\'', $value);
- }
-
- /**
- * Unescapes a double quoted string.
- *
- * @param string $value A double quoted string
- */
- public function unescapeDoubleQuotedString(string $value): string
- {
- $callback = function ($match) {
- return $this->unescapeCharacter($match[0]);
- };
-
- // evaluate the string
- return preg_replace_callback('/'.self::REGEX_ESCAPED_CHARACTER.'/u', $callback, $value);
- }
-
- /**
- * Unescapes a character that was found in a double-quoted string.
- *
- * @param string $value An escaped character
- */
- private function unescapeCharacter(string $value): string
- {
- switch ($value[1]) {
- case '0':
- return "\x0";
- case 'a':
- return "\x7";
- case 'b':
- return "\x8";
- case 't':
- return "\t";
- case "\t":
- return "\t";
- case 'n':
- return "\n";
- case 'v':
- return "\xB";
- case 'f':
- return "\xC";
- case 'r':
- return "\r";
- case 'e':
- return "\x1B";
- case ' ':
- return ' ';
- case '"':
- return '"';
- case '/':
- return '/';
- case '\\':
- return '\\';
- case 'N':
- // U+0085 NEXT LINE
- return "\xC2\x85";
- case '_':
- // U+00A0 NO-BREAK SPACE
- return "\xC2\xA0";
- case 'L':
- // U+2028 LINE SEPARATOR
- return "\xE2\x80\xA8";
- case 'P':
- // U+2029 PARAGRAPH SEPARATOR
- return "\xE2\x80\xA9";
- case 'x':
- return self::utf8chr(hexdec(substr($value, 2, 2)));
- case 'u':
- return self::utf8chr(hexdec(substr($value, 2, 4)));
- case 'U':
- return self::utf8chr(hexdec(substr($value, 2, 8)));
- default:
- throw new ParseException(sprintf('Found unknown escape character "%s".', $value));
- }
- }
-
- /**
- * Get the UTF-8 character for the given code point.
- */
- private static function utf8chr(int $c): string
- {
- if (0x80 > $c %= 0x200000) {
- return \chr($c);
- }
- if (0x800 > $c) {
- return \chr(0xC0 | $c >> 6).\chr(0x80 | $c & 0x3F);
- }
- if (0x10000 > $c) {
- return \chr(0xE0 | $c >> 12).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F);
- }
-
- return \chr(0xF0 | $c >> 18).\chr(0x80 | $c >> 12 & 0x3F).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F);
- }
-}
diff --git a/system/vendor/symfony/yaml/Yaml.php b/system/vendor/symfony/yaml/Yaml.php
deleted file mode 100644
index ea13045..0000000
--- a/system/vendor/symfony/yaml/Yaml.php
+++ /dev/null
@@ -1,100 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-use Symfony\Component\Yaml\Exception\ParseException;
-
-/**
- * Yaml offers convenience methods to load and dump YAML.
- *
- * @author Fabien Potencier
- *
- * @final
- */
-class Yaml
-{
- public const DUMP_OBJECT = 1;
- public const PARSE_EXCEPTION_ON_INVALID_TYPE = 2;
- public const PARSE_OBJECT = 4;
- public const PARSE_OBJECT_FOR_MAP = 8;
- public const DUMP_EXCEPTION_ON_INVALID_TYPE = 16;
- public const PARSE_DATETIME = 32;
- public const DUMP_OBJECT_AS_MAP = 64;
- public const DUMP_MULTI_LINE_LITERAL_BLOCK = 128;
- public const PARSE_CONSTANT = 256;
- public const PARSE_CUSTOM_TAGS = 512;
- public const DUMP_EMPTY_ARRAY_AS_SEQUENCE = 1024;
- public const DUMP_NULL_AS_TILDE = 2048;
-
- /**
- * Parses a YAML file into a PHP value.
- *
- * Usage:
- *
- * $array = Yaml::parseFile('config.yml');
- * print_r($array);
- *
- * @param string $filename The path to the YAML file to be parsed
- * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
- *
- * @return mixed
- *
- * @throws ParseException If the file could not be read or the YAML is not valid
- */
- public static function parseFile(string $filename, int $flags = 0)
- {
- $yaml = new Parser();
-
- return $yaml->parseFile($filename, $flags);
- }
-
- /**
- * Parses YAML into a PHP value.
- *
- * Usage:
- *
- * $array = Yaml::parse(file_get_contents('config.yml'));
- * print_r($array);
- *
- *
- * @param string $input A string containing YAML
- * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
- *
- * @return mixed
- *
- * @throws ParseException If the YAML is not valid
- */
- public static function parse(string $input, int $flags = 0)
- {
- $yaml = new Parser();
-
- return $yaml->parse($input, $flags);
- }
-
- /**
- * Dumps a PHP value to a YAML string.
- *
- * The dump method, when supplied with an array, will do its best
- * to convert the array into friendly YAML.
- *
- * @param mixed $input The PHP value
- * @param int $inline The level where you switch to inline YAML
- * @param int $indent The amount of spaces to use for indentation of nested nodes
- * @param int $flags A bit field of DUMP_* constants to customize the dumped YAML string
- */
- public static function dump($input, int $inline = 2, int $indent = 4, int $flags = 0): string
- {
- $yaml = new Dumper($indent);
-
- return $yaml->dump($input, $inline, 0, $flags);
- }
-}
diff --git a/system/vendor/symfony/yaml/composer.json b/system/vendor/symfony/yaml/composer.json
deleted file mode 100644
index 7fa6e2c..0000000
--- a/system/vendor/symfony/yaml/composer.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "symfony/yaml",
- "type": "library",
- "description": "Loads and dumps YAML files",
- "keywords": [],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1|^3",
- "symfony/polyfill-ctype": "^1.8"
- },
- "require-dev": {
- "symfony/console": "^5.3|^6.0"
- },
- "conflict": {
- "symfony/console": "<5.3"
- },
- "suggest": {
- "symfony/console": "For validating YAML files using the lint command"
- },
- "autoload": {
- "psr-4": { "Symfony\\Component\\Yaml\\": "" },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "bin": [
- "Resources/bin/yaml-lint"
- ],
- "minimum-stability": "dev"
-}
diff --git a/system/vendor/twig/twig/CHANGELOG b/system/vendor/twig/twig/CHANGELOG
deleted file mode 100644
index 2b8341f..0000000
--- a/system/vendor/twig/twig/CHANGELOG
+++ /dev/null
@@ -1,195 +0,0 @@
-# 3.8.0 (2023-11-21)
-
- * Catch errors thrown during template rendering
- * Fix IntlExtension::formatDateTime use of date formatter prototype
- * Fix premature loop exit in Security Policy lookup of allowed methods/properties
- * Remove NumberFormatter::TYPE_CURRENCY (deprecated in PHP 8.3)
- * Restore return type annotations
- * Allow Symfony 7 packages to be installed
- * Deprecate `twig_test_iterable` function. Use the native `is_iterable` instead.
-
-# 3.7.1 (2023-08-28)
-
- * Fix some phpdocs
-
-# 3.7.0 (2023-07-26)
-
- * Add support for the ...spread operator on arrays and hashes
-
-# 3.6.1 (2023-06-08)
-
- * Suppress some native return type deprecation messages
-
-# 3.6.0 (2023-05-03)
-
- * Allow psr/container 2.0
- * Add the new PHP 8.0 IntlDateFormatter::RELATIVE_* constants for date formatting
- * Make the Lexer initialize itself lazily
-
-# 3.5.1 (2023-02-08)
-
- * Arrow functions passed to the "reduce" filter now accept the current key as a third argument
- * Restores the leniency of the matches twig comparison
- * Fix error messages in sandboxed mode for "has some" and "has every"
-
-# 3.5.0 (2022-12-27)
-
- * Make Twig\ExpressionParser non-internal
- * Add "has some" and "has every" operators
- * Add Compile::reset()
- * Throw a better runtime error when the "matches" regexp is not valid
- * Add "twig *_names" intl functions
- * Fix optimizing closures callbacks
- * Add a better exception when getting an undefined constant via `constant`
- * Fix `if` nodes when outside of a block and with an empty body
-
-# 3.4.3 (2022-09-28)
-
- * Fix a security issue on filesystem loader (possibility to load a template outside a configured directory)
-
-# 3.4.2 (2022-08-12)
-
- * Allow inherited magic method to still run with calling class
- * Fix CallExpression::reflectCallable() throwing TypeError
- * Fix typo in naming (currency_code)
-
-# 3.4.1 (2022-05-17)
-
-* Fix optimizing non-public named closures
-
-# 3.4.0 (2022-05-22)
-
- * Add support for named closures
-
-# 3.3.10 (2022-04-06)
-
- * Enable bytecode invalidation when auto_reload is enabled
-
-# 3.3.9 (2022-03-25)
-
- * Fix custom escapers when using multiple Twig environments
- * Add support for "constant('class', object)"
- * Do not reuse internally generated variable names during parsing
-
-# 3.3.8 (2022-02-04)
-
- * Fix a security issue when in a sandbox: the `sort` filter must require a Closure for the `arrow` parameter
- * Fix deprecation notice on `round`
- * Fix call to deprecated `convertToHtml` method
-
-# 3.3.7 (2022-01-03)
-
-* Allow more null support when Twig expects a string (for better 8.1 support)
-* Only use Commonmark extensions if markdown enabled
-
-# 3.3.6 (2022-01-03)
-
-* Only use Commonmark extensions if markdown enabled
-
-# 3.3.5 (2022-01-03)
-
-* Allow CommonMark extensions to easily be added
-* Allow null when Twig expects a string (for better 8.1 support)
-* Make some performance optimizations
-* Allow Symfony translation contract v3+
-
-# 3.3.4 (2021-11-25)
-
- * Bump minimum supported Symfony component versions
- * Fix a deprecated message
-
-# 3.3.3 (2021-09-17)
-
- * Allow Symfony 6
- * Improve compatibility with PHP 8.1
- * Explicitly specify the encoding for mb_ord in JS escaper
-
-# 3.3.2 (2021-05-16)
-
- * Revert "Throw a proper exception when a template name is an absolute path (as it has never been supported)"
-
-# 3.3.1 (2021-05-12)
-
- * Fix PHP 8.1 compatibility
- * Throw a proper exception when a template name is an absolute path (as it has never been supported)
-
-# 3.3.0 (2021-02-08)
-
- * Fix macro calls in a "cache" tag
- * Add the slug filter
- * Allow extra bundle to be compatible with Twig 2
-
-# 3.2.1 (2021-01-05)
-
- * Fix extra bundle compat with older versions of Symfony
-
-# 3.2.0 (2021-01-05)
-
- * Add the Cache extension in the "extra" repositories: "cache" tag
- * Add "registerUndefinedTokenParserCallback"
- * Mark built-in node visitors as @internal
- * Fix "odd" not working for negative numbers
-
-# 3.1.1 (2020-10-27)
-
- * Fix "include(template_from_string())"
-
-# 3.1.0 (2020-10-21)
-
- * Fix sandbox support when using "include(template_from_string())"
- * Make round brackets optional for one argument tests like "same as" or "divisible by"
- * Add support for ES2015 style object initialisation shortcut { a } is the same as { 'a': a }
-
-# 3.0.5 (2020-08-05)
-
- * Fix twig_compare w.r.t. whitespace trimming
- * Fix sandbox not disabled if syntax error occurs within {% sandbox %} tag
- * Fix a regression when not using a space before an operator
- * Restrict callables to closures in filters
- * Allow trailing commas in argument lists (in calls as well as definitions)
-
-# 3.0.4 (2020-07-05)
-
- * Fix comparison operators
- * Fix options not taken into account when using "Michelf\MarkdownExtra"
- * Fix "Twig\Extra\Intl\IntlExtension::getCountryName()" to accept "null" as a first argument
- * Throw exception in case non-Traversable data is passed to "filter"
- * Fix context optimization on PHP 7.4
- * Fix PHP 8 compatibility
- * Fix ambiguous syntax parsing
-
-# 3.0.3 (2020-02-11)
-
- * Add a check to ensure that iconv() is defined
-
-# 3.0.2 (2020-02-11)
-
- * Avoid exceptions when an intl resource is not found
- * Fix implementation of case-insensitivity for method names
-
-# 3.0.1 (2019-12-28)
-
- * fixed Symfony 5.0 support for the HTML extra extension
-
-# 3.0.0 (2019-11-15)
-
- * fixed number formatter in Intl extra extension when using a formatter prototype
-
-# 3.0.0-BETA1 (2019-11-11)
-
- * removed the "if" condition support on the "for" tag
- * made the in, <, >, <=, >=, ==, and != operators more strict when comparing strings and integers/floats
- * removed the "filter" tag
- * added type hints everywhere
- * changed Environment::resolveTemplate() to always return a TemplateWrapper instance
- * removed Template::__toString()
- * removed Parser::isReservedMacroName()
- * removed SanboxedPrintNode
- * removed Node::setTemplateName()
- * made classes maked as "@final" final
- * removed InitRuntimeInterface, ExistsLoaderInterface, and SourceContextLoaderInterface
- * removed the "spaceless" tag
- * removed Twig\Environment::getBaseTemplateClass() and Twig\Environment::setBaseTemplateClass()
- * removed the "base_template_class" option on Twig\Environment
- * bumped minimum PHP version to 7.2
- * removed PSR-0 classes
diff --git a/system/vendor/twig/twig/LICENSE b/system/vendor/twig/twig/LICENSE
deleted file mode 100644
index fd8234e..0000000
--- a/system/vendor/twig/twig/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2009-present by the Twig Team.
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- * Neither the name of Twig nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/system/vendor/twig/twig/README.rst b/system/vendor/twig/twig/README.rst
deleted file mode 100644
index fbe7e9a..0000000
--- a/system/vendor/twig/twig/README.rst
+++ /dev/null
@@ -1,23 +0,0 @@
-Twig, the flexible, fast, and secure template language for PHP
-==============================================================
-
-Twig is a template language for PHP.
-
-Twig uses a syntax similar to the Django and Jinja template languages which
-inspired the Twig runtime environment.
-
-Sponsors
---------
-
-.. raw:: html
-
-
-
-
-
-More Information
-----------------
-
-Read the `documentation`_ for more information.
-
-.. _documentation: https://twig.symfony.com/documentation
diff --git a/system/vendor/twig/twig/composer.json b/system/vendor/twig/twig/composer.json
deleted file mode 100644
index 1b1726f..0000000
--- a/system/vendor/twig/twig/composer.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "name": "twig/twig",
- "type": "library",
- "description": "Twig, the flexible, fast, and secure template language for PHP",
- "keywords": ["templating"],
- "homepage": "https://twig.symfony.com",
- "license": "BSD-3-Clause",
- "minimum-stability": "dev",
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com",
- "homepage": "http://fabien.potencier.org",
- "role": "Lead Developer"
- },
- {
- "name": "Twig Team",
- "role": "Contributors"
- },
- {
- "name": "Armin Ronacher",
- "email": "armin.ronacher@active-4.com",
- "role": "Project Founder"
- }
- ],
- "require": {
- "php": ">=7.2.5",
- "symfony/polyfill-php80": "^1.22",
- "symfony/polyfill-mbstring": "^1.3",
- "symfony/polyfill-ctype": "^1.8"
- },
- "require-dev": {
- "symfony/phpunit-bridge": "^5.4.9|^6.3|^7.0",
- "psr/container": "^1.0|^2.0"
- },
- "autoload": {
- "psr-4" : {
- "Twig\\" : "src/"
- }
- },
- "autoload-dev": {
- "psr-4" : {
- "Twig\\Tests\\" : "tests/"
- }
- }
-}
diff --git a/system/vendor/twig/twig/src/Cache/CacheInterface.php b/system/vendor/twig/twig/src/Cache/CacheInterface.php
deleted file mode 100644
index 6e8c409..0000000
--- a/system/vendor/twig/twig/src/Cache/CacheInterface.php
+++ /dev/null
@@ -1,46 +0,0 @@
-
- */
-interface CacheInterface
-{
- /**
- * Generates a cache key for the given template class name.
- */
- public function generateKey(string $name, string $className): string;
-
- /**
- * Writes the compiled template to cache.
- *
- * @param string $content The template representation as a PHP class
- */
- public function write(string $key, string $content): void;
-
- /**
- * Loads a template from the cache.
- */
- public function load(string $key): void;
-
- /**
- * Returns the modification timestamp of a key.
- */
- public function getTimestamp(string $key): int;
-}
diff --git a/system/vendor/twig/twig/src/Cache/FilesystemCache.php b/system/vendor/twig/twig/src/Cache/FilesystemCache.php
deleted file mode 100644
index 4024adb..0000000
--- a/system/vendor/twig/twig/src/Cache/FilesystemCache.php
+++ /dev/null
@@ -1,87 +0,0 @@
-
- */
-class FilesystemCache implements CacheInterface
-{
- public const FORCE_BYTECODE_INVALIDATION = 1;
-
- private $directory;
- private $options;
-
- public function __construct(string $directory, int $options = 0)
- {
- $this->directory = rtrim($directory, '\/').'/';
- $this->options = $options;
- }
-
- public function generateKey(string $name, string $className): string
- {
- $hash = hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $className);
-
- return $this->directory.$hash[0].$hash[1].'/'.$hash.'.php';
- }
-
- public function load(string $key): void
- {
- if (is_file($key)) {
- @include_once $key;
- }
- }
-
- public function write(string $key, string $content): void
- {
- $dir = \dirname($key);
- if (!is_dir($dir)) {
- if (false === @mkdir($dir, 0777, true)) {
- clearstatcache(true, $dir);
- if (!is_dir($dir)) {
- throw new \RuntimeException(sprintf('Unable to create the cache directory (%s).', $dir));
- }
- }
- } elseif (!is_writable($dir)) {
- throw new \RuntimeException(sprintf('Unable to write in the cache directory (%s).', $dir));
- }
-
- $tmpFile = tempnam($dir, basename($key));
- if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $key)) {
- @chmod($key, 0666 & ~umask());
-
- if (self::FORCE_BYTECODE_INVALIDATION == ($this->options & self::FORCE_BYTECODE_INVALIDATION)) {
- // Compile cached file into bytecode cache
- if (\function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN)) {
- @opcache_invalidate($key, true);
- } elseif (\function_exists('apc_compile_file')) {
- apc_compile_file($key);
- }
- }
-
- return;
- }
-
- throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $key));
- }
-
- public function getTimestamp(string $key): int
- {
- if (!is_file($key)) {
- return 0;
- }
-
- return (int) @filemtime($key);
- }
-}
diff --git a/system/vendor/twig/twig/src/Cache/NullCache.php b/system/vendor/twig/twig/src/Cache/NullCache.php
deleted file mode 100644
index 8d20d59..0000000
--- a/system/vendor/twig/twig/src/Cache/NullCache.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
- */
-final class NullCache implements CacheInterface
-{
- public function generateKey(string $name, string $className): string
- {
- return '';
- }
-
- public function write(string $key, string $content): void
- {
- }
-
- public function load(string $key): void
- {
- }
-
- public function getTimestamp(string $key): int
- {
- return 0;
- }
-}
diff --git a/system/vendor/twig/twig/src/Compiler.php b/system/vendor/twig/twig/src/Compiler.php
deleted file mode 100644
index eb652c6..0000000
--- a/system/vendor/twig/twig/src/Compiler.php
+++ /dev/null
@@ -1,223 +0,0 @@
-
- */
-class Compiler
-{
- private $lastLine;
- private $source;
- private $indentation;
- private $env;
- private $debugInfo = [];
- private $sourceOffset;
- private $sourceLine;
- private $varNameSalt = 0;
-
- public function __construct(Environment $env)
- {
- $this->env = $env;
- }
-
- public function getEnvironment(): Environment
- {
- return $this->env;
- }
-
- public function getSource(): string
- {
- return $this->source;
- }
-
- /**
- * @return $this
- */
- public function reset(int $indentation = 0)
- {
- $this->lastLine = null;
- $this->source = '';
- $this->debugInfo = [];
- $this->sourceOffset = 0;
- // source code starts at 1 (as we then increment it when we encounter new lines)
- $this->sourceLine = 1;
- $this->indentation = $indentation;
- $this->varNameSalt = 0;
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function compile(Node $node, int $indentation = 0)
- {
- $this->reset($indentation);
- $node->compile($this);
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function subcompile(Node $node, bool $raw = true)
- {
- if (false === $raw) {
- $this->source .= str_repeat(' ', $this->indentation * 4);
- }
-
- $node->compile($this);
-
- return $this;
- }
-
- /**
- * Adds a raw string to the compiled code.
- *
- * @return $this
- */
- public function raw(string $string)
- {
- $this->source .= $string;
-
- return $this;
- }
-
- /**
- * Writes a string to the compiled code by adding indentation.
- *
- * @return $this
- */
- public function write(...$strings)
- {
- foreach ($strings as $string) {
- $this->source .= str_repeat(' ', $this->indentation * 4).$string;
- }
-
- return $this;
- }
-
- /**
- * Adds a quoted string to the compiled code.
- *
- * @return $this
- */
- public function string(string $value)
- {
- $this->source .= sprintf('"%s"', addcslashes($value, "\0\t\"\$\\"));
-
- return $this;
- }
-
- /**
- * Returns a PHP representation of a given value.
- *
- * @return $this
- */
- public function repr($value)
- {
- if (\is_int($value) || \is_float($value)) {
- if (false !== $locale = setlocale(\LC_NUMERIC, '0')) {
- setlocale(\LC_NUMERIC, 'C');
- }
-
- $this->raw(var_export($value, true));
-
- if (false !== $locale) {
- setlocale(\LC_NUMERIC, $locale);
- }
- } elseif (null === $value) {
- $this->raw('null');
- } elseif (\is_bool($value)) {
- $this->raw($value ? 'true' : 'false');
- } elseif (\is_array($value)) {
- $this->raw('array(');
- $first = true;
- foreach ($value as $key => $v) {
- if (!$first) {
- $this->raw(', ');
- }
- $first = false;
- $this->repr($key);
- $this->raw(' => ');
- $this->repr($v);
- }
- $this->raw(')');
- } else {
- $this->string($value);
- }
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function addDebugInfo(Node $node)
- {
- if ($node->getTemplateLine() != $this->lastLine) {
- $this->write(sprintf("// line %d\n", $node->getTemplateLine()));
-
- $this->sourceLine += substr_count($this->source, "\n", $this->sourceOffset);
- $this->sourceOffset = \strlen($this->source);
- $this->debugInfo[$this->sourceLine] = $node->getTemplateLine();
-
- $this->lastLine = $node->getTemplateLine();
- }
-
- return $this;
- }
-
- public function getDebugInfo(): array
- {
- ksort($this->debugInfo);
-
- return $this->debugInfo;
- }
-
- /**
- * @return $this
- */
- public function indent(int $step = 1)
- {
- $this->indentation += $step;
-
- return $this;
- }
-
- /**
- * @return $this
- *
- * @throws \LogicException When trying to outdent too much so the indentation would become negative
- */
- public function outdent(int $step = 1)
- {
- // can't outdent by more steps than the current indentation level
- if ($this->indentation < $step) {
- throw new \LogicException('Unable to call outdent() as the indentation would become negative.');
- }
-
- $this->indentation -= $step;
-
- return $this;
- }
-
- public function getVarName(): string
- {
- return sprintf('__internal_compile_%d', $this->varNameSalt++);
- }
-}
diff --git a/system/vendor/twig/twig/src/Environment.php b/system/vendor/twig/twig/src/Environment.php
deleted file mode 100644
index d7d51cd..0000000
--- a/system/vendor/twig/twig/src/Environment.php
+++ /dev/null
@@ -1,840 +0,0 @@
-
- */
-class Environment
-{
- public const VERSION = '3.8.0';
- public const VERSION_ID = 30800;
- public const MAJOR_VERSION = 3;
- public const MINOR_VERSION = 8;
- public const RELEASE_VERSION = 0;
- public const EXTRA_VERSION = '';
-
- private $charset;
- private $loader;
- private $debug;
- private $autoReload;
- private $cache;
- private $lexer;
- private $parser;
- private $compiler;
- /** @var array */
- private $globals = [];
- private $resolvedGlobals;
- private $loadedTemplates;
- private $strictVariables;
- private $templateClassPrefix = '__TwigTemplate_';
- private $originalCache;
- private $extensionSet;
- private $runtimeLoaders = [];
- private $runtimes = [];
- private $optionsHash;
-
- /**
- * Constructor.
- *
- * Available options:
- *
- * * debug: When set to true, it automatically set "auto_reload" to true as
- * well (default to false).
- *
- * * charset: The charset used by the templates (default to UTF-8).
- *
- * * cache: An absolute path where to store the compiled templates,
- * a \Twig\Cache\CacheInterface implementation,
- * or false to disable compilation cache (default).
- *
- * * auto_reload: Whether to reload the template if the original source changed.
- * If you don't provide the auto_reload option, it will be
- * determined automatically based on the debug value.
- *
- * * strict_variables: Whether to ignore invalid variables in templates
- * (default to false).
- *
- * * autoescape: Whether to enable auto-escaping (default to html):
- * * false: disable auto-escaping
- * * html, js: set the autoescaping to one of the supported strategies
- * * name: set the autoescaping strategy based on the template name extension
- * * PHP callback: a PHP callback that returns an escaping strategy based on the template "name"
- *
- * * optimizations: A flag that indicates which optimizations to apply
- * (default to -1 which means that all optimizations are enabled;
- * set it to 0 to disable).
- */
- public function __construct(LoaderInterface $loader, $options = [])
- {
- $this->setLoader($loader);
-
- $options = array_merge([
- 'debug' => false,
- 'charset' => 'UTF-8',
- 'strict_variables' => false,
- 'autoescape' => 'html',
- 'cache' => false,
- 'auto_reload' => null,
- 'optimizations' => -1,
- ], $options);
-
- $this->debug = (bool) $options['debug'];
- $this->setCharset($options['charset'] ?? 'UTF-8');
- $this->autoReload = null === $options['auto_reload'] ? $this->debug : (bool) $options['auto_reload'];
- $this->strictVariables = (bool) $options['strict_variables'];
- $this->setCache($options['cache']);
- $this->extensionSet = new ExtensionSet();
-
- $this->addExtension(new CoreExtension());
- $this->addExtension(new EscaperExtension($options['autoescape']));
- $this->addExtension(new OptimizerExtension($options['optimizations']));
- }
-
- /**
- * Enables debugging mode.
- */
- public function enableDebug()
- {
- $this->debug = true;
- $this->updateOptionsHash();
- }
-
- /**
- * Disables debugging mode.
- */
- public function disableDebug()
- {
- $this->debug = false;
- $this->updateOptionsHash();
- }
-
- /**
- * Checks if debug mode is enabled.
- *
- * @return bool true if debug mode is enabled, false otherwise
- */
- public function isDebug()
- {
- return $this->debug;
- }
-
- /**
- * Enables the auto_reload option.
- */
- public function enableAutoReload()
- {
- $this->autoReload = true;
- }
-
- /**
- * Disables the auto_reload option.
- */
- public function disableAutoReload()
- {
- $this->autoReload = false;
- }
-
- /**
- * Checks if the auto_reload option is enabled.
- *
- * @return bool true if auto_reload is enabled, false otherwise
- */
- public function isAutoReload()
- {
- return $this->autoReload;
- }
-
- /**
- * Enables the strict_variables option.
- */
- public function enableStrictVariables()
- {
- $this->strictVariables = true;
- $this->updateOptionsHash();
- }
-
- /**
- * Disables the strict_variables option.
- */
- public function disableStrictVariables()
- {
- $this->strictVariables = false;
- $this->updateOptionsHash();
- }
-
- /**
- * Checks if the strict_variables option is enabled.
- *
- * @return bool true if strict_variables is enabled, false otherwise
- */
- public function isStrictVariables()
- {
- return $this->strictVariables;
- }
-
- /**
- * Gets the current cache implementation.
- *
- * @param bool $original Whether to return the original cache option or the real cache instance
- *
- * @return CacheInterface|string|false A Twig\Cache\CacheInterface implementation,
- * an absolute path to the compiled templates,
- * or false to disable cache
- */
- public function getCache($original = true)
- {
- return $original ? $this->originalCache : $this->cache;
- }
-
- /**
- * Sets the current cache implementation.
- *
- * @param CacheInterface|string|false $cache A Twig\Cache\CacheInterface implementation,
- * an absolute path to the compiled templates,
- * or false to disable cache
- */
- public function setCache($cache)
- {
- if (\is_string($cache)) {
- $this->originalCache = $cache;
- $this->cache = new FilesystemCache($cache, $this->autoReload ? FilesystemCache::FORCE_BYTECODE_INVALIDATION : 0);
- } elseif (false === $cache) {
- $this->originalCache = $cache;
- $this->cache = new NullCache();
- } elseif ($cache instanceof CacheInterface) {
- $this->originalCache = $this->cache = $cache;
- } else {
- throw new \LogicException('Cache can only be a string, false, or a \Twig\Cache\CacheInterface implementation.');
- }
- }
-
- /**
- * Gets the template class associated with the given string.
- *
- * The generated template class is based on the following parameters:
- *
- * * The cache key for the given template;
- * * The currently enabled extensions;
- * * Whether the Twig C extension is available or not;
- * * PHP version;
- * * Twig version;
- * * Options with what environment was created.
- *
- * @param string $name The name for which to calculate the template class name
- * @param int|null $index The index if it is an embedded template
- *
- * @internal
- */
- public function getTemplateClass(string $name, int $index = null): string
- {
- $key = $this->getLoader()->getCacheKey($name).$this->optionsHash;
-
- return $this->templateClassPrefix.hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $key).(null === $index ? '' : '___'.$index);
- }
-
- /**
- * Renders a template.
- *
- * @param string|TemplateWrapper $name The template name
- *
- * @throws LoaderError When the template cannot be found
- * @throws SyntaxError When an error occurred during compilation
- * @throws RuntimeError When an error occurred during rendering
- */
- public function render($name, array $context = []): string
- {
- return $this->load($name)->render($context);
- }
-
- /**
- * Displays a template.
- *
- * @param string|TemplateWrapper $name The template name
- *
- * @throws LoaderError When the template cannot be found
- * @throws SyntaxError When an error occurred during compilation
- * @throws RuntimeError When an error occurred during rendering
- */
- public function display($name, array $context = []): void
- {
- $this->load($name)->display($context);
- }
-
- /**
- * Loads a template.
- *
- * @param string|TemplateWrapper $name The template name
- *
- * @throws LoaderError When the template cannot be found
- * @throws RuntimeError When a previously generated cache is corrupted
- * @throws SyntaxError When an error occurred during compilation
- */
- public function load($name): TemplateWrapper
- {
- if ($name instanceof TemplateWrapper) {
- return $name;
- }
-
- return new TemplateWrapper($this, $this->loadTemplate($this->getTemplateClass($name), $name));
- }
-
- /**
- * Loads a template internal representation.
- *
- * This method is for internal use only and should never be called
- * directly.
- *
- * @param string $name The template name
- * @param int $index The index if it is an embedded template
- *
- * @throws LoaderError When the template cannot be found
- * @throws RuntimeError When a previously generated cache is corrupted
- * @throws SyntaxError When an error occurred during compilation
- *
- * @internal
- */
- public function loadTemplate(string $cls, string $name, int $index = null): Template
- {
- $mainCls = $cls;
- if (null !== $index) {
- $cls .= '___'.$index;
- }
-
- if (isset($this->loadedTemplates[$cls])) {
- return $this->loadedTemplates[$cls];
- }
-
- if (!class_exists($cls, false)) {
- $key = $this->cache->generateKey($name, $mainCls);
-
- if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
- $this->cache->load($key);
- }
-
- if (!class_exists($cls, false)) {
- $source = $this->getLoader()->getSourceContext($name);
- $content = $this->compileSource($source);
- $this->cache->write($key, $content);
- $this->cache->load($key);
-
- if (!class_exists($mainCls, false)) {
- /* Last line of defense if either $this->bcWriteCacheFile was used,
- * $this->cache is implemented as a no-op or we have a race condition
- * where the cache was cleared between the above calls to write to and load from
- * the cache.
- */
- eval('?>'.$content);
- }
-
- if (!class_exists($cls, false)) {
- throw new RuntimeError(sprintf('Failed to load Twig template "%s", index "%s": cache might be corrupted.', $name, $index), -1, $source);
- }
- }
- }
-
- $this->extensionSet->initRuntime();
-
- return $this->loadedTemplates[$cls] = new $cls($this);
- }
-
- /**
- * Creates a template from source.
- *
- * This method should not be used as a generic way to load templates.
- *
- * @param string $template The template source
- * @param string $name An optional name of the template to be used in error messages
- *
- * @throws LoaderError When the template cannot be found
- * @throws SyntaxError When an error occurred during compilation
- */
- public function createTemplate(string $template, string $name = null): TemplateWrapper
- {
- $hash = hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $template, false);
- if (null !== $name) {
- $name = sprintf('%s (string template %s)', $name, $hash);
- } else {
- $name = sprintf('__string_template__%s', $hash);
- }
-
- $loader = new ChainLoader([
- new ArrayLoader([$name => $template]),
- $current = $this->getLoader(),
- ]);
-
- $this->setLoader($loader);
- try {
- return new TemplateWrapper($this, $this->loadTemplate($this->getTemplateClass($name), $name));
- } finally {
- $this->setLoader($current);
- }
- }
-
- /**
- * Returns true if the template is still fresh.
- *
- * Besides checking the loader for freshness information,
- * this method also checks if the enabled extensions have
- * not changed.
- *
- * @param int $time The last modification time of the cached template
- */
- public function isTemplateFresh(string $name, int $time): bool
- {
- return $this->extensionSet->getLastModified() <= $time && $this->getLoader()->isFresh($name, $time);
- }
-
- /**
- * Tries to load a template consecutively from an array.
- *
- * Similar to load() but it also accepts instances of \Twig\Template and
- * \Twig\TemplateWrapper, and an array of templates where each is tried to be loaded.
- *
- * @param string|TemplateWrapper|array $names A template or an array of templates to try consecutively
- *
- * @throws LoaderError When none of the templates can be found
- * @throws SyntaxError When an error occurred during compilation
- */
- public function resolveTemplate($names): TemplateWrapper
- {
- if (!\is_array($names)) {
- return $this->load($names);
- }
-
- $count = \count($names);
- foreach ($names as $name) {
- if ($name instanceof Template) {
- return $name;
- }
- if ($name instanceof TemplateWrapper) {
- return $name;
- }
-
- if (1 !== $count && !$this->getLoader()->exists($name)) {
- continue;
- }
-
- return $this->load($name);
- }
-
- throw new LoaderError(sprintf('Unable to find one of the following templates: "%s".', implode('", "', $names)));
- }
-
- public function setLexer(Lexer $lexer)
- {
- $this->lexer = $lexer;
- }
-
- /**
- * @throws SyntaxError When the code is syntactically wrong
- */
- public function tokenize(Source $source): TokenStream
- {
- if (null === $this->lexer) {
- $this->lexer = new Lexer($this);
- }
-
- return $this->lexer->tokenize($source);
- }
-
- public function setParser(Parser $parser)
- {
- $this->parser = $parser;
- }
-
- /**
- * Converts a token stream to a node tree.
- *
- * @throws SyntaxError When the token stream is syntactically or semantically wrong
- */
- public function parse(TokenStream $stream): ModuleNode
- {
- if (null === $this->parser) {
- $this->parser = new Parser($this);
- }
-
- return $this->parser->parse($stream);
- }
-
- public function setCompiler(Compiler $compiler)
- {
- $this->compiler = $compiler;
- }
-
- /**
- * Compiles a node and returns the PHP code.
- */
- public function compile(Node $node): string
- {
- if (null === $this->compiler) {
- $this->compiler = new Compiler($this);
- }
-
- return $this->compiler->compile($node)->getSource();
- }
-
- /**
- * Compiles a template source code.
- *
- * @throws SyntaxError When there was an error during tokenizing, parsing or compiling
- */
- public function compileSource(Source $source): string
- {
- try {
- return $this->compile($this->parse($this->tokenize($source)));
- } catch (Error $e) {
- $e->setSourceContext($source);
- throw $e;
- } catch (\Exception $e) {
- throw new SyntaxError(sprintf('An exception has been thrown during the compilation of a template ("%s").', $e->getMessage()), -1, $source, $e);
- }
- }
-
- public function setLoader(LoaderInterface $loader)
- {
- $this->loader = $loader;
- }
-
- public function getLoader(): LoaderInterface
- {
- return $this->loader;
- }
-
- public function setCharset(string $charset)
- {
- if ('UTF8' === $charset = null === $charset ? null : strtoupper($charset)) {
- // iconv on Windows requires "UTF-8" instead of "UTF8"
- $charset = 'UTF-8';
- }
-
- $this->charset = $charset;
- }
-
- public function getCharset(): string
- {
- return $this->charset;
- }
-
- public function hasExtension(string $class): bool
- {
- return $this->extensionSet->hasExtension($class);
- }
-
- public function addRuntimeLoader(RuntimeLoaderInterface $loader)
- {
- $this->runtimeLoaders[] = $loader;
- }
-
- /**
- * @template TExtension of ExtensionInterface
- *
- * @param class-string $class
- *
- * @return TExtension
- */
- public function getExtension(string $class): ExtensionInterface
- {
- return $this->extensionSet->getExtension($class);
- }
-
- /**
- * Returns the runtime implementation of a Twig element (filter/function/tag/test).
- *
- * @template TRuntime of object
- *
- * @param class-string $class A runtime class name
- *
- * @return TRuntime The runtime implementation
- *
- * @throws RuntimeError When the template cannot be found
- */
- public function getRuntime(string $class)
- {
- if (isset($this->runtimes[$class])) {
- return $this->runtimes[$class];
- }
-
- foreach ($this->runtimeLoaders as $loader) {
- if (null !== $runtime = $loader->load($class)) {
- return $this->runtimes[$class] = $runtime;
- }
- }
-
- throw new RuntimeError(sprintf('Unable to load the "%s" runtime.', $class));
- }
-
- public function addExtension(ExtensionInterface $extension)
- {
- $this->extensionSet->addExtension($extension);
- $this->updateOptionsHash();
- }
-
- /**
- * @param ExtensionInterface[] $extensions An array of extensions
- */
- public function setExtensions(array $extensions)
- {
- $this->extensionSet->setExtensions($extensions);
- $this->updateOptionsHash();
- }
-
- /**
- * @return ExtensionInterface[] An array of extensions (keys are for internal usage only and should not be relied on)
- */
- public function getExtensions(): array
- {
- return $this->extensionSet->getExtensions();
- }
-
- public function addTokenParser(TokenParserInterface $parser)
- {
- $this->extensionSet->addTokenParser($parser);
- }
-
- /**
- * @return TokenParserInterface[]
- *
- * @internal
- */
- public function getTokenParsers(): array
- {
- return $this->extensionSet->getTokenParsers();
- }
-
- /**
- * @internal
- */
- public function getTokenParser(string $name): ?TokenParserInterface
- {
- return $this->extensionSet->getTokenParser($name);
- }
-
- public function registerUndefinedTokenParserCallback(callable $callable): void
- {
- $this->extensionSet->registerUndefinedTokenParserCallback($callable);
- }
-
- public function addNodeVisitor(NodeVisitorInterface $visitor)
- {
- $this->extensionSet->addNodeVisitor($visitor);
- }
-
- /**
- * @return NodeVisitorInterface[]
- *
- * @internal
- */
- public function getNodeVisitors(): array
- {
- return $this->extensionSet->getNodeVisitors();
- }
-
- public function addFilter(TwigFilter $filter)
- {
- $this->extensionSet->addFilter($filter);
- }
-
- /**
- * @internal
- */
- public function getFilter(string $name): ?TwigFilter
- {
- return $this->extensionSet->getFilter($name);
- }
-
- public function registerUndefinedFilterCallback(callable $callable): void
- {
- $this->extensionSet->registerUndefinedFilterCallback($callable);
- }
-
- /**
- * Gets the registered Filters.
- *
- * Be warned that this method cannot return filters defined with registerUndefinedFilterCallback.
- *
- * @return TwigFilter[]
- *
- * @see registerUndefinedFilterCallback
- *
- * @internal
- */
- public function getFilters(): array
- {
- return $this->extensionSet->getFilters();
- }
-
- public function addTest(TwigTest $test)
- {
- $this->extensionSet->addTest($test);
- }
-
- /**
- * @return TwigTest[]
- *
- * @internal
- */
- public function getTests(): array
- {
- return $this->extensionSet->getTests();
- }
-
- /**
- * @internal
- */
- public function getTest(string $name): ?TwigTest
- {
- return $this->extensionSet->getTest($name);
- }
-
- public function addFunction(TwigFunction $function)
- {
- $this->extensionSet->addFunction($function);
- }
-
- /**
- * @internal
- */
- public function getFunction(string $name): ?TwigFunction
- {
- return $this->extensionSet->getFunction($name);
- }
-
- public function registerUndefinedFunctionCallback(callable $callable): void
- {
- $this->extensionSet->registerUndefinedFunctionCallback($callable);
- }
-
- /**
- * Gets registered functions.
- *
- * Be warned that this method cannot return functions defined with registerUndefinedFunctionCallback.
- *
- * @return TwigFunction[]
- *
- * @see registerUndefinedFunctionCallback
- *
- * @internal
- */
- public function getFunctions(): array
- {
- return $this->extensionSet->getFunctions();
- }
-
- /**
- * Registers a Global.
- *
- * New globals can be added before compiling or rendering a template;
- * but after, you can only update existing globals.
- *
- * @param mixed $value The global value
- */
- public function addGlobal(string $name, $value)
- {
- if ($this->extensionSet->isInitialized() && !\array_key_exists($name, $this->getGlobals())) {
- throw new \LogicException(sprintf('Unable to add global "%s" as the runtime or the extensions have already been initialized.', $name));
- }
-
- if (null !== $this->resolvedGlobals) {
- $this->resolvedGlobals[$name] = $value;
- } else {
- $this->globals[$name] = $value;
- }
- }
-
- /**
- * @internal
- *
- * @return array
- */
- public function getGlobals(): array
- {
- if ($this->extensionSet->isInitialized()) {
- if (null === $this->resolvedGlobals) {
- $this->resolvedGlobals = array_merge($this->extensionSet->getGlobals(), $this->globals);
- }
-
- return $this->resolvedGlobals;
- }
-
- return array_merge($this->extensionSet->getGlobals(), $this->globals);
- }
-
- public function mergeGlobals(array $context): array
- {
- // we don't use array_merge as the context being generally
- // bigger than globals, this code is faster.
- foreach ($this->getGlobals() as $key => $value) {
- if (!\array_key_exists($key, $context)) {
- $context[$key] = $value;
- }
- }
-
- return $context;
- }
-
- /**
- * @internal
- *
- * @return array}>
- */
- public function getUnaryOperators(): array
- {
- return $this->extensionSet->getUnaryOperators();
- }
-
- /**
- * @internal
- *
- * @return array, associativity: ExpressionParser::OPERATOR_*}>
- */
- public function getBinaryOperators(): array
- {
- return $this->extensionSet->getBinaryOperators();
- }
-
- private function updateOptionsHash(): void
- {
- $this->optionsHash = implode(':', [
- $this->extensionSet->getSignature(),
- \PHP_MAJOR_VERSION,
- \PHP_MINOR_VERSION,
- self::VERSION,
- (int) $this->debug,
- (int) $this->strictVariables,
- ]);
- }
-}
diff --git a/system/vendor/twig/twig/src/Error/Error.php b/system/vendor/twig/twig/src/Error/Error.php
deleted file mode 100644
index bca1fa6..0000000
--- a/system/vendor/twig/twig/src/Error/Error.php
+++ /dev/null
@@ -1,227 +0,0 @@
-
- */
-class Error extends \Exception
-{
- private $lineno;
- private $name;
- private $rawMessage;
- private $sourcePath;
- private $sourceCode;
-
- /**
- * Constructor.
- *
- * By default, automatic guessing is enabled.
- *
- * @param string $message The error message
- * @param int $lineno The template line where the error occurred
- * @param Source|null $source The source context where the error occurred
- */
- public function __construct(string $message, int $lineno = -1, Source $source = null, \Throwable $previous = null)
- {
- parent::__construct('', 0, $previous);
-
- if (null === $source) {
- $name = null;
- } else {
- $name = $source->getName();
- $this->sourceCode = $source->getCode();
- $this->sourcePath = $source->getPath();
- }
-
- $this->lineno = $lineno;
- $this->name = $name;
- $this->rawMessage = $message;
- $this->updateRepr();
- }
-
- public function getRawMessage(): string
- {
- return $this->rawMessage;
- }
-
- public function getTemplateLine(): int
- {
- return $this->lineno;
- }
-
- public function setTemplateLine(int $lineno): void
- {
- $this->lineno = $lineno;
-
- $this->updateRepr();
- }
-
- public function getSourceContext(): ?Source
- {
- return $this->name ? new Source($this->sourceCode, $this->name, $this->sourcePath) : null;
- }
-
- public function setSourceContext(Source $source = null): void
- {
- if (null === $source) {
- $this->sourceCode = $this->name = $this->sourcePath = null;
- } else {
- $this->sourceCode = $source->getCode();
- $this->name = $source->getName();
- $this->sourcePath = $source->getPath();
- }
-
- $this->updateRepr();
- }
-
- public function guess(): void
- {
- $this->guessTemplateInfo();
- $this->updateRepr();
- }
-
- public function appendMessage($rawMessage): void
- {
- $this->rawMessage .= $rawMessage;
- $this->updateRepr();
- }
-
- private function updateRepr(): void
- {
- $this->message = $this->rawMessage;
-
- if ($this->sourcePath && $this->lineno > 0) {
- $this->file = $this->sourcePath;
- $this->line = $this->lineno;
-
- return;
- }
-
- $dot = false;
- if (str_ends_with($this->message, '.')) {
- $this->message = substr($this->message, 0, -1);
- $dot = true;
- }
-
- $questionMark = false;
- if (str_ends_with($this->message, '?')) {
- $this->message = substr($this->message, 0, -1);
- $questionMark = true;
- }
-
- if ($this->name) {
- if (\is_string($this->name) || (\is_object($this->name) && method_exists($this->name, '__toString'))) {
- $name = sprintf('"%s"', $this->name);
- } else {
- $name = json_encode($this->name);
- }
- $this->message .= sprintf(' in %s', $name);
- }
-
- if ($this->lineno && $this->lineno >= 0) {
- $this->message .= sprintf(' at line %d', $this->lineno);
- }
-
- if ($dot) {
- $this->message .= '.';
- }
-
- if ($questionMark) {
- $this->message .= '?';
- }
- }
-
- private function guessTemplateInfo(): void
- {
- $template = null;
- $templateClass = null;
-
- $backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS | \DEBUG_BACKTRACE_PROVIDE_OBJECT);
- foreach ($backtrace as $trace) {
- if (isset($trace['object']) && $trace['object'] instanceof Template) {
- $currentClass = \get_class($trace['object']);
- $isEmbedContainer = null === $templateClass ? false : str_starts_with($templateClass, $currentClass);
- if (null === $this->name || ($this->name == $trace['object']->getTemplateName() && !$isEmbedContainer)) {
- $template = $trace['object'];
- $templateClass = \get_class($trace['object']);
- }
- }
- }
-
- // update template name
- if (null !== $template && null === $this->name) {
- $this->name = $template->getTemplateName();
- }
-
- // update template path if any
- if (null !== $template && null === $this->sourcePath) {
- $src = $template->getSourceContext();
- $this->sourceCode = $src->getCode();
- $this->sourcePath = $src->getPath();
- }
-
- if (null === $template || $this->lineno > -1) {
- return;
- }
-
- $r = new \ReflectionObject($template);
- $file = $r->getFileName();
-
- $exceptions = [$e = $this];
- while ($e = $e->getPrevious()) {
- $exceptions[] = $e;
- }
-
- while ($e = array_pop($exceptions)) {
- $traces = $e->getTrace();
- array_unshift($traces, ['file' => $e->getFile(), 'line' => $e->getLine()]);
-
- while ($trace = array_shift($traces)) {
- if (!isset($trace['file']) || !isset($trace['line']) || $file != $trace['file']) {
- continue;
- }
-
- foreach ($template->getDebugInfo() as $codeLine => $templateLine) {
- if ($codeLine <= $trace['line']) {
- // update template line
- $this->lineno = $templateLine;
-
- return;
- }
- }
- }
- }
- }
-}
diff --git a/system/vendor/twig/twig/src/Error/LoaderError.php b/system/vendor/twig/twig/src/Error/LoaderError.php
deleted file mode 100644
index 7c8c23c..0000000
--- a/system/vendor/twig/twig/src/Error/LoaderError.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- */
-class LoaderError extends Error
-{
-}
diff --git a/system/vendor/twig/twig/src/Error/RuntimeError.php b/system/vendor/twig/twig/src/Error/RuntimeError.php
deleted file mode 100644
index f6b8476..0000000
--- a/system/vendor/twig/twig/src/Error/RuntimeError.php
+++ /dev/null
@@ -1,22 +0,0 @@
-
- */
-class RuntimeError extends Error
-{
-}
diff --git a/system/vendor/twig/twig/src/Error/SyntaxError.php b/system/vendor/twig/twig/src/Error/SyntaxError.php
deleted file mode 100644
index 77c437c..0000000
--- a/system/vendor/twig/twig/src/Error/SyntaxError.php
+++ /dev/null
@@ -1,46 +0,0 @@
-
- */
-class SyntaxError extends Error
-{
- /**
- * Tweaks the error message to include suggestions.
- *
- * @param string $name The original name of the item that does not exist
- * @param array $items An array of possible items
- */
- public function addSuggestions(string $name, array $items): void
- {
- $alternatives = [];
- foreach ($items as $item) {
- $lev = levenshtein($name, $item);
- if ($lev <= \strlen($name) / 3 || str_contains($item, $name)) {
- $alternatives[$item] = $lev;
- }
- }
-
- if (!$alternatives) {
- return;
- }
-
- asort($alternatives);
-
- $this->appendMessage(sprintf(' Did you mean "%s"?', implode('", "', array_keys($alternatives))));
- }
-}
diff --git a/system/vendor/twig/twig/src/ExpressionParser.php b/system/vendor/twig/twig/src/ExpressionParser.php
deleted file mode 100644
index 13e0f08..0000000
--- a/system/vendor/twig/twig/src/ExpressionParser.php
+++ /dev/null
@@ -1,841 +0,0 @@
-
- */
-class ExpressionParser
-{
- public const OPERATOR_LEFT = 1;
- public const OPERATOR_RIGHT = 2;
-
- private $parser;
- private $env;
- /** @var array}> */
- private $unaryOperators;
- /** @var array, associativity: self::OPERATOR_*}> */
- private $binaryOperators;
-
- public function __construct(Parser $parser, Environment $env)
- {
- $this->parser = $parser;
- $this->env = $env;
- $this->unaryOperators = $env->getUnaryOperators();
- $this->binaryOperators = $env->getBinaryOperators();
- }
-
- public function parseExpression($precedence = 0, $allowArrow = false)
- {
- if ($allowArrow && $arrow = $this->parseArrow()) {
- return $arrow;
- }
-
- $expr = $this->getPrimary();
- $token = $this->parser->getCurrentToken();
- while ($this->isBinary($token) && $this->binaryOperators[$token->getValue()]['precedence'] >= $precedence) {
- $op = $this->binaryOperators[$token->getValue()];
- $this->parser->getStream()->next();
-
- if ('is not' === $token->getValue()) {
- $expr = $this->parseNotTestExpression($expr);
- } elseif ('is' === $token->getValue()) {
- $expr = $this->parseTestExpression($expr);
- } elseif (isset($op['callable'])) {
- $expr = $op['callable']($this->parser, $expr);
- } else {
- $expr1 = $this->parseExpression(self::OPERATOR_LEFT === $op['associativity'] ? $op['precedence'] + 1 : $op['precedence'], true);
- $class = $op['class'];
- $expr = new $class($expr, $expr1, $token->getLine());
- }
-
- $token = $this->parser->getCurrentToken();
- }
-
- if (0 === $precedence) {
- return $this->parseConditionalExpression($expr);
- }
-
- return $expr;
- }
-
- /**
- * @return ArrowFunctionExpression|null
- */
- private function parseArrow()
- {
- $stream = $this->parser->getStream();
-
- // short array syntax (one argument, no parentheses)?
- if ($stream->look(1)->test(/* Token::ARROW_TYPE */ 12)) {
- $line = $stream->getCurrent()->getLine();
- $token = $stream->expect(/* Token::NAME_TYPE */ 5);
- $names = [new AssignNameExpression($token->getValue(), $token->getLine())];
- $stream->expect(/* Token::ARROW_TYPE */ 12);
-
- return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line);
- }
-
- // first, determine if we are parsing an arrow function by finding => (long form)
- $i = 0;
- if (!$stream->look($i)->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) {
- return null;
- }
- ++$i;
- while (true) {
- // variable name
- ++$i;
- if (!$stream->look($i)->test(/* Token::PUNCTUATION_TYPE */ 9, ',')) {
- break;
- }
- ++$i;
- }
- if (!$stream->look($i)->test(/* Token::PUNCTUATION_TYPE */ 9, ')')) {
- return null;
- }
- ++$i;
- if (!$stream->look($i)->test(/* Token::ARROW_TYPE */ 12)) {
- return null;
- }
-
- // yes, let's parse it properly
- $token = $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '(');
- $line = $token->getLine();
-
- $names = [];
- while (true) {
- $token = $stream->expect(/* Token::NAME_TYPE */ 5);
- $names[] = new AssignNameExpression($token->getValue(), $token->getLine());
-
- if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) {
- break;
- }
- }
- $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ')');
- $stream->expect(/* Token::ARROW_TYPE */ 12);
-
- return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line);
- }
-
- private function getPrimary(): AbstractExpression
- {
- $token = $this->parser->getCurrentToken();
-
- if ($this->isUnary($token)) {
- $operator = $this->unaryOperators[$token->getValue()];
- $this->parser->getStream()->next();
- $expr = $this->parseExpression($operator['precedence']);
- $class = $operator['class'];
-
- return $this->parsePostfixExpression(new $class($expr, $token->getLine()));
- } elseif ($token->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) {
- $this->parser->getStream()->next();
- $expr = $this->parseExpression();
- $this->parser->getStream()->expect(/* Token::PUNCTUATION_TYPE */ 9, ')', 'An opened parenthesis is not properly closed');
-
- return $this->parsePostfixExpression($expr);
- }
-
- return $this->parsePrimaryExpression();
- }
-
- private function parseConditionalExpression($expr): AbstractExpression
- {
- while ($this->parser->getStream()->nextIf(/* Token::PUNCTUATION_TYPE */ 9, '?')) {
- if (!$this->parser->getStream()->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ':')) {
- $expr2 = $this->parseExpression();
- if ($this->parser->getStream()->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ':')) {
- // Ternary operator (expr ? expr2 : expr3)
- $expr3 = $this->parseExpression();
- } else {
- // Ternary without else (expr ? expr2)
- $expr3 = new ConstantExpression('', $this->parser->getCurrentToken()->getLine());
- }
- } else {
- // Ternary without then (expr ?: expr3)
- $expr2 = $expr;
- $expr3 = $this->parseExpression();
- }
-
- $expr = new ConditionalExpression($expr, $expr2, $expr3, $this->parser->getCurrentToken()->getLine());
- }
-
- return $expr;
- }
-
- private function isUnary(Token $token): bool
- {
- return $token->test(/* Token::OPERATOR_TYPE */ 8) && isset($this->unaryOperators[$token->getValue()]);
- }
-
- private function isBinary(Token $token): bool
- {
- return $token->test(/* Token::OPERATOR_TYPE */ 8) && isset($this->binaryOperators[$token->getValue()]);
- }
-
- public function parsePrimaryExpression()
- {
- $token = $this->parser->getCurrentToken();
- switch ($token->getType()) {
- case /* Token::NAME_TYPE */ 5:
- $this->parser->getStream()->next();
- switch ($token->getValue()) {
- case 'true':
- case 'TRUE':
- $node = new ConstantExpression(true, $token->getLine());
- break;
-
- case 'false':
- case 'FALSE':
- $node = new ConstantExpression(false, $token->getLine());
- break;
-
- case 'none':
- case 'NONE':
- case 'null':
- case 'NULL':
- $node = new ConstantExpression(null, $token->getLine());
- break;
-
- default:
- if ('(' === $this->parser->getCurrentToken()->getValue()) {
- $node = $this->getFunctionNode($token->getValue(), $token->getLine());
- } else {
- $node = new NameExpression($token->getValue(), $token->getLine());
- }
- }
- break;
-
- case /* Token::NUMBER_TYPE */ 6:
- $this->parser->getStream()->next();
- $node = new ConstantExpression($token->getValue(), $token->getLine());
- break;
-
- case /* Token::STRING_TYPE */ 7:
- case /* Token::INTERPOLATION_START_TYPE */ 10:
- $node = $this->parseStringExpression();
- break;
-
- case /* Token::OPERATOR_TYPE */ 8:
- if (preg_match(Lexer::REGEX_NAME, $token->getValue(), $matches) && $matches[0] == $token->getValue()) {
- // in this context, string operators are variable names
- $this->parser->getStream()->next();
- $node = new NameExpression($token->getValue(), $token->getLine());
- break;
- }
-
- if (isset($this->unaryOperators[$token->getValue()])) {
- $class = $this->unaryOperators[$token->getValue()]['class'];
- if (!\in_array($class, [NegUnary::class, PosUnary::class])) {
- throw new SyntaxError(sprintf('Unexpected unary operator "%s".', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext());
- }
-
- $this->parser->getStream()->next();
- $expr = $this->parsePrimaryExpression();
-
- $node = new $class($expr, $token->getLine());
- break;
- }
-
- // no break
- default:
- if ($token->test(/* Token::PUNCTUATION_TYPE */ 9, '[')) {
- $node = $this->parseArrayExpression();
- } elseif ($token->test(/* Token::PUNCTUATION_TYPE */ 9, '{')) {
- $node = $this->parseHashExpression();
- } elseif ($token->test(/* Token::OPERATOR_TYPE */ 8, '=') && ('==' === $this->parser->getStream()->look(-1)->getValue() || '!=' === $this->parser->getStream()->look(-1)->getValue())) {
- throw new SyntaxError(sprintf('Unexpected operator of value "%s". Did you try to use "===" or "!==" for strict comparison? Use "is same as(value)" instead.', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext());
- } else {
- throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s".', Token::typeToEnglish($token->getType()), $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext());
- }
- }
-
- return $this->parsePostfixExpression($node);
- }
-
- public function parseStringExpression()
- {
- $stream = $this->parser->getStream();
-
- $nodes = [];
- // a string cannot be followed by another string in a single expression
- $nextCanBeString = true;
- while (true) {
- if ($nextCanBeString && $token = $stream->nextIf(/* Token::STRING_TYPE */ 7)) {
- $nodes[] = new ConstantExpression($token->getValue(), $token->getLine());
- $nextCanBeString = false;
- } elseif ($stream->nextIf(/* Token::INTERPOLATION_START_TYPE */ 10)) {
- $nodes[] = $this->parseExpression();
- $stream->expect(/* Token::INTERPOLATION_END_TYPE */ 11);
- $nextCanBeString = true;
- } else {
- break;
- }
- }
-
- $expr = array_shift($nodes);
- foreach ($nodes as $node) {
- $expr = new ConcatBinary($expr, $node, $node->getTemplateLine());
- }
-
- return $expr;
- }
-
- public function parseArrayExpression()
- {
- $stream = $this->parser->getStream();
- $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '[', 'An array element was expected');
-
- $node = new ArrayExpression([], $stream->getCurrent()->getLine());
- $first = true;
- while (!$stream->test(/* Token::PUNCTUATION_TYPE */ 9, ']')) {
- if (!$first) {
- $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ',', 'An array element must be followed by a comma');
-
- // trailing ,?
- if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, ']')) {
- break;
- }
- }
- $first = false;
-
- if ($stream->test(/* Token::SPREAD_TYPE */ 13)) {
- $stream->next();
- $expr = $this->parseExpression();
- $expr->setAttribute('spread', true);
- $node->addElement($expr);
- } else {
- $node->addElement($this->parseExpression());
- }
- }
- $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ']', 'An opened array is not properly closed');
-
- return $node;
- }
-
- public function parseHashExpression()
- {
- $stream = $this->parser->getStream();
- $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '{', 'A hash element was expected');
-
- $node = new ArrayExpression([], $stream->getCurrent()->getLine());
- $first = true;
- while (!$stream->test(/* Token::PUNCTUATION_TYPE */ 9, '}')) {
- if (!$first) {
- $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ',', 'A hash value must be followed by a comma');
-
- // trailing ,?
- if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, '}')) {
- break;
- }
- }
- $first = false;
-
- if ($stream->test(/* Token::SPREAD_TYPE */ 13)) {
- $stream->next();
- $value = $this->parseExpression();
- $value->setAttribute('spread', true);
- $node->addElement($value);
- continue;
- }
-
- // a hash key can be:
- //
- // * a number -- 12
- // * a string -- 'a'
- // * a name, which is equivalent to a string -- a
- // * an expression, which must be enclosed in parentheses -- (1 + 2)
- if ($token = $stream->nextIf(/* Token::NAME_TYPE */ 5)) {
- $key = new ConstantExpression($token->getValue(), $token->getLine());
-
- // {a} is a shortcut for {a:a}
- if ($stream->test(Token::PUNCTUATION_TYPE, [',', '}'])) {
- $value = new NameExpression($key->getAttribute('value'), $key->getTemplateLine());
- $node->addElement($value, $key);
- continue;
- }
- } elseif (($token = $stream->nextIf(/* Token::STRING_TYPE */ 7)) || $token = $stream->nextIf(/* Token::NUMBER_TYPE */ 6)) {
- $key = new ConstantExpression($token->getValue(), $token->getLine());
- } elseif ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) {
- $key = $this->parseExpression();
- } else {
- $current = $stream->getCurrent();
-
- throw new SyntaxError(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s".', Token::typeToEnglish($current->getType()), $current->getValue()), $current->getLine(), $stream->getSourceContext());
- }
-
- $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ':', 'A hash key must be followed by a colon (:)');
- $value = $this->parseExpression();
-
- $node->addElement($value, $key);
- }
- $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '}', 'An opened hash is not properly closed');
-
- return $node;
- }
-
- public function parsePostfixExpression($node)
- {
- while (true) {
- $token = $this->parser->getCurrentToken();
- if (/* Token::PUNCTUATION_TYPE */ 9 == $token->getType()) {
- if ('.' == $token->getValue() || '[' == $token->getValue()) {
- $node = $this->parseSubscriptExpression($node);
- } elseif ('|' == $token->getValue()) {
- $node = $this->parseFilterExpression($node);
- } else {
- break;
- }
- } else {
- break;
- }
- }
-
- return $node;
- }
-
- public function getFunctionNode($name, $line)
- {
- switch ($name) {
- case 'parent':
- $this->parseArguments();
- if (!\count($this->parser->getBlockStack())) {
- throw new SyntaxError('Calling "parent" outside a block is forbidden.', $line, $this->parser->getStream()->getSourceContext());
- }
-
- if (!$this->parser->getParent() && !$this->parser->hasTraits()) {
- throw new SyntaxError('Calling "parent" on a template that does not extend nor "use" another template is forbidden.', $line, $this->parser->getStream()->getSourceContext());
- }
-
- return new ParentExpression($this->parser->peekBlockStack(), $line);
- case 'block':
- $args = $this->parseArguments();
- if (\count($args) < 1) {
- throw new SyntaxError('The "block" function takes one argument (the block name).', $line, $this->parser->getStream()->getSourceContext());
- }
-
- return new BlockReferenceExpression($args->getNode(0), \count($args) > 1 ? $args->getNode(1) : null, $line);
- case 'attribute':
- $args = $this->parseArguments();
- if (\count($args) < 2) {
- throw new SyntaxError('The "attribute" function takes at least two arguments (the variable and the attributes).', $line, $this->parser->getStream()->getSourceContext());
- }
-
- return new GetAttrExpression($args->getNode(0), $args->getNode(1), \count($args) > 2 ? $args->getNode(2) : null, Template::ANY_CALL, $line);
- default:
- if (null !== $alias = $this->parser->getImportedSymbol('function', $name)) {
- $arguments = new ArrayExpression([], $line);
- foreach ($this->parseArguments() as $n) {
- $arguments->addElement($n);
- }
-
- $node = new MethodCallExpression($alias['node'], $alias['name'], $arguments, $line);
- $node->setAttribute('safe', true);
-
- return $node;
- }
-
- $args = $this->parseArguments(true);
- $class = $this->getFunctionNodeClass($name, $line);
-
- return new $class($name, $args, $line);
- }
- }
-
- public function parseSubscriptExpression($node)
- {
- $stream = $this->parser->getStream();
- $token = $stream->next();
- $lineno = $token->getLine();
- $arguments = new ArrayExpression([], $lineno);
- $type = Template::ANY_CALL;
- if ('.' == $token->getValue()) {
- $token = $stream->next();
- if (
- /* Token::NAME_TYPE */ 5 == $token->getType()
- ||
- /* Token::NUMBER_TYPE */ 6 == $token->getType()
- ||
- (/* Token::OPERATOR_TYPE */ 8 == $token->getType() && preg_match(Lexer::REGEX_NAME, $token->getValue()))
- ) {
- $arg = new ConstantExpression($token->getValue(), $lineno);
-
- if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) {
- $type = Template::METHOD_CALL;
- foreach ($this->parseArguments() as $n) {
- $arguments->addElement($n);
- }
- }
- } else {
- throw new SyntaxError(sprintf('Expected name or number, got value "%s" of type %s.', $token->getValue(), Token::typeToEnglish($token->getType())), $lineno, $stream->getSourceContext());
- }
-
- if ($node instanceof NameExpression && null !== $this->parser->getImportedSymbol('template', $node->getAttribute('name'))) {
- $name = $arg->getAttribute('value');
-
- $node = new MethodCallExpression($node, 'macro_'.$name, $arguments, $lineno);
- $node->setAttribute('safe', true);
-
- return $node;
- }
- } else {
- $type = Template::ARRAY_CALL;
-
- // slice?
- $slice = false;
- if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, ':')) {
- $slice = true;
- $arg = new ConstantExpression(0, $token->getLine());
- } else {
- $arg = $this->parseExpression();
- }
-
- if ($stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ':')) {
- $slice = true;
- }
-
- if ($slice) {
- if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, ']')) {
- $length = new ConstantExpression(null, $token->getLine());
- } else {
- $length = $this->parseExpression();
- }
-
- $class = $this->getFilterNodeClass('slice', $token->getLine());
- $arguments = new Node([$arg, $length]);
- $filter = new $class($node, new ConstantExpression('slice', $token->getLine()), $arguments, $token->getLine());
-
- $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ']');
-
- return $filter;
- }
-
- $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ']');
- }
-
- return new GetAttrExpression($node, $arg, $arguments, $type, $lineno);
- }
-
- public function parseFilterExpression($node)
- {
- $this->parser->getStream()->next();
-
- return $this->parseFilterExpressionRaw($node);
- }
-
- public function parseFilterExpressionRaw($node, $tag = null)
- {
- while (true) {
- $token = $this->parser->getStream()->expect(/* Token::NAME_TYPE */ 5);
-
- $name = new ConstantExpression($token->getValue(), $token->getLine());
- if (!$this->parser->getStream()->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) {
- $arguments = new Node();
- } else {
- $arguments = $this->parseArguments(true, false, true);
- }
-
- $class = $this->getFilterNodeClass($name->getAttribute('value'), $token->getLine());
-
- $node = new $class($node, $name, $arguments, $token->getLine(), $tag);
-
- if (!$this->parser->getStream()->test(/* Token::PUNCTUATION_TYPE */ 9, '|')) {
- break;
- }
-
- $this->parser->getStream()->next();
- }
-
- return $node;
- }
-
- /**
- * Parses arguments.
- *
- * @param bool $namedArguments Whether to allow named arguments or not
- * @param bool $definition Whether we are parsing arguments for a function definition
- *
- * @return Node
- *
- * @throws SyntaxError
- */
- public function parseArguments($namedArguments = false, $definition = false, $allowArrow = false)
- {
- $args = [];
- $stream = $this->parser->getStream();
-
- $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '(', 'A list of arguments must begin with an opening parenthesis');
- while (!$stream->test(/* Token::PUNCTUATION_TYPE */ 9, ')')) {
- if (!empty($args)) {
- $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ',', 'Arguments must be separated by a comma');
-
- // if the comma above was a trailing comma, early exit the argument parse loop
- if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, ')')) {
- break;
- }
- }
-
- if ($definition) {
- $token = $stream->expect(/* Token::NAME_TYPE */ 5, null, 'An argument must be a name');
- $value = new NameExpression($token->getValue(), $this->parser->getCurrentToken()->getLine());
- } else {
- $value = $this->parseExpression(0, $allowArrow);
- }
-
- $name = null;
- if ($namedArguments && $token = $stream->nextIf(/* Token::OPERATOR_TYPE */ 8, '=')) {
- if (!$value instanceof NameExpression) {
- throw new SyntaxError(sprintf('A parameter name must be a string, "%s" given.', \get_class($value)), $token->getLine(), $stream->getSourceContext());
- }
- $name = $value->getAttribute('name');
-
- if ($definition) {
- $value = $this->parsePrimaryExpression();
-
- if (!$this->checkConstantExpression($value)) {
- throw new SyntaxError('A default value for an argument must be a constant (a boolean, a string, a number, or an array).', $token->getLine(), $stream->getSourceContext());
- }
- } else {
- $value = $this->parseExpression(0, $allowArrow);
- }
- }
-
- if ($definition) {
- if (null === $name) {
- $name = $value->getAttribute('name');
- $value = new ConstantExpression(null, $this->parser->getCurrentToken()->getLine());
- }
- $args[$name] = $value;
- } else {
- if (null === $name) {
- $args[] = $value;
- } else {
- $args[$name] = $value;
- }
- }
- }
- $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ')', 'A list of arguments must be closed by a parenthesis');
-
- return new Node($args);
- }
-
- public function parseAssignmentExpression()
- {
- $stream = $this->parser->getStream();
- $targets = [];
- while (true) {
- $token = $this->parser->getCurrentToken();
- if ($stream->test(/* Token::OPERATOR_TYPE */ 8) && preg_match(Lexer::REGEX_NAME, $token->getValue())) {
- // in this context, string operators are variable names
- $this->parser->getStream()->next();
- } else {
- $stream->expect(/* Token::NAME_TYPE */ 5, null, 'Only variables can be assigned to');
- }
- $value = $token->getValue();
- if (\in_array(strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), ['true', 'false', 'none', 'null'])) {
- throw new SyntaxError(sprintf('You cannot assign a value to "%s".', $value), $token->getLine(), $stream->getSourceContext());
- }
- $targets[] = new AssignNameExpression($value, $token->getLine());
-
- if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) {
- break;
- }
- }
-
- return new Node($targets);
- }
-
- public function parseMultitargetExpression()
- {
- $targets = [];
- while (true) {
- $targets[] = $this->parseExpression();
- if (!$this->parser->getStream()->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) {
- break;
- }
- }
-
- return new Node($targets);
- }
-
- private function parseNotTestExpression(Node $node): NotUnary
- {
- return new NotUnary($this->parseTestExpression($node), $this->parser->getCurrentToken()->getLine());
- }
-
- private function parseTestExpression(Node $node): TestExpression
- {
- $stream = $this->parser->getStream();
- list($name, $test) = $this->getTest($node->getTemplateLine());
-
- $class = $this->getTestNodeClass($test);
- $arguments = null;
- if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) {
- $arguments = $this->parseArguments(true);
- } elseif ($test->hasOneMandatoryArgument()) {
- $arguments = new Node([0 => $this->parsePrimaryExpression()]);
- }
-
- if ('defined' === $name && $node instanceof NameExpression && null !== $alias = $this->parser->getImportedSymbol('function', $node->getAttribute('name'))) {
- $node = new MethodCallExpression($alias['node'], $alias['name'], new ArrayExpression([], $node->getTemplateLine()), $node->getTemplateLine());
- $node->setAttribute('safe', true);
- }
-
- return new $class($node, $name, $arguments, $this->parser->getCurrentToken()->getLine());
- }
-
- private function getTest(int $line): array
- {
- $stream = $this->parser->getStream();
- $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue();
-
- if ($test = $this->env->getTest($name)) {
- return [$name, $test];
- }
-
- if ($stream->test(/* Token::NAME_TYPE */ 5)) {
- // try 2-words tests
- $name = $name.' '.$this->parser->getCurrentToken()->getValue();
-
- if ($test = $this->env->getTest($name)) {
- $stream->next();
-
- return [$name, $test];
- }
- }
-
- $e = new SyntaxError(sprintf('Unknown "%s" test.', $name), $line, $stream->getSourceContext());
- $e->addSuggestions($name, array_keys($this->env->getTests()));
-
- throw $e;
- }
-
- private function getTestNodeClass(TwigTest $test): string
- {
- if ($test->isDeprecated()) {
- $stream = $this->parser->getStream();
- $message = sprintf('Twig Test "%s" is deprecated', $test->getName());
-
- if ($test->getDeprecatedVersion()) {
- $message .= sprintf(' since version %s', $test->getDeprecatedVersion());
- }
- if ($test->getAlternative()) {
- $message .= sprintf('. Use "%s" instead', $test->getAlternative());
- }
- $src = $stream->getSourceContext();
- $message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $stream->getCurrent()->getLine());
-
- @trigger_error($message, \E_USER_DEPRECATED);
- }
-
- return $test->getNodeClass();
- }
-
- private function getFunctionNodeClass(string $name, int $line): string
- {
- if (!$function = $this->env->getFunction($name)) {
- $e = new SyntaxError(sprintf('Unknown "%s" function.', $name), $line, $this->parser->getStream()->getSourceContext());
- $e->addSuggestions($name, array_keys($this->env->getFunctions()));
-
- throw $e;
- }
-
- if ($function->isDeprecated()) {
- $message = sprintf('Twig Function "%s" is deprecated', $function->getName());
- if ($function->getDeprecatedVersion()) {
- $message .= sprintf(' since version %s', $function->getDeprecatedVersion());
- }
- if ($function->getAlternative()) {
- $message .= sprintf('. Use "%s" instead', $function->getAlternative());
- }
- $src = $this->parser->getStream()->getSourceContext();
- $message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $line);
-
- @trigger_error($message, \E_USER_DEPRECATED);
- }
-
- return $function->getNodeClass();
- }
-
- private function getFilterNodeClass(string $name, int $line): string
- {
- if (!$filter = $this->env->getFilter($name)) {
- $e = new SyntaxError(sprintf('Unknown "%s" filter.', $name), $line, $this->parser->getStream()->getSourceContext());
- $e->addSuggestions($name, array_keys($this->env->getFilters()));
-
- throw $e;
- }
-
- if ($filter->isDeprecated()) {
- $message = sprintf('Twig Filter "%s" is deprecated', $filter->getName());
- if ($filter->getDeprecatedVersion()) {
- $message .= sprintf(' since version %s', $filter->getDeprecatedVersion());
- }
- if ($filter->getAlternative()) {
- $message .= sprintf('. Use "%s" instead', $filter->getAlternative());
- }
- $src = $this->parser->getStream()->getSourceContext();
- $message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $line);
-
- @trigger_error($message, \E_USER_DEPRECATED);
- }
-
- return $filter->getNodeClass();
- }
-
- // checks that the node only contains "constant" elements
- private function checkConstantExpression(Node $node): bool
- {
- if (!($node instanceof ConstantExpression || $node instanceof ArrayExpression
- || $node instanceof NegUnary || $node instanceof PosUnary
- )) {
- return false;
- }
-
- foreach ($node as $n) {
- if (!$this->checkConstantExpression($n)) {
- return false;
- }
- }
-
- return true;
- }
-}
diff --git a/system/vendor/twig/twig/src/Extension/AbstractExtension.php b/system/vendor/twig/twig/src/Extension/AbstractExtension.php
deleted file mode 100644
index 422925f..0000000
--- a/system/vendor/twig/twig/src/Extension/AbstractExtension.php
+++ /dev/null
@@ -1,45 +0,0 @@
-dateFormats[0] = $format;
- }
-
- if (null !== $dateIntervalFormat) {
- $this->dateFormats[1] = $dateIntervalFormat;
- }
- }
-
- /**
- * Gets the default format to be used by the date filter.
- *
- * @return array The default date format string and the default date interval format string
- */
- public function getDateFormat()
- {
- return $this->dateFormats;
- }
-
- /**
- * Sets the default timezone to be used by the date filter.
- *
- * @param \DateTimeZone|string $timezone The default timezone string or a \DateTimeZone object
- */
- public function setTimezone($timezone)
- {
- $this->timezone = $timezone instanceof \DateTimeZone ? $timezone : new \DateTimeZone($timezone);
- }
-
- /**
- * Gets the default timezone to be used by the date filter.
- *
- * @return \DateTimeZone The default timezone currently in use
- */
- public function getTimezone()
- {
- if (null === $this->timezone) {
- $this->timezone = new \DateTimeZone(date_default_timezone_get());
- }
-
- return $this->timezone;
- }
-
- /**
- * Sets the default format to be used by the number_format filter.
- *
- * @param int $decimal the number of decimal places to use
- * @param string $decimalPoint the character(s) to use for the decimal point
- * @param string $thousandSep the character(s) to use for the thousands separator
- */
- public function setNumberFormat($decimal, $decimalPoint, $thousandSep)
- {
- $this->numberFormat = [$decimal, $decimalPoint, $thousandSep];
- }
-
- /**
- * Get the default format used by the number_format filter.
- *
- * @return array The arguments for number_format()
- */
- public function getNumberFormat()
- {
- return $this->numberFormat;
- }
-
- public function getTokenParsers(): array
- {
- return [
- new ApplyTokenParser(),
- new ForTokenParser(),
- new IfTokenParser(),
- new ExtendsTokenParser(),
- new IncludeTokenParser(),
- new BlockTokenParser(),
- new UseTokenParser(),
- new MacroTokenParser(),
- new ImportTokenParser(),
- new FromTokenParser(),
- new SetTokenParser(),
- new FlushTokenParser(),
- new DoTokenParser(),
- new EmbedTokenParser(),
- new WithTokenParser(),
- new DeprecatedTokenParser(),
- ];
- }
-
- public function getFilters(): array
- {
- return [
- // formatting filters
- new TwigFilter('date', 'twig_date_format_filter', ['needs_environment' => true]),
- new TwigFilter('date_modify', 'twig_date_modify_filter', ['needs_environment' => true]),
- new TwigFilter('format', 'twig_sprintf'),
- new TwigFilter('replace', 'twig_replace_filter'),
- new TwigFilter('number_format', 'twig_number_format_filter', ['needs_environment' => true]),
- new TwigFilter('abs', 'abs'),
- new TwigFilter('round', 'twig_round'),
-
- // encoding
- new TwigFilter('url_encode', 'twig_urlencode_filter'),
- new TwigFilter('json_encode', 'json_encode'),
- new TwigFilter('convert_encoding', 'twig_convert_encoding'),
-
- // string filters
- new TwigFilter('title', 'twig_title_string_filter', ['needs_environment' => true]),
- new TwigFilter('capitalize', 'twig_capitalize_string_filter', ['needs_environment' => true]),
- new TwigFilter('upper', 'twig_upper_filter', ['needs_environment' => true]),
- new TwigFilter('lower', 'twig_lower_filter', ['needs_environment' => true]),
- new TwigFilter('striptags', 'twig_striptags'),
- new TwigFilter('trim', 'twig_trim_filter'),
- new TwigFilter('nl2br', 'twig_nl2br', ['pre_escape' => 'html', 'is_safe' => ['html']]),
- new TwigFilter('spaceless', 'twig_spaceless', ['is_safe' => ['html']]),
-
- // array helpers
- new TwigFilter('join', 'twig_join_filter'),
- new TwigFilter('split', 'twig_split_filter', ['needs_environment' => true]),
- new TwigFilter('sort', 'twig_sort_filter', ['needs_environment' => true]),
- new TwigFilter('merge', 'twig_array_merge'),
- new TwigFilter('batch', 'twig_array_batch'),
- new TwigFilter('column', 'twig_array_column'),
- new TwigFilter('filter', 'twig_array_filter', ['needs_environment' => true]),
- new TwigFilter('map', 'twig_array_map', ['needs_environment' => true]),
- new TwigFilter('reduce', 'twig_array_reduce', ['needs_environment' => true]),
-
- // string/array filters
- new TwigFilter('reverse', 'twig_reverse_filter', ['needs_environment' => true]),
- new TwigFilter('length', 'twig_length_filter', ['needs_environment' => true]),
- new TwigFilter('slice', 'twig_slice', ['needs_environment' => true]),
- new TwigFilter('first', 'twig_first', ['needs_environment' => true]),
- new TwigFilter('last', 'twig_last', ['needs_environment' => true]),
-
- // iteration and runtime
- new TwigFilter('default', '_twig_default_filter', ['node_class' => DefaultFilter::class]),
- new TwigFilter('keys', 'twig_get_array_keys_filter'),
- ];
- }
-
- public function getFunctions(): array
- {
- return [
- new TwigFunction('max', 'max'),
- new TwigFunction('min', 'min'),
- new TwigFunction('range', 'range'),
- new TwigFunction('constant', 'twig_constant'),
- new TwigFunction('cycle', 'twig_cycle'),
- new TwigFunction('random', 'twig_random', ['needs_environment' => true]),
- new TwigFunction('date', 'twig_date_converter', ['needs_environment' => true]),
- new TwigFunction('include', 'twig_include', ['needs_environment' => true, 'needs_context' => true, 'is_safe' => ['all']]),
- new TwigFunction('source', 'twig_source', ['needs_environment' => true, 'is_safe' => ['all']]),
- ];
- }
-
- public function getTests(): array
- {
- return [
- new TwigTest('even', null, ['node_class' => EvenTest::class]),
- new TwigTest('odd', null, ['node_class' => OddTest::class]),
- new TwigTest('defined', null, ['node_class' => DefinedTest::class]),
- new TwigTest('same as', null, ['node_class' => SameasTest::class, 'one_mandatory_argument' => true]),
- new TwigTest('none', null, ['node_class' => NullTest::class]),
- new TwigTest('null', null, ['node_class' => NullTest::class]),
- new TwigTest('divisible by', null, ['node_class' => DivisiblebyTest::class, 'one_mandatory_argument' => true]),
- new TwigTest('constant', null, ['node_class' => ConstantTest::class]),
- new TwigTest('empty', 'twig_test_empty'),
- new TwigTest('iterable', 'is_iterable'),
- ];
- }
-
- public function getNodeVisitors(): array
- {
- return [new MacroAutoImportNodeVisitor()];
- }
-
- public function getOperators(): array
- {
- return [
- [
- 'not' => ['precedence' => 50, 'class' => NotUnary::class],
- '-' => ['precedence' => 500, 'class' => NegUnary::class],
- '+' => ['precedence' => 500, 'class' => PosUnary::class],
- ],
- [
- 'or' => ['precedence' => 10, 'class' => OrBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- 'and' => ['precedence' => 15, 'class' => AndBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- 'b-or' => ['precedence' => 16, 'class' => BitwiseOrBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- 'b-xor' => ['precedence' => 17, 'class' => BitwiseXorBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- 'b-and' => ['precedence' => 18, 'class' => BitwiseAndBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '==' => ['precedence' => 20, 'class' => EqualBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '!=' => ['precedence' => 20, 'class' => NotEqualBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '<=>' => ['precedence' => 20, 'class' => SpaceshipBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '<' => ['precedence' => 20, 'class' => LessBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '>' => ['precedence' => 20, 'class' => GreaterBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '>=' => ['precedence' => 20, 'class' => GreaterEqualBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '<=' => ['precedence' => 20, 'class' => LessEqualBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- 'not in' => ['precedence' => 20, 'class' => NotInBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- 'in' => ['precedence' => 20, 'class' => InBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- 'matches' => ['precedence' => 20, 'class' => MatchesBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- 'starts with' => ['precedence' => 20, 'class' => StartsWithBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- 'ends with' => ['precedence' => 20, 'class' => EndsWithBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- 'has some' => ['precedence' => 20, 'class' => HasSomeBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- 'has every' => ['precedence' => 20, 'class' => HasEveryBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '..' => ['precedence' => 25, 'class' => RangeBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '+' => ['precedence' => 30, 'class' => AddBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '-' => ['precedence' => 30, 'class' => SubBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '~' => ['precedence' => 40, 'class' => ConcatBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '*' => ['precedence' => 60, 'class' => MulBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '/' => ['precedence' => 60, 'class' => DivBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '//' => ['precedence' => 60, 'class' => FloorDivBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '%' => ['precedence' => 60, 'class' => ModBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- 'is' => ['precedence' => 100, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- 'is not' => ['precedence' => 100, 'associativity' => ExpressionParser::OPERATOR_LEFT],
- '**' => ['precedence' => 200, 'class' => PowerBinary::class, 'associativity' => ExpressionParser::OPERATOR_RIGHT],
- '??' => ['precedence' => 300, 'class' => NullCoalesceExpression::class, 'associativity' => ExpressionParser::OPERATOR_RIGHT],
- ],
- ];
- }
-}
-}
-
-namespace {
- use Twig\Environment;
- use Twig\Error\LoaderError;
- use Twig\Error\RuntimeError;
- use Twig\Extension\CoreExtension;
- use Twig\Extension\SandboxExtension;
- use Twig\Markup;
- use Twig\Source;
- use Twig\Template;
- use Twig\TemplateWrapper;
-
-/**
- * Cycles over a value.
- *
- * @param \ArrayAccess|array $values
- * @param int $position The cycle position
- *
- * @return string The next value in the cycle
- */
-function twig_cycle($values, $position)
-{
- if (!\is_array($values) && !$values instanceof \ArrayAccess) {
- return $values;
- }
-
- return $values[$position % \count($values)];
-}
-
-/**
- * Returns a random value depending on the supplied parameter type:
- * - a random item from a \Traversable or array
- * - a random character from a string
- * - a random integer between 0 and the integer parameter.
- *
- * @param \Traversable|array|int|float|string $values The values to pick a random item from
- * @param int|null $max Maximum value used when $values is an int
- *
- * @return mixed A random value from the given sequence
- *
- * @throws RuntimeError when $values is an empty array (does not apply to an empty string which is returned as is)
- */
-function twig_random(Environment $env, $values = null, $max = null)
-{
- if (null === $values) {
- return null === $max ? mt_rand() : mt_rand(0, (int) $max);
- }
-
- if (\is_int($values) || \is_float($values)) {
- if (null === $max) {
- if ($values < 0) {
- $max = 0;
- $min = $values;
- } else {
- $max = $values;
- $min = 0;
- }
- } else {
- $min = $values;
- }
-
- return mt_rand((int) $min, (int) $max);
- }
-
- if (\is_string($values)) {
- if ('' === $values) {
- return '';
- }
-
- $charset = $env->getCharset();
-
- if ('UTF-8' !== $charset) {
- $values = twig_convert_encoding($values, 'UTF-8', $charset);
- }
-
- // unicode version of str_split()
- // split at all positions, but not after the start and not before the end
- $values = preg_split('/(? $value) {
- $values[$i] = twig_convert_encoding($value, $charset, 'UTF-8');
- }
- }
- }
-
- if (!is_iterable($values)) {
- return $values;
- }
-
- $values = twig_to_array($values);
-
- if (0 === \count($values)) {
- throw new RuntimeError('The random function cannot pick from an empty array.');
- }
-
- return $values[array_rand($values, 1)];
-}
-
-/**
- * Converts a date to the given format.
- *
- * {{ post.published_at|date("m/d/Y") }}
- *
- * @param \DateTimeInterface|\DateInterval|string $date A date
- * @param string|null $format The target format, null to use the default
- * @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged
- *
- * @return string The formatted date
- */
-function twig_date_format_filter(Environment $env, $date, $format = null, $timezone = null)
-{
- if (null === $format) {
- $formats = $env->getExtension(CoreExtension::class)->getDateFormat();
- $format = $date instanceof \DateInterval ? $formats[1] : $formats[0];
- }
-
- if ($date instanceof \DateInterval) {
- return $date->format($format);
- }
-
- return twig_date_converter($env, $date, $timezone)->format($format);
-}
-
-/**
- * Returns a new date object modified.
- *
- * {{ post.published_at|date_modify("-1day")|date("m/d/Y") }}
- *
- * @param \DateTimeInterface|string $date A date
- * @param string $modifier A modifier string
- *
- * @return \DateTimeInterface
- */
-function twig_date_modify_filter(Environment $env, $date, $modifier)
-{
- $date = twig_date_converter($env, $date, false);
-
- return $date->modify($modifier);
-}
-
-/**
- * Returns a formatted string.
- *
- * @param string|null $format
- * @param ...$values
- *
- * @return string
- */
-function twig_sprintf($format, ...$values)
-{
- return sprintf($format ?? '', ...$values);
-}
-
-/**
- * Converts an input to a \DateTime instance.
- *
- * {% if date(user.created_at) < date('+2days') %}
- * {# do something #}
- * {% endif %}
- *
- * @param \DateTimeInterface|string|null $date A date or null to use the current time
- * @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged
- *
- * @return \DateTimeInterface
- */
-function twig_date_converter(Environment $env, $date = null, $timezone = null)
-{
- // determine the timezone
- if (false !== $timezone) {
- if (null === $timezone) {
- $timezone = $env->getExtension(CoreExtension::class)->getTimezone();
- } elseif (!$timezone instanceof \DateTimeZone) {
- $timezone = new \DateTimeZone($timezone);
- }
- }
-
- // immutable dates
- if ($date instanceof \DateTimeImmutable) {
- return false !== $timezone ? $date->setTimezone($timezone) : $date;
- }
-
- if ($date instanceof \DateTimeInterface) {
- $date = clone $date;
- if (false !== $timezone) {
- $date->setTimezone($timezone);
- }
-
- return $date;
- }
-
- if (null === $date || 'now' === $date) {
- if (null === $date) {
- $date = 'now';
- }
-
- return new \DateTime($date, false !== $timezone ? $timezone : $env->getExtension(CoreExtension::class)->getTimezone());
- }
-
- $asString = (string) $date;
- if (ctype_digit($asString) || (!empty($asString) && '-' === $asString[0] && ctype_digit(substr($asString, 1)))) {
- $date = new \DateTime('@'.$date);
- } else {
- $date = new \DateTime($date, $env->getExtension(CoreExtension::class)->getTimezone());
- }
-
- if (false !== $timezone) {
- $date->setTimezone($timezone);
- }
-
- return $date;
-}
-
-/**
- * Replaces strings within a string.
- *
- * @param string|null $str String to replace in
- * @param array|\Traversable $from Replace values
- *
- * @return string
- */
-function twig_replace_filter($str, $from)
-{
- if (!is_iterable($from)) {
- throw new RuntimeError(sprintf('The "replace" filter expects an array or "Traversable" as replace values, got "%s".', \is_object($from) ? \get_class($from) : \gettype($from)));
- }
-
- return strtr($str ?? '', twig_to_array($from));
-}
-
-/**
- * Rounds a number.
- *
- * @param int|float|string|null $value The value to round
- * @param int|float $precision The rounding precision
- * @param string $method The method to use for rounding
- *
- * @return int|float The rounded number
- */
-function twig_round($value, $precision = 0, $method = 'common')
-{
- $value = (float) $value;
-
- if ('common' === $method) {
- return round($value, $precision);
- }
-
- if ('ceil' !== $method && 'floor' !== $method) {
- throw new RuntimeError('The round filter only supports the "common", "ceil", and "floor" methods.');
- }
-
- return $method($value * 10 ** $precision) / 10 ** $precision;
-}
-
-/**
- * Number format filter.
- *
- * All of the formatting options can be left null, in that case the defaults will
- * be used. Supplying any of the parameters will override the defaults set in the
- * environment object.
- *
- * @param mixed $number A float/int/string of the number to format
- * @param int $decimal the number of decimal points to display
- * @param string $decimalPoint the character(s) to use for the decimal point
- * @param string $thousandSep the character(s) to use for the thousands separator
- *
- * @return string The formatted number
- */
-function twig_number_format_filter(Environment $env, $number, $decimal = null, $decimalPoint = null, $thousandSep = null)
-{
- $defaults = $env->getExtension(CoreExtension::class)->getNumberFormat();
- if (null === $decimal) {
- $decimal = $defaults[0];
- }
-
- if (null === $decimalPoint) {
- $decimalPoint = $defaults[1];
- }
-
- if (null === $thousandSep) {
- $thousandSep = $defaults[2];
- }
-
- return number_format((float) $number, $decimal, $decimalPoint, $thousandSep);
-}
-
-/**
- * URL encodes (RFC 3986) a string as a path segment or an array as a query string.
- *
- * @param string|array|null $url A URL or an array of query parameters
- *
- * @return string The URL encoded value
- */
-function twig_urlencode_filter($url)
-{
- if (\is_array($url)) {
- return http_build_query($url, '', '&', \PHP_QUERY_RFC3986);
- }
-
- return rawurlencode($url ?? '');
-}
-
-/**
- * Merges any number of arrays or Traversable objects.
- *
- * {% set items = { 'apple': 'fruit', 'orange': 'fruit' } %}
- *
- * {% set items = items|merge({ 'peugeot': 'car' }, { 'banana': 'fruit' }) %}
- *
- * {# items now contains { 'apple': 'fruit', 'orange': 'fruit', 'peugeot': 'car', 'banana': 'fruit' } #}
- *
- * @param array|\Traversable ...$arrays Any number of arrays or Traversable objects to merge
- *
- * @return array The merged array
- */
-function twig_array_merge(...$arrays)
-{
- $result = [];
-
- foreach ($arrays as $argNumber => $array) {
- if (!is_iterable($array)) {
- throw new RuntimeError(sprintf('The merge filter only works with arrays or "Traversable", got "%s" for argument %d.', \gettype($array), $argNumber + 1));
- }
-
- $result = array_merge($result, twig_to_array($array));
- }
-
- return $result;
-}
-
-
-/**
- * Slices a variable.
- *
- * @param mixed $item A variable
- * @param int $start Start of the slice
- * @param int $length Size of the slice
- * @param bool $preserveKeys Whether to preserve key or not (when the input is an array)
- *
- * @return mixed The sliced variable
- */
-function twig_slice(Environment $env, $item, $start, $length = null, $preserveKeys = false)
-{
- if ($item instanceof \Traversable) {
- while ($item instanceof \IteratorAggregate) {
- $item = $item->getIterator();
- }
-
- if ($start >= 0 && $length >= 0 && $item instanceof \Iterator) {
- try {
- return iterator_to_array(new \LimitIterator($item, $start, $length ?? -1), $preserveKeys);
- } catch (\OutOfBoundsException $e) {
- return [];
- }
- }
-
- $item = iterator_to_array($item, $preserveKeys);
- }
-
- if (\is_array($item)) {
- return \array_slice($item, $start, $length, $preserveKeys);
- }
-
- return mb_substr((string) $item, $start, $length, $env->getCharset());
-}
-
-/**
- * Returns the first element of the item.
- *
- * @param mixed $item A variable
- *
- * @return mixed The first element of the item
- */
-function twig_first(Environment $env, $item)
-{
- $elements = twig_slice($env, $item, 0, 1, false);
-
- return \is_string($elements) ? $elements : current($elements);
-}
-
-/**
- * Returns the last element of the item.
- *
- * @param mixed $item A variable
- *
- * @return mixed The last element of the item
- */
-function twig_last(Environment $env, $item)
-{
- $elements = twig_slice($env, $item, -1, 1, false);
-
- return \is_string($elements) ? $elements : current($elements);
-}
-
-/**
- * Joins the values to a string.
- *
- * The separators between elements are empty strings per default, you can define them with the optional parameters.
- *
- * {{ [1, 2, 3]|join(', ', ' and ') }}
- * {# returns 1, 2 and 3 #}
- *
- * {{ [1, 2, 3]|join('|') }}
- * {# returns 1|2|3 #}
- *
- * {{ [1, 2, 3]|join }}
- * {# returns 123 #}
- *
- * @param array $value An array
- * @param string $glue The separator
- * @param string|null $and The separator for the last pair
- *
- * @return string The concatenated string
- */
-function twig_join_filter($value, $glue = '', $and = null)
-{
- if (!is_iterable($value)) {
- $value = (array) $value;
- }
-
- $value = twig_to_array($value, false);
-
- if (0 === \count($value)) {
- return '';
- }
-
- if (null === $and || $and === $glue) {
- return implode($glue, $value);
- }
-
- if (1 === \count($value)) {
- return $value[0];
- }
-
- return implode($glue, \array_slice($value, 0, -1)).$and.$value[\count($value) - 1];
-}
-
-/**
- * Splits the string into an array.
- *
- * {{ "one,two,three"|split(',') }}
- * {# returns [one, two, three] #}
- *
- * {{ "one,two,three,four,five"|split(',', 3) }}
- * {# returns [one, two, "three,four,five"] #}
- *
- * {{ "123"|split('') }}
- * {# returns [1, 2, 3] #}
- *
- * {{ "aabbcc"|split('', 2) }}
- * {# returns [aa, bb, cc] #}
- *
- * @param string|null $value A string
- * @param string $delimiter The delimiter
- * @param int $limit The limit
- *
- * @return array The split string as an array
- */
-function twig_split_filter(Environment $env, $value, $delimiter, $limit = null)
-{
- $value = $value ?? '';
-
- if ('' !== $delimiter) {
- return null === $limit ? explode($delimiter, $value) : explode($delimiter, $value, $limit);
- }
-
- if ($limit <= 1) {
- return preg_split('/(?getCharset());
- if ($length < $limit) {
- return [$value];
- }
-
- $r = [];
- for ($i = 0; $i < $length; $i += $limit) {
- $r[] = mb_substr($value, $i, $limit, $env->getCharset());
- }
-
- return $r;
-}
-
-// The '_default' filter is used internally to avoid using the ternary operator
-// which costs a lot for big contexts (before PHP 5.4). So, on average,
-// a function call is cheaper.
-/**
- * @internal
- */
-function _twig_default_filter($value, $default = '')
-{
- if (twig_test_empty($value)) {
- return $default;
- }
-
- return $value;
-}
-
-/**
- * Returns the keys for the given array.
- *
- * It is useful when you want to iterate over the keys of an array:
- *
- * {% for key in array|keys %}
- * {# ... #}
- * {% endfor %}
- *
- * @param array $array An array
- *
- * @return array The keys
- */
-function twig_get_array_keys_filter($array)
-{
- if ($array instanceof \Traversable) {
- while ($array instanceof \IteratorAggregate) {
- $array = $array->getIterator();
- }
-
- $keys = [];
- if ($array instanceof \Iterator) {
- $array->rewind();
- while ($array->valid()) {
- $keys[] = $array->key();
- $array->next();
- }
-
- return $keys;
- }
-
- foreach ($array as $key => $item) {
- $keys[] = $key;
- }
-
- return $keys;
- }
-
- if (!\is_array($array)) {
- return [];
- }
-
- return array_keys($array);
-}
-
-/**
- * Reverses a variable.
- *
- * @param array|\Traversable|string|null $item An array, a \Traversable instance, or a string
- * @param bool $preserveKeys Whether to preserve key or not
- *
- * @return mixed The reversed input
- */
-function twig_reverse_filter(Environment $env, $item, $preserveKeys = false)
-{
- if ($item instanceof \Traversable) {
- return array_reverse(iterator_to_array($item), $preserveKeys);
- }
-
- if (\is_array($item)) {
- return array_reverse($item, $preserveKeys);
- }
-
- $string = (string) $item;
-
- $charset = $env->getCharset();
-
- if ('UTF-8' !== $charset) {
- $string = twig_convert_encoding($string, 'UTF-8', $charset);
- }
-
- preg_match_all('/./us', $string, $matches);
-
- $string = implode('', array_reverse($matches[0]));
-
- if ('UTF-8' !== $charset) {
- $string = twig_convert_encoding($string, $charset, 'UTF-8');
- }
-
- return $string;
-}
-
-/**
- * Sorts an array.
- *
- * @param array|\Traversable $array
- *
- * @return array
- */
-function twig_sort_filter(Environment $env, $array, $arrow = null)
-{
- if ($array instanceof \Traversable) {
- $array = iterator_to_array($array);
- } elseif (!\is_array($array)) {
- throw new RuntimeError(sprintf('The sort filter only works with arrays or "Traversable", got "%s".', \gettype($array)));
- }
-
- if (null !== $arrow) {
- twig_check_arrow_in_sandbox($env, $arrow, 'sort', 'filter');
-
- uasort($array, $arrow);
- } else {
- asort($array);
- }
-
- return $array;
-}
-
-/**
- * @internal
- */
-function twig_in_filter($value, $compare)
-{
- if ($value instanceof Markup) {
- $value = (string) $value;
- }
- if ($compare instanceof Markup) {
- $compare = (string) $compare;
- }
-
- if (\is_string($compare)) {
- if (\is_string($value) || \is_int($value) || \is_float($value)) {
- return '' === $value || str_contains($compare, (string) $value);
- }
-
- return false;
- }
-
- if (!is_iterable($compare)) {
- return false;
- }
-
- if (\is_object($value) || \is_resource($value)) {
- if (!\is_array($compare)) {
- foreach ($compare as $item) {
- if ($item === $value) {
- return true;
- }
- }
-
- return false;
- }
-
- return \in_array($value, $compare, true);
- }
-
- foreach ($compare as $item) {
- if (0 === twig_compare($value, $item)) {
- return true;
- }
- }
-
- return false;
-}
-
-/**
- * Compares two values using a more strict version of the PHP non-strict comparison operator.
- *
- * @see https://wiki.php.net/rfc/string_to_number_comparison
- * @see https://wiki.php.net/rfc/trailing_whitespace_numerics
- *
- * @internal
- */
-function twig_compare($a, $b)
-{
- // int <=> string
- if (\is_int($a) && \is_string($b)) {
- $bTrim = trim($b, " \t\n\r\v\f");
- if (!is_numeric($bTrim)) {
- return (string) $a <=> $b;
- }
- if ((int) $bTrim == $bTrim) {
- return $a <=> (int) $bTrim;
- } else {
- return (float) $a <=> (float) $bTrim;
- }
- }
- if (\is_string($a) && \is_int($b)) {
- $aTrim = trim($a, " \t\n\r\v\f");
- if (!is_numeric($aTrim)) {
- return $a <=> (string) $b;
- }
- if ((int) $aTrim == $aTrim) {
- return (int) $aTrim <=> $b;
- } else {
- return (float) $aTrim <=> (float) $b;
- }
- }
-
- // float <=> string
- if (\is_float($a) && \is_string($b)) {
- if (is_nan($a)) {
- return 1;
- }
- $bTrim = trim($b, " \t\n\r\v\f");
- if (!is_numeric($bTrim)) {
- return (string) $a <=> $b;
- }
-
- return $a <=> (float) $bTrim;
- }
- if (\is_string($a) && \is_float($b)) {
- if (is_nan($b)) {
- return 1;
- }
- $aTrim = trim($a, " \t\n\r\v\f");
- if (!is_numeric($aTrim)) {
- return $a <=> (string) $b;
- }
-
- return (float) $aTrim <=> $b;
- }
-
- // fallback to <=>
- return $a <=> $b;
-}
-
-/**
- * @return int
- *
- * @throws RuntimeError When an invalid pattern is used
- */
-function twig_matches(string $regexp, ?string $str)
-{
- set_error_handler(function ($t, $m) use ($regexp) {
- throw new RuntimeError(sprintf('Regexp "%s" passed to "matches" is not valid', $regexp).substr($m, 12));
- });
- try {
- return preg_match($regexp, $str ?? '');
- } finally {
- restore_error_handler();
- }
-}
-
-/**
- * Returns a trimmed string.
- *
- * @param string|null $string
- * @param string|null $characterMask
- * @param string $side
- *
- * @return string
- *
- * @throws RuntimeError When an invalid trimming side is used (not a string or not 'left', 'right', or 'both')
- */
-function twig_trim_filter($string, $characterMask = null, $side = 'both')
-{
- if (null === $characterMask) {
- $characterMask = " \t\n\r\0\x0B";
- }
-
- switch ($side) {
- case 'both':
- return trim($string ?? '', $characterMask);
- case 'left':
- return ltrim($string ?? '', $characterMask);
- case 'right':
- return rtrim($string ?? '', $characterMask);
- default:
- throw new RuntimeError('Trimming side must be "left", "right" or "both".');
- }
-}
-
-/**
- * Inserts HTML line breaks before all newlines in a string.
- *
- * @param string|null $string
- *
- * @return string
- */
-function twig_nl2br($string)
-{
- return nl2br($string ?? '');
-}
-
-/**
- * Removes whitespaces between HTML tags.
- *
- * @param string|null $string
- *
- * @return string
- */
-function twig_spaceless($content)
-{
- return trim(preg_replace('/>\s+', '><', $content ?? ''));
-}
-
-/**
- * @param string|null $string
- * @param string $to
- * @param string $from
- *
- * @return string
- */
-function twig_convert_encoding($string, $to, $from)
-{
- if (!\function_exists('iconv')) {
- throw new RuntimeError('Unable to convert encoding: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.');
- }
-
- return iconv($from, $to, $string ?? '');
-}
-
-/**
- * Returns the length of a variable.
- *
- * @param mixed $thing A variable
- *
- * @return int The length of the value
- */
-function twig_length_filter(Environment $env, $thing)
-{
- if (null === $thing) {
- return 0;
- }
-
- if (\is_scalar($thing)) {
- return mb_strlen($thing, $env->getCharset());
- }
-
- if ($thing instanceof \Countable || \is_array($thing) || $thing instanceof \SimpleXMLElement) {
- return \count($thing);
- }
-
- if ($thing instanceof \Traversable) {
- return iterator_count($thing);
- }
-
- if (method_exists($thing, '__toString') && !$thing instanceof \Countable) {
- return mb_strlen((string) $thing, $env->getCharset());
- }
-
- return 1;
-}
-
-/**
- * Converts a string to uppercase.
- *
- * @param string|null $string A string
- *
- * @return string The uppercased string
- */
-function twig_upper_filter(Environment $env, $string)
-{
- return mb_strtoupper($string ?? '', $env->getCharset());
-}
-
-/**
- * Converts a string to lowercase.
- *
- * @param string|null $string A string
- *
- * @return string The lowercased string
- */
-function twig_lower_filter(Environment $env, $string)
-{
- return mb_strtolower($string ?? '', $env->getCharset());
-}
-
-/**
- * Strips HTML and PHP tags from a string.
- *
- * @param string|null $string
- * @param string[]|string|null $string
- *
- * @return string
- */
-function twig_striptags($string, $allowable_tags = null)
-{
- return strip_tags($string ?? '', $allowable_tags);
-}
-
-/**
- * Returns a titlecased string.
- *
- * @param string|null $string A string
- *
- * @return string The titlecased string
- */
-function twig_title_string_filter(Environment $env, $string)
-{
- if (null !== $charset = $env->getCharset()) {
- return mb_convert_case($string ?? '', \MB_CASE_TITLE, $charset);
- }
-
- return ucwords(strtolower($string ?? ''));
-}
-
-/**
- * Returns a capitalized string.
- *
- * @param string|null $string A string
- *
- * @return string The capitalized string
- */
-function twig_capitalize_string_filter(Environment $env, $string)
-{
- $charset = $env->getCharset();
-
- return mb_strtoupper(mb_substr($string ?? '', 0, 1, $charset), $charset).mb_strtolower(mb_substr($string ?? '', 1, null, $charset), $charset);
-}
-
-/**
- * @internal
- */
-function twig_call_macro(Template $template, string $method, array $args, int $lineno, array $context, Source $source)
-{
- if (!method_exists($template, $method)) {
- $parent = $template;
- while ($parent = $parent->getParent($context)) {
- if (method_exists($parent, $method)) {
- return $parent->$method(...$args);
- }
- }
-
- throw new RuntimeError(sprintf('Macro "%s" is not defined in template "%s".', substr($method, \strlen('macro_')), $template->getTemplateName()), $lineno, $source);
- }
-
- return $template->$method(...$args);
-}
-
-/**
- * @internal
- */
-function twig_ensure_traversable($seq)
-{
- if (is_iterable($seq)) {
- return $seq;
- }
-
- return [];
-}
-
-/**
- * @internal
- */
-function twig_to_array($seq, $preserveKeys = true)
-{
- if ($seq instanceof \Traversable) {
- return iterator_to_array($seq, $preserveKeys);
- }
-
- if (!\is_array($seq)) {
- return $seq;
- }
-
- return $preserveKeys ? $seq : array_values($seq);
-}
-
-/**
- * Checks if a variable is empty.
- *
- * {# evaluates to true if the foo variable is null, false, or the empty string #}
- * {% if foo is empty %}
- * {# ... #}
- * {% endif %}
- *
- * @param mixed $value A variable
- *
- * @return bool true if the value is empty, false otherwise
- */
-function twig_test_empty($value)
-{
- if ($value instanceof \Countable) {
- return 0 === \count($value);
- }
-
- if ($value instanceof \Traversable) {
- return !iterator_count($value);
- }
-
- if (\is_object($value) && method_exists($value, '__toString')) {
- return '' === (string) $value;
- }
-
- return '' === $value || false === $value || null === $value || [] === $value;
-}
-
-/**
- * Checks if a variable is traversable.
- *
- * {# evaluates to true if the foo variable is an array or a traversable object #}
- * {% if foo is iterable %}
- * {# ... #}
- * {% endif %}
- *
- * @param mixed $value A variable
- *
- * @return bool true if the value is traversable
- *
- * @deprecated since Twig 3.8, to be removed in 4.0 (use the native "is_iterable" function instead)
- */
-function twig_test_iterable($value)
-{
- return is_iterable($value);
-}
-
-/**
- * Renders a template.
- *
- * @param array $context
- * @param string|array|TemplateWrapper $template The template to render or an array of templates to try consecutively
- * @param array $variables The variables to pass to the template
- * @param bool $withContext
- * @param bool $ignoreMissing Whether to ignore missing templates or not
- * @param bool $sandboxed Whether to sandbox the template or not
- *
- * @return string The rendered template
- */
-function twig_include(Environment $env, $context, $template, $variables = [], $withContext = true, $ignoreMissing = false, $sandboxed = false)
-{
- $alreadySandboxed = false;
- $sandbox = null;
- if ($withContext) {
- $variables = array_merge($context, $variables);
- }
-
- if ($isSandboxed = $sandboxed && $env->hasExtension(SandboxExtension::class)) {
- $sandbox = $env->getExtension(SandboxExtension::class);
- if (!$alreadySandboxed = $sandbox->isSandboxed()) {
- $sandbox->enableSandbox();
- }
-
- foreach ((\is_array($template) ? $template : [$template]) as $name) {
- // if a Template instance is passed, it might have been instantiated outside of a sandbox, check security
- if ($name instanceof TemplateWrapper || $name instanceof Template) {
- $name->unwrap()->checkSecurity();
- }
- }
- }
-
- try {
- $loaded = null;
- try {
- $loaded = $env->resolveTemplate($template);
- } catch (LoaderError $e) {
- if (!$ignoreMissing) {
- throw $e;
- }
- }
-
- return $loaded ? $loaded->render($variables) : '';
- } finally {
- if ($isSandboxed && !$alreadySandboxed) {
- $sandbox->disableSandbox();
- }
- }
-}
-
-/**
- * Returns a template content without rendering it.
- *
- * @param string $name The template name
- * @param bool $ignoreMissing Whether to ignore missing templates or not
- *
- * @return string The template source
- */
-function twig_source(Environment $env, $name, $ignoreMissing = false)
-{
- $loader = $env->getLoader();
- try {
- return $loader->getSourceContext($name)->getCode();
- } catch (LoaderError $e) {
- if (!$ignoreMissing) {
- throw $e;
- }
- }
-}
-
-/**
- * Provides the ability to get constants from instances as well as class/global constants.
- *
- * @param string $constant The name of the constant
- * @param object|null $object The object to get the constant from
- *
- * @return string
- */
-function twig_constant($constant, $object = null)
-{
- if (null !== $object) {
- if ('class' === $constant) {
- return \get_class($object);
- }
-
- $constant = \get_class($object).'::'.$constant;
- }
-
- if (!\defined($constant)) {
- throw new RuntimeError(sprintf('Constant "%s" is undefined.', $constant));
- }
-
- return \constant($constant);
-}
-
-/**
- * Checks if a constant exists.
- *
- * @param string $constant The name of the constant
- * @param object|null $object The object to get the constant from
- *
- * @return bool
- */
-function twig_constant_is_defined($constant, $object = null)
-{
- if (null !== $object) {
- if ('class' === $constant) {
- return true;
- }
-
- $constant = \get_class($object).'::'.$constant;
- }
-
- return \defined($constant);
-}
-
-/**
- * Batches item.
- *
- * @param array $items An array of items
- * @param int $size The size of the batch
- * @param mixed $fill A value used to fill missing items
- *
- * @return array
- */
-function twig_array_batch($items, $size, $fill = null, $preserveKeys = true)
-{
- if (!is_iterable($items)) {
- throw new RuntimeError(sprintf('The "batch" filter expects an array or "Traversable", got "%s".', \is_object($items) ? \get_class($items) : \gettype($items)));
- }
-
- $size = ceil($size);
-
- $result = array_chunk(twig_to_array($items, $preserveKeys), $size, $preserveKeys);
-
- if (null !== $fill && $result) {
- $last = \count($result) - 1;
- if ($fillCount = $size - \count($result[$last])) {
- for ($i = 0; $i < $fillCount; ++$i) {
- $result[$last][] = $fill;
- }
- }
- }
-
- return $result;
-}
-
-/**
- * Returns the attribute value for a given array/object.
- *
- * @param mixed $object The object or array from where to get the item
- * @param mixed $item The item to get from the array or object
- * @param array $arguments An array of arguments to pass if the item is an object method
- * @param string $type The type of attribute (@see \Twig\Template constants)
- * @param bool $isDefinedTest Whether this is only a defined check
- * @param bool $ignoreStrictCheck Whether to ignore the strict attribute check or not
- * @param int $lineno The template line where the attribute was called
- *
- * @return mixed The attribute value, or a Boolean when $isDefinedTest is true, or null when the attribute is not set and $ignoreStrictCheck is true
- *
- * @throws RuntimeError if the attribute does not exist and Twig is running in strict mode and $isDefinedTest is false
- *
- * @internal
- */
-function twig_get_attribute(Environment $env, Source $source, $object, $item, array $arguments = [], $type = /* Template::ANY_CALL */ 'any', $isDefinedTest = false, $ignoreStrictCheck = false, $sandboxed = false, int $lineno = -1)
-{
- // array
- if (/* Template::METHOD_CALL */ 'method' !== $type) {
- $arrayItem = \is_bool($item) || \is_float($item) ? (int) $item : $item;
-
- if (((\is_array($object) || $object instanceof \ArrayObject) && (isset($object[$arrayItem]) || \array_key_exists($arrayItem, (array) $object)))
- || ($object instanceof ArrayAccess && isset($object[$arrayItem]))
- ) {
- if ($isDefinedTest) {
- return true;
- }
-
- return $object[$arrayItem];
- }
-
- if (/* Template::ARRAY_CALL */ 'array' === $type || !\is_object($object)) {
- if ($isDefinedTest) {
- return false;
- }
-
- if ($ignoreStrictCheck || !$env->isStrictVariables()) {
- return;
- }
-
- if ($object instanceof ArrayAccess) {
- $message = sprintf('Key "%s" in object with ArrayAccess of class "%s" does not exist.', $arrayItem, \get_class($object));
- } elseif (\is_object($object)) {
- $message = sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface.', $item, \get_class($object));
- } elseif (\is_array($object)) {
- if (empty($object)) {
- $message = sprintf('Key "%s" does not exist as the array is empty.', $arrayItem);
- } else {
- $message = sprintf('Key "%s" for array with keys "%s" does not exist.', $arrayItem, implode(', ', array_keys($object)));
- }
- } elseif (/* Template::ARRAY_CALL */ 'array' === $type) {
- if (null === $object) {
- $message = sprintf('Impossible to access a key ("%s") on a null variable.', $item);
- } else {
- $message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s").', $item, \gettype($object), $object);
- }
- } elseif (null === $object) {
- $message = sprintf('Impossible to access an attribute ("%s") on a null variable.', $item);
- } else {
- $message = sprintf('Impossible to access an attribute ("%s") on a %s variable ("%s").', $item, \gettype($object), $object);
- }
-
- throw new RuntimeError($message, $lineno, $source);
- }
- }
-
- if (!\is_object($object)) {
- if ($isDefinedTest) {
- return false;
- }
-
- if ($ignoreStrictCheck || !$env->isStrictVariables()) {
- return;
- }
-
- if (null === $object) {
- $message = sprintf('Impossible to invoke a method ("%s") on a null variable.', $item);
- } elseif (\is_array($object)) {
- $message = sprintf('Impossible to invoke a method ("%s") on an array.', $item);
- } else {
- $message = sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s").', $item, \gettype($object), $object);
- }
-
- throw new RuntimeError($message, $lineno, $source);
- }
-
- if ($object instanceof Template) {
- throw new RuntimeError('Accessing \Twig\Template attributes is forbidden.', $lineno, $source);
- }
-
- // object property
- if (/* Template::METHOD_CALL */ 'method' !== $type) {
- if (isset($object->$item) || \array_key_exists((string) $item, (array) $object)) {
- if ($isDefinedTest) {
- return true;
- }
-
- if ($sandboxed) {
- $env->getExtension(SandboxExtension::class)->checkPropertyAllowed($object, $item, $lineno, $source);
- }
-
- return $object->$item;
- }
- }
-
- static $cache = [];
-
- $class = \get_class($object);
-
- // object method
- // precedence: getXxx() > isXxx() > hasXxx()
- if (!isset($cache[$class])) {
- $methods = get_class_methods($object);
- sort($methods);
- $lcMethods = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, $methods);
- $classCache = [];
- foreach ($methods as $i => $method) {
- $classCache[$method] = $method;
- $classCache[$lcName = $lcMethods[$i]] = $method;
-
- if ('g' === $lcName[0] && str_starts_with($lcName, 'get')) {
- $name = substr($method, 3);
- $lcName = substr($lcName, 3);
- } elseif ('i' === $lcName[0] && str_starts_with($lcName, 'is')) {
- $name = substr($method, 2);
- $lcName = substr($lcName, 2);
- } elseif ('h' === $lcName[0] && str_starts_with($lcName, 'has')) {
- $name = substr($method, 3);
- $lcName = substr($lcName, 3);
- if (\in_array('is'.$lcName, $lcMethods)) {
- continue;
- }
- } else {
- continue;
- }
-
- // skip get() and is() methods (in which case, $name is empty)
- if ($name) {
- if (!isset($classCache[$name])) {
- $classCache[$name] = $method;
- }
-
- if (!isset($classCache[$lcName])) {
- $classCache[$lcName] = $method;
- }
- }
- }
- $cache[$class] = $classCache;
- }
-
- $call = false;
- if (isset($cache[$class][$item])) {
- $method = $cache[$class][$item];
- } elseif (isset($cache[$class][$lcItem = strtr($item, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')])) {
- $method = $cache[$class][$lcItem];
- } elseif (isset($cache[$class]['__call'])) {
- $method = $item;
- $call = true;
- } else {
- if ($isDefinedTest) {
- return false;
- }
-
- if ($ignoreStrictCheck || !$env->isStrictVariables()) {
- return;
- }
-
- throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()"/"has%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), $lineno, $source);
- }
-
- if ($isDefinedTest) {
- return true;
- }
-
- if ($sandboxed) {
- $env->getExtension(SandboxExtension::class)->checkMethodAllowed($object, $method, $lineno, $source);
- }
-
- // Some objects throw exceptions when they have __call, and the method we try
- // to call is not supported. If ignoreStrictCheck is true, we should return null.
- try {
- $ret = $object->$method(...$arguments);
- } catch (\BadMethodCallException $e) {
- if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) {
- return;
- }
- throw $e;
- }
-
- return $ret;
-}
-
-/**
- * Returns the values from a single column in the input array.
- *
- *
- * {% set items = [{ 'fruit' : 'apple'}, {'fruit' : 'orange' }] %}
- *
- * {% set fruits = items|column('fruit') %}
- *
- * {# fruits now contains ['apple', 'orange'] #}
- *
- *
- * @param array|Traversable $array An array
- * @param mixed $name The column name
- * @param mixed $index The column to use as the index/keys for the returned array
- *
- * @return array The array of values
- */
-function twig_array_column($array, $name, $index = null): array
-{
- if ($array instanceof Traversable) {
- $array = iterator_to_array($array);
- } elseif (!\is_array($array)) {
- throw new RuntimeError(sprintf('The column filter only works with arrays or "Traversable", got "%s" as first argument.', \gettype($array)));
- }
-
- return array_column($array, $name, $index);
-}
-
-function twig_array_filter(Environment $env, $array, $arrow)
-{
- if (!is_iterable($array)) {
- throw new RuntimeError(sprintf('The "filter" filter expects an array or "Traversable", got "%s".', \is_object($array) ? \get_class($array) : \gettype($array)));
- }
-
- twig_check_arrow_in_sandbox($env, $arrow, 'filter', 'filter');
-
- if (\is_array($array)) {
- return array_filter($array, $arrow, \ARRAY_FILTER_USE_BOTH);
- }
-
- // the IteratorIterator wrapping is needed as some internal PHP classes are \Traversable but do not implement \Iterator
- return new \CallbackFilterIterator(new \IteratorIterator($array), $arrow);
-}
-
-function twig_array_map(Environment $env, $array, $arrow)
-{
- twig_check_arrow_in_sandbox($env, $arrow, 'map', 'filter');
-
- $r = [];
- foreach ($array as $k => $v) {
- $r[$k] = $arrow($v, $k);
- }
-
- return $r;
-}
-
-function twig_array_reduce(Environment $env, $array, $arrow, $initial = null)
-{
- twig_check_arrow_in_sandbox($env, $arrow, 'reduce', 'filter');
-
- if (!\is_array($array) && !$array instanceof \Traversable) {
- throw new RuntimeError(sprintf('The "reduce" filter only works with arrays or "Traversable", got "%s" as first argument.', \gettype($array)));
- }
-
- $accumulator = $initial;
- foreach ($array as $key => $value) {
- $accumulator = $arrow($accumulator, $value, $key);
- }
-
- return $accumulator;
-}
-
-function twig_array_some(Environment $env, $array, $arrow)
-{
- twig_check_arrow_in_sandbox($env, $arrow, 'has some', 'operator');
-
- foreach ($array as $k => $v) {
- if ($arrow($v, $k)) {
- return true;
- }
- }
-
- return false;
-}
-
-function twig_array_every(Environment $env, $array, $arrow)
-{
- twig_check_arrow_in_sandbox($env, $arrow, 'has every', 'operator');
-
- foreach ($array as $k => $v) {
- if (!$arrow($v, $k)) {
- return false;
- }
- }
-
- return true;
-}
-
-function twig_check_arrow_in_sandbox(Environment $env, $arrow, $thing, $type)
-{
- if (!$arrow instanceof Closure && $env->hasExtension('\Twig\Extension\SandboxExtension') && $env->getExtension('\Twig\Extension\SandboxExtension')->isSandboxed()) {
- throw new RuntimeError(sprintf('The callable passed to the "%s" %s must be a Closure in sandbox mode.', $thing, $type));
- }
-}
-}
diff --git a/system/vendor/twig/twig/src/Extension/DebugExtension.php b/system/vendor/twig/twig/src/Extension/DebugExtension.php
deleted file mode 100644
index c0f10d5..0000000
--- a/system/vendor/twig/twig/src/Extension/DebugExtension.php
+++ /dev/null
@@ -1,64 +0,0 @@
- $isDumpOutputHtmlSafe ? ['html'] : [], 'needs_context' => true, 'needs_environment' => true, 'is_variadic' => true]),
- ];
- }
-}
-}
-
-namespace {
-use Twig\Environment;
-use Twig\Template;
-use Twig\TemplateWrapper;
-
-function twig_var_dump(Environment $env, $context, ...$vars)
-{
- if (!$env->isDebug()) {
- return;
- }
-
- ob_start();
-
- if (!$vars) {
- $vars = [];
- foreach ($context as $key => $value) {
- if (!$value instanceof Template && !$value instanceof TemplateWrapper) {
- $vars[$key] = $value;
- }
- }
-
- var_dump($vars);
- } else {
- var_dump(...$vars);
- }
-
- return ob_get_clean();
-}
-}
diff --git a/system/vendor/twig/twig/src/Extension/EscaperExtension.php b/system/vendor/twig/twig/src/Extension/EscaperExtension.php
deleted file mode 100644
index ef8879d..0000000
--- a/system/vendor/twig/twig/src/Extension/EscaperExtension.php
+++ /dev/null
@@ -1,416 +0,0 @@
-setDefaultStrategy($defaultStrategy);
- }
-
- public function getTokenParsers(): array
- {
- return [new AutoEscapeTokenParser()];
- }
-
- public function getNodeVisitors(): array
- {
- return [new EscaperNodeVisitor()];
- }
-
- public function getFilters(): array
- {
- return [
- new TwigFilter('escape', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']),
- new TwigFilter('e', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']),
- new TwigFilter('raw', 'twig_raw_filter', ['is_safe' => ['all']]),
- ];
- }
-
- /**
- * Sets the default strategy to use when not defined by the user.
- *
- * The strategy can be a valid PHP callback that takes the template
- * name as an argument and returns the strategy to use.
- *
- * @param string|false|callable $defaultStrategy An escaping strategy
- */
- public function setDefaultStrategy($defaultStrategy): void
- {
- if ('name' === $defaultStrategy) {
- $defaultStrategy = [FileExtensionEscapingStrategy::class, 'guess'];
- }
-
- $this->defaultStrategy = $defaultStrategy;
- }
-
- /**
- * Gets the default strategy to use when not defined by the user.
- *
- * @param string $name The template name
- *
- * @return string|false The default strategy to use for the template
- */
- public function getDefaultStrategy(string $name)
- {
- // disable string callables to avoid calling a function named html or js,
- // or any other upcoming escaping strategy
- if (!\is_string($this->defaultStrategy) && false !== $this->defaultStrategy) {
- return \call_user_func($this->defaultStrategy, $name);
- }
-
- return $this->defaultStrategy;
- }
-
- /**
- * Defines a new escaper to be used via the escape filter.
- *
- * @param string $strategy The strategy name that should be used as a strategy in the escape call
- * @param callable $callable A valid PHP callable
- */
- public function setEscaper($strategy, callable $callable)
- {
- $this->escapers[$strategy] = $callable;
- }
-
- /**
- * Gets all defined escapers.
- *
- * @return callable[] An array of escapers
- */
- public function getEscapers()
- {
- return $this->escapers;
- }
-
- public function setSafeClasses(array $safeClasses = [])
- {
- $this->safeClasses = [];
- $this->safeLookup = [];
- foreach ($safeClasses as $class => $strategies) {
- $this->addSafeClass($class, $strategies);
- }
- }
-
- public function addSafeClass(string $class, array $strategies)
- {
- $class = ltrim($class, '\\');
- if (!isset($this->safeClasses[$class])) {
- $this->safeClasses[$class] = [];
- }
- $this->safeClasses[$class] = array_merge($this->safeClasses[$class], $strategies);
-
- foreach ($strategies as $strategy) {
- $this->safeLookup[$strategy][$class] = true;
- }
- }
-}
-}
-
-namespace {
-use Twig\Environment;
-use Twig\Error\RuntimeError;
-use Twig\Extension\EscaperExtension;
-use Twig\Markup;
-use Twig\Node\Expression\ConstantExpression;
-use Twig\Node\Node;
-
-/**
- * Marks a variable as being safe.
- *
- * @param string $string A PHP variable
- */
-function twig_raw_filter($string)
-{
- return $string;
-}
-
-/**
- * Escapes a string.
- *
- * @param mixed $string The value to be escaped
- * @param string $strategy The escaping strategy
- * @param string $charset The charset
- * @param bool $autoescape Whether the function is called by the auto-escaping feature (true) or by the developer (false)
- *
- * @return string
- */
-function twig_escape_filter(Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false)
-{
- if ($autoescape && $string instanceof Markup) {
- return $string;
- }
-
- if (!\is_string($string)) {
- if (\is_object($string) && method_exists($string, '__toString')) {
- if ($autoescape) {
- $c = \get_class($string);
- $ext = $env->getExtension(EscaperExtension::class);
- if (!isset($ext->safeClasses[$c])) {
- $ext->safeClasses[$c] = [];
- foreach (class_parents($string) + class_implements($string) as $class) {
- if (isset($ext->safeClasses[$class])) {
- $ext->safeClasses[$c] = array_unique(array_merge($ext->safeClasses[$c], $ext->safeClasses[$class]));
- foreach ($ext->safeClasses[$class] as $s) {
- $ext->safeLookup[$s][$c] = true;
- }
- }
- }
- }
- if (isset($ext->safeLookup[$strategy][$c]) || isset($ext->safeLookup['all'][$c])) {
- return (string) $string;
- }
- }
-
- $string = (string) $string;
- } elseif (\in_array($strategy, ['html', 'js', 'css', 'html_attr', 'url'])) {
- return $string;
- }
- }
-
- if ('' === $string) {
- return '';
- }
-
- if (null === $charset) {
- $charset = $env->getCharset();
- }
-
- switch ($strategy) {
- case 'html':
- // see https://www.php.net/htmlspecialchars
-
- // Using a static variable to avoid initializing the array
- // each time the function is called. Moving the declaration on the
- // top of the function slow downs other escaping strategies.
- static $htmlspecialcharsCharsets = [
- 'ISO-8859-1' => true, 'ISO8859-1' => true,
- 'ISO-8859-15' => true, 'ISO8859-15' => true,
- 'utf-8' => true, 'UTF-8' => true,
- 'CP866' => true, 'IBM866' => true, '866' => true,
- 'CP1251' => true, 'WINDOWS-1251' => true, 'WIN-1251' => true,
- '1251' => true,
- 'CP1252' => true, 'WINDOWS-1252' => true, '1252' => true,
- 'KOI8-R' => true, 'KOI8-RU' => true, 'KOI8R' => true,
- 'BIG5' => true, '950' => true,
- 'GB2312' => true, '936' => true,
- 'BIG5-HKSCS' => true,
- 'SHIFT_JIS' => true, 'SJIS' => true, '932' => true,
- 'EUC-JP' => true, 'EUCJP' => true,
- 'ISO8859-5' => true, 'ISO-8859-5' => true, 'MACROMAN' => true,
- ];
-
- if (isset($htmlspecialcharsCharsets[$charset])) {
- return htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, $charset);
- }
-
- if (isset($htmlspecialcharsCharsets[strtoupper($charset)])) {
- // cache the lowercase variant for future iterations
- $htmlspecialcharsCharsets[$charset] = true;
-
- return htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, $charset);
- }
-
- $string = twig_convert_encoding($string, 'UTF-8', $charset);
- $string = htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, 'UTF-8');
-
- return iconv('UTF-8', $charset, $string);
-
- case 'js':
- // escape all non-alphanumeric characters
- // into their \x or \uHHHH representations
- if ('UTF-8' !== $charset) {
- $string = twig_convert_encoding($string, 'UTF-8', $charset);
- }
-
- if (!preg_match('//u', $string)) {
- throw new RuntimeError('The string to escape is not a valid UTF-8 string.');
- }
-
- $string = preg_replace_callback('#[^a-zA-Z0-9,\._]#Su', function ($matches) {
- $char = $matches[0];
-
- /*
- * A few characters have short escape sequences in JSON and JavaScript.
- * Escape sequences supported only by JavaScript, not JSON, are omitted.
- * \" is also supported but omitted, because the resulting string is not HTML safe.
- */
- static $shortMap = [
- '\\' => '\\\\',
- '/' => '\\/',
- "\x08" => '\b',
- "\x0C" => '\f',
- "\x0A" => '\n',
- "\x0D" => '\r',
- "\x09" => '\t',
- ];
-
- if (isset($shortMap[$char])) {
- return $shortMap[$char];
- }
-
- $codepoint = mb_ord($char, 'UTF-8');
- if (0x10000 > $codepoint) {
- return sprintf('\u%04X', $codepoint);
- }
-
- // Split characters outside the BMP into surrogate pairs
- // https://tools.ietf.org/html/rfc2781.html#section-2.1
- $u = $codepoint - 0x10000;
- $high = 0xD800 | ($u >> 10);
- $low = 0xDC00 | ($u & 0x3FF);
-
- return sprintf('\u%04X\u%04X', $high, $low);
- }, $string);
-
- if ('UTF-8' !== $charset) {
- $string = iconv('UTF-8', $charset, $string);
- }
-
- return $string;
-
- case 'css':
- if ('UTF-8' !== $charset) {
- $string = twig_convert_encoding($string, 'UTF-8', $charset);
- }
-
- if (!preg_match('//u', $string)) {
- throw new RuntimeError('The string to escape is not a valid UTF-8 string.');
- }
-
- $string = preg_replace_callback('#[^a-zA-Z0-9]#Su', function ($matches) {
- $char = $matches[0];
-
- return sprintf('\\%X ', 1 === \strlen($char) ? \ord($char) : mb_ord($char, 'UTF-8'));
- }, $string);
-
- if ('UTF-8' !== $charset) {
- $string = iconv('UTF-8', $charset, $string);
- }
-
- return $string;
-
- case 'html_attr':
- if ('UTF-8' !== $charset) {
- $string = twig_convert_encoding($string, 'UTF-8', $charset);
- }
-
- if (!preg_match('//u', $string)) {
- throw new RuntimeError('The string to escape is not a valid UTF-8 string.');
- }
-
- $string = preg_replace_callback('#[^a-zA-Z0-9,\.\-_]#Su', function ($matches) {
- /**
- * This function is adapted from code coming from Zend Framework.
- *
- * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com)
- * @license https://framework.zend.com/license/new-bsd New BSD License
- */
- $chr = $matches[0];
- $ord = \ord($chr);
-
- /*
- * The following replaces characters undefined in HTML with the
- * hex entity for the Unicode replacement character.
- */
- if (($ord <= 0x1F && "\t" != $chr && "\n" != $chr && "\r" != $chr) || ($ord >= 0x7F && $ord <= 0x9F)) {
- return '�';
- }
-
- /*
- * Check if the current character to escape has a name entity we should
- * replace it with while grabbing the hex value of the character.
- */
- if (1 === \strlen($chr)) {
- /*
- * While HTML supports far more named entities, the lowest common denominator
- * has become HTML5's XML Serialisation which is restricted to the those named
- * entities that XML supports. Using HTML entities would result in this error:
- * XML Parsing Error: undefined entity
- */
- static $entityMap = [
- 34 => '"', /* quotation mark */
- 38 => '&', /* ampersand */
- 60 => '<', /* less-than sign */
- 62 => '>', /* greater-than sign */
- ];
-
- if (isset($entityMap[$ord])) {
- return $entityMap[$ord];
- }
-
- return sprintf('%02X;', $ord);
- }
-
- /*
- * Per OWASP recommendations, we'll use hex entities for any other
- * characters where a named entity does not exist.
- */
- return sprintf('%04X;', mb_ord($chr, 'UTF-8'));
- }, $string);
-
- if ('UTF-8' !== $charset) {
- $string = iconv('UTF-8', $charset, $string);
- }
-
- return $string;
-
- case 'url':
- return rawurlencode($string);
-
- default:
- $escapers = $env->getExtension(EscaperExtension::class)->getEscapers();
- if (\array_key_exists($strategy, $escapers)) {
- return $escapers[$strategy]($env, $string, $charset);
- }
-
- $validStrategies = implode(', ', array_merge(['html', 'js', 'url', 'css', 'html_attr'], array_keys($escapers)));
-
- throw new RuntimeError(sprintf('Invalid escaping strategy "%s" (valid ones: %s).', $strategy, $validStrategies));
- }
-}
-
-/**
- * @internal
- */
-function twig_escape_filter_is_safe(Node $filterArgs)
-{
- foreach ($filterArgs as $arg) {
- if ($arg instanceof ConstantExpression) {
- return [$arg->getAttribute('value')];
- }
-
- return [];
- }
-
- return ['html'];
-}
-}
diff --git a/system/vendor/twig/twig/src/Extension/ExtensionInterface.php b/system/vendor/twig/twig/src/Extension/ExtensionInterface.php
deleted file mode 100644
index ab9c2c3..0000000
--- a/system/vendor/twig/twig/src/Extension/ExtensionInterface.php
+++ /dev/null
@@ -1,76 +0,0 @@
-
- */
-interface ExtensionInterface
-{
- /**
- * Returns the token parser instances to add to the existing list.
- *
- * @return TokenParserInterface[]
- */
- public function getTokenParsers();
-
- /**
- * Returns the node visitor instances to add to the existing list.
- *
- * @return NodeVisitorInterface[]
- */
- public function getNodeVisitors();
-
- /**
- * Returns a list of filters to add to the existing list.
- *
- * @return TwigFilter[]
- */
- public function getFilters();
-
- /**
- * Returns a list of tests to add to the existing list.
- *
- * @return TwigTest[]
- */
- public function getTests();
-
- /**
- * Returns a list of functions to add to the existing list.
- *
- * @return TwigFunction[]
- */
- public function getFunctions();
-
- /**
- * Returns a list of operators to add to the existing list.
- *
- * @return array First array of unary operators, second array of binary operators
- *
- * @psalm-return array{
- * array}>,
- * array, associativity: ExpressionParser::OPERATOR_*}>
- * }
- */
- public function getOperators();
-}
diff --git a/system/vendor/twig/twig/src/Extension/GlobalsInterface.php b/system/vendor/twig/twig/src/Extension/GlobalsInterface.php
deleted file mode 100644
index 6f1dfe8..0000000
--- a/system/vendor/twig/twig/src/Extension/GlobalsInterface.php
+++ /dev/null
@@ -1,28 +0,0 @@
-
- */
-interface GlobalsInterface
-{
- /**
- * @return array
- */
- public function getGlobals(): array;
-}
diff --git a/system/vendor/twig/twig/src/Extension/OptimizerExtension.php b/system/vendor/twig/twig/src/Extension/OptimizerExtension.php
deleted file mode 100644
index 965bfdb..0000000
--- a/system/vendor/twig/twig/src/Extension/OptimizerExtension.php
+++ /dev/null
@@ -1,29 +0,0 @@
-optimizers = $optimizers;
- }
-
- public function getNodeVisitors(): array
- {
- return [new OptimizerNodeVisitor($this->optimizers)];
- }
-}
diff --git a/system/vendor/twig/twig/src/Extension/ProfilerExtension.php b/system/vendor/twig/twig/src/Extension/ProfilerExtension.php
deleted file mode 100644
index 43e4a44..0000000
--- a/system/vendor/twig/twig/src/Extension/ProfilerExtension.php
+++ /dev/null
@@ -1,52 +0,0 @@
-actives[] = $profile;
- }
-
- /**
- * @return void
- */
- public function enter(Profile $profile)
- {
- $this->actives[0]->addProfile($profile);
- array_unshift($this->actives, $profile);
- }
-
- /**
- * @return void
- */
- public function leave(Profile $profile)
- {
- $profile->leave();
- array_shift($this->actives);
-
- if (1 === \count($this->actives)) {
- $this->actives[0]->leave();
- }
- }
-
- public function getNodeVisitors(): array
- {
- return [new ProfilerNodeVisitor(static::class)];
- }
-}
diff --git a/system/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php b/system/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php
deleted file mode 100644
index 63bc3b1..0000000
--- a/system/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- */
-interface RuntimeExtensionInterface
-{
-}
diff --git a/system/vendor/twig/twig/src/Extension/SandboxExtension.php b/system/vendor/twig/twig/src/Extension/SandboxExtension.php
deleted file mode 100644
index c861159..0000000
--- a/system/vendor/twig/twig/src/Extension/SandboxExtension.php
+++ /dev/null
@@ -1,123 +0,0 @@
-policy = $policy;
- $this->sandboxedGlobally = $sandboxed;
- }
-
- public function getTokenParsers(): array
- {
- return [new SandboxTokenParser()];
- }
-
- public function getNodeVisitors(): array
- {
- return [new SandboxNodeVisitor()];
- }
-
- public function enableSandbox(): void
- {
- $this->sandboxed = true;
- }
-
- public function disableSandbox(): void
- {
- $this->sandboxed = false;
- }
-
- public function isSandboxed(): bool
- {
- return $this->sandboxedGlobally || $this->sandboxed;
- }
-
- public function isSandboxedGlobally(): bool
- {
- return $this->sandboxedGlobally;
- }
-
- public function setSecurityPolicy(SecurityPolicyInterface $policy)
- {
- $this->policy = $policy;
- }
-
- public function getSecurityPolicy(): SecurityPolicyInterface
- {
- return $this->policy;
- }
-
- public function checkSecurity($tags, $filters, $functions): void
- {
- if ($this->isSandboxed()) {
- $this->policy->checkSecurity($tags, $filters, $functions);
- }
- }
-
- public function checkMethodAllowed($obj, $method, int $lineno = -1, Source $source = null): void
- {
- if ($this->isSandboxed()) {
- try {
- $this->policy->checkMethodAllowed($obj, $method);
- } catch (SecurityNotAllowedMethodError $e) {
- $e->setSourceContext($source);
- $e->setTemplateLine($lineno);
-
- throw $e;
- }
- }
- }
-
- public function checkPropertyAllowed($obj, $property, int $lineno = -1, Source $source = null): void
- {
- if ($this->isSandboxed()) {
- try {
- $this->policy->checkPropertyAllowed($obj, $property);
- } catch (SecurityNotAllowedPropertyError $e) {
- $e->setSourceContext($source);
- $e->setTemplateLine($lineno);
-
- throw $e;
- }
- }
- }
-
- public function ensureToStringAllowed($obj, int $lineno = -1, Source $source = null)
- {
- if ($this->isSandboxed() && \is_object($obj) && method_exists($obj, '__toString')) {
- try {
- $this->policy->checkMethodAllowed($obj, '__toString');
- } catch (SecurityNotAllowedMethodError $e) {
- $e->setSourceContext($source);
- $e->setTemplateLine($lineno);
-
- throw $e;
- }
- }
-
- return $obj;
- }
-}
diff --git a/system/vendor/twig/twig/src/Extension/StagingExtension.php b/system/vendor/twig/twig/src/Extension/StagingExtension.php
deleted file mode 100644
index 0ea47f9..0000000
--- a/system/vendor/twig/twig/src/Extension/StagingExtension.php
+++ /dev/null
@@ -1,100 +0,0 @@
-
- *
- * @internal
- */
-final class StagingExtension extends AbstractExtension
-{
- private $functions = [];
- private $filters = [];
- private $visitors = [];
- private $tokenParsers = [];
- private $tests = [];
-
- public function addFunction(TwigFunction $function): void
- {
- if (isset($this->functions[$function->getName()])) {
- throw new \LogicException(sprintf('Function "%s" is already registered.', $function->getName()));
- }
-
- $this->functions[$function->getName()] = $function;
- }
-
- public function getFunctions(): array
- {
- return $this->functions;
- }
-
- public function addFilter(TwigFilter $filter): void
- {
- if (isset($this->filters[$filter->getName()])) {
- throw new \LogicException(sprintf('Filter "%s" is already registered.', $filter->getName()));
- }
-
- $this->filters[$filter->getName()] = $filter;
- }
-
- public function getFilters(): array
- {
- return $this->filters;
- }
-
- public function addNodeVisitor(NodeVisitorInterface $visitor): void
- {
- $this->visitors[] = $visitor;
- }
-
- public function getNodeVisitors(): array
- {
- return $this->visitors;
- }
-
- public function addTokenParser(TokenParserInterface $parser): void
- {
- if (isset($this->tokenParsers[$parser->getTag()])) {
- throw new \LogicException(sprintf('Tag "%s" is already registered.', $parser->getTag()));
- }
-
- $this->tokenParsers[$parser->getTag()] = $parser;
- }
-
- public function getTokenParsers(): array
- {
- return $this->tokenParsers;
- }
-
- public function addTest(TwigTest $test): void
- {
- if (isset($this->tests[$test->getName()])) {
- throw new \LogicException(sprintf('Test "%s" is already registered.', $test->getName()));
- }
-
- $this->tests[$test->getName()] = $test;
- }
-
- public function getTests(): array
- {
- return $this->tests;
- }
-}
diff --git a/system/vendor/twig/twig/src/Extension/StringLoaderExtension.php b/system/vendor/twig/twig/src/Extension/StringLoaderExtension.php
deleted file mode 100644
index 7b45147..0000000
--- a/system/vendor/twig/twig/src/Extension/StringLoaderExtension.php
+++ /dev/null
@@ -1,42 +0,0 @@
- true]),
- ];
- }
-}
-}
-
-namespace {
-use Twig\Environment;
-use Twig\TemplateWrapper;
-
-/**
- * Loads a template from a string.
- *
- * {{ include(template_from_string("Hello {{ name }}")) }}
- *
- * @param string $template A template as a string or object implementing __toString()
- * @param string $name An optional name of the template to be used in error messages
- */
-function twig_template_from_string(Environment $env, $template, string $name = null): TemplateWrapper
-{
- return $env->createTemplate((string) $template, $name);
-}
-}
diff --git a/system/vendor/twig/twig/src/ExtensionSet.php b/system/vendor/twig/twig/src/ExtensionSet.php
deleted file mode 100644
index d32200c..0000000
--- a/system/vendor/twig/twig/src/ExtensionSet.php
+++ /dev/null
@@ -1,480 +0,0 @@
-
- *
- * @internal
- */
-final class ExtensionSet
-{
- private $extensions;
- private $initialized = false;
- private $runtimeInitialized = false;
- private $staging;
- private $parsers;
- private $visitors;
- /** @var array */
- private $filters;
- /** @var array */
- private $tests;
- /** @var array */
- private $functions;
- /** @var array}> */
- private $unaryOperators;
- /** @var array, associativity: ExpressionParser::OPERATOR_*}> */
- private $binaryOperators;
- /** @var array */
- private $globals;
- private $functionCallbacks = [];
- private $filterCallbacks = [];
- private $parserCallbacks = [];
- private $lastModified = 0;
-
- public function __construct()
- {
- $this->staging = new StagingExtension();
- }
-
- public function initRuntime()
- {
- $this->runtimeInitialized = true;
- }
-
- public function hasExtension(string $class): bool
- {
- return isset($this->extensions[ltrim($class, '\\')]);
- }
-
- public function getExtension(string $class): ExtensionInterface
- {
- $class = ltrim($class, '\\');
-
- if (!isset($this->extensions[$class])) {
- throw new RuntimeError(sprintf('The "%s" extension is not enabled.', $class));
- }
-
- return $this->extensions[$class];
- }
-
- /**
- * @param ExtensionInterface[] $extensions
- */
- public function setExtensions(array $extensions): void
- {
- foreach ($extensions as $extension) {
- $this->addExtension($extension);
- }
- }
-
- /**
- * @return ExtensionInterface[]
- */
- public function getExtensions(): array
- {
- return $this->extensions;
- }
-
- public function getSignature(): string
- {
- return json_encode(array_keys($this->extensions));
- }
-
- public function isInitialized(): bool
- {
- return $this->initialized || $this->runtimeInitialized;
- }
-
- public function getLastModified(): int
- {
- if (0 !== $this->lastModified) {
- return $this->lastModified;
- }
-
- foreach ($this->extensions as $extension) {
- $r = new \ReflectionObject($extension);
- if (is_file($r->getFileName()) && ($extensionTime = filemtime($r->getFileName())) > $this->lastModified) {
- $this->lastModified = $extensionTime;
- }
- }
-
- return $this->lastModified;
- }
-
- public function addExtension(ExtensionInterface $extension): void
- {
- $class = \get_class($extension);
-
- if ($this->initialized) {
- throw new \LogicException(sprintf('Unable to register extension "%s" as extensions have already been initialized.', $class));
- }
-
- if (isset($this->extensions[$class])) {
- throw new \LogicException(sprintf('Unable to register extension "%s" as it is already registered.', $class));
- }
-
- $this->extensions[$class] = $extension;
- }
-
- public function addFunction(TwigFunction $function): void
- {
- if ($this->initialized) {
- throw new \LogicException(sprintf('Unable to add function "%s" as extensions have already been initialized.', $function->getName()));
- }
-
- $this->staging->addFunction($function);
- }
-
- /**
- * @return TwigFunction[]
- */
- public function getFunctions(): array
- {
- if (!$this->initialized) {
- $this->initExtensions();
- }
-
- return $this->functions;
- }
-
- public function getFunction(string $name): ?TwigFunction
- {
- if (!$this->initialized) {
- $this->initExtensions();
- }
-
- if (isset($this->functions[$name])) {
- return $this->functions[$name];
- }
-
- foreach ($this->functions as $pattern => $function) {
- $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count);
-
- if ($count && preg_match('#^'.$pattern.'$#', $name, $matches)) {
- array_shift($matches);
- $function->setArguments($matches);
-
- return $function;
- }
- }
-
- foreach ($this->functionCallbacks as $callback) {
- if (false !== $function = $callback($name)) {
- return $function;
- }
- }
-
- return null;
- }
-
- public function registerUndefinedFunctionCallback(callable $callable): void
- {
- $this->functionCallbacks[] = $callable;
- }
-
- public function addFilter(TwigFilter $filter): void
- {
- if ($this->initialized) {
- throw new \LogicException(sprintf('Unable to add filter "%s" as extensions have already been initialized.', $filter->getName()));
- }
-
- $this->staging->addFilter($filter);
- }
-
- /**
- * @return TwigFilter[]
- */
- public function getFilters(): array
- {
- if (!$this->initialized) {
- $this->initExtensions();
- }
-
- return $this->filters;
- }
-
- public function getFilter(string $name): ?TwigFilter
- {
- if (!$this->initialized) {
- $this->initExtensions();
- }
-
- if (isset($this->filters[$name])) {
- return $this->filters[$name];
- }
-
- foreach ($this->filters as $pattern => $filter) {
- $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count);
-
- if ($count && preg_match('#^'.$pattern.'$#', $name, $matches)) {
- array_shift($matches);
- $filter->setArguments($matches);
-
- return $filter;
- }
- }
-
- foreach ($this->filterCallbacks as $callback) {
- if (false !== $filter = $callback($name)) {
- return $filter;
- }
- }
-
- return null;
- }
-
- public function registerUndefinedFilterCallback(callable $callable): void
- {
- $this->filterCallbacks[] = $callable;
- }
-
- public function addNodeVisitor(NodeVisitorInterface $visitor): void
- {
- if ($this->initialized) {
- throw new \LogicException('Unable to add a node visitor as extensions have already been initialized.');
- }
-
- $this->staging->addNodeVisitor($visitor);
- }
-
- /**
- * @return NodeVisitorInterface[]
- */
- public function getNodeVisitors(): array
- {
- if (!$this->initialized) {
- $this->initExtensions();
- }
-
- return $this->visitors;
- }
-
- public function addTokenParser(TokenParserInterface $parser): void
- {
- if ($this->initialized) {
- throw new \LogicException('Unable to add a token parser as extensions have already been initialized.');
- }
-
- $this->staging->addTokenParser($parser);
- }
-
- /**
- * @return TokenParserInterface[]
- */
- public function getTokenParsers(): array
- {
- if (!$this->initialized) {
- $this->initExtensions();
- }
-
- return $this->parsers;
- }
-
- public function getTokenParser(string $name): ?TokenParserInterface
- {
- if (!$this->initialized) {
- $this->initExtensions();
- }
-
- if (isset($this->parsers[$name])) {
- return $this->parsers[$name];
- }
-
- foreach ($this->parserCallbacks as $callback) {
- if (false !== $parser = $callback($name)) {
- return $parser;
- }
- }
-
- return null;
- }
-
- public function registerUndefinedTokenParserCallback(callable $callable): void
- {
- $this->parserCallbacks[] = $callable;
- }
-
- /**
- * @return array
- */
- public function getGlobals(): array
- {
- if (null !== $this->globals) {
- return $this->globals;
- }
-
- $globals = [];
- foreach ($this->extensions as $extension) {
- if (!$extension instanceof GlobalsInterface) {
- continue;
- }
-
- $extGlobals = $extension->getGlobals();
- if (!\is_array($extGlobals)) {
- throw new \UnexpectedValueException(sprintf('"%s::getGlobals()" must return an array of globals.', \get_class($extension)));
- }
-
- $globals = array_merge($globals, $extGlobals);
- }
-
- if ($this->initialized) {
- $this->globals = $globals;
- }
-
- return $globals;
- }
-
- public function addTest(TwigTest $test): void
- {
- if ($this->initialized) {
- throw new \LogicException(sprintf('Unable to add test "%s" as extensions have already been initialized.', $test->getName()));
- }
-
- $this->staging->addTest($test);
- }
-
- /**
- * @return TwigTest[]
- */
- public function getTests(): array
- {
- if (!$this->initialized) {
- $this->initExtensions();
- }
-
- return $this->tests;
- }
-
- public function getTest(string $name): ?TwigTest
- {
- if (!$this->initialized) {
- $this->initExtensions();
- }
-
- if (isset($this->tests[$name])) {
- return $this->tests[$name];
- }
-
- foreach ($this->tests as $pattern => $test) {
- $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count);
-
- if ($count) {
- if (preg_match('#^'.$pattern.'$#', $name, $matches)) {
- array_shift($matches);
- $test->setArguments($matches);
-
- return $test;
- }
- }
- }
-
- return null;
- }
-
- /**
- * @return array}>
- */
- public function getUnaryOperators(): array
- {
- if (!$this->initialized) {
- $this->initExtensions();
- }
-
- return $this->unaryOperators;
- }
-
- /**
- * @return array, associativity: ExpressionParser::OPERATOR_*}>
- */
- public function getBinaryOperators(): array
- {
- if (!$this->initialized) {
- $this->initExtensions();
- }
-
- return $this->binaryOperators;
- }
-
- private function initExtensions(): void
- {
- $this->parsers = [];
- $this->filters = [];
- $this->functions = [];
- $this->tests = [];
- $this->visitors = [];
- $this->unaryOperators = [];
- $this->binaryOperators = [];
-
- foreach ($this->extensions as $extension) {
- $this->initExtension($extension);
- }
- $this->initExtension($this->staging);
- // Done at the end only, so that an exception during initialization does not mark the environment as initialized when catching the exception
- $this->initialized = true;
- }
-
- private function initExtension(ExtensionInterface $extension): void
- {
- // filters
- foreach ($extension->getFilters() as $filter) {
- $this->filters[$filter->getName()] = $filter;
- }
-
- // functions
- foreach ($extension->getFunctions() as $function) {
- $this->functions[$function->getName()] = $function;
- }
-
- // tests
- foreach ($extension->getTests() as $test) {
- $this->tests[$test->getName()] = $test;
- }
-
- // token parsers
- foreach ($extension->getTokenParsers() as $parser) {
- if (!$parser instanceof TokenParserInterface) {
- throw new \LogicException('getTokenParsers() must return an array of \Twig\TokenParser\TokenParserInterface.');
- }
-
- $this->parsers[$parser->getTag()] = $parser;
- }
-
- // node visitors
- foreach ($extension->getNodeVisitors() as $visitor) {
- $this->visitors[] = $visitor;
- }
-
- // operators
- if ($operators = $extension->getOperators()) {
- if (!\is_array($operators)) {
- throw new \InvalidArgumentException(sprintf('"%s::getOperators()" must return an array with operators, got "%s".', \get_class($extension), \is_object($operators) ? \get_class($operators) : \gettype($operators).(\is_resource($operators) ? '' : '#'.$operators)));
- }
-
- if (2 !== \count($operators)) {
- throw new \InvalidArgumentException(sprintf('"%s::getOperators()" must return an array of 2 elements, got %d.', \get_class($extension), \count($operators)));
- }
-
- $this->unaryOperators = array_merge($this->unaryOperators, $operators[0]);
- $this->binaryOperators = array_merge($this->binaryOperators, $operators[1]);
- }
- }
-}
diff --git a/system/vendor/twig/twig/src/FileExtensionEscapingStrategy.php b/system/vendor/twig/twig/src/FileExtensionEscapingStrategy.php
deleted file mode 100644
index 812071b..0000000
--- a/system/vendor/twig/twig/src/FileExtensionEscapingStrategy.php
+++ /dev/null
@@ -1,60 +0,0 @@
-
- */
-class FileExtensionEscapingStrategy
-{
- /**
- * Guesses the best autoescaping strategy based on the file name.
- *
- * @param string $name The template name
- *
- * @return string|false The escaping strategy name to use or false to disable
- */
- public static function guess(string $name)
- {
- if (\in_array(substr($name, -1), ['/', '\\'])) {
- return 'html'; // return html for directories
- }
-
- if (str_ends_with($name, '.twig')) {
- $name = substr($name, 0, -5);
- }
-
- $extension = pathinfo($name, \PATHINFO_EXTENSION);
-
- switch ($extension) {
- case 'js':
- return 'js';
-
- case 'css':
- return 'css';
-
- case 'txt':
- return false;
-
- default:
- return 'html';
- }
- }
-}
diff --git a/system/vendor/twig/twig/src/Lexer.php b/system/vendor/twig/twig/src/Lexer.php
deleted file mode 100644
index b23080f..0000000
--- a/system/vendor/twig/twig/src/Lexer.php
+++ /dev/null
@@ -1,519 +0,0 @@
-
- */
-class Lexer
-{
- private $isInitialized = false;
-
- private $tokens;
- private $code;
- private $cursor;
- private $lineno;
- private $end;
- private $state;
- private $states;
- private $brackets;
- private $env;
- private $source;
- private $options;
- private $regexes;
- private $position;
- private $positions;
- private $currentVarBlockLine;
-
- public const STATE_DATA = 0;
- public const STATE_BLOCK = 1;
- public const STATE_VAR = 2;
- public const STATE_STRING = 3;
- public const STATE_INTERPOLATION = 4;
-
- public const REGEX_NAME = '/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A';
- public const REGEX_NUMBER = '/[0-9]+(?:\.[0-9]+)?([Ee][\+\-][0-9]+)?/A';
- public const REGEX_STRING = '/"([^#"\\\\]*(?:\\\\.[^#"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As';
- public const REGEX_DQ_STRING_DELIM = '/"/A';
- public const REGEX_DQ_STRING_PART = '/[^#"\\\\]*(?:(?:\\\\.|#(?!\{))[^#"\\\\]*)*/As';
- public const PUNCTUATION = '()[]{}?:.,|';
-
- public function __construct(Environment $env, array $options = [])
- {
- $this->env = $env;
-
- $this->options = array_merge([
- 'tag_comment' => ['{#', '#}'],
- 'tag_block' => ['{%', '%}'],
- 'tag_variable' => ['{{', '}}'],
- 'whitespace_trim' => '-',
- 'whitespace_line_trim' => '~',
- 'whitespace_line_chars' => ' \t\0\x0B',
- 'interpolation' => ['#{', '}'],
- ], $options);
- }
-
- private function initialize()
- {
- if ($this->isInitialized) {
- return;
- }
-
- $this->isInitialized = true;
-
- // when PHP 7.3 is the min version, we will be able to remove the '#' part in preg_quote as it's part of the default
- $this->regexes = [
- // }}
- 'lex_var' => '{
- \s*
- (?:'.
- preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1], '#').'\s*'. // -}}\s*
- '|'.
- preg_quote($this->options['whitespace_line_trim'].$this->options['tag_variable'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~}}[ \t\0\x0B]*
- '|'.
- preg_quote($this->options['tag_variable'][1], '#'). // }}
- ')
- }Ax',
-
- // %}
- 'lex_block' => '{
- \s*
- (?:'.
- preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*\n?'. // -%}\s*\n?
- '|'.
- preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]*
- '|'.
- preg_quote($this->options['tag_block'][1], '#').'\n?'. // %}\n?
- ')
- }Ax',
-
- // {% endverbatim %}
- 'lex_raw_data' => '{'.
- preg_quote($this->options['tag_block'][0], '#'). // {%
- '('.
- $this->options['whitespace_trim']. // -
- '|'.
- $this->options['whitespace_line_trim']. // ~
- ')?\s*endverbatim\s*'.
- '(?:'.
- preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%}
- '|'.
- preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]*
- '|'.
- preg_quote($this->options['tag_block'][1], '#'). // %}
- ')
- }sx',
-
- 'operator' => $this->getOperatorRegex(),
-
- // #}
- 'lex_comment' => '{
- (?:'.
- preg_quote($this->options['whitespace_trim'].$this->options['tag_comment'][1], '#').'\s*\n?'. // -#}\s*\n?
- '|'.
- preg_quote($this->options['whitespace_line_trim'].$this->options['tag_comment'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~#}[ \t\0\x0B]*
- '|'.
- preg_quote($this->options['tag_comment'][1], '#').'\n?'. // #}\n?
- ')
- }sx',
-
- // verbatim %}
- 'lex_block_raw' => '{
- \s*verbatim\s*
- (?:'.
- preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%}\s*
- '|'.
- preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]*
- '|'.
- preg_quote($this->options['tag_block'][1], '#'). // %}
- ')
- }Asx',
-
- 'lex_block_line' => '{\s*line\s+(\d+)\s*'.preg_quote($this->options['tag_block'][1], '#').'}As',
-
- // {{ or {% or {#
- 'lex_tokens_start' => '{
- ('.
- preg_quote($this->options['tag_variable'][0], '#'). // {{
- '|'.
- preg_quote($this->options['tag_block'][0], '#'). // {%
- '|'.
- preg_quote($this->options['tag_comment'][0], '#'). // {#
- ')('.
- preg_quote($this->options['whitespace_trim'], '#'). // -
- '|'.
- preg_quote($this->options['whitespace_line_trim'], '#'). // ~
- ')?
- }sx',
- 'interpolation_start' => '{'.preg_quote($this->options['interpolation'][0], '#').'\s*}A',
- 'interpolation_end' => '{\s*'.preg_quote($this->options['interpolation'][1], '#').'}A',
- ];
- }
-
- public function tokenize(Source $source): TokenStream
- {
- $this->initialize();
-
- $this->source = $source;
- $this->code = str_replace(["\r\n", "\r"], "\n", $source->getCode());
- $this->cursor = 0;
- $this->lineno = 1;
- $this->end = \strlen($this->code);
- $this->tokens = [];
- $this->state = self::STATE_DATA;
- $this->states = [];
- $this->brackets = [];
- $this->position = -1;
-
- // find all token starts in one go
- preg_match_all($this->regexes['lex_tokens_start'], $this->code, $matches, \PREG_OFFSET_CAPTURE);
- $this->positions = $matches;
-
- while ($this->cursor < $this->end) {
- // dispatch to the lexing functions depending
- // on the current state
- switch ($this->state) {
- case self::STATE_DATA:
- $this->lexData();
- break;
-
- case self::STATE_BLOCK:
- $this->lexBlock();
- break;
-
- case self::STATE_VAR:
- $this->lexVar();
- break;
-
- case self::STATE_STRING:
- $this->lexString();
- break;
-
- case self::STATE_INTERPOLATION:
- $this->lexInterpolation();
- break;
- }
- }
-
- $this->pushToken(/* Token::EOF_TYPE */ -1);
-
- if (!empty($this->brackets)) {
- list($expect, $lineno) = array_pop($this->brackets);
- throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source);
- }
-
- return new TokenStream($this->tokens, $this->source);
- }
-
- private function lexData(): void
- {
- // if no matches are left we return the rest of the template as simple text token
- if ($this->position == \count($this->positions[0]) - 1) {
- $this->pushToken(/* Token::TEXT_TYPE */ 0, substr($this->code, $this->cursor));
- $this->cursor = $this->end;
-
- return;
- }
-
- // Find the first token after the current cursor
- $position = $this->positions[0][++$this->position];
- while ($position[1] < $this->cursor) {
- if ($this->position == \count($this->positions[0]) - 1) {
- return;
- }
- $position = $this->positions[0][++$this->position];
- }
-
- // push the template text first
- $text = $textContent = substr($this->code, $this->cursor, $position[1] - $this->cursor);
-
- // trim?
- if (isset($this->positions[2][$this->position][0])) {
- if ($this->options['whitespace_trim'] === $this->positions[2][$this->position][0]) {
- // whitespace_trim detected ({%-, {{- or {#-)
- $text = rtrim($text);
- } elseif ($this->options['whitespace_line_trim'] === $this->positions[2][$this->position][0]) {
- // whitespace_line_trim detected ({%~, {{~ or {#~)
- // don't trim \r and \n
- $text = rtrim($text, " \t\0\x0B");
- }
- }
- $this->pushToken(/* Token::TEXT_TYPE */ 0, $text);
- $this->moveCursor($textContent.$position[0]);
-
- switch ($this->positions[1][$this->position][0]) {
- case $this->options['tag_comment'][0]:
- $this->lexComment();
- break;
-
- case $this->options['tag_block'][0]:
- // raw data?
- if (preg_match($this->regexes['lex_block_raw'], $this->code, $match, 0, $this->cursor)) {
- $this->moveCursor($match[0]);
- $this->lexRawData();
- // {% line \d+ %}
- } elseif (preg_match($this->regexes['lex_block_line'], $this->code, $match, 0, $this->cursor)) {
- $this->moveCursor($match[0]);
- $this->lineno = (int) $match[1];
- } else {
- $this->pushToken(/* Token::BLOCK_START_TYPE */ 1);
- $this->pushState(self::STATE_BLOCK);
- $this->currentVarBlockLine = $this->lineno;
- }
- break;
-
- case $this->options['tag_variable'][0]:
- $this->pushToken(/* Token::VAR_START_TYPE */ 2);
- $this->pushState(self::STATE_VAR);
- $this->currentVarBlockLine = $this->lineno;
- break;
- }
- }
-
- private function lexBlock(): void
- {
- if (empty($this->brackets) && preg_match($this->regexes['lex_block'], $this->code, $match, 0, $this->cursor)) {
- $this->pushToken(/* Token::BLOCK_END_TYPE */ 3);
- $this->moveCursor($match[0]);
- $this->popState();
- } else {
- $this->lexExpression();
- }
- }
-
- private function lexVar(): void
- {
- if (empty($this->brackets) && preg_match($this->regexes['lex_var'], $this->code, $match, 0, $this->cursor)) {
- $this->pushToken(/* Token::VAR_END_TYPE */ 4);
- $this->moveCursor($match[0]);
- $this->popState();
- } else {
- $this->lexExpression();
- }
- }
-
- private function lexExpression(): void
- {
- // whitespace
- if (preg_match('/\s+/A', $this->code, $match, 0, $this->cursor)) {
- $this->moveCursor($match[0]);
-
- if ($this->cursor >= $this->end) {
- throw new SyntaxError(sprintf('Unclosed "%s".', self::STATE_BLOCK === $this->state ? 'block' : 'variable'), $this->currentVarBlockLine, $this->source);
- }
- }
-
- // spread operator
- if ('.' === $this->code[$this->cursor] && ($this->cursor + 2 < $this->end) && '.' === $this->code[$this->cursor + 1] && '.' === $this->code[$this->cursor + 2]) {
- $this->pushToken(Token::SPREAD_TYPE, '...');
- $this->moveCursor('...');
- }
- // arrow function
- elseif ('=' === $this->code[$this->cursor] && '>' === $this->code[$this->cursor + 1]) {
- $this->pushToken(Token::ARROW_TYPE, '=>');
- $this->moveCursor('=>');
- }
- // operators
- elseif (preg_match($this->regexes['operator'], $this->code, $match, 0, $this->cursor)) {
- $this->pushToken(/* Token::OPERATOR_TYPE */ 8, preg_replace('/\s+/', ' ', $match[0]));
- $this->moveCursor($match[0]);
- }
- // names
- elseif (preg_match(self::REGEX_NAME, $this->code, $match, 0, $this->cursor)) {
- $this->pushToken(/* Token::NAME_TYPE */ 5, $match[0]);
- $this->moveCursor($match[0]);
- }
- // numbers
- elseif (preg_match(self::REGEX_NUMBER, $this->code, $match, 0, $this->cursor)) {
- $number = (float) $match[0]; // floats
- if (ctype_digit($match[0]) && $number <= \PHP_INT_MAX) {
- $number = (int) $match[0]; // integers lower than the maximum
- }
- $this->pushToken(/* Token::NUMBER_TYPE */ 6, $number);
- $this->moveCursor($match[0]);
- }
- // punctuation
- elseif (str_contains(self::PUNCTUATION, $this->code[$this->cursor])) {
- // opening bracket
- if (str_contains('([{', $this->code[$this->cursor])) {
- $this->brackets[] = [$this->code[$this->cursor], $this->lineno];
- }
- // closing bracket
- elseif (str_contains(')]}', $this->code[$this->cursor])) {
- if (empty($this->brackets)) {
- throw new SyntaxError(sprintf('Unexpected "%s".', $this->code[$this->cursor]), $this->lineno, $this->source);
- }
-
- list($expect, $lineno) = array_pop($this->brackets);
- if ($this->code[$this->cursor] != strtr($expect, '([{', ')]}')) {
- throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source);
- }
- }
-
- $this->pushToken(/* Token::PUNCTUATION_TYPE */ 9, $this->code[$this->cursor]);
- ++$this->cursor;
- }
- // strings
- elseif (preg_match(self::REGEX_STRING, $this->code, $match, 0, $this->cursor)) {
- $this->pushToken(/* Token::STRING_TYPE */ 7, stripcslashes(substr($match[0], 1, -1)));
- $this->moveCursor($match[0]);
- }
- // opening double quoted string
- elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) {
- $this->brackets[] = ['"', $this->lineno];
- $this->pushState(self::STATE_STRING);
- $this->moveCursor($match[0]);
- }
- // unlexable
- else {
- throw new SyntaxError(sprintf('Unexpected character "%s".', $this->code[$this->cursor]), $this->lineno, $this->source);
- }
- }
-
- private function lexRawData(): void
- {
- if (!preg_match($this->regexes['lex_raw_data'], $this->code, $match, \PREG_OFFSET_CAPTURE, $this->cursor)) {
- throw new SyntaxError('Unexpected end of file: Unclosed "verbatim" block.', $this->lineno, $this->source);
- }
-
- $text = substr($this->code, $this->cursor, $match[0][1] - $this->cursor);
- $this->moveCursor($text.$match[0][0]);
-
- // trim?
- if (isset($match[1][0])) {
- if ($this->options['whitespace_trim'] === $match[1][0]) {
- // whitespace_trim detected ({%-, {{- or {#-)
- $text = rtrim($text);
- } else {
- // whitespace_line_trim detected ({%~, {{~ or {#~)
- // don't trim \r and \n
- $text = rtrim($text, " \t\0\x0B");
- }
- }
-
- $this->pushToken(/* Token::TEXT_TYPE */ 0, $text);
- }
-
- private function lexComment(): void
- {
- if (!preg_match($this->regexes['lex_comment'], $this->code, $match, \PREG_OFFSET_CAPTURE, $this->cursor)) {
- throw new SyntaxError('Unclosed comment.', $this->lineno, $this->source);
- }
-
- $this->moveCursor(substr($this->code, $this->cursor, $match[0][1] - $this->cursor).$match[0][0]);
- }
-
- private function lexString(): void
- {
- if (preg_match($this->regexes['interpolation_start'], $this->code, $match, 0, $this->cursor)) {
- $this->brackets[] = [$this->options['interpolation'][0], $this->lineno];
- $this->pushToken(/* Token::INTERPOLATION_START_TYPE */ 10);
- $this->moveCursor($match[0]);
- $this->pushState(self::STATE_INTERPOLATION);
- } elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code, $match, 0, $this->cursor) && '' !== $match[0]) {
- $this->pushToken(/* Token::STRING_TYPE */ 7, stripcslashes($match[0]));
- $this->moveCursor($match[0]);
- } elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) {
- list($expect, $lineno) = array_pop($this->brackets);
- if ('"' != $this->code[$this->cursor]) {
- throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source);
- }
-
- $this->popState();
- ++$this->cursor;
- } else {
- // unlexable
- throw new SyntaxError(sprintf('Unexpected character "%s".', $this->code[$this->cursor]), $this->lineno, $this->source);
- }
- }
-
- private function lexInterpolation(): void
- {
- $bracket = end($this->brackets);
- if ($this->options['interpolation'][0] === $bracket[0] && preg_match($this->regexes['interpolation_end'], $this->code, $match, 0, $this->cursor)) {
- array_pop($this->brackets);
- $this->pushToken(/* Token::INTERPOLATION_END_TYPE */ 11);
- $this->moveCursor($match[0]);
- $this->popState();
- } else {
- $this->lexExpression();
- }
- }
-
- private function pushToken($type, $value = ''): void
- {
- // do not push empty text tokens
- if (/* Token::TEXT_TYPE */ 0 === $type && '' === $value) {
- return;
- }
-
- $this->tokens[] = new Token($type, $value, $this->lineno);
- }
-
- private function moveCursor($text): void
- {
- $this->cursor += \strlen($text);
- $this->lineno += substr_count($text, "\n");
- }
-
- private function getOperatorRegex(): string
- {
- $operators = array_merge(
- ['='],
- array_keys($this->env->getUnaryOperators()),
- array_keys($this->env->getBinaryOperators())
- );
-
- $operators = array_combine($operators, array_map('strlen', $operators));
- arsort($operators);
-
- $regex = [];
- foreach ($operators as $operator => $length) {
- // an operator that ends with a character must be followed by
- // a whitespace, a parenthesis, an opening map [ or sequence {
- $r = preg_quote($operator, '/');
- if (ctype_alpha($operator[$length - 1])) {
- $r .= '(?=[\s()\[{])';
- }
-
- // an operator that begins with a character must not have a dot or pipe before
- if (ctype_alpha($operator[0])) {
- $r = '(?states[] = $this->state;
- $this->state = $state;
- }
-
- private function popState(): void
- {
- if (0 === \count($this->states)) {
- throw new \LogicException('Cannot pop state without a previous state.');
- }
-
- $this->state = array_pop($this->states);
- }
-}
diff --git a/system/vendor/twig/twig/src/Loader/ArrayLoader.php b/system/vendor/twig/twig/src/Loader/ArrayLoader.php
deleted file mode 100644
index 5d726c3..0000000
--- a/system/vendor/twig/twig/src/Loader/ArrayLoader.php
+++ /dev/null
@@ -1,77 +0,0 @@
-
- */
-final class ArrayLoader implements LoaderInterface
-{
- private $templates = [];
-
- /**
- * @param array $templates An array of templates (keys are the names, and values are the source code)
- */
- public function __construct(array $templates = [])
- {
- $this->templates = $templates;
- }
-
- public function setTemplate(string $name, string $template): void
- {
- $this->templates[$name] = $template;
- }
-
- public function getSourceContext(string $name): Source
- {
- if (!isset($this->templates[$name])) {
- throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
- }
-
- return new Source($this->templates[$name], $name);
- }
-
- public function exists(string $name): bool
- {
- return isset($this->templates[$name]);
- }
-
- public function getCacheKey(string $name): string
- {
- if (!isset($this->templates[$name])) {
- throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
- }
-
- return $name.':'.$this->templates[$name];
- }
-
- public function isFresh(string $name, int $time): bool
- {
- if (!isset($this->templates[$name])) {
- throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
- }
-
- return true;
- }
-}
diff --git a/system/vendor/twig/twig/src/Loader/ChainLoader.php b/system/vendor/twig/twig/src/Loader/ChainLoader.php
deleted file mode 100644
index fbf4f3a..0000000
--- a/system/vendor/twig/twig/src/Loader/ChainLoader.php
+++ /dev/null
@@ -1,119 +0,0 @@
-
- */
-final class ChainLoader implements LoaderInterface
-{
- private $hasSourceCache = [];
- private $loaders = [];
-
- /**
- * @param LoaderInterface[] $loaders
- */
- public function __construct(array $loaders = [])
- {
- foreach ($loaders as $loader) {
- $this->addLoader($loader);
- }
- }
-
- public function addLoader(LoaderInterface $loader): void
- {
- $this->loaders[] = $loader;
- $this->hasSourceCache = [];
- }
-
- /**
- * @return LoaderInterface[]
- */
- public function getLoaders(): array
- {
- return $this->loaders;
- }
-
- public function getSourceContext(string $name): Source
- {
- $exceptions = [];
- foreach ($this->loaders as $loader) {
- if (!$loader->exists($name)) {
- continue;
- }
-
- try {
- return $loader->getSourceContext($name);
- } catch (LoaderError $e) {
- $exceptions[] = $e->getMessage();
- }
- }
-
- throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : ''));
- }
-
- public function exists(string $name): bool
- {
- if (isset($this->hasSourceCache[$name])) {
- return $this->hasSourceCache[$name];
- }
-
- foreach ($this->loaders as $loader) {
- if ($loader->exists($name)) {
- return $this->hasSourceCache[$name] = true;
- }
- }
-
- return $this->hasSourceCache[$name] = false;
- }
-
- public function getCacheKey(string $name): string
- {
- $exceptions = [];
- foreach ($this->loaders as $loader) {
- if (!$loader->exists($name)) {
- continue;
- }
-
- try {
- return $loader->getCacheKey($name);
- } catch (LoaderError $e) {
- $exceptions[] = \get_class($loader).': '.$e->getMessage();
- }
- }
-
- throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : ''));
- }
-
- public function isFresh(string $name, int $time): bool
- {
- $exceptions = [];
- foreach ($this->loaders as $loader) {
- if (!$loader->exists($name)) {
- continue;
- }
-
- try {
- return $loader->isFresh($name, $time);
- } catch (LoaderError $e) {
- $exceptions[] = \get_class($loader).': '.$e->getMessage();
- }
- }
-
- throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : ''));
- }
-}
diff --git a/system/vendor/twig/twig/src/Loader/FilesystemLoader.php b/system/vendor/twig/twig/src/Loader/FilesystemLoader.php
deleted file mode 100644
index 1073a40..0000000
--- a/system/vendor/twig/twig/src/Loader/FilesystemLoader.php
+++ /dev/null
@@ -1,283 +0,0 @@
-
- */
-class FilesystemLoader implements LoaderInterface
-{
- /** Identifier of the main namespace. */
- public const MAIN_NAMESPACE = '__main__';
-
- protected $paths = [];
- protected $cache = [];
- protected $errorCache = [];
-
- private $rootPath;
-
- /**
- * @param string|array $paths A path or an array of paths where to look for templates
- * @param string|null $rootPath The root path common to all relative paths (null for getcwd())
- */
- public function __construct($paths = [], string $rootPath = null)
- {
- $this->rootPath = ($rootPath ?? getcwd()).\DIRECTORY_SEPARATOR;
- if (null !== $rootPath && false !== ($realPath = realpath($rootPath))) {
- $this->rootPath = $realPath.\DIRECTORY_SEPARATOR;
- }
-
- if ($paths) {
- $this->setPaths($paths);
- }
- }
-
- /**
- * Returns the paths to the templates.
- */
- public function getPaths(string $namespace = self::MAIN_NAMESPACE): array
- {
- return $this->paths[$namespace] ?? [];
- }
-
- /**
- * Returns the path namespaces.
- *
- * The main namespace is always defined.
- */
- public function getNamespaces(): array
- {
- return array_keys($this->paths);
- }
-
- /**
- * @param string|array $paths A path or an array of paths where to look for templates
- */
- public function setPaths($paths, string $namespace = self::MAIN_NAMESPACE): void
- {
- if (!\is_array($paths)) {
- $paths = [$paths];
- }
-
- $this->paths[$namespace] = [];
- foreach ($paths as $path) {
- $this->addPath($path, $namespace);
- }
- }
-
- /**
- * @throws LoaderError
- */
- public function addPath(string $path, string $namespace = self::MAIN_NAMESPACE): void
- {
- // invalidate the cache
- $this->cache = $this->errorCache = [];
-
- $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path;
- if (!is_dir($checkPath)) {
- throw new LoaderError(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath));
- }
-
- $this->paths[$namespace][] = rtrim($path, '/\\');
- }
-
- /**
- * @throws LoaderError
- */
- public function prependPath(string $path, string $namespace = self::MAIN_NAMESPACE): void
- {
- // invalidate the cache
- $this->cache = $this->errorCache = [];
-
- $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path;
- if (!is_dir($checkPath)) {
- throw new LoaderError(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath));
- }
-
- $path = rtrim($path, '/\\');
-
- if (!isset($this->paths[$namespace])) {
- $this->paths[$namespace][] = $path;
- } else {
- array_unshift($this->paths[$namespace], $path);
- }
- }
-
- public function getSourceContext(string $name): Source
- {
- if (null === $path = $this->findTemplate($name)) {
- return new Source('', $name, '');
- }
-
- return new Source(file_get_contents($path), $name, $path);
- }
-
- public function getCacheKey(string $name): string
- {
- if (null === $path = $this->findTemplate($name)) {
- return '';
- }
- $len = \strlen($this->rootPath);
- if (0 === strncmp($this->rootPath, $path, $len)) {
- return substr($path, $len);
- }
-
- return $path;
- }
-
- /**
- * @return bool
- */
- public function exists(string $name)
- {
- $name = $this->normalizeName($name);
-
- if (isset($this->cache[$name])) {
- return true;
- }
-
- return null !== $this->findTemplate($name, false);
- }
-
- public function isFresh(string $name, int $time): bool
- {
- // false support to be removed in 3.0
- if (null === $path = $this->findTemplate($name)) {
- return false;
- }
-
- return filemtime($path) < $time;
- }
-
- /**
- * @return string|null
- */
- protected function findTemplate(string $name, bool $throw = true)
- {
- $name = $this->normalizeName($name);
-
- if (isset($this->cache[$name])) {
- return $this->cache[$name];
- }
-
- if (isset($this->errorCache[$name])) {
- if (!$throw) {
- return null;
- }
-
- throw new LoaderError($this->errorCache[$name]);
- }
-
- try {
- list($namespace, $shortname) = $this->parseName($name);
-
- $this->validateName($shortname);
- } catch (LoaderError $e) {
- if (!$throw) {
- return null;
- }
-
- throw $e;
- }
-
- if (!isset($this->paths[$namespace])) {
- $this->errorCache[$name] = sprintf('There are no registered paths for namespace "%s".', $namespace);
-
- if (!$throw) {
- return null;
- }
-
- throw new LoaderError($this->errorCache[$name]);
- }
-
- foreach ($this->paths[$namespace] as $path) {
- if (!$this->isAbsolutePath($path)) {
- $path = $this->rootPath.$path;
- }
-
- if (is_file($path.'/'.$shortname)) {
- if (false !== $realpath = realpath($path.'/'.$shortname)) {
- return $this->cache[$name] = $realpath;
- }
-
- return $this->cache[$name] = $path.'/'.$shortname;
- }
- }
-
- $this->errorCache[$name] = sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths[$namespace]));
-
- if (!$throw) {
- return null;
- }
-
- throw new LoaderError($this->errorCache[$name]);
- }
-
- private function normalizeName(string $name): string
- {
- return preg_replace('#/{2,}#', '/', str_replace('\\', '/', $name));
- }
-
- private function parseName(string $name, string $default = self::MAIN_NAMESPACE): array
- {
- if (isset($name[0]) && '@' == $name[0]) {
- if (false === $pos = strpos($name, '/')) {
- throw new LoaderError(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name));
- }
-
- $namespace = substr($name, 1, $pos - 1);
- $shortname = substr($name, $pos + 1);
-
- return [$namespace, $shortname];
- }
-
- return [$default, $name];
- }
-
- private function validateName(string $name): void
- {
- if (str_contains($name, "\0")) {
- throw new LoaderError('A template name cannot contain NUL bytes.');
- }
-
- $name = ltrim($name, '/');
- $parts = explode('/', $name);
- $level = 0;
- foreach ($parts as $part) {
- if ('..' === $part) {
- --$level;
- } elseif ('.' !== $part) {
- ++$level;
- }
-
- if ($level < 0) {
- throw new LoaderError(sprintf('Looks like you try to load a template outside configured directories (%s).', $name));
- }
- }
- }
-
- private function isAbsolutePath(string $file): bool
- {
- return strspn($file, '/\\', 0, 1)
- || (\strlen($file) > 3 && ctype_alpha($file[0])
- && ':' === $file[1]
- && strspn($file, '/\\', 2, 1)
- )
- || null !== parse_url($file, \PHP_URL_SCHEME)
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Loader/LoaderInterface.php b/system/vendor/twig/twig/src/Loader/LoaderInterface.php
deleted file mode 100644
index fec7e85..0000000
--- a/system/vendor/twig/twig/src/Loader/LoaderInterface.php
+++ /dev/null
@@ -1,49 +0,0 @@
-
- */
-interface LoaderInterface
-{
- /**
- * Returns the source context for a given template logical name.
- *
- * @throws LoaderError When $name is not found
- */
- public function getSourceContext(string $name): Source;
-
- /**
- * Gets the cache key to use for the cache for a given template name.
- *
- * @throws LoaderError When $name is not found
- */
- public function getCacheKey(string $name): string;
-
- /**
- * @param int $time Timestamp of the last modification time of the cached template
- *
- * @throws LoaderError When $name is not found
- */
- public function isFresh(string $name, int $time): bool;
-
- /**
- * @return bool
- */
- public function exists(string $name);
-}
diff --git a/system/vendor/twig/twig/src/Markup.php b/system/vendor/twig/twig/src/Markup.php
deleted file mode 100644
index 1788acc..0000000
--- a/system/vendor/twig/twig/src/Markup.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
- */
-class Markup implements \Countable, \JsonSerializable
-{
- private $content;
- private $charset;
-
- public function __construct($content, $charset)
- {
- $this->content = (string) $content;
- $this->charset = $charset;
- }
-
- public function __toString()
- {
- return $this->content;
- }
-
- /**
- * @return int
- */
- #[\ReturnTypeWillChange]
- public function count()
- {
- return mb_strlen($this->content, $this->charset);
- }
-
- /**
- * @return mixed
- */
- #[\ReturnTypeWillChange]
- public function jsonSerialize()
- {
- return $this->content;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/AutoEscapeNode.php b/system/vendor/twig/twig/src/Node/AutoEscapeNode.php
deleted file mode 100644
index cd97041..0000000
--- a/system/vendor/twig/twig/src/Node/AutoEscapeNode.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
- */
-class AutoEscapeNode extends Node
-{
- public function __construct($value, Node $body, int $lineno, string $tag = 'autoescape')
- {
- parent::__construct(['body' => $body], ['value' => $value], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler->subcompile($this->getNode('body'));
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/BlockNode.php b/system/vendor/twig/twig/src/Node/BlockNode.php
deleted file mode 100644
index 0632ba7..0000000
--- a/system/vendor/twig/twig/src/Node/BlockNode.php
+++ /dev/null
@@ -1,44 +0,0 @@
-
- */
-class BlockNode extends Node
-{
- public function __construct(string $name, Node $body, int $lineno, string $tag = null)
- {
- parent::__construct(['body' => $body], ['name' => $name], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->addDebugInfo($this)
- ->write(sprintf("public function block_%s(\$context, array \$blocks = [])\n", $this->getAttribute('name')), "{\n")
- ->indent()
- ->write("\$macros = \$this->macros;\n")
- ;
-
- $compiler
- ->subcompile($this->getNode('body'))
- ->outdent()
- ->write("}\n\n")
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/BlockReferenceNode.php b/system/vendor/twig/twig/src/Node/BlockReferenceNode.php
deleted file mode 100644
index cc8af5b..0000000
--- a/system/vendor/twig/twig/src/Node/BlockReferenceNode.php
+++ /dev/null
@@ -1,36 +0,0 @@
-
- */
-class BlockReferenceNode extends Node implements NodeOutputInterface
-{
- public function __construct(string $name, int $lineno, string $tag = null)
- {
- parent::__construct([], ['name' => $name], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->addDebugInfo($this)
- ->write(sprintf("\$this->displayBlock('%s', \$context, \$blocks);\n", $this->getAttribute('name')))
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/BodyNode.php b/system/vendor/twig/twig/src/Node/BodyNode.php
deleted file mode 100644
index 041cbf6..0000000
--- a/system/vendor/twig/twig/src/Node/BodyNode.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- */
-class BodyNode extends Node
-{
-}
diff --git a/system/vendor/twig/twig/src/Node/CheckSecurityCallNode.php b/system/vendor/twig/twig/src/Node/CheckSecurityCallNode.php
deleted file mode 100644
index a78a38d..0000000
--- a/system/vendor/twig/twig/src/Node/CheckSecurityCallNode.php
+++ /dev/null
@@ -1,28 +0,0 @@
-
- */
-class CheckSecurityCallNode extends Node
-{
- public function compile(Compiler $compiler)
- {
- $compiler
- ->write("\$this->sandbox = \$this->env->getExtension('\Twig\Extension\SandboxExtension');\n")
- ->write("\$this->checkSecurity();\n")
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/CheckSecurityNode.php b/system/vendor/twig/twig/src/Node/CheckSecurityNode.php
deleted file mode 100644
index 4727327..0000000
--- a/system/vendor/twig/twig/src/Node/CheckSecurityNode.php
+++ /dev/null
@@ -1,88 +0,0 @@
-
- */
-class CheckSecurityNode extends Node
-{
- private $usedFilters;
- private $usedTags;
- private $usedFunctions;
-
- public function __construct(array $usedFilters, array $usedTags, array $usedFunctions)
- {
- $this->usedFilters = $usedFilters;
- $this->usedTags = $usedTags;
- $this->usedFunctions = $usedFunctions;
-
- parent::__construct();
- }
-
- public function compile(Compiler $compiler): void
- {
- $tags = $filters = $functions = [];
- foreach (['tags', 'filters', 'functions'] as $type) {
- foreach ($this->{'used'.ucfirst($type)} as $name => $node) {
- if ($node instanceof Node) {
- ${$type}[$name] = $node->getTemplateLine();
- } else {
- ${$type}[$node] = null;
- }
- }
- }
-
- $compiler
- ->write("\n")
- ->write("public function checkSecurity()\n")
- ->write("{\n")
- ->indent()
- ->write('static $tags = ')->repr(array_filter($tags))->raw(";\n")
- ->write('static $filters = ')->repr(array_filter($filters))->raw(";\n")
- ->write('static $functions = ')->repr(array_filter($functions))->raw(";\n\n")
- ->write("try {\n")
- ->indent()
- ->write("\$this->sandbox->checkSecurity(\n")
- ->indent()
- ->write(!$tags ? "[],\n" : "['".implode("', '", array_keys($tags))."'],\n")
- ->write(!$filters ? "[],\n" : "['".implode("', '", array_keys($filters))."'],\n")
- ->write(!$functions ? "[]\n" : "['".implode("', '", array_keys($functions))."']\n")
- ->outdent()
- ->write(");\n")
- ->outdent()
- ->write("} catch (SecurityError \$e) {\n")
- ->indent()
- ->write("\$e->setSourceContext(\$this->source);\n\n")
- ->write("if (\$e instanceof SecurityNotAllowedTagError && isset(\$tags[\$e->getTagName()])) {\n")
- ->indent()
- ->write("\$e->setTemplateLine(\$tags[\$e->getTagName()]);\n")
- ->outdent()
- ->write("} elseif (\$e instanceof SecurityNotAllowedFilterError && isset(\$filters[\$e->getFilterName()])) {\n")
- ->indent()
- ->write("\$e->setTemplateLine(\$filters[\$e->getFilterName()]);\n")
- ->outdent()
- ->write("} elseif (\$e instanceof SecurityNotAllowedFunctionError && isset(\$functions[\$e->getFunctionName()])) {\n")
- ->indent()
- ->write("\$e->setTemplateLine(\$functions[\$e->getFunctionName()]);\n")
- ->outdent()
- ->write("}\n\n")
- ->write("throw \$e;\n")
- ->outdent()
- ->write("}\n\n")
- ->outdent()
- ->write("}\n")
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/CheckToStringNode.php b/system/vendor/twig/twig/src/Node/CheckToStringNode.php
deleted file mode 100644
index c7a9d69..0000000
--- a/system/vendor/twig/twig/src/Node/CheckToStringNode.php
+++ /dev/null
@@ -1,45 +0,0 @@
-
- */
-class CheckToStringNode extends AbstractExpression
-{
- public function __construct(AbstractExpression $expr)
- {
- parent::__construct(['expr' => $expr], [], $expr->getTemplateLine(), $expr->getNodeTag());
- }
-
- public function compile(Compiler $compiler): void
- {
- $expr = $this->getNode('expr');
- $compiler
- ->raw('$this->sandbox->ensureToStringAllowed(')
- ->subcompile($expr)
- ->raw(', ')
- ->repr($expr->getTemplateLine())
- ->raw(', $this->source)')
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/DeprecatedNode.php b/system/vendor/twig/twig/src/Node/DeprecatedNode.php
deleted file mode 100644
index 5ff4430..0000000
--- a/system/vendor/twig/twig/src/Node/DeprecatedNode.php
+++ /dev/null
@@ -1,53 +0,0 @@
-
- */
-class DeprecatedNode extends Node
-{
- public function __construct(AbstractExpression $expr, int $lineno, string $tag = null)
- {
- parent::__construct(['expr' => $expr], [], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler->addDebugInfo($this);
-
- $expr = $this->getNode('expr');
-
- if ($expr instanceof ConstantExpression) {
- $compiler->write('@trigger_error(')
- ->subcompile($expr);
- } else {
- $varName = $compiler->getVarName();
- $compiler->write(sprintf('$%s = ', $varName))
- ->subcompile($expr)
- ->raw(";\n")
- ->write(sprintf('@trigger_error($%s', $varName));
- }
-
- $compiler
- ->raw('.')
- ->string(sprintf(' ("%s" at line %d).', $this->getTemplateName(), $this->getTemplateLine()))
- ->raw(", E_USER_DEPRECATED);\n")
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/DoNode.php b/system/vendor/twig/twig/src/Node/DoNode.php
deleted file mode 100644
index f7783d1..0000000
--- a/system/vendor/twig/twig/src/Node/DoNode.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
- */
-class DoNode extends Node
-{
- public function __construct(AbstractExpression $expr, int $lineno, string $tag = null)
- {
- parent::__construct(['expr' => $expr], [], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->addDebugInfo($this)
- ->write('')
- ->subcompile($this->getNode('expr'))
- ->raw(";\n")
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/EmbedNode.php b/system/vendor/twig/twig/src/Node/EmbedNode.php
deleted file mode 100644
index 903c3f6..0000000
--- a/system/vendor/twig/twig/src/Node/EmbedNode.php
+++ /dev/null
@@ -1,48 +0,0 @@
-
- */
-class EmbedNode extends IncludeNode
-{
- // we don't inject the module to avoid node visitors to traverse it twice (as it will be already visited in the main module)
- public function __construct(string $name, int $index, ?AbstractExpression $variables, bool $only, bool $ignoreMissing, int $lineno, string $tag = null)
- {
- parent::__construct(new ConstantExpression('not_used', $lineno), $variables, $only, $ignoreMissing, $lineno, $tag);
-
- $this->setAttribute('name', $name);
- $this->setAttribute('index', $index);
- }
-
- protected function addGetTemplate(Compiler $compiler): void
- {
- $compiler
- ->write('$this->loadTemplate(')
- ->string($this->getAttribute('name'))
- ->raw(', ')
- ->repr($this->getTemplateName())
- ->raw(', ')
- ->repr($this->getTemplateLine())
- ->raw(', ')
- ->string($this->getAttribute('index'))
- ->raw(')')
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/AbstractExpression.php b/system/vendor/twig/twig/src/Node/Expression/AbstractExpression.php
deleted file mode 100644
index 42da055..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/AbstractExpression.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- */
-abstract class AbstractExpression extends Node
-{
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/ArrayExpression.php b/system/vendor/twig/twig/src/Node/Expression/ArrayExpression.php
deleted file mode 100644
index 4442838..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/ArrayExpression.php
+++ /dev/null
@@ -1,135 +0,0 @@
-index = -1;
- foreach ($this->getKeyValuePairs() as $pair) {
- if ($pair['key'] instanceof ConstantExpression && ctype_digit((string) $pair['key']->getAttribute('value')) && $pair['key']->getAttribute('value') > $this->index) {
- $this->index = $pair['key']->getAttribute('value');
- }
- }
- }
-
- public function getKeyValuePairs(): array
- {
- $pairs = [];
- foreach (array_chunk($this->nodes, 2) as $pair) {
- $pairs[] = [
- 'key' => $pair[0],
- 'value' => $pair[1],
- ];
- }
-
- return $pairs;
- }
-
- public function hasElement(AbstractExpression $key): bool
- {
- foreach ($this->getKeyValuePairs() as $pair) {
- // we compare the string representation of the keys
- // to avoid comparing the line numbers which are not relevant here.
- if ((string) $key === (string) $pair['key']) {
- return true;
- }
- }
-
- return false;
- }
-
- public function addElement(AbstractExpression $value, AbstractExpression $key = null): void
- {
- if (null === $key) {
- $key = new ConstantExpression(++$this->index, $value->getTemplateLine());
- }
-
- array_push($this->nodes, $key, $value);
- }
-
- public function compile(Compiler $compiler): void
- {
- $keyValuePairs = $this->getKeyValuePairs();
- $needsArrayMergeSpread = \PHP_VERSION_ID < 80100 && $this->hasSpreadItem($keyValuePairs);
-
- if ($needsArrayMergeSpread) {
- $compiler->raw('twig_array_merge(');
- }
- $compiler->raw('[');
- $first = true;
- $reopenAfterMergeSpread = false;
- $nextIndex = 0;
- foreach ($keyValuePairs as $pair) {
- if ($reopenAfterMergeSpread) {
- $compiler->raw(', [');
- $reopenAfterMergeSpread = false;
- }
-
- if ($needsArrayMergeSpread && $pair['value']->hasAttribute('spread')) {
- $compiler->raw('], ')->subcompile($pair['value']);
- $first = true;
- $reopenAfterMergeSpread = true;
- continue;
- }
- if (!$first) {
- $compiler->raw(', ');
- }
- $first = false;
-
- if ($pair['value']->hasAttribute('spread') && !$needsArrayMergeSpread) {
- $compiler->raw('...')->subcompile($pair['value']);
- ++$nextIndex;
- } else {
- $key = $pair['key'] instanceof ConstantExpression ? $pair['key']->getAttribute('value') : null;
-
- if ($nextIndex !== $key) {
- if (\is_int($key)) {
- $nextIndex = $key + 1;
- }
- $compiler
- ->subcompile($pair['key'])
- ->raw(' => ')
- ;
- } else {
- ++$nextIndex;
- }
-
- $compiler->subcompile($pair['value']);
- }
- }
- if (!$reopenAfterMergeSpread) {
- $compiler->raw(']');
- }
- if ($needsArrayMergeSpread) {
- $compiler->raw(')');
- }
- }
-
- private function hasSpreadItem(array $pairs): bool
- {
- foreach ($pairs as $pair) {
- if ($pair['value']->hasAttribute('spread')) {
- return true;
- }
- }
-
- return false;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php b/system/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php
deleted file mode 100644
index eaad03c..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php
+++ /dev/null
@@ -1,64 +0,0 @@
-
- */
-class ArrowFunctionExpression extends AbstractExpression
-{
- public function __construct(AbstractExpression $expr, Node $names, $lineno, $tag = null)
- {
- parent::__construct(['expr' => $expr, 'names' => $names], [], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->addDebugInfo($this)
- ->raw('function (')
- ;
- foreach ($this->getNode('names') as $i => $name) {
- if ($i) {
- $compiler->raw(', ');
- }
-
- $compiler
- ->raw('$__')
- ->raw($name->getAttribute('name'))
- ->raw('__')
- ;
- }
- $compiler
- ->raw(') use ($context, $macros) { ')
- ;
- foreach ($this->getNode('names') as $name) {
- $compiler
- ->raw('$context["')
- ->raw($name->getAttribute('name'))
- ->raw('"] = $__')
- ->raw($name->getAttribute('name'))
- ->raw('__; ')
- ;
- }
- $compiler
- ->raw('return ')
- ->subcompile($this->getNode('expr'))
- ->raw('; }')
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php b/system/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php
deleted file mode 100644
index 7dd1bc4..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php
+++ /dev/null
@@ -1,27 +0,0 @@
-raw('$context[')
- ->string($this->getAttribute('name'))
- ->raw(']')
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php
deleted file mode 100644
index c424e5c..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php
+++ /dev/null
@@ -1,42 +0,0 @@
- $left, 'right' => $right], [], $lineno);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->raw('(')
- ->subcompile($this->getNode('left'))
- ->raw(' ')
- ;
- $this->operator($compiler);
- $compiler
- ->raw(' ')
- ->subcompile($this->getNode('right'))
- ->raw(')')
- ;
- }
-
- abstract public function operator(Compiler $compiler): Compiler;
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php
deleted file mode 100644
index ee4307e..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('+');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php
deleted file mode 100644
index 5f2380d..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('&&');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php
deleted file mode 100644
index db7d6d6..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('&');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php
deleted file mode 100644
index ce803dd..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('|');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php
deleted file mode 100644
index 5c29785..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('^');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php
deleted file mode 100644
index f825ab8..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('.');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php
deleted file mode 100644
index e3817d1..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('/');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php
deleted file mode 100644
index 73fa20b..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php
+++ /dev/null
@@ -1,35 +0,0 @@
-getVarName();
- $right = $compiler->getVarName();
- $compiler
- ->raw(sprintf('(is_string($%s = ', $left))
- ->subcompile($this->getNode('left'))
- ->raw(sprintf(') && is_string($%s = ', $right))
- ->subcompile($this->getNode('right'))
- ->raw(sprintf(') && str_ends_with($%1$s, $%2$s))', $left, $right))
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php
deleted file mode 100644
index 6b48549..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php
+++ /dev/null
@@ -1,39 +0,0 @@
-= 80000) {
- parent::compile($compiler);
-
- return;
- }
-
- $compiler
- ->raw('(0 === twig_compare(')
- ->subcompile($this->getNode('left'))
- ->raw(', ')
- ->subcompile($this->getNode('right'))
- ->raw('))')
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('==');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php
deleted file mode 100644
index d7e7980..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php
+++ /dev/null
@@ -1,29 +0,0 @@
-raw('(int) floor(');
- parent::compile($compiler);
- $compiler->raw(')');
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('/');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php
deleted file mode 100644
index e1dd067..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php
+++ /dev/null
@@ -1,39 +0,0 @@
-= 80000) {
- parent::compile($compiler);
-
- return;
- }
-
- $compiler
- ->raw('(1 === twig_compare(')
- ->subcompile($this->getNode('left'))
- ->raw(', ')
- ->subcompile($this->getNode('right'))
- ->raw('))')
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('>');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php
deleted file mode 100644
index df9bfcf..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php
+++ /dev/null
@@ -1,39 +0,0 @@
-= 80000) {
- parent::compile($compiler);
-
- return;
- }
-
- $compiler
- ->raw('(0 <= twig_compare(')
- ->subcompile($this->getNode('left'))
- ->raw(', ')
- ->subcompile($this->getNode('right'))
- ->raw('))')
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('>=');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/HasEveryBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/HasEveryBinary.php
deleted file mode 100644
index adfabd4..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/HasEveryBinary.php
+++ /dev/null
@@ -1,33 +0,0 @@
-raw('twig_array_every($this->env, ')
- ->subcompile($this->getNode('left'))
- ->raw(', ')
- ->subcompile($this->getNode('right'))
- ->raw(')')
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/HasSomeBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/HasSomeBinary.php
deleted file mode 100644
index 270da36..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/HasSomeBinary.php
+++ /dev/null
@@ -1,33 +0,0 @@
-raw('twig_array_some($this->env, ')
- ->subcompile($this->getNode('left'))
- ->raw(', ')
- ->subcompile($this->getNode('right'))
- ->raw(')')
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php
deleted file mode 100644
index 6dbfa97..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php
+++ /dev/null
@@ -1,33 +0,0 @@
-raw('twig_in_filter(')
- ->subcompile($this->getNode('left'))
- ->raw(', ')
- ->subcompile($this->getNode('right'))
- ->raw(')')
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('in');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php
deleted file mode 100644
index 598e629..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php
+++ /dev/null
@@ -1,39 +0,0 @@
-= 80000) {
- parent::compile($compiler);
-
- return;
- }
-
- $compiler
- ->raw('(-1 === twig_compare(')
- ->subcompile($this->getNode('left'))
- ->raw(', ')
- ->subcompile($this->getNode('right'))
- ->raw('))')
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('<');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php
deleted file mode 100644
index e3c4af5..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php
+++ /dev/null
@@ -1,39 +0,0 @@
-= 80000) {
- parent::compile($compiler);
-
- return;
- }
-
- $compiler
- ->raw('(0 >= twig_compare(')
- ->subcompile($this->getNode('left'))
- ->raw(', ')
- ->subcompile($this->getNode('right'))
- ->raw('))')
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('<=');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php
deleted file mode 100644
index a8bce6f..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php
+++ /dev/null
@@ -1,33 +0,0 @@
-raw('twig_matches(')
- ->subcompile($this->getNode('right'))
- ->raw(', ')
- ->subcompile($this->getNode('left'))
- ->raw(')')
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php
deleted file mode 100644
index 271b45c..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('%');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php
deleted file mode 100644
index 6d4c1e0..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('*');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php
deleted file mode 100644
index db47a28..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php
+++ /dev/null
@@ -1,39 +0,0 @@
-= 80000) {
- parent::compile($compiler);
-
- return;
- }
-
- $compiler
- ->raw('(0 !== twig_compare(')
- ->subcompile($this->getNode('left'))
- ->raw(', ')
- ->subcompile($this->getNode('right'))
- ->raw('))')
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('!=');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php
deleted file mode 100644
index fcba6cc..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php
+++ /dev/null
@@ -1,33 +0,0 @@
-raw('!twig_in_filter(')
- ->subcompile($this->getNode('left'))
- ->raw(', ')
- ->subcompile($this->getNode('right'))
- ->raw(')')
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('not in');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php
deleted file mode 100644
index 21f87c9..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('||');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php
deleted file mode 100644
index c9f4c66..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php
+++ /dev/null
@@ -1,22 +0,0 @@
-raw('**');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php
deleted file mode 100644
index 55982c8..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php
+++ /dev/null
@@ -1,33 +0,0 @@
-raw('range(')
- ->subcompile($this->getNode('left'))
- ->raw(', ')
- ->subcompile($this->getNode('right'))
- ->raw(')')
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('..');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php
deleted file mode 100644
index ae5a4a4..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php
+++ /dev/null
@@ -1,22 +0,0 @@
-raw('<=>');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php
deleted file mode 100644
index 22eff92..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php
+++ /dev/null
@@ -1,35 +0,0 @@
-getVarName();
- $right = $compiler->getVarName();
- $compiler
- ->raw(sprintf('(is_string($%s = ', $left))
- ->subcompile($this->getNode('left'))
- ->raw(sprintf(') && is_string($%s = ', $right))
- ->subcompile($this->getNode('right'))
- ->raw(sprintf(') && str_starts_with($%1$s, $%2$s))', $left, $right))
- ;
- }
-
- public function operator(Compiler $compiler): Compiler
- {
- return $compiler->raw('');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php b/system/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php
deleted file mode 100644
index eeb87fa..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('-');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php b/system/vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php
deleted file mode 100644
index b1e2a8f..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php
+++ /dev/null
@@ -1,86 +0,0 @@
-
- */
-class BlockReferenceExpression extends AbstractExpression
-{
- public function __construct(Node $name, ?Node $template, int $lineno, string $tag = null)
- {
- $nodes = ['name' => $name];
- if (null !== $template) {
- $nodes['template'] = $template;
- }
-
- parent::__construct($nodes, ['is_defined_test' => false, 'output' => false], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- if ($this->getAttribute('is_defined_test')) {
- $this->compileTemplateCall($compiler, 'hasBlock');
- } else {
- if ($this->getAttribute('output')) {
- $compiler->addDebugInfo($this);
-
- $this
- ->compileTemplateCall($compiler, 'displayBlock')
- ->raw(";\n");
- } else {
- $this->compileTemplateCall($compiler, 'renderBlock');
- }
- }
- }
-
- private function compileTemplateCall(Compiler $compiler, string $method): Compiler
- {
- if (!$this->hasNode('template')) {
- $compiler->write('$this');
- } else {
- $compiler
- ->write('$this->loadTemplate(')
- ->subcompile($this->getNode('template'))
- ->raw(', ')
- ->repr($this->getTemplateName())
- ->raw(', ')
- ->repr($this->getTemplateLine())
- ->raw(')')
- ;
- }
-
- $compiler->raw(sprintf('->%s', $method));
-
- return $this->compileBlockArguments($compiler);
- }
-
- private function compileBlockArguments(Compiler $compiler): Compiler
- {
- $compiler
- ->raw('(')
- ->subcompile($this->getNode('name'))
- ->raw(', $context');
-
- if (!$this->hasNode('template')) {
- $compiler->raw(', $blocks');
- }
-
- return $compiler->raw(')');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/CallExpression.php b/system/vendor/twig/twig/src/Node/Expression/CallExpression.php
deleted file mode 100644
index 3a2d7a4..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/CallExpression.php
+++ /dev/null
@@ -1,321 +0,0 @@
-getAttribute('callable');
-
- if (\is_string($callable) && !str_contains($callable, '::')) {
- $compiler->raw($callable);
- } else {
- [$r, $callable] = $this->reflectCallable($callable);
-
- if (\is_string($callable)) {
- $compiler->raw($callable);
- } elseif (\is_array($callable) && \is_string($callable[0])) {
- if (!$r instanceof \ReflectionMethod || $r->isStatic()) {
- $compiler->raw(sprintf('%s::%s', $callable[0], $callable[1]));
- } else {
- $compiler->raw(sprintf('$this->env->getRuntime(\'%s\')->%s', $callable[0], $callable[1]));
- }
- } elseif (\is_array($callable) && $callable[0] instanceof ExtensionInterface) {
- $class = \get_class($callable[0]);
- if (!$compiler->getEnvironment()->hasExtension($class)) {
- // Compile a non-optimized call to trigger a \Twig\Error\RuntimeError, which cannot be a compile-time error
- $compiler->raw(sprintf('$this->env->getExtension(\'%s\')', $class));
- } else {
- $compiler->raw(sprintf('$this->extensions[\'%s\']', ltrim($class, '\\')));
- }
-
- $compiler->raw(sprintf('->%s', $callable[1]));
- } else {
- $compiler->raw(sprintf('$this->env->get%s(\'%s\')->getCallable()', ucfirst($this->getAttribute('type')), $this->getAttribute('name')));
- }
- }
-
- $this->compileArguments($compiler);
- }
-
- protected function compileArguments(Compiler $compiler, $isArray = false): void
- {
- $compiler->raw($isArray ? '[' : '(');
-
- $first = true;
-
- if ($this->hasAttribute('needs_environment') && $this->getAttribute('needs_environment')) {
- $compiler->raw('$this->env');
- $first = false;
- }
-
- if ($this->hasAttribute('needs_context') && $this->getAttribute('needs_context')) {
- if (!$first) {
- $compiler->raw(', ');
- }
- $compiler->raw('$context');
- $first = false;
- }
-
- if ($this->hasAttribute('arguments')) {
- foreach ($this->getAttribute('arguments') as $argument) {
- if (!$first) {
- $compiler->raw(', ');
- }
- $compiler->string($argument);
- $first = false;
- }
- }
-
- if ($this->hasNode('node')) {
- if (!$first) {
- $compiler->raw(', ');
- }
- $compiler->subcompile($this->getNode('node'));
- $first = false;
- }
-
- if ($this->hasNode('arguments')) {
- $callable = $this->getAttribute('callable');
- $arguments = $this->getArguments($callable, $this->getNode('arguments'));
- foreach ($arguments as $node) {
- if (!$first) {
- $compiler->raw(', ');
- }
- $compiler->subcompile($node);
- $first = false;
- }
- }
-
- $compiler->raw($isArray ? ']' : ')');
- }
-
- protected function getArguments($callable, $arguments)
- {
- $callType = $this->getAttribute('type');
- $callName = $this->getAttribute('name');
-
- $parameters = [];
- $named = false;
- foreach ($arguments as $name => $node) {
- if (!\is_int($name)) {
- $named = true;
- $name = $this->normalizeName($name);
- } elseif ($named) {
- throw new SyntaxError(sprintf('Positional arguments cannot be used after named arguments for %s "%s".', $callType, $callName), $this->getTemplateLine(), $this->getSourceContext());
- }
-
- $parameters[$name] = $node;
- }
-
- $isVariadic = $this->hasAttribute('is_variadic') && $this->getAttribute('is_variadic');
- if (!$named && !$isVariadic) {
- return $parameters;
- }
-
- if (!$callable) {
- if ($named) {
- $message = sprintf('Named arguments are not supported for %s "%s".', $callType, $callName);
- } else {
- $message = sprintf('Arbitrary positional arguments are not supported for %s "%s".', $callType, $callName);
- }
-
- throw new \LogicException($message);
- }
-
- list($callableParameters, $isPhpVariadic) = $this->getCallableParameters($callable, $isVariadic);
- $arguments = [];
- $names = [];
- $missingArguments = [];
- $optionalArguments = [];
- $pos = 0;
- foreach ($callableParameters as $callableParameter) {
- $name = $this->normalizeName($callableParameter->name);
- if (\PHP_VERSION_ID >= 80000 && 'range' === $callable) {
- if ('start' === $name) {
- $name = 'low';
- } elseif ('end' === $name) {
- $name = 'high';
- }
- }
-
- $names[] = $name;
-
- if (\array_key_exists($name, $parameters)) {
- if (\array_key_exists($pos, $parameters)) {
- throw new SyntaxError(sprintf('Argument "%s" is defined twice for %s "%s".', $name, $callType, $callName), $this->getTemplateLine(), $this->getSourceContext());
- }
-
- if (\count($missingArguments)) {
- throw new SyntaxError(sprintf(
- 'Argument "%s" could not be assigned for %s "%s(%s)" because it is mapped to an internal PHP function which cannot determine default value for optional argument%s "%s".',
- $name, $callType, $callName, implode(', ', $names), \count($missingArguments) > 1 ? 's' : '', implode('", "', $missingArguments)
- ), $this->getTemplateLine(), $this->getSourceContext());
- }
-
- $arguments = array_merge($arguments, $optionalArguments);
- $arguments[] = $parameters[$name];
- unset($parameters[$name]);
- $optionalArguments = [];
- } elseif (\array_key_exists($pos, $parameters)) {
- $arguments = array_merge($arguments, $optionalArguments);
- $arguments[] = $parameters[$pos];
- unset($parameters[$pos]);
- $optionalArguments = [];
- ++$pos;
- } elseif ($callableParameter->isDefaultValueAvailable()) {
- $optionalArguments[] = new ConstantExpression($callableParameter->getDefaultValue(), -1);
- } elseif ($callableParameter->isOptional()) {
- if (empty($parameters)) {
- break;
- } else {
- $missingArguments[] = $name;
- }
- } else {
- throw new SyntaxError(sprintf('Value for argument "%s" is required for %s "%s".', $name, $callType, $callName), $this->getTemplateLine(), $this->getSourceContext());
- }
- }
-
- if ($isVariadic) {
- $arbitraryArguments = $isPhpVariadic ? new VariadicExpression([], -1) : new ArrayExpression([], -1);
- foreach ($parameters as $key => $value) {
- if (\is_int($key)) {
- $arbitraryArguments->addElement($value);
- } else {
- $arbitraryArguments->addElement($value, new ConstantExpression($key, -1));
- }
- unset($parameters[$key]);
- }
-
- if ($arbitraryArguments->count()) {
- $arguments = array_merge($arguments, $optionalArguments);
- $arguments[] = $arbitraryArguments;
- }
- }
-
- if (!empty($parameters)) {
- $unknownParameter = null;
- foreach ($parameters as $parameter) {
- if ($parameter instanceof Node) {
- $unknownParameter = $parameter;
- break;
- }
- }
-
- throw new SyntaxError(
- sprintf(
- 'Unknown argument%s "%s" for %s "%s(%s)".',
- \count($parameters) > 1 ? 's' : '', implode('", "', array_keys($parameters)), $callType, $callName, implode(', ', $names)
- ),
- $unknownParameter ? $unknownParameter->getTemplateLine() : $this->getTemplateLine(),
- $unknownParameter ? $unknownParameter->getSourceContext() : $this->getSourceContext()
- );
- }
-
- return $arguments;
- }
-
- protected function normalizeName(string $name): string
- {
- return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], $name));
- }
-
- private function getCallableParameters($callable, bool $isVariadic): array
- {
- [$r, , $callableName] = $this->reflectCallable($callable);
-
- $parameters = $r->getParameters();
- if ($this->hasNode('node')) {
- array_shift($parameters);
- }
- if ($this->hasAttribute('needs_environment') && $this->getAttribute('needs_environment')) {
- array_shift($parameters);
- }
- if ($this->hasAttribute('needs_context') && $this->getAttribute('needs_context')) {
- array_shift($parameters);
- }
- if ($this->hasAttribute('arguments') && null !== $this->getAttribute('arguments')) {
- foreach ($this->getAttribute('arguments') as $argument) {
- array_shift($parameters);
- }
- }
- $isPhpVariadic = false;
- if ($isVariadic) {
- $argument = end($parameters);
- $isArray = $argument && $argument->hasType() && 'array' === $argument->getType()->getName();
- if ($isArray && $argument->isDefaultValueAvailable() && [] === $argument->getDefaultValue()) {
- array_pop($parameters);
- } elseif ($argument && $argument->isVariadic()) {
- array_pop($parameters);
- $isPhpVariadic = true;
- } else {
- throw new \LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = []".', $callableName, $this->getAttribute('type'), $this->getAttribute('name')));
- }
- }
-
- return [$parameters, $isPhpVariadic];
- }
-
- private function reflectCallable($callable)
- {
- if (null !== $this->reflector) {
- return $this->reflector;
- }
-
- if (\is_string($callable) && false !== $pos = strpos($callable, '::')) {
- $callable = [substr($callable, 0, $pos), substr($callable, 2 + $pos)];
- }
-
- if (\is_array($callable) && method_exists($callable[0], $callable[1])) {
- $r = new \ReflectionMethod($callable[0], $callable[1]);
-
- return $this->reflector = [$r, $callable, $r->class.'::'.$r->name];
- }
-
- $checkVisibility = $callable instanceof \Closure;
- try {
- $closure = \Closure::fromCallable($callable);
- } catch (\TypeError $e) {
- throw new \LogicException(sprintf('Callback for %s "%s" is not callable in the current scope.', $this->getAttribute('type'), $this->getAttribute('name')), 0, $e);
- }
- $r = new \ReflectionFunction($closure);
-
- if (str_contains($r->name, '{closure}')) {
- return $this->reflector = [$r, $callable, 'Closure'];
- }
-
- if ($object = $r->getClosureThis()) {
- $callable = [$object, $r->name];
- $callableName = get_debug_type($object).'::'.$r->name;
- } elseif (\PHP_VERSION_ID >= 80111 && $class = $r->getClosureCalledClass()) {
- $callableName = $class->name.'::'.$r->name;
- } elseif (\PHP_VERSION_ID < 80111 && $class = $r->getClosureScopeClass()) {
- $callableName = (\is_array($callable) ? $callable[0] : $class->name).'::'.$r->name;
- } else {
- $callable = $callableName = $r->name;
- }
-
- if ($checkVisibility && \is_array($callable) && method_exists(...$callable) && !(new \ReflectionMethod(...$callable))->isPublic()) {
- $callable = $r->getClosure();
- }
-
- return $this->reflector = [$r, $callable, $callableName];
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php b/system/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php
deleted file mode 100644
index d7db993..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php
+++ /dev/null
@@ -1,45 +0,0 @@
- $expr1, 'expr2' => $expr2, 'expr3' => $expr3], [], $lineno);
- }
-
- public function compile(Compiler $compiler): void
- {
- // Ternary with no then uses Elvis operator
- if ($this->getNode('expr1') === $this->getNode('expr2')) {
- $compiler
- ->raw('((')
- ->subcompile($this->getNode('expr1'))
- ->raw(') ?: (')
- ->subcompile($this->getNode('expr3'))
- ->raw('))');
- } else {
- $compiler
- ->raw('((')
- ->subcompile($this->getNode('expr1'))
- ->raw(') ? (')
- ->subcompile($this->getNode('expr2'))
- ->raw(') : (')
- ->subcompile($this->getNode('expr3'))
- ->raw('))');
- }
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/ConstantExpression.php b/system/vendor/twig/twig/src/Node/Expression/ConstantExpression.php
deleted file mode 100644
index 7ddbcc6..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/ConstantExpression.php
+++ /dev/null
@@ -1,28 +0,0 @@
- $value], $lineno);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler->repr($this->getAttribute('value'));
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php b/system/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php
deleted file mode 100644
index 6a572d4..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
- */
-class DefaultFilter extends FilterExpression
-{
- public function __construct(Node $node, ConstantExpression $filterName, Node $arguments, int $lineno, string $tag = null)
- {
- $default = new FilterExpression($node, new ConstantExpression('default', $node->getTemplateLine()), $arguments, $node->getTemplateLine());
-
- if ('default' === $filterName->getAttribute('value') && ($node instanceof NameExpression || $node instanceof GetAttrExpression)) {
- $test = new DefinedTest(clone $node, 'defined', new Node(), $node->getTemplateLine());
- $false = \count($arguments) ? $arguments->getNode(0) : new ConstantExpression('', $node->getTemplateLine());
-
- $node = new ConditionalExpression($test, $default, $false, $node->getTemplateLine());
- } else {
- $node = $default;
- }
-
- parent::__construct($node, $filterName, $arguments, $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler->subcompile($this->getNode('node'));
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/FilterExpression.php b/system/vendor/twig/twig/src/Node/Expression/FilterExpression.php
deleted file mode 100644
index 0fc1588..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/FilterExpression.php
+++ /dev/null
@@ -1,40 +0,0 @@
- $node, 'filter' => $filterName, 'arguments' => $arguments], [], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $name = $this->getNode('filter')->getAttribute('value');
- $filter = $compiler->getEnvironment()->getFilter($name);
-
- $this->setAttribute('name', $name);
- $this->setAttribute('type', 'filter');
- $this->setAttribute('needs_environment', $filter->needsEnvironment());
- $this->setAttribute('needs_context', $filter->needsContext());
- $this->setAttribute('arguments', $filter->getArguments());
- $this->setAttribute('callable', $filter->getCallable());
- $this->setAttribute('is_variadic', $filter->isVariadic());
-
- $this->compileCallable($compiler);
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/FunctionExpression.php b/system/vendor/twig/twig/src/Node/Expression/FunctionExpression.php
deleted file mode 100644
index 7126977..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/FunctionExpression.php
+++ /dev/null
@@ -1,43 +0,0 @@
- $arguments], ['name' => $name, 'is_defined_test' => false], $lineno);
- }
-
- public function compile(Compiler $compiler)
- {
- $name = $this->getAttribute('name');
- $function = $compiler->getEnvironment()->getFunction($name);
-
- $this->setAttribute('name', $name);
- $this->setAttribute('type', 'function');
- $this->setAttribute('needs_environment', $function->needsEnvironment());
- $this->setAttribute('needs_context', $function->needsContext());
- $this->setAttribute('arguments', $function->getArguments());
- $callable = $function->getCallable();
- if ('constant' === $name && $this->getAttribute('is_defined_test')) {
- $callable = 'twig_constant_is_defined';
- }
- $this->setAttribute('callable', $callable);
- $this->setAttribute('is_variadic', $function->isVariadic());
-
- $this->compileCallable($compiler);
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php b/system/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php
deleted file mode 100644
index e6a75ce..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php
+++ /dev/null
@@ -1,87 +0,0 @@
- $node, 'attribute' => $attribute];
- if (null !== $arguments) {
- $nodes['arguments'] = $arguments;
- }
-
- parent::__construct($nodes, ['type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'optimizable' => true], $lineno);
- }
-
- public function compile(Compiler $compiler): void
- {
- $env = $compiler->getEnvironment();
-
- // optimize array calls
- if (
- $this->getAttribute('optimizable')
- && (!$env->isStrictVariables() || $this->getAttribute('ignore_strict_check'))
- && !$this->getAttribute('is_defined_test')
- && Template::ARRAY_CALL === $this->getAttribute('type')
- ) {
- $var = '$'.$compiler->getVarName();
- $compiler
- ->raw('(('.$var.' = ')
- ->subcompile($this->getNode('node'))
- ->raw(') && is_array(')
- ->raw($var)
- ->raw(') || ')
- ->raw($var)
- ->raw(' instanceof ArrayAccess ? (')
- ->raw($var)
- ->raw('[')
- ->subcompile($this->getNode('attribute'))
- ->raw('] ?? null) : null)')
- ;
-
- return;
- }
-
- $compiler->raw('twig_get_attribute($this->env, $this->source, ');
-
- if ($this->getAttribute('ignore_strict_check')) {
- $this->getNode('node')->setAttribute('ignore_strict_check', true);
- }
-
- $compiler
- ->subcompile($this->getNode('node'))
- ->raw(', ')
- ->subcompile($this->getNode('attribute'))
- ;
-
- if ($this->hasNode('arguments')) {
- $compiler->raw(', ')->subcompile($this->getNode('arguments'));
- } else {
- $compiler->raw(', []');
- }
-
- $compiler->raw(', ')
- ->repr($this->getAttribute('type'))
- ->raw(', ')->repr($this->getAttribute('is_defined_test'))
- ->raw(', ')->repr($this->getAttribute('ignore_strict_check'))
- ->raw(', ')->repr($env->hasExtension(SandboxExtension::class))
- ->raw(', ')->repr($this->getNode('node')->getTemplateLine())
- ->raw(')')
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/InlinePrint.php b/system/vendor/twig/twig/src/Node/Expression/InlinePrint.php
deleted file mode 100644
index 1ad4751..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/InlinePrint.php
+++ /dev/null
@@ -1,35 +0,0 @@
- $node], [], $lineno);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->raw('print (')
- ->subcompile($this->getNode('node'))
- ->raw(')')
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/MethodCallExpression.php b/system/vendor/twig/twig/src/Node/Expression/MethodCallExpression.php
deleted file mode 100644
index d5ec0b6..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/MethodCallExpression.php
+++ /dev/null
@@ -1,62 +0,0 @@
- $node, 'arguments' => $arguments], ['method' => $method, 'safe' => false, 'is_defined_test' => false], $lineno);
-
- if ($node instanceof NameExpression) {
- $node->setAttribute('always_defined', true);
- }
- }
-
- public function compile(Compiler $compiler): void
- {
- if ($this->getAttribute('is_defined_test')) {
- $compiler
- ->raw('method_exists($macros[')
- ->repr($this->getNode('node')->getAttribute('name'))
- ->raw('], ')
- ->repr($this->getAttribute('method'))
- ->raw(')')
- ;
-
- return;
- }
-
- $compiler
- ->raw('twig_call_macro($macros[')
- ->repr($this->getNode('node')->getAttribute('name'))
- ->raw('], ')
- ->repr($this->getAttribute('method'))
- ->raw(', [')
- ;
- $first = true;
- foreach ($this->getNode('arguments')->getKeyValuePairs() as $pair) {
- if (!$first) {
- $compiler->raw(', ');
- }
- $first = false;
-
- $compiler->subcompile($pair['value']);
- }
- $compiler
- ->raw('], ')
- ->repr($this->getTemplateLine())
- ->raw(', $context, $this->getSourceContext())');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/NameExpression.php b/system/vendor/twig/twig/src/Node/Expression/NameExpression.php
deleted file mode 100644
index c3563f0..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/NameExpression.php
+++ /dev/null
@@ -1,97 +0,0 @@
- '$this->getTemplateName()',
- '_context' => '$context',
- '_charset' => '$this->env->getCharset()',
- ];
-
- public function __construct(string $name, int $lineno)
- {
- parent::__construct([], ['name' => $name, 'is_defined_test' => false, 'ignore_strict_check' => false, 'always_defined' => false], $lineno);
- }
-
- public function compile(Compiler $compiler): void
- {
- $name = $this->getAttribute('name');
-
- $compiler->addDebugInfo($this);
-
- if ($this->getAttribute('is_defined_test')) {
- if ($this->isSpecial()) {
- $compiler->repr(true);
- } elseif (\PHP_VERSION_ID >= 70400) {
- $compiler
- ->raw('array_key_exists(')
- ->string($name)
- ->raw(', $context)')
- ;
- } else {
- $compiler
- ->raw('(isset($context[')
- ->string($name)
- ->raw(']) || array_key_exists(')
- ->string($name)
- ->raw(', $context))')
- ;
- }
- } elseif ($this->isSpecial()) {
- $compiler->raw($this->specialVars[$name]);
- } elseif ($this->getAttribute('always_defined')) {
- $compiler
- ->raw('$context[')
- ->string($name)
- ->raw(']')
- ;
- } else {
- if ($this->getAttribute('ignore_strict_check') || !$compiler->getEnvironment()->isStrictVariables()) {
- $compiler
- ->raw('($context[')
- ->string($name)
- ->raw('] ?? null)')
- ;
- } else {
- $compiler
- ->raw('(isset($context[')
- ->string($name)
- ->raw(']) || array_key_exists(')
- ->string($name)
- ->raw(', $context) ? $context[')
- ->string($name)
- ->raw('] : (function () { throw new RuntimeError(\'Variable ')
- ->string($name)
- ->raw(' does not exist.\', ')
- ->repr($this->lineno)
- ->raw(', $this->source); })()')
- ->raw(')')
- ;
- }
- }
- }
-
- public function isSpecial()
- {
- return isset($this->specialVars[$this->getAttribute('name')]);
- }
-
- public function isSimple()
- {
- return !$this->isSpecial() && !$this->getAttribute('is_defined_test');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php b/system/vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php
deleted file mode 100644
index a72bc4f..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php
+++ /dev/null
@@ -1,60 +0,0 @@
-getTemplateLine());
- // for "block()", we don't need the null test as the return value is always a string
- if (!$left instanceof BlockReferenceExpression) {
- $test = new AndBinary(
- $test,
- new NotUnary(new NullTest($left, 'null', new Node(), $left->getTemplateLine()), $left->getTemplateLine()),
- $left->getTemplateLine()
- );
- }
-
- parent::__construct($test, $left, $right, $lineno);
- }
-
- public function compile(Compiler $compiler): void
- {
- /*
- * This optimizes only one case. PHP 7 also supports more complex expressions
- * that can return null. So, for instance, if log is defined, log("foo") ?? "..." works,
- * but log($a["foo"]) ?? "..." does not if $a["foo"] is not defined. More advanced
- * cases might be implemented as an optimizer node visitor, but has not been done
- * as benefits are probably not worth the added complexity.
- */
- if ($this->getNode('expr2') instanceof NameExpression) {
- $this->getNode('expr2')->setAttribute('always_defined', true);
- $compiler
- ->raw('((')
- ->subcompile($this->getNode('expr2'))
- ->raw(') ?? (')
- ->subcompile($this->getNode('expr3'))
- ->raw('))')
- ;
- } else {
- parent::compile($compiler);
- }
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/ParentExpression.php b/system/vendor/twig/twig/src/Node/Expression/ParentExpression.php
deleted file mode 100644
index 2549197..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/ParentExpression.php
+++ /dev/null
@@ -1,46 +0,0 @@
-
- */
-class ParentExpression extends AbstractExpression
-{
- public function __construct(string $name, int $lineno, string $tag = null)
- {
- parent::__construct([], ['output' => false, 'name' => $name], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- if ($this->getAttribute('output')) {
- $compiler
- ->addDebugInfo($this)
- ->write('$this->displayParentBlock(')
- ->string($this->getAttribute('name'))
- ->raw(", \$context, \$blocks);\n")
- ;
- } else {
- $compiler
- ->raw('$this->renderParentBlock(')
- ->string($this->getAttribute('name'))
- ->raw(', $context, $blocks)')
- ;
- }
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/TempNameExpression.php b/system/vendor/twig/twig/src/Node/Expression/TempNameExpression.php
deleted file mode 100644
index 004c704..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/TempNameExpression.php
+++ /dev/null
@@ -1,31 +0,0 @@
- $name], $lineno);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->raw('$_')
- ->raw($this->getAttribute('name'))
- ->raw('_')
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php b/system/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php
deleted file mode 100644
index 57e9319..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php
+++ /dev/null
@@ -1,49 +0,0 @@
-
- */
-class ConstantTest extends TestExpression
-{
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->raw('(')
- ->subcompile($this->getNode('node'))
- ->raw(' === constant(')
- ;
-
- if ($this->getNode('arguments')->hasNode(1)) {
- $compiler
- ->raw('get_class(')
- ->subcompile($this->getNode('arguments')->getNode(1))
- ->raw(')."::".')
- ;
- }
-
- $compiler
- ->subcompile($this->getNode('arguments')->getNode(0))
- ->raw('))')
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php b/system/vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php
deleted file mode 100644
index 3953bbb..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php
+++ /dev/null
@@ -1,74 +0,0 @@
-
- */
-class DefinedTest extends TestExpression
-{
- public function __construct(Node $node, string $name, ?Node $arguments, int $lineno)
- {
- if ($node instanceof NameExpression) {
- $node->setAttribute('is_defined_test', true);
- } elseif ($node instanceof GetAttrExpression) {
- $node->setAttribute('is_defined_test', true);
- $this->changeIgnoreStrictCheck($node);
- } elseif ($node instanceof BlockReferenceExpression) {
- $node->setAttribute('is_defined_test', true);
- } elseif ($node instanceof FunctionExpression && 'constant' === $node->getAttribute('name')) {
- $node->setAttribute('is_defined_test', true);
- } elseif ($node instanceof ConstantExpression || $node instanceof ArrayExpression) {
- $node = new ConstantExpression(true, $node->getTemplateLine());
- } elseif ($node instanceof MethodCallExpression) {
- $node->setAttribute('is_defined_test', true);
- } else {
- throw new SyntaxError('The "defined" test only works with simple variables.', $lineno);
- }
-
- parent::__construct($node, $name, $arguments, $lineno);
- }
-
- private function changeIgnoreStrictCheck(GetAttrExpression $node)
- {
- $node->setAttribute('optimizable', false);
- $node->setAttribute('ignore_strict_check', true);
-
- if ($node->getNode('node') instanceof GetAttrExpression) {
- $this->changeIgnoreStrictCheck($node->getNode('node'));
- }
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler->subcompile($this->getNode('node'));
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php b/system/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php
deleted file mode 100644
index 4cb3ee0..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php
+++ /dev/null
@@ -1,36 +0,0 @@
-
- */
-class DivisiblebyTest extends TestExpression
-{
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->raw('(0 == ')
- ->subcompile($this->getNode('node'))
- ->raw(' % ')
- ->subcompile($this->getNode('arguments')->getNode(0))
- ->raw(')')
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Test/EvenTest.php b/system/vendor/twig/twig/src/Node/Expression/Test/EvenTest.php
deleted file mode 100644
index a0e3ed6..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Test/EvenTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
- */
-class EvenTest extends TestExpression
-{
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->raw('(')
- ->subcompile($this->getNode('node'))
- ->raw(' % 2 == 0')
- ->raw(')')
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Test/NullTest.php b/system/vendor/twig/twig/src/Node/Expression/Test/NullTest.php
deleted file mode 100644
index 45b54ae..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Test/NullTest.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
- */
-class NullTest extends TestExpression
-{
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->raw('(null === ')
- ->subcompile($this->getNode('node'))
- ->raw(')')
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Test/OddTest.php b/system/vendor/twig/twig/src/Node/Expression/Test/OddTest.php
deleted file mode 100644
index d56c711..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Test/OddTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
- */
-class OddTest extends TestExpression
-{
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->raw('(')
- ->subcompile($this->getNode('node'))
- ->raw(' % 2 != 0')
- ->raw(')')
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Test/SameasTest.php b/system/vendor/twig/twig/src/Node/Expression/Test/SameasTest.php
deleted file mode 100644
index c96d2bc..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Test/SameasTest.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
- */
-class SameasTest extends TestExpression
-{
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->raw('(')
- ->subcompile($this->getNode('node'))
- ->raw(' === ')
- ->subcompile($this->getNode('arguments')->getNode(0))
- ->raw(')')
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/TestExpression.php b/system/vendor/twig/twig/src/Node/Expression/TestExpression.php
deleted file mode 100644
index e518bd8..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/TestExpression.php
+++ /dev/null
@@ -1,42 +0,0 @@
- $node];
- if (null !== $arguments) {
- $nodes['arguments'] = $arguments;
- }
-
- parent::__construct($nodes, ['name' => $name], $lineno);
- }
-
- public function compile(Compiler $compiler): void
- {
- $name = $this->getAttribute('name');
- $test = $compiler->getEnvironment()->getTest($name);
-
- $this->setAttribute('name', $name);
- $this->setAttribute('type', 'test');
- $this->setAttribute('arguments', $test->getArguments());
- $this->setAttribute('callable', $test->getCallable());
- $this->setAttribute('is_variadic', $test->isVariadic());
-
- $this->compileCallable($compiler);
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php b/system/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php
deleted file mode 100644
index e31e3f8..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php
+++ /dev/null
@@ -1,34 +0,0 @@
- $node], [], $lineno);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler->raw(' ');
- $this->operator($compiler);
- $compiler->subcompile($this->getNode('node'));
- }
-
- abstract public function operator(Compiler $compiler): Compiler;
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php b/system/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php
deleted file mode 100644
index dc2f235..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('-');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php b/system/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php
deleted file mode 100644
index 55c11ba..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('!');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php b/system/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php
deleted file mode 100644
index 4b0a062..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php
+++ /dev/null
@@ -1,23 +0,0 @@
-raw('+');
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Expression/VariadicExpression.php b/system/vendor/twig/twig/src/Node/Expression/VariadicExpression.php
deleted file mode 100644
index a1bdb48..0000000
--- a/system/vendor/twig/twig/src/Node/Expression/VariadicExpression.php
+++ /dev/null
@@ -1,24 +0,0 @@
-raw('...');
-
- parent::compile($compiler);
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/FlushNode.php b/system/vendor/twig/twig/src/Node/FlushNode.php
deleted file mode 100644
index fa50a88..0000000
--- a/system/vendor/twig/twig/src/Node/FlushNode.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
- */
-class FlushNode extends Node
-{
- public function __construct(int $lineno, string $tag)
- {
- parent::__construct([], [], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->addDebugInfo($this)
- ->write("flush();\n")
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/ForLoopNode.php b/system/vendor/twig/twig/src/Node/ForLoopNode.php
deleted file mode 100644
index d5ce845..0000000
--- a/system/vendor/twig/twig/src/Node/ForLoopNode.php
+++ /dev/null
@@ -1,49 +0,0 @@
-
- */
-class ForLoopNode extends Node
-{
- public function __construct(int $lineno, string $tag = null)
- {
- parent::__construct([], ['with_loop' => false, 'ifexpr' => false, 'else' => false], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- if ($this->getAttribute('else')) {
- $compiler->write("\$context['_iterated'] = true;\n");
- }
-
- if ($this->getAttribute('with_loop')) {
- $compiler
- ->write("++\$context['loop']['index0'];\n")
- ->write("++\$context['loop']['index'];\n")
- ->write("\$context['loop']['first'] = false;\n")
- ->write("if (isset(\$context['loop']['length'])) {\n")
- ->indent()
- ->write("--\$context['loop']['revindex0'];\n")
- ->write("--\$context['loop']['revindex'];\n")
- ->write("\$context['loop']['last'] = 0 === \$context['loop']['revindex0'];\n")
- ->outdent()
- ->write("}\n")
- ;
- }
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/ForNode.php b/system/vendor/twig/twig/src/Node/ForNode.php
deleted file mode 100644
index 04addfb..0000000
--- a/system/vendor/twig/twig/src/Node/ForNode.php
+++ /dev/null
@@ -1,107 +0,0 @@
-
- */
-class ForNode extends Node
-{
- private $loop;
-
- public function __construct(AssignNameExpression $keyTarget, AssignNameExpression $valueTarget, AbstractExpression $seq, ?Node $ifexpr, Node $body, ?Node $else, int $lineno, string $tag = null)
- {
- $body = new Node([$body, $this->loop = new ForLoopNode($lineno, $tag)]);
-
- $nodes = ['key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body];
- if (null !== $else) {
- $nodes['else'] = $else;
- }
-
- parent::__construct($nodes, ['with_loop' => true], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->addDebugInfo($this)
- ->write("\$context['_parent'] = \$context;\n")
- ->write("\$context['_seq'] = twig_ensure_traversable(")
- ->subcompile($this->getNode('seq'))
- ->raw(");\n")
- ;
-
- if ($this->hasNode('else')) {
- $compiler->write("\$context['_iterated'] = false;\n");
- }
-
- if ($this->getAttribute('with_loop')) {
- $compiler
- ->write("\$context['loop'] = [\n")
- ->write(" 'parent' => \$context['_parent'],\n")
- ->write(" 'index0' => 0,\n")
- ->write(" 'index' => 1,\n")
- ->write(" 'first' => true,\n")
- ->write("];\n")
- ->write("if (is_array(\$context['_seq']) || (is_object(\$context['_seq']) && \$context['_seq'] instanceof \Countable)) {\n")
- ->indent()
- ->write("\$length = count(\$context['_seq']);\n")
- ->write("\$context['loop']['revindex0'] = \$length - 1;\n")
- ->write("\$context['loop']['revindex'] = \$length;\n")
- ->write("\$context['loop']['length'] = \$length;\n")
- ->write("\$context['loop']['last'] = 1 === \$length;\n")
- ->outdent()
- ->write("}\n")
- ;
- }
-
- $this->loop->setAttribute('else', $this->hasNode('else'));
- $this->loop->setAttribute('with_loop', $this->getAttribute('with_loop'));
-
- $compiler
- ->write("foreach (\$context['_seq'] as ")
- ->subcompile($this->getNode('key_target'))
- ->raw(' => ')
- ->subcompile($this->getNode('value_target'))
- ->raw(") {\n")
- ->indent()
- ->subcompile($this->getNode('body'))
- ->outdent()
- ->write("}\n")
- ;
-
- if ($this->hasNode('else')) {
- $compiler
- ->write("if (!\$context['_iterated']) {\n")
- ->indent()
- ->subcompile($this->getNode('else'))
- ->outdent()
- ->write("}\n")
- ;
- }
-
- $compiler->write("\$_parent = \$context['_parent'];\n");
-
- // remove some "private" loop variables (needed for nested loops)
- $compiler->write('unset($context[\'_seq\'], $context[\'_iterated\'], $context[\''.$this->getNode('key_target')->getAttribute('name').'\'], $context[\''.$this->getNode('value_target')->getAttribute('name').'\'], $context[\'_parent\'], $context[\'loop\']);'."\n");
-
- // keep the values set in the inner context for variables defined in the outer context
- $compiler->write("\$context = array_intersect_key(\$context, \$_parent) + \$_parent;\n");
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/IfNode.php b/system/vendor/twig/twig/src/Node/IfNode.php
deleted file mode 100644
index 569ab79..0000000
--- a/system/vendor/twig/twig/src/Node/IfNode.php
+++ /dev/null
@@ -1,73 +0,0 @@
-
- */
-class IfNode extends Node
-{
- public function __construct(Node $tests, ?Node $else, int $lineno, string $tag = null)
- {
- $nodes = ['tests' => $tests];
- if (null !== $else) {
- $nodes['else'] = $else;
- }
-
- parent::__construct($nodes, [], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler->addDebugInfo($this);
- for ($i = 0, $count = \count($this->getNode('tests')); $i < $count; $i += 2) {
- if ($i > 0) {
- $compiler
- ->outdent()
- ->write('} elseif (')
- ;
- } else {
- $compiler
- ->write('if (')
- ;
- }
-
- $compiler
- ->subcompile($this->getNode('tests')->getNode($i))
- ->raw(") {\n")
- ->indent()
- ;
- // The node might not exists if the content is empty
- if ($this->getNode('tests')->hasNode($i + 1)) {
- $compiler->subcompile($this->getNode('tests')->getNode($i + 1));
- }
- }
-
- if ($this->hasNode('else')) {
- $compiler
- ->outdent()
- ->write("} else {\n")
- ->indent()
- ->subcompile($this->getNode('else'))
- ;
- }
-
- $compiler
- ->outdent()
- ->write("}\n");
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/ImportNode.php b/system/vendor/twig/twig/src/Node/ImportNode.php
deleted file mode 100644
index 5378d79..0000000
--- a/system/vendor/twig/twig/src/Node/ImportNode.php
+++ /dev/null
@@ -1,63 +0,0 @@
-
- */
-class ImportNode extends Node
-{
- public function __construct(AbstractExpression $expr, AbstractExpression $var, int $lineno, string $tag = null, bool $global = true)
- {
- parent::__construct(['expr' => $expr, 'var' => $var], ['global' => $global], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->addDebugInfo($this)
- ->write('$macros[')
- ->repr($this->getNode('var')->getAttribute('name'))
- ->raw('] = ')
- ;
-
- if ($this->getAttribute('global')) {
- $compiler
- ->raw('$this->macros[')
- ->repr($this->getNode('var')->getAttribute('name'))
- ->raw('] = ')
- ;
- }
-
- if ($this->getNode('expr') instanceof NameExpression && '_self' === $this->getNode('expr')->getAttribute('name')) {
- $compiler->raw('$this');
- } else {
- $compiler
- ->raw('$this->loadTemplate(')
- ->subcompile($this->getNode('expr'))
- ->raw(', ')
- ->repr($this->getTemplateName())
- ->raw(', ')
- ->repr($this->getTemplateLine())
- ->raw(')->unwrap()')
- ;
- }
-
- $compiler->raw(";\n");
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/IncludeNode.php b/system/vendor/twig/twig/src/Node/IncludeNode.php
deleted file mode 100644
index d540d6b..0000000
--- a/system/vendor/twig/twig/src/Node/IncludeNode.php
+++ /dev/null
@@ -1,106 +0,0 @@
-
- */
-class IncludeNode extends Node implements NodeOutputInterface
-{
- public function __construct(AbstractExpression $expr, ?AbstractExpression $variables, bool $only, bool $ignoreMissing, int $lineno, string $tag = null)
- {
- $nodes = ['expr' => $expr];
- if (null !== $variables) {
- $nodes['variables'] = $variables;
- }
-
- parent::__construct($nodes, ['only' => $only, 'ignore_missing' => $ignoreMissing], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler->addDebugInfo($this);
-
- if ($this->getAttribute('ignore_missing')) {
- $template = $compiler->getVarName();
-
- $compiler
- ->write(sprintf("$%s = null;\n", $template))
- ->write("try {\n")
- ->indent()
- ->write(sprintf('$%s = ', $template))
- ;
-
- $this->addGetTemplate($compiler);
-
- $compiler
- ->raw(";\n")
- ->outdent()
- ->write("} catch (LoaderError \$e) {\n")
- ->indent()
- ->write("// ignore missing template\n")
- ->outdent()
- ->write("}\n")
- ->write(sprintf("if ($%s) {\n", $template))
- ->indent()
- ->write(sprintf('$%s->display(', $template))
- ;
- $this->addTemplateArguments($compiler);
- $compiler
- ->raw(");\n")
- ->outdent()
- ->write("}\n")
- ;
- } else {
- $this->addGetTemplate($compiler);
- $compiler->raw('->display(');
- $this->addTemplateArguments($compiler);
- $compiler->raw(");\n");
- }
- }
-
- protected function addGetTemplate(Compiler $compiler)
- {
- $compiler
- ->write('$this->loadTemplate(')
- ->subcompile($this->getNode('expr'))
- ->raw(', ')
- ->repr($this->getTemplateName())
- ->raw(', ')
- ->repr($this->getTemplateLine())
- ->raw(')')
- ;
- }
-
- protected function addTemplateArguments(Compiler $compiler)
- {
- if (!$this->hasNode('variables')) {
- $compiler->raw(false === $this->getAttribute('only') ? '$context' : '[]');
- } elseif (false === $this->getAttribute('only')) {
- $compiler
- ->raw('twig_array_merge($context, ')
- ->subcompile($this->getNode('variables'))
- ->raw(')')
- ;
- } else {
- $compiler->raw('twig_to_array(');
- $compiler->subcompile($this->getNode('variables'));
- $compiler->raw(')');
- }
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/MacroNode.php b/system/vendor/twig/twig/src/Node/MacroNode.php
deleted file mode 100644
index 7f1b24d..0000000
--- a/system/vendor/twig/twig/src/Node/MacroNode.php
+++ /dev/null
@@ -1,113 +0,0 @@
-
- */
-class MacroNode extends Node
-{
- public const VARARGS_NAME = 'varargs';
-
- public function __construct(string $name, Node $body, Node $arguments, int $lineno, string $tag = null)
- {
- foreach ($arguments as $argumentName => $argument) {
- if (self::VARARGS_NAME === $argumentName) {
- throw new SyntaxError(sprintf('The argument "%s" in macro "%s" cannot be defined because the variable "%s" is reserved for arbitrary arguments.', self::VARARGS_NAME, $name, self::VARARGS_NAME), $argument->getTemplateLine(), $argument->getSourceContext());
- }
- }
-
- parent::__construct(['body' => $body, 'arguments' => $arguments], ['name' => $name], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->addDebugInfo($this)
- ->write(sprintf('public function macro_%s(', $this->getAttribute('name')))
- ;
-
- $count = \count($this->getNode('arguments'));
- $pos = 0;
- foreach ($this->getNode('arguments') as $name => $default) {
- $compiler
- ->raw('$__'.$name.'__ = ')
- ->subcompile($default)
- ;
-
- if (++$pos < $count) {
- $compiler->raw(', ');
- }
- }
-
- if ($count) {
- $compiler->raw(', ');
- }
-
- $compiler
- ->raw('...$__varargs__')
- ->raw(")\n")
- ->write("{\n")
- ->indent()
- ->write("\$macros = \$this->macros;\n")
- ->write("\$context = \$this->env->mergeGlobals([\n")
- ->indent()
- ;
-
- foreach ($this->getNode('arguments') as $name => $default) {
- $compiler
- ->write('')
- ->string($name)
- ->raw(' => $__'.$name.'__')
- ->raw(",\n")
- ;
- }
-
- $compiler
- ->write('')
- ->string(self::VARARGS_NAME)
- ->raw(' => ')
- ;
-
- $compiler
- ->raw("\$__varargs__,\n")
- ->outdent()
- ->write("]);\n\n")
- ->write("\$blocks = [];\n\n")
- ;
- if ($compiler->getEnvironment()->isDebug()) {
- $compiler->write("ob_start();\n");
- } else {
- $compiler->write("ob_start(function () { return ''; });\n");
- }
- $compiler
- ->write("try {\n")
- ->indent()
- ->subcompile($this->getNode('body'))
- ->raw("\n")
- ->write("return ('' === \$tmp = ob_get_contents()) ? '' : new Markup(\$tmp, \$this->env->getCharset());\n")
- ->outdent()
- ->write("} finally {\n")
- ->indent()
- ->write("ob_end_clean();\n")
- ->outdent()
- ->write("}\n")
- ->outdent()
- ->write("}\n\n")
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/ModuleNode.php b/system/vendor/twig/twig/src/Node/ModuleNode.php
deleted file mode 100644
index 9b485ee..0000000
--- a/system/vendor/twig/twig/src/Node/ModuleNode.php
+++ /dev/null
@@ -1,473 +0,0 @@
-
- */
-final class ModuleNode extends Node
-{
- public function __construct(Node $body, ?AbstractExpression $parent, Node $blocks, Node $macros, Node $traits, $embeddedTemplates, Source $source)
- {
- $nodes = [
- 'body' => $body,
- 'blocks' => $blocks,
- 'macros' => $macros,
- 'traits' => $traits,
- 'display_start' => new Node(),
- 'display_end' => new Node(),
- 'constructor_start' => new Node(),
- 'constructor_end' => new Node(),
- 'class_end' => new Node(),
- ];
- if (null !== $parent) {
- $nodes['parent'] = $parent;
- }
-
- // embedded templates are set as attributes so that they are only visited once by the visitors
- parent::__construct($nodes, [
- 'index' => null,
- 'embedded_templates' => $embeddedTemplates,
- ], 1);
-
- // populate the template name of all node children
- $this->setSourceContext($source);
- }
-
- public function setIndex($index)
- {
- $this->setAttribute('index', $index);
- }
-
- public function compile(Compiler $compiler): void
- {
- $this->compileTemplate($compiler);
-
- foreach ($this->getAttribute('embedded_templates') as $template) {
- $compiler->subcompile($template);
- }
- }
-
- protected function compileTemplate(Compiler $compiler)
- {
- if (!$this->getAttribute('index')) {
- $compiler->write('compileClassHeader($compiler);
-
- $this->compileConstructor($compiler);
-
- $this->compileGetParent($compiler);
-
- $this->compileDisplay($compiler);
-
- $compiler->subcompile($this->getNode('blocks'));
-
- $this->compileMacros($compiler);
-
- $this->compileGetTemplateName($compiler);
-
- $this->compileIsTraitable($compiler);
-
- $this->compileDebugInfo($compiler);
-
- $this->compileGetSourceContext($compiler);
-
- $this->compileClassFooter($compiler);
- }
-
- protected function compileGetParent(Compiler $compiler)
- {
- if (!$this->hasNode('parent')) {
- return;
- }
- $parent = $this->getNode('parent');
-
- $compiler
- ->write("protected function doGetParent(array \$context)\n", "{\n")
- ->indent()
- ->addDebugInfo($parent)
- ->write('return ')
- ;
-
- if ($parent instanceof ConstantExpression) {
- $compiler->subcompile($parent);
- } else {
- $compiler
- ->raw('$this->loadTemplate(')
- ->subcompile($parent)
- ->raw(', ')
- ->repr($this->getSourceContext()->getName())
- ->raw(', ')
- ->repr($parent->getTemplateLine())
- ->raw(')')
- ;
- }
-
- $compiler
- ->raw(";\n")
- ->outdent()
- ->write("}\n\n")
- ;
- }
-
- protected function compileClassHeader(Compiler $compiler)
- {
- $compiler
- ->write("\n\n")
- ;
- if (!$this->getAttribute('index')) {
- $compiler
- ->write("use Twig\Environment;\n")
- ->write("use Twig\Error\LoaderError;\n")
- ->write("use Twig\Error\RuntimeError;\n")
- ->write("use Twig\Extension\SandboxExtension;\n")
- ->write("use Twig\Markup;\n")
- ->write("use Twig\Sandbox\SecurityError;\n")
- ->write("use Twig\Sandbox\SecurityNotAllowedTagError;\n")
- ->write("use Twig\Sandbox\SecurityNotAllowedFilterError;\n")
- ->write("use Twig\Sandbox\SecurityNotAllowedFunctionError;\n")
- ->write("use Twig\Source;\n")
- ->write("use Twig\Template;\n\n")
- ;
- }
- $compiler
- // if the template name contains */, add a blank to avoid a PHP parse error
- ->write('/* '.str_replace('*/', '* /', $this->getSourceContext()->getName())." */\n")
- ->write('class '.$compiler->getEnvironment()->getTemplateClass($this->getSourceContext()->getName(), $this->getAttribute('index')))
- ->raw(" extends Template\n")
- ->write("{\n")
- ->indent()
- ->write("private \$source;\n")
- ->write("private \$macros = [];\n\n")
- ;
- }
-
- protected function compileConstructor(Compiler $compiler)
- {
- $compiler
- ->write("public function __construct(Environment \$env)\n", "{\n")
- ->indent()
- ->subcompile($this->getNode('constructor_start'))
- ->write("parent::__construct(\$env);\n\n")
- ->write("\$this->source = \$this->getSourceContext();\n\n")
- ;
-
- // parent
- if (!$this->hasNode('parent')) {
- $compiler->write("\$this->parent = false;\n\n");
- }
-
- $countTraits = \count($this->getNode('traits'));
- if ($countTraits) {
- // traits
- foreach ($this->getNode('traits') as $i => $trait) {
- $node = $trait->getNode('template');
-
- $compiler
- ->addDebugInfo($node)
- ->write(sprintf('$_trait_%s = $this->loadTemplate(', $i))
- ->subcompile($node)
- ->raw(', ')
- ->repr($node->getTemplateName())
- ->raw(', ')
- ->repr($node->getTemplateLine())
- ->raw(");\n")
- ->write(sprintf("if (!\$_trait_%s->isTraitable()) {\n", $i))
- ->indent()
- ->write("throw new RuntimeError('Template \"'.")
- ->subcompile($trait->getNode('template'))
- ->raw(".'\" cannot be used as a trait.', ")
- ->repr($node->getTemplateLine())
- ->raw(", \$this->source);\n")
- ->outdent()
- ->write("}\n")
- ->write(sprintf("\$_trait_%s_blocks = \$_trait_%s->getBlocks();\n\n", $i, $i))
- ;
-
- foreach ($trait->getNode('targets') as $key => $value) {
- $compiler
- ->write(sprintf('if (!isset($_trait_%s_blocks[', $i))
- ->string($key)
- ->raw("])) {\n")
- ->indent()
- ->write("throw new RuntimeError('Block ")
- ->string($key)
- ->raw(' is not defined in trait ')
- ->subcompile($trait->getNode('template'))
- ->raw(".', ")
- ->repr($node->getTemplateLine())
- ->raw(", \$this->source);\n")
- ->outdent()
- ->write("}\n\n")
-
- ->write(sprintf('$_trait_%s_blocks[', $i))
- ->subcompile($value)
- ->raw(sprintf('] = $_trait_%s_blocks[', $i))
- ->string($key)
- ->raw(sprintf(']; unset($_trait_%s_blocks[', $i))
- ->string($key)
- ->raw("]);\n\n")
- ;
- }
- }
-
- if ($countTraits > 1) {
- $compiler
- ->write("\$this->traits = array_merge(\n")
- ->indent()
- ;
-
- for ($i = 0; $i < $countTraits; ++$i) {
- $compiler
- ->write(sprintf('$_trait_%s_blocks'.($i == $countTraits - 1 ? '' : ',')."\n", $i))
- ;
- }
-
- $compiler
- ->outdent()
- ->write(");\n\n")
- ;
- } else {
- $compiler
- ->write("\$this->traits = \$_trait_0_blocks;\n\n")
- ;
- }
-
- $compiler
- ->write("\$this->blocks = array_merge(\n")
- ->indent()
- ->write("\$this->traits,\n")
- ->write("[\n")
- ;
- } else {
- $compiler
- ->write("\$this->blocks = [\n")
- ;
- }
-
- // blocks
- $compiler
- ->indent()
- ;
-
- foreach ($this->getNode('blocks') as $name => $node) {
- $compiler
- ->write(sprintf("'%s' => [\$this, 'block_%s'],\n", $name, $name))
- ;
- }
-
- if ($countTraits) {
- $compiler
- ->outdent()
- ->write("]\n")
- ->outdent()
- ->write(");\n")
- ;
- } else {
- $compiler
- ->outdent()
- ->write("];\n")
- ;
- }
-
- $compiler
- ->subcompile($this->getNode('constructor_end'))
- ->outdent()
- ->write("}\n\n")
- ;
- }
-
- protected function compileDisplay(Compiler $compiler)
- {
- $compiler
- ->write("protected function doDisplay(array \$context, array \$blocks = [])\n", "{\n")
- ->indent()
- ->write("\$macros = \$this->macros;\n")
- ->subcompile($this->getNode('display_start'))
- ->subcompile($this->getNode('body'))
- ;
-
- if ($this->hasNode('parent')) {
- $parent = $this->getNode('parent');
-
- $compiler->addDebugInfo($parent);
- if ($parent instanceof ConstantExpression) {
- $compiler
- ->write('$this->parent = $this->loadTemplate(')
- ->subcompile($parent)
- ->raw(', ')
- ->repr($this->getSourceContext()->getName())
- ->raw(', ')
- ->repr($parent->getTemplateLine())
- ->raw(");\n")
- ;
- $compiler->write('$this->parent');
- } else {
- $compiler->write('$this->getParent($context)');
- }
- $compiler->raw("->display(\$context, array_merge(\$this->blocks, \$blocks));\n");
- }
-
- $compiler
- ->subcompile($this->getNode('display_end'))
- ->outdent()
- ->write("}\n\n")
- ;
- }
-
- protected function compileClassFooter(Compiler $compiler)
- {
- $compiler
- ->subcompile($this->getNode('class_end'))
- ->outdent()
- ->write("}\n")
- ;
- }
-
- protected function compileMacros(Compiler $compiler)
- {
- $compiler->subcompile($this->getNode('macros'));
- }
-
- protected function compileGetTemplateName(Compiler $compiler)
- {
- $compiler
- ->write("/**\n")
- ->write(" * @codeCoverageIgnore\n")
- ->write(" */\n")
- ->write("public function getTemplateName()\n", "{\n")
- ->indent()
- ->write('return ')
- ->repr($this->getSourceContext()->getName())
- ->raw(";\n")
- ->outdent()
- ->write("}\n\n")
- ;
- }
-
- protected function compileIsTraitable(Compiler $compiler)
- {
- // A template can be used as a trait if:
- // * it has no parent
- // * it has no macros
- // * it has no body
- //
- // Put another way, a template can be used as a trait if it
- // only contains blocks and use statements.
- $traitable = !$this->hasNode('parent') && 0 === \count($this->getNode('macros'));
- if ($traitable) {
- if ($this->getNode('body') instanceof BodyNode) {
- $nodes = $this->getNode('body')->getNode(0);
- } else {
- $nodes = $this->getNode('body');
- }
-
- if (!\count($nodes)) {
- $nodes = new Node([$nodes]);
- }
-
- foreach ($nodes as $node) {
- if (!\count($node)) {
- continue;
- }
-
- if ($node instanceof TextNode && ctype_space($node->getAttribute('data'))) {
- continue;
- }
-
- if ($node instanceof BlockReferenceNode) {
- continue;
- }
-
- $traitable = false;
- break;
- }
- }
-
- if ($traitable) {
- return;
- }
-
- $compiler
- ->write("/**\n")
- ->write(" * @codeCoverageIgnore\n")
- ->write(" */\n")
- ->write("public function isTraitable()\n", "{\n")
- ->indent()
- ->write(sprintf("return %s;\n", $traitable ? 'true' : 'false'))
- ->outdent()
- ->write("}\n\n")
- ;
- }
-
- protected function compileDebugInfo(Compiler $compiler)
- {
- $compiler
- ->write("/**\n")
- ->write(" * @codeCoverageIgnore\n")
- ->write(" */\n")
- ->write("public function getDebugInfo()\n", "{\n")
- ->indent()
- ->write(sprintf("return %s;\n", str_replace("\n", '', var_export(array_reverse($compiler->getDebugInfo(), true), true))))
- ->outdent()
- ->write("}\n\n")
- ;
- }
-
- protected function compileGetSourceContext(Compiler $compiler)
- {
- $compiler
- ->write("public function getSourceContext()\n", "{\n")
- ->indent()
- ->write('return new Source(')
- ->string($compiler->getEnvironment()->isDebug() ? $this->getSourceContext()->getCode() : '')
- ->raw(', ')
- ->string($this->getSourceContext()->getName())
- ->raw(', ')
- ->string($this->getSourceContext()->getPath())
- ->raw(");\n")
- ->outdent()
- ->write("}\n")
- ;
- }
-
- protected function compileLoadTemplate(Compiler $compiler, $node, $var)
- {
- if ($node instanceof ConstantExpression) {
- $compiler
- ->write(sprintf('%s = $this->loadTemplate(', $var))
- ->subcompile($node)
- ->raw(', ')
- ->repr($node->getTemplateName())
- ->raw(', ')
- ->repr($node->getTemplateLine())
- ->raw(");\n")
- ;
- } else {
- throw new \LogicException('Trait templates can only be constant nodes.');
- }
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/Node.php b/system/vendor/twig/twig/src/Node/Node.php
deleted file mode 100644
index 30659ae..0000000
--- a/system/vendor/twig/twig/src/Node/Node.php
+++ /dev/null
@@ -1,178 +0,0 @@
-
- */
-class Node implements \Countable, \IteratorAggregate
-{
- protected $nodes;
- protected $attributes;
- protected $lineno;
- protected $tag;
-
- private $sourceContext;
-
- /**
- * @param array $nodes An array of named nodes
- * @param array $attributes An array of attributes (should not be nodes)
- * @param int $lineno The line number
- * @param string $tag The tag name associated with the Node
- */
- public function __construct(array $nodes = [], array $attributes = [], int $lineno = 0, string $tag = null)
- {
- foreach ($nodes as $name => $node) {
- if (!$node instanceof self) {
- throw new \InvalidArgumentException(sprintf('Using "%s" for the value of node "%s" of "%s" is not supported. You must pass a \Twig\Node\Node instance.', \is_object($node) ? \get_class($node) : (null === $node ? 'null' : \gettype($node)), $name, static::class));
- }
- }
- $this->nodes = $nodes;
- $this->attributes = $attributes;
- $this->lineno = $lineno;
- $this->tag = $tag;
- }
-
- public function __toString()
- {
- $attributes = [];
- foreach ($this->attributes as $name => $value) {
- $attributes[] = sprintf('%s: %s', $name, str_replace("\n", '', var_export($value, true)));
- }
-
- $repr = [static::class.'('.implode(', ', $attributes)];
-
- if (\count($this->nodes)) {
- foreach ($this->nodes as $name => $node) {
- $len = \strlen($name) + 4;
- $noderepr = [];
- foreach (explode("\n", (string) $node) as $line) {
- $noderepr[] = str_repeat(' ', $len).$line;
- }
-
- $repr[] = sprintf(' %s: %s', $name, ltrim(implode("\n", $noderepr)));
- }
-
- $repr[] = ')';
- } else {
- $repr[0] .= ')';
- }
-
- return implode("\n", $repr);
- }
-
- /**
- * @return void
- */
- public function compile(Compiler $compiler)
- {
- foreach ($this->nodes as $node) {
- $node->compile($compiler);
- }
- }
-
- public function getTemplateLine(): int
- {
- return $this->lineno;
- }
-
- public function getNodeTag(): ?string
- {
- return $this->tag;
- }
-
- public function hasAttribute(string $name): bool
- {
- return \array_key_exists($name, $this->attributes);
- }
-
- public function getAttribute(string $name)
- {
- if (!\array_key_exists($name, $this->attributes)) {
- throw new \LogicException(sprintf('Attribute "%s" does not exist for Node "%s".', $name, static::class));
- }
-
- return $this->attributes[$name];
- }
-
- public function setAttribute(string $name, $value): void
- {
- $this->attributes[$name] = $value;
- }
-
- public function removeAttribute(string $name): void
- {
- unset($this->attributes[$name]);
- }
-
- public function hasNode(string $name): bool
- {
- return isset($this->nodes[$name]);
- }
-
- public function getNode(string $name): self
- {
- if (!isset($this->nodes[$name])) {
- throw new \LogicException(sprintf('Node "%s" does not exist for Node "%s".', $name, static::class));
- }
-
- return $this->nodes[$name];
- }
-
- public function setNode(string $name, self $node): void
- {
- $this->nodes[$name] = $node;
- }
-
- public function removeNode(string $name): void
- {
- unset($this->nodes[$name]);
- }
-
- /**
- * @return int
- */
- #[\ReturnTypeWillChange]
- public function count()
- {
- return \count($this->nodes);
- }
-
- public function getIterator(): \Traversable
- {
- return new \ArrayIterator($this->nodes);
- }
-
- public function getTemplateName(): ?string
- {
- return $this->sourceContext ? $this->sourceContext->getName() : null;
- }
-
- public function setSourceContext(Source $source): void
- {
- $this->sourceContext = $source;
- foreach ($this->nodes as $node) {
- $node->setSourceContext($source);
- }
- }
-
- public function getSourceContext(): ?Source
- {
- return $this->sourceContext;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/NodeCaptureInterface.php b/system/vendor/twig/twig/src/Node/NodeCaptureInterface.php
deleted file mode 100644
index 9fb6a0c..0000000
--- a/system/vendor/twig/twig/src/Node/NodeCaptureInterface.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- */
-interface NodeCaptureInterface
-{
-}
diff --git a/system/vendor/twig/twig/src/Node/NodeOutputInterface.php b/system/vendor/twig/twig/src/Node/NodeOutputInterface.php
deleted file mode 100644
index 5e35b40..0000000
--- a/system/vendor/twig/twig/src/Node/NodeOutputInterface.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- */
-interface NodeOutputInterface
-{
-}
diff --git a/system/vendor/twig/twig/src/Node/PrintNode.php b/system/vendor/twig/twig/src/Node/PrintNode.php
deleted file mode 100644
index 60386d2..0000000
--- a/system/vendor/twig/twig/src/Node/PrintNode.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- */
-class PrintNode extends Node implements NodeOutputInterface
-{
- public function __construct(AbstractExpression $expr, int $lineno, string $tag = null)
- {
- parent::__construct(['expr' => $expr], [], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->addDebugInfo($this)
- ->write('echo ')
- ->subcompile($this->getNode('expr'))
- ->raw(";\n")
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/SandboxNode.php b/system/vendor/twig/twig/src/Node/SandboxNode.php
deleted file mode 100644
index 4d5666b..0000000
--- a/system/vendor/twig/twig/src/Node/SandboxNode.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
- */
-class SandboxNode extends Node
-{
- public function __construct(Node $body, int $lineno, string $tag = null)
- {
- parent::__construct(['body' => $body], [], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->addDebugInfo($this)
- ->write("if (!\$alreadySandboxed = \$this->sandbox->isSandboxed()) {\n")
- ->indent()
- ->write("\$this->sandbox->enableSandbox();\n")
- ->outdent()
- ->write("}\n")
- ->write("try {\n")
- ->indent()
- ->subcompile($this->getNode('body'))
- ->outdent()
- ->write("} finally {\n")
- ->indent()
- ->write("if (!\$alreadySandboxed) {\n")
- ->indent()
- ->write("\$this->sandbox->disableSandbox();\n")
- ->outdent()
- ->write("}\n")
- ->outdent()
- ->write("}\n")
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/SetNode.php b/system/vendor/twig/twig/src/Node/SetNode.php
deleted file mode 100644
index 96b6bd8..0000000
--- a/system/vendor/twig/twig/src/Node/SetNode.php
+++ /dev/null
@@ -1,105 +0,0 @@
-
- */
-class SetNode extends Node implements NodeCaptureInterface
-{
- public function __construct(bool $capture, Node $names, Node $values, int $lineno, string $tag = null)
- {
- parent::__construct(['names' => $names, 'values' => $values], ['capture' => $capture, 'safe' => false], $lineno, $tag);
-
- /*
- * Optimizes the node when capture is used for a large block of text.
- *
- * {% set foo %}foo{% endset %} is compiled to $context['foo'] = new Twig\Markup("foo");
- */
- if ($this->getAttribute('capture')) {
- $this->setAttribute('safe', true);
-
- $values = $this->getNode('values');
- if ($values instanceof TextNode) {
- $this->setNode('values', new ConstantExpression($values->getAttribute('data'), $values->getTemplateLine()));
- $this->setAttribute('capture', false);
- }
- }
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler->addDebugInfo($this);
-
- if (\count($this->getNode('names')) > 1) {
- $compiler->write('list(');
- foreach ($this->getNode('names') as $idx => $node) {
- if ($idx) {
- $compiler->raw(', ');
- }
-
- $compiler->subcompile($node);
- }
- $compiler->raw(')');
- } else {
- if ($this->getAttribute('capture')) {
- if ($compiler->getEnvironment()->isDebug()) {
- $compiler->write("ob_start();\n");
- } else {
- $compiler->write("ob_start(function () { return ''; });\n");
- }
- $compiler
- ->subcompile($this->getNode('values'))
- ;
- }
-
- $compiler->subcompile($this->getNode('names'), false);
-
- if ($this->getAttribute('capture')) {
- $compiler->raw(" = ('' === \$tmp = ob_get_clean()) ? '' : new Markup(\$tmp, \$this->env->getCharset())");
- }
- }
-
- if (!$this->getAttribute('capture')) {
- $compiler->raw(' = ');
-
- if (\count($this->getNode('names')) > 1) {
- $compiler->write('[');
- foreach ($this->getNode('values') as $idx => $value) {
- if ($idx) {
- $compiler->raw(', ');
- }
-
- $compiler->subcompile($value);
- }
- $compiler->raw(']');
- } else {
- if ($this->getAttribute('safe')) {
- $compiler
- ->raw("('' === \$tmp = ")
- ->subcompile($this->getNode('values'))
- ->raw(") ? '' : new Markup(\$tmp, \$this->env->getCharset())")
- ;
- } else {
- $compiler->subcompile($this->getNode('values'));
- }
- }
- }
-
- $compiler->raw(";\n");
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/TextNode.php b/system/vendor/twig/twig/src/Node/TextNode.php
deleted file mode 100644
index d74ebe6..0000000
--- a/system/vendor/twig/twig/src/Node/TextNode.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
- */
-class TextNode extends Node implements NodeOutputInterface
-{
- public function __construct(string $data, int $lineno)
- {
- parent::__construct([], ['data' => $data], $lineno);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->addDebugInfo($this)
- ->write('echo ')
- ->string($this->getAttribute('data'))
- ->raw(";\n")
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Node/WithNode.php b/system/vendor/twig/twig/src/Node/WithNode.php
deleted file mode 100644
index 2ac9123..0000000
--- a/system/vendor/twig/twig/src/Node/WithNode.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
- */
-class WithNode extends Node
-{
- public function __construct(Node $body, ?Node $variables, bool $only, int $lineno, string $tag = null)
- {
- $nodes = ['body' => $body];
- if (null !== $variables) {
- $nodes['variables'] = $variables;
- }
-
- parent::__construct($nodes, ['only' => $only], $lineno, $tag);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler->addDebugInfo($this);
-
- $parentContextName = $compiler->getVarName();
-
- $compiler->write(sprintf("\$%s = \$context;\n", $parentContextName));
-
- if ($this->hasNode('variables')) {
- $node = $this->getNode('variables');
- $varsName = $compiler->getVarName();
- $compiler
- ->write(sprintf('$%s = ', $varsName))
- ->subcompile($node)
- ->raw(";\n")
- ->write(sprintf("if (!is_iterable(\$%s)) {\n", $varsName))
- ->indent()
- ->write("throw new RuntimeError('Variables passed to the \"with\" tag must be a hash.', ")
- ->repr($node->getTemplateLine())
- ->raw(", \$this->getSourceContext());\n")
- ->outdent()
- ->write("}\n")
- ->write(sprintf("\$%s = twig_to_array(\$%s);\n", $varsName, $varsName))
- ;
-
- if ($this->getAttribute('only')) {
- $compiler->write("\$context = [];\n");
- }
-
- $compiler->write(sprintf("\$context = \$this->env->mergeGlobals(array_merge(\$context, \$%s));\n", $varsName));
- }
-
- $compiler
- ->subcompile($this->getNode('body'))
- ->write(sprintf("\$context = \$%s;\n", $parentContextName))
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/NodeTraverser.php b/system/vendor/twig/twig/src/NodeTraverser.php
deleted file mode 100644
index 47a2d5c..0000000
--- a/system/vendor/twig/twig/src/NodeTraverser.php
+++ /dev/null
@@ -1,76 +0,0 @@
-
- */
-final class NodeTraverser
-{
- private $env;
- private $visitors = [];
-
- /**
- * @param NodeVisitorInterface[] $visitors
- */
- public function __construct(Environment $env, array $visitors = [])
- {
- $this->env = $env;
- foreach ($visitors as $visitor) {
- $this->addVisitor($visitor);
- }
- }
-
- public function addVisitor(NodeVisitorInterface $visitor): void
- {
- $this->visitors[$visitor->getPriority()][] = $visitor;
- }
-
- /**
- * Traverses a node and calls the registered visitors.
- */
- public function traverse(Node $node): Node
- {
- ksort($this->visitors);
- foreach ($this->visitors as $visitors) {
- foreach ($visitors as $visitor) {
- $node = $this->traverseForVisitor($visitor, $node);
- }
- }
-
- return $node;
- }
-
- private function traverseForVisitor(NodeVisitorInterface $visitor, Node $node): ?Node
- {
- $node = $visitor->enterNode($node, $this->env);
-
- foreach ($node as $k => $n) {
- if (null !== $m = $this->traverseForVisitor($visitor, $n)) {
- if ($m !== $n) {
- $node->setNode($k, $m);
- }
- } else {
- $node->removeNode($k);
- }
- }
-
- return $visitor->leaveNode($node, $this->env);
- }
-}
diff --git a/system/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php b/system/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php
deleted file mode 100644
index d7036ae..0000000
--- a/system/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php
+++ /dev/null
@@ -1,49 +0,0 @@
-
- */
-abstract class AbstractNodeVisitor implements NodeVisitorInterface
-{
- final public function enterNode(Node $node, Environment $env): Node
- {
- return $this->doEnterNode($node, $env);
- }
-
- final public function leaveNode(Node $node, Environment $env): ?Node
- {
- return $this->doLeaveNode($node, $env);
- }
-
- /**
- * Called before child nodes are visited.
- *
- * @return Node The modified node
- */
- abstract protected function doEnterNode(Node $node, Environment $env);
-
- /**
- * Called after child nodes are visited.
- *
- * @return Node|null The modified node or null if the node must be removed
- */
- abstract protected function doLeaveNode(Node $node, Environment $env);
-}
diff --git a/system/vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php b/system/vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php
deleted file mode 100644
index c390d7c..0000000
--- a/system/vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php
+++ /dev/null
@@ -1,208 +0,0 @@
-
- *
- * @internal
- */
-final class EscaperNodeVisitor implements NodeVisitorInterface
-{
- private $statusStack = [];
- private $blocks = [];
- private $safeAnalysis;
- private $traverser;
- private $defaultStrategy = false;
- private $safeVars = [];
-
- public function __construct()
- {
- $this->safeAnalysis = new SafeAnalysisNodeVisitor();
- }
-
- public function enterNode(Node $node, Environment $env): Node
- {
- if ($node instanceof ModuleNode) {
- if ($env->hasExtension(EscaperExtension::class) && $defaultStrategy = $env->getExtension(EscaperExtension::class)->getDefaultStrategy($node->getTemplateName())) {
- $this->defaultStrategy = $defaultStrategy;
- }
- $this->safeVars = [];
- $this->blocks = [];
- } elseif ($node instanceof AutoEscapeNode) {
- $this->statusStack[] = $node->getAttribute('value');
- } elseif ($node instanceof BlockNode) {
- $this->statusStack[] = $this->blocks[$node->getAttribute('name')] ?? $this->needEscaping();
- } elseif ($node instanceof ImportNode) {
- $this->safeVars[] = $node->getNode('var')->getAttribute('name');
- }
-
- return $node;
- }
-
- public function leaveNode(Node $node, Environment $env): ?Node
- {
- if ($node instanceof ModuleNode) {
- $this->defaultStrategy = false;
- $this->safeVars = [];
- $this->blocks = [];
- } elseif ($node instanceof FilterExpression) {
- return $this->preEscapeFilterNode($node, $env);
- } elseif ($node instanceof PrintNode && false !== $type = $this->needEscaping()) {
- $expression = $node->getNode('expr');
- if ($expression instanceof ConditionalExpression && $this->shouldUnwrapConditional($expression, $env, $type)) {
- return new DoNode($this->unwrapConditional($expression, $env, $type), $expression->getTemplateLine());
- }
-
- return $this->escapePrintNode($node, $env, $type);
- }
-
- if ($node instanceof AutoEscapeNode || $node instanceof BlockNode) {
- array_pop($this->statusStack);
- } elseif ($node instanceof BlockReferenceNode) {
- $this->blocks[$node->getAttribute('name')] = $this->needEscaping();
- }
-
- return $node;
- }
-
- private function shouldUnwrapConditional(ConditionalExpression $expression, Environment $env, string $type): bool
- {
- $expr2Safe = $this->isSafeFor($type, $expression->getNode('expr2'), $env);
- $expr3Safe = $this->isSafeFor($type, $expression->getNode('expr3'), $env);
-
- return $expr2Safe !== $expr3Safe;
- }
-
- private function unwrapConditional(ConditionalExpression $expression, Environment $env, string $type): ConditionalExpression
- {
- // convert "echo a ? b : c" to "a ? echo b : echo c" recursively
- $expr2 = $expression->getNode('expr2');
- if ($expr2 instanceof ConditionalExpression && $this->shouldUnwrapConditional($expr2, $env, $type)) {
- $expr2 = $this->unwrapConditional($expr2, $env, $type);
- } else {
- $expr2 = $this->escapeInlinePrintNode(new InlinePrint($expr2, $expr2->getTemplateLine()), $env, $type);
- }
- $expr3 = $expression->getNode('expr3');
- if ($expr3 instanceof ConditionalExpression && $this->shouldUnwrapConditional($expr3, $env, $type)) {
- $expr3 = $this->unwrapConditional($expr3, $env, $type);
- } else {
- $expr3 = $this->escapeInlinePrintNode(new InlinePrint($expr3, $expr3->getTemplateLine()), $env, $type);
- }
-
- return new ConditionalExpression($expression->getNode('expr1'), $expr2, $expr3, $expression->getTemplateLine());
- }
-
- private function escapeInlinePrintNode(InlinePrint $node, Environment $env, string $type): Node
- {
- $expression = $node->getNode('node');
-
- if ($this->isSafeFor($type, $expression, $env)) {
- return $node;
- }
-
- return new InlinePrint($this->getEscaperFilter($type, $expression), $node->getTemplateLine());
- }
-
- private function escapePrintNode(PrintNode $node, Environment $env, string $type): Node
- {
- if (false === $type) {
- return $node;
- }
-
- $expression = $node->getNode('expr');
-
- if ($this->isSafeFor($type, $expression, $env)) {
- return $node;
- }
-
- $class = \get_class($node);
-
- return new $class($this->getEscaperFilter($type, $expression), $node->getTemplateLine());
- }
-
- private function preEscapeFilterNode(FilterExpression $filter, Environment $env): FilterExpression
- {
- $name = $filter->getNode('filter')->getAttribute('value');
-
- $type = $env->getFilter($name)->getPreEscape();
- if (null === $type) {
- return $filter;
- }
-
- $node = $filter->getNode('node');
- if ($this->isSafeFor($type, $node, $env)) {
- return $filter;
- }
-
- $filter->setNode('node', $this->getEscaperFilter($type, $node));
-
- return $filter;
- }
-
- private function isSafeFor(string $type, Node $expression, Environment $env): bool
- {
- $safe = $this->safeAnalysis->getSafe($expression);
-
- if (null === $safe) {
- if (null === $this->traverser) {
- $this->traverser = new NodeTraverser($env, [$this->safeAnalysis]);
- }
-
- $this->safeAnalysis->setSafeVars($this->safeVars);
-
- $this->traverser->traverse($expression);
- $safe = $this->safeAnalysis->getSafe($expression);
- }
-
- return \in_array($type, $safe) || \in_array('all', $safe);
- }
-
- private function needEscaping()
- {
- if (\count($this->statusStack)) {
- return $this->statusStack[\count($this->statusStack) - 1];
- }
-
- return $this->defaultStrategy ?: false;
- }
-
- private function getEscaperFilter(string $type, Node $node): FilterExpression
- {
- $line = $node->getTemplateLine();
- $name = new ConstantExpression('escape', $line);
- $args = new Node([new ConstantExpression($type, $line), new ConstantExpression(null, $line), new ConstantExpression(true, $line)]);
-
- return new FilterExpression($node, $name, $args, $line);
- }
-
- public function getPriority(): int
- {
- return 0;
- }
-}
diff --git a/system/vendor/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php b/system/vendor/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php
deleted file mode 100644
index d6a7781..0000000
--- a/system/vendor/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php
+++ /dev/null
@@ -1,74 +0,0 @@
-
- *
- * @internal
- */
-final class MacroAutoImportNodeVisitor implements NodeVisitorInterface
-{
- private $inAModule = false;
- private $hasMacroCalls = false;
-
- public function enterNode(Node $node, Environment $env): Node
- {
- if ($node instanceof ModuleNode) {
- $this->inAModule = true;
- $this->hasMacroCalls = false;
- }
-
- return $node;
- }
-
- public function leaveNode(Node $node, Environment $env): Node
- {
- if ($node instanceof ModuleNode) {
- $this->inAModule = false;
- if ($this->hasMacroCalls) {
- $node->getNode('constructor_end')->setNode('_auto_macro_import', new ImportNode(new NameExpression('_self', 0), new AssignNameExpression('_self', 0), 0, 'import', true));
- }
- } elseif ($this->inAModule) {
- if (
- $node instanceof GetAttrExpression
- && $node->getNode('node') instanceof NameExpression
- && '_self' === $node->getNode('node')->getAttribute('name')
- && $node->getNode('attribute') instanceof ConstantExpression
- ) {
- $this->hasMacroCalls = true;
-
- $name = $node->getNode('attribute')->getAttribute('value');
- $node = new MethodCallExpression($node->getNode('node'), 'macro_'.$name, $node->getNode('arguments'), $node->getTemplateLine());
- $node->setAttribute('safe', true);
- }
- }
-
- return $node;
- }
-
- public function getPriority(): int
- {
- // we must be ran before auto-escaping
- return -10;
- }
-}
diff --git a/system/vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php b/system/vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php
deleted file mode 100644
index 59e836d..0000000
--- a/system/vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php
+++ /dev/null
@@ -1,46 +0,0 @@
-
- */
-interface NodeVisitorInterface
-{
- /**
- * Called before child nodes are visited.
- *
- * @return Node The modified node
- */
- public function enterNode(Node $node, Environment $env): Node;
-
- /**
- * Called after child nodes are visited.
- *
- * @return Node|null The modified node or null if the node must be removed
- */
- public function leaveNode(Node $node, Environment $env): ?Node;
-
- /**
- * Returns the priority for this visitor.
- *
- * Priority should be between -10 and 10 (0 is the default).
- *
- * @return int The priority level
- */
- public function getPriority();
-}
diff --git a/system/vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php b/system/vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php
deleted file mode 100644
index 6b39f00..0000000
--- a/system/vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php
+++ /dev/null
@@ -1,217 +0,0 @@
-
- *
- * @internal
- */
-final class OptimizerNodeVisitor implements NodeVisitorInterface
-{
- public const OPTIMIZE_ALL = -1;
- public const OPTIMIZE_NONE = 0;
- public const OPTIMIZE_FOR = 2;
- public const OPTIMIZE_RAW_FILTER = 4;
-
- private $loops = [];
- private $loopsTargets = [];
- private $optimizers;
-
- /**
- * @param int $optimizers The optimizer mode
- */
- public function __construct(int $optimizers = -1)
- {
- if ($optimizers > (self::OPTIMIZE_FOR | self::OPTIMIZE_RAW_FILTER)) {
- throw new \InvalidArgumentException(sprintf('Optimizer mode "%s" is not valid.', $optimizers));
- }
-
- $this->optimizers = $optimizers;
- }
-
- public function enterNode(Node $node, Environment $env): Node
- {
- if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) {
- $this->enterOptimizeFor($node);
- }
-
- return $node;
- }
-
- public function leaveNode(Node $node, Environment $env): ?Node
- {
- if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) {
- $this->leaveOptimizeFor($node);
- }
-
- if (self::OPTIMIZE_RAW_FILTER === (self::OPTIMIZE_RAW_FILTER & $this->optimizers)) {
- $node = $this->optimizeRawFilter($node);
- }
-
- $node = $this->optimizePrintNode($node);
-
- return $node;
- }
-
- /**
- * Optimizes print nodes.
- *
- * It replaces:
- *
- * * "echo $this->render(Parent)Block()" with "$this->display(Parent)Block()"
- */
- private function optimizePrintNode(Node $node): Node
- {
- if (!$node instanceof PrintNode) {
- return $node;
- }
-
- $exprNode = $node->getNode('expr');
- if (
- $exprNode instanceof BlockReferenceExpression
- || $exprNode instanceof ParentExpression
- ) {
- $exprNode->setAttribute('output', true);
-
- return $exprNode;
- }
-
- return $node;
- }
-
- /**
- * Removes "raw" filters.
- */
- private function optimizeRawFilter(Node $node): Node
- {
- if ($node instanceof FilterExpression && 'raw' == $node->getNode('filter')->getAttribute('value')) {
- return $node->getNode('node');
- }
-
- return $node;
- }
-
- /**
- * Optimizes "for" tag by removing the "loop" variable creation whenever possible.
- */
- private function enterOptimizeFor(Node $node): void
- {
- if ($node instanceof ForNode) {
- // disable the loop variable by default
- $node->setAttribute('with_loop', false);
- array_unshift($this->loops, $node);
- array_unshift($this->loopsTargets, $node->getNode('value_target')->getAttribute('name'));
- array_unshift($this->loopsTargets, $node->getNode('key_target')->getAttribute('name'));
- } elseif (!$this->loops) {
- // we are outside a loop
- return;
- }
-
- // when do we need to add the loop variable back?
-
- // the loop variable is referenced for the current loop
- elseif ($node instanceof NameExpression && 'loop' === $node->getAttribute('name')) {
- $node->setAttribute('always_defined', true);
- $this->addLoopToCurrent();
- }
-
- // optimize access to loop targets
- elseif ($node instanceof NameExpression && \in_array($node->getAttribute('name'), $this->loopsTargets)) {
- $node->setAttribute('always_defined', true);
- }
-
- // block reference
- elseif ($node instanceof BlockReferenceNode || $node instanceof BlockReferenceExpression) {
- $this->addLoopToCurrent();
- }
-
- // include without the only attribute
- elseif ($node instanceof IncludeNode && !$node->getAttribute('only')) {
- $this->addLoopToAll();
- }
-
- // include function without the with_context=false parameter
- elseif ($node instanceof FunctionExpression
- && 'include' === $node->getAttribute('name')
- && (!$node->getNode('arguments')->hasNode('with_context')
- || false !== $node->getNode('arguments')->getNode('with_context')->getAttribute('value')
- )
- ) {
- $this->addLoopToAll();
- }
-
- // the loop variable is referenced via an attribute
- elseif ($node instanceof GetAttrExpression
- && (!$node->getNode('attribute') instanceof ConstantExpression
- || 'parent' === $node->getNode('attribute')->getAttribute('value')
- )
- && (true === $this->loops[0]->getAttribute('with_loop')
- || ($node->getNode('node') instanceof NameExpression
- && 'loop' === $node->getNode('node')->getAttribute('name')
- )
- )
- ) {
- $this->addLoopToAll();
- }
- }
-
- /**
- * Optimizes "for" tag by removing the "loop" variable creation whenever possible.
- */
- private function leaveOptimizeFor(Node $node): void
- {
- if ($node instanceof ForNode) {
- array_shift($this->loops);
- array_shift($this->loopsTargets);
- array_shift($this->loopsTargets);
- }
- }
-
- private function addLoopToCurrent(): void
- {
- $this->loops[0]->setAttribute('with_loop', true);
- }
-
- private function addLoopToAll(): void
- {
- foreach ($this->loops as $loop) {
- $loop->setAttribute('with_loop', true);
- }
- }
-
- public function getPriority(): int
- {
- return 255;
- }
-}
diff --git a/system/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php b/system/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php
deleted file mode 100644
index 90d6f2e..0000000
--- a/system/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php
+++ /dev/null
@@ -1,160 +0,0 @@
-safeVars = $safeVars;
- }
-
- public function getSafe(Node $node)
- {
- $hash = spl_object_hash($node);
- if (!isset($this->data[$hash])) {
- return;
- }
-
- foreach ($this->data[$hash] as $bucket) {
- if ($bucket['key'] !== $node) {
- continue;
- }
-
- if (\in_array('html_attr', $bucket['value'])) {
- $bucket['value'][] = 'html';
- }
-
- return $bucket['value'];
- }
- }
-
- private function setSafe(Node $node, array $safe): void
- {
- $hash = spl_object_hash($node);
- if (isset($this->data[$hash])) {
- foreach ($this->data[$hash] as &$bucket) {
- if ($bucket['key'] === $node) {
- $bucket['value'] = $safe;
-
- return;
- }
- }
- }
- $this->data[$hash][] = [
- 'key' => $node,
- 'value' => $safe,
- ];
- }
-
- public function enterNode(Node $node, Environment $env): Node
- {
- return $node;
- }
-
- public function leaveNode(Node $node, Environment $env): ?Node
- {
- if ($node instanceof ConstantExpression) {
- // constants are marked safe for all
- $this->setSafe($node, ['all']);
- } elseif ($node instanceof BlockReferenceExpression) {
- // blocks are safe by definition
- $this->setSafe($node, ['all']);
- } elseif ($node instanceof ParentExpression) {
- // parent block is safe by definition
- $this->setSafe($node, ['all']);
- } elseif ($node instanceof ConditionalExpression) {
- // intersect safeness of both operands
- $safe = $this->intersectSafe($this->getSafe($node->getNode('expr2')), $this->getSafe($node->getNode('expr3')));
- $this->setSafe($node, $safe);
- } elseif ($node instanceof FilterExpression) {
- // filter expression is safe when the filter is safe
- $name = $node->getNode('filter')->getAttribute('value');
- $args = $node->getNode('arguments');
- if ($filter = $env->getFilter($name)) {
- $safe = $filter->getSafe($args);
- if (null === $safe) {
- $safe = $this->intersectSafe($this->getSafe($node->getNode('node')), $filter->getPreservesSafety());
- }
- $this->setSafe($node, $safe);
- } else {
- $this->setSafe($node, []);
- }
- } elseif ($node instanceof FunctionExpression) {
- // function expression is safe when the function is safe
- $name = $node->getAttribute('name');
- $args = $node->getNode('arguments');
- if ($function = $env->getFunction($name)) {
- $this->setSafe($node, $function->getSafe($args));
- } else {
- $this->setSafe($node, []);
- }
- } elseif ($node instanceof MethodCallExpression) {
- if ($node->getAttribute('safe')) {
- $this->setSafe($node, ['all']);
- } else {
- $this->setSafe($node, []);
- }
- } elseif ($node instanceof GetAttrExpression && $node->getNode('node') instanceof NameExpression) {
- $name = $node->getNode('node')->getAttribute('name');
- if (\in_array($name, $this->safeVars)) {
- $this->setSafe($node, ['all']);
- } else {
- $this->setSafe($node, []);
- }
- } else {
- $this->setSafe($node, []);
- }
-
- return $node;
- }
-
- private function intersectSafe(array $a = null, array $b = null): array
- {
- if (null === $a || null === $b) {
- return [];
- }
-
- if (\in_array('all', $a)) {
- return $b;
- }
-
- if (\in_array('all', $b)) {
- return $a;
- }
-
- return array_intersect($a, $b);
- }
-
- public function getPriority(): int
- {
- return 0;
- }
-}
diff --git a/system/vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php b/system/vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php
deleted file mode 100644
index 1446cee..0000000
--- a/system/vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php
+++ /dev/null
@@ -1,136 +0,0 @@
-
- *
- * @internal
- */
-final class SandboxNodeVisitor implements NodeVisitorInterface
-{
- private $inAModule = false;
- private $tags;
- private $filters;
- private $functions;
- private $needsToStringWrap = false;
-
- public function enterNode(Node $node, Environment $env): Node
- {
- if ($node instanceof ModuleNode) {
- $this->inAModule = true;
- $this->tags = [];
- $this->filters = [];
- $this->functions = [];
-
- return $node;
- } elseif ($this->inAModule) {
- // look for tags
- if ($node->getNodeTag() && !isset($this->tags[$node->getNodeTag()])) {
- $this->tags[$node->getNodeTag()] = $node;
- }
-
- // look for filters
- if ($node instanceof FilterExpression && !isset($this->filters[$node->getNode('filter')->getAttribute('value')])) {
- $this->filters[$node->getNode('filter')->getAttribute('value')] = $node;
- }
-
- // look for functions
- if ($node instanceof FunctionExpression && !isset($this->functions[$node->getAttribute('name')])) {
- $this->functions[$node->getAttribute('name')] = $node;
- }
-
- // the .. operator is equivalent to the range() function
- if ($node instanceof RangeBinary && !isset($this->functions['range'])) {
- $this->functions['range'] = $node;
- }
-
- if ($node instanceof PrintNode) {
- $this->needsToStringWrap = true;
- $this->wrapNode($node, 'expr');
- }
-
- if ($node instanceof SetNode && !$node->getAttribute('capture')) {
- $this->needsToStringWrap = true;
- }
-
- // wrap outer nodes that can implicitly call __toString()
- if ($this->needsToStringWrap) {
- if ($node instanceof ConcatBinary) {
- $this->wrapNode($node, 'left');
- $this->wrapNode($node, 'right');
- }
- if ($node instanceof FilterExpression) {
- $this->wrapNode($node, 'node');
- $this->wrapArrayNode($node, 'arguments');
- }
- if ($node instanceof FunctionExpression) {
- $this->wrapArrayNode($node, 'arguments');
- }
- }
- }
-
- return $node;
- }
-
- public function leaveNode(Node $node, Environment $env): ?Node
- {
- if ($node instanceof ModuleNode) {
- $this->inAModule = false;
-
- $node->setNode('constructor_end', new Node([new CheckSecurityCallNode(), $node->getNode('constructor_end')]));
- $node->setNode('class_end', new Node([new CheckSecurityNode($this->filters, $this->tags, $this->functions), $node->getNode('class_end')]));
- } elseif ($this->inAModule) {
- if ($node instanceof PrintNode || $node instanceof SetNode) {
- $this->needsToStringWrap = false;
- }
- }
-
- return $node;
- }
-
- private function wrapNode(Node $node, string $name): void
- {
- $expr = $node->getNode($name);
- if ($expr instanceof NameExpression || $expr instanceof GetAttrExpression) {
- $node->setNode($name, new CheckToStringNode($expr));
- }
- }
-
- private function wrapArrayNode(Node $node, string $name): void
- {
- $args = $node->getNode($name);
- foreach ($args as $name => $_) {
- $this->wrapNode($args, $name);
- }
- }
-
- public function getPriority(): int
- {
- return 0;
- }
-}
diff --git a/system/vendor/twig/twig/src/Parser.php b/system/vendor/twig/twig/src/Parser.php
deleted file mode 100644
index 4016a5f..0000000
--- a/system/vendor/twig/twig/src/Parser.php
+++ /dev/null
@@ -1,347 +0,0 @@
-
- */
-class Parser
-{
- private $stack = [];
- private $stream;
- private $parent;
- private $visitors;
- private $expressionParser;
- private $blocks;
- private $blockStack;
- private $macros;
- private $env;
- private $importedSymbols;
- private $traits;
- private $embeddedTemplates = [];
- private $varNameSalt = 0;
-
- public function __construct(Environment $env)
- {
- $this->env = $env;
- }
-
- public function getVarName(): string
- {
- return sprintf('__internal_parse_%d', $this->varNameSalt++);
- }
-
- public function parse(TokenStream $stream, $test = null, bool $dropNeedle = false): ModuleNode
- {
- $vars = get_object_vars($this);
- unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser'], $vars['reservedMacroNames'], $vars['varNameSalt']);
- $this->stack[] = $vars;
-
- // node visitors
- if (null === $this->visitors) {
- $this->visitors = $this->env->getNodeVisitors();
- }
-
- if (null === $this->expressionParser) {
- $this->expressionParser = new ExpressionParser($this, $this->env);
- }
-
- $this->stream = $stream;
- $this->parent = null;
- $this->blocks = [];
- $this->macros = [];
- $this->traits = [];
- $this->blockStack = [];
- $this->importedSymbols = [[]];
- $this->embeddedTemplates = [];
-
- try {
- $body = $this->subparse($test, $dropNeedle);
-
- if (null !== $this->parent && null === $body = $this->filterBodyNodes($body)) {
- $body = new Node();
- }
- } catch (SyntaxError $e) {
- if (!$e->getSourceContext()) {
- $e->setSourceContext($this->stream->getSourceContext());
- }
-
- if (!$e->getTemplateLine()) {
- $e->setTemplateLine($this->stream->getCurrent()->getLine());
- }
-
- throw $e;
- }
-
- $node = new ModuleNode(new BodyNode([$body]), $this->parent, new Node($this->blocks), new Node($this->macros), new Node($this->traits), $this->embeddedTemplates, $stream->getSourceContext());
-
- $traverser = new NodeTraverser($this->env, $this->visitors);
-
- $node = $traverser->traverse($node);
-
- // restore previous stack so previous parse() call can resume working
- foreach (array_pop($this->stack) as $key => $val) {
- $this->$key = $val;
- }
-
- return $node;
- }
-
- public function subparse($test, bool $dropNeedle = false): Node
- {
- $lineno = $this->getCurrentToken()->getLine();
- $rv = [];
- while (!$this->stream->isEOF()) {
- switch ($this->getCurrentToken()->getType()) {
- case /* Token::TEXT_TYPE */ 0:
- $token = $this->stream->next();
- $rv[] = new TextNode($token->getValue(), $token->getLine());
- break;
-
- case /* Token::VAR_START_TYPE */ 2:
- $token = $this->stream->next();
- $expr = $this->expressionParser->parseExpression();
- $this->stream->expect(/* Token::VAR_END_TYPE */ 4);
- $rv[] = new PrintNode($expr, $token->getLine());
- break;
-
- case /* Token::BLOCK_START_TYPE */ 1:
- $this->stream->next();
- $token = $this->getCurrentToken();
-
- if (/* Token::NAME_TYPE */ 5 !== $token->getType()) {
- throw new SyntaxError('A block must start with a tag name.', $token->getLine(), $this->stream->getSourceContext());
- }
-
- if (null !== $test && $test($token)) {
- if ($dropNeedle) {
- $this->stream->next();
- }
-
- if (1 === \count($rv)) {
- return $rv[0];
- }
-
- return new Node($rv, [], $lineno);
- }
-
- if (!$subparser = $this->env->getTokenParser($token->getValue())) {
- if (null !== $test) {
- $e = new SyntaxError(sprintf('Unexpected "%s" tag', $token->getValue()), $token->getLine(), $this->stream->getSourceContext());
-
- if (\is_array($test) && isset($test[0]) && $test[0] instanceof TokenParserInterface) {
- $e->appendMessage(sprintf(' (expecting closing tag for the "%s" tag defined near line %s).', $test[0]->getTag(), $lineno));
- }
- } else {
- $e = new SyntaxError(sprintf('Unknown "%s" tag.', $token->getValue()), $token->getLine(), $this->stream->getSourceContext());
- $e->addSuggestions($token->getValue(), array_keys($this->env->getTokenParsers()));
- }
-
- throw $e;
- }
-
- $this->stream->next();
-
- $subparser->setParser($this);
- $node = $subparser->parse($token);
- if (null !== $node) {
- $rv[] = $node;
- }
- break;
-
- default:
- throw new SyntaxError('Lexer or parser ended up in unsupported state.', $this->getCurrentToken()->getLine(), $this->stream->getSourceContext());
- }
- }
-
- if (1 === \count($rv)) {
- return $rv[0];
- }
-
- return new Node($rv, [], $lineno);
- }
-
- public function getBlockStack(): array
- {
- return $this->blockStack;
- }
-
- public function peekBlockStack()
- {
- return $this->blockStack[\count($this->blockStack) - 1] ?? null;
- }
-
- public function popBlockStack(): void
- {
- array_pop($this->blockStack);
- }
-
- public function pushBlockStack($name): void
- {
- $this->blockStack[] = $name;
- }
-
- public function hasBlock(string $name): bool
- {
- return isset($this->blocks[$name]);
- }
-
- public function getBlock(string $name): Node
- {
- return $this->blocks[$name];
- }
-
- public function setBlock(string $name, BlockNode $value): void
- {
- $this->blocks[$name] = new BodyNode([$value], [], $value->getTemplateLine());
- }
-
- public function hasMacro(string $name): bool
- {
- return isset($this->macros[$name]);
- }
-
- public function setMacro(string $name, MacroNode $node): void
- {
- $this->macros[$name] = $node;
- }
-
- public function addTrait($trait): void
- {
- $this->traits[] = $trait;
- }
-
- public function hasTraits(): bool
- {
- return \count($this->traits) > 0;
- }
-
- public function embedTemplate(ModuleNode $template)
- {
- $template->setIndex(mt_rand());
-
- $this->embeddedTemplates[] = $template;
- }
-
- public function addImportedSymbol(string $type, string $alias, string $name = null, AbstractExpression $node = null): void
- {
- $this->importedSymbols[0][$type][$alias] = ['name' => $name, 'node' => $node];
- }
-
- public function getImportedSymbol(string $type, string $alias)
- {
- // if the symbol does not exist in the current scope (0), try in the main/global scope (last index)
- return $this->importedSymbols[0][$type][$alias] ?? ($this->importedSymbols[\count($this->importedSymbols) - 1][$type][$alias] ?? null);
- }
-
- public function isMainScope(): bool
- {
- return 1 === \count($this->importedSymbols);
- }
-
- public function pushLocalScope(): void
- {
- array_unshift($this->importedSymbols, []);
- }
-
- public function popLocalScope(): void
- {
- array_shift($this->importedSymbols);
- }
-
- public function getExpressionParser(): ExpressionParser
- {
- return $this->expressionParser;
- }
-
- public function getParent(): ?Node
- {
- return $this->parent;
- }
-
- public function setParent(?Node $parent): void
- {
- $this->parent = $parent;
- }
-
- public function getStream(): TokenStream
- {
- return $this->stream;
- }
-
- public function getCurrentToken(): Token
- {
- return $this->stream->getCurrent();
- }
-
- private function filterBodyNodes(Node $node, bool $nested = false): ?Node
- {
- // check that the body does not contain non-empty output nodes
- if (
- ($node instanceof TextNode && !ctype_space($node->getAttribute('data')))
- || (!$node instanceof TextNode && !$node instanceof BlockReferenceNode && $node instanceof NodeOutputInterface)
- ) {
- if (str_contains((string) $node, \chr(0xEF).\chr(0xBB).\chr(0xBF))) {
- $t = substr($node->getAttribute('data'), 3);
- if ('' === $t || ctype_space($t)) {
- // bypass empty nodes starting with a BOM
- return null;
- }
- }
-
- throw new SyntaxError('A template that extends another one cannot include content outside Twig blocks. Did you forget to put the content inside a {% block %} tag?', $node->getTemplateLine(), $this->stream->getSourceContext());
- }
-
- // bypass nodes that "capture" the output
- if ($node instanceof NodeCaptureInterface) {
- // a "block" tag in such a node will serve as a block definition AND be displayed in place as well
- return $node;
- }
-
- // "block" tags that are not captured (see above) are only used for defining
- // the content of the block. In such a case, nesting it does not work as
- // expected as the definition is not part of the default template code flow.
- if ($nested && $node instanceof BlockReferenceNode) {
- throw new SyntaxError('A block definition cannot be nested under non-capturing nodes.', $node->getTemplateLine(), $this->stream->getSourceContext());
- }
-
- if ($node instanceof NodeOutputInterface) {
- return null;
- }
-
- // here, $nested means "being at the root level of a child template"
- // we need to discard the wrapping "Node" for the "body" node
- $nested = $nested || Node::class !== \get_class($node);
- foreach ($node as $k => $n) {
- if (null !== $n && null === $this->filterBodyNodes($n, $nested)) {
- $node->removeNode($k);
- }
- }
-
- return $node;
- }
-}
diff --git a/system/vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php b/system/vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php
deleted file mode 100644
index 4da43e4..0000000
--- a/system/vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php
+++ /dev/null
@@ -1,63 +0,0 @@
-
- */
-abstract class BaseDumper
-{
- private $root;
-
- public function dump(Profile $profile): string
- {
- return $this->dumpProfile($profile);
- }
-
- abstract protected function formatTemplate(Profile $profile, $prefix): string;
-
- abstract protected function formatNonTemplate(Profile $profile, $prefix): string;
-
- abstract protected function formatTime(Profile $profile, $percent): string;
-
- private function dumpProfile(Profile $profile, $prefix = '', $sibling = false): string
- {
- if ($profile->isRoot()) {
- $this->root = $profile->getDuration();
- $start = $profile->getName();
- } else {
- if ($profile->isTemplate()) {
- $start = $this->formatTemplate($profile, $prefix);
- } else {
- $start = $this->formatNonTemplate($profile, $prefix);
- }
- $prefix .= $sibling ? '│ ' : ' ';
- }
-
- $percent = $this->root ? $profile->getDuration() / $this->root * 100 : 0;
-
- if ($profile->getDuration() * 1000 < 1) {
- $str = $start."\n";
- } else {
- $str = sprintf("%s %s\n", $start, $this->formatTime($profile, $percent));
- }
-
- $nCount = \count($profile->getProfiles());
- foreach ($profile as $i => $p) {
- $str .= $this->dumpProfile($p, $prefix, $i + 1 !== $nCount);
- }
-
- return $str;
- }
-}
diff --git a/system/vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php b/system/vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php
deleted file mode 100644
index 03abe0f..0000000
--- a/system/vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php
+++ /dev/null
@@ -1,72 +0,0 @@
-
- */
-final class BlackfireDumper
-{
- public function dump(Profile $profile): string
- {
- $data = [];
- $this->dumpProfile('main()', $profile, $data);
- $this->dumpChildren('main()', $profile, $data);
-
- $start = sprintf('%f', microtime(true));
- $str = << $values) {
- $str .= "$name//{$values['ct']} {$values['wt']} {$values['mu']} {$values['pmu']}\n";
- }
-
- return $str;
- }
-
- private function dumpChildren(string $parent, Profile $profile, &$data)
- {
- foreach ($profile as $p) {
- if ($p->isTemplate()) {
- $name = $p->getTemplate();
- } else {
- $name = sprintf('%s::%s(%s)', $p->getTemplate(), $p->getType(), $p->getName());
- }
- $this->dumpProfile(sprintf('%s==>%s', $parent, $name), $p, $data);
- $this->dumpChildren($name, $p, $data);
- }
- }
-
- private function dumpProfile(string $edge, Profile $profile, &$data)
- {
- if (isset($data[$edge])) {
- ++$data[$edge]['ct'];
- $data[$edge]['wt'] += floor($profile->getDuration() * 1000000);
- $data[$edge]['mu'] += $profile->getMemoryUsage();
- $data[$edge]['pmu'] += $profile->getPeakMemoryUsage();
- } else {
- $data[$edge] = [
- 'ct' => 1,
- 'wt' => floor($profile->getDuration() * 1000000),
- 'mu' => $profile->getMemoryUsage(),
- 'pmu' => $profile->getPeakMemoryUsage(),
- ];
- }
- }
-}
diff --git a/system/vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php b/system/vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php
deleted file mode 100644
index 3c0daf1..0000000
--- a/system/vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php
+++ /dev/null
@@ -1,47 +0,0 @@
-
- */
-final class HtmlDumper extends BaseDumper
-{
- private static $colors = [
- 'block' => '#dfd',
- 'macro' => '#ddf',
- 'template' => '#ffd',
- 'big' => '#d44',
- ];
-
- public function dump(Profile $profile): string
- {
- return ''.parent::dump($profile).'
';
- }
-
- protected function formatTemplate(Profile $profile, $prefix): string
- {
- return sprintf('%s└ %s', $prefix, self::$colors['template'], $profile->getTemplate());
- }
-
- protected function formatNonTemplate(Profile $profile, $prefix): string
- {
- return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), self::$colors[$profile->getType()] ?? 'auto', $profile->getName());
- }
-
- protected function formatTime(Profile $profile, $percent): string
- {
- return sprintf('%.2fms/%.0f%%', $percent > 20 ? self::$colors['big'] : 'auto', $profile->getDuration() * 1000, $percent);
- }
-}
diff --git a/system/vendor/twig/twig/src/Profiler/Dumper/TextDumper.php b/system/vendor/twig/twig/src/Profiler/Dumper/TextDumper.php
deleted file mode 100644
index 31561c4..0000000
--- a/system/vendor/twig/twig/src/Profiler/Dumper/TextDumper.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
- */
-final class TextDumper extends BaseDumper
-{
- protected function formatTemplate(Profile $profile, $prefix): string
- {
- return sprintf('%s└ %s', $prefix, $profile->getTemplate());
- }
-
- protected function formatNonTemplate(Profile $profile, $prefix): string
- {
- return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), $profile->getName());
- }
-
- protected function formatTime(Profile $profile, $percent): string
- {
- return sprintf('%.2fms/%.0f%%', $profile->getDuration() * 1000, $percent);
- }
-}
diff --git a/system/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php b/system/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php
deleted file mode 100644
index 1494baf..0000000
--- a/system/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
- */
-class EnterProfileNode extends Node
-{
- public function __construct(string $extensionName, string $type, string $name, string $varName)
- {
- parent::__construct([], ['extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName]);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->write(sprintf('$%s = $this->extensions[', $this->getAttribute('var_name')))
- ->repr($this->getAttribute('extension_name'))
- ->raw("];\n")
- ->write(sprintf('$%s->enter($%s = new \Twig\Profiler\Profile($this->getTemplateName(), ', $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
- ->repr($this->getAttribute('type'))
- ->raw(', ')
- ->repr($this->getAttribute('name'))
- ->raw("));\n\n")
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php b/system/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php
deleted file mode 100644
index 94cebba..0000000
--- a/system/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php
+++ /dev/null
@@ -1,36 +0,0 @@
-
- */
-class LeaveProfileNode extends Node
-{
- public function __construct(string $varName)
- {
- parent::__construct([], ['var_name' => $varName]);
- }
-
- public function compile(Compiler $compiler): void
- {
- $compiler
- ->write("\n")
- ->write(sprintf("\$%s->leave(\$%s);\n\n", $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
- ;
- }
-}
diff --git a/system/vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php b/system/vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php
deleted file mode 100644
index 91abee8..0000000
--- a/system/vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
- */
-final class ProfilerNodeVisitor implements NodeVisitorInterface
-{
- private $extensionName;
- private $varName;
-
- public function __construct(string $extensionName)
- {
- $this->extensionName = $extensionName;
- $this->varName = sprintf('__internal_%s', hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $extensionName));
- }
-
- public function enterNode(Node $node, Environment $env): Node
- {
- return $node;
- }
-
- public function leaveNode(Node $node, Environment $env): ?Node
- {
- if ($node instanceof ModuleNode) {
- $node->setNode('display_start', new Node([new EnterProfileNode($this->extensionName, Profile::TEMPLATE, $node->getTemplateName(), $this->varName), $node->getNode('display_start')]));
- $node->setNode('display_end', new Node([new LeaveProfileNode($this->varName), $node->getNode('display_end')]));
- } elseif ($node instanceof BlockNode) {
- $node->setNode('body', new BodyNode([
- new EnterProfileNode($this->extensionName, Profile::BLOCK, $node->getAttribute('name'), $this->varName),
- $node->getNode('body'),
- new LeaveProfileNode($this->varName),
- ]));
- } elseif ($node instanceof MacroNode) {
- $node->setNode('body', new BodyNode([
- new EnterProfileNode($this->extensionName, Profile::MACRO, $node->getAttribute('name'), $this->varName),
- $node->getNode('body'),
- new LeaveProfileNode($this->varName),
- ]));
- }
-
- return $node;
- }
-
- public function getPriority(): int
- {
- return 0;
- }
-}
diff --git a/system/vendor/twig/twig/src/Profiler/Profile.php b/system/vendor/twig/twig/src/Profiler/Profile.php
deleted file mode 100644
index 7979a23..0000000
--- a/system/vendor/twig/twig/src/Profiler/Profile.php
+++ /dev/null
@@ -1,181 +0,0 @@
-
- */
-final class Profile implements \IteratorAggregate, \Serializable
-{
- public const ROOT = 'ROOT';
- public const BLOCK = 'block';
- public const TEMPLATE = 'template';
- public const MACRO = 'macro';
-
- private $template;
- private $name;
- private $type;
- private $starts = [];
- private $ends = [];
- private $profiles = [];
-
- public function __construct(string $template = 'main', string $type = self::ROOT, string $name = 'main')
- {
- $this->template = $template;
- $this->type = $type;
- $this->name = str_starts_with($name, '__internal_') ? 'INTERNAL' : $name;
- $this->enter();
- }
-
- public function getTemplate(): string
- {
- return $this->template;
- }
-
- public function getType(): string
- {
- return $this->type;
- }
-
- public function getName(): string
- {
- return $this->name;
- }
-
- public function isRoot(): bool
- {
- return self::ROOT === $this->type;
- }
-
- public function isTemplate(): bool
- {
- return self::TEMPLATE === $this->type;
- }
-
- public function isBlock(): bool
- {
- return self::BLOCK === $this->type;
- }
-
- public function isMacro(): bool
- {
- return self::MACRO === $this->type;
- }
-
- /**
- * @return Profile[]
- */
- public function getProfiles(): array
- {
- return $this->profiles;
- }
-
- public function addProfile(self $profile): void
- {
- $this->profiles[] = $profile;
- }
-
- /**
- * Returns the duration in microseconds.
- */
- public function getDuration(): float
- {
- if ($this->isRoot() && $this->profiles) {
- // for the root node with children, duration is the sum of all child durations
- $duration = 0;
- foreach ($this->profiles as $profile) {
- $duration += $profile->getDuration();
- }
-
- return $duration;
- }
-
- return isset($this->ends['wt']) && isset($this->starts['wt']) ? $this->ends['wt'] - $this->starts['wt'] : 0;
- }
-
- /**
- * Returns the memory usage in bytes.
- */
- public function getMemoryUsage(): int
- {
- return isset($this->ends['mu']) && isset($this->starts['mu']) ? $this->ends['mu'] - $this->starts['mu'] : 0;
- }
-
- /**
- * Returns the peak memory usage in bytes.
- */
- public function getPeakMemoryUsage(): int
- {
- return isset($this->ends['pmu']) && isset($this->starts['pmu']) ? $this->ends['pmu'] - $this->starts['pmu'] : 0;
- }
-
- /**
- * Starts the profiling.
- */
- public function enter(): void
- {
- $this->starts = [
- 'wt' => microtime(true),
- 'mu' => memory_get_usage(),
- 'pmu' => memory_get_peak_usage(),
- ];
- }
-
- /**
- * Stops the profiling.
- */
- public function leave(): void
- {
- $this->ends = [
- 'wt' => microtime(true),
- 'mu' => memory_get_usage(),
- 'pmu' => memory_get_peak_usage(),
- ];
- }
-
- public function reset(): void
- {
- $this->starts = $this->ends = $this->profiles = [];
- $this->enter();
- }
-
- public function getIterator(): \Traversable
- {
- return new \ArrayIterator($this->profiles);
- }
-
- public function serialize(): string
- {
- return serialize($this->__serialize());
- }
-
- public function unserialize($data): void
- {
- $this->__unserialize(unserialize($data));
- }
-
- /**
- * @internal
- */
- public function __serialize(): array
- {
- return [$this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles];
- }
-
- /**
- * @internal
- */
- public function __unserialize(array $data): void
- {
- list($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles) = $data;
- }
-}
diff --git a/system/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php b/system/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php
deleted file mode 100644
index b360d7b..0000000
--- a/system/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php
+++ /dev/null
@@ -1,37 +0,0 @@
-
- * @author Robin Chalas
- */
-class ContainerRuntimeLoader implements RuntimeLoaderInterface
-{
- private $container;
-
- public function __construct(ContainerInterface $container)
- {
- $this->container = $container;
- }
-
- public function load(string $class)
- {
- return $this->container->has($class) ? $this->container->get($class) : null;
- }
-}
diff --git a/system/vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php b/system/vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php
deleted file mode 100644
index 1306483..0000000
--- a/system/vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php
+++ /dev/null
@@ -1,41 +0,0 @@
-
- */
-class FactoryRuntimeLoader implements RuntimeLoaderInterface
-{
- private $map;
-
- /**
- * @param array $map An array where keys are class names and values factory callables
- */
- public function __construct(array $map = [])
- {
- $this->map = $map;
- }
-
- public function load(string $class)
- {
- if (!isset($this->map[$class])) {
- return null;
- }
-
- $runtimeFactory = $this->map[$class];
-
- return $runtimeFactory();
- }
-}
diff --git a/system/vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php b/system/vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php
deleted file mode 100644
index 9e5b204..0000000
--- a/system/vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- */
-interface RuntimeLoaderInterface
-{
- /**
- * Creates the runtime implementation of a Twig element (filter/function/test).
- *
- * @return object|null The runtime instance or null if the loader does not know how to create the runtime for this class
- */
- public function load(string $class);
-}
diff --git a/system/vendor/twig/twig/src/Sandbox/SecurityError.php b/system/vendor/twig/twig/src/Sandbox/SecurityError.php
deleted file mode 100644
index 30a404f..0000000
--- a/system/vendor/twig/twig/src/Sandbox/SecurityError.php
+++ /dev/null
@@ -1,23 +0,0 @@
-
- */
-class SecurityError extends Error
-{
-}
diff --git a/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php b/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php
deleted file mode 100644
index 02d3063..0000000
--- a/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php
+++ /dev/null
@@ -1,33 +0,0 @@
-
- */
-final class SecurityNotAllowedFilterError extends SecurityError
-{
- private $filterName;
-
- public function __construct(string $message, string $functionName)
- {
- parent::__construct($message);
- $this->filterName = $functionName;
- }
-
- public function getFilterName(): string
- {
- return $this->filterName;
- }
-}
diff --git a/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php b/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php
deleted file mode 100644
index 4f76dc6..0000000
--- a/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php
+++ /dev/null
@@ -1,33 +0,0 @@
-
- */
-final class SecurityNotAllowedFunctionError extends SecurityError
-{
- private $functionName;
-
- public function __construct(string $message, string $functionName)
- {
- parent::__construct($message);
- $this->functionName = $functionName;
- }
-
- public function getFunctionName(): string
- {
- return $this->functionName;
- }
-}
diff --git a/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php b/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php
deleted file mode 100644
index 8df9d0b..0000000
--- a/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- */
-final class SecurityNotAllowedMethodError extends SecurityError
-{
- private $className;
- private $methodName;
-
- public function __construct(string $message, string $className, string $methodName)
- {
- parent::__construct($message);
- $this->className = $className;
- $this->methodName = $methodName;
- }
-
- public function getClassName(): string
- {
- return $this->className;
- }
-
- public function getMethodName()
- {
- return $this->methodName;
- }
-}
diff --git a/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php b/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php
deleted file mode 100644
index 42ec4f3..0000000
--- a/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- */
-final class SecurityNotAllowedPropertyError extends SecurityError
-{
- private $className;
- private $propertyName;
-
- public function __construct(string $message, string $className, string $propertyName)
- {
- parent::__construct($message);
- $this->className = $className;
- $this->propertyName = $propertyName;
- }
-
- public function getClassName(): string
- {
- return $this->className;
- }
-
- public function getPropertyName()
- {
- return $this->propertyName;
- }
-}
diff --git a/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php b/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php
deleted file mode 100644
index 4522150..0000000
--- a/system/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php
+++ /dev/null
@@ -1,33 +0,0 @@
-
- */
-final class SecurityNotAllowedTagError extends SecurityError
-{
- private $tagName;
-
- public function __construct(string $message, string $tagName)
- {
- parent::__construct($message);
- $this->tagName = $tagName;
- }
-
- public function getTagName(): string
- {
- return $this->tagName;
- }
-}
diff --git a/system/vendor/twig/twig/src/Sandbox/SecurityPolicy.php b/system/vendor/twig/twig/src/Sandbox/SecurityPolicy.php
deleted file mode 100644
index a725aa4..0000000
--- a/system/vendor/twig/twig/src/Sandbox/SecurityPolicy.php
+++ /dev/null
@@ -1,124 +0,0 @@
-
- */
-final class SecurityPolicy implements SecurityPolicyInterface
-{
- private $allowedTags;
- private $allowedFilters;
- private $allowedMethods;
- private $allowedProperties;
- private $allowedFunctions;
-
- public function __construct(array $allowedTags = [], array $allowedFilters = [], array $allowedMethods = [], array $allowedProperties = [], array $allowedFunctions = [])
- {
- $this->allowedTags = $allowedTags;
- $this->allowedFilters = $allowedFilters;
- $this->setAllowedMethods($allowedMethods);
- $this->allowedProperties = $allowedProperties;
- $this->allowedFunctions = $allowedFunctions;
- }
-
- public function setAllowedTags(array $tags): void
- {
- $this->allowedTags = $tags;
- }
-
- public function setAllowedFilters(array $filters): void
- {
- $this->allowedFilters = $filters;
- }
-
- public function setAllowedMethods(array $methods): void
- {
- $this->allowedMethods = [];
- foreach ($methods as $class => $m) {
- $this->allowedMethods[$class] = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, \is_array($m) ? $m : [$m]);
- }
- }
-
- public function setAllowedProperties(array $properties): void
- {
- $this->allowedProperties = $properties;
- }
-
- public function setAllowedFunctions(array $functions): void
- {
- $this->allowedFunctions = $functions;
- }
-
- public function checkSecurity($tags, $filters, $functions): void
- {
- foreach ($tags as $tag) {
- if (!\in_array($tag, $this->allowedTags)) {
- throw new SecurityNotAllowedTagError(sprintf('Tag "%s" is not allowed.', $tag), $tag);
- }
- }
-
- foreach ($filters as $filter) {
- if (!\in_array($filter, $this->allowedFilters)) {
- throw new SecurityNotAllowedFilterError(sprintf('Filter "%s" is not allowed.', $filter), $filter);
- }
- }
-
- foreach ($functions as $function) {
- if (!\in_array($function, $this->allowedFunctions)) {
- throw new SecurityNotAllowedFunctionError(sprintf('Function "%s" is not allowed.', $function), $function);
- }
- }
- }
-
- public function checkMethodAllowed($obj, $method): void
- {
- if ($obj instanceof Template || $obj instanceof Markup) {
- return;
- }
-
- $allowed = false;
- $method = strtr($method, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
- foreach ($this->allowedMethods as $class => $methods) {
- if ($obj instanceof $class && \in_array($method, $methods)) {
- $allowed = true;
- break;
- }
- }
-
- if (!$allowed) {
- $class = \get_class($obj);
- throw new SecurityNotAllowedMethodError(sprintf('Calling "%s" method on a "%s" object is not allowed.', $method, $class), $class, $method);
- }
- }
-
- public function checkPropertyAllowed($obj, $property): void
- {
- $allowed = false;
- foreach ($this->allowedProperties as $class => $properties) {
- if ($obj instanceof $class && \in_array($property, \is_array($properties) ? $properties : [$properties])) {
- $allowed = true;
- break;
- }
- }
-
- if (!$allowed) {
- $class = \get_class($obj);
- throw new SecurityNotAllowedPropertyError(sprintf('Calling "%s" property on a "%s" object is not allowed.', $property, $class), $class, $property);
- }
- }
-}
diff --git a/system/vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php b/system/vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php
deleted file mode 100644
index 36471c5..0000000
--- a/system/vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php
+++ /dev/null
@@ -1,45 +0,0 @@
-
- */
-interface SecurityPolicyInterface
-{
- /**
- * @param string[] $tags
- * @param string[] $filters
- * @param string[] $functions
- *
- * @throws SecurityError
- */
- public function checkSecurity($tags, $filters, $functions): void;
-
- /**
- * @param object $obj
- * @param string $method
- *
- * @throws SecurityNotAllowedMethodError
- */
- public function checkMethodAllowed($obj, $method): void;
-
- /**
- * @param object $obj
- * @param string $property
- *
- * @throws SecurityNotAllowedPropertyError
- */
- public function checkPropertyAllowed($obj, $property): void;
-}
diff --git a/system/vendor/twig/twig/src/Source.php b/system/vendor/twig/twig/src/Source.php
deleted file mode 100644
index 3cb0240..0000000
--- a/system/vendor/twig/twig/src/Source.php
+++ /dev/null
@@ -1,51 +0,0 @@
-
- */
-final class Source
-{
- private $code;
- private $name;
- private $path;
-
- /**
- * @param string $code The template source code
- * @param string $name The template logical name
- * @param string $path The filesystem path of the template if any
- */
- public function __construct(string $code, string $name, string $path = '')
- {
- $this->code = $code;
- $this->name = $name;
- $this->path = $path;
- }
-
- public function getCode(): string
- {
- return $this->code;
- }
-
- public function getName(): string
- {
- return $this->name;
- }
-
- public function getPath(): string
- {
- return $this->path;
- }
-}
diff --git a/system/vendor/twig/twig/src/Template.php b/system/vendor/twig/twig/src/Template.php
deleted file mode 100644
index ffbaae1..0000000
--- a/system/vendor/twig/twig/src/Template.php
+++ /dev/null
@@ -1,422 +0,0 @@
-load()
- * instead, which returns an instance of \Twig\TemplateWrapper.
- *
- * @author Fabien Potencier
- *
- * @internal
- */
-abstract class Template
-{
- public const ANY_CALL = 'any';
- public const ARRAY_CALL = 'array';
- public const METHOD_CALL = 'method';
-
- protected $parent;
- protected $parents = [];
- protected $env;
- protected $blocks = [];
- protected $traits = [];
- protected $extensions = [];
- protected $sandbox;
-
- public function __construct(Environment $env)
- {
- $this->env = $env;
- $this->extensions = $env->getExtensions();
- }
-
- /**
- * Returns the template name.
- *
- * @return string The template name
- */
- abstract public function getTemplateName();
-
- /**
- * Returns debug information about the template.
- *
- * @return array Debug information
- */
- abstract public function getDebugInfo();
-
- /**
- * Returns information about the original template source code.
- *
- * @return Source
- */
- abstract public function getSourceContext();
-
- /**
- * Returns the parent template.
- *
- * This method is for internal use only and should never be called
- * directly.
- *
- * @return Template|TemplateWrapper|false The parent template or false if there is no parent
- */
- public function getParent(array $context)
- {
- if (null !== $this->parent) {
- return $this->parent;
- }
-
- try {
- $parent = $this->doGetParent($context);
-
- if (false === $parent) {
- return false;
- }
-
- if ($parent instanceof self || $parent instanceof TemplateWrapper) {
- return $this->parents[$parent->getSourceContext()->getName()] = $parent;
- }
-
- if (!isset($this->parents[$parent])) {
- $this->parents[$parent] = $this->loadTemplate($parent);
- }
- } catch (LoaderError $e) {
- $e->setSourceContext(null);
- $e->guess();
-
- throw $e;
- }
-
- return $this->parents[$parent];
- }
-
- protected function doGetParent(array $context)
- {
- return false;
- }
-
- public function isTraitable()
- {
- return true;
- }
-
- /**
- * Displays a parent block.
- *
- * This method is for internal use only and should never be called
- * directly.
- *
- * @param string $name The block name to display from the parent
- * @param array $context The context
- * @param array $blocks The current set of blocks
- */
- public function displayParentBlock($name, array $context, array $blocks = [])
- {
- if (isset($this->traits[$name])) {
- $this->traits[$name][0]->displayBlock($name, $context, $blocks, false);
- } elseif (false !== $parent = $this->getParent($context)) {
- $parent->displayBlock($name, $context, $blocks, false);
- } else {
- throw new RuntimeError(sprintf('The template has no parent and no traits defining the "%s" block.', $name), -1, $this->getSourceContext());
- }
- }
-
- /**
- * Displays a block.
- *
- * This method is for internal use only and should never be called
- * directly.
- *
- * @param string $name The block name to display
- * @param array $context The context
- * @param array $blocks The current set of blocks
- * @param bool $useBlocks Whether to use the current set of blocks
- */
- public function displayBlock($name, array $context, array $blocks = [], $useBlocks = true, self $templateContext = null)
- {
- if ($useBlocks && isset($blocks[$name])) {
- $template = $blocks[$name][0];
- $block = $blocks[$name][1];
- } elseif (isset($this->blocks[$name])) {
- $template = $this->blocks[$name][0];
- $block = $this->blocks[$name][1];
- } else {
- $template = null;
- $block = null;
- }
-
- // avoid RCEs when sandbox is enabled
- if (null !== $template && !$template instanceof self) {
- throw new \LogicException('A block must be a method on a \Twig\Template instance.');
- }
-
- if (null !== $template) {
- try {
- $template->$block($context, $blocks);
- } catch (Error $e) {
- if (!$e->getSourceContext()) {
- $e->setSourceContext($template->getSourceContext());
- }
-
- // this is mostly useful for \Twig\Error\LoaderError exceptions
- // see \Twig\Error\LoaderError
- if (-1 === $e->getTemplateLine()) {
- $e->guess();
- }
-
- throw $e;
- } catch (\Throwable $e) {
- $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
- $e->guess();
-
- throw $e;
- }
- } elseif (false !== $parent = $this->getParent($context)) {
- $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false, $templateContext ?? $this);
- } elseif (isset($blocks[$name])) {
- throw new RuntimeError(sprintf('Block "%s" should not call parent() in "%s" as the block does not exist in the parent template "%s".', $name, $blocks[$name][0]->getTemplateName(), $this->getTemplateName()), -1, $blocks[$name][0]->getSourceContext());
- } else {
- throw new RuntimeError(sprintf('Block "%s" on template "%s" does not exist.', $name, $this->getTemplateName()), -1, ($templateContext ?? $this)->getSourceContext());
- }
- }
-
- /**
- * Renders a parent block.
- *
- * This method is for internal use only and should never be called
- * directly.
- *
- * @param string $name The block name to render from the parent
- * @param array $context The context
- * @param array $blocks The current set of blocks
- *
- * @return string The rendered block
- */
- public function renderParentBlock($name, array $context, array $blocks = [])
- {
- if ($this->env->isDebug()) {
- ob_start();
- } else {
- ob_start(function () { return ''; });
- }
- $this->displayParentBlock($name, $context, $blocks);
-
- return ob_get_clean();
- }
-
- /**
- * Renders a block.
- *
- * This method is for internal use only and should never be called
- * directly.
- *
- * @param string $name The block name to render
- * @param array $context The context
- * @param array $blocks The current set of blocks
- * @param bool $useBlocks Whether to use the current set of blocks
- *
- * @return string The rendered block
- */
- public function renderBlock($name, array $context, array $blocks = [], $useBlocks = true)
- {
- if ($this->env->isDebug()) {
- ob_start();
- } else {
- ob_start(function () { return ''; });
- }
- $this->displayBlock($name, $context, $blocks, $useBlocks);
-
- return ob_get_clean();
- }
-
- /**
- * Returns whether a block exists or not in the current context of the template.
- *
- * This method checks blocks defined in the current template
- * or defined in "used" traits or defined in parent templates.
- *
- * @param string $name The block name
- * @param array $context The context
- * @param array $blocks The current set of blocks
- *
- * @return bool true if the block exists, false otherwise
- */
- public function hasBlock($name, array $context, array $blocks = [])
- {
- if (isset($blocks[$name])) {
- return $blocks[$name][0] instanceof self;
- }
-
- if (isset($this->blocks[$name])) {
- return true;
- }
-
- if (false !== $parent = $this->getParent($context)) {
- return $parent->hasBlock($name, $context);
- }
-
- return false;
- }
-
- /**
- * Returns all block names in the current context of the template.
- *
- * This method checks blocks defined in the current template
- * or defined in "used" traits or defined in parent templates.
- *
- * @param array $context The context
- * @param array $blocks The current set of blocks
- *
- * @return array An array of block names
- */
- public function getBlockNames(array $context, array $blocks = [])
- {
- $names = array_merge(array_keys($blocks), array_keys($this->blocks));
-
- if (false !== $parent = $this->getParent($context)) {
- $names = array_merge($names, $parent->getBlockNames($context));
- }
-
- return array_unique($names);
- }
-
- /**
- * @return Template|TemplateWrapper
- */
- protected function loadTemplate($template, $templateName = null, $line = null, $index = null)
- {
- try {
- if (\is_array($template)) {
- return $this->env->resolveTemplate($template);
- }
-
- if ($template instanceof self || $template instanceof TemplateWrapper) {
- return $template;
- }
-
- if ($template === $this->getTemplateName()) {
- $class = static::class;
- if (false !== $pos = strrpos($class, '___', -1)) {
- $class = substr($class, 0, $pos);
- }
- } else {
- $class = $this->env->getTemplateClass($template);
- }
-
- return $this->env->loadTemplate($class, $template, $index);
- } catch (Error $e) {
- if (!$e->getSourceContext()) {
- $e->setSourceContext($templateName ? new Source('', $templateName) : $this->getSourceContext());
- }
-
- if ($e->getTemplateLine() > 0) {
- throw $e;
- }
-
- if (!$line) {
- $e->guess();
- } else {
- $e->setTemplateLine($line);
- }
-
- throw $e;
- }
- }
-
- /**
- * @internal
- *
- * @return Template
- */
- public function unwrap()
- {
- return $this;
- }
-
- /**
- * Returns all blocks.
- *
- * This method is for internal use only and should never be called
- * directly.
- *
- * @return array An array of blocks
- */
- public function getBlocks()
- {
- return $this->blocks;
- }
-
- public function display(array $context, array $blocks = [])
- {
- $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
- }
-
- public function render(array $context)
- {
- $level = ob_get_level();
- if ($this->env->isDebug()) {
- ob_start();
- } else {
- ob_start(function () { return ''; });
- }
- try {
- $this->display($context);
- } catch (\Throwable $e) {
- while (ob_get_level() > $level) {
- ob_end_clean();
- }
-
- throw $e;
- }
-
- return ob_get_clean();
- }
-
- protected function displayWithErrorHandling(array $context, array $blocks = [])
- {
- try {
- $this->doDisplay($context, $blocks);
- } catch (Error $e) {
- if (!$e->getSourceContext()) {
- $e->setSourceContext($this->getSourceContext());
- }
-
- // this is mostly useful for \Twig\Error\LoaderError exceptions
- // see \Twig\Error\LoaderError
- if (-1 === $e->getTemplateLine()) {
- $e->guess();
- }
-
- throw $e;
- } catch (\Throwable $e) {
- $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
- $e->guess();
-
- throw $e;
- }
- }
-
- /**
- * Auto-generated method to display the template with the given context.
- *
- * @param array $context An array of parameters to pass to the template
- * @param array $blocks An array of blocks to pass to the template
- */
- abstract protected function doDisplay(array $context, array $blocks = []);
-}
diff --git a/system/vendor/twig/twig/src/TemplateWrapper.php b/system/vendor/twig/twig/src/TemplateWrapper.php
deleted file mode 100644
index 1ecd822..0000000
--- a/system/vendor/twig/twig/src/TemplateWrapper.php
+++ /dev/null
@@ -1,107 +0,0 @@
-
- */
-final class TemplateWrapper
-{
- private $env;
- private $template;
-
- /**
- * This method is for internal use only and should never be called
- * directly (use Twig\Environment::load() instead).
- *
- * @internal
- */
- public function __construct(Environment $env, Template $template)
- {
- $this->env = $env;
- $this->template = $template;
- }
-
- public function render(array $context = []): string
- {
- return $this->template->render($context);
- }
-
- public function display(array $context = [])
- {
- // using func_get_args() allows to not expose the blocks argument
- // as it should only be used by internal code
- $this->template->display($context, \func_get_args()[1] ?? []);
- }
-
- public function hasBlock(string $name, array $context = []): bool
- {
- return $this->template->hasBlock($name, $context);
- }
-
- /**
- * @return string[] An array of defined template block names
- */
- public function getBlockNames(array $context = []): array
- {
- return $this->template->getBlockNames($context);
- }
-
- public function renderBlock(string $name, array $context = []): string
- {
- $context = $this->env->mergeGlobals($context);
- $level = ob_get_level();
- if ($this->env->isDebug()) {
- ob_start();
- } else {
- ob_start(function () { return ''; });
- }
- try {
- $this->template->displayBlock($name, $context);
- } catch (\Throwable $e) {
- while (ob_get_level() > $level) {
- ob_end_clean();
- }
-
- throw $e;
- }
-
- return ob_get_clean();
- }
-
- public function displayBlock(string $name, array $context = [])
- {
- $this->template->displayBlock($name, $this->env->mergeGlobals($context));
- }
-
- public function getSourceContext(): Source
- {
- return $this->template->getSourceContext();
- }
-
- public function getTemplateName(): string
- {
- return $this->template->getTemplateName();
- }
-
- /**
- * @internal
- *
- * @return Template
- */
- public function unwrap()
- {
- return $this->template;
- }
-}
diff --git a/system/vendor/twig/twig/src/Test/IntegrationTestCase.php b/system/vendor/twig/twig/src/Test/IntegrationTestCase.php
deleted file mode 100644
index e97ad41..0000000
--- a/system/vendor/twig/twig/src/Test/IntegrationTestCase.php
+++ /dev/null
@@ -1,266 +0,0 @@
-
- * @author Karma Dordrak
- */
-abstract class IntegrationTestCase extends TestCase
-{
- /**
- * @return string
- */
- abstract protected function getFixturesDir();
-
- /**
- * @return RuntimeLoaderInterface[]
- */
- protected function getRuntimeLoaders()
- {
- return [];
- }
-
- /**
- * @return ExtensionInterface[]
- */
- protected function getExtensions()
- {
- return [];
- }
-
- /**
- * @return TwigFilter[]
- */
- protected function getTwigFilters()
- {
- return [];
- }
-
- /**
- * @return TwigFunction[]
- */
- protected function getTwigFunctions()
- {
- return [];
- }
-
- /**
- * @return TwigTest[]
- */
- protected function getTwigTests()
- {
- return [];
- }
-
- /**
- * @dataProvider getTests
- */
- public function testIntegration($file, $message, $condition, $templates, $exception, $outputs, $deprecation = '')
- {
- $this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs, $deprecation);
- }
-
- /**
- * @dataProvider getLegacyTests
- *
- * @group legacy
- */
- public function testLegacyIntegration($file, $message, $condition, $templates, $exception, $outputs, $deprecation = '')
- {
- $this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs, $deprecation);
- }
-
- public function getTests($name, $legacyTests = false)
- {
- $fixturesDir = realpath($this->getFixturesDir());
- $tests = [];
-
- foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($fixturesDir), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
- if (!preg_match('/\.test$/', $file)) {
- continue;
- }
-
- if ($legacyTests xor str_contains($file->getRealpath(), '.legacy.test')) {
- continue;
- }
-
- $test = file_get_contents($file->getRealpath());
-
- if (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*(?:--DEPRECATION--\s*(.*?))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)\s*(?:--DATA--\s*(.*))?\s*--EXCEPTION--\s*(.*)/sx', $test, $match)) {
- $message = $match[1];
- $condition = $match[2];
- $deprecation = $match[3];
- $templates = self::parseTemplates($match[4]);
- $exception = $match[6];
- $outputs = [[null, $match[5], null, '']];
- } elseif (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*(?:--DEPRECATION--\s*(.*?))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s', $test, $match)) {
- $message = $match[1];
- $condition = $match[2];
- $deprecation = $match[3];
- $templates = self::parseTemplates($match[4]);
- $exception = false;
- preg_match_all('/--DATA--(.*?)(?:--CONFIG--(.*?))?--EXPECT--(.*?)(?=\-\-DATA\-\-|$)/s', $test, $outputs, \PREG_SET_ORDER);
- } else {
- throw new \InvalidArgumentException(sprintf('Test "%s" is not valid.', str_replace($fixturesDir.'/', '', $file)));
- }
-
- $tests[] = [str_replace($fixturesDir.'/', '', $file), $message, $condition, $templates, $exception, $outputs, $deprecation];
- }
-
- if ($legacyTests && empty($tests)) {
- // add a dummy test to avoid a PHPUnit message
- return [['not', '-', '', [], '', []]];
- }
-
- return $tests;
- }
-
- public function getLegacyTests()
- {
- return $this->getTests('testLegacyIntegration', true);
- }
-
- protected function doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs, $deprecation = '')
- {
- if (!$outputs) {
- $this->markTestSkipped('no tests to run');
- }
-
- if ($condition) {
- eval('$ret = '.$condition.';');
- if (!$ret) {
- $this->markTestSkipped($condition);
- }
- }
-
- $loader = new ArrayLoader($templates);
-
- foreach ($outputs as $i => $match) {
- $config = array_merge([
- 'cache' => false,
- 'strict_variables' => true,
- ], $match[2] ? eval($match[2].';') : []);
- $twig = new Environment($loader, $config);
- $twig->addGlobal('global', 'global');
- foreach ($this->getRuntimeLoaders() as $runtimeLoader) {
- $twig->addRuntimeLoader($runtimeLoader);
- }
-
- foreach ($this->getExtensions() as $extension) {
- $twig->addExtension($extension);
- }
-
- foreach ($this->getTwigFilters() as $filter) {
- $twig->addFilter($filter);
- }
-
- foreach ($this->getTwigTests() as $test) {
- $twig->addTest($test);
- }
-
- foreach ($this->getTwigFunctions() as $function) {
- $twig->addFunction($function);
- }
-
- // avoid using the same PHP class name for different cases
- $p = new \ReflectionProperty($twig, 'templateClassPrefix');
- $p->setAccessible(true);
- $p->setValue($twig, '__TwigTemplate_'.hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', uniqid(mt_rand(), true), false).'_');
-
- $deprecations = [];
- try {
- $prevHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$deprecations, &$prevHandler) {
- if (\E_USER_DEPRECATED === $type) {
- $deprecations[] = $msg;
-
- return true;
- }
-
- return $prevHandler ? $prevHandler($type, $msg, $file, $line, $context) : false;
- });
-
- $template = $twig->load('index.twig');
- } catch (\Exception $e) {
- if (false !== $exception) {
- $message = $e->getMessage();
- $this->assertSame(trim($exception), trim(sprintf('%s: %s', \get_class($e), $message)));
- $last = substr($message, \strlen($message) - 1);
- $this->assertTrue('.' === $last || '?' === $last, 'Exception message must end with a dot or a question mark.');
-
- return;
- }
-
- throw new Error(sprintf('%s: %s', \get_class($e), $e->getMessage()), -1, null, $e);
- } finally {
- restore_error_handler();
- }
-
- $this->assertSame($deprecation, implode("\n", $deprecations));
-
- try {
- $output = trim($template->render(eval($match[1].';')), "\n ");
- } catch (\Exception $e) {
- if (false !== $exception) {
- $this->assertSame(trim($exception), trim(sprintf('%s: %s', \get_class($e), $e->getMessage())));
-
- return;
- }
-
- $e = new Error(sprintf('%s: %s', \get_class($e), $e->getMessage()), -1, null, $e);
-
- $output = trim(sprintf('%s: %s', \get_class($e), $e->getMessage()));
- }
-
- if (false !== $exception) {
- list($class) = explode(':', $exception);
- $constraintClass = class_exists('PHPUnit\Framework\Constraint\Exception') ? 'PHPUnit\Framework\Constraint\Exception' : 'PHPUnit_Framework_Constraint_Exception';
- $this->assertThat(null, new $constraintClass($class));
- }
-
- $expected = trim($match[3], "\n ");
-
- if ($expected !== $output) {
- printf("Compiled templates that failed on case %d:\n", $i + 1);
-
- foreach (array_keys($templates) as $name) {
- echo "Template: $name\n";
- echo $twig->compile($twig->parse($twig->tokenize($twig->getLoader()->getSourceContext($name))));
- }
- }
- $this->assertEquals($expected, $output, $message.' (in '.$file.')');
- }
- }
-
- protected static function parseTemplates($test)
- {
- $templates = [];
- preg_match_all('/--TEMPLATE(?:\((.*?)\))?--(.*?)(?=\-\-TEMPLATE|$)/s', $test, $matches, \PREG_SET_ORDER);
- foreach ($matches as $match) {
- $templates[$match[1] ?: 'index.twig'] = $match[2];
- }
-
- return $templates;
- }
-}
diff --git a/system/vendor/twig/twig/src/Test/NodeTestCase.php b/system/vendor/twig/twig/src/Test/NodeTestCase.php
deleted file mode 100644
index 8b1bef7..0000000
--- a/system/vendor/twig/twig/src/Test/NodeTestCase.php
+++ /dev/null
@@ -1,65 +0,0 @@
-assertNodeCompilation($source, $node, $environment, $isPattern);
- }
-
- public function assertNodeCompilation($source, Node $node, Environment $environment = null, $isPattern = false)
- {
- $compiler = $this->getCompiler($environment);
- $compiler->compile($node);
-
- if ($isPattern) {
- $this->assertStringMatchesFormat($source, trim($compiler->getSource()));
- } else {
- $this->assertEquals($source, trim($compiler->getSource()));
- }
- }
-
- protected function getCompiler(Environment $environment = null)
- {
- return new Compiler($environment ?? $this->getEnvironment());
- }
-
- protected function getEnvironment()
- {
- return new Environment(new ArrayLoader([]));
- }
-
- protected function getVariableGetter($name, $line = false)
- {
- $line = $line > 0 ? "// line $line\n" : '';
-
- return sprintf('%s($context["%s"] ?? null)', $line, $name);
- }
-
- protected function getAttributeGetter()
- {
- return 'twig_get_attribute($this->env, $this->source, ';
- }
-}
diff --git a/system/vendor/twig/twig/src/Token.php b/system/vendor/twig/twig/src/Token.php
deleted file mode 100644
index 59279b8..0000000
--- a/system/vendor/twig/twig/src/Token.php
+++ /dev/null
@@ -1,184 +0,0 @@
-
- */
-final class Token
-{
- private $value;
- private $type;
- private $lineno;
-
- public const EOF_TYPE = -1;
- public const TEXT_TYPE = 0;
- public const BLOCK_START_TYPE = 1;
- public const VAR_START_TYPE = 2;
- public const BLOCK_END_TYPE = 3;
- public const VAR_END_TYPE = 4;
- public const NAME_TYPE = 5;
- public const NUMBER_TYPE = 6;
- public const STRING_TYPE = 7;
- public const OPERATOR_TYPE = 8;
- public const PUNCTUATION_TYPE = 9;
- public const INTERPOLATION_START_TYPE = 10;
- public const INTERPOLATION_END_TYPE = 11;
- public const ARROW_TYPE = 12;
- public const SPREAD_TYPE = 13;
-
- public function __construct(int $type, $value, int $lineno)
- {
- $this->type = $type;
- $this->value = $value;
- $this->lineno = $lineno;
- }
-
- public function __toString()
- {
- return sprintf('%s(%s)', self::typeToString($this->type, true), $this->value);
- }
-
- /**
- * Tests the current token for a type and/or a value.
- *
- * Parameters may be:
- * * just type
- * * type and value (or array of possible values)
- * * just value (or array of possible values) (NAME_TYPE is used as type)
- *
- * @param array|string|int $type The type to test
- * @param array|string|null $values The token value
- */
- public function test($type, $values = null): bool
- {
- if (null === $values && !\is_int($type)) {
- $values = $type;
- $type = self::NAME_TYPE;
- }
-
- return ($this->type === $type) && (
- null === $values
- || (\is_array($values) && \in_array($this->value, $values))
- || $this->value == $values
- );
- }
-
- public function getLine(): int
- {
- return $this->lineno;
- }
-
- public function getType(): int
- {
- return $this->type;
- }
-
- public function getValue()
- {
- return $this->value;
- }
-
- public static function typeToString(int $type, bool $short = false): string
- {
- switch ($type) {
- case self::EOF_TYPE:
- $name = 'EOF_TYPE';
- break;
- case self::TEXT_TYPE:
- $name = 'TEXT_TYPE';
- break;
- case self::BLOCK_START_TYPE:
- $name = 'BLOCK_START_TYPE';
- break;
- case self::VAR_START_TYPE:
- $name = 'VAR_START_TYPE';
- break;
- case self::BLOCK_END_TYPE:
- $name = 'BLOCK_END_TYPE';
- break;
- case self::VAR_END_TYPE:
- $name = 'VAR_END_TYPE';
- break;
- case self::NAME_TYPE:
- $name = 'NAME_TYPE';
- break;
- case self::NUMBER_TYPE:
- $name = 'NUMBER_TYPE';
- break;
- case self::STRING_TYPE:
- $name = 'STRING_TYPE';
- break;
- case self::OPERATOR_TYPE:
- $name = 'OPERATOR_TYPE';
- break;
- case self::PUNCTUATION_TYPE:
- $name = 'PUNCTUATION_TYPE';
- break;
- case self::INTERPOLATION_START_TYPE:
- $name = 'INTERPOLATION_START_TYPE';
- break;
- case self::INTERPOLATION_END_TYPE:
- $name = 'INTERPOLATION_END_TYPE';
- break;
- case self::ARROW_TYPE:
- $name = 'ARROW_TYPE';
- break;
- case self::SPREAD_TYPE:
- $name = 'SPREAD_TYPE';
- break;
- default:
- throw new \LogicException(sprintf('Token of type "%s" does not exist.', $type));
- }
-
- return $short ? $name : 'Twig\Token::'.$name;
- }
-
- public static function typeToEnglish(int $type): string
- {
- switch ($type) {
- case self::EOF_TYPE:
- return 'end of template';
- case self::TEXT_TYPE:
- return 'text';
- case self::BLOCK_START_TYPE:
- return 'begin of statement block';
- case self::VAR_START_TYPE:
- return 'begin of print statement';
- case self::BLOCK_END_TYPE:
- return 'end of statement block';
- case self::VAR_END_TYPE:
- return 'end of print statement';
- case self::NAME_TYPE:
- return 'name';
- case self::NUMBER_TYPE:
- return 'number';
- case self::STRING_TYPE:
- return 'string';
- case self::OPERATOR_TYPE:
- return 'operator';
- case self::PUNCTUATION_TYPE:
- return 'punctuation';
- case self::INTERPOLATION_START_TYPE:
- return 'begin of string interpolation';
- case self::INTERPOLATION_END_TYPE:
- return 'end of string interpolation';
- case self::ARROW_TYPE:
- return 'arrow function';
- case self::SPREAD_TYPE:
- return 'spread operator';
- default:
- throw new \LogicException(sprintf('Token of type "%s" does not exist.', $type));
- }
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php b/system/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php
deleted file mode 100644
index 720ea67..0000000
--- a/system/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php
+++ /dev/null
@@ -1,32 +0,0 @@
-
- */
-abstract class AbstractTokenParser implements TokenParserInterface
-{
- /**
- * @var Parser
- */
- protected $parser;
-
- public function setParser(Parser $parser): void
- {
- $this->parser = $parser;
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php b/system/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php
deleted file mode 100644
index 4dbf304..0000000
--- a/system/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php
+++ /dev/null
@@ -1,60 +0,0 @@
-getLine();
- $name = $this->parser->getVarName();
-
- $ref = new TempNameExpression($name, $lineno);
- $ref->setAttribute('always_defined', true);
-
- $filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag());
-
- $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
- $body = $this->parser->subparse([$this, 'decideApplyEnd'], true);
- $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
-
- return new Node([
- new SetNode(true, $ref, $body, $lineno, $this->getTag()),
- new PrintNode($filter, $lineno, $this->getTag()),
- ]);
- }
-
- public function decideApplyEnd(Token $token): bool
- {
- return $token->test('endapply');
- }
-
- public function getTag(): string
- {
- return 'apply';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php b/system/vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php
deleted file mode 100644
index b674bea..0000000
--- a/system/vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php
+++ /dev/null
@@ -1,58 +0,0 @@
-getLine();
- $stream = $this->parser->getStream();
-
- if ($stream->test(/* Token::BLOCK_END_TYPE */ 3)) {
- $value = 'html';
- } else {
- $expr = $this->parser->getExpressionParser()->parseExpression();
- if (!$expr instanceof ConstantExpression) {
- throw new SyntaxError('An escaping strategy must be a string or false.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
- }
- $value = $expr->getAttribute('value');
- }
-
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
- $body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- return new AutoEscapeNode($value, $body, $lineno, $this->getTag());
- }
-
- public function decideBlockEnd(Token $token): bool
- {
- return $token->test('endautoescape');
- }
-
- public function getTag(): string
- {
- return 'autoescape';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/BlockTokenParser.php b/system/vendor/twig/twig/src/TokenParser/BlockTokenParser.php
deleted file mode 100644
index 5878131..0000000
--- a/system/vendor/twig/twig/src/TokenParser/BlockTokenParser.php
+++ /dev/null
@@ -1,78 +0,0 @@
-
- * {% block title %}{% endblock %} - My Webpage
- * {% endblock %}
- *
- * @internal
- */
-final class BlockTokenParser extends AbstractTokenParser
-{
- public function parse(Token $token): Node
- {
- $lineno = $token->getLine();
- $stream = $this->parser->getStream();
- $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue();
- if ($this->parser->hasBlock($name)) {
- throw new SyntaxError(sprintf("The block '%s' has already been defined line %d.", $name, $this->parser->getBlock($name)->getTemplateLine()), $stream->getCurrent()->getLine(), $stream->getSourceContext());
- }
- $this->parser->setBlock($name, $block = new BlockNode($name, new Node([]), $lineno));
- $this->parser->pushLocalScope();
- $this->parser->pushBlockStack($name);
-
- if ($stream->nextIf(/* Token::BLOCK_END_TYPE */ 3)) {
- $body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
- if ($token = $stream->nextIf(/* Token::NAME_TYPE */ 5)) {
- $value = $token->getValue();
-
- if ($value != $name) {
- throw new SyntaxError(sprintf('Expected endblock for block "%s" (but "%s" given).', $name, $value), $stream->getCurrent()->getLine(), $stream->getSourceContext());
- }
- }
- } else {
- $body = new Node([
- new PrintNode($this->parser->getExpressionParser()->parseExpression(), $lineno),
- ]);
- }
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- $block->setNode('body', $body);
- $this->parser->popBlockStack();
- $this->parser->popLocalScope();
-
- return new BlockReferenceNode($name, $lineno, $this->getTag());
- }
-
- public function decideBlockEnd(Token $token): bool
- {
- return $token->test('endblock');
- }
-
- public function getTag(): string
- {
- return 'block';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php b/system/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php
deleted file mode 100644
index 31416c7..0000000
--- a/system/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
- *
- * @internal
- */
-final class DeprecatedTokenParser extends AbstractTokenParser
-{
- public function parse(Token $token): Node
- {
- $expr = $this->parser->getExpressionParser()->parseExpression();
-
- $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
-
- return new DeprecatedNode($expr, $token->getLine(), $this->getTag());
- }
-
- public function getTag(): string
- {
- return 'deprecated';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/DoTokenParser.php b/system/vendor/twig/twig/src/TokenParser/DoTokenParser.php
deleted file mode 100644
index 32c8f12..0000000
--- a/system/vendor/twig/twig/src/TokenParser/DoTokenParser.php
+++ /dev/null
@@ -1,38 +0,0 @@
-parser->getExpressionParser()->parseExpression();
-
- $this->parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- return new DoNode($expr, $token->getLine(), $this->getTag());
- }
-
- public function getTag(): string
- {
- return 'do';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/EmbedTokenParser.php b/system/vendor/twig/twig/src/TokenParser/EmbedTokenParser.php
deleted file mode 100644
index 64b4f29..0000000
--- a/system/vendor/twig/twig/src/TokenParser/EmbedTokenParser.php
+++ /dev/null
@@ -1,73 +0,0 @@
-parser->getStream();
-
- $parent = $this->parser->getExpressionParser()->parseExpression();
-
- list($variables, $only, $ignoreMissing) = $this->parseArguments();
-
- $parentToken = $fakeParentToken = new Token(/* Token::STRING_TYPE */ 7, '__parent__', $token->getLine());
- if ($parent instanceof ConstantExpression) {
- $parentToken = new Token(/* Token::STRING_TYPE */ 7, $parent->getAttribute('value'), $token->getLine());
- } elseif ($parent instanceof NameExpression) {
- $parentToken = new Token(/* Token::NAME_TYPE */ 5, $parent->getAttribute('name'), $token->getLine());
- }
-
- // inject a fake parent to make the parent() function work
- $stream->injectTokens([
- new Token(/* Token::BLOCK_START_TYPE */ 1, '', $token->getLine()),
- new Token(/* Token::NAME_TYPE */ 5, 'extends', $token->getLine()),
- $parentToken,
- new Token(/* Token::BLOCK_END_TYPE */ 3, '', $token->getLine()),
- ]);
-
- $module = $this->parser->parse($stream, [$this, 'decideBlockEnd'], true);
-
- // override the parent with the correct one
- if ($fakeParentToken === $parentToken) {
- $module->setNode('parent', $parent);
- }
-
- $this->parser->embedTemplate($module);
-
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- return new EmbedNode($module->getTemplateName(), $module->getAttribute('index'), $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag());
- }
-
- public function decideBlockEnd(Token $token): bool
- {
- return $token->test('endembed');
- }
-
- public function getTag(): string
- {
- return 'embed';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php b/system/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php
deleted file mode 100644
index 0ca46dd..0000000
--- a/system/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php
+++ /dev/null
@@ -1,52 +0,0 @@
-parser->getStream();
-
- if ($this->parser->peekBlockStack()) {
- throw new SyntaxError('Cannot use "extend" in a block.', $token->getLine(), $stream->getSourceContext());
- } elseif (!$this->parser->isMainScope()) {
- throw new SyntaxError('Cannot use "extend" in a macro.', $token->getLine(), $stream->getSourceContext());
- }
-
- if (null !== $this->parser->getParent()) {
- throw new SyntaxError('Multiple extends tags are forbidden.', $token->getLine(), $stream->getSourceContext());
- }
- $this->parser->setParent($this->parser->getExpressionParser()->parseExpression());
-
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- return new Node();
- }
-
- public function getTag(): string
- {
- return 'extends';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/FlushTokenParser.php b/system/vendor/twig/twig/src/TokenParser/FlushTokenParser.php
deleted file mode 100644
index 02c74aa..0000000
--- a/system/vendor/twig/twig/src/TokenParser/FlushTokenParser.php
+++ /dev/null
@@ -1,38 +0,0 @@
-parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- return new FlushNode($token->getLine(), $this->getTag());
- }
-
- public function getTag(): string
- {
- return 'flush';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/ForTokenParser.php b/system/vendor/twig/twig/src/TokenParser/ForTokenParser.php
deleted file mode 100644
index bac8ba2..0000000
--- a/system/vendor/twig/twig/src/TokenParser/ForTokenParser.php
+++ /dev/null
@@ -1,78 +0,0 @@
-
- * {% for user in users %}
- * {{ user.username|e }}
- * {% endfor %}
- *
- *
- * @internal
- */
-final class ForTokenParser extends AbstractTokenParser
-{
- public function parse(Token $token): Node
- {
- $lineno = $token->getLine();
- $stream = $this->parser->getStream();
- $targets = $this->parser->getExpressionParser()->parseAssignmentExpression();
- $stream->expect(/* Token::OPERATOR_TYPE */ 8, 'in');
- $seq = $this->parser->getExpressionParser()->parseExpression();
-
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
- $body = $this->parser->subparse([$this, 'decideForFork']);
- if ('else' == $stream->next()->getValue()) {
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
- $else = $this->parser->subparse([$this, 'decideForEnd'], true);
- } else {
- $else = null;
- }
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- if (\count($targets) > 1) {
- $keyTarget = $targets->getNode(0);
- $keyTarget = new AssignNameExpression($keyTarget->getAttribute('name'), $keyTarget->getTemplateLine());
- $valueTarget = $targets->getNode(1);
- } else {
- $keyTarget = new AssignNameExpression('_key', $lineno);
- $valueTarget = $targets->getNode(0);
- }
- $valueTarget = new AssignNameExpression($valueTarget->getAttribute('name'), $valueTarget->getTemplateLine());
-
- return new ForNode($keyTarget, $valueTarget, $seq, null, $body, $else, $lineno, $this->getTag());
- }
-
- public function decideForFork(Token $token): bool
- {
- return $token->test(['else', 'endfor']);
- }
-
- public function decideForEnd(Token $token): bool
- {
- return $token->test('endfor');
- }
-
- public function getTag(): string
- {
- return 'for';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/FromTokenParser.php b/system/vendor/twig/twig/src/TokenParser/FromTokenParser.php
deleted file mode 100644
index 31b6cde..0000000
--- a/system/vendor/twig/twig/src/TokenParser/FromTokenParser.php
+++ /dev/null
@@ -1,66 +0,0 @@
-parser->getExpressionParser()->parseExpression();
- $stream = $this->parser->getStream();
- $stream->expect(/* Token::NAME_TYPE */ 5, 'import');
-
- $targets = [];
- while (true) {
- $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue();
-
- $alias = $name;
- if ($stream->nextIf('as')) {
- $alias = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue();
- }
-
- $targets[$name] = $alias;
-
- if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) {
- break;
- }
- }
-
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- $var = new AssignNameExpression($this->parser->getVarName(), $token->getLine());
- $node = new ImportNode($macro, $var, $token->getLine(), $this->getTag(), $this->parser->isMainScope());
-
- foreach ($targets as $name => $alias) {
- $this->parser->addImportedSymbol('function', $alias, 'macro_'.$name, $var);
- }
-
- return $node;
- }
-
- public function getTag(): string
- {
- return 'from';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/IfTokenParser.php b/system/vendor/twig/twig/src/TokenParser/IfTokenParser.php
deleted file mode 100644
index c0fe6df..0000000
--- a/system/vendor/twig/twig/src/TokenParser/IfTokenParser.php
+++ /dev/null
@@ -1,89 +0,0 @@
-
- * {% for user in users %}
- * {{ user.username|e }}
- * {% endfor %}
- *
- * {% endif %}
- *
- * @internal
- */
-final class IfTokenParser extends AbstractTokenParser
-{
- public function parse(Token $token): Node
- {
- $lineno = $token->getLine();
- $expr = $this->parser->getExpressionParser()->parseExpression();
- $stream = $this->parser->getStream();
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
- $body = $this->parser->subparse([$this, 'decideIfFork']);
- $tests = [$expr, $body];
- $else = null;
-
- $end = false;
- while (!$end) {
- switch ($stream->next()->getValue()) {
- case 'else':
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
- $else = $this->parser->subparse([$this, 'decideIfEnd']);
- break;
-
- case 'elseif':
- $expr = $this->parser->getExpressionParser()->parseExpression();
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
- $body = $this->parser->subparse([$this, 'decideIfFork']);
- $tests[] = $expr;
- $tests[] = $body;
- break;
-
- case 'endif':
- $end = true;
- break;
-
- default:
- throw new SyntaxError(sprintf('Unexpected end of template. Twig was looking for the following tags "else", "elseif", or "endif" to close the "if" block started at line %d).', $lineno), $stream->getCurrent()->getLine(), $stream->getSourceContext());
- }
- }
-
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- return new IfNode(new Node($tests), $else, $lineno, $this->getTag());
- }
-
- public function decideIfFork(Token $token): bool
- {
- return $token->test(['elseif', 'else', 'endif']);
- }
-
- public function decideIfEnd(Token $token): bool
- {
- return $token->test(['endif']);
- }
-
- public function getTag(): string
- {
- return 'if';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/ImportTokenParser.php b/system/vendor/twig/twig/src/TokenParser/ImportTokenParser.php
deleted file mode 100644
index 44cb4da..0000000
--- a/system/vendor/twig/twig/src/TokenParser/ImportTokenParser.php
+++ /dev/null
@@ -1,44 +0,0 @@
-parser->getExpressionParser()->parseExpression();
- $this->parser->getStream()->expect(/* Token::NAME_TYPE */ 5, 'as');
- $var = new AssignNameExpression($this->parser->getStream()->expect(/* Token::NAME_TYPE */ 5)->getValue(), $token->getLine());
- $this->parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- $this->parser->addImportedSymbol('template', $var->getAttribute('name'));
-
- return new ImportNode($macro, $var, $token->getLine(), $this->getTag(), $this->parser->isMainScope());
- }
-
- public function getTag(): string
- {
- return 'import';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php b/system/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php
deleted file mode 100644
index 28beb8a..0000000
--- a/system/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php
+++ /dev/null
@@ -1,69 +0,0 @@
-parser->getExpressionParser()->parseExpression();
-
- list($variables, $only, $ignoreMissing) = $this->parseArguments();
-
- return new IncludeNode($expr, $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag());
- }
-
- protected function parseArguments()
- {
- $stream = $this->parser->getStream();
-
- $ignoreMissing = false;
- if ($stream->nextIf(/* Token::NAME_TYPE */ 5, 'ignore')) {
- $stream->expect(/* Token::NAME_TYPE */ 5, 'missing');
-
- $ignoreMissing = true;
- }
-
- $variables = null;
- if ($stream->nextIf(/* Token::NAME_TYPE */ 5, 'with')) {
- $variables = $this->parser->getExpressionParser()->parseExpression();
- }
-
- $only = false;
- if ($stream->nextIf(/* Token::NAME_TYPE */ 5, 'only')) {
- $only = true;
- }
-
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- return [$variables, $only, $ignoreMissing];
- }
-
- public function getTag(): string
- {
- return 'include';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/MacroTokenParser.php b/system/vendor/twig/twig/src/TokenParser/MacroTokenParser.php
deleted file mode 100644
index f584927..0000000
--- a/system/vendor/twig/twig/src/TokenParser/MacroTokenParser.php
+++ /dev/null
@@ -1,66 +0,0 @@
-
- * {% endmacro %}
- *
- * @internal
- */
-final class MacroTokenParser extends AbstractTokenParser
-{
- public function parse(Token $token): Node
- {
- $lineno = $token->getLine();
- $stream = $this->parser->getStream();
- $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue();
-
- $arguments = $this->parser->getExpressionParser()->parseArguments(true, true);
-
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
- $this->parser->pushLocalScope();
- $body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
- if ($token = $stream->nextIf(/* Token::NAME_TYPE */ 5)) {
- $value = $token->getValue();
-
- if ($value != $name) {
- throw new SyntaxError(sprintf('Expected endmacro for macro "%s" (but "%s" given).', $name, $value), $stream->getCurrent()->getLine(), $stream->getSourceContext());
- }
- }
- $this->parser->popLocalScope();
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- $this->parser->setMacro($name, new MacroNode($name, new BodyNode([$body]), $arguments, $lineno, $this->getTag()));
-
- return new Node();
- }
-
- public function decideBlockEnd(Token $token): bool
- {
- return $token->test('endmacro');
- }
-
- public function getTag(): string
- {
- return 'macro';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/SandboxTokenParser.php b/system/vendor/twig/twig/src/TokenParser/SandboxTokenParser.php
deleted file mode 100644
index c919556..0000000
--- a/system/vendor/twig/twig/src/TokenParser/SandboxTokenParser.php
+++ /dev/null
@@ -1,66 +0,0 @@
-parser->getStream();
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
- $body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- // in a sandbox tag, only include tags are allowed
- if (!$body instanceof IncludeNode) {
- foreach ($body as $node) {
- if ($node instanceof TextNode && ctype_space($node->getAttribute('data'))) {
- continue;
- }
-
- if (!$node instanceof IncludeNode) {
- throw new SyntaxError('Only "include" tags are allowed within a "sandbox" section.', $node->getTemplateLine(), $stream->getSourceContext());
- }
- }
- }
-
- return new SandboxNode($body, $token->getLine(), $this->getTag());
- }
-
- public function decideBlockEnd(Token $token): bool
- {
- return $token->test('endsandbox');
- }
-
- public function getTag(): string
- {
- return 'sandbox';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/SetTokenParser.php b/system/vendor/twig/twig/src/TokenParser/SetTokenParser.php
deleted file mode 100644
index 2fbdfe0..0000000
--- a/system/vendor/twig/twig/src/TokenParser/SetTokenParser.php
+++ /dev/null
@@ -1,73 +0,0 @@
-getLine();
- $stream = $this->parser->getStream();
- $names = $this->parser->getExpressionParser()->parseAssignmentExpression();
-
- $capture = false;
- if ($stream->nextIf(/* Token::OPERATOR_TYPE */ 8, '=')) {
- $values = $this->parser->getExpressionParser()->parseMultitargetExpression();
-
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- if (\count($names) !== \count($values)) {
- throw new SyntaxError('When using set, you must have the same number of variables and assignments.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
- }
- } else {
- $capture = true;
-
- if (\count($names) > 1) {
- throw new SyntaxError('When using set with a block, you cannot have a multi-target.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
- }
-
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- $values = $this->parser->subparse([$this, 'decideBlockEnd'], true);
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
- }
-
- return new SetNode($capture, $names, $values, $lineno, $this->getTag());
- }
-
- public function decideBlockEnd(Token $token): bool
- {
- return $token->test('endset');
- }
-
- public function getTag(): string
- {
- return 'set';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/TokenParserInterface.php b/system/vendor/twig/twig/src/TokenParser/TokenParserInterface.php
deleted file mode 100644
index bb8db3e..0000000
--- a/system/vendor/twig/twig/src/TokenParser/TokenParserInterface.php
+++ /dev/null
@@ -1,46 +0,0 @@
-
- */
-interface TokenParserInterface
-{
- /**
- * Sets the parser associated with this token parser.
- */
- public function setParser(Parser $parser): void;
-
- /**
- * Parses a token and returns a node.
- *
- * @return Node
- *
- * @throws SyntaxError
- */
- public function parse(Token $token);
-
- /**
- * Gets the tag name associated with this token parser.
- *
- * @return string
- */
- public function getTag();
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/UseTokenParser.php b/system/vendor/twig/twig/src/TokenParser/UseTokenParser.php
deleted file mode 100644
index 3cdbb98..0000000
--- a/system/vendor/twig/twig/src/TokenParser/UseTokenParser.php
+++ /dev/null
@@ -1,73 +0,0 @@
-parser->getExpressionParser()->parseExpression();
- $stream = $this->parser->getStream();
-
- if (!$template instanceof ConstantExpression) {
- throw new SyntaxError('The template references in a "use" statement must be a string.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
- }
-
- $targets = [];
- if ($stream->nextIf('with')) {
- while (true) {
- $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue();
-
- $alias = $name;
- if ($stream->nextIf('as')) {
- $alias = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue();
- }
-
- $targets[$name] = new ConstantExpression($alias, -1);
-
- if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) {
- break;
- }
- }
- }
-
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- $this->parser->addTrait(new Node(['template' => $template, 'targets' => new Node($targets)]));
-
- return new Node();
- }
-
- public function getTag(): string
- {
- return 'use';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenParser/WithTokenParser.php b/system/vendor/twig/twig/src/TokenParser/WithTokenParser.php
deleted file mode 100644
index 7d8cbe2..0000000
--- a/system/vendor/twig/twig/src/TokenParser/WithTokenParser.php
+++ /dev/null
@@ -1,56 +0,0 @@
-
- *
- * @internal
- */
-final class WithTokenParser extends AbstractTokenParser
-{
- public function parse(Token $token): Node
- {
- $stream = $this->parser->getStream();
-
- $variables = null;
- $only = false;
- if (!$stream->test(/* Token::BLOCK_END_TYPE */ 3)) {
- $variables = $this->parser->getExpressionParser()->parseExpression();
- $only = (bool) $stream->nextIf(/* Token::NAME_TYPE */ 5, 'only');
- }
-
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- $body = $this->parser->subparse([$this, 'decideWithEnd'], true);
-
- $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
-
- return new WithNode($body, $variables, $only, $token->getLine(), $this->getTag());
- }
-
- public function decideWithEnd(Token $token): bool
- {
- return $token->test('endwith');
- }
-
- public function getTag(): string
- {
- return 'with';
- }
-}
diff --git a/system/vendor/twig/twig/src/TokenStream.php b/system/vendor/twig/twig/src/TokenStream.php
deleted file mode 100644
index 1eac11a..0000000
--- a/system/vendor/twig/twig/src/TokenStream.php
+++ /dev/null
@@ -1,132 +0,0 @@
-
- */
-final class TokenStream
-{
- private $tokens;
- private $current = 0;
- private $source;
-
- public function __construct(array $tokens, Source $source = null)
- {
- $this->tokens = $tokens;
- $this->source = $source ?: new Source('', '');
- }
-
- public function __toString()
- {
- return implode("\n", $this->tokens);
- }
-
- public function injectTokens(array $tokens)
- {
- $this->tokens = array_merge(\array_slice($this->tokens, 0, $this->current), $tokens, \array_slice($this->tokens, $this->current));
- }
-
- /**
- * Sets the pointer to the next token and returns the old one.
- */
- public function next(): Token
- {
- if (!isset($this->tokens[++$this->current])) {
- throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current - 1]->getLine(), $this->source);
- }
-
- return $this->tokens[$this->current - 1];
- }
-
- /**
- * Tests a token, sets the pointer to the next one and returns it or throws a syntax error.
- *
- * @return Token|null The next token if the condition is true, null otherwise
- */
- public function nextIf($primary, $secondary = null)
- {
- if ($this->tokens[$this->current]->test($primary, $secondary)) {
- return $this->next();
- }
- }
-
- /**
- * Tests a token and returns it or throws a syntax error.
- */
- public function expect($type, $value = null, string $message = null): Token
- {
- $token = $this->tokens[$this->current];
- if (!$token->test($type, $value)) {
- $line = $token->getLine();
- throw new SyntaxError(sprintf('%sUnexpected token "%s"%s ("%s" expected%s).',
- $message ? $message.'. ' : '',
- Token::typeToEnglish($token->getType()),
- $token->getValue() ? sprintf(' of value "%s"', $token->getValue()) : '',
- Token::typeToEnglish($type), $value ? sprintf(' with value "%s"', $value) : ''),
- $line,
- $this->source
- );
- }
- $this->next();
-
- return $token;
- }
-
- /**
- * Looks at the next token.
- */
- public function look(int $number = 1): Token
- {
- if (!isset($this->tokens[$this->current + $number])) {
- throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current + $number - 1]->getLine(), $this->source);
- }
-
- return $this->tokens[$this->current + $number];
- }
-
- /**
- * Tests the current token.
- */
- public function test($primary, $secondary = null): bool
- {
- return $this->tokens[$this->current]->test($primary, $secondary);
- }
-
- /**
- * Checks if end of stream was reached.
- */
- public function isEOF(): bool
- {
- return /* Token::EOF_TYPE */ -1 === $this->tokens[$this->current]->getType();
- }
-
- public function getCurrent(): Token
- {
- return $this->tokens[$this->current];
- }
-
- /**
- * Gets the source associated with this stream.
- *
- * @internal
- */
- public function getSourceContext(): Source
- {
- return $this->source;
- }
-}
diff --git a/system/vendor/twig/twig/src/TwigFilter.php b/system/vendor/twig/twig/src/TwigFilter.php
deleted file mode 100644
index 8993026..0000000
--- a/system/vendor/twig/twig/src/TwigFilter.php
+++ /dev/null
@@ -1,134 +0,0 @@
-
- *
- * @see https://twig.symfony.com/doc/templates.html#filters
- */
-final class TwigFilter
-{
- private $name;
- private $callable;
- private $options;
- private $arguments = [];
-
- /**
- * @param callable|array{class-string, string}|null $callable A callable implementing the filter. If null, you need to overwrite the "node_class" option to customize compilation.
- */
- public function __construct(string $name, $callable = null, array $options = [])
- {
- $this->name = $name;
- $this->callable = $callable;
- $this->options = array_merge([
- 'needs_environment' => false,
- 'needs_context' => false,
- 'is_variadic' => false,
- 'is_safe' => null,
- 'is_safe_callback' => null,
- 'pre_escape' => null,
- 'preserves_safety' => null,
- 'node_class' => FilterExpression::class,
- 'deprecated' => false,
- 'alternative' => null,
- ], $options);
- }
-
- public function getName(): string
- {
- return $this->name;
- }
-
- /**
- * Returns the callable to execute for this filter.
- *
- * @return callable|array{class-string, string}|null
- */
- public function getCallable()
- {
- return $this->callable;
- }
-
- public function getNodeClass(): string
- {
- return $this->options['node_class'];
- }
-
- public function setArguments(array $arguments): void
- {
- $this->arguments = $arguments;
- }
-
- public function getArguments(): array
- {
- return $this->arguments;
- }
-
- public function needsEnvironment(): bool
- {
- return $this->options['needs_environment'];
- }
-
- public function needsContext(): bool
- {
- return $this->options['needs_context'];
- }
-
- public function getSafe(Node $filterArgs): ?array
- {
- if (null !== $this->options['is_safe']) {
- return $this->options['is_safe'];
- }
-
- if (null !== $this->options['is_safe_callback']) {
- return $this->options['is_safe_callback']($filterArgs);
- }
-
- return null;
- }
-
- public function getPreservesSafety(): ?array
- {
- return $this->options['preserves_safety'];
- }
-
- public function getPreEscape(): ?string
- {
- return $this->options['pre_escape'];
- }
-
- public function isVariadic(): bool
- {
- return $this->options['is_variadic'];
- }
-
- public function isDeprecated(): bool
- {
- return (bool) $this->options['deprecated'];
- }
-
- public function getDeprecatedVersion(): string
- {
- return \is_bool($this->options['deprecated']) ? '' : $this->options['deprecated'];
- }
-
- public function getAlternative(): ?string
- {
- return $this->options['alternative'];
- }
-}
diff --git a/system/vendor/twig/twig/src/TwigFunction.php b/system/vendor/twig/twig/src/TwigFunction.php
deleted file mode 100644
index d910d1f..0000000
--- a/system/vendor/twig/twig/src/TwigFunction.php
+++ /dev/null
@@ -1,122 +0,0 @@
-
- *
- * @see https://twig.symfony.com/doc/templates.html#functions
- */
-final class TwigFunction
-{
- private $name;
- private $callable;
- private $options;
- private $arguments = [];
-
- /**
- * @param callable|array{class-string, string}|null $callable A callable implementing the function. If null, you need to overwrite the "node_class" option to customize compilation.
- */
- public function __construct(string $name, $callable = null, array $options = [])
- {
- $this->name = $name;
- $this->callable = $callable;
- $this->options = array_merge([
- 'needs_environment' => false,
- 'needs_context' => false,
- 'is_variadic' => false,
- 'is_safe' => null,
- 'is_safe_callback' => null,
- 'node_class' => FunctionExpression::class,
- 'deprecated' => false,
- 'alternative' => null,
- ], $options);
- }
-
- public function getName(): string
- {
- return $this->name;
- }
-
- /**
- * Returns the callable to execute for this function.
- *
- * @return callable|array{class-string, string}|null
- */
- public function getCallable()
- {
- return $this->callable;
- }
-
- public function getNodeClass(): string
- {
- return $this->options['node_class'];
- }
-
- public function setArguments(array $arguments): void
- {
- $this->arguments = $arguments;
- }
-
- public function getArguments(): array
- {
- return $this->arguments;
- }
-
- public function needsEnvironment(): bool
- {
- return $this->options['needs_environment'];
- }
-
- public function needsContext(): bool
- {
- return $this->options['needs_context'];
- }
-
- public function getSafe(Node $functionArgs): ?array
- {
- if (null !== $this->options['is_safe']) {
- return $this->options['is_safe'];
- }
-
- if (null !== $this->options['is_safe_callback']) {
- return $this->options['is_safe_callback']($functionArgs);
- }
-
- return [];
- }
-
- public function isVariadic(): bool
- {
- return (bool) $this->options['is_variadic'];
- }
-
- public function isDeprecated(): bool
- {
- return (bool) $this->options['deprecated'];
- }
-
- public function getDeprecatedVersion(): string
- {
- return \is_bool($this->options['deprecated']) ? '' : $this->options['deprecated'];
- }
-
- public function getAlternative(): ?string
- {
- return $this->options['alternative'];
- }
-}
diff --git a/system/vendor/twig/twig/src/TwigTest.php b/system/vendor/twig/twig/src/TwigTest.php
deleted file mode 100644
index 3769ec1..0000000
--- a/system/vendor/twig/twig/src/TwigTest.php
+++ /dev/null
@@ -1,100 +0,0 @@
-
- *
- * @see https://twig.symfony.com/doc/templates.html#test-operator
- */
-final class TwigTest
-{
- private $name;
- private $callable;
- private $options;
- private $arguments = [];
-
- /**
- * @param callable|array{class-string, string}|null $callable A callable implementing the test. If null, you need to overwrite the "node_class" option to customize compilation.
- */
- public function __construct(string $name, $callable = null, array $options = [])
- {
- $this->name = $name;
- $this->callable = $callable;
- $this->options = array_merge([
- 'is_variadic' => false,
- 'node_class' => TestExpression::class,
- 'deprecated' => false,
- 'alternative' => null,
- 'one_mandatory_argument' => false,
- ], $options);
- }
-
- public function getName(): string
- {
- return $this->name;
- }
-
- /**
- * Returns the callable to execute for this test.
- *
- * @return callable|array{class-string, string}|null
- */
- public function getCallable()
- {
- return $this->callable;
- }
-
- public function getNodeClass(): string
- {
- return $this->options['node_class'];
- }
-
- public function setArguments(array $arguments): void
- {
- $this->arguments = $arguments;
- }
-
- public function getArguments(): array
- {
- return $this->arguments;
- }
-
- public function isVariadic(): bool
- {
- return (bool) $this->options['is_variadic'];
- }
-
- public function isDeprecated(): bool
- {
- return (bool) $this->options['deprecated'];
- }
-
- public function getDeprecatedVersion(): string
- {
- return \is_bool($this->options['deprecated']) ? '' : $this->options['deprecated'];
- }
-
- public function getAlternative(): ?string
- {
- return $this->options['alternative'];
- }
-
- public function hasOneMandatoryArgument(): bool
- {
- return (bool) $this->options['one_mandatory_argument'];
- }
-}
diff --git a/system/vendor/twig/twig/src/Util/DeprecationCollector.php b/system/vendor/twig/twig/src/Util/DeprecationCollector.php
deleted file mode 100644
index 378b666..0000000
--- a/system/vendor/twig/twig/src/Util/DeprecationCollector.php
+++ /dev/null
@@ -1,77 +0,0 @@
-
- */
-final class DeprecationCollector
-{
- private $twig;
-
- public function __construct(Environment $twig)
- {
- $this->twig = $twig;
- }
-
- /**
- * Returns deprecations for templates contained in a directory.
- *
- * @param string $dir A directory where templates are stored
- * @param string $ext Limit the loaded templates by extension
- *
- * @return array An array of deprecations
- */
- public function collectDir(string $dir, string $ext = '.twig'): array
- {
- $iterator = new \RegexIterator(
- new \RecursiveIteratorIterator(
- new \RecursiveDirectoryIterator($dir), \RecursiveIteratorIterator::LEAVES_ONLY
- ), '{'.preg_quote($ext).'$}'
- );
-
- return $this->collect(new TemplateDirIterator($iterator));
- }
-
- /**
- * Returns deprecations for passed templates.
- *
- * @param \Traversable $iterator An iterator of templates (where keys are template names and values the contents of the template)
- *
- * @return array An array of deprecations
- */
- public function collect(\Traversable $iterator): array
- {
- $deprecations = [];
- set_error_handler(function ($type, $msg) use (&$deprecations) {
- if (\E_USER_DEPRECATED === $type) {
- $deprecations[] = $msg;
- }
- });
-
- foreach ($iterator as $name => $contents) {
- try {
- $this->twig->parse($this->twig->tokenize(new Source($contents, $name)));
- } catch (SyntaxError $e) {
- // ignore templates containing syntax errors
- }
- }
-
- restore_error_handler();
-
- return $deprecations;
- }
-}
diff --git a/system/vendor/twig/twig/src/Util/TemplateDirIterator.php b/system/vendor/twig/twig/src/Util/TemplateDirIterator.php
deleted file mode 100644
index 3bef14b..0000000
--- a/system/vendor/twig/twig/src/Util/TemplateDirIterator.php
+++ /dev/null
@@ -1,36 +0,0 @@
-
- */
-class TemplateDirIterator extends \IteratorIterator
-{
- /**
- * @return mixed
- */
- #[\ReturnTypeWillChange]
- public function current()
- {
- return file_get_contents(parent::current());
- }
-
- /**
- * @return mixed
- */
- #[\ReturnTypeWillChange]
- public function key()
- {
- return (string) parent::key();
- }
-}
diff --git a/system/vendor/vlucas/valitron b/system/vendor/vlucas/valitron
deleted file mode 160000
index fadce39..0000000
--- a/system/vendor/vlucas/valitron
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit fadce39f5f235755bb9794b2573af2d5bfcba85f