/*******************************************************************************
 * @license
 * Copyright (c) 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
 ******************************************************************************/

/*******************************************************************************
 * @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
 * Copyright (c) 2013 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2013 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) 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

 Copyright (c) 2013 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) 2010, 2013 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(u,y){typeof define==="function"&&define.amd?define("orion/Deferred",y):typeof exports==="object"?module.exports=y():(u.orion=u.orion||{},u.orion.Deferred=y())})(this,function(){function u(){for(var j;j=D.shift();)j();c=!1}function y(j){D.push(j);c||(c=!0,setTimeout(u,0))}function A(c){return function(){c.apply(void 0,arguments)}}function F(){function c(){for(var s;s=d.shift();){var f=s.deferred,i=b==="fulfilled"?"resolve":"reject";if(typeof s[i]==="function")try{var j=(0,s[i])(p),o=j&&(typeof j===
"object"||typeof j==="function")&&j.then;if(typeof o==="function")if(j===f.promise)f.reject(new TypeError);else{var v=j.cancel;typeof v==="function"?f._protected(D).parentCancel=v.bind(j):delete f._protected(D).parentCancel;o.call(j,A(f.resolve),A(f.reject),A(f.progress))}else f.resolve(j)}catch(B){f.reject(B)}else f[i](p)}}function f(s){delete o.parentCancel;b="rejected";p=s;d.length&&y(c)}function v(s){function B(b){return function(c){q||(q=!0,b(c))}}var q=!1;delete o.parentCancel;try{var u=s&&
(typeof s==="object"||typeof s==="function")&&s.then;if(typeof u==="function")if(s===i)f(new TypeError);else{b="assumed";var A=s&&s.cancel;if(typeof A!=="function"){var E=new F,s=E.promise;try{u(E.resolve,E.reject,E.progress)}catch(z){E.reject(z)}A=s.cancel;u=s.then}p=s;u.call(s,B(v),B(f));o.parentCancel=A.bind(s)}else b="fulfilled",p=s,d.length&&y(c)}catch(T){B(f)(T)}}function B(){var c=o.parentCancel;if(c)delete o.parentCancel,c();else if(!b)c=Error("Cancel"),c.name="Cancel",f(c)}var p,b,d=[],i=
this,o={};Object.defineProperty(this,"_protected",{value:function(b){if(b!==D)throw Error("protected");return o}});this.resolve=function(c){b||v(c);return i};this.reject=function(c){b||f(c);return i};this.progress=function(c){b||d.forEach(function(b){if(b.progress)try{b.progress(c)}catch(f){}});return i.promise};this.cancel=function(){o.parentCancel?setTimeout(B,0):B();return i};this.then=function(f,o,p){f={resolve:f,reject:o,progress:p,deferred:new F};d.push(f);f.deferred._protected(D).parentCancel=
i.promise.cancel.bind(i);(b==="fulfilled"||b==="rejected")&&y(c);return f.deferred.promise};this.promise={then:i.then,cancel:i.cancel}}var D=[],c=!1;F.all=function(c,f){function v(c,f){d||(b[c]=f,--p===0&&i.resolve(b))}function B(b,c){if(!d){if(f)try{v(b,f(c));return}catch(j){c=j}i.reject(c)}}var p=c.length,b=[],d=!1,i=new F;i.then(void 0,function(){d=!0;c.forEach(function(b){b.cancel&&b.cancel()})});p===0?i.resolve(b):c.forEach(function(b,c){b.then(v.bind(void 0,c),B.bind(void 0,c))});return i.promise};
F.when=function(c,f,v,B){var p;if(!(c&&typeof c.then==="function"))p=new F,p.resolve(c),c=p.promise;return c.then(f,v,B)};return F});
(function(u,y){typeof define==="function"&&define.amd?define("orion/plugin",["orion/Deferred"],y):typeof exports==="object"?module.exports=y(require("orion/Deferred")):(u.orion=u.orion||{},u.orion.PluginProvider=y(u.orion.Deferred))})(this,function(u){function y(y,u){this.__objectId=y;this.__methods=u}return function(A){function F(b){i&&(typeof ArrayBuffer==="undefined"&&(b=JSON.stringify(b)),i===self?i.postMessage(b):i.postMessage(b,"*"))}function D(){var c=[];Object.keys(E).forEach(function(b){var f=
E[b];c.push({serviceId:b,names:f.names,methods:f.methods,properties:f.properties})});return{headers:b||{},services:c}}function c(b,c){if(c&&c instanceof XMLHttpRequest){var f,d;try{f=c.status,d=c.statusText}catch(i){f=0,d=""}return{status:f||0,statusText:d}}return c}function j(b){var f=b?JSON.parse(JSON.stringify(b,c)):b;if(b instanceof Error)f.__isError=!0,f.message=f.message||b.message,f.name=f.name||b.name;return f}function f(b){if(!i)return(new u).reject(Error("plugin not connected"));b.id=String(o++);
var c=new u;Q[b.id]=c;c.then(null,function(c){d&&c instanceof Error&&c.name==="Cancel"&&z({requestId:b.id,method:"cancel",params:c.message?[c.message]:[]})});var f=Object.prototype.toString;b.params.forEach(function(d,i){if(f.call(d)==="[object Object]"&&!(d instanceof y)){var j,o;for(j in d)f.call(d[j])==="[object Function]"&&(o=o||[],o.push(j));if(o){var p=s++;L[p]=d;j=function(){delete L[p]};c.then(j,j);b.params[i]=new y(p,o)}}});z(b);return c.promise}function v(b,c){b||b===0?z({id:b,result:null,
error:c}):console.log(c)}function B(b,c,d,i){i.forEach(function(b,c){if(b&&typeof b.__objectId!=="undefined"){var d={};b.__methods.forEach(function(c){d[c]=function(){return f({objectId:b.__objectId,method:c,params:Array.prototype.slice.call(arguments)})}});i[c]=d}});var s=typeof b===void 0?null:{id:b,result:null,error:null};try{var o=d.apply(c,i);if(s)o&&typeof o.then==="function"?(q[b]=o,o.then(function(c){delete q[b];s.result=c;z(s)},function(c){if(q[b])delete q[b],s.error=j(c),z(s)},function(){z({responseId:b,
method:"progress",params:Array.prototype.slice.call(arguments)})})):(s.result=o,z(s))}catch(p){if(s)s.error=j(p),z(s)}}function p(b){if(b.source===i){b=typeof b.data!=="string"?b.data:JSON.parse(b.data);try{if(b.method){var c=b.method,f=b.params||[];if("serviceId"in b){var d=E[b.serviceId];d||v(b.id,"service not found");d=d.implementation;c in d?B(b.id,d,d[c],f):v(b.id,"method not found")}else if("objectId"in b){var j=L[b.objectId];j||v(b.id,"object not found");!c in j?B(b.id,j,j[c],f):v(b.id,"method not found")}else if("requestId"in
b){var s=q[b.requestId];s&&c==="cancel"&&s.cancel&&s.cancel.apply(s,f)}else if("responseId"in b){var o=Q[b.responseId];o&&c==="progress"&&o.progress&&o.progress.apply(o,f)}else throw Error("Bad method: "+b.method);}else{var p=Q[String(b.id)];delete Q[String(b.id)];b.error?p.reject(b.error):p.resolve(b.result)}}catch(y){console.log("Plugin._messageHandler "+y)}}}var b=A,d=!1,i=null,o=0,s=0,ua=0,q={},Q={},L={},E={},z=F;this.updateHeaders=function(c){if(d)throw Error("Cannot update headers. Plugin Provider is connected");
b=c};this.registerServiceProvider=this.registerService=function(b,c,f){if(d)throw Error("Cannot register service. Plugin Provider is connected");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var i=null,j=[];for(i in c)typeof c[i]==="function"&&j.push(i);E[ua++]={names:b,methods:j,implementation:c,properties:f||{},listeners:{}}};this.connect=function(b,c){if(!d){if(typeof window==="undefined")i=self;else if(window!==window.parent)i=window.parent;else if(window.opener!==null)i=window.opener;else{c&&
c("No valid plugin target");return}addEventListener("message",p,!1);var f={method:"plugin",params:[D()]};F(f);d=!0}b&&b()};this.disconnect=function(){d&&(removeEventListener("message",p),i=null,d=!1)}}});if(!this.JSON)this.JSON={};
(function(){function u(c){return c<10?"0"+c:c}function y(c){D.lastIndex=0;return D.test(c)?'"'+c.replace(D,function(c){var b=f[c];return typeof b==="string"?b:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function A(f,p){var b,d,i,o,s=c,u,q=p[f];q&&typeof q==="object"&&typeof q.toJSON==="function"&&(q=q.toJSON(f));typeof v==="function"&&(q=v.call(p,f,q));switch(typeof q){case "string":return y(q);case "number":return isFinite(q)?String(q):"null";case "boolean":case "null":return String(q);
case "object":if(!q)return"null";c+=j;u=[];if(Object.prototype.toString.apply(q)==="[object Array]"){o=q.length;for(b=0;b<o;b+=1)u[b]=A(b,q)||"null";i=u.length===0?"[]":c?"[\n"+c+u.join(",\n"+c)+"\n"+s+"]":"["+u.join(",")+"]";c=s;return i}if(v&&typeof v==="object"){o=v.length;for(b=0;b<o;b+=1)d=v[b],typeof d==="string"&&(i=A(d,q))&&u.push(y(d)+(c?": ":":")+i)}else for(d in q)Object.hasOwnProperty.call(q,d)&&(i=A(d,q))&&u.push(y(d)+(c?": ":":")+i);i=u.length===0?"{}":c?"{\n"+c+u.join(",\n"+c)+"\n"+
s+"}":"{"+u.join(",")+"}";c=s;return i}}if(typeof Date.prototype.toJSON!=="function")Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+u(this.getUTCMonth()+1)+"-"+u(this.getUTCDate())+"T"+u(this.getUTCHours())+":"+u(this.getUTCMinutes())+":"+u(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()};var F=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
D=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c,j,f={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},v;if(typeof JSON.stringify!=="function")JSON.stringify=function(f,p,b){var d;j=c="";if(typeof b==="number")for(d=0;d<b;d+=1)j+=" ";else typeof b==="string"&&(j=b);if((v=p)&&typeof p!=="function"&&(typeof p!=="object"||typeof p.length!=="number"))throw Error("JSON.stringify");return A("",
{"":f})};if(typeof JSON.parse!=="function")JSON.parse=function(c,f){function b(c,d){var j,v,q=c[d];if(q&&typeof q==="object")for(j in q)Object.hasOwnProperty.call(q,j)&&(v=b(q,j),v!==void 0?q[j]=v:delete q[j]);return f.call(c,d,q)}var d,c=String(c);F.lastIndex=0;F.test(c)&&(c=c.replace(F,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 d=eval("("+c+")"),typeof f==="function"?b({"":d},""):d;throw new SyntaxError("JSON.parse");}})();
var JSLINT=function(){function u(){}function y(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function A(a,b){for(var e in b)y(b,e)&&(a[e]=b[e])}function F(){k.safe||(k.rhino&&A(H,ob),k.devel&&A(H,pb),k.browser&&A(H,qb),k.node&&A(H,rb),k.windows&&A(H,sb),k.widget&&A(H,tb))}function D(a,b,e){throw{name:"JSLintError",line:b,character:e,message:a+" ("+Math.floor(b/la.length*100)+"% scanned)."};}function c(h,b,e,c,xa,m){var f,b=b||a;b.id==="(end)"&&(b=g);f=b.line||0;b=b.from||0;e={id:"(error)",
raw:h,evidence:la[f-1]||"",line:f,character:b,a:e,b:c,c:xa,d:m};e.reason=h.supplant(e);JSLINT.errors.push(e);k.passfail&&D("Stopping. ",f,b);Ja+=1;Ja>=k.maxerr&&D("Too many errors.",f,b);return e}function j(a,b,e,x,g,f,k){return c(a,{line:b,from:e},x,g,f,k)}function f(a,b,e,x,g,f){a=c(a,b,e,x,g,f);D("Stopping, unable to continue.",a.line,a.character)}function v(a,b,e,c,g,m,k){return f(a,{line:b,from:e},c,g,m,k)}function B(h,b){k.safe&&n["(global)"]&&typeof H[h]!=="boolean"?c("ADsafe global: "+h+".",
g):h==="hasOwnProperty"&&c("'hasOwnProperty' is a really bad name.");y(n,h)&&!n["(global)"]&&c(n[h]===!0?"'{a}' was used before it was defined.":"'{a}' is already defined.",a,h);n[h]=b;n["(global)"]?(eb[h]=n,y(aa,h)&&(c("'{a}' was used before it was defined.",a,h),delete aa[h])):I[h]=n}function p(a){for(var a=a||0,b=0,e;b<=a;)(e=ya[b])||(e=ya[b]=W.token()),b+=1;return e}function b(h,b){switch(g.id){case "(number)":a.id==="."&&c("A dot following a number can be confused with a decimal point.",g);break;
case "-":(a.id==="-"||a.id==="--")&&c("Confusing minusses.");break;case "+":(a.id==="+"||a.id==="++")&&c("Confusing plusses.")}if(g.type==="(string)"||g.identifier)Ka=g.value;h&&a.id!==h&&(b?a.id==="(end)"?c("Unmatched '{a}'.",b,b.id):c("Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",a,h,b.id,b.line,a.value):(a.type!=="(identifier)"||a.value!==h)&&c("Expected '{a}' and instead saw '{b}'.",a,h,a.value));M=g;for(g=a;;){a=ya.shift()||W.token();if(a.id==="(end)"||a.id==="(error)")break;
if(a.type==="special"){var e=void 0,x=void 0,xa=void 0,m=a.value,d=e=void 0;switch(m){case "*/":f("Unbegun comment.");break;case "/*members":case "/*member":m="/*members";ba||(ba={});x=ba;break;case "/*jslint":k.safe&&c("ADsafe restriction.");x=k;xa=ub;break;case "/*global":k.safe&&c("ADsafe restriction."),x=H}e=W.token();a:for(;;){for(;;){if(e.type==="special"&&e.value==="*/")break a;if(e.id!=="(endline)"&&e.id!==",")break;e=W.token()}e.type!=="(string)"&&e.type!=="(identifier)"&&m!=="/*members"&&
f("Bad option.",e);d=W.token();d.id===":"?(d=W.token(),x===ba&&f("Expected '{a}' and instead saw '{b}'.",e,"*/",":"),e.value==="indent"&&m==="/*jslint"?(e=+d.value,(typeof e!=="number"||!isFinite(e)||e<=0||Math.floor(e)!==e)&&f("Expected a small integer and instead saw '{a}'.",d,d.value),x.white=!0,x.indent=e):e.value==="maxerr"&&m==="/*jslint"?(e=+d.value,(typeof e!=="number"||!isFinite(e)||e<=0||Math.floor(e)!==e)&&f("Expected a small integer and instead saw '{a}'.",d,d.value),x.maxerr=e):e.value===
"maxlen"&&m==="/*jslint"?(e=+d.value,(typeof e!=="number"||!isFinite(e)||e<=0||Math.floor(e)!==e)&&f("Expected a small integer and instead saw '{a}'.",d,d.value),x.maxlen=e):d.value==="true"?x[e.value]=!0:d.value==="false"?x[e.value]=!1:f("Bad option value.",d),e=W.token()):(m==="/*jslint"&&f("Missing option value.",e),x[e.value]=!1,e=d)}xa&&F()}else if(a.id!=="(endline)")break}}function d(h,l){var e;a.id==="(end)"&&f("Unexpected early end of program.",g);b();k.safe&&typeof H[g.value]==="boolean"&&
a.id!=="("&&a.id!=="."&&c("ADsafe violation.",g);if(l)Ka="anonymous",n["(verb)"]=g.value;if(l===!0&&g.fud)e=g.fud();else{if(g.nud)e=g.nud();else if(a.type==="(number)"&&g.id===".")return c("A leading decimal point can be confused with a dot: '.{a}'.",g,a.value),b(),g;else f("Expected an identifier and instead saw '{a}'.",g,g.id);for(;h<a.lbp;)b(),g.led?e=g.led(e):f("Expected an operator and instead saw '{a}'.",g,g.id)}return e}function i(b,l){b=b||g;l=l||a;(k.white||w==="styleproperty"||w==="style")&&
b.character!==l.from&&b.line===l.line&&c("Unexpected space after '{a}'.",l,b.value)}function o(b,c){b=b||g;c=c||a;k.white&&!b.comment&&b.line===c.line&&i(b,c)}function s(b,l){k.white&&(b=b||g,l=l||a,b.line===l.line&&b.character===l.from&&c("Missing space after '{a}'.",a,b.value))}function ua(b,l){b=b||g;l=l||a;!k.laxbreak&&b.line!==l.line?c("Bad line breaking before '{a}'.",l,l.id):k.white&&(b=b||g,l=l||a,b.character===l.from&&c("Missing space after '{a}'.",a,b.value))}function q(b){k.white&&a.id!==
"(end)"&&(b=J+(b||0),a.from!==b&&c("Expected '{a}' to have an indentation at {b} instead at {c}.",a,a.value,b,a.from))}function Q(b){b=b||g;b.line!==a.line&&c("Line breaking error '{a}'.",b,b.value)}function L(){g.line!==a.line?k.laxbreak||c("Bad line breaking before '{a}'.",g,a.id):g.character!==a.from&&k.white&&c("Unexpected space after '{a}'.",a,g.value);b(",");s(g,a)}function E(a,b){var e=O[a];if(!e||typeof e!=="object")O[a]=e={id:a,lbp:b,value:a};return e}function z(a){return E(a,0)}function T(a,
b){var e=z(a);e.identifier=e.reserved=!0;e.fud=b;return e}function ea(a,b){var e=T(a,b);e.block=!0;return e}function Ia(a){var b=a.id.charAt(0);if(b>="a"&&b<="z"||b>="A"&&b<="Z")a.identifier=a.reserved=!0;return a}function S(a,b){var e=E(a,150);Ia(e);e.nud=typeof b==="function"?b:function(){this.right=d(150);this.arity="unary";if(this.id==="++"||this.id==="--")k.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 e}function va(a,b){var e=z(a);e.type=a;e.nud=b;return e}function G(a,b){var e=va(a,b);e.identifier=e.reserved=!0;return e}function V(a){return G(a,function(){if(this.id==="this"||this.id==="arguments"||this.id==="eval")La&&n["(global)"]?c("Strict violation.",this):k.safe&&c("ADsafe violation.",this);return this})}function N(b,c,e,x){b=E(b,e);Ia(b);b.led=function(b){x||(ua(M,g),s(g,a));return typeof c==="function"?c(b,this):(this.left=b,this.right=d(e),
this)};return b}function $(b,l){var e=E(b,100);e.led=function(b){ua(M,g);s(g,a);var e=d(100);b&&b.id==="NaN"||e&&e.id==="NaN"?c("Use the isNaN function to compare with NaN.",this):l&&l.apply(this,[b,e]);b.id==="!"&&c("Confusing use of '{a}'.",b,"!");e.id==="!"&&c("Confusing use of '{a}'.",b,"!");this.left=b;this.right=e;return this};return e}function wa(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 fa(a){E(a,20).exps=!0;return N(a,function(a,b){var h;b.left=a;H[a.value]===!1&&I[a.value]["(global)"]===!0&&c("Read only.",a);if(k.safe){h=a;do typeof H[h.value]==="boolean"&&c("ADsafe violation.",h),h=h.left;while(h)}if(a){if(a.id==="."||a.id==="[")return(!a.left||a.left.value==="arguments")&&c("Bad assignment.",b),b.right=d(19),b;else if(a.identifier&&!a.reserved)return n[a.value]==="exception"&&c("Do not assign to the exception parameter.",a),b.right=d(19),b;a===O["function"]&&
c("Expected an identifier in an assignment and instead saw a function invocation.",g)}f("Bad assignment.",b)},20)}function ga(a,b,e){a=E(a,e);Ia(a);a.led=typeof b==="function"?b:function(a){k.bitwise&&c("Unexpected use of '{a}'.",this,this.id);this.left=a;this.right=d(e);return this};return a}function ha(b){E(b,20).exps=!0;return N(b,function(b,e){k.bitwise&&c("Unexpected use of '{a}'.",e,e.id);s(M,g);s(g,a);if(b){if(b.id==="."||b.id==="["||b.identifier&&!b.reserved)return d(19),e;b===O["function"]&&
c("Expected an identifier in an assignment, and instead saw a function invocation.",g);return e}f("Bad assignment.",e)},20)}function fb(a){a=E(a,150);a.led=function(a){k.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(),k.safe&&Na[g.value]?c("ADsafe violation: '{a}'.",g,g.value):g.reserved&&!k.es5&&c("Expected an identifier and instead saw '{a}' (a reserved word).",
g,g.id),g.value}function ma(){var b=Ma();if(b)return b;g.id==="function"&&a.id==="("?c("Missing name in function statement."):f("Expected an identifier and instead saw '{a}'.",a,a.value)}function za(b){var l=0,e;if(!(a.id!==";"||Oa))for(;;){e=p(l);if(e.reach)break;if(e.id!=="(endline)"){if(e.id==="function"){c("Inner functions should be listed at the top of the outer function.",e);break}c("Unreachable '{a}' after '{b}'.",e,e.value,b);break}l+=1}}function Pa(h){var l=J,e=I,x=a;if(x.id===";")c("Unnecessary semicolon.",
x),b(";");else{if(x.identifier&&!x.reserved&&p().id===":")b(),b(":"),I=Object.create(e),B(x.value,"label"),a.labelled||c("Label '{a}' on {b} statement.",a,x.value,a.value),Qa.test(x.value+":")&&c("Label '{a}' looks like a javascript url.",x,x.value),a.label=x.value,x=a;h||q();h=d(0,!0);x.block||(!h||!h.exps?c("Expected an assignment or function call and instead saw an expression.",g):h.id==="("&&h.left.id==="new"&&c("Do not use 'new' for side effects."),a.id!==";"?j("Missing semicolon.",g.line,g.from+
g.value.length):(i(g,a),b(";"),s(g,a)));J=l;I=e;return h}}function gb(){return a.value==="use strict"?(b(),b(";"),La=!0):!1}function na(h){var l=[],e;h&&!gb()&&k.strict&&c('Missing "use strict" statement.',a);if(k.adsafe)switch(h){case "script":ia||(a.value!=="ADSAFE"||p(0).id!=="."||p(1).value!=="id"&&p(1).value!=="go")&&f("ADsafe violation: Missing ADSAFE.id or ADSAFE.go.",a);a.value==="ADSAFE"&&p(0).id==="."&&p(1).value==="id"&&(ia&&f("ADsafe violation.",a),b("ADSAFE"),b("."),b("id"),b("("),a.value!==
R&&f("ADsafe violation: id does not match.",a),b("(string)"),b(")"),b(";"),ia=!0);break;case "lib":if(a.value==="ADSAFE")return b("ADSAFE"),b("."),b("lib"),b("("),b("(string)"),L(),h=d(0),h.id!=="function"&&f("The second argument to lib must be a function.",h),(e=(e=h.funct["(params)"])&&e.join(", "))&&e!=="lib"&&f("Expected '{a}' and instead saw '{b}'.",h,"(lib)","("+e+")"),b(")"),b(";"),l;else f("ADsafe lib violation.")}for(;!a.reach&&a.id!=="(end)";)a.id===";"?(c("Unnecessary semicolon."),b(";")):
l.push(Pa());return l}function U(h){var l,e=oa,x=J,f=I,m;oa=h;I=Object.create(I);s(g,a);m=a;if(a.id==="{"){b("{");if(a.id!=="}"||g.line!==a.line){for(J+=k.indent;!h&&a.from>J;)J+=k.indent;h||gb();l=na();J-=k.indent;q()}b("}",m);J=x}else c("Expected '{a}' and instead saw '{b}'.",a,"{",a.value),Oa=!0,l=[Pa()],Oa=!1;n["(verb)"]=null;I=f;oa=e;return l}function hb(){return this}function Aa(a){ba&&typeof ba[a]!=="boolean"&&c("Unexpected /*member '{a}'.",g,a);typeof ca[a]==="number"?ca[a]+=1:ca[a]=1}function Ra(a){var b=
a.value,a=a.line,e=aa[b];typeof e==="function"&&(e=!1);e?e[e.length-1]!==a&&e.push(a):(e=[a],aa[b]=e)}function Sa(){if(a.identifier)return b(),!0}function Ba(){a.id==="-"&&(b("-"),i(),Q());if(a.type==="(number)")return b("(number)"),!0}function Ta(){if(a.type==="(string)")return b(),!0}function X(){var h,l,e;if(a.identifier)if(e=a.value,e==="rgb"||e==="rgba"){b();b("(");for(h=0;h<3;h+=1)h&&b(","),l=a.value,a.type!=="(number)"||l<0?(c("Expected a positive number and instead saw '{a}'",a,l),b()):(b(),
a.id==="%"?(b("%"),l>100&&c("Expected a percentage and instead saw '{a}'",g,l)):l>255&&c("Expected a small number and instead saw '{a}'",g,l));e==="rgba"&&(b(","),l=+a.value,(a.type!=="(number)"||l<0||l>1)&&c("Expected a number between 0 and 1 and instead saw '{a}'",a,l),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 C(){a.id==="-"&&(b("-"),i(),Q());return a.type==="(number)"?(b(),a.type!==
"(string)"&&ib[a.value]===!0?(i(),b()):+g.value!==0&&c("Expected a linear unit and instead saw '{a}'.",a,a.value),!0):!1}function ja(){if(a.identifier)switch(a.value){case "thin":case "medium":case "thick":return b(),!0}else return C()}function pa(){if(a.identifier){if(a.value==="auto")return b(),!0}else return C()}function da(){var h,l;if(a.identifier&&a.value==="url"){a=W.range("(",")");l=a.value;h=l.charAt(0);if(h==='"'||h==="'")l.slice(-1)!==h?c("Bad url string."):(l=l.slice(1,-1),l.indexOf(h)>=
0&&c("Bad url string."));l||c("Missing url.");b();k.safe&&jb.test(l)&&f("ADsafe URL violation.");qa.push(l);return!0}return!1}function Ua(c){var l=0,e,g,f,m=0;switch(typeof c){case "function":return c();case "string":return a.identifier&&a.value===c?(b(),!0):!1}for(;;){if(l>=c.length)return!1;f=c[l];l+=1;if(f===!0)break;else typeof f==="number"?(e=f,f=c[l],l+=1):e=1;for(g=!1;e>0;)if(Ua(f))g=!0,e-=1;else break;if(g)return!0}m=l;for(e=[];;){f=!1;for(l=m;l<c.length;l+=1)if(!e[l]&&Ua(Ca[c[l]])){f=g=!0;
e[l]=!0;break}if(!f)return g}}function kb(){for(var h;;){if(a.id==="}"||a.id==="(end)"||P&&a.id===P)break;for(;a.id===";";)c("Misplaced ';'."),b(";");for(h=void 0;a.id==="*"||a.id==="#"||a.value==="_";)k.css||c("Unexpected '{a}'.",a,a.value),b();a.id==="-"?(k.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(),h=Va):(a.identifier?y(Ca,a.value)?h=Ca[a.value]:(h=Va,k.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(h)||(c("Unexpected token '{a}'.",a,a.value),b());a.id==="!"&&(b("!"),i(),a.identifier&&a.value==="important"?b():c("Expected '{a}' and instead saw '{b}'.",a,"important",a.value));a.id==="}"||a.id===P?c("Missing '{a}'.",a,";"):b(";")}}function Wa(){if(a.identifier)y(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&&(i(),b(),a.id==="+"&&(i(),b("+"),i(),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===":"&&p(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:f("Expected a CSS selector, and instead saw {a}.",a,a.value)}}function lb(){for(var h;a.id==="@";)if(h=p(),h.identifier&&
h.value==="import")b("@"),b(),da()||(c("Expected '{a}' and instead saw '{b}'.",a,"url",a.value),b()),b(";");else break;for(;a.id!=="</"&&a.id!=="(end)";){a:{h=void 0;if(a.id==="{")c("Expected a style pattern, and instead saw '{a}'.",a,a.id);else if(a.id==="@"){b("@");h=a.value;if(a.identifier&&wb[h]===!0){b();break a}c("Expected an at-rule, and instead saw @{a}.",a,h)}for(;;){Wa();if(a.id==="</"||a.id==="{"||a.id==="(end)")break a;a.id===","&&L()}}w="styleproperty";a.id===";"?b(";"):(b("{"),kb(),
w="style",b("}"))}}function Ya(){var c=Ma(!0);if(!c)a.id==="(string)"?(c=a.value,b()):a.id==="(number)"&&(c=a.value.toString(),b());return c}function Da(c){var l,e=I;I=Object.create(e);l=n={"(name)":c||'"'+Ka+'"',"(line)":a.line,"(context)":n,"(breakage)":0,"(loopage)":0,"(scope)":I};g.funct=n;ra.push(n);c&&B(c,"function");var c=n,f;a:{var k,m=a,d=[];b("(");o();if(a.id===")")b(")"),o(M,g),f=void 0;else for(;;)if(k=ma(),d.push(k),B(k,"parameter"),a.id===",")L();else{b(")",m);o(M,g);f=d;break a}}c["(params)"]=
f;U(!1);I=e;n["(last)"]=g.line;n=n["(context)"];return l}function Za(h){var l,e;n["(onevar)"]&&k.onevar?c("Too many var statements."):n["(global)"]||(n["(onevar)"]=!0);for(this.first=[];;){s(g,a);l=ma();n["(global)"]&&H[l]===!1&&c("Redefinition of '{a}'.",g,l);B(l,"unused");if(h)break;e=g;this.first.push(g);if(a.id==="=")s(g,a),b("="),s(g,a),a.id==="undefined"&&c("It is not necessary to initialize '{a}' to 'undefined'.",g,l),p(0).id==="="&&a.identifier&&f("Variable {a} was not declared correctly.",
a,a.value),l=d(0),e.first=l;if(a.id!==",")break;L()}return this}function $a(){function h(){var e={},h=a;b("{");if(a.id!=="}")for(;;){if(a.id==="(end)")f("Missing '}' to match '{' from line {a}.",a,h.line);else if(a.id==="}"){c("Unexpected comma.",g);break}else a.id===","?f("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 l(){var e=a;b("[");if(a.id!=="]")for(;;){if(a.id==="(end)")f("Missing ']' to match '[' from line {a}.",a,e.line);else if(a.id==="]"){c("Unexpected comma.",g);break}else a.id===","&&f("Unexpected comma.",a);$a();if(a.id!==",")break;b(",")}b("]")}switch(a.id){case "{":h();break;case "[":l();break;case "true":case "false":case "null":case "(number)":case "(string)":b();break;case "-":b("-");g.character!==a.from&&c("Unexpected space after '-'.",g);i(g,a);
b("(number)");break;default:f("Expected a JSON value.",a)}}function mb(a){var b=[],c;for(c in a)y(a,c)&&b.push(c);return b}var R,ia,sa,Ka,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",'"':'\\"',"/":"\\/","\\":"\\\\"},n,ta="closure,exception,global,label,outer,unused,var".split(","),ra,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,oa,J,ka,la,ya,ca,ba,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,k,H,bb,M,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},I,sb={ActiveXObject:!1,CScript:!1,Debug:!1,Enumerator:!1,System:!1,VBArray:!1,WScript:!1},Ha,K,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,O={},cb,g,qa,Ja,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},w,P,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){u.prototype=a;return new u};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,c){var g=a[c];return typeof g==="string"||typeof g==="number"?g: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 W=function(){function a(){var b;if(d>=la.length)return!1;c=1;m=la[d];d+=1;b=m.search(/ \t/);b>=0&&j("Mixed spaces and tabs.",d,b+1);m=m.replace(/\t/g,cb);b=m.search(Bb);b>=0&&j("Unsafe character.",d,b);k.maxlen&&k.maxlen<m.length&&j("Line too long.",d,m.length);return!0}function b(a,h){var l,g;g=a==="(color)"?{type:a}:
a==="(punctuator)"||a==="(identifier)"&&y(O,h)?O[h]||O["(error)"]:O[a];g=Object.create(g);(a==="(string)"||a==="(range)")&&Qa.test(h)&&j("Script URL.",d,f);if(a==="(identifier)")g.identifier=!0,h==="__iterator__"||h==="__proto__"?v("Reserved name '{a}'.",d,f,h):k.nomen&&(h.charAt(0)==="_"||h.charAt(h.length-1)==="_")&&j("Unexpected {a} in '{b}'.",d,f,"dangling '_'",h);g.value=h;g.line=d;g.character=c;g.from=f;l=g.id;l!=="(endline)"&&(bb=l&&("(,=:[!&|?{};".indexOf(l.charAt(l.length-1))>=0||l==="return"));
return g}var c,f,d,m;return{init:function(b){la=typeof b==="string"?b.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n"):b;d=0;a();f=1},range:function(a,h){var g,k="";f=c;for(m.charAt(0)!==a&&v("Expected '{a}' and instead saw '{b}'.",d,c,a,m.charAt(0));;){m=m.slice(1);c+=1;g=m.charAt(0);switch(g){case "":v("Missing '{a}'.",d,c,g);break;case h:return m=m.slice(1),c+=1,b("(range)",k);case P:case "\\":j("Unexpected '{a}'.",d,c,g)}k+=g}},token:function(){function i(a){if(a=a.exec(m))return t=a[0].length,
a=a[1],r=a.charAt(0),m=m.substr(t),f=c+t-a.length,c+=t,a}function s(g){function p(a){var b=parseInt(m.substr(n+1,a),16);n+=a;b>=32&&b<=126&&b!==34&&b!==92&&b!==39&&j("Unnecessary escapement.",d,c);c+=a;i=String.fromCharCode(b)}var i,n,o="";ka&&g!=='"'&&j("Strings must use doublequote.",d,c);if(P===g||w==="scriptstring"&&!P)return b("(punctuator)",g);for(n=0;;){for(;n>=m.length;)n=0,(w!=="html"||!a())&&v("Unclosed string.",d,f);i=m.charAt(n);if(i===g)return c+=1,m=m.substr(n+1),b("(string)",o,g);if(i<
" "){if(i==="\n"||i==="\r")break;j("Control character in string: {a}.",d,c+n,m.slice(0,n))}else if(i===P)j("Bad HTML string",d,c+n);else if(i==="<")k.safe&&w==="html"?j("ADsafe string violation.",d,c+n):m.charAt(n+1)==="/"&&(w||k.safe)?j("Expected '<\\/' and instead saw '</'.",d,c):m.charAt(n+1)==="!"&&(w||k.safe)&&j("Unexpected '<!' in a string.",d,c);else if(i==="\\")if(w==="html")k.safe&&j("ADsafe string violation.",d,c+n);else if(w==="styleproperty")n+=1,c+=1,i=m.charAt(n),i!==g&&j("Escapement in style string.",
d,c+n);else switch(n+=1,c+=1,i=m.charAt(n),i){case P:j("Bad HTML string",d,c+n);break;case "\\":case "'":case '"':case "/":break;case "b":i="\u0008";break;case "f":i="\u000c";break;case "n":i="\n";break;case "r":i="\r";break;case "t":i="\t";break;case "u":p(4);break;case "v":i="\u000b";break;case "x":ka&&j("Avoid \\x-.",d,c);p(2);break;default:j("Bad escapement.",d,c)}o+=i;c+=1;n+=1}}for(var o,r,p,n,t,q;;){if(!m)return b(a()?"(endline)":"(end)","");for(;w==="outer";)if(n=m.search(Fb),n===0)break;
else if(n>0){c+=1;m=m.slice(n);break}else if(!a())return b("(end)","");if(p=i(Jb[w]||Cb)){if(r.isAlpha()||r==="_"||r==="$")return b("(identifier)",p);if(r.isDigit())return w!=="style"&&!isFinite(Number(p))&&j("Bad number '{a}'.",d,c,p),w!=="style"&&w!=="styleproperty"&&m.substr(0,1).isAlpha()&&j("Missing space after '{a}'.",d,c,p),r==="0"&&(n=p.substr(1,1),n.isDigit()?g.id!=="."&&w!=="styleproperty"&&j("Don't use extra leading zeros '{a}'.",d,c,p):ka&&(n==="x"||n==="X")&&j("Avoid 0x-. '{a}'.",d,c,
p)),p.substr(p.length-1)==="."&&j("A trailing decimal point can be confused with a dot '{a}'.",d,c,p),b("(number)",p);switch(p){case '"':case "'":return s(p);case "//":Ha||w&&w!=="script"?j("Unexpected comment.",d,c):w==="script"&&/<\s*\//i.test(m)?j("Unexpected </ in comment.",d,c):(k.safe||w==="script")&&db.test(m)&&j("Dangerous comment.",d,c);m="";g.comment=!0;break;case "/*":(Ha||w&&w!=="script"&&w!=="style"&&w!=="styleproperty")&&j("Unexpected comment.",d,c);for(k.safe&&db.test(m)&&j("ADsafe comment violation.",
d,c);;){n=m.search(Gb);if(n>=0)break;a()?k.safe&&db.test(m)&&j("ADsafe comment violation.",d,c):v("Unclosed comment.",d,c)}c+=n+2;m.substr(n,1)==="/"&&v("Nested comment.",d,c);m=m.substr(n+2);g.comment=!0;break;case "/*members":case "/*member":case "/*jslint":case "/*global":case "*/":return{value:p,type:"special",line:d,character:c,from:f};case "":break;case "/":g.id==="/="&&v("A regular expression literal can be confused with '/='.",d,f);if(bb){for(t=p=n=0;;){o=!0;r=m.charAt(t);t+=1;switch(r){case "":v("Unclosed regular expression.",
d,f);return;case "/":n>0&&j("Unescaped '{a}'.",d,f+t,"/");r=m.substr(0,t-1);for(q={g:!0,i:!0,m:!0};q[m.charAt(t)]===!0;)q[m.charAt(t)]=!1,t+=1;c+=t;m=m.substr(t);q=m.charAt(0);(q==="/"||q==="*")&&v("Confusing regular expression.",d,f);return b("(regexp)",r);case "\\":r=m.charAt(t);r<" "?j("Unexpected control character in regular expression.",d,f+t):r==="<"&&j("Unexpected escaped character '{a}' in regular expression.",d,f+t,r);t+=1;break;case "(":n+=1;o=!1;if(m.charAt(t)==="?")switch(t+=1,m.charAt(t)){case ":":case "=":case "!":t+=
1;break;default:j("Expected '{a}' and instead saw '{b}'.",d,f+t,":",m.charAt(t))}else p+=1;break;case "|":o=!1;break;case ")":n===0?j("Unescaped '{a}'.",d,f+t,")"):n-=1;break;case " ":for(q=1;m.charAt(t)===" ";)t+=1,q+=1;q>1&&j("Spaces are hard to count. Use {{a}}.",d,f+t,q);break;case "[":r=m.charAt(t);r==="^"&&(t+=1,k.regexp&&j("Insecure '{a}'.",d,f+t,r));q=!1;r==="]"&&(j("Empty class.",d,f+t-1),q=!0);a:do switch(r=m.charAt(t),t+=1,r){case "[":case "^":j("Unescaped '{a}'.",d,f+t,r);q=!0;break;case "-":q?
q=!1:(j("Unescaped '{a}'.",d,f+t,"-"),q=!0);break;case "]":q||j("Unescaped '{a}'.",d,f+t-1,"-");break a;case "\\":r=m.charAt(t);r<" "?j("Unexpected control character in regular expression.",d,f+t):r==="<"&&j("Unexpected escaped character '{a}' in regular expression.",d,f+t,r);t+=1;q=!0;break;case "/":j("Unescaped '{a}'.",d,f+t-1,"/");q=!0;break;case "<":w==="script"&&(r=m.charAt(t),(r==="!"||r==="/")&&j("HTML confusion in regular expression '<{a}'.",d,f+t,r));q=!0;break;default:q=!0}while(r);break;
case ".":k.regexp&&j("Insecure '{a}'.",d,f+t,r);break;case "]":case "?":case "{":case "}":case "+":case "*":j("Unescaped '{a}'.",d,f+t,r);break;case "<":w==="script"&&(r=m.charAt(t),(r==="!"||r==="/")&&j("HTML confusion in regular expression '<{a}'.",d,f+t,r))}if(o)switch(m.charAt(t)){case "?":case "+":case "*":t+=1;m.charAt(t)==="?"&&(t+=1);break;case "{":t+=1;r=m.charAt(t);(r<"0"||r>"9")&&j("Expected a number and instead saw '{a}'.",d,f+t,r);t+=1;for(q=+r;;){r=m.charAt(t);if(r<"0"||r>"9")break;
t+=1;q=+r+q*10}o=q;if(r===","&&(t+=1,o=Infinity,r=m.charAt(t),r>="0"&&r<="9")){t+=1;for(o=+r;;){r=m.charAt(t);if(r<"0"||r>"9")break;t+=1;o=+r+o*10}}m.charAt(t)!=="}"?j("Expected '{a}' and instead saw '{b}'.",d,f+t,"}",r):t+=1;m.charAt(t)==="?"&&(t+=1);q>o&&j("'{a}' should not be greater than '{b}'.",d,f+t,q,o)}}r=m.substr(0,t-1);c+=t;m=m.substr(t);return b("(regexp)",r)}return b("(punctuator)",p);case "<\!--":t=d;for(r=c;;){n=m.indexOf("--");if(n>=0)break;n=m.indexOf("<!");n>=0&&v("Nested HTML comment.",
d,c+n);a()||v("Unclosed HTML comment.",t,r)}t=m.indexOf("<!");t>=0&&t<n&&v("Nested HTML comment.",d,c+t);c+=n;m[n+2]!==">"&&v("Expected --\>.",d,c);c+=3;m=m.slice(n+3);break;case "#":if(w==="html"||w==="styleproperty"){for(;;){r=m.charAt(0);if((r<"0"||r>"9")&&(r<"a"||r>"f")&&(r<"A"||r>"F"))break;c+=1;m=m.substr(1);p+=r}p.length!==4&&p.length!==7&&j("Bad hex color '{a}'.",d,f+t,p);return b("(color)",p)}return b("(punctuator)",p);default:if(w==="outer"&&r==="&"){c+=1;for(m=m.substr(1);;){r=m.charAt(0);
c+=1;m=m.substr(1);if(r===";")break;r>="0"&&r<="9"||r>="a"&&r<="z"||r==="#"||v("Bad entity",d,f+t,c)}break}return b("(punctuator)",p)}}else{for(r=p="";m&&m<"!";)m=m.substr(1);if(m)if(w==="html")return p=m.charAt(0),m=m.substr(1),b("(error)",p);else v("Unexpected '{a}'.",d,c,m.substr(0,1))}}}}}();Va=[da,function(){for(;;)if(a.identifier)switch(a.value.toLowerCase()){case "url":da();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",da],"background-position":[2,[C,"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":ja,"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":ja,
"border-right":[!0,"border-right-color","border-right-style","border-right-width"],"border-right-color":X,"border-right-style":Y,"border-right-width":ja,"border-spacing":[2,C],"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":ja,"border-width":[4,ja],bottom:[C,"auto"],"caption-side":["bottom","left","right","top"],clear:["both","left","none","right"],clip:[function(){var h;if(a.identifier&&a.value===
"rect"){b();b("(");for(h=0;h<4;h+=1)if(!C()){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,da,function(){if(a.identifier&&a.value==="counter")return b(),b("("),b(),a.id===","&&(L(),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===","&&(L(),a.type!=="(string)"&&c("Expected a string and instead saw '{a}'.",a,a.value),b()),a.id===","&&(L(),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:[da,"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;L()}},"font-size":["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller",C],"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:[C,"auto"],left:[C,"auto"],"letter-spacing":["normal",C],"line-height":["normal",function(){a.id==="-"&&(b("-"),i());return a.type==="(number)"?(b(),a.type!=="(string)"&&ib[a.value]===!0&&(i(),b()),!0):!1}],"list-style":[!0,"list-style-image","list-style-position","list-style-type"],"list-style-image":["none",da],"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,pa],"margin-bottom":pa,"margin-left":pa,"margin-right":pa,"margin-top":pa,"marker-offset":[C,"auto"],"max-height":[C,"none"],"max-width":[C,"none"],"min-height":C,"min-width":C,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":ja,overflow:Fa,"overflow-x":Fa,"overflow-y":Fa,padding:[4,C],"padding-bottom":C,"padding-left":C,"padding-right":C,
"padding-top":C,"page-break-after":ab,"page-break-before":ab,position:["absolute","fixed","relative","static"],quotes:[8,Ta],right:[C,"auto"],"table-layout":["auto","fixed"],"text-align":["center","justify","left","right"],"text-decoration":["none","underline","overline","line-through","blink"],"text-indent":C,"text-shadow":["none",4,[X,C]],"text-transform":["capitalize","uppercase","lowercase","none"],top:[C,"auto"],"unicode-bidi":["normal","embed","bidi-override"],"vertical-align":["baseline","bottom",
"sub","super","top","text-top","middle","text-bottom",C],visibility:["visible","hidden","collapse"],"white-space":"normal,nowrap,pre,pre-line,pre-wrap,inherit".split(","),width:[C,"auto"],"word-spacing":["normal",C],"word-wrap":["break-word","normal"],"z-index":["auto",Ba]};va("(number)",hb);va("(string)",hb);O["(identifier)"]={type:"(identifier)",lbp:0,identifier:!0,nud:function(){var a=this.value,b=I[a],e;typeof b==="function"?b=void 0:typeof b==="boolean"&&(e=n,n=ra[0],B(a,"var"),b=n,n=e);if(n===
b)switch(n[a]){case "unused":n[a]="var";break;case "label":c("'{a}' is a statement label.",g,a)}else if(n["(global)"])k.undef&&H[a]!=="boolean"&&c("'{a}' is not defined.",g,a),Ra(g);else switch(n[a]){case "closure":case "function":case "var":case "unused":c("'{a}' used out of scope.",g,a);break;case "label":c("'{a}' is a statement label.",g,a);break;case "outer":case "global":break;default:if(b===!0)n[a]=!0;else if(b===null)c("'{a}' is not allowed.",g,a),Ra(g);else if(typeof b!=="object")k.undef?
c("'{a}' is not defined.",g,a):n[a]=!0,Ra(g);else switch(b[a]){case "function":case "var":case "unused":b[a]="closure";n[a]=b["(global)"]?"global":"outer";break;case "closure":case "parameter":n[a]=b["(global)"]?"global":"outer";break;case "label":c("'{a}' is a statement label.",g,a)}}return this},led:function(){f("Expected an operator and instead saw '{a}'.",a,a.value)}};va("(regexp)",function(){return this});z("(endline)");z("(begin)");z("(end)").reach=!0;z("</").reach=!0;z("<!");z("<\!--");z("--\>");
z("(error)").reach=!0;z("}").reach=!0;z(")");z("]");z('"').reach=!0;z("'").reach=!0;z(";");z(":").reach=!0;z(",");z("#");z("@");G("else");G("case").reach=!0;G("catch");G("default").reach=!0;G("finally");V("arguments");V("eval");V("false");V("Infinity");V("NaN");V("null");V("this");V("true");V("undefined");fa("=","assign",20);fa("+=","assignadd",20);fa("-=","assignsub",20);fa("*=","assignmult",20);fa("/=","assigndiv",20).nud=function(){f("A regular expression literal can be confused with '/='.")};
fa("%=","assignmod",20);ha("&=","assignbitand",20);ha("|=","assignbitor",20);ha("^=","assignbitxor",20);ha("<<=","assignshiftleft",20);ha(">>=","assignshiftright",20);ha(">>>=","assignshiftrightunsigned",20);N("?",function(a,c){c.left=a;c.right=d(10);b(":");c["else"]=d(10);return c},30);N("||","or",40);N("&&","and",50);ga("|","bitor",70);ga("^","bitxor",80);ga("&","bitand",90);$("==",function(a,b){k.eqeqeq?c("Expected '{a}' and instead saw '{b}'.",this,"===","=="):wa(a)?c("Use '{a}' to compare with '{b}'.",
this,"===",a.value):wa(b)&&c("Use '{a}' to compare with '{b}'.",this,"===",b.value);return this});$("===");$("!=",function(a,b){k.eqeqeq?c("Expected '{a}' and instead saw '{b}'.",this,"!==","!="):wa(a)?c("Use '{a}' to compare with '{b}'.",this,"!==",a.value):wa(b)&&c("Use '{a}' to compare with '{b}'.",this,"!==",b.value);return this});$("!==");$("<");$(">");$("<=");$(">=");ga("<<","shiftleft",120);ga(">>","shiftright",120);ga(">>>","shiftrightunsigned",120);N("in","in",120);N("instanceof","instanceof",
120);N("+",function(a,b){var e=d(130);if(a&&e&&a.id==="(string)"&&e.id==="(string)")return a.value+=e.value,a.character=e.character,Qa.test(a.value)&&c("JavaScript URL.",a),a;b.left=a;b.right=e;return b},130);S("+","num");N("-","sub",130);S("-","neg");N("*","mult",140);N("/","div",140);N("%","mod",140);fb("++","postinc");S("++","preinc");O["++"].exps=!0;fb("--","postdec");S("--","predec");O["--"].exps=!0;S("delete",function(){var b=d(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(){k.bitwise&&c("Unexpected '{a}'.",this,"~");d(150);return this});S("!",function(){this.right=d(150);this.arity="unary";xb[this.right.id]===!0&&c("Confusing use of '{a}'.",this,"!");return this});S("typeof","typeof");S("new",function(){var h=d(155),l;if(h&&h.id!=="function")if(h.identifier)switch(h["new"]=!0,h.value){case "Object":c("Use the object literal notation {}.",g);break;case "Array":return a.id!=="("?c("Use the array literal notation [].",
g):(b("("),a.id===")"?c("Use the array literal notation [].",g):(l=d(0),h.dimension=l,(l.id==="(number)"&&/[.+\-Ee]/.test(l.value)||l.id==="-"&&!l.right||l.id==="(string)"||l.id==="["||l.id==="{"||l.id==="true"||l.id==="false"||l.id==="null"||l.id==="undefined"||l.id==="Infinity")&&c("Use the array literal notation [].",g),a.id!==")"&&f("Use the array literal notation [].",g)),b(")")),this.first=h,this;case "Number":case "String":case "Boolean":case "Math":case "JSON":c("Do not use {a} as a constructor.",
g,h.value);break;case "Function":k.evil||c("The Function constructor is eval.");break;case "Date":case "RegExp":break;default:h.id!=="function"&&(l=h.value.substr(0,1),k.newcap&&(l<"A"||l>"Z")&&c("A constructor name should start with an uppercase letter.",g))}else h.id!=="."&&h.id!=="["&&h.id!=="("&&c("Bad constructor.",g);else c("Weird construction. Delete 'new'.",this);i(g,a);a.id!=="("&&c("Missing '()' invoking a constructor.");this.first=h;return this});O["new"].exps=!0;N(".",function(h,d){i(M,
g);var e=ma();typeof e==="string"&&Aa(e);d.left=h;d.right=e;!k.evil&&h&&h.value==="document"&&(e==="write"||e==="writeln")?c("document.write can be a form of eval.",h):k.adsafe&&h&&h.value==="ADSAFE"&&(e==="id"||e==="lib"?c("ADsafe violation.",d):e==="go"&&(w!=="script"?c("ADsafe violation.",d):(sa||a.id!=="("||p(0).id!=="(string)"||p(0).value!==R||p(1).id!==",")&&f("ADsafe violation: go.",d),sa=!0,ia=!1));if(!k.evil&&(e==="eval"||e==="execScript"))c("eval is evil.");else if(k.safe)for(;;){Na[e]===
!0&&c("ADsafe restricted word '{a}'.",g,e);if(typeof H[h.value]!=="boolean"||a.id==="(")break;if(Ab[e]===!0){a.id==="."&&c("ADsafe violation.",d);break}if(a.id!=="."){c("ADsafe violation.",d);break}b(".");g.left=d;g.right=e;d=g;e=ma();typeof e==="string"&&Aa(e)}return d},160,!0);N("(",function(h,f){i(M,g);o();var e=0,x=[];h&&(h.type==="(identifier)"?h.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&h.value!=="Number"&&h.value!=="String"&&h.value!=="Boolean"&&h.value!=="Date"&&(h.value===
"Math"?c("Math is not a function.",h):k.newcap&&c("Missing 'new' prefix when invoking a constructor.",h)):h.id==="."&&k.safe&&h.left.value==="Math"&&h.right==="random"&&c("ADsafe violation.",h));if(a.id!==")")for(;;){x[x.length]=d(10);e+=1;if(a.id!==",")break;L()}b(")");k.immed&&h.id==="function"&&a.id!==")"&&c("Wrap the entire immediate function invocation in parens.",f);o(M,g);typeof h==="object"&&(h.value==="parseInt"&&e===1&&c("Missing radix parameter.",h),k.evil||(h.value==="eval"||h.value===
"Function"||h.value==="execScript"?c("eval is evil.",h):x[0]&&x[0].id==="(string)"&&(h.value==="setTimeout"||h.value==="setInterval")&&c("Implied eval is evil. Pass a function instead of a string.",h)),!h.identifier&&h.id!=="."&&h.id!=="["&&h.id!=="("&&h.id!=="&&"&&h.id!=="||"&&h.id!=="?"&&c("Bad invocation.",h));f.left=h;return f},155,!0).exps=!0;S("(",function(){o();var h=d(0);b(")",this);o(M,g);k.immed&&h.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 h});N("[",function(a,f){o();var e=d(0),i;e&&e.type==="(string)"?(k.safe&&Na[e.value]===!0?c("ADsafe restricted word '{a}'.",f,e.value):!k.evil&&(e.value==="eval"||e.value==="execScript")?c("eval is evil.",f):k.safe&&(e.value.charAt(0)==="_"||e.value.charAt(0)==="-")&&c("ADsafe restricted subscript '{a}'.",f,e.value),Aa(e.value),!k.sub&&nb.test(e.value)&&(i=O[e.value],(!i||!i.reserved)&&c("['{a}'] is better written in dot notation.",
e,e.value))):(!e||e.type!=="(number)"||e.value<0)&&k.safe&&c("ADsafe subscripting.");b("]",f);o(M,g);f.left=a;f.right=e;return f},160,!0);S("[",function(){var h=g.line!==a.line;this.first=[];h&&(J+=k.indent,a.from===J+k.indent&&(J+=k.indent));for(;a.id!=="(end)";){for(;a.id===",";)c("Extra comma."),b(",");if(a.id==="]")break;h&&g.line!==a.line&&q();this.first.push(d(10));if(a.id===","){if(L(),a.id==="]"){c("Extra comma.",g);break}}else break}h&&(J-=k.indent,q());b("]",this);return this},160);(function(h){h.nud=
function(){var h,e,x,j,m={};if(h=g.line!==a.line)J+=k.indent,a.from===J+k.indent&&(J+=k.indent);for(;;){if(a.id==="}")break;h&&q();if(a.value==="get"&&p().id!==":")b("get"),k.es5||f("get/set are ES5 features."),(x=Ya())||f("Missing property name."),j=a,i(g,a),e=Da(x),n["(loopage)"]&&c("Don't make functions within a loop.",j),(e=e["(params)"])&&c("Unexpected parameter '{a}' in get {b} function.",j,e[0],x),i(g,a),b(","),q(),b("set"),j=Ya(),x!==j&&f("Expected {a} and instead saw {b}.",g,x,j),j=a,i(g,
a),e=Da(x),e=e["(params)"],(!e||e.length!==1||e[0]!=="value")&&c("Expected (value) in set {a} function.",j,x);else{x=Ya();if(typeof x!=="string")break;b(":");s(g,a);d(10)}m[x]===!0&&c("Duplicate member '{a}'.",a,x);m[x]=!0;Aa(x);if(a.id===",")L(),a.id===","?c("Extra comma.",g):a.id==="}"&&c("Extra comma.",g);else break}h&&(J-=k.indent,q());b("}",this);return this};h.fud=function(){f("Expected to see a statement and instead saw a block.",g)}})(z("{"));T("var",Za).exps=!0;ea("function",function(){oa&&
c("Function statements cannot be placed in blocks. Use a function expression or move the statement to the top of the outer function.",g);var b=ma();i(g,a);B(b,"unused");Da(b);a.id==="("&&a.line===g.line&&f("Function statements are not invocable. Wrap the whole function invocation in parens.");return this});S("function",function(){var b=Ma();b?i(g,a):s(g,a);Da(b);n["(loopage)"]&&c("Don't make functions within a loop.");return this});ea("if",function(){var h=a;b("(");s(this,h);o();d(20);a.id==="="&&
(c("Expected a conditional expression and instead saw an assignment."),b("="),d(20));b(")",h);o(M,g);U(!0);a.id==="else"&&(s(g,a),b("else"),a.id==="if"||a.id==="switch"?Pa(!0):U(!0));return this});ea("try",function(){var h,d;k.adsafe&&c("ADsafe try violation.",this);U(!1);if(a.id==="catch")b("catch"),s(g,a),b("("),d=I,I=Object.create(d),h=a.value,a.type!=="(identifier)"?c("Expected an identifier and instead saw '{a}'.",a,h):B(h,"exception"),b(),b(")"),U(!1),h=!0,I=d;if(a.id==="finally")b("finally"),
U(!1);else return h||f("Expected '{a}' and instead saw '{b}'.",a,"catch",a.value),this});ea("while",function(){var h=a;n["(breakage)"]+=1;n["(loopage)"]+=1;b("(");s(this,h);o();d(20);a.id==="="&&(c("Expected a conditional expression and instead saw an assignment."),b("="),d(20));b(")",h);o(M,g);U(!0);n["(breakage)"]-=1;n["(loopage)"]-=1;return this}).labelled=!0;G("with");ea("switch",function(){var h=a,l=!1;n["(breakage)"]+=1;b("(");s(this,h);o();this.condition=d(20);b(")",h);o(M,g);s(g,a);h=a;b("{");
s(g,a);J+=k.indent;for(this.cases=[];;)switch(a.id){case "case":switch(n["(verb)"]){case "break":case "case":case "continue":case "return":case "switch":case "throw":break;default:c("Expected a 'break' statement before 'case'.",g)}q(-k.indent);b("case");this.cases.push(d(20));l=!0;b(":");n["(verb)"]="case";break;case "default":switch(n["(verb)"]){case "break":case "continue":case "return":case "throw":break;default:c("Expected a 'break' statement before 'default'.",g)}q(-k.indent);b("default");l=
!0;b(":");break;case "}":J-=k.indent;q();b("}",h);(this.cases.length===1||this.condition.id==="true"||this.condition.id==="false")&&c("This 'switch' should be an 'if'.",this);n["(breakage)"]-=1;n["(verb)"]=void 0;return;case "(end)":f("Missing '{a}'.",a,"}");return;default:if(l)switch(g.id){case ",":f("Each value should have its own case label.");return;case ":":na();break;default:f("Missing ':' on a case clause.",g)}else f("Expected '{a}' and instead saw '{b}'.",a,"case",a.value)}}).labelled=!0;
T("debugger",function(){k.debug||c("All 'debugger' statements should be removed.");return this}).exps=!0;(function(){var h=T("do",function(){n["(breakage)"]+=1;n["(loopage)"]+=1;this.first=U(!0);b("while");var h=a;s(g,h);b("(");o();d(20);a.id==="="&&(c("Expected a conditional expression and instead saw an assignment."),b("="),d(20));b(")",h);o(M,g);n["(breakage)"]-=1;n["(loopage)"]-=1;return this});h.labelled=!0;h.exps=!0})();ea("for",function(){var h=k.forin,l;l=a;n["(breakage)"]+=1;n["(loopage)"]+=
1;b("(");s(this,l);o();if(p(a.id==="var"?1:0).id==="in"){if(a.id==="var")b("var"),Za(!0);else{switch(n[a.value]){case "unused":n[a.value]="var";break;case "var":break;default:c("Bad for in variable '{a}'.",a,a.value)}b()}b("in");d(20);b(")",l);l=U(!0);!h&&(l.length>1||typeof l[0]!=="object"||l[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(;;){d(0,"for");
if(a.id!==",")break;L()}Q(g);b(";");a.id!==";"&&(d(20),a.id==="="&&(c("Expected a conditional expression and instead saw an assignment."),b("="),d(20)));Q(g);b(";");a.id===";"&&f("Expected '{a}' and instead saw '{b}'.",a,")",";");if(a.id!==")")for(;;){d(0,"for");if(a.id!==",")break;L()}b(")",l);o(M,g);U(!0)}n["(breakage)"]-=1;n["(loopage)"]-=1;return this}).labelled=!0;T("break",function(){var h=a.value;n["(breakage)"]===0&&c("Unexpected '{a}'.",a,this.value);Q(this);if(a.id!==";"&&g.line===a.line)n[h]!==
"label"?c("'{a}' is not a statement label.",a,h):I[h]!==n&&c("'{a}' is out of scope.",a,h),this.first=a,b();za("break");return this}).exps=!0;T("continue",function(){var h=a.value;n["(breakage)"]===0&&c("Unexpected '{a}'.",a,this.value);Q(this);if(a.id!==";"){if(g.line===a.line)n[h]!=="label"?c("'{a}' is not a statement label.",a,h):I[h]!==n&&c("'{a}' is out of scope.",a,h),this.first=a,b()}else n["(loopage)"]||c("Unexpected '{a}'.",a,this.value);za("continue");return this}).exps=!0;T("return",function(){Q(this);
a.id==="(regexp)"&&c("Wrap the /regexp/ literal in parens to disambiguate the slash operator.");if(a.id!==";"&&!a.reach)s(g,a),this.first=d(20);za("return");return this}).exps=!0;T("throw",function(){Q(this);s(g,a);this.first=d(20);za("throw");return this}).exps=!0;G("void");G("class");G("const");G("enum");G("export");G("extends");G("import");G("super");G("let");G("yield");G("implements");G("interface");G("package");G("private");G("protected");G("public");G("static");var Z=function(h,d){var e,i;JSLINT.errors=
[];H=Object.create(zb);if(d){e=d.predef;if(e instanceof Array)for(i=0;i<e.length;i+=1)H[e[i]]=!0;if(d.adsafe)d.safe=!0;if(d.safe)d.browser=!1,d.css=!1,d.debug=!1,d.devel=!1,d.eqeqeq=!0,d.evil=!1,d.forin=!1,d.nomen=!0,d.on=!1,d.rhino=!1,d.safe=!0,d.windows=!1,d.strict=!0,d.sub=!1,d.undef=!0,d.widget=!1,H.Date=null,H.eval=null,H.Function=null,H.Object=null,H.ADSAFE=!1,H.lib=!1;k=d}else k={};k.indent=k.indent||4;k.maxerr=k.maxerr||50;R="";sa=ia=!1;Ea={};if(k.approved)for(i=0;i<k.approved.length;i+=1)Ea[k.approved[i]]=
k.approved[i];else Ea.test="test";cb="";for(i=0;i<k.indent;i+=1)cb+=" ";J=1;I=eb=Object.create(H);n={"(global)":!0,"(name)":"(global)","(scope)":I,"(breakage)":0,"(loopage)":0};ra=[n];Ga={};qa=[];w=Ha=!1;K=null;ca={};ba=null;aa={};oa=!1;ya=[];ka=!1;Ja=0;W.init(h);bb=!0;La=!1;M=g=a=O["(begin)"];F();try{b();if(a.value.charAt(0)==="<"){a:{var j,m,p,o,q,r,v,u=k.white,t;w="html";P="";for(K=null;;){switch(a.value){case "<":w="html";b("<");m={};r=a;r.identifier||c("Bad identifier {a}.",r,r.value);o=r.value;
k.cap&&(o=o.toLowerCase());r.name=o;b();if(!K)K=[],e=o,e!=="html"&&!k.fragment&&(e==="div"&&k.adsafe?f("ADSAFE: Use the fragment option."):f("Expected '{a}' and instead saw '{b}'.",g,"html",e)),k.adsafe&&(e==="html"&&f("Currently, ADsafe does not operate on whole HTML documents. It operates on <div> fragments and .js files.",g),k.fragment?e!=="div"&&f("ADsafe violation: Wrap the widget in a div.",g):f("Use the fragment option.",g)),k.browser=!0,F();v=Xa[o];typeof v!=="object"&&f("Unrecognized tag '<{a}>'.",
r,o);p=v.empty;for(r.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)")&&f("Missing '>'.",a),c("Bad identifier."));k.white=!0;s(g,a);j=a.value;k.white=u;b();!k.cap&&j!==j.toLowerCase()&&c("Attribute '{a}' not all lower case.",a,j);j=j.toLowerCase();P="";y(m,j)&&c("Attribute '{a}' repeated.",a,j);j.slice(0,2)==="on"?(k.on||c("Avoid HTML event handlers."),w=
"scriptstring",b("="),q=a.id,q!=='"'&&q!=="'"&&f("Missing quote."),P=q,t=k.white,k.white=!1,b(q),na("on"),k.white=t,a.id!==q&&f("Missing close quote on script attribute."),w="html",P="",b(q),v=!1):j==="style"?(w="scriptstring",b("="),q=a.id,q!=='"'&&q!=="'"&&f("Missing quote."),w="styleproperty",P=q,b(q),kb(),w="html",P="",b(q),v=!1):a.id==="="?(b("="),v=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}'.",
g,j),b()):v=!0;m[j]=v;e=j;i=v;var B=void 0,z=void 0;e==="id"?(B=typeof i==="string"?i.toUpperCase():"",Ga[B]===!0&&c("Duplicate id='{a}'.",a,i),/^[A-Za-z][A-Za-z0-9._:\-]*$/.test(i)?k.adsafe&&(R?i.slice(0,R.length)!==R?c("ADsafe violation: An id must have a '{a}' prefix",a,R):/^[A-Z]+_[A-Z]+$/.test(i)||c("ADSAFE violation: bad id."):(R=i,/^[A-Z]+_$/.test(i)||c("ADSAFE violation: bad id."))):c("Bad id: '{a}'.",a,i),z=i.search(Ib),z>=0&&c("Unexpected character '{a}' in {b}.",g,i.charAt(z),e),Ga[B]=
!0):e==="class"||e==="type"||e==="name"?(z=i.search(Hb),z>=0&&c("Unexpected character '{a}' in {b}.",g,i.charAt(z),e),Ga[B]=!0):e==="href"||e==="background"||e==="content"||e==="data"||e.indexOf("src")>=0||e.indexOf("url")>=0?(k.safe&&jb.test(i)&&f("ADsafe URL violation."),qa.push(i)):e==="for"?k.adsafe&&(R?i.slice(0,R.length)!==R?c("ADsafe violation: An id must have a '{a}' prefix",a,R):/^[A-Z]+_[A-Z]+$/.test(i)||c("ADSAFE violation: bad id."):c("ADSAFE violation: bad id.")):e==="name"&&k.adsafe&&
i.indexOf("_")>=0&&c("ADsafe name violation.")}e=o;i=m;var B=void 0,A=Xa[e],z=void 0;Ha=!1;A||f("Unrecognized tag '<{a}>'.",a,e===e.toLowerCase()?e:e+" (capitalization error)");if(K.length>0)if(e==="html"&&f("Too many <html> tags.",g),z=A.parent)z.indexOf(" "+K[K.length-1].name+" ")<0&&f("A '<{a}>' must be within '<{b}>'.",g,e,z);else if(!k.adsafe&&!k.fragment){B=K.length;do B<=0&&f("A '<{a}>' must be within '<{b}>'.",g,e,"body"),B-=1;while(K[B].name!=="body")}switch(e){case "div":k.adsafe&&K.length===
1&&!R&&c("ADSAFE violation: missing ID_.");break;case "script":w="script";b(">");J=a.from;i.lang&&c("lang is deprecated.",g);k.adsafe&&K.length!==1&&c("ADsafe script placement violation.",g);i.src?(k.adsafe&&(!ia||!Ea[i.src])&&c("ADsafe unapproved script source.",g),i.type&&c("type is unnecessary.",g)):(sa&&f("ADsafe script violation.",g),na("script"));w="html";b("</");!a.identifier&&a.value!=="script"&&c("Expected '{a}' and instead saw '{b}'.",a,"script",a.value);b();w="outer";break;case "style":w=
"style";b(">");lb();w="html";b("</");!a.identifier&&a.value!=="style"&&c("Expected '{a}' and instead saw '{b}'.",a,"style",a.value);b();w="outer";break;case "input":switch(i.type){case "radio":case "checkbox":case "button":case "reset":case "submit":break;case "text":case "password":case "file":case "hidden":case "image":k.adsafe&&i.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":k.adsafe&&
c("ADsafe violation: Disallowed tag: "+e)}p||K.push(r);w="outer";b(">");break;case "</":w="html";b("</");a.identifier||c("Bad identifier.");o=a.value;k.cap&&(o=o.toLowerCase());b();K||f("Unexpected '{a}'.",a,"</"+o+">");(r=K.pop())||f("Unexpected '{a}'.",a,"</"+o+">");r.name!==o&&f("Expected '{a}' and instead saw '{b}'.",a,"</"+r.name+">","</"+o+">");a.id!==">"&&f("Missing '{a}'.",a,">");w="outer";b(">");break;case "<!":k.safe&&c("ADsafe HTML violation.");for(w="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 >.")}w="outer";b(">");break;case "(end)":break a;default:a.id==="(end)"?f("Missing '{a}'.",a,"</"+K[K.length-1].value+">"):b()}if(K&&K.length===0&&(k.adsafe||!k.fragment||a.id==="(end)"))break}a.id!=="(end)"&&f("Unexpected material after the end.")}k.adsafe&&!sa&&c("ADsafe violation: Missing ADSAFE.go.",this)}else switch(a.id){case "{":case "[":ka=k.laxbreak=
!0;$a();break;case "@":case "*":case "#":case ".":case ":":w="style";b();(g.id!=="@"||!a.identifier||a.value!=="charset"||g.line!==1||g.from!==1)&&f('A css file should begin with @charset "UTF-8";');b();a.type!=="(string)"&&a.value!=="UTF-8"&&f('A css file should begin with @charset "UTF-8";');b();b(";");lb();break;default:k.adsafe&&k.fragment&&f("Expected '{a}' and instead saw '{b}'.",a,"<div>",a.value),na("lib")}b("(end)")}catch(C){C&&JSLINT.errors.push({reason:C.message,line:C.line||a.line,character:C.character||
a.from},null)}return JSLINT.errors.length===0};Z.data=function(){var a={functions:[]},b;b=[];var c,d,f,g,i=[];if(Z.errors.length)a.errors=Z.errors;if(ka)a.json=!0;for(g in aa)y(aa,g)&&b.push({name:g,line:aa[g]});if(b.length>0)a.implieds=b;if(qa.length>0)a.urls=qa;b=mb(I);if(b.length>0)a.globals=b;for(d=1;d<ra.length;d+=1){c=ra[d];b={};for(f=0;f<ta.length;f+=1)b[ta[f]]=[];for(g in c)y(c,g)&&g.charAt(0)!=="("&&(f=c[g],Object.prototype.toString.apply(b[f])==="[object Array]"&&(b[f].push(g),f==="unused"&&
i.push({name:g,line:c["(line)"],"function":c["(name)"]})));for(f=0;f<ta.length;f+=1)b[ta[f]].length===0&&delete b[ta[f]];b.name=c["(name)"];b.param=c["(params)"];b.line=c["(line)"];b.last=c["(last)"];a.functions.push(b)}if(i.length>0)a.unused=i;for(g in ca)if(typeof ca[g]==="number"){a.member=ca;break}return a};Z.report=function(a){function b(a,c){var d,e,f;if(c){j.push("<div><i>"+a+"</i> ");c=c.sort();for(e=0;e<c.length;e+=1)c[e]!==f&&(f=c[e],j.push((d?", ":"")+f),d=!0);j.push("</div>")}}var c=Z.data(),
d=[],f,g,i;f="";var k,j=[];if(c.errors||c.implieds||c.unused){g=!0;j.push("<div id=errors><i>Error:</i>");if(c.errors)for(i=0;i<c.errors.length;i+=1)if(d=c.errors[i])f=d.evidence||"",j.push("<p>Problem"+(isFinite(d.line)?" at line "+d.line+" character "+d.character:"")+": "+d.reason.entityify()+"</p><p class=evidence>"+(f&&(f.length>80?f.slice(0,77)+"...":f).entityify())+"</p>");if(c.implieds){d=[];for(i=0;i<c.implieds.length;i+=1)d[i]="<code>"+c.implieds[i].name+"</code>&nbsp;<i>"+c.implieds[i].line+
"</i>";j.push("<p><i>Implied global:</i> "+d.join(", ")+"</p>")}if(c.unused){d=[];for(i=0;i<c.unused.length;i+=1)d[i]="<code><u>"+c.unused[i].name+"</u></code>&nbsp;<i>"+c.unused[i].line+"</i> <code>"+c.unused[i]["function"]+"</code>";j.push("<p><i>Unused variable:</i> "+d.join(", ")+"</p>")}c.json&&j.push("<p>JSON: bad.</p>");j.push("</div>")}if(!a){j.push("<br><div id=functions>");c.urls&&b("URLs<br>",c.urls,"<br>");w==="style"?j.push("<p>CSS.</p>"):c.json&&!g?j.push("<p>JSON: good.</p>"):c.globals?
j.push("<div><i>Global</i> "+c.globals.sort().join(", ")+"</div>"):j.push("<div><i>No new global variables introduced.</i></div>");for(i=0;i<c.functions.length;i+=1)a=c.functions[i],j.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){d=mb(c.member);
if(d.length){d=d.sort();f="<br><pre id=members>/*members ";g=10;for(i=0;i<d.length;i+=1)a=d[i],k=a.name(),g+k.length>72&&(j.push(f+"<br>"),f="    ",g=1),g+=k.length+2,c.member[a]===1&&(k="<i>"+k+"</i>"),i<d.length-1&&(k+=", "),f+=k;j.push(f+"<br>*/</pre>")}j.push("</div>")}}return j.join("")};Z.jslint=Z;Z.edition="2010-04-06";return Z}();define("orion/jslintworker",function(){});
define("orion/objects",[],function(){function u(u){for(var A=1;A<arguments.length;A++){var F=arguments[A],D;for(D in F)Object.prototype.hasOwnProperty.call(F,D)&&(u[D]=F[D])}return u}return{clone:function(y){if(Array.isArray(y))return Array.prototype.slice.call(y);var A=Object.create(Object.getPrototypeOf(y));u(A,y);return A},mixin:u,toArray:function(u){return Array.isArray(u)?u:[u]}}});
define('built-jslintPlugin.js',["orion/plugin","orion/jslintworker","orion/objects"],function(u,y,A){function F(c){function f(j,b,d){for(var i=c.description,o=0;o<j.length;o++){var s=j[o],u=typeof s==="string"?null:s[1],s=i.indexOf(typeof s==="string"?s:s[0])!==-1;if(d||s)c.severity=b;if(s&&u)c.description=u}}f([["Expected '{'","Statement body should be inside '{ }' braces."]],"warning",!0);f("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 f=["Dangerous comment"],b=c.description,d=0;d<f.length;d++)if(b.indexOf(f[d])!==-1)return!0;return!1}(c)?null:c}function D(c,u){if(f[c.contentType]===!1)return{problems:[]};var p;JSLINT(u,j);p=JSLINT.data();var b=[],d;if(p.errors){var i=p.errors;for(d=0;d<i.length;d++){var o=i[d];if(o){var s=o.character-1,y=s+1;o.evidence&&(s=o.evidence.substring(s).search(/.\b/),s>-1&&(y+=s));o.description=o.reason;o.start=o.character;o.end=y;(o=F(o))&&b.push(o)}}}if(p.functions){p=
p.functions;var q;for(d=0;d<p.length;d++)if(i=p[d],(o=i.unused)&&o.length!==0){q||(q=u.split(/\r?\n/));for(var s=(y=i.name[0]==='"')?i.name.substring(1,i.name.length-1):i.name,A=q[i.line-1],D=0;D<o.length;D++){var E=A.indexOf(s),E=y?A.indexOf("function",E):A.lastIndexOf("function",E);E!==-1&&b.push({reason:"Function declares unused variable '"+o[D]+"'.",line:i.line,character:E+1,end:E+8,severity:"warning"})}}}return{problems:b}}var c={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=c,f={"application/javascript":!1,"application/json":!0,"text/html":!0},u=new u({name:"Orion JSLint Service",version:"1.0",description:"This plugin provides JSLint functionality for outlining and validating JavaScript code."});u.registerService(["orion.edit.validator","orion.cm.managedservice"],{updated:function(v){if(v&&(typeof v.enabled==="boolean"&&(f["application/javascript"]=!!v.enabled),typeof v.options==="string"&&(v=v.options,
!/^\s*$/.test(v)))){var u={},p=!1;v.split(/,/).forEach(function(b){var c=/\s*(\w+)\s*:\s*(\w+)\s*/.exec(b);c===null?console.log("JSLint ignoring bad option: "+b):(u[c[1]]=c[2],p=!0)});j={};A.mixin(j,c,u);p&&console.log("JSLint using user-provided options: {"+Object.keys(u).map(function(b){return b+":"+u[b]}).join(",")+"}")}},computeProblems:function(c,f){return c.getText().then(D.bind(null,f))}},{contentType:["application/javascript","application/json","text/html"],pid:"jslint.config"});u.registerService("orion.edit.outliner",
{computeOutline:function(c,f){return c.getText().then(function(c){if(f.contentType==="text/html"){for(var b=[],d=/id=['"]\S*["']/gi,i;(i=d.exec(c))!==null;){var j=i.index;i=i[0];i[0]==="<"?(i="&lt;"+i.substring(1)+"&gt;",j+=1):(j+=4,i=i.substring(4,i.length-1));b.push({label:i,children:null,start:j,end:j+i.length})}return b}})}},{contentType:["text/html"],nameKey:"Flat outline",nls:"orion/editor/nls/messages",id:"orion.edit.outliner.jslint"});u.registerService("orion.core.setting",{},{settings:[{pid:"jslint.config",
name:"JSLint Validator",tags:"validation javascript js jslint".split(" "),category:"validation",properties:[{id:"enabled",name:"Use JSLint to check JavaScript code",defaultValue:!0,type:"boolean"},{id:"options",name:"Options to pass to JSLint (/*jslint ..*/)",type:"string"}]}]});u.connect()});