Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/wp-content/themes/themify-ultra/themify/js/admin/modules/codemirror/codemirror.min.js
Ðазад
var ThemifyCodeMiror;((d,c,l)=>{"use strict";const i="https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7/",p="ayu-dark",n={indentUnit:4,indentWithTabs:!0,inputStyle:"contenteditable",lineNumbers:!0,lineWrapping:!0,styleActiveLine:!1,autoCloseBrackets:!0,matchBrackets:!0,scrollbarStyle:null,completeSingle:!1,allowFullScreen:!0,theme:"default",extraKeys:{"Ctrl-Space":"autocomplete","Ctrl-/":"toggleComment","Cmd-/":"toggleComment","Alt-F":"findPersistent","Ctrl-F":"findPersistent","Cmd-F":"findPersistent"},direction:"ltr",gutters:["CodeMirror-lint-markers"]};ThemifyCodeMiror=class{constructor(e,t,s){const o=this.getSupportedModes(t);if(!o)throw"";this.mode=t,this.el=e,this.options=Object.assign({},n,"string"!=typeof o?o.options:{},s),this.options.mode="string"!=typeof o?o.mode:o,"default"===this.options.theme&&this.options.isDarkMode&&(this.options.theme=p),this.wrap=c.createElement("div"),this.wrap.className="tf_cdm tf_w tf_rel",this.wrap.tabIndex="-1",this.el.after(this.wrap),this.wrap.appendChild(this.el)}destroy(){this.editor&&(this.editor.off("keyup",this.showHint),this.editor.toTextArea(),this.wrap.after(this.el),this.wrap.remove(),this.editor=this.wrap=this.el=null)}save(){this.editor&&this.editor.save()}getModeAsssets(){const e=this.getSupportedModes(),t="string"!=typeof e,s=t&&e.mode&&e.mode.name?e.mode.name:this.mode;return t&&e.assets?e.assets:["mode/"+s+"/"+s+".min.js"]}loadHint(){const e=[],t=this.getModeAsssets(),s=t.includes("mode/python/python.min.js");return t.includes("mode/css/css.min.js")&&e.push(d.loadJs(i+"addon/hint/css-hint.min.js",!1,!1)),t.includes("mode/javascript/javascript.min.js")&&e.push(d.loadJs(i+"addon/hint/javascript-hint.min.js",!1,!1)),t.includes("mode/xml/xml.min.js")&&e.push(d.loadJs(i+"addon/hint/xml-hint.min.js",!1,!1)),t.includes("mode/htmlmixed/htmlmixed.min.js")&&e.push(d.loadJs(i+"addon/hint/html-hint.min.js",!1,!1)),t.includes("mode/sql/sql.min.js")&&e.push(d.loadJs(i+"addon/hint/sql-hint.min.js",!1,!1)),(s||t.includes("mode/clike/clike.min.js"))&&(e.push(d.loadJs(i+"addon/hint/anyword-hint.min.js",!1,!1)),s)&&e.push(d.loadJs("https://cdnjs.cloudflare.com/ajax/libs/codemirror/4.8.0/addon/hint/python-hint.min.js",!1,!1)),0<e.length&&(e.push(d.loadJs(i+"addon/hint/show-hint.min.js",!1,!1)),e.push(d.loadCss(i+"addon/hint/show-hint.min.css","tf_codemirror_hint",!1,this.getCssRoot())),this.options.hintOptions={container:this.wrap}),Promise.all(e)}getSupportedModes(e){const t={apl:"text/apl","avro-idl":{mode:{name:"idl",version:1,singleLineStringErrors:!1}},markup:{mode:"htmlmixed",assets:["mode/xml/xml.min.js","mode/javascript/javascript.min.js","mode/css/css.min.js","mode/htmlmixed/htmlmixed.min.js"],options:{continueComments:!0,autoCloseTags:!0,matchTags:{bothTags:!0}}},css:{mode:"text/css",options:{continueComments:!0},assets:["mode/css/css.min.js"]},javascript:{mode:"text/javascript",options:{continueComments:!0},assets:["mode/javascript/javascript.min.js"]},c:{mode:"text/x-csrc",assets:["mode/clike/clike.min.js"],options:{continueComments:!0}},fsharp:{mode:"text/x-fsharp",assets:["mode/mllike/mllike.min.js"]},bash:{mode:"text/x-sh",options:{styleActiveLine:!0}},armasm:{mode:{name:"gas",architecture:"ARMv6"},options:{styleActiveLine:!0}},php:{mode:"application/x-httpd-php",assets:["mode/xml/xml.min.js","mode/htmlmixed/htmlmixed.min.js","mode/javascript/javascript.min.js","mode/css/css.min.js","mode/clike/clike.min.js","mode/php/php.min.js"],options:{continueComments:!0,autoCloseTags:!0,matchTags:{bothTags:!0}}},phpdoc:{mode:"text/x-php",assets:["mode/clike/clike.min.js","mode/php/php.min.js"],options:{continueComments:!0}},brainfuck:"text/x-brainfuck",clojure:"text/x-clojure",cmake:"text/x-cmake",cobol:{mode:"text/x-cobol",options:{styleActiveLine:!0,showCursorWhenSelecting:!0}},coffeescript:"text/coffeescript",crystal:"text/x-crystal",csv:{mode:"text/x-q",assets:["mode/q/q.min.js"]},cypher:"application/x-cypher-query",d:"text/x-d",dart:{mode:"application/dart",assets:["mode/clike/clike.min.js","mode/dart/dart.min.js"],options:{continueComments:!0}},diff:"text/x-diff",django:{mode:"text/x-django",assets:["mode/xml/xml.min.js","mode/htmlmixed/htmlmixed.min.js","mode/django/django.min.js"],options:{continueComments:!0,autoCloseTags:!0,matchTags:{bothTags:!0}}},docker:{mode:"text/x-dockerfile",assets:["addon/mode/simple.min.js","mode/dockerfile/dockerfile.min.js"]},ebnf:{mode:{name:"ebnf"},options:{bracesMode:"javascript"},assets:["mode/javascript/javascript.min.js","mode/ebnf/ebnf.min.js"]},editorconfig:{mode:"text/x-properties",assets:["mode/properties/properties.min.js"]},eiffel:"text/x-eiffel",elm:"text/x-elm",etlua:"text/x-lua",erlang:"text/x-erlang",factor:{mode:"text/x-factor",assets:["addon/mode/simple.mn.js","mode/factor/factor.min.js"]},fortran:"text/x-fortran",gherkin:"text/x-feature",go:"text/x-go","go-module":"text/x-go",groovy:"text/x-groovy",haml:{mode:"text/x-haml",assets:["mode/xml/xml.min.js","mode/htmlmixed/htmlmixed.min.js","mode/javascript/javascript.min.js","mode/ruby/ruby.min.js","mode/haml/haml.min.js"],options:{continueComments:!0,autoCloseTags:!0,matchTags:{bothTags:!0}}},handlebars:{mode:{name:"handlebars",base:"text/html"},assets:["addon/mode/simple.min.js","addon/mode/multiplex.min.js","mode/xml/xml.min.js","mode/handlebars/handlebars.min.js"]},haskell:"text/x-literate-haskell",haxe:"text/x-haxe",http:"message/http",julia:"text/x-julia",latex:{mode:"text/x-stex",assets:["mode/stex/stex.min.js"]},lisp:{mode:"text/x-common-lisp",assets:["mode/commonlisp/commonlisp.min.js"]},livescript:"text/x-livescript",lua:"text/x-lua",markdown:{mode:"gfm",assets:["addon/mode/overlay.min.js","mode/xml/xml.min.js","mode/markdown/markdown.min.js","mode/gfm/gfm.min.js","mode/javascript/javascript.min.js","mode/css/css.min.js","mode/htmlmixed/htmlmixed.min.js","mode/clike/clike.min.js"],options:{continueComments:!0,autoCloseTags:!0,matchTags:{bothTags:!0}}},matlab:{mode:"text/x-octave",assets:["mode/octave/octave.min.js"]},nasm:{name:"gas",architecture:"x86"},nginx:"text/nginx",nsis:{mode:"text/x-nsis",assets:["addon/mode/simple.min.js","mode/nsis/nsis.min.js"]},oz:"text/x-oz",pascal:"text/x-pascal",perl:"text/x-perl",powershell:{mode:"application/x-powershell",options:{tabMode:"shift"}},protobuf:"text/x-protobuf",puppet:"text/x-puppet",python:{mode:{name:"python",version:3,singleLineStringErrors:!1}},r:"text/x-rsrc",rest:"text/x-rst",ruby:"text/x-ruby",rust:{mode:"text/x-rustsrc",assets:["addon/mode/simple.min.js","mode/rust/rust.min.js"]},sas:{mode:"text/x-sas",assets:["mode/xml/xml.min.js","mode/sas/sas.min.js"],options:{autoCloseTags:!0,matchTags:{bothTags:!0}}},sass:"text/x-sass",scheme:"text/x-scheme",smalltalk:"text/x-stsrc",smarty:{mode:{name:"smarty",version:3,baseMode:"text/html"},assets:["mode/xml/xml.min.js","mode/smarty/smarty.min.js"],options:{autoCloseTags:!0,matchTags:{bothTags:!0}}},sparql:"application/sparql-query",sql:{mode:"text/x-sql",assets:["mode/sql/sql.min.js"],options:{smartIndent:!0}},stylus:"text/x-styl",swift:"text/x-swift",tcl:"text/x-tcl",textile:"text/x-textile",toml:"text/x-toml",turtle:"text/turtle",twig:{name:"twig",htmlMode:!0},vbnet:{mode:"text/x-vb",assets:["mode/vb/vb.min.js"]},velocity:"text/velocity",verilog:{name:"verilog",noIndentKeywords:["package"]},vhdl:"text/x-vhdl","visual-basic":"text/vbscript",wasm:"text/webassembly","web-idl":"text/x-webidl",wolfram:"text/x-mathematica","xml-doc":{mode:"application/xml",assets:["mode/xml/xml.min.js"],options:{htmlMode:!1,autoCloseTags:!0,matchTags:{bothTags:!0}}},xquery:"application/xquery",yaml:"text/x-yaml"},s={htmlmixed:t.markup,aspnet:{mode:"application/x-aspx",assets:[...t.markup.assets,"addon/mode/multiplex.min.js","addon/mode/htmlembedded.min.js"],options:t.markup.options},cpp:Object.assign({},t.c,{mode:"text/x-c++src"}),csharp:Object.assign({},t.c,{mode:"text/x-csharp"}),cilkc:t.c,ocaml:Object.assign({},t.fsharp,{mode:"text/x-ocaml"}),ini:Object.assign({},t.editorconfig,{mode:"text/x-ini"}),java:Object.assign({},t.c,{mode:"text/x-java"}),jsdoc:Object.assign({},t.javascript,{mode:"text/x-java"}),json:Object.assign({},t.javascript,{mode:"application/json"}),jsstacktrace:t.javascript,kotlin:Object.assign({},t.c,{mode:"text/x-kotlin"}),less:Object.assign({},t.css,{mode:"text/x-less"}),objectivec:Object.assign({},t.c,{mode:"text/x-objectivec"}),plsql:Object.assign({},t.sql,{mode:"text/x-plsql"}),properties:t.editorconfig,scss:Object.assign({},t.css,{mode:"text/x-scss"}),scala:Object.assign({},t.c,{mode:"text/x-scala"}),vim:{mode:t.c.mode,assets:[...t.c.assets,"keymap/vim.min.js"],options:{keyMap:"vim",showCursorWhenSelecting:!0}},"shell-session":t.bash,soy:{mode:"text/x-soy",assets:[...t.markup.assets,"mode/soy/soy.min.js"],options:{autoCloseTags:!0,matchTags:{bothTags:!0}}},squirrel:Object.assign({},t.c,{mode:"text/x-squirrel"}),typescript:Object.assign({},t.javascript,{mode:"application/typescript"})},o=Object.assign({},t,s,{cilkcpp:s.cpp,ignore:s.ini,json5:s.json,jsonp:s.json,javadoclike:s.java,javastacktrace:s.java});return o[e=e||this.mode]}async loadLint(){const e=async e=>{const t={css:{url:"https://cdnjs.cloudflare.com/ajax/libs/csslint/1.0.5/csslint.min.js",check:!!l.CSSLint,options:{errors:!0,"box-model":!0,"display-property-grouping":!0,"duplicate-properties":!0,"known-properties":!0,"outline-none":!0}},javascript:{url:"https://cdnjs.cloudflare.com/ajax/libs/jshint/2.13.5/jshint.min.js",options:{boss:!0,curly:!0,eqeqeq:!0,eqnull:!0,esversion:11,expr:!0,immed:!0,noarg:!0,nonbsp:!0,onevar:!0,quotmark:"single",trailing:!0,undef:!0,unused:!0,browser:!0,globals:{_:!1,Backbone:!1,jQuery:!1,JSON:!1,wp:!1,Prism:!1,Themify:!1,window:!1,document:!1,Promise:!1,$:!1}}},coffeescript:{dependce:"https://cdn.jsdelivr.net/npm/coffeescript@2.7.0/lib/coffeescript-browser-compiler-legacy/coffeescript.js",url:"https://cdn.jsdelivr.net/npm/coffeelint@2.1.0/lib/coffeelint.min.js",check:!!l.coffeelint},json:{url:"https://cdnjs.cloudflare.com/ajax/libs/jsonlint/1.6.0/jsonlint.min.js",check:!!l.jsonlint},yaml:{url:"https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.1.0/js-yaml.min.js",check:!!l.jsyaml},html:{url:"https://cdn.jsdelivr.net/npm/htmlhint@1.1.4/dist/htmlhint.js",check:!!l.HTMLHint,options:{"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!1,"doctype-first":!1,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0,"alt-require":!0,"space-tab-mixed-disabled":"tab","attr-unsafe-chars":!0}}},s=t[e],o="html"===e?d.url+"js/admin/modules/codemirror/lints/htmlmixed":i+"addon/lint/"+e+"-lint.min.js";return s.dependce&&await d.loadJs(s.dependce,null,!1),await d.loadJs(s.url,s.check,!1),s.options&&(this.options.lint||(this.options.lint={}),this.options.lint[e]={options:s.options}),d.loadJs(o,!1,!1)},t=this.getModeAsssets(),s=[];return t.includes("mode/css/css.min.js")&&s.push(e("css")),t.includes("mode/javascript/javascript.min.js")&&("application/json"===this.options.mode?s.push(e("json")):s.push(e("javascript"))),t.includes("mode/yaml/yaml.min.js")&&s.push(e("yaml")),t.includes("mode/coffeescript/coffeescript.min.js")&&s.push(e("coffeescript")),t.includes("mode/htmlmixed/htmlmixed.min.js")&&s.push(e("html")),0<s.length&&(s.push(d.loadJs(i+"addon/lint/lint.min.js",!1,!1)),s.push(d.loadCss(i+"addon/lint/lint.min.css","tf_codemirror_lint",!1,this.getCssRoot()))),Promise.all(s.flat())}loadMode(){const s=this.getModeAsssets(),o=[];for(let e=0,t=s.length;e<t;++e)o.push(d.loadJs(i+s[e],!1,!1));return Promise.all(o)}getCssRoot(){return this.el.getRootNode().querySelector("style,link")}requestFullscreen(){if(!c.fullscreenElement){const e=this.wrap;return e.requestFullscreen?e.requestFullscreen():e.webkitEnterFullscreen?e.webkitEnterFullscreen():e.webkitrequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullscreen?e.mozRequestFullScreen():Promise.reject()}}exitFullscreen(){return c.exitFullscreen?c.exitFullscreen():c.webkitExitFullscreen||c.webkitExitFullscreen?c.webkitExitFullscreen():c.mozCancelFullScreen?c.mozCancelFullScreen():c.cancelFullScreen?c.cancelFullScreen():c.msExitFullscreen?c.msExitFullscreen():Promise.reject()}showHint(e,t){let s,o=/^[a-zA-Z]$/.test(t.key)||"Backspace"===t.key,i,n,a;e.state.completionActive&&o||"string"!==(a=e.getTokenAt(e.getCursor())).type&&"comment"!==a.type&&(n=l.CodeMirror.innerMode(e.getMode(),a.state).mode.name,i=e.doc.getLine(e.doc.getCursor().line).substr(0,e.doc.getCursor().ch),"html"===n||"xml"===n?s="<"===t.key||"/"===t.key&&"tag"===a.type||o&&"tag"===a.type||o&&"attribute"===a.type||"="===a.string&&a.state.htmlState&&a.state.htmlState.tagName:"css"===n?s=o||":"===t.key||" "===t.key&&/:\s+$/.test(i):"javascript"===n?s=o||"."===t.key:!o||"clike"!==n&&"python"!==n||(s="keyword"===a.type||"variable"===a.type),s)&&e.showHint({completeSingle:!1})}themeSwitcher(){const s="http://www.w3.org/2000/svg",e=c.createElement("button"),t=c.createElementNS(s,"svg"),o=c.createElementNS(s,"g"),i=c.createElementNS(s,"mask"),n=c.createElementNS(s,"rect"),a=c.createElementNS(s,"circle"),l=c.createElementNS(s,"circle"),m=c.createDocumentFragment(),r=[[12,1,12,3],[12,21,12,23],[4.22,4.22,5.64,5.64],[18.36,18.36,19.78,19.78],[1,12,3,12],[21,12,23,12],[4.22,19.78,5.64,18.36],[18.36,5.64,19.78,4.22]];e.className="tf_cdm_tgl_theme",e.type="button",e.title="Toggles light & dark",t.setAttributeNS(null,"viewBox","0 0 24 24"),t.setAttribute("width",14),t.setAttribute("height",14),i.setAttribute("id","tf-moon-mask"),i.setAttribute("class","tf_cdm_moon"),n.setAttribute("width","100%"),n.setAttribute("height","100%"),a.setAttribute("r",6),n.setAttribute("fill","white"),a.setAttribute("cx",24),a.setAttribute("cy",10),a.setAttribute("fill","black"),l.setAttribute("class","tf_cdm_sun"),l.setAttribute("cx","12"),l.setAttribute("cy","12"),l.setAttribute("r","6"),l.setAttribute("mask","url(#tf-moon-mask)"),l.setAttribute("stroke","currentColor"),o.setAttribute("stroke","currentColor");for(let t=0,e=r.length;t<e;++t){let e=c.createElementNS(s,"line");e.setAttribute("x1",r[t][0]),e.setAttribute("y1",r[t][1]),e.setAttribute("x2",r[t][2]),e.setAttribute("y2",r[t][3]),m.appendChild(e)}return o.appendChild(m),i.append(n,a),t.append(i,l,o),e.appendChild(t),e.tfOn(d.click,e=>{e.stopImmediatePropagation(),this.setDarkMode()},{passive:!0}),this.options.theme===p&&this.setDarkMode(!0),e}async setDarkMode(e){const t=this.wrap.classList,s=void 0===e?t.contains("tf_cdm_dark"):!e;s?t.remove("tf_cdm_dark"):(t.add("tf_cdm_dark","tf_lazy"),await d.loadCss(i+"theme/"+p+".min.css","tf_codemirror_"+p,!1,this.getCssRoot()),t.remove("tf_lazy")),this.editor.setOption("theme",s?"default":p)}run(){this.el.disabled=1,this.el.style.opacity=.5;const e=c.createElement("div"),t=(e.className="tf_loader tf_abs_c",this.el.before(e),new Promise(async(t,s)=>{try{const e=[],o=c.createElement("div");await Promise.all([d.loadCss(d.url+"css/admin/codemirror.css","tf_codemirror",null,this.getCssRoot()),d.loadCss(i+"codemirror.min.css","tf_codemirror_cdn",!1,this.getCssRoot()),d.loadJs(i+"codemirror.min.js",!!l.CodeMirror,!1)]),l.CodeMirror.modeURL=i+"mode/",this.options.allowFullScreen&&(this.options.extraKeys.F11=this.options.extraKeys.LeftTripleClick=e=>{c.fullscreenElement?this.exitFullscreen():this.requestFullscreen()}),"default"!==this.options.theme&&e.push(d.loadCss(i+"theme/"+this.options.theme+".min.css","tf_codemirror_"+this.options.theme,!1,this.getCssRoot())),this.options.matchBrackets&&e.push(d.loadJs(i+"addon/edit/matchbrackets.min.js",!1,!1)),this.options.autoCloseBrackets&&e.push(d.loadJs(i+"addon/edit/closebrackets.min.js",!1,!1)),this.options.autoCloseTags&&e.push(d.loadJs(i+"addon/edit/closetag.min.js",!1,!1)),this.options.matchTags&&(e.push(d.loadJs(i+"addon/fold/xml-fold.min.js",!1,!1)),e.push(d.loadJs(i+"addon/edit/matchtags.min.js",!1,!1))),this.options.styleActiveLine&&e.push(d.loadJs(i+"addon/selection/active-line.min.js",!1,!1)),this.options.continueComments&&e.push(d.loadJs(i+"addon/comment/continuecomment.min.js",!1,!1)),this.options.runMode&&e.push(d.loadJs(i+"addon/runmode/runmode.min.js",!1,!1)),e.push(this.loadHint()),e.push(this.loadLint()),e.push(this.loadMode()),await Promise.all(e.flat()),setTimeout(()=>{if(this.editor=l.CodeMirror.fromTextArea(this.el,this.options),this.editor.on("change",e=>{this.el.value=e.getValue()}),(this.el.tf_mirror=this).editor.on("keyup",this.showHint),o.className="tf_cdm_controls tf_opacity",o.appendChild(this.themeSwitcher()),this.options.allowFullScreen){const e=c.createElement("button");e.className="tf_cdm_fullscreen_btn tf_rel",e.type="button",e.title="FullScreen Mode(Hot Key F11) or Tripple Click",e.tfOn(d.click,e=>{e.stopImmediatePropagation(),c.fullscreenElement?this.exitFullscreen():this.requestFullscreen()},{passive:!0}),o.appendChild(e)}this.wrap.appendChild(o),t(this)},500)}catch(e){console.log(e),s(e)}}));return t.finally(()=>{e.remove(),this.el.disabled=this.el.style.opacity=""}),t}}})(Themify,document,window);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка