/*! * XRegExp v2.0.0 * (c) 2007-2012 Steven Levithan * MIT License */ var XRegExp;XRegExp=XRegExp||(function(c){var q,i,p,h={natives:false,extensibility:false},t={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},e={},o={},n=[],b="default",l="class",A={"default":/^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/,"class":/^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/},z=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,x=/([\s\S])(?=[\s\S]*\1)/g,r=/^(?:[?*+]|{\d+(?:,\d*)?})\??/,B=t.exec.call(/()??/,"")[1]===c,j=RegExp.prototype.sticky!==c,g=false,y="gim"+(j?"y":"");function v(E,C,D){var F;for(F in q.prototype){if(q.prototype.hasOwnProperty(F)){E[F]=q.prototype[F]}}E.xregexp={captureNames:C,isNative:!!D};return E}function k(C){return(C.global?"g":"")+(C.ignoreCase?"i":"")+(C.multiline?"m":"")+(C.extended?"x":"")+(C.sticky?"y":"")}function s(F,D,E){if(!q.isRegExp(F)){throw new TypeError("type RegExp expected")}var C=t.replace.call(k(F)+(D||""),x,"");if(E){C=t.replace.call(C,new RegExp("["+E+"]+","g"),"")}if(F.xregexp&&!F.xregexp.isNative){F=v(q(F.source,C),F.xregexp.captureNames?F.xregexp.captureNames.slice(0):null)}else{F=v(new RegExp(F.source,C),null,true)}return F}function w(E,D){var C=E.length;if(Array.prototype.lastIndexOf){return E.lastIndexOf(D)}while(C--){if(E[C]===D){return C}}return -1}function f(D,C){return Object.prototype.toString.call(D).toLowerCase()==="[object "+C+"]"}function m(C){C=C||{};if(C==="all"||C.all){C={natives:true,extensibility:true}}else{if(f(C,"string")){C=q.forEach(C,/[^\s,]+/,function(D){this[D]=true},{})}}return C}function d(G,H,I,C){var E=n.length,K=null,F,J;g=true;try{while(E--){J=n[E];if((J.scope==="all"||J.scope===I)&&(!J.trigger||J.trigger.call(C))){J.pattern.lastIndex=H;F=e.exec.call(J.pattern,G);if(F&&F.index===H){K={output:J.handler.call(C,F,I),match:F};break}}}}catch(D){throw D}finally{g=false}return K}function a(C){q.addToken=i[C?"on":"off"];h.extensibility=C}function u(C){RegExp.prototype.exec=(C?e:t).exec;RegExp.prototype.test=(C?e:t).test;String.prototype.match=(C?e:t).match;String.prototype.replace=(C?e:t).replace;String.prototype.split=(C?e:t).split;h.natives=C}q=function(I,D){if(q.isRegExp(I)){if(D!==c){throw new TypeError("can't supply flags when constructing one RegExp from another")}return s(I)}if(g){throw new Error("can't call the XRegExp constructor within token definition functions")}var C=[],K=b,E={hasNamedCapture:false,captureNames:[],hasFlag:function(L){return D.indexOf(L)>-1}},J=0,F,H,G;I=I===c?"":String(I);D=D===c?"":String(D);if(t.match.call(D,x)){throw new SyntaxError("invalid duplicate regular expression flag")}I=t.replace.call(I,/^\(\?([\w$]+)\)/,function(M,L){if(t.test.call(/[gy]/,L)){throw new SyntaxError("can't use flag g or y in mode modifier")}D=t.replace.call(D+L,x,"");return""});q.forEach(D,/[\s\S]/,function(L){if(y.indexOf(L[0])<0){throw new SyntaxError("invalid regular expression flag "+L[0])}});while(J"}}else{if(P){return"\\"+(+P+J)}}return N},D=[],I,G;if(!(f(C,"array")&&C.length)){throw new TypeError("patterns must be a nonempty array")}for(G=0;G1&&w(F,"")>-1){D=new RegExp(this.source,t.replace.call(k(this),"g",""));t.replace.call(String(H).slice(F.index),D,function(){var I;for(I=1;IF.index)){this.lastIndex=F.index}}if(!this.global){this.lastIndex=C}return F};e.test=function(C){return !!e.exec.call(this,C)};e.match=function(D){if(!q.isRegExp(D)){D=new RegExp(D)}else{if(D.global){var C=t.match.apply(this,arguments);D.lastIndex=0;return C}}return e.exec.call(D,this)};e.replace=function(F,G){var H=q.isRegExp(F),E,D,I,C;if(H){if(F.xregexp){E=F.xregexp.captureNames}if(!F.global){C=F.lastIndex}}else{F+=""}if(f(G,"function")){D=t.replace.call(String(this),F,function(){var J=arguments,K;if(E){J[0]=new String(J[0]);for(K=0;KJ.length-3){throw new SyntaxError("backreference to undefined group "+L)}return J[N]||""}throw new SyntaxError("invalid token "+L)})})}if(H){if(F.global){F.lastIndex=0}else{F.lastIndex=C}}return D};e.split=function(G,D){if(!q.isRegExp(G)){return t.split.apply(this,arguments)}var I=String(this),C=G.lastIndex,F=[],H=0,E;D=(D===c?-1:D)>>>0;q.forEach(I,G,function(J){if((J.index+J[0].length)>H){F.push(I.slice(H,J.index));if(J.length>1&&J.indexD?F.slice(0,D):F};p=i.on;p(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/,function(C,D){if(C[1]==="B"&&D===b){return C[0]}throw new SyntaxError("invalid escape "+C[0])},{scope:"all"});p(/\[(\^?)]/,function(C){return C[1]?"[\\s\\S]":"\\b\\B"});p(/(?:\(\?#[^)]*\))+/,function(C){return t.test.call(r,C.input.slice(C.index+C[0].length))?"":"(?:)"});p(/\\k<([\w$]+)>/,function(D){var C=isNaN(D[1])?(w(this.captureNames,D[1])+1):+D[1],E=D.index+D[0].length;if(!C||C>this.captureNames.length){throw new SyntaxError("backreference to undefined group "+D[0])}return"\\"+C+(E===D.input.length||isNaN(D.input.charAt(E))?"":"(?:)")});p(/(?:\s+|#.*)+/,function(C){return t.test.call(r,C.input.slice(C.index+C[0].length))?"":"(?:)"},{trigger:function(){return this.hasFlag("x")},customFlags:"x"});p(/\./,function(){return"[\\s\\S]"},{trigger:function(){return this.hasFlag("s")},customFlags:"s"});p(/\(\?P?<([\w$]+)>/,function(C){if(!isNaN(C[1])){throw new SyntaxError("can't use integer as capture name "+C[0])}this.captureNames.push(C[1]);this.hasNamedCapture=true;return"("});p(/\\(\d+)/,function(C,D){if(!(D===b&&/^[1-9]/.test(C[1])&&+C[1]<=this.captureNames.length)&&C[1]!=="0"){throw new SyntaxError("can't use octal escape or backreference to undefined group "+C[0])}return C[0]},{scope:"all"});p(/\((?!\?)/,function(){if(this.hasFlag("n")){return"(?:"}this.captureNames.push(null);return"("},{customFlags:"n"});if(typeof exports!=="undefined"){exports.XRegExp=q}return q}());if(typeof(SyntaxHighlighter)=="undefined"){var SyntaxHighlighter=function(){if(typeof(require)!="undefined"&&typeof(XRegExp)=="undefined"){XRegExp=require("xregexp").XRegExp}var l={defaults:{"class-name":"","first-line":1,"pad-line-numbers":false,highlight:null,title:null,"smart-tabs":true,"tab-size":4,gutter:true,toolbar:true,"quick-code":true,collapse:false,"auto-links":true,light:false,unindent:true,"html-script":false},config:{space:" ",useScriptTags:true,bloggerMode:false,stripBrs:false,tagName:"pre",strings:{expandSource:"rozwiń kod",help:"?",alert:"SyntaxHighlighter\n\n",noBrush:"Nie można znaleźć kolorowania dla języka: ",brushNotHtmlScript:"Ten język nie został skonfigurowany do obsługi html-script: ",aboutDialog:'About SyntaxHighlighter
SyntaxHighlighter
version 3.0.9 (Wed, 19 Nov 2014 11:34:22 GMT)
JavaScript code syntax highlighter.
Copyright 2004-2013 Alex Gorbatchev.
If you like this script, please donate to
keep development active!
'}},vars:{discoveredBrushes:null,highlighters:{}},brushes:{},regexLib:{multiLineCComments:XRegExp("/\\*.*?\\*/","gs"),singleLineCComments:/\/\/.*$/gm,singleLinePerlComments:/#.*$/gm,doubleQuotedString:/"([^\\"\n]|\\.)*"/g,singleQuotedString:/'([^\\'\n]|\\.)*'/g,multiLineDoubleQuotedString:XRegExp('"([^\\\\"]|\\\\.)*"',"gs"),multiLineSingleQuotedString:XRegExp("'([^\\\\']|\\\\.)*'","gs"),xmlComments:XRegExp("(<|<)!--.*?--(>|>)","gs"),url:/\w+:\/\/[\w-.\/?%&=:@;#]*/g,phpScriptTags:{left:/(<|<)\?(?:=|php)?/g,right:/\?(>|>)/g,eof:true},aspScriptTags:{left:/(<|<)%=?/g,right:/%(>|>)/g},scriptScriptTags:{left:/(<|<)\s*script.*?(>|>)/gi,right:/(<|<)\/\s*script\s*(>|>)/gi}},toolbar:{getHtml:function(N){var P='
',M=l.toolbar.items,R=M.list;function Q(T,S){return l.toolbar.getButtonHtml(T,S,l.config.strings[S])}for(var O=0,L=R.length;O";return P},getButtonHtml:function(M,N,L){N=v(N);return''+v(L)+""},handler:function(Q){var P=Q.target,O=P.className||"";function L(S){var T=new RegExp(S+"_(\\w+)"),R=T.exec(O);return R?R[1]:null}var M=s(C(P,".syntaxhighlighter").id),N=L("command");if(M&&N){l.toolbar.items[N].execute(M)}Q.preventDefault()},items:{list:["expandSource","help"],expandSource:{getHtml:function(L){if(L.getParam("collapse")!=true){return""}var M=L.getParam("title");return l.toolbar.getButtonHtml(L,"expandSource",M?M:l.config.strings.expandSource)},execute:function(L){var M=J(L.id);j(M,"collapsed")}},help:{execute:function(L){var M=x("","_blank",500,250,"scrollbars=0"),N=M.document;N.write(l.config.strings.aboutDialog);N.close();M.focus()}}}},findElements:function(Q,P){var S=P?[P]:r(document.getElementsByTagName(l.config.tagName)),N=l.config,L=[];if(N.useScriptTags){S=S.concat(K())}if(S.length===0){return L}for(var O=0,M=S.length;O(.*?))\\]$"),S=0,P=XRegExp("(?[\\w-]+)\\s*:\\s*(?[\\w%#-]+|\\[.*?\\]|\".*?\"|'.*?')\\s*;?","g");while((N=XRegExp.exec(R,P,S))!=null){var Q=N.value.replace(/^['"]|['"]$/g,"");if(Q!=null&&O.test(Q)){var L=XRegExp.exec(Q,O);Q=L.values.length>0?L.values.split(/\s*,\s*/):[]}M[N.name]=Q;S=N.index+N[0].length}return M}function y(M,L){if(M==null||M.length==0||M=="\n"){return M}M=M.replace(/'+N+""})}return M}function c(N,M){var L=N.toString();while(L.length|<br\s*\/?>/gi;if(l.config.bloggerMode==true){M=M.replace(L,"\n")}if(l.config.stripBrs==true){M=M.replace(L,"")}return M}function a(L){return L.replace(/^\s+|\s+$/g,"")}function A(Q){var S=w(i(Q)),L=new Array(),R=/^\s*/,N=1000;for(var O=0,M=S.length;O0;O++){var T=S[O];if(a(T).length==0){continue}var P=R.exec(T);if(P==null){return Q}N=Math.min(P[0].length,N)}if(N>0){for(var O=0,M=S.length;OL.index){return 1}else{if(M.lengthL.length){return 1}}}}return 0}function q(P,R){function S(T,U){return T[0]}var N=0,M=null,Q=[],O=R.func?R.func:S;pos=0;while((M=XRegExp.exec(P,R.regex,pos))!=null){var L=O(M,R);if(typeof(L)=="string"){L=[new l.Match(L,M.index,R.css)]}Q=Q.concat(L);pos=M.index+M[0].length}return Q}function b(M){var L=/(.*)((>|<).*)/;return M.replace(l.regexLib.url,function(N){var P="",O=null;if(O=L.exec(N)){N=O[1];P=O[2]}return''+N+""+P})}function K(){var N=document.getElementsByTagName("script"),L=[];for(var O=0,M=N.length;OO){break}else{if(R.index==L.index&&R.length>L.length){Q[P]=null}else{if(R.index>=L.index&&R.index'+N+"
"},getLineNumbersHtml:function(R,M){var P="",Q=w(R).length,N=parseInt(this.getParam("first-line")),S=this.getParam("pad-line-numbers");if(S==true){S=(N+Q-1).toString().length}else{if(isNaN(S)==true){S=0}}for(var O=0;O'+R+"":"")+V)}return P},getTitleHtml:function(L){return L?""+v(L)+"":""},getMatchesHtml:function(L,R){var S=0,U="",T=this.getParam("brush","");function O(W){var V=W?(W.brushName||T):T;return V?V+" ":""}for(var P=0,N=R.length;P'+(this.getParam("toolbar")?l.toolbar.getHtml(this):"")+''+this.getTitleHtml(this.getParam("title"))+""+(gutter?'":"")+'
'+this.getLineNumbersHtml(O)+"
'+N+"
";return N},getDiv:function(L){if(L===null){L=""}this.code=L;var M=this.create("div");M.innerHTML=this.getHtml(L);if(this.getParam("toolbar")){f(h(M,".toolbar"),"click",l.toolbar.handler)}if(this.getParam("quick-code")){f(h(M,".code"),"dblclick",e)}return M},init:function(L){this.id=p();n(this);this.params=B(l.defaults,L||{});if(this.getParam("light")==true){this.params.toolbar=this.params.gutter=false}},getKeywords:function(L){L=L.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"|");return"\\b(?:"+L+")\\b"},forHtmlScript:function(L){var M={end:L.right.source};if(L.eof){M.end="(?:(?:"+M.end+")|$)"}this.htmlScript={left:{regex:L.left,css:"script"},right:{regex:L.right,css:"script"},code:XRegExp("(?"+L.left.source+")(?.*?)(?"+M.end+")","sgi")}}};return l}()}typeof(exports)!="undefined"?exports.SyntaxHighlighter=SyntaxHighlighter:null;