PageSourceSearch

https://www.strasbourg.eu/o/frontend-editor-ckeditor-web/__liferay…ditor$ckeditor5-word-count$dist$index.js.js

js strasbourg.eu collected 2026-09-24 08:38:19 UTC 10,567 bytes, 12 lines download raw bytes

1import{Accessibility as S,Command as O,CommandCollection as P,Context as k,ContextPlugin as W,EditingKeystrokeHandler as v,Editor as R,ElementApiMixin as F,MultiCommand as j,PendingActions as N,Plugin as y,_DEFAULT_ACCESSIBILITY_GROUP_ID as U,_getEditorUsageData as z,attachToForm as H,secureSourceElement as K}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-core$dist$index.js.js";import{AccessibilityHelp as $,AccessibilityHelpContentView as Q,AriaLiveAnnouncer as Y,AriaLiveAnnouncerPoliteness as Z,AriaLiveAnnouncerRegionView as J,AriaLiveAnnouncerView as X,AutocompleteView as ee,Badge as oe,BalloonPanelView as re,BalloonToolbar as te,BlockButtonView as ie,BlockToolbar as ne,BodyCollection as pe,BoxedEditorUIView as ae,ButtonLabelView as fe,ButtonLabelWithHighlightView as se,ButtonView as me,CollapsibleView as le,ColorGridView as xe,ColorGridsFragmentView as de,ColorPickerFragmentView as ue,ColorPickerInputRowView as ce,ColorPickerView as he,ColorSelectorView as ge,ColorTileView as we,ComponentFactory as ye,ContextualBalloon as be,CssTransitionDisablerMixin as Ve,DefaultMenuBarItems as _e,Dialog as Ce,DialogActionsView as Be,DialogContentView as Te,DialogView as Ie,DialogViewPosition as Me,DocumentColorCollection as De,DraggableViewMixin as Ee,DropdownButtonView as Le,DropdownMenuButtonView as Ae,DropdownMenuListItemButtonView as Se,DropdownMenuListItemView as Oe,DropdownMenuListView as Pe,DropdownMenuNestedMenuPanelView as ke,DropdownMenuNestedMenuView as We,DropdownMenuPanelPositioningFunctions as ve,DropdownMenuRootListView as Re,DropdownPanelView as Fe,DropdownView as je,EditableUIView as Ne,EditorUI as Ue,EditorUIView as ze,EvaluationBadge as He,FileDialogButtonView as Ke,FileDialogListItemButtonView as qe,FileDialogViewMixin as Ge,FocusCycler as $e,FormHeaderView as Qe,FormRowView as Ye,HighlightedTextView as Ze,IconView as Je,IframeView as Xe,InlineEditableUIView as eo,InputBase as oo,InputNumberView as ro,InputTextView as to,InputView as io,ItemsView as no,LabelView as po,LabelWithHighlightView as ao,LabeledFieldView as fo,LabeledInputView as so,ListItemButtonView as mo,ListItemGroupView as lo,ListItemView as xo,ListSeparatorView as uo,ListView as co,MenuBarMenuButtonView as ho,MenuBarMenuListItemButtonView as go,MenuBarMenuListItemFileDialogButtonView as wo,MenuBarMenuListItemView as yo,MenuBarMenuListView as bo,MenuBarMenuPanelView as Vo,MenuBarMenuView as _o,MenuBarView as Co,NESTED_TOOLBAR_ICONS as Bo,Notification as To,PoweredBy as Io,SearchInfoView as Mo,SearchResultsView as Do,SearchTextView as Eo,SliderView as Lo,SpinnerView as Ao,SplitButtonView as So,StickyPanelView as Oo,SwitchButtonView as Po,Template as b,TextareaView as ko,ToolbarLineBreakView as Wo,ToolbarSeparatorView as vo,ToolbarView as Ro,TooltipManager as Fo,UIModel as jo,View as V,ViewCollection as No,ViewModel as Uo,_CheckIconHolderView as zo,_CollapsibleView as Ho,_ContextualBalloonRotatorView as Ko,_DropdownMenuBehaviors as qo,_DropdownRootMenuBehaviors as Go,_MenuBarBehaviors as $o,_MenuBarMenuBehaviors as Qo,_MenuBarMenuViewPanelPositioningFunctions as Yo,_SearchInfoView as Zo,_SearchTextQueryView as Jo,_TemplateBinding as Xo,_TemplateIfBinding as er,_TemplateToBinding as or,_convertColor as rr,_convertColorToHex as tr,_preventUiViewDefault as ir,_processMenuBarConfig as nr,_registerCustomElement as pr,_tryNormalizeHexColor as ar,addKeyboardHandlingForGrid as fr,addListToDropdown as sr,addMenuToDropdown as mr,addToolbarToDropdown as lr,clickOutsideHandler as xr,createDropdown as dr,createLabeledDropdown as ur,createLabeledInputNumber as cr,createLabeledInputText as hr,createLabeledTextarea as gr,filterGroupAndItemNames as wr,focusChildOnDropdownOpen as yr,getLocalizedColorOptions as br,isFocusable as Vr,isViewWithFocusCycler as _r,normalizeColorOptions as Cr,normalizeMenuBarConfig as Br,normalizeSingleColorDefinition as Tr,normalizeToolbarConfig as Ir,submitHandler as Mr}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-ui$dist$index.js.js";import{CKEditorError as Lr,Collection as Ar,Config as Sr,DOCUMENTATION_URL as Or,DomEmitterMixin as Pr,ElementReplacer as kr,EmitterMixin as Wr,EventInfo as vr,FocusTracker as Rr,KeystrokeHandler as Fr,Locale as jr,ObservableMixin as Nr,Rect as Ur,ResizeObserver as zr,_clearTranslations as Hr,_getEmitterId as Kr,_getEmitterListenedTo as qr,_getUserAgent as Gr,_isAndroid as $r,_isBlink as Qr,_isGecko as Yr,_isMac as Zr,_isMediaForcedColors as Jr,_isMotionReduced as Xr,_isRegExpUnicodePropertySupported as et,_isSafari as ot,_isWindows as rt,_isiOS as tt,_setEmitterId as it,_translate as nt,_unifyTranslations as pt,abortableDebounce as at,add as ft,areConnectedThroughProperties as st,collectStylesheets as mt,compareArrays as lt,count as xt,crc32 as dt,createElement as ut,delay as ct,diff as ht,diffToChanges as gt,env as _,exponentialDelay as wt,fastDiff as yt,findClosestScrollableAncestor as bt,first as Vt,formatHtml as _t,getAncestors as Ct,getBorderWidths as Bt,getCode as Tt,getCommonAncestor as It,getDataFromElement as Mt,getEnvKeystrokeText as Dt,getLanguageDirection as Et,getLocalizedArrowKeyCodeDirection as Lt,getOptimalPosition as At,getPositionedAncestor as St,getRangeFromMouseEvent as Ot,getVisualViewportOffset as Pt,global as kt,indexOf as Wt,insertAt as vt,insertToPriorityArray as Rt,isArrowKeyCode as Ft,isCombiningMark as jt,isComment as Nt,isForwardArrowKeyCode as Ut,isHighSurrogateHalf as zt,isInsideCombinedSymbol as Ht,isInsideEmojiSequence as Kt,isInsideSurrogatePair as qt,isIterable as Gt,isLowSurrogateHalf as $t,isNode as Qt,isRange as Yt,isText as Zt,isValidAttributeName as Jt,isViewWithFocusTracker as Xt,isVisible as ei,isWindow as oi,keyCodes as ri,logError as ti,logWarning as ii,mapsEqual as ni,nth as pi,objectToMap as ai,parseBase64EncodedObject as fi,parseKeystroke as si,priorities as mi,releaseDate as li,remove as xi,retry as di,scrollAncestorsToShowTarget as ui,scrollViewportToShowTarget as ci,setDataInElement as hi,spliceArray as gi,spy as wi,toArray as yi,toMap as bi,toUnit as Vi,uid as _i,version as Ci,wait as Bi}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-utils$dist$index.js.js";function C(o){return typeof o=="object"&&o!==null}function B(o,e,{signal:r,edges:t}={}){let i,n=null,f=t!=null&&t.includes("leading"),a=t==null||t.includes("trailing"),s=()=>{n!==null&&(o.apply(i,n),i=void 0,n=null)},m=()=>{a&&s(),u()},p=null,x=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,m()},e)},l=()=>{p!==null&&(clearTimeout(p),p=null)},u=()=>{l(),i=void 0,n=null},M=()=>{l(),s()},d=function(...D){if(r?.aborted)return;i=this,n=D;let E=p==null;x(),f&&E&&s()};return d.schedule=x,d.cancel=u,d.flush=M,r?.addEventListener("abort",u,{once:!0}),d}function T(o,e=0,r={}){typeof r!="object"&&(r={});let{leading:t=!1,trailing:i=!0,maxWait:n}=r,f=Array(2);t&&(f[0]="leading"),i&&(f[1]="trailing");let a,s=null,m=B(function(...l){a=o.apply(this,l),s=null},e,{edges:f}),p=function(...l){return n!=null&&(s===null&&(s=Date.now()),Date.now()-s>=n)?(a=o.apply(this,l),s=Date.now(),m.cancel(),m.schedule(),a):(m.apply(this,l),a)},x=()=>(m.flush(),a);return p.cancel=m.cancel,p.flush=x,p}function c(o,e=0,r={}){typeof r!="object"&&(r={});let{leading:t=!0,trailing:i=!0}=r;return T(o,e,{leading:t,trailing:i,maxWait:e})}function I(o){if(typeof o!="object"||o==null)return!1;
1if(Object.getPrototypeOf(o)===null)return!0;if(Object.prototype.toString.call(o)!=="[object Object]"){let r=o[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(o,Symbol.toStringTag)?.writable?!1:o.toString()===`[object ${r}]`}let e=o;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(o)===e}function h(o){return C(o)&&o.nodeType===1&&!I(o)}function w(o){if(o.is("$text")||o.is("$textProxy"))return o.data;let e=o,r="",t=null;for(let i of e.getChildren()){let n=w(i);t&&t.is("element")&&(r+=`
2`),r+=n,t=i}return r}var g=class extends y{_config;_outputView;_wordsMatchRegExp;constructor(e){super(e),this.set("characters",0),this.set("words",0),Object.defineProperties(this,{characters:{get(){return this.characters=this._getCharacters(this._getText())}},words:{get(){return this.words=this._getWords(this._getText())}}}),this.set("_wordsLabel",void 0),this.set("_charactersLabel",void 0),this._config=e.config.get("wordCount")||{},this._outputView=void 0,this._wordsMatchRegExp=_.features.isRegExpUnicodePropertySupported?new RegExp("([\\p{L}\\p{N}]+\\S?)+","gu"):/([a-zA-Z0-9À-ž]+\S?)+/gu}static get pluginName(){return"WordCount"}static get isOfficialPlugin(){return!0}init(){this.editor.model.document.on("change:data",c(this._refreshStats.bind(this),250)),typeof this._config.onUpdate=="function"&&this.on("update",(r,t)=>{this._config.onUpdate(t)}),h(this._config.container)&&this._config.container.appendChild(this.wordCountContainer)}destroy(){this._outputView&&(this._outputView.element.remove(),this._outputView.destroy()),super.destroy()}get wordCountContainer(){let e=this.editor,r=e.t,t=e.config.get("wordCount.displayWords"),i=e.config.get("wordCount.displayCharacters"),n=b.bind(this,this),f=[];return this._outputView||(this._outputView=new V,(t||t===void 0)&&(this.bind("_wordsLabel").to(this,"words",a=>r("Words: %0",a)),f.push({tag:"div",children:[{text:[n.to("_wordsLabel")]}],attributes:{class:"ck-word-count__words"}})),(i||i===void 0)&&(this.bind("_charactersLabel").to(this,"characters",a=>r("Characters: %0",a)),f.push({tag:"div",children:[{text:[n.to("_charactersLabel")]}],attributes:{class:"ck-word-count__characters"}})),this._outputView.setTemplate({tag:"div",attributes:{class:["ck","ck-word-count"]},children:f}),this._outputView.render()),this._outputView.element}_getText(){let e="";for(let r of this.editor.model.document.getRoots())e!==""&&(e+=`
3`),e+=w(r);return e}_getCharacters(e){return e.replace(/\n/g,"").length}_getWords(e){return(e.match(this._wordsMatchRegExp)||[]).length}_refreshStats(){let e=this._getText(),r=this.words=this._getWords(e),t=this.characters=this._getCharacters(e);this.fire("update",{words:r,characters:t})}};export{g as WordCount,w as _modelElementToPlainText};
4/*! Bundled license information:
5
6@ckeditor/ckeditor5-word-count/dist/index.js:
7  (**
8   * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
9   * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
10   *)
11*/
12//# sourceMappingURL=@ckeditor$ckeditor5-word-count$dist$index.js.(ZXLP6HYI).js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.