"use strict";function characters(t){return t.split("")}function member(t,n){return n.indexOf(t)>=0}function find_if(t,n){for(var r=n.length;--r>=0;)if(t(n[r]))return n[r]}function repeat_string(t,n){if(n<=0)return"";if(1==n)return t;var r=repeat_string(t,n>>1);return r+=r,1&n?r+t:r}function configure_error_stack(t){Object.defineProperty(t.prototype,"stack",{get:function(){var t=new Error(this.message);t.name=this.name;try{throw t}catch(t){return t.stack}}})}function DefaultsError(t,n){this.message=t,this.defs=n}function defaults(t,n,r){!0===t&&(t={});var e=t||{};if(r)for(var i in e)if(HOP(e,i)&&!HOP(n,i))throw new DefaultsError("`"+i+"` is not a supported option",n);for(var i in n)HOP(n,i)&&(e[i]=t&&HOP(t,i)?t[i]:n[i]);return e}function merge(t,n){var r=0;for(var e in n)HOP(n,e)&&(t[e]=n[e],r++);return r}function noop(){}function return_false(){return!1}function return_true(){return!0}function return_this(){return this}function return_null(){return null}DefaultsError.prototype=Object.create(Error.prototype),DefaultsError.prototype.constructor=DefaultsError,DefaultsError.prototype.name="DefaultsError",configure_error_stack(DefaultsError);var MAP=function(){function t(t,s,u){var o,a=[],f=[];function c(){var c=s(t[o],o),l=c instanceof i;return l&&(c=c.v),c instanceof r?(c=c.v)instanceof e?f.push.apply(f,u?c.v.slice().reverse():c.v):f.push(c):c!==n&&(c instanceof e?a.push.apply(a,u?c.v.slice().reverse():c.v):a.push(c)),l}if(Array.isArray(t))if(u){for(o=t.length;--o>=0&&!c(););a.reverse(),f.reverse()}else for(o=0;o<t.length&&!c();++o);else for(o in t)if(HOP(t,o)&&c())break;return f.concat(a)}t.at_top=function(t){return new r(t)},t.splice=function(t){return new e(t)},t.last=function(t){return new i(t)};var n=t.skip={};function r(t){this.v=t}function e(t){this.v=t}function i(t){this.v=t}return t}();function push_uniq(t,n){if(t.indexOf(n)<0)return t.push(n)}function string_template(t,n){return t.replace(/\{(.+?)\}/g,function(t,r){return n&&n[r]})}function remove(t,n){var r=t.indexOf(n);r>=0&&t.splice(r,1)}function makePredicate(t){Array.isArray(t)||(t=t.split(" "));var n=Object.create(null);return t.forEach(function(t){n[t]=!0}),n}function all(t,n){for(var r=t.length;--r>=0;)if(!n(t[r]))return!1;return!0}function Dictionary(){this._values=Object.create(null),this._size=0}function HOP(t,n){return Object.prototype.hasOwnProperty.call(t,n)}function first_in_statement(t){for(var n,r=t.parent(-1),e=0;n=t.parent(e++);r=n){if("Call"==n.TYPE){if(n.expression===r)continue}else if(n instanceof AST_Binary){if(n.left===r)continue}else if(n instanceof AST_Conditional){if(n.condition===r)continue}else if(n instanceof AST_PropAccess){if(n.expression===r)continue}else if(n instanceof AST_Sequence){if(n.expressions[0]===r)continue}else{if(n instanceof AST_Statement)return n.body===r;if(n instanceof AST_UnaryPostfix&&n.expression===r)continue}return!1}}Dictionary.prototype={set:function(t,n){return this.has(t)||++this._size,this._values["$"+t]=n,this},add:function(t,n){return this.has(t)?this.get(t).push(n):this.set(t,[n]),this},get:function(t){return this._values["$"+t]},del:function(t){return this.has(t)&&(--this._size,delete this._values["$"+t]),this},has:function(t){return"$"+t in this._values},each:function(t){for(var n in this._values)t(this._values[n],n.substr(1))},size:function(){return this._size},map:function(t){var n=[];for(var r in this._values)n.push(t(this._values[r],r.substr(1)));return n},clone:function(){var t=new Dictionary;for(var n in this._values)t._values[n]=this._values[n];return t._size=this._size,t},toObject:function(){return this._values}},Dictionary.fromObject=function(t){var n=new Dictionary;return n._size=merge(n._values,t),n};