@ckeditor/ckeditor5-language 35.3.2 → 36.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -2,7 +2,7 @@ Software License Agreement
2
2
  ==========================
3
3
 
4
4
  **CKEditor 5 text part language feature** – https://github.com/ckeditor/ckeditor5-language <br>
5
- Copyright (c) 2003-2022, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
5
+ Copyright (c) 2003-2023, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
6
6
 
7
7
  Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
8
8
 
package/build/language.js CHANGED
@@ -1,5 +1,5 @@
1
1
  !function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Choose language":"Choose language",Language:"Language","Remove language":"Remove language"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
2
2
  /*!
3
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var e={176:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var a=n(609),r=n.n(a)()((function(e){return e[1]}));r.push([e.id,".ck-content span[lang]{font-style:italic}",""]);const o=r},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,a){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(a)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(r[i]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);a&&r[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},62:(e,t,n)=>{"use strict";var a,r=function(){return void 0===a&&(a=Boolean(window&&document&&document.all&&!window.atob)),a},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function s(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function u(e,t){for(var n={},a=[],r=0;r<e.length;r++){var o=e[r],u=t.base?o[0]+t.base:o[0],l=n[u]||0,c="".concat(u," ").concat(l);n[u]=l+1;var d=s(c),g={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(i[d].references++,i[d].updater(g)):i.push({identifier:c,updater:h(g,t),references:1}),a.push(c)}return a}function l(e){var t=document.createElement("style"),a=e.attributes||{};if(void 0===a.nonce){var r=n.nc;r&&(a.nonce=r)}if(Object.keys(a).forEach((function(e){t.setAttribute(e,a[e])})),"function"==typeof e.insert)e.insert(t);else{var i=o(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var c,d=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function g(e,t,n,a){var r=n?"":a.media?"@media ".concat(a.media," {").concat(a.css,"}"):a.css;if(e.styleSheet)e.styleSheet.cssText=d(t,r);else{var o=document.createTextNode(r),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function f(e,t,n){var a=n.css,r=n.media,o=n.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}var m=null,p=0;function h(e,t){var n,a,r;if(t.singleton){var o=p++;n=m||(m=l(t)),a=g.bind(null,n,o,!1),r=g.bind(null,n,o,!0)}else n=l(t),a=f.bind(null,n,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return a(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;a(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=r());var n=u(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var a=0;a<n.length;a++){var r=s(n[a]);i[r].references--}for(var o=u(e,t),l=0;l<n.length;l++){var c=s(n[l]);0===i[c].references&&(i[c].updater(),i.splice(c,1))}n=o}}}},704:(e,t,n)=>{e.exports=n(79)("./src/core.js")},273:(e,t,n)=>{e.exports=n(79)("./src/ui.js")},209:(e,t,n)=>{e.exports=n(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={id:a,exports:{}};return e[a](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var a={};(()=>{"use strict";n.r(a),n.d(a,{TextPartLanguage:()=>f,TextPartLanguageEditing:()=>i,TextPartLanguageUI:()=>g});var e=n(704),t=n(209);function r(e,n){return`${e}:${n=n||(0,t.getLanguageDirection)(e)}`}class o extends e.Command{refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"language")}execute({languageCode:e,textDirection:t}={}){const n=this.editor.model,a=n.document.selection,o=!!e&&r(e,t);n.change((e=>{if(a.isCollapsed)o?e.setSelectionAttribute("language",o):e.removeSelectionAttribute("language");else{const t=n.schema.getValidRanges(a.getRanges(),"language");for(const n of t)o?e.setAttribute("language",o,n):e.removeAttribute("language",n)}}))}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,n=e.document.selection;if(n.isCollapsed)return n.getAttribute("language")||!1;for(const e of n.getRanges())for(const n of e.getItems())if(t.checkAttribute(n,"language"))return n.getAttribute("language")||!1;return!1}}class i extends e.Plugin{static get pluginName(){return"TextPartLanguageEditing"}constructor(e){super(e),e.config.define("language",{textPartLanguage:[{title:"Arabic",languageCode:"ar"},{title:"French",languageCode:"fr"},{title:"Spanish",languageCode:"es"}]})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"language"}),e.model.schema.setAttributeProperties("language",{copyOnEnter:!0}),this._defineConverters(),e.commands.add("textPartLanguage",new o(e))}_defineConverters(){const e=this.editor.conversion;e.for("upcast").elementToAttribute({model:{key:"language",value:e=>r(e.getAttribute("lang"),e.getAttribute("dir"))},view:{name:"span",attributes:{lang:/[\s\S]+/}}}),e.for("downcast").attributeToElement({model:"language",view:(e,{writer:t},n)=>{if(!e)return;if(!n.item.is("$textProxy")&&!n.item.is("documentSelection"))return;const{languageCode:a,textDirection:r}=function(e){const[t,n]=e.split(":");return{languageCode:t,textDirection:n}}(e);return t.createAttributeElement("span",{lang:a,dir:r})}})}}var s=n(273),u=n(62),l=n.n(u),c=n(176),d={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};l()(c.Z,d);c.Z.locals;class g extends e.Plugin{static get pluginName(){return"TextPartLanguageUI"}init(){const e=this.editor,n=e.t,a=e.config.get("language.textPartLanguage"),o=n("Choose language"),i=n("Remove language"),u=n("Language");e.ui.componentFactory.add("textPartLanguage",(n=>{const l=new t.Collection,c={},d=e.commands.get("textPartLanguage");l.add({type:"button",model:new s.Model({label:i,languageCode:!1,withText:!0})}),l.add({type:"separator"});for(const e of a){const t={type:"button",model:new s.Model({label:e.title,languageCode:e.languageCode,textDirection:e.textDirection,withText:!0})},n=r(e.languageCode,e.textDirection);t.model.bind("isOn").to(d,"value",(e=>e===n)),l.add(t),c[n]=e.title}const g=(0,s.createDropdown)(n);return(0,s.addListToDropdown)(g,l),g.buttonView.set({isOn:!1,withText:!0,tooltip:u}),g.extendTemplate({attributes:{class:["ck-text-fragment-language-dropdown"]}}),g.bind("isEnabled").to(d,"isEnabled"),g.buttonView.bind("label").to(d,"value",(e=>c[e]||o)),this.listenTo(g,"execute",(t=>{d.execute({languageCode:t.source.languageCode,textDirection:t.source.textDirection}),e.editing.view.focus()})),g}))}}class f extends e.Plugin{static get requires(){return[i,g]}static get pluginName(){return"TextPartLanguage"}}})(),(window.CKEditor5=window.CKEditor5||{}).language=a})();
5
+ */(()=>{var e={176:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var a=n(609),r=n.n(a)()((function(e){return e[1]}));r.push([e.id,".ck-content span[lang]{font-style:italic}",""]);const o=r},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,a){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(a)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(r[i]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);a&&r[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},62:(e,t,n)=>{"use strict";var a,r=function(){return void 0===a&&(a=Boolean(window&&document&&document.all&&!window.atob)),a},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function s(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function u(e,t){for(var n={},a=[],r=0;r<e.length;r++){var o=e[r],u=t.base?o[0]+t.base:o[0],l=n[u]||0,c="".concat(u," ").concat(l);n[u]=l+1;var d=s(c),g={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(i[d].references++,i[d].updater(g)):i.push({identifier:c,updater:h(g,t),references:1}),a.push(c)}return a}function l(e){var t=document.createElement("style"),a=e.attributes||{};if(void 0===a.nonce){var r=n.nc;r&&(a.nonce=r)}if(Object.keys(a).forEach((function(e){t.setAttribute(e,a[e])})),"function"==typeof e.insert)e.insert(t);else{var i=o(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var c,d=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function g(e,t,n,a){var r=n?"":a.media?"@media ".concat(a.media," {").concat(a.css,"}"):a.css;if(e.styleSheet)e.styleSheet.cssText=d(t,r);else{var o=document.createTextNode(r),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function f(e,t,n){var a=n.css,r=n.media,o=n.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}var m=null,p=0;function h(e,t){var n,a,r;if(t.singleton){var o=p++;n=m||(m=l(t)),a=g.bind(null,n,o,!1),r=g.bind(null,n,o,!0)}else n=l(t),a=f.bind(null,n,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return a(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;a(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=r());var n=u(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var a=0;a<n.length;a++){var r=s(n[a]);i[r].references--}for(var o=u(e,t),l=0;l<n.length;l++){var c=s(n[l]);0===i[c].references&&(i[c].updater(),i.splice(c,1))}n=o}}}},704:(e,t,n)=>{e.exports=n(79)("./src/core.js")},273:(e,t,n)=>{e.exports=n(79)("./src/ui.js")},209:(e,t,n)=>{e.exports=n(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={id:a,exports:{}};return e[a](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var a={};(()=>{"use strict";n.r(a),n.d(a,{TextPartLanguage:()=>f,TextPartLanguageEditing:()=>i,TextPartLanguageUI:()=>g});var e=n(704),t=n(209);function r(e,n){return`${e}:${n=n||(0,t.getLanguageDirection)(e)}`}class o extends e.Command{refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"language")}execute({languageCode:e,textDirection:t}={}){const n=this.editor.model,a=n.document.selection,o=!!e&&r(e,t);n.change((e=>{if(a.isCollapsed)o?e.setSelectionAttribute("language",o):e.removeSelectionAttribute("language");else{const t=n.schema.getValidRanges(a.getRanges(),"language");for(const n of t)o?e.setAttribute("language",o,n):e.removeAttribute("language",n)}}))}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,n=e.document.selection;if(n.isCollapsed)return n.getAttribute("language")||!1;for(const e of n.getRanges())for(const n of e.getItems())if(t.checkAttribute(n,"language"))return n.getAttribute("language")||!1;return!1}}class i extends e.Plugin{static get pluginName(){return"TextPartLanguageEditing"}constructor(e){super(e),e.config.define("language",{textPartLanguage:[{title:"Arabic",languageCode:"ar"},{title:"French",languageCode:"fr"},{title:"Spanish",languageCode:"es"}]})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"language"}),e.model.schema.setAttributeProperties("language",{copyOnEnter:!0}),this._defineConverters(),e.commands.add("textPartLanguage",new o(e))}_defineConverters(){const e=this.editor.conversion;e.for("upcast").elementToAttribute({model:{key:"language",value:e=>r(e.getAttribute("lang"),e.getAttribute("dir"))},view:{name:"span",attributes:{lang:/[\s\S]+/}}}),e.for("downcast").attributeToElement({model:"language",view:(e,{writer:t},n)=>{if(!e)return;if(!n.item.is("$textProxy")&&!n.item.is("documentSelection"))return;const{languageCode:a,textDirection:r}=function(e){const[t,n]=e.split(":");return{languageCode:t,textDirection:n}}(e);return t.createAttributeElement("span",{lang:a,dir:r})}})}}var s=n(273),u=n(62),l=n.n(u),c=n(176),d={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};l()(c.Z,d);c.Z.locals;class g extends e.Plugin{static get pluginName(){return"TextPartLanguageUI"}init(){const e=this.editor,n=e.t,a=e.config.get("language.textPartLanguage"),o=n("Choose language"),i=n("Remove language"),u=n("Language");e.ui.componentFactory.add("textPartLanguage",(n=>{const l=new t.Collection,c={},d=e.commands.get("textPartLanguage");l.add({type:"button",model:new s.Model({label:i,languageCode:!1,withText:!0})}),l.add({type:"separator"});for(const e of a){const t={type:"button",model:new s.Model({label:e.title,languageCode:e.languageCode,textDirection:e.textDirection,withText:!0})},n=r(e.languageCode,e.textDirection);t.model.bind("isOn").to(d,"value",(e=>e===n)),l.add(t),c[n]=e.title}const g=(0,s.createDropdown)(n);return(0,s.addListToDropdown)(g,l),g.buttonView.set({isOn:!1,withText:!0,tooltip:u}),g.extendTemplate({attributes:{class:["ck-text-fragment-language-dropdown"]}}),g.bind("isEnabled").to(d,"isEnabled"),g.buttonView.bind("label").to(d,"value",(e=>e&&c[e]||o)),this.listenTo(g,"execute",(t=>{d.execute({languageCode:t.source.languageCode,textDirection:t.source.textDirection}),e.editing.view.focus()})),g}))}}class f extends e.Plugin{static get requires(){return[i,g]}static get pluginName(){return"TextPartLanguage"}}})(),(window.CKEditor5=window.CKEditor5||{}).language=a})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-language",
3
- "version": "35.3.2",
3
+ "version": "36.0.0",
4
4
  "description": "Text part language feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -12,16 +12,17 @@
12
12
  ],
13
13
  "main": "src/index.js",
14
14
  "dependencies": {
15
- "ckeditor5": "^35.3.2"
15
+ "ckeditor5": "^36.0.0"
16
16
  },
17
17
  "devDependencies": {
18
- "@ckeditor/ckeditor5-core": "^35.3.2",
19
- "@ckeditor/ckeditor5-dev-utils": "^31.0.0",
20
- "@ckeditor/ckeditor5-editor-classic": "^35.3.2",
21
- "@ckeditor/ckeditor5-engine": "^35.3.2",
22
- "@ckeditor/ckeditor5-paragraph": "^35.3.2",
23
- "@ckeditor/ckeditor5-theme-lark": "^35.3.2",
24
- "@ckeditor/ckeditor5-ui": "^35.3.2",
18
+ "@ckeditor/ckeditor5-core": "^36.0.0",
19
+ "@ckeditor/ckeditor5-dev-utils": "^32.0.0",
20
+ "@ckeditor/ckeditor5-editor-classic": "^36.0.0",
21
+ "@ckeditor/ckeditor5-engine": "^36.0.0",
22
+ "@ckeditor/ckeditor5-paragraph": "^36.0.0",
23
+ "@ckeditor/ckeditor5-theme-lark": "^36.0.0",
24
+ "@ckeditor/ckeditor5-ui": "^36.0.0",
25
+ "typescript": "^4.8.4",
25
26
  "webpack": "^5.58.1",
26
27
  "webpack-cli": "^4.9.0"
27
28
  },
@@ -40,13 +41,16 @@
40
41
  },
41
42
  "files": [
42
43
  "lang",
43
- "src",
44
+ "src/**/*.js",
45
+ "src/**/*.d.ts",
44
46
  "theme",
45
47
  "build",
46
48
  "ckeditor5-metadata.json",
47
49
  "CHANGELOG.md"
48
50
  ],
49
51
  "scripts": {
50
- "dll:build": "webpack"
52
+ "dll:build": "webpack",
53
+ "build": "tsc -p ./tsconfig.release.json",
54
+ "postversion": "npm run build"
51
55
  }
52
56
  }
package/src/index.js CHANGED
@@ -1,12 +1,10 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
5
  /**
7
6
  * @module language
8
7
  */
9
-
10
8
  export { default as TextPartLanguage } from './textpartlanguage';
11
9
  export { default as TextPartLanguageEditing } from './textpartlanguageediting';
12
10
  export { default as TextPartLanguageUI } from './textpartlanguageui';
@@ -1,17 +1,10 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
- /**
7
- * @module language/textpartlanguage
8
- */
9
-
10
5
  import { Plugin } from 'ckeditor5/src/core';
11
-
12
6
  import TextPartLanguageEditing from './textpartlanguageediting';
13
7
  import TextPartLanguageUI from './textpartlanguageui';
14
-
15
8
  /**
16
9
  * The text part language feature.
17
10
  *
@@ -26,61 +19,18 @@ import TextPartLanguageUI from './textpartlanguageui';
26
19
  * This is a "glue" plugin which loads the
27
20
  * {@link module:language/textpartlanguageediting~TextPartLanguageEditing text part language editing feature}
28
21
  * and the {@link module:language/textpartlanguageui~TextPartLanguageUI text part language UI feature}.
29
- *
30
- * @extends module:core/plugin~Plugin
31
22
  */
32
23
  export default class TextPartLanguage extends Plugin {
33
- /**
34
- * @inheritDoc
35
- */
36
- static get requires() {
37
- return [ TextPartLanguageEditing, TextPartLanguageUI ];
38
- }
39
-
40
- /**
41
- * @inheritDoc
42
- */
43
- static get pluginName() {
44
- return 'TextPartLanguage';
45
- }
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get requires() {
28
+ return [TextPartLanguageEditing, TextPartLanguageUI];
29
+ }
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ static get pluginName() {
34
+ return 'TextPartLanguage';
35
+ }
46
36
  }
47
-
48
- /**
49
- * The available {@link module:language/textpartlanguage~TextPartLanguage}
50
- * options that allow setting the language of parts of the content.
51
- *
52
- * This configuration option is available only with the {@glink api/language text part language feature} enabled.
53
- *
54
- * Refer to [WCAG 3.1.2 Language of Parts](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html) specification
55
- * to learn more.
56
- *
57
- * To change the editor's UI language, refer to the {@glink features/ui-language Setting the UI language} guide.
58
- *
59
- * The default value is:
60
- *
61
- * const config = [
62
- * { title: 'Arabic', languageCode: 'ar' },
63
- * { title: 'French', languageCode: 'fr' },
64
- * { title: 'Spanish', languageCode: 'es' }
65
- * ];
66
- *
67
- * The `title` property will be used by the text part language dropdown to render available options.
68
- *
69
- * The `languageCode` property is used for the `lang` attribute in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
70
- *
71
- * You can also specify the optional `textDirection` property indicating the reading direction of the language.
72
- * Correct values are `ltr` and `rtl`. When the `textDirection` property is missing, the text part language feature will
73
- * specify the text direction by itself.
74
- *
75
- * @member {Array.<module:language/textpartlanguage~TextPartLanguageOption>}
76
- * module:core/editor/editorconfig~LanguageConfig#textPartLanguage
77
- */
78
-
79
- /**
80
- * The text part language feature option descriptor.
81
- *
82
- * @typedef {Object} module:language/textpartlanguage~TextPartLanguageOption
83
- * @property {String} title The user-readable title of the option.
84
- * @property {String} languageCode The language code in the ISO 639 format.
85
- * @property {'ltr'|'rtl'} [textDirection] The language text direction. Automatically detected if omitted.
86
- */
@@ -1,124 +1,89 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
- /**
7
- * @module language/textpartlanguagecommand
8
- */
9
-
10
5
  import { Command } from 'ckeditor5/src/core';
11
6
  import { stringifyLanguageAttribute } from './utils';
12
-
13
7
  /**
14
8
  * The text part language command plugin.
15
- *
16
- * @extends module:core/command~Command
17
9
  */
18
10
  export default class TextPartLanguageCommand extends Command {
19
- /**
20
- * If the selection starts in a language attribute, the value is set to
21
- * the value of that language in a format:
22
- *
23
- * <languageCode>:<textDirection>
24
- *
25
- * * `languageCode` - The language code used for the `lang` attribute in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)
26
- * format.
27
- * * `textDirection` - One of the following values: `rtl` or `ltr`, indicating the reading direction of the language.
28
- *
29
- * See the {@link module:core/editor/editorconfig~LanguageConfig#textPartLanguage text part language configuration}
30
- * for more information about language properties.
31
- *
32
- * It is set to `false` otherwise.
33
- *
34
- * @observable
35
- * @readonly
36
- * @member {Boolean|String} #value
37
- */
38
-
39
- /**
40
- * @inheritDoc
41
- */
42
- refresh() {
43
- const model = this.editor.model;
44
- const doc = model.document;
45
-
46
- this.value = this._getValueFromFirstAllowedNode();
47
- this.isEnabled = model.schema.checkAttributeInSelection( doc.selection, 'language' );
48
- }
49
-
50
- /**
51
- * Executes the command. Applies the attribute to the selection or removes it from the selection.
52
- *
53
- * If `languageCode` is set to `false` or a `null` value, it will remove attributes. Otherwise, it will set
54
- * the attribute in the `{@link #value value}` format.
55
- *
56
- * The execution result differs, depending on the {@link module:engine/model/document~Document#selection}:
57
- *
58
- * * If the selection is on a range, the command applies the attribute to all nodes in that range
59
- * (if they are allowed to have this attribute by the {@link module:engine/model/schema~Schema schema}).
60
- * * If the selection is collapsed in a non-empty node, the command applies the attribute to the
61
- * {@link module:engine/model/document~Document#selection} itself (note that typed characters copy attributes from the selection).
62
- * * If the selection is collapsed in an empty node, the command applies the attribute to the parent node of the selection (note
63
- * that the selection inherits all attributes from a node if it is in an empty node).
64
- *
65
- * @fires execute
66
- * @param {Object} [options] Command options.
67
- * @param {String|Boolean} [options.languageCode] The language code to be applied to the model.
68
- * @param {String} [options.textDirection] The language text direction.
69
- */
70
- execute( { languageCode, textDirection } = {} ) {
71
- const model = this.editor.model;
72
- const doc = model.document;
73
- const selection = doc.selection;
74
-
75
- const value = languageCode ? stringifyLanguageAttribute( languageCode, textDirection ) : false;
76
-
77
- model.change( writer => {
78
- if ( selection.isCollapsed ) {
79
- if ( value ) {
80
- writer.setSelectionAttribute( 'language', value );
81
- } else {
82
- writer.removeSelectionAttribute( 'language' );
83
- }
84
- } else {
85
- const ranges = model.schema.getValidRanges( selection.getRanges(), 'language' );
86
-
87
- for ( const range of ranges ) {
88
- if ( value ) {
89
- writer.setAttribute( 'language', value, range );
90
- } else {
91
- writer.removeAttribute( 'language', range );
92
- }
93
- }
94
- }
95
- } );
96
- }
97
-
98
- /**
99
- * Returns the attribute value of the first node in the selection that allows the attribute.
100
- * For a collapsed selection it returns the selection attribute.
101
- *
102
- * @private
103
- * @returns {Boolean|String} The attribute value.
104
- */
105
- _getValueFromFirstAllowedNode() {
106
- const model = this.editor.model;
107
- const schema = model.schema;
108
- const selection = model.document.selection;
109
-
110
- if ( selection.isCollapsed ) {
111
- return selection.getAttribute( 'language' ) || false;
112
- }
113
-
114
- for ( const range of selection.getRanges() ) {
115
- for ( const item of range.getItems() ) {
116
- if ( schema.checkAttribute( item, 'language' ) ) {
117
- return item.getAttribute( 'language' ) || false;
118
- }
119
- }
120
- }
121
-
122
- return false;
123
- }
11
+ /**
12
+ * @inheritDoc
13
+ */
14
+ refresh() {
15
+ const model = this.editor.model;
16
+ const doc = model.document;
17
+ this.value = this._getValueFromFirstAllowedNode();
18
+ this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, 'language');
19
+ }
20
+ /**
21
+ * Executes the command. Applies the attribute to the selection or removes it from the selection.
22
+ *
23
+ * If `languageCode` is set to `false` or a `null` value, it will remove attributes. Otherwise, it will set
24
+ * the attribute in the `{@link #value value}` format.
25
+ *
26
+ * The execution result differs, depending on the {@link module:engine/model/document~Document#selection}:
27
+ *
28
+ * * If the selection is on a range, the command applies the attribute to all nodes in that range
29
+ * (if they are allowed to have this attribute by the {@link module:engine/model/schema~Schema schema}).
30
+ * * If the selection is collapsed in a non-empty node, the command applies the attribute to the
31
+ * {@link module:engine/model/document~Document#selection} itself (note that typed characters copy attributes from the selection).
32
+ * * If the selection is collapsed in an empty node, the command applies the attribute to the parent node of the selection (note
33
+ * that the selection inherits all attributes from a node if it is in an empty node).
34
+ *
35
+ * @fires execute
36
+ * @param options Command options.
37
+ * @param options.languageCode The language code to be applied to the model.
38
+ * @param options.textDirection The language text direction.
39
+ */
40
+ execute({ languageCode, textDirection } = {}) {
41
+ const model = this.editor.model;
42
+ const doc = model.document;
43
+ const selection = doc.selection;
44
+ const value = languageCode ? stringifyLanguageAttribute(languageCode, textDirection) : false;
45
+ model.change(writer => {
46
+ if (selection.isCollapsed) {
47
+ if (value) {
48
+ writer.setSelectionAttribute('language', value);
49
+ }
50
+ else {
51
+ writer.removeSelectionAttribute('language');
52
+ }
53
+ }
54
+ else {
55
+ const ranges = model.schema.getValidRanges(selection.getRanges(), 'language');
56
+ for (const range of ranges) {
57
+ if (value) {
58
+ writer.setAttribute('language', value, range);
59
+ }
60
+ else {
61
+ writer.removeAttribute('language', range);
62
+ }
63
+ }
64
+ }
65
+ });
66
+ }
67
+ /**
68
+ * Returns the attribute value of the first node in the selection that allows the attribute.
69
+ * For a collapsed selection it returns the selection attribute.
70
+ *
71
+ * @returns The attribute value.
72
+ */
73
+ _getValueFromFirstAllowedNode() {
74
+ const model = this.editor.model;
75
+ const schema = model.schema;
76
+ const selection = model.document.selection;
77
+ if (selection.isCollapsed) {
78
+ return selection.getAttribute('language') || false;
79
+ }
80
+ for (const range of selection.getRanges()) {
81
+ for (const item of range.getItems()) {
82
+ if (schema.checkAttribute(item, 'language')) {
83
+ return item.getAttribute('language') || false;
84
+ }
85
+ }
86
+ }
87
+ return false;
88
+ }
124
89
  }
@@ -1,105 +1,84 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
- /**
7
- * @module language/textpartlanguageediting
8
- */
9
-
10
5
  import { Plugin } from 'ckeditor5/src/core';
11
6
  import TextPartLanguageCommand from './textpartlanguagecommand';
12
7
  import { stringifyLanguageAttribute, parseLanguageAttribute } from './utils';
13
-
14
8
  /**
15
9
  * The text part language editing.
16
10
  *
17
11
  * Introduces the `'textPartLanguage'` command and the `'language'` model element attribute.
18
- *
19
- * @extends module:core/plugin~Plugin
20
12
  */
21
13
  export default class TextPartLanguageEditing extends Plugin {
22
- /**
23
- * @inheritDoc
24
- */
25
- static get pluginName() {
26
- return 'TextPartLanguageEditing';
27
- }
28
-
29
- /**
30
- * @inheritDoc
31
- */
32
- constructor( editor ) {
33
- super( editor );
34
-
35
- // Text part language options are only used to ensure that the feature works by default.
36
- // In the real usage it should be reconfigured by a developer. We are not providing
37
- // translations for `title` properties on purpose, as it's only an example configuration.
38
- editor.config.define( 'language', {
39
- textPartLanguage: [
40
- { title: 'Arabic', languageCode: 'ar' },
41
- { title: 'French', languageCode: 'fr' },
42
- { title: 'Spanish', languageCode: 'es' }
43
- ]
44
- } );
45
- }
46
-
47
- /**
48
- * @inheritDoc
49
- */
50
- init() {
51
- const editor = this.editor;
52
-
53
- editor.model.schema.extend( '$text', { allowAttributes: 'language' } );
54
- editor.model.schema.setAttributeProperties( 'language', {
55
- copyOnEnter: true
56
- } );
57
-
58
- this._defineConverters();
59
-
60
- editor.commands.add( 'textPartLanguage', new TextPartLanguageCommand( editor ) );
61
- }
62
-
63
- /**
64
- * @private
65
- */
66
- _defineConverters() {
67
- const conversion = this.editor.conversion;
68
-
69
- conversion.for( 'upcast' ).elementToAttribute( {
70
- model: {
71
- key: 'language',
72
- value: viewElement => {
73
- const languageCode = viewElement.getAttribute( 'lang' );
74
- const textDirection = viewElement.getAttribute( 'dir' );
75
-
76
- return stringifyLanguageAttribute( languageCode, textDirection );
77
- }
78
- },
79
- view: {
80
- name: 'span',
81
- attributes: { lang: /[\s\S]+/ }
82
- }
83
- } );
84
-
85
- conversion.for( 'downcast' ).attributeToElement( {
86
- model: 'language',
87
- view: ( attributeValue, { writer }, data ) => {
88
- if ( !attributeValue ) {
89
- return;
90
- }
91
-
92
- if ( !data.item.is( '$textProxy' ) && !data.item.is( 'documentSelection' ) ) {
93
- return;
94
- }
95
-
96
- const { languageCode, textDirection } = parseLanguageAttribute( attributeValue );
97
-
98
- return writer.createAttributeElement( 'span', {
99
- lang: languageCode,
100
- dir: textDirection
101
- } );
102
- }
103
- } );
104
- }
14
+ /**
15
+ * @inheritDoc
16
+ */
17
+ static get pluginName() {
18
+ return 'TextPartLanguageEditing';
19
+ }
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ constructor(editor) {
24
+ super(editor);
25
+ // Text part language options are only used to ensure that the feature works by default.
26
+ // In the real usage it should be reconfigured by a developer. We are not providing
27
+ // translations for `title` properties on purpose, as it's only an example configuration.
28
+ editor.config.define('language', {
29
+ textPartLanguage: [
30
+ { title: 'Arabic', languageCode: 'ar' },
31
+ { title: 'French', languageCode: 'fr' },
32
+ { title: 'Spanish', languageCode: 'es' }
33
+ ]
34
+ });
35
+ }
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ init() {
40
+ const editor = this.editor;
41
+ editor.model.schema.extend('$text', { allowAttributes: 'language' });
42
+ editor.model.schema.setAttributeProperties('language', {
43
+ copyOnEnter: true
44
+ });
45
+ this._defineConverters();
46
+ editor.commands.add('textPartLanguage', new TextPartLanguageCommand(editor));
47
+ }
48
+ /**
49
+ * @private
50
+ */
51
+ _defineConverters() {
52
+ const conversion = this.editor.conversion;
53
+ conversion.for('upcast').elementToAttribute({
54
+ model: {
55
+ key: 'language',
56
+ value: (viewElement) => {
57
+ const languageCode = viewElement.getAttribute('lang');
58
+ const textDirection = viewElement.getAttribute('dir');
59
+ return stringifyLanguageAttribute(languageCode, textDirection);
60
+ }
61
+ },
62
+ view: {
63
+ name: 'span',
64
+ attributes: { lang: /[\s\S]+/ }
65
+ }
66
+ });
67
+ conversion.for('downcast').attributeToElement({
68
+ model: 'language',
69
+ view: (attributeValue, { writer }, data) => {
70
+ if (!attributeValue) {
71
+ return;
72
+ }
73
+ if (!data.item.is('$textProxy') && !data.item.is('documentSelection')) {
74
+ return;
75
+ }
76
+ const { languageCode, textDirection } = parseLanguageAttribute(attributeValue);
77
+ return writer.createAttributeElement('span', {
78
+ lang: languageCode,
79
+ dir: textDirection
80
+ });
81
+ }
82
+ });
83
+ }
105
84
  }
@@ -1,119 +1,96 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
5
  /**
7
6
  * @module language/textpartlanguageui
8
7
  */
9
-
10
8
  import { Plugin } from 'ckeditor5/src/core';
11
9
  import { Model, createDropdown, addListToDropdown } from 'ckeditor5/src/ui';
12
10
  import { Collection } from 'ckeditor5/src/utils';
13
11
  import { stringifyLanguageAttribute } from './utils';
14
-
15
12
  import '../theme/language.css';
16
-
17
13
  /**
18
14
  * The text part language UI plugin.
19
15
  *
20
16
  * It introduces the `'language'` dropdown.
21
- *
22
- * @extends module:core/plugin~Plugin
23
17
  */
24
18
  export default class TextPartLanguageUI extends Plugin {
25
- /**
26
- * @inheritDoc
27
- */
28
- static get pluginName() {
29
- return 'TextPartLanguageUI';
30
- }
31
-
32
- /**
33
- * @inheritDoc
34
- */
35
- init() {
36
- const editor = this.editor;
37
- const t = editor.t;
38
- const options = editor.config.get( 'language.textPartLanguage' );
39
- const defaultTitle = t( 'Choose language' );
40
- const removeTitle = t( 'Remove language' );
41
- const dropdownTooltip = t( 'Language' );
42
-
43
- // Register UI component.
44
- editor.ui.componentFactory.add( 'textPartLanguage', locale => {
45
- const itemDefinitions = new Collection();
46
- const titles = {};
47
-
48
- const languageCommand = editor.commands.get( 'textPartLanguage' );
49
-
50
- // Item definition with false `languageCode` will behave as remove lang button.
51
- itemDefinitions.add( {
52
- type: 'button',
53
- model: new Model( {
54
- label: removeTitle,
55
- languageCode: false,
56
- withText: true
57
- } )
58
- } );
59
-
60
- itemDefinitions.add( {
61
- type: 'separator'
62
- } );
63
-
64
- for ( const option of options ) {
65
- const def = {
66
- type: 'button',
67
- model: new Model( {
68
- label: option.title,
69
- languageCode: option.languageCode,
70
- textDirection: option.textDirection,
71
- withText: true
72
- } )
73
- };
74
-
75
- const language = stringifyLanguageAttribute( option.languageCode, option.textDirection );
76
-
77
- def.model.bind( 'isOn' ).to( languageCommand, 'value', value => value === language );
78
-
79
- itemDefinitions.add( def );
80
-
81
- titles[ language ] = option.title;
82
- }
83
-
84
- const dropdownView = createDropdown( locale );
85
- addListToDropdown( dropdownView, itemDefinitions );
86
-
87
- dropdownView.buttonView.set( {
88
- isOn: false,
89
- withText: true,
90
- tooltip: dropdownTooltip
91
- } );
92
-
93
- dropdownView.extendTemplate( {
94
- attributes: {
95
- class: [
96
- 'ck-text-fragment-language-dropdown'
97
- ]
98
- }
99
- } );
100
-
101
- dropdownView.bind( 'isEnabled' ).to( languageCommand, 'isEnabled' );
102
- dropdownView.buttonView.bind( 'label' ).to( languageCommand, 'value', value => {
103
- return titles[ value ] || defaultTitle;
104
- } );
105
-
106
- // Execute command when an item from the dropdown is selected.
107
- this.listenTo( dropdownView, 'execute', evt => {
108
- languageCommand.execute( {
109
- languageCode: evt.source.languageCode,
110
- textDirection: evt.source.textDirection
111
- } );
112
-
113
- editor.editing.view.focus();
114
- } );
115
-
116
- return dropdownView;
117
- } );
118
- }
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName() {
23
+ return 'TextPartLanguageUI';
24
+ }
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ init() {
29
+ const editor = this.editor;
30
+ const t = editor.t;
31
+ const options = editor.config.get('language.textPartLanguage');
32
+ const defaultTitle = t('Choose language');
33
+ const removeTitle = t('Remove language');
34
+ const dropdownTooltip = t('Language');
35
+ // Register UI component.
36
+ editor.ui.componentFactory.add('textPartLanguage', locale => {
37
+ const itemDefinitions = new Collection();
38
+ const titles = {};
39
+ const languageCommand = editor.commands.get('textPartLanguage');
40
+ // Item definition with false `languageCode` will behave as remove lang button.
41
+ itemDefinitions.add({
42
+ type: 'button',
43
+ model: new Model({
44
+ label: removeTitle,
45
+ languageCode: false,
46
+ withText: true
47
+ })
48
+ });
49
+ itemDefinitions.add({
50
+ type: 'separator'
51
+ });
52
+ for (const option of options) {
53
+ const def = {
54
+ type: 'button',
55
+ model: new Model({
56
+ label: option.title,
57
+ languageCode: option.languageCode,
58
+ textDirection: option.textDirection,
59
+ withText: true
60
+ })
61
+ };
62
+ const language = stringifyLanguageAttribute(option.languageCode, option.textDirection);
63
+ def.model.bind('isOn').to(languageCommand, 'value', value => value === language);
64
+ itemDefinitions.add(def);
65
+ titles[language] = option.title;
66
+ }
67
+ const dropdownView = createDropdown(locale);
68
+ addListToDropdown(dropdownView, itemDefinitions);
69
+ dropdownView.buttonView.set({
70
+ isOn: false,
71
+ withText: true,
72
+ tooltip: dropdownTooltip
73
+ });
74
+ dropdownView.extendTemplate({
75
+ attributes: {
76
+ class: [
77
+ 'ck-text-fragment-language-dropdown'
78
+ ]
79
+ }
80
+ });
81
+ dropdownView.bind('isEnabled').to(languageCommand, 'isEnabled');
82
+ dropdownView.buttonView.bind('label').to(languageCommand, 'value', value => {
83
+ return (value && titles[value]) || defaultTitle;
84
+ });
85
+ // Execute command when an item from the dropdown is selected.
86
+ this.listenTo(dropdownView, 'execute', evt => {
87
+ languageCommand.execute({
88
+ languageCode: evt.source.languageCode,
89
+ textDirection: evt.source.textDirection
90
+ });
91
+ editor.editing.view.focus();
92
+ });
93
+ return dropdownView;
94
+ });
95
+ }
119
96
  }
package/src/utils.js CHANGED
@@ -1,18 +1,17 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
5
  /**
7
6
  * @module language/utils
8
7
  */
9
-
10
8
  import { getLanguageDirection } from 'ckeditor5/src/utils';
11
-
12
9
  /**
13
10
  * Returns the language attribute value in a human-readable text format:
14
11
  *
15
- * <languageCode>:<textDirection>
12
+ * ```
13
+ * <languageCode>:<textDirection>
14
+ * ```
16
15
  *
17
16
  * * `languageCode` - The language code used for the `lang` attribute in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
18
17
  * * `textDirection` - One of the following values: `rtl` or `ltr`, indicating the reading direction of the language.
@@ -22,26 +21,23 @@ import { getLanguageDirection } from 'ckeditor5/src/utils';
22
21
  *
23
22
  * If the `textDirection` argument is omitted, it will be automatically detected based on `languageCode`.
24
23
  *
25
- * @param {String} languageCode The language code in the ISO 639-1 format.
26
- * @param {'ltr'|'rtl'} [textDirection] The language text direction. Automatically detected if omitted.
27
- * @returns {String}
24
+ * @param languageCode The language code in the ISO 639-1 format.
25
+ * @param textDirection The language text direction. Automatically detected if omitted.
28
26
  */
29
- export function stringifyLanguageAttribute( languageCode, textDirection ) {
30
- textDirection = textDirection || getLanguageDirection( languageCode );
31
- return `${ languageCode }:${ textDirection }`;
27
+ export function stringifyLanguageAttribute(languageCode, textDirection) {
28
+ textDirection = textDirection || getLanguageDirection(languageCode);
29
+ return `${languageCode}:${textDirection}`;
32
30
  }
33
-
34
31
  /**
35
32
  * Retrieves language properties converted to attribute value by the
36
33
  * {@link module:language/utils~stringifyLanguageAttribute stringifyLanguageAttribute} function.
37
34
  *
38
- * @param {String} str The attribute value.
39
- * @returns {Object} result
40
- * @returns {String} result.languageCode The language code in the ISO 639 format.
41
- * @returns {String} result.textDirection The language text direction.
35
+ * @param str The attribute value.
36
+ * @returns The object with properties:
37
+ * * languageCode - The language code in the ISO 639 format.
38
+ * * textDirection - The language text direction.
42
39
  */
43
- export function parseLanguageAttribute( str ) {
44
- const [ languageCode, textDirection ] = str.split( ':' );
45
-
46
- return { languageCode, textDirection };
40
+ export function parseLanguageAttribute(str) {
41
+ const [languageCode, textDirection] = str.split(':');
42
+ return { languageCode, textDirection };
47
43
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack://CKEditor5.language/./theme/language.css","webpack://CKEditor5.language/../node_modules/css-loader/dist/runtime/api.js","webpack://CKEditor5.language/../node_modules/css-loader/dist/runtime/cssWithMappingToString.js","webpack://CKEditor5.language/./theme/language.css?9b89","webpack://CKEditor5.language/../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://CKEditor5.language/./src/textpartlanguage.js","webpack://CKEditor5.language/./src/textpartlanguagecommand.js","webpack://CKEditor5.language/./src/textpartlanguageediting.js","webpack://CKEditor5.language/./src/textpartlanguageui.js","webpack://CKEditor5.language/./src/utils.js","webpack://CKEditor5.language/delegated \"./src/core.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.language/delegated \"./src/ui.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.language/delegated \"./src/utils.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.language/external var \"CKEditor5.dll\"","webpack://CKEditor5.language/webpack/bootstrap","webpack://CKEditor5.language/webpack/runtime/compat get default export","webpack://CKEditor5.language/webpack/runtime/define property getters","webpack://CKEditor5.language/webpack/runtime/hasOwnProperty shorthand","webpack://CKEditor5.language/webpack/runtime/make namespace object","webpack://CKEditor5.language/webpack/runtime/nonce","webpack://CKEditor5.language/./src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAC4H;AAC7B;AAC/F,8BAA8B,mFAA2B,CAAC,wGAAqC;AAC/F;AACA,iEAAiE,kBAAkB,OAAO,2TAA2T,uBAAuB,GAAG,qBAAqB;AACpc;AACA,iEAAe,uBAAuB,EAAC;;;;;;;;;;;;ACP1B;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;;AAEA;AACA,4CAA4C,qBAAqB;AACjE;;AAEA;AACA,KAAK;AACL,KAAK;AACL;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,sBAAsB,iBAAiB;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,qBAAqB;AAC1C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;ACjEa;;AAEb,kCAAkC;;AAElC,8BAA8B;;AAE9B,kDAAkD,gBAAgB,gEAAgE,wDAAwD,6DAA6D,sDAAsD;;AAE7S,uCAAuC,uDAAuD,uCAAuC,SAAS,OAAO,oBAAoB;;AAEzK,yCAAyC,8FAA8F,wBAAwB,eAAe,eAAe,gBAAgB,YAAY,MAAM,wBAAwB,+BAA+B,aAAa,qBAAqB,uCAAuC,cAAc,WAAW,YAAY,UAAU,MAAM,mDAAmD,UAAU,sBAAsB;;AAEve,gCAAgC;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,uDAAuD,cAAc;AACrE;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACnC+F;AAC/F,YAA6K;;AAE7K,eAAe,+CAA+C;;AAE9D;AACA;;AAEA,aAAa,0GAAG,CAAC,yJAAO;;;;AAIxB,iEAAe,gKAAc,MAAM;;;;;;;;;;;ACZtB;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,wDAAwD;;AAExD;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAgB,KAAwC,GAAG,sBAAiB,GAAG,CAAI;;AAEnF;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,qEAAqE,qBAAqB,cAAc;;AAExG;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,yDAAyD;AACzD,IAAI;;AAEJ;;;AAGA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;;AAEA;;AAEA,qBAAqB,6BAA6B;AAClD;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;AC5QA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;;AAEoB;AACV;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,qDAAqD;AAC1G;AACA,uDAAuD,kCAAkC,gBAAgB;AACzG,uBAAuB;AACvB;AACA;AACA,IAAI;AACJ,YAAY,0FAA0F;AACtG;AACA;AACA;AACe,+BAA+B,sDAAM;AACpD;AACA;AACA;AACA;AACA,WAAW,gEAAuB,EAAE,2DAAkB;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;AAClB;AACA;AACA,yDAAyD,gDAAgD;AACzG;AACA;AACA;AACA;AACA,qDAAqD,qDAAqD;AAC1G;AACA;AACA;AACA;AACA,OAAO,qCAAqC;AAC5C,OAAO,qCAAqC;AAC5C,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,aAAa;AAC3B;;;;;;;;;;;;;;;;;;ACrFA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE6C;AACQ;;AAErD;AACA;AACA;AACA;AACA;AACe,sCAAsC,uDAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA,oDAAoD,sDAAsD;AAC1G;AACA;AACA,wDAAwD,+CAA+C;AACvG;AACA,KAAK,uDAAuD;AAC5D;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,gBAAgB;AAC5B,YAAY,QAAQ;AACpB;AACA,YAAY,8BAA8B,KAAK;AAC/C;AACA;AACA;;AAEA,+BAA+B,kEAA0B;;AAEzD;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC3HA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACoB;AACa;;AAE7E;AACA;AACA;AACA;AACA;AACA;AACA;AACe,sCAAsC,sDAAM;AAC3D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,qCAAqC;AAC3C,MAAM,qCAAqC;AAC3C,MAAM;AACN;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,8BAA8B;AACvE;AACA;AACA,IAAI;;AAEJ;;AAEA,+CAA+C,gEAAuB;AACtE;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY,kEAA0B;AACtC;AACA,IAAI;AACJ;AACA;AACA,kBAAkB;AAClB;AACA,IAAI;;AAEJ;AACA;AACA,6BAA6B,QAAQ;AACrC;AACA;AACA;;AAEA;AACA;AACA;;AAEA,YAAY,8BAA8B,EAAE,8DAAsB;;AAElE;AACA;AACA;AACA,MAAM;AACN;AACA,IAAI;AACJ;AACA;;;;;;;;;;;;;;;;;;;;;ACxGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACgC;AAC3B;AACI;;AAEtB;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACe,iCAAiC,sDAAM;AACtD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B,2DAAU;AACzC;;AAEA;;AAEA;AACA;AACA;AACA,eAAe,mDAAK;AACpB;AACA;AACA;AACA,MAAM;AACN,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,gBAAgB,mDAAK;AACrB;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA,qBAAqB,kEAA0B;;AAE/C;;AAEA;;AAEA;AACA;;AAEA,wBAAwB,gEAAc;AACtC,GAAG,mEAAiB;;AAEpB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA,KAAK;;AAEL;AACA,IAAI;AACJ;AACA;;;;;;;;;;;;;;;;;;ACtHA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,aAAa;AACxB,aAAa;AACb;AACO;AACP,kCAAkC,yEAAoB;AACtD,YAAY,cAAc,IAAI,eAAe;AAC7C;;AAEA;AACA;AACA,IAAI,mFAAmF;AACvF;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACO;AACP;;AAEA,UAAU;AACV;;;;;;;;;;;AC9CA;;;;;;;;;;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;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEiE;AACc;AACV","file":"language.js","sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck-content span[lang]{font-style:italic}\", \"\",{\"version\":3,\"sources\":[\"webpack://./theme/language.css\"],\"names\":[],\"mappings\":\"AAKA,uBACC,iBACD\",\"sourcesContent\":[\"/*\\n * 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.ck-content span[lang] {\\n\\tfont-style: italic;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === \"string\") {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, \"\"]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\"use strict\";\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nmodule.exports = function cssWithMappingToString(item) {\n var _item = _slicedToArray(item, 4),\n content = _item[1],\n cssMapping = _item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (typeof btoa === \"function\") {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || \"\").concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join(\"\\n\");\n }\n\n return [content].join(\"\\n\");\n};","import api from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./language.css\";\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","\"use strict\";\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n var attributes = options.attributes || {};\n\n if (typeof attributes.nonce === 'undefined') {\n var nonce = typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n\n if (nonce) {\n attributes.nonce = nonce;\n }\n }\n\n Object.keys(attributes).forEach(function (key) {\n style.setAttribute(key, attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n } else {\n style.removeAttribute('media');\n }\n\n if (sourceMap && typeof btoa !== 'undefined') {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n // tags it will allow on a page\n\n if (!options.singleton && typeof options.singleton !== 'boolean') {\n options.singleton = isOldIE();\n }\n\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n if (Object.prototype.toString.call(newList) !== '[object Array]') {\n return;\n }\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDom[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDom[_index].references === 0) {\n stylesInDom[_index].updater();\n\n stylesInDom.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\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 language/textpartlanguage\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\n\nimport TextPartLanguageEditing from './textpartlanguageediting';\nimport TextPartLanguageUI from './textpartlanguageui';\n\n/**\n * The text part language feature.\n *\n * This feature allows setting a language of the document's text part to support\n * [WCAG 3.1.2 Language of Parts](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html) specification.\n *\n * To change the editor's UI language, refer to the {@glink features/ui-language Setting the UI language} guide.\n *\n * For more information about this feature, check the {@glink api/language package page} as well as the {@glink features/language\n * Text part language} feature guide.\n *\n * This is a \"glue\" plugin which loads the\n * {@link module:language/textpartlanguageediting~TextPartLanguageEditing text part language editing feature}\n * and the {@link module:language/textpartlanguageui~TextPartLanguageUI text part language UI feature}.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class TextPartLanguage extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ TextPartLanguageEditing, TextPartLanguageUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'TextPartLanguage';\n\t}\n}\n\n/**\n * The available {@link module:language/textpartlanguage~TextPartLanguage}\n * options that allow setting the language of parts of the content.\n *\n * This configuration option is available only with the {@glink api/language text part language feature} enabled.\n *\n * Refer to [WCAG 3.1.2 Language of Parts](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html) specification\n * to learn more.\n *\n * To change the editor's UI language, refer to the {@glink features/ui-language Setting the UI language} guide.\n *\n * The default value is:\n *\n *\t\tconst config = [\n *\t\t\t{ title: 'Arabic', languageCode: 'ar' },\n *\t\t\t{ title: 'French', languageCode: 'fr' },\n *\t\t\t{ title: 'Spanish', languageCode: 'es' }\n *\t\t];\n *\n * The `title` property will be used by the text part language dropdown to render available options.\n *\n * The `languageCode` property is used for the `lang` attribute in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.\n *\n * You can also specify the optional `textDirection` property indicating the reading direction of the language.\n * Correct values are `ltr` and `rtl`. When the `textDirection` property is missing, the text part language feature will\n * specify the text direction by itself.\n *\n * @member {Array.<module:language/textpartlanguage~TextPartLanguageOption>}\n * module:core/editor/editorconfig~LanguageConfig#textPartLanguage\n */\n\n/**\n * The text part language feature option descriptor.\n *\n * @typedef {Object} module:language/textpartlanguage~TextPartLanguageOption\n * @property {String} title The user-readable title of the option.\n * @property {String} languageCode The language code in the ISO 639 format.\n * @property {'ltr'|'rtl'} [textDirection] The language text direction. Automatically detected if omitted.\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 language/textpartlanguagecommand\n */\n\nimport { Command } from 'ckeditor5/src/core';\nimport { stringifyLanguageAttribute } from './utils';\n\n/**\n * The text part language command plugin.\n *\n * @extends module:core/command~Command\n */\nexport default class TextPartLanguageCommand extends Command {\n\t/**\n\t * If the selection starts in a language attribute, the value is set to\n\t * the value of that language in a format:\n\t *\n\t *\t\t<languageCode>:<textDirection>\n\t *\n\t * * `languageCode` - The language code used for the `lang` attribute in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)\n\t * format.\n\t * * `textDirection` - One of the following values: `rtl` or `ltr`, indicating the reading direction of the language.\n\t *\n\t * See the {@link module:core/editor/editorconfig~LanguageConfig#textPartLanguage text part language configuration}\n\t * for more information about language properties.\n\t *\n\t * It is set to `false` otherwise.\n\t *\n\t * @observable\n\t * @readonly\n\t * @member {Boolean|String} #value\n\t */\n\n\t/**\n\t * @inheritDoc\n\t */\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\n\t\tthis.value = this._getValueFromFirstAllowedNode();\n\t\tthis.isEnabled = model.schema.checkAttributeInSelection( doc.selection, 'language' );\n\t}\n\n\t/**\n\t * Executes the command. Applies the attribute to the selection or removes it from the selection.\n\t *\n\t * If `languageCode` is set to `false` or a `null` value, it will remove attributes. Otherwise, it will set\n\t * the attribute in the `{@link #value value}` format.\n\t *\n\t * The execution result differs, depending on the {@link module:engine/model/document~Document#selection}:\n\t *\n\t * * If the selection is on a range, the command applies the attribute to all nodes in that range\n\t * (if they are allowed to have this attribute by the {@link module:engine/model/schema~Schema schema}).\n\t * * If the selection is collapsed in a non-empty node, the command applies the attribute to the\n\t * {@link module:engine/model/document~Document#selection} itself (note that typed characters copy attributes from the selection).\n\t * * If the selection is collapsed in an empty node, the command applies the attribute to the parent node of the selection (note\n\t * that the selection inherits all attributes from a node if it is in an empty node).\n\t *\n\t * @fires execute\n\t * @param {Object} [options] Command options.\n\t * @param {String|Boolean} [options.languageCode] The language code to be applied to the model.\n\t * @param {String} [options.textDirection] The language text direction.\n\t */\n\texecute( { languageCode, textDirection } = {} ) {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tconst selection = doc.selection;\n\n\t\tconst value = languageCode ? stringifyLanguageAttribute( languageCode, textDirection ) : false;\n\n\t\tmodel.change( writer => {\n\t\t\tif ( selection.isCollapsed ) {\n\t\t\t\tif ( value ) {\n\t\t\t\t\twriter.setSelectionAttribute( 'language', value );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeSelectionAttribute( 'language' );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst ranges = model.schema.getValidRanges( selection.getRanges(), 'language' );\n\n\t\t\t\tfor ( const range of ranges ) {\n\t\t\t\t\tif ( value ) {\n\t\t\t\t\t\twriter.setAttribute( 'language', value, range );\n\t\t\t\t\t} else {\n\t\t\t\t\t\twriter.removeAttribute( 'language', range );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Returns the attribute value of the first node in the selection that allows the attribute.\n\t * For a collapsed selection it returns the selection attribute.\n\t *\n\t * @private\n\t * @returns {Boolean|String} The attribute value.\n\t */\n\t_getValueFromFirstAllowedNode() {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst selection = model.document.selection;\n\n\t\tif ( selection.isCollapsed ) {\n\t\t\treturn selection.getAttribute( 'language' ) || false;\n\t\t}\n\n\t\tfor ( const range of selection.getRanges() ) {\n\t\t\tfor ( const item of range.getItems() ) {\n\t\t\t\tif ( schema.checkAttribute( item, 'language' ) ) {\n\t\t\t\t\treturn item.getAttribute( 'language' ) || false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\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 language/textpartlanguageediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport TextPartLanguageCommand from './textpartlanguagecommand';\nimport { stringifyLanguageAttribute, parseLanguageAttribute } from './utils';\n\n/**\n * The text part language editing.\n *\n * Introduces the `'textPartLanguage'` command and the `'language'` model element attribute.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class TextPartLanguageEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'TextPartLanguageEditing';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\tsuper( editor );\n\n\t\t// Text part language options are only used to ensure that the feature works by default.\n\t\t// In the real usage it should be reconfigured by a developer. We are not providing\n\t\t// translations for `title` properties on purpose, as it's only an example configuration.\n\t\teditor.config.define( 'language', {\n\t\t\ttextPartLanguage: [\n\t\t\t\t{ title: 'Arabic', languageCode: 'ar' },\n\t\t\t\t{ title: 'French', languageCode: 'fr' },\n\t\t\t\t{ title: 'Spanish', languageCode: 'es' }\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\n\t\teditor.model.schema.extend( '$text', { allowAttributes: 'language' } );\n\t\teditor.model.schema.setAttributeProperties( 'language', {\n\t\t\tcopyOnEnter: true\n\t\t} );\n\n\t\tthis._defineConverters();\n\n\t\teditor.commands.add( 'textPartLanguage', new TextPartLanguageCommand( editor ) );\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_defineConverters() {\n\t\tconst conversion = this.editor.conversion;\n\n\t\tconversion.for( 'upcast' ).elementToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tkey: 'language',\n\t\t\t\tvalue: viewElement => {\n\t\t\t\t\tconst languageCode = viewElement.getAttribute( 'lang' );\n\t\t\t\t\tconst textDirection = viewElement.getAttribute( 'dir' );\n\n\t\t\t\t\treturn stringifyLanguageAttribute( languageCode, textDirection );\n\t\t\t\t}\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tattributes: { lang: /[\\s\\S]+/ }\n\t\t\t}\n\t\t} );\n\n\t\tconversion.for( 'downcast' ).attributeToElement( {\n\t\t\tmodel: 'language',\n\t\t\tview: ( attributeValue, { writer }, data ) => {\n\t\t\t\tif ( !attributeValue ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( !data.item.is( '$textProxy' ) && !data.item.is( 'documentSelection' ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst { languageCode, textDirection } = parseLanguageAttribute( attributeValue );\n\n\t\t\t\treturn writer.createAttributeElement( 'span', {\n\t\t\t\t\tlang: languageCode,\n\t\t\t\t\tdir: textDirection\n\t\t\t\t} );\n\t\t\t}\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\n/**\n * @module language/textpartlanguageui\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { Model, createDropdown, addListToDropdown } from 'ckeditor5/src/ui';\nimport { Collection } from 'ckeditor5/src/utils';\nimport { stringifyLanguageAttribute } from './utils';\n\nimport '../theme/language.css';\n\n/**\n * The text part language UI plugin.\n *\n * It introduces the `'language'` dropdown.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class TextPartLanguageUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'TextPartLanguageUI';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst options = editor.config.get( 'language.textPartLanguage' );\n\t\tconst defaultTitle = t( 'Choose language' );\n\t\tconst removeTitle = t( 'Remove language' );\n\t\tconst dropdownTooltip = t( 'Language' );\n\n\t\t// Register UI component.\n\t\teditor.ui.componentFactory.add( 'textPartLanguage', locale => {\n\t\t\tconst itemDefinitions = new Collection();\n\t\t\tconst titles = {};\n\n\t\t\tconst languageCommand = editor.commands.get( 'textPartLanguage' );\n\n\t\t\t// Item definition with false `languageCode` will behave as remove lang button.\n\t\t\titemDefinitions.add( {\n\t\t\t\ttype: 'button',\n\t\t\t\tmodel: new Model( {\n\t\t\t\t\tlabel: removeTitle,\n\t\t\t\t\tlanguageCode: false,\n\t\t\t\t\twithText: true\n\t\t\t\t} )\n\t\t\t} );\n\n\t\t\titemDefinitions.add( {\n\t\t\t\ttype: 'separator'\n\t\t\t} );\n\n\t\t\tfor ( const option of options ) {\n\t\t\t\tconst def = {\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: new Model( {\n\t\t\t\t\t\tlabel: option.title,\n\t\t\t\t\t\tlanguageCode: option.languageCode,\n\t\t\t\t\t\ttextDirection: option.textDirection,\n\t\t\t\t\t\twithText: true\n\t\t\t\t\t} )\n\t\t\t\t};\n\n\t\t\t\tconst language = stringifyLanguageAttribute( option.languageCode, option.textDirection );\n\n\t\t\t\tdef.model.bind( 'isOn' ).to( languageCommand, 'value', value => value === language );\n\n\t\t\t\titemDefinitions.add( def );\n\n\t\t\t\ttitles[ language ] = option.title;\n\t\t\t}\n\n\t\t\tconst dropdownView = createDropdown( locale );\n\t\t\taddListToDropdown( dropdownView, itemDefinitions );\n\n\t\t\tdropdownView.buttonView.set( {\n\t\t\t\tisOn: false,\n\t\t\t\twithText: true,\n\t\t\t\ttooltip: dropdownTooltip\n\t\t\t} );\n\n\t\t\tdropdownView.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'ck-text-fragment-language-dropdown'\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tdropdownView.bind( 'isEnabled' ).to( languageCommand, 'isEnabled' );\n\t\t\tdropdownView.buttonView.bind( 'label' ).to( languageCommand, 'value', value => {\n\t\t\t\treturn titles[ value ] || defaultTitle;\n\t\t\t} );\n\n\t\t\t// Execute command when an item from the dropdown is selected.\n\t\t\tthis.listenTo( dropdownView, 'execute', evt => {\n\t\t\t\tlanguageCommand.execute( {\n\t\t\t\t\tlanguageCode: evt.source.languageCode,\n\t\t\t\t\ttextDirection: evt.source.textDirection\n\t\t\t\t} );\n\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn dropdownView;\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\n/**\n * @module language/utils\n */\n\nimport { getLanguageDirection } from 'ckeditor5/src/utils';\n\n/**\n * Returns the language attribute value in a human-readable text format:\n *\n *\t\t<languageCode>:<textDirection>\n *\n * * `languageCode` - The language code used for the `lang` attribute in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.\n * * `textDirection` - One of the following values: `rtl` or `ltr`, indicating the reading direction of the language.\n *\n * See the {@link module:core/editor/editorconfig~LanguageConfig#textPartLanguage text part language configuration}\n * for more information about language properties.\n *\n * If the `textDirection` argument is omitted, it will be automatically detected based on `languageCode`.\n *\n * @param {String} languageCode The language code in the ISO 639-1 format.\n * @param {'ltr'|'rtl'} [textDirection] The language text direction. Automatically detected if omitted.\n * @returns {String}\n */\nexport function stringifyLanguageAttribute( languageCode, textDirection ) {\n\ttextDirection = textDirection || getLanguageDirection( languageCode );\n\treturn `${ languageCode }:${ textDirection }`;\n}\n\n/**\n * Retrieves language properties converted to attribute value by the\n * {@link module:language/utils~stringifyLanguageAttribute stringifyLanguageAttribute} function.\n *\n * @param {String} str The attribute value.\n * @returns {Object} result\n * @returns {String} result.languageCode The language code in the ISO 639 format.\n * @returns {String} result.textDirection The language text direction.\n */\nexport function parseLanguageAttribute( str ) {\n\tconst [ languageCode, textDirection ] = str.split( ':' );\n\n\treturn { languageCode, textDirection };\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\tid: moduleId,\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","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\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};","__webpack_require__.nc = undefined;","/**\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 language\n */\n\nexport { default as TextPartLanguage } from './textpartlanguage';\nexport { default as TextPartLanguageEditing } from './textpartlanguageediting';\nexport { default as TextPartLanguageUI } from './textpartlanguageui';\n"],"sourceRoot":""}