{"version":3,"sources":["webpack:///./node_modules/@ckeditor/ckeditor5-link/src/unlinkcommand.js","webpack:///./node_modules/@ckeditor/ckeditor5-link/src/ui/linkformview.js","webpack:///./node_modules/@ckeditor/ckeditor5-link/src/ui/linkactionsview.js"],"names":["UnlinkCommand","model","this","editor","selection","document","selectedElement","getSelectedElement","isLinkableElement","schema","isEnabled","checkAttribute","checkAttributeInSelection","linkCommand","commands","get","change","writer","_step","rangesToUnlink","isCollapsed","findAttributeRange","getFirstPosition","getAttribute","getValidRanges","getRanges","_iterator","_createForOfIteratorHelper","s","n","done","range","value","removeAttribute","_step2","_iterator2","manualDecorators","manualDecorator","id","err","e","f","Command","LinkFormView","locale","_this","Object","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_9__","_super","call","t","focusTracker","FocusTracker","keystrokes","KeystrokeHandler","urlInputView","_createUrlInput","saveButtonView","_createButton","icons","check","type","cancelButtonView","cancel","_manualDecoratorSwitches","_createManualDecoratorSwitches","children","_createFormChildren","_focusables","ViewCollection","_focusCycler","FocusCycler","focusables","keystrokeHandler","actions","focusPrevious","focusNext","classList","length","push","setTemplate","tag","attributes","class","tabindex","injectCssTransitionDisabler","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_11__","Array","from","reduce","accumulator","switchButton","name","isOn","_this2","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_get_js__WEBPACK_IMPORTED_MODULE_12__","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_15__","prototype","submitHandler","view","childViews","concat","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_5__","forEach","v","add","element","listenTo","focusFirst","labeledInput","LabeledFieldView","createLabeledInputText","label","icon","className","eventName","button","ButtonView","set","tooltip","extendTemplate","delegate","to","_this3","switches","createCollection","_loop","SwitchButtonView","withText","bind","toMany","decoratorValue","commandValue","undefined","defaultValue","on","additionalButtonsView","View","map","LinkActionsView","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_2__","previewButtonView","_createPreviewButton","unlinkButtonView","unlinkIcon","editButtonView","pencil","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_get_js__WEBPACK_IMPORTED_MODULE_4__","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_7__","bindTemplate","href","ensureSafeUrl","target","rel","template","eventListeners"],"mappings":";;;;OAmBqBA,8JAIpB,WACC,IAAMC,EAAQC,KAAKC,OAAOF,MACpBG,EAAYH,EAAMI,SAASD,UAC3BE,EAAkBF,EAAUG,qBAI7BC,eAAmBF,EAAiBL,EAAMQ,QAC9CP,KAAKQ,UAAYT,EAAMQ,OAAOE,eAAgBL,EAAiB,YAE/DJ,KAAKQ,UAAYT,EAAMQ,OAAOG,0BAA2BR,EAAW,mCAiBtE,WACC,IAAMD,EAASD,KAAKC,OACdF,EAAQC,KAAKC,OAAOF,MACpBG,EAAYH,EAAMI,SAASD,UAC3BS,EAAcV,EAAOW,SAASC,IAAK,QAEzCd,EAAMe,OAAQ,SAAAC,GAEb,IAFuBC,EAEjBC,EAAiBf,EAAUgB,aAC9BC,eACDjB,EAAUkB,mBACV,WACAlB,EAAUmB,aAAc,YACxBtB,IAEDA,EAAMQ,OAAOe,eAAgBpB,EAAUqB,YAAa,YAT9BC,EAAAC,EAYFR,GAZE,IAYvB,IAAAO,EAAAE,MAAAV,EAAAQ,EAAAG,KAAAC,MAAsC,KAA1BC,EAA0Bb,EAAAc,MAGrC,GAFAf,EAAOgB,gB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AQpG,EAAG,0BAGnBkE,EAAOa,KAAM,aAAcP,GAAIxH,KAAM,OAAQ,SAAAoJ,GAAI,QAAMA,IAEvDlC,EAAOsC,SAASzE,IAAM,IACtBmC,EAAOsC,SAASC,kBAETvC,SApMoCqB","file":"js/chunk-9d616d80.c0dee9b1.js","sourcesContent":["/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module link/unlinkcommand\n */\n\nimport { Command } from 'ckeditor5/src/core';\nimport { findAttributeRange } from 'ckeditor5/src/typing';\n\nimport { isLinkableElement } from './utils';\n\n/**\n * The unlink command. It is used by the {@link module:link/link~Link link plugin}.\n *\n * @extends module:core/command~Command\n */\nexport default class UnlinkCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedElement = selection.getSelectedElement();\n\n\t\t// A check for any integration that allows linking elements (e.g. `LinkImage`).\n\t\t// Currently the selection reads attributes from text nodes only. See #7429 and #7465.\n\t\tif ( isLinkableElement( selectedElement, model.schema ) ) {\n\t\t\tthis.isEnabled = model.schema.checkAttribute( selectedElement, 'linkHref' );\n\t\t} else {\n\t\t\tthis.isEnabled = model.schema.checkAttributeInSelection( selection, 'linkHref' );\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * When the selection is collapsed, it removes the `linkHref` attribute from each node with the same `linkHref` attribute value.\n\t * When the selection is non-collapsed, it removes the `linkHref` attribute from each node in selected ranges.\n\t *\n\t * # Decorators\n\t *\n\t * If {@link module:link/link~LinkConfig#decorators `config.link.decorators`} is specified,\n\t * all configured decorators are removed together with the `linkHref` attribute.\n\t *\n\t * @fires execute\n\t */\n\texecute() {\n\t\tconst editor = this.editor;\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst linkCommand = editor.commands.get( 'link' );\n\n\t\tmodel.change( writer => {\n\t\t\t// Get ranges to unlink.\n\t\t\tconst rangesToUnlink = selection.isCollapsed ?\n\t\t\t\t[ findAttributeRange(\n\t\t\t\t\tselection.getFirstPosition(),\n\t\t\t\t\t'linkHref',\n\t\t\t\t\tselection.getAttribute( 'linkHref' ),\n\t\t\t\t\tmodel\n\t\t\t\t) ] :\n\t\t\t\tmodel.schema.getValidRanges( selection.getRanges(), 'linkHref' );\n\n\t\t\t// Remove `linkHref` attribute from specified ranges.\n\t\t\tfor ( const range of rangesToUnlink ) {\n\t\t\t\twriter.removeAttribute( 'linkHref', range );\n\t\t\t\t// If there are registered custom attributes, then remove them during unlink.\n\t\t\t\tif ( linkCommand ) {\n\t\t\t\t\tfor ( const manualDecorator of linkCommand.manualDecorators ) {\n\t\t\t\t\t\twriter.removeAttribute( manualDecorator.id, range );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module link/ui/linkformview\n */\n\nimport {\n\tButtonView,\n\tFocusCycler,\n\tLabeledFieldView,\n\tSwitchButtonView,\n\tView,\n\tViewCollection,\n\tcreateLabeledInputText,\n\tinjectCssTransitionDisabler,\n\tsubmitHandler\n} from 'ckeditor5/src/ui';\nimport { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils';\nimport { icons } from 'ckeditor5/src/core';\n\n// See: #8833.\n// eslint-disable-next-line ckeditor5-rules/ckeditor-imports\nimport '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';\nimport '../../theme/linkform.css';\n\n/**\n * The link form view controller class.\n *\n * See {@link module:link/ui/linkformview~LinkFormView}.\n *\n * @extends module:ui/view~View\n */\nexport default class LinkFormView extends View {\n\t/**\n\t * Creates an instance of the {@link module:link/ui/linkformview~LinkFormView} class.\n\t *\n\t * Also see {@link #render}.\n\t *\n\t * @param {module:utils/locale~Locale} [locale] The localization services instance.\n\t * @param {module:link/linkcommand~LinkCommand} linkCommand Reference to {@link module:link/linkcommand~LinkCommand}.\n\t * @param {String} [protocol] A value of a protocol to be displayed in the input's placeholder.\n\t */\n\tconstructor( locale, linkCommand ) {\n\t\tsuper( locale );\n\n\t\tconst t = locale.t;\n\n\t\t/**\n\t\t * Tracks information about DOM focus in the form.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/focustracker~FocusTracker}\n\t\t */\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\t/**\n\t\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/keystrokehandler~KeystrokeHandler}\n\t\t */\n\t\tthis.keystrokes = new KeystrokeHandler();\n\n\t\t/**\n\t\t * The URL input view.\n\t\t *\n\t\t * @member {module:ui/labeledfield/labeledfieldview~LabeledFieldView}\n\t\t */\n\t\tthis.urlInputView = this._createUrlInput();\n\n\t\t/**\n\t\t * The Save button view.\n\t\t *\n\t\t * @member {module:ui/button/buttonview~ButtonView}\n\t\t */\n\t\tthis.saveButtonView = this._createButton( t( 'Save' ), icons.check, 'ck-button-save' );\n\t\tthis.saveButtonView.type = 'submit';\n\n\t\t/**\n\t\t * The Cancel button view.\n\t\t *\n\t\t * @member {module:ui/button/buttonview~ButtonView}\n\t\t */\n\t\tthis.cancelButtonView = this._createButton( t( 'Cancel' ), icons.cancel, 'ck-button-cancel', 'cancel' );\n\n\t\t/**\n\t\t * A collection of {@link module:ui/button/switchbuttonview~SwitchButtonView},\n\t\t * which corresponds to {@link module:link/linkcommand~LinkCommand#manualDecorators manual decorators}\n\t\t * configured in the editor.\n\t\t *\n\t\t * @private\n\t\t * @readonly\n\t\t * @type {module:ui/viewcollection~ViewCollection}\n\t\t */\n\t\tthis._manualDecoratorSwitches = this._createManualDecoratorSwitches( linkCommand );\n\n\t\t/**\n\t\t * A collection of child views in the form.\n\t\t *\n\t\t * @readonly\n\t\t * @type {module:ui/viewcollection~ViewCollection}\n\t\t */\n\t\tthis.children = this._createFormChildren( linkCommand.manualDecorators );\n\n\t\t/**\n\t\t * A collection of views that can be focused in the form.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {module:ui/viewcollection~ViewCollection}\n\t\t */\n\t\tthis._focusables = new ViewCollection();\n\n\t\t/**\n\t\t * Helps cycling over {@link #_focusables} in the form.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {module:ui/focuscycler~FocusCycler}\n\t\t */\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tconst classList = [ 'ck', 'ck-link-form', 'ck-responsive-form' ];\n\n\t\tif ( linkCommand.manualDecorators.length ) {\n\t\t\tclassList.push( 'ck-link-form_layout-vertical', 'ck-vertical-form' );\n\t\t}\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: classList,\n\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-link/issues/90\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: this.children\n\t\t} );\n\n\t\tinjectCssTransitionDisabler( this );\n\t}\n\n\t/**\n\t * Obtains the state of the {@link module:ui/button/switchbuttonview~SwitchButtonView switch buttons} representing\n\t * {@link module:link/linkcommand~LinkCommand#manualDecorators manual link decorators}\n\t * in the {@link module:link/ui/linkformview~LinkFormView}.\n\t *\n\t * @returns {Object.} Key-value pairs, where the key is the name of the decorator and the value is\n\t * its state.\n\t */\n\tgetDecoratorSwitchesState() {\n\t\treturn Array.from( this._manualDecoratorSwitches ).reduce( ( accumulator, switchButton ) => {\n\t\t\taccumulator[ switchButton.name ] = switchButton.isOn;\n\t\t\treturn accumulator;\n\t\t}, {} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\trender() {\n\t\tsuper.render();\n\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\tconst childViews = [\n\t\t\tthis.urlInputView,\n\t\t\t...this._manualDecoratorSwitches,\n\t\t\tthis.saveButtonView,\n\t\t\tthis.cancelButtonView\n\t\t];\n\n\t\tchildViews.forEach( v => {\n\t\t\t// Register the view as focusable.\n\t\t\tthis._focusables.add( v );\n\n\t\t\t// Register the view in the focus tracker.\n\t\t\tthis.focusTracker.add( v.element );\n\t\t} );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element );\n\t}\n\n\t/**\n\t * Focuses the fist {@link #_focusables} in the form.\n\t */\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Creates a labeled input view.\n\t *\n\t * @private\n\t * @returns {module:ui/labeledfield/labeledfieldview~LabeledFieldView} Labeled field view instance.\n\t */\n\t_createUrlInput() {\n\t\tconst t = this.locale.t;\n\t\tconst labeledInput = new LabeledFieldView( this.locale, createLabeledInputText );\n\n\t\tlabeledInput.label = t( 'Link URL' );\n\n\t\treturn labeledInput;\n\t}\n\n\t/**\n\t * Creates a button view.\n\t *\n\t * @private\n\t * @param {String} label The button label.\n\t * @param {String} icon The button icon.\n\t * @param {String} className The additional button CSS class name.\n\t * @param {String} [eventName] An event name that the `ButtonView#execute` event will be delegated to.\n\t * @returns {module:ui/button/buttonview~ButtonView} The button view instance.\n\t */\n\t_createButton( label, icon, className, eventName ) {\n\t\tconst button = new ButtonView( this.locale );\n\n\t\tbutton.set( {\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbutton.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: className\n\t\t\t}\n\t\t} );\n\n\t\tif ( eventName ) {\n\t\t\tbutton.delegate( 'execute' ).to( this, eventName );\n\t\t}\n\n\t\treturn button;\n\t}\n\n\t/**\n\t * Populates {@link module:ui/viewcollection~ViewCollection} of {@link module:ui/button/switchbuttonview~SwitchButtonView}\n\t * made based on {@link module:link/linkcommand~LinkCommand#manualDecorators}.\n\t *\n\t * @private\n\t * @param {module:link/linkcommand~LinkCommand} linkCommand A reference to the link command.\n\t * @returns {module:ui/viewcollection~ViewCollection} of switch buttons.\n\t */\n\t_createManualDecoratorSwitches( linkCommand ) {\n\t\tconst switches = this.createCollection();\n\n\t\tfor ( const manualDecorator of linkCommand.manualDecorators ) {\n\t\t\tconst switchButton = new SwitchButtonView( this.locale );\n\n\t\t\tswitchButton.set( {\n\t\t\t\tname: manualDecorator.id,\n\t\t\t\tlabel: manualDecorator.label,\n\t\t\t\twithText: true\n\t\t\t} );\n\n\t\t\tswitchButton.bind( 'isOn' ).toMany( [ manualDecorator, linkCommand ], 'value', ( decoratorValue, commandValue ) => {\n\t\t\t\treturn commandValue === undefined && decoratorValue === undefined ? manualDecorator.defaultValue : decoratorValue;\n\t\t\t} );\n\n\t\t\tswitchButton.on( 'execute', () => {\n\t\t\t\tmanualDecorator.set( 'value', !switchButton.isOn );\n\t\t\t} );\n\n\t\t\tswitches.add( switchButton );\n\t\t}\n\n\t\treturn switches;\n\t}\n\n\t/**\n\t * Populates the {@link #children} collection of the form.\n\t *\n\t * If {@link module:link/linkcommand~LinkCommand#manualDecorators manual decorators} are configured in the editor, it creates an\n\t * additional `View` wrapping all {@link #_manualDecoratorSwitches} switch buttons corresponding\n\t * to these decorators.\n\t *\n\t * @private\n\t * @param {module:utils/collection~Collection} manualDecorators A reference to\n\t * the collection of manual decorators stored in the link command.\n\t * @returns {module:ui/viewcollection~ViewCollection} The children of link form view.\n\t */\n\t_createFormChildren( manualDecorators ) {\n\t\tconst children = this.createCollection();\n\n\t\tchildren.add( this.urlInputView );\n\n\t\tif ( manualDecorators.length ) {\n\t\t\tconst additionalButtonsView = new View();\n\n\t\t\tadditionalButtonsView.setTemplate( {\n\t\t\t\ttag: 'ul',\n\t\t\t\tchildren: this._manualDecoratorSwitches.map( switchButton => ( {\n\t\t\t\t\ttag: 'li',\n\t\t\t\t\tchildren: [ switchButton ],\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t\t'ck-list__item'\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t} ) ),\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t'ck-reset',\n\t\t\t\t\t\t'ck-list'\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t} );\n\t\t\tchildren.add( additionalButtonsView );\n\t\t}\n\n\t\tchildren.add( this.saveButtonView );\n\t\tchildren.add( this.cancelButtonView );\n\n\t\treturn children;\n\t}\n}\n\n/**\n * Fired when the form view is submitted (when one of the children triggered the submit event),\n * for example with a click on {@link #saveButtonView}.\n *\n * @event submit\n */\n\n/**\n * Fired when the form view is canceled, for example with a click on {@link #cancelButtonView}.\n *\n * @event cancel\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module link/ui/linkactionsview\n */\n\nimport { ButtonView, View, ViewCollection, FocusCycler } from 'ckeditor5/src/ui';\nimport { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils';\nimport { icons } from 'ckeditor5/src/core';\n\nimport { ensureSafeUrl } from '../utils';\n\n// See: #8833.\n// eslint-disable-next-line ckeditor5-rules/ckeditor-imports\nimport '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';\nimport '../../theme/linkactions.css';\n\nimport unlinkIcon from '../../theme/icons/unlink.svg';\n\n/**\n * The link actions view class. This view displays the link preview, allows\n * unlinking or editing the link.\n *\n * @extends module:ui/view~View\n */\nexport default class LinkActionsView extends View {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale ) {\n\t\tsuper( locale );\n\n\t\tconst t = locale.t;\n\n\t\t/**\n\t\t * Tracks information about DOM focus in the actions.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/focustracker~FocusTracker}\n\t\t */\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\t/**\n\t\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/keystrokehandler~KeystrokeHandler}\n\t\t */\n\t\tthis.keystrokes = new KeystrokeHandler();\n\n\t\t/**\n\t\t * The href preview view.\n\t\t *\n\t\t * @member {module:ui/view~View}\n\t\t */\n\t\tthis.previewButtonView = this._createPreviewButton();\n\n\t\t/**\n\t\t * The unlink button view.\n\t\t *\n\t\t * @member {module:ui/button/buttonview~ButtonView}\n\t\t */\n\t\tthis.unlinkButtonView = this._createButton( t( 'Unlink' ), unlinkIcon, 'unlink' );\n\n\t\t/**\n\t\t * The edit link button view.\n\t\t *\n\t\t * @member {module:ui/button/buttonview~ButtonView}\n\t\t */\n\t\tthis.editButtonView = this._createButton( t( 'Edit link' ), icons.pencil, 'edit' );\n\n\t\t/**\n\t\t * The value of the \"href\" attribute of the link to use in the {@link #previewButtonView}.\n\t\t *\n\t\t * @observable\n\t\t * @member {String}\n\t\t */\n\t\tthis.set( 'href' );\n\n\t\t/**\n\t\t * A collection of views that can be focused in the view.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {module:ui/viewcollection~ViewCollection}\n\t\t */\n\t\tthis._focusables = new ViewCollection();\n\n\t\t/**\n\t\t * Helps cycling over {@link #_focusables} in the view.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {module:ui/focuscycler~FocusCycler}\n\t\t */\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-link-actions',\n\t\t\t\t\t'ck-responsive-form'\n\t\t\t\t],\n\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-link/issues/90\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\tthis.previewButtonView,\n\t\t\t\tthis.editButtonView,\n\t\t\t\tthis.unlinkButtonView\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\trender() {\n\t\tsuper.render();\n\n\t\tconst childViews = [\n\t\t\tthis.previewButtonView,\n\t\t\tthis.editButtonView,\n\t\t\tthis.unlinkButtonView\n\t\t];\n\n\t\tchildViews.forEach( v => {\n\t\t\t// Register the view as focusable.\n\t\t\tthis._focusables.add( v );\n\n\t\t\t// Register the view in the focus tracker.\n\t\t\tthis.focusTracker.add( v.element );\n\t\t} );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element );\n\t}\n\n\t/**\n\t * Focuses the fist {@link #_focusables} in the actions.\n\t */\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Creates a button view.\n\t *\n\t * @private\n\t * @param {String} label The button label.\n\t * @param {String} icon The button icon.\n\t * @param {String} [eventName] An event name that the `ButtonView#execute` event will be delegated to.\n\t * @returns {module:ui/button/buttonview~ButtonView} The button view instance.\n\t */\n\t_createButton( label, icon, eventName ) {\n\t\tconst button = new ButtonView( this.locale );\n\n\t\tbutton.set( {\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbutton.delegate( 'execute' ).to( this, eventName );\n\n\t\treturn button;\n\t}\n\n\t/**\n\t * Creates a link href preview button.\n\t *\n\t * @private\n\t * @returns {module:ui/button/buttonview~ButtonView} The button view instance.\n\t */\n\t_createPreviewButton() {\n\t\tconst button = new ButtonView( this.locale );\n\t\tconst bind = this.bindTemplate;\n\t\tconst t = this.t;\n\n\t\tbutton.set( {\n\t\t\twithText: true,\n\t\t\ttooltip: t( 'Open link in new tab' )\n\t\t} );\n\n\t\tbutton.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-link-actions__preview'\n\t\t\t\t],\n\t\t\t\thref: bind.to( 'href', href => href && ensureSafeUrl( href ) ),\n\t\t\t\ttarget: '_blank',\n\t\t\t\trel: 'noopener noreferrer'\n\t\t\t}\n\t\t} );\n\n\t\tbutton.bind( 'label' ).to( this, 'href', href => {\n\t\t\treturn href || t( 'This link has no URL' );\n\t\t} );\n\n\t\tbutton.bind( 'isEnabled' ).to( this, 'href', href => !!href );\n\n\t\tbutton.template.tag = 'a';\n\t\tbutton.template.eventListeners = {};\n\n\t\treturn button;\n\t}\n}\n\n/**\n * Fired when the {@link #editButtonView} is clicked.\n *\n * @event edit\n */\n\n/**\n * Fired when the {@link #unlinkButtonView} is clicked.\n *\n * @event unlink\n */\n"],"sourceRoot":""}