File: //home/arjun/projects/buyercall/node_modules/@ckeditor/ckeditor5-alignment/build/alignment.js.map
{"version":3,"sources":["webpack://CKEditor5.alignment/./src/alignment.js","webpack://CKEditor5.alignment/./src/alignmentcommand.js","webpack://CKEditor5.alignment/./src/alignmentediting.js","webpack://CKEditor5.alignment/./src/alignmentui.js","webpack://CKEditor5.alignment/./src/utils.js","webpack://CKEditor5.alignment/delegated \"./src/core.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.alignment/delegated \"./src/ui.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.alignment/delegated \"./src/utils.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.alignment/external var \"CKEditor5.dll\"","webpack://CKEditor5.alignment/webpack/bootstrap","webpack://CKEditor5.alignment/webpack/runtime/define property getters","webpack://CKEditor5.alignment/webpack/runtime/hasOwnProperty shorthand","webpack://CKEditor5.alignment/webpack/runtime/make namespace object","webpack://CKEditor5.alignment/./src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;;AAEM;AACV;;AAExC;AACA;AACA;AACA,uCAAuC;AACvC,YAAY,kCAAkC;AAC9C;AACA,4CAA4C,0DAA0D;AACtG,IAAI,gDAAgD;AACpD;AACA;AACA;AACe,wBAAwB,sDAAM;AAC7C;AACA;AACA;AACA;AACA,WAAW,yDAAgB,EAAE,oDAAW;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B,6DAA6D;AAC1F;AACA,iBAAiB,iDAAiD;AAClE;AACA,YAAY,4CAA4C;AACxD;;AAEA;AACA,6BAA6B,6DAA6D;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,QAAQ,oFAAoF;AAC5F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,+FAA+F;AACnG;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,0CAA0C;AACpD,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,oBAAoB,sFAAsF;AAC1G;AACA,YAAY,kEAAkE;AAC9E;;;;;;;;;;;;;;;;;;;ACxGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE6C;AACD;;AAER;;AAEpC;;AAEA;AACA;AACA;AACA;AACA;AACe,+BAA+B,uDAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,0DAAK;;AAE1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,iDAAS;;AAEpC;AACA;AACA,KAAK;AACL;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,YAAY,qCAAqC;AACjD,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC7GA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;;AAEM;AAC4C;;AAE9F;AACA,qDAAqD,kEAAkE;AACvH,wDAAwD,4CAA4C;AACpG;AACA;AACe,+BAA+B,sDAAM;AACpD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,wDAAoB,gBAAgB,eAAe;AACpE,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,iEAAyB;;AAE3C;AACA;AACA,aAAa,mDAAW,oBAAoB,iDAAS;AACrD;;AAEA;AACA;;AAEA;AACA,6BAA6B,+BAA+B;AAC5D,6DAA6D,qBAAqB;;AAElF;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,wCAAwC,yDAAgB;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,mCAAmC;AACjD;AACA,cAAc,QAAQ;AACtB;AACA;;;;;;;;;;;;;;;;;;;AC3LA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEmD;AACiC;;AAEnB;;AAEjE;AACA,WAAW,+DAAe;AAC1B,YAAY,gEAAgB;AAC5B,aAAa,iEAAiB;AAC9B,cAAc,kEAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,0BAA0B,sDAAM;AAC/C;AACA;AACA;AACA;AACA,KAAK,0DAA0D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iEAAyB;;AAE3C;AACA;AACA,YAAY,+CAAW;AACvB;;AAEA;AACA,wBAAwB,gEAAc;;AAEtC;AACA,iFAAiF,aAAa;AAC9F,GAAG,sEAAoB;;AAEvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA,gDAAgD,QAAQ;AACxD;AACA,0BAA0B,wDAAU;;AAEpC;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,gBAAgB;AACnD;AACA,KAAK;;AAEL;AACA,IAAI;AACJ;AACA;;;;;;;;;;;;;;;;;;;;AC3JA;AACA;AACA;AACA;;AAEgE;;AAEhE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;;AAEP;AACA,qDAAqD,yDAAyD;AAC9G;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,4BAA4B,YAAY,+CAA+C;AAClG,aAAa;AACb;AACO;AACP;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kEAAkE;AAC7E,aAAa,2DAA2D;AACxE;AACO;AACP;AACA;AACA;;AAEA;AACA,eAAe;AACf,KAAK;AACL;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,IAAI,+DAAU,4CAA4C,SAAS;AACnE;;AAEA;AACA,IAAI;;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kEAAkE;AAC/E;AACA,YAAY,8DAAa,+CAA+C,oBAAoB;AAC5F;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,kEAAkE;AAChF;AACA,aAAa,8DAAa,6CAA6C,4BAA4B;AACnG;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,kEAAkE;AACjF;AACA;AACA,cAAc,8DAAa,kDAAkD,4BAA4B;AACzG;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;ACtIA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEmD;AACc;AACV","file":"alignment.js","sourcesContent":["/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module alignment/alignment\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\n\nimport AlignmentEditing from './alignmentediting';\nimport AlignmentUI from './alignmentui';\n\n/**\n * The text alignment plugin.\n *\n * For a detailed overview, check the {@glink features/text-alignment Text alignment feature documentation}\n * and the {@glink api/alignment package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:alignment/alignmentediting~AlignmentEditing} and\n * {@link module:alignment/alignmentui~AlignmentUI} plugins.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class Alignment extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ AlignmentEditing, AlignmentUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'Alignment';\n\t}\n}\n\n/**\n * The configuration of the {@link module:alignment/alignment~Alignment alignment feature}.\n *\n * Read more in {@link module:alignment/alignment~AlignmentConfig}.\n *\n * @member {module:alignment/alignment~AlignmentConfig} module:core/editor/editorconfig~EditorConfig#alignment\n */\n\n/**\n * The configuration of the {@link module:alignment/alignment~Alignment alignment feature}.\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n *\t\t\t\talignment: {\n *\t\t\t\t\toptions: [ 'left', 'right' ]\n *\t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.\n *\n * @interface AlignmentConfig\n */\n\n/**\n * Available alignment options.\n *\n * The available options are: `'left'`, `'right'`, `'center'` and `'justify'`. Other values are ignored.\n *\n * **Note:** It is recommended to always use `'left'` or `'right'` as these are default values which the user should\n * normally be able to choose depending on the\n * {@glink features/ui-language#setting-the-language-of-the-content language of the editor content}.\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n *\t\t\t\talignment: {\n *\t\t\t\t\toptions: [ 'left', 'right' ]\n *\t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * By default the alignment is set inline using the `text-align` CSS property. To further customize the alignment,\n * you can provide names of classes for each alignment option using the `className` property.\n *\n * **Note:** Once you define the `className` property for one option, you need to specify it for all other options.\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n *\t\t\t\talignment: {\n *\t\t\t\t\toptions: [\n *\t\t\t\t\t\t{ name: 'left', className: 'my-align-left' },\n *\t\t\t\t\t\t{ name: 'right', className: 'my-align-right' }\n *\t\t\t\t\t]\n *\t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * See the demo of {@glink features/text-alignment#configuring-alignment-options custom alignment options}.\n *\n * @member {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} module:alignment/alignment~AlignmentConfig#options\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module alignment/alignmentcommand\n */\n\nimport { Command } from 'ckeditor5/src/core';\nimport { first } from 'ckeditor5/src/utils';\n\nimport { isDefault } from './utils';\n\nconst ALIGNMENT = 'alignment';\n\n/**\n * The alignment command plugin.\n *\n * @extends module:core/command~Command\n */\nexport default class AlignmentCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\trefresh() {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst firstBlock = first( this.editor.model.document.selection.getSelectedBlocks() );\n\n\t\t// As first check whether to enable or disable the command as the value will always be false if the command cannot be enabled.\n\t\tthis.isEnabled = !!firstBlock && this._canBeAligned( firstBlock );\n\n\t\t/**\n\t\t * A value of the current block's alignment.\n\t\t *\n\t\t * @observable\n\t\t * @readonly\n\t\t * @member {String} #value\n\t\t */\n\t\tif ( this.isEnabled && firstBlock.hasAttribute( 'alignment' ) ) {\n\t\t\tthis.value = firstBlock.getAttribute( 'alignment' );\n\t\t} else {\n\t\t\tthis.value = locale.contentLanguageDirection === 'rtl' ? 'right' : 'left';\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command. Applies the alignment `value` to the selected blocks.\n\t * If no `value` is passed, the `value` is the default one or it is equal to the currently selected block's alignment attribute,\n\t * the command will remove the attribute from the selected blocks.\n\t *\n\t * @param {Object} [options] Options for the executed command.\n\t * @param {String} [options.value] The value to apply.\n\t * @fires execute\n\t */\n\texecute( options = {} ) {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst model = editor.model;\n\t\tconst doc = model.document;\n\n\t\tconst value = options.value;\n\n\t\tmodel.change( writer => {\n\t\t\t// Get only those blocks from selected that can have alignment set\n\t\t\tconst blocks = Array.from( doc.selection.getSelectedBlocks() ).filter( block => this._canBeAligned( block ) );\n\t\t\tconst currentAlignment = blocks[ 0 ].getAttribute( 'alignment' );\n\n\t\t\t// Remove alignment attribute if current alignment is:\n\t\t\t// - default (should not be stored in model as it will bloat model data)\n\t\t\t// - equal to currently set\n\t\t\t// - or no value is passed - denotes default alignment.\n\t\t\tconst removeAlignment = isDefault( value, locale ) || currentAlignment === value || !value;\n\n\t\t\tif ( removeAlignment ) {\n\t\t\t\tremoveAlignmentFromSelection( blocks, writer );\n\t\t\t} else {\n\t\t\t\tsetAlignmentOnSelection( blocks, writer, value );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks whether a block can have alignment set.\n\t *\n\t * @private\n\t * @param {module:engine/model/element~Element} block The block to be checked.\n\t * @returns {Boolean}\n\t */\n\t_canBeAligned( block ) {\n\t\treturn this.editor.model.schema.checkAttribute( block, ALIGNMENT );\n\t}\n}\n\n// Removes the alignment attribute from blocks.\n// @private\nfunction removeAlignmentFromSelection( blocks, writer ) {\n\tfor ( const block of blocks ) {\n\t\twriter.removeAttribute( ALIGNMENT, block );\n\t}\n}\n\n// Sets the alignment attribute on blocks.\n// @private\nfunction setAlignmentOnSelection( blocks, writer, alignment ) {\n\tfor ( const block of blocks ) {\n\t\twriter.setAttribute( ALIGNMENT, alignment, block );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module alignment/alignmentediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\n\nimport AlignmentCommand from './alignmentcommand';\nimport { isDefault, isSupported, normalizeAlignmentOptions, supportedOptions } from './utils';\n\n/**\n * The alignment editing feature. It introduces the {@link module:alignment/alignmentcommand~AlignmentCommand command} and adds\n * the `alignment` attribute for block elements in the {@link module:engine/model/model~Model model}.\n * @extends module:core/plugin~Plugin\n */\nexport default class AlignmentEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'AlignmentEditing';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'alignment', {\n\t\t\toptions: [ ...supportedOptions.map( option => ( { name: option } ) ) ]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst schema = editor.model.schema;\n\n\t\tconst options = normalizeAlignmentOptions( editor.config.get( 'alignment.options' ) );\n\n\t\t// Filter out unsupported options and those that are redundant, e.g. `left` in LTR / `right` in RTL mode.\n\t\tconst optionsToConvert = options.filter(\n\t\t\toption => isSupported( option.name ) && !isDefault( option.name, locale )\n\t\t);\n\n\t\t// Once there is at least one `className` defined, we switch to alignment with classes.\n\t\tconst shouldUseClasses = optionsToConvert.some( option => !!option.className );\n\n\t\t// Allow alignment attribute on all blocks.\n\t\tschema.extend( '$block', { allowAttributes: 'alignment' } );\n\t\teditor.model.schema.setAttributeProperties( 'alignment', { isFormatting: true } );\n\n\t\tif ( shouldUseClasses ) {\n\t\t\teditor.conversion.attributeToAttribute( buildClassDefinition( optionsToConvert ) );\n\t\t} else {\n\t\t\t// Downcast inline styles.\n\t\t\teditor.conversion.for( 'downcast' ).attributeToAttribute( buildDowncastInlineDefinition( optionsToConvert ) );\n\t\t}\n\n\t\tconst upcastInlineDefinitions = buildUpcastInlineDefinitions( optionsToConvert );\n\n\t\t// Always upcast from inline styles.\n\t\tfor ( const definition of upcastInlineDefinitions ) {\n\t\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( definition );\n\t\t}\n\n\t\tconst upcastCompatibilityDefinitions = buildUpcastCompatibilityDefinitions( optionsToConvert );\n\n\t\t// Always upcast from deprecated `align` attribute.\n\t\tfor ( const definition of upcastCompatibilityDefinitions ) {\n\t\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( definition );\n\t\t}\n\n\t\teditor.commands.add( 'alignment', new AlignmentCommand( editor ) );\n\t}\n}\n\n// Prepare downcast conversion definition for inline alignment styling.\n// @private\nfunction buildDowncastInlineDefinition( options ) {\n\tconst definition = {\n\t\tmodel: {\n\t\t\tkey: 'alignment',\n\t\t\tvalues: options.map( option => option.name )\n\t\t},\n\t\tview: {}\n\t};\n\n\tfor ( const { name } of options ) {\n\t\tdefinition.view[ name ] = {\n\t\t\tkey: 'style',\n\t\t\tvalue: {\n\t\t\t\t'text-align': name\n\t\t\t}\n\t\t};\n\t}\n\n\treturn definition;\n}\n\n// Prepare upcast definitions for inline alignment styles.\n// @private\nfunction buildUpcastInlineDefinitions( options ) {\n\tconst definitions = [];\n\n\tfor ( const { name } of options ) {\n\t\tdefinitions.push( {\n\t\t\tview: {\n\t\t\t\tkey: 'style',\n\t\t\t\tvalue: {\n\t\t\t\t\t'text-align': name\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'alignment',\n\t\t\t\tvalue: name\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn definitions;\n}\n\n// Prepare upcast definitions for deprecated `align` attribute.\n// @private\nfunction buildUpcastCompatibilityDefinitions( options ) {\n\tconst definitions = [];\n\n\tfor ( const { name } of options ) {\n\t\tdefinitions.push( {\n\t\t\tview: {\n\t\t\t\tkey: 'align',\n\t\t\t\tvalue: name\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'alignment',\n\t\t\t\tvalue: name\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn definitions;\n}\n\n// Prepare conversion definitions for upcast and downcast alignment with classes.\n// @private\nfunction buildClassDefinition( options ) {\n\tconst definition = {\n\t\tmodel: {\n\t\t\tkey: 'alignment',\n\t\t\tvalues: options.map( option => option.name )\n\t\t},\n\t\tview: {}\n\t};\n\n\tfor ( const option of options ) {\n\t\tdefinition.view[ option.name ] = {\n\t\t\tkey: 'class',\n\t\t\tvalue: option.className\n\t\t};\n\t}\n\n\treturn definition;\n}\n\n/**\n * The alignment configuration format descriptor.\n *\n *\t\tconst alignmentFormat = {\n *\t\t\tname: 'right',\n *\t\t\tclassName: 'my-align-right-class'\n *\t\t}\n *\n * @typedef {Object} module:alignment/alignmentediting~AlignmentFormat\n *\n * @property {'left'|'right'|'center'|'justify'} name One of the alignment names options.\n *\n * @property {String} className The CSS class used to represent the style in the view.\n * Used to override default, inline styling for alignment.\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module alignment/alignmentui\n */\n\nimport { Plugin, icons } from 'ckeditor5/src/core';\nimport { ButtonView, createDropdown, addToolbarToDropdown } from 'ckeditor5/src/ui';\n\nimport { isSupported, normalizeAlignmentOptions } from './utils';\n\nconst iconsMap = new Map( [\n\t[ 'left', icons.alignLeft ],\n\t[ 'right', icons.alignRight ],\n\t[ 'center', icons.alignCenter ],\n\t[ 'justify', icons.alignJustify ]\n] );\n\n/**\n * The default alignment UI plugin.\n *\n * It introduces the `'alignment:left'`, `'alignment:right'`, `'alignment:center'` and `'alignment:justify'` buttons\n * and the `'alignment'` dropdown.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class AlignmentUI extends Plugin {\n\t/**\n\t * Returns the localized option titles provided by the plugin.\n\t *\n\t * The following localized titles corresponding with\n\t * {@link module:alignment/alignment~AlignmentConfig#options} are available:\n\t *\n\t * * `'left'`,\n\t * * `'right'`,\n\t * * `'center'`,\n\t * * `'justify'`.\n\t *\n\t * @readonly\n\t * @type {Object.<String,String>}\n\t */\n\tget localizedOptionTitles() {\n\t\tconst t = this.editor.t;\n\n\t\treturn {\n\t\t\t'left': t( 'Align left' ),\n\t\t\t'right': t( 'Align right' ),\n\t\t\t'center': t( 'Align center' ),\n\t\t\t'justify': t( 'Justify' )\n\t\t};\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'AlignmentUI';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst componentFactory = editor.ui.componentFactory;\n\t\tconst t = editor.t;\n\t\tconst options = normalizeAlignmentOptions( editor.config.get( 'alignment.options' ) );\n\n\t\toptions\n\t\t\t.map( option => option.name )\n\t\t\t.filter( isSupported )\n\t\t\t.forEach( option => this._addButton( option ) );\n\n\t\tcomponentFactory.add( 'alignment', locale => {\n\t\t\tconst dropdownView = createDropdown( locale );\n\n\t\t\t// Add existing alignment buttons to dropdown's toolbar.\n\t\t\tconst buttons = options.map( option => componentFactory.create( `alignment:${ option.name }` ) );\n\t\t\taddToolbarToDropdown( dropdownView, buttons );\n\n\t\t\t// Configure dropdown properties an behavior.\n\t\t\tdropdownView.buttonView.set( {\n\t\t\t\tlabel: t( 'Text alignment' ),\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tdropdownView.toolbarView.isVertical = true;\n\t\t\tdropdownView.toolbarView.ariaLabel = t( 'Text alignment toolbar' );\n\n\t\t\tdropdownView.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: 'ck-alignment-dropdown'\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// The default icon depends on the direction of the content.\n\t\t\tconst defaultIcon = locale.contentLanguageDirection === 'rtl' ? iconsMap.get( 'right' ) : iconsMap.get( 'left' );\n\n\t\t\t// Change icon to reflect current selection's alignment.\n\t\t\tdropdownView.buttonView.bind( 'icon' ).toMany( buttons, 'isOn', ( ...areActive ) => {\n\t\t\t\t// Get the index of an active button.\n\t\t\t\tconst index = areActive.findIndex( value => value );\n\n\t\t\t\t// If none of the commands is active, display either defaultIcon or the first button's icon.\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\treturn defaultIcon;\n\t\t\t\t}\n\n\t\t\t\t// Return active button's icon.\n\t\t\t\treturn buttons[ index ].icon;\n\t\t\t} );\n\n\t\t\t// Enable button if any of the buttons is enabled.\n\t\t\tdropdownView.bind( 'isEnabled' ).toMany( buttons, 'isEnabled', ( ...areEnabled ) => areEnabled.some( isEnabled => isEnabled ) );\n\n\t\t\treturn dropdownView;\n\t\t} );\n\t}\n\n\t/**\n\t * Helper method for initializing the button and linking it with an appropriate command.\n\t *\n\t * @private\n\t * @param {String} option The name of the alignment option for which the button is added.\n\t */\n\t_addButton( option ) {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( `alignment:${ option }`, locale => {\n\t\t\tconst command = editor.commands.get( 'alignment' );\n\t\t\tconst buttonView = new ButtonView( locale );\n\n\t\t\tbuttonView.set( {\n\t\t\t\tlabel: this.localizedOptionTitles[ option ],\n\t\t\t\ticon: iconsMap.get( option ),\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\t// Bind button model to command.\n\t\t\tbuttonView.bind( 'isEnabled' ).to( command );\n\t\t\tbuttonView.bind( 'isOn' ).to( command, 'value', value => value === option );\n\n\t\t\t// Execute command.\n\t\t\tthis.listenTo( buttonView, 'execute', () => {\n\t\t\t\teditor.execute( 'alignment', { value: option } );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn buttonView;\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\nimport { CKEditorError, logWarning } from 'ckeditor5/src/utils';\n\n/**\n * @module alignment/utils\n */\n\n/**\n * The list of supported alignment options:\n *\n * * `'left'`,\n * * `'right'`,\n * * `'center'`,\n * * `'justify'`\n */\nexport const supportedOptions = [ 'left', 'right', 'center', 'justify' ];\n\n/**\n * Checks whether the passed option is supported by {@link module:alignment/alignmentediting~AlignmentEditing}.\n *\n * @param {String} option The option value to check.\n * @returns {Boolean}\n */\nexport function isSupported( option ) {\n\treturn supportedOptions.includes( option );\n}\n\n/**\n * Checks whether alignment is the default one considering the direction\n * of the editor content.\n *\n * @param {String} alignment The name of the alignment to check.\n * @param {module:utils/locale~Locale} locale The {@link module:core/editor/editor~Editor#locale} instance.\n * @returns {Boolean}\n */\nexport function isDefault( alignment, locale ) {\n\t// Right now only LTR is supported so the 'left' value is always the default one.\n\n\tif ( locale.contentLanguageDirection == 'rtl' ) {\n\t\treturn alignment === 'right';\n\t} else {\n\t\treturn alignment === 'left';\n\t}\n}\n\n/**\n * Brings the configuration to the common form, an array of objects.\n *\n * @param {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} configuredOptions Alignment plugin configuration.\n * @returns {Array.<module:alignment/alignmentediting~AlignmentFormat>} Normalized object holding the configuration.\n */\nexport function normalizeAlignmentOptions( configuredOptions ) {\n\tconst normalizedOptions = configuredOptions\n\t\t.map( option => {\n\t\t\tlet result;\n\n\t\t\tif ( typeof option == 'string' ) {\n\t\t\t\tresult = { name: option };\n\t\t\t} else {\n\t\t\t\tresult = option;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t} )\n\t\t// Remove all unknown options.\n\t\t.filter( option => {\n\t\t\tconst isNameValid = !!supportedOptions.includes( option.name );\n\t\t\tif ( !isNameValid ) {\n\t\t\t\t/**\n\t\t\t\t * The `name` in one of the `alignment.options` is not recognized.\n\t\t\t\t * The available options are: `'left'`, `'right'`, `'center'` and `'justify'`.\n\t\t\t\t *\n\t\t\t\t * @error alignment-config-name-not-recognized\n\t\t\t\t * @param {Object} option Options with unknown value of the `name` property.\n\t\t\t\t */\n\t\t\t\tlogWarning( 'alignment-config-name-not-recognized', { option } );\n\t\t\t}\n\n\t\t\treturn isNameValid;\n\t\t} );\n\n\tconst classNameCount = normalizedOptions.filter( option => !!option.className ).length;\n\n\t// We either use classes for all styling options or for none.\n\tif ( classNameCount && classNameCount < normalizedOptions.length ) {\n\t\t/**\n\t\t * The `className` property has to be defined for all options once at least one option declares `className`.\n\t\t *\n\t\t * @error alignment-config-classnames-are-missing\n\t\t * @param {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} configuredOptions Contents of `alignment.options`.\n\t\t */\n\t\tthrow new CKEditorError( 'alignment-config-classnames-are-missing', { configuredOptions } );\n\t}\n\n\t// Validate resulting config.\n\tnormalizedOptions.forEach( ( option, index, allOptions ) => {\n\t\tconst succeedingOptions = allOptions.slice( index + 1 );\n\t\tconst nameAlreadyExists = succeedingOptions.some( item => item.name == option.name );\n\n\t\tif ( nameAlreadyExists ) {\n\t\t\t/**\n\t\t\t * The same `name` in one of the `alignment.options` was already declared.\n\t\t\t * Each `name` representing one alignment option can be set exactly once.\n\t\t\t *\n\t\t\t * @error alignment-config-name-already-defined\n\t\t\t * @param {Object} option First option that declares given `name`.\n\t\t\t * @param {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} configuredOptions Contents of `alignment.options`.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'alignment-config-name-already-defined', { option, configuredOptions } );\n\t\t}\n\n\t\t// The `className` property is present. Check for duplicates then.\n\t\tif ( option.className ) {\n\t\t\tconst classNameAlreadyExists = succeedingOptions.some( item => item.className == option.className );\n\n\t\t\tif ( classNameAlreadyExists ) {\n\t\t\t\t/**\n\t\t\t\t * The same `className` in one of the `alignment.options` was already declared.\n\t\t\t\t *\n\t\t\t\t * @error alignment-config-classname-already-defined\n\t\t\t\t * @param {Object} option First option that declares given `className`.\n\t\t\t\t * @param {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} configuredOptions\n\t\t\t\t * Contents of `alignment.options`.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'alignment-config-classname-already-defined', { option, configuredOptions } );\n\t\t\t}\n\t\t}\n\t} );\n\n\treturn normalizedOptions;\n}\n","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/core.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/ui.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/utils.js\");","module.exports = CKEditor5.dll;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module alignment\n */\n\nexport { default as Alignment } from './alignment';\nexport { default as AlignmentEditing } from './alignmentediting';\nexport { default as AlignmentUI } from './alignmentui';\n"],"sourceRoot":""}