{"version":3,"file":"index.umd.cjs","sources":["../src/utils/defer.ts","../src/utils/waitFor.ts","../src/utils/injectScript.ts","../src/utils/injectStylesheet.ts","../src/utils/isSSR.ts","../src/utils/omit.ts","../src/utils/once.ts","../src/utils/overwriteArray.ts","../src/utils/overwriteObject.ts","../src/utils/preloadResource.ts","../src/utils/shallowCompareArrays.ts","../src/utils/uid.ts","../src/utils/uniq.ts","../src/utils/waitForWindowEntry.ts","../src/utils/filterObjectValues.ts","../src/utils/filterBlankObjectValues.ts","../src/utils/mapObjectValues.ts","../src/utils/without.ts","../src/utils/mapObjectKeys.ts","../src/utils/kebabToCamelCase.ts","../src/utils/version/isSemanticVersion.ts","../src/utils/version/destructureSemanticVersion.ts","../src/utils/version/compareSemanticVersions.ts","../src/utils/version/isCKVersion.ts","../src/plugins/appendExtraPluginsToEditorConfig.ts","../src/license/getLicenseVersionFromEditorVersion.ts","../src/installation-info/getCKBaseBundleInstallationInfo.ts","../src/installation-info/getSupportedLicenseVersionInstallationInfo.ts","../src/license/isCKEditorFreeLicense.ts","../src/plugins/IntegrationUsageDataPlugin.ts","../src/cdn/ck/createCKCdnUrl.ts","../src/cdn/ckbox/createCKBoxCdnUrl.ts","../src/docs/createCKDocsUrl.ts","../src/cdn/ck/createCKCdnBaseBundlePack.ts","../src/cdn/ck/createCKCdnPremiumBundlePack.ts","../src/cdn/utils/loadCKCdnResourcesPack.ts","../src/cdn/utils/combineCKCdnBundlesPacks.ts","../src/installation-info/getCKBoxInstallationInfo.ts","../src/cdn/ckbox/createCKBoxCdnBundlePack.ts","../src/license/isCKCdnSupportedByEditorVersion.ts","../src/cdn/plugins/combineCdnPluginsPacks.ts","../src/cdn/loadCKEditorCloud.ts","../src/installation-info/compareInstalledCKBaseVersion.ts","../src/installation-info/getInstalledCKBaseFeatures.ts","../src/compatibility/assignAttributesPropToMultiRootEditorConfig.ts","../src/compatibility/assignInitialDataToMultirootEditorConfig.ts","../src/compatibility/assignElementToEditorConfig.ts","../src/compatibility/getInitialDataFromEditorConfig.ts","../src/compatibility/assignInitialDataToEditorConfig.ts"],"sourcesContent":["/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nexport type Defer<E> = {\n\tpromise: Promise<E>;\n\tresolve: ( value: E ) => void;\n};\n\n/**\n * This function generates a promise that can be resolved by invoking the returned `resolve` method.\n * It proves to be beneficial in the creation of various types of locks and semaphores.\n *\n * It can be replaced with `Promise.withResolvers()` in the future.\n */\nexport function createDefer<E = void>(): Defer<E> {\n\tconst deferred: Defer<E> = {\n\t\tresolve: null as any,\n\t\tpromise: null as any\n\t};\n\n\tdeferred.promise = new Promise<E>( resolve => {\n\t\tdeferred.resolve = resolve;\n\t} );\n\n\treturn deferred;\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { Awaitable } from '../types/Awaitable.js';\n\n/**\n * Waits for the provided callback to succeed. The callback is executed multiple times until it succeeds or the timeout is reached.\n * It's executed immediately and then with a delay defined by the `retry` option.\n *\n * @param callback The callback to execute.\n * @param config Configuration for the function.\n * @returns A promise that resolves when the callback succeeds.\n *\n * @example\n * ```ts\n * await waitFor( async () => {\n * \tconst element = document.querySelector( '.my-element' );\n * \tif ( !element ) {\n * \t\tthrow new Error( 'Element not found.' );\n * \t}\n * } );\n * ```\n */\nexport function waitFor<R>(\n\tcallback: () => Awaitable<R>,\n\t{\n\t\ttimeOutAfter = 500,\n\t\tretryAfter = 100\n\t}: WaitForConfig = {}\n): Promise<R> {\n\t// Retry the callback until it succeeds or the timeout is reached.\n\treturn new Promise<R>( ( resolve, reject ) => {\n\t\tconst startTime = Date.now();\n\t\tlet lastError: Error | null = null;\n\n\t\tconst timeoutTimerId = setTimeout( () => {\n\t\t\treject( lastError ?? new Error( 'Timeout' ) );\n\t\t}, timeOutAfter );\n\n\t\tconst tick = async () => {\n\t\t\ttry {\n\t\t\t\tconst result = await callback();\n\t\t\t\tclearTimeout( timeoutTimerId );\n\t\t\t\tresolve( result );\n\t\t\t} catch ( err: any ) {\n\t\t\t\tlastError = err;\n\n\t\t\t\tif ( Date.now() - startTime > timeOutAfter ) {\n\t\t\t\t\treject( err );\n\t\t\t\t} else {\n\t\t\t\t\tsetTimeout( tick, retryAfter );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttick();\n\t} );\n}\n\n/**\n * Configuration for the `waitFor` function.\n */\nexport type WaitForConfig = {\n\t// The time in milliseconds after which the function will stop retrying and reject the promise.\n\ttimeOutAfter?: number;\n\n\t// The time in milliseconds between retries.\n\tretryAfter?: number;\n};\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Map of injected scripts. It is used to prevent injecting the same script multiple times.\n * It happens quite often in React Strict mode when the component is rendered twice.\n */\nexport const INJECTED_SCRIPTS = new Map<string, Promise<void>>();\n\n/**\n * Injects a script into the document.\n *\n * @param src The URL of the script to be injected.\n * @param props Additional properties used to decide how the script should be injected.\n * @param props.attributes Additional attributes to be set on the script element.\n * @returns A promise that resolves when the script is loaded.\n */\nexport function injectScript(\n\tsrc: string,\n\t{ attributes }: InjectScriptProps = {}\n): Promise<void> {\n\t// Return the promise if the script is already injected by this function.\n\tif ( INJECTED_SCRIPTS.has( src ) ) {\n\t\treturn INJECTED_SCRIPTS.get( src )!;\n\t}\n\n\t// Return the promise if the script is already present in the document but not injected by this function.\n\t// We are not sure if the script is loaded or not, so we have to show warning in this case.\n\tconst maybePrevScript = document.querySelector( `script[src=\"${ src }\"]` );\n\n\tif ( maybePrevScript ) {\n\t\tconsole.warn( `Script with \"${ src }\" src is already present in DOM!` );\n\t\tmaybePrevScript.remove();\n\t}\n\n\t// Inject the script and return the promise.\n\tconst promise = new Promise<void>( ( resolve, reject ) => {\n\t\tconst script = document.createElement( 'script' );\n\n\t\tscript.onerror = reject;\n\t\tscript.onload = () => {\n\t\t\tresolve();\n\t\t};\n\n\t\t// Set additional attributes if provided.\n\t\tfor ( const [ key, value ] of Object.entries( attributes || {} ) ) {\n\t\t\tscript.setAttribute( key, value );\n\t\t}\n\n\t\tscript.setAttribute( 'data-injected-by', 'ckeditor-integration' );\n\n\t\tscript.type = 'text/javascript';\n\t\tscript.async = true;\n\t\tscript.src = src;\n\n\t\tdocument.head.appendChild( script );\n\n\t\t// It should remove script if script is being removed from the DOM.\n\t\tconst observer = new MutationObserver( mutations => {\n\t\t\tconst removedNodes = mutations.flatMap( mutation => Array.from( mutation.removedNodes ) );\n\n\t\t\tif ( removedNodes.includes( script ) ) {\n\t\t\t\tINJECTED_SCRIPTS.delete( src );\n\t\t\t\tobserver.disconnect();\n\t\t\t}\n\t\t} );\n\n\t\tobserver.observe( document.head, {\n\t\t\tchildList: true,\n\t\t\tsubtree: true\n\t\t} );\n\t} );\n\n\tINJECTED_SCRIPTS.set( src, promise );\n\n\treturn promise;\n}\n\n/**\n * Props for the `injectScript` function.\n */\nexport type InjectScriptProps = {\n\tattributes?: Record<string, any>;\n};\n\n/**\n * Injects multiple scripts into the document in parallel.\n *\n * @param sources The URLs of the scripts to be injected.\n * @param props Additional properties used to decide how the script should be injected.\n * @returns A promise that resolves when all scripts are loaded.\n */\nexport async function injectScriptsInParallel( sources: Array<string>, props?: InjectScriptProps ): Promise<void> {\n\tawait Promise.all(\n\t\tsources.map( src => injectScript( src, props ) )\n\t);\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Map of injected stylesheets. It's used to prevent injecting the same stylesheet multiple times.\n * It happens quite often in React Strict mode when the component is rendered twice.\n */\nexport const INJECTED_STYLESHEETS = new Map<string, Promise<void>>();\n\n/**\n * Injects a stylesheet into the document.\n *\n * @param props.href The URL of the stylesheet to be injected.\n * @param props.placementInHead The placement of the stylesheet in the head.\n * @param props.attributes Additional attributes to be set on the link element.\n * @returns A promise that resolves when the stylesheet is loaded.\n */\nexport function injectStylesheet(\n\t{\n\t\thref,\n\t\tplacementInHead = 'start',\n\t\tattributes = {}\n\t}: InjectStylesheetProps\n): Promise<void> {\n\t// Return the promise if the stylesheet is already injected by this function.\n\tif ( INJECTED_STYLESHEETS.has( href ) ) {\n\t\treturn INJECTED_STYLESHEETS.get( href )!;\n\t}\n\n\t// Return the promise if the stylesheet is already present in the document but not injected by this function.\n\t// We are not sure if the stylesheet is loaded or not, so we have to show a warning in this case.\n\tconst maybePrevStylesheet = document.querySelector( `link[href=\"${ href }\"][rel=\"stylesheet\"]` );\n\n\tif ( maybePrevStylesheet ) {\n\t\tconsole.warn( `Stylesheet with \"${ href }\" href is already present in DOM!` );\n\t\tmaybePrevStylesheet.remove();\n\t}\n\n\t// Append the link tag to the head.\n\tconst appendLinkTagToHead = ( link: HTMLLinkElement ) => {\n\t\t// Inject styles after the stylesheets that are already present in the head.\n\t\t// Do not specify the `rel` attribute because we want to inject the stylesheet even after\n\t\t// preloading link tags.\n\t\tconst previouslyInjectedLinks = Array.from(\n\t\t\tdocument.head.querySelectorAll( 'link[data-injected-by=\"ckeditor-integration\"]' )\n\t\t);\n\n\t\tswitch ( placementInHead ) {\n\t\t\t// It'll append styles *before* the stylesheets that are already present in the head\n\t\t\t// but after the ones that are injected by this function.\n\t\t\tcase 'start':\n\t\t\t\tif ( previouslyInjectedLinks.length ) {\n\t\t\t\t\tpreviouslyInjectedLinks.slice( -1 )[ 0 ].after( link );\n\t\t\t\t} else {\n\t\t\t\t\tdocument.head.insertBefore( link, document.head.firstChild );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t// It'll append styles *after* the stylesheets already in the head.\n\t\t\tcase 'end':\n\t\t\t\tdocument.head.appendChild( link );\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\t// Inject the stylesheet and return the promise.\n\tconst promise = new Promise<void>( ( resolve, reject ) => {\n\t\tconst link = document.createElement( 'link' );\n\n\t\t// Set additional attributes if provided.\n\t\tfor ( const [ key, value ] of Object.entries( attributes || {} ) ) {\n\t\t\tlink.setAttribute( key, value );\n\t\t}\n\n\t\tlink.setAttribute( 'data-injected-by', 'ckeditor-integration' );\n\n\t\tlink.rel = 'stylesheet';\n\t\tlink.href = href;\n\n\t\tlink.onerror = reject;\n\t\tlink.onload = () => {\n\t\t\tresolve();\n\t\t};\n\n\t\tappendLinkTagToHead( link );\n\n\t\t// It should remove stylesheet if stylesheet is being removed from the DOM.\n\t\tconst observer = new MutationObserver( mutations => {\n\t\t\tconst removedNodes = mutations.flatMap( mutation => Array.from( mutation.removedNodes ) );\n\n\t\t\tif ( removedNodes.includes( link ) ) {\n\t\t\t\tINJECTED_STYLESHEETS.delete( href );\n\t\t\t\tobserver.disconnect();\n\t\t\t}\n\t\t} );\n\n\t\tobserver.observe( document.head, {\n\t\t\tchildList: true,\n\t\t\tsubtree: true\n\t\t} );\n\t} );\n\n\tINJECTED_STYLESHEETS.set( href, promise );\n\n\treturn promise;\n}\n\n/**\n * Props for the `injectStylesheet` function.\n */\ntype InjectStylesheetProps = {\n\n\t/**\n\t * The URL of the stylesheet to be injected.\n\t */\n\thref: string;\n\n\t/**\n\t * The placement of the stylesheet in the head. It can be either at the start or at the end\n\t * of the head. Default is 'start' because it allows user to override the styles easily.\n\t */\n\tplacementInHead?: 'start' | 'end';\n\n\t/**\n\t * Additional attributes to set on the link tag.\n\t */\n\tattributes?: Record<string, any>;\n};\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nexport function isSSR(): boolean {\n\treturn typeof window === 'undefined';\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nexport function omit<\n\tO extends Record<string | symbol | number, any>,\n\tK extends Array<keyof O>\n>( keys: K, obj: O ): Omit<O, K[number]> {\n\tconst clone = { ...obj };\n\n\tfor ( const key of keys ) {\n\t\tif ( Object.hasOwn( obj, key ) ) {\n\t\t\tdelete clone[ key ];\n\t\t}\n\t}\n\n\treturn clone;\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Ensures that passed function will be executed only once.\n */\nexport function once<A extends Array<any>, R = void>( fn: ( ...args: A ) => R ): ( ...args: A ) => R {\n\tlet lastResult: { current: R } | null = null;\n\n\treturn ( ...args: A ): R => {\n\t\tif ( !lastResult ) {\n\t\t\tlastResult = {\n\t\t\t\tcurrent: fn( ...args )\n\t\t\t};\n\t\t}\n\n\t\treturn lastResult.current;\n\t};\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Clear whole array while keeping its reference.\n */\nexport function overwriteArray<A extends Array<any>>( source: A, destination: A ): A {\n\tdestination.length = 0;\n\tdestination.push( ...source );\n\n\treturn destination;\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Clears whole object while keeping its reference.\n */\nexport function overwriteObject<O extends Record<string, any>>( source: O, destination: O ): O {\n\tfor ( const prop of Object.getOwnPropertyNames( destination ) ) {\n\t\tdelete destination[ prop ];\n\t}\n\n\t// Prevent assigning self referencing attributes which crashes `Object.assign`.\n\tfor ( const [ key, value ] of Object.entries( source ) ) {\n\t\tif ( value !== destination && key !== 'prototype' && key !== '__proto__' ) {\n\t\t\t( destination as any )[ key ] = value;\n\t\t}\n\t}\n\n\treturn destination;\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Appends a `<link>` element to the `<head>` to preload a resource.\n *\n * \t* It should detect if the resource is already preloaded.\n * \t* It should detect type of the resource and set the `as` attribute accordingly.\n *\n * @param url The URL of the resource to preload.\n * @param props Additional properties for the preload.\n * @param props.attributes Additional attributes to be set on the `<link>` element.\n */\nexport function preloadResource(\n\turl: string,\n\t{ attributes }: PreloadResourceProps = {}\n): void {\n\tif ( document.head.querySelector( `link[href=\"${ url }\"][rel=\"preload\"]` ) ) {\n\t\treturn;\n\t}\n\n\tconst link = document.createElement( 'link' );\n\n\t// Set additional attributes if provided.\n\tfor ( const [ key, value ] of Object.entries( attributes || {} ) ) {\n\t\tlink.setAttribute( key, value );\n\t}\n\n\tlink.setAttribute( 'data-injected-by', 'ckeditor-integration' );\n\n\tlink.rel = 'preload';\n\tlink.as = detectTypeOfResource( url );\n\tlink.href = url;\n\n\tdocument.head.insertBefore( link, document.head.firstChild );\n}\n\n/**\n * Properties for the `preloadResource` function.\n */\ntype PreloadResourceProps = {\n\tattributes?: Record<string, any>;\n};\n\n/**\n * Detects the type of the resource based on its URL.\n */\nfunction detectTypeOfResource( url: string ): string {\n\tswitch ( true ) {\n\t\tcase /\\.css$/.test( url ):\n\t\t\treturn 'style';\n\n\t\tcase /\\.js$/.test( url ):\n\t\t\treturn 'script';\n\n\t\tdefault:\n\t\t\treturn 'fetch';\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Shallow comparison of two arrays.\n */\nexport function shallowCompareArrays<T>(\n\ta: Readonly<Array<T> | null>,\n\tb: Readonly<Array<T> | null>\n): boolean {\n\tif ( a === b ) {\n\t\treturn true;\n\t}\n\n\tif ( !a || !b ) {\n\t\treturn false;\n\t}\n\n\tfor ( let i = 0; i < a.length; ++i ) {\n\t\tif ( a[ i ] !== b[ i ] ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * A hash table of hex numbers to avoid using toString() in uid() which is costly.\n * [ '00', '01', '02', ..., 'fe', 'ff' ]\n */\nconst HEX_NUMBERS = new Array( 256 ).fill( '' )\n\t.map( ( _, index ) => ( '0' + ( index ).toString( 16 ) ).slice( -2 ) );\n\n/**\n * Returns a unique id. The id starts with an \"e\" character and a randomly generated string of\n * 32 alphanumeric characters.\n *\n * **Note**: The characters the unique id is built from correspond to the hex number notation\n * (from \"0\" to \"9\", from \"a\" to \"f\"). In other words, each id corresponds to an \"e\" followed\n * by 16 8-bit numbers next to each other.\n *\n * @returns An unique id string.\n */\nexport function uid(): string {\n\t// Generate 4 random 32-bit numbers.\n\tconst [ r1, r2, r3, r4 ] = crypto.getRandomValues( new Uint32Array( 4 ) );\n\n\t// Make sure that id does not start with number.\n\treturn 'e' +\n\t\tHEX_NUMBERS[ r1 >> 0 & 0xFF ] +\n\t\tHEX_NUMBERS[ r1 >> 8 & 0xFF ] +\n\t\tHEX_NUMBERS[ r1 >> 16 & 0xFF ] +\n\t\tHEX_NUMBERS[ r1 >> 24 & 0xFF ] +\n\t\tHEX_NUMBERS[ r2 >> 0 & 0xFF ] +\n\t\tHEX_NUMBERS[ r2 >> 8 & 0xFF ] +\n\t\tHEX_NUMBERS[ r2 >> 16 & 0xFF ] +\n\t\tHEX_NUMBERS[ r2 >> 24 & 0xFF ] +\n\t\tHEX_NUMBERS[ r3 >> 0 & 0xFF ] +\n\t\tHEX_NUMBERS[ r3 >> 8 & 0xFF ] +\n\t\tHEX_NUMBERS[ r3 >> 16 & 0xFF ] +\n\t\tHEX_NUMBERS[ r3 >> 24 & 0xFF ] +\n\t\tHEX_NUMBERS[ r4 >> 0 & 0xFF ] +\n\t\tHEX_NUMBERS[ r4 >> 8 & 0xFF ] +\n\t\tHEX_NUMBERS[ r4 >> 16 & 0xFF ] +\n\t\tHEX_NUMBERS[ r4 >> 24 & 0xFF ];\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * A utility function that removes duplicate elements from an array.\n */\nexport function uniq<A>( source: Array<A> ): Array<A> {\n\treturn Array.from( new Set( source ) );\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { waitFor, type WaitForConfig } from './waitFor.js';\n\n/**\n * Waits for the provided window entry to be available. It's used mostly for waiting for the CKEditor 5 window object to be available.\n * In theory these entries should be available immediately, but in practice, they might be loaded asynchronously because browser might\n * delay execution of the script even if it's loaded synchronously.\n *\n * Function ensures that proper type declarations are present on global Window interface.\n *\n * @param entryNames The names of the window entries to wait for.\n * @param config Configuration for the function.\n * @returns A promise that resolves when the window entry is available.\n *\n * @example\n * ```ts\n * const ckeditor = await waitForWindowEntry( [ 'CKEditor' ] );\n * ```\n */\nexport async function waitForWindowEntry<\n\tN extends keyof Window,\n\tO = Window[ N ]\n>( entryNames: Array<N>, config?: WaitForConfig ): Promise<O> {\n\t// Try to pick the bundle from the window object.\n\tconst tryPickBundle = () => (\n\t\tentryNames\n\t\t\t.map( name => ( window as any )[ name ] )\n\t\t\t.filter( Boolean )[ 0 ]\n\t);\n\n\treturn waitFor<O>(\n\t\t() => {\n\t\t\tconst result = tryPickBundle();\n\n\t\t\tif ( !result ) {\n\t\t\t\tthrow new Error( `Window entry \"${ entryNames.join( ',' ) }\" not found.` );\n\t\t\t}\n\n\t\t\treturn result;\n\t\t},\n\t\tconfig\n\t);\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Filters object values using the provided filter function.\n *\n * @param obj Object to filter.\n * @param filter Function that filters the object values.\n * @returns Object with filtered values.\n *\n * @example\n * ```ts\n * const obj = {\n * \ta: 1,\n * \tb: 2\n * };\n *\n * const filteredObj = filterObjectValues( value => value > 1, obj );\n * // filteredObj is { b: 2 }\n * ```\n */\nexport function filterObjectValues<T>(\n\tobj: Record<string, T>,\n\tfilter: ( value: T, key: string ) => boolean\n): Record<string, T> {\n\tconst filteredEntries = Object\n\t\t.entries( obj )\n\t\t.filter( ( [ key, value ] ) => filter( value, key ) );\n\n\treturn Object.fromEntries( filteredEntries );\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { filterObjectValues } from './filterObjectValues.js';\n\n/**\n * Removes null and undefined values from an object.\n *\n * @param obj Object to filter.\n * @returns Object with filtered values.\n * @example\n * ```ts\n * const obj = {\n * \ta: 1,\n * \tb: null,\n * \tc: undefined\n * };\n *\n * const filteredObj = filterBlankObjectValues( obj );\n * // filteredObj is { a: 1 }\n * ```\n */\nexport function filterBlankObjectValues<T>( obj: Record<string, T> ): FilterBlankRecordProperties<T> {\n\treturn filterObjectValues(\n\t\tobj,\n\t\tvalue => value !== null && value !== undefined\n\t) as FilterBlankRecordProperties<T>;\n}\n\n/**\n * Removes null and undefined values from an object.\n */\ntype FilterBlankRecordProperties<T> = Record<string, Exclude<T, null | undefined>>;\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Maps object values using the provided mapper function.\n *\n * @param obj Object to map.\n * @param mapper Function that maps the object values.\n * @returns Object with mapped values.\n *\n * @example\n * ```ts\n * const obj = {\n * \ta: 1,\n * \tb: 2\n * };\n *\n * const mappedObj = mapObjectValues( obj, value => value * 2 );\n * // mappedObj is { a: 2, b: 4 }\n * ```\n */\nexport function mapObjectValues<T, U>(\n\tobj: Record<string, T>,\n\tmapper: ( value: T, key: string ) => U\n): Record<string, U> {\n\tconst mappedEntries = Object\n\t\t.entries( obj )\n\t\t.map( ( [ key, value ] ) => [ key, mapper( value, key ) ] as const );\n\n\treturn Object.fromEntries( mappedEntries );\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Removes items from an array by values.\n *\n * @param itemsToRemove Items to remove.\n * @param items Array to remove items from.\n * @returns Array without removed items.\n */\nexport function without<A>( itemsToRemove: Array<A>, items: Array<A> ): Array<A> {\n\treturn items.filter( item => !itemsToRemove.includes( item ) );\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Creates a new object with keys mapped using the provided function.\n *\n * @param obj - The input object.\n * @param fn - The mapping function (takes the original key, returns the new one).\n * If produces the same key for multiple inputs, later entries override earlier ones.\n * @returns A new object with the mapped keys.\n */\nexport function mapObjectKeys<T>(\n\tobj: Record<string, T>,\n\tfn: ( key: string ) => string\n): Record<string, T> {\n\treturn Object.fromEntries(\n\t\tObject.entries( obj ).map( ( [ key, value ] ) => [ fn( key ), value ] )\n\t);\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Converts a kebab-case string to camelCase.\n * @param str - The kebab-case string (e.g., \"font-size\").\n * @returns The camelCase string (e.g., \"fontSize\").\n */\nexport function kebabToCamelCase( str: string ): string {\n\treturn str.replace( /-([a-z])/g, ( match: string, letter: string ) => letter.toUpperCase() );\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nexport type SemanticVersion = `${ number }.${ number }.${ number }`;\n\n/**\n * Checks if the given string is a semantic version number.\n *\n * @param version - The string to check.\n * @returns `true` if the string is a semantic version, `false` otherwise.\n */\nexport function isSemanticVersion( version: string | undefined | null ): version is SemanticVersion {\n\treturn !!version && /^\\d+\\.\\d+\\.\\d+/.test( version );\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { isSemanticVersion, type SemanticVersion } from './isSemanticVersion.js';\n\n/**\n * Destructure a semantic version string into its major, minor, and patch components.\n *\n * @param version - The semantic version string to destructure.\n * @returns An object containing the major, minor, and patch numbers.\n * @throws Will throw an error if the provided version is not a valid semantic version.\n */\nexport function destructureSemanticVersion( version: SemanticVersion ): DestructuredSemanticVersion {\n\tif ( !isSemanticVersion( version ) ) {\n\t\tthrow new Error( `Invalid semantic version: ${ version || '<blank>' }.` );\n\t}\n\n\tconst [ major, minor, patch ] = version.split( '.' );\n\n\treturn {\n\t\tmajor: Number.parseInt( major, 10 ),\n\t\tminor: Number.parseInt( minor, 10 ),\n\t\tpatch: Number.parseInt( patch, 10 )\n\t};\n}\n\n/**\n * Result of parsing the semantic version.\n */\nexport type DestructuredSemanticVersion = {\n\tmajor: number;\n\tminor: number;\n\tpatch: number;\n};\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { destructureSemanticVersion } from './destructureSemanticVersion.js';\nimport type { SemanticVersion } from './isSemanticVersion.js';\n\n/**\n * Compares two semantic versions.\n *\n * - `1` if a > b\n * - `0` if a == b\n * - `-1` if a < b\n *\n * @param a\tFirst semantic version to compare.\n * @param b Second semantic version to compare.\n * @returns Comparison result.\n */\nexport function compareSemanticVersions( a: SemanticVersion, b: SemanticVersion ): VersionCompareResult {\n\tconst parsedA = destructureSemanticVersion( a );\n\tconst parsedB = destructureSemanticVersion( b );\n\n\treturn Math.sign(\n\t\tparsedA.major - parsedB.major ||\n\t\tparsedA.minor - parsedB.minor ||\n\t\tparsedA.patch - parsedB.patch\n\t) as VersionCompareResult;\n}\n\n/**\n * Result of the versions comparison.\n */\nexport type VersionCompareResult = 0 | 1 | -1;\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { isSemanticVersion, type SemanticVersion } from './isSemanticVersion.js';\n\n/**\n * A version of the CKEditor that is used for testing purposes.\n */\nexport type CKTestingVersion =\n\t| 'nightly'\n\t| `nightly-${ string }`\n\t| 'alpha'\n\t| 'staging'\n\t| 'internal';\n\n/**\n * A version of the CKEditor.\n */\nexport type CKVersion =\n\t| SemanticVersion\n\t| CKTestingVersion;\n\n/**\n * Checks if the given string is a version of a file on the CKEditor.\n *\n * @param version - The string to check.\n * @returns `true` if the string is a version of a file on the CKEditor, `false` otherwise.\n * @example\n * ```ts\n * isCKTestingVersion( '1.2.3-nightly-abc' ); // -> true\n * isCKTestingVersion( '1.2.3-internal-abc' ); // -> true\n * isCKTestingVersion( '1.2.3-alpha.1' ); // -> true\n * isCKTestingVersion( '1.2.3' ); // -> false\n * isCKTestingVersion( 'nightly' ); // -> true\n * isCKTestingVersion( 'nightly-abc' ); // -> true\n * isCKTestingVersion( 'staging' ); // -> true\n * ```\n */\nexport function isCKTestingVersion( version: string | undefined ): version is CKTestingVersion {\n\tif ( !version ) {\n\t\treturn false;\n\t}\n\n\treturn [ 'nightly', 'alpha', 'internal', 'nightly-', 'staging' ].some( testVersion => version.includes( testVersion ) );\n}\n\n/**\n * Checks if given version is nightly like version with `0.0.0` versioning.\n *\n * @param version - The version to check.\n * @returns `true` if it's nightly-like version.\n */\nexport function isCKZeroBaseVersion( version: string | undefined ): version is SemanticVersion {\n\treturn !!version?.startsWith( '0.0.0-' );\n}\n\n/**\n * Checks if the given string is a version of a file on the CKEditor CDN.\n *\n * @param version - The string to check.\n * @returns `true` if the string is a version of a file on the CKEditor, `false` otherwise.\n * @example\n * ```ts\n * isCKVersion( 'nightly' ); // -> true\n * isCKVersion( 'alpha' ); // -> true\n * isCKVersion( 'rc-1.2.3' ); // -> true\n * isCKVersion( '1.2.3' ); // -> true\n * isCKVersion( 'nightly-abc' ); // -> true\n * isCKVersion( 'staging' ); // -> true\n * ```\n */\nexport function isCKVersion( version: string | undefined ): version is CKVersion {\n\treturn isSemanticVersion( version ) || isCKTestingVersion( version );\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { EditorConfig, PluginConstructor } from 'ckeditor5';\n\n/**\n * Appends plugins to the editor configuration.\n * It uses the `extraPlugins` property to append the plugins to avoid dealing with built-in constructor plugins.\n *\n * @param config The editor configuration.\n * @param plugins The plugins to append.\n * @returns The editor configuration with the plugins appended.\n * @example\n * ```ts\n * const editorConfig = appendExtraPluginsToEditorConfig(\n * \t{\n * \t\textraPlugins: [ 'Plugin1' ]\n * \t},\n * \t[ 'Plugin2' ]\n * );\n *\n * console.log( editorConfig.extraPlugins ); // [ 'Plugin1', 'Plugin2' ]\n * ```\n */\nexport function appendExtraPluginsToEditorConfig(\n\tconfig: EditorConfig,\n\tplugins: Array<PluginConstructor>\n): EditorConfig {\n\tconst extraPlugins = config.extraPlugins || [];\n\n\t// Do not use `uniq`. There might be integrations with duplicated plugins, so to\n\t// make it backward compatible, we need to keep the order of the plugins.\n\treturn {\n\t\t...config,\n\t\textraPlugins: [\n\t\t\t...extraPlugins,\n\t\t\t...plugins.filter( item => !extraPlugins.includes( item ) )\n\t\t]\n\t};\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { isCKTestingVersion, type CKVersion } from '../utils/version/isCKVersion.js';\nimport { destructureSemanticVersion } from '../utils/version/destructureSemanticVersion.js';\nimport type { LicenseKeyVersion } from './LicenseKey.js';\n\n/**\n * Returns the license version that is supported by the given CKEditor version.\n *\n * @param version The CKEditor version (semantic version or testing version).\n * @returns The supported license version.\n */\nexport function getLicenseVersionFromEditorVersion( version: CKVersion ): LicenseKeyVersion {\n\t// Assume that the testing version is always the newest one\n\t// so we can return the highest supported license version.\n\tif ( isCKTestingVersion( version ) ) {\n\t\treturn 3;\n\t}\n\n\tconst { major } = destructureSemanticVersion( version );\n\n\tswitch ( true ) {\n\t\tcase major >= 44:\n\t\t\treturn 3;\n\n\t\tcase major >= 38:\n\t\t\treturn 2;\n\n\t\tdefault:\n\t\t\treturn 1;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { BundleInstallationInfo } from './types.js';\n\nimport { isCKVersion, type CKVersion } from '../utils/version/isCKVersion.js';\n\n/**\n * Returns information about the base CKEditor bundle installation.\n */\nexport function getCKBaseBundleInstallationInfo(): BundleInstallationInfo<CKVersion> | null {\n\tconst { CKEDITOR_VERSION, CKEDITOR } = window;\n\n\tif ( !isCKVersion( CKEDITOR_VERSION ) ) {\n\t\treturn null;\n\t}\n\n\t// Global `CKEDITOR` is set only in CDN builds.\n\treturn {\n\t\tsource: CKEDITOR ? 'cdn' : 'npm',\n\t\tversion: CKEDITOR_VERSION\n\t};\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { getLicenseVersionFromEditorVersion } from '../license/getLicenseVersionFromEditorVersion.js';\nimport type { LicenseKeyVersion } from '../license/LicenseKey.js';\n\nimport { getCKBaseBundleInstallationInfo } from './getCKBaseBundleInstallationInfo.js';\n\n/**\n * Returns information about the installed CKEditor version and the supported license version.\n *\n * @returns The supported license version or `null` if the CKEditor version is unknown.\n */\nexport function getSupportedLicenseVersionInstallationInfo(): LicenseKeyVersion | null {\n\tconst installationInfo = getCKBaseBundleInstallationInfo();\n\n\t// It looks like unknown version of Ckeditor is installed, so we can't determine the license version.\n\tif ( !installationInfo ) {\n\t\treturn null;\n\t}\n\n\treturn getLicenseVersionFromEditorVersion( installationInfo.version );\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { getSupportedLicenseVersionInstallationInfo } from '../installation-info/getSupportedLicenseVersionInstallationInfo.js';\nimport { expectType } from '../types/expectType.js';\n\nimport type { LicenseKey, LicenseKeyVersion } from './LicenseKey.js';\n\n/**\n * Checks if passed license key is a free CKEditor license key.\n *\n * @param licenseKey The license key to check.\n * @param licenseVersion The version of the license key.\n * @returns `true` if the license key is free, `false` otherwise.\n */\nexport function isCKEditorFreeLicense( licenseKey: LicenseKey, licenseVersion?: LicenseKeyVersion ): boolean {\n\t// Pick the license version from the installation info if it's not provided.\n\t// Version should be present somewhere in the window object.\n\tlicenseVersion ||= getSupportedLicenseVersionInstallationInfo() || undefined;\n\n\tswitch ( licenseVersion ) {\n\t\tcase 1:\n\t\tcase 2:\n\t\t\treturn licenseKey === undefined;\n\n\t\tcase 3:\n\t\t\treturn licenseKey === 'GPL';\n\n\t\tdefault: {\n\t\t\texpectType<undefined>( licenseVersion );\n\n\t\t\treturn false;\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { Editor, PluginConstructor } from 'ckeditor5';\nimport { isCKEditorFreeLicense } from '../license/isCKEditorFreeLicense.js';\n\n/**\n * Creates a plugin that collects usage data for a specific integration.\n *\n * This part of the code is not executed in open-source implementations using a GPL key.\n * It only runs when a specific license key is provided. If you are uncertain whether\n * this applies to your installation, please contact our support team.\n *\n * @param integrationName The name of the integration.\n * @param usageData The usage data for the integration.\n * @returns The plugin that collects the usage data.\n * @example\n * ```ts\n * import { createUsageDataPlugin } from './usage-data.plugin';\n *\n * const integrationUsageDataPlugin = createUsageDataPlugin( 'react', {\n * \tversion: '1.0.0',\n * \tframeworkVersion: '17.0.0'\n * } );\n *\n * const editor = ClassicEditor.create( document.querySelector( '#editor' ), {\n * \tplugins: [ integrationUsageDataPlugin ]\n * } );\n * ```\n */\nexport function createIntegrationUsageDataPlugin(\n\tintegrationName: string,\n\tusageData: IntegrationUsageData\n): IntegrationUsageDataPlugin {\n\treturn function IntegrationUsageDataPlugin( editor: Editor ) {\n\t\t/**\n\t\t * Do not collect usage data for integrations when using a free CKEditor license.\n\t\t */\n\t\tif ( isCKEditorFreeLicense( editor.config.get( 'licenseKey' ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\teditor.on<IntegrationCollectUsageDataEvent>( 'collectUsageData', ( source, { setUsageData } ) => {\n\t\t\tsetUsageData( `integration.${ integrationName }`, usageData );\n\t\t} );\n\t} satisfies PluginConstructor;\n}\n\n/**\n * The plugin collects usage data for an integration.\n */\nexport type IntegrationUsageDataPlugin = ( editor: Editor ) => void;\n\n/**\n * The usage data for an integration.\n */\ntype IntegrationUsageData = {\n\n\t/**\n\t * The version of the integration.\n\t */\n\tversion: string;\n\n\t/**\n\t * The version of the framework that the integration is using.\n\t */\n\tframeworkVersion?: string;\n};\n\n/**\n * The event fires when the editor collects usage data for integrations.\n * The editor should fire it after the `ready` event so the integrations can provide their usage data.\n */\ntype IntegrationCollectUsageDataEvent = {\n\tname: 'collectUsageData';\n\targs: [\n\t\t{\n\t\t\tsetUsageData( path: `integration.${ string }`, value: IntegrationUsageData ): void;\n\t\t}\n\t];\n};\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { CKVersion } from '../../utils/version/isCKVersion.js';\n\n/**\n * The URL of the CKEditor CDN.\n */\nexport const CK_CDN_URL = 'https://cdn.ckeditor.com';\n\n/**\n * Creates a URL to a file on the CKEditor CDN.\n *\n * @param bundle The name of the bundle.\n * @param file The name of the file.\n * @param version The version of the file.\n * @returns A function that accepts the version of the file and returns the URL.\n *\n * ```ts\n * const url = createCKCdnUrl( 'classic', 'ckeditor.js', '27.0.0' );\n *\n * expect( url ).to.be.equal( 'https://cdn.ckeditor.com/classic/27.0.0/ckeditor.js' );\n * ```\n */\nexport function createCKCdnUrl( bundle: string, file: string, version: CKVersion ): string {\n\treturn `${ CK_CDN_URL }/${ bundle }/${ version }/${ file }`;\n}\n\n/**\n * A function that creates a URL to a file on the CKEditor CDN.\n */\nexport type CKCdnUrlCreator = typeof createCKCdnUrl;\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { SemanticVersion } from '../../utils/version/isSemanticVersion.js';\n\n/**\n * The URL of the CKBox CDN.\n */\nexport const CKBOX_CDN_URL = 'https://cdn.ckbox.io';\n\n/**\n * A version of a file on the CKBox CDN.\n */\nexport type CKBoxCdnVersion = SemanticVersion;\n\n/**\n * Creates a URL to a file on the CKBox CDN.\n *\n * @param bundle The name of the bundle.\n * @param file The name of the file.\n * @param version The version of the file.\n * @returns A function that accepts the version of the file and returns the URL.\n *\n * ```ts\n * const url = createCKBoxCdnUrl( 'ckbox', 'ckbox.js', '2.5.1' );\n *\n * expect( url ).to.be.equal( 'https://cdn.ckbox.io/ckbox/2.5.1/ckbox.js' );\n * ```\n */\nexport function createCKBoxCdnUrl( bundle: string, file: string, version: CKBoxCdnVersion ): string {\n\treturn `${ CKBOX_CDN_URL }/${ bundle }/${ version }/${ file }`;\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { SemanticVersion } from '../utils/version/isSemanticVersion.js';\n\nexport const CK_DOCS_URL = 'https://ckeditor.com/docs/ckeditor5';\n\n/**\n * Creates a URL to a file on the CKEditor documentation.\n */\nexport function createCKDocsUrl( path: string, version: SemanticVersion | 'latest' = 'latest' ): string {\n\treturn `${ CK_DOCS_URL }/${ version }/${ path }`;\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { CKCdnResourcesAdvancedPack } from '../../cdn/utils/loadCKCdnResourcesPack.js';\nimport type { CKVersion } from '../../utils/version/isCKVersion.js';\n\nimport { waitForWindowEntry } from '../../utils/waitForWindowEntry.js';\nimport { injectScriptsInParallel } from '../../utils/injectScript.js';\nimport { without } from '../../utils/without.js';\n\nimport { getCKBaseBundleInstallationInfo } from '../../installation-info/getCKBaseBundleInstallationInfo.js';\nimport { createCKDocsUrl } from '../../docs/createCKDocsUrl.js';\n\nimport { createCKCdnUrl, type CKCdnUrlCreator } from './createCKCdnUrl.js';\n\nimport './globals.js';\n\n/**\n * Creates a pack of resources for the base CKEditor bundle.\n *\n * @param config The configuration of the CKEditor Premium Features pack.\n * @returns A pack of resources for  the base CKEditor bundle.\n * @example\n *\n * ```ts\n * const { Paragraph } = await loadCKCdnResourcesPack(\n * \tcreateCKCdnBaseBundlePack( {\n * \t\tversion: '44.0.0',\n * \t\ttranslations: [ 'es', 'de' ]\n * \t} )\n * );\n * ```\n */\nexport function createCKCdnBaseBundlePack(\n\t{\n\t\tversion,\n\t\ttranslations,\n\t\tcreateCustomCdnUrl = createCKCdnUrl\n\t}: CKCdnBaseBundlePackConfig\n): CKCdnResourcesAdvancedPack<Window['CKEDITOR']> {\n\tconst urls = {\n\t\tscripts: [\n\t\t\t// Load the main script of the base features.\n\t\t\tcreateCustomCdnUrl( 'ckeditor5', 'ckeditor5.umd.js', version ),\n\n\t\t\t// Load all JavaScript files from the base features.\n\t\t\t// EN bundle is prebuilt into the main script, so we don't need to load it separately.\n\t\t\t...without( [ 'en' ], translations || [] ).map( translation =>\n\t\t\t\tcreateCustomCdnUrl( 'ckeditor5', `translations/${ translation }.umd.js`, version )\n\t\t\t)\n\t\t],\n\n\t\tstylesheets: [\n\t\t\tcreateCustomCdnUrl( 'ckeditor5', 'ckeditor5.css', version )\n\t\t]\n\t};\n\n\treturn {\n\t\t// Preload resources specified in the pack, before loading the main script.\n\t\tpreload: [\n\t\t\t...urls.stylesheets,\n\t\t\t...urls.scripts\n\t\t],\n\n\t\tscripts: [\n\t\t\t// It's safe to load translations and the main script in parallel.\n\t\t\tasync attributes => injectScriptsInParallel( urls.scripts, attributes )\n\t\t],\n\n\t\t// Load all stylesheets of the base features.\n\t\tstylesheets: urls.stylesheets,\n\n\t\t// Pick the exported global variables from the window object.\n\t\tcheckPluginLoaded: async () =>\n\t\t\twaitForWindowEntry( [ 'CKEDITOR' ] ),\n\n\t\t// Check if the CKEditor base bundle is already loaded and throw an error if it is.\n\t\tbeforeInject: () => {\n\t\t\tconst installationInfo = getCKBaseBundleInstallationInfo();\n\n\t\t\tswitch ( installationInfo?.source ) {\n\t\t\t\tcase 'npm':\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t'CKEditor 5 is already loaded from npm. Check the migration guide for more details: ' +\n\t\t\t\t\t\tcreateCKDocsUrl( 'updating/migrations/vanilla-js.html' )\n\t\t\t\t\t);\n\n\t\t\t\tcase 'cdn':\n\t\t\t\t\tif ( installationInfo.version !== version ) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`CKEditor 5 is already loaded from CDN in version ${ installationInfo.version }. ` +\n\t\t\t\t\t\t\t`Remove the old <script> and <link> tags loading CKEditor 5 to allow loading the ${ version } version.`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Configuration of the base CKEditor bundle pack.\n */\nexport type CKCdnBaseBundlePackConfig = {\n\n\t/**\n\t * The version of  the base CKEditor bundle.\n\t */\n\tversion: CKVersion;\n\n\t/**\n\t * The list of translations to load.\n\t */\n\ttranslations?: Array<string>;\n\n\t/**\n\t * The function that creates custom CDN URLs.\n\t */\n\tcreateCustomCdnUrl?: CKCdnUrlCreator;\n};\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { CKCdnResourcesAdvancedPack } from '../../cdn/utils/loadCKCdnResourcesPack.js';\nimport type { CKCdnBaseBundlePackConfig } from './createCKCdnBaseBundlePack.js';\n\nimport { waitForWindowEntry } from '../../utils/waitForWindowEntry.js';\nimport { injectScriptsInParallel } from '../../utils/injectScript.js';\nimport { without } from '../../utils/without.js';\n\nimport { createCKCdnUrl } from './createCKCdnUrl.js';\n\n/**\n * Creates a pack of resources for the CKEditor Premium Features.\n *\n * @param config The configuration of the CKEditor Premium Features pack.\n * @returns A pack of resources for the CKEditor Premium Features.\n * @example\n *\n * ```ts\n * const { SlashCommand } = await loadCKCdnResourcesPack(\n * \tcreateCKCdnPremiumBundlePack( {\n * \t\tversion: '44.0.0',\n * \t\ttranslations: [ 'es', 'de' ]\n * \t} )\n * );\n * ```\n */\nexport function createCKCdnPremiumBundlePack(\n\t{\n\t\tversion,\n\t\ttranslations,\n\t\tcreateCustomCdnUrl = createCKCdnUrl\n\t}: CKCdnPremiumBundlePackConfig\n): CKCdnResourcesAdvancedPack<Window['CKEDITOR_PREMIUM_FEATURES']> {\n\tconst urls = {\n\t\tscripts: [\n\t\t\t// Load the main script of the premium features.\n\t\t\tcreateCustomCdnUrl( 'ckeditor5-premium-features', 'ckeditor5-premium-features.umd.js', version ),\n\n\t\t\t// Load all JavaScript files from the premium features.\n\t\t\t// EN bundle is prebuilt into the main script, so we don't need to load it separately.\n\t\t\t...without( [ 'en' ], translations || [] ).map( translation =>\n\t\t\t\tcreateCustomCdnUrl( 'ckeditor5-premium-features', `translations/${ translation }.umd.js`, version )\n\t\t\t)\n\t\t],\n\n\t\tstylesheets: [\n\t\t\tcreateCustomCdnUrl( 'ckeditor5-premium-features', 'ckeditor5-premium-features.css', version )\n\t\t]\n\t};\n\n\treturn {\n\t\t// Preload resources specified in the pack, before loading the main script.\n\t\tpreload: [\n\t\t\t...urls.stylesheets,\n\t\t\t...urls.scripts\n\t\t],\n\n\t\tscripts: [\n\t\t\t// It's safe to load translations and the main script in parallel.\n\t\t\tasync attributes => injectScriptsInParallel( urls.scripts, attributes )\n\t\t],\n\n\t\t// Load all stylesheets of the premium features.\n\t\tstylesheets: urls.stylesheets,\n\n\t\t// Pick the exported global variables from the window object.\n\t\tcheckPluginLoaded: async () =>\n\t\t\twaitForWindowEntry( [ 'CKEDITOR_PREMIUM_FEATURES' ] )\n\t};\n}\n\n/**\n * Configuration of the CKEditor Premium Features pack.\n */\nexport type CKCdnPremiumBundlePackConfig = Pick<\n\tCKCdnBaseBundlePackConfig,\n\t'translations' | 'version' | 'createCustomCdnUrl'\n>;\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { Awaitable } from '../../types/Awaitable.js';\n\nimport { injectScript, type InjectScriptProps } from '../../utils/injectScript.js';\nimport { injectStylesheet } from '../../utils/injectStylesheet.js';\nimport { preloadResource } from '../../utils/preloadResource.js';\nimport { uniq } from '../../utils/uniq.js';\n\n/**\n * Loads pack of resources (scripts and stylesheets) and returns the exported global variables (if any).\n *\n * @param pack The pack of resources to load.\n * @returns A promise that resolves with the exported global variables.\n * @example\n *\n * ```ts\n * const ckeditor = await loadCKCdnResourcesPack<ClassicEditor>( {\n * \tscripts: [\n * \t\t'https://cdn.ckeditor.com/ckeditor5/30.0.0/classic/ckeditor.js'\n * \t],\n * \tcheckPluginLoaded: () => ( window as any ).ClassicEditor\n * } );\n * ```\n */\nexport async function loadCKCdnResourcesPack<P extends CKCdnResourcesPack<any>>( pack: P ): Promise<InferCKCdnResourcesPackExportsType<P>> {\n\tlet {\n\t\thtmlAttributes = {},\n\t\tscripts = [],\n\t\tstylesheets = [],\n\t\tpreload,\n\t\tbeforeInject,\n\t\tcheckPluginLoaded\n\t} = normalizeCKCdnResourcesPack( pack );\n\n\t// Execute the `beforeInject` callback if defined. It checks if the resources are already loaded.\n\tbeforeInject?.();\n\n\t// If preload is not defined, use all stylesheets and scripts as preload resources.\n\tif ( !preload ) {\n\t\tpreload = uniq( [\n\t\t\t...stylesheets.filter( item => typeof item === 'string' ),\n\t\t\t...scripts.filter( item => typeof item === 'string' )\n\t\t] );\n\t}\n\n\t// Preload resources specified in the pack.\n\tfor ( const url of preload ) {\n\t\tpreloadResource( url, {\n\t\t\tattributes: htmlAttributes\n\t\t} );\n\t}\n\n\t// Load stylesheet tags before scripts to avoid a flash of unstyled content.\n\tawait Promise.all(\n\t\tuniq( stylesheets ).map( href => injectStylesheet( {\n\t\t\thref,\n\t\t\tattributes: htmlAttributes,\n\t\t\tplacementInHead: 'start'\n\t\t} ) )\n\t);\n\n\t// Load script tags.\n\tfor ( const script of uniq( scripts ) ) {\n\t\tconst injectorProps: InjectScriptProps = {\n\t\t\tattributes: htmlAttributes\n\t\t};\n\n\t\tif ( typeof script === 'string' ) {\n\t\t\tawait injectScript( script, injectorProps );\n\t\t} else {\n\t\t\tawait script( injectorProps );\n\t\t}\n\t}\n\n\t// Wait for execution all injected scripts.\n\treturn checkPluginLoaded?.();\n}\n\n/**\n * Normalizes the CKCdnResourcesPack configuration to the advanced format.\n *\n * @param pack The pack of resources to normalize.\n * @returns The normalized pack of resources.\n */\nexport function normalizeCKCdnResourcesPack<R = any>( pack: CKCdnResourcesPack<R> ): CKCdnResourcesAdvancedPack<R> {\n\t// Check if it is array of URLs, if so, convert it to the advanced format.\n\tif ( Array.isArray( pack ) ) {\n\t\treturn {\n\t\t\tscripts: pack.filter(\n\t\t\t\titem => typeof item === 'function' || item.endsWith( '.js' )\n\t\t\t),\n\n\t\t\tstylesheets: pack.filter(\n\t\t\t\titem => item.endsWith( '.css' )\n\t\t\t)\n\t\t};\n\t}\n\n\t// Check if it is a local import function, if so, convert it to the advanced format.\n\tif ( typeof pack === 'function' ) {\n\t\treturn {\n\t\t\tcheckPluginLoaded: pack\n\t\t};\n\t}\n\n\t// Return the pack as it is, because it's already in the advanced format.\n\treturn pack;\n}\n\n/**\n * A pack of resources to load (scripts and stylesheets) and the exported global variables.\n */\nexport type CKCdnResourcesPack<R = any> =\n\t| CKCdnResourcesAdvancedPack<R>\n\t| CKCdnResourcesBasicUrlsPack\n\t| CKCdnResourcesLocalPack<R>;\n\n/**\n * A pack of resources to load as an async function that results with UMD module.\n *\n * @example\n * ```ts\n * const pack = async () => import( './your-module' );\n * ```\n */\ntype CKCdnResourcesLocalPack<R> = () => Awaitable<R>;\n\n/**\n * A pack of resources to load (scripts and stylesheets). In such configuration, the exported global variable\n * might be available but it's not guaranteed.\n *\n * @example\n * ```ts\n * const pack = [\n * \t'https://cdn.ckeditor.com/ckeditor5/30.0.0/classic/ckeditor.js'\n * ];\n * ```\n */\ntype CKCdnResourcesBasicUrlsPack = Array<string>;\n\n/**\n * A pack of resources to load (scripts and stylesheets) and the exported global variables.\n *\n * @example\n * ```ts\n * const pack = {\n * \tscripts: [\n * \t\t'https://cdn.ckeditor.com/ckeditor5/30.0.0/classic/ckeditor.js'\n * \t],\n * \tcheckPluginLoaded: () => ( window as any ).ClassicEditor\n * };\n * ```\n */\nexport type CKCdnResourcesAdvancedPack<R> = {\n\n\t/**\n\t * List of resources to preload, it should improve the performance of loading the resources.\n\t */\n\tpreload?: Array<string>;\n\n\t/**\n\t * List of scripts to load. Scripts are loaded in the order they are defined.\n\t */\n\tscripts?: Array<string | CKCdnScriptInjectorCallback>;\n\n\t/**\n\t * List of stylesheets to load. Stylesheets are loaded in the order they are defined.\n\t */\n\tstylesheets?: Array<string>;\n\n\t/**\n\t * Map of attributes to add to the script, stylesheet and link tags.\n\t * It can be used to specify `crossorigin` or `nonce` attributes on the injected HTML elements.\n\t */\n\thtmlAttributes?: Record<string, any>;\n\n\t/**\n\t * Callback that is executed before injecting the resources. It can be used to verify if the resources are already loaded.\n\t */\n\tbeforeInject?: () => void;\n\n\t/**\n\t * Get JS object with global variables exported by scripts.\n\t */\n\tcheckPluginLoaded?: () => Awaitable<R>;\n};\n\n/**\n * Callback that injects a script tag into the document.\n */\ntype CKCdnScriptInjectorCallback = ( props: InjectScriptProps ) => Awaitable<unknown>;\n\n/**\n * Extracts the type of the exported global variables from a CKResourcesPack.\n */\nexport type InferCKCdnResourcesPackExportsType<P> = P extends CKCdnResourcesPack<infer R> ? R : never;\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { filterBlankObjectValues } from '../../utils/filterBlankObjectValues.js';\nimport { mapObjectValues } from '../../utils/mapObjectValues.js';\n\nimport {\n\tnormalizeCKCdnResourcesPack,\n\ttype CKCdnResourcesPack,\n\ttype InferCKCdnResourcesPackExportsType,\n\ttype CKCdnResourcesAdvancedPack\n} from './loadCKCdnResourcesPack.js';\n\n/**\n * Combines multiple CKEditor CDN bundles packs into a single pack.\n *\n * @param packs A map of CKEditor CDN bundles packs.\n * @returns A combined pack of resources for multiple CKEditor CDN bundles.\n * @example\n *\n * ```ts\n * const { Base, Premium } = await loadCKCdnResourcesPack(\n * \tcombineCKCdnBundlesPacks( {\n * \t\tBase: createCKCdnBaseBundlePack( {\n * \t\t\tversion: '44.0.0',\n * \t\t\ttranslations: [ 'es', 'de' ]\n * \t\t} ),\n * \t\tPremium: createCKCdnPremiumBundlePack( {\n * \t\t\tversion: '44.0.0',\n * \t\t\ttranslations: [ 'es', 'de' ]\n * \t\t} )\n * \t} )\n * );\n * ```\n */\nexport function combineCKCdnBundlesPacks<P extends CKCdnBundlesPacks>( packs: P ): CKCdnCombinedBundlePack<P> {\n\tconst normalizedPacks = mapObjectValues(\n\t\tfilterBlankObjectValues( packs ),\n\t\tnormalizeCKCdnResourcesPack\n\t);\n\n\t// Merge all scripts, stylesheets and preload resources from all packs.\n\tconst mergedPacks = Object\n\t\t.values( normalizedPacks )\n\t\t.reduce(\n\t\t\t( acc, pack ) => {\n\t\t\t\tacc.scripts!.push( ...( pack.scripts ?? [] ) );\n\t\t\t\tacc.stylesheets!.push( ...( pack.stylesheets ?? [] ) );\n\t\t\t\tacc.preload!.push( ...( pack.preload ?? [] ) );\n\n\t\t\t\treturn acc;\n\t\t\t},\n\t\t\t{\n\t\t\t\tpreload: [],\n\t\t\t\tscripts: [],\n\t\t\t\tstylesheets: []\n\t\t\t}\n\t\t);\n\n\t// Get exported entries from all packs.\n\tconst checkPluginLoaded = async () => {\n\t\t// Use Object.create() to create an object without a prototype to avoid prototype pollution.\n\t\tconst exportedGlobalVariables: Record<string, unknown> = Object.create( null );\n\n\t\t// It can be done sequentially because scripts *should* be loaded at this point and the whole execution should be quite fast.\n\t\tfor ( const [ name, pack ] of Object.entries( normalizedPacks ) ) {\n\t\t\texportedGlobalVariables[ name ] = await pack?.checkPluginLoaded?.();\n\t\t}\n\n\t\treturn exportedGlobalVariables as any;\n\t};\n\n\t// Call beforeInject method of all packs.\n\tconst beforeInject = () => {\n\t\tfor ( const pack of Object.values( normalizedPacks ) ) {\n\t\t\tpack.beforeInject?.();\n\t\t}\n\t};\n\n\treturn {\n\t\t...mergedPacks,\n\t\tbeforeInject,\n\t\tcheckPluginLoaded\n\t};\n}\n\n/**\n * A map of CKEditor CDN bundles packs.\n */\nexport type CKCdnBundlesPacks = Record<string, CKCdnResourcesPack<any> | undefined>;\n\n/**\n * A combined pack of resources for multiple CKEditor CDN bundles.\n */\nexport type CKCdnCombinedBundlePack<P extends CKCdnBundlesPacks> = CKCdnResourcesAdvancedPack<{\n\t[ K in keyof P ]: InferCKCdnResourcesPackExportsType<P[K]>\n}>;\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { BundleInstallationInfo } from './types.js';\n\nimport { isSemanticVersion } from '../utils/version/isSemanticVersion.js';\n\n/**\n * Returns information about the CKBox installation.\n */\nexport function getCKBoxInstallationInfo(): BundleInstallationInfo | null {\n\tconst version = window.CKBox?.version;\n\n\tif ( !isSemanticVersion( version ) ) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tsource: 'cdn',\n\t\tversion\n\t};\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { waitForWindowEntry } from '../../utils/waitForWindowEntry.js';\nimport { without } from '../../utils/without.js';\nimport { getCKBoxInstallationInfo } from '../../installation-info/getCKBoxInstallationInfo.js';\n\nimport type { CKCdnResourcesAdvancedPack } from '../../cdn/utils/loadCKCdnResourcesPack.js';\nimport { createCKBoxCdnUrl, type CKBoxCdnVersion } from './createCKBoxCdnUrl.js';\n\nimport './globals.js';\n\n/**\n * Creates a pack of resources for the base CKBox bundle.\n *\n * @param config The configuration of the CKBox bundle pack.\n * @returns A pack of resources for the base CKBox bundle.\n * @example\n * ```ts\n * const { CKBox } = await loadCKCdnResourcesPack(\n * \tcreateCKBoxCdnBundlePack( {\n * \t\tversion: '2.5.1',\n * \t\ttheme: 'lark'\n * \t} )\n * );\n * ```\n */\nexport function createCKBoxBundlePack(\n\t{\n\t\tversion,\n\t\ttheme = 'lark',\n\t\ttranslations,\n\t\tcreateCustomCdnUrl = createCKBoxCdnUrl\n\t}: CKBoxCdnBundlePackConfig\n): CKCdnResourcesAdvancedPack<Window['CKBox']> {\n\treturn {\n\t\t// Load the main script of the base features.\n\t\tscripts: [\n\t\t\tcreateCustomCdnUrl( 'ckbox', 'ckbox.js', version ),\n\n\t\t\t// EN bundle is prebuilt into the main script, so we don't need to load it separately.\n\t\t\t...without( [ 'en' ], translations || [] ).map( translation =>\n\t\t\t\tcreateCustomCdnUrl( 'ckbox', `translations/${ translation }.js`, version )\n\t\t\t)\n\t\t],\n\n\t\t// Load optional theme, if provided. It's not required but recommended because it improves the look and feel.\n\t\t...theme && {\n\t\t\tstylesheets: [\n\t\t\t\tcreateCustomCdnUrl( 'ckbox', `styles/themes/${ theme }.css`, version )\n\t\t\t]\n\t\t},\n\n\t\t// Pick the exported global variables from the window object.\n\t\tcheckPluginLoaded: async () =>\n\t\t\twaitForWindowEntry( [ 'CKBox' ] ),\n\n\t\t// Check if the CKBox bundle is already loaded and throw an error if it is.\n\t\tbeforeInject: () => {\n\t\t\tconst installationInfo = getCKBoxInstallationInfo();\n\n\t\t\tif ( installationInfo && installationInfo.version !== version ) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`CKBox is already loaded from CDN in version ${ installationInfo.version }. ` +\n\t\t\t\t\t`Remove the old <script> and <link> tags loading CKBox to allow loading the ${ version } version.`\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Configuration of the base CKEditor bundle pack.\n */\nexport type CKBoxCdnBundlePackConfig = {\n\n\t/**\n\t * The version of  the base CKEditor bundle.\n\t */\n\tversion: CKBoxCdnVersion;\n\n\t/**\n\t * The list of translations to load.\n\t */\n\ttranslations?: Array<string>;\n\n\t/**\n\t * The theme of the CKBox bundle. Default is 'lark'.\n\t */\n\ttheme?: string | null;\n\n\t/**\n\t * Function that creates a custom URL for the CKBox bundle.\n\t */\n\tcreateCustomCdnUrl?: typeof createCKBoxCdnUrl;\n};\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { type CKVersion, isCKTestingVersion } from '../utils/version/isCKVersion.js';\nimport { destructureSemanticVersion } from '../utils/version/destructureSemanticVersion.js';\nimport { getLicenseVersionFromEditorVersion } from './getLicenseVersionFromEditorVersion.js';\n\n/**\n * Checks if the CKEditor CDN is supported by the given editor version.\n *\n * @param version The CKEditor version.\n * @returns `true` if the CDN is supported, `false` otherwise.\n */\nexport function isCKCdnSupportedByEditorVersion( version: CKVersion ): boolean {\n\tif ( isCKTestingVersion( version ) ) {\n\t\treturn true;\n\t}\n\n\tconst { major } = destructureSemanticVersion( version );\n\tconst licenseVersion = getLicenseVersionFromEditorVersion( version );\n\n\tswitch ( licenseVersion ) {\n\t\t// For newer license versions, we support all newer versions.\n\t\tcase 3:\n\t\t\treturn true;\n\n\t\t// For the license v1-v2, we support only the 43 version.\n\t\tdefault:\n\t\t\treturn major === 43;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { mapObjectValues } from '../../utils/mapObjectValues.js';\nimport { waitForWindowEntry } from '../../utils/waitForWindowEntry.js';\n\nimport {\n\tnormalizeCKCdnResourcesPack,\n\ttype InferCKCdnResourcesPackExportsType,\n\ttype CKCdnResourcesAdvancedPack\n} from '../utils/loadCKCdnResourcesPack.js';\n\nimport {\n\tcombineCKCdnBundlesPacks,\n\ttype CKCdnBundlesPacks\n} from '../utils/combineCKCdnBundlesPacks.js';\n\n/**\n * This function is similar to `combineCKCdnBundlesPacks` but it provides global scope\n * fallback for the plugins that do not define the type of the exported entries. In other\n * words if the plugin `Reader` does not define the type of the exported entries, the type\n * will be picked from the `Window[ 'Reader' ]` object.\n *\n * @param pluginsPacks A map of CKEditor plugins packs.\n * @returns A combined pack of resources for multiple CKEditor plugins.\n * @example\n *\n * ```ts\n * const { ScreenReader, AccessibilityChecker } = await loadCKCdnResourcesPack(\n * \tcombineCdnPluginsPacks( {\n * \t\tScreenReader: [ 'https://example.org/screen-reader.js' ],\n * \t\tAccessibilityChecker: [ 'https://example.org/accessibility-checker.js' ]\n * \t} )\n * );\n * ```\n *\n * In example above, `ScreenReader` and `AccessibilityChecker` are the plugins names and\n * the type of the exported entries will be picked from the global (Window) scope.\n */\nexport function combineCdnPluginsPacks<Plugins extends CdnPluginsPacks>(\n\tpluginsPacks: Plugins\n): CombinedPluginsPackWithFallbackScope<Plugins> {\n\tconst normalizedPluginsPacks = mapObjectValues( pluginsPacks, ( pluginPack, pluginName ) => {\n\t\tif ( !pluginPack ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst normalizedPluginPack = normalizeCKCdnResourcesPack( pluginPack );\n\n\t\treturn {\n\t\t\t// Provide default window accessor object if the plugin pack does not define it.\n\t\t\tcheckPluginLoaded: async (): Promise<unknown> =>\n\t\t\t\twaitForWindowEntry( [ pluginName as any ] ),\n\n\t\t\t// Transform the plugin pack to a normalized advanced pack.\n\t\t\t...normalizedPluginPack\n\t\t};\n\t} );\n\n\t// Merge all scripts, stylesheets and preload resources from all packs.\n\treturn combineCKCdnBundlesPacks(\n\t\tnormalizedPluginsPacks\n\t) as CombinedPluginsPackWithFallbackScope<Plugins>;\n}\n\n/**\n * A map of CKEditor plugins packs.\n */\nexport type CdnPluginsPacks = CKCdnBundlesPacks;\n\n/**\n * A combined pack of plugins. It picks the type of the plugin from the global scope if\n * `CKCdnCombinedBundlePack` does not define it in the `checkPluginLoaded` method.\n */\nexport type CombinedPluginsPackWithFallbackScope<P extends CdnPluginsPacks> = CKCdnResourcesAdvancedPack<{\n\t[ K in keyof P ]: FallbackIfUnknown<\n\t\tInferCKCdnResourcesPackExportsType<P[K]>,\n\t\tK extends keyof Window ? Window[ K ] : unknown\n\t>;\n}>;\n\n/**\n * Returns the fallback type if the provided type is unknown.\n */\ntype FallbackIfUnknown<T, Fallback> = unknown extends T ? Fallback : T;\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { createCKCdnBaseBundlePack } from './ck/createCKCdnBaseBundlePack.js';\nimport { createCKCdnPremiumBundlePack } from './ck/createCKCdnPremiumBundlePack.js';\n\nimport { combineCKCdnBundlesPacks } from './utils/combineCKCdnBundlesPacks.js';\nimport {\n\tcreateCKBoxBundlePack,\n\ttype CKBoxCdnBundlePackConfig\n} from './ckbox/createCKBoxCdnBundlePack.js';\n\nimport type { CKCdnUrlCreator } from './ck/createCKCdnUrl.js';\nimport type { ConditionalBlank } from '../types/ConditionalBlank.js';\n\nimport { isCKCdnSupportedByEditorVersion } from '../license/isCKCdnSupportedByEditorVersion.js';\n\nimport {\n\tloadCKCdnResourcesPack,\n\ttype InferCKCdnResourcesPackExportsType\n} from './utils/loadCKCdnResourcesPack.js';\n\nimport {\n\tcombineCdnPluginsPacks,\n\ttype CombinedPluginsPackWithFallbackScope,\n\ttype CdnPluginsPacks\n} from './plugins/combineCdnPluginsPacks.js';\nimport { type CKVersion, isCKTestingVersion } from '../utils/version/isCKVersion.js';\n\n/**\n * A composable function that loads CKEditor Cloud Services bundles.\n * It returns the exports of the loaded bundles.\n *\n * @param config The configuration of the CKEditor Cloud Services bundles to load.\n * @returns The result of the loaded CKEditor Cloud Services bundles.\n * @example\n *\n * Example of loading CKEditor Cloud Services with the premium features and CKBox:\n *\n * ```ts\n * const { CKEditor, CKEditorPremiumFeatures } = await loadCKEditorCloud( {\n * \tversion: '44.0.0',\n * \ttranslations: [ 'es', 'de' ],\n * \tpremium: true\n * } );\n *\n * const { Paragraph } = CKEditor;\n * const { SlashCommands } = CKEditorPremiumFeatures;\n * ```\n *\n * Example of loading CKEditor Cloud Services with custom plugins:\n *\n * ```ts\n * const { CKEditor, loadedPlugins } = await loadCKEditorCloud( {\n * \tversion: '44.0.0',\n * \tplugins: {\n * \t\tPlugin1: async () => import( './your-local-import.umd.js' ),\n * \t\tPlugin2: [\n * \t\t\t'https://cdn.example.com/plugin2.js',\n * \t\t\t'https://cdn.example.com/plugin2.css'\n * \t\t],\n * \t\tPlugin3: {\n * \t\t\tscripts: [ 'https://cdn.example.com/plugin3.js' ],\n * \t\t\tstylesheets: [ 'https://cdn.example.com/plugin3.css' ],\n *\n * \t\t\t// Optional, if it's not passed then the type of `Plugin3` will be picked from `Window`\n * \t\t\tcheckPluginLoaded: () => ( window as any ).Plugin3\n * \t\t}\n * \t}\n * } );\n * ```\n *\n * Type of plugins can be inferred if `checkPluginLoaded` is not provided: In this case,\n * the type of the plugin will be picked from the global window scope.\n */\nexport function loadCKEditorCloud<Config extends CKEditorCloudConfig>(\n\tconfig: Config\n): Promise<CKEditorCloudResult<Config>> {\n\tconst {\n\t\tversion, translations, plugins,\n\t\tpremium, ckbox, createCustomCdnUrl,\n\t\tinjectedHtmlElementsAttributes = {\n\t\t\tcrossorigin: 'anonymous'\n\t\t}\n\t} = config;\n\n\tvalidateCKEditorVersion( version );\n\n\tconst pack = combineCKCdnBundlesPacks( {\n\t\tCKEditor: createCKCdnBaseBundlePack( {\n\t\t\tversion,\n\t\t\ttranslations,\n\t\t\tcreateCustomCdnUrl\n\t\t} ),\n\n\t\t...premium && {\n\t\t\tCKEditorPremiumFeatures: createCKCdnPremiumBundlePack( {\n\t\t\t\tversion,\n\t\t\t\ttranslations,\n\t\t\t\tcreateCustomCdnUrl\n\t\t\t} )\n\t\t},\n\n\t\t...ckbox && {\n\t\t\tCKBox: createCKBoxBundlePack( ckbox )\n\t\t},\n\n\t\tloadedPlugins: combineCdnPluginsPacks( plugins ?? {} )\n\t} );\n\n\treturn loadCKCdnResourcesPack(\n\t\t{\n\t\t\t...pack,\n\t\t\thtmlAttributes: injectedHtmlElementsAttributes\n\t\t}\n\t) as Promise<CKEditorCloudResult<Config>>;\n}\n\n/**\n * Checks if the CKEditor Cloud Services support the given CKEditor 5 version.\n *\n * @param version The CKEditor version to validate.\n */\nfunction validateCKEditorVersion( version: CKVersion ) {\n\tif ( isCKTestingVersion( version ) ) {\n\t\tconsole.warn(\n\t\t\t'You are using a testing version of CKEditor 5. Please remember that it is not suitable for production environments.'\n\t\t);\n\t}\n\n\tif ( !isCKCdnSupportedByEditorVersion( version ) ) {\n\t\tthrow new Error(\n\t\t\t`The CKEditor 5 CDN can't be used with the given editor version: ${ version }. ` +\n\t\t\t'Please make sure you are using at least the CKEditor 5 version 44.'\n\t\t);\n\t}\n}\n\n/**\n * The result of the resolved bundles from CKEditor CDN.\n */\nexport type CKEditorCloudResult<Config extends CKEditorCloudConfig> = {\n\n\t/**\n\t * The base CKEditor bundle exports.\n\t */\n\tCKEditor: NonNullable<Window['CKEDITOR']>;\n\n\t/**\n\t * The CKBox bundle exports.\n\t * It's available only if the `ckbox` configuration is provided.\n\t */\n\tCKBox: ConditionalBlank<\n\t\tConfig['ckbox'],\n\t\tWindow['CKBox']\n\t>;\n\n\t/**\n\t * The CKEditor Premium Features bundle exports.\n\t * It's available only if the `premium` configuration is provided.\n\t */\n\tCKEditorPremiumFeatures: ConditionalBlank<\n\t\tConfig['premium'],\n\t\tWindow['CKEDITOR_PREMIUM_FEATURES']\n\t>;\n\n\t/**\n\t * The additional resources exports.\n\t */\n\tloadedPlugins: InferCKCdnResourcesPackExportsType<\n\t\tCombinedPluginsPackWithFallbackScope<NonNullable<Config['plugins']>>\n\t>;\n};\n\n/**\n * The configuration of the `useCKEditorCloud` hook.\n */\nexport type CKEditorCloudConfig<Plugins extends CdnPluginsPacks = CdnPluginsPacks> = {\n\n\t/**\n\t * The version of CKEditor Cloud Services to use.\n\t */\n\tversion: CKVersion;\n\n\t/**\n\t * The translations to load.\n\t */\n\ttranslations?: Array<string>;\n\n\t/**\n\t * If `true` then the premium features will be loaded.\n\t */\n\tpremium?: boolean;\n\n\t/**\n\t * CKBox bundle configuration.\n\t */\n\tckbox?: CKBoxCdnBundlePackConfig;\n\n\t/**\n\t * Additional resources to load.\n\t */\n\tplugins?: Plugins;\n\n\t/**\n\t * Map of attributes to add to the script, stylesheet and link tags that are injected by the loader.\n\t */\n\tinjectedHtmlElementsAttributes?: Record<string, any>;\n\n\t/**\n\t * The function that creates custom CDN URLs.\n\t */\n\tcreateCustomCdnUrl?: CKCdnUrlCreator;\n};\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { isCKZeroBaseVersion } from '../utils/version/isCKVersion.js';\nimport { isSemanticVersion, type SemanticVersion } from '../utils/version/isSemanticVersion.js';\nimport { compareSemanticVersions, type VersionCompareResult } from '../utils/version/compareSemanticVersions.js';\n\nimport { getCKBaseBundleInstallationInfo } from './getCKBaseBundleInstallationInfo.js';\n\n/**\n * Compares currently installed bundle with passed semantic version.\n *\n * - `1` if installed version > version.\n * - `-1` if installed version < version\n * - `0` if both versions are equal.\n * - `null` if editor is not installed.\n *\n * @param version Semantic version to compare.\n * @returns Comparison result.\n */\nexport function compareInstalledCKBaseVersion( version: SemanticVersion ): VersionCompareResult | null {\n\tconst installedVersion = getCKBaseBundleInstallationInfo()?.version;\n\n\tif ( !installedVersion ) {\n\t\treturn null;\n\t}\n\n\tif ( isCKZeroBaseVersion( version ) ) {\n\t\treturn -1;\n\t}\n\n\tif ( !isSemanticVersion( installedVersion ) || isCKZeroBaseVersion( installedVersion ) ) {\n\t\treturn 1;\n\t}\n\n\treturn compareSemanticVersions( installedVersion, version );\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { compareInstalledCKBaseVersion } from './compareInstalledCKBaseVersion.js';\n\n/**\n * Checks features supported by currently installed version of the editor.\n *\n * @returns Object containing flags that indicate which features are supported.\n */\nexport function getInstalledCKBaseFeatures(): SupportedCKBaseFeatures {\n\tconst installedVersion = compareInstalledCKBaseVersion( '48.0.0' );\n\tconst isV48OrNewer = installedVersion !== null && installedVersion >= 0;\n\n\treturn {\n\t\trootsConfigEntry: isV48OrNewer,\n\t\telementConfigAttachment: isV48OrNewer\n\t};\n}\n\nexport type SupportedCKBaseFeatures = {\n\n\t/**\n\t * Flag that indicates if editor supports `roots` / `root` config entries.\n\t *\n\t * Older versions:\n\t *\n\t * ```ts\n\t * MultirootEditor.create( sourceElementOrData, {\n\t * \trootsAttributes: {\n\t * \t\t\"custom-root\": { ... }\n\t * \t}\n\t * \t// ...\n\t * } )\n\t * ```\n\t *\n\t * Newer versions:\n\t *\n\t * ```ts\n\t * MultirootEditor.create( {\n\t * \troots: {\n\t * \t\t\"custom-root\": { modelAttributes: { ... } }\n\t * \t}\n\t * \t// ...\n\t * } )\n\t * ```\n\t *\n\t * See more: https://github.com/ckeditor/ckeditor5/issues/19885\n\t */\n\trootsConfigEntry: boolean;\n\n\t/**\n\t * Flag that indicates if editor no longer supports `sourceElementOrData` as first parameter\n\t * in its initializer.\n\t *\n\t * Older versions:\n\t *\n\t * ```ts\n\t * ClassicEditor.create( document.querySelector( '#editor' ), { ... } )\n\t * ```\n\t *\n\t * Newer versions:\n\t *\n\t * ```ts\n\t * ClassicEditor.create( {\n\t * \tattachTo: document.querySelector( '#editor' ),\n\t * \t// ...\n\t * } )\n\t * ```\n\t */\n\telementConfigAttachment: boolean;\n};\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { EditorConfig } from 'ckeditor5';\nimport type { EditorRelaxedConfig } from '../types/EditorRelaxedConfig.js';\n\nimport { getInstalledCKBaseFeatures } from '../installation-info/getInstalledCKBaseFeatures.js';\nimport { uniq } from '../utils/uniq.js';\n\n/**\n * Assigns the `attributes` property to the correct field in the editor configuration object, depending on the loaded CKEditor version.\n * The version compatibility matrix is the same as in `assignDataPropToSingleRootEditorConfig`.\n *\n * It handles scenario when legacy `rootsAttributes` is still passed to the configuration and maps it to `config.roots`.\n *\n * @param attributes The editor roots attributes.\n * @param config The editor configuration.\n * @returns The editor configuration with assigned `attributes` property.\n */\nexport function assignAttributesPropToMultiRootEditorConfig(\n\tattributes: Record<string, Record<string, any>> | undefined,\n\tconfig: EditorRelaxedConfig\n): EditorConfig {\n\tconst supports = getInstalledCKBaseFeatures();\n\n\t// For >= 48.x versions, the `attributes` property should be assigned to `root.modelAttributes` field in the configuration object.\n\tif ( supports.rootsConfigEntry ) {\n\t\tconst knownRootsKeys = uniq( [\n\t\t\t...Object.keys( attributes || {} ),\n\t\t\t...Object.keys( config.roots || {} ),\n\t\t\t...Object.keys( config.rootsAttributes || {} )\n\t\t] );\n\n\t\tconst roots = knownRootsKeys.reduce( ( acc, rootName ) => {\n\t\t\tconst legacyRootAttributes = config.rootsAttributes?.[ rootName ];\n\t\t\tconst configRootValue = ( config as any ).roots?.[ rootName ];\n\n\t\t\tacc[ rootName ] = {\n\t\t\t\t...configRootValue,\n\t\t\t\tmodelAttributes: attributes?.[ rootName ] ?? {\n\t\t\t\t\t...legacyRootAttributes,\n\t\t\t\t\t...configRootValue?.modelAttributes\n\t\t\t\t}\n\t\t\t};\n\n\t\t\treturn acc;\n\t\t}, Object.create( null ) );\n\n\t\tconst mappedConfig: Record<string, any> = {\n\t\t\t...config,\n\t\t\troots\n\t\t};\n\n\t\tdelete mappedConfig.rootsAttributes;\n\n\t\treturn mappedConfig as unknown as EditorConfig;\n\t}\n\n\t// Fallback for <= 47.x versions which uses `rootsAttributes` field in the configuration object.\n\treturn {\n\t\t...config,\n\t\trootsAttributes: attributes\n\t} as unknown as EditorConfig;\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { EditorConfig } from 'ckeditor5';\nimport type { EditorRelaxedConfig } from '../types/EditorRelaxedConfig.js';\n\nimport { getInstalledCKBaseFeatures } from '../installation-info/getInstalledCKBaseFeatures.js';\nimport { uniq } from '../utils/uniq.js';\n\n/**\n * Assigns the `initialData` property to multiroot configuration.\n *\n * @param data The editor data from the bound component property to be assigned.\n * @param config The editor configuration.\n * @returns The editor configuration with assigned `initialData` property.\n */\nexport function assignInitialDataToMultirootEditorConfig(\n\tdata: Record<string, string> | undefined,\n\tconfig: EditorRelaxedConfig\n): EditorRelaxedConfig {\n\tconst supports = getInstalledCKBaseFeatures();\n\n\t// For >= 48.x versions, the `initialData` property should be assigned to `root.initialData` field in the configuration object.\n\tif ( supports.rootsConfigEntry ) {\n\t\tconst knownRootsKeys = uniq( [\n\t\t\t...Object.keys( data || {} ),\n\t\t\t...Object.keys( config.roots || {} ),\n\t\t\t...typeof config.initialData === 'string' ? [] : Object.keys( config.initialData || {} )\n\t\t] );\n\n\t\tconst roots = knownRootsKeys.reduce( ( acc, rootName ) => {\n\t\t\tconst rootConfig = config.roots?.[ rootName ];\n\t\t\tconst rootInitialData = rootConfig?.initialData;\n\n\t\t\tif ( rootInitialData && data?.[ rootName ] ) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t`Editor data should be provided either using \\`config.roots['${ rootName }'].initialData\\` ` +\n                    'or the bound component property. The config value takes precedence ' +\n                    'over the bound component property and will be used when both are specified.'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tacc[ rootName ] = {\n\t\t\t\t...rootConfig,\n\t\t\t\tinitialData: rootInitialData || data?.[ rootName ] || config.initialData?.[ rootName ] || ''\n\t\t\t};\n\n\t\t\treturn acc;\n\t\t}, Object.create( null ) );\n\n\t\tconst normalizedConfig: EditorRelaxedConfig = {\n\t\t\t...config,\n\t\t\troots\n\t\t};\n\n\t\tdelete normalizedConfig.initialData;\n\n\t\treturn normalizedConfig as unknown as EditorConfig;\n\t}\n\n\t// Fallback for <= 47.x versions which uses `initialData` field in the configuration object.\n\tif ( data && config?.initialData ) {\n\t\tconsole.warn(\n\t\t\t'Editor data should be provided either using `config.initialData` ' +\n            'or the bound component property. The config value takes precedence ' +\n            'over the bound component property and will be used when both are specified.'\n\t\t);\n\t}\n\n\treturn {\n\t\t...config,\n\t\tinitialData: config?.initialData || data\n\t} as unknown as EditorConfig;\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { EditorRelaxedConstructor } from '../types/EditorRelaxedConstructor.js';\nimport type { EditorRelaxedConfig } from '../types/EditorRelaxedConfig.js';\n\n/**\n * Assigns a DOM element to the editor configuration in a way that is compatible with the specific editor type.\n *\n * @param Editor Constructor of the editor used to determine the location of element config entry.\n * @param element Element to be assigned to config.\n * @param config Config of the editor.\n * @returns The updated configuration object.\n */\nexport function assignElementToEditorConfig(\n\tEditor: EditorRelaxedConstructor,\n\telement: HTMLElement,\n\tconfig: EditorRelaxedConfig\n): EditorRelaxedConfig {\n\tif ( !Editor.editorName || Editor.editorName === 'ClassicEditor' ) {\n\t\treturn {\n\t\t\t...config,\n\t\t\tattachTo: element\n\t\t};\n\t}\n\n\tconst mappedConfig: EditorRelaxedConfig = {\n\t\t...config,\n\t\troots: {\n\t\t\t...config.roots,\n\t\t\tmain: {\n\t\t\t\t...config.root,\n\t\t\t\t...config.roots?.main,\n\t\t\t\telement\n\t\t\t}\n\t\t}\n\t};\n\n\tdelete mappedConfig.root;\n\n\treturn mappedConfig;\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport { getInstalledCKBaseFeatures } from '../installation-info/getInstalledCKBaseFeatures.js';\nimport type { EditorRelaxedConfig } from '../types/EditorRelaxedConfig.js';\n\n/**\n * Retrieves the initial data from the editor configuration object, depending on the loaded CKEditor version.\n */\nexport function getInitialDataFromEditorConfig( config: EditorRelaxedConfig ): string | undefined {\n\tconst supports = getInstalledCKBaseFeatures();\n\n\tif ( supports.rootsConfigEntry ) {\n\t\treturn config.roots?.main?.initialData || config.root?.initialData || /* legacy */ config.initialData;\n\t}\n\n\treturn config.initialData;\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\nimport type { EditorConfig } from 'ckeditor5';\n\nimport { getInitialDataFromEditorConfig } from './getInitialDataFromEditorConfig.js';\nimport { getInstalledCKBaseFeatures } from '../installation-info/getInstalledCKBaseFeatures.js';\n\nimport type { EditorRelaxedConfig } from '../types/EditorRelaxedConfig.js';\n\n/**\n * Assigns the `data` property to the appropriate field in the editor configuration,\n * ensuring compatibility with different CKEditor 5 versions.\n *\n * Version differences:\n * 1. LTS (47.x): Uses the top-level `initialData` property and does not support per-root configurations.\n * 2. Latest (48.x+): Uses `roots.main.initialData` and deprecates the top-level `initialData`.\n *\n * @param config The editor configuration object.\n * @param data The editor data. Used to log warnings if data is passed both via config and component properties.\n * @param ignoreConfigInitialData If `true`, the provided `data` argument will override any initial data defined in the `config`.\n */\nexport function assignInitialDataToEditorConfig(\n\tconfig: EditorRelaxedConfig,\n\tdata?: string | undefined,\n\tignoreConfigInitialData?: boolean\n): EditorConfig {\n\tconst supports = getInstalledCKBaseFeatures();\n\tconst configInitialData = ignoreConfigInitialData ? null : getInitialDataFromEditorConfig( config );\n\n\t// Handle >= 48.x versions: Map data to the `roots.main.initialData` property.\n\tif ( supports.rootsConfigEntry ) {\n\t\tconst normalizedConfig: any = {\n\t\t\t...config,\n\t\t\troots: {\n\t\t\t\t...config.roots,\n\t\t\t\tmain: {\n\t\t\t\t\t...config.root,\n\t\t\t\t\t...config.roots?.main,\n\t\t\t\t\tinitialData: configInitialData || data || ''\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tif ( data && configInitialData ) {\n\t\t\tconsole.warn(\n\t\t\t\t'Editor data should be provided either via the config ' +\n                '(`config.root.initialData`) or the component\\'s `data` ' +\n                'property, but not both. The configuration value takes precedence.'\n\t\t\t);\n\t\t}\n\n\t\tdelete normalizedConfig.root;\n\t\tdelete normalizedConfig.initialData;\n\n\t\treturn normalizedConfig as unknown as EditorConfig;\n\t}\n\n\t// Fallback for <= 47.x versions: Use the legacy top-level `initialData` property.\n\tif ( data && configInitialData ) {\n\t\tconsole.warn(\n\t\t\t'Editor data should be provided either via the config ' +\n            '(`config.initialData`) or the component\\'s `data` ' +\n            'property, but not both. The configuration value takes precedence.'\n\t\t);\n\t}\n\n\treturn {\n\t\t...config,\n\t\tinitialData: configInitialData || data || ''\n\t} as unknown as EditorConfig;\n}\n"],"names":[],"mappings":";;;;;;CAgBO,SAAS,WAAA,GAAkC;CACjD,EAAA,MAAM,QAAA,GAAqB;CAAA,IAC1B,OAAA,EAAS,IAAA;CAAA,IACT,OAAA,EAAS;CAAA,GACV;CAEA,EAAA,QAAA,CAAS,OAAA,GAAU,IAAI,OAAA,CAAY,CAAA,OAAA,KAAW;CAC7C,IAAA,QAAA,CAAS,OAAA,GAAU,OAAA;CAAA,EACpB,CAAE,CAAA;CAEF,EAAA,OAAO,QAAA;CACR;;CCFO,SAAS,QACf,QAAA,EACA;CAAA,EACC,YAAA,GAAe,GAAA;CAAA,EACf,UAAA,GAAa;CACd,CAAA,GAAmB,EAAC,EACP;CAEb,EAAA,OAAO,IAAI,OAAA,CAAY,CAAE,OAAA,EAAS,MAAA,KAAY;CAC7C,IAAA,MAAM,SAAA,GAAY,KAAK,GAAA,EAAI;CAC3B,IAAA,IAAI,SAAA,GAA0B,IAAA;CAE9B,IAAA,MAAM,cAAA,GA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