/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*
Copyright (c) 2002 Douglas Crockford  (www.JSLint.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

/**
 * @license RequireJS domReady 2.0.1 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/domReady for details
 */

/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
 RequireJS domReady 2.0.1 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/requirejs/domReady for details

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
*/
(function(){var j=this;if(!j.define)j.define=function(x){j.orion=j.orion||{};j.orion.PluginProvider=x();j.eclipse=j.orion;delete j.define}})();
define("orion/plugin",[],function(){return function(j){function x(b){s&&(typeof ArrayBuffer==="undefined"&&(b=JSON.stringify(b)),s===self?s.postMessage(b):s.postMessage(b,"*"))}function I(b,c){if(c&&c instanceof XMLHttpRequest){var l,f;try{l=c.status,f=c.statusText}catch(s){l=0,f=""}return{status:l||0,statusText:f}}return c}function K(b){var c=b?JSON.parse(JSON.stringify(b,I)):b;if(b instanceof Error)c.__isError=!0,c.message=c.message||b.message,c.name=c.name||b.name;return c}function A(b){return function(c){t&&
x({serviceId:b,method:"dispatchEvent",params:[c]})}}function c(b){if(b.source===s){var c=typeof b.data!=="string"?b.data:JSON.parse(b.data);if(typeof c.cancel==="string"){var f=o[c.id];f&&(delete o[c.id],f.cancel&&f.cancel(c.cancel))}else{var b=c.serviceId,t=c.method,w=c.params,j=l[b],v=j.implementation,I=v[t];t==="addEventListener"?(t=w[0],j.listeners[t]=j.listeners[t]||A(b),w=[t,j.listeners[t]]):t==="removeEventListener"&&(t=w[0],w=[t,j.listeners[t]],delete j.listeners[t]);var E={id:c.id,result:null,
error:null};try{(f=I.apply(v,w))&&typeof f.then==="function"?(o[c.id]=f,f.then(function(b){delete o[c.id];E.result=b;x(E)},function(b){if(o[c.id])delete o[c.id],E.error=K(b),x(E)},function(){x({requestId:c.id,method:"progress",params:Array.prototype.slice.call(arguments)})})):(E.result=f,x(E))}catch(T){E.error=K(T),x(E)}}}}var f=j,l=[],t=!1,o={},s=null;this.updateHeaders=function(b){if(t)throw Error("Cannot update headers. Plugin Provider is connected");f=b};this.registerServiceProvider=this.registerService=
function(b,c,f){if(t)throw Error("Cannot register service. Plugin Provider is connected");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var s=null,o=[];for(s in c)typeof c[s]==="function"&&o.push(s);l[l.length]={names:b,methods:o,implementation:c,properties:f||{},listeners:{}}};this.connect=function(b,o){if(!t){if(typeof window==="undefined")s=self;else if(window!==window.parent)s=window.parent;else if(window.opener!==null)s=window.opener;else{o&&o("No valid plugin target");return}addEventListener("message",
c,!1);for(var z=[],j=0;j<l.length;j++)z.push({serviceId:j,names:l[j].names,methods:l[j].methods,properties:l[j].properties});x({method:"plugin",params:[{headers:f||{},services:z}]});t=!0}b&&b()};this.disconnect=function(){t&&(removeEventListener("message",c),s=null,t=!1)}}});if(!this.JSON)this.JSON={};
(function(){function j(c){return c<10?"0"+c:c}function x(c){A.lastIndex=0;return A.test(c)?'"'+c.replace(A,function(c){var b=l[c];return typeof b==="string"?b:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function I(l,s){var b,p,j,A,w=c,J,v=s[l];v&&typeof v==="object"&&typeof v.toJSON==="function"&&(v=v.toJSON(l));typeof t==="function"&&(v=t.call(s,l,v));switch(typeof v){case "string":return x(v);case "number":return isFinite(v)?String(v):"null";case "boolean":case "null":return String(v);
case "object":if(!v)return"null";c+=f;J=[];if(Object.prototype.toString.apply(v)==="[object Array]"){A=v.length;for(b=0;b<A;b+=1)J[b]=I(b,v)||"null";j=J.length===0?"[]":c?"[\n"+c+J.join(",\n"+c)+"\n"+w+"]":"["+J.join(",")+"]";c=w;return j}if(t&&typeof t==="object"){A=t.length;for(b=0;b<A;b+=1)p=t[b],typeof p==="string"&&(j=I(p,v))&&J.push(x(p)+(c?": ":":")+j)}else for(p in v)Object.hasOwnProperty.call(v,p)&&(j=I(p,v))&&J.push(x(p)+(c?": ":":")+j);j=J.length===0?"{}":c?"{\n"+c+J.join(",\n"+c)+"\n"+
w+"}":"{"+J.join(",")+"}";c=w;return j}}if(typeof Date.prototype.toJSON!=="function")Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+j(this.getUTCMonth()+1)+"-"+j(this.getUTCDate())+"T"+j(this.getUTCHours())+":"+j(this.getUTCMinutes())+":"+j(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()};var K=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
A=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c,f,l={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;if(typeof JSON.stringify!=="function")JSON.stringify=function(l,s,b){var p;f=c="";if(typeof b==="number")for(p=0;p<b;p+=1)f+=" ";else typeof b==="string"&&(f=b);if((t=s)&&typeof s!=="function"&&(typeof s!=="object"||typeof s.length!=="number"))throw Error("JSON.stringify");return I("",
{"":l})};if(typeof JSON.parse!=="function")JSON.parse=function(c,l){function b(c,f){var t,p,j=c[f];if(j&&typeof j==="object")for(t in j)Object.hasOwnProperty.call(j,t)&&(p=b(j,t),p!==void 0?j[t]=p:delete j[t]);return l.call(c,f,j)}var f,c=String(c);K.lastIndex=0;K.test(c)&&(c=c.replace(K,function(b){return"\\u"+("0000"+b.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(c.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return f=eval("("+c+")"),typeof l==="function"?b({"":f},""):f;throw new SyntaxError("JSON.parse");}})();
var JSLINT=function(){function j(){}function x(a,g){return Object.prototype.hasOwnProperty.call(a,g)}function I(a,g){for(var d in g)x(g,d)&&(a[d]=g[d])}function K(){i.safe||(i.rhino&&I(D,ob),i.devel&&I(D,pb),i.browser&&I(D,qb),i.node&&I(D,rb),i.windows&&I(D,sb),i.widget&&I(D,tb))}function A(a,g,d){throw{name:"JSLintError",line:g,character:d,message:a+" ("+Math.floor(g/na.length*100)+"% scanned)."};}function c(e,g,d,b,c,m){var f,g=g||a;g.id==="(end)"&&(g=h);f=g.line||0;g=g.from||0;d={id:"(error)",
raw:e,evidence:na[f-1]||"",line:f,character:g,a:d,b:b,c:c,d:m};d.reason=e.supplant(d);JSLINT.errors.push(d);i.passfail&&A("Stopping. ",f,g);Ia+=1;Ia>=i.maxerr&&A("Too many errors.",f,g);return d}function f(a,g,d,b,h,m,i){return c(a,{line:g,from:d},b,h,m,i)}function l(a,g,d,b,h,m){a=c(a,g,d,b,h,m);A("Stopping, unable to continue.",a.line,a.character)}function t(a,g,d,b,c,h,i){return l(a,{line:g,from:d},b,c,h,i)}function o(e,g){i.safe&&k["(global)"]&&typeof D[e]!=="boolean"?c("ADsafe global: "+e+".",
h):e==="hasOwnProperty"&&c("'hasOwnProperty' is a really bad name.");x(k,e)&&!k["(global)"]&&c(k[e]===!0?"'{a}' was used before it was defined.":"'{a}' is already defined.",a,e);k[e]=g;k["(global)"]?(eb[e]=k,x(aa,e)&&(c("'{a}' was used before it was defined.",a,e),delete aa[e])):F[e]=k}function s(a){for(var a=a||0,g=0,d;g<=a;)(d=wa[g])||(d=wa[g]=V.token()),g+=1;return d}function b(e,g){switch(h.id){case "(number)":a.id==="."&&c("A dot following a number can be confused with a decimal point.",h);break;
case "-":(a.id==="-"||a.id==="--")&&c("Confusing minusses.");break;case "+":(a.id==="+"||a.id==="++")&&c("Confusing plusses.")}if(h.type==="(string)"||h.identifier)Ja=h.value;e&&a.id!==e&&(g?a.id==="(end)"?c("Unmatched '{a}'.",g,g.id):c("Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",a,e,g.id,g.line,a.value):(a.type!=="(identifier)"||a.value!==e)&&c("Expected '{a}' and instead saw '{b}'.",a,e,a.value));N=h;for(h=a;;){a=wa.shift()||V.token();if(a.id==="(end)"||a.id==="(error)")break;
if(a.type==="special"){var d=void 0,b=void 0,n=void 0,m=a.value,f=d=void 0;switch(m){case "*/":l("Unbegun comment.");break;case "/*members":case "/*member":m="/*members";da||(da={});b=da;break;case "/*jslint":i.safe&&c("ADsafe restriction.");b=i;n=ub;break;case "/*global":i.safe&&c("ADsafe restriction."),b=D}d=V.token();a:for(;;){for(;;){if(d.type==="special"&&d.value==="*/")break a;if(d.id!=="(endline)"&&d.id!==",")break;d=V.token()}d.type!=="(string)"&&d.type!=="(identifier)"&&m!=="/*members"&&
l("Bad option.",d);f=V.token();f.id===":"?(f=V.token(),b===da&&l("Expected '{a}' and instead saw '{b}'.",d,"*/",":"),d.value==="indent"&&m==="/*jslint"?(d=+f.value,(typeof d!=="number"||!isFinite(d)||d<=0||Math.floor(d)!==d)&&l("Expected a small integer and instead saw '{a}'.",f,f.value),b.white=!0,b.indent=d):d.value==="maxerr"&&m==="/*jslint"?(d=+f.value,(typeof d!=="number"||!isFinite(d)||d<=0||Math.floor(d)!==d)&&l("Expected a small integer and instead saw '{a}'.",f,f.value),b.maxerr=d):d.value===
"maxlen"&&m==="/*jslint"?(d=+f.value,(typeof d!=="number"||!isFinite(d)||d<=0||Math.floor(d)!==d)&&l("Expected a small integer and instead saw '{a}'.",f,f.value),b.maxlen=d):f.value==="true"?b[d.value]=!0:f.value==="false"?b[d.value]=!1:l("Bad option value.",f),d=V.token()):(m==="/*jslint"&&l("Missing option value.",d),b[d.value]=!1,d=f)}n&&K()}else if(a.id!=="(endline)")break}}function p(e,g){var d;a.id==="(end)"&&l("Unexpected early end of program.",h);b();i.safe&&typeof D[h.value]==="boolean"&&
a.id!=="("&&a.id!=="."&&c("ADsafe violation.",h);if(g)Ja="anonymous",k["(verb)"]=h.value;if(g===!0&&h.fud)d=h.fud();else{if(h.nud)d=h.nud();else if(a.type==="(number)"&&h.id===".")return c("A leading decimal point can be confused with a dot: '.{a}'.",h,a.value),b(),h;else l("Expected an identifier and instead saw '{a}'.",h,h.id);for(;e<a.lbp;)b(),h.led?d=h.led(d):l("Expected an operator and instead saw '{a}'.",h,h.id)}return d}function z(e,g){e=e||h;g=g||a;(i.white||u==="styleproperty"||u==="style")&&
e.character!==g.from&&e.line===g.line&&c("Unexpected space after '{a}'.",g,e.value)}function C(e,g){e=e||h;g=g||a;i.white&&!e.comment&&e.line===g.line&&z(e,g)}function w(e,g){i.white&&(e=e||h,g=g||a,e.line===g.line&&e.character===g.from&&c("Missing space after '{a}'.",a,e.value))}function J(e,g){e=e||h;g=g||a;!i.laxbreak&&e.line!==g.line?c("Bad line breaking before '{a}'.",g,g.id):i.white&&(e=e||h,g=g||a,e.character===g.from&&c("Missing space after '{a}'.",a,e.value))}function v(e){i.white&&a.id!==
"(end)"&&(e=H+(e||0),a.from!==e&&c("Expected '{a}' to have an indentation at {b} instead at {c}.",a,a.value,e,a.from))}function $(e){e=e||h;e.line!==a.line&&c("Line breaking error '{a}'.",e,e.value)}function E(){h.line!==a.line?i.laxbreak||c("Bad line breaking before '{a}'.",h,a.id):h.character!==a.from&&i.white&&c("Unexpected space after '{a}'.",a,h.value);b(",");w(h,a)}function T(a,g){var d=P[a];if(!d||typeof d!=="object")P[a]=d={id:a,lbp:g,value:a};return d}function G(a){return T(a,0)}function ba(a,
g){var d=G(a);d.identifier=d.reserved=!0;d.fud=g;return d}function ga(a,g){var d=ba(a,g);d.block=!0;return d}function Ka(a){var g=a.id.charAt(0);if(g>="a"&&g<="z"||g>="A"&&g<="Z")a.identifier=a.reserved=!0;return a}function S(a,g){var d=T(a,150);Ka(d);d.nud=typeof g==="function"?g:function(){this.right=p(150);this.arity="unary";if(this.id==="++"||this.id==="--")i.plusplus?c("Unexpected use of '{a}'.",this,this.id):(!this.right.identifier||this.right.reserved)&&this.right.id!=="."&&this.right.id!==
"["&&c("Bad operand.",this);return this};return d}function xa(a,g){var d=G(a);d.type=a;d.nud=g;return d}function B(a,g){var d=xa(a,g);d.identifier=d.reserved=!0;return d}function W(a){return B(a,function(){if(this.id==="this"||this.id==="arguments"||this.id==="eval")La&&k["(global)"]?c("Strict violation.",this):i.safe&&c("ADsafe violation.",this);return this})}function O(e,g,d,b){e=T(e,d);Ka(e);e.led=function(e){b||(J(N,h),w(h,a));return typeof g==="function"?g(e,this):(this.left=e,this.right=p(d),
this)};return e}function ca(e,g){var d=T(e,100);d.led=function(e){J(N,h);w(h,a);var d=p(100);e&&e.id==="NaN"||d&&d.id==="NaN"?c("Use the isNaN function to compare with NaN.",this):g&&g.apply(this,[e,d]);e.id==="!"&&c("Confusing use of '{a}'.",e,"!");d.id==="!"&&c("Confusing use of '{a}'.",e,"!");this.left=e;this.right=d;return this};return d}function ya(a){return a&&(a.type==="(number)"&&+a.value===0||a.type==="(string)"&&a.value===" "||a.type==="true"||a.type==="false"||a.type==="undefined"||a.type===
"null")}function ha(a){T(a,20).exps=!0;return O(a,function(a,e){var b;e.left=a;D[a.value]===!1&&F[a.value]["(global)"]===!0&&c("Read only.",a);if(i.safe){b=a;do typeof D[b.value]==="boolean"&&c("ADsafe violation.",b),b=b.left;while(b)}if(a){if(a.id==="."||a.id==="[")return(!a.left||a.left.value==="arguments")&&c("Bad assignment.",e),e.right=p(19),e;else if(a.identifier&&!a.reserved)return k[a.value]==="exception"&&c("Do not assign to the exception parameter.",a),e.right=p(19),e;a===P["function"]&&
c("Expected an identifier in an assignment and instead saw a function invocation.",h)}l("Bad assignment.",e)},20)}function ia(a,b,d){a=T(a,d);Ka(a);a.led=typeof b==="function"?b:function(a){i.bitwise&&c("Unexpected use of '{a}'.",this,this.id);this.left=a;this.right=p(d);return this};return a}function ja(e){T(e,20).exps=!0;return O(e,function(e,d){i.bitwise&&c("Unexpected use of '{a}'.",d,d.id);w(N,h);w(h,a);if(e){if(e.id==="."||e.id==="["||e.identifier&&!e.reserved)return p(19),d;e===P["function"]&&
c("Expected an identifier in an assignment, and instead saw a function invocation.",h);return d}l("Bad assignment.",d)},20)}function fb(a){a=T(a,150);a.led=function(a){i.plusplus?c("Unexpected use of '{a}'.",this,this.id):(!a.identifier||a.reserved)&&a.id!=="."&&a.id!=="["&&c("Bad operand.",this);this.left=a;return this};return a}function Ma(){if(a.identifier)return b(),i.safe&&Na[h.value]?c("ADsafe violation: '{a}'.",h,h.value):h.reserved&&!i.es5&&c("Expected an identifier and instead saw '{a}' (a reserved word).",
h,h.id),h.value}function oa(){var e=Ma();if(e)return e;h.id==="function"&&a.id==="("?c("Missing name in function statement."):l("Expected an identifier and instead saw '{a}'.",a,a.value)}function za(e){var b=0,d;if(!(a.id!==";"||Oa))for(;;){d=s(b);if(d.reach)break;if(d.id!=="(endline)"){if(d.id==="function"){c("Inner functions should be listed at the top of the outer function.",d);break}c("Unreachable '{a}' after '{b}'.",d,d.value,e);break}b+=1}}function Pa(e){var g=H,d=F,L=a;if(L.id===";")c("Unnecessary semicolon.",
L),b(";");else{if(L.identifier&&!L.reserved&&s().id===":")b(),b(":"),F=Object.create(d),o(L.value,"label"),a.labelled||c("Label '{a}' on {b} statement.",a,L.value,a.value),Qa.test(L.value+":")&&c("Label '{a}' looks like a javascript url.",L,L.value),a.label=L.value,L=a;e||v();e=p(0,!0);L.block||(!e||!e.exps?c("Expected an assignment or function call and instead saw an expression.",h):e.id==="("&&e.left.id==="new"&&c("Do not use 'new' for side effects."),a.id!==";"?f("Missing semicolon.",h.line,h.from+
h.value.length):(z(h,a),b(";"),w(h,a)));H=g;F=d;return e}}function gb(){return a.value==="use strict"?(b(),b(";"),La=!0):!1}function pa(e){var g=[],d;e&&!gb()&&i.strict&&c('Missing "use strict" statement.',a);if(i.adsafe)switch(e){case "script":ka||(a.value!=="ADSAFE"||s(0).id!=="."||s(1).value!=="id"&&s(1).value!=="go")&&l("ADsafe violation: Missing ADSAFE.id or ADSAFE.go.",a);a.value==="ADSAFE"&&s(0).id==="."&&s(1).value==="id"&&(ka&&l("ADsafe violation.",a),b("ADSAFE"),b("."),b("id"),b("("),a.value!==
R&&l("ADsafe violation: id does not match.",a),b("(string)"),b(")"),b(";"),ka=!0);break;case "lib":if(a.value==="ADSAFE")return b("ADSAFE"),b("."),b("lib"),b("("),b("(string)"),E(),e=p(0),e.id!=="function"&&l("The second argument to lib must be a function.",e),(d=(d=e.funct["(params)"])&&d.join(", "))&&d!=="lib"&&l("Expected '{a}' and instead saw '{b}'.",e,"(lib)","("+d+")"),b(")"),b(";"),g;else l("ADsafe lib violation.")}for(;!a.reach&&a.id!=="(end)";)a.id===";"?(c("Unnecessary semicolon."),b(";")):
g.push(Pa());return g}function U(e){var g,d=qa,L=H,n=F,m;qa=e;F=Object.create(F);w(h,a);m=a;if(a.id==="{"){b("{");if(a.id!=="}"||h.line!==a.line){for(H+=i.indent;!e&&a.from>H;)H+=i.indent;e||gb();g=pa();H-=i.indent;v()}b("}",m);H=L}else c("Expected '{a}' and instead saw '{b}'.",a,"{",a.value),Oa=!0,g=[Pa()],Oa=!1;k["(verb)"]=null;F=n;qa=d;return g}function hb(){return this}function Aa(a){da&&typeof da[a]!=="boolean"&&c("Unexpected /*member '{a}'.",h,a);typeof ea[a]==="number"?ea[a]+=1:ea[a]=1}function Ra(a){var b=
a.value,a=a.line,d=aa[b];typeof d==="function"&&(d=!1);d?d[d.length-1]!==a&&d.push(a):(d=[a],aa[b]=d)}function Sa(){if(a.identifier)return b(),!0}function Ba(){a.id==="-"&&(b("-"),z(),$());if(a.type==="(number)")return b("(number)"),!0}function Ta(){if(a.type==="(string)")return b(),!0}function X(){var e,g,d;if(a.identifier)if(d=a.value,d==="rgb"||d==="rgba"){b();b("(");for(e=0;e<3;e+=1)e&&b(","),g=a.value,a.type!=="(number)"||g<0?(c("Expected a positive number and instead saw '{a}'",a,g),b()):(b(),
a.id==="%"?(b("%"),g>100&&c("Expected a percentage and instead saw '{a}'",h,g)):g>255&&c("Expected a small number and instead saw '{a}'",h,g));d==="rgba"&&(b(","),g=+a.value,(a.type!=="(number)"||g<0||g>1)&&c("Expected a number between 0 and 1 and instead saw '{a}'",a,g),b(),a.id==="%"&&(c("Unexpected '%'."),b("%")));b(")");return!0}else{if(vb[a.value]===!0)return b(),!0}else if(a.type==="(color)")return b(),!0;return!1}function y(){a.id==="-"&&(b("-"),z(),$());return a.type==="(number)"?(b(),a.type!==
"(string)"&&ib[a.value]===!0?(z(),b()):+h.value!==0&&c("Expected a linear unit and instead saw '{a}'.",a,a.value),!0):!1}function la(){if(a.identifier)switch(a.value){case "thin":case "medium":case "thick":return b(),!0}else return y()}function ra(){if(a.identifier){if(a.value==="auto")return b(),!0}else return y()}function fa(){var e,g;if(a.identifier&&a.value==="url"){a=V.range("(",")");g=a.value;e=g.charAt(0);if(e==='"'||e==="'")g.slice(-1)!==e?c("Bad url string."):(g=g.slice(1,-1),g.indexOf(e)>=
0&&c("Bad url string."));g||c("Missing url.");b();i.safe&&jb.test(g)&&l("ADsafe URL violation.");sa.push(g);return!0}return!1}function Ua(e){var g=0,d,c,h,m=0;switch(typeof e){case "function":return e();case "string":return a.identifier&&a.value===e?(b(),!0):!1}for(;;){if(g>=e.length)return!1;h=e[g];g+=1;if(h===!0)break;else typeof h==="number"?(d=h,h=e[g],g+=1):d=1;for(c=!1;d>0;)if(Ua(h))c=!0,d-=1;else break;if(c)return!0}m=g;for(d=[];;){h=!1;for(g=m;g<e.length;g+=1)if(!d[g]&&Ua(Ca[e[g]])){h=c=!0;
d[g]=!0;break}if(!h)return c}}function kb(){for(var e;;){if(a.id==="}"||a.id==="(end)"||Q&&a.id===Q)break;for(;a.id===";";)c("Misplaced ';'."),b(";");for(e=void 0;a.id==="*"||a.id==="#"||a.value==="_";)i.css||c("Unexpected '{a}'.",a,a.value),b();a.id==="-"?(i.css||c("Unexpected '{a}'.",a,a.value),b("-"),a.identifier||c("Expected a non-standard style attribute and instead saw '{a}'.",a,a.value),b(),e=Va):(a.identifier?x(Ca,a.value)?e=Ca[a.value]:(e=Va,i.css||c("Unrecognized style attribute '{a}'.",
a,a.value)):c("Excepted a style attribute, and instead saw '{a}'.",a,a.value),b());b(":");a.identifier&&a.value==="inherit"?b():Ua(e)||(c("Unexpected token '{a}'.",a,a.value),b());a.id==="!"&&(b("!"),z(),a.identifier&&a.value==="important"?b():c("Expected '{a}' and instead saw '{b}'.",a,"important",a.value));a.id==="}"||a.id===Q?c("Missing '{a}'.",a,";"):b(";")}}function Wa(){if(a.identifier)x(Xa,a.value)||c("Expected a tagName, and instead saw {a}.",a,a.value),b();else switch(a.id){case ">":case "+":b();
Wa();break;case ":":b(":");switch(a.value){case "active":case "after":case "before":case "checked":case "disabled":case "empty":case "enabled":case "first-child":case "first-letter":case "first-line":case "first-of-type":case "focus":case "hover":case "last-of-type":case "link":case "only-of-type":case "root":case "target":case "visited":b();break;case "lang":b();b("(");a.identifier||c("Expected a lang code, and instead saw :{a}.",a,a.value);b(")");break;case "nth-child":case "nth-last-child":case "nth-last-of-type":case "nth-of-type":b();
b("(");a:if(a.id==="(number)")b(),a.value==="n"&&a.identifier&&(z(),b(),a.id==="+"&&(z(),b("+"),z(),b("(number)")));else{switch(a.value){case "odd":case "even":if(a.identifier){b();break a}}c("Unexpected token '{a}'.",a,a.value)}b(")");break;case "not":b();b("(");a.id===":"&&s(0).value==="not"&&c("Nested not.");Wa();b(")");break;default:c("Expected a pseudo, and instead saw :{a}.",a,a.value)}break;case "#":b("#");a.identifier||c("Expected an id, and instead saw #{a}.",a,a.value);b();break;case "*":b("*");
break;case ".":b(".");a.identifier||c("Expected a class, and instead saw #.{a}.",a,a.value);b();break;case "[":b("[");a.identifier||c("Expected an attribute, and instead saw [{a}].",a,a.value);b();if(a.id==="="||a.value==="~="||a.value==="$="||a.value==="|="||a.id==="*="||a.id==="^=")b(),a.type!=="(string)"&&c("Expected a string, and instead saw {a}.",a,a.value),b();b("]");break;default:l("Expected a CSS selector, and instead saw {a}.",a,a.value)}}function lb(){for(var e;a.id==="@";)if(e=s(),e.identifier&&
e.value==="import")b("@"),b(),fa()||(c("Expected '{a}' and instead saw '{b}'.",a,"url",a.value),b()),b(";");else break;for(;a.id!=="</"&&a.id!=="(end)";){a:{e=void 0;if(a.id==="{")c("Expected a style pattern, and instead saw '{a}'.",a,a.id);else if(a.id==="@"){b("@");e=a.value;if(a.identifier&&wb[e]===!0){b();break a}c("Expected an at-rule, and instead saw @{a}.",a,e)}for(;;){Wa();if(a.id==="</"||a.id==="{"||a.id==="(end)")break a;a.id===","&&E()}}u="styleproperty";a.id===";"?b(";"):(b("{"),kb(),
u="style",b("}"))}}function Ya(){var e=Ma(!0);if(!e)a.id==="(string)"?(e=a.value,b()):a.id==="(number)"&&(e=a.value.toString(),b());return e}function Da(e){var c,d=F;F=Object.create(d);c=k={"(name)":e||'"'+Ja+'"',"(line)":a.line,"(context)":k,"(breakage)":0,"(loopage)":0,"(scope)":F};h.funct=k;ta.push(k);e&&o(e,"function");var e=k,L;a:{var i,m=a,f=[];b("(");C();if(a.id===")")b(")"),C(N,h),L=void 0;else for(;;)if(i=oa(),f.push(i),o(i,"parameter"),a.id===",")E();else{b(")",m);C(N,h);L=f;break a}}e["(params)"]=
L;U(!1);F=d;k["(last)"]=h.line;k=k["(context)"];return c}function Za(e){var g,d;k["(onevar)"]&&i.onevar?c("Too many var statements."):k["(global)"]||(k["(onevar)"]=!0);for(this.first=[];;){w(h,a);g=oa();k["(global)"]&&D[g]===!1&&c("Redefinition of '{a}'.",h,g);o(g,"unused");if(e)break;d=h;this.first.push(h);if(a.id==="=")w(h,a),b("="),w(h,a),a.id==="undefined"&&c("It is not necessary to initialize '{a}' to 'undefined'.",h,g),s(0).id==="="&&a.identifier&&l("Variable {a} was not declared correctly.",
a,a.value),g=p(0),d.first=g;if(a.id!==",")break;E()}return this}function $a(){function e(){var e={},g=a;b("{");if(a.id!=="}")for(;;){if(a.id==="(end)")l("Missing '}' to match '{' from line {a}.",a,g.line);else if(a.id==="}"){c("Unexpected comma.",h);break}else a.id===","?l("Unexpected comma.",a):a.id!=="(string)"&&c("Expected a string and instead saw {a}.",a,a.value);e[a.value]===!0?c("Duplicate key '{a}'.",a,a.value):a.value==="__proto__"?c("Stupid key '{a}'.",a,a.value):e[a.value]=!0;b();b(":");
$a();if(a.id!==",")break;b(",")}b("}")}function g(){var e=a;b("[");if(a.id!=="]")for(;;){if(a.id==="(end)")l("Missing ']' to match '[' from line {a}.",a,e.line);else if(a.id==="]"){c("Unexpected comma.",h);break}else a.id===","&&l("Unexpected comma.",a);$a();if(a.id!==",")break;b(",")}b("]")}switch(a.id){case "{":e();break;case "[":g();break;case "true":case "false":case "null":case "(number)":case "(string)":b();break;case "-":b("-");h.character!==a.from&&c("Unexpected space after '-'.",h);z(h,a);
b("(number)");break;default:l("Expected a JSON value.",a)}}function mb(a){var b=[],d;for(d in a)x(a,d)&&b.push(d);return b}var R,ka,ua,Ja,Ea,wb={media:!0,"font-face":!0,page:!0},xb={"<":!0,"<=":!0,"==":!0,"===":!0,"!==":!0,"!=":!0,">":!0,">=":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0},Na={arguments:!0,callee:!0,caller:!0,constructor:!0,eval:!0,prototype:!0,stack:!0,unwatch:!0,valueOf:!0,watch:!0},ub={adsafe:!0,bitwise:!0,browser:!0,cap:!0,css:!0,debug:!0,devel:!0,eqeqeq:!0,es5:!0,evil:!0,forin:!0,fragment:!0,
immed:!0,laxbreak:!0,newcap:!0,node:!0,nomen:!0,on:!0,onevar:!0,passfail:!0,plusplus:!0,regexp:!0,rhino:!0,undef:!0,safe:!0,windows:!0,strict:!0,sub:!0,white:!0,widget:!0},qb={addEventListener:!1,blur:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,defaultStatus:!1,document:!1,event:!1,focus:!1,frames:!1,getComputedStyle:!1,history:!1,Image:!1,length:!1,location:!1,moveBy:!1,moveTo:!1,name:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,
opener:!1,Option:!1,parent:!1,print:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,setInterval:!1,setTimeout:!1,status:!1,top:!1,window:!1,XMLHttpRequest:!1},Ca,Va,vb={aliceblue:!0,antiquewhite:!0,aqua:!0,aquamarine:!0,azure:!0,beige:!0,bisque:!0,black:!0,blanchedalmond:!0,blue:!0,blueviolet:!0,brown:!0,burlywood:!0,cadetblue:!0,chartreuse:!0,chocolate:!0,coral:!0,cornflowerblue:!0,cornsilk:!0,crimson:!0,cyan:!0,darkblue:!0,darkcyan:!0,darkgoldenrod:!0,
darkgray:!0,darkgreen:!0,darkkhaki:!0,darkmagenta:!0,darkolivegreen:!0,darkorange:!0,darkorchid:!0,darkred:!0,darksalmon:!0,darkseagreen:!0,darkslateblue:!0,darkslategray:!0,darkturquoise:!0,darkviolet:!0,deeppink:!0,deepskyblue:!0,dimgray:!0,dodgerblue:!0,firebrick:!0,floralwhite:!0,forestgreen:!0,fuchsia:!0,gainsboro:!0,ghostwhite:!0,gold:!0,goldenrod:!0,gray:!0,green:!0,greenyellow:!0,honeydew:!0,hotpink:!0,indianred:!0,indigo:!0,ivory:!0,khaki:!0,lavender:!0,lavenderblush:!0,lawngreen:!0,lemonchiffon:!0,
lightblue:!0,lightcoral:!0,lightcyan:!0,lightgoldenrodyellow:!0,lightgreen:!0,lightpink:!0,lightsalmon:!0,lightseagreen:!0,lightskyblue:!0,lightslategray:!0,lightsteelblue:!0,lightyellow:!0,lime:!0,limegreen:!0,linen:!0,magenta:!0,maroon:!0,mediumaquamarine:!0,mediumblue:!0,mediumorchid:!0,mediumpurple:!0,mediumseagreen:!0,mediumslateblue:!0,mediumspringgreen:!0,mediumturquoise:!0,mediumvioletred:!0,midnightblue:!0,mintcream:!0,mistyrose:!0,moccasin:!0,navajowhite:!0,navy:!0,oldlace:!0,olive:!0,olivedrab:!0,
orange:!0,orangered:!0,orchid:!0,palegoldenrod:!0,palegreen:!0,paleturquoise:!0,palevioletred:!0,papayawhip:!0,peachpuff:!0,peru:!0,pink:!0,plum:!0,powderblue:!0,purple:!0,red:!0,rosybrown:!0,royalblue:!0,saddlebrown:!0,salmon:!0,sandybrown:!0,seagreen:!0,seashell:!0,sienna:!0,silver:!0,skyblue:!0,slateblue:!0,slategray:!0,snow:!0,springgreen:!0,steelblue:!0,tan:!0,teal:!0,thistle:!0,tomato:!0,turquoise:!0,violet:!0,wheat:!0,white:!0,whitesmoke:!0,yellow:!0,yellowgreen:!0},Y,ab,ib={"%":!0,cm:!0,em:!0,
ex:!0,"in":!0,mm:!0,pc:!0,pt:!0,px:!0},Fa,pb={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},yb={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"/":"\\/","\\":"\\\\"},k,va="closure,exception,global,label,outer,unused,var".split(","),ta,eb,Xa={a:{},abbr:{},acronym:{},address:{},applet:{},area:{empty:!0,parent:" map "},article:{},aside:{},audio:{},b:{},base:{empty:!0,parent:" head "},bdo:{},big:{},blockquote:{},body:{parent:" html noframes "},br:{empty:!0},button:{},
canvas:{parent:" body p div th td "},caption:{parent:" table "},center:{},cite:{},code:{},col:{empty:!0,parent:" table colgroup "},colgroup:{parent:" table "},command:{parent:" menu "},datalist:{},dd:{parent:" dl "},del:{},details:{},dialog:{},dfn:{},dir:{},div:{},dl:{},dt:{parent:" dl "},em:{},embed:{},fieldset:{},figure:{},font:{},footer:{},form:{},frame:{empty:!0,parent:" frameset "},frameset:{parent:" html frameset "},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{parent:" html "},header:{},hgroup:{},
html:{parent:"*"},hr:{empty:!0},i:{},iframe:{},img:{empty:!0},input:{empty:!0},ins:{},kbd:{},keygen:{},label:{},legend:{parent:" details fieldset figure "},li:{parent:" dir menu ol ul "},link:{empty:!0,parent:" head "},map:{},mark:{},menu:{},meta:{empty:!0,parent:" head noframes noscript "},meter:{},nav:{},noframes:{parent:" html body "},noscript:{parent:" body head noframes "},object:{},ol:{},optgroup:{parent:" select "},option:{parent:" optgroup select "},output:{},p:{},param:{empty:!0,parent:" applet object "},
pre:{},progress:{},q:{},rp:{},rt:{},ruby:{},samp:{},script:{empty:!0,parent:" body div frame head iframe p pre span "},section:{},select:{},small:{},span:{},source:{},strong:{},style:{parent:" head ",empty:!0},sub:{},sup:{},table:{},tbody:{parent:" table "},td:{parent:" tr "},textarea:{},tfoot:{parent:" table "},th:{parent:" tr "},thead:{parent:" table "},time:{},title:{parent:" head "},tr:{parent:" table tbody thead tfoot "},tt:{},u:{},ul:{},"var":{},video:{}},Ga,aa,qa,H,ma,na,wa,ea,da,rb={Buffer:!1,
clearInterval:!1,clearTimeout:!1,console:!1,exports:!1,global:!1,module:!1,process:!1,require:!1,setInterval:!1,setTimeout:!1,__filename:!1,__dirname:!1},a,Oa,i,D,bb,N,ob={defineClass:!1,deserialize:!1,gc:!1,help:!1,load:!1,loadClass:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},F,sb={ActiveXObject:!1,CScript:!1,Debug:!1,Enumerator:!1,System:!1,VBArray:!1,WScript:!1},Ha,M,zb={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,
encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1},Ab={E:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,PI:!0,SQRT1_2:!0,SQRT2:!0,MAX_VALUE:!0,MIN_VALUE:!0,NEGATIVE_INFINITY:!0,POSITIVE_INFINITY:!0},La,P={},cb,h,sa,Ia,tb={alert:!0,animator:!0,appleScript:!0,beep:!0,bytesToUIString:!0,Canvas:!0,
chooseColor:!0,chooseFile:!0,chooseFolder:!0,closeWidget:!0,COM:!0,convertPathToHFS:!0,convertPathToPlatform:!0,CustomAnimation:!0,escape:!0,FadeAnimation:!0,filesystem:!0,Flash:!0,focusWidget:!0,form:!0,FormField:!0,Frame:!0,HotKey:!0,Image:!0,include:!0,isApplicationRunning:!0,iTunes:!0,konfabulatorVersion:!0,log:!0,md5:!0,MenuItem:!0,MoveAnimation:!0,openURL:!0,play:!0,Point:!0,popupMenu:!0,preferenceGroups:!0,preferences:!0,print:!0,prompt:!0,random:!0,Rectangle:!0,reloadWidget:!0,ResizeAnimation:!0,
resolvePath:!0,resumeUpdates:!0,RotateAnimation:!0,runCommand:!0,runCommandInBg:!0,saveAs:!0,savePreferences:!0,screen:!0,ScrollBar:!0,showWidgetPreferences:!0,sleep:!0,speak:!0,Style:!0,suppressUpdates:!0,system:!0,tellWidget:!0,Text:!0,TextArea:!0,Timer:!0,unescape:!0,updateNow:!0,URL:!0,Web:!0,widget:!0,Window:!0,XMLDOM:!0,XMLHttpRequest:!0,yahooCheckLogin:!0,yahooLogin:!0,yahooLogout:!0},u,Q,db=/@cc|<\/?|script|\]*s\]|<\s*!|&lt/i,Bb=/[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,
Cb=/^\s*([(){}\[.,:;'"~\?\]#@]|==?=?|\/(\*(jslint|members?|global)?|=|\/)?|\*[\/=]?|\+[+=]?|-[\-=]?|%=?|&[&=]?|\|[|=]?|>>?>?=?|<([\/=!]|\!(\[|--)?|<=?)?|\^=?|\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\.[0-9]*)?([eE][+\-]?[0-9]+)?)/;Y=/^\s*(['"=>\/&#]|<(?:\/|\!(?:--)?)?|[a-zA-Z][a-zA-Z0-9_\-]*|[0-9]+|--)/;var Db=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,Eb=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
Fb=/[>&]|<[\/!]?|--/,Gb=/\*\/|\/\*/,nb=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,Qa=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i,jb=/&|\+|\u00AD|\.\.|\/\*|%[^;]|base64|url|expression|data|mailto/i,Hb=/[^a-zA-Z0-9+\-_\/ ]/,Ib=/[\[\]\/\\"'*<>.&:(){}+=#]/,Jb={outer:Y,html:Y,style:/^\s*([{:#%.=,>+\[\]@()"';]|\*=?|\$=|\|=|\^=|~=|[a-zA-Z_][a-zA-Z0-9_\-]*|[0-9]+|<\/|\/\*)/,styleproperty:/^\s*([@#!"'};:\-%.=,+\[\]()*_]|[a-zA-Z][a-zA-Z0-9._\-]*|\/\*?|\d+(?:\.\d+)?|<\/)/};if(typeof Object.create!==
"function")Object.create=function(a){j.prototype=a;return new j};String.prototype.entityify=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};String.prototype.isAlpha=function(){return this>="a"&&this<="z\uffff"||this>="A"&&this<="Z\uffff"};String.prototype.isDigit=function(){return this>="0"&&this<="9"};String.prototype.supplant=function(a){return this.replace(/\{([^{}]*)\}/g,function(b,d){var c=a[d];return typeof c==="string"||typeof c==="number"?c:b})};String.prototype.name=
function(){return nb.test(this)?this:Db.test(this)?'"'+this.replace(Eb,function(a){var b=yb[a];return b?b:"\\u"+("0000"+a.charCodeAt().toString(16)).slice(-4)})+'"':'"'+this+'"'};var V=function(){function a(){var b;if(n>=na.length)return!1;d=1;m=na[n];n+=1;b=m.search(/ \t/);b>=0&&f("Mixed spaces and tabs.",n,b+1);m=m.replace(/\t/g,cb);b=m.search(Bb);b>=0&&f("Unsafe character.",n,b);i.maxlen&&i.maxlen<m.length&&f("Line too long.",n,m.length);return!0}function b(a,e){var g,h;h=a==="(color)"?{type:a}:
a==="(punctuator)"||a==="(identifier)"&&x(P,e)?P[e]||P["(error)"]:P[a];h=Object.create(h);(a==="(string)"||a==="(range)")&&Qa.test(e)&&f("Script URL.",n,c);if(a==="(identifier)")h.identifier=!0,e==="__iterator__"||e==="__proto__"?t("Reserved name '{a}'.",n,c,e):i.nomen&&(e.charAt(0)==="_"||e.charAt(e.length-1)==="_")&&f("Unexpected {a} in '{b}'.",n,c,"dangling '_'",e);h.value=e;h.line=n;h.character=d;h.from=c;g=h.id;g!=="(endline)"&&(bb=g&&("(,=:[!&|?{};".indexOf(g.charAt(g.length-1))>=0||g==="return"));
return h}var d,c,n,m;return{init:function(b){na=typeof b==="string"?b.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n"):b;n=0;a();c=1},range:function(a,e){var h,i="";c=d;for(m.charAt(0)!==a&&t("Expected '{a}' and instead saw '{b}'.",n,d,a,m.charAt(0));;){m=m.slice(1);d+=1;h=m.charAt(0);switch(h){case "":t("Missing '{a}'.",n,d,h);break;case e:return m=m.slice(1),d+=1,b("(range)",i);case Q:case "\\":f("Unexpected '{a}'.",n,d,h)}i+=h}},token:function(){function l(a){if(a=a.exec(m))return r=a[0].length,
a=a[1],q=a.charAt(0),m=m.substr(r),c=d+r-a.length,d+=r,a}function s(h){function l(a){var b=parseInt(m.substr(j+1,a),16);j+=a;b>=32&&b<=126&&b!==34&&b!==92&&b!==39&&f("Unnecessary escapement.",n,d);d+=a;k=String.fromCharCode(b)}var k,j,q="";ma&&h!=='"'&&f("Strings must use doublequote.",n,d);if(Q===h||u==="scriptstring"&&!Q)return b("(punctuator)",h);for(j=0;;){for(;j>=m.length;)j=0,(u!=="html"||!a())&&t("Unclosed string.",n,c);k=m.charAt(j);if(k===h)return d+=1,m=m.substr(j+1),b("(string)",q,h);if(k<
" "){if(k==="\n"||k==="\r")break;f("Control character in string: {a}.",n,d+j,m.slice(0,j))}else if(k===Q)f("Bad HTML string",n,d+j);else if(k==="<")i.safe&&u==="html"?f("ADsafe string violation.",n,d+j):m.charAt(j+1)==="/"&&(u||i.safe)?f("Expected '<\\/' and instead saw '</'.",n,d):m.charAt(j+1)==="!"&&(u||i.safe)&&f("Unexpected '<!' in a string.",n,d);else if(k==="\\")if(u==="html")i.safe&&f("ADsafe string violation.",n,d+j);else if(u==="styleproperty")j+=1,d+=1,k=m.charAt(j),k!==h&&f("Escapement in style string.",
n,d+j);else switch(j+=1,d+=1,k=m.charAt(j),k){case Q:f("Bad HTML string",n,d+j);break;case "\\":case "'":case '"':case "/":break;case "b":k="\u0008";break;case "f":k="\u000c";break;case "n":k="\n";break;case "r":k="\r";break;case "t":k="\t";break;case "u":l(4);break;case "v":k="\u000b";break;case "x":ma&&f("Avoid \\x-.",n,d);l(2);break;default:f("Bad escapement.",n,d)}q+=k;d+=1;j+=1}}for(var p,q,k,j,r,o;;){if(!m)return b(a()?"(endline)":"(end)","");for(;u==="outer";)if(j=m.search(Fb),j===0)break;
else if(j>0){d+=1;m=m.slice(j);break}else if(!a())return b("(end)","");if(k=l(Jb[u]||Cb)){if(q.isAlpha()||q==="_"||q==="$")return b("(identifier)",k);if(q.isDigit())return u!=="style"&&!isFinite(Number(k))&&f("Bad number '{a}'.",n,d,k),u!=="style"&&u!=="styleproperty"&&m.substr(0,1).isAlpha()&&f("Missing space after '{a}'.",n,d,k),q==="0"&&(j=k.substr(1,1),j.isDigit()?h.id!=="."&&u!=="styleproperty"&&f("Don't use extra leading zeros '{a}'.",n,d,k):ma&&(j==="x"||j==="X")&&f("Avoid 0x-. '{a}'.",n,d,
k)),k.substr(k.length-1)==="."&&f("A trailing decimal point can be confused with a dot '{a}'.",n,d,k),b("(number)",k);switch(k){case '"':case "'":return s(k);case "//":Ha||u&&u!=="script"?f("Unexpected comment.",n,d):u==="script"&&/<\s*\//i.test(m)?f("Unexpected </ in comment.",n,d):(i.safe||u==="script")&&db.test(m)&&f("Dangerous comment.",n,d);m="";h.comment=!0;break;case "/*":(Ha||u&&u!=="script"&&u!=="style"&&u!=="styleproperty")&&f("Unexpected comment.",n,d);for(i.safe&&db.test(m)&&f("ADsafe comment violation.",
n,d);;){j=m.search(Gb);if(j>=0)break;a()?i.safe&&db.test(m)&&f("ADsafe comment violation.",n,d):t("Unclosed comment.",n,d)}d+=j+2;m.substr(j,1)==="/"&&t("Nested comment.",n,d);m=m.substr(j+2);h.comment=!0;break;case "/*members":case "/*member":case "/*jslint":case "/*global":case "*/":return{value:k,type:"special",line:n,character:d,from:c};case "":break;case "/":h.id==="/="&&t("A regular expression literal can be confused with '/='.",n,c);if(bb){for(r=k=j=0;;){p=!0;q=m.charAt(r);r+=1;switch(q){case "":t("Unclosed regular expression.",
n,c);return;case "/":j>0&&f("Unescaped '{a}'.",n,c+r,"/");q=m.substr(0,r-1);for(o={g:!0,i:!0,m:!0};o[m.charAt(r)]===!0;)o[m.charAt(r)]=!1,r+=1;d+=r;m=m.substr(r);o=m.charAt(0);(o==="/"||o==="*")&&t("Confusing regular expression.",n,c);return b("(regexp)",q);case "\\":q=m.charAt(r);q<" "?f("Unexpected control character in regular expression.",n,c+r):q==="<"&&f("Unexpected escaped character '{a}' in regular expression.",n,c+r,q);r+=1;break;case "(":j+=1;p=!1;if(m.charAt(r)==="?")switch(r+=1,m.charAt(r)){case ":":case "=":case "!":r+=
1;break;default:f("Expected '{a}' and instead saw '{b}'.",n,c+r,":",m.charAt(r))}else k+=1;break;case "|":p=!1;break;case ")":j===0?f("Unescaped '{a}'.",n,c+r,")"):j-=1;break;case " ":for(o=1;m.charAt(r)===" ";)r+=1,o+=1;o>1&&f("Spaces are hard to count. Use {{a}}.",n,c+r,o);break;case "[":q=m.charAt(r);q==="^"&&(r+=1,i.regexp&&f("Insecure '{a}'.",n,c+r,q));o=!1;q==="]"&&(f("Empty class.",n,c+r-1),o=!0);a:do switch(q=m.charAt(r),r+=1,q){case "[":case "^":f("Unescaped '{a}'.",n,c+r,q);o=!0;break;case "-":o?
o=!1:(f("Unescaped '{a}'.",n,c+r,"-"),o=!0);break;case "]":o||f("Unescaped '{a}'.",n,c+r-1,"-");break a;case "\\":q=m.charAt(r);q<" "?f("Unexpected control character in regular expression.",n,c+r):q==="<"&&f("Unexpected escaped character '{a}' in regular expression.",n,c+r,q);r+=1;o=!0;break;case "/":f("Unescaped '{a}'.",n,c+r-1,"/");o=!0;break;case "<":u==="script"&&(q=m.charAt(r),(q==="!"||q==="/")&&f("HTML confusion in regular expression '<{a}'.",n,c+r,q));o=!0;break;default:o=!0}while(q);break;
case ".":i.regexp&&f("Insecure '{a}'.",n,c+r,q);break;case "]":case "?":case "{":case "}":case "+":case "*":f("Unescaped '{a}'.",n,c+r,q);break;case "<":u==="script"&&(q=m.charAt(r),(q==="!"||q==="/")&&f("HTML confusion in regular expression '<{a}'.",n,c+r,q))}if(p)switch(m.charAt(r)){case "?":case "+":case "*":r+=1;m.charAt(r)==="?"&&(r+=1);break;case "{":r+=1;q=m.charAt(r);(q<"0"||q>"9")&&f("Expected a number and instead saw '{a}'.",n,c+r,q);r+=1;for(o=+q;;){q=m.charAt(r);if(q<"0"||q>"9")break;
r+=1;o=+q+o*10}p=o;if(q===","&&(r+=1,p=Infinity,q=m.charAt(r),q>="0"&&q<="9")){r+=1;for(p=+q;;){q=m.charAt(r);if(q<"0"||q>"9")break;r+=1;p=+q+p*10}}m.charAt(r)!=="}"?f("Expected '{a}' and instead saw '{b}'.",n,c+r,"}",q):r+=1;m.charAt(r)==="?"&&(r+=1);o>p&&f("'{a}' should not be greater than '{b}'.",n,c+r,o,p)}}q=m.substr(0,r-1);d+=r;m=m.substr(r);return b("(regexp)",q)}return b("(punctuator)",k);case "<\!--":r=n;for(q=d;;){j=m.indexOf("--");if(j>=0)break;j=m.indexOf("<!");j>=0&&t("Nested HTML comment.",
n,d+j);a()||t("Unclosed HTML comment.",r,q)}r=m.indexOf("<!");r>=0&&r<j&&t("Nested HTML comment.",n,d+r);d+=j;m[j+2]!==">"&&t("Expected --\>.",n,d);d+=3;m=m.slice(j+3);break;case "#":if(u==="html"||u==="styleproperty"){for(;;){q=m.charAt(0);if((q<"0"||q>"9")&&(q<"a"||q>"f")&&(q<"A"||q>"F"))break;d+=1;m=m.substr(1);k+=q}k.length!==4&&k.length!==7&&f("Bad hex color '{a}'.",n,c+r,k);return b("(color)",k)}return b("(punctuator)",k);default:if(u==="outer"&&q==="&"){d+=1;for(m=m.substr(1);;){q=m.charAt(0);
d+=1;m=m.substr(1);if(q===";")break;q>="0"&&q<="9"||q>="a"&&q<="z"||q==="#"||t("Bad entity",n,c+r,d)}break}return b("(punctuator)",k)}}else{for(q=k="";m&&m<"!";)m=m.substr(1);if(m)if(u==="html")return k=m.charAt(0),m=m.substr(1),b("(error)",k);else t("Unexpected '{a}'.",n,d,m.substr(0,1))}}}}}();Va=[fa,function(){for(;;)if(a.identifier)switch(a.value.toLowerCase()){case "url":fa();break;case "expression":c("Unexpected expression '{a}'.",a,a.value);b();break;default:b()}else{if(a.id===";"||a.id===
"!"||a.id==="(end)"||a.id==="}")return!0;b()}}];Y="none,hidden,dotted,dashed,solid,double,ridge,inset,outset".split(",");ab=["auto","always","avoid","left","right"];Fa=["auto","hidden","scroll","visible"];Ca={background:[!0,"background-attachment","background-color","background-image","background-position","background-repeat"],"background-attachment":["scroll","fixed"],"background-color":["transparent",X],"background-image":["none",fa],"background-position":[2,[y,"top","bottom","left","right","center"]],
"background-repeat":["repeat","repeat-x","repeat-y","no-repeat"],border:[!0,"border-color","border-style","border-width"],"border-bottom":[!0,"border-bottom-color","border-bottom-style","border-bottom-width"],"border-bottom-color":X,"border-bottom-style":Y,"border-bottom-width":la,"border-collapse":["collapse","separate"],"border-color":["transparent",4,X],"border-left":[!0,"border-left-color","border-left-style","border-left-width"],"border-left-color":X,"border-left-style":Y,"border-left-width":la,
"border-right":[!0,"border-right-color","border-right-style","border-right-width"],"border-right-color":X,"border-right-style":Y,"border-right-width":la,"border-spacing":[2,y],"border-style":[4,Y],"border-top":[!0,"border-top-color","border-top-style","border-top-width"],"border-top-color":X,"border-top-style":Y,"border-top-width":la,"border-width":[4,la],bottom:[y,"auto"],"caption-side":["bottom","left","right","top"],clear:["both","left","none","right"],clip:[function(){var e;if(a.identifier&&a.value===
"rect"){b();b("(");for(e=0;e<4;e+=1)if(!y()){c("Expected a number and instead saw '{a}'.",a,a.value);break}b(")");return!0}return!1},"auto"],color:X,content:["open-quote","close-quote","no-open-quote","no-close-quote",Ta,fa,function(){if(a.identifier&&a.value==="counter")return b(),b("("),b(),a.id===","&&(E(),a.type!=="(string)"&&c("Expected a string and instead saw '{a}'.",a,a.value),b()),b(")"),!0;return a.identifier&&a.value==="counters"?(b(),b("("),a.identifier||c("Expected a name and instead saw '{a}'.",
a,a.value),b(),a.id===","&&(E(),a.type!=="(string)"&&c("Expected a string and instead saw '{a}'.",a,a.value),b()),a.id===","&&(E(),a.type!=="(string)"&&c("Expected a string and instead saw '{a}'.",a,a.value),b()),b(")"),!0):!1},function(){return a.identifier&&a.value==="attr"?(b(),b("("),a.identifier||c("Expected a name and instead saw '{a}'.",a,a.value),b(),b(")"),!0):!1}],"counter-increment":[Sa,"none"],"counter-reset":[Sa,"none"],cursor:[fa,"auto","crosshair","default","e-resize","help","move",
"n-resize","ne-resize","nw-resize","pointer","s-resize","se-resize","sw-resize","w-resize","text","wait"],direction:["ltr","rtl"],display:"block,compact,inline,inline-block,inline-table,list-item,marker,none,run-in,table,table-caption,table-cell,table-column,table-column-group,table-footer-group,table-header-group,table-row,table-row-group".split(","),"empty-cells":["show","hide"],"float":["left","none","right"],font:["caption","icon","menu","message-box","small-caption","status-bar",!0,"font-size",
"font-style","font-weight","font-family"],"font-family":function(){for(;a.id!==";";){!Sa()&&!Ta()&&c("Expected a name and instead saw '{a}'.",a,a.value);if(a.id!==",")return!0;E()}},"font-size":["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller",y],"font-size-adjust":["none",Ba],"font-stretch":"normal,wider,narrower,ultra-condensed,extra-condensed,condensed,semi-condensed,semi-expanded,expanded,extra-expanded".split(","),"font-style":["normal","italic","oblique"],
"font-variant":["normal","small-caps"],"font-weight":["normal","bold","bolder","lighter",Ba],height:[y,"auto"],left:[y,"auto"],"letter-spacing":["normal",y],"line-height":["normal",function(){a.id==="-"&&(b("-"),z());return a.type==="(number)"?(b(),a.type!=="(string)"&&ib[a.value]===!0&&(z(),b()),!0):!1}],"list-style":[!0,"list-style-image","list-style-position","list-style-type"],"list-style-image":["none",fa],"list-style-position":["inside","outside"],"list-style-type":"circle,disc,square,decimal,decimal-leading-zero,lower-roman,upper-roman,lower-greek,lower-alpha,lower-latin,upper-alpha,upper-latin,hebrew,katakana,hiragana-iroha,katakana-oroha,none".split(","),
margin:[4,ra],"margin-bottom":ra,"margin-left":ra,"margin-right":ra,"margin-top":ra,"marker-offset":[y,"auto"],"max-height":[y,"none"],"max-width":[y,"none"],"min-height":y,"min-width":y,opacity:Ba,outline:[!0,"outline-color","outline-style","outline-width"],"outline-color":["invert",X],"outline-style":"dashed,dotted,double,groove,inset,none,outset,ridge,solid".split(","),"outline-width":la,overflow:Fa,"overflow-x":Fa,"overflow-y":Fa,padding:[4,y],"padding-bottom":y,"padding-left":y,"padding-right":y,
"padding-top":y,"page-break-after":ab,"page-break-before":ab,position:["absolute","fixed","relative","static"],quotes:[8,Ta],right:[y,"auto"],"table-layout":["auto","fixed"],"text-align":["center","justify","left","right"],"text-decoration":["none","underline","overline","line-through","blink"],"text-indent":y,"text-shadow":["none",4,[X,y]],"text-transform":["capitalize","uppercase","lowercase","none"],top:[y,"auto"],"unicode-bidi":["normal","embed","bidi-override"],"vertical-align":["baseline","bottom",
"sub","super","top","text-top","middle","text-bottom",y],visibility:["visible","hidden","collapse"],"white-space":"normal,nowrap,pre,pre-line,pre-wrap,inherit".split(","),width:[y,"auto"],"word-spacing":["normal",y],"word-wrap":["break-word","normal"],"z-index":["auto",Ba]};xa("(number)",hb);xa("(string)",hb);P["(identifier)"]={type:"(identifier)",lbp:0,identifier:!0,nud:function(){var a=this.value,b=F[a],d;typeof b==="function"?b=void 0:typeof b==="boolean"&&(d=k,k=ta[0],o(a,"var"),b=k,k=d);if(k===
b)switch(k[a]){case "unused":k[a]="var";break;case "label":c("'{a}' is a statement label.",h,a)}else if(k["(global)"])i.undef&&D[a]!=="boolean"&&c("'{a}' is not defined.",h,a),Ra(h);else switch(k[a]){case "closure":case "function":case "var":case "unused":c("'{a}' used out of scope.",h,a);break;case "label":c("'{a}' is a statement label.",h,a);break;case "outer":case "global":break;default:if(b===!0)k[a]=!0;else if(b===null)c("'{a}' is not allowed.",h,a),Ra(h);else if(typeof b!=="object")i.undef?
c("'{a}' is not defined.",h,a):k[a]=!0,Ra(h);else switch(b[a]){case "function":case "var":case "unused":b[a]="closure";k[a]=b["(global)"]?"global":"outer";break;case "closure":case "parameter":k[a]=b["(global)"]?"global":"outer";break;case "label":c("'{a}' is a statement label.",h,a)}}return this},led:function(){l("Expected an operator and instead saw '{a}'.",a,a.value)}};xa("(regexp)",function(){return this});G("(endline)");G("(begin)");G("(end)").reach=!0;G("</").reach=!0;G("<!");G("<\!--");G("--\>");
G("(error)").reach=!0;G("}").reach=!0;G(")");G("]");G('"').reach=!0;G("'").reach=!0;G(";");G(":").reach=!0;G(",");G("#");G("@");B("else");B("case").reach=!0;B("catch");B("default").reach=!0;B("finally");W("arguments");W("eval");W("false");W("Infinity");W("NaN");W("null");W("this");W("true");W("undefined");ha("=","assign",20);ha("+=","assignadd",20);ha("-=","assignsub",20);ha("*=","assignmult",20);ha("/=","assigndiv",20).nud=function(){l("A regular expression literal can be confused with '/='.")};
ha("%=","assignmod",20);ja("&=","assignbitand",20);ja("|=","assignbitor",20);ja("^=","assignbitxor",20);ja("<<=","assignshiftleft",20);ja(">>=","assignshiftright",20);ja(">>>=","assignshiftrightunsigned",20);O("?",function(a,c){c.left=a;c.right=p(10);b(":");c["else"]=p(10);return c},30);O("||","or",40);O("&&","and",50);ia("|","bitor",70);ia("^","bitxor",80);ia("&","bitand",90);ca("==",function(a,b){i.eqeqeq?c("Expected '{a}' and instead saw '{b}'.",this,"===","=="):ya(a)?c("Use '{a}' to compare with '{b}'.",
this,"===",a.value):ya(b)&&c("Use '{a}' to compare with '{b}'.",this,"===",b.value);return this});ca("===");ca("!=",function(a,b){i.eqeqeq?c("Expected '{a}' and instead saw '{b}'.",this,"!==","!="):ya(a)?c("Use '{a}' to compare with '{b}'.",this,"!==",a.value):ya(b)&&c("Use '{a}' to compare with '{b}'.",this,"!==",b.value);return this});ca("!==");ca("<");ca(">");ca("<=");ca(">=");ia("<<","shiftleft",120);ia(">>","shiftright",120);ia(">>>","shiftrightunsigned",120);O("in","in",120);O("instanceof",
"instanceof",120);O("+",function(a,b){var d=p(130);if(a&&d&&a.id==="(string)"&&d.id==="(string)")return a.value+=d.value,a.character=d.character,Qa.test(a.value)&&c("JavaScript URL.",a),a;b.left=a;b.right=d;return b},130);S("+","num");O("-","sub",130);S("-","neg");O("*","mult",140);O("/","div",140);O("%","mod",140);fb("++","postinc");S("++","preinc");P["++"].exps=!0;fb("--","postdec");S("--","predec");P["--"].exps=!0;S("delete",function(){var b=p(0);(!b||b.id!=="."&&b.id!=="[")&&c("Expected '{a}' and instead saw '{b}'.",
a,".",a.value);this.first=b;return this}).exps=!0;S("~",function(){i.bitwise&&c("Unexpected '{a}'.",this,"~");p(150);return this});S("!",function(){this.right=p(150);this.arity="unary";xb[this.right.id]===!0&&c("Confusing use of '{a}'.",this,"!");return this});S("typeof","typeof");S("new",function(){var e=p(155),g;if(e&&e.id!=="function")if(e.identifier)switch(e["new"]=!0,e.value){case "Object":c("Use the object literal notation {}.",h);break;case "Array":return a.id!=="("?c("Use the array literal notation [].",
h):(b("("),a.id===")"?c("Use the array literal notation [].",h):(g=p(0),e.dimension=g,(g.id==="(number)"&&/[.+\-Ee]/.test(g.value)||g.id==="-"&&!g.right||g.id==="(string)"||g.id==="["||g.id==="{"||g.id==="true"||g.id==="false"||g.id==="null"||g.id==="undefined"||g.id==="Infinity")&&c("Use the array literal notation [].",h),a.id!==")"&&l("Use the array literal notation [].",h)),b(")")),this.first=e,this;case "Number":case "String":case "Boolean":case "Math":case "JSON":c("Do not use {a} as a constructor.",
h,e.value);break;case "Function":i.evil||c("The Function constructor is eval.");break;case "Date":case "RegExp":break;default:e.id!=="function"&&(g=e.value.substr(0,1),i.newcap&&(g<"A"||g>"Z")&&c("A constructor name should start with an uppercase letter.",h))}else e.id!=="."&&e.id!=="["&&e.id!=="("&&c("Bad constructor.",h);else c("Weird construction. Delete 'new'.",this);z(h,a);a.id!=="("&&c("Missing '()' invoking a constructor.");this.first=e;return this});P["new"].exps=!0;O(".",function(e,g){z(N,
h);var d=oa();typeof d==="string"&&Aa(d);g.left=e;g.right=d;!i.evil&&e&&e.value==="document"&&(d==="write"||d==="writeln")?c("document.write can be a form of eval.",e):i.adsafe&&e&&e.value==="ADSAFE"&&(d==="id"||d==="lib"?c("ADsafe violation.",g):d==="go"&&(u!=="script"?c("ADsafe violation.",g):(ua||a.id!=="("||s(0).id!=="(string)"||s(0).value!==R||s(1).id!==",")&&l("ADsafe violation: go.",g),ua=!0,ka=!1));if(!i.evil&&(d==="eval"||d==="execScript"))c("eval is evil.");else if(i.safe)for(;;){Na[d]===
!0&&c("ADsafe restricted word '{a}'.",h,d);if(typeof D[e.value]!=="boolean"||a.id==="(")break;if(Ab[d]===!0){a.id==="."&&c("ADsafe violation.",g);break}if(a.id!=="."){c("ADsafe violation.",g);break}b(".");h.left=g;h.right=d;g=h;d=oa();typeof d==="string"&&Aa(d)}return g},160,!0);O("(",function(e,g){z(N,h);C();var d=0,f=[];e&&(e.type==="(identifier)"?e.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&e.value!=="Number"&&e.value!=="String"&&e.value!=="Boolean"&&e.value!=="Date"&&(e.value===
"Math"?c("Math is not a function.",e):i.newcap&&c("Missing 'new' prefix when invoking a constructor.",e)):e.id==="."&&i.safe&&e.left.value==="Math"&&e.right==="random"&&c("ADsafe violation.",e));if(a.id!==")")for(;;){f[f.length]=p(10);d+=1;if(a.id!==",")break;E()}b(")");i.immed&&e.id==="function"&&a.id!==")"&&c("Wrap the entire immediate function invocation in parens.",g);C(N,h);typeof e==="object"&&(e.value==="parseInt"&&d===1&&c("Missing radix parameter.",e),i.evil||(e.value==="eval"||e.value===
"Function"||e.value==="execScript"?c("eval is evil.",e):f[0]&&f[0].id==="(string)"&&(e.value==="setTimeout"||e.value==="setInterval")&&c("Implied eval is evil. Pass a function instead of a string.",e)),!e.identifier&&e.id!=="."&&e.id!=="["&&e.id!=="("&&e.id!=="&&"&&e.id!=="||"&&e.id!=="?"&&c("Bad invocation.",e));g.left=e;return g},155,!0).exps=!0;S("(",function(){C();var e=p(0);b(")",this);C(N,h);i.immed&&e.id==="function"&&(a.id==="("?c("Move the invocation into the parens that contain the function.",
a):c("Do not wrap function literals in parens unless they are to be immediately invoked.",this));return e});O("[",function(a,g){C();var d=p(0),f;d&&d.type==="(string)"?(i.safe&&Na[d.value]===!0?c("ADsafe restricted word '{a}'.",g,d.value):!i.evil&&(d.value==="eval"||d.value==="execScript")?c("eval is evil.",g):i.safe&&(d.value.charAt(0)==="_"||d.value.charAt(0)==="-")&&c("ADsafe restricted subscript '{a}'.",g,d.value),Aa(d.value),!i.sub&&nb.test(d.value)&&(f=P[d.value],(!f||!f.reserved)&&c("['{a}'] is better written in dot notation.",
d,d.value))):(!d||d.type!=="(number)"||d.value<0)&&i.safe&&c("ADsafe subscripting.");b("]",g);C(N,h);g.left=a;g.right=d;return g},160,!0);S("[",function(){var e=h.line!==a.line;this.first=[];e&&(H+=i.indent,a.from===H+i.indent&&(H+=i.indent));for(;a.id!=="(end)";){for(;a.id===",";)c("Extra comma."),b(",");if(a.id==="]")break;e&&h.line!==a.line&&v();this.first.push(p(10));if(a.id===","){if(E(),a.id==="]"){c("Extra comma.",h);break}}else break}e&&(H-=i.indent,v());b("]",this);return this},160);(function(e){e.nud=
function(){var e,d,f,n,m={};if(e=h.line!==a.line)H+=i.indent,a.from===H+i.indent&&(H+=i.indent);for(;;){if(a.id==="}")break;e&&v();if(a.value==="get"&&s().id!==":")b("get"),i.es5||l("get/set are ES5 features."),(f=Ya())||l("Missing property name."),n=a,z(h,a),d=Da(f),k["(loopage)"]&&c("Don't make functions within a loop.",n),(d=d["(params)"])&&c("Unexpected parameter '{a}' in get {b} function.",n,d[0],f),z(h,a),b(","),v(),b("set"),n=Ya(),f!==n&&l("Expected {a} and instead saw {b}.",h,f,n),n=a,z(h,
a),d=Da(f),d=d["(params)"],(!d||d.length!==1||d[0]!=="value")&&c("Expected (value) in set {a} function.",n,f);else{f=Ya();if(typeof f!=="string")break;b(":");w(h,a);p(10)}m[f]===!0&&c("Duplicate member '{a}'.",a,f);m[f]=!0;Aa(f);if(a.id===",")E(),a.id===","?c("Extra comma.",h):a.id==="}"&&c("Extra comma.",h);else break}e&&(H-=i.indent,v());b("}",this);return this};e.fud=function(){l("Expected to see a statement and instead saw a block.",h)}})(G("{"));ba("var",Za).exps=!0;ga("function",function(){qa&&
c("Function statements cannot be placed in blocks. Use a function expression or move the statement to the top of the outer function.",h);var b=oa();z(h,a);o(b,"unused");Da(b);a.id==="("&&a.line===h.line&&l("Function statements are not invocable. Wrap the whole function invocation in parens.");return this});S("function",function(){var b=Ma();b?z(h,a):w(h,a);Da(b);k["(loopage)"]&&c("Don't make functions within a loop.");return this});ga("if",function(){var e=a;b("(");w(this,e);C();p(20);a.id==="="&&
(c("Expected a conditional expression and instead saw an assignment."),b("="),p(20));b(")",e);C(N,h);U(!0);a.id==="else"&&(w(h,a),b("else"),a.id==="if"||a.id==="switch"?Pa(!0):U(!0));return this});ga("try",function(){var e,g;i.adsafe&&c("ADsafe try violation.",this);U(!1);if(a.id==="catch")b("catch"),w(h,a),b("("),g=F,F=Object.create(g),e=a.value,a.type!=="(identifier)"?c("Expected an identifier and instead saw '{a}'.",a,e):o(e,"exception"),b(),b(")"),U(!1),e=!0,F=g;if(a.id==="finally")b("finally"),
U(!1);else return e||l("Expected '{a}' and instead saw '{b}'.",a,"catch",a.value),this});ga("while",function(){var e=a;k["(breakage)"]+=1;k["(loopage)"]+=1;b("(");w(this,e);C();p(20);a.id==="="&&(c("Expected a conditional expression and instead saw an assignment."),b("="),p(20));b(")",e);C(N,h);U(!0);k["(breakage)"]-=1;k["(loopage)"]-=1;return this}).labelled=!0;B("with");ga("switch",function(){var e=a,g=!1;k["(breakage)"]+=1;b("(");w(this,e);C();this.condition=p(20);b(")",e);C(N,h);w(h,a);e=a;b("{");
w(h,a);H+=i.indent;for(this.cases=[];;)switch(a.id){case "case":switch(k["(verb)"]){case "break":case "case":case "continue":case "return":case "switch":case "throw":break;default:c("Expected a 'break' statement before 'case'.",h)}v(-i.indent);b("case");this.cases.push(p(20));g=!0;b(":");k["(verb)"]="case";break;case "default":switch(k["(verb)"]){case "break":case "continue":case "return":case "throw":break;default:c("Expected a 'break' statement before 'default'.",h)}v(-i.indent);b("default");g=
!0;b(":");break;case "}":H-=i.indent;v();b("}",e);(this.cases.length===1||this.condition.id==="true"||this.condition.id==="false")&&c("This 'switch' should be an 'if'.",this);k["(breakage)"]-=1;k["(verb)"]=void 0;return;case "(end)":l("Missing '{a}'.",a,"}");return;default:if(g)switch(h.id){case ",":l("Each value should have its own case label.");return;case ":":pa();break;default:l("Missing ':' on a case clause.",h)}else l("Expected '{a}' and instead saw '{b}'.",a,"case",a.value)}}).labelled=!0;
ba("debugger",function(){i.debug||c("All 'debugger' statements should be removed.");return this}).exps=!0;(function(){var e=ba("do",function(){k["(breakage)"]+=1;k["(loopage)"]+=1;this.first=U(!0);b("while");var e=a;w(h,e);b("(");C();p(20);a.id==="="&&(c("Expected a conditional expression and instead saw an assignment."),b("="),p(20));b(")",e);C(N,h);k["(breakage)"]-=1;k["(loopage)"]-=1;return this});e.labelled=!0;e.exps=!0})();ga("for",function(){var e=i.forin,g;g=a;k["(breakage)"]+=1;k["(loopage)"]+=
1;b("(");w(this,g);C();if(s(a.id==="var"?1:0).id==="in"){if(a.id==="var")b("var"),Za(!0);else{switch(k[a.value]){case "unused":k[a.value]="var";break;case "var":break;default:c("Bad for in variable '{a}'.",a,a.value)}b()}b("in");p(20);b(")",g);g=U(!0);!e&&(g.length>1||typeof g[0]!=="object"||g[0].value!=="if")&&c("The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.",this)}else{if(a.id!==";")if(a.id==="var")b("var"),Za();else for(;;){p(0,"for");
if(a.id!==",")break;E()}$(h);b(";");a.id!==";"&&(p(20),a.id==="="&&(c("Expected a conditional expression and instead saw an assignment."),b("="),p(20)));$(h);b(";");a.id===";"&&l("Expected '{a}' and instead saw '{b}'.",a,")",";");if(a.id!==")")for(;;){p(0,"for");if(a.id!==",")break;E()}b(")",g);C(N,h);U(!0)}k["(breakage)"]-=1;k["(loopage)"]-=1;return this}).labelled=!0;ba("break",function(){var e=a.value;k["(breakage)"]===0&&c("Unexpected '{a}'.",a,this.value);$(this);if(a.id!==";"&&h.line===a.line)k[e]!==
"label"?c("'{a}' is not a statement label.",a,e):F[e]!==k&&c("'{a}' is out of scope.",a,e),this.first=a,b();za("break");return this}).exps=!0;ba("continue",function(){var e=a.value;k["(breakage)"]===0&&c("Unexpected '{a}'.",a,this.value);$(this);if(a.id!==";"){if(h.line===a.line)k[e]!=="label"?c("'{a}' is not a statement label.",a,e):F[e]!==k&&c("'{a}' is out of scope.",a,e),this.first=a,b()}else k["(loopage)"]||c("Unexpected '{a}'.",a,this.value);za("continue");return this}).exps=!0;ba("return",
function(){$(this);a.id==="(regexp)"&&c("Wrap the /regexp/ literal in parens to disambiguate the slash operator.");if(a.id!==";"&&!a.reach)w(h,a),this.first=p(20);za("return");return this}).exps=!0;ba("throw",function(){$(this);w(h,a);this.first=p(20);za("throw");return this}).exps=!0;B("void");B("class");B("const");B("enum");B("export");B("extends");B("import");B("super");B("let");B("yield");B("implements");B("interface");B("package");B("private");B("protected");B("public");B("static");var Z=function(e,
g){var d,f;JSLINT.errors=[];D=Object.create(zb);if(g){d=g.predef;if(d instanceof Array)for(f=0;f<d.length;f+=1)D[d[f]]=!0;if(g.adsafe)g.safe=!0;if(g.safe)g.browser=!1,g.css=!1,g.debug=!1,g.devel=!1,g.eqeqeq=!0,g.evil=!1,g.forin=!1,g.nomen=!0,g.on=!1,g.rhino=!1,g.safe=!0,g.windows=!1,g.strict=!0,g.sub=!1,g.undef=!0,g.widget=!1,D.Date=null,D.eval=null,D.Function=null,D.Object=null,D.ADSAFE=!1,D.lib=!1;i=g}else i={};i.indent=i.indent||4;i.maxerr=i.maxerr||50;R="";ua=ka=!1;Ea={};if(i.approved)for(f=0;f<
i.approved.length;f+=1)Ea[i.approved[f]]=i.approved[f];else Ea.test="test";cb="";for(f=0;f<i.indent;f+=1)cb+=" ";H=1;F=eb=Object.create(D);k={"(global)":!0,"(name)":"(global)","(scope)":F,"(breakage)":0,"(loopage)":0};ta=[k];Ga={};sa=[];u=Ha=!1;M=null;ea={};da=null;aa={};qa=!1;wa=[];ma=!1;Ia=0;V.init(e);bb=!0;La=!1;N=h=a=P["(begin)"];K();try{b();if(a.value.charAt(0)==="<"){a:{var n,m,j,o,p,q,s,t=i.white,r;u="html";Q="";for(M=null;;){switch(a.value){case "<":u="html";b("<");m={};q=a;q.identifier||
c("Bad identifier {a}.",q,q.value);o=q.value;i.cap&&(o=o.toLowerCase());q.name=o;b();if(!M)M=[],d=o,d!=="html"&&!i.fragment&&(d==="div"&&i.adsafe?l("ADSAFE: Use the fragment option."):l("Expected '{a}' and instead saw '{b}'.",h,"html",d)),i.adsafe&&(d==="html"&&l("Currently, ADsafe does not operate on whole HTML documents. It operates on <div> fragments and .js files.",h),i.fragment?d!=="div"&&l("ADsafe violation: Wrap the widget in a div.",h):l("Use the fragment option.",h)),i.browser=!0,K();s=Xa[o];
typeof s!=="object"&&l("Unrecognized tag '<{a}>'.",q,o);j=s.empty;for(q.type=o;;){if(a.id==="/"){b("/");a.id!==">"&&c("Expected '{a}' and instead saw '{b}'.",a,">",a.value);break}if(a.id&&a.id.substr(0,1)===">")break;a.identifier||((a.id==="(end)"||a.id==="(error)")&&l("Missing '>'.",a),c("Bad identifier."));i.white=!0;w(h,a);n=a.value;i.white=t;b();!i.cap&&n!==n.toLowerCase()&&c("Attribute '{a}' not all lower case.",a,n);n=n.toLowerCase();Q="";x(m,n)&&c("Attribute '{a}' repeated.",a,n);n.slice(0,
2)==="on"?(i.on||c("Avoid HTML event handlers."),u="scriptstring",b("="),p=a.id,p!=='"'&&p!=="'"&&l("Missing quote."),Q=p,r=i.white,i.white=!1,b(p),pa("on"),i.white=r,a.id!==p&&l("Missing close quote on script attribute."),u="html",Q="",b(p),s=!1):n==="style"?(u="scriptstring",b("="),p=a.id,p!=='"'&&p!=="'"&&l("Missing quote."),u="styleproperty",Q=p,b(p),kb(),u="html",Q="",b(p),s=!1):a.id==="="?(b("="),s=a.value,!a.identifier&&a.id!=='"'&&a.id!=="'"&&a.type!=="(string)"&&a.type!=="(number)"&&a.type!==
"(color)"&&c("Expected an attribute value and instead saw '{a}'.",h,n),b()):s=!0;m[n]=s;d=n;f=s;var A=void 0,v=void 0;d==="id"?(A=typeof f==="string"?f.toUpperCase():"",Ga[A]===!0&&c("Duplicate id='{a}'.",a,f),/^[A-Za-z][A-Za-z0-9._:\-]*$/.test(f)?i.adsafe&&(R?f.slice(0,R.length)!==R?c("ADsafe violation: An id must have a '{a}' prefix",a,R):/^[A-Z]+_[A-Z]+$/.test(f)||c("ADSAFE violation: bad id."):(R=f,/^[A-Z]+_$/.test(f)||c("ADSAFE violation: bad id."))):c("Bad id: '{a}'.",a,f),v=f.search(Ib),v>=
0&&c("Unexpected character '{a}' in {b}.",h,f.charAt(v),d),Ga[A]=!0):d==="class"||d==="type"||d==="name"?(v=f.search(Hb),v>=0&&c("Unexpected character '{a}' in {b}.",h,f.charAt(v),d),Ga[A]=!0):d==="href"||d==="background"||d==="content"||d==="data"||d.indexOf("src")>=0||d.indexOf("url")>=0?(i.safe&&jb.test(f)&&l("ADsafe URL violation."),sa.push(f)):d==="for"?i.adsafe&&(R?f.slice(0,R.length)!==R?c("ADsafe violation: An id must have a '{a}' prefix",a,R):/^[A-Z]+_[A-Z]+$/.test(f)||c("ADSAFE violation: bad id."):
c("ADSAFE violation: bad id.")):d==="name"&&i.adsafe&&f.indexOf("_")>=0&&c("ADsafe name violation.")}d=o;f=m;var A=void 0,z=Xa[d],v=void 0;Ha=!1;z||l("Unrecognized tag '<{a}>'.",a,d===d.toLowerCase()?d:d+" (capitalization error)");if(M.length>0)if(d==="html"&&l("Too many <html> tags.",h),v=z.parent)v.indexOf(" "+M[M.length-1].name+" ")<0&&l("A '<{a}>' must be within '<{b}>'.",h,d,v);else if(!i.adsafe&&!i.fragment){A=M.length;do A<=0&&l("A '<{a}>' must be within '<{b}>'.",h,d,"body"),A-=1;while(M[A].name!==
"body")}switch(d){case "div":i.adsafe&&M.length===1&&!R&&c("ADSAFE violation: missing ID_.");break;case "script":u="script";b(">");H=a.from;f.lang&&c("lang is deprecated.",h);i.adsafe&&M.length!==1&&c("ADsafe script placement violation.",h);f.src?(i.adsafe&&(!ka||!Ea[f.src])&&c("ADsafe unapproved script source.",h),f.type&&c("type is unnecessary.",h)):(ua&&l("ADsafe script violation.",h),pa("script"));u="html";b("</");!a.identifier&&a.value!=="script"&&c("Expected '{a}' and instead saw '{b}'.",a,
"script",a.value);b();u="outer";break;case "style":u="style";b(">");lb();u="html";b("</");!a.identifier&&a.value!=="style"&&c("Expected '{a}' and instead saw '{b}'.",a,"style",a.value);b();u="outer";break;case "input":switch(f.type){case "radio":case "checkbox":case "button":case "reset":case "submit":break;case "text":case "password":case "file":case "hidden":case "image":i.adsafe&&f.autocomplete!=="off"&&c("ADsafe autocomplete violation.");break;default:c("Bad input type.")}break;case "applet":case "body":case "embed":case "frame":case "frameset":case "head":case "iframe":case "noembed":case "noframes":case "object":case "param":i.adsafe&&
c("ADsafe violation: Disallowed tag: "+d)}j||M.push(q);u="outer";b(">");break;case "</":u="html";b("</");a.identifier||c("Bad identifier.");o=a.value;i.cap&&(o=o.toLowerCase());b();M||l("Unexpected '{a}'.",a,"</"+o+">");(q=M.pop())||l("Unexpected '{a}'.",a,"</"+o+">");q.name!==o&&l("Expected '{a}' and instead saw '{b}'.",a,"</"+q.name+">","</"+o+">");a.id!==">"&&l("Missing '{a}'.",a,">");u="outer";b(">");break;case "<!":i.safe&&c("ADsafe HTML violation.");for(u="html";;){b();if(a.id===">"||a.id===
"(end)")break;a.value.indexOf("--")>=0&&c("Unexpected --.");a.value.indexOf("<")>=0&&c("Unexpected <.");a.value.indexOf(">")>=0&&c("Unexpected >.")}u="outer";b(">");break;case "(end)":break a;default:a.id==="(end)"?l("Missing '{a}'.",a,"</"+M[M.length-1].value+">"):b()}if(M&&M.length===0&&(i.adsafe||!i.fragment||a.id==="(end)"))break}a.id!=="(end)"&&l("Unexpected material after the end.")}i.adsafe&&!ua&&c("ADsafe violation: Missing ADSAFE.go.",this)}else switch(a.id){case "{":case "[":ma=i.laxbreak=
!0;$a();break;case "@":case "*":case "#":case ".":case ":":u="style";b();(h.id!=="@"||!a.identifier||a.value!=="charset"||h.line!==1||h.from!==1)&&l('A css file should begin with @charset "UTF-8";');b();a.type!=="(string)"&&a.value!=="UTF-8"&&l('A css file should begin with @charset "UTF-8";');b();b(";");lb();break;default:i.adsafe&&i.fragment&&l("Expected '{a}' and instead saw '{b}'.",a,"<div>",a.value),pa("lib")}b("(end)")}catch(y){y&&JSLINT.errors.push({reason:y.message,line:y.line||a.line,character:y.character||
a.from},null)}return JSLINT.errors.length===0};Z.data=function(){var a={functions:[]},b;b=[];var c,h,f,i,k=[];if(Z.errors.length)a.errors=Z.errors;if(ma)a.json=!0;for(i in aa)x(aa,i)&&b.push({name:i,line:aa[i]});if(b.length>0)a.implieds=b;if(sa.length>0)a.urls=sa;b=mb(F);if(b.length>0)a.globals=b;for(h=1;h<ta.length;h+=1){c=ta[h];b={};for(f=0;f<va.length;f+=1)b[va[f]]=[];for(i in c)x(c,i)&&i.charAt(0)!=="("&&(f=c[i],Object.prototype.toString.apply(b[f])==="[object Array]"&&(b[f].push(i),f==="unused"&&
k.push({name:i,line:c["(line)"],"function":c["(name)"]})));for(f=0;f<va.length;f+=1)b[va[f]].length===0&&delete b[va[f]];b.name=c["(name)"];b.param=c["(params)"];b.line=c["(line)"];b.last=c["(last)"];a.functions.push(b)}if(k.length>0)a.unused=k;for(i in ea)if(typeof ea[i]==="number"){a.member=ea;break}return a};Z.report=function(a){function b(a,c){var d,e,f;if(c){l.push("<div><i>"+a+"</i> ");c=c.sort();for(e=0;e<c.length;e+=1)c[e]!==f&&(f=c[e],l.push((d?", ":"")+f),d=!0);l.push("</div>")}}var c=Z.data(),
f=[],h,i,k;h="";var j,l=[];if(c.errors||c.implieds||c.unused){i=!0;l.push("<div id=errors><i>Error:</i>");if(c.errors)for(k=0;k<c.errors.length;k+=1)if(f=c.errors[k])h=f.evidence||"",l.push("<p>Problem"+(isFinite(f.line)?" at line "+f.line+" character "+f.character:"")+": "+f.reason.entityify()+"</p><p class=evidence>"+(h&&(h.length>80?h.slice(0,77)+"...":h).entityify())+"</p>");if(c.implieds){f=[];for(k=0;k<c.implieds.length;k+=1)f[k]="<code>"+c.implieds[k].name+"</code>&nbsp;<i>"+c.implieds[k].line+
"</i>";l.push("<p><i>Implied global:</i> "+f.join(", ")+"</p>")}if(c.unused){f=[];for(k=0;k<c.unused.length;k+=1)f[k]="<code><u>"+c.unused[k].name+"</u></code>&nbsp;<i>"+c.unused[k].line+"</i> <code>"+c.unused[k]["function"]+"</code>";l.push("<p><i>Unused variable:</i> "+f.join(", ")+"</p>")}c.json&&l.push("<p>JSON: bad.</p>");l.push("</div>")}if(!a){l.push("<br><div id=functions>");c.urls&&b("URLs<br>",c.urls,"<br>");u==="style"?l.push("<p>CSS.</p>"):c.json&&!i?l.push("<p>JSON: good.</p>"):c.globals?
l.push("<div><i>Global</i> "+c.globals.sort().join(", ")+"</div>"):l.push("<div><i>No new global variables introduced.</i></div>");for(k=0;k<c.functions.length;k+=1)a=c.functions[k],l.push("<br><div class=function><i>"+a.line+"-"+a.last+"</i> "+(a.name||"")+"("+(a.param?a.param.join(", "):"")+")</div>"),b("<big><b>Unused</b></big>",a.unused),b("Closure",a.closure),b("Variable",a["var"]),b("Exception",a.exception),b("Outer",a.outer),b("Global",a.global),b("Label",a.label);if(c.member){f=mb(c.member);
if(f.length){f=f.sort();h="<br><pre id=members>/*members ";i=10;for(k=0;k<f.length;k+=1)a=f[k],j=a.name(),i+j.length>72&&(l.push(h+"<br>"),h="    ",i=1),i+=j.length+2,c.member[a]===1&&(j="<i>"+j+"</i>"),k<f.length-1&&(j+=", "),h+=j;l.push(h+"<br>*/</pre>")}l.push("</div>")}}return l.join("")};Z.jslint=Z;Z.edition="2010-04-06";return Z}();define("orion/jslintworker",function(){});
define("domReady",[],function(){function j(){if(!f){f=!0;A&&clearInterval(A);var c=t;if(f&&c.length){t=[];var b;for(b=0;b<c.length;b+=1)c[b](l)}}}function x(c){f?c(l):t.push(c);return x}var I,K,A,c=typeof window!=="undefined"&&window.document,f=!c,l=c?document:null,t=[];if(c){if(document.addEventListener)document.addEventListener("DOMContentLoaded",j,!1),window.addEventListener("load",j,!1);else if(window.attachEvent){window.attachEvent("onload",j);K=document.createElement("div");try{I=window.frameElement===
null}catch(o){}K.doScroll&&I&&window.external&&(A=setInterval(function(){try{K.doScroll(),j()}catch(c){}},30))}document.readyState==="complete"&&j()}x.version="2.0.1";x.load=function(c,b,f,l){l.isBuild?f(null):x(f)};return x});
define('built-jslintPlugin.js',["orion/plugin","orion/jslintworker","domReady!"],function(j){function x(j){JSLINT(j,K);return JSLINT.data()}function I(j){function c(c,l,t){for(var o=j.description,s=0;s<c.length;s++){var b=c[s],p=typeof b==="string"?null:b[1],b=o.indexOf(typeof b==="string"?b:b[0])!==-1;if(t||b)j.severity=l;if(b&&p)j.description=p}}c([["Expected '{'","Statement body should be inside '{ }' braces."]],"warning",!0);c("Missing semicolon;Extra comma;Missing property name;Unmatched ; and instead saw; is not defined;Unclosed string;Stopping, unable to continue".split(";"),
"error");return function(){for(var c=["Dangerous comment"],l=j.description,t=0;t<c.length;t++)if(l.indexOf(c[t])!==-1)return!0;return!1}(j)?null:j}var K={bitwise:!1,eqeqeq:!0,es5:!0,immed:!0,indent:1,maxerr:300,newcap:!0,nomen:!1,onevar:!1,plusplus:!1,regexp:!0,strict:!1,undef:!0,white:!1},j=new j({name:"Orion JSLint Service",version:"1.0",description:"This plugin provides JSLint functionality for outlining and validating JavaScript code."});j.registerService(["orion.edit.validator","orion.cm.managedservice"],
{updated:function(j){if(j&&typeof j.options==="string"&&(j=j.options,!/^\s*$/.test(j))){var c={};j.split(/,/).forEach(function(f){var j=/\s*(\w+)\s*:\s*(\w+)\s*/.exec(f);j===null?console.log("JSLINT ignoring bad option: "+f):c[j[1]]=j[2]});Object.keys(c).length>0&&(K=c,console.log("JSLINT using custom options: "+Object.keys(K).map(function(f){return f+":"+c[f]}).join(",")))}},checkSyntax:function(j,c){var f=x(c),l=[],t;if(f.errors){var o=f.errors;for(t=0;t<o.length;t++){var s=o[t];if(s){var b=s.character-
1,p=b+1;s.evidence&&(b=s.evidence.substring(b).search(/.\b/),b>-1&&(p+=b));s.description=s.reason;s.start=s.character;s.end=p;(s=I(s))&&l.push(s)}}}if(f.functions){var f=f.functions,z;for(t=0;t<f.length;t++)if(o=f[t],(s=o.unused)&&s.length!==0){z||(z=c.split(/\r?\n/));for(var b=(p=o.name[0]==='"')?o.name.substring(1,o.name.length-1):o.name,C=z[o.line-1],w=0;w<s.length;w++){var J=C.indexOf(b),J=p?C.indexOf("function",J):C.lastIndexOf("function",J);J!==-1&&l.push({reason:"Function declares unused variable '"+
s[w]+"'.",line:o.line,character:J+1,end:J+8,severity:"warning"})}}}return{problems:l}}},{contentType:["application/javascript","text/html"],pid:"jslint.config"});j.registerService("orion.edit.outliner",{getOutline:function(j,c){if(/\.js$/.test(c)){var f=[],l=x(j).functions,t;for(t in l){var o=l[t],s=o.name;if(s[0]==='"')o.name=s=s.substring(1,s.length-1);s+="(";if(o.param){var b=[],p;for(p in o.param)b.push(o.param[p]);s+=b.join(",")}s+=")";f.push({label:s,children:null,line:o.line,text:o.name})}return f}else if(/\.html?$/.test(c)){f=
[];for(l=/id=['"]\S*["']/gi;(o=l.exec(j))!==null;)t=o.index,o=o[0],o[0]==="<"?(o="&lt;"+o.substring(1)+"&gt;",t+=1):(t+=4,o=o.substring(4,o.length-1)),f.push({label:o,children:null,start:t,end:t+o.length});return f}}},{contentType:["application/javascript","text/html"],nameKey:"Flat outline",nls:"orion/editor/nls/messages",id:"orion.edit.outliner.jslint"});j.registerService("orion.core.setting",{},{settings:[{pid:"jslint.config",name:"JSLint Validator",tags:"validation javascript js jslint".split(" "),
category:"validation",properties:[{id:"options",name:"Default Options",type:"string"}]}]});j.connect()});