PageSourceSearch

https://lukcbs.ru/kubcms-front/v5/master/s/c-index-BMAgERNP.js

js lukcbs.ru collected 2026-10-03 18:57:23 UTC 10,715 bytes, 24 lines download raw bytes

1import{aR as P,cb as W,a_ as g,cN as $,bm as I,aU as z,bn as H,bo as R,by as J,cB as j,ch as q,el as O,bc as G,c_ as Q,gW as X,e1 as Y,cd as Z,ce as U,aV as x,aW as ee,b1 as h,bg as b,b3 as k,cM as te,cL as oe,bR as A,cr as ae,b6 as ne,b2 as re}from"./c-index-D0PNHfG-.js";import{E as V}from"./c-index-C3rzOKvV.js";/* empty css                     */function le(t,e,n){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("script");typeof e=="function"&&(n=e,e={}),e=e||{},n=n||function(){},r.type=e.type||"text/javascript",r.charset=e.charset||"utf8",r.async="async"in e?!!e.async:!0,r.src=t,e.attrs&&ie(r,e.attrs),e.text&&(r.text=String(e.text));var d="onload"in r?D:se;d(r,n),r.onload||D(r,n),a.appendChild(r)}function ie(t,e){for(var n in e)t.setAttribute(n,e[n])}function D(t,e){t.onload=function(){this.onerror=this.onload=null,e(null,t)},t.onerror=function(){this.onerror=this.onload=null,e(new Error("Failed to load "+this.src),t)}}function se(t,e){t.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,e(null,t))}}var B;function T(t,e){return"CKEDITOR"in window?Promise.resolve(CKEDITOR):typeof t!="string"||t.length<1?Promise.reject(new TypeError("CKEditor URL must be a non-empty string.")):(B||(B=T.scriptLoader(t).then(function(n){return e&&e(n),n})),B)}T.scriptLoader=function(t){return new Promise(function(e,n){le(t,function(a){if(B=void 0,a)return n(a);if(!window.CKEDITOR)return n(new Error("Script loaded from editorUrl doesn't provide CKEDITOR namespace."));e(CKEDITOR)})})};function ue(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a;return function(){clearTimeout(a);for(var r=arguments.length,d=new Array(r),u=0;u<r;u++)d[u]=arguments[u];a=setTimeout(t.bind.apply(t,[n].concat(d)),e)}}const de=P({name:"ckeditor-1",props:{modelValue:{type:String,default:""},fontsCss:{type:String,default:""},type:{type:String,default:"classic",validator:t=>["classic","inline"].includes(t)},editorUrl:{type:String,default:"static/js/ckeditor/ckeditor.js?v=1"},config:{type:Object,default:()=>{}},tagName:{type:String,default:"textarea"},readOnly:{type:Boolean,default:null},throttle:{type:Number,default:80},darkModeAuto:{type:Boolean,required:!1,default:!0}},emits:["update:model-value","ready","namespaceloaded","blur","focus"],setup(t,{emit:e}){const n=t.darkModeAuto?W():g(!1),a=g(),r=g(!1),d=g(!1),u=g(null),f=g(),c=g(),{config:C,modelValue:v,type:m,editorUrl:p,throttle:w,readOnly:y,tagName:S}=$(t),E=o=>{var i,s;if(!t.darkModeAuto||!a.value)return;const l=(s=(i=a.value)==null?void 0:i.document)==null?void 0:s.getBody();if(o){if(!l.hasClass("dark")){l.addClass("dark");return}}else if(l.hasClass("dark")){l.removeClass("dark");return}};I(()=>n.value,o=>{E(o)});const L=()=>{const o=C.value||{};o.on=o.on||{},(o==null?void 0:o.delayIfDetached)===void 0&&(o.delayIfDetached=!0),y.value!==null&&(o.readOnly=y.value);const l=o.on.instanceReady;return o.on.instanceReady=i=>{a.value=i.editor,J().then(()=>{_();try{E(n.value)}catch{let F=0;c.value=setInterval(()=>{if(F>10){c.value&&clearInterval(c.value);return}try{F++,E(n.value),c.value&&clearInterval(c.value)}catch{}},300)}l&&l(i)})},o},_=()=>{const o=v;a.value&&(a.value.fire("lockSnapshot"),a.value.setData(o.value,{callback:()=>{if(K(),!a.value)return;const l=a.value.getData();o.value!==l?(r.value||(e("ready",a.value),r.value=!0),e("update:model-value",l)):r.value||(e("ready",a.value),r.value=!0),a.value.fire("unlockSnapshot")}}))},K=()=>{const o=a.value;if(!o)return;const l=ue(i=>{const s=o.getData();v.value!==s&&e("update:model-value",s)},w.value);o.on("change",l),o.on("focus",i=>{e("focus",i,o)}),o.on("blur",i=>{e("blur",i,o)})},M=o=>new Promise((l,i)=>{const s=document.createElement("script");s.src=o,s.onload=l,s.onerror=i,document.head.appendChild(s)}),N=o=>Array.from(document.scripts).some(l=>l.src.includes(o));return z(async()=>{const o=`${"/kubcms-front/v5/master".endsWith("/")?"/kubcms-front/v5/master":"/kubcms-front/v5/master/"}${p.value.replace(/^\//,"")}`;if(!N(o))try{await M(o)}catch{return}t.darkModeAuto&&(f.value=setInterval(()=>{E(n.value)},500)),T(p.value,l=>{e("namespaceloaded",l)}).then(()=>
1{if(CKEDITOR.addCss(`.dark.cke_editable { background-color: ${getComputedStyle(document.documentElement).getPropertyValue("--el-bg-color")}; color: white }${t.fontsCss}`),CKEDITOR.addCss(`.highlight-itemprop [itemprop] {
2  background-color: #fdffad70;
3  position: relative;
4}
5.highlight-itemprop [itemprop] [itemprop] {
6  background-color: #fdffad70;
7}
8.highlight-itemprop [itemprop] [itemprop] [itemprop] {
9  background-color: #fdffad70;
10}
11.highlight-itemprop [itemprop]:hover::before {
12  content: "itemprop: " attr(itemprop);
13  position: absolute;
14  top: -10px;
15  right: 2px;
16  padding: 2px 4px;
17  font-size: 10px;
18  line-height: 1;
19  background-color: #409eff;
20  color: #fff;
21  border-radius: 3px;
22  pointer-events: none;
23  z-index: 10000;
24}`),!u.value||d.value)return;const l=L(),i=m.value==="inline"?"inline":"replace",s=u.value;window.CKEDITOR[i](s,l)})}),H(()=>{a.value&&a.value.destroy(),f.value&&clearInterval(f.value),c.value&&clearInterval(c.value),d.value=!0}),I(v,o=>{a.value&&a.value.getData()!==o&&a.value.setData(o)}),I(y,o=>{a.value&&a.value.setReadOnly(o)}),()=>R("div",[R(S.value,{ref:u})])}});Q.add(X);const ce=[{name:"document",items:["Source","-","Preview","Print"]},{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"editing",items:["Find","Replace","-","SelectAll"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","CopyFormatting","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote","CreateDiv","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Table","HorizontalRule","SpecialChar","PageBreak","Iframe"]},"/",{name:"styles",items:["Styles","Format","Font","FontSize"]},{name:"colors",items:["TextColor","BGColor"]},{name:"tools",items:["Maximize","ShowBlocks"]},["ckwebspeech","itemprop","rutubeembed"]],me=P({components:{CKeditor:de,FontAwesomeIcon:j,ElPopover:V},props:{modelValue:{type:[String],required:!0},darkModeAuto:{type:Boolean,required:!1,default:!0}},emits:["update:model-value"],setup(t,{emit:e}){const n=q(),a=O("ckeditor-toolbar-type","custom"),r=O("ckeditor-highlight-itemprop",!0),d=g(0),u=()=>{d.value++},f=g(""),c=()=>{var w,y;let m="",p=[];for(const S of((y=(w=n==null?void 0:n.site)==null?void 0:w.site)==null?void 0:y.customFonts)||[])m+=S.renderedCss,p.push(S.name);return p.push("Arial/Arial"),p.push(" Helvetica"),f.value=m,{contentsLanguage:"ru",language:"ru",bodyClass:r.value?"highlight-itemprop":"",height:400,toolbar:[["ckwebspeech"],{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Table","HorizontalRule","SpecialChar","PageBreak","Iframe"]},{name:"tools",items:["Maximize","ShowBlocks"]},{name:"document",items:["Source","-","Preview","Print","-","Templates","Ckwebspeech"]},{name:"ckwebspeech"},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","CopyFormatting","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl"]},{name:"styles",items:["Styles","Format","Font","FontSize"]},{name:"colors",items:["TextColor","BGColor"]},["itemprop"],["rutubeembed"]],disableNativeSpellChecker:!1,filebrowserUploadUrl:"/api/admin/attachments/upload/texteditor",filebrowserImageUploadUrl:"/api/admin/attachments/upload/texteditor",filebrowserUploadWindowWidth:"640",filebrowserUploadWindowHeight:"480",extraPlugins:"uploadimage,image2,removeformat,justify,colorbutton,itemprop,rutubeembed,codemirror",uploadUrl:"/api/admin/attachments/upload/texteditor",format_tags:"p;h1;h2;h3;pre",ckwebspeech:{culture:"ru-ru",commandvoice:"команда",commands:[{newline:"новая строка"},{newparagraph:"новый параграф"},{undo:"назад"},{redo:"вперед"}]},allowedContent:!0,font_names:p.join("; "),codemirror:{autoCloseBrackets:!0,autoCloseTags:!0,autoFormatOnStart:!0,autoFormatOnUncomment:!0,continueComments:!0,enableCodeFolding:!0,enableCodeFormatting:!0,enableSearchTools:!0,highlightMatches:!0,indentWithTabs:!1,lineNumbers:!0,lineWrapping:!0,mode:"htmlmi
24xed",matchBrackets:!0,matchTags:!0,showAutoCompleteButton:!0,showCommentButton:!0,showFormatButton:!0,showSearchButton:!0,showTrailingSpace:!0,showUncommentButton:!0,styleActiveLine:!0,theme:"default",useBeautifyOnStart:!0}}},C=m=>{e("update:model-value",m)},v=G(()=>{const m=Y(c());return a.value==="classic"&&(m.toolbar=ce),m});return{onChange:C,cpCkeEditorConfig:v,editorFontsCss:f,rerenderEditor:u,key:d,lcToolbarType:a,lcHighlightItemprop:r}}}),pe={class:"relative"},fe={class:"absolute top-1 right-2 z-1"},he={class:"flex flex-col gap-2"},ge={class:"mt-4 flex flex-col gap-1"},ve={class:"ml-2"};function ye(t,e,n,a,r,d){const u=U("FontAwesomeIcon"),f=oe,c=te,C=ae,v=V,m=U("CKeditor");return x(),ee("div",pe,[h("div",fe,[b(v,{trigger:"click",width:"200",placement:"bottom-end"},{reference:k(()=>[b(u,{class:"cursor-pointer focus:outline-none",icon:"gear"})]),default:k(()=>[h("div",he,[e[4]||(e[4]=h("div",{class:"text-sm font-bold"},[h("span",null,"Вид редактора")],-1)),b(c,{modelValue:t.lcToolbarType,"onUpdate:modelValue":e[0]||(e[0]=p=>t.lcToolbarType=p),onChange:t.rerenderEditor},{default:k(()=>[b(f,{label:"Стандартный",value:"custom"},{default:k(()=>[...e[2]||(e[2]=[A("Стандартный",-1)])]),_:1}),b(f,{label:"Классический",value:"classic"},{default:k(()=>[...e[3]||(e[3]=[A("Классический",-1)])]),_:1})]),_:1},8,["modelValue","onChange"])]),h("div",ge,[e[5]||(e[5]=h("div",{class:"text-sm font-bold"},[h("span",null,"Подсвечивать itemprop")],-1)),h("div",null,[b(C,{modelValue:t.lcHighlightItemprop,"onUpdate:modelValue":e[1]||(e[1]=p=>t.lcHighlightItemprop=p),onChange:t.rerenderEditor},null,8,["modelValue","onChange"]),h("span",ve,ne(t.lcHighlightItemprop?"Да":"Нет"),1)])])]),_:1})]),(x(),re(m,{key:t.key,config:t.cpCkeEditorConfig,darkModeAuto:t.darkModeAuto,modelValue:t.modelValue,"onUpdate:modelValue":t.onChange,fontsCss:t.editorFontsCss},null,8,["config","darkModeAuto","modelValue","onUpdate:modelValue","fontsCss"]))])}const Se=Z(me,[["render",ye]]);export{Se as C,de as _};

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.