Permalink
Browse files

v0.5.4 - minified/gzipped (25.5K/9.5K)

  • Loading branch information...
1 parent a1c0244 commit 243bfa8127c22a2cc179babd72da22535295c5d2 @bemson committed Feb 20, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 salt.min.js
View
2 salt.min.js
@@ -1,4 +1,4 @@
/* Salt v0.5.4 + Panzer v0.3.13 + genData v3.1.0 | github.com/bemson | (c) 2014, MIT */
;!function(a,b,c){function f(a){return"function"==typeof a}function g(a){return"function"!=typeof a}function h(a){function w(a,b){this.name=a,this.value=b}if(this instanceof h)return this;var e,i,l,m,o,p,q,r,s,t,b=[["",a]],j=d.call(arguments),k=j.slice(1),n=k.filter(f),u=[],v=n.length;if(!v)return[];for(w.prototype=("function"==typeof this?this:h).prototype,l={returns:u,args:k.filter(g),params:j,loop:0,queued:0};b.length;){for(i=b.shift(),q=new w(i[0],i[1]),r=t=0,p=[i[0],i[1],i[2],l],l.continues=0,l.breaks=0,l.source=i[1];!l.continues&&v>r;)l.allowUndefined=0,o=n[r++].apply(q,p),(o!==c||l.allowUndefined)&&(m=o,t=1);if(t&&u.push(m),l.breaks)break;if("object"==typeof l.source){e=[];for(s in l.source)l.source.hasOwnProperty(s)&&e.push([s,l.source[s],q]);b=e.concat(b)}l.loop++,l.queued=b.length-1}return l.hasOwnProperty("returns")?l.returns:u}var d=a.prototype.slice;a.isArray||function(b){return b instanceof a},h.spawn=function i(){function c(e){return this instanceof c?this:a.apply("function"==typeof this?this:c,[e].concat(b,d.call(arguments).slice(1)))}var a=this,b=d.call(arguments).filter(f);return c.prototype=new a,c.spawn=i,c},h.version="3.1.0",b.genData=h}(Array,this);
!function(a,b,c,d,e,f){function h(c){function n(a,b,c,d){function u(b,c){return b===a&&c<g.pkgs.length?g.pkgs[c].inst:j}var p,s,t,g=this,m={},n={},o={af:[],ar:[],nf:[],nr:[]};for(p=0;s=a.pkgs[p];p++)"function"==typeof s.def.attrKey?o.af.push(s.def.attrKey):s.def.attrKey instanceof e&&o.ar.push(s.def.attrKey),"function"==typeof s.def.badKey?o.nf.push(s.def.badKey):s.def.badKey instanceof e&&o.nr.push(s.def.badKey),"function"==typeof s.def.prepTree&&"undefined"!=typeof(t=s.def.prepTree.call(f,c))&&(c=t);for(g.nodes=k(c,a,o),g.nodes[0].parentIndex=g.nodes[0].childIndex=0,g.nodes.unshift(k()[0]),g.nodes[0].children.push(1),g.nodes[0].name="PNULL",g.nodes[0].index=g.nodes[0].depth=g.nodes[0].lte=0,g.nodes[0].path="..//",g.nodes[0].firstChildIndex=g.nodes[0].lastChildIndex=1,g.nodes[0].ctx=1,g.tank={id:h++,currentIndex:0,targetIndex:-1,go:function(a){var b=g.nodes[a];return b&&(g.target=b,g.tank.targetIndex=b.index),g.stop=0,g.go()},stop:function(){return g.stop=1,!!g.loop},post:function(a){var b=typeof a;if(g.loop){if("function"===b)return g.posts[++i]=a,i;if("number"===b&&g.posts.hasOwnProperty(a))return delete g.posts[a],!0}return!1}},g.posts={},g.current=g.nodes[0],g.target=g.loop=0,g.pkgs=a.pkgs.map(function(a){function e(){}var b=a.name,c=a.def,d={name:b,idx:a.idx,pkg:a,inst:new c};return e.prototype=a.proxy.prototype,m[b]=d.proxy=new e,n[b]=d.inst,d.proxy.pkgs=m,d.proxy.toString=u,d.inst.pkgs=n,d.inst.tank=g.tank,d.inst.nodes=l.call(a.node,g.nodes),d}),p=0;s=g.pkgs[p];p++)s.inst.proxy=b;for(b.pkgs=m,b.toString=u,g.fire=q,p=0;s=g.pkgs[p];p++)"function"==typeof s.pkg.def.init&&s.pkg.def.init.call(s.inst,d);delete g.fire}function o(a,b){var d,c=this.pkgs[a-1];return c&&b&&"string"==typeof b&&(d=new c.proxy,"function"==typeof d[b])?d[b]:q}function p(a){function d(a){return a?a instanceof b.pkgs[c].proxy&&a.toString(b,c):void 0}function e(){}function f(){}var c,b=this;return arguments.length?"string"==typeof a&&m.test(a)?(b.pkgsIdx.hasOwnProperty(a)||(d.getSuper=function(a){return o.call(b,c,a)},d.init=d.attrKey=d.badKey=d.onBegin=d.onEnd=d.onNode=d.onEngage=d.onRelease=d.onScope=d.onTraverse=d.onTraversing=d.onTraversed=d.prepTree=d.prepNode=0,d.label=a,e.prototype=new b.KlassProxy,b.Klass.prototype=d.proxy=e.prototype,b.KlassProxy=e,d.node=f.prototype,c=d.index=b.pkgsIdx[a]=b.pkgs.push({name:a,idx:b.pkgs.length,def:d,proxy:e,node:f})-1),b.pkgs[b.pkgsIdx[a]].def):!1:b.pkgs.map(function(a){return a.name})}function q(){}var d={create:function(){function b(c,d){if(!(this instanceof b))throw new Error("Missing new operator.");new n(a,this,c,"object"==typeof d?d:{})}var a={pkgs:[],pkgsIdx:{},KlassProxy:function(){},Klass:b};return b.prototype=a.KlassProxy.prototype,b.pkg=function(){return p.apply(a,arguments)},b},version:"0.3.10"},g=b||a?c("genData"):f.genData,h=0,i=0,j={}.toString(),k=g.spawn(function(a,b,c,d){function o(c){return c.call(f,a,b)}function p(b){return b.test(a)}var l,m,e=this,g=d.args[0],h=d.args[1],i=d.returns,j=h&&a&&(h.nf.some(o)||h.nr.some(p)),k=h&&a&&(h.af.some(o)||h.ar.some(p)),n=0;if(j||k)d.source=0,k&&(c.attrs[a]=b);else if(e.parentIndex=e.previousIndex=e.nextIndex=e.firstChildIndex=e.lastChildIndex=e.childIndex=e.ctx=e.lte=-1,e.index=i.push(e),e.depth=c?c.depth+1:1,e.name=a||"PROOT",e.attrs={},e.path=c?c.path+a+"/":"//",e.children=[],c?(e.parentIndex=c.index,c.children.length||(c.firstChildIndex=e.index),e.childIndex=c.children.push(e.index)-1,c.lastChildIndex=e.index,e.childIndex&&(e.previousIndex=c.children[e.childIndex-1],i[e.previousIndex-1].nextIndex=e.index)):d.tree=b,g&&g.pkgs.length)for(;m=g.pkgs[n];n++)"function"==typeof m.def.prepNode&&"undefined"!=typeof(l=m.def.prepNode.call(f,d.source,d.tree))&&(d.source=l)}),l=g.spawn(function(a,b,c,d){var f,e=this;if(c){d.source=0;for(f in b)b.hasOwnProperty(f)&&"lte"!==f&&"ctx"!==f&&(e[f]=b[f]);return e}}),m=/\w/;return n.prototype={go:function(){var d,e,g,n,o,a=this,b=a.nodes,c=a.tank,h=0,i=a.stopped,j=a.current,k=i?j.lte:-1,l=-1,m=i?a.target.index:null;if(a.loop)return!!a.target;for(a.posts={},a.loop=1,a.fire("begin");a.loop;)!i&&!a.target||a.stop?n?(n=0,a.fire("release")):o?a.loop=0:(o=1,a.fire("end")):(o=0,m==a.target.index&&~k|~l?~l?n?(n=0,a.fire("release")):(c.currentIndex=l,a.fire("node",l,j.index),j.lte=0,j=a.current=b[l],l=-1):n?g||i||1!=k&&2!=k?(i?a.fire("traversing",k):(j.lte=k,k||(a.target=0,c.targetIndex=-1),a.fire("traverse",k)),h++,a.stop||(a.fire("traversed",k),a.stopped=0),a.stopped=a.stop,i=0,2==k?g=j.ctx=0:k=-1):(2==k?k=-1:g=j.ctx=1,a.fire("scope",j.ctx)):(n=1,a.fire("engage")):(g=1===j.ctx,k=l=-1,m=a.target.index,e=m-j.index,e?e>0&&j.index<2||!a.target.path.indexOf(j.path)?g?l=j.firstChildIndex:k=1:g?k=2:(a.target.path.indexOf(b[j.parentIndex].path)&&(e=-1),e>0?3==j.lte||2==j.lte?l=j.nextIndex:k=3:4==j.lte||2==j.lte?l=~j.previousIndex?j.previousIndex:j.parentIndex:k=4):k=g?0:1));for(d in a.posts)a.posts.hasOwnProperty(d)&&a.posts[d].call(f);return h},fire:function(a){for(var e,f,b="on"+a.charAt(0).toUpperCase()+a.substr(1),c=arguments,d=0;e=this.pkgs[d];d++)f=e.pkg.def[b],"function"==typeof f&&f.apply(e.inst,c)}},d}a?define(h):b?module.exports=h(require):f.Panzer||(f.Panzer=h())}("function"==typeof define,"undefined"!=typeof exports,Array,Object,RegExp,this);
-!function(a,b,c,d,e,f,g,h){function i(i){function T(a){return a instanceof j}function U(a,b,c){b&&(c?a.unshift(b):a.shift())}function V(){}function W(a,b,c){for(var f,g,d=c.nodes[c.tank.currentIndex],e=0,h=0;f=b[e];e++)g=f.tank.id,a.hasOwnProperty(g)||(h++,a[g]={inst:f,cap:d});return h}function X(a,b){for(var d,e,c=b.length,f=0;c--;)d=b[c],e=d.tank.id,a.hasOwnProperty(e)&&(f++,delete a[e]);return f}function Y(a,b){var c,d,e,f,g,h,i,j,k=[];a:for(j in a)if(a.hasOwnProperty(j)){i=a[j],d=I;b:for(;d--;)if(c=H[d],f=b[c],h=f.length){for(g=0;h>g;g++)if(e=f[g],g>=f.made&&(e=f[g]=$(c,e,typeof e),f.made++),e.f(i,e)){k[k.length]=i.inst;continue b}continue a}}return k}function Z(a){var b,c,d,e,g,i,j,k;if((null===a||a===h)&&(a=!1),i=typeof a,("object"!==i||!a.hasOwnProperty("is"))&&(q.hasOwnProperty("toJSON")&&(g=q.toJSON),q.toJSON=_,e="c"+JSON.stringify(a),g?q.toJSON=g:delete q.toJSON,G.hasOwnProperty(e)))return G[e];if(b={buffer:-1},"boolean"===i&&a)b.on=["/"],b.on.made=0;else if((j=a instanceof f)||"string"===i&&a||"number"===i&&a===~~a)b.on=[a],b.on.made=0;else if("object"===i&&!j)for(d=I;d--;)c=H[d],a.hasOwnProperty(c)&&(b[c]=s(a[c])?p.call(a[c]):[a[c]],b[c].made=0,k=1);for(d=I;d--;)c=H[d],b.hasOwnProperty(c)||(b[c]=m);return a.hasOwnProperty("buffer")&&(k||(b.on=["/"],b.on.made=0),-1!==a.buffer&&(b.buffer=a.buffer?1:0)),e&&(G[e]=b),b}function $(a,b,c){var d=b instanceof f,e={v:b,f:V};return"has"===a?d?(e.f=cb,e.g=gb,e.m=C.test(b)?"pAry":"sAry"):b&&"string"===c?(e.g=gb,~b.indexOf("/")?(e.f=db,e.m="pAry","/"!==e.v.charAt(0)&&(e.v="/"+e.v),"/"!==e.v.substr(-1)&&(e.v+="/")):(e.f=fb,e.m="sAry")):"number"===c&&b>=0&&b===~~b&&(e.f=jb):"from"===a?d?C.test(b)?(e.f=bb,e.g=kb):(e.f=cb,e.g=lb):b&&"string"===c?~b.indexOf("/")?(e.f=ab,e.g=kb,"/"!==e.v.charAt(0)&&(e.v="/"+e.v),"/"!==e.v.substr(-1)&&(e.v+="/")):(e.f=fb,e.g=lb):"number"===c&&b>=0&&b===~~b&&(e.f=eb,e.g=mb):"is"===a?e.f=ib:"on"===a?d?(e.f=bb,C.test(b)?(e.g=hb,e.m="path"):(e.g=hb,e.m="name")):b&&"string"===c?~b.indexOf("/")?(e.f=ab,e.g=hb,e.m="path","/"!==e.v.charAt(0)&&(e.v="/"+e.v),"/"!==e.v.substr(-1)&&(e.v+="/")):(e.f=eb,e.g=hb,e.m="name"):"number"===c&&b>=0&&b===~~b&&(e.f=eb,e.g=hb,e.m="index"):"within"===a&&(d?C.test(b)?(e.f=bb,e.g=nb):(e.f=cb,e.g=ob):b&&"string"===c?~b.indexOf("/")?(e.f=ab,e.g=nb,"/"!==e.v.charAt(0)&&(e.v="/"+e.v),"/"!==e.v.substr(-1)&&(e.v+="/")):(e.f=fb,e.g=ob):"number"===c&&b>-1&&b===~~b&&(e.f=pb)),e}function _(){return k+this}function ab(a,b){return~b.g(a,b).indexOf(b.v)}function bb(a,b){return b.v.test(b.g(a,b))}function cb(a,b){for(var c=b.g(a,b),d=c.length,e=b.v;d--;)if(e.test(c[d]))return 1}function db(a,b){for(var e,c=b.g(a,b),d=c.length,f=b.v;d--;)if(e=c[d],~e.indexOf(f))return 1}function eb(a,b){return b.v===b.g(a,b)}function fb(a,b){for(var c=b.g(a,b),d=c.length,e=b.v;d--;)if(c[d]===e)return 1}function gb(a,b){return a.inst[b.m]}function hb(a,b){var c=a.inst;return c.nodes[c.tank.currentIndex][b.m]}function ib(a,b){return a.inst.nodes[1].value===b.v}function jb(a,b){return b.v<a.inst.nodes.length}function kb(a){return a.cap.path}function lb(a){var b=a.cap;return b.index>1?b.path.slice(2,-1).split("/"):m}function mb(a){return a.cap.index}function nb(a){var b=a.inst,c=b.nodes[b.tank.currentIndex];return~c.parentIndex?b.nodes[c.parentIndex].path:""}function ob(a){var b=a.inst,c=b.nodes[b.tank.currentIndex];return c.parentIndex>1?b.nodes[c.parentIndex].path.slice(2,-1).split("/"):m}function pb(a,b){var c=a.inst,d=c.nodes,e=d[c.tank.currentIndex],f=d[b.v];return f?e.within(f):void 0}function qb(a){for(var c,d,b=1;c=arguments[b];b++)for(d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);return a}function rb(){for(var c,d,e,a=0,b={};c=arguments[a];a++)for(d in c)c.hasOwnProperty(d)&&(e=c[d],b[d]=null!==e&&"object"==typeof e?rb(e):e);return b}function sb(a,b){var c,d,f,g,h,e=typeof a,i="self";if("object"===e&&s(a))for(g=a.length,f=0;g>f;f++)b=sb(a[f],b);else if("string"===e||"object"===e||"boolean"===e){if(c=rb(b),"string"===e&&a)a=a.toLowerCase(),d="!"===a.charAt(0),d&&(a=a.substr(1)),a!==i&&(c[a]=!d);else if("boolean"===e)for(h in c)h!==i&&c.hasOwnProperty(h)&&(c[h]=a);else{b={};for(h in a)a.hasOwnProperty(h)&&(b[h.toLowerCase()]=a[h]);qb(c,b,{self:!0})}return c}return b}function tb(){var a=j.pkg();a.length!==N&&(O=1===(N=a.length)?[l.attrKey]:a.map(ub).filter(vb),O=O.map(wb))}function ub(a){return j.pkg(a).attrKey}function vb(a){return a}function wb(a){var b={f:0,r:0};return"function"==typeof a?b.f=a:b.r=a,b}function xb(a,b){for(var d,c=0;d=O[c];c++)if(d.r&&d.r.test(a)||d.f&&d.f(a,b))return 0;return 1}function yb(a){var b=typeof a;return"string"===b?{_import:a}:"function"===b?{_on:a}:"object"===b?a:{}}function zb(a,b,c){for(var j,l,d=c||{},f=yb(a),g=yb(b),h=e.keys(f),i=e.keys(g),k=0;l=h[k];k++)j=g.hasOwnProperty(l),d[l]=xb(l)?j?zb(f[l],g[l],{}):f[l]:j&&"_import"!==l?g[l]:f[l];for(k=0;l=i[k];k++)f.hasOwnProperty(l)||"_import"===l||(d[l]=g[l]);return d}function Ab(a,b){for(var g,c=b,d=a.slice(2,-1).split("/"),e=d.length,f=0;e>f;f++){if(g=d[f],!c.hasOwnProperty(g)||!xb(g,c[g]))return;c=c[g]}return c}function Bb(a,b,c){var d,e,g,h,i,f=typeof a;return"string"===f?i=a:"object"===f&&null!==a&&a.hasOwnProperty("_import")&&(g=a._import,h=typeof g,"object"===h?(g instanceof j&&(g=l(g).nodes[1].value),e=l.prepNode(g,g)||g):"function"===h?e={_on:g}:i=g),i&&!c.hasOwnProperty(i)&&y.test(i)&&(e=Ab(i,b)),e&&("string"===f?d=yb(e):"object"===f&&(d=zb(e,a))),d}var r,N,O,Q,S,j=(b||a?i("panzer"):g.Panzer).create(),k=(d.ceil(5e3*d.random())+3e3).toString(18),l=j.pkg("core"),m=[],n={},o=[],p=c.prototype.slice,q=f.prototype,s="function"==typeof c.isArray?c.isArray:function(a){return a instanceof c},t="@",u={world:!0,owner:!0,sub:!0,self:!0},v=rb(u),w=1,x=new f("[\\.\\|"+t+"]"),y=/^\/\/(?:\w+\/)+/,z=/^\/+|\/+$/g,A=/\W/,B=/\w/,C=/^\/.*\/.*\//,D={_on:0,_in:1,_out:2,_over:3,_bover:4,0:"on",1:"in",2:"out",3:"over",4:"bover"},E=[],F={"null":{f:0,i:0},program:{f:0,i:1},root:{f:function(a){return a.rootIndex}},parent:{f:function(a){return a.parentIndex}},child:{f:function(a){return a.firstChildIndex}},next:{f:function(a){return a.nextIndex}},previous:{f:function(a){return a.previousIndex}},oldest:{f:function(a,b,c){var d=b[a.parentIndex];return d?d[("y"===c.charAt(0)?"first":"last")+"ChildIndex"]:-1}},self:{f:function(a){return a.index}}},G={},H=["has","within","on","from","is"],I=H.length,J={_root:function(a,b,c,d,e,f,g){d.rootIndex=2>g||b&&c._root?g:e.rootIndex},_restrict:function(a,b,c,d,e,f,g){var h=a.substr(1);d[h]=b&&c[a]?g:e?e[h]:-1},_group:function(a,b,c,d,f){var g,h,i,j;if(f&&(d.groups=f.groups,d.cGrps=f.cGrps),b){for(h=rb(d.groups),g=c[a],s(g)||(g=[g]),i=g.length;i--;)j=g[i],"string"==typeof j&&(j=j.trim().toLowerCase())&&!u.hasOwnProperty(j)&&(h[j.toLowerCase()]=!0);d.groups=h,d.cGrps=e.keys(h)}},_perms:function(a,b,c,d,e,f){var g;b?(g=sb(c[a],e.lp),g&&(d.perms=d.lp=g)):e?(d.perms=0,d.lp=e.lp):f.perms=[d.perms=d.lp=u]},_owner:function(a,b,c,d,e,f){d.oGate=0,b?(f.ownable=d.oGate=1,d.ping=c._owner):d.ping=e?e.ping:-1},_alias:function(a,b,c,d,e,f,g){b&&c._alias&&"string"==typeof c._alias&&!x.test(c._alias)&&B.test(c._alias)?(f.tokens[c._alias]={i:g,f:0},d.alias=c._alias):d.alias=""},_capture:function(a,b,c,d,e,f){b?d.caps=Z(c._capture):e?d.caps=e.caps:(d.caps=0,f.caps=[])},_data:function(a,b,c,d){var f,i,j,k,l,e={},g=0;if(d.dcfgs=[],b){for(f=s(c._data)?c._data:[c._data],i=f.length;i>g;g++)if(j=f[g],k=typeof j,"string"===k&&j&&(e[j]={use:0,name:j,value:h}),"object"===k&&j)for(l in j)j.hasOwnProperty(l)&&(e[l]={use:1,name:l,value:j[l]});for(l in e)e.hasOwnProperty(l)&&(d.dcfgs[d.dcfgs.length]=e[l])}},_sequence:function(a,b,c,d,e){b?(d.seq=c[a]?[]:0,d.lastWalk=d.seq):(d.seq=0,d.lastWalk=e?e.lastWalk:0,d.lastWalk&&(d.lastWalk[d.lastWalk.length]=d.index))},_pins:function(a,b,c,d,e){d.pins=b?!!c._pins:e?e.pins:!0},_on:function(a,b,c,d){var e=c[a];b&&"function"==typeof e&&(d.fncs[D[a]]=e)},_tail:function(a,b,c,d,e){var f;if(b){if(f=c[a],f===!1||0>f)return d.tail=0,void 0;d.tail={q:f===!0?d.index:f}}else d.tail=e?e.tail:0},_conceal:function(a,b,c,d,e,f,g){d.conceal=-1,b&&g>1?c._conceal&&(d.conceal=g):e&&(d.conceal=e.conceal)}},K={_sequence:function(a,b,c,d){delete d.lastWalk},_alias:function(a,b,c,d,e,f,g){var h=d.alias;0===g?d.alias="null":1===g?d.alias="program":h&&f.tokens[h].i!==g&&(d.alias="")},_on:function(a,b,c,d,e,f,g){var i,j,k,h=-1,l=0;b&&"function"!=(j=typeof(k=c[a]))&&("string"===j&&k.length?(">"===k.charAt(0)&&(k=k.substr(1),l=1),h=f.indexOf(k,d)):"number"===j&&f.nodes[k]&&(h=k),!~h||"_on"===a&&h===g||(i=D[a],d.reds[i]=[l,h],d.fncs[i]=w))},_wait:function(a,b,d,e,f,g){var i,j,k,h=d[a],l=m;if(e.delay=0,b&&h!==!1){if(c.isArray(h)?l=h:h!==!0&&(l=[h]),k=l.length,j=typeof l[0],1===k&&"number"!==j)return;if(k>1&&"function"!==j){if(i=g.indexOf(l[0]),!~e)return;l[0]=i}e.delay=l}},_next:function(a,b,c,d,e,f){var h,g=c[a];d.nxt=-1,d.nxtc=0,b&&("string"==typeof g&&">"===g.charAt(0)&&(d.nxtc=1,g=g.substr(1)),~(h=f.indexOf(g,d))&&(d.nxt=h))},_perms:function(a,b,c,d){delete d.lp}},L={0:function(a,b){a.oGate&&~a.ping&&b.pingOwner(a.ping)},1:function(a,b,c){var h,i,j,k,d=b.proxy.data,e=a.dcfgs,f=e.length,g=0;if(a.dcfgs.length)for(k=c?function(){d.hasOwnProperty(i)&&j.stack.unshift(d[i]),d[i]=h.use?h.value:j.stack[0]}:function(){j.stack.length?d[i]=j.stack.shift():(delete b.dtos[i],delete d[i])};f>g;g++)h=e[g],i=h.name,j=b.getDTO(i),k()},2:function(a,b,c){U(b.perms,a.perms,c),b.proxy.state.perms=rb(b.perms[0])},3:function(a,b,c){U(b.caps,a.caps,c),1!==a.index||c||(b.bin={},b.tin={})}},M=4,P=[],R=[];j.version="0.5.4",J._ingress=J._restrict,J._in=J._out=J._over=J._bover=J._on,K._in=K._out=K._over=K._bover=K._on;for(r in J)J.hasOwnProperty(r)&&(P[P.length]=r);Q=P.length;for(r in K)K.hasOwnProperty(r)&&(R[R.length]=r);return S=R.length,F["."]=F.self,F[".."]=F.parent,F.youngest=F.oldest,Z(!0),qb(l,{actives:[],attrKey:/^_/,badKey:/^\d|^\W|[^a-zA-Z\d\-_\+=\(\)\*\&\^\%\$\#\!\~\`\{\}\"\'\:\;\?\, ]+|^toString$/,prepTree:function(a){return tb(),T(a)?l(a).nodes[1].value:void 0},prepNode:function(a,b){for(var c,d=a;d=Bb(d,b,{});)c=d;return c},init:function(){var g,h,i,j,k,l,a=this,b=E[0],c={},d={name:"_null",path:"..//",depth:0,index:0,pins:!0,alias:"null",root:!0,perms:v,groups:o},e=a.nodes,f=e.length;for(a.bin={},a.tin={},a.groups=n,a.nStr=a.pStr=a.lastPing="|",a.sAry=[],a.pAry=[],a.vars={},a.tokens={},a.cq={},a.args=[],a.calls=[],a.trail=[],a.tgtTrail=-1,a.dtos={},a.waitTimer=a.waitFnc=a.waitArgs=0,a.cache={indexOf:{}},a.active=0,a.blessed=0,a.nids={},a.pinned=0,a.pinning={},a.pinCnt=0,a.targets=[],a.phase=0,a.owner=a.ownable=0,a.nodes[0].name="_null",a.nodes[1].name="_program",g=0;f>g;g++){for(i=e[g],j=e[i.parentIndex],a.nids[i.path]=g,g>1&&(a.nStr+=i.name+"|",a.sAry[a.sAry.length]=i.name),a.pStr+=i.path+"|",a.pAry[a.pAry.length]=i.path,i.pkg=a,i.fncs=[0,0,0,0,0],i.reds=[],h=0;Q>h;h++)k=P[h],J[k](k,i.attrs.hasOwnProperty(k),i.attrs,i,j,a,g);i.fncs[0]||"function"!=typeof i.value||(i.fncs[0]=i.value)}for(g=0;f>g;g++)for(i=e[g],h=0;S>h;h++)k=R[h],K[k](k,i.attrs.hasOwnProperty(k),i.attrs,i,j,a,g);for(l in a.pkgs)a.pkgs.hasOwnProperty(l)&&(a.pkgs[l].proxy.data=c,a.pkgs[l].proxy.state=d);b&&(a.ownable&&(a.owner=b),b.caps[0]&&W(b.tin,[a],b))},onBegin:function(){var a=this;E.unshift(a),l.actives.unshift(a.proxy),a.active=1,a.preMove(),a.pinned&&a.tank.stop()},onNode:function(a,b){var c=this,d=c.proxy.state,e=c.nodes[b];d.name=e.name,d.index=e.index,d.depth=e.depth,d.path=e.path,d.pins=e.pins,d.alias=e.alias,d.root=e.index==e.rootIndex,d.groups=e.cGrps.concat(),d.delays=!!e.delay,c.groups=e.groups},onScope:function(a,b){var c=this,d=c.nodes[c.tank.currentIndex];c.phase=b?1:2,d.scope(b)},onEngage:function(){var a=this;a.setPrivs()},onRelease:function(){var a=this;a.delPrivs()},onTraverse:function(a,b){var n,o,p,c=this,d=c.args,e=c.proxy,f=c.tank,g=c.nodes[f.currentIndex],i=g.fncs[b],j=!b,k=i===w,l=j&&g.delay;c.phase=b,~f.targetIndex||(c.tgtTrail=c.targets.shift()),j&&g.seq&&e.go.apply(e,g.seq),k&&(o=g.reds[b],n=o[1],o[0]?e.get.apply(e,[n].concat(d)):e.go(n)),j&&(p=g.nxt,~p&&(g.nxtc?e.get.apply(e,[p].concat(d)):e.go(p)),l&&e.wait.apply(e,l)),i&&(c.calls[c.calls.length]=g.index+"."+b,k||(c.result=i.apply(e,c.targets.length?m:d))),(k||c.paused||c.pinned)&&(c.result=h)},onTraversing:function(){var a=this;a.waitFnc&&(a.waitFnc.apply(a.proxy,a.waitArgs),a.waitFnc=a.waitArgs=0)},onTraversed:function(){var a=this,b=a.proxy,c=a.nodes[a.tank.currentIndex];c.caps&&W(a.bin,Y(a.tin,c.caps),a),a.tin={},!a.phase&&~a.tgtTrail&&(a.trail[a.trail.length]=a.tgtTrail,a.tgtTrail=-1),b.args!==a.args&&s(b.args)&&(a.args=b.args),"object"==typeof b.vars&&(a.vars=b.vars),b.vars=a.vars},onEnd:function(){var d,h,i,j,a=this,b=a.tank,c=E[1],e=a.pause||a.pinned||a.phase,f=a.targets.length,g=a.nodes[b.currentIndex];if(e||!f&&!g.tail){if(e)c&&c.nodes[(d=c.tank).currentIndex].pins&&g.pins&&!a.pinning[d.id]&&!c.pinning[b.id]&&(c.pinned++,a.pinning[d.id]=c,a.pinCnt++,d.stop());else{if(~g.ping){if(a.pingOwner(g.ping),a.paused||a.pinned||a.targets.length)return;a.lastPing=""}if(a.args=[],a.calls=[],a.trail=[],g.index||(a.vars={}),a.pinCnt){i=a.pinning;for(j in i)i.hasOwnProperty(j)&&i[j].pinned--;b.post(function(){var b,c;a.pinning={},a.pinCnt=0;for(c in i)i.hasOwnProperty(c)&&(b=i[c],b.pinned||b.pause||b.go())})}}E.shift(),l.actives.shift(),a.active=0}else f?b.go(a.targets[0]):~(h=a.indexOf(g.tail.q))&&h!==g.index&&a.proxy.go(h)}}),qb(l.prototype,{indexOf:function(a,b){var f,g,h,i,j,k,l,m,n,o,p,q,c=this,d=c.nodes,e=c.nids,r=-1;switch(b=f=b||c.nodes[c.tank.currentIndex],typeof a){case"object":null!==a&&(a=a.index);case"number":d[a]&&(r=a);break;case"function":a+="";case"string":if("..//"===a||"//"===a){r="//"===a?1:0;break}if(g=!x.test(a),"/"!==a.slice(-1)&&(a+="/"),"/"===a.charAt(0)){if("/"===a.charAt(1)){if(g){r=e[a]||-1;break}f=d[0]}else if(f=d[f.rootIndex],g){r=e[f.path+a.substr(1)]||-1;break}}else if(g){r=e[f.path+a]||-1;break}if(a=a.replace(z,""),i=a+b.index,!c.cache.indexOf.hasOwnProperty(i)){j=a.split("/"),l=j.length;a:for(k=0;l>k;k++){for(m=j[k].split("|"),o=m.length,n=0;o>n;n++){if(h=m[n],p=-1,!h)break a;if(A.test(h)?(h.charAt(0)===t&&(h=h.slice(1)),q=F[h]||c.tokens[h],q&&(p=q.f?q.f(f,d,h):q.i)):p=e[f.path+h+"/"]||-1,~p){f=d[p];break}}if(!~p)break}c.cache.indexOf[i]=r=p}r=c.cache.indexOf[i]}return r},vetIndexOf:function(a,b){var c=this,d=c.indexOf(a,b);return~d?(b||(b=c.nodes[c.tank.currentIndex]),b.canTgt(c.nodes[d])?d:-1):-1},getDTO:function(a){var b=this;return b.dtos.hasOwnProperty(a)||(b.dtos[a]={name:a,stack:[]},"object"==typeof b.proxy.data&&b.proxy.data.hasOwnProperty(a)&&(b.dtos[a].stack[0]=b.proxy.data[a])),b.dtos[a]},go:function(){var a=this;return a.preMove(),a.tank.go(a.targets[0])},preMove:function(){var a=this;clearTimeout(a.waitTimer),a.pause=0},is:function(){var b,g,a=this,c=a.perms[0],d=E[0],e=d&&a!==d,f=arguments.length;if(e)for(g in c)if(c.hasOwnProperty(g)&&!u.hasOwnProperty(g)&&d.groups.hasOwnProperty(g))return c[g];for(;f--;)switch(arguments[f]){case"self":if(a===d||a.blessed)return 1;break;case"owner":if(c.owner&&a.owner===d)return 1;break;case"sub":if(c.sub&&e&&(a.bin.hasOwnProperty(b=d.tank.id)||a.tin.hasOwnProperty(b)))return 1;break;case"world":if(c.world&&(!d||!a.is("sub","owner","self")))return 1}return 0},pingOwner:function(a){var e,b=this,c=b.proxy,d=b.owner;d&&(e=""+b.tank.currentIndex+b.phase+d.tank.id+a,e!==b.lastPing&&(b.lastPing=e,d.proxy.get(a,c,c.status(),rb(c.state))))},setPrivs:function(){var a=this,b=a.proxy;b.hasOwnProperty("vars")&&(a.tvars=b.vars),b.hasOwnProperty("args")&&(a.targs=b.args),b.vars=a.vars,b.args=a.args},delPrivs:function(){var a=this,b=a.proxy;b.vars!==a.vars&&"object"==typeof b.vars&&(a.vars=b.vars),b.args!==a.args&&s(b.args)&&(a.args=b.args),a.hasOwnProperty("tvars")?(b.vars=a.tvars,delete a.tvars):delete b.vars,a.hasOwnProperty("targs")?(b.args=a.targs,delete a.targs):delete b.args}}),qb(l.node,{groups:{},cGrps:o,scope:function(a){for(var b=this,c=b.pkg,d=M;d--;)L[d](b,c,a)},canTgt:function(a){var b=this,c=b.pkg,d=b.pkg.nodes[this.restrict],e=b.pkg.nodes[a.ingress];return c.is("self")||c.is("sub","owner","world")&&(!d||a.within(d))&&(!e||b===e||a===e||this.within(e))&&!~a.conceal},within:function(a){var b=arguments.length?"object"==typeof a?a:this.pkg.nodes[a]:this.pkg.nodes[this.pkg.tank.currentIndex];return b?!(b===this||b.index&&this.path.indexOf(b.path)):!1}}),qb(l.proxy,{callbacks:function(a,b,c){var e,f,d=l(this);return a===!0&&(a=d.tank.currentIndex),b=+!!b,c=+!!c&&d.is("self"),f=""+a+b+c,d.cq.hasOwnProperty(f)?d.cq[f]:(e=function(){var e,f;return c&&!d.blessed&&(f=1,d.blessed=1),e=b?d.proxy.go(a):d.proxy.get.apply(d.proxy,[a].concat(p.call(arguments))),f&&(d.blessed=0),e},d.cq[f]=e)},query:function(){var c,e,a=l(this),b=[],d=arguments.length;if(d){for(;d--;){if(c=arguments[d],e=a.vetIndexOf(c),!~e)return!1;b[b.length]=a.nodes[e].path}return 1===b.length?b[0]:b.reverse()}return!1},perms:function(a){var b=this,c=l(b),d=arguments.length;return c.is("sub","owner","self")?(d&&(d>1&&(a=p.call(arguments)),b.state.perms=rb(c.perms[0]=sb(a,c.perms[0]))),!0):!1},get:function(a){var b=this,c=l(b),d=c.is("world","sub","owner","self")?c.vetIndexOf(a):-1;return~d?(c.args=b.args=p.call(arguments).slice(1),c.targets=[d],c.go(),c.pinned||c.pause||c.phase?!1:c.active||c.result===h?!0:c.result):!1},go:function(){var e,f,g,h,a=l(this),b=a.pause,c=[],d=0;if(a.is("world","sub","owner","self")){for(e=p.call(arguments),g=e.length,f=g;f--&&(h=a.vetIndexOf(e[f]),~h);)c[c.length]=h;if(g===c.length){if(g){for(c.reverse();c[c.length-1]===a.targets[0];)c.pop();a.targets=c.concat(a.targets)}d=a.go()||b}}return!!d},wait:function(){var g,i,j,a=this,b=l(a),c=arguments,d=c.length,e=d>2,f=2>d;return b.is("sub","owner","self")&&(d&&(f?j=c[0]:(j=c[1],g=c[0],"function"!=typeof g&&(i=b.indexOf(g),~i&&(g=function(){e?a.get.apply(a,[i].concat(p.call(c,2))):a.get.call(a,i)})))),!d||"number"==typeof j&&(f||"function"==typeof g))?(b.pause=1,b.tank.stop(),clearTimeout(b.waitTimer),d&&(b.waitTimer=setTimeout(function(){"function"==typeof g&&(b.waitFnc=g,b.waitArgs=e&&i===h?p.call(c,2):m),b.go()},~~j)),!0):!1},owner:function(a){var b=arguments.length,c=l(this),d=c.is("owner","self"),e=d||!c.owner;if(b){if(e){if(T(a)&&a!==c.proxy)return c.owner=l(a),a;if(a===!1)return c.owner=0,!0}return!1}return d?c.owner.proxy:!!c.owner},subs:function(a){var h,i,j,b=l(this),c=p.call(arguments),d=c.length,e=b.is("sub","owner","self"),f=b.tin,g=b.bin;if(d>1&&"remove"===a){if(!e)return 0;if(c.shift(),T(c[0])){for(j=c.length;j--;)if(!(c[j]=l(c[j])))return 0;return X(g,c)+X(f,c)}return d>1?(h=2===d&&null===c[0]&&b.caps[0]?b.caps[0]:Z(c[0]),~h.buffer?h.buffer?X(f,Y(f,h)):X(g,Y(g,h)):X(f,Y(f,h))+X(g,Y(g,h))):0}if(T(a)){if(!e)return 0;for(j=d;j--;)if(!(c[j]=l(c[j])))return 0;return X(f,c),W(g,c,b)}if(h=null===a&&b.caps[0]?b.caps[0]:d?Z(a):G.ctrue,i=~h.buffer?h.buffer?Y(f,h):Y(g,h):Y(f,h).concat(Y(g,h)),j=i.length,e){for(;j--;)i[j]=i[j].proxy;return i}return j},status:function(a){function g(a){return b.nodes[a].path}var b=l(this),c={},e=!arguments.length;return(e||"active"===a)&&(c.active=!!b.active),(e||"loops"===a)&&(c.loops=d.max((b.calls.join().match(new f("\\b"+b.tank.currentIndex+"."+b.phase,"g"))||[]).length-1,0)),(e||"paused"===a)&&(c.paused=!!b.pause),(e||"phase"===a)&&(c.phase=b.active?D[b.phase]:""),(e||"pinned"===a)&&(c.pinned=!!b.pinned),(e||"targets"===a)&&(c.targets=b.targets.map(g)),(e||"trail"===a)&&(c.trail=b.trail.map(g)),e?c:c[a]}}),j}a?define(i):b?module.exports=i(require):g.Salt||(g.Salt=i())}("function"==typeof define,"undefined"!=typeof exports,Array,Math,Object,RegExp,this);
+!function(a,b,c,d,e,f,g,h){function i(i){function T(a){return a instanceof j}function U(a,b,c){b&&(c?a.unshift(b):a.shift())}function V(){}function W(a,b,c){for(var f,g,d=c.nodes[c.tank.currentIndex],e=0,h=0;f=b[e];e++)g=f.tank.id,a.hasOwnProperty(g)||(h++,a[g]={inst:f,cap:d});return h}function X(a,b){for(var d,e,c=b.length,f=0;c--;)d=b[c],e=d.tank.id,a.hasOwnProperty(e)&&(f++,delete a[e]);return f}function Y(a,b){var c,d,e,f,g,h,i,j,k=[];a:for(j in a)if(a.hasOwnProperty(j)){i=a[j],d=I;b:for(;d--;)if(c=H[d],f=b[c],h=f.length){for(g=0;h>g;g++)if(e=f[g],g>=f.made&&(e=f[g]=$(c,e,typeof e),f.made++),e.f(i,e)){k[k.length]=i.inst;continue b}continue a}}return k}function Z(a){var b,c,d,e,g,i,j,k;if((null===a||a===h)&&(a=!1),i=typeof a,("object"!==i||!a.hasOwnProperty("is"))&&(q.hasOwnProperty("toJSON")&&(g=q.toJSON),q.toJSON=_,e="c"+JSON.stringify(a),g?q.toJSON=g:delete q.toJSON,G.hasOwnProperty(e)))return G[e];if(b={buffer:-1},"boolean"===i&&a)b.on=["/"],b.on.made=0;else if((j=a instanceof f)||"string"===i&&a||"number"===i&&a===~~a)b.on=[a],b.on.made=0;else if("object"===i&&!j)for(d=I;d--;)c=H[d],a.hasOwnProperty(c)&&(b[c]=s(a[c])?p.call(a[c]):[a[c]],b[c].made=0,k=1);for(d=I;d--;)c=H[d],b.hasOwnProperty(c)||(b[c]=m);return a.hasOwnProperty("buffer")&&(k||(b.on=["/"],b.on.made=0),-1!==a.buffer&&(b.buffer=a.buffer?1:0)),e&&(G[e]=b),b}function $(a,b,c){var d=b instanceof f,e={v:b,f:V};return"has"===a?d?(e.f=cb,e.g=gb,e.m=C.test(b)?"pAry":"sAry"):b&&"string"===c?(e.g=gb,~b.indexOf("/")?(e.f=db,e.m="pAry","/"!==e.v.charAt(0)&&(e.v="/"+e.v),"/"!==e.v.substr(-1)&&(e.v+="/")):(e.f=fb,e.m="sAry")):"number"===c&&b>=0&&b===~~b&&(e.f=jb):"from"===a?d?C.test(b)?(e.f=bb,e.g=kb):(e.f=cb,e.g=lb):b&&"string"===c?~b.indexOf("/")?(e.f=ab,e.g=kb,"/"!==e.v.charAt(0)&&(e.v="/"+e.v),"/"!==e.v.substr(-1)&&(e.v+="/")):(e.f=fb,e.g=lb):"number"===c&&b>=0&&b===~~b&&(e.f=eb,e.g=mb):"is"===a?e.f=ib:"on"===a?d?(e.f=bb,C.test(b)?(e.g=hb,e.m="path"):(e.g=hb,e.m="name")):b&&"string"===c?~b.indexOf("/")?(e.f=ab,e.g=hb,e.m="path","/"!==e.v.charAt(0)&&(e.v="/"+e.v),"/"!==e.v.substr(-1)&&(e.v+="/")):(e.f=eb,e.g=hb,e.m="name"):"number"===c&&b>=0&&b===~~b&&(e.f=eb,e.g=hb,e.m="index"):"within"===a&&(d?C.test(b)?(e.f=bb,e.g=nb):(e.f=cb,e.g=ob):b&&"string"===c?~b.indexOf("/")?(e.f=ab,e.g=nb,"/"!==e.v.charAt(0)&&(e.v="/"+e.v),"/"!==e.v.substr(-1)&&(e.v+="/")):(e.f=fb,e.g=ob):"number"===c&&b>-1&&b===~~b&&(e.f=pb)),e}function _(){return k+this}function ab(a,b){return~b.g(a,b).indexOf(b.v)}function bb(a,b){return b.v.test(b.g(a,b))}function cb(a,b){for(var c=b.g(a,b),d=c.length,e=b.v;d--;)if(e.test(c[d]))return 1}function db(a,b){for(var e,c=b.g(a,b),d=c.length,f=b.v;d--;)if(e=c[d],~e.indexOf(f))return 1}function eb(a,b){return b.v===b.g(a,b)}function fb(a,b){for(var c=b.g(a,b),d=c.length,e=b.v;d--;)if(c[d]===e)return 1}function gb(a,b){return a.inst[b.m]}function hb(a,b){var c=a.inst;return c.nodes[c.tank.currentIndex][b.m]}function ib(a,b){return a.inst.nodes[1].value===b.v}function jb(a,b){return b.v<a.inst.nodes.length}function kb(a){return a.cap.path}function lb(a){var b=a.cap;return b.index>1?b.path.slice(2,-1).split("/"):m}function mb(a){return a.cap.index}function nb(a){var b=a.inst,c=b.nodes[b.tank.currentIndex];return~c.parentIndex?b.nodes[c.parentIndex].path:""}function ob(a){var b=a.inst,c=b.nodes[b.tank.currentIndex];return c.parentIndex>1?b.nodes[c.parentIndex].path.slice(2,-1).split("/"):m}function pb(a,b){var c=a.inst,d=c.nodes,e=d[c.tank.currentIndex],f=d[b.v];return f?e.within(f):void 0}function qb(a){for(var c,d,b=1;c=arguments[b];b++)for(d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);return a}function rb(){for(var c,d,e,a=0,b={};c=arguments[a];a++)for(d in c)c.hasOwnProperty(d)&&(e=c[d],b[d]=null!==e&&"object"==typeof e?rb(e):e);return b}function sb(a,b){var c,d,f,g,h,e=typeof a,i="self";if("object"===e&&s(a))for(g=a.length,f=0;g>f;f++)b=sb(a[f],b);else if("string"===e||"object"===e||"boolean"===e){if(c=rb(b),"string"===e&&a)a=a.toLowerCase(),d="!"===a.charAt(0),d&&(a=a.substr(1)),a!==i&&(c[a]=!d);else if("boolean"===e)for(h in c)h!==i&&c.hasOwnProperty(h)&&(c[h]=a);else{b={};for(h in a)a.hasOwnProperty(h)&&(b[h.toLowerCase()]=a[h]);qb(c,b,{self:!0})}return c}return b}function tb(){var a=j.pkg();a.length!==N&&(O=1===(N=a.length)?[l.attrKey]:a.map(ub).filter(vb),O=O.map(wb))}function ub(a){return j.pkg(a).attrKey}function vb(a){return a}function wb(a){var b={f:0,r:0};return"function"==typeof a?b.f=a:b.r=a,b}function xb(a,b){for(var d,c=0;d=O[c];c++)if(d.r&&d.r.test(a)||d.f&&d.f(a,b))return 0;return 1}function yb(a){var b=typeof a;return"string"===b?{_import:a}:"function"===b?{_on:a}:"object"===b?a:{}}function zb(a,b,c){for(var j,l,d=c||{},f=yb(a),g=yb(b),h=e.keys(f),i=e.keys(g),k=0;l=h[k];k++)j=g.hasOwnProperty(l),d[l]=xb(l)?j?zb(f[l],g[l],{}):f[l]:j&&"_import"!==l?g[l]:f[l];for(k=0;l=i[k];k++)f.hasOwnProperty(l)||"_import"===l||(d[l]=g[l]);return d}function Ab(a,b){for(var g,c=b,d=a.slice(2,-1).split("/"),e=d.length,f=0;e>f;f++){if(g=d[f],!c.hasOwnProperty(g)||!xb(g,c[g]))return;c=c[g]}return c}function Bb(a,b,c){var d,e,g,h,i,f=typeof a;return"string"===f?i=a:"object"===f&&null!==a&&a.hasOwnProperty("_import")&&(g=a._import,h=typeof g,"object"===h?(g instanceof j&&(g=l(g).nodes[1].value),e=l.prepNode(g,g)||g):"function"===h?e={_on:g}:i=g),i&&!c.hasOwnProperty(i)&&y.test(i)&&(e=Ab(i,b)),e&&("string"===f?d=yb(e):"object"===f&&(d=zb(e,a))),d}var r,N,O,Q,S,j=(b||a?i("panzer"):g.Panzer).create(),k=(d.ceil(5e3*d.random())+3e3).toString(18),l=j.pkg("core"),m=[],n={},o=[],p=c.prototype.slice,q=f.prototype,s="function"==typeof c.isArray?c.isArray:function(a){return a instanceof c},t="@",u={world:!0,owner:!0,sub:!0,self:!0},v=rb(u),w=1,x=new f("[\\.\\|"+t+"]"),y=/^\/\/(?:\w+\/)+/,z=/^\/+|\/+$/g,A=/\W/,B=/\w/,C=/^\/.*\/.*\//,D={_on:0,_in:1,_out:2,_over:3,_bover:4,0:"on",1:"in",2:"out",3:"over",4:"bover"},E=[],F={"null":{f:0,i:0},program:{f:0,i:1},root:{f:function(a){return a.rootIndex}},parent:{f:function(a){return a.parentIndex}},child:{f:function(a){return a.firstChildIndex}},next:{f:function(a){return a.nextIndex}},previous:{f:function(a){return a.previousIndex}},oldest:{f:function(a,b,c){var d=b[a.parentIndex];return d?d[("y"===c.charAt(0)?"first":"last")+"ChildIndex"]:-1}},self:{f:function(a){return a.index}}},G={},H=["has","within","on","from","is"],I=H.length,J={_root:function(a,b,c,d,e,f,g){d.rootIndex=2>g||b&&c._root?g:e.rootIndex},_restrict:function(a,b,c,d,e,f,g){var h=a.substr(1);d[h]=b&&c[a]?g:e?e[h]:-1},_group:function(a,b,c,d,f){var g,h,i,j;if(f&&(d.groups=f.groups,d.cGrps=f.cGrps),b){for(h=rb(d.groups),g=c[a],s(g)||(g=[g]),i=g.length;i--;)j=g[i],"string"==typeof j&&(j=j.trim().toLowerCase())&&!u.hasOwnProperty(j)&&(h[j.toLowerCase()]=!0);d.groups=h,d.cGrps=e.keys(h)}},_perms:function(a,b,c,d,e,f){var g;b?(g=sb(c[a],e.lp),g&&(d.perms=d.lp=g)):e?(d.perms=0,d.lp=e.lp):f.perms=[d.perms=d.lp=u]},_owner:function(a,b,c,d,e,f){d.oGate=0,b?(f.ownable=d.oGate=1,d.ping=c._owner):d.ping=e?e.ping:-1},_alias:function(a,b,c,d,e,f,g){b&&c._alias&&"string"==typeof c._alias&&!x.test(c._alias)&&B.test(c._alias)?(f.tokens[c._alias]={i:g,f:0},d.alias=c._alias):d.alias=""},_capture:function(a,b,c,d,e,f){b?d.caps=Z(c._capture):e?d.caps=e.caps:(d.caps=0,f.caps=[])},_data:function(a,b,c,d){var f,i,j,k,l,e={},g=0;if(d.dcfgs=[],b){for(f=s(c._data)?c._data:[c._data],i=f.length;i>g;g++)if(j=f[g],k=typeof j,"string"===k&&j&&(e[j]={use:0,name:j,value:h}),"object"===k&&j)for(l in j)j.hasOwnProperty(l)&&(e[l]={use:1,name:l,value:j[l]});for(l in e)e.hasOwnProperty(l)&&(d.dcfgs[d.dcfgs.length]=e[l])}},_sequence:function(a,b,c,d,e){b?(d.seq=c[a]?[]:0,d.lastWalk=d.seq):(d.seq=0,d.lastWalk=e?e.lastWalk:0,d.lastWalk&&(d.lastWalk[d.lastWalk.length]=d.index))},_pins:function(a,b,c,d,e){d.pins=b?!!c._pins:e?e.pins:!0},_on:function(a,b,c,d){var e=c[a];b&&"function"==typeof e&&(d.fncs[D[a]]=e)},_tail:function(a,b,c,d,e){var f;if(b){if(f=c[a],f===!1||0>f)return d.tail=0,void 0;d.tail={q:f===!0?d.index:f}}else d.tail=e?e.tail:0},_conceal:function(a,b,c,d,e,f,g){d.conceal=-1,b&&g>1?c._conceal&&(d.conceal=g):e&&(d.conceal=e.conceal)}},K={_sequence:function(a,b,c,d){delete d.lastWalk},_alias:function(a,b,c,d,e,f,g){var h=d.alias;0===g?d.alias="null":1===g?d.alias="program":h&&f.tokens[h].i!==g&&(d.alias="")},_on:function(a,b,c,d,e,f,g){var i,j,k,h=-1,l=0;b&&"function"!=(j=typeof(k=c[a]))&&("string"===j&&k.length?(">"===k.charAt(0)&&(k=k.substr(1),l=1),h=f.indexOf(k,d)):"number"===j&&f.nodes[k]&&(h=k),!~h||"_on"===a&&h===g||(i=D[a],d.reds[i]=[l,h],d.fncs[i]=w))},_wait:function(a,b,d,e,f,g){var i,j,k,h=d[a],l=m;if(e.delay=0,b&&h!==!1){if(c.isArray(h)?l=h:h!==!0&&(l=[h]),k=l.length,j=typeof l[0],1===k&&"number"!==j)return;if(k>1&&"function"!==j){if(i=g.indexOf(l[0]),!~e)return;l[0]=i}e.delay=l}},_next:function(a,b,c,d,e,f){var h,g=c[a];d.nxt=-1,d.nxtc=0,b&&("string"==typeof g&&">"===g.charAt(0)&&(d.nxtc=1,g=g.substr(1)),~(h=f.indexOf(g,d))&&(d.nxt=h))},_perms:function(a,b,c,d){delete d.lp}},L={0:function(a,b){a.oGate&&~a.ping&&b.pingOwner(a.ping)},1:function(a,b,c){var h,i,j,k,d=b.proxy.data,e=a.dcfgs,f=e.length,g=0;if(a.dcfgs.length)for(k=c?function(){d.hasOwnProperty(i)&&j.stack.unshift(d[i]),d[i]=h.use?h.value:j.stack[0]}:function(){j.stack.length?d[i]=j.stack.shift():(delete b.dtos[i],delete d[i])};f>g;g++)h=e[g],i=h.name,j=b.getDTO(i),k()},2:function(a,b,c){U(b.perms,a.perms,c),b.proxy.state.perms=rb(b.perms[0])},3:function(a,b,c){U(b.caps,a.caps,c),1!==a.index||c||(b.bin={},b.tin={})}},M=4,P=[],R=[];j.version="0.5.4",J._ingress=J._restrict,J._in=J._out=J._over=J._bover=J._on,K._in=K._out=K._over=K._bover=K._on;for(r in J)J.hasOwnProperty(r)&&(P[P.length]=r);Q=P.length;for(r in K)K.hasOwnProperty(r)&&(R[R.length]=r);return S=R.length,F["."]=F.self,F[".."]=F.parent,F.youngest=F.oldest,Z(!0),qb(l,{actives:[],attrKey:/^_/,badKey:/^\d|^\W|[^a-zA-Z\d\-_\+=\(\)\*\&\^\%\$\#\!\~\`\{\}\"\'\:\;\?\, ]+|^toString$/,prepTree:function(a){return tb(),T(a)?l(a).nodes[1].value:void 0},prepNode:function(a,b){for(var c,d=a;d=Bb(d,b,{});)c=d;return c},init:function(){var g,h,i,j,k,l,a=this,b=E[0],c={},d={name:"_null",path:"..//",depth:0,index:0,pins:!0,alias:"null",root:!0,perms:v,groups:o},e=a.nodes,f=e.length;for(a.bin={},a.tin={},a.groups=n,a.nStr=a.pStr=a.lastPing="|",a.sAry=[],a.pAry=[],a.vars={},a.tokens={},a.cq={},a.args=[],a.calls=[],a.trail=[],a.tgtTrail=-1,a.dtos={},a.waitTimer=a.waitFnc=a.waitArgs=0,a.cache={indexOf:{}},a.active=0,a.blessed=0,a.nids={},a.pinned=0,a.pinning={},a.pinCnt=0,a.targets=[],a.phase=0,a.owner=a.ownable=0,a.nodes[0].name="_null",a.nodes[1].name="_program",g=0;f>g;g++){for(i=e[g],j=e[i.parentIndex],a.nids[i.path]=g,g>1&&(a.nStr+=i.name+"|",a.sAry[a.sAry.length]=i.name),a.pStr+=i.path+"|",a.pAry[a.pAry.length]=i.path,i.pkg=a,i.fncs=[0,0,0,0,0],i.reds=[],h=0;Q>h;h++)k=P[h],J[k](k,i.attrs.hasOwnProperty(k),i.attrs,i,j,a,g);i.fncs[0]||"function"!=typeof i.value||(i.fncs[0]=i.value)}for(g=0;f>g;g++)for(i=e[g],h=0;S>h;h++)k=R[h],K[k](k,i.attrs.hasOwnProperty(k),i.attrs,i,j,a,g);for(l in a.pkgs)a.pkgs.hasOwnProperty(l)&&(a.pkgs[l].proxy.data=c,a.pkgs[l].proxy.state=d);b&&(a.ownable&&(a.owner=b),b.caps[0]&&W(b.tin,[a],b))},onBegin:function(){var a=this;E.unshift(a),l.actives.unshift(a.proxy),a.active=1,a.preMove(),a.pinned&&a.tank.stop()},onNode:function(a,b){var c=this,d=c.proxy.state,e=c.nodes[b];d.name=e.name,d.index=e.index,d.depth=e.depth,d.path=e.path,d.pins=e.pins,d.alias=e.alias,d.root=e.index==e.rootIndex,d.groups=e.cGrps.concat(),d.delays=!!e.delay,c.groups=e.groups},onScope:function(a,b){var c=this,d=c.nodes[c.tank.currentIndex];c.phase=b?1:2,d.scope(b)},onEngage:function(){var a=this;a.setPrivs()},onRelease:function(){var a=this;a.delPrivs()},onTraverse:function(a,b){var o,p,q,r,c=this,d=c.args,e=c.proxy,f=c.tank,g=c.nodes[f.currentIndex],i=g.fncs[b],j=!b,k=i===w,l=j&&g.delay,n=0;c.phase=b,~f.targetIndex||(c.tgtTrail=c.targets.shift()),j&&g.seq&&e.go.apply(e,g.seq),k&&(q=g.reds[b],p=q[1],q[0]?e.get.apply(e,[p].concat(d)):e.go(p)),j&&(r=g.nxt,~r&&(n=1,g.nxtc?e.get.apply(e,[r].concat(d)):e.go(r)),l&&e.wait.apply(e,l)),i&&(c.calls[c.calls.length]=g.index+"."+b,k||(o=c.targets.length,c.result=i.apply(e,!o||1===o&&n?d:m))),(k||c.paused||c.pinned)&&(c.result=h)},onTraversing:function(){var a=this;a.waitFnc&&(a.waitFnc.apply(a.proxy,a.waitArgs),a.waitFnc=a.waitArgs=0)},onTraversed:function(){var a=this,b=a.proxy,c=a.nodes[a.tank.currentIndex];c.caps&&W(a.bin,Y(a.tin,c.caps),a),a.tin={},!a.phase&&~a.tgtTrail&&(a.trail[a.trail.length]=a.tgtTrail,a.tgtTrail=-1),b.args!==a.args&&s(b.args)&&(a.args=b.args),"object"==typeof b.vars&&(a.vars=b.vars),b.vars=a.vars},onEnd:function(){var d,h,i,j,a=this,b=a.tank,c=E[1],e=a.pause||a.pinned||a.phase,f=a.targets.length,g=a.nodes[b.currentIndex];if(e||!f&&!g.tail){if(e)c&&c.nodes[(d=c.tank).currentIndex].pins&&g.pins&&!a.pinning[d.id]&&!c.pinning[b.id]&&(c.pinned++,a.pinning[d.id]=c,a.pinCnt++,d.stop());else{if(~g.ping){if(a.pingOwner(g.ping),a.paused||a.pinned||a.targets.length)return;a.lastPing=""}if(a.args=[],a.calls=[],a.trail=[],g.index||(a.vars={}),a.pinCnt){i=a.pinning;for(j in i)i.hasOwnProperty(j)&&i[j].pinned--;b.post(function(){var b,c;a.pinning={},a.pinCnt=0;for(c in i)i.hasOwnProperty(c)&&(b=i[c],b.pinned||b.pause||b.go())})}}E.shift(),l.actives.shift(),a.active=0}else f?b.go(a.targets[0]):~(h=a.indexOf(g.tail.q))&&h!==g.index&&a.proxy.go(h)}}),qb(l.prototype,{indexOf:function(a,b){var f,g,h,i,j,k,l,m,n,o,p,q,c=this,d=c.nodes,e=c.nids,r=-1;switch(b=f=b||c.nodes[c.tank.currentIndex],typeof a){case"object":null!==a&&(a=a.index);case"number":d[a]&&(r=a);break;case"function":a+="";case"string":if("..//"===a||"//"===a){r="//"===a?1:0;break}if(g=!x.test(a),"/"!==a.slice(-1)&&(a+="/"),"/"===a.charAt(0)){if("/"===a.charAt(1)){if(g){r=e[a]||-1;break}f=d[0]}else if(f=d[f.rootIndex],g){r=e[f.path+a.substr(1)]||-1;break}}else if(g){r=e[f.path+a]||-1;break}if(a=a.replace(z,""),i=a+b.index,!c.cache.indexOf.hasOwnProperty(i)){j=a.split("/"),l=j.length;a:for(k=0;l>k;k++){for(m=j[k].split("|"),o=m.length,n=0;o>n;n++){if(h=m[n],p=-1,!h)break a;if(A.test(h)?(h.charAt(0)===t&&(h=h.slice(1)),q=F[h]||c.tokens[h],q&&(p=q.f?q.f(f,d,h):q.i)):p=e[f.path+h+"/"]||-1,~p){f=d[p];break}}if(!~p)break}c.cache.indexOf[i]=r=p}r=c.cache.indexOf[i]}return r},vetIndexOf:function(a,b){var c=this,d=c.indexOf(a,b);return~d?(b||(b=c.nodes[c.tank.currentIndex]),b.canTgt(c.nodes[d])?d:-1):-1},getDTO:function(a){var b=this;return b.dtos.hasOwnProperty(a)||(b.dtos[a]={name:a,stack:[]},"object"==typeof b.proxy.data&&b.proxy.data.hasOwnProperty(a)&&(b.dtos[a].stack[0]=b.proxy.data[a])),b.dtos[a]},go:function(){var a=this;return a.preMove(),a.tank.go(a.targets[0])},preMove:function(){var a=this;clearTimeout(a.waitTimer),a.pause=0},is:function(){var b,g,a=this,c=a.perms[0],d=E[0],e=d&&a!==d,f=arguments.length;if(e)for(g in c)if(c.hasOwnProperty(g)&&!u.hasOwnProperty(g)&&d.groups.hasOwnProperty(g))return c[g];for(;f--;)switch(arguments[f]){case"self":if(a===d||a.blessed)return 1;break;case"owner":if(c.owner&&a.owner===d)return 1;break;case"sub":if(c.sub&&e&&(a.bin.hasOwnProperty(b=d.tank.id)||a.tin.hasOwnProperty(b)))return 1;break;case"world":if(c.world&&(!d||!a.is("sub","owner","self")))return 1}return 0},pingOwner:function(a){var e,b=this,c=b.proxy,d=b.owner;d&&(e=""+b.tank.currentIndex+b.phase+d.tank.id+a,e!==b.lastPing&&(b.lastPing=e,d.proxy.get(a,c,c.status(),rb(c.state))))},setPrivs:function(){var a=this,b=a.proxy;b.hasOwnProperty("vars")&&(a.tvars=b.vars),b.hasOwnProperty("args")&&(a.targs=b.args),b.vars=a.vars,b.args=a.args},delPrivs:function(){var a=this,b=a.proxy;b.vars!==a.vars&&"object"==typeof b.vars&&(a.vars=b.vars),b.args!==a.args&&s(b.args)&&(a.args=b.args),a.hasOwnProperty("tvars")?(b.vars=a.tvars,delete a.tvars):delete b.vars,a.hasOwnProperty("targs")?(b.args=a.targs,delete a.targs):delete b.args}}),qb(l.node,{groups:{},cGrps:o,scope:function(a){for(var b=this,c=b.pkg,d=M;d--;)L[d](b,c,a)},canTgt:function(a){var b=this,c=b.pkg,d=b.pkg.nodes[this.restrict],e=b.pkg.nodes[a.ingress];return c.is("self")||c.is("sub","owner","world")&&(!d||a.within(d))&&(!e||b===e||a===e||this.within(e))&&!~a.conceal},within:function(a){var b=arguments.length?"object"==typeof a?a:this.pkg.nodes[a]:this.pkg.nodes[this.pkg.tank.currentIndex];return b?!(b===this||b.index&&this.path.indexOf(b.path)):!1}}),qb(l.proxy,{callbacks:function(a,b,c){var e,f,d=l(this);return a===!0&&(a=d.tank.currentIndex),b=+!!b,c=+!!c&&d.is("self"),f=""+a+b+c,d.cq.hasOwnProperty(f)?d.cq[f]:(e=function(){var e,f;return c&&!d.blessed&&(f=1,d.blessed=1),e=b?d.proxy.go(a):d.proxy.get.apply(d.proxy,[a].concat(p.call(arguments))),f&&(d.blessed=0),e},d.cq[f]=e)},query:function(){var c,e,a=l(this),b=[],d=arguments.length;if(d){for(;d--;){if(c=arguments[d],e=a.vetIndexOf(c),!~e)return!1;b[b.length]=a.nodes[e].path}return 1===b.length?b[0]:b.reverse()}return!1},perms:function(a){var b=this,c=l(b),d=arguments.length;return c.is("sub","owner","self")?(d&&(d>1&&(a=p.call(arguments)),b.state.perms=rb(c.perms[0]=sb(a,c.perms[0]))),!0):!1},get:function(a){var b=this,c=l(b),d=c.is("world","sub","owner","self")?c.vetIndexOf(a):-1;return~d?(c.args=b.args=p.call(arguments).slice(1),c.targets=[d],c.go(),c.pinned||c.pause||c.phase?!1:c.active||c.result===h?!0:c.result):!1},go:function(){var e,f,g,h,a=l(this),b=a.pause,c=[],d=0;if(a.is("world","sub","owner","self")){for(e=p.call(arguments),g=e.length,f=g;f--&&(h=a.vetIndexOf(e[f]),~h);)c[c.length]=h;if(g===c.length){if(g){for(c.reverse();c[c.length-1]===a.targets[0];)c.pop();a.targets=c.concat(a.targets)}d=a.go()||b}}return!!d},wait:function(){var g,i,j,a=this,b=l(a),c=arguments,d=c.length,e=d>2,f=2>d;return b.is("sub","owner","self")&&(d&&(f?j=c[0]:(j=c[1],g=c[0],"function"!=typeof g&&(i=b.indexOf(g),~i&&(g=function(){e?a.get.apply(a,[i].concat(p.call(c,2))):a.get.call(a,i)})))),!d||"number"==typeof j&&(f||"function"==typeof g))?(b.pause=1,b.tank.stop(),clearTimeout(b.waitTimer),d&&(b.waitTimer=setTimeout(function(){"function"==typeof g&&(b.waitFnc=g,b.waitArgs=e&&i===h?p.call(c,2):m),b.go()},~~j)),!0):!1},owner:function(a){var b=arguments.length,c=l(this),d=c.is("owner","self"),e=d||!c.owner;if(b){if(e){if(T(a)&&a!==c.proxy)return c.owner=l(a),a;if(a===!1)return c.owner=0,!0}return!1}return d?c.owner.proxy:!!c.owner},subs:function(a){var h,i,j,b=l(this),c=p.call(arguments),d=c.length,e=b.is("sub","owner","self"),f=b.tin,g=b.bin;if(d>1&&"remove"===a){if(!e)return 0;if(c.shift(),T(c[0])){for(j=c.length;j--;)if(!(c[j]=l(c[j])))return 0;return X(g,c)+X(f,c)}return d>1?(h=2===d&&null===c[0]&&b.caps[0]?b.caps[0]:Z(c[0]),~h.buffer?h.buffer?X(f,Y(f,h)):X(g,Y(g,h)):X(f,Y(f,h))+X(g,Y(g,h))):0}if(T(a)){if(!e)return 0;for(j=d;j--;)if(!(c[j]=l(c[j])))return 0;return X(f,c),W(g,c,b)}if(h=null===a&&b.caps[0]?b.caps[0]:d?Z(a):G.ctrue,i=~h.buffer?h.buffer?Y(f,h):Y(g,h):Y(f,h).concat(Y(g,h)),j=i.length,e){for(;j--;)i[j]=i[j].proxy;return i}return j},status:function(a){function g(a){return b.nodes[a].path}var b=l(this),c={},e=!arguments.length;return(e||"active"===a)&&(c.active=!!b.active),(e||"loops"===a)&&(c.loops=d.max((b.calls.join().match(new f("\\b"+b.tank.currentIndex+"."+b.phase,"g"))||[]).length-1,0)),(e||"paused"===a)&&(c.paused=!!b.pause),(e||"phase"===a)&&(c.phase=b.active?D[b.phase]:""),(e||"pinned"===a)&&(c.pinned=!!b.pinned),(e||"targets"===a)&&(c.targets=b.targets.map(g)),(e||"trail"===a)&&(c.trail=b.trail.map(g)),e?c:c[a]}}),j}a?define(i):b?module.exports=i(require):g.Salt||(g.Salt=i())}("function"==typeof define,"undefined"!=typeof exports,Array,Math,Object,RegExp,this);

0 comments on commit 243bfa8

Please sign in to comment.