forked from eliperelman/search
-
Notifications
You must be signed in to change notification settings - Fork 1
/
script.js
353 lines (353 loc) · 177 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
(function(){var va={"0.js":"app","1.js":"basis.app","2.js":"basis.ui","3.js":"basis.l10n","4.js":"basis.event","5.js":"basis.data","6.js":"basis.dom.wrapper","7.js":"basis.template","8.js":"basis.template.html","9.js":"basis.dom.event","a.js":"basis.template.htmlfgen","b.js":"app.modules","c.js":"basis.data.dataset","d.js":"basis.net.action","e.js":"basis.net.ajax","f.js":"basis.ua","g.js":"basis.net","h.js":"basis.net.jsonp","i.js":"app.list","j.js":"moment"},ua={"0.css":"","0.json":[{name:"rasterizeHTML.js",
description:'Renders HTML into the browser"s canvas',website:"https://github.com/cburgmer/rasterizeHTML.js"},{name:"pretty-html",description:'HTML logging that"s easy on the eyes',website:"https://github.com/MatthewMueller/pretty-html"},{name:"slip",description:"UI library for manipulating lists via swipe and drag gestures",website:"https://github.com/pornel/slip"},{name:"epub.js",description:"Enhanced eBooks in the browser",website:"https://github.com/futurepress/epub.js"},{name:"URI.js",description:"URL mutation library",
website:"http://medialize.github.io/URI.js/"}],"0.tmpl":[[1,0,["element"],"section",[2,0,0,"id","app"],[4,[["app_state-","loading",0]],0,"main"],[1,0,0,"div",[2,0,0,"id","loading"],[1,0,0,"p",[3,1,["message"]]]],[1,0,0,"div",[4,0,0,"row view"],[8,1,["featured"]],[8,1,["hot"]]],[8,1,["search"]],[1,0,0,"div",[4,0,0,"row view"],[8,1,["latest"]],[8,1,["random"]]]]],"1.tmpl":[[1,0,["element"],"div",[4,0,0,"span6"],[1,0,0,"h4",[3,1,["header"]]],[1,0,0,"dl",[4,0,0,"dl-horizontal"],[8,1,["childNodesHere"]]]]],
"2.tmpl":[[1,0,["element"],"div",[1,0,0,"dt",[1,0,0,"a",[2,[["description"],[0]],0,"title"],[2,[["website"],[0]],0,"href"],[2,0,0,"target","_blank"],[3,1,["name"]]]],[1,0,0,"dd",[2,[["description"],[0]],0,"title"],[1,0,0,"p",[4,0,0,"component-desc"],[3,1,["description"]]]]]],"3.tmpl":[[1,0,["element"],"div",[2,0,0,"id","components"],[4,0,0,"row view"],[1,0,0,"table",[4,[["table-","empty",0]],0,"table span12"],[1,0,0,"caption",[1,0,0,"input",[4,0,0,"search input-medium search-query"],[2,0,0,"type",
"search"],[2,[["count"],["Search in ",0," components..."]],0,"placeholder"],[2,0,0,"autofocus"],[6,"keyup","search"]]],[1,0,0,"thead",[1,0,0,"tr",[1,0,0,"th",[2,0,0,"data-sort","name"],[6,"click","sortByName"],[3,0,0,"Name"]],[1,0,0,"th",[2,0,0,"data-sort","description"],[6,"click","sortByDescription"],[3,0,0,"Description"]],[1,0,0,"th",[2,0,0,"data-sort","owner"],[6,"click","sortByOwner"],[3,0,0,"Owner"]],[1,0,0,"th",[2,0,0,"data-sort","created"],[6,"click","sortByCreated"],[3,0,0,"Created"]],[1,
0,0,"th",[2,0,0,"data-sort","updated"],[6,"click","sortByUpdated"],[3,0,0,"Updated"]],[1,0,0,"th",[2,0,0,"data-sort","forks"],[6,"click","sortByForks"],[3,0,0,"Forks"]],[1,0,0,"th",[2,0,0,"data-sort","stars"],[6,"click","sortByStars"],[3,0,0,"Stars"]]]],[1,1,["childNodesElement"],"tbody",[4,0,0,"list"]]],[1,0,0,"div",[4,0,0,"clearfix"]],[1,0,0,"div",[4,0,0,"row pagination pagination-large pagination-centered"],[1,0,0,"ul",[4,0,0,"paging"]]],[1,0,0,"div",[4,[["message-","empty",0]],0,"message row"],
[2,0,0,"id","search-notfound"],[3,0,0,"No matching components found. Take a deep breath and try something else."]]]],"4.tmpl":[[1,0,["element"],"tr",[1,0,0,"td",[4,0,0,"name"],[1,0,0,"a",[2,[["description"],[0]],0,"title"],[2,[["website"],[0]],0,"href"],[2,0,0,"target","_blank"],[3,1,["name"]]]],[1,0,0,"td",[4,0,0,"description"],[2,[["description"],[0]],0,"title"],[1,0,0,"p",[3,1,["description"]]]],[1,0,0,"td",[4,0,0,"owner"],[3,1,["owner"]]],[1,0,0,"td",[4,0,0,"created"],[1,0,0,"time",[2,[["created"],
[0]],0,"datetime"],[3,1,["createdAgo"]]]],[1,0,0,"td",[4,0,0,"updated"],[1,0,0,"time",[2,[["updated"],[0]],0,"datetime"],[3,1,["updatedAgo"]]]],[1,0,0,"td",[4,0,0,"forks"],[3,1,["forks"]]],[1,0,0,"td",[4,0,0,"stars"],[3,1,["stars"]]]]],"7.js":function(c,M,a,r,U,J,aa,da){function y(d){"string"==typeof d&&(d=a.l10n.token(d));if(!d)return null;var h=d.basisObjectId,b=K[h];b||(b=K[h]=new t(new la(d)));return b}function I(d){h[z.extname(d)]&&a.resource(d)().startUse()}function L(d){h[z.extname(d)]&&a.resource(d)().stopUse()}
function G(){this.destroyBuilder&&N.call(this);for(var d=0,h;h=this.attaches_[d];d++)h.handler.call(h.context)}function s(d){for(var h=[],b=0;b<d.length;b++)h.push(Array.isArray(d[b])?s(d[b]):d[b]);return h}function O(d,h,b,g){var k=d,t;"function"==typeof k&&(h="baseURI"in d?d.baseURI:h,t="url"in d?d.url:t,k=k());k instanceof a.Token&&(h="baseURI"in d?d.baseURI:h,t="url"in d?d.url:t,k=k.get());Array.isArray(k)?(b&&(k=s(k)),k={tokens:k}):"object"==typeof k&&Array.isArray(k.tokens)||(k=String(k));"string"==
typeof k&&(k=T(k,h,g,t));return k}function N(){var d=O(this.source,this.baseURI),h=this.destroyBuilder,b=this.builder(d.tokens,this),k=this.deps_;if(k){this.deps_=null;for(var g=0,t;t=k[g];g++)t.bindingBridge.detach(t,N,this)}if(d.deps&&d.deps.length)for(this.deps_=k=d.deps,g=0;t=k[g];g++)t.bindingBridge.attach(t,N,this);this.createInstance=b.createInstance;this.clearInstance=b.destroyInstance;this.getBinding=function(){return{names:b.keys}};this.destroyBuilder=b.destroy;if(d=d.resources&&0<d.resources.length?
d.resources:null)for(g=0;k=d[g];g++)I(k);if(this.resources)for(g=0;k=this.resources[g];g++)L(k);this.resources=d;h&&h(!0)}function A(d){return function(){var h;h=(h=document.getElementById(d))&&"SCRIPT"==h.tagName?"text/basis-template"==h.type?h.textContent||h.text:"":"";return h}}function B(){var d=a.array(arguments).join("."),h=ia[d];h||(h=new Q("",d),ia[d]=h);return h}function E(d,h){for(var b=[],g={},k=[],t=0;t<h.length;t++)g[h[t]]||(g[h[t]]=!0,k.push(h[t]));b.source=k.join("/");g={base:!0};for(k=
0;k<h.length;k++)t=h[k]||"base",t==d||g[t]||(W(t),g[t]=!0,b.push(t),h.splice.apply(h,[k+1,0].concat(fa[t].fallback)));b.unshift(d);"base"!=d&&b.push("base");b.value=b.join("/");return b}function Y(d,h){for(var b=fa[d].sourcesList,k=0,g;g=b[k];k++)if(g.hasOwnProperty(h))return g[h];return""}function W(d){d||(d="base");if(fa[d])return fa[d].theme;if(!/^([a-z0-9\_\-]+)$/.test(d))throw 31;var h={},b=[h],g=new qa;fa[d]={theme:g,sources:h,sourcesList:b,fallback:[]};var k=function(b,g){!1==b in h&&(h[b]=
g,-1!=fa[ra].fallback.indexOf(d)&&B(b).set());return B(b)};a.object.extend(g,{name:d,fallback:function(h){if(g!==xa&&0<arguments.length){var b="string"==typeof h?h.split("/"):[],k={},b=E(d,b);if(fa[d].fallback.source!=b.source){fa[d].fallback.source=b.source;for(var t in fa){var a=fa[t].fallback,b=E(t,(a.source||"").split("/"));if(b.value!=a.value){k[t]=!0;fa[t].fallback=b;a=fa[t].sourcesList;a.length=b.length;for(var m=0;m<a.length;m++)a[m]=fa[b[m]].sources}}}for(t in k)if(-1!=fa[ra].fallback.indexOf(t)){b=
void 0;for(b in ia)B(b).set();break}}b=fa[d].fallback.slice(1);b.source=fa[d].fallback.source;return b},define:function(d,h){"function"==typeof d&&(d=d());if("string"==typeof d){if("object"==typeof h){var b=d,t=h,a={},m;for(m in t)t.hasOwnProperty(m)&&(a[m]=k(b+"."+m,t[m]));return a}return 1==arguments.length?B(d):k(d,h)}if("object"==typeof d){t=d;for(b in t)t.hasOwnProperty(b)&&k(b,t[b]);return g}},apply:function(){if(d!=ra){ra=d;for(var h in ia)B(h).set();h=0;for(var b;b=ya[h];h++)b.fn.call(b.context,
d)}return g},getSource:function(b,g){return g?Y(d,b):h[b]},drop:function(b){h.hasOwnProperty(b)&&(delete h[b],-1!=fa[ra].fallback.indexOf(d)&&B(b).set())}});fa[d].fallback=E(d,[]);b.push(fa.base.sources);return g}a.require("./3.js");c=this.path;r=a.Class;var F=a.cleaner,z=a.path,ba=a.array.search,f=a.array.add,e=a.array.remove,n=[],u={},p=1,R=2,q=4,l=6,b=3,H=8,w=0,V=1,D=2,$=3,ga=4,oa={4:"class",5:"style"},pa={"class":q,style:5},ka=4,Z=/((?:.|[\r\n])*?)(\{(?:l10n:([a-zA-Z_][a-zA-Z0-9_\-]*(?:\.[a-zA-Z_][a-zA-Z0-9_\-]*)*(?:\.\{[a-zA-Z_][a-zA-Z0-9_\-]*\})?)\})?|<(\/|!--(\s*\{)?)?|$)/g,
ja=/([a-z_][a-z0-9\-_]*)(:|\{|\s*(\/?>)?)/ig,ma=/([a-z_][a-z0-9_\-]*)(:|\{|=|\s*)|(\/?>)/ig,g=/(.|[\r\n])*?--\x3e/g,x=/([a-z_][a-z0-9_\-]*(?::[a-z_][a-z0-9_\-]*)?)>/ig,v=/([a-z_][a-z0-9_]*)(\||\}\s*)/ig,P=/"((?:(\\")|[^"])*?)"\s*/g,X=/^/g,d={text:/((?:.|[\r\n])*?)(?:<\/b:text>|$)/g},m=/\\"/g,k=function(h){var k=[],t=[],a={childs:k},C,l,ea,w=!1,T=0,qa,f=Z,e=0,K;for(h=h.trim();e<h.length||f!=Z;)if(C=f.lastIndex=e,(K=f.exec(h))&&K.index===e){e=f.lastIndex;switch(f){case Z:qa=C+K[1].length;T!=qa&&(C=
T==C?K[1]:h.substring(T,qa),(l=C.replace(/\s*(\r\n?|\n\r?)\s*/g,""))&&a.childs.push({type:b,len:C.length,value:l}));T=qa;K[3]?a.childs.push({type:b,refs:["l10n:"+K[3]],value:"{l10n:"+K[3]+"}"}):"{"==K[2]?(ea=e-1,a.childs.push(l={type:b}),f=v):K[4]?"/"==K[4]?(l=null,f=x):(a.childs.push(l={type:H}),K[5]?(ea=e-K[5].length,f=v):(ea=e,f=g)):K[2]&&(w=!0,t.push(a),a.childs.push(l={type:p,attrs:[],childs:[]}),a=l,f=ja);break;case x:K[1]!==(a.prefix?a.prefix+":":"")+a.name?a.childs.push({type:b,value:"</"+
K[0]}):a=t.pop();f=Z;break;case ja:case ma:if(":"==K[2]){l.prefix?f=X:l.prefix=K[1];break}K[1]&&(l.name=K[1],l.type==R&&a.attrs.push(l));if("{"==K[2]){f=l.type==p?v:X;break}if(K[3]){w=!1;if("/>"==K[3])a=t.pop();else if("b"==a.prefix&&a.name in d){f=d[a.name];break}f=Z;break}if("="==K[2]){f=P;break}l={type:R};f=ma;break;case g:l.value=h.substring(ea,e-3);f=Z;break;case v:l.refs?l.refs.push(K[1]):l.refs=[K[1]];"|"!=K[2]&&(l.type==b?(e-=K[2].length-1,l.value=h.substring(ea,e),f=Z):l.type==H?f=g:l.type==
R&&"="==h[e]?(e++,f=P):(l={type:R},f=ma));break;case P:l.value=K[1].replace(m,'"');l={type:R};f=ma;break;case d.text:a.childs.push({type:b,value:K[1]});a=t.pop();f=Z;break;default:throw 29;}f==Z&&(T=e)}else if(f==v&&l&&l.type==H)f=g;else{w&&(a=t.pop());l&&a.childs.pop();if(l=a.childs.pop())l.type!=b||l.refs?a.childs.push(l):T-="len"in l?l.len:l.value.length;w=!1;f=Z}T!=e&&a.childs.push({type:b,value:h.substring(T,e)});k.templateTokens=!0;return k},K={},la=a.Token.subclass({className:c+".L10nProxyToken",
token:null,url:"",init:function(d){this.url=d.dictionary.resource.url+":"+d.name;this.token=d;this.set();d.attach(this.set,this)},set:function(){return a.Token.prototype.set.call(this,"markup"==this.token.type?'<span class="basisjs-markup" data-basisjs-l10n="'+(this.token.name+"@"+this.token.dictionary.resource.url)+'">'+String(this.token.value)+"</span>":"")},destroy:function(){a.Token.prototype.destroy.call(this);this.token=null}}),T=function(){function d(h){return(h.prefix?h.prefix+":":"")+h.name}
function h(d,b){ma[b]||("#"==b.charAt(0)?ma[b]=String.fromCharCode("x"==b.charAt(1)||"X"==b.charAt(1)?parseInt(b.substr(2),16):b.substr(1)):A&&(A.innerHTML=d,ma[b]=A.firstChild?A.firstChild.nodeValue:d));return ma[b]||d}function g(d){return(d=d.refs)&&d.length?d:0}function t(d,b){function g(d){for(var S,b=[],k=[],t={},a=0;a<d.length;a++)a%2?(S=d[a],t[S]||(t[S]=b.length,b.push(S)),k.push(t[S])):d[a]&&k.push(d[a].replace(c,h));return[b,k]}var k=0,a,m;if(b)switch(d){case "class":if(a=b.match(la)){for(var C=
[],k=[],l=0,S;S=a[l];l++)(m=S.match(u))?k.push([m[1]||"",m[2]]):C.push(S);b=C.join(" ")}break;case "style":C=[];k=[];if(a=b.match(fa))for(l=0;S=a[l];l++)m=S.match(Q),S=m[1],b=m[2].trim(),m=b.split(ia),1<m.length?(m=g(m),m.push(S),k.push(m)):C.push(S+": "+b.replace(c,h));C.push("");b=C.join(";");break;default:a=b.split(X),1<a.length?k=g(a):b=b.replace(c,h)}k&&!k.length&&(k=0);return{binding:k,value:b,type:pa[d]||2}}function m(h,b,k){h=h.attrs;for(var a=[],x,v=0,ea;ea=h[v];v++)if("b"==ea.prefix)switch(ea.name){case "ref":for(ea=
(ea.value||"").trim().split(/\s+/),x=0;x<ea.length;x++)C(b,ea[x])}else if(x=ea.name.match(/^event-(.+)$/))a.push(x[1]==ea.value?[l,x[1]]:[l,x[1],ea.value]);else{x=t(ea.name,ea.value);var P=[x.type,x.binding,g(ea)];2==x.type&&P.push(d(ea));!x.value||k&&x.binding&&2==x.type||P.push(x.value);a.push(P)}return a.length?a:0}function C(d,h){d[D]||(d[D]=[]);f(d[D],h);"element"!=h&&(d[V]=1==d[D].length?h:0)}function v(d,h){var b=d[D].indexOf(h);if(-1!=b){var k=d[V]&&"number"==typeof d[V];d[D].splice(b,1);
k&&b==d[V]-1&&(d[V]=h);d[D].length?k&&(d[V]-=b<d[V]-1):d[D]=0}}function x(h){var b={};if(h.attrs)for(var k=0,g;g=h.attrs[k];k++)b[d(g)]=g.value;return b}function ea(d,h){for(var b=0;b<h.length;b++)f(d,h[b])}function P(l,K,la){function u(d,h,S){d=x(d);h&&(d.name=h);if(d.name&&ja.test(d.name)){var b=sa[d.ref||"element"];if(b&&b.token[w]==p){h=b.token;var k=pa[d.name],g=ga-!!k,a=h&&ba(h,d.name,function(d){return k?oa[d[w]]:d[$]});a||"remove"==S||(a=[k||R,0,0],k||a.push(d.name),a.push(""),h||(h=[],b.token.push(h)),
h.push(a));b="class"==d.name||"style"==d.name;switch(S){case "set":S=t(d.name,d.value);a[V]=S.binding;la.optimizeSize&&a[V]&&!b?a.length=g:a[g]=S.value||"";if(b&&!a[V]&&!a[g]){e(h,a);break}break;case "append":S=t(d.name,d.value);if(S.binding){var ca=a[V];if(ca){if("style"==d.name){for(var m={},C=0,l;l=S.binding[C];C++)m[l[2]]=!0;l=C=0;for(var v;v=ca[C];C++)m[v[2]]||(ca[l++]=v);ca.length=l}ca.push.apply(ca,S.binding)}else a[V]=S.binding}S.value&&(a[g]+=(a[g]&&"class"==d.name?" ":"")+S.value);if(b&&
!a[V]&&!a[g]){e(h,a);break}break;case "remove":a&&e(h,a)}}}}for(var fa=[],D=0,Q,ia;Q=l[D];D++){var S=g(Q),ca=S&&1==S.length?S[0]:0;switch(Q.type){case p:if("b"==Q.prefix){var ha=x(Q);switch(Q.name){case "resource":case "style":ha.src&&K.resources.push(z.resolve(K.baseURI+ha.src));break;case "l10n":ha.src&&(K.dictURI=z.relative(a.path.baseURI,K.baseURI+ha.src));break;case "define":if("name"in ha&&!K.defines[ha.name])switch(ha.type){case "bool":K.defines[ha.name]=["true"==ha["default"]?1:0];break;case "enum":Q=
ha.values?ha.values.trim().split(" "):[],K.defines[ha.name]=[Q.indexOf(ha["default"])+1,Q]}break;case "text":Q=Q.childs[0];l[D--]=a.object.extend(Q,{refs:(ha.ref||"").trim().split(/\s+/),value:"notrim"in ha?Q.value:Q.value.replace(/^\s*[\r\n]+|[\r\n]\s*$/g,"")});break;case "include":if(ca=ha.src){ca=(S=/^#\d+$/.test(ca))?ca.substr(1):ca;ca=S?n[ca]:/^[a-z0-9\.]+$/i.test(ca)&&!/\.tmpl$/.test(ca)?B(ca):a.resource(z.resolve(K.baseURI+ca));if(!ca)continue;if(-1==F.indexOf(ca)){f(K.deps,ca);F.push(ca);
S?(ca.source.bindingBridge&&f(K.deps,ca.source),S=O(ca.source,ca.baseURI,!0,la)):S=O(ca,ca.url?z.dirname(ca.url)+"/":"",!0,la);F.pop();S.resources&&!1=="no-style"in ha&&ea(K.resources,S.resources);S.deps&&ea(K.deps,S.deps);var sa=qa(S.tokens),ca=(Q.childs||[]).slice();ha["class"]&&ca.push({type:p,prefix:"b",name:"append-class",attrs:[{type:R,name:"value",value:ha["class"]}]});ha.id&&ca.push({type:p,prefix:"b",name:"set-attr",attrs:[{type:R,name:"name",value:"id"},{type:R,name:"value",value:ha.id}]});
ha.ref&&sa.element&&ha.ref.trim().split(/\s+/).map(function(d){C(sa.element.token,d)});for(var ha=0,na;na=ca[ha];ha++)if(na.type==p&&"b"==na.prefix)switch(na.name){case "replace":case "remove":case "before":case "after":Q="replace"==na.name||"remove"==na.name;var X=x(na),q="ref"in X||!Q?X.ref:"element";if(q=q&&sa[q])X=q.owner.indexOf(q.token),-1!=X&&(Q=[X+("after"==na.name),Q],"remove"!=na.name&&(Q=Q.concat(P(na.childs,K,la)||[])),q.owner.splice.apply(q.owner,Q));break;case "prepend":case "append":X=
x(na);(Q=(q=(q="ref"in X?X.ref:"element")&&sa[q])&&q.token)&&Q[w]==p&&(X=P(na.childs,K,la)||[],"prepend"==na.name?Q.splice.apply(Q,[ka,0].concat(X)):Q.push.apply(Q,X));break;case "attr":case "set-attr":u(na,!1,"set");break;case "append-attr":u(na,!1,"append");break;case "remove-attr":u(na,!1,"remove");break;case "class":case "append-class":u(na,"class","append");break;case "set-class":u(na,"class","set");break;case "remove-class":u(na,"class","remove");break;case "add-ref":X=x(na);(Q=(q=(q="ref"in
X?X.ref:"element")&&sa[q])&&q.token)&&X.name&&C(Q,X.name);break;case "remove-ref":X=x(na),(Q=(q=(q="ref"in X?X.ref:"element")&&sa[q])&&q.token)&&v(Q,X.name||X.ref)}else S.tokens.push.apply(S.tokens,P([na],K,la)||[]);sa.element&&v(sa.element.token,"element");fa.push.apply(fa,S.tokens)}}}continue}ia=[1,ca,S,d(Q)];ia.push.apply(ia,m(Q,ia,la.optimizeSize)||[]);ia.push.apply(ia,P(Q.childs,K,la)||[]);break;case b:S&&2==S.length&&ba(S,"element")&&(ca=S[+!S.lastSearchIndex]);if(ca&&(ha=T(ca,K.dictURI).split(/[:@\{]/),
"l10n"==ha[0]&&3==ha.length))if(ha[2]){if(ha=ha.slice(1).join("@"),ha=a.l10n.token(ha),na=y(ha),K.l10nResolved=!0,na&&"markup"==ha.type){l[D--]=k('<b:include src="#'+na.templateId+'"/>')[0];continue}}else e(S,ca),0==S.length&&(S=null),ca=0,Q.value=Q.value.replace(/\}$/,"@undefined}");ia=[3,ca,S];S&&Q.value=="{"+S.join("|")+"}"||ia.push(Q.value.replace(c,h));break;case H:if(la.optimizeSize&&!ca&&!S)continue;ia=[8,ca,S];la.optimizeSize||S&&Q.value=="{"+S.join("|")+"}"||ia.push(Q.value.replace(c,h))}for(;0===
ia[ia.length-1];)ia.pop();fa.push(ia)}return fa.length?fa:0}function T(d,h){if("string"!=typeof d)return d;var b=d.split(":");2==b.length&&"l10n"==b[0]&&-1==b[1].indexOf("@")&&(b[1]=b[1]+"@"+h);return b.join(":")}function qa(d,h,k,g){k||(k={});g=g||0;for(var a;a=d[g];g++)if(a[w]!=l){var t=a[D];if(t)for(var m=t.length-1,C;C=t[m];m--)-1!=C.indexOf(":")?v(a,C):(k[C]&&v(k[C].token,C),a[V]==C&&(a[V]=m+1),k[C]={owner:d,token:a});switch(a[w]){case b:a[V]=T(a[V],h);break;case R:if(a[V])for(a=a[V][0],m=0;m<
a.length;m++)a[m]=T(a[m],h);break;case p:qa(a,h,k,ka)}}return k}function K(d,h,b,k){var a=0;k=k||0;for(var g;g=d[k];k++)if(g[w]==p&&(a+=K(g,h,b,ka)),g[w]==q||g[w]==R&&"class"==g[$]){var t=g[V],m=ga-(g[w]==q);if(t){for(var S=(g[m]||"").trim().split(" "),ca=0,C;C=t[ca];ca++)if(!(2<C.length)){var l=C[1].split(":").pop(),x=h.defines[l];x?(C.push.apply(C,x),x.used=!0,x[0]&&(1==x.length?f(S,C[0]+l):f(S,C[0]+x[1][x[0]-1]))):a++}g[m]=S.join(" ");b.optimizeSize&&!g[m]&&(g.length=m)}}return a}var ja=/^[a-z_][a-z0-9_\-]*$/i,
la=/(\S+)/g,u=/^([a-z_][a-z0-9_\-]*)?\{((anim:)?[a-z_][a-z0-9_\-]*)\}$/i,fa=/\s*[^:]+?\s*:(?:\(.*?\)|".*?"|'.*?'|[^;]+?)+(?:;|$)/gi,Q=/\s*([^:]+?)\s*:((?:\(.*?\)|".*?"|'.*?'|[^;]+?)+);?$/i,ia=/\{([a-z_][a-z0-9_]*)\}/i,X=/\{([a-z_][a-z0-9_]*|l10n:[a-z_][a-z0-9_]*(?:\.[a-z_][a-z0-9_]*)*(?:\.\{[a-z_][a-z0-9_]*\})?)\}/i,c=/&([a-z]+|#[0-9]+|#x[0-9a-f]{1,4});?/gi,ma=a.NODE_ENV?node_require("./template/htmlentity.json"):{},A=a.NODE_ENV?null:document.createElement("div"),F=[];return function(d,h,b,g){b=b||
{};var t=[],m={sourceUrl:g,baseURI:h||"",tokens:null,resources:[],deps:[],defines:{},unpredictable:!0,warns:t};m.dictURI=g?a.path.relative(a.path.baseURI,m.baseURI+a.path.basename(g,a.path.extname(g))+".l10n"):h||"";d.templateTokens?d.warns&&t.push.apply(t,d.warns):d=k(String(d));m.tokens=P(d,m,b);m.tokens||(m.tokens=[[3,0,0,""]]);C(m.tokens[0],"element");qa(m.tokens,m.dictURI);m.unpredictable=!!K(m.tokens,m,b);delete m.defines;delete m.l10nResolved;t.length||(m.warns=!1);return m}}(),h={".css":!0},
t=r(null,{className:c+".Template",__extend__:function(d){return d instanceof t?d:d instanceof C?new ea(d):new t(d)},source:"",baseURI:"",init:function(d){if(4096==n.length)throw 30;this.attaches_=[];this.setSource(d||"");this.templateId=n.push(this)-1},bindingBridge:{attach:function(d,h,b){for(var g=0,k;k=d.attaches_[g];g++)if(k.handler==h&&k.context==b)return;d.attaches_.push({handler:h,context:b})},detach:function(d,h,b){for(var g=0,k;k=d.attaches_[g];g++)if(k.handler==h&&k.context==b){d.attaches_.splice(g,
1);break}},get:function(){}},createInstance:function(d,h,b,g,k){N.call(this);return this.createInstance(d,h,b,g,k)},clearInstance:function(d){},getBinding:function(d){N.call(this);return this.getBinding(d)},setSource:function(d){var h=this.source;if(h!=d){if("string"==typeof d){var b=d.match(/^([a-z]+):/);if(b){var g=b[1];d=d.substr(b[0].length);switch(g){case "file":d=a.resource(d);break;case "id":d=A(d);break;case "tokens":d=a.string.toObject(d);d.isDecl=!0;break;case "path":d=B(d)}}}if(h&&h.bindingBridge){if(b=
h.url&&u[h.url])e(b,this),b.length||delete u[h.url];this.baseURI="";this.source.bindingBridge.detach(h,G,this)}d&&d.bindingBridge&&(d.url&&(this.baseURI=z.dirname(d.url)+"/",u[d.url]||(u[d.url]=[]),f(u[d.url],this)),d.bindingBridge.attach(d,G,this));this.source=d;G.call(this)}},destroy:function(){this.destroyBuilder&&this.destroyBuilder();this.source=this.resources=this.getBinding=this.createInstance=this.attaches_=null}}),C=function(d){a.object.extend(this,d)},ea=a.Class(null,{className:c+".TemplateSwitcher",
ruleRet_:null,templates_:null,templateClass:t,ruleEvents:null,rule:String,init:function(d){this.ruleRet_=[];this.templates_=[];this.rule=d.rule;if((d=d.events)&&d.length){this.ruleEvents={};for(var h=0,b;b=d[h];h++)this.ruleEvents[b]=!0}F.add(this)},resolve:function(d){d=this.rule(d);var h=this.ruleRet_.indexOf(d);-1==h&&(this.ruleRet_.push(d),h=this.templates_.push(new this.templateClass(d))-1);return this.templates_[h]},destroy:function(){this.ruleRet_=this.templates_=this.rule=null}}),qa=r(null,
{className:c+".Theme",get:B}),Q=r(a.Token,{className:c+".SourceWrapper",path:"",url:"",baseURI:"",init:function(d,h){this.path=h;a.Token.prototype.init.call(this,"")},get:function(){return this.value&&this.value.bindingBridge?this.value.bindingBridge.get(this.value):this.value},set:function(){var d=Y(ra,this.path);this.value!=d&&(this.value&&this.value.bindingBridge&&this.value.bindingBridge.detach(this.value,Q.prototype.apply,this),this.url=(this.value=d)&&d.url||"",this.baseURI=("object"==typeof d||
"function"==typeof d)&&"baseURI"in d?d.baseURI:z.dirname(this.url)+"/",this.value&&this.value.bindingBridge&&this.value.bindingBridge.attach(this.value,Q.prototype.apply,this),this.apply())},destroy:function(){this.baseURI=this.url=null;this.value&&this.value.bindingBridge&&this.value.bindingBridge.detach(this.value,this.apply,this);a.Token.prototype.destroy.call(this)}}),fa={},ia={},xa=W(),ra="base",ya=[];F.add({destroy:function(){for(var d in ia)ia[d].destroy();ia=fa=null;d=0;for(var h;h=n[d];d++)h.destroy();
n=null}});M.exports={DECLARATION_VERSION:2,TYPE_ELEMENT:p,TYPE_ATTRIBUTE:R,TYPE_ATTRIBUTE_CLASS:q,TYPE_ATTRIBUTE_STYLE:5,TYPE_ATTRIBUTE_EVENT:l,TYPE_TEXT:b,TYPE_COMMENT:H,TOKEN_TYPE:w,TOKEN_BINDINGS:V,TOKEN_REFS:D,ATTR_NAME:$,ATTR_VALUE:ga,ATTR_NAME_BY_TYPE:oa,ELEMENT_NAME:3,ELEMENT_ATTRS:ka,ELEMENT_CHILDS:5,TEXT_VALUE:3,COMMENT_VALUE:3,L10nProxyToken:la,TemplateSwitchConfig:C,TemplateSwitcher:ea,Template:t,SourceWrapper:Q,switcher:function(d,h){var b=a.array(arguments);h=b.pop();return new C({rule:h,
events:b.join(" ").trim().split(/\s+/)})},tokenize:k,getDeclFromSource:O,makeDeclaration:T,getL10nTemplate:y,Theme:qa,theme:W,getThemeList:function(){return a.object.keys(fa)},currentTheme:function(){return fa[ra].theme},setTheme:function(d){return W(d).apply()},onThemeChange:function(d,h,b){ya.push({fn:d,context:h});b&&d.call(h,ra)},define:xa.define,get:B,getPathList:function(){return a.object.keys(ia)}};W("base").define({"#1":a.resource("./0.tmpl"),"#2":a.resource("./1.tmpl"),"#3":a.resource("./2.tmpl"),
"#4":a.resource("./3.tmpl"),"#5":a.resource("./4.tmpl")})},"8.js":function(c,M,a,r,U,J,aa,da){function y(b){b=a.template.getL10nTemplate(b);var g=b.templateId,d=ma[g];d||(d=ma[g]=new x(b.source));return d}function I(b){return function(g){if("click"!=g.type||3!=g.which){for(var d=V[g.type]||"mouseenter"!=g.type&&"mouseleave"!=g.type,a=g.sender,k;a;){k=a.getAttribute&&a.getAttribute(b);if(!d||"string"==typeof k)break;a=a.parentNode}if("string"==typeof k){var l=a,d=l,x,v;V[g.type]&&(x=g.relatedTarget)&&
(l===x||l.contains(x))&&(l=null);for(;l;){x=l.basisTemplateId;if("number"==typeof x&&(v=L(x)))break;l=l.parentNode}if(v&&v.action)for(k=k.trim().split(/\s+/),g.actionTarget=d,d=0;l=k[d++];)v.action.call(v.context,l,g)}if(g.type in w)w[g.type](g,a)}}}function L(g){var a=b[g&4095];return a&&a.instances[g>>12]}a.require("./9.js");a.require("./3.js");a.require("./7.js");a.require("./a.js");c=this.path;var G=r.document,s=a.dom.event,O=a.string.camelize,N=a.l10n.token,A=a.template.htmlfgen.getFunctions,
B=a.template.TemplateSwitchConfig;U=a.template.TemplateSwitcher;J=a.template.Template;var E=a.template.TYPE_ELEMENT,Y=a.template.TYPE_ATTRIBUTE,W=a.template.TYPE_TEXT,F=a.template.TYPE_COMMENT,z=a.template.TOKEN_TYPE,ba=a.template.TOKEN_BINDINGS,f=a.template.TOKEN_REFS,e=a.template.ATTR_NAME,n=a.template.ATTR_VALUE,u=a.template.ATTR_NAME_BY_TYPE,p=a.template.ELEMENT_NAME,R=a.template.TEXT_VALUE,q=a.template.COMMENT_VALUE,l={},b={},H={svg:"http://www.w3.org/2000/svg"},w={},V={},D="onmouseenter"in G.documentElement,
$=!G.addEventListener&&"__basisTemplate"+parseInt(1E9*Math.random());$&&(r[$]=function(b,g){s.fireEvent(G,b);g.returnValue=!0;var d=l[b];d&&d(new s.Event(g))});var ga=function(){var b=G.createElement("div");b.appendChild(G.createTextNode("a"));b.appendChild(G.createTextNode("a"));return 1==b.cloneNode(!0).childNodes.length}(),oa=function(){var b=G.createElement("div");b.setAttribute("class","a");return!b.className}(),pa=function(){var b=G.createElement("div");b.setAttribute("style","position:absolute");
return"absolute"!=b.style.position}(),ka;a:{try{ka=G.documentElement.style.color="x";break a}catch(Z){}ka=void 0}var ja=!!ka;"undefined"==typeof Node||Node.prototype.contains||(Node.prototype.contains=function(b){return!!(this.compareDocumentPosition(b)&16)});var ma={},g=function(b,a){function d(d,h){m(h);V[d]=!0;w[h]=function(h){h=new s.Event(h);h.type=d;l[d](h)};w[d]=function(h,b){if(b=b&&b.parentNode)h=new s.Event(h),h.type=d,h.sender=b,l[d](h)}}function m(h){if(!l[h]&&(l[h]=I("event-"+h),!$)){if(!D&&
"mouseenter"==h)return d(h,"mouseover");if(!D&&"mouseleave"==h)return d(h,"mouseout");for(var b=0,g=s.browserEvents(h),k;k=g[b];b++)s.addGlobalHandler(k,l[h])}}function k(d,h){m(d);$&&v.setAttribute("on"+d,$+'("'+d+'",event)');v.setAttribute("event-"+d,h)}function x(d,h){oa&&"class"==d&&(d="className");if(pa&&"style"==d)return v.style.cssText=h;v.setAttribute(d,h)}for(var v=a||G.createDocumentFragment(),T=a?4:0,h;h=b[T];T++)switch(h[z]){case E:var t=h[p],C=t.split(/:/),t=1<C.length?G.createElementNS(H[C[0]],
t):G.createElement(t);g(h,t);v.appendChild(t);break;case Y:var t=h[e],C=h[n],ea=t.replace(/^event-/,"");ea!=t?k(ea,C):("class"!=t&&"style"!=t?!h[ba]:C)&&x(t,C||"");break;case 4:case 5:(C=h[n-1])&&x(u[h[z]],C);break;case 6:k(h[1],h[2]||h[1]);break;case F:v.appendChild(G.createComment(h[q]||(h[f]?"{"+h[f].join("|")+"}":"")));break;case W:ga&&T&&b[T-1][z]==W&&v.appendChild(G.createComment("")),v.appendChild(G.createTextNode(h[R]||(h[f]?"{"+h[f].join("|")+"}":"")||(h[ba]?"{"+h[ba]+"}":"")))}return v};
ka=function(){function l(){this.set(this.name,this.value)}function x(d,h,b){var g=h&&h.bindingBridge,k=this.attaches&&this.attaches[d],m=null;if(g||k)if(g){if(k&&h===k.value)m=h&&"markup"==h.type?k.tmpl:null;else{k&&(k.tmpl&&(k.tmpl.element.toString=null,y(k.value).clearInstance(k.tmpl)),k.value.bindingBridge.detach(k.value,l,k));if("markup"==h.type&&h instanceof a.l10n.Token){var v=y(h),H=this.context,w=this.bindings,f=this.bindingInterface,m=v.createInstance(H,null,function za(){m=K.tmpl=v.createInstance(H,
null,za,w,f);m.element.toString=function(){return h.value};l.call(K)},w,f);m.element.toString=function(){return h.value}}this.attaches||(this.attaches=new b);var K=this.attaches[d]={name:d,value:h,tmpl:m,set:this.tmpl.set};g.attach(h,l,K)}if(m)return m.element;h=g.get(h)}else k&&(k.tmpl&&(k.tmpl.element.toString=null,y(k.value).clearInstance(k.tmpl)),k.value.bindingBridge.detach(k.value,l,k),this.attaches[d]=null);return h}function d(d,h){return function(b){for(var g=0,k;k=d[g];g++)this(k,h[k](b))}}
var m=/\s+/,k="function"==typeof Node&&G instanceof Node?function(d,h,b){d=b instanceof Node&&!b.basisNodeInUse?b:d;d!==h&&h.parentNode.replaceChild(d,h);return d}:function(d,h,b){b=b&&"object"==typeof b&&!b.basisNodeInUse?b:d;if(b!==h)try{h.parentNode.replaceChild(b,h)}catch(g){b=d,h!==b&&h.parentNode.replaceChild(b,h)}return b},v=function(d,h,b,g){b!==g&&(g?d.setAttribute(h,g):d.removeAttribute(h));return g},H={bind_textNode:function(d,h,b){h=k(d,h,b);h===d&&(d.nodeValue=b);return h},bind_node:k,
bind_element:function(d,h,b){h=k(d,h,b);h===d&&"string"==typeof b&&(d.innerHTML=b);return h},bind_comment:k,bind_attr:v,bind_attrClass:r.DOMTokenList&&G&&G.documentElement.classList instanceof r.DOMTokenList?function(d,h,b,g,k){var m=b?g+b:"";m!=h&&(h&&d.classList.remove(h),m&&(d.classList.add(m),k&&(d.classList.add(m+"-anim"),a.nextTick(function(){d.classList.remove(m+"-anim")}))));return m}:function(d,h,b,g,k){var l=b?g+b:"";if(l!=h){b=d.className;var x="string"!=typeof b;x&&(b=b.baseVal);b=b.split(m);
h&&a.array.remove(b,h);l&&(b.push(l),k&&(a.array.add(b,l+"-anim"),a.nextTick(function(){var h=(x?d.className.baseVal:d.className).split(m);a.array.remove(h,l+"-anim");x?d.className.baseVal=h.join(" "):d.className=h.join(" ")})));x?d.className.baseVal=b.join(" "):d.className=b.join(" ")}return l},bind_attrStyle:ja?function(d,h,b,g){b!==g&&(d.style[O(h)]=g);return g}:function(d,h,b,g){if(b!==g)try{d.style[O(h)]=g}catch(k){}return g},resolve:x,l10nToken:N,createBindingFunction:function(b){var h={};return function(g,
k,a,m){if(!g)return{};var l="bindingId"in g?g.bindingId:null,x=h[l];if(!x){for(var x=[],v={},H={},w={},f=!1,K=0,P;P=b[K];K++){var e=g[P],ja=e&&e.getter;if(ja&&(v[P]=ja,x.push(P),e.events))for(var e=String(e.events).trim().split(/\s+|\s*,\s*/),ja=0,n;n=e[ja];ja++)H[n]?H[n].push(P):H[n]=[P]}for(n in H)f=!0,w[n]=d(H[n],v);x={names:x,sync:d(x,v),handler:f?w:null};l&&(h[l]=x)}k&&a&&x.sync.call(a,k);if(m)return x.handler&&m.attach(k,x.handler,a),x.handler}}};return function(d){var h=A(d,!0,this.source.url,
d.source_,!ga),k,a={},m={},l=[],w=0,f=g(d),P=function(){return f.cloneNode(!0)},e=this.templateId;b[e]={template:this,instances:a};if(h.createL10nSync){var ja=h.createL10nSync(f,m,v,ga);d=0;for(var n;n=h.l10nKeys[d];d++)ja(n,N(n).value);if(h.l10nKeys)for(d=0;n=h.l10nKeys[d];d++)n={path:n,token:N(n),handler:function(d){ja(this.path,d);for(var h in a)a[h].tmpl.set(this.path,d)}},n.token.attach(n.handler,n),l.push(n),n=null}k=h.createInstance(e,a,P,H,m,ga);return{createInstance:function(d,h,b,g,m){var l=
w++;d=k(l,d,h,b,g,m);a[l]=d;return d.tmpl},destroyInstance:function(d){d=d.templateId_;var h=a[d];if(h){h.handler&&h.bindingInterface.detach(h.context,h.handler,h.tmpl.set);for(var b in h.attaches)x.call(h,b,null);delete a[d]}},keys:h.keys,destroy:function(d){for(var g=0,k;k=l[g];g++)k.token.detach(k.handler,k);for(var t in a)if(g=a[t],d&&g.rebuild&&g.rebuild.call(g.context),!d||t in a)for(t in g.handler&&g.bindingInterface.detach(g.context,g.handler,g.tmpl.set),g.attaches)x.call(t,null);b[e]&&b[e].instances===
a&&delete b[e];a=ja=l=m=f=P=h=null}}}}();var x=J.subclass({className:c+".Template",__extend__:function(b){return b instanceof x?b:b instanceof B?new v(b):new x(b)},builder:ka}),v=U.subclass({className:c+".TemplateSwitcher",templateClass:x});M.exports={Template:x,TemplateSwitcher:v};a.template.extend({buildHtml:g,resolveTemplateById:function(g){return(g=b[g&4095])&&g.template},resolveObjectById:function(b){return(b=L(b))&&b.context},resolveTmplById:function(b){return(b=L(b))&&b.tmpl}})},"9.js":function(c,
M,a,r,U,J,aa,da){function y(b){return b instanceof ga?b.event_:b||r.event}function I(b){return"string"==typeof b?R.getElementById(b):b}function L(b){b=b.target||b.srcElement||R;return 3==b.nodeType?b.parentNode:b}function G(b){b.stopPropagation?b.stopPropagation():b.cancelBubble=!0}function s(b){b.preventDefault?b.preventDefault():b.returnValue=!1}function O(b,a){(a=I(a))?e(a,b,O):(s(b),G(b))}function N(b){return b.keyCode||b.which||0}function A(b){return b.charCode||b.keyCode||0}function B(b,a){return"number"==
typeof b.which?b.which==a.VALUE:!!(b.button&a.BIT)}function E(b){return b.changedTouches?b.changedTouches[0].pageX:"pageX"in b?b.pageX:"clientX"in b?b.clientX+("CSS1Compat"==R.compatMode?R.documentElement.scrollLeft:R.body.scrollLeft):0}function Y(b){return b.changedTouches?b.changedTouches[0].pageY:"pageY"in b?b.pageY:"clientY"in b?b.clientY+("CSS1Compat"==R.compatMode?R.documentElement.scrollTop:R.body.scrollTop):0}function W(b){var a=0;"wheelDelta"in b?a=b.wheelDelta:"DOMMouseScroll"==b.type&&
(a=-b.detail);return a&&a/Math.abs(a)}function F(b){var a=l(oa[b.type]),g=pa[b.type],x=new ga(b);if(g)g.handler.call(g.thisObject,x),O(b);else if(a)for(b=a.length;0<b--;)g=a[b],g.handler.call(g.thisObject,x)}function z(b){var a=pa[b];a&&(f(b,a.handler,a.thisObject),delete pa[b])}function ba(b,a,g){var l=oa[b];if(l){b=0;for(var v;v=l[b];b++)if(v.handler===a&&v.thisObject===g)return}else ka?e(R,b,q):R.addEventListener(b,F,!0),l=oa[b]=[];l.push({handler:a,thisObject:g})}function f(b,a,g){var l=oa[b];
if(l)for(var v=0,H;H=l[v];v++)if(H.handler===a&&H.thisObject===g){l.splice(v,1);l.length||(delete oa[b],ka?n(R,b,q):R.removeEventListener(b,F,!0));break}}function e(a,l,g,x){a=I(a);if(!a)throw 32;if("function"!=typeof g)throw 33;a[H]||(a[H]={});var v={handler:g,thisObject:x},w=a[H],f=w[l];if(f){for(a=0;w=f[a];a++)if(w.handler===g&&w.thisObject===x)return;f.push(v)}else f=w[l]=[v],f.fireEvent=function(d){d=y(d);if(ka&&d&&oa[l]&&"undefined"==typeof d.returnValue){F(d);if(!0===d.cancelBubble)return;
"undefined"==typeof d.returnValue&&(d.returnValue=!0)}var b=0;d=new ga(d);for(var g;g=f[b++];)g.handler.call(g.thisObject,d)},b?a.addEventListener(l,f.fireEvent,!1):a.attachEvent("on"+l,f.fireEvent)}function n(b,a,g,l){b=I(b);var v=b[H];if(v&&(v=v[a]))for(var f=0,w;w=v[f];f++)if(w.handler===g&&w.thisObject===l){v.splice(f,1);v.length||u(b,a);break}}function u(b,a){b=I(b);var g=b[H];if(g)if("string"!=typeof a)for(a in g)u(b,a);else{var l=g[a];l&&(b.removeEventListener?b.removeEventListener(a,l.fireEvent,
!1):b.detachEvent("on"+a,l.fireEvent),delete g[a])}}function p(b){return function(a,g){return b(y(a),g)}}var R=r.document,q=a.fn.$null,l=a.array.from,b=!!R.addEventListener,H="__basisEvents";c={BACKSPACE:8,TAB:9,CTRL_ENTER:10,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123};var w={VALUE:1,BIT:1},V={VALUE:2,BIT:4},
D={VALUE:3,BIT:2},$={mousewheel:["mousewheel","DOMMouseScroll"]},ga=a.Class(null,{className:this.path+".Event",KEY:c,init:function(b){b=y(b);for(var l in b)"function"!=typeof b[l]&&!1==l in this&&(this[l]=b[l]);a.object.extend(this,{event_:b,sender:L(b),key:N(b),charCode:A(b),mouseLeft:B(b,w),mouseMiddle:B(b,V),mouseRight:B(b,D),mouseX:E(b),mouseY:Y(b),wheelDelta:W(b)})},stopBubble:function(){G(this.event_)},stopPropagation:function(){G(this.event_)},preventDefault:function(){s(this.event_)},die:function(){this.stopBubble();
this.preventDefault()}}),oa={},pa={},ka=!b,Z={};M.exports={W3CSUPPORT:b,browserEvents:function(b){return $[b]||[b]},getEventInfo:function(a,l){l||(l="div");var g=l+"-"+a;if(Z[g])return Z[g];var x=!1,v=!1;if(!b){var f="on"+a,H=R.createElement("div"),d=H.appendChild(R.createElement(l));H[f]=function(){v=!0};try{d.fireEvent(f),x=!0}catch(m){}}return Z[g]={supported:x,bubble:v}},KEY:c,MOUSE_LEFT:w,MOUSE_RIGHT:D,MOUSE_MIDDLE:V,Event:ga,sender:p(L),cancelBubble:p(G),cancelDefault:p(s),kill:p(O),key:p(N),
charCode:p(A),mouseButton:p(B),mouseX:p(E),mouseY:p(Y),wheelDelta:p(W),addGlobalHandler:ba,removeGlobalHandler:f,captureEvent:function(b,a,g){pa[b]&&z(b);ba(b,a,g);pa[b]={handler:a,thisObject:g}},releaseEvent:z,addHandler:e,addHandlers:function(b,a,g){b=I(b);for(var l in a)e(b,l,a[l],g)},removeHandler:n,clearHandlers:u,fireEvent:function(b,a,g){b=I(b);(b=b[H])&&b[a]&&b[a].fireEvent(g)},onUnload:function(b,a){e(r,"unload",b,a)},wrap:y}},"a.js":function(c,M,a,r,U,J,aa,da){function y(a,e){return new Function(a,
e)}a.require("./7.js");var I=a.template.TYPE_ELEMENT,L=a.template.TYPE_ATTRIBUTE,G=a.template.TYPE_TEXT,s=a.template.TYPE_COMMENT,O=a.template.TOKEN_TYPE,N=a.template.TOKEN_BINDINGS,A=a.template.TOKEN_REFS,B=a.template.ATTR_NAME,E=a.template.ATTR_NAME_BY_TYPE,Y=a.template.ELEMENT_NAME,W=a.template.ELEMENT_ATTRS,F={},z=function(){function a(b,l){for(var f=0,e;e=b[f];f++)-1==e.indexOf(":")&&c.push(e+":"+l)}function e(b){var a=p.length,a=u[a]||"r"+a;p.push(a+"="+b);return a}function n(H,w,u){for(var D,
$,c,F,R=0,z=0,r=0,y;y=H[R];R++,z++,F=!1){R?H[R+1]?(y[O]==H[R-1][O]&&y[O]==G&&r++,D=w+".childNodes["+(u?z:z+(r?" + "+r+" * TEXT_BUG":""))+"]"):D=w+".lastChild":D=w+".firstChild";if($=y[A])F=!0,D=e(D),a($,D);y[N]&&(y[N]&&"number"==typeof y[N]&&(y[N]=y[A][y[N]-1]),F||(F=!0,D=e(D)),q.push([y[O],D,y[N]]));if(y[O]==I){c=-1;w==b&&l.push(D+".basisTemplateId");F||(D=e(D),c=p.length);for(var L=[],g=[],x=W,v;v=y[x];x++)v[O]==I||v[O]==G||v[O]==s?g.push(v):L.push(v);for(var x=0,P;P=L[x];x++)if(6!=P[O]){v=E[P[O]]||
P[B];if($=P[A])F=!0,a($,e(D+'.getAttributeNode("'+v+'")'));if($=P[N])switch(F=!0,v){case "class":P=0;for(var X;X=$[P];P++)X=[2,D,X[1],v,X[0]].concat(X.slice(2)),q.push(X);break;case "style":for(P=0;X=$[P];P++)for(var d=0,m;m=X[0][d];d++)q.push([2,D,m,v,X[0],X[1],X[2]]);break;default:for(P=0;m=$[0][P];P++)q.push([2,D,m,v,$[0],$[1],y[Y]])}}g.length&&n(g,D,u);F||c!=p.length||p.pop()}}}var u="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),p,c,q,l,b;return function(a,f,e){p=[];c=[];q=
[];l=[];b=f||"_";n(a,b,e);return{path:p,ref:c,binding:q,markedElementList:l}}}(),ba=function(){function f(a,f,l){var b=[],H=a[5];a=a[4];for(var w,n,p=0;p<H.length;p++)if("string"==typeof H[p])b.push('"'+H[p].replace(/"/g,'\\"')+'"');else if(w=a[H[p]],n=w.indexOf(":"),-1==n)b.push("l10n"==f?'"{'+w+'}"':"bool"==f?"(__"+w+'||"")':"__"+w);else{var u=null,c=w.substr(n+1).replace(e,function(b,a){u=a;return""});u?b.push(l[w.substr(n+1)]):b.push('__l10n["'+c+'"]')}1==b.length&&b.push('""');return b.join("+")}
var e=/\.\{([a-zA-Z_][a-zA-Z0-9_\-]*)\}/,n={disabled:"*",checked:["input"],value:["input","textarea"],minlength:["input"],maxlength:["input"],readonly:["input"],selected:["option"],multiple:["select"]},u={disabled:!0,checked:!0,selected:!0,readonly:!0,multiple:!0},p={1:"bind_element",3:"bind_textNode",8:"bind_comment"};return function(c){function q(d){r[d]=!0;b.push(H+"="+d+"("+a.array(arguments,1)+");")}for(var l={},b,H,w=[],V=[],D,$,F=[],A={},z=1,r={resolve:!0},E,y=0,s;s=c[y];y++){var g=s[0],x=
s[1],v=s[2];if(-1==["set","templateId_"].indexOf(v)){var P=v.split(":");(E="anim"==P[0])&&(v=P[1]);b=l[v];H="_"+y;D="__"+v;if("l10n"==P[0]&&P[1]){var P=P[1],X=null,d=P.replace(e,function(d,b){X=b;return""});if(X){!1==P in A&&(D="$l10n_"+z++,A[P]=D,F.push('set("'+D+'",'+D+")"),w.push(D+'=tools.l10nToken("'+d+'").computeToken()'),b=l[X],b||(b=l[X]=[],w.push("__"+X)),b.push(D+".set(__"+X+");"));v=A[P];H="_"+y;D="__"+v;b=l[v];b||(b=l[v]=[],w.push(D));g==G?(w.push(H+"="+x),q(p[g],x,H,"value")):(D='"'+
s[B]+'"',w.push(H),q("bind_attr",x,D,H,f(s,!1,A)));continue}$||($={});l[d]||(l[d]=[],$[d]=[]);b=l[d];b.l10n=!0;if(g==G){$[d].push(x+".nodeValue=value;");b.push(x+'.nodeValue=__l10n["'+d+'"]'+(X?"[__"+X+"]":"")+";");continue}else $[d].push("bind_attr("+[x,'"'+s[B]+'"',"NaN",f(s,"l10n",A)]+");")}b||(b=l[v]=[],w.push(D));if(g!=L)if(b.nodeBind)switch(g){case I:q(p[g],x,x,"value!==null?String(value):null");break;case G:b.push(x+".nodeValue=value;")}else w.push(H+"="+x),q(p[g],x,H,"value"),b.nodeBind=H;
else switch(D=s[B],D){case "class":D="";P="value";g=s[4];P=s.length;if(6<=P)if(6==P||"string"==typeof s[6])6==P?(P='value?"'+v+'":""',s[5]&&(D=g+v)):(g="",P='value?"'+s[6]+'":""',s[5]&&(D=s[6]));else{if(!s[6].length)continue;7==P?(P=s[6].map(function(d){return'value=="'+d+'"'}).join("||")+'?value:""',s[5]&&(D=g+s[6][s[5]-1])):(g="",P=s[6].map(function(d,b){return'value=="'+d+'"?"'+this[b]+'"'},s[7]).join(":")+':""',s[5]&&(D=s[7][s[5]-1]))}else P='typeof value=="string"||typeof value=="number"?value:(value?"'+
v+'":"")';w.push(H+'="'+D+'"');q("bind_attrClass",x,H,P,'"'+g+'"',E);break;case "style":w.push(H+'=""');q("bind_attrStyle",x,'"'+s[6]+'"',H,f(s,!1,A));break;default:E=n[D],w.push(H+"="+f(s,"l10n",A)),q("bind_attr",x,'"'+D+'"',H,E&&u[D]?f(s,"bool",A)+'?"'+D+'":""':f(s,!1,A)),!E||"*"!=E&&-1==E.indexOf(s[6].toLowerCase())||b.push("if("+x+"."+D+"!="+H+")"+x+"."+D+"="+(u[D]?"!!"+H:H)+";")}}}V.push(';function set(bindName,value){if(typeof bindName=="string")value=resolve.call(instance,bindName,value,Attaches);switch(bindName){');
for(v in l)V.push('case"'+v+'":'+(l[v].nodeBind?"case "+l[v].nodeBind+":":"")+(l[v].l10n?l[v].join(""):"if(__"+v+"!==value){__"+v+"=value;"+l[v].join("")+"}")+"break;");V.push("}}");c=[];for(var m in r)c.push(m+"=tools."+m);return{keys:a.object.keys(l).filter(function(d){return-1==d.indexOf("@")}),tools:c,vars:w,set:V.join(""),l10n:$,l10nCompute:F}}}();M.exports={getFunctions:function(f,e,n,u,p){if(e=F[n&&a.path.relative(n)])return e;f=z(f,"_",p);p=ba(f.binding);e=f.markedElementList.join("=");n=
{keys:p.keys,l10nKeys:a.object.keys(p.l10n)};if(p.l10n){u=[];for(var c in p.l10n)u.push('case"'+c+'":if(value==null)value="{'+c+'}";__l10n[token]=value;'+p.l10n[c].join("")+"break;");n.createL10nSync=y(["_","__l10n","bind_attr","TEXT_BUG"],"var "+f.path+";return function(token, value){switch(token){"+u.join("")+"}}\n")}n.createInstance=y("tid map build tools __l10n TEXT_BUG".split(" "),"var getBindings=tools.createBindingFunction(["+p.keys.map(function(a){return'"'+a+'"'})+"]),"+(p.tools.length?p.tools+
",":"")+"Attaches=function(){};Attaches.prototype={"+p.keys.map(function(a){return a+":null"})+"};return function createInstance_(id,obj,onAction,onRebuild,bindings,bindingInterface){var _=build(),"+f.path.concat(p.vars)+",instance={context:obj,action:onAction,rebuild:onRebuild,handler:null,bindings:bindings,bindingInterface:bindingInterface,attaches:null,tmpl:{"+[f.ref,"templateId_:id","set:set"]+"}}"+(e?";if(obj||onAction)"+e+"=(id<<12)|tid":"")+p.set+";instance.handler=bindings?getBindings(bindings,obj,set,bindingInterface):null;"+
p.l10nCompute+";return instance}");return n}}},"b.js":function(c,M,a,r,U,J,aa,da){a.require("./5.js");a.require("./c.js");c=new a.data.Dataset({syncAction:a.require("./d.js").create({transportClass:a.require("./h.js").Transport,url:"https://bower-component-list.herokuapp.com/",success:function(c){c.forEach(function(c){c.description=c.description?c.description.trim():"";c.searchIndex=a.object.values(c).join(" ").toLowerCase()});this.set(a.data.wrap(c,!0))}})});r=new a.data.dataset.Subset({source:c,
rule:function(a){return a.data.description}});M.exports={all:c,withDescription:r}},"c.js":function(c,M,a,r,U,J,aa,da){function y(a,b){var f={},w;a&&a.length&&(w=f.inserted=a);b&&b.length&&(w=f.deleted=b);if(w)return f}function I(l,b){return function w(b){if(!b)return null;if(b.__extend__)return b;"string"==typeof b||Array.isArray(b)||(b="object"==typeof b?a.object.keys(b):null);return O(a.event.createHandler(b,l),{__extend__:w})}(b)}function L(a,b,H,w){return new f(O({keyGetter:b,itemClass:H,create:function(b,
a){var l=f.prototype.create.call(this,b,a);l.setDataset(new w({ruleValue:b}));return l}},a))}function G(a,b){if(!a.length)return 0;var f=b.value,w=b.object.basisObjectId,e,n,p,u,c=0,q=a.length-1;do if(p=c+q>>1,u=a[p],e=u.value,f<e)q=p-1;else if(f>e)c=p+1;else if(n=u.object.basisObjectId,w<n)q=p-1;else if(w>n)c=p+1;else return p;while(c<=q);return p+(e==f?n<w:e<f)}function s(a,b){return+(a.value>b.value)||-(a.value<b.value)||a.object.basisObjectId-b.object.basisObjectId}a.require("./4.js");a.require("./5.js");
J=this.path;aa=a.Class;var O=a.object.extend,N=a.object.values,A=a.getter,B=a.fn.$self,E=a.fn.$true,Y=a.fn.$false,W=a.array.from,F=a.event.create,z=a.data.SUBSCRIPTION,ba=a.data.Object,f=a.data.KeyObjectMap,e=a.data.AbstractDataset,n=a.data.Dataset;da=a.data.DatasetWrapper;z.add("SOURCE",{sourceChanged:function(a,b){b&&z.unlink("source",a,b);a.source&&z.link("source",a,a.source)},sourcesChanged:function(a,b){var f;if(f=b.inserted)for(var w=0;f[w];w++)z.link("source",a,f[w]);if(f=b.deleted)for(w=0;f[w];w++)z.unlink("source",
a,f[w])}},function(a,b){for(var f=b.sources||(b.source?[b.source]:[]),w=0,e;e=f[w++];)a("source",b,e)});z.addProperty("minuend");z.addProperty("subtrahend");var u=aa(e,{className:J+".Merge",subscribeTo:z.SOURCE,emit_sourcesChanged:F("sourcesChanged","delta"),sources:null,rule:function(a,b){return 0<a},listen:{source:{itemsChanged:function(a,b){var f=this.members_,w={},e,n;if(b.inserted)for(var p=0;e=b.inserted[p];p++)n=e.basisObjectId,f[n]?f[n].count++:f[n]={count:1,object:e},w[n]=f[n];if(b.deleted)for(p=
0;e=b.deleted[p];p++)n=e.basisObjectId,w[n]=f[n],f[n].count--;this.applyRule(w)},destroy:function(a){this.removeSource(a)}}},init:function(){e.prototype.init.call(this);var a=this.sources;this.sources=[];a&&a.forEach(this.addSource,this)},setRule:function(a){"function"!=typeof a&&(a=u.UNION);this.rule!==a&&(this.rule=a,this.applyRule())},applyRule:function(a){var b=this.members_,f=this.rule,e=this.sources.length,n=[],p=[],u,c;a||(a=b);for(var q in a)a=b[q],u=e&&a.count&&f(a.count,e),u!=!!this.items_[q]&&
(u?n:p).push(a.object),0==a.count&&delete b[q];(c=y(n,p))&&this.emit_itemsChanged(c);return c},addSource:function(l){if(l instanceof e&&a.array.add(this.sources,l)){this.listen.source&&l.addHandler(this.listen.source,this);var b=this.members_,f;for(f in l.items_)b[f]?b[f].count++:b[f]={count:1,object:l.items_[f]};this.applyRule();this.emit_sourcesChanged({inserted:[l]});return!0}},removeSource:function(l){if(a.array.remove(this.sources,l)){this.listen.source&&l.removeHandler(this.listen.source,this);
var b=this.members_,f;for(f in l.items_)b[f].count--;this.applyRule();this.emit_sourcesChanged({deleted:[l]});return!0}},setSources:function(l){for(var b=W(this.sources),f=0,w;w=l[f];f++)w instanceof e&&(a.array.remove(b,w)||this.addSource(w));b.forEach(this.removeSource,this)},clear:function(){W(this.sources).forEach(this.removeSource,this)},destroy:function(){e.prototype.destroy.call(this);this.sources=null}});u.UNION=u.prototype.rule;u.INTERSECTION=function(a,b){return a==b};u.DIFFERENCE=function(a,
b){return 1==a};u.MORE_THAN_ONE_INCLUDE=function(a,b){return 1==b||1<a};u.AT_LEAST_ONE_EXCLUDE=function(a,b){return 1==b||a<b};var p=function(a){return!this.has(a)};c=aa(e,{className:J+".Subtract",subscribeTo:z.MINUEND+z.SUBTRAHEND,minuend:null,emit_minuendChanged:F("minuendChanged","oldMinuend"),subtrahend:null,emit_subtrahendChanged:F("subtrahendChanged","oldSubtrahend"),listen:{minuend:{itemsChanged:function(a,b){if(this.subtrahend){var f=y(b.inserted&&b.inserted.filter(p,this.subtrahend),b.deleted&&
b.deleted.filter(this.has,this));f&&this.emit_itemsChanged(f)}},destroy:function(){this.setOperands(null,this.subtrahend)}},subtrahend:{itemsChanged:function(a,b){if(this.minuend){var f=y(b.deleted&&b.deleted.filter(p,this),b.inserted&&b.inserted.filter(this.has,this));f&&this.emit_itemsChanged(f)}},destroy:function(){this.setOperands(this.minuend,null)}}},init:function(){e.prototype.init.call(this);var a=this.minuend,b=this.subtrahend;this.subtrahend=this.minuend=null;(a||b)&&this.setOperands(a,
b)},setOperands:function(a,b){var f,w=!1;!1==a instanceof e&&(a=null);!1==b instanceof e&&(b=null);var n=this.minuend,p=this.subtrahend;if(n!==a){w=!0;this.minuend=a;var u=this.listen.minuend;u&&(n&&n.removeHandler(u,this),a&&a.addHandler(u,this));this.emit_minuendChanged(n)}if(p!==b){w=!0;this.subtrahend=b;if(u=this.listen.subtrahend)p&&p.removeHandler(u,this),b&&b.addHandler(u,this);this.emit_subtrahendChanged(p)}if(!w)return!1;if(a&&b){var w=[],n=[],c;for(c in this.items_)a.items_[c]&&!b.items_[c]||
w.push(this.items_[c]);for(c in a.items_)this.items_[c]||b.items_[c]||n.push(a.items_[c]);(f=y(n,w))&&this.emit_itemsChanged(f)}else this.itemCount&&this.emit_itemsChanged(f={deleted:this.getItems()});return f},setMinuend:function(a){return this.setOperands(a,this.subtrahend)},setSubtrahend:function(a){return this.setOperands(this.minuend,a)},clear:function(){this.setOperands()}});var R=aa(e,{className:J+".SourceDataset",subscribeTo:z.SOURCE,source:null,emit_sourceChanged:F("sourceChanged","oldSource"),
sourceAdapter_:null,sourceMap_:null,listen:{source:{destroy:function(){this.sourceAdapter_||this.setSource()}}},init:function(){this.sourceMap_={};e.prototype.init.call(this);var a=this.source;a&&(this.source=null,this.setSource(a))},setSource:function(l){l=a.data.resolveDataset(this,this.setSource,l,"sourceAdapter_");if(this.source!==l){var b=this.source,f=this.listen.source;this.source=l;if(f){var e=f.itemsChanged;b&&(b.removeHandler(f,this),e&&e.call(this,b,{deleted:b.getItems()}));l&&(l.addHandler(f,
this),e&&e.call(this,l,{inserted:l.getItems()}))}this.emit_sourceChanged(b)}},clear:function(){this.setSource()},destroy:function(){e.prototype.destroy.call(this);this.sourceMap_=null}}),q=aa(R,{className:J+".MapFilter",map:B,filter:Y,rule:A(E),ruleEvents:I(function(a){var b=this.map?this.map(a):object;if(!1==b instanceof ba||this.filter(b))b=null;var f=this.sourceMap_[a.basisObjectId],e=f.member;if(e!==b){var n=this.members_,p,u,c;f.member=b;e&&(f=e.basisObjectId,this.removeMemberRef&&this.removeMemberRef(e,
a),0==--n[f]&&(delete n[f],c=[e]));b&&(e=b.basisObjectId,this.addMemberRef&&this.addMemberRef(b,a),n[e]?n[e]++:(n[e]=1,u=[b]));(p=y(u,c))&&this.emit_itemsChanged(p)}},"update"),addMemberRef:null,removeMemberRef:null,listen:{source:{itemsChanged:function(a,b){var f=this.sourceMap_,e=this.members_,p=[],u=[],c,q,A,F=this.ruleEvents;n.setAccumulateState(!0);if(b.inserted)for(var s=0;c=b.inserted[s];s++){A=this.map?this.map(c):c;if(!1==A instanceof ba||this.filter(A))A=null;F&&c.addHandler(F,this);f[c.basisObjectId]=
{sourceObject:c,member:A};A&&(q=A.basisObjectId,e[q]?e[q]++:(e[q]=1,p.push(A)),this.addMemberRef&&this.addMemberRef(A,c))}if(b.deleted)for(s=0;c=b.deleted[s];s++)q=c.basisObjectId,A=f[q].member,F&&c.removeHandler(F,this),delete f[q],A&&(q=A.basisObjectId,0==--e[q]&&(delete e[q],u.push(A)),this.removeMemberRef&&this.removeMemberRef(A,c));n.setAccumulateState(!1);(b=y(p,u))&&this.emit_itemsChanged(b)}}},setMap:function(a){"function"!=typeof a&&(a=B);if(this.map!==a)return this.map=a,this.applyRule()},
setFilter:function(a){"function"!=typeof a&&(a=Y);if(this.filter!==a)return this.filter=a,this.applyRule()},setRule:function(a){"function"!=typeof a&&(a=E);if(this.rule!==a)return this.rule=a,this.applyRule()},applyRule:function(){var a=this.sourceMap_,b=this.members_,f,e,n,p,u,c=[],q=[],A,s;for(s in a){u=a[s];p=u.sourceObject;f=u.member;e=this.map?this.map(p):p;if(!1==e instanceof ba||this.filter(e))e=null;f!=e&&(u.member=e,f&&(n=f.basisObjectId,this.removeMemberRef&&this.removeMemberRef(f,p),b[n]--),
e&&(f=e.basisObjectId,this.addMemberRef&&this.addMemberRef(e,p),f in b?b[f]++:(b[f]=1,c.push(e))))}for(n in this.items_)0==b[n]&&(delete b[n],q.push(this.items_[n]));(A=y(c,q))&&this.emit_itemsChanged(A);return A}});r=aa(q,{className:J+".Subset",filter:function(a){return!this.rule(a)}});U=aa(q,{className:J+".Split",subsetClass:e,subsetWrapperClass:da,keyMap:null,map:function(a){return this.keyMap.resolve(a)},setRule:function(a){"function"!=typeof a&&(a=E);if(this.rule!==a)return this.rule=a,this.keyMap.keyGetter=
a,this.applyRule()},addMemberRef:function(a,b){a.dataset.emit_itemsChanged({inserted:[b]})},removeMemberRef:function(a,b){a.dataset.emit_itemsChanged({deleted:[b]})},init:function(){this.keyMap&&!1!=this.keyMap instanceof f||(this.keyMap=L(this.keyMap,this.rule,this.subsetWrapperClass,this.subsetClass));q.prototype.init.call(this)},getSubset:function(a,b){return this.keyMap.get(a,b)},destroy:function(){q.prototype.destroy.call(this);this.keyMap.destroy();this.keyMap=null}});F=aa(R,{className:J+".Slice",
rule:A(E),ruleEvents:I(function(a){var b=this.sourceMap_[a.basisObjectId];a=this.rule(a);var f=this.index_;if(a!==b.value){var e=G(f,b),n=f[e-1],p=f[e+1];b.value=a;if(n&&(n.value>a||n.value==a&&n.object.basisObjectId>b.object.basisObjectId)||p&&(p.value<a||p.value==a&&p.object.basisObjectId<b.object.basisObjectId))f.splice(e,1),f.splice(G(f,b),0,b),this.applyRule()}},"update"),index_:null,orderDesc:!1,offset:0,limit:10,listen:{source:{itemsChanged:function(a,b){var f=this.sourceMap_,e=this.index_,
n=this.ruleEvents,p=!1,u=!1,c,q=b.inserted,A=b.deleted;if(A){A.length>e.length-A.length&&(p=!0,u=A.length!=e.length,e.length=0);for(var F=0,z;z=A[F];F++)p||(c=f[z.basisObjectId],e.splice(G(e,c),1)),delete f[z.basisObjectId],n&&z.removeHandler(n,this);if(u)for(var B in f)c=f[B],e.splice(G(e,c),0,c)}if(q){u=!e.length;for(F=0;z=q[F];F++)c={object:z,value:this.rule(z)},f[z.basisObjectId]=c,u?e.push(c):e.splice(G(e,c),0,c),n&&z.addHandler(n,this);u&&e.sort(s)}this.applyRule()}}},emit_rangeChanged:F("rangeChanged",
"oldOffset","oldLimit"),init:function(){this.index_=[];R.prototype.init.call(this)},setRange:function(a,b){var f=this.offset,e=this.limit,n=!1;if(f!=a||e!=b)this.offset=a,this.limit=b,n=this.applyRule(),this.emit_rangeChanged(f,e);return n},setOffset:function(a){return this.setRange(a,this.limit)},setLimit:function(a){return this.setRange(this.offset,a)},setRule:function(a,b){a=A(a);this.orderDesc=!!b;if(this.rule!=a){for(var f=this.index_,e=0;e<f.length;e++)f[e].value=a(f[e].object);this.rule=a;
f.sort(s)}return this.applyRule()},applyRule:function(){var f=this.offset,b=f+this.limit;this.orderDesc&&(f=this.index_.length-b,b=f+this.limit);for(var e=a.object.slice(this.members_),f=this.index_.slice(Math.max(0,f),Math.max(0,b)),b=[],n,p=0,u;u=f[p];p++){var c=u.object.basisObjectId;e[c]?delete e[c]:(b.push(u.object),this.members_[c]=u.object)}for(c in e)delete this.members_[c];(n=y(b,N(e)))&&this.emit_itemsChanged(n);return n},destroy:function(){R.prototype.destroy.call(this);this.index_=null}});
J=aa(R,{className:J+".Cloud",subsetClass:e,subsetWrapperClass:da,rule:A(Y),ruleEvents:I(function(a){var b=this.sourceMap_,f=this.members_,e=a.basisObjectId,n=b[e].list,b=b[e].list={},e=this.rule(a),p,u=[],c=[],q;if(Array.isArray(e))for(var A=0;A<e.length;A++)(q=this.keyMap.get(e[A],!0))&&!q.has(a)&&(F=q.basisObjectId,b[F]=q,n[F]||(q.dataset.emit_itemsChanged({inserted:[a]}),f[F]?f[F]++:(u.push(q),f[F]=1)));for(var F in n)b[F]||(q=n[F],q.dataset.emit_itemsChanged({deleted:[a]}),--f[F]||(delete f[F],
c.push(q)));(p=y(u,c))&&this.emit_itemsChanged(p)},"update"),keyMap:null,map:B,listen:{source:{itemsChanged:function(a,b){var f=this.sourceMap_,e=this.members_,p=this.ruleEvents,u,c,q,A=[],F=[];n.setAccumulateState(!0);if(u=b.inserted)for(var s=0,z;z=u[s];s++){var B=this.rule(z),R={object:z,list:{}};f[z.basisObjectId]=R;if(Array.isArray(B))for(var g=0,x={};g<B.length;g++)(c=this.keyMap.get(B[g],!0))&&!x[c.basisObjectId]&&(q=c.basisObjectId,x[q]=!0,R.list[q]=c,c.dataset.emit_itemsChanged({inserted:[z]}),
e[q]?e[q]++:(A.push(c),e[q]=1));p&&z.addHandler(p,this)}if(u=b.deleted)for(s=0;z=u[s];s++){c=z.basisObjectId;B=f[c].list;delete f[c];for(q in B)c=B[q],c.dataset.emit_itemsChanged({deleted:[z]}),--e[q]||(delete e[q],F.push(c));p&&z.removeHandler(p,this)}n.setAccumulateState(!1);(b=y(A,F))&&this.emit_itemsChanged(b)}}},init:function(){this.keyMap&&!1!=this.keyMap instanceof f||(this.keyMap=L(this.keyMap,this.rule,this.subsetWrapperClass,this.subsetClass));R.prototype.init.call(this)},getSubset:function(a,
b){return this.keyMap.get(a,b)},destroy:function(){R.prototype.destroy.call(this);this.keyMap.destroy();this.keyMap=null}});M.exports={createRuleEvents:I,Merge:u,Subtract:c,SourceDataset:R,MapFilter:q,Subset:r,Split:U,Slice:F,Cloud:J}},"d.js":function(c,M,a,r,U,J,aa,da){a.require("./5.js");a.require("./e.js");var y=a.data.STATE.UNDEFINED,I=a.data.STATE.READY,L=a.data.STATE.PROCESSING,G=a.data.STATE.ERROR,s=function(){},O={start:function(a,c){var s=c.requestData.origin;this.start.call(c.requestData.origin);
s.state!=L&&s.setState(L)},success:function(a,c,s){a=c.requestData.origin;this.success.call(a,s);a.state==L&&a.setState(I)},failure:function(a,c,s){a=c.requestData.origin;this.failure.call(a,s);a.state==L&&a.setState(G,s)},abort:function(a,c){var s=c.requestData.origin;this.abort.call(s);s.state==L&&s.setState(y)},complete:function(a,c){this.complete.call(c.requestData.origin)}},N={start:s,success:s,failure:s,abort:s,complete:s};M.exports={create:function(c){c=a.object.extend({prepare:s,request:s},
c);var B=a.object.splice(c,["prepare","request"]),r=a.object.merge(N,a.object.splice(c,["start","success","failure","abort","complete"])),y=a.fn.lazyInit(function(){var s=c.transport?c.transport:c.service?c.service.createTransport(c):c.createTransport?c.createTransport(c):new a.net.ajax.Transport(c);s.addHandler(O,r);return s});return function(){this.state!=L&&(B.prepare.apply(this,arguments),this.request=y().request(a.object.complete({origin:this},B.request.apply(this,arguments))))}}}},"e.js":function(c,
M,a,r,U,J,aa,da){function y(f,e){var n={};W.test(e.method)?n["Content-Type"]=e.contentType+(e.encoding?";charset="+e.encoding:""):L.test("ie")&&(n["If-Modified-Since"]="Thu, 01 Jan 1970 00:00:00 GMT");a.object.iterate(s(n,e.headers),function(a,f){null!=f&&"function"!=typeof f&&this.setRequestHeader(a,f)},f)}function I(f){var e=this.xhr,n;e&&("number"!=typeof f&&(f=e.readyState),f!=this.prevReadyState_&&(this.prevReadyState_=f,this.emit_readyStateChanged(f),f==E?(this.clearTimeout(),e.onreadystatechange=
a.fn.$undef,(f=0==e.status)||e.responseType||(f="unknown"==typeof e.responseText||!e.responseText&&!e.getAllResponseHeaders()),f?(this.emit_abort(),e=this.stateOnAbort):(this.processResponse(),this.isSuccessful()?(e=Y.READY,this.emit_success(this.getResponseData())):(e=Y.ERROR,n=this.getResponseError(),!n&&this.data.error&&(n=this.data.error),this.emit_failure(n))),this.emit_complete(this)):e=Y.PROCESSING,this.setState(e,n)))}a.require("./f.js");a.require("./g.js");a.require("./5.js");c=this.path;
var L=a.ua,G=r.encodeURIComponent,s=a.object.extend,O=a.object.slice,N=a.object.merge;U=a.net.createTransportEvent;J=a.net.createRequestEvent;var A=a.net.AbstractRequest,B=a.net.AbstractTransport,E=4,Y=a.data.STATE,W=/^(POST|PUT|PATCH|LINK|UNLINK)$/i,F="native",z=function(){if("XMLHttpRequest"in r)return function(){return new XMLHttpRequest};var a=r.ActiveXObject;if(a)for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;F=e[n];n++)try{if(new a(F))return function(){return new a(F)}}catch(c){}throw 34;
}();J=A.subclass({className:c+".Request",requestStartTime:0,timeout:3E4,timer_:null,debug:!1,emit_readyStateChanged:J("readyStateChanged"),init:function(){A.prototype.init.call(this);this.xhr=z()},isIdle:function(){return this.xhr.readyState==E||0==this.xhr.readyState},isSuccessful:function(){var a=this.xhr.status;return 200<=a&&300>a||304==a},processResponse:function(){this.update({contentType:this.xhr.getResponseHeader("content-type"),status:this.xhr.status})},getResponseData:function(){var f=this.xhr;
if(!f.responseType&&("json"==this.responseType||/^application\/json/i.test(this.data.contentType))){var e;a:{try{e=a.json.parse(f.responseText);break a}catch(n){}e=void 0}return e}return"response"in f?f.response:f.responseText},processErrorResponse:function(){return this.getResponseError()},getResponseError:function(){return{code:"SERVER_ERROR",msg:this.responseType?this.xhr.response||this.xhr.statusText||"Error":this.xhr.responseText}},prepare:a.fn.$true,prepareRequestData:function(a){var e=[],n=
a.url;a=O(a);for(var c in a.params){var p=a.params[c];null!=p&&null!=p.toString()&&e.push(G(c)+"="+G(p.toString()))}e=e.join("&");!a.postBody&&W.test(a.method)&&(a.postBody=e||"",e="");a.routerParams&&(n=n.replace(/:([a-z\_\-][a-z0-9\_\-]+)/gi,function(e,n){return n in a.routerParams?a.routerParams[n]:e}));e&&(n+=(-1==n.indexOf("?")?"?":"&")+e);a.requestUrl=n;return a},doRequest:function(){this.send(this.prepareRequestData(this.requestData))},send:function(a){this.update({contentType:"",status:""});
L.test("gecko1.8.1-")&&a.asynchronous&&(this.xhr=z());this.emit_start();var e=this.xhr;this.prevReadyState_=-1;e.onreadystatechange=I.bind(this);a.asynchronous||I.call(this,0);e.open(a.method,a.requestUrl,a.asynchronous);if(a.responseType&&a.asynchronous&&"responseType"in e)try{e.responseType=a.responseType}catch(n){}this.responseType=a.responseType||"";y(e,a);this.setTimeout(this.timeout);var c=a.postBody;if(W.test(a.method)&&L.test("ie9-"))if("object"==typeof c&&"undefined"!=typeof c.documentElement&&
"string"==typeof c.xml)c=c.xml;else if("string"==typeof c)c=c.replace(/\r/g,"");else if(null==c||""==c)c="[No data]";e.send(c);return!0},repeat:function(){this.requestData&&(this.abort(),this.doRequest())},abort:function(){this.isIdle()||(this.clearTimeout(),this.xhr.abort(),this.xhr.readyState!=E&&0!=this.xhr.readyState&&I.call(this,E))},setTimeout:function(a){this.xhr.asynchronous&&("ontimeout"in this.xhr?(this.xhr.timeout=a,this.xhr.ontimeout=this.timeoutAbort.bind(this)):this.timer_=setTimeout(this.timeoutAbort.bind(this),
a))},clearTimeout:function(){this.timer_&&(this.timer_=clearTimeout(this.timer_))},timeoutAbort:function(){this.update({error:{code:"TIMEOUT_ERROR",message:"Timeout error"}});this.emit_timeout(this);this.abort()},destroy:function(){this.abort();this.xhr=null;A.prototype.destroy.call(this)}});var ba=B.subclass({className:c+".Transport",requestClass:J,emit_readyStateChanged:U("readyStateChanged"),asynchronous:!0,method:"GET",contentType:"application/x-www-form-urlencoded",encoding:null,requestHeaders:a.Class.extensibleProperty(),
responseType:"",params:null,init:function(){B.prototype.init.call(this);this.params=O(this.params)},setParam:function(a,e){this.params[a]=e},setParams:function(a){this.clearParams();for(var e in a)this.setParam(e,a[e])},removeParam:function(a){delete this.params[a]},clearParams:function(){for(var a in this.params)delete this.params[a]},prepareRequestData:function(f){if(!f.url&&!this.url)throw 35;s(f,{headers:N(this.requestHeaders,f.headers),params:N(this.params,f.params)});a.object.complete(f,{asynchronous:this.asynchronous,
url:this.url,method:this.method,contentType:this.contentType,encoding:this.encoding,postBody:this.postBody,responseType:this.responseType});return f}});M.exports={Request:J,Transport:ba,request:function(f,e,n){"string"==typeof f&&(f={url:f,asynchronous:!(!e&&!n)});var c=new ba(f);c.addHandler({success:e&&function(a,f,n){e(n)},failure:n&&function(a,f,e){n(e)},complete:function(){a.nextTick(function(){c.destroy()})}});f=c.request();if(!f.requestData.asynchronous)return f.getResponseData()}}},"f.js":function(c,
M,a,r,U,J,aa,da){function y(a){var c=1E6;a=String(a).split(".");for(var s=0,r=0;4>s&&s<a.length;s++,c/=100)r+=a[s]*c;return r}function I(a){a=a.toLowerCase();if(a in s)return s[a];var c=a.match(/^([a-z]+)(([\d\.]+)([+-=]?))?$/i);if(c){s[a]=!1;var r=c[1].toLowerCase(),N=y(c[3]),c=c[4]||"=";if(r=G[r])return s[a]=!N||"="==c&&r==N||"+"==c&&r>=N||"-"==c&&r<N}return!1}var L=r.document;c=r.navigator&&r.navigator.userAgent||"";r=r.opera;var G={},s={};da="unknown";U={MSIE:["Internet Explorer","msie","ie"],
Gecko:["Gecko","gecko"],Safari:["Safari","safari"],"iPhone OS":["iPhone","iphone"],AdobeAir:["AdobeAir","air"],AppleWebKit:["WebKit"],Chrome:["Chrome","chrome"],FireFox:["FireFox","firefox","ff"],Iceweasel:["FireFox","firefox","ff"],Shiretoko:["FireFox","firefox","ff"],Opera:["Opera","opera"]};for(var O in U)if(!("MSIE"==O&&r||"Safari"==O&&/chrome/i.test(c)||"AppleWebKit"==O&&/iphone/i.test(c))&&c.match(RegExp(O+".(\\d+(\\.\\d+)*)","i"))){J=U[O];da=r&&"function"==typeof r.version?r.version():RegExp.$1;
aa=y(da);da=J[0]+" "+da;for(var N=0;N<J.length;N++)G[J[N].toLowerCase()]=aa}M.exports={prettyName:da,is:I,test:function(){return a.array(arguments).some(I)},cookies:{set:function(a,c,s,r){L.cookie=a+"="+(null==c?"":escape(c))+";path="+(r||(0==location.pathname.indexOf("/")?"":"/")+location.pathname)+(s?";expires="+(new Date(Date.now()+1E3*s)).toGMTString():"")},get:function(a){return(a=L.cookie.match(RegExp("(^|;)\\s*"+a+"\\s*=\\s*(.*?)\\s*(;|$)")))&&unescape(a[2])},remove:function(a,c){L.cookie=
a+"=;expires="+(new Date(0)).toGMTString()+";path="+(c||(0==location.pathname.indexOf("/")?"":"/")+location.pathname)}}}},"1.js":function(c,M,a,r,U,J,aa,da){function y(a){I.title=a}var I=r.document||{title:"unknown"},L=I.title,G=a.fn.$undef,s,O;c=a.fn.lazyInit(function(c){var r=[],B=!1,E={inited:!1,setTitle:function(c){c!=L&&(L instanceof a.Token&&L.detach(y),c instanceof a.Token?(c.attach(y),y(c.get())):y(c),L=c)},setElement:function(a){a="string"==typeof a?I.getElementById(a):a;O!=a&&(O?O.parentNode.replaceChild(a,
O):(O=a,s||(s={type:"append",node:I.body}),(a="string"==typeof s.node?I.getElementById(s.node):s.node)&&("append"==s.type?a.appendChild(O):a.parentNode.replaceChild(O,a))))},ready:function(a,c){B?a.call(c,E):r.push({fn:a,context:c})}},M;for(M in c){var J=c[M];switch(M){case "title":E.setTitle(J);break;case "container":s={type:"append",node:J};break;case "replace":s={type:"replace",node:J};break;case "element":O=J;break;case "init":G="function"==typeof J?J:G}}a.ready(function(){var a=O,c=G.call(E);
c&&(a=c.element?c.element:c);O=null;E.setElement(a);B=!0;for(E.inited=!0;a=r.shift();)a.fn.call(a.context,E)});return E});M.exports={create:c}},"h.js":function(c,M,a,r,U,J,aa,da){function y(){var a="basisjsJsonpCallback"+parseInt(1E11*Math.random());r[a]=function(e){z[a]=e};return a}function I(a){var e=z[a];delete z[a];return e}function L(a,e){var c,u;c=!1;"number"!=typeof a&&(a=(c=a&&"error"==a.type)||!this.script.readyState||/loaded|complete/.test(this.script.readyState)?F:W);if(a!=this.prevReadyState_){this.prevReadyState_=
a;this.emit_readyStateChanged(a);if(a==F){this.clearTimeout();this.script.onload=this.script.onreadystatechange=null;this.script.parentNode&&this.script.parentNode.removeChild(this.script);this.script=null;e?(this.emit_abort(),c=this.stateOnAbort):(this.processResponse(),this.isSuccessful()&&!c?(c=Y.READY,this.emit_success(this.getResponseData())):(c=Y.ERROR,u=this.getResponseError(),this.emit_failure(u)));this.emit_complete(this);var p=this.callback;I(p);delete r[p];this.callback=void 0}else c=Y.PROCESSING;
this.setState(c,u)}}a.require("./g.js");a.require("./5.js");c=this.path;var G=r.document,s=r.encodeURIComponent,O=a.object.extend,N=a.object.slice,A=a.object.merge;U=a.net.createRequestEvent;var B=a.net.AbstractRequest,E=a.net.AbstractTransport,Y=a.data.STATE,W=3,F=4,z={};J=B.subclass({className:c+".Request",timeout:3E4,timer_:null,emit_readyStateChanged:U("readyStateChanged"),isIdle:function(){return!!this.script},isSuccessful:function(){return 200==this.data.status},processResponse:function(){this.callback in
z&&this.update({contentType:"application/javascript",data:I(this.callback),status:200})},getResponseData:function(){return this.data.data},getResponseError:function(){return{code:"ERROR",msg:"ERROR"}},prepare:a.fn.$true,prepareRequestData:function(a){var e=[],c=a.url;a=N(a);this.callback=y();for(var u in a.params){var p=a.params[u];null!=p&&null!=p.toString()&&e.push(s(u)+"="+s(p.toString()))}e.push(s(a.callbackParam)+"="+s(this.callback));e=e.join("&");a.routerParams&&(c=c.replace(/:([a-z\_\-][a-z0-9\_\-]+)/gi,
function(e,c){return c in a.routerParams?a.routerParams[c]:e}));e&&(c+=(-1==c.indexOf("?")?"?":"&")+e);a.requestUrl=c;return a},doRequest:function(){this.send(this.prepareRequestData(this.requestData))},send:function(a){if(!G)throw 36;var e=G.head||G.getElementByName("head")[0]||G.documentElement,c=G.createElement("script");this.update({data:void 0,status:"",error:""});this.script=c;c.async=!0;c.src=a.requestUrl;c.charset=a.encoding;c.onload=c.onerror=c.onreadystatechange=L.bind(this);this.prevReadyState_=
-1;this.emit_start();L.call(this,0);this.setTimeout(this.timeout);e.appendChild(this.script)},repeat:function(){this.requestData&&(this.abort(),this.doRequest())},abort:function(){this.isIdle()||(this.clearTimeout(),L.call(this,F,!0))},setTimeout:function(a){this.timer_=setTimeout(this.timeoutAbort.bind(this),a)},clearTimeout:function(){this.timer_&&(this.timer_=clearTimeout(this.timer_))},timeoutAbort:function(){this.update({error:{code:"TIMEOUT_ERROR",message:"Timeout error"}});this.emit_timeout(this);
this.abort()},destroy:function(){this.abort();B.prototype.destroy.call(this)}});var ba=E.subclass({className:c+".Transport",requestClass:J,emit_readyStateChanged:U("readyStateChanged"),encoding:null,params:null,callbackParam:"callback",init:function(){E.prototype.init.call(this);this.params=N(this.params)},setParam:function(a,c){this.params[a]=c},setParams:function(a){this.clearParams();for(var c in a)this.setParam(c,a[c])},removeParam:function(a){delete this.params[a]},clearParams:function(){for(var a in this.params)delete this.params[a]},
prepareRequestData:function(a){var c=a.url||this.url;if(!c)throw 37;O(a,{url:c,encoding:a.encoding||this.encoding,params:A(this.params,a.params),routerParams:a.routerParams,callbackParam:a.callbackParam||this.callbackParam,influence:a.influence});return a}});M.exports={Request:J,Transport:ba,request:function(c,e,n){"string"==typeof c&&(c={url:c});var u=new ba(c);u.addHandler({success:e&&function(a,c,f){e(f)},failure:n&&function(a,c,e){n(e)},complete:function(){a.nextTick(function(){u.destroy()})}});
u.request()}}},"0.js":function(c,M,a,r,U,J,aa,da){a.require("./1.js");a.require("./2.js");a.require("./5.js");M.exports=a.app.create({replace:"app-placeholder",init:function(){var c=a.data.Value.from(a.require("./b.js").all,"stateChanged","state");return new a.ui.Node({template:a.template.get("#1"),binding:{loading:c.as(function(a){return"ready"!=a}),message:c.as(function(a){switch(String(a)){case "processing":return"Loading packages...";case "error":return"Failed to load component list :(";default:return""}}),
featured:a.resource("./k.js"),hot:a.resource("./l.js"),search:a.resource("./m.js"),latest:a.resource("./n.js"),random:a.resource("./o.js")}})}})},"k.js":function(c,M,a,r,U,J,aa,da){a.require("./5.js");a.require("./i.js");M.exports=new app.list.List({header:"Featured components",childNodes:a.data.wrap(a.require("./0.json"))})},"l.js":function(c,M,a,r,U,J,aa,da){a.require("./5.js");a.require("./c.js");a.require("./i.js");c=new a.data.dataset.Slice({source:a.require("./b.js").withDescription,limit:50,
orderDesc:!0,rule:"data.created"});a=new a.data.dataset.Slice({source:c,orderDesc:!0,limit:5,rule:"data.stars"});M.exports=new app.list.List({header:"Hot components",dataSource:a,sorting:"data.stars",sortingDesc:!0})},"m.js":function(c,M,a,r,U,J,aa,da){a.require("./2.js");a.require("./c.js");var y=a.require("./j.js");c=a.require("./b.js").all;var I={name:"asc",description:"asc",owner:"asc",forks:"desc",stars:"desc",created:"desc",updated:"desc"},L;for(L in I)I.hasOwnProperty(L)&&(I[L]={desc:"desc"==
I[L],rule:a.getter("data."+L+'||""')});var G=new a.data.dataset.Subset({active:!0,source:c});L=new a.data.dataset.Slice({source:G,limit:10,orderDesc:I.stars.desc,rule:I.stars.rule});M.exports=new a.ui.Node({dataSource:L,template:a.template.get("#4"),binding:{count:a.data.Value.from(c,"itemsChanged","itemCount")},action:{search:function(a){this.search(a.sender.value.trim())},sortByName:function(){this.setSortingType("name")},sortByDescription:function(){this.setSortingType("description")},sortByOwner:function(){this.setSortingType("owner")},
sortByForks:function(){this.setSortingType("forks")},sortByStars:function(){this.setSortingType("stars")},sortByCreated:function(){this.setSortingType("created")},sortByUpdated:function(){this.setSortingType("updated")}},init:function(){a.ui.Node.prototype.init.call(this);this.search(r.location.hash.replace("#!/search/","").trim())},handler:{sortingChanged:function(){console.log(this.sorting,this.sortingDesc);this.dataSource.setRule(this.sorting,this.sortingDesc);console.log(this.dataSource.rule,
this.dataSource.orderDesc)}},sorting:L.rule,sortingDesc:L.orderDesc,setSortingType:function(a){this.setSorting(I[a].rule,this.sorting===I[a].rule?!this.sortingDesc:I[a].desc)},searchValue:"",search:function(c){if(c!=this.searchValue){r.location.hash=c?"#!/search/"+c:"";var y=a.fn.$true;if(c)var N=RegExp(a.string.forRegExp(c).split(/\s/).join("|"),"i"),y=function(a){return N.test(a.data.searchIndex)};G.setRule(y)}},childClass:{template:a.template.get("#5"),binding:{name:"data:",description:"data:",
owner:"data:",website:"data:",forks:"data:",stars:"data:",created:"data:",createdAgo:function(a){return y(a.data.created).fromNow()},updated:"data:",updatedAgo:function(a){return y(a.data.updated).fromNow()}}}})},"n.js":function(c,M,a,r,U,J,aa,da){a.require("./5.js");a.require("./c.js");a.require("./i.js");c=new a.data.dataset.Slice({source:a.require("./b.js").withDescription,limit:5,orderDesc:!0,rule:"data.created"});M.exports=new app.list.List({header:"Latest components",dataSource:c,sorting:"data.created",
sortingDesc:!0})},"o.js":function(c,M,a,r,U,J,aa,da){a.require("./5.js");a.require("./c.js");a.require("./i.js");c=new a.data.dataset.Slice({source:a.require("./b.js").withDescription,limit:5,rule:function(){return Math.random()}});M.exports=new app.list.List({header:"Random components",dataSource:c})},"i.js":function(c,M,a,r,U,J,aa,da){a.require("./2.js");c=a.ui.Node.subclass({template:a.template.get("#2"),binding:{header:"header"},childClass:{template:a.template.get("#3"),binding:{name:"data:",
description:"data:",website:"data:"}}});M.exports={List:c}},"2.js":function(c,M,a,r,U,J,aa,da){function y(a){if(a=a.nodes)for(var c=a.length-1,e;e=a[c];c--)e.parentNode.insertBefore(e,e.nextSibling)}a.require("./3.js");a.require("./5.js");a.require("./6.js");a.require("./7.js");a.require("./8.js");c=this.path;var I=r.document;r=a.Class;var L=a.event.create,G=a.template.html.Template,s=a.template.TemplateSwitcher;U=a.dom.wrapper.Node;da=a.dom.wrapper.PartitionNode;var O=a.dom.wrapper.GroupingNode,
N=1,A=function(){var a={},c=/^([a-z_][a-z0-9_]*):(.*)/i;return{add:function(c,e){a[c]||(a[c]=e)},process:function(e,f){var q,l=f.match(c);l&&(q=a[l[1]],f=l[2]||e);return q?q(f):f}}}();A.add("data",function(a){return{events:"update",getter:"data."+a}});A.add("satellite",function(a){return{events:"satelliteChanged",getter:function(c){return c.satellite[a]?c.satellite[a].element:null}}});var B=r.customExtendProperty({state:{events:"stateChanged",getter:function(a){return String(a.state)}},childNodesState:{events:"childNodesStateChanged",
getter:function(a){return String(a.childNodesState)}},childCount:{events:"childNodesModified",getter:function(a){return a.childNodes?a.childNodes.length:0}},hasChildren:{events:"childNodesModified",getter:function(a){return!!a.firstChild}},empty:{events:"childNodesModified",getter:function(a){return!a.firstChild}}},function(c,f){c.bindingId=N++;for(var p in f){var s=null,q=f[p];e&&q instanceof e||a.resource.isResource(q)?s={events:"satelliteChanged",getter:function(a,b){var c="function"==typeof b?
b:null,f=function(n){f=!1;if(c){b=c();if(!1==b instanceof e)return;c=null}n.setSatellite(a,b)};return function(b){f&&f(b);return c||(b.satellite[a]?b.satellite[a].element:null)}}(p,q)}:q&&("string"==typeof q?q=A.process(p,q):q.bindingBridge&&(q=a.fn.$const(q)),s="object"!=typeof q?{getter:"function"==typeof q?q:a.getter(q)}:Array.isArray(q)?{events:q[0],getter:a.getter(q[1])}:{events:q.events,getter:a.getter(q.getter)});c[p]=s}}),E={attach:function(a,c,e){a.addHandler(c,e)},detach:function(a,c,e){a.removeHandler(c,
e)}},Y=r.extensibleProperty({select:function(a){this.isDisabled()||(this.contextSelection&&this.contextSelection.multiple?this.select(a.ctrlKey||a.metaKey):this.select())}}),W={"*":function(a){var c=this.templateSwitcher_;c&&c.ruleEvents&&c.ruleEvents[a.type]&&this.setTemplate(c.resolve(this))}},F=new G("<div/>"),z=[],ba;J=function(c){return{template:F,emit_templateChanged:L("templateChanged"),templateSwitcher_:null,binding:B,action:Y,tmpl:null,element:null,childNodesElement:null,emit_update:function(a){this.templateUpdate(this.tmpl,
"update",a);c.emit_update.call(this,a)},init:function(){this.element=this.childNodesElement=z.pop()||I.createDocumentFragment();c.init.call(this)},postInit:function(){c.postInit.call(this);var a=this.template;if(a){var e=this.element;this.template=null;this.setTemplate(a);z.push(e);this.container&&(this.container.appendChild(this.element),this.container=null)}},templateSync:function(){var a=this.element,c=this.template.createInstance(this,this.templateAction,this.templateSync,this.binding,E);c.childNodesHere&&
(c.childNodesElement=c.childNodesHere.parentNode,c.childNodesElement.insertPoint=c.childNodesHere);this.tmpl=c;this.element=c.element;this.childNodesElement=c.childNodesElement||c.element;1!=this.childNodesElement.nodeType&&(this.childNodesElement=I.createDocumentFragment());if(this.grouping){this.grouping.syncDomRefs();for(var e=this;e.grouping;)e=e.grouping;for(var n=e.lastChild;n;n=n.previousSibling)n instanceof f?e.insertBefore(n,n.nextSibling):y(n);y(e.nullGroup)}else for(e=this.lastChild;e;e=
e.previousSibling)this.insertBefore(e,e.nextSibling);this instanceof f&&y(this);this.content&&(c.content||c.element).appendChild(this.content.nodeType?this.content:I.createTextNode(this.content));this.templateUpdate(this.tmpl);a&&a!==this.element&&11!=a.nodeType&&(c=a&&a.parentNode)&&(this.owner&&this.owner.tmpl&&this.owner.tmpl.set(a,this.element),this.element.parentNode!==c&&c.replaceChild(this.element,a));this.emit_templateChanged()},setTemplate:function(a){var c=this.templateSwitcher_,e;a instanceof
s&&(e=a,a=e.resolve(this));!1==a instanceof G&&(a=null);a&&(e&&(this.templateSwitcher_=e,c||this.addHandler(W,this)),c&&c.resolve(this)!==a&&(this.templateSwitcher_=null,this.removeHandler(W,this)),this.template!==a&&(this.template=a,this.templateSync()))},updateBind:function(a){var c=this.binding[a];(c=c&&c.getter)&&this.tmpl&&this.tmpl.set(a,c(this))},templateAction:function(a,c){var e=this.action[a];e&&e.call(this,c)},templateUpdate:function(a,c,e){},focus:function(c){var e=this.tmpl?this.tmpl.focus||
this.element:null;e&&(ba&&(ba=a.clearImmediate(ba)),ba=a.setImmediate(function(){try{e.focus(),c&&e.select()}catch(a){}}))},blur:function(){var a=this.tmpl?this.tmpl.focus||this.element:null;if(a)try{a.blur()}catch(c){}},destroy:function(){var a=this.template,e=this.element;this.templateSwitcher_&&(this.templateSwitcher_=null,this.removeHandler(W,this));a.clearInstance(this.tmpl);c.destroy.call(this);this.childNodesElement=this.element=this.tmpl=null;(a=e&&e.parentNode)&&1==a.nodeType&&a.removeChild(e)}}};
aa=function(a){return{insertBefore:function(c,e){c=a.insertBefore.call(this,c,e);var f=(c.groupNode||this).childNodesElement||this.childNodesElement,q=c.nextSibling,l=c.element,q=(q&&q.element.parentNode==f?q.element:null)||f.insertPoint||null;l.parentNode===f&&l.nextSibling===q||f.insertBefore(l,q);return c},removeChild:function(c){a.removeChild.call(this,c);var e=c.element,f=e.parentNode;f&&f.removeChild(e);return c},clear:function(c){if(c)for(var e=this.firstChild;e;){var f=e.element,q=f.parentNode;
q&&q.removeChild(f);e=e.nextSibling}a.clear.call(this,c)},setChildNodes:function(c,e){var f=I.createDocumentFragment(),q=this.grouping||this,l=q.childNodesElement;q.childNodesElement=f;a.setChildNodes.call(this,c,e);l.insertBefore(f,l.insertPoint||null);q.childNodesElement=l}}};var f=r(da,J,{className:c+".PartitionNode",binding:{title:"data:"}});da=r(O,aa,{className:c+".GroupingNode",childClass:f,groupingClass:r.SELF,element:null,childNodesElement:null,emit_ownerChanged:function(a){this.syncDomRefs();
O.prototype.emit_ownerChanged.call(this,a)},init:function(){this.element=this.childNodesElement=I.createDocumentFragment();O.prototype.init.call(this)},syncDomRefs:function(){var a=this,c=this.owner,e=null;c&&(e=c.tmpl&&c.tmpl.groupsElement||c.childNodesElement);do a.element=a.childNodesElement=e;while(a=a.grouping)},destroy:function(){O.prototype.destroy.call(this);this.childNodesElement=this.element=null}});var e=r(U,J,aa,{className:c+".Node",binding:{selected:{events:"select unselect",getter:function(a){return a.selected}},
unselected:{events:"select unselect",getter:function(a){return!a.selected}},disabled:{events:"disable enable",getter:function(a){return a.disabled||a.contextDisabled}},enabled:{events:"disable enable",getter:function(a){return!(a.disabled||a.contextDisabled)}}},childClass:r.SELF,childFactory:function(a){return new this.childClass(a)},groupingClass:da});c=e.subclass({className:c+".ShadowNodeList",emit_ownerChanged:function(a){e.prototype.emit_ownerChanged.call(this,a);this.setDataSource(this.owner&&
this.owner.getChildNodesDataset())},getChildNodesElement:function(a){return a.childNodesElement},listen:{owner:{templateChanged:function(){this.childNodes.forEach(function(a){this.appendChild(a.element)},this.getChildNodesElement(this.owner)||this.owner.element)}}},childClass:{className:c+".ShadowNode",getElement:function(a){return a.element},templateSync:function(){e.prototype.templateSync.call(this);var a=this.getElement(this.delegate);a&&(a.basisTemplateId=this.delegate.element.basisTemplateId,
this.element=a)},listen:{delegate:{templateChanged:function(){var a=this.element,c=a.parentNode,e=this.getElement(this.delegate);e&&(e.basisTemplateId=this.delegate.element.basisTemplateId);this.element=e||this.tmpl.element;c&&c.replaceChild(this.element,a)}}}}});M.exports={BINDING_PRESET:A,Node:e,PartitionNode:f,GroupingNode:da,ShadowNodeList:c,ShadowNode:c.prototype.childClass}},"3.js":function(c,M,a,r,U,J,aa,da){function y(a){var c=[],e;for(e in a)A.call(a,e)&&c.push(e);return c}function I(a,c,
e,f){var l=a.cultureValues[c];f=f?f+".":"";for(var n in e)if(A.call(e,n)){var q=f+n,p=e[n];(l[q]=p)&&("object"==typeof p||Array.isArray(p))&&I(a,c,p,q)}}function L(b){var c;if("string"==typeof b){var e=a.path.extname(b);".l10n"!=e&&(b=a.path.dirname(b)+"/"+a.path.basename(b,e)+".l10n");b=a.resource(b)}a.resource.isResource(b)&&(c=z[b.url]);return c||new f(b)}function G(a,c){a&&!u[a]&&(u[a]=new l(a,c));return u[a||n]}function s(b){if(b&&n!=b&&-1!=e.indexOf(b)){n=b;for(var c=0,f;f=F[c];c++)f.syncValues();
a.Token.prototype.set.call(G,b)}}function O(b){"string"==typeof b&&(b=b.trim().split(" "));if(b.length){var c={},f,l;p={};for(var q=0,z;f=b[q];q++)f=f.split("/"),2<f.length&&(f=f.slice(0,2)),z=f[0],l||(l=z),c[z]=G(z),p[z]=f;for(z in p)p[z]=a.array.flatten(p[z].map(function(a){return p[a]})).concat(l).filter(function(a,b,c){return!b||-1==c.lastIndexOf(a,b-1)});e=a.object.keys(c);!1==n in c&&s(l)}}a.require("./4.js");c=this.path;r=a.Class;var N=a.event.Emitter,A=Object.prototype.hasOwnProperty;a.resource.extensions[".l10n"]=
function(b,c){return L(c).update(a.resource.extensions[".json"](b,c))};var B=[],E={},Y=r(a.Token,{className:c+".ComputeToken",init:function(b,c){c.computeTokens[this.basisObjectId]=this;this.token=c;this.get=c.computeGetMethod;a.Token.prototype.init.call(this,b)},toString:function(){return this.get()},destroy:function(){delete this.token.computeTokens[this.basisObjectId];this.token=null;a.Token.prototype.destroy.call(this)}}),W=r(a.Token,{className:c+".Token",index:NaN,dictionary:null,name:"",type:"default",
computeTokens:null,init:function(b,c,e,f){a.Token.prototype.init.call(this,f);this.index=B.push(this)-1;this.name=c;this.dictionary=b;this.computeTokens={};e?this.setType(e):this.apply()},toString:function(){return this.get()},computeGetMethod:function(){},apply:function(){var b={},c=this.computeTokens,e="plural"==this.type?function(){return b[u[n].plural(this.value)]}:function(){return b[this.value]};this.computeGetMethod=e;if("plural"==this.type&&Array.isArray(this.value)||"default"==this.type&&
"object"==typeof this.value)b=a.object.slice(this.value,y(this.value));for(var f in c){var l=c[f],q=l.get(),p=e.call(l);l.get=e;q!==p&&l.apply()}a.Token.prototype.apply.call(this)},setType:function(b){"plural"==b||a.l10n.enableMarkup&&"markup"==b||(b="default");this.type!=b&&(this.type=b,this.apply())},compute:function(b,c){1==arguments.length&&(c=b,b="");c=a.getter(c);b=String(b).trim().split(/\s+|\s*,\s*/).sort();var e=b.concat(this.basisObjectId,c.basisGetterId_).join("_");if(E[e])return E[e];
for(var f=this,l={},n=function(a){this.set(c(a))},q={destroy:function(a){delete l[a.basisObjectId];this.destroy()}},p=0,s;s=b[p];p++)"destroy"!=s&&(q[s]=n);return E[e]=function(a){if(!1==a instanceof N)throw 3;var b=a.basisObjectId,e=l[b];e||(e=l[b]=new Y(c(a),f),a.addHandler(q,e));return e}},computeToken:function(a){return new Y(a,this)},token:function(a){"plural"==this.type&&(a=u[n].plural(a));if(this.dictionary)return this.dictionary.token(this.name+"."+a)},destroy:function(){for(var b in this.computeTokens)this.computeTokens[b].destroy();
this.value=this.computeTokens=null;a.Token.prototype.destroy.call(this)}}),F=[],z={},ba=new a.Token,f=r(null,{className:c+".Dictionary",tokens:null,types:null,cultureValues:null,index:NaN,resource:null,init:function(b){this.tokens={};this.types={};this.cultureValues={};this.index=F.push(this)-1;a.resource.isResource(b)?(this.resource=b,z[b.url]||(z[b.url]=this,ba.set(b.url)),b.fetch()):this.update(b||{})},update:function(a){a||(a={});this.cultureValues={};for(var c in a)/^_|_$/.test(c)||(this.cultureValues[c]=
{},I(this,c,a[c]));this.types=a._meta&&a._meta.type||{};for(var e in this.tokens)this.tokens[e].setType(this.types[e]);this.syncValues();return this},syncValues:function(){for(var a in this.tokens)this.tokens[a].set(this.getValue(a))},getValue:function(a){for(var c=p[n]||[],e=0,f;f=c[e];e++)if((f=this.cultureValues[f])&&a in f)return f[a]},getCultureValue:function(a,c){return this.cultureValues[a]&&this.cultureValues[a][c]},token:function(a){var c=this.tokens[a];c||(c=this.tokens[a]=new W(this,a,
this.types[a],this.getValue(a)));return c},destroy:function(){this.cultureValues=this.tokens=null;a.array.remove(F,this);this.resource&&(delete z[this.resource.url],this.resource=null)}}),e=[],n=null,u={},p={},R={},q=[[1,function(a){return 0}],[2,function(a){return 1==a||1==a%10?0:1}],[2,function(a){return 0==a?0:1}],[2,function(a){return 1==a?0:1}],[2,function(a){return 0==a||1==a?0:1}],[2,function(a){return 1!=a%10||11==a%100?1:0}],[3,function(a){return 1==a?0:2<=a%10&&4>=a%10&&(10>a%100||20<=a%
100)?1:2}],[3,function(a){return 1==a%10&&11!=a%100?0:0!=a?1:2}],[3,function(a){return 1==a%10&&11!=a%100?0:2<=a%10&&(10>a%100||20<=a%100)?1:2}],[3,function(a){return 1==a%10&&11!=a%100?0:2<=a%10&&4>=a%10&&(10>a%100||20<=a%100)?1:2}],[3,function(a){return 0==a?0:1==a?1:2}],[3,function(a){return 1==a?0:0==a||0<a%100&&20>a%100?1:2}],[3,function(a){return 1==a?0:2<=a%10&&4>=a%10&&(10>a%100||20<=a%100)?1:2}],[3,function(a){return 1==a?0:2<=a&&4>=a?1:2}],[4,function(a){return 1==a?0:2==a?1:8!=a&&11!=a?
2:3}],[4,function(a){return 1==a?0:2==a?1:3==a?2:3}],[4,function(a){return 1==a%100?1:2==a%100?2:3==a%100||4==a%100?3:0}],[4,function(a){return 1==a?0:0==a||1<a%100&&11>a%100?1:10<a%100&&20>a%100?2:3}],[4,function(a){return 1==a||11==a?0:2==a||12==a?1:2<a&&20>a?2:3}],[5,function(a){return 1==a?0:2==a?1:7>a?2:11>a?3:4}],[6,function(a){return 0==a?0:1==a?1:2==a?2:3<=a%100&&10>=a%100?3:11<=a%100?4:5}]];"ay bo cgg dz fa id ja jbo ka kk km ko ky lo ms my sah su th tt ug vi wo zh;mk;jv;af an ast az bg bn brx ca da de doi el en eo es es-AR et eu ff fi fo fur fy gl gu ha he hi hne hu hy ia it kn ku lb mai ml mn mni mr nah nap nb ne nl nn no nso or pa pap pms ps pt rm rw sat sco sd se si so son sq sv sw ta te tk ur yo;ach ak am arn br fil fr gun ln mfe mg mi oc pt-BR tg ti tr uz wa zh;is;csb;lv;lt;be bs hr ru sr uk;mnk;ro;pl;cs sk;cy;kw;sl;mt;gd;ga;ar".split(";").forEach(function(a,
c){a.split(" ").forEach(function(a){R[a]=this},q[c])});var l=a.Class(null,{className:c+".Culture",name:"",pluralForm:null,init:function(a,c){this.name=a;u[a]||(u[a]=this);this.pluralForm=c||R[a]||R[a.split("-")[0]]||q[0]},plural:function(a){return Number(this.pluralForm[1](Math.abs(parseInt(a,10))))}});a.object.extend(G,new a.Token);G.set=s;O("en-US");s("en-US");M.exports={ComputeToken:Y,Token:W,token:function(b){if("#"==b.charAt(0))return B[parseInt(b.substr(1),36)];if(b=b.match(/^(.+?)@(.+)$/))return L(a.path.resolve(b[2])).token(b[1])},
Dictionary:f,dictionary:L,getDictionaries:function(){return F.slice(0)},addCreateDictionaryHandler:ba.attach.bind(ba),removeCreateDictionaryHandler:ba.detach.bind(ba),Culture:l,culture:G,getCulture:function(){return n},setCulture:s,getCultureList:function(){return e.slice(0)},setCultureList:O,pluralForms:q,onCultureChange:function(a,c,e){G.attach(a,c);e&&a.call(c,n)}}},"4.js":function(c,M,a,r,U,J,aa,da){function y(a){var c=L[a];c||(c=function(){for(var c=this,r,y;c=c.handler;){y=c.callbacks[a];if("function"==
typeof y){if(!r){r=[this];for(var E=0;E<arguments.length;E++)r.push(arguments[E])}y.apply(c.context||this,r)}y=c.callbacks["*"];if("function"==typeof y){if(!r)for(r=[this],E=0;E<arguments.length;E++)r.push(arguments[E]);y.call(c.context||this,{sender:this,type:a,args:r})}}},L[a]=c);return c}c=a.Class;var I={},L={},G=function(){};c=c(null,{className:this.path+".Emitter",extendConstructor_:!0,handler:null,emit_destroy:y("destroy"),listen:c.nestedExtendProperty(),init:function(){this.handler&&!this.handler.callbacks&&
(this.handler={callbacks:this.handler,context:this,handler:null})},addHandler:function(a,c){this.handler={callbacks:a,context:c||this,handler:this.handler}},removeHandler:function(a,c){var r=this,y;for(c=c||this;y=r,r=r.handler;)if(r.callbacks===a&&r.context===c){r.callbacks=I;y.handler=r.handler;break}},destroy:function(){this.destroy=G;this.emit_destroy();this.handler=null}});M.exports={create:y,createHandler:function(a,c){var r={events:[]};if(a){a=String(a).trim().split(/\s+|\s*,\s*/).sort();for(var r=
{events:a},y=0,B;B=a[y];y++)"destroy"!=B&&(r[B]=c)}return r},events:L,Emitter:c}},"j.js":function(c,M,a,r,U,J,aa,da){(function(c){function r(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function L(a,d){return function(b){return E(a.call(this,b),d)}}function G(a,d){return function(b){return this.lang().ordinal(a.call(this,b),d)}}function s(){}function J(a){u(a);A(this,a)}function N(a){a=ba(a);
var d=a.year||0,b=a.month||0,h=a.week||0,g=a.day||0;this._milliseconds=+(a.millisecond||0)+1E3*(a.second||0)+6E4*(a.minute||0)+36E5*(a.hour||0);this._days=+g+7*h;this._months=+b+12*d;this._data={};this._bubble()}function A(a,d){for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);d.hasOwnProperty("toString")&&(a.toString=d.toString);d.hasOwnProperty("valueOf")&&(a.valueOf=d.valueOf);return a}function B(a){return 0>a?Math.ceil(a):Math.floor(a)}function E(a,d,b){for(var h=""+Math.abs(a);h.length<d;)h="0"+
h;return(0<=a?b?"+":"":"-")+h}function U(a,d,b,h){var g=d._milliseconds,c=d._days;d=d._months;var e,m;g&&a._d.setTime(+a._d+g*b);if(c||d)e=a.minute(),m=a.hour();c&&a.date(a.date()+c*b);d&&a.month(a.month()+d*b);g&&!h&&k.updateOffset(a);if(c||d)a.minute(e),a.hour(m)}function W(a){return"[object Array]"===Object.prototype.toString.call(a)}function F(a,d,b){var h=Math.min(a.length,d.length),g=Math.abs(a.length-d.length),c=0,k;for(k=0;k<h;k++)(b&&a[k]!==d[k]||!b&&e(a[k])!==e(d[k]))&&c++;return c+g}function z(a){if(a){var d=
a.toLowerCase().replace(/(.)s$/,"$1");a=Ta[a]||Va[d]||d}return a}function ba(a){var d={},b,h;for(h in a)a.hasOwnProperty(h)&&(b=z(h))&&(d[b]=a[h]);return d}function f(a){var d,b;if(0===a.indexOf("week"))d=7,b="day";else if(0===a.indexOf("month"))d=12,b="month";else return;k[a]=function(h,g){var e,m,t=k.fn._lang[a],f=[];"number"===typeof h&&(g=h,h=c);m=function(a){a=k().utc().set(b,a);return t.call(k.fn._lang,a,h||"")};if(null!=g)return m(g);for(e=0;e<d;e++)f.push(m(e));return f}}function e(a){a=+a;
var d=0;0!==a&&isFinite(a)&&(d=0<=a?Math.floor(a):Math.ceil(a));return d}function n(a){return 0===a%4&&0!==a%100||0===a%400}function u(a){var d;a._a&&-2===a._pf.overflow&&(d=0>a._a[t]||11<a._a[t]?t:1>a._a[C]||a._a[C]>(new Date(Date.UTC(a._a[h],a._a[t]+1,0))).getUTCDate()?C:0>a._a[ea]||23<a._a[ea]?ea:0>a._a[qa]||59<a._a[qa]?qa:0>a._a[Q]||59<a._a[Q]?Q:0>a._a[fa]||999<a._a[fa]?fa:-1,a._pf._overflowDayOfYear&&(d<h||d>C)&&(d=C),a._pf.overflow=d)}function p(a){null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&
0>a._pf.overflow&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length));return a._isValid}function R(a){return a?a.toLowerCase().replace("_","-"):a}function q(a,d){return d._isUTC?k(a).zone(d._offset||0):k(a).local()}function l(d){var b=0,h,g,c,e,m=function(d){if(!ia[d]&&ra)try{a.require("./lang/"+d,"/Users/rdvornov/Desktop/git/bower_search_fork/bower_components/momentjs")}catch(b){}return ia[d]};
if(!d)return k.fn._lang;if(!W(d)){if(g=m(d))return g;d=[d]}for(;b<d.length;){e=R(d[b]).split("-");h=e.length;for(c=(c=R(d[b+1]))?c.split("-"):null;0<h;){if(g=m(e.slice(0,h).join("-")))return g;if(c&&c.length>=h&&F(e,c,!0)>=h-1)break;h--}b++}return k.fn._lang}function b(a){var d=a.match(Ga),b,h;b=0;for(h=d.length;b<h;b++)d[b]=ta[d[b]]?ta[d[b]]:d[b].match(/\[[\s\S]/)?d[b].replace(/^\[|\]$/g,""):d[b].replace(/\\/g,"");return function(g){var c="";for(b=0;b<h;b++)c+=d[b]instanceof Function?d[b].call(g,
a):d[b];return c}}function H(a,d){if(!a.isValid())return a.lang().invalidDate();d=w(d,a.lang());Ea[d]||(Ea[d]=b(d));return Ea[d](a)}function w(a,d){function b(a){return d.longDateFormat(a)||a}var h=5;for(wa.lastIndex=0;0<=h&&wa.test(a);)a=a.replace(wa,b),wa.lastIndex=0,h-=1;return a}function V(a,d){var b=d._strict;switch(a){case "DDDD":return Ma;case "YYYY":case "GGGG":case "gggg":return b?Wa:Pa;case "Y":case "G":case "g":return Ya;case "YYYYYY":case "YYYYY":case "GGGGG":case "ggggg":return b?Xa:
Qa;case "S":if(b)return $a;case "SS":if(b)return Ka;case "SSS":if(b)return Ma;case "DDD":return Oa;case "MMM":case "MMMM":case "dd":case "ddd":case "dddd":return Sa;case "a":case "A":return l(d._l)._meridiemParse;case "X":return va;case "Z":case "ZZ":return Aa;case "T":return ua;case "SSSS":return Ra;case "MM":case "DD":case "YY":case "GG":case "gg":case "HH":case "hh":case "mm":case "ss":case "ww":case "WW":return b?Ka:Ha;case "M":case "D":case "d":case "H":case "h":case "m":case "s":case "w":case "W":case "e":case "E":return Ha;
default:var b=RegExp,h;h=pa(a.replace("\\","")).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return new b(h)}}function D(a){a=(a||"").match(Aa)||[];a=((a[a.length-1]||[])+"").match(Ua)||["-",0,0];var d=+(60*a[1])+e(a[2]);return"+"===a[0]?-d:d}function $(a){var d,b=[],g,c,m,f,v;if(!a._d){g=da(a);a._w&&null==a._a[C]&&null==a._a[t]&&(d=function(d){var b=parseInt(d,10);return d?3>d.length?68<b?1900+b:2E3+b:b:null==a._a[h]?k().weekYear():a._a[h]},c=a._w,null!=c.GG||null!=c.W||null!=c.E?d=x(d(c.GG),c.W||1,
c.E,4,1):(m=l(a._l),f=null!=c.d?ja(c.d,m):null!=c.e?parseInt(c.e,10)+m._week.dow:0,v=parseInt(c.w,10)||1,null!=c.d&&f<m._week.dow&&v++,d=x(d(c.gg),v,f,m._week.doy,m._week.dow)),a._a[h]=d.year,a._dayOfYear=d.dayOfYear);a._dayOfYear&&(d=null==a._a[h]?g[h]:a._a[h],a._dayOfYear>(n(d)?366:365)&&(a._pf._overflowDayOfYear=!0),d=Z(d,0,a._dayOfYear),a._a[t]=d.getUTCMonth(),a._a[C]=d.getUTCDate());for(d=0;3>d&&null==a._a[d];++d)a._a[d]=b[d]=g[d];for(;7>d;d++)a._a[d]=b[d]=null==a._a[d]?2===d?1:0:a._a[d];b[ea]+=
e((a._tzm||0)/60);b[qa]+=e((a._tzm||0)%60);a._d=(a._useUTC?Z:ka).apply(null,b)}}function da(a){var d=new Date;return a._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function oa(a){a._a=[];a._pf.empty=!0;var d=l(a._l),b=""+a._i,g,c,k,m,f=b.length,x=0;c=w(a._f,d).match(Ga)||[];for(d=0;d<c.length;d++){k=c[d];if(g=(b.match(V(k,a))||[])[0])m=b.substr(0,b.indexOf(g)),0<m.length&&a._pf.unusedInput.push(m),b=b.slice(b.indexOf(g)+g.length),x+=g.length;
if(ta[k]){g?a._pf.empty=!1:a._pf.unusedTokens.push(k);m=a;var v=void 0,K=m._a;switch(k){case "M":case "MM":null!=g&&(K[t]=e(g)-1);break;case "MMM":case "MMMM":v=l(m._l).monthsParse(g);null!=v?K[t]=v:m._pf.invalidMonth=g;break;case "D":case "DD":null!=g&&(K[C]=e(g));break;case "DDD":case "DDDD":null!=g&&(m._dayOfYear=e(g));break;case "YY":K[h]=e(g)+(68<e(g)?1900:2E3);break;case "YYYY":case "YYYYY":case "YYYYYY":K[h]=e(g);break;case "a":case "A":m._isPm=l(m._l).isPM(g);break;case "H":case "HH":case "h":case "hh":K[ea]=
e(g);break;case "m":case "mm":K[qa]=e(g);break;case "s":case "ss":K[Q]=e(g);break;case "S":case "SS":case "SSS":case "SSSS":K[fa]=e(1E3*("0."+g));break;case "X":m._d=new Date(1E3*parseFloat(g));break;case "Z":case "ZZ":m._useUTC=!0;m._tzm=D(g);break;case "w":case "ww":case "W":case "WW":case "d":case "dd":case "ddd":case "dddd":case "e":case "E":k=k.substr(0,1);case "gg":case "gggg":case "GG":case "GGGG":case "GGGGG":k=k.substr(0,2),g&&(m._w=m._w||{},m._w[k]=g)}}else a._strict&&!g&&a._pf.unusedTokens.push(k)}a._pf.charsLeftOver=
f-x;0<b.length&&a._pf.unusedInput.push(b);a._isPm&&12>a._a[ea]&&(a._a[ea]+=12);!1===a._isPm&&12===a._a[ea]&&(a._a[ea]=0);$(a);u(a)}function pa(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,d,b,h,g){return d||b||h||g})}function ka(a,d,b,h,g,c,k){d=new Date(a,d,b,h,g,c,k);1970>a&&d.setFullYear(a);return d}function Z(a){var d=new Date(Date.UTC.apply(null,arguments));1970>a&&d.setUTCFullYear(a);return d}function ja(a,d){if("string"===typeof a)if(isNaN(a)){if(a=d.weekdaysParse(a),
"number"!==typeof a)return null}else a=parseInt(a,10);return a}function ma(a,d,b,h,g){return g.relativeTime(d||1,!!b,a,h)}function g(a,d,b){d=b-d;b-=a.day();b>d&&(b-=7);b<d-7&&(b+=7);a=k(a).add("d",b);return{week:Math.ceil(a.dayOfYear()/7),year:a.year()}}function x(a,d,b,h,g){var c=Z(a,0,1).getUTCDay();d=7*(d-1)+((null!=b?b:g)-g)+(g-c+(c>h?7:0)-(c<g?7:0))+1;return{year:0<d?a:a-1,dayOfYear:0<d?d:(n(a-1)?366:365)+d}}function v(a){var d=a._i,b=a._f;if(null===d)return k.invalid({nullInput:!0});"string"===
typeof d&&(a._i=d=l().preparse(d));if(k.isMoment(d)){a=d;var h={},g;for(g in a)a.hasOwnProperty(g)&&xa.hasOwnProperty(g)&&(h[g]=a[g]);a=h;a._d=new Date(+d._d)}else if(b)if(W(b)){var d=a,m,e;if(0===d._f.length)d._pf.invalidFormat=!0,d._d=new Date(NaN);else{for(g=0;g<d._f.length;g++)if(b=0,h=A({},d),h._pf=r(),h._f=d._f[g],oa(h),p(h)&&(b+=h._pf.charsLeftOver,b+=10*h._pf.unusedTokens.length,h._pf.score=b,null==e||b<e))e=b,m=h;A(d,m||h)}}else oa(a);else if(h=a,m=h._i,e=ya.exec(m),m===c)h._d=new Date;else if(e)h._d=
new Date(+e[1]);else if("string"===typeof m)if(d=h._i,g=Za.exec(d)){h._pf.iso=!0;m=0;for(e=Da.length;m<e;m++)if(Da[m][1].exec(d)){h._f=Da[m][0]+(g[6]||" ");break}m=0;for(e=Ca.length;m<e;m++)if(Ca[m][1].exec(d)){h._f+=Ca[m][0];break}d.match(Aa)&&(h._f+="Z");oa(h)}else h._d=new Date(d);else W(m)?(h._a=m.slice(0),$(h)):"[object Date]"===Object.prototype.toString.call(m)||m instanceof Date?h._d=new Date(+m):"object"===typeof m?h._d||(m=ba(h._i),h._a=[m.year,m.month,m.day,m.hour,m.minute,m.second,m.millisecond],
$(h)):h._d=new Date(m);return new J(a)}function P(a,d){k.fn[a]=k.fn[a+"s"]=function(a){var b=this._isUTC?"UTC":"";return null!=a?(this._d["set"+b+d](a),k.updateOffset(this),this):this._d["get"+b+d]()}}function X(a){k.duration.fn[a]=function(){return this._data[a]}}function d(a,d){k.duration.fn["as"+a]=function(){return+this/d}}function m(a){var d=!1,b=k;"undefined"===typeof ender&&(a?(K.moment=function(){!d&&console&&console.warn&&(d=!0,console.warn("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release."));
return b.apply(null,arguments)},A(K.moment,b)):K.moment=k)}for(var k,K=this,la=Math.round,T,h=0,t=1,C=2,ea=3,qa=4,Q=5,fa=6,ia={},xa={_isAMomentObject:null,_i:null,_f:null,_l:null,_strict:null,_isUTC:null,_offset:null,_pf:null,_lang:null},ra="undefined"!==typeof M&&M.exports&&"undefined"!==typeof aa,ya=/^\/?Date\((\-?\d+)/i,za=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Na=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,
Ga=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,wa=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,Ha=/\d\d?/,Oa=/\d{1,3}/,Pa=/\d{1,4}/,Qa=/[+\-]?\d{1,6}/,Ra=/\d+/,Sa=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Aa=/Z|[\+\-]\d\d:?\d\d/gi,ua=/T/i,va=/[\+\-]?\d+(\.\d{1,3})?/,$a=/\d/,Ka=/\d\d/,Ma=/\d{3}/,Wa=/\d{4}/,Xa=/[+-]?\d{6}/,
Ya=/[+-]?\d+/,Za=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Da=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],Ca=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Ua=/([\+\-]|\d\d)/gi,Fa=["Date","Hours",
"Minutes","Seconds","Milliseconds"],Ba={Milliseconds:1,Seconds:1E3,Minutes:6E4,Hours:36E5,Days:864E5,Months:2592E6,Years:31536E6},Ta={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},Va={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},Ea={},Ia="DDD w W M D d".split(" "),Ja="MDHhmswW".split(""),ta={M:function(){return this.month()+
1},MMM:function(a){return this.lang().monthsShort(this,a)},MMMM:function(a){return this.lang().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.lang().weekdaysMin(this,a)},ddd:function(a){return this.lang().weekdaysShort(this,a)},dddd:function(a){return this.lang().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return E(this.year()%100,2)},YYYY:function(){return E(this.year(),
4)},YYYYY:function(){return E(this.year(),5)},YYYYYY:function(){var a=this.year();return(0<=a?"+":"-")+E(Math.abs(a),6)},gg:function(){return E(this.weekYear()%100,2)},gggg:function(){return E(this.weekYear(),4)},ggggg:function(){return E(this.weekYear(),5)},GG:function(){return E(this.isoWeekYear()%100,2)},GGGG:function(){return E(this.isoWeekYear(),4)},GGGGG:function(){return E(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),
this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return e(this.milliseconds()/100)},SS:function(){return E(e(this.milliseconds()/10),2)},SSS:function(){return E(this.milliseconds(),3)},SSSS:function(){return E(this.milliseconds(),3)},Z:function(){var a=-this.zone(),d="+";0>a&&(a=-a,d="-");return d+
E(e(a/60),2)+":"+E(e(a)%60,2)},ZZ:function(){var a=-this.zone(),d="+";0>a&&(a=-a,d="-");return d+E(e(a/60),2)+E(e(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},La=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];Ia.length;)T=Ia.pop(),ta[T+"o"]=G(ta[T],T);for(;Ja.length;)T=Ja.pop(),ta[T+T]=L(ta[T],2);ta.DDDD=L(ta.DDD,3);A(s.prototype,{set:function(a){var d,b;for(b in a)d=a[b],
"function"===typeof d?this[b]=d:this["_"+b]=d},_months:"January February March April May June July August September October November December".split(" "),months:function(a){return this._months[a.month()]},_monthsShort:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var d,b;this._monthsParse||(this._monthsParse=[]);for(d=0;12>d;d++)if(this._monthsParse[d]||(b=k.utc([2E3,d]),b="^"+this.months(b,"")+"|^"+
this.monthsShort(b,""),this._monthsParse[d]=RegExp(b.replace(".",""),"i")),this._monthsParse[d].test(a))return d},_weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun Mon Tue Wed Thu Fri Sat".split(" "),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su Mo Tu We Th Fr Sa".split(" "),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var d,
b;this._weekdaysParse||(this._weekdaysParse=[]);for(d=0;7>d;d++)if(this._weekdaysParse[d]||(b=k([2E3,1]).day(d),b="^"+this.weekdays(b,"")+"|^"+this.weekdaysShort(b,"")+"|^"+this.weekdaysMin(b,""),this._weekdaysParse[d]=RegExp(b.replace(".",""),"i")),this._weekdaysParse[d].test(a))return d},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(a){var d=this._longDateFormat[a];!d&&this._longDateFormat[a.toUpperCase()]&&
(d=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=d);return d},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,d,b){return 11<a?b?"pm":"PM":b?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,d){var b=this._calendar[a];return"function"===
typeof b?b.apply(d):b},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,d,b,h){var g=this._relativeTime[b];return"function"===typeof g?g(a,d,b,h):g.replace(/%d/i,a)},pastFuture:function(a,d){var b=this._relativeTime[0<a?"future":"past"];return"function"===typeof b?b(d):b.replace(/%s/i,d)},ordinal:function(a){return this._ordinal.replace("%d",
a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return g(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}});k=function(a,d,b,h){var g;"boolean"===typeof b&&(h=b,b=c);g={_isAMomentObject:!0};g._i=a;g._f=d;g._l=b;g._strict=h;g._isUTC=!1;g._pf=r();return v(g)};k.utc=function(a,d,b,h){var g;"boolean"===typeof b&&(h=b,b=c);g={_isAMomentObject:!0,_useUTC:!0,_isUTC:!0};
g._l=b;g._i=a;g._f=d;g._strict=h;g._pf=r();return v(g).utc()};k.unix=function(a){return k(1E3*a)};k.duration=function(a,d){var b=a,h=null,g;if(k.isDuration(a))b={ms:a._milliseconds,d:a._days,M:a._months};else if("number"===typeof a)b={},d?b[d]=a:b.milliseconds=a;else if(h=za.exec(a))g="-"===h[1]?-1:1,b={y:0,d:e(h[C])*g,h:e(h[ea])*g,m:e(h[qa])*g,s:e(h[Q])*g,ms:e(h[fa])*g};else if(h=Na.exec(a))g="-"===h[1]?-1:1,b=function(a){a=a&&parseFloat(a.replace(",","."));return(isNaN(a)?0:a)*g},b={y:b(h[2]),M:b(h[3]),
d:b(h[4]),h:b(h[5]),m:b(h[6]),s:b(h[7]),w:b(h[8])};h=new N(b);k.isDuration(a)&&a.hasOwnProperty("_lang")&&(h._lang=a._lang);return h};k.version="2.5.1";k.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";k.updateOffset=function(){};k.lang=function(a,d){if(!a)return k.fn._lang._abbr;if(d){var b=R(a);d.abbr=b;ia[b]||(ia[b]=new s);ia[b].set(d)}else null===d?(delete ia[a],a="en"):ia[a]||l(a);return(k.duration.fn._lang=k.fn._lang=l(a))._abbr};k.langData=function(a){a&&a._lang&&a._lang._abbr&&(a=a._lang._abbr);return l(a)};
k.isMoment=function(a){return a instanceof J||null!=a&&a.hasOwnProperty("_isAMomentObject")};k.isDuration=function(a){return a instanceof N};for(T=La.length-1;0<=T;--T)f(La[T]);k.normalizeUnits=function(a){return z(a)};k.invalid=function(a){var d=k.utc(NaN);null!=a?A(d._pf,a):d._pf.userInvalidated=!0;return d};k.parseZone=function(a){return k(a).parseZone()};A(k.fn=J.prototype,{clone:function(){return k(this)},valueOf:function(){return+this._d+6E4*(this._offset||0)},unix:function(){return Math.floor(+this/
1E3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=k(this).utc();return 0<a.year()&&9999>=a.year()?H(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):H(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){return[this.year(),this.month(),this.date(),this.hours(),this.minutes(),this.seconds(),this.milliseconds()]},isValid:function(){return p(this)},isDSTShifted:function(){return this._a?
this.isValid()&&0<F(this._a,(this._isUTC?k.utc(this._a):k(this._a)).toArray()):!1},parsingFlags:function(){return A({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){this.zone(0);this._isUTC=!1;return this},format:function(a){a=H(this,a||k.defaultFormat);return this.lang().postformat(a)},add:function(a,d){var b;b="string"===typeof a?k.duration(+d,a):k.duration(a,d);U(this,b,1);return this},subtract:function(a,d){var b;b="string"===typeof a?
k.duration(+d,a):k.duration(a,d);U(this,b,-1);return this},diff:function(a,d,b){a=q(a,this);var h=6E4*(this.zone()-a.zone()),g;d=z(d);"year"===d||"month"===d?(g=432E5*(this.daysInMonth()+a.daysInMonth()),h=12*(this.year()-a.year())+(this.month()-a.month()),h+=(this-k(this).startOf("month")-(a-k(a).startOf("month")))/g,h-=6E4*(this.zone()-k(this).startOf("month").zone()-(a.zone()-k(a).startOf("month").zone()))/g,"year"===d&&(h/=12)):(g=this-a,h="second"===d?g/1E3:"minute"===d?g/6E4:"hour"===d?g/36E5:
"day"===d?(g-h)/864E5:"week"===d?(g-h)/6048E5:g);return b?h:B(h)},from:function(a,d){return k.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!d)},fromNow:function(a){return this.from(k(),a)},calendar:function(){var a=q(k(),this).startOf("day"),a=this.diff(a,"days",!0),a=-6>a?"sameElse":-1>a?"lastWeek":0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse";return this.format(this.lang().calendar(a,this))},isLeapYear:function(){return n(this.year())},isDST:function(){return this.zone()<
this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var d=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=ja(a,this.lang()),this.add({d:a-d})):d},month:function(a){var d=this._isUTC?"UTC":"",b;if(null!=a){if("string"===typeof a&&(a=this.lang().monthsParse(a),"number"!==typeof a))return this;b=this.date();this.date(1);this._d["set"+d+"Month"](a);this.date(Math.min(b,this.daysInMonth()));k.updateOffset(this);return this}return this._d["get"+d+"Month"]()},
startOf:function(a){a=z(a);switch(a){case "year":this.month(0);case "month":this.date(1);case "week":case "isoWeek":case "day":this.hours(0);case "hour":this.minutes(0);case "minute":this.seconds(0);case "second":this.milliseconds(0)}"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1);return this},endOf:function(a){a=z(a);return this.startOf(a).add("isoWeek"===a?"week":a,1).subtract("ms",1)},isAfter:function(a,d){d="undefined"!==typeof d?d:"millisecond";return+this.clone().startOf(d)>+k(a).startOf(d)},
isBefore:function(a,d){d="undefined"!==typeof d?d:"millisecond";return+this.clone().startOf(d)<+k(a).startOf(d)},isSame:function(a,d){d=d||"ms";return+this.clone().startOf(d)===+q(a,this).startOf(d)},min:function(a){a=k.apply(null,arguments);return a<this?this:a},max:function(a){a=k.apply(null,arguments);return a>this?this:a},zone:function(a){var d=this._offset||0;if(null!=a)"string"===typeof a&&(a=D(a)),16>Math.abs(a)&&(a*=60),this._offset=a,this._isUTC=!0,d!==a&&U(this,k.duration(d-a,"m"),1,!0);
else return this._isUTC?d:this._d.getTimezoneOffset();return this},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){this._tzm?this.zone(this._tzm):"string"===typeof this._i&&this.zone(this._i);return this},hasAlignedHourOffset:function(a){a=a?k(a).zone():0;return 0===(this.zone()-a)%60},daysInMonth:function(){var a=this.year(),d=this.month();return(new Date(Date.UTC(a,d+1,0))).getUTCDate()},dayOfYear:function(a){var d=
la((k(this).startOf("day")-k(this).startOf("year"))/864E5)+1;return null==a?d:this.add("d",a-d)},quarter:function(){return Math.ceil((this.month()+1)/3)},weekYear:function(a){var d=g(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==a?d:this.add("y",a-d)},isoWeekYear:function(a){var d=g(this,1,4).year;return null==a?d:this.add("y",a-d)},week:function(a){var d=this.lang().week(this);return null==a?d:this.add("d",7*(a-d))},isoWeek:function(a){var d=g(this,1,4).week;return null==a?
d:this.add("d",7*(a-d))},weekday:function(a){var d=(this.day()+7-this.lang()._week.dow)%7;return null==a?d:this.add("d",a-d)},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},get:function(a){a=z(a);return this[a]()},set:function(a,d){a=z(a);if("function"===typeof this[a])this[a](d);return this},lang:function(a){if(a===c)return this._lang;this._lang=l(a);return this}});for(T=0;T<Fa.length;T++)P(Fa[T].toLowerCase().replace(/s$/,""),Fa[T]);P("year","FullYear");k.fn.days=
k.fn.day;k.fn.months=k.fn.month;k.fn.weeks=k.fn.week;k.fn.isoWeeks=k.fn.isoWeek;k.fn.toJSON=k.fn.toISOString;A(k.duration.fn=N.prototype,{_bubble:function(){var a=this._milliseconds,d=this._days,b=this._months,h=this._data;h.milliseconds=a%1E3;a=B(a/1E3);h.seconds=a%60;a=B(a/60);h.minutes=a%60;a=B(a/60);h.hours=a%24;d+=B(a/24);h.days=d%30;b+=B(d/30);h.months=b%12;d=B(b/12);h.years=d},weeks:function(){return B(this.days()/7)},valueOf:function(){return this._milliseconds+864E5*this._days+this._months%
12*2592E6+31536E6*e(this._months/12)},humanize:function(a){var d=+this,b;b=!a;var h=this.lang(),g=la(Math.abs(d)/1E3),c=la(g/60),k=la(c/60),m=la(k/24),e=la(m/365),g=45>g&&["s",g]||1===c&&["m"]||45>c&&["mm",c]||1===k&&["h"]||22>k&&["hh",k]||1===m&&["d"]||25>=m&&["dd",m]||45>=m&&["M"]||345>m&&["MM",la(m/30)]||1===e&&["y"]||["yy",e];g[2]=b;g[3]=0<d;g[4]=h;b=ma.apply({},g);a&&(b=this.lang().pastFuture(d,b));return this.lang().postformat(b)},add:function(a,d){var b=k.duration(a,d);this._milliseconds+=
b._milliseconds;this._days+=b._days;this._months+=b._months;this._bubble();return this},subtract:function(a,d){var b=k.duration(a,d);this._milliseconds-=b._milliseconds;this._days-=b._days;this._months-=b._months;this._bubble();return this},get:function(a){a=z(a);return this[a.toLowerCase()+"s"]()},as:function(a){a=z(a);return this["as"+a.charAt(0).toUpperCase()+a.slice(1)+"s"]()},lang:k.fn.lang,toIsoString:function(){var a=Math.abs(this.years()),d=Math.abs(this.months()),b=Math.abs(this.days()),
h=Math.abs(this.hours()),g=Math.abs(this.minutes()),c=Math.abs(this.seconds()+this.milliseconds()/1E3);return this.asSeconds()?(0>this.asSeconds()?"-":"")+"P"+(a?a+"Y":"")+(d?d+"M":"")+(b?b+"D":"")+(h||g||c?"T":"")+(h?h+"H":"")+(g?g+"M":"")+(c?c+"S":""):"P0D"}});for(T in Ba)Ba.hasOwnProperty(T)&&(d(T,Ba[T]),X(T.toLowerCase()));d("Weeks",6048E5);k.duration.fn.asMonths=function(){return(+this-31536E6*this.years())/2592E6+12*this.years()};k.lang("en",{ordinal:function(a){var d=a%10,d=1===e(a%100/10)?
"th":1===d?"st":2===d?"nd":3===d?"rd":"th";return a+d}});ra?(M.exports=k,m(!0)):"function"===typeof define&&define.amd?define("moment",function(a,d,b){b.config&&b.config()&&!0!==b.config().noGlobal&&m(b.config().noGlobal===c);return k}):m()}).call(this)},"5.js":function(c,M,a,r,U,J,aa,da){function y(a,b){return function(){a.apply(this,arguments);b.apply(this,arguments)}}function I(a){var b=R[a];if(!b)for(var c=[],e={},f=1,b=R[a]={actions:c,handler:e};a;){if(a&1){var d=n[f];c.push(d.action);for(var m in d.handler)e[m]=
e[m]?y(e[m],d.handler[m]):d.handler[m]}f<<=1;a>>=1}return b}function L(a,b){for(;b&&b!==a&&b!==b.delegate;)b=b.delegate;return b===a}function G(a,b,c){var e=a.delegate;e&&(a.root=e.root,a.target=e.target,a.data=e.data,a.state=e.state);if(a.root!==b){if(e=a.listen.root)b&&b!==a&&b.removeHandler(e,a),a.root&&a.root!==a&&a.root.addHandler(e,a);a.emit_rootChanged(b)}if(a.target!==c){if(e=a.listen.target)c&&c!==a&&c.removeHandler(e,a),a.target&&a.target!==a&&a.target.addHandler(e,a);a.emit_targetChanged(c)}for(a=
a.delegates_;a;)a.delegate&&G(a.delegate,b,c),a=a.next}function s(a,b){var c={},e;a&&a.length&&(e=c.inserted=a);b&&b.length&&(e=c.deleted=b);if(e)return c}function O(a,b){if(a&&a.itemCount){if(b&&b.itemCount){var c=[],e=[],f;for(f in a.items_){var d=a.items_[f];!1==d.basisObjectId in b.items_&&e.push(d)}for(f in b.items_)d=b.items_[f],!1==d.basisObjectId in a.items_&&c.push(d);return s(c,e)}if(a.itemCount)return{deleted:a.getItems()}}else if(b&&b.itemCount)return{inserted:b.getItems()}}function N(b,
c,e,f){var l=b[f]||null,d=null;"function"==typeof e&&(e=e.call(b,b));e instanceof pa&&(d=new Z(b,c,e,ja),e=e.dataset);e instanceof a.Token&&(e=D.from(e));e instanceof D&&(d=new Z(b,c,e,ma),e=N(d,d.proxy,e.value,"adapter_"));!1==e instanceof ka&&(e=null);f&&l!==d&&(l&&(l.source.removeHandler(l.handler,l),l.adapter_&&N(l,null,null,"adapter_")),d&&d.source.addHandler(d.handler,d),b[f]=d);return e}function A(a){return Array.isArray(a)?a.map(function(a){return{data:a}}):{data:a}}function B(a){a&&a.constructor===
Object||(a={value:a});return new ga({data:a})}a.require("./4.js");r=this.path;U=a.Class;var E=a.cleaner,Y=a.object.values;aa=a.fn.$self;var W=a.event.Emitter;J=a.event.create;var F=a.event.events,z={},ba=[],f={},e={priority:[],values:{},add:function(a,b){var c=a.toLowerCase();e[a]=c;f[c]=a;this.values[c]=a;b=b?this.priority.indexOf(b):-1;-1==b?this.priority.push(c):this.priority.splice(b,0,c)},getList:function(){return Y(f)}};e.add("READY");e.add("DEPRECATED");e.add("UNDEFINED");e.add("ERROR");e.add("PROCESSING");
var n={},u=1,p={NONE:0,ALL:0,link:function(a,b,c){a+=b.basisObjectId;var e=c.subscribers_;e||(e=c.subscribers_={});e[a]||(e[a]=b,1==(c.subscriberCount+=1)&&c.emit_subscribersChanged(1))},unlink:function(a,b,c){a+=b.basisObjectId;(b=c.subscribers_)&&b[a]&&(delete b[a],0==(c.subscriberCount-=1)&&(c.emit_subscribersChanged(-1),c.subscribers_=null))},add:function(a,b,c){n[u]={handler:b,action:c};p[a]=u;p.ALL|=u;u<<=1},addProperty:function(a,b){var c={};c[b||a+"Changed"]=function(b,c){c&&p.unlink(a,b,
c);b[a]&&p.link(a,b,b[a])};this.add(a.toUpperCase(),c,function(b,c){c[a]&&b(a,c,c[a])})}},R={};p.addProperty("delegate");p.addProperty("target");p.addProperty("dataset");var q=U(W,{className:r+".AbstractData",state:e.UNDEFINED,emit_stateChanged:J("stateChanged","oldState"),active:!1,emit_activeChanged:J("activeChanged"),subscribeTo:p.NONE,subscriberCount:0,subscribers_:null,emit_subscribersChanged:J("subscribersChanged","delta"),syncEvents:U.oneFunctionProperty(function(){this.isSyncRequired()&&this.syncAction()},
{stateChanged:!0,subscribersChanged:!0}),syncAction:null,init:function(){W.prototype.init.call(this);this.active&&this.addHandler(I(this.subscribeTo).handler);var a=this.syncAction;a&&(this.syncAction=null,this.setSyncAction(a))},setState:function(a,b){var c=String(a);if(!f[c])throw 4;if(this.state!=c||this.state.data!=b){var e=this.state;this.state=Object(c);this.state.data=b;this.emit_stateChanged(e);return!0}return!1},deprecate:function(){this.state!=e.PROCESSING&&this.setState(e.DEPRECATED)},
setActive:function(a){a=!!a;if(this.active!=a){this.active=a;this.emit_activeChanged();if(a){a=I(this.subscribeTo);for(var b=0,c;c=a.actions[b];b++)c(p.link,this);this.addHandler(a.handler)}else{a=I(this.subscribeTo);for(b=0;c=a.actions[b++];)c(p.unlink,this);this.removeHandler(a.handler)}return!0}return!1},setSubscription:function(a){var b=this.subscribeTo,c=a&p.ALL;if(a=b^c){this.subscribeTo=c;if(this.active){var e=I(b),c=I(c);this.removeHandler(e.handler);this.addHandler(c.handler);for(e=1;a;)a&
1&&(c=n[e],b&e?c.action(p.unlink,this):c.action(p.link,this)),e<<=1,a>>=1}return!0}return!1},isSyncRequired:function(){return 0<this.subscriberCount&&(this.state==e.UNDEFINED||this.state==e.DEPRECATED)},setSyncAction:function(a){var b=this.syncAction;"function"!=typeof a&&(a=null);(this.syncAction=a)?(b||this.addHandler(this.syncEvents),this.isSyncRequired()&&this.syncAction()):b&&this.removeHandler(this.syncEvents)},destroy:function(){if(this.active)for(var a=I(this.subscribeTo),b=0,c;c=a.actions[b];b++)c(p.unlink,
this);W.prototype.destroy.call(this);this.state=e.UNDEFINED}}),l={},b={},H=function(a){this.set(this.fn(a))},w={destroy:function(a){this.value.unlink(a,this.fn)}},V={destroy:function(a){this.set(null)}},D=U(q,{className:r+".Value",emit_change:J("change","oldValue")&&function(a){F.change.call(this,a);for(var b=this;b=b.links_;)b.fn.call(b.context,this.value,a)},value:null,initValue:null,proxy:null,locked:!1,lockedValue_:null,links_:null,setNullOnEmitterDestroy:!0,bindingBridge:{attach:function(a,b,
c){a.link(c,b,!0)},detach:function(a,b,c){a.unlink(c,b)},get:function(a){return a.value}},init:function(){q.prototype.init.call(this);this.proxy&&(this.value=this.proxy(this.value));this.setNullOnEmitterDestroy&&this.value instanceof W&&this.value.addHandler(V,this);this.initValue=this.value},set:function(a){var b=this.value;a=this.proxy?this.proxy(a):a;var c=a!==b;c&&(this.setNullOnEmitterDestroy&&(b instanceof W&&b.removeHandler(V,this),a instanceof W&&a.addHandler(V,this)),this.value=a,this.locked||
this.emit_change(b));return c},reset:function(){this.set(this.initValue)},lock:function(){this.locked||(this.locked=!0,this.lockedValue_=this.value)},unlock:function(){if(this.locked){var a=this.lockedValue_;this.lockedValue_=null;this.locked=!1;this.value!==a&&this.emit_change(a)}},compute:function(b,c){c||(c=b,b=null);var e=this,f=a.event.createHandler(b,function(a){this.set(c(a,e.value))}),n=f.events.concat(String(c),this.basisObjectId).join("_"),d=l[n];if(!d){var m={};f.destroy=function(a){delete m[a.basisObjectId];
this.destroy()};this.addHandler({change:function(){for(var a in m){var d=m[a];d.token.set(c(d.object,this.value))}},destroy:function(){for(var a in m){var d=m[a];d.object.removeHandler(f,d.token);d.token.destroy()}e=m=null}});d=l[n]=function(d){var b=d.basisObjectId,g=m[b];g||(g=new a.Token(c(d,e.value)),d.addHandler(f,g),g=m[b]={token:g,object:d});return g.token};d.deferred=function(){return function(a){return d(a).deferred()}}}return d},as:function(b,c){if(this.links_)for(var e=this;e=e.links_;)if(e.context instanceof
a.Token&&e.context.fn==String(b))return c?e.context.deferred():e.context;e=new a.Token;e.fn=b;this.link(e,H);return c?e.deferred():e},deferred:function(a){return this.as(a,!0)},link:function(a,c,e){if("function"!=typeof c){var f=String(c);(c=b[f])||(c=b[f]=function(a){this[f]=a})}this.links_={value:this,context:a,fn:c,links_:this.links_};a instanceof W&&a.addHandler(w,this.links_);e||c.call(a,this.value);return a},unlink:function(b,c){for(var e=this,f;f=e,e=e.links_;)e.context!==b||c&&e.fn!==c||(e.fn=
a.fn.$undef,f.links_=e.links_,e.context instanceof W&&e.context.removeHandler(w,e))},destroy:function(){q.prototype.destroy.call(this);this.setNullOnEmitterDestroy&&this.value instanceof W&&this.value.removeHandler(V,this);for(var a=this;a=a.links_;)a.context instanceof W&&a.context.removeHandler(w,a);this.links_=this.lockedValue_=this.value=this.initValue=this.proxy=null}}),$={};D.from=function(b,c,e){var f;if(!b)return null;if(b instanceof W){e||(e=c,c=null);c=a.event.createHandler(c,function(a){this.set(e(a))});
var l=c.events.concat(String(e),b.basisObjectId).join("_");f=$[l];f||(e=a.getter(e),f=$[l]=new D({value:e(b)}),c.destroy=function(a){delete $[l];this.destroy()},b.addHandler(c,f))}f||(l=b.basisObjectId,c=b.bindingBridge,l&&c&&(f=$[l],f||(f=$[l]=new D({value:c.get(b)}),c.attach(b,f.set,f))));if(!f)throw 5;return f};D.factory=function(a,b){return function(c){return D.from(c,a,b)}};var ga=U(q,{className:r+".Object",subscribeTo:p.DELEGATE+p.TARGET,data:null,emit_update:J("update","delta")&&function(a){var b=
this.delegates_;for(F.update.call(this,a);b;)b.delegate&&b.delegate.emit_update(a),b=b.next},emit_stateChanged:function(a){var b=this.delegates_;for(q.prototype.emit_stateChanged.call(this,a);b;)b.delegate&&(b.delegate.state=this.state,b.delegate.emit_stateChanged(a)),b=b.next},delegate:null,delegates_:null,emit_delegateChanged:J("delegateChanged","oldDelegate"),target:null,emit_targetChanged:J("targetChanged","oldTarget"),root:null,emit_rootChanged:J("rootChanged","oldRoot"),init:function(){this.root=
this;q.prototype.init.call(this);var a=this.delegate;a?(this.target=this.delegate=null,this.data=a.data,this.state=a.state,this.setDelegate(a)):(this.data||(this.data={}),null!==this.target&&(this.target=this))},setDelegate:function(a){if(a&&a instanceof ga){if(a.delegate&&L(this,a))return!1}else a=null;if(this.delegate!==a){var b=this.state,c=this.data,e=this.delegate,f=this.target,d=this.root,m={},k=!1,l=this.listen.delegate;if(e){l&&e.removeHandler(l,this);for(var n=e.delegates_;n;){if(n.delegate===
this){n.delegate=null;e===e?e.delegates_=n.next:e.next=n.next;break}n=n.next}}if(a){this.delegate=a;a.delegates_={delegate:this,next:a.delegates_};for(var T in a.data)!1===T in c&&(k=!0,m[T]=void 0);for(T in c)c[T]!==a.data[T]&&(k=!0,m[T]=c[T]);l&&a.addHandler(l,this)}else for(T in this.target=this.delegate=null,this.root=this,this.data={},c)this.data[T]=c[T];G(this,d,f);k&&this.emit_update(m);b===this.state||String(b)==this.state&&b.data===this.state.data||this.emit_stateChanged(b);this.emit_delegateChanged(e);
return!0}return!1},setState:function(a,b){return this.delegate?this.root.setState(a,b):q.prototype.setState.call(this,a,b)},update:function(a){if(this.delegate)return this.root.update(a);if(a){var b={},c=!1,e;for(e in a)this.data[e]!==a[e]&&(c=!0,b[e]=this.data[e],this.data[e]=a[e]);if(c)return this.emit_update(b),b}return!1},destroy:function(){q.prototype.destroy.call(this);var a=this.delegates_;for(this.delegates_=null;a;)a.delegate.setDelegate(),a=a.next;this.delegate&&this.setDelegate();this.data=
z;this.target=this.root=null}});c=U(ga,{className:r+".Slot"});var oa={destroy:function(){delete this.map[this.itemId]}};aa=U(null,{className:r+".KeyObjectMap",itemClass:ga,keyGetter:aa,map_:null,extendConstructor_:!0,init:function(){this.map_={};E.add(this)},resolve:function(a){return this.get(this.keyGetter(a),a)},create:function(a,b){var c={};a instanceof ga?c.delegate=a:c.data={id:a,title:a};return new this.itemClass(c)},get:function(a,b){var c=a instanceof ga?a.basisObjectId:a,e=this.map_[c];
!e&&b&&(e=this.map_[c]=this.create(a,b),e.addHandler(oa,{map:this.map_,itemId:c}));return e},destroy:function(){E.remove(this);for(var a=Y(this.map_),b=0,c;c=a[b++];)c.destroy()}});var pa=U(ga,{className:r+".DatasetWrapper",subscribeTo:ga.prototype.subscribeTo+p.DATASET,listen:{dataset:{itemsChanged:function(a,b){this.itemCount=a.itemCount;this.emit_itemsChanged(b)},destroy:function(){this.setDataset()}}},dataset:null,datasetAdapter_:null,emit_datasetChanged:J("datasetChanged","oldDataset"),emit_itemsChanged:J("itemsChanged",
"delta"),init:function(){ga.prototype.init.call(this);var a=this.dataset;a&&(this.dataset=null,this.setDataset(a))},setDataset:function(a){a=N(this,this.setDataset,a,"datasetAdapter_");if(this.dataset!==a){var b=this.listen.dataset,c=this.dataset,e;b&&(c&&c.removeHandler(b,this),a&&a.addHandler(b,this));this.itemCount=a?a.itemCount:0;(e=O(c,a))&&this.emit_itemsChanged(e);this.dataset=a;this.emit_datasetChanged(c)}},has:function(a){return this.dataset?this.dataset.has(a):null},getItems:function(){return this.dataset?
this.dataset.getItems():[]},pick:function(){return this.dataset?this.dataset.pick():null},top:function(a){return this.dataset?this.dataset.top(a):[]},forEach:function(a){if(this.dataset)return this.dataset.forEach(a)},destroy:function(){(this.dataset||this.datasetAdapter_)&&this.setDataset();ga.prototype.destroy.call(this)}}),ka=U(q,{className:r+".AbstractDataset",itemCount:0,items_:null,members_:null,cache_:null,emit_itemsChanged:J("itemsChanged","delta")&&function(a){var b,c=0,e=0,f;if(b=a.inserted)for(;f=
b[c];)this.items_[f.basisObjectId]=f,c++;if(b=a.deleted)for(;f=b[e];)delete this.items_[f.basisObjectId],e++;this.itemCount+=c-e;this.cache_=c==this.itemCount?a.inserted:null;F.itemsChanged.call(this,a)},init:function(){q.prototype.init.call(this);this.members_={};this.items_={}},has:function(a){return!(!a||!this.items_[a.basisObjectId])},getItems:function(){this.cache_||(this.cache_=Y(this.items_));return this.cache_},pick:function(){for(var a in this.items_)return this.items_[a];return null},top:function(a){var b=
[];if(a)for(var c in this.items_)if(b.push(this.items_[c])>=a)break;return b},forEach:function(a){for(var b=this.getItems(),c=0;c<b.length;c++)a(b[c])},clear:function(){},destroy:function(){this.clear();q.prototype.destroy.call(this);this.cache_=ba;this.itemCount=0;this.items_=this.members_=null}});r=U(ka,{className:r+".Dataset",listen:{item:{destroy:function(a){this.remove([a])}}},init:function(){ka.prototype.init.call(this);var a=this.items;a&&(this.items=null,this.set(a))},add:function(a){var b=
this.members_,c=this.listen.item,e=[],f;a&&!Array.isArray(a)&&(a=[a]);for(var d=0;d<a.length;d++){var m=a[d];if(m instanceof ga){var k=m.basisObjectId;b[k]||(b[k]=m,c&&m.addHandler(c,this),e.push(m))}}e.length&&this.emit_itemsChanged(f={inserted:e});return f},remove:function(a){var b=this.members_,c=this.listen.item,e=[],f;a&&!Array.isArray(a)&&(a=[a]);for(var d=0;d<a.length;d++){var m=a[d];if(m instanceof ga){var k=m.basisObjectId;b[k]&&(c&&m.removeHandler(c,this),delete b[k],e.push(m))}}e.length&&
this.emit_itemsChanged(f={deleted:e});return f},set:function(a){if(!this.itemCount)return this.add(a);if(!a||!a.length)return this.clear();for(var b=this.members_,c=this.listen.item,e={},f=[],d=[],m,k,l,n=0;n<a.length;n++)m=a[n],m instanceof ga&&(k=m.basisObjectId,e[k]=m,b[k]||(b[k]=m,c&&m.addHandler(c,this),d.push(m)));for(k in b)e[k]||(m=b[k],c&&m.removeHandler(c,this),delete b[k],f.push(m));(l=s(d,f))&&this.emit_itemsChanged(l);return l},sync:function(a){a=this.set(a)||{};var b=a.deleted;setAccumulateState(!0);
if(b)for(var c=0,e;e=b[c];c++)e.destroy();setAccumulateState(!1);return a.inserted},clear:function(){var a=this.getItems(),b=this.listen.item,c;if(a.length){if(b)for(c=0;c<a.length;c++)a[c].removeHandler(b,this);this.emit_itemsChanged(c={deleted:a});this.members_={}}return c}});var Z=function(a,b,c,e){this.context=a;this.fn=b;this.source=c;this.handler=e};Z.prototype.adapter_=null;Z.prototype.proxy=function(){this.fn.call(this.context,this.source)};var ja={datasetChanged:function(a){this.fn.call(this.context,
a)},destroy:function(){this.fn.call(this.context,null)}},ma={change:function(a){this.fn.call(this.context,a)},destroy:function(){this.fn.call(this.context,null)}};r.setAccumulateState=function(){function b(){var a=k;k={};for(var d in a){var c=a[d];l.call(c.dataset,c)}}function c(a){var d=this.basisObjectId,b=a.inserted,h=a.deleted,e=k[d];if(b&&h)e&&(delete k[d],l.call(e.dataset,e)),l.call(this,a);else{if(e){var m=e[b?"inserted":"deleted"];if(m){m.push.apply(m,b||h);return}l.call(e.dataset,e)}k[d]=
a;a.dataset=this}}function e(){m=null;d&&(d=0,f.emit_itemsChanged=l,b())}var f=ka.prototype,l=f.emit_itemsChanged,d=0,m,k={};return function(k){k?(0==d&&(f.emit_itemsChanged=c,m||(m=a.setImmediate(e))),d++):(d-=0<d,0==d&&(f.emit_itemsChanged=l,b()))}}();M.exports={STATE:e,SUBSCRIPTION:p,AbstractData:q,Value:D,Object:ga,Slot:c,KeyObjectMap:aa,AbstractDataset:ka,Dataset:r,DatasetWrapper:pa,DatasetAdapter:Z,isConnected:L,getDatasetDelta:O,resolveDataset:N,wrapData:A,wrapObject:B,wrap:function(a,b){var c=
b?B:A;return Array.isArray(a)?a.map(c):c(a)}}},"6.js":function(c,M,a,r,U,J,aa,da){function y(){}function I(){}function L(){}function G(a){var b=a.constructor.prototype;a.setDelegate=b.setDelegate;a.destroy=b.destroy}function s(a){return a.sortingValue||0}function O(a,b){a=a.sortingValue||0;b=b.sortingValue||0;return+(a>b)||-(a<b)}function N(a,b){a=a.sortingValue||0;b=b.sortingValue||0;return-(a>b)||+(a<b)}function A(a){return a.childNodes.sort(a.sortingDesc?N:O)}function B(a,b,c,e){if(!a.length)return 0;
e=!!e;var f,g,h=0,t=a.length-1;do if(f=h+t>>1,g=c(a[f]),e?b>g:b<g)t=f-1;else if(e?b<g:b>g)h=f+1;else return b==g?f:0;while(h<=t);return f+(g<b^e)}function E(a,b,c,e,f){if(b!==c){var g=a,h=[];e&&(a.contextSelection=c,a.selected&&h.push(a));for(;g;){if((e=!g.selection||f&&g===a?g.firstChild:null)&&e.contextSelection!==b)throw 6;for(;!e;){if(g===a){h.length&&(b&&b.remove(h),c&&c.add(h));return}e=g.nextSibling;e||(g=g.parentNode)}g=e;g.selected&&h.push(g);g.contextSelection=c}}}function Y(a,b){a.contextDisabled!=
b&&(a.contextDisabled=b,a.disabled||(b?a.emit_disable():a.emit_enable()))}function W(d){if(!d)return null;if(d.isSatelliteConfig||d instanceof Z)return d;f.isClass(d)&&(d={instanceOf:d});if(d&&d.constructor===Object){var b=!1,c={isSatelliteConfig:!0},e,g;for(g in d)switch(g){case "instance":d[g]instanceof Z&&(c[g]=d[g]);break;case "instanceOf":f.isClass(d[g])&&d[g].isSubclassOf(Z)&&(e=d[g]);break;case "existsIf":case "delegate":case "dataSource":b=!0;c[g]=R(d[g]);break;case "config":c[g]=d[g]}c.instance||
(c.instanceOf=e||Z);if(b&&(b="events"in d?d.events:"update","hook"in d&&!1=="events"in d&&(b=a.object.keys(d.hook)),Array.isArray(b)&&(b=b.join(" ")),"string"==typeof b))for(d={},b=b.split(/\s+/),e=0;g=b[e];e++)d[g]=pa,c.handler=d;return c}return null}function F(a,b){for(var c in b)a[c]=W(b[c])}function z(a,b){var c=b.length-1;a.childNodes=b;a.firstChild=b[0]||null;a.lastChild=b[c]||null;for(var e=c;c=b[e];e--)c.nextSibling=b[e+1]||null,c.previousSibling=b[e-1]||null,a.insertBefore(c,c.nextSibling)}
function ba(a,b){var c;if("function"==typeof a.childFactory&&(c=a.childFactory(b),c instanceof a.childClass))return c;if(!c)throw 9;throw 10;}a.require("./4.js");a.require("./5.js");c=this.path;var f=a.Class,e=a.object.complete,n=a.array,u=a.array.remove,p=a.fn.$undef,R=a.getter,q=a.fn.nullGetter;r=a.event.create;var l=a.event.events;U=a.data.SUBSCRIPTION;var b=a.data.STATE,H=a.data.Object,w=a.data.AbstractDataset,V=a.data.Dataset,D={ANY:!0,NONE:!1,PARENT:"parent",OWNER:"owner"},$={};U.addProperty("owner");
U.addProperty("dataSource");var ga=f.customExtendProperty({},function(a,b){F(a,b)}),oa=f.customExtendProperty({},F),pa=function(a){var b=this.name,c=this.config,e=!c.existsIf||c.existsIf(a),f=a.satellite[b];e?f?(c.delegate&&f.setDelegate(c.delegate(a)),c.dataSource&&f.setDataSource(c.dataSource(a))):((f=c.instance)?(c.delegate&&f.setDelegate(c.delegate(a)),c.dataSource&&f.setDataSource(c.dataSource(a))):(e=("function"==typeof c.config?c.config(a):c.config)||{},e.owner=a,c.delegate&&(e.autoDelegate=
!1,e.delegate=c.delegate(a)),c.dataSource&&(e.dataSource=c.dataSource(a)),f=new c.instanceOf(e),f.destroy=L,a.listen&&a.listen.satellite&&f.addHandler(a.listen&&a.listen.satellite,a)),a.satellite.__auto__[b].instance=f,a.setSatellite(b,f,!0)):f&&(c.instance&&(c.delegate&&f.setDelegate(),c.dataSource&&f.setDataSource()),a.satellite.__auto__[b].instance=null,a.setSatellite(b,null,!0))},ka={destroy:function(){this.owner.setSatellite(this.name,null)}},Z=f(H,{className:c+".AbstractNode",subscribeTo:H.prototype.subscribeTo+
U.DATASOURCE,isSyncRequired:function(){return this.state==b.UNDEFINED||this.state==b.DEPRECATED},syncEvents:{activeChanged:!1},emit_update:function(a){H.prototype.emit_update.call(this,a);if(a=this.parentNode)a.matchFunction&&this.match(a.matchFunction),a.insertBefore(this,this.nextSibling)},listen:{owner:{destroy:function(){this.ownerSatelliteName||this.setOwner()}}},autoDelegate:D.NONE,name:null,childNodes:null,emit_childNodesModified:r("childNodesModified","delta")&&function(a){l.childNodesModified.call(this,
a);var b=this.listen.childNode,c;if(b){if(c=a.inserted)for(var e=0,f;f=c[e];e++)f.addHandler(b,this);if(c=a.deleted)for(e=0;f=c[e];e++)f.removeHandler(b,this)}},childNodesState:b.UNDEFINED,emit_childNodesStateChanged:r("childNodesStateChanged","oldState"),childClass:Z,dataSource:null,emit_dataSourceChanged:r("dataSourceChanged","oldDataSource"),dataSourceAdapter_:null,dataSourceMap_:null,destroyDataSourceMember:!0,parentNode:null,nextSibling:null,previousSibling:null,firstChild:null,lastChild:null,
sorting:q,sortingDesc:!1,emit_sortingChanged:r("sortingChanged","oldSorting","oldSortingDesc"),groupingClass:null,grouping:null,emit_groupingChanged:r("groupingChanged","oldGrouping"),groupNode:null,groupId:NaN,satelliteConfig:ga,satellite:oa,ownerSatelliteName:null,emit_satelliteChanged:r("satelliteChanged","name","oldSatellite"),owner:null,emit_ownerChanged:r("ownerChanged","oldOwner"),init:function(){H.prototype.init.call(this);var b=this.childNodes,c=this.dataSource;b&&(this.childNodes=null);
c&&(this.dataSource=null);var e=this.grouping;e&&(this.grouping=null,this.setGrouping(e));this.childClass&&(this.childNodes=[],c?this.setDataSource(c):b&&this.setChildNodes(b));b=this.satellite;this.satellite={};this.satelliteConfig!==ga&&(b=a.object.merge(b,this.satelliteConfig));if(b!==oa)for(var f in b)this.setSatellite(f,b[f]);if(f=this.owner)this.owner=null,this.setOwner(f)},setChildNodesState:function(a,c){var e=String(a),f=this.childNodesState;if(!b.values[e])throw 7;if(f!=e||f.data!=c)this.childNodesState=
Object(e),this.childNodesState.data=c,this.emit_childNodesStateChanged(f)},appendChild:function(a){},insertBefore:function(a,b){},removeChild:function(a){},replaceChild:function(a,b){},clear:function(a){},setChildNodes:function(a){},setGrouping:function(a,b){},setSorting:function(a,b){},setDataSource:function(a){},setOwner:function(a){a&&!1!=a instanceof Z||(a=null);if(a&&this.parentNode)throw 8;var b=this.owner;if(b!==a){var c=this.listen.owner;if(b){if(this.ownerSatelliteName&&b.satellite.__auto__&&
this.ownerSatelliteName in b.satellite.__auto__)return;c&&b.removeHandler(c,this);this.ownerSatelliteName&&(this.owner=null,b.setSatellite(this.ownerSatelliteName,null))}a&&c&&a.addHandler(c,this);this.owner=a;this.emit_ownerChanged(b);this.autoDelegate!=D.OWNER&&this.autoDelegate!==D.ANY||this.setDelegate(a)}},setSatellite:function(a,b,c){var e=this.satellite[a]||null,f=this.satellite.__auto__,g=f&&f[a],h=c&&g;if(h)b=g.instance,g.config.instance&&b&&delete g.config.instance.setOwner;else{if((b=W(b))&&
b.owner&&f&&b.ownerSatelliteName&&f[b.ownerSatelliteName])return;g&&(delete f[a],g.config.instance&&g.config.instance.removeHandler(ka,g),g.config.handler&&this.removeHandler(g.config.handler,g))}if(e!==b){c=this.listen.satellite;var t;e&&(delete this.satellite[a],e.ownerSatelliteName=null,g&&e.destroy===L?t=e:(c&&e.removeHandler(c,this),e.setOwner(null)),h&&!b&&g.config.instance&&(g.config.instance.setOwner=I));if(b){if(!1==b instanceof Z){g={owner:this,name:a,config:b,instance:null};b.handler&&
this.addHandler(b.handler,g);b.instance&&(b.instance.addHandler(ka,g),b.instance.setOwner=I);f||(f=this.satellite.__auto__={});f[a]=g;pa.call(g,this);!g.instance&&e&&this.emit_satelliteChanged(a,e);t&&(delete t.destroy,t.destroy());return}if(b.owner!==this){g&&g.config.delegate?(f=b.autoDelegate,b.autoDelegate=!1,b.setOwner(this),b.autoDelegate=f):b.setOwner(this);if(b.owner!==this)return;c&&b.addHandler(c,this)}else b.ownerSatelliteName&&(delete this.satellite[b.ownerSatelliteName],this.emit_satelliteChanged(b.ownerSatelliteName,
b));this.satellite[a]=b;b.ownerSatelliteName=a}this.emit_satelliteChanged(a,e);t&&(delete t.destroy,t.destroy())}},getChildNodesDataset:function(){return $[this.basisObjectId]||new P({sourceNode:this})},destroy:function(){H.prototype.destroy.call(this);this.dataSource||this.dataSourceAdapter_?this.setDataSource():this.firstChild&&this.clear();this.parentNode&&this.parentNode.removeChild(this);this.grouping&&(this.grouping.setOwner(),this.grouping=null);this.owner&&this.setOwner();var a=this.satellite;
if(a){var b=a.__auto__;delete a.__auto__;for(var c in b)b[c].config.instance&&!b[c].instance&&b[c].config.instance.destroy();for(c in a)b=a[c],b.owner=null,b.ownerSatelliteName=null,b.destroy===L&&delete b.destroy,b.destroy();this.satellite=null}this.lastChild=this.firstChild=this.nextSibling=this.previousSibling=this.parentNode=this.childNodes=null}}),ja=f(Z,{className:c+".PartitionNode",autoDestroyIfEmpty:!1,nodes:null,first:null,last:null,init:function(){this.nodes=[];Z.prototype.init.call(this)},
insert:function(a,b){var c=this.nodes,e=b?c.indexOf(b):-1;-1==e?(c.push(a),this.last=a):c.splice(e,0,a);this.first=c[0];a.groupNode=this;this.emit_childNodesModified({inserted:[a]})},remove:function(a){var b=this.nodes;u(b,a)&&(this.first=b[0]||null,this.last=b[b.length-1]||null,a.groupNode=null,this.emit_childNodesModified({deleted:[a]}));!this.first&&this.autoDestroyIfEmpty&&this.destroy()},clear:function(){if(this.first){for(var a=this.nodes,b=a.length;0<b--;)a[b].groupNode=null;this.nodes=[];
this.last=this.first=null;this.emit_childNodesModified({deleted:a});this.autoDestroyIfEmpty&&this.destroy()}},destroy:function(){Z.prototype.destroy.call(this);this.last=this.first=this.nodes=null}}),ma={childClass:Z,childFactory:null,listen:{dataSource:{itemsChanged:function(b,c){var e={},f=[];if(c.deleted)if(e.deleted=f,this.childNodes.length==c.deleted.length){for(var f=n(this.childNodes),g=0,l;l=f[g];g++)G(l);g=this.dataSource;this.dataSource=null;this.clear(!0);this.dataSource=g;this.dataSourceMap_=
{}}else for(g=0;l=c.deleted[g];g++){l=l.basisObjectId;var h=this.dataSourceMap_[l];G(h);delete this.dataSourceMap_[l];this.removeChild(h);f.push(h)}if(c.inserted)for(e.inserted=[],g=0;l=c.inserted[g];g++){var t=h=ba(this,{delegate:l});t.setDelegate=a.fn.$undef;t.destroy=y;this.dataSourceMap_[l.basisObjectId]=h;e.inserted.push(h);this.firstChild&&this.insertBefore(h)}this.firstChild?this.emit_childNodesModified(e):this.setChildNodes(e.inserted);if(this.destroyDataSourceMember&&f.length)for(g=0;l=f[g];g++)l.destroy()},
stateChanged:function(a){this.setChildNodesState(a.state)},destroy:function(a){this.dataSourceAdapter_||this.setDataSource()}}},getChild:function(b,c){return a.array.search(this.childNodes,b,c)},getChildByName:function(a){return this.getChild(a,"name")},appendChild:function(a){return this.insertBefore(a)},insertBefore:function(a,b){if(!this.childClass)throw 11;if(a.firstChild)for(var c=this;c=c.parentNode;)if(c===a)throw 12;var e=a&&a instanceof this.childClass;if(this.dataSource){if(!e||!a.delegate||
this.dataSourceMap_[a.delegate.basisObjectId]!==a)throw 13;}else if(this.dataSourceAdapter_)throw 14;e||(a=ba(this,a instanceof H?{delegate:a}:a));if(a.owner)throw 15;var e=a.parentNode===this,f=this.childNodes,g=this.grouping,h=a.groupNode,t=null,C=this.sorting,l,n=!1,Q,c=-1,p,r;e&&(p=a.nextSibling,r=a.previousSibling);C!==q&&(b=null,l=this.sortingDesc,Q=C(a)||0,e&&(Q===a.sortingValue?n=!0:(!p||(l?p.sortingValue<=Q:p.sortingValue>=Q))&&(!r||(l?r.sortingValue>=Q:r.sortingValue<=Q))&&(a.sortingValue=
Q,n=!0)));if(g){t=g.getGroupNode(a,!0);g=t.nodes;if(h===t&&(n||C===q&&p===b))return a;C!==q?h===t&&n?c=p&&p.groupNode===t?g.indexOf(p):g.length:(c=B(g,Q,s,l),a.sortingValue=Q):c=b&&b.groupNode===t?g.indexOf(b):g.length;if(c<g.length)b=g[c];else if(t.last)b=t.last.nextSibling;else for(c=t,b=null;(c=c.nextSibling)&&!(b=c.first););if(a===b||e&&p===b)return h!==t&&(h&&h.remove(a),t.insert(a,b)),a;c=-1}else if(C!==q){if(n)return a;c=B(f,Q,s,l);b=f[c];a.sortingValue=Q;if(a===b||e&&p===b)return a}else{if(b&&
b.parentNode!==this)throw 16;if(e){if(p===b)return a;if(a===b)throw 17;}}e?(p?(p.previousSibling=r,a.nextSibling=null):this.lastChild=r,r?(r.nextSibling=p,a.previousSibling=null):this.firstChild=p,-1==c?u(f,a):(l=f.indexOf(a),f.splice(l,1),c-=l<c),h&&(h.remove(a),h=null)):a.parentNode&&a.parentNode.removeChild(a);h!=t&&t.insert(a,b);if(b){-1==c&&(c=f.indexOf(b));if(-1==c)throw 18;a.nextSibling=b;f.splice(c,0,a)}else c=f.length,f.push(a),b={previousSibling:this.lastChild},this.lastChild=a;a.parentNode=
this;a.previousSibling=b.previousSibling;0==c?this.firstChild=a:b.previousSibling.nextSibling=a;b.previousSibling=a;e||(E(a,a.contextSelection,this.selection||this.contextSelection,!0),Y(a,this.disabled||this.contextDisabled),a.match&&a.match(this.matchFunction),a.autoDelegate!=D.PARENT&&a.autoDelegate!==D.ANY||a.setDelegate(this),this.dataSource||this.emit_childNodesModified({inserted:[a]}),a.listen.parentNode&&this.addHandler(a.listen.parentNode,a));return a},removeChild:function(a){if(!a||a.parentNode!==
this)throw 19;if(!1==a instanceof this.childClass)throw 20;if(this.dataSource){if(this.dataSource.has(a.delegate))throw 21;}else if(this.dataSourceAdapter_)throw 22;var b=this.childNodes.indexOf(a);if(-1==b)throw 23;this.childNodes.splice(b,1);a.parentNode=null;a.nextSibling?a.nextSibling.previousSibling=a.previousSibling:this.lastChild=a.previousSibling;a.previousSibling?a.previousSibling.nextSibling=a.nextSibling:this.firstChild=a.nextSibling;a.nextSibling=null;a.previousSibling=null;a.listen.parentNode&&
this.removeHandler(a.listen.parentNode,a);E(a,a.contextSelection,null,!0);a.groupNode&&a.groupNode.remove(a);this.dataSource||this.emit_childNodesModified({deleted:[a]});a.autoDelegate!=D.PARENT&&a.autoDelegate!==D.ANY||a.setDelegate();return a},replaceChild:function(a,b){if(this.dataSource)throw 24;if(this.dataSourceAdapter_)throw 25;if(null==b||b.parentNode!==this)throw 26;this.insertBefore(a,b);return this.removeChild(b)},clear:function(a){if(this.dataSource&&this.dataSource.itemCount)throw 27;
if(this.firstChild){a&&E(this,this.selection||this.contextSelection,null,!1,!0);var b=this.childNodes;this.lastChild=this.firstChild=null;this.childNodes=[];this.emit_childNodesModified({deleted:b});for(var c=b.length;0<c--;){var e=b[c];e.listen.parentNode&&e.parentNode.removeHandler(e.listen.parentNode,e);e.parentNode=null;e.groupNode=null;a?(e.nextSibling=null,e.previousSibling=null,e.autoDelegate!=D.PARENT&&e.autoDelegate!==D.ANY||e.setDelegate()):e.destroy()}if(this.grouping)for(b=this.grouping.childNodes,
c=b.length-1;a=b[c];c--)a.clear()}},setChildNodes:function(a,b){this.dataSource||this.dataSourceAdapter_||this.clear(b);if(a&&(!1=="length"in a&&(a=[a]),a.length)){var c=this.emit_childNodesModified;this.emit_childNodesModified=p;for(var e=0,f=a.length;e<f;e++)this.insertBefore(a[e]);this.emit_childNodesModified=c;this.emit_childNodesModified({inserted:this.childNodes})}},setDataSource:function(d){if(!this.childClass)throw 28;d=a.data.resolveDataset(this,this.setDataSource,d,"dataSourceAdapter_");
if(this.dataSource!==d){var c=this.dataSource,e=this.listen.dataSource;c&&(this.dataSource=this.dataSourceMap_=null,e&&c.removeHandler(e,this));if(this.firstChild){if(c)for(var f=0,g;g=this.childNodes[f];f++)G(g);this.clear()}(this.dataSource=d)?(this.dataSourceMap_={},this.setChildNodesState(d.state),e&&(d.addHandler(e,this),d.itemCount&&e.itemsChanged&&e.itemsChanged.call(this,d,{inserted:d.getItems()}))):this.setChildNodesState(b.UNDEFINED);this.emit_dataSourceChanged(c)}},setGrouping:function(a,
b){if("function"==typeof a||"string"==typeof a)a={rule:a};!1==a instanceof x&&(a=a&&"object"==typeof a?new this.groupingClass(a):null);if(this.grouping!==a){var c=this.grouping,e;if(c){this.grouping=null;if(!a&&this.firstChild){e=this.sorting!==q?A(this):this.childNodes;c.nullGroup.clear();for(var f=c.childNodes.slice(0),g=0;g<f.length;g++)f[g].clear();z(this,e)}c.setOwner()}if(a&&(this.grouping=a,a.setOwner(this),this.firstChild)){e=this.sorting!==q?A(this):this.childNodes;for(g=0;f=e[g];g++)f.groupNode=
this.grouping.getGroupNode(f,!0);for(g=0;f=e[g];g++)f.groupNode.nodes.push(f);e.length=0;for(g=this.grouping.nullGroup;g;g=g.nextSibling)f=g.nodes,g.first=f[0]||null,g.last=f[f.length-1]||null,e.push.apply(e,f),g.emit_childNodesModified({inserted:f});z(this,e)}this.emit_groupingChanged(c)}},setSorting:function(a,b){a=R(a);b=!!b;if(this.sorting!==a||this.sortingDesc!=!!b){var c=this.sorting,e=this.sortingDesc;this.sorting=a;this.sortingDesc=!!b;if(a!==q&&this.firstChild){var f=[],g;for(g=this.firstChild;g;g=
g.nextSibling)g.sortingValue=a(g)||0;if(this.grouping)for(var h=this.grouping.nullGroup;h;h=h.nextSibling)g=h.nodes=A({childNodes:h.nodes,sortingDesc:this.sortingDesc}),h.first=g[0]||null,h.last=g[g.length-1]||null,f.push.apply(f,g);else f=A(this);z(this,f)}this.emit_sortingChanged(c,e)}},setMatchFunction:function(a){if(this.matchFunction!=a){var b=this.matchFunction;this.matchFunction=a;for(var c=this.lastChild;c;c=c.previousSibling)c.match(a);this.emit_matchFunctionChanged(b)}}},g=f(Z,ma,{className:c+
".Node",emit_enable:r("enable")&&function(){for(var a=this.firstChild;a;a=a.nextSibling)Y(a,!1);l.enable.call(this)},emit_disable:r("disable")&&function(){for(var a=this.firstChild;a;a=a.nextSibling)Y(a,!0);l.disable.call(this)},emit_satelliteChanged:function(a,b){Z.prototype.emit_satelliteChanged.call(this,a,b);this.satellite[a]instanceof g&&Y(this.satellite[a],this.disabled||this.contextDisabled)},emit_select:r("select"),emit_unselect:r("unselect"),emit_match:r("match"),emit_unmatch:r("unmatch"),
emit_matchFunctionChanged:r("matchFunctionChanged","oldMatchFunction"),selectable:!0,selected:!1,selection:null,contextSelection:null,matchFunction:null,matched:!0,disabled:!1,contextDisabled:!1,listen:{owner:{enable:function(){Y(this,!1)},disable:function(){Y(this,!0)}}},init:function(){this.selection&&(!1==this.selection instanceof w&&(this.selection=new X(this.selection)),this.listen.selection&&this.selection.addHandler(this.listen.selection,this));Z.prototype.init.call(this);this.disabled&&this.emit_disable();
this.selected&&(this.selected=!1,this.select(!0))},setSelection:function(a){if(this.selection!==a)return E(this,this.selection||this.contextSelection,a||this.contextSelection,!1,!0),this.selection&&this.listen.selection&&this.selection.removeHandler(this.listen.selection,this),(this.selection=a)&&this.listen.selection&&a.addHandler(this.listen.selection,this),!0},select:function(a){var b=this.selected,c=this.contextSelection;c?a?b?c.remove([this]):c.add([this]):this.selectable&&c.set([this]):!b&&
this.selectable&&(this.selected=!0,this.emit_select());return this.selected!=b},unselect:function(){var a=this.selected;if(a){var b=this.contextSelection;b?b.remove([this]):(this.selected=!1,this.emit_unselect())}return this.selected!=a},setSelected:function(a,b){return a?this.select(b):this.unselect()},enable:function(){var a=this.disabled;a&&(this.disabled=!1,this.contextDisabled||this.emit_enable());return this.disabled!=a},disable:function(){var a=this.disabled;a||(this.disabled=!0,this.contextDisabled||
this.emit_disable());return this.disabled!=a},setDisabled:function(a){return a?this.disable():this.enable()},isDisabled:function(){return this.disabled||this.contextDisabled},match:function(a){"function"!=typeof a&&(a=null);this.underMatch_&&!a&&this.underMatch_(this,!0);this.underMatch_=a;a=!a||a(this);this.matched!=a&&((this.matched=a)?this.emit_match():this.emit_unmatch())},destroy:function(){this.unselect();this.contextSelection=null;this.selection&&this.setSelection();Z.prototype.destroy.call(this)}}),
x=f(Z,ma,{className:c+".GroupingNode",emit_childNodesModified:function(a){l.childNodesModified.call(this,a);this.nullGroup.nextSibling=this.firstChild;var b;if(b=a.inserted){a=0;for(var c;c=b[a++];)c.groupId_=c.delegate?c.delegate.basisObjectId:c.data.id,this.map_[c.groupId_]=c;if(this.dataSource&&this.nullGroup.first)for(b=this.owner,c=n(this.nullGroup.nodes),a=c.length;0<a--;)b.insertBefore(c[a],c[a].nextSibling)}},emit_ownerChanged:function(a){a&&a.grouping===this&&a.setGrouping(null,!0);this.owner&&
this.owner.grouping!==this&&this.owner.setGrouping(this);l.ownerChanged.call(this,a);!this.owner&&this.autoDestroyWithNoOwner&&this.destroy()},map_:null,nullGroup:null,autoDestroyWithNoOwner:!0,autoDestroyEmptyGroups:!0,rule:q,childClass:ja,childFactory:function(a){return new this.childClass(e({autoDestroyIfEmpty:this.dataSource?!1:this.autoDestroyEmptyGroups},a))},init:function(){this.map_={};this.nullGroup=new ja;"groupGetter"in this&&(this.rule=R(this.groupGetter));Z.prototype.init.call(this)},
getGroupNode:function(a,b){var c=this.rule(a),e=c instanceof H,f=this.map_[e?c.basisObjectId:c];this.dataSource&&(b=!1);!f&&b&&(f=this.appendChild(e?c:{data:{id:c,title:c}}));return f||this.nullGroup},setDataSource:function(a){var b=this.dataSource;ma.setDataSource.call(this,a);if((a=this.owner)&&this.dataSource!==b)for(var b=n(a.childNodes),c=b.length-1;0<=c;c--)a.insertBefore(b[c],b[c+1])},insertBefore:function(a,b){a=ma.insertBefore.call(this,a,b);var c=a.first;if(c){for(var e=c.parentNode,f=a.last,
g,h,t,C=null,l=a;(l=l.nextSibling)&&!(C=l.first););t=C?C.previousSibling:e.lastChild;g=c.previousSibling;h=f.nextSibling;if(h!==C){var n=e.childNodes,l=a.nodes,p=l.length;g&&(g.nextSibling=h);h&&(h.previousSibling=g);t&&(t.nextSibling=c);C&&(C.previousSibling=f);c.previousSibling=t;f.nextSibling=C;var f=n.indexOf(c),q=C?n.indexOf(C):n.length;q>f&&(q-=p);n.splice(f,p);n.splice.apply(n,[q,0].concat(l));t&&g||(e.firstChild=n[0]);C&&h||(e.lastChild=n[n.length-1]);if(c instanceof ja)for(c=p;0<c--;)e.insertBefore(l[c],
C),C=l[c]}}return a},removeChild:function(a){if(a=ma.removeChild.call(this,a)){delete this.map_[a.groupId_];for(var b=0,c;c=a.nodes[b];b++)c.parentNode.insertBefore(c)}return a},clear:function(a){var b=[],c=this.getGroupNode,e=this.nullGroup;this.getGroupNode=function(){return e};for(var f=this.firstChild;f;f=f.nextSibling)b.push.apply(b,f.nodes);for(var f=0,g;g=b[f];f++)g.parentNode.insertBefore(g);this.getGroupNode=c;ma.clear.call(this,a);this.map_={}},destroy:function(){this.autoDestroyWithNoOwner=
!1;Z.prototype.destroy.call(this);this.nullGroup.destroy();this.map_=this.nullGroup=null}});Z.prototype.groupingClass=x;var v={childNodesModified:function(a,b){var c=this.members_,e={},f,g=0,h=0,t=b.inserted,C=b.deleted;if(t&&t.length)for(e.inserted=t;f=t[g];)c[f.basisObjectId]=f,g++;if(C&&C.length)for(e.deleted=C;f=C[h];)delete c[f.basisObjectId],h++;(g||h)&&this.emit_itemsChanged(e)},destroy:function(){this.destroy()}},P=f(w,{className:c+".ChildNodesDataset",sourceNode:null,init:function(){w.prototype.init.call(this);
var a=this.sourceNode;$[a.basisObjectId]=this;a.firstChild&&v.childNodesModified.call(this,a,{inserted:a.childNodes});a.addHandler(v,this)},destroy:function(){this.sourceNode.removeHandler(v,this);delete $[this.sourceNode.basisObjectId];w.prototype.destroy.call(this)}}),X=f(V,{className:c+".Selection",multiple:!1,emit_itemsChanged:function(a){V.prototype.emit_itemsChanged.call(this,a);if(a.inserted)for(var b=0,c;c=a.inserted[b];b++)c.selected||(c.selected=!0,c.emit_select());if(a.deleted)for(b=0;c=
a.deleted[b];b++)c.selected&&(c.selected=!1,c.emit_unselect())},add:function(a){if(!this.multiple){if(this.itemCount)return this.set(a);a=[a[0]]}for(var b=[],c=0,e;e=a[c];c++)e.contextSelection==this&&e.selectable&&b.push(e);return V.prototype.add.call(this,b)},set:function(a){for(var b=[],c=0,e;e=a[c];c++)e.contextSelection==this&&e.selectable&&b.push(e);this.multiple||b.splice(1);return V.prototype.set.call(this,b)}});M.exports={DELEGATE:D,AbstractNode:Z,Node:g,GroupingNode:x,PartitionNode:ja,ChildNodesDataset:P,
Selection:X,nullSelection:new w}},"g.js":function(c,M,a,r,U,J,aa,da){function y(a){var c=s(a);return function(){c.apply(E,arguments);this.service&&c.apply(this.service,arguments);c.apply(this,arguments)}}function I(a){var c=s(a);return function(){var r=[this].concat(L(arguments));c.apply(E,r);this.transport&&this.transport["emit_"+a].apply(this.transport,r);c.apply(this,arguments)}}a.require("./4.js");a.require("./5.js");r=this.path;var L=a.array.from,G=a.object.slice,s=a.event.create,O=a.data.STATE,
N=a.data.Object,A=a.event.Emitter,B=[],E=new A({abort:function(){for(var a=L(B),c=0;c<a.length;c++)a[c].abort();return a},handler:{start:function(c){a.array.add(B,c.transport)},complete:function(c){a.array.remove(B,c.transport)}}});c=N.subclass({className:r+".AbstractRequest",influence:null,initData:null,requestData:null,transport:null,stateOnAbort:O.UNDEFINED,emit_start:I("start"),emit_timeout:I("timeout"),emit_abort:I("abort"),emit_success:I("success"),emit_failure:I("failure"),emit_complete:I("complete"),
emit_stateChanged:function(a){N.prototype.emit_stateChanged.call(this,a);if(this.influence)for(a=0;a<this.influence.length;a++)this.influence[a].setState(this.state,this.state.data)},init:function(){N.prototype.init.call(this);this.influence=[]},setInfluence:function(a){this.influence=L(a)},clearInfluence:function(){this.influence=null},doRequest:a.fn.$undef,getResponseData:a.fn.$undef,destroy:function(){N.prototype.destroy.call(this);this.requestData=this.initData=null;this.clearInfluence()}});r=
A.subclass({className:r+".AbstractTransport",requestClass:c,requests:null,poolLimit:null,poolHashGetter:a.fn.$true,emit_start:y("start"),emit_timeout:y("timeout"),emit_abort:y("abort"),emit_success:y("success"),emit_failure:y("failure"),emit_complete:y("complete"),init:function(){this.requests={};this.requestQueue=[];this.inprogressRequests=[];A.prototype.init.call(this);this.addHandler(Y,this);this.poolLimit&&this.addHandler(W,this)},getRequestByHash:function(a){var c=this.requests[a];if(!c){for(var r in this.requests)if(this.requests[r].isIdle()&&
-1!=!this.requestQueue.indexOf(this.requests[r])){c=this.requests[r];delete this.requests[r];break}c||(c=new this.requestClass({transport:this}));this.requests[a]=c}return c},prepare:a.fn.$true,prepareRequestData:a.fn.$self,request:function(a){if(this.prepare()){a=G(a);var c=this.poolHashGetter(this.prepareRequestData(a)),c=this.getRequestByHash(c,!0);c.initData&&c.abort();c.initData=a;c.requestData=a;c.setInfluence(a.influence||this.influence);this.poolLimit&&this.inprogressRequests.length>=this.poolLimit?
(this.requestQueue.push(c),c.setState(O.PROCESSING)):c.doRequest();return c}},abort:function(){for(var a=0,c;c=this.inprogressRequests[a];a++)c.abort();for(a=0;c=this.requestQueue[a];a++)c.setState(O.ERROR);this.inprogressRequests=[];this.requestQueue=[]},stop:function(){this.stopped||(this.stoppedRequests=this.inprogressRequests.concat(this.requestQueue),this.abort(),this.stopped=!0)},resume:function(){if(this.stoppedRequests){for(var a=0,c;c=this.stoppedRequests[a];a++)c.transport.request(c.initData);
this.stoppedRequests=null}this.stopped=!1},destroy:function(){for(var a in this.requests)this.requests[a].destroy();this.requests={};this.stoppedRequests=this.requestQueue=this.inprogressRequests=null;A.prototype.destroy.call(this)}});var Y={start:function(c,r){a.array.add(this.inprogressRequests,r)},complete:function(c,r){a.array.remove(this.inprogressRequests,r)}},W={complete:function(){var c=this.requestQueue.shift();c&&a.nextTick(function(){c.doRequest()})}};M.exports={createTransportEvent:y,
createRequestEvent:I,transportDispatcher:E,AbstractRequest:c,AbstractTransport:r}}};(function(c){function M(a,b){for(var c in b)a[c]=b[c];return a}function a(a,b){for(var c in b)!1==c in a&&(a[c]=b[c]);return a}function r(a){var b=[],c;for(c in a)b.push(c);return b}function U(a,b){var c={};if(!b)return M(c,a);for(var d=0,e;e=b[d++];)e in a&&(c[e]=a[e]);return c}function J(){return N(arguments).reduce(M,{})}function aa(a,b,c){var d=[],e;for(e in a)d.push(b.call(c,e,a[e]));return d}function da(a){return a}
function y(){}function I(a){var b=H[a.url];if(b)for(var c=0;c<b.length;c++)b[c](a.get(),a.url)}function L(a,b,c){try{return new Function(b,c)}catch(d){F.error("Compilation error at "+a+("line"in d?":"+(d.line-1):"")+": "+d)}}function G(a){var b=a.split(".")[0],c=a.replace(/\./g,"/")+".js";!1==a in ga&&(!1==b in pa&&(pa[b]=e.baseURI),b==a&&(oa[pa[b]+c]=b),ga[a]=pa[b]+c);return ga[a]}function s(a){a=a.split(".");var b;b=a[0];var d=$[b];d||(d=$[b]=new ka(b),d.namespaces_={},d.namespaces_[b]=d,n.noConflict||
(c[b]=d));for(var d=b=d,e=1,f;f=a[e];e++){if(!d[f]){var g=a.slice(0,e+1).join(".");d[f]=new ka(g);b.namespaces_[g]=d[f]}d=d[f]}return $[a.join(".")]=d}function O(a,b){if(n.extProto)for(var c in b)a.prototype[c]=function(a,c){return function(){var c=[this];Array.prototype.push.apply(c,arguments);return b[a].apply(b,c)}}(c,a.name||a.toString().match(/^\s*function\s*(\w*)\s*\(/)[1])}function N(a,b){if(null!=a){var c=a.length;if("undefined"==typeof c||"[object Function]"==E.call(a))return[a];b||(b=0);
if(0<c-b){for(var d=[],e=0,f=b;f<c;)d[e++]=a[f++];return d}}return[]}function A(a,b,c){for(var d=[],e="function"==typeof b,f=0;f<a;f++)d[f]=e?b.call(c,f,d):b;return d}var B=c.document,E=Object.prototype.toString,Y=function(){function a(b){if(c.test(b)){var d=b.split("."),h=d[0],e=d[1],f=d[2];switch(d.length){case 1:b=function(a){return null!=a?a[h]:a};break;case 2:b=function(a){return null!=a?a[h][e]:a};break;case 3:b=function(a){return null!=a?a[h][e][f]:a};break;default:b=function(a){if(null!=a){a=
a[h][e][f];for(var b=3,c;c=d[b];b++)a=a[c]}return a}}return b}return new Function("object","return object != null ? object."+b+" : object")}var b=1,c=/^[a-z$_][a-z$_0-9]*(\.[a-z$_][a-z$_0-9]*)*$/i,d=[],e={},f={};return function(c,g){var k,l,C;if(!c||c===W)return W;"function"==typeof c?(C=c.basisGetterId_)?k=d[Math.abs(C)-1]:(k=function(a){return c(a)},k.base=c,k.__extend__=Y,C=d.push(k),c.basisGetterId_=-C,k.basisGetterId_=C):(k=e[c])?C=k.basisGetterId_:(k=a(c),k.base=c,k.__extend__=Y,C=d.push(k),
k.basisGetterId_=C,e[c]=k);l=null!=g&&typeof g;if(!l)return k;var m=f[C],n;if("string"==l)n=l+g;else if("function"==l)n=g.basisModId_;else if("object"!=l)return k;if(n&&m&&m[n])return m[n];"function"==typeof k.base&&(k=k.base);switch(l){case "string":l=function(a){return v.format(g,k(a))};break;case "function":n||(n=l+b++,g.basisModId_=n);l=function(a){return g(k(a))};break;default:l=function(a){return g[k(a)]}}l.base=k.base||k;l.__extend__=Y;n&&(m||(m={},f[C]=m),m[n]=l,l.mod=g,l.basisGetterId_=d.push(l));
return l}}(),W=M(function(){},{__extend__:Y}),F=function(){var a={log:y,info:y,warn:y,error:y};"undefined"!=typeof console&&aa(a,function(b){a[b]="bind"in Function.prototype&&"function"==typeof console[b]?Function.prototype.bind.call(console[b],console):function(){Function.prototype.apply.call(console[b],console,arguments)}});return a}(),z=c.setImmediate||c.msSetImmediate,ba=c.clearImmediate||c.msSetImmediate;z&&(z=z.bind(c));ba&&(ba=ba.bind(c));z||function(){var a=function(){var a={},b=1;z=function(){a[++b]=
{fn:arguments[0],args:N(arguments,1)};d(b);return b};ba=function(b){delete a[b]};return function(b){var d=a[b];if(d)try{"function"==typeof d.fn?d.fn.apply(void 0,d.args):(c.execScript||function(a){c.eval.call(c,a)})(String(d.fn))}finally{delete a[b]}}}(),b=function(b){setTimeout(function(){a(b)},0)},d=b;if(c.process&&"function"==typeof process.nextTick)d=function(b){process.nextTick(function(){a(b)})};else if(c.MessageChannel)d=function(b){var d=new c.MessageChannel;d.port1.onmessage=function(){a(b)};
d.port2.postMessage("")};else{var e=c.postMessage&&!c.importScripts;if(e){var f=c.onmessage;c.onmessage=function(){e=!1};c.postMessage("","*");c.onmessage=f}e?(f=function(b){b&&b.source==c&&(b=String(b.data).split("basisjs.setImmediate")[1])&&a(b)},c.addEventListener?c.addEventListener("message",f,!0):c.attachEvent("onmessage",f),d=function(a){c.postMessage("basisjs.setImmediate"+a,"*")}):B&&"onreadystatechange"in B.createElement("script")&&(d=function fa(c){"undefined"!=typeof k&&(d=b,k.head.ready(function(){d=
function(b){var c=B.createElement("script");c.onreadystatechange=function(){a(b);c.onreadystatechange=null;k.remove(c);c=null};k.head.add(c)}}));d===fa?b(c):d(c)})}}();var f="object"==typeof process&&"[object process]"==E.call(process),e=function(){var a=/^([^\/]+:|\/)/,b=/^[a-zA-Z0-9\-]+:\/?/,c=/^(?:[a-zA-Z0-9\-]+:)?\/\/[^\/]+\/?/,d=/[\?#].*$/,e={},g="",k;f?(g=require("path").resolve(".").replace(/\\/g,"/"),k=g.replace(/^[^\/]*/,""),g=g.replace(/\/.*/,"")):(k=location.pathname.replace(/[^\/]+$/,
""),g=location.protocol+"//"+location.host);return e={baseURI:k,origin:g,normalize:function(a){a=(a||"").replace(b,"/").replace(c,"/").replace(d,"");for(var h=[],e=a.split("/"),f=0;f<e.length;f++)".."==e[f]?(1<h.length||h[0])&&h.pop():!e[f]&&f||"."==e[f]||h.push(e[f]);return h.join("/")||("/"===a[0]?"/":"")},dirname:function(a){a=e.normalize(a);return a.replace(/\/([^\/]*)$|^[^\/]+$/,"")||("/"==a[0]?"/":".")},extname:function(a){return(a=e.normalize(a).match(/[^\/](\.[^\/\.]*)$/))?a[1]:""},basename:function(a,
b){var c=e.normalize(a).match(/[^\\\/]*$/),c=c?c[0]:"";b==e.extname(c)&&(c=c.substring(0,c.length-b.length));return c},resolve:function(b,c){for(var d=N(arguments).reverse(),f=[],g=!1,l=0;!g&&l<d.length;l++)"string"==typeof d[l]&&(f.unshift(d[l]),g=a.test(d[l]));g||f.unshift("/"==k?"":k);return e.normalize(f.join("/"))},relative:function(a,b){"string"!=typeof b&&(b=a,a=k);a=e.normalize(a);b=e.normalize(b);if("/"==a[0]&&"/"!=b[0])return a;if("/"==b[0]&&"/"!=a[0])return b;for(var c=a.replace(/^\/$/,
"").split(/\//),d=b.replace(/^\/$/,"").split(/\//),h=[],f=0;d[f]==c[f]&&"string"==typeof c[f];)f++;for(c=c.length-f;0<c;c--)h.push("..");return h.concat(d.slice(f).filter(Boolean)).join("/")}}}(),n={path:{basis:"",app:"",moment:""},autoload:"./0.js"},u=function(){function a(b){return"function"==typeof b&&!!b.basisClassId_}function b(a){for(var c=this;c&&c!==a;)c=c.superClass_;return c===a}function c(k,n){var m=f++;"function"!=typeof k&&(k=l);var p=function(){};p.prototype=k.prototype;for(var p=new p,
m={basisClassId_:m,superClass_:k,extendConstructor_:!!k.extendConstructor_,isSubclassOf:b,subclass:function(){return c.apply(null,[s].concat(N(arguments)))},extend:d,__extend__:function(b){return b&&b!==g&&("object"==typeof b||"function"==typeof b&&!a(b))?l.create.call(null,s,b):b},prototype:p},q=1,r;r=arguments[q];q++)m.extend(r);var s=m.extendConstructor_?function(a){this.basisObjectId=e.id++;var b,c;for(c in a)b=this[c],this[c]=b&&b.__extend__?b.__extend__(a[c]):a[c];this.init();this.postInit()}:
function(){this.basisObjectId=e.id++;this.init.apply(this,arguments);this.postInit()};p.constructor=s;for(var u in p)p[u]===g&&(p[u]=s);M(s,m);return s}function d(b){var c=this.prototype;"function"!=typeof b||a(b)||(b=b(this.superClass_.prototype));b.prototype&&(b=b.prototype);for(var e in b){var f=b[e],g=c[e];"className"==e||"extendConstructor_"==e?this[e]=f:c[e]=g&&g.__extend__?g.__extend__(f):f}k&&b[e="toString"]!==E&&(c[e]=b[e]);return this}var e={id:1},f=1,g={},k=function(){for(var a in{toString:1})return!1;
return!0}(),l=M(c,{className:"basis.Class",extendConstructor_:!1,prototype:{basisObjectId:0,constructor:null,init:function(){},postInit:function(){},destroy:function(){for(var a in this)hasOwnProperty.call(this,a)&&(this[a]=null);this.destroy=y}}}),n=function(a,b,c){return{__extend__:function(a){if(!a||a&&a.__extend__)return a;var c=function(){};c.prototype=this;c=new c;b(c,a);return c}}.__extend__(a||{})},m=function(a){return n(a,M,"extensibleProperty")};return M(l,{SELF:g,create:c,isClass:a,customExtendProperty:n,
extensibleProperty:m,nestedExtendProperty:function(a){return n(a,function(a,b){for(var c in b){var d=a[c];a[c]=d&&d.__extend__?d.__extend__(b[c]):m(b[c])}},"nestedExtendProperty")},oneFunctionProperty:function(a,b){var c=function(b){var d={__extend__:c};if(b){if(b.__extend__)return b;for(var e in b)b[e]&&(d[e]=a)}return d};return c(b||{})}})}(),p=u(null,{className:"basis.Token",value:null,handler:null,deferredToken:null,bindingBridge:{attach:function(a,b,c){a.attach(b,c)},detach:function(a,b,c){a.detach(b,
c)},get:function(a){return a.get()}},init:function(a){this.value=a},get:function(){return this.value},set:function(a){this.value!==a&&(this.value=a,this.apply())},attach:function(a,b){this.handler={fn:a,context:b,handler:this.handler}},detach:function(a,b){for(var c=this,d;d=c,c=c.handler;)if(c.fn===a&&c.context===b){c.fn=y;d.handler=c.handler;break}},apply:function(){for(var a=this.get(),b=this;b=b.handler;)b.fn.call(b.context,a)},deferred:function(){var a=this.deferredToken;a||(a=this.deferredToken=
new T.DeferredToken(this.value),this.attach(a.set,a));return a},destroy:function(){this.deferredToken&&(this.deferredToken.destroy(),this.deferredToken=null);this.value=this.handler=null;this.detach=this.attach=y}}),R=function(){function a(){var d=b;b={};c=null;for(var e in d)d[e].apply()}var b={},c;return function(d){d.basisObjectId in b||(b[d.basisObjectId]=d,c||z(a))}}(),q=p.subclass({className:"basis.DeferredToken",set:function(a){this.value!==a&&(this.value=a,R(this))},deferred:function(){return this}}),
l={},b={},H={};(function(){var a="undefined"!=typeof ua?ua:null;if(a){for(var c in a)b[e.resolve(c)]=a[c];ua=null}})();var w=function(a,c){if(c||!b.hasOwnProperty(a)){var d="";if(f)try{d=require("fs").readFileSync(a,"utf-8")}catch(e){}else{var g=new XMLHttpRequest;g.open("GET",a,!1);g.setRequestHeader("If-Modified-Since",(new Date(0)).toGMTString());g.setRequestHeader("X-Basis-Resource",1);g.send("");200<=g.status&&400>g.status&&(d=g.responseText)}b[a]=d}return b[a]},V=function(a){a=e.resolve(a);
if(!l[a]){var c=V.extensions[e.extname(a)],d=!1,f=!1,g,k=function(){if(d)return g;var b=w(a);c?f||(f=!0,g=c(b,a)):g=b;d=!0;I(k);k.apply();return g};M(k,M(new p,{url:a,fetch:function(){return k()},toString:function(){return"[basis.resource "+a+"]"},isResolved:function(){return d},update:function(e){e=String(e);d&&e==b[a]||(b[a]=e,c?f&&!c.permanent&&(g=c(e,a),I(k),k.apply()):(g=e,d=!0,I(k),k.apply()))},reload:function(){var c=b[a],e=w(a,!0);e!=c&&(d=!1,k.update(e))},get:function(b){return b?w(a):k()},
ready:function(a,b){if(d&&(a.call(b,k()),c&&c.permanent))return;k.attach(a,b);return k}}));l[a]=k}return l[a]};M(V,{isResource:function(a){return a?l[a.url]===a:!1},isResolved:function(a){return(a=V.get(a))?a.isResolved():!1},exists:function(a){return l.hasOwnProperty(e.resolve(a))},get:function(a){a=e.resolve(a);return V.exists(a)?V(a):null},getFiles:function(a){return r(a?b:l).map(e.relative)},extensions:{".js":M(function(b,c){var d=oa[c];if(!d){var f=!0,d=e.dirname(c)+"/"+e.basename(c,e.extname(c)),
g;for(g in n.path){var k=n.path[g]+g+"/";if(c.substr(0,k.length)==k){f=!1;d=d.substr(n.path[g].length);break}}d=d.replace(/\./g,"_").replace(/^\//g,"").replace(/\//g,".");f&&(d="implicit."+d)}$[d]||(g=s(d),g.exports=D({path:g.path,exports:g.exports},c,b).exports,g.exports&&g.exports.constructor===Object&&a(g,g.exports));return $[d].exports},{permanent:!0}),".css":function(a,b){var c=la.resources[b];c?c.updateCssText(a):c=new la(b);return c},".json":function(a,b){if("object"==typeof a)return a;var c;
try{a=String(a),c=T.json.parse(a)}catch(d){}return c||null}}});var D=function(a,b,d){var f=e.dirname(b)+"/",g=d;a.exports||(a.exports={});"function"!=typeof g&&(g=L(b,"exports module basis global __filename __dirname resource require".split(" "),'"use strict";\n'+d));"function"==typeof g&&g.call(a.exports,a.exports,a,T,c,b,f,function(a){return V(f+a)},function(a,b){return Z(a,b||f)});return a},$={},ga={},oa={},pa=U(n.path);(function(a){if(a="undefined"!=typeof va?va:null)for(var b in a){var c=e.resolve(b),
d=a[b];oa[c]=d;ga[d]=c}})();var ka=u(null,{className:"basis.Namespace",init:function(a){this.name=a;this.exports={path:this.name}},toString:function(){return"[basis.namespace "+this.path+"]"},extend:function(b){M(this.exports,b);return a(this,b)}}),Z=function(){if(f){var b=module.constructor.prototype;return function(c,d){if(/[^a-z0-9_\.]/i.test(c)&&".js"!=e.extname(c))return c=e.resolve(d,c),require(c);var f=b._compile,g=s(c);b._compile=function(a,b){this.basis=T;a='var node_require = require;\nvar basis = module.basis;\nvar resource = function(filename){ return basis.resource(__dirname + "/" + filename) };\nvar require = function(filename, baseURI){ return basis.require(filename, baseURI || __dirname) };\n'+
a;f.call(M(this,g),a,b)};var k=require(__dirname+"/"+c.replace(/\./g,"/"));(g.exports=k)&&k.constructor===Object&&a(g,k);b._compile=f;return k}}return function(a,b){a=/[^a-z0-9_\.]/i.test(a)||".js"==e.extname(a)?e.resolve(b,a):G(a);return V(a).fetch()}}();a(Function.prototype,{bind:function(a){var b=this,c=N(arguments,1);return c.length?function(){return b.apply(a,c.concat.apply(c,arguments))}:function(){return b.apply(a,arguments)}}});a(Array,{isArray:function(a){return"[object Array]"===E.call(a)}});
a(Array.prototype,{indexOf:function(a,b){b=parseInt(b,10)||0;if(0>b)return-1;for(;b<this.length;b++)if(this[b]===a)return b;return-1},lastIndexOf:function(a,b){var c=this.length;b=parseInt(b,10);for(b=isNaN(b)||b>=c?c-1:(b+c)%c;0<=b;b--)if(this[b]===a)return b;return-1},forEach:function(a,b){for(var c=0,d=this.length;c<d;c++)c in this&&a.call(b,this[c],c,this)},every:function(a,b){for(var c=0,d=this.length;c<d;c++)if(c in this&&!a.call(b,this[c],c,this))return!1;return!0},some:function(a,b){for(var c=
0,d=this.length;c<d;c++)if(c in this&&a.call(b,this[c],c,this))return!0;return!1},filter:function(a,b){for(var c=[],d=0,e=this.length;d<e;d++)d in this&&a.call(b,this[d],d,this)&&c.push(this[d]);return c},map:function(a,b){for(var c=[],d=0,e=this.length;d<e;d++)d in this&&(c[d]=a.call(b,this[d],d,this));return c},reduce:function(a,b){var c=this.length,d=arguments.length;if(0==c&&1==d)throw 1;var e,f=0;1<d&&(e=b,f=1);for(d=0;d<c;d++)d in this&&(e=f++?a.call(null,e,this[d],d,this):this[d]);return e}});
var ja={flatten:function(a){return a.concat.apply([],a)},repeat:function(a,b){return ja.flatten(A(parseInt(b,10)||0,a))},search:function(a,b,c,d){a.lastSearchIndex=-1;c=Y(c||da);d=parseInt(d,10)||0;for(var e=a.length;d<e;d++)if(c(a[d])===b)return a[a.lastSearchIndex=d]},lastSearch:function(a,b,c,d){a.lastSearchIndex=-1;c=Y(c||da);var e=a.length;d=isNaN(d)||null==d?e:parseInt(d,10);for(e=d>e?e:d;0<e--;)if(c(a[e])===b)return a[a.lastSearchIndex=e]},add:function(a,b){return-1==a.indexOf(b)&&!!a.push(b)},
remove:function(a,b){var c=a.indexOf(b);return-1!=c&&!!a.splice(c,1)},has:function(a,b){return-1!=a.indexOf(b)},sortAsObject:function(a,b,c,d){b=Y(b);d=d?-1:1;return a.map(function(a,c){return{i:c,v:b(a)}}).sort(c||function(a,b){return d*(a.v>b.v||-(a.v<b.v)||(a.i>b.i?1:-1))}).map(function(b){return a[b.i]},a)}};O(Array,ja);if(![1,2].splice(1).length){var ma=Array.prototype.splice;Array.prototype.splice=function(){var a=N(arguments);2>a.length&&(a[1]=this.length);return ma.apply(this,a)}}var g=/([\/\\\(\)\[\]\?\{\}\|\*\+\-\.\^\$])/g,
x=/\{([a-z\d_]+)(?::([\.0])(\d+)|:(\?))?\}/gi;a(String,{toLowerCase:function(a){return String(a).toLowerCase()},toUpperCase:function(a){return String(a).toUpperCase()},trim:function(a){return String(a).trim()},trimLeft:function(a){return String(a).trimLeft()},trimRight:function(a){return String(a).trimRight()}});a(String.prototype,{trimLeft:function(){return this.replace(/^\s+/,"")},trimRight:function(){return this.replace(/\s+$/,"")},trim:function(){return this.trimLeft().trimRight()}});var v={toObject:function(a,
b){try{return(new Function("return 0,"+a))()}catch(c){if(b)throw 2;}},repeat:function(a,b){return Array(parseInt(b,10)+1||0).join(a)},qw:function(a){return(a=a.trim())?a.split(/\s+/):[]},forRegExp:function(a){return a.replace(g,"\\$1")},format:function(a,b){var c=N(arguments,1);"object"==typeof b&&M(c,b);return a.replace(x,function(a,b,e,h,f){a=b in c?c[b]:f?"":a;return e&&!isNaN(a)?(a=Number(a),"."==e?a.toFixed(h):d.lead(a,h)):a})},capitalize:function(a){return a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()},
camelize:function(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})},dasherize:function(a){return a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()})}};O(String,v);if(11!="|||".split(/\|/).length+"|||".split(/(\|)/).length){var P=String.prototype.split;String.prototype.split=function(a,b){if(!a||!1==a instanceof RegExp||""==a.source)return P.apply(this,arguments);var c=[],d=0,e;for(a.global||(a=RegExp(a.source,/\/([mi]*)$/.exec(a)[1]+"g"));e=a.exec(this);)e[0]=this.substring(d,
e.index),c.push.apply(c,e),d=a.lastIndex;c.push(this.substr(d));return c}}if("2"!="12".substr(-1)){var X=String.prototype.substr;String.prototype.substr=function(a,b){return X.call(this,0>a?Math.max(0,this.length+a):a,b)}}var d={fit:function(a,b,c){return!isNaN(b)&&a<b?Number(b):!isNaN(c)&&a>c?Number(c):a},lead:function(a,b,c){return String(a).replace(/\d+/,function(a){return 1<(b-=a.length-1)?Array(b).join(c||0)+a:a})},group:function(a,b,c){return String(a).replace(/\d+/,function(a){return a.replace(/\d/g,
function(d,e){return!e+(a.length-e)%(b||3)?d:(c||" ")+d})})},format:function(a,b,c,d,e,f){a=a.toFixed(b);if(c||f)a=a.replace(/(\d+)(\.?)/,function(a,b,d){return(c?T.number.group(Number(b),3,c):b)+(d?f||d:"")});d&&(a=a.replace(/^-?/,"$&"+(d||"")));return a+(e||"")}};O(Number,d);a(Date,{now:function(){return Number(new Date)}});var m=function(){function a(){if("complete"==B.readyState&&B.body&&!d++)for(;e;)e.callback.call(e.context),e=e.next}function b(){try{B.documentElement.doScroll("left"),a()}catch(c){setTimeout(b,
1)}}var d=!B||"complete"==B.readyState&&!!B.body,e;if(!d)if(B.addEventListener)B.addEventListener("DOMContentLoaded",a,!1),c.addEventListener("load",a,!1);else{B.attachEvent("onreadystatechange",a);c.attachEvent("onload",a);try{!c.frameElement&&B.documentElement.doScroll&&b()}catch(f){}}return function(a,b){d?a.call(b):e={callback:a,context:b,next:e}}}(),k=function(){function a(b){if(B&&!f[b]&&(f[b]=B[b]||B.getElementsByTagName(b)[0],f[b])){var c=g[b];delete g[b];for(var d=0,e;e=c[d];d++)e[0].call(e[1],
f[b])}return f[b]}function b(){var d=this[0],e=this[1],f=this[2];c(e);var k=a(d);k?(!0===f&&(f=k.firstChild),f&&f.parentNode===k||(f=null),k.insertBefore(e,f)):g[d].push([b,[d,e,f]])}function c(a){for(var b in g){var d=ja.search(g[b],a,function(a){return a[1]&&a[1][1]});d&&ja.remove(g[b],d)}a&&a.parentNode&&1==a.parentNode.nodeType&&a.parentNode.removeChild(a)}function d(){e&&a("head")&&a("body")&&(e=clearInterval(e))}var e,f={},g={head:[],body:[]};!B||a("head")&&a("body")||(e=setInterval(d,5),m(d));
return{head:{ready:function(a,b){g.head?g.head.push([a,b]):a.call(b,f.head)},add:function(a,c){b.call(["head",a,c])}},body:{ready:function(a,b){g.body?g.body.push([a,b]):a.call(b,f.body)},add:function(a,c){b.call(["body",a,c])}},remove:c}}(),K=function(){function a(c){d.globalDestroy=!0;d.add=y;for(d.remove=y;c=b.pop();)if("function"==typeof c.destroy)try{c.destroy()}catch(e){}else for(var f in c)c[f]=null;b.length=0}var b=[];if("attachEvent"in c)c.attachEvent("onunload",a);else if("addEventListener"in
c)c.addEventListener("unload",a,!1);else return{add:y,remove:y};var d={add:function(a){null!=a&&b.push(a)},remove:function(a){ja.remove(b,a)}};return d}(),la=function(){function a(b){m.setAttribute("href",b);k.head.add(m,!0)}function b(){m.setAttribute("href",location.href);k.remove(m)}function c(){a(this.baseURI);this.element||(this.element=B.createElement("style"),g||(this.textNode=this.element.appendChild(B.createTextNode(""))));k.head.add(this.element);this.syncCssText();b()}var d={},f=!0,g;try{g=
!B.createElement("style").appendChild(B.createTextNode(""))}catch(l){g=!0}K.add({destroy:function(){f=!1;for(var a in d)d[a].destroy();d=null}});var m=B&&B.createElement("base"),n=u(null,{className:"basis.CssResource",inUse:0,url:"",baseURI:"",cssText:"",resource:null,element:null,textNode:null,init:function(a){this.url=e.resolve(a);this.baseURI=e.dirname(a)+"/";d[a]=this},updateCssText:function(c){this.cssText!=c&&(this.cssText=c,this.inUse&&this.element&&(a(this.baseURI),this.syncCssText(),b()))},
syncCssText:function(){this.textNode?this.textNode.nodeValue=this.cssText:this.element.styleSheet.cssText=this.cssText},startUse:function(){if(!this.inUse){if(!this.resource){var a=V(this.url);this.resource=a;this.cssText=a.get(!0)}k.head.ready(c,this)}this.inUse+=1},stopUse:function(){this.inUse&&(this.inUse-=1,!this.inUse&&this.element&&k.remove(this.element))},destroy:function(){this.element&&f&&k.remove(this.element);this.cssText=this.resource=this.textNode=this.element=null}});n.resources=d;
return n}(),T=s("basis").extend({version:"1.2.0-dev",NODE_ENV:f,config:n,platformFeature:{},resolveNSFilename:G,patch:function(a,b){a=/[^a-z0-9_\.]/i.test(a)||".js"==e.extname(a)?e.resolve(a):G(a);H[a]?H[a].push(b):H[a]=[b];var c=V.get(a);c&&c.isResolved()&&b(c.get(),c.url)},namespace:s,require:Z,resource:V,asset:function(a){return a},setImmediate:z,clearImmediate:ba,nextTick:function(){z.apply(null,arguments)},Class:u,Token:p,DeferredToken:q,getter:Y,ready:m,cleaner:K,console:F,path:e,doc:k,object:{extend:M,
complete:a,keys:r,values:function(a){var b=[],c;for(c in a)b.push(a[c]);return b},slice:U,splice:function(a,b){var c={};if(!b)return M(c,a);for(var d=0,e;e=b[d++];)e in a&&(c[e]=a[e],delete a[e]);return c},merge:J,iterate:aa},fn:{$undefined:function(a){return void 0==a},$defined:function(a){return void 0!=a},$isNull:function(a){return null==a||void 0==a},$isNotNull:function(a){return null!=a&&void 0!=a},$isSame:function(a){return a===this},$isNotSame:function(a){return a!==this},$self:da,$const:function(a){return function(){return a}},
$false:function(){return!1},$true:function(){return!0},$null:function(){return null},$undef:y,getter:Y,nullGetter:W,wrapper:function(a){return function(b){var c={};c[a]=b;return c}},lazyInit:function(a,b){var c=0,d,e;return d=function(){c++||(d.inited=!0,d.data=e=a.apply(b||this,arguments));return e}},lazyInitAndRun:function(a,b,c){var d=0,e,f;return e=function(){d++||(e.inited=!0,e.data=f=a.call(c||this));b.apply(f,arguments);return f}},runOnce:function(a,b){var c=0;return function(){if(!c++)return a.apply(b||
this,arguments)}}},array:M(N,J(ja,{from:N,create:A})),string:J(v,{isEmpty:function(a){return null==a||""==String(a)},isNotEmpty:function(a){return null!=a&&""!=String(a)}}),number:d,bool:{invert:function(a){return!a}},json:{parse:"undefined"!=typeof JSON?JSON.parse:function(a){return v.toObject(a,!0)}}});s("basis.dev").extend(F);n.autoload&&Z(n.autoload)})(this)}).call(this)