/get_oauth_token.php
+// eg: http://localhost/phpmail/get_oauth_token.php
+$mail->oauthRefreshToken = "RANDOMCHARS-----DWxgOvPT003r-yFUV49TQYag7_Aod7y0";
+
+//Set who the message is to be sent from
+//For gmail, this generally needs to be the same as the user you logged in as
+$mail->setFrom('from@example.com', 'First Last');
+
+//Set who the message is to be sent to
+$mail->addAddress('whoto@example.com', 'John Doe');
+
+//Set the subject line
+$mail->Subject = 'PHPMailer GMail SMTP test';
+
+//Read an HTML message body from an external file, convert referenced images to embedded,
+//convert HTML into a basic plain-text alternative body
+$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
+
+//Replace the plain text body with one created manually
+$mail->AltBody = 'This is a plain-text message body';
+
+//Attach an image file
+$mail->addAttachment('images/phpmailer_mini.png');
+
+//send the message, check for errors
+if (!$mail->send()) {
+ echo "Mailer Error: " . $mail->ErrorInfo;
+} else {
+ echo "Message sent!";
+}
diff --git a/vendor/phpmailer/phpmailer/examples/images/phpmailer.png b/vendor/phpmailer/phpmailer/examples/images/phpmailer.png
new file mode 100644
index 000000000..9bdd83c8d
Binary files /dev/null and b/vendor/phpmailer/phpmailer/examples/images/phpmailer.png differ
diff --git a/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.png b/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.png
new file mode 100644
index 000000000..e6915f431
Binary files /dev/null and b/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.png differ
diff --git a/vendor/phpmailer/phpmailer/examples/index.html b/vendor/phpmailer/phpmailer/examples/index.html
new file mode 100644
index 000000000..bbb830d19
--- /dev/null
+++ b/vendor/phpmailer/phpmailer/examples/index.html
@@ -0,0 +1,48 @@
+
+
+
+
+ PHPMailer Examples
+
+
+PHPMailer code examples
+This folder contains a collection of examples of using PHPMailer.
+About testing email sending
+When working on email sending code you'll find yourself worrying about what might happen if all these test emails got sent to your mailing list. The solution is to use a fake mail server, one that acts just like the real thing, but just doesn't actually send anything out. Some offer web interfaces, feedback, logging, the ability to return specific error codes, all things that are useful for testing error handling, authentication etc. Here's a selection of mail testing tools you might like to try:
+
+ - FakeSMTP, a Java desktop app with the ability to show an SMTP log and save messages to a folder.
+ - FakeEmail, a Python-based fake mail server with a web interface.
+ - smtp-sink, part of the Postfix mail server, so you probably already have this installed. This is used in the Travis-CI configuration to run PHPMailer's unit tests.
+ - smtp4dev, a dummy SMTP server for Windows.
+ - fakesendmail.sh, part of PHPMailer's test setup, this is a shell script that emulates sendmail for testing 'mail' or 'sendmail' methods in PHPMailer.
+ - msglint, not a mail server, the IETF's MIME structure analyser checks the formatting of your messages.
+
+
+
Security note
+
Before running these examples you'll need to rename them with '.php' extensions. They are supplied as '.phps' files which will usually be displayed with syntax highlighting by PHP instead of running them. This prevents potential security issues with running potential spam-gateway code if you happen to deploy these code examples on a live site - please don't do that! Similarly, don't leave your passwords in these files as they will be visible to the world!
+
+
+This script is a simple code generator - fill in the form and hit submit, and it will use when you entered to email you a message, and will also generate PHP code using your settings that you can copy and paste to use in your own apps. If you need to get going quickly, this is probably the best place to start.
+
+This script is a basic example which creates an email message from an external HTML file, creates a plain text body, sets various addresses, adds an attachment and sends the message. It uses PHP's built-in mail() function which is the simplest to use, but relies on the presence of a local mail server, something which is not usually available on Windows. If you find yourself in that situation, either install a local mail server, or use a remote one and send using SMTP instead.
+
+The same as the mail example, but shows how to use PHPMailer's optional exceptions for error handling.
+
+A simple example sending using SMTP with authentication.
+
+A simple example sending using SMTP without authentication.
+
+A simple example using sendmail. Sendmail is a program (usually found on Linux/BSD, OS X and other UNIX-alikes) that can be used to submit messages to a local mail server without a lengthy SMTP conversation. It's probably the fastest sending mechanism, but lacks some error reporting features. There are sendmail emulators for most popular mail servers including postfix, qmail, exim etc.
+
+Submitting email via Google's Gmail service is a popular use of PHPMailer. It's much the same as normal SMTP sending, just with some specific settings, namely using TLS encryption, authentication is enabled, and it connects to the SMTP submission port 587 on the smtp.gmail.com host. This example does all that.
+
+Before effective SMTP authentication mechanisms were available, it was common for ISPs to use POP-before-SMTP authentication. As it implies, you authenticate using the POP3 protocol (an older protocol now mostly replaced by the far superior IMAP), and then the SMTP server will allow send access from your IP address for a short while, usually 5-15 minutes. PHPMailer includes a POP3 protocol client, so it can carry out this sequence - it's just like a normal SMTP conversation (without authentication), but connects via POP first.
+
+This is a somewhat naïve example of sending similar emails to a list of different addresses. It sets up a PHPMailer instance using SMTP, then connects to a MySQL database to retrieve a list of recipients. The code loops over this list, sending email to each person using their info and marks them as sent in the database. It makes use of SMTP keepalive which saves reconnecting and re-authenticating between each message.
+
+
+This is an example showing how to use the SMTP class by itself (without PHPMailer) to check an SMTP connection.
+
+Most of these examples use the 'example.com' domain. This domain is reserved by IANA for illustrative purposes, as documented in RFC 2606. Don't use made-up domains like 'mydomain.com' or 'somedomain.com' in examples as someone, somewhere, probably owns them!
+
+
diff --git a/vendor/phpmailer/phpmailer/examples/mail.phps b/vendor/phpmailer/phpmailer/examples/mail.phps
new file mode 100644
index 000000000..8e129f47d
--- /dev/null
+++ b/vendor/phpmailer/phpmailer/examples/mail.phps
@@ -0,0 +1,31 @@
+setFrom('from@example.com', 'First Last');
+//Set an alternative reply-to address
+$mail->addReplyTo('replyto@example.com', 'First Last');
+//Set who the message is to be sent to
+$mail->addAddress('whoto@example.com', 'John Doe');
+//Set the subject line
+$mail->Subject = 'PHPMailer mail() test';
+//Read an HTML message body from an external file, convert referenced images to embedded,
+//convert HTML into a basic plain-text alternative body
+$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
+//Replace the plain text body with one created manually
+$mail->AltBody = 'This is a plain-text message body';
+//Attach an image file
+$mail->addAttachment('images/phpmailer_mini.png');
+
+//send the message, check for errors
+if (!$mail->send()) {
+ echo "Mailer Error: " . $mail->ErrorInfo;
+} else {
+ echo "Message sent!";
+}
diff --git a/vendor/phpmailer/phpmailer/examples/mailing_list.phps b/vendor/phpmailer/phpmailer/examples/mailing_list.phps
new file mode 100644
index 000000000..8644bb596
--- /dev/null
+++ b/vendor/phpmailer/phpmailer/examples/mailing_list.phps
@@ -0,0 +1,59 @@
+isSMTP();
+$mail->Host = 'smtp.example.com';
+$mail->SMTPAuth = true;
+$mail->SMTPKeepAlive = true; // SMTP connection will not close after each email sent, reduces SMTP overhead
+$mail->Port = 25;
+$mail->Username = 'yourname@example.com';
+$mail->Password = 'yourpassword';
+$mail->setFrom('list@example.com', 'List manager');
+$mail->addReplyTo('list@example.com', 'List manager');
+
+$mail->Subject = "PHPMailer Simple database mailing list test";
+
+//Same body for all messages, so set this before the sending loop
+//If you generate a different body for each recipient (e.g. you're using a templating system),
+//set it inside the loop
+$mail->msgHTML($body);
+//msgHTML also sets AltBody, but if you want a custom one, set it afterwards
+$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
+
+//Connect to the database and select the recipients from your mailing list that have not yet been sent to
+//You'll need to alter this to match your database
+$mysql = mysqli_connect('localhost', 'username', 'password');
+mysqli_select_db($mysql, 'mydb');
+$result = mysqli_query($mysql, 'SELECT full_name, email, photo FROM mailinglist WHERE sent = false');
+
+foreach ($result as $row) { //This iterator syntax only works in PHP 5.4+
+ $mail->addAddress($row['email'], $row['full_name']);
+ if (!empty($row['photo'])) {
+ $mail->addStringAttachment($row['photo'], 'YourPhoto.jpg'); //Assumes the image data is stored in the DB
+ }
+
+ if (!$mail->send()) {
+ echo "Mailer Error (" . str_replace("@", "@", $row["email"]) . ') ' . $mail->ErrorInfo . '
';
+ break; //Abandon sending
+ } else {
+ echo "Message sent to :" . $row['full_name'] . ' (' . str_replace("@", "@", $row['email']) . ')
';
+ //Mark it as sent in the DB
+ mysqli_query(
+ $mysql,
+ "UPDATE mailinglist SET sent = true WHERE email = '" .
+ mysqli_real_escape_string($mysql, $row['email']) . "'"
+ );
+ }
+ // Clear all addresses and attachments for next loop
+ $mail->clearAddresses();
+ $mail->clearAttachments();
+}
diff --git a/vendor/phpmailer/phpmailer/examples/pop_before_smtp.phps b/vendor/phpmailer/phpmailer/examples/pop_before_smtp.phps
new file mode 100644
index 000000000..164dfe8dd
--- /dev/null
+++ b/vendor/phpmailer/phpmailer/examples/pop_before_smtp.phps
@@ -0,0 +1,54 @@
+isSMTP();
+ //Enable SMTP debugging
+ // 0 = off (for production use)
+ // 1 = client messages
+ // 2 = client and server messages
+ $mail->SMTPDebug = 2;
+ //Ask for HTML-friendly debug output
+ $mail->Debugoutput = 'html';
+ //Set the hostname of the mail server
+ $mail->Host = "mail.example.com";
+ //Set the SMTP port number - likely to be 25, 465 or 587
+ $mail->Port = 25;
+ //Whether to use SMTP authentication
+ $mail->SMTPAuth = false;
+ //Set who the message is to be sent from
+ $mail->setFrom('from@example.com', 'First Last');
+ //Set an alternative reply-to address
+ $mail->addReplyTo('replyto@example.com', 'First Last');
+ //Set who the message is to be sent to
+ $mail->addAddress('whoto@example.com', 'John Doe');
+ //Set the subject line
+ $mail->Subject = 'PHPMailer POP-before-SMTP test';
+ //Read an HTML message body from an external file, convert referenced images to embedded,
+ //and convert the HTML into a basic plain-text alternative body
+ $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
+ //Replace the plain text body with one created manually
+ $mail->AltBody = 'This is a plain-text message body';
+ //Attach an image file
+ $mail->addAttachment('images/phpmailer_mini.png');
+ //send the message
+ //Note that we don't need check the response from this because it will throw an exception if it has trouble
+ $mail->send();
+ echo "Message sent!";
+} catch (phpmailerException $e) {
+ echo $e->errorMessage(); //Pretty error messages from PHPMailer
+} catch (Exception $e) {
+ echo $e->getMessage(); //Boring error messages from anything else!
+}
diff --git a/vendor/phpmailer/phpmailer/examples/scripts/XRegExp.js b/vendor/phpmailer/phpmailer/examples/scripts/XRegExp.js
new file mode 100644
index 000000000..feb66798a
--- /dev/null
+++ b/vendor/phpmailer/phpmailer/examples/scripts/XRegExp.js
@@ -0,0 +1,664 @@
+// XRegExp 1.5.1
+// (c) 2007-2012 Steven Levithan
+// MIT License
+//
+// Provides an augmented, extensible, cross-browser implementation of regular expressions,
+// including support for additional syntax, flags, and methods
+
+var XRegExp;
+
+if (XRegExp) {
+ // Avoid running twice, since that would break references to native globals
+ throw Error("can't load XRegExp twice in the same frame");
+}
+
+// Run within an anonymous function to protect variables and avoid new globals
+(function (undefined) {
+
+ //---------------------------------
+ // Constructor
+ //---------------------------------
+
+ // Accepts a pattern and flags; returns a new, extended `RegExp` object. Differs from a native
+ // regular expression in that additional syntax and flags are supported and cross-browser
+ // syntax inconsistencies are ameliorated. `XRegExp(/regex/)` clones an existing regex and
+ // converts to type XRegExp
+ XRegExp = function (pattern, flags) {
+ var output = [],
+ currScope = XRegExp.OUTSIDE_CLASS,
+ pos = 0,
+ context, tokenResult, match, chr, regex;
+
+ if (XRegExp.isRegExp(pattern)) {
+ if (flags !== undefined)
+ throw TypeError("can't supply flags when constructing one RegExp from another");
+ return clone(pattern);
+ }
+ // Tokens become part of the regex construction process, so protect against infinite
+ // recursion when an XRegExp is constructed within a token handler or trigger
+ if (isInsideConstructor)
+ throw Error("can't call the XRegExp constructor within token definition functions");
+
+ flags = flags || "";
+ context = { // `this` object for custom tokens
+ hasNamedCapture: false,
+ captureNames: [],
+ hasFlag: function (flag) {return flags.indexOf(flag) > -1;},
+ setFlag: function (flag) {flags += flag;}
+ };
+
+ while (pos < pattern.length) {
+ // Check for custom tokens at the current position
+ tokenResult = runTokens(pattern, pos, currScope, context);
+
+ if (tokenResult) {
+ output.push(tokenResult.output);
+ pos += (tokenResult.match[0].length || 1);
+ } else {
+ // Check for native multicharacter metasequences (excluding character classes) at
+ // the current position
+ if (match = nativ.exec.call(nativeTokens[currScope], pattern.slice(pos))) {
+ output.push(match[0]);
+ pos += match[0].length;
+ } else {
+ chr = pattern.charAt(pos);
+ if (chr === "[")
+ currScope = XRegExp.INSIDE_CLASS;
+ else if (chr === "]")
+ currScope = XRegExp.OUTSIDE_CLASS;
+ // Advance position one character
+ output.push(chr);
+ pos++;
+ }
+ }
+ }
+
+ regex = RegExp(output.join(""), nativ.replace.call(flags, flagClip, ""));
+ regex._xregexp = {
+ source: pattern,
+ captureNames: context.hasNamedCapture ? context.captureNames : null
+ };
+ return regex;
+ };
+
+
+ //---------------------------------
+ // Public properties
+ //---------------------------------
+
+ XRegExp.version = "1.5.1";
+
+ // Token scope bitflags
+ XRegExp.INSIDE_CLASS = 1;
+ XRegExp.OUTSIDE_CLASS = 2;
+
+
+ //---------------------------------
+ // Private variables
+ //---------------------------------
+
+ var replacementToken = /\$(?:(\d\d?|[$&`'])|{([$\w]+)})/g,
+ flagClip = /[^gimy]+|([\s\S])(?=[\s\S]*\1)/g, // Nonnative and duplicate flags
+ quantifier = /^(?:[?*+]|{\d+(?:,\d*)?})\??/,
+ isInsideConstructor = false,
+ tokens = [],
+ // Copy native globals for reference ("native" is an ES3 reserved keyword)
+ nativ = {
+ exec: RegExp.prototype.exec,
+ test: RegExp.prototype.test,
+ match: String.prototype.match,
+ replace: String.prototype.replace,
+ split: String.prototype.split
+ },
+ compliantExecNpcg = nativ.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups
+ compliantLastIndexIncrement = function () {
+ var x = /^/g;
+ nativ.test.call(x, "");
+ return !x.lastIndex;
+ }(),
+ hasNativeY = RegExp.prototype.sticky !== undefined,
+ nativeTokens = {};
+
+ // `nativeTokens` match native multicharacter metasequences only (including deprecated octals,
+ // excluding character classes)
+ nativeTokens[XRegExp.INSIDE_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]))/;
+ nativeTokens[XRegExp.OUTSIDE_CLASS] = /^(?:\\(?: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*)?}\??)/;
+
+
+ //---------------------------------
+ // Public methods
+ //---------------------------------
+
+ // Lets you extend or change XRegExp syntax and create custom flags. This is used internally by
+ // the XRegExp library and can be used to create XRegExp plugins. This function is intended for
+ // users with advanced knowledge of JavaScript's regular expression syntax and behavior. It can
+ // be disabled by `XRegExp.freezeTokens`
+ XRegExp.addToken = function (regex, handler, scope, trigger) {
+ tokens.push({
+ pattern: clone(regex, "g" + (hasNativeY ? "y" : "")),
+ handler: handler,
+ scope: scope || XRegExp.OUTSIDE_CLASS,
+ trigger: trigger || null
+ });
+ };
+
+ // Accepts a pattern and flags; returns an extended `RegExp` object. If the pattern and flag
+ // combination has previously been cached, the cached copy is returned; otherwise the newly
+ // created regex is cached
+ XRegExp.cache = function (pattern, flags) {
+ var key = pattern + "/" + (flags || "");
+ return XRegExp.cache[key] || (XRegExp.cache[key] = XRegExp(pattern, flags));
+ };
+
+ // Accepts a `RegExp` instance; returns a copy with the `/g` flag set. The copy has a fresh
+ // `lastIndex` (set to zero). If you want to copy a regex without forcing the `global`
+ // property, use `XRegExp(regex)`. Do not use `RegExp(regex)` because it will not preserve
+ // special properties required for named capture
+ XRegExp.copyAsGlobal = function (regex) {
+ return clone(regex, "g");
+ };
+
+ // Accepts a string; returns the string with regex metacharacters escaped. The returned string
+ // can safely be used at any point within a regex to match the provided literal string. Escaped
+ // characters are [ ] { } ( ) * + ? - . , \ ^ $ | # and whitespace
+ XRegExp.escape = function (str) {
+ return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+ };
+
+ // Accepts a string to search, regex to search with, position to start the search within the
+ // string (default: 0), and an optional Boolean indicating whether matches must start at-or-
+ // after the position or at the specified position only. This function ignores the `lastIndex`
+ // of the provided regex in its own handling, but updates the property for compatibility
+ XRegExp.execAt = function (str, regex, pos, anchored) {
+ var r2 = clone(regex, "g" + ((anchored && hasNativeY) ? "y" : "")),
+ match;
+ r2.lastIndex = pos = pos || 0;
+ match = r2.exec(str); // Run the altered `exec` (required for `lastIndex` fix, etc.)
+ if (anchored && match && match.index !== pos)
+ match = null;
+ if (regex.global)
+ regex.lastIndex = match ? r2.lastIndex : 0;
+ return match;
+ };
+
+ // Breaks the unrestorable link to XRegExp's private list of tokens, thereby preventing
+ // syntax and flag changes. Should be run after XRegExp and any plugins are loaded
+ XRegExp.freezeTokens = function () {
+ XRegExp.addToken = function () {
+ throw Error("can't run addToken after freezeTokens");
+ };
+ };
+
+ // Accepts any value; returns a Boolean indicating whether the argument is a `RegExp` object.
+ // Note that this is also `true` for regex literals and regexes created by the `XRegExp`
+ // constructor. This works correctly for variables created in another frame, when `instanceof`
+ // and `constructor` checks would fail to work as intended
+ XRegExp.isRegExp = function (o) {
+ return Object.prototype.toString.call(o) === "[object RegExp]";
+ };
+
+ // Executes `callback` once per match within `str`. Provides a simpler and cleaner way to
+ // iterate over regex matches compared to the traditional approaches of subverting
+ // `String.prototype.replace` or repeatedly calling `exec` within a `while` loop
+ XRegExp.iterate = function (str, regex, callback, context) {
+ var r2 = clone(regex, "g"),
+ i = -1, match;
+ while (match = r2.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.)
+ if (regex.global)
+ regex.lastIndex = r2.lastIndex; // Doing this to follow expectations if `lastIndex` is checked within `callback`
+ callback.call(context, match, ++i, str, regex);
+ if (r2.lastIndex === match.index)
+ r2.lastIndex++;
+ }
+ if (regex.global)
+ regex.lastIndex = 0;
+ };
+
+ // Accepts a string and an array of regexes; returns the result of using each successive regex
+ // to search within the matches of the previous regex. The array of regexes can also contain
+ // objects with `regex` and `backref` properties, in which case the named or numbered back-
+ // references specified are passed forward to the next regex or returned. E.g.:
+ // var xregexpImgFileNames = XRegExp.matchChain(html, [
+ // {regex: /]+)>/i, backref: 1}, // tag attributes
+ // {regex: XRegExp('(?ix) \\s src=" (? [^"]+ )'), backref: "src"}, // src attribute values
+ // {regex: XRegExp("^http://xregexp\\.com(/[^#?]+)", "i"), backref: 1}, // xregexp.com paths
+ // /[^\/]+$/ // filenames (strip directory paths)
+ // ]);
+ XRegExp.matchChain = function (str, chain) {
+ return function recurseChain (values, level) {
+ var item = chain[level].regex ? chain[level] : {regex: chain[level]},
+ regex = clone(item.regex, "g"),
+ matches = [], i;
+ for (i = 0; i < values.length; i++) {
+ XRegExp.iterate(values[i], regex, function (match) {
+ matches.push(item.backref ? (match[item.backref] || "") : match[0]);
+ });
+ }
+ return ((level === chain.length - 1) || !matches.length) ?
+ matches : recurseChain(matches, level + 1);
+ }([str], 0);
+ };
+
+
+ //---------------------------------
+ // New RegExp prototype methods
+ //---------------------------------
+
+ // Accepts a context object and arguments array; returns the result of calling `exec` with the
+ // first value in the arguments array. the context is ignored but is accepted for congruity
+ // with `Function.prototype.apply`
+ RegExp.prototype.apply = function (context, args) {
+ return this.exec(args[0]);
+ };
+
+ // Accepts a context object and string; returns the result of calling `exec` with the provided
+ // string. the context is ignored but is accepted for congruity with `Function.prototype.call`
+ RegExp.prototype.call = function (context, str) {
+ return this.exec(str);
+ };
+
+
+ //---------------------------------
+ // Overridden native methods
+ //---------------------------------
+
+ // Adds named capture support (with backreferences returned as `result.name`), and fixes two
+ // cross-browser issues per ES3:
+ // - Captured values for nonparticipating capturing groups should be returned as `undefined`,
+ // rather than the empty string.
+ // - `lastIndex` should not be incremented after zero-length matches.
+ RegExp.prototype.exec = function (str) {
+ var match, name, r2, origLastIndex;
+ if (!this.global)
+ origLastIndex = this.lastIndex;
+ match = nativ.exec.apply(this, arguments);
+ if (match) {
+ // Fix browsers whose `exec` methods don't consistently return `undefined` for
+ // nonparticipating capturing groups
+ if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) {
+ r2 = RegExp(this.source, nativ.replace.call(getNativeFlags(this), "g", ""));
+ // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed
+ // matching due to characters outside the match
+ nativ.replace.call((str + "").slice(match.index), r2, function () {
+ for (var i = 1; i < arguments.length - 2; i++) {
+ if (arguments[i] === undefined)
+ match[i] = undefined;
+ }
+ });
+ }
+ // Attach named capture properties
+ if (this._xregexp && this._xregexp.captureNames) {
+ for (var i = 1; i < match.length; i++) {
+ name = this._xregexp.captureNames[i - 1];
+ if (name)
+ match[name] = match[i];
+ }
+ }
+ // Fix browsers that increment `lastIndex` after zero-length matches
+ if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
+ this.lastIndex--;
+ }
+ if (!this.global)
+ this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows)
+ return match;
+ };
+
+ // Fix browser bugs in native method
+ RegExp.prototype.test = function (str) {
+ // Use the native `exec` to skip some processing overhead, even though the altered
+ // `exec` would take care of the `lastIndex` fixes
+ var match, origLastIndex;
+ if (!this.global)
+ origLastIndex = this.lastIndex;
+ match = nativ.exec.call(this, str);
+ // Fix browsers that increment `lastIndex` after zero-length matches
+ if (match && !compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
+ this.lastIndex--;
+ if (!this.global)
+ this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows)
+ return !!match;
+ };
+
+ // Adds named capture support and fixes browser bugs in native method
+ String.prototype.match = function (regex) {
+ if (!XRegExp.isRegExp(regex))
+ regex = RegExp(regex); // Native `RegExp`
+ if (regex.global) {
+ var result = nativ.match.apply(this, arguments);
+ regex.lastIndex = 0; // Fix IE bug
+ return result;
+ }
+ return regex.exec(this); // Run the altered `exec`
+ };
+
+ // Adds support for `${n}` tokens for named and numbered backreferences in replacement text,
+ // and provides named backreferences to replacement functions as `arguments[0].name`. Also
+ // fixes cross-browser differences in replacement text syntax when performing a replacement
+ // using a nonregex search value, and the value of replacement regexes' `lastIndex` property
+ // during replacement iterations. Note that this doesn't support SpiderMonkey's proprietary
+ // third (`flags`) parameter
+ String.prototype.replace = function (search, replacement) {
+ var isRegex = XRegExp.isRegExp(search),
+ captureNames, result, str, origLastIndex;
+
+ // There are too many combinations of search/replacement types/values and browser bugs that
+ // preclude passing to native `replace`, so don't try
+ //if (...)
+ // return nativ.replace.apply(this, arguments);
+
+ if (isRegex) {
+ if (search._xregexp)
+ captureNames = search._xregexp.captureNames; // Array or `null`
+ if (!search.global)
+ origLastIndex = search.lastIndex;
+ } else {
+ search = search + ""; // Type conversion
+ }
+
+ if (Object.prototype.toString.call(replacement) === "[object Function]") {
+ result = nativ.replace.call(this + "", search, function () {
+ if (captureNames) {
+ // Change the `arguments[0]` string primitive to a String object which can store properties
+ arguments[0] = new String(arguments[0]);
+ // Store named backreferences on `arguments[0]`
+ for (var i = 0; i < captureNames.length; i++) {
+ if (captureNames[i])
+ arguments[0][captureNames[i]] = arguments[i + 1];
+ }
+ }
+ // Update `lastIndex` before calling `replacement` (fix browsers)
+ if (isRegex && search.global)
+ search.lastIndex = arguments[arguments.length - 2] + arguments[0].length;
+ return replacement.apply(null, arguments);
+ });
+ } else {
+ str = this + ""; // Type conversion, so `args[args.length - 1]` will be a string (given nonstring `this`)
+ result = nativ.replace.call(str, search, function () {
+ var args = arguments; // Keep this function's `arguments` available through closure
+ return nativ.replace.call(replacement + "", replacementToken, function ($0, $1, $2) {
+ // Numbered backreference (without delimiters) or special variable
+ if ($1) {
+ switch ($1) {
+ case "$": return "$";
+ case "&": return args[0];
+ case "`": return args[args.length - 1].slice(0, args[args.length - 2]);
+ case "'": return args[args.length - 1].slice(args[args.length - 2] + args[0].length);
+ // Numbered backreference
+ default:
+ // What does "$10" mean?
+ // - Backreference 10, if 10 or more capturing groups exist
+ // - Backreference 1 followed by "0", if 1-9 capturing groups exist
+ // - Otherwise, it's the string "$10"
+ // Also note:
+ // - Backreferences cannot be more than two digits (enforced by `replacementToken`)
+ // - "$01" is equivalent to "$1" if a capturing group exists, otherwise it's the string "$01"
+ // - There is no "$0" token ("$&" is the entire match)
+ var literalNumbers = "";
+ $1 = +$1; // Type conversion; drop leading zero
+ if (!$1) // `$1` was "0" or "00"
+ return $0;
+ while ($1 > args.length - 3) {
+ literalNumbers = String.prototype.slice.call($1, -1) + literalNumbers;
+ $1 = Math.floor($1 / 10); // Drop the last digit
+ }
+ return ($1 ? args[$1] || "" : "$") + literalNumbers;
+ }
+ // Named backreference or delimited numbered backreference
+ } else {
+ // What does "${n}" mean?
+ // - Backreference to numbered capture n. Two differences from "$n":
+ // - n can be more than two digits
+ // - Backreference 0 is allowed, and is the entire match
+ // - Backreference to named capture n, if it exists and is not a number overridden by numbered capture
+ // - Otherwise, it's the string "${n}"
+ var n = +$2; // Type conversion; drop leading zeros
+ if (n <= args.length - 3)
+ return args[n];
+ n = captureNames ? indexOf(captureNames, $2) : -1;
+ return n > -1 ? args[n + 1] : $0;
+ }
+ });
+ });
+ }
+
+ if (isRegex) {
+ if (search.global)
+ search.lastIndex = 0; // Fix IE, Safari bug (last tested IE 9.0.5, Safari 5.1.2 on Windows)
+ else
+ search.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows)
+ }
+
+ return result;
+ };
+
+ // A consistent cross-browser, ES3 compliant `split`
+ String.prototype.split = function (s /* separator */, limit) {
+ // If separator `s` is not a regex, use the native `split`
+ if (!XRegExp.isRegExp(s))
+ return nativ.split.apply(this, arguments);
+
+ var str = this + "", // Type conversion
+ output = [],
+ lastLastIndex = 0,
+ match, lastLength;
+
+ // Behavior for `limit`: if it's...
+ // - `undefined`: No limit
+ // - `NaN` or zero: Return an empty array
+ // - A positive number: Use `Math.floor(limit)`
+ // - A negative number: No limit
+ // - Other: Type-convert, then use the above rules
+ if (limit === undefined || +limit < 0) {
+ limit = Infinity;
+ } else {
+ limit = Math.floor(+limit);
+ if (!limit)
+ return [];
+ }
+
+ // This is required if not `s.global`, and it avoids needing to set `s.lastIndex` to zero
+ // and restore it to its original value when we're done using the regex
+ s = XRegExp.copyAsGlobal(s);
+
+ while (match = s.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.)
+ if (s.lastIndex > lastLastIndex) {
+ output.push(str.slice(lastLastIndex, match.index));
+
+ if (match.length > 1 && match.index < str.length)
+ Array.prototype.push.apply(output, match.slice(1));
+
+ lastLength = match[0].length;
+ lastLastIndex = s.lastIndex;
+
+ if (output.length >= limit)
+ break;
+ }
+
+ if (s.lastIndex === match.index)
+ s.lastIndex++;
+ }
+
+ if (lastLastIndex === str.length) {
+ if (!nativ.test.call(s, "") || lastLength)
+ output.push("");
+ } else {
+ output.push(str.slice(lastLastIndex));
+ }
+
+ return output.length > limit ? output.slice(0, limit) : output;
+ };
+
+
+ //---------------------------------
+ // Private helper functions
+ //---------------------------------
+
+ // Supporting function for `XRegExp`, `XRegExp.copyAsGlobal`, etc. Returns a copy of a `RegExp`
+ // instance with a fresh `lastIndex` (set to zero), preserving properties required for named
+ // capture. Also allows adding new flags in the process of copying the regex
+ function clone (regex, additionalFlags) {
+ if (!XRegExp.isRegExp(regex))
+ throw TypeError("type RegExp expected");
+ var x = regex._xregexp;
+ regex = XRegExp(regex.source, getNativeFlags(regex) + (additionalFlags || ""));
+ if (x) {
+ regex._xregexp = {
+ source: x.source,
+ captureNames: x.captureNames ? x.captureNames.slice(0) : null
+ };
+ }
+ return regex;
+ }
+
+ function getNativeFlags (regex) {
+ return (regex.global ? "g" : "") +
+ (regex.ignoreCase ? "i" : "") +
+ (regex.multiline ? "m" : "") +
+ (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3
+ (regex.sticky ? "y" : "");
+ }
+
+ function runTokens (pattern, index, scope, context) {
+ var i = tokens.length,
+ result, match, t;
+ // Protect against constructing XRegExps within token handler and trigger functions
+ isInsideConstructor = true;
+ // Must reset `isInsideConstructor`, even if a `trigger` or `handler` throws
+ try {
+ while (i--) { // Run in reverse order
+ t = tokens[i];
+ if ((scope & t.scope) && (!t.trigger || t.trigger.call(context))) {
+ t.pattern.lastIndex = index;
+ match = t.pattern.exec(pattern); // Running the altered `exec` here allows use of named backreferences, etc.
+ if (match && match.index === index) {
+ result = {
+ output: t.handler.call(context, match, scope),
+ match: match
+ };
+ break;
+ }
+ }
+ }
+ } catch (err) {
+ throw err;
+ } finally {
+ isInsideConstructor = false;
+ }
+ return result;
+ }
+
+ function indexOf (array, item, from) {
+ if (Array.prototype.indexOf) // Use the native array method if available
+ return array.indexOf(item, from);
+ for (var i = from || 0; i < array.length; i++) {
+ if (array[i] === item)
+ return i;
+ }
+ return -1;
+ }
+
+
+ //---------------------------------
+ // Built-in tokens
+ //---------------------------------
+
+ // Augment XRegExp's regular expression syntax and flags. Note that when adding tokens, the
+ // third (`scope`) argument defaults to `XRegExp.OUTSIDE_CLASS`
+
+ // Comment pattern: (?# )
+ XRegExp.addToken(
+ /\(\?#[^)]*\)/,
+ function (match) {
+ // Keep tokens separated unless the following token is a quantifier
+ return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)";
+ }
+ );
+
+ // Capturing group (match the opening parenthesis only).
+ // Required for support of named capturing groups
+ XRegExp.addToken(
+ /\((?!\?)/,
+ function () {
+ this.captureNames.push(null);
+ return "(";
+ }
+ );
+
+ // Named capturing group (match the opening delimiter only): (?
+ XRegExp.addToken(
+ /\(\?<([$\w]+)>/,
+ function (match) {
+ this.captureNames.push(match[1]);
+ this.hasNamedCapture = true;
+ return "(";
+ }
+ );
+
+ // Named backreference: \k
+ XRegExp.addToken(
+ /\\k<([\w$]+)>/,
+ function (match) {
+ var index = indexOf(this.captureNames, match[1]);
+ // Keep backreferences separate from subsequent literal numbers. Preserve back-
+ // references to named groups that are undefined at this point as literal strings
+ return index > -1 ?
+ "\\" + (index + 1) + (isNaN(match.input.charAt(match.index + match[0].length)) ? "" : "(?:)") :
+ match[0];
+ }
+ );
+
+ // Empty character class: [] or [^]
+ XRegExp.addToken(
+ /\[\^?]/,
+ function (match) {
+ // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S].
+ // (?!) should work like \b\B, but is unreliable in Firefox
+ return match[0] === "[]" ? "\\b\\B" : "[\\s\\S]";
+ }
+ );
+
+ // Mode modifier at the start of the pattern only, with any combination of flags imsx: (?imsx)
+ // Does not support x(?i), (?-i), (?i-m), (?i: ), (?i)(?m), etc.
+ XRegExp.addToken(
+ /^\(\?([imsx]+)\)/,
+ function (match) {
+ this.setFlag(match[1]);
+ return "";
+ }
+ );
+
+ // Whitespace and comments, in free-spacing (aka extended) mode only
+ XRegExp.addToken(
+ /(?:\s+|#.*)+/,
+ function (match) {
+ // Keep tokens separated unless the following token is a quantifier
+ return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)";
+ },
+ XRegExp.OUTSIDE_CLASS,
+ function () {return this.hasFlag("x");}
+ );
+
+ // Dot, in dotall (aka singleline) mode only
+ XRegExp.addToken(
+ /\./,
+ function () {return "[\\s\\S]";},
+ XRegExp.OUTSIDE_CLASS,
+ function () {return this.hasFlag("s");}
+ );
+
+
+ //---------------------------------
+ // Backward compatibility
+ //---------------------------------
+
+ // Uncomment the following block for compatibility with XRegExp 1.0-1.2:
+ /*
+ XRegExp.matchWithinChain = XRegExp.matchChain;
+ RegExp.prototype.addFlags = function (s) {return clone(this, s);};
+ RegExp.prototype.execAll = function (s) {var r = []; XRegExp.iterate(s, this, function (m) {r.push(m);}); return r;};
+ RegExp.prototype.forEachExec = function (s, f, c) {return XRegExp.iterate(s, this, f, c);};
+ RegExp.prototype.validate = function (s) {var r = RegExp("^(?:" + this.source + ")$(?!\\s)", getNativeFlags(this)); if (this.global) this.lastIndex = 0; return s.search(r) === 0;};
+ */
+
+})();
+
diff --git a/vendor/phpmailer/phpmailer/examples/scripts/shAutoloader.js b/vendor/phpmailer/phpmailer/examples/scripts/shAutoloader.js
new file mode 100644
index 000000000..9f5942ee2
--- /dev/null
+++ b/vendor/phpmailer/phpmailer/examples/scripts/shAutoloader.js
@@ -0,0 +1,122 @@
+(function() {
+
+var sh = SyntaxHighlighter;
+
+/**
+ * Provides functionality to dynamically load only the brushes that a needed to render the current page.
+ *
+ * There are two syntaxes that autoload understands. For example:
+ *
+ * SyntaxHighlighter.autoloader(
+ * [ 'applescript', 'Scripts/shBrushAppleScript.js' ],
+ * [ 'actionscript3', 'as3', 'Scripts/shBrushAS3.js' ]
+ * );
+ *
+ * or a more easily comprehendable one:
+ *
+ * SyntaxHighlighter.autoloader(
+ * 'applescript Scripts/shBrushAppleScript.js',
+ * 'actionscript3 as3 Scripts/shBrushAS3.js'
+ * );
+ */
+sh.autoloader = function()
+{
+ var list = arguments,
+ elements = sh.findElements(),
+ brushes = {},
+ scripts = {},
+ all = SyntaxHighlighter.all,
+ allCalled = false,
+ allParams = null,
+ i
+ ;
+
+ SyntaxHighlighter.all = function(params)
+ {
+ allParams = params;
+ allCalled = true;
+ };
+
+ function addBrush(aliases, url)
+ {
+ for (var i = 0; i < aliases.length; i++)
+ brushes[aliases[i]] = url;
+ };
+
+ function getAliases(item)
+ {
+ return item.pop
+ ? item
+ : item.split(/\s+/)
+ ;
+ }
+
+ // create table of aliases and script urls
+ for (i = 0; i < list.length; i++)
+ {
+ var aliases = getAliases(list[i]),
+ url = aliases.pop()
+ ;
+
+ addBrush(aliases, url);
+ }
+
+ // dynamically add tags to the document body
+ for (i = 0; i < elements.length; i++)
+ {
+ var url = brushes[elements[i].params.brush];
+
+ if(url && scripts[url] === undefined)
+ {
+ if(elements[i].params['html-script'] === 'true')
+ {
+ if(scripts[brushes['xml']] === undefined) {
+ loadScript(brushes['xml']);
+ scripts[url] = false;
+ }
+ }
+
+ scripts[url] = false;
+ loadScript(url);
+ }
+ }
+
+ function loadScript(url)
+ {
+ var script = document.createElement('script'),
+ done = false
+ ;
+
+ script.src = url;
+ script.type = 'text/javascript';
+ script.language = 'javascript';
+ script.onload = script.onreadystatechange = function()
+ {
+ if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete'))
+ {
+ done = true;
+ scripts[url] = true;
+ checkAll();
+
+ // Handle memory leak in IE
+ script.onload = script.onreadystatechange = null;
+ script.parentNode.removeChild(script);
+ }
+ };
+
+ // sync way of adding script tags to the page
+ document.body.appendChild(script);
+ };
+
+ function checkAll()
+ {
+ for(var url in scripts)
+ if (scripts[url] == false)
+ return;
+
+ if (allCalled)
+ SyntaxHighlighter.highlight(allParams);
+ };
+};
+
+})();
diff --git a/vendor/phpmailer/phpmailer/examples/scripts/shBrushPhp.js b/vendor/phpmailer/phpmailer/examples/scripts/shBrushPhp.js
new file mode 100644
index 000000000..33aca6fb1
--- /dev/null
+++ b/vendor/phpmailer/phpmailer/examples/scripts/shBrushPhp.js
@@ -0,0 +1,72 @@
+;(function()
+{
+ // CommonJS
+ SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
+
+ function Brush()
+ {
+ var funcs = 'abs acos acosh addcslashes addslashes ' +
+ 'array_change_key_case array_chunk array_combine array_count_values array_diff '+
+ 'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
+ 'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+
+ 'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+
+ 'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+
+ 'array_push array_rand array_reduce array_reverse array_search array_shift '+
+ 'array_slice array_splice array_sum array_udiff array_udiff_assoc '+
+ 'array_udiff_uassoc array_uintersect array_uintersect_assoc '+
+ 'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+
+ 'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+
+ 'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+
+ 'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+
+ 'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+
+ 'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+
+ 'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+
+ 'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+
+ 'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+
+ 'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+
+ 'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+
+ 'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+
+ 'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+
+ 'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+
+ 'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+
+ 'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+
+ 'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+
+ 'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+
+ 'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+
+ 'parse_ini_file parse_str parse_url passthru pathinfo print readlink realpath rewind rewinddir rmdir '+
+ 'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+
+ 'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+
+ 'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+
+ 'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+
+ 'strtoupper strtr strval substr substr_compare';
+
+ var keywords = 'abstract and array as break case catch cfunction class clone const continue declare default die do ' +
+ 'else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach ' +
+ 'function global goto if implements include include_once interface instanceof insteadof namespace new ' +
+ 'old_function or private protected public return require require_once static switch ' +
+ 'trait throw try use var while xor ';
+
+ var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__';
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
+ { regex: /\$\w+/g, css: 'variable' }, // variables
+ { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions
+ { regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['php'];
+
+ SyntaxHighlighter.brushes.Php = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/vendor/phpmailer/phpmailer/examples/scripts/shCore.js b/vendor/phpmailer/phpmailer/examples/scripts/shCore.js
new file mode 100644
index 000000000..294b91ce5
--- /dev/null
+++ b/vendor/phpmailer/phpmailer/examples/scripts/shCore.js
@@ -0,0 +1 @@
+var XRegExp;if(XRegExp)throw Error("can't load XRegExp twice in the same frame");(function(e){function c(e,t){if(!XRegExp.isRegExp(e))throw TypeError("type RegExp expected");var n=e._xregexp;return e=XRegExp(e.source,h(e)+(t||"")),n&&(e._xregexp={source:n.source,captureNames:n.captureNames?n.captureNames.slice(0):null}),e}function h(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function p(e,t,n,r){var o=s.length,u,a,f;i=!0;try{while(o--){f=s[o];if(n&f.scope&&(!f.trigger||f.trigger.call(r))){f.pattern.lastIndex=t,a=f.pattern.exec(e);if(a&&a.index===t){u={output:f.handler.call(r,a,n),match:a};break}}}}catch(l){throw l}finally{i=!1}return u}function d(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var r=n||0;r-1},setFlag:function(e){r+=e}};while(a1&&d(n,"")>-1&&(i=RegExp(this.source,o.replace.call(h(this),"g","")),o.replace.call((t+"").slice(n.index),i,function(){for(var t=1;tn.index&&this.lastIndex--}return this.global||(this.lastIndex=s),n},RegExp.prototype.test=function(e){var t,n;return this.global||(n=this.lastIndex),t=o.exec.call(this,e),t&&!a&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,this.global||(this.lastIndex=n),!!t},String.prototype.match=function(e){XRegExp.isRegExp(e)||(e=RegExp(e));if(e.global){var t=o.match.apply(this,arguments);return e.lastIndex=0,t}return e.exec(this)},String.prototype.replace=function(e,n){var r=XRegExp.isRegExp(e),i,s,u,a;return r?(e._xregexp&&(i=e._xregexp.captureNames),e.global||(a=e.lastIndex)):e+="",Object.prototype.toString.call(n)==="[object Function]"?s=o.replace.call(this+"",e,function(){if(i){arguments[0]=new String(arguments[0]);for(var t=0;t-1?e[o+1]:t)}switch(n){case"$":return"$";case"&":return e[0];case"`":return e[e.length-1].slice(0,e[e.length-2]);case"'":return e[e.length-1].slice(e[e.length-2]+e[0].length);default:var s="";n=+n;if(!n)return t;while(n>e.length-3)s=String.prototype.slice.call(n,-1)+s,n=Math.floor(n/10);return(n?e[n]||"":"$")+s}})})),r&&(e.global?e.lastIndex=0:e.lastIndex=a),s},String.prototype.split=function(t,n){if(!XRegExp.isRegExp(t))return o.split.apply(this,arguments);var r=this+"",i=[],s=0,u,a;if(n===e||+n<0)n=Infinity;else{n=Math.floor(+n);if(!n)return[]}t=XRegExp.copyAsGlobal(t);while(u=t.exec(r)){if(t.lastIndex>s){i.push(r.slice(s,u.index)),u.length>1&&u.index=n)break}t.lastIndex===u.index&&t.lastIndex++}return s===r.length?(!o.test.call(t,"")||a)&&i.push(""):i.push(r.slice(s)),i.length>n?i.slice(0,n):i},XRegExp.addToken(/\(\?#[^)]*\)/,function(e){return o.test.call(r,e.input.slice(e.index+e[0].length))?"":"(?:)"}),XRegExp.addToken(/\((?!\?)/,function(){return this.captureNames.push(null),"("}),XRegExp.addToken(/\(\?<([$\w]+)>/,function(e){return this.captureNames.push(e[1]),this.hasNamedCapture=!0,"("}),XRegExp.addToken(/\\k<([\w$]+)>/,function(e){var t=d(this.captureNames,e[1]);return t>-1?"\\"+(t+1)+(isNaN(e.input.charAt(e.index+e[0].length))?"":"(?:)"):e[0]}),XRegExp.addToken(/\[\^?]/,function(e){return e[0]==="[]"?"\\b\\B":"[\\s\\S]"}),XRegExp.addToken(/^\(\?([imsx]+)\)/,function(e){return this.setFlag(e[1]),""}),XRegExp.addToken(/(?:\s+|#.*)+/,function(e){return o.test.call(r,e.input.slice(e.index+e[0].length))?"":"(?:)"},XRegExp.OUTSIDE_CLASS,function(){return this.hasFlag("x")}),XRegExp.addToken(/\./,function(){return"[\\s\\S]"},XRegExp.OUTSIDE_CLASS,function(){return this.hasFlag("s")})})();if(typeof SyntaxHighlighter=="undefined")var SyntaxHighlighter=function(){function t(e,t){return e.className.indexOf(t)!=-1}function n(e,n){t(e,n)||(e.className+=" "+n)}function r(e,t){e.className=e.className.replace(t,"")}function i(e){var t=[];for(var n=0;n(.*?))\\]$"),i=new XRegExp("(?[\\w-]+)\\s*:\\s*(?[\\w-%#]+|\\[.*?\\]|\".*?\"|'.*?')\\s*;?","g");while((t=i.exec(e))!=null){var s=t.value.replace(/^['"]|['"]$/g,"");if(s!=null&&r.test(s)){var o=r.exec(s);s=o.values.length>0?o.values.split(/\s*,\s*/):[]}n[t.name]=s}return n}function x(t,n){return t==null||t.length==0||t=="\n"?t:(t=t.replace(/'+e+""})),t)}function T(e,t){var n=e.toString();while(n.length|<br\s*\/?>/gi;return e.config.bloggerMode==1&&(t=t.replace(n,"\n")),e.config.stripBrs==1&&(t=t.replace(n,"")),t}function L(e){return e.replace(/^\s+|\s+$/g,"")}function A(e){var t=s(k(e)),n=new Array,r=/^\s*/,i=1e3;for(var o=0;o0;o++){var u=t[o];if(L(u).length==0)continue;var a=r.exec(u);if(a==null)return e;i=Math.min(a[0].length,i)}if(i>0)for(var o=0;ot.index?1:e.lengtht.length?1:0}function M(t,n){function r(e,t){return e[0]}var i=0,s=null,o=[],u=n.func?n.func:r;while((s=n.regex.exec(t))!=null){var a=u(s,n);typeof a=="string"&&(a=[new e.Match(a,s.index,n.css)]),o=o.concat(a)}return o}function _(t){var n=/(.*)((>|<).*)/;return t.replace(e.regexLib.url,function(e){var t="",r=null;if(r=n.exec(e))e=r[1],t=r[2];return''+e+""+t})}function D(){var e=document.getElementsByTagName("script"),t=[];for(var n=0;n",r=L(e),i=!1,s=t.length,o=n.length;r.indexOf(t)==0&&(r=r.substring(s),i=!0);var u=r.length;return r.indexOf(n)==u-o&&(r=r.substring(0,u-o),i=!0),i?r:e}function H(e){var t=e.target,i=c(t,".syntaxhighlighter"),s=c(t,".container"),o=document.createElement("textarea"),a;if(!s||!i||l(s,"textarea"))return;a=u(i.id),n(i,"source");var f=s.childNodes,h=[];for(var p=0;p)/gm,url:/\w+:\/\/[\w-.\/?%&=:@;#]*/g,phpScriptTags:{left:/(<|<)\?(?:=|php)?/g,right:/\?(>|>)/g,eof:!0},aspScriptTags:{left:/(<|<)%=?/g,right:/%(>|>)/g},scriptScriptTags:{left:/(<|<)\s*script.*?(>|>)/gi,right:/(<|<)\/\s*script\s*(>|>)/gi}},toolbar:{getHtml:function(t){function s(t,n){return e.toolbar.getButtonHtml(t,n,e.config.strings[n])}var n='"},getLineNumbersHtml:function(t,n){var r="",i=s(t).length,o=parseInt(this.getParam("first-line")),u=this.getParam("pad-line-numbers");u==1?u=(o+i-1).toString().length:isNaN(u)==1&&(u=0);for(var a=0;a'+c+"":"")+f)}return t},getTitleHtml:function(e){return e?""+e+"":""},getMatchesHtml:function(e,t){function s(e){var t=e?e.brushName||i:i;return t?t+" ":""}var n=0,r="",i=this.getParam("brush","");for(var o=0;o'+(this.getParam("toolbar")?e.toolbar.getHtml(this):"")+''+this.getTitleHtml(this.getParam("title"))+""+""+(gutter?''+this.getLineNumbersHtml(t)+" | ":"")+''+' '+n+" "+" | "+"
"+""+"
"+"