diff --git a/Neos.Fusion/Classes/Core/Cache/ParserCache.php b/Neos.Fusion/Classes/Core/Cache/ParserCache.php index 0e83c20def2..86e760bec2d 100644 --- a/Neos.Fusion/Classes/Core/Cache/ParserCache.php +++ b/Neos.Fusion/Classes/Core/Cache/ParserCache.php @@ -61,7 +61,12 @@ public function cacheForFusionFile(?string $contextPathAndFilename, \Closure $ge if (str_contains($contextPathAndFilename, 'nodetypes://')) { $contextPathAndFilename = $this->getAbsolutePathForNodeTypesUri($contextPathAndFilename); } - $identifier = $this->getCacheIdentifierForFile($contextPathAndFilename); + $fusionFileRealPath = realpath($contextPathAndFilename); + if ($fusionFileRealPath === false) { + // should not happen as the file would not been able to be read in the first place. + throw new \RuntimeException("Couldn't resolve realpath for: '$contextPathAndFilename'", 1705409467); + } + $identifier = $this->getCacheIdentifierForAbsoluteUnixStyleFilePathWithoutDirectoryTraversal($fusionFileRealPath); return $this->cacheForIdentifier($identifier, $generateValueToCache); } @@ -76,11 +81,16 @@ public function cacheForDsl(string $identifier, string $code, \Closure $generate private function cacheForIdentifier(string $identifier, \Closure $generateValueToCache): mixed { - if ($this->parsePartialsCache->has($identifier)) { - return $this->parsePartialsCache->get($identifier); + $value = $this->parsePartialsCache->get($identifier); + if ($value !== false) { + return $value; } $value = $generateValueToCache(); - $this->parsePartialsCache->set($identifier, $value); + if ($value !== false) { + // in the rare edge-case of a fusion dsl returning `false` we cannot cache it, + // as the above get would be ignored. This is an acceptable compromise. + $this->parsePartialsCache->set($identifier, $value); + } return $value; } diff --git a/Neos.Fusion/Classes/Core/Cache/ParserCacheFlusher.php b/Neos.Fusion/Classes/Core/Cache/ParserCacheFlusher.php index 9d02094ebd0..04a4b0c13ac 100644 --- a/Neos.Fusion/Classes/Core/Cache/ParserCacheFlusher.php +++ b/Neos.Fusion/Classes/Core/Cache/ParserCacheFlusher.php @@ -50,7 +50,10 @@ public function flushPartialCacheOnFileChanges($fileMonitorIdentifier, array $ch $identifiersToFlush = []; foreach ($changedFiles as $changedFile => $status) { - $identifiersToFlush[] = $this->getCacheIdentifierForFile($changedFile); + // flow already returns absolute file paths from the file monitor, so we don't have to call realpath. + // attempting to use realpath can even result in an error as the file might be removed and thus no realpath can be resolved via file system. + // https://github.com/neos/neos-development-collection/pull/4509 + $identifiersToFlush[] = $this->getCacheIdentifierForAbsoluteUnixStyleFilePathWithoutDirectoryTraversal($changedFile); } if ($identifiersToFlush !== []) { diff --git a/Neos.Fusion/Classes/Core/Cache/ParserCacheIdentifierTrait.php b/Neos.Fusion/Classes/Core/Cache/ParserCacheIdentifierTrait.php index 86fcf9d6a0a..23fd8a76b36 100644 --- a/Neos.Fusion/Classes/Core/Cache/ParserCacheIdentifierTrait.php +++ b/Neos.Fusion/Classes/Core/Cache/ParserCacheIdentifierTrait.php @@ -19,7 +19,7 @@ trait ParserCacheIdentifierTrait { /** - * creates a comparable hash of the dsl type and content to be used as cache identifier + * Creates a comparable hash of the dsl type and content to be used as cache identifier */ private function getCacheIdentifierForDslCode(string $identifier, string $code): string { @@ -27,18 +27,24 @@ private function getCacheIdentifierForDslCode(string $identifier, string $code): } /** - * creates a comparable hash of the absolute, resolved $fusionFileName + * Creates a comparable hash of the absolute-unix-style-file-path-without-directory-traversal * - * @throws \InvalidArgumentException + * something like + * - /Users/marc/Code/neos-project/Packages/Neos + * + * its crucial that the path + * - is absolute + * - the path separator is in unix style: forward-slash / + * - doesn't contain directory traversal /../ or /./ + * + * to be absolutely sure the path matches the criteria, {@see realpath} can be used. + * + * if the path does not match the criteria, a different hash as expected will be generated and caching will break. */ - private function getCacheIdentifierForFile(string $fusionFileName): string - { - $realPath = realpath($fusionFileName); - if ($realPath === false) { - throw new \InvalidArgumentException("Couldn't resolve realpath for: '$fusionFileName'"); - } - - $realFusionFilePathWithoutRoot = str_replace(FLOW_PATH_ROOT, '', $realPath); - return 'file_' . md5($realFusionFilePathWithoutRoot); + private function getCacheIdentifierForAbsoluteUnixStyleFilePathWithoutDirectoryTraversal( + string $absoluteUnixStyleFilePathWithoutDirectoryTraversal + ): string { + $filePathWithoutRoot = str_replace(FLOW_PATH_ROOT, '', $absoluteUnixStyleFilePathWithoutDirectoryTraversal); + return 'file_' . md5($filePathWithoutRoot); } } diff --git a/Neos.Fusion/Classes/Core/ObjectTreeParser/ExceptionMessage/MessageLinePart.php b/Neos.Fusion/Classes/Core/ObjectTreeParser/ExceptionMessage/MessageLinePart.php index 26907f82676..10bbed5a31a 100644 --- a/Neos.Fusion/Classes/Core/ObjectTreeParser/ExceptionMessage/MessageLinePart.php +++ b/Neos.Fusion/Classes/Core/ObjectTreeParser/ExceptionMessage/MessageLinePart.php @@ -37,10 +37,11 @@ public function linePrint(int $offset = 0): string public function char(int $index = 0): string { - if ($index < 0) { - return mb_substr($this->linePart, $index, 1); + if ($index < 0 && mb_strlen($this->linePart) < abs($index)) { + // prevent mb_substr returning first char if out of bounds + return ''; } - return mb_substr($this->linePart, $index, $index + 1); + return mb_substr($this->linePart, $index, 1); } public function charPrint(int $index = 0): string diff --git a/Neos.Fusion/Classes/Core/ObjectTreeParser/Lexer.php b/Neos.Fusion/Classes/Core/ObjectTreeParser/Lexer.php index 063922e2935..38bd9bea985 100644 --- a/Neos.Fusion/Classes/Core/ObjectTreeParser/Lexer.php +++ b/Neos.Fusion/Classes/Core/ObjectTreeParser/Lexer.php @@ -44,12 +44,14 @@ class Lexer Token::MULTILINE_COMMENT => <<<'REGEX' `^ /\* # start of a comment '/*' - [^*]* # match everything until special case '*' + [^*]* # consume until special case '*' + \*+ # consume all '*' (?: - \*[^/] # if after the '*' there is a '/' break, else continue - [^*]* # until the special case '*' is encountered - unrolled loop following Jeffrey Friedl + [^/] # break if its the end: '/' + [^*]* # unrolled loop following Jeffrey E.F. Friedl + \*+ )* - \*/ # the end of a comment. + / # the end of a comment. `x REGEX, diff --git a/Neos.Fusion/Tests/Unit/Core/Fixtures/ParserTestFusionComments01.fusion b/Neos.Fusion/Tests/Unit/Core/Fixtures/ParserTestFusionComments01.fusion index 50831893170..d5067e395d9 100644 --- a/Neos.Fusion/Tests/Unit/Core/Fixtures/ParserTestFusionComments01.fusion +++ b/Neos.Fusion/Tests/Unit/Core/Fixtures/ParserTestFusionComments01.fusion @@ -57,7 +57,17 @@ comment with // ane more comment Here comes some comment with # and /* and // in it */ +/** + * php doc style comment + */ +/*** +comment with multiple stars uneven +***/ -// another edge-case mentioned in NEOS-864 +/** +comment with multiple stars even +**/ + +// another edge-case mentioned in NEOS-864 (no new line at the end) #include: Pages/**/*.fusion \ No newline at end of file diff --git a/Neos.Fusion/Tests/Unit/Core/Parser/ParserExceptionTest.php b/Neos.Fusion/Tests/Unit/Core/Parser/ParserExceptionTest.php index ecd3494aea8..e1ad9f9376d 100644 --- a/Neos.Fusion/Tests/Unit/Core/Parser/ParserExceptionTest.php +++ b/Neos.Fusion/Tests/Unit/Core/Parser/ParserExceptionTest.php @@ -11,6 +11,7 @@ * source code. */ +use Neos\Fusion\Core\ObjectTreeParser\ExceptionMessage\MessageLinePart; use Neos\Fusion\Core\Parser; use Neos\Fusion\Core\Cache\ParserCache; use Neos\Fusion\Core\ObjectTreeParser\Exception\ParserException; @@ -195,6 +196,11 @@ public function unclosedStatements(): \Generator 'Unclosed comment.' ]; + yield 'unclosed multiline comment with multiple stars' => [ + '/***', + 'Unclosed comment.' + ]; + yield 'unclosed eel expression' => [ 'a = ${', 'Unclosed eel expression.' @@ -286,4 +292,26 @@ public function itMatchesThePartialExceptionMessage($fusion, $expectedMessage): self::assertSame($expectedMessage, $e->getHelperMessagePart()); } } + + /** + * @test + */ + public function messageLinePartWorks() + { + $part = new MessageLinePart('abcd'); + + self::assertSame('', $part->char(-5)); + self::assertSame('a', $part->char(-4)); + self::assertSame('b', $part->char(-3)); + self::assertSame('c', $part->char(-2)); + self::assertSame('d', $part->char(-1)); + self::assertSame('a', $part->char()); + self::assertSame('a', $part->char(0)); + self::assertSame('b', $part->char(1)); + self::assertSame('c', $part->char(2)); + self::assertSame('d', $part->char(3)); + self::assertSame('', $part->char(4)); + self::assertSame('abcd', $part->line()); + self::assertSame('bcd', $part->line(1)); + } } diff --git a/Neos.Media.Browser/Resources/Private/Templates/Asset/Edit.html b/Neos.Media.Browser/Resources/Private/Templates/Asset/Edit.html index 06ec12fa5d7..fc7edbcaf03 100644 --- a/Neos.Media.Browser/Resources/Private/Templates/Asset/Edit.html +++ b/Neos.Media.Browser/Resources/Private/Templates/Asset/Edit.html @@ -57,14 +57,16 @@

{neos:backend.translate(id: 'connectionError', package: 'Neos.Media.Browser' - - - - - - + + + + + + + +
{neos:backend.translate(id: 'metadata', package: 'Neos.Media.Browser')} diff --git a/Neos.Neos/Classes/Controller/Backend/MenuHelper.php b/Neos.Neos/Classes/Controller/Backend/MenuHelper.php index 779337503c1..54694d6f28c 100644 --- a/Neos.Neos/Classes/Controller/Backend/MenuHelper.php +++ b/Neos.Neos/Classes/Controller/Backend/MenuHelper.php @@ -11,13 +11,16 @@ * source code. */ +use Neos\ContentRepository\Domain\Factory\NodeFactory; +use Neos\ContentRepository\Domain\Repository\NodeDataRepository; +use Neos\ContentRepository\Domain\Repository\WorkspaceRepository; +use Neos\ContentRepository\Domain\Utility\NodePaths; use Neos\ContentRepository\Security\Authorization\Privilege\Node\NodePrivilegeSubject; use Neos\Flow\Annotations as Flow; use Neos\Flow\Http\Exception; use Neos\Flow\Mvc\Controller\ControllerContext; use Neos\Flow\Mvc\Routing\Exception\MissingActionNameException; use Neos\Flow\Security\Authorization\PrivilegeManagerInterface; -use Neos\Neos\Domain\Service\ContentContextFactory; use Neos\Neos\Domain\Service\SiteService; use Neos\Neos\Security\Authorization\Privilege\ModulePrivilege; use Neos\Neos\Security\Authorization\Privilege\ModulePrivilegeSubject; @@ -65,9 +68,21 @@ class MenuHelper /** * @Flow\Inject - * @var ContentContextFactory + * @var WorkspaceRepository */ - protected $contextFactory; + protected $workspaceRepository; + + /** + * @Flow\Inject + * @var NodeDataRepository + */ + protected $nodeDataRepository; + + /** + * @Flow\Inject + * @var NodeFactory + */ + protected $nodeFactory; /** * @param array $settings @@ -93,38 +108,57 @@ public function buildSiteList(ControllerContext $controllerContext): array return []; } - $context = $this->contextFactory->create(); + $liveWorkspace = $this->workspaceRepository->findByIdentifier('live'); + $domainsFound = false; $sites = []; foreach ($this->siteRepository->findOnline() as $site) { - $node = $context->getNode(\Neos\ContentRepository\Domain\Utility\NodePaths::addNodePathSegment(SiteService::SITES_ROOT_PATH, $site->getNodeName())); - if ($this->privilegeManager->isGranted(NodeTreePrivilege::class, new NodePrivilegeSubject($node))) { - $uri = null; - $active = false; - /** @var $site Site */ - if ($site->hasActiveDomains()) { - $activeHostPatterns = $site->getActiveDomains()->map(static function ($domain) { - return $domain->getHostname(); - })->toArray(); - - $active = in_array($requestUriHost, $activeHostPatterns, true); - - if ($active) { - $uri = $contentModule['uri']; - } else { - $uri = $controllerContext->getUriBuilder()->reset()->uriFor('switchSite', ['site' => $site], 'Backend\Backend', 'Neos.Neos'); - } + $granted = false; + + $siteNodePath = NodePaths::addNodePathSegment(SiteService::SITES_ROOT_PATH, $site->getNodeName()); + $siteNodesInAllDimensions = $this->nodeDataRepository->findByPathWithoutReduce($siteNodePath, $liveWorkspace); - $domainsFound = true; + foreach ($siteNodesInAllDimensions as $siteNodeData) { + $siteNodeContext = $this->nodeFactory->createContextMatchingNodeData($siteNodeData); + $siteNode = $this->nodeFactory->createFromNodeData($siteNodeData, $siteNodeContext); + + // if the node exists, check if the user is granted access to this node + if ($this->privilegeManager->isGranted(NodeTreePrivilege::class, new NodePrivilegeSubject($siteNode))) { + $granted = true; + break; + } + } + + // if no siteNode is accessible ignore this site + if (!$granted) { + continue; + } + + $uri = null; + $active = false; + /** @var $site Site */ + if ($site->hasActiveDomains()) { + $activeHostPatterns = $site->getActiveDomains()->map(static function ($domain) { + return $domain->getHostname(); + })->toArray(); + + $active = in_array($requestUriHost, $activeHostPatterns, true); + + if ($active) { + $uri = $contentModule['uri']; + } else { + $uri = $controllerContext->getUriBuilder()->reset()->uriFor('switchSite', ['site' => $site], 'Backend\Backend', 'Neos.Neos'); } - $sites[] = [ - 'name' => $site->getName(), - 'nodeName' => $site->getNodeName(), - 'uri' => $uri, - 'active' => $active - ]; + $domainsFound = true; } + + $sites[] = [ + 'name' => $site->getName(), + 'nodeName' => $site->getNodeName(), + 'uri' => $uri, + 'active' => $active + ]; } if ($domainsFound === false) { diff --git a/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php b/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php index d0aeeae4dc3..b348c160394 100644 --- a/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php +++ b/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php @@ -470,16 +470,18 @@ protected function computeChangesCount(Workspace $selectedWorkspace) { $changesCount = ['new' => 0, 'changed' => 0, 'removed' => 0, 'total' => 0]; foreach ($this->computeSiteChanges($selectedWorkspace) as $siteChanges) { - foreach ($siteChanges['documents'] as $documentChanges) { - foreach ($documentChanges['changes'] as $change) { - if ($change['node']->isRemoved()) { - $changesCount['removed']++; - } elseif ($change['isNew']) { - $changesCount['new']++; - } else { - $changesCount['changed']++; - }; - $changesCount['total']++; + foreach ($siteChanges['documents'] as $dimensions) { + foreach ($dimensions as $documentChanges) { + foreach ($documentChanges['changes'] as $change) { + if ($change['node']->isRemoved()) { + $changesCount['removed']++; + } elseif ($change['isNew']) { + $changesCount['new']++; + } else { + $changesCount['changed']++; + }; + $changesCount['total']++; + } } } } @@ -509,11 +511,15 @@ protected function computeSiteChanges(Workspace $selectedWorkspace) // $document will be null if we have a broken root line for this node. This actually should never happen, but currently can in some scenarios. if ($document !== null) { $documentPath = implode('/', array_slice(explode('/', $document->getPath()), 3)); + + $dimensionValues = $document->getDimensions(); + $documentDimension = Utility::sortDimensionValueArrayAndReturnDimensionsHash($dimensionValues); + $relativePath = str_replace(sprintf(SiteService::SITES_ROOT_PATH . '/%s/%s', $siteNodeName, $documentPath), '', $node->getPath()); if (!isset($siteChanges[$siteNodeName]['siteNode'])) { $siteChanges[$siteNodeName]['siteNode'] = $this->siteRepository->findOneByNodeName($siteNodeName); } - $siteChanges[$siteNodeName]['documents'][$documentPath]['documentNode'] = $document; + $siteChanges[$siteNodeName]['documents'][$documentDimension][$documentPath]['documentNode'] = $document; $change = [ 'node' => $node, @@ -522,7 +528,7 @@ protected function computeSiteChanges(Workspace $selectedWorkspace) if ($node->getNodeType()->isOfType('Neos.Neos:Node')) { $change['configuration'] = $node->getNodeType()->getFullConfiguration(); } - $siteChanges[$siteNodeName]['documents'][$documentPath]['changes'][$relativePath] = $change; + $siteChanges[$siteNodeName]['documents'][$documentDimension][$documentPath]['changes'][$relativePath] = $change; } } } @@ -534,17 +540,21 @@ protected function computeSiteChanges(Workspace $selectedWorkspace) ksort($siteChanges); foreach ($siteChanges as $siteKey => $site) { - foreach ($site['documents'] as $documentKey => $document) { - $liveDocumentNode = $liveContext->getNodeByIdentifier($document['documentNode']->getIdentifier()); - $siteChanges[$siteKey]['documents'][$documentKey]['isMoved'] = $liveDocumentNode && $document['documentNode']->getPath() !== $liveDocumentNode->getPath(); - $siteChanges[$siteKey]['documents'][$documentKey]['isNew'] = $liveDocumentNode === null; - foreach ($document['changes'] as $changeKey => $change) { - $liveNode = $liveContext->getNodeByIdentifier($change['node']->getIdentifier()); - $siteChanges[$siteKey]['documents'][$documentKey]['changes'][$changeKey]['isNew'] = is_null($liveNode); - $siteChanges[$siteKey]['documents'][$documentKey]['changes'][$changeKey]['isMoved'] = $liveNode && $change['node']->getPath() !== $liveNode->getPath(); + foreach ($site['documents'] as $documentDimension => $documentsPerDimension) { + foreach ($documentsPerDimension as $documentKey => $document) { + $liveDocumentNode = $liveContext->getNodeByIdentifier($document['documentNode']->getIdentifier()); + $siteChanges[$siteKey]['documents'][$documentDimension][$documentKey]['isMoved'] = $liveDocumentNode && $document['documentNode']->getPath() !== $liveDocumentNode->getPath(); + $siteChanges[$siteKey]['documents'][$documentDimension][$documentKey]['isNew'] = $liveDocumentNode === null; + foreach ($document['changes'] as $changeKey => $change) { + $liveNode = $liveContext->getNodeByIdentifier($change['node']->getIdentifier()); + $siteChanges[$siteKey]['documents'][$documentDimension][$documentKey]['changes'][$changeKey]['isNew'] = is_null($liveNode); + $siteChanges[$siteKey]['documents'][$documentDimension][$documentKey]['changes'][$changeKey]['isMoved'] = $liveNode && $change['node']->getPath() !== $liveNode->getPath(); + } } } - ksort($siteChanges[$siteKey]['documents']); + foreach ($siteChanges[$siteKey]['documents'] as $key => $document) { + ksort($siteChanges[$siteKey]['documents'][$key]); + } } return $siteChanges; } diff --git a/Neos.Neos/Documentation/Appendixes/ChangeLogs/7319.rst b/Neos.Neos/Documentation/Appendixes/ChangeLogs/7319.rst new file mode 100644 index 00000000000..711577afdc8 --- /dev/null +++ b/Neos.Neos/Documentation/Appendixes/ChangeLogs/7319.rst @@ -0,0 +1,57 @@ +`7.3.19 (2024-01-15) `_ +================================================================================================ + +Overview of merged pull requests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`BUGFIX: Check SVG files for malicious code before providing original asset url links `_ +------------------------------------------------------------------------------------------------------------------------------------------------------- + +This adds a check in the preview of assets in the media module and checks for malicous content in svgs. If detected, the direct links to the original url get removed from the preview pages and a warning is shown. + +!`image `_ + +Fixes https://github.com/neos/flow-development-collection/issues/3248 + +* Packages: ``Neos`` ``Media.Browser`` + +`BUGFIX: Resolve StyleCI issues `_ +------------------------------------------------------------------------------------------------- + + + +* Packages: ``Neos`` ``Fusion`` + +`BUGFIX: node:repair fails with could not be converted to string `_ +---------------------------------------------------------------------------------------------------------------------------------- + +Fixes the following crash during node:repair + +```shell +./flow node:repair --dry-run --only removeBrokenEntityReferences +Dry run, not committing any changes. + +Checking for broken entity references ... +Object of class Neos\\Flow\\Persistence\\Doctrine\\Proxies\\__CG__\\Neos\\Media\\Domain\\Model\\ImageVariant could not be converted to string + + Type: Error + File: Data/Temporary/Development/SubContextWbWeb/Cache/Code/Flow_Object_Classes/Neos_ContentRepository_Command_NodeCommandControllerPlugin.php + Line: 836 +``` + +resolved `#4794 `_ + +**Upgrade instructions** + +- [x] Code follows the PSR-2 coding style +- ~~Tests have been created, run and adjusted as needed~~ + - There are not tests in place and I added none. +- [x] The PR is created against the `lowest maintained branch `_ -> 7.3 +- [ ] Reviewer - PR Title is brief but complete and starts with ``FEATURE|TASK|BUGFIX`` +- [ ] Reviewer - The first section explains the change briefly for change-logs +- [ ] Reviewer - Breaking Changes are marked with ``!!!`` and have upgrade-instructions + +* Packages: ``Neos`` ``ContentRepository`` + +`Detailed log `_ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/Neos.Neos/Documentation/Appendixes/ChangeLogs/8016.rst b/Neos.Neos/Documentation/Appendixes/ChangeLogs/8016.rst new file mode 100644 index 00000000000..ac20265320a --- /dev/null +++ b/Neos.Neos/Documentation/Appendixes/ChangeLogs/8016.rst @@ -0,0 +1,82 @@ +`8.0.16 (2024-01-15) `_ +================================================================================================ + +Overview of merged pull requests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`BUGFIX: More precise selection of the DomNode with CSFR token `_ +-------------------------------------------------------------------------------------------------------------------------------- + +To prevent issues with selecting the wrong CSFR Token in the DOM, we now have a more precise selection of the DomNode with the CSFR token. + +fixes: `#4822 `_ + +**Review instructions** + +Install a version before 1.0.1 of the `Shel.Neos.WorkspaceModule `_ +and go to the user management module to impersonate a user. Then switch to the Workspace module and try to restore the original user. Without this patch, it should fail. With version 1.0.1 it will not fail btw. + + +* Packages: ``Media.Browser`` ``Neos`` + +`BUGFIX: Check SVG files for malicious code before providing original asset url links `_ +------------------------------------------------------------------------------------------------------------------------------------------------------- + +This adds a check in the preview of assets in the media module and checks for malicous content in svgs. If detected, the direct links to the original url get removed from the preview pages and a warning is shown. + +!`image `_ + +Fixes https://github.com/neos/flow-development-collection/issues/3248 + +* Packages: ``Neos`` ``Media.Browser`` + +`BUGFIX: Resolve StyleCI issues `_ +------------------------------------------------------------------------------------------------- + + + +* Packages: ``Neos`` ``Fusion`` + +`BUGFIX: node:repair fails with could not be converted to string `_ +---------------------------------------------------------------------------------------------------------------------------------- + +Fixes the following crash during node:repair + +```shell +./flow node:repair --dry-run --only removeBrokenEntityReferences +Dry run, not committing any changes. + +Checking for broken entity references ... +Object of class Neos\\Flow\\Persistence\\Doctrine\\Proxies\\__CG__\\Neos\\Media\\Domain\\Model\\ImageVariant could not be converted to string + + Type: Error + File: Data/Temporary/Development/SubContextWbWeb/Cache/Code/Flow_Object_Classes/Neos_ContentRepository_Command_NodeCommandControllerPlugin.php + Line: 836 +``` + +resolved `#4794 `_ + +**Upgrade instructions** + +- [x] Code follows the PSR-2 coding style +- ~~Tests have been created, run and adjusted as needed~~ + - There are not tests in place and I added none. +- [x] The PR is created against the `lowest maintained branch `_ -> 7.3 +- [ ] Reviewer - PR Title is brief but complete and starts with ``FEATURE|TASK|BUGFIX`` +- [ ] Reviewer - The first section explains the change briefly for change-logs +- [ ] Reviewer - Breaking Changes are marked with ``!!!`` and have upgrade-instructions + +* Packages: ``Neos`` ``ContentRepository`` + +`TASK: Removes neos/neos-setup `_ +------------------------------------------------------------------------------------------------ + +**Summary:** +When attempting to install Neos version 8.3 using the command ``composer create-project neos/neos-development-distribution neos-development 8.3.x-dev --keep-vcs``, the installation results in the neos-setup (version 1.x) being installed. The ``neos/cli-setup`` tool has been removed and the default command ``./flow welcome`` is still called. But the command is no longer available due to the absence of the CLI setup tool. Consequently, the setup process is not possible as the recommended command is missing. + +We remove the dependency from the development collection and adds the ``neos/neos-setup`` in the latest version to the `neos-development-distribution `_ + +* Packages: ``Neos`` + +`Detailed log `_ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/Neos.Neos/Documentation/Appendixes/ChangeLogs/8111.rst b/Neos.Neos/Documentation/Appendixes/ChangeLogs/8111.rst new file mode 100644 index 00000000000..42a6a42b9b0 --- /dev/null +++ b/Neos.Neos/Documentation/Appendixes/ChangeLogs/8111.rst @@ -0,0 +1,67 @@ +`8.1.11 (2024-01-15) `_ +================================================================================================ + +Overview of merged pull requests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`BUGFIX: Check SVG files for malicious code before providing original asset url links `_ +------------------------------------------------------------------------------------------------------------------------------------------------------- + +This adds a check in the preview of assets in the media module and checks for malicous content in svgs. If detected, the direct links to the original url get removed from the preview pages and a warning is shown. + +!`image `_ + +Fixes https://github.com/neos/flow-development-collection/issues/3248 + +* Packages: ``Neos`` ``Media.Browser`` + +`BUGFIX: Resolve StyleCI issues `_ +------------------------------------------------------------------------------------------------- + + + +* Packages: ``Neos`` ``Fusion`` + +`BUGFIX: node:repair fails with could not be converted to string `_ +---------------------------------------------------------------------------------------------------------------------------------- + +Fixes the following crash during node:repair + +```shell +./flow node:repair --dry-run --only removeBrokenEntityReferences +Dry run, not committing any changes. + +Checking for broken entity references ... +Object of class Neos\\Flow\\Persistence\\Doctrine\\Proxies\\__CG__\\Neos\\Media\\Domain\\Model\\ImageVariant could not be converted to string + + Type: Error + File: Data/Temporary/Development/SubContextWbWeb/Cache/Code/Flow_Object_Classes/Neos_ContentRepository_Command_NodeCommandControllerPlugin.php + Line: 836 +``` + +resolved `#4794 `_ + +**Upgrade instructions** + +- [x] Code follows the PSR-2 coding style +- ~~Tests have been created, run and adjusted as needed~~ + - There are not tests in place and I added none. +- [x] The PR is created against the `lowest maintained branch `_ -> 7.3 +- [ ] Reviewer - PR Title is brief but complete and starts with ``FEATURE|TASK|BUGFIX`` +- [ ] Reviewer - The first section explains the change briefly for change-logs +- [ ] Reviewer - Breaking Changes are marked with ``!!!`` and have upgrade-instructions + +* Packages: ``Neos`` ``ContentRepository`` + +`TASK: Removes neos/neos-setup `_ +------------------------------------------------------------------------------------------------ + +**Summary:** +When attempting to install Neos version 8.3 using the command ``composer create-project neos/neos-development-distribution neos-development 8.3.x-dev --keep-vcs``, the installation results in the neos-setup (version 1.x) being installed. The ``neos/cli-setup`` tool has been removed and the default command ``./flow welcome`` is still called. But the command is no longer available due to the absence of the CLI setup tool. Consequently, the setup process is not possible as the recommended command is missing. + +We remove the dependency from the development collection and adds the ``neos/neos-setup`` in the latest version to the `neos-development-distribution `_ + +* Packages: ``Neos`` + +`Detailed log `_ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/Neos.Neos/Resources/Private/Partials/Backend/UserMenu.html b/Neos.Neos/Resources/Private/Partials/Backend/UserMenu.html index b66b6a2225d..ec7c3b21842 100644 --- a/Neos.Neos/Resources/Private/Partials/Backend/UserMenu.html +++ b/Neos.Neos/Resources/Private/Partials/Backend/UserMenu.html @@ -1,5 +1,5 @@ {namespace neos=Neos\Neos\ViewHelpers} -
+
diff --git a/Neos.Neos/Resources/Private/Templates/Module/Management/Workspaces/Show.html b/Neos.Neos/Resources/Private/Templates/Module/Management/Workspaces/Show.html index 3b303471118..10161f0220f 100644 --- a/Neos.Neos/Resources/Private/Templates/Module/Management/Workspaces/Show.html +++ b/Neos.Neos/Resources/Private/Templates/Module/Management/Workspaces/Show.html @@ -15,31 +15,32 @@
- - - - - + + + + + - - - - - - + + + + - - - - - - - + + + - + + + + @@ -119,54 +121,54 @@ diff --git a/Neos.Neos/Resources/Public/JavaScript/Components/TopBar/UserMenu.js b/Neos.Neos/Resources/Public/JavaScript/Components/TopBar/UserMenu.js index c9d0da20b82..9e441601751 100644 --- a/Neos.Neos/Resources/Public/JavaScript/Components/TopBar/UserMenu.js +++ b/Neos.Neos/Resources/Public/JavaScript/Components/TopBar/UserMenu.js @@ -2,21 +2,35 @@ import { isNil } from '../../Helper' import {ApiService} from '../../Services' import { RestoreButton } from '../../Templates/RestoreButton' -const BASE_PATH = '/neos/impersonate/' export default class UserMenu { constructor(_root) { - const csfrTokenField = document.querySelector('[data-csrf-token]') - this._csrfToken = !isNil(csfrTokenField) - ? csfrTokenField.getAttribute('data-csrf-token') - : '' + const userMenuElement = document.querySelector('.neos-user-menu[data-csrf-token]') + this._csrfToken = isNil(userMenuElement) ? '' : userMenuElement.getAttribute('data-csrf-token') + this._baseModuleUri = this._getBaseModuleUri(userMenuElement) + this._basePath = this._getImpersonationBasePath() this._root = _root - this._apiService = new ApiService(BASE_PATH, this._csrfToken) + this._apiService = new ApiService(this._basePath, this._csrfToken) if (!isNil(_root)) { this._checkImpersonateStatus() } } + _getBaseModuleUri(element) { + let url = '/neos' + if (!isNil(element) && element.hasAttribute('data-module-basepath')) { + url = element.getAttribute('data-module-basepath') + } + return url + } + + _getImpersonationBasePath() { + let basePath = this._baseModuleUri + if (!basePath.endsWith('/')) { + basePath += '/' + } + return basePath + 'impersonate/' + } _renderRestoreButton(user) { const userMenuDropDown = this._root.querySelector('.neos-dropdown-menu') if (isNil(userMenuDropDown) || isNil(user)) { @@ -64,7 +78,7 @@ export default class UserMenu { const response = this._apiService.callRestore() response .then((data) => { - const { origin, impersonate, status } = data + const { origin, impersonate } = data const message = window.NeosCMS.I18n.translate( 'impersonate.success.restoreUser', 'Switched back from {0} to the orginal user {1}.', @@ -79,7 +93,7 @@ export default class UserMenu { // load default backend, so we don't need to care for the module permissions. // because in not every neos version the users have by default the content module or user module - window.location.pathname = '/neos' + window.location.href = this._baseModuleUri }) .catch(function (error) { if (window.NeosCMS) { diff --git a/Neos.Neos/Resources/Public/JavaScript/Main.min.js b/Neos.Neos/Resources/Public/JavaScript/Main.min.js index cd4a0326ce5..702636b4bc8 100644 --- a/Neos.Neos/Resources/Public/JavaScript/Main.min.js +++ b/Neos.Neos/Resources/Public/JavaScript/Main.min.js @@ -1,3 +1,3 @@ /*! For license information please see Main.min.js.LICENSE.txt */ -(()=>{var e={148:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>UserMenu});var o=r(586),i=r(514);class UserMenu{constructor(e){const n=document.querySelector("[data-csrf-token]");this._csrfToken=(0,o.isNil)(n)?"":n.getAttribute("data-csrf-token"),this._root=e,this._apiService=new i.sM("/neos/impersonate/",this._csrfToken),(0,o.isNil)(e)||this._checkImpersonateStatus()}_renderRestoreButton(e){const n=this._root.querySelector(".neos-dropdown-menu");if((0,o.isNil)(n)||(0,o.isNil)(e))return!1;const r=document.createElement("li");r.innerHTML=(e=>{const n={class:"neos-button restore-user"};let r="";Object.keys(n).forEach((e=>{r+=`${e}="${n[e]}" `}));const i=(0,o.isNil)(window.NeosCMS)?window.NeosCMS.I18n.translate("impersonate.label.restoreUserButton",'Back to user "{0}"',"Neos.Neos","Main",e.accountIdentifier):`Restore user "${e.accountIdentifier}"`;return``})(e),n.appendChild(r);const i=n.querySelector(".restore-user");(0,o.isNil)(i)||i.addEventListener("click",this._restoreUser.bind(this))}_checkImpersonateStatus(){this._apiService.callStatus().then((e=>{const{origin:n,status:r}=e;r&&!(0,o.isNil)(n)&&this._renderRestoreButton(n)})).catch((function(e){}))}_restoreUser(e){e.preventDefault();const n=e.currentTarget;if((0,o.isNil)(n))return!1;this._apiService.callRestore().then((e=>{const{origin:n,impersonate:r,status:o}=e,i=window.NeosCMS.I18n.translate("impersonate.success.restoreUser","Switched back from {0} to the orginal user {1}.","Neos.Neos","Main",{0:r.accountIdentifier,1:n.accountIdentifier});window.NeosCMS.Notification.ok(i),window.location.pathname="/neos"})).catch((function(e){if(window.NeosCMS){const e=window.NeosCMS.I18n.translate("impersonate.error.restoreUser","Could not switch back to the original user.","Neos.Neos");window.NeosCMS.Notification.error(e)}}))}}},791:(e,n,r)=>{"use strict";r.r(n),r.d(n,{loadStorageData:()=>loadStorageData,saveStorageData:()=>saveStorageData});var o=r(586);const i="persistedState",getStorage=()=>{const e=localStorage.getItem(i),n=JSON.parse(e);return(0,o.isNil)(n)?{}:n},loadStorageData=e=>{const n=getStorage();return(0,o.getCollectionValueByPath)(n,e)},saveStorageData=(e,n)=>{const r=getStorage(),a=(0,o.createCollectionByPath)(r,e,n);(0,o.isNil)(a)||localStorage.setItem(i,JSON.stringify(a))}},449:(e,n,r)=>{"use strict";r.d(n,{Z:()=>o});const o={getItem:e=>{try{return JSON.parse(window.sessionStorage.getItem(e))}catch(e){return}},setItem:(e,n)=>{try{window.sessionStorage.setItem(e,JSON.stringify(n))}catch(r){window.sessionStorage.clear(),window.sessionStorage.setItem(e,JSON.stringify(n))}},removeItem:e=>{window.sessionStorage.removeItem(e)}}},514:(e,n,r)=>{"use strict";r.d(n,{sM:()=>ApiService,VK:()=>a,Wt:()=>P,WH:()=>O,P_:()=>u});var o=r(586);const i=!(0,o.isNil)(window.NeosCMS?.Configuration),a={init:()=>{(0,o.isNil)(window.NeosCMS)&&(window.NeosCMS={}),(0,o.isNil)(window.NeosCMS.Configuration)&&(window.NeosCMS.Configuration={});const e=document.querySelector('link[rel="neos-xliff"]');(0,o.isNil)(e)||(window.NeosCMS.Configuration.XliffUri=e.getAttribute("href"))},get:e=>i?(0,o.getCollectionValueByPath)(window.NeosCMS.Configuration,e):null,override:(e,n)=>{i&&e in window.NeosCMS.Configuration&&(window.NeosCMS.Configuration[e]=n)}};var s=r(944),l=r.n(s);const c=["ok","info","notice","warning","error"],_renderNotification=(e,n,r,o)=>{const i={title:e,message:n,...o};c.includes(r)&&(i.type=r),l().create(i)},ok=e=>{_renderNotification(e,"","ok")},info=e=>{_renderNotification(e,"","info")},notice=e=>{_renderNotification(e,"","notice")},warning=(e,n)=>{_renderNotification(e,n,"warning",{timeout:0,closeButton:!0})},error=(e,n)=>{_renderNotification(e,n,"error",{timeout:0,closeButton:!0})},clear=()=>{l().removeAll()},Notification_init=()=>{(0,o.isNil)(window.NeosCMS)&&(window.NeosCMS={}),(0,o.isNil)(window.NeosCMS.Notification)&&(window.NeosCMS.Notification={init:Notification_init,ok,info,notice,warning,error,clear});Array.from(document.querySelectorAll("#neos-notifications-inline li")).forEach((e=>{const n=e.getAttribute("data-type"),r=e.textContent;window.NeosCMS.Notification[n](r,"")}))},u={init:Notification_init,ok,info,notice,warning,error,clear};function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _toPropertyKey(e){var n=function _toPrimitive(e,n){if("object"!==_typeof(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===_typeof(n)?n:String(n)}function _defineProperty(e,n,r){return(n=_toPropertyKey(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function _objectSpread(e){for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,Logger),this.init(e,n)}return _createClass(Logger,[{key:"init",value:function init(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||d,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function setDebug(e){this.debug=e}},{key:"log",value:function log(){for(var e=arguments.length,n=new Array(e),r=0;r1?n-1:0),o=1;o-1?e.replace(/###/g,"."):e}function canNotTraverseDeeper(){return!e||"string"==typeof e}for(var o="string"!=typeof n?[].concat(n):n.split(".");o.length>1;){if(canNotTraverseDeeper())return{};var i=cleanKey(o.shift());!e[i]&&r&&(e[i]=new r),e=Object.prototype.hasOwnProperty.call(e,i)?e[i]:{}}return canNotTraverseDeeper()?{}:{obj:e,k:cleanKey(o.shift())}}function setPath(e,n,r){var o=getLastOfPath(e,n,Object);o.obj[o.k]=r}function getPath(e,n){var r=getLastOfPath(e,n),o=r.obj,i=r.k;if(o)return o[i]}function getPathWithDefaults(e,n,r){var o=getPath(e,r);return void 0!==o?o:getPath(n,r)}function deepExtend(e,n,r){for(var o in n)"__proto__"!==o&&"constructor"!==o&&(o in e?"string"==typeof e[o]||e[o]instanceof String||"string"==typeof n[o]||n[o]instanceof String?r&&(e[o]=n[o]):deepExtend(e[o],n[o],r):e[o]=n[o]);return e}function regexEscape(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var h={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function i18next_escape(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return h[e]})):e}var g="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,m=function(e){function ResourceStore(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return _classCallCheck(this,ResourceStore),n=_possibleConstructorReturn(this,_getPrototypeOf(ResourceStore).call(this)),g&&f.call(_assertThisInitialized(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return _inherits(ResourceStore,e),_createClass(ResourceStore,[{key:"addNamespaces",value:function addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function removeNamespaces(e){var n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function getResource(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=[e,n];return r&&"string"!=typeof r&&(a=a.concat(r)),r&&"string"==typeof r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split(".")),getPath(this.data,a)}},{key:"addResource",value:function addResource(e,n,r,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var s=[e,n];r&&(s=s.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(o=n,n=(s=e.split("."))[1]),this.addNamespaces(n),setPath(this.data,s,o),i.silent||this.emit("added",e,n,r,o)}},{key:"addResources",value:function addResources(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,n,i,r[i],{silent:!0});o.silent||this.emit("added",e,n,r)}},{key:"addResourceBundle",value:function addResourceBundle(e,n,r,o,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,n];e.indexOf(".")>-1&&(o=r,r=n,n=(s=e.split("."))[1]),this.addNamespaces(n);var l=getPath(this.data,s)||{};o?deepExtend(l,r,i):l=_objectSpread({},l,r),setPath(this.data,s,l),a.silent||this.emit("added",e,n,r)}},{key:"removeResourceBundle",value:function removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}},{key:"hasResourceBundle",value:function hasResourceBundle(e,n){return void 0!==this.getResource(e,n)}},{key:"getResourceBundle",value:function getResourceBundle(e,n){return n||(n=this.options.defaultNS),"v1"===this.options.compatibilityAPI?_objectSpread({},{},this.getResource(e,n)):this.getResource(e,n)}},{key:"getDataByLanguage",value:function getDataByLanguage(e){return this.data[e]}},{key:"toJSON",value:function toJSON(){return this.data}}]),ResourceStore}(f),y={processors:{},addPostProcessor:function addPostProcessor(e){this.processors[e.name]=e},handle:function handle(e,n,r,o,i){var a=this;return e.forEach((function(e){a.processors[e]&&(n=a.processors[e].process(n,r,o,i))})),n}},v={},b=function(e){function Translator(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _classCallCheck(this,Translator),n=_possibleConstructorReturn(this,_getPrototypeOf(Translator).call(this)),g&&f.call(_assertThisInitialized(n)),function copy(e,n,r){e.forEach((function(e){n[e]&&(r[e]=n[e])}))}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,_assertThisInitialized(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=p.create("translator"),n}return _inherits(Translator,e),_createClass(Translator,[{key:"changeLanguage",value:function changeLanguage(e){e&&(this.language=e)}},{key:"exists",value:function exists(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,n);return r&&void 0!==r.res}},{key:"extractFromKey",value:function extractFromKey(e,n){var r=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=n.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:i};var s=e.split(r);(r!==o||r===o&&this.options.ns.indexOf(s[0])>-1)&&(i=s.shift()),e=s.join(o)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function translate(e,n,r){var o=this;if("object"!==_typeof(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],n),s=a.key,l=a.namespaces,c=l[l.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(d){var p=n.nsSeparator||this.options.nsSeparator;return c+p+s}return s}var f=this.resolve(e,n),h=f&&f.res,g=f&&f.usedKey||s,m=f&&f.exactUsedKey||s,y=Object.prototype.toString.apply(h),v=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&h&&("string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(y)<0&&("string"!=typeof v||"[object Array]"!==y)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,h,n):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(i){var x="[object Array]"===y,w=x?[]:{},S=x?m:g;for(var T in h)if(Object.prototype.hasOwnProperty.call(h,T)){var k="".concat(S).concat(i).concat(T);w[T]=this.translate(k,_objectSpread({},n,{joinArrays:!1,ns:l})),w[T]===k&&(w[T]=h[T])}h=w}}else if(b&&"string"==typeof v&&"[object Array]"===y)(h=h.join(v))&&(h=this.extendTranslation(h,e,n,r));else{var C=!1,N=!1,E=void 0!==n.count&&"string"!=typeof n.count,A=Translator.hasDefaultValue(n),L=E?this.pluralResolver.getSuffix(u,n.count):"",O=n["defaultValue".concat(L)]||n.defaultValue;!this.isValidLookup(h)&&A&&(C=!0,h=O),this.isValidLookup(h)||(N=!0,h=s);var P=A&&O!==h&&this.options.updateMissing;if(N||C||P){if(this.logger.log(P?"updateKey":"missingKey",u,c,s,P?O:h),i){var D=this.resolve(s,_objectSpread({},n,{keySeparator:!1}));D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var j=[],M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&M&&M[0])for(var R=0;R1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!s.isValidLookup(n)){var c=s.extractFromKey(e,l),u=c.key;r=u;var d=c.namespaces;s.options.fallbackNS&&(d=d.concat(s.options.fallbackNS));var p=void 0!==l.count&&"string"!=typeof l.count,f=void 0!==l.context&&"string"==typeof l.context&&""!==l.context,h=l.lngs?l.lngs:s.languageUtils.toResolveHierarchy(l.lng||s.language,l.fallbackLng);d.forEach((function(e){s.isValidLookup(n)||(a=e,!v["".concat(h[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(a)&&(v["".concat(h[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(r,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((function(r){if(!s.isValidLookup(n)){i=r;var a,c,d=u,h=[d];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(h,u,r,e,l);else p&&(a=s.pluralResolver.getSuffix(r,l.count)),p&&f&&h.push(d+a),f&&h.push(d+="".concat(s.options.contextSeparator).concat(l.context)),p&&h.push(d+=a);for(;c=h.pop();)s.isValidLookup(n)||(o=c,n=s.getResource(r,e,c,l))}})))}))}})),{res:n,usedKey:r,exactUsedKey:o,usedLng:i,usedNS:a}}},{key:"isValidLookup",value:function isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function getResource(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,r,o):this.resourceStore.getResource(e,n,r,o)}}],[{key:"hasDefaultValue",value:function hasDefaultValue(e){var n="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,12)&&void 0!==e[r])return!0;return!1}}]),Translator}(f);function capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}var x=function(){function LanguageUtil(e){_classCallCheck(this,LanguageUtil),this.options=e,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=p.create("languageUtils")}return _createClass(LanguageUtil,[{key:"getScriptPartFromCode",value:function getScriptPartFromCode(e){if(!e||e.indexOf("-")<0)return null;var n=e.split("-");return 2===n.length?null:(n.pop(),"x"===n[n.length-1].toLowerCase()?null:this.formatLanguageCode(n.join("-")))}},{key:"getLanguagePartFromCode",value:function getLanguagePartFromCode(e){if(!e||e.indexOf("-")<0)return e;var n=e.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=capitalize(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=capitalize(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=capitalize(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function isWhitelisted(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function getBestMatchFromCodes(e){var n,r=this;return e?(e.forEach((function(e){if(!n){var o=r.formatLanguageCode(e);r.options.supportedLngs&&!r.isSupportedCode(o)||(n=o)}})),!n&&this.options.supportedLngs&&e.forEach((function(e){if(!n){var o=r.getLanguagePartFromCode(e);if(r.isSupportedCode(o))return n=o;n=r.options.supportedLngs.find((function(e){if(0===e.indexOf(o))return e}))}})),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n):null}},{key:"getFallbackCodes",value:function getFallbackCodes(e,n){if(!e)return[];if("function"==typeof e&&(e=e(n)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!n)return e.default||[];var r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function toResolveHierarchy(e,n){var r=this,o=this.getFallbackCodes(n||this.options.fallbackLng||[],e),i=[],a=function addCode(e){e&&(r.isSupportedCode(e)?i.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):"string"==typeof e&&a(this.formatLanguageCode(e)),o.forEach((function(e){i.indexOf(e)<0&&a(r.formatLanguageCode(e))})),i}}]),LanguageUtil}(),w=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],S={1:function _(e){return Number(e>1)},2:function _(e){return Number(1!=e)},3:function _(e){return 0},4:function _(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function _(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function _(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function _(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function _(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function _(e){return Number(e>=2)},10:function _(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function _(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function _(e){return Number(e%10!=1||e%100==11)},13:function _(e){return Number(0!==e)},14:function _(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function _(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function _(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function _(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function _(e){return Number(0==e?0:1==e?1:2)},19:function _(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function _(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function _(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function _(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};var T=function(){function PluralResolver(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,PluralResolver),this.languageUtils=e,this.options=n,this.logger=p.create("pluralResolver"),this.rules=function createRules(){var e={};return w.forEach((function(n){n.lngs.forEach((function(r){e[r]={numbers:n.nr,plurals:S[n.fc]}}))})),e}()}return _createClass(PluralResolver,[{key:"addRule",value:function addRule(e,n){this.rules[e]=n}},{key:"getRule",value:function getRule(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function needsPlural(e){var n=this.getRule(e);return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function getPluralFormsOfKey(e,n){return this.getSuffixes(e).map((function(e){return n+e}))}},{key:"getSuffixes",value:function getSuffixes(e){var n=this,r=this.getRule(e);return r?r.numbers.map((function(r){return n.getSuffix(e,r)})):[]}},{key:"getSuffix",value:function getSuffix(e,n){var r=this,o=this.getRule(e);if(o){var i=o.noAbs?o.plurals(n):o.plurals(Math.abs(n)),a=o.numbers[i];this.options.simplifyPluralSuffix&&2===o.numbers.length&&1===o.numbers[0]&&(2===a?a="plural":1===a&&(a=""));var s=function returnSuffix(){return r.options.prepend&&a.toString()?r.options.prepend+a.toString():a.toString()};return"v1"===this.options.compatibilityJSON?1===a?"":"number"==typeof a?"_plural_".concat(a.toString()):s():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===o.numbers.length&&1===o.numbers[0]?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),PluralResolver}(),k=function(){function Interpolator(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,Interpolator),this.logger=p.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(e){return e},this.init(e)}return _createClass(Interpolator,[{key:"init",value:function init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var n=e.interpolation;this.escape=void 0!==n.escape?n.escape:i18next_escape,this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.useRawValueToEscape=void 0!==n.useRawValueToEscape&&n.useRawValueToEscape,this.prefix=n.prefix?regexEscape(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?regexEscape(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?regexEscape(n.nestingPrefix):n.nestingPrefixEscaped||regexEscape("$t("),this.nestingSuffix=n.nestingSuffix?regexEscape(n.nestingSuffix):n.nestingSuffixEscaped||regexEscape(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=void 0!==n.alwaysFormat&&n.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function reset(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function resetRegExp(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function interpolate(e,n,r,o){var i,a,s,l=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function regexSafe(e){return e.replace(/\$/g,"$$$$")}var u=function handleFormat(e){if(e.indexOf(l.formatSeparator)<0){var i=getPathWithDefaults(n,c,e);return l.alwaysFormat?l.format(i,void 0,r):i}var a=e.split(l.formatSeparator),s=a.shift().trim(),u=a.join(l.formatSeparator).trim();return l.format(getPathWithDefaults(n,c,s),u,r,o)};this.resetRegExp();var d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,p=o&&o.interpolation&&o.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function safeValue(e){return regexSafe(e)}},{regex:this.regexp,safeValue:function safeValue(e){return l.escapeValue?regexSafe(l.escape(e)):regexSafe(e)}}].forEach((function(n){for(s=0;i=n.regex.exec(e);){if(void 0===(a=u(i[1].trim())))if("function"==typeof d){var r=d(e,i,o);a="string"==typeof r?r:""}else{if(p){a=i[0];continue}l.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),a=""}else"string"==typeof a||l.useRawValueToEscape||(a=makeString(a));if(e=e.replace(i[0],n.safeValue(a)),n.regex.lastIndex=0,++s>=l.maxReplaces)break}})),e}},{key:"nest",value:function nest(e,n){var r,o,i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=_objectSpread({},a);function handleHasOptions(e,n){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var o=e.split(new RegExp("".concat(r,"[ ]*{"))),i="{".concat(o[1]);e=o[0],i=(i=this.interpolate(i,s)).replace(/'/g,'"');try{s=JSON.parse(i),n&&(s=_objectSpread({},n,s))}catch(n){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),n),"".concat(e).concat(r).concat(i)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;r=this.nestingRegexp.exec(e);){var l=[],c=!1;if(r[0].includes(this.formatSeparator)&&!/{.*}/.test(r[1])){var u=r[1].split(this.formatSeparator).map((function(e){return e.trim()}));r[1]=u.shift(),l=u,c=!0}if((o=n(handleHasOptions.call(this,r[1].trim(),s),s))&&r[0]===e&&"string"!=typeof o)return o;"string"!=typeof o&&(o=makeString(o)),o||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),o=""),c&&(o=l.reduce((function(e,n){return i.format(e,n,a.lng,a)}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}]),Interpolator}();var C=function(e){function Connector(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return _classCallCheck(this,Connector),o=_possibleConstructorReturn(this,_getPrototypeOf(Connector).call(this)),g&&f.call(_assertThisInitialized(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=p.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return _inherits(Connector,e),_createClass(Connector,[{key:"queueLoad",value:function queueLoad(e,n,r,o){var i=this,a=[],s=[],l=[],c=[];return e.forEach((function(e){var o=!0;n.forEach((function(n){var l="".concat(e,"|").concat(n);!r.reload&&i.store.hasResourceBundle(e,n)?i.state[l]=2:i.state[l]<0||(1===i.state[l]?s.indexOf(l)<0&&s.push(l):(i.state[l]=1,o=!1,s.indexOf(l)<0&&s.push(l),a.indexOf(l)<0&&a.push(l),c.indexOf(n)<0&&c.push(n)))})),o||l.push(e)})),(a.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:o}),{toLoad:a,pending:s,toLoadLanguages:l,toLoadNamespaces:c}}},{key:"loaded",value:function loaded(e,n,r){var o=e.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),r&&this.store.addResourceBundle(i,a,r),this.state[e]=n?-1:2;var loaded={};this.queue.forEach((function(r){!function pushPath(e,n,r,o){var i=getLastOfPath(e,n,Object),a=i.obj,s=i.k;a[s]=a[s]||[],o&&(a[s]=a[s].concat(r)),o||a[s].push(r)}(r.loaded,[i],a),function remove(e,n){for(var r=e.indexOf(n);-1!==r;)e.splice(r,1),r=e.indexOf(n)}(r.pending,e),n&&r.errors.push(n),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){loaded[e]||(loaded[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(n){loaded[e].indexOf(n)<0&&loaded[e].push(n)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",loaded),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function read(e,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,n,(function(l,c){l&&c&&i<5?setTimeout((function(){o.read.call(o,e,n,r,i+1,2*a,s)}),a):s(l,c)})):s(null,{})}},{key:"prepareLoading",value:function prepareLoading(e,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof n&&(n=[n]);var a=this.queueLoad(e,n,o,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function load(e,n,r){this.prepareLoading(e,n,{},r)}},{key:"reload",value:function reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}},{key:"loadOne",value:function loadOne(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=e.split("|"),i=o[0],a=o[1];this.read(i,a,"read",void 0,void 0,(function(o,s){o&&n.logger.warn("".concat(r,"loading namespace ").concat(a," for language ").concat(i," failed"),o),!o&&s&&n.logger.log("".concat(r,"loaded namespace ").concat(a," for language ").concat(i),s),n.loaded(e,o,s)}))}},{key:"saveMissing",value:function saveMissing(e,n,r,o,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(n,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(e,n,r,o,null,_objectSpread({},a,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],n,r,o))}}]),Connector}(f);function transformOptions(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function noop(){}const N=new(function(e){function I18n(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(_classCallCheck(this,I18n),e=_possibleConstructorReturn(this,_getPrototypeOf(I18n).call(this)),g&&f.call(_assertThisInitialized(e)),e.options=transformOptions(n),e.services={},e.logger=p,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),_possibleConstructorReturn(e,_assertThisInitialized(e));setTimeout((function(){e.init(n,r)}),0)}return e}return _inherits(I18n,e),_createClass(I18n,[{key:"init",value:function init(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function createClassOnDemand(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof n&&(r=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=_objectSpread({},function i18next_get(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function handle(e){var n={};if("object"===_typeof(e[1])&&(n=e[1]),"string"==typeof e[1]&&(n.defaultValue=e[1]),"string"==typeof e[2]&&(n.tDescription=e[2]),"object"===_typeof(e[2])||"object"===_typeof(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){n[e]=r[e]}))}return n},interpolation:{escapeValue:!0,format:function format(e,n,r,o){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}(),this.options,transformOptions(n)),this.format=this.options.interpolation.format,r||(r=noop),!this.options.isClone){this.modules.logger?p.init(createClassOnDemand(this.modules.logger),this.options):p.init(null,this.options);var o=new x(this.options);this.store=new m(this.options.resources,this.options);var i=this.services;i.logger=p,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new T(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new k(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new C(createClassOnDemand(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i1?r-1:0),i=1;i0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(n){e[n]=function(){var r;return(r=e.store)[n].apply(r,arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(n){e[n]=function(){var r;return(r=e.store)[n].apply(r,arguments),e}}));var s=defer(),l=function load(){var n=function finish(n,o){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(o),r(n,o)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return n(null,e.t.bind(e));e.changeLanguage(e.options.lng,n)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),s}},{key:"loadResources",value:function loadResources(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:noop,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function append(e){e&&n.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return a(e)}));this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function reloadResources(e,n,r){var o=defer();return e||(e=this.languages),n||(n=this.options.ns),r||(r=noop),this.services.backendConnector.reload(e,n,(function(e){o.resolve(),r(e)})),o}},{key:"use",value:function use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&y.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;var o=defer();this.emit("languageChanging",e);var i=function setLng(e){var i="string"==typeof e?e:r.services.languageUtils.getBestMatchFromCodes(e);i&&(r.language||(r.language=i,r.languages=r.services.languageUtils.toResolveHierarchy(i)),r.translator.language||r.translator.changeLanguage(i),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(i)),r.loadResources(i,(function(e){!function done(e,i){i?(r.language=i,r.languages=r.services.languageUtils.toResolveHierarchy(i),r.translator.changeLanguage(i),r.isLanguageChangingTo=void 0,r.emit("languageChanged",i),r.logger.log("languageChanged",i)):r.isLanguageChangingTo=void 0,o.resolve((function(){return r.t.apply(r,arguments)})),n&&n(e,(function(){return r.t.apply(r,arguments)}))}(e,i)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),o}},{key:"getFixedT",value:function getFixedT(e,n){var r=this,o=function fixedT(e,n){var o;if("object"!==_typeof(n)){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=this.languages[0],i=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===o.toLowerCase())return!0;var s=function loadNotPending(e,r){var o=n.services.backendConnector.state["".concat(e,"|").concat(r)];return-1===o||2===o};if(r.precheck){var l=r.precheck(this,s);if(void 0!==l)return l}return!!this.hasResourceBundle(o,e)||(!this.services.backendConnector.backend||!(!s(o,e)||i&&!s(a,e)))}},{key:"loadNamespaces",value:function loadNamespaces(e,n){var r=this,o=defer();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){o.resolve(),n&&n(e)})),o):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function loadLanguages(e,n){var r=defer();"string"==typeof e&&(e=[e]);var o=this.options.preload||[],i=e.filter((function(e){return o.indexOf(e)<0}));return i.length?(this.options.preload=o.concat(i),this.loadResources((function(e){r.resolve(),n&&n(e)})),r):(n&&n(),Promise.resolve())}},{key:"dir",value:function dir(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function createInstance(){return new I18n(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function cloneInstance(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:noop,o=_objectSpread({},this.options,n,{isClone:!0}),i=new I18n(o);return["store","services","language"].forEach((function(n){i[n]=e[n]})),i.services=_objectSpread({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new b(i.services,i.options),i.translator.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o((0,o.isEmpty)(e)?E:e.replace(/\_/g,"."))+"/"+((0,o.isEmpty)(n)?A:n.replace(/\_/g,".")),checkInitialisedNamespaces=()=>{const e=L.findIndex((e=>!1===e.initialized))>=0;var n;return e||(n=!0,(0,o.createCollectionByPath)(window,"NeosCMS.I18n.initialized",Boolean(n)),window.dispatchEvent(new CustomEvent("neoscms-i18n-initialized",{bubbles:!0}))),!e},transformAndAppendXliffData=e=>{const n=N.languages[0];if((0,o.isNil)(e))return!1;const r=Object.keys(e);N.store.on("added",((e,n)=>{L.find((e=>e.name===n)).initialized=!0,checkInitialisedNamespaces()})),r.forEach((r=>{Object.keys(e[r]).forEach((i=>{const a=getTransformedNamespace(r,i),s=e[r][i];(0,o.isNil)(s)||N.addResourceBundle(n,a,(e=>(Object.keys(e).forEach((n=>{Array.isArray(e[n])&&e[n].forEach(((r,o)=>{let i=n;Number.isInteger(o)&&1===o&&(i=`${n}_plural`),e[i]=r}))})),e))(s),!0,!0)}))}))},translate=(e,n,r,i,a,s,l)=>{e=e.replace(/\./g,"_");var c,u;const d=(c=r,u=i,((0,o.isEmpty)(c)?E:c.trim())+"/"+((0,o.isEmpty)(u)?A:u.trim()))+":"+e.trim();let p={};return(0,o.isNil)(l)||(p.count=l),(0,o.isNil)(a)||(p.replace=a),(0,o.isEmpty)(n)||(p.defaultValue=n),N.t(d,p)},Localization_init=()=>{(0,o.isNil)(window.NeosCMS)&&(window.NeosCMS={}),(0,o.isNil)(window.NeosCMS.I18n)&&(window.NeosCMS.I18n={init:Localization_init,translate,initialized:!1})},O={init:Localization_init,initTranslations:e=>{const n={interpolation:{prefix:"{",suffix:"}"},resources:{}},r=(()=>{const e=(0,o.getCollectionValueByPath)(window.NeosCMS,"Configuration.XliffUri");return(0,o.isNil)(e)?"":new URL(e).searchParams.get("locale")})();if(!(0,o.isEmpty)(r)){n[r.match("[a-z]{2}(-[A-Z]{2})")?"lng":"fallbackLng"]=r}(e=>{if((0,o.isNil)(e))return!1;Object.keys(e).forEach((n=>{Object.keys(e[n]).forEach((r=>{const i=getTransformedNamespace(n,r),a=e[n][r];(0,o.isNil)(a)||L.push({name:i,initialized:!1})}))}))})(e),N.init(n,((n,r)=>{transformAndAppendXliffData(e)}))},translate};r(449);class ApiService{constructor(e,n){if((0,o.isNil)(e)){let e="Tried to create API service without a base uri. ";e+="Please initialize the API service with a base path ",e+='like "/neos/impersonate/"',console.error(e)}if(this._basePath=e,(0,o.isNil)(n)){let e="Tried to create API service without a CSFR ";e+="token. Please initialize the API service with a token",console.error(e)}this._csrfToken=n}async callUserChange(e){const n={user:e,format:"json"},r=await fetch(this._basePath+"user-change",{method:"POST",credentials:"include",headers:this._getHeader(),body:JSON.stringify(n)});return await r.json()}async callStatus(){const e=await fetch(this._basePath+"status",{method:"GET",credentials:"include",headers:this._getHeader()});return await e.json()}async callRestore(){const e=await fetch(this._basePath+"restore",{method:"POST",credentials:"include",headers:this._getHeader()});return await e.json()}_getHeader(){return{Accept:"application/json","Content-Type":"application/json","X-Flow-Csrftoken":this._csrfToken}}}const P={init:()=>{(0,o.isNil)(window.NeosCMS)&&(window.NeosCMS={}),(0,o.isNil)(window.NeosCMS.Helper)&&(window.NeosCMS.Helper={isNil:o.isNil,isEmpty:o.isEmpty,getItemByKeyValue:o.getItemByKeyValue,getCollectionValueByPath:o.getCollectionValueByPath,createCollectionByPath:o.createCollectionByPath})}}},482:function(e){e.exports=function(){"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _setPrototypeOf(e,n){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,n){return e.__proto__=n,e},_setPrototypeOf(e,n)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _construct(e,n,r){return _construct=_isNativeReflectConstruct()?Reflect.construct:function _construct(e,n,r){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(e,o));return r&&_setPrototypeOf(i,r.prototype),i},_construct.apply(null,arguments)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,n){if(e){if("string"==typeof e)return _arrayLikeToArray(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,n):void 0}}function _arrayLikeToArray(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,o=new Array(n);r1?r-1:0),i=1;i/gm),I=s(/\${[\w\W]*}/gm),H=s(/^data-[\-\w.\u00B7-\uFFFF]/),F=s(/^aria-[\-\w]+$/),q=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B=s(/^(?:\w+script|data):/i),z=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),U=s(/^html$/i),W=function getGlobal(){return"undefined"==typeof window?null:window},$=function _createTrustedTypesPolicy(e,n){if("object"!==_typeof(e)||"function"!=typeof e.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML:function createHTML(e){return e},createScriptURL:function createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function createDOMPurify(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W(),n=function DOMPurify(e){return createDOMPurify(e)};if(n.version="2.4.7",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,o=e.document,i=e.DocumentFragment,s=e.HTMLTemplateElement,l=e.Node,c=e.Element,u=e.NodeFilter,d=e.NamedNodeMap,V=void 0===d?e.NamedNodeMap||e.MozNamedAttrMap:d,G=e.HTMLFormElement,K=e.DOMParser,X=e.trustedTypes,Y=c.prototype,J=lookupGetter(Y,"cloneNode"),Z=lookupGetter(Y,"nextSibling"),Q=lookupGetter(Y,"childNodes"),ee=lookupGetter(Y,"parentNode");if("function"==typeof s){var te=o.createElement("template");te.content&&te.content.ownerDocument&&(o=te.content.ownerDocument)}var ne=$(X,r),re=ne?ne.createHTML(""):"",oe=o,ie=oe.implementation,ae=oe.createNodeIterator,se=oe.createDocumentFragment,le=oe.getElementsByTagName,ce=r.importNode,ue={};try{ue=clone(o).documentMode?o.documentMode:{}}catch(e){}var de={};n.isSupported="function"==typeof ee&&ie&&void 0!==ie.createHTMLDocument&&9!==ue;var pe,fe,he=M,ge=R,me=I,ye=H,ve=F,be=B,xe=z,we=q,Se=null,Te=addToSet({},[].concat(_toConsumableArray(T),_toConsumableArray(k),_toConsumableArray(C),_toConsumableArray(E),_toConsumableArray(L))),ke=null,Ce=addToSet({},[].concat(_toConsumableArray(O),_toConsumableArray(P),_toConsumableArray(D),_toConsumableArray(j))),_e=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ne=null,Ee=null,Ae=!0,Le=!0,Oe=!1,Pe=!0,De=!1,je=!1,Me=!1,Re=!1,Ie=!1,He=!1,Fe=!1,qe=!0,Be=!1,ze="user-content-",Ue=!0,We=!1,$e={},Ve=null,Ge=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ke=null,Xe=addToSet({},["audio","video","img","source","image","track"]),Ye=null,Je=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ze="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,nt=!1,rt=null,ot=addToSet({},[Ze,Qe,et],m),it=["application/xhtml+xml","text/html"],at="text/html",st=null,lt=o.createElement("form"),ct=function isRegexOrFunction(e){return e instanceof RegExp||e instanceof Function},ut=function _parseConfig(e){st&&st===e||(e&&"object"===_typeof(e)||(e={}),e=clone(e),pe=pe=-1===it.indexOf(e.PARSER_MEDIA_TYPE)?at:e.PARSER_MEDIA_TYPE,fe="application/xhtml+xml"===pe?m:g,Se="ALLOWED_TAGS"in e?addToSet({},e.ALLOWED_TAGS,fe):Te,ke="ALLOWED_ATTR"in e?addToSet({},e.ALLOWED_ATTR,fe):Ce,rt="ALLOWED_NAMESPACES"in e?addToSet({},e.ALLOWED_NAMESPACES,m):ot,Ye="ADD_URI_SAFE_ATTR"in e?addToSet(clone(Je),e.ADD_URI_SAFE_ATTR,fe):Je,Ke="ADD_DATA_URI_TAGS"in e?addToSet(clone(Xe),e.ADD_DATA_URI_TAGS,fe):Xe,Ve="FORBID_CONTENTS"in e?addToSet({},e.FORBID_CONTENTS,fe):Ge,Ne="FORBID_TAGS"in e?addToSet({},e.FORBID_TAGS,fe):{},Ee="FORBID_ATTR"in e?addToSet({},e.FORBID_ATTR,fe):{},$e="USE_PROFILES"in e&&e.USE_PROFILES,Ae=!1!==e.ALLOW_ARIA_ATTR,Le=!1!==e.ALLOW_DATA_ATTR,Oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Pe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,De=e.SAFE_FOR_TEMPLATES||!1,je=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,Re=e.FORCE_BODY||!1,qe=!1!==e.SANITIZE_DOM,Be=e.SANITIZE_NAMED_PROPS||!1,Ue=!1!==e.KEEP_CONTENT,We=e.IN_PLACE||!1,we=e.ALLOWED_URI_REGEXP||we,tt=e.NAMESPACE||et,_e=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_e.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_e.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_e.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Le=!1),He&&(Ie=!0),$e&&(Se=addToSet({},_toConsumableArray(L)),ke=[],!0===$e.html&&(addToSet(Se,T),addToSet(ke,O)),!0===$e.svg&&(addToSet(Se,k),addToSet(ke,P),addToSet(ke,j)),!0===$e.svgFilters&&(addToSet(Se,C),addToSet(ke,P),addToSet(ke,j)),!0===$e.mathMl&&(addToSet(Se,E),addToSet(ke,D),addToSet(ke,j))),e.ADD_TAGS&&(Se===Te&&(Se=clone(Se)),addToSet(Se,e.ADD_TAGS,fe)),e.ADD_ATTR&&(ke===Ce&&(ke=clone(ke)),addToSet(ke,e.ADD_ATTR,fe)),e.ADD_URI_SAFE_ATTR&&addToSet(Ye,e.ADD_URI_SAFE_ATTR,fe),e.FORBID_CONTENTS&&(Ve===Ge&&(Ve=clone(Ve)),addToSet(Ve,e.FORBID_CONTENTS,fe)),Ue&&(Se["#text"]=!0),je&&addToSet(Se,["html","head","body"]),Se.table&&(addToSet(Se,["tbody"]),delete Ne.tbody),a&&a(e),st=e)},dt=addToSet({},["mi","mo","mn","ms","mtext"]),pt=addToSet({},["foreignobject","desc","title","annotation-xml"]),ft=addToSet({},["title","style","font","a","script"]),ht=addToSet({},k);addToSet(ht,C),addToSet(ht,N);var gt=addToSet({},E);addToSet(gt,A);var mt=function _checkValidNamespace(e){var n=ee(e);n&&n.tagName||(n={namespaceURI:tt,tagName:"template"});var r=g(e.tagName),o=g(n.tagName);return!!rt[e.namespaceURI]&&(e.namespaceURI===Qe?n.namespaceURI===et?"svg"===r:n.namespaceURI===Ze?"svg"===r&&("annotation-xml"===o||dt[o]):Boolean(ht[r]):e.namespaceURI===Ze?n.namespaceURI===et?"math"===r:n.namespaceURI===Qe?"math"===r&&pt[o]:Boolean(gt[r]):e.namespaceURI===et?!(n.namespaceURI===Qe&&!pt[o])&&!(n.namespaceURI===Ze&&!dt[o])&&!gt[r]&&(ft[r]||!ht[r]):!("application/xhtml+xml"!==pe||!rt[e.namespaceURI]))},yt=function _forceRemove(e){h(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(n){try{e.outerHTML=re}catch(n){e.remove()}}},vt=function _removeAttribute(e,r){try{h(n.removed,{attribute:r.getAttributeNode(e),from:r})}catch(e){h(n.removed,{attribute:null,from:r})}if(r.removeAttribute(e),"is"===e&&!ke[e])if(Ie||He)try{yt(r)}catch(e){}else try{r.setAttribute(e,"")}catch(e){}},bt=function _initDocument(e){var n,r;if(Re)e=""+e;else{var i=y(e,/^[\r\n\t ]+/);r=i&&i[0]}"application/xhtml+xml"===pe&&tt===et&&(e=''+e+"");var a=ne?ne.createHTML(e):e;if(tt===et)try{n=(new K).parseFromString(a,pe)}catch(e){}if(!n||!n.documentElement){n=ie.createDocument(tt,"template",null);try{n.documentElement.innerHTML=nt?re:a}catch(e){}}var s=n.body||n.documentElement;return e&&r&&s.insertBefore(o.createTextNode(r),s.childNodes[0]||null),tt===et?le.call(n,je?"html":"body")[0]:je?n.documentElement:s},xt=function _createIterator(e){return ae.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},wt=function _isClobbered(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof V)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},St=function _isNode(e){return"object"===_typeof(l)?e instanceof l:e&&"object"===_typeof(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function _executeHook(e,r,o){de[e]&&p(de[e],(function(e){e.call(n,r,o,st)}))},kt=function _sanitizeElements(e){var r;if(Tt("beforeSanitizeElements",e,null),wt(e))return yt(e),!0;if(w(/[\u0080-\uFFFF]/,e.nodeName))return yt(e),!0;var o=fe(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:o,allowedTags:Se}),e.hasChildNodes()&&!St(e.firstElementChild)&&(!St(e.content)||!St(e.content.firstElementChild))&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return yt(e),!0;if("select"===o&&w(/
- - {neos:backend.translate(id: 'workspaces.selectAllCurrentChanges', source: 'Modules', package: 'Neos.Neos')}
+ + {neos:backend.translate(id: 'workspaces.selectAllCurrentChanges', source: 'Modules', package: 'Neos.Neos')}
- - - - - - - + + +
+ + + + + + +
{neos:backend.translate(id: 'pathCaption', source: 'Main', package: 'Neos.Neos')}: @@ -54,40 +55,41 @@
-
- -
- - + + - - - -
+ +
+ + + + + + + +
- -
-
- - - + + + + + + +
- - -