stuff
@@ -1,7 +1,7 @@
1
1
2
2
/*
3
3
* Start File:
4
* /e/Development/Repositories/frameworkv3/framework/engine/game.js
4
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/game.js
5
5
*/
6
6
class Game
7
7
{
@@ -115,12 +115,12 @@ class Game
115
115
}
116
116
/*
117
117
* End File:
118
* /e/Development/Repositories/frameworkv3/framework/engine/game.js
118
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/game.js
119
119
*/
120
120
121
121
/*
122
122
* Start File:
123
* /e/Development/Repositories/frameworkv3/framework/engine/gameobject.js
123
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/gameobject.js
124
124
*/
125
125
class GameObject
126
126
{
@@ -164,12 +164,12 @@ class GameObject
164
164
}
165
165
/*
166
166
* End File:
167
* /e/Development/Repositories/frameworkv3/framework/engine/gameobject.js
167
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/gameobject.js
168
168
*/
169
169
170
170
/*
171
171
* Start File:
172
* /e/Development/Repositories/frameworkv3/framework/engine/image.js
172
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/image.js
173
173
*/
174
174
class image{
175
175
subImages = null;
@@ -273,12 +273,12 @@ class image{
273
273
}
274
274
/*
275
275
* End File:
276
* /e/Development/Repositories/frameworkv3/framework/engine/image.js
276
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/image.js
277
277
*/
278
278
279
279
/*
280
280
* Start File:
281
* /e/Development/Repositories/frameworkv3/framework/engine/objectComponents/collider.js
281
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/objectComponents/collider.js
282
282
*/
283
283
class Collider
284
284
{
@@ -292,17 +292,14 @@ class Collider
292
292
293
293
update(deltaTime)
294
294
{
295
if(this.enabled)
296
{
295
if (this.enabled) {
297
296
let pressed = GameInput.mousePressed();
298
297
let held = GameInput.mouseHeld();
299
if (pressed.left || pressed.middle || pressed.right)
300
{
298
if (pressed.left || pressed.middle || pressed.right) {
301
299
this.checkClick(true, pressed);
302
300
}
303
301
304
if (held.left || held.middle || held.right)
305
{
302
if (held.left || held.middle || held.right) {
306
303
this.checkClick(false, held);
307
304
}
308
305
@@ -314,26 +311,21 @@ class Collider
314
311
{
315
312
var hit = false;
316
313
var clickPos = GameInput.mousePosition.subtract(this.gameObject.scene.position).subtract(this.gameObject.scene.cameraPosition);
317
314
318
315
var hw = this.gameObject.transform.size.x / 2;
319
316
var hh = this.gameObject.transform.size.y / 2;
320
321
if(clickPos.x > this.gameObject.transform.position.x - hw && clickPos.x < this.gameObject.transform.position.x + hw)
322
{
323
if(clickPos.y > this.gameObject.transform.position.y - hh && clickPos.y < this.gameObject.transform.position.y + hh)
324
{
317
318
if (clickPos.x > this.gameObject.transform.position.x - hw && clickPos.x < this.gameObject.transform.position.x + hw) {
319
if (clickPos.y > this.gameObject.transform.position.y - hh && clickPos.y < this.gameObject.transform.position.y + hh) {
325
320
hit = true;
326
321
}
327
322
}
328
323
329
if (hit)
330
{
331
if (thisFrame)
332
{
324
if (hit) {
325
if (thisFrame) {
333
326
this.gameObject.onClick && this.gameObject.onClick(btns);
334
327
}
335
else
336
{
328
else {
337
329
this.gameObject.onMouseHeld && this.gameObject.onMouseHeld(btns);
338
330
}
339
331
}
@@ -344,10 +336,8 @@ class Collider
344
336
var hw = this.gameObject.transform.size.x / 2;
345
337
var hh = this.gameObject.transform.size.y / 2;
346
338
347
if(point.x > this.gameObject.transform.position.x - hw && point.x < this.gameObject.transform.position.x + hw)
348
{
349
if(point.y > this.gameObject.transform.position.y - hh && point.y < this.gameObject.transform.position.y + hh)
350
{
339
if (point.x > this.gameObject.transform.position.x - hw && point.x < this.gameObject.transform.position.x + hw) {
340
if (point.y > this.gameObject.transform.position.y - hh && point.y < this.gameObject.transform.position.y + hh) {
351
341
return true;
352
342
}
353
343
}
@@ -357,77 +347,68 @@ class Collider
357
347
358
348
checkCollisions()
359
349
{
360
if(this.enabled && !this.gameObject.destroyed)
361
{
362
for(var i = 0; i < this.gameObject.scene.activeObjects.length; i++)
363
{
364
if(this.gameObject.scene.activeObjects[i] != this && this.gameObject.scene.activeObjects[i].collider.enabled)
365
{
350
if (this.enabled && !this.gameObject.destroyed) {
351
for (var i = 0; i < this.gameObject.scene.activeObjects.length; i++) {
352
if (this.gameObject.scene.activeObjects[i] != this && this.gameObject.scene.activeObjects[i].collider.enabled) {
366
353
var hit = false;
367
354
var o2 = this.gameObject.scene.activeObjects[i];
368
355
369
356
//hw = halfWidth, hh = halfHeight
370
357
var hw = this.gameObject.transform.size.x / 2;
371
358
var hh = this.gameObject.transform.size.y / 2;
372
359
373
360
var ohw = o2.transform.size.x / 2;
374
361
var ohh = o2.transform.size.y / 2;
375
362
376
363
//CHECK FROM OBJ PERSPECTIVE
377
var p =
378
[
379
[this.gameObject.transform.position.x - hw, this.gameObject.transform.position.y - hh],
380
[this.gameObject.transform.position.x + hw, this.gameObject.transform.position.y - hh],
381
[this.gameObject.transform.position.x - hw, this.gameObject.transform.position.y + hh],
382
[this.gameObject.transform.position.x + hw, this.gameObject.transform.position.y + hh]
383
];
384
385
for(var pi = 0; pi < p.length; pi++)
386
{
387
if(p[pi][0] > o2.transform.position.x - ohw && p[pi][0] < o2.transform.position.x + ohw)
388
{
389
if(p[pi][1] > o2.transform.position.y - ohh && p[pi][1] < o2.transform.position.y + ohh)
390
{
364
var p =
365
[
366
[this.gameObject.transform.position.x - hw, this.gameObject.transform.position.y - hh],
367
[this.gameObject.transform.position.x + hw, this.gameObject.transform.position.y - hh],
368
[this.gameObject.transform.position.x - hw, this.gameObject.transform.position.y + hh],
369
[this.gameObject.transform.position.x + hw, this.gameObject.transform.position.y + hh]
370
];
371
372
for (var pi = 0; pi < p.length; pi++) {
373
if (p[pi][0] > o2.transform.position.x - ohw && p[pi][0] < o2.transform.position.x + ohw) {
374
if (p[pi][1] > o2.transform.position.y - ohh && p[pi][1] < o2.transform.position.y + ohh) {
391
375
hit = true;
392
376
}
393
377
}
394
378
}
395
379
396
380
//CHECK FROM OTHER PERSPECTIVE
397
var p =
398
[
399
[o2.transform.position.x - ohw, o2.transform.position.y - ohh],
400
[o2.transform.position.x + ohw, o2.transform.position.y - ohh],
401
[o2.transform.position.x - ohw, o2.transform.position.y + ohh],
402
[o2.transform.position.x + ohw, o2.transform.position.y + ohh]
403
];
404
405
for(var pi = 0; pi < p.length; pi++)
406
{
407
if(p[pi][0] > this.gameObject.transform.position.x - hw && p[pi][0] < this.gameObject.transform.position.x + hw)
408
{
409
if(p[pi][1] > this.gameObject.transform.position.y - hh && p[pi][1] < this.gameObject.transform.position.y + hh)
410
{
381
var p =
382
[
383
[o2.transform.position.x - ohw, o2.transform.position.y - ohh],
384
[o2.transform.position.x + ohw, o2.transform.position.y - ohh],
385
[o2.transform.position.x - ohw, o2.transform.position.y + ohh],
386
[o2.transform.position.x + ohw, o2.transform.position.y + ohh]
387
];
388
389
for (var pi = 0; pi < p.length; pi++) {
390
if (p[pi][0] > this.gameObject.transform.position.x - hw && p[pi][0] < this.gameObject.transform.position.x + hw) {
391
if (p[pi][1] > this.gameObject.transform.position.y - hh && p[pi][1] < this.gameObject.transform.position.y + hh) {
411
392
hit = true;
412
393
}
413
394
}
414
395
}
415
416
if(hit)
396
397
if (hit)
417
398
if (!this.gameObject.destroyed && typeof this.gameObject.onCollision == 'function') { this.gameObject.onCollision(o2); }
418
399
}
419
}
400
}
420
401
}
421
402
}
422
403
}
423
404
/*
424
405
* End File:
425
* /e/Development/Repositories/frameworkv3/framework/engine/objectComponents/collider.js
406
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/objectComponents/collider.js
426
407
*/
427
408
428
409
/*
429
410
* Start File:
430
* /e/Development/Repositories/frameworkv3/framework/engine/objectComponents/renderer.js
411
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/objectComponents/renderer.js
431
412
*/
432
413
class Renderer
433
414
{
@@ -596,12 +577,12 @@ class Renderer
596
577
}
597
578
/*
598
579
* End File:
599
* /e/Development/Repositories/frameworkv3/framework/engine/objectComponents/renderer.js
580
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/objectComponents/renderer.js
600
581
*/
601
582
602
583
/*
603
584
* Start File:
604
* /e/Development/Repositories/frameworkv3/framework/engine/objectComponents/transform.js
585
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/objectComponents/transform.js
605
586
*/
606
587
class Transform
607
588
{
@@ -672,12 +653,12 @@ class Transform
672
653
}
673
654
/*
674
655
* End File:
675
* /e/Development/Repositories/frameworkv3/framework/engine/objectComponents/transform.js
656
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/objectComponents/transform.js
676
657
*/
677
658
678
659
/*
679
660
* Start File:
680
* /e/Development/Repositories/frameworkv3/framework/engine/scene.js
661
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/scene.js
681
662
*/
682
663
class Scene
683
664
{
@@ -847,73 +828,63 @@ class Scene
847
828
}
848
829
/*
849
830
* End File:
850
* /e/Development/Repositories/frameworkv3/framework/engine/scene.js
831
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/scene.js
851
832
*/
852
833
853
834
/*
854
835
* Start File:
855
* /e/Development/Repositories/frameworkv3/framework/extensions/extentions.js
836
* /c/Users/Nick/source/repos/frameworkv3/framework/extensions/extentions.js
856
837
*/
857
838
/**
858
839
* Extending exising functionality
859
840
*/
860
841
861
Array.prototype.remove = function(element)
862
{
842
Array.prototype.remove = function (element) {
863
843
var index = this.indexOf(element);
864
844
865
if (index > -1)
866
{
845
if (index > -1) {
867
846
this.splice(index, 1);
868
847
}
869
else
870
{
848
else {
871
849
console.error("Element not part of array!", this, element);
872
850
}
873
851
}
874
852
875
Array.prototype.removeAt = function(index)
876
{
877
if (index > -1)
878
{
853
Array.prototype.removeAt = function (index) {
854
if (index > -1) {
879
855
this.splice(index, 1);
880
856
}
881
857
}
882
858
883
Array.prototype.contains = function(element)
884
{
859
Array.prototype.contains = function (element) {
885
860
var index = this.indexOf(element);
886
861
887
862
return index > -1;
888
863
}
889
864
890
Math.clamp = function(number, min, max)
891
{
865
Math.clamp = function (number, min, max) {
892
866
return Math.min(max, Math.max(min, number));
893
867
}
894
868
895
Math.randomRange = function(min, max)
896
{
869
Math.randomRange = function (min, max) {
897
870
return min + (Math.random() * (max - min));
898
871
}
899
872
900
Math.lerp = function(a, b, t)
901
{
873
Math.lerp = function (a, b, t) {
902
874
return a + (b - a) * t;
903
875
}
904
876
905
Array.prototype.random = function ()
906
{
907
return this[Math.floor((Math.random()*this.length))];
877
Array.prototype.random = function () {
878
return this[Math.floor((Math.random() * this.length))];
908
879
}
909
880
/*
910
881
* End File:
911
* /e/Development/Repositories/frameworkv3/framework/extensions/extentions.js
882
* /c/Users/Nick/source/repos/frameworkv3/framework/extensions/extentions.js
912
883
*/
913
884
914
885
/*
915
886
* Start File:
916
* /e/Development/Repositories/frameworkv3/framework/extensions/polyfills.js
887
* /c/Users/Nick/source/repos/frameworkv3/framework/extensions/polyfills.js
917
888
*/
918
889
if (!Math.sign) {
919
890
Math.sign = function(x) {
@@ -928,12 +899,12 @@ if (!Math.sign) {
928
899
(function(e){var t=function(){try{return!!Symbol.iterator}catch(e){return false}};var n=t();var r=function(e){var t={next:function(){var t=e.shift();return{done:t===void 0,value:t}}};if(n){t[Symbol.iterator]=function(){return t}}return t};var i=function(e){return encodeURIComponent(e).replace(/%20/g,"+")};var o=function(e){return decodeURIComponent(e).replace(/\+/g," ")};var a=function(){var t=function(e){Object.defineProperty(this,"_entries",{value:{}});if(typeof e==="string"){if(e!==""){e=e.replace(/^\?/,"");var n=e.split("&");var r;for(var i=0;i<n.length;i++){r=n[i].split("=");this.append(o(r[0]),r.length>1?o(r[1]):"")}}}else if(e instanceof t){var a=this;e.forEach(function(e,t){a.append(e,t)})}};var a=t.prototype;a.append=function(e,t){if(e in this._entries){this._entries[e].push(t.toString())}else{this._entries[e]=[t.toString()]}};a.delete=function(e){delete this._entries[e]};a.get=function(e){return e in this._entries?this._entries[e][0]:null};a.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]};a.has=function(e){return e in this._entries};a.set=function(e,t){this._entries[e]=[t.toString()]};a.forEach=function(e,t){var n;for(var r in this._entries){if(this._entries.hasOwnProperty(r)){n=this._entries[r];for(var i=0;i<n.length;i++){e.call(t,n[i],r,this)}}}};a.keys=function(){var e=[];this.forEach(function(t,n){e.push(n)});return r(e)};a.values=function(){var e=[];this.forEach(function(t){e.push(t)});return r(e)};a.entries=function(){var e=[];this.forEach(function(t,n){e.push([n,t])});return r(e)};if(n){a[Symbol.iterator]=a.entries}a.toString=function(){var e=[];this.forEach(function(t,n){e.push(i(n)+"="+i(t))});return e.join("&")};e.URLSearchParams=t};if(!("URLSearchParams"in e)||new URLSearchParams("?a=1").toString()!=="a=1"){a()}})(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:this);(function(e){var t=function(){try{var e=new URL("b","http://a");e.pathname="c%20d";return e.href==="http://a/c%20d"&&e.searchParams}catch(e){return false}};var n=function(){var t=e.URL;var n=function(e,t){if(typeof e!=="string")e=String(e);var n=document.implementation.createHTMLDocument("");window.doc=n;if(t){var r=n.createElement("base");r.href=t;n.head.appendChild(r)}var i=n.createElement("a");i.href=e;n.body.appendChild(i);i.href=i.href;if(i.protocol===":"||!/:/.test(i.href)){throw new TypeError("Invalid URL")}Object.defineProperty(this,"_anchorElement",{value:i})};var r=n.prototype;var i=function(e){Object.defineProperty(r,e,{get:function(){return this._anchorElement[e]},set:function(t){this._anchorElement[e]=t},enumerable:true})};["hash","host","hostname","port","protocol","search"].forEach(function(e){i(e)});Object.defineProperties(r,{toString:{get:function(){var e=this;return function(){return e.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(e){this._anchorElement.href=e},enumerable:true},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(e){this._anchorElement.pathname=e},enumerable:true},origin:{get:function(){var e={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol];var t=this._anchorElement.port!=e&&this._anchorElement.port!=="";return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(t?":"+this._anchorElement.port:"")},enumerable:true},password:{get:function(){return""},set:function(e){},enumerable:true},username:{get:function(){return""},set:function(e){},enumerable:true},searchParams:{get:function(){var e=new URLSearchParams(this.search);var t=this;["append","delete","set"].forEach(function(n){var r=e[n];e[n]=function(){r.apply(e,arguments);t.search=e.toString()}});return e},enumerable:true}});n.createObjectURL=function(e){return t.createObjectURL.apply(t,arguments)};n.revokeObjectURL=function(e){return t.revokeObjectURL.apply(t,arguments)};e.URL=n};if(!t()){n()}if(e.location!==void 0&&!("origin"in e.location)){var r=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:r,enumerable:true})}catch(t){setInterval(function(){e.location.origin=r()},100)}}})(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:this);
929
900
/*
930
901
* End File:
931
* /e/Development/Repositories/frameworkv3/framework/extensions/polyfills.js
902
* /c/Users/Nick/source/repos/frameworkv3/framework/extensions/polyfills.js
932
903
*/
933
904
934
905
/*
935
906
* Start File:
936
* /e/Development/Repositories/frameworkv3/framework/extensions/thirdparty.js
907
* /c/Users/Nick/source/repos/frameworkv3/framework/extensions/thirdparty.js
937
908
*/
938
909
/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
939
910
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)
@@ -985,12 +956,12 @@ this.playing=!1;this.sound.pause();this.clear();try{this.sound.currentTime=this.
985
956
var TWEEN=TWEEN||function(){var n=[];return{getAll:function(){return n},removeAll:function(){n=[]},add:function(t){n.push(t)},remove:function(t){var r=n.indexOf(t);-1!==r&&n.splice(r,1)},update:function(t,r){if(0===n.length)return!1;var i=0;for(t=void 0!==t?t:TWEEN.now();i<n.length;)n[i].update(t)||r?i++:n.splice(i,1);return!0}}}();!function(){void 0===this.window&&void 0!==this.process?TWEEN.now=function(){var n=process.hrtime();return 1e3*n[0]+n[1]/1e3}:void 0!==this.window&&void 0!==window.performance&&void 0!==window.performance.now?TWEEN.now=window.performance.now.bind(window.performance):void 0!==Date.now?TWEEN.now=Date.now:TWEEN.now=function(){return(new Date).getTime()}}(),TWEEN.Tween=function(n){var t=n,r={},i={},o={},u=1e3,e=0,a=!1,f=!1,c=!1,s=0,h=null,l=TWEEN.Easing.Linear.None,E=TWEEN.Interpolation.Linear,p=[],d=null,v=!1,w=null,I=null,M=null,C=null,S=null,ST=null;for(var T in n)r[T]=parseFloat(n[T],10);this.to=function(n,t){return void 0!==t&&(u=t),i=n,this},this.start=function(n){TWEEN.add(this),f=!0,v=!1,h=void 0!==n?n:TWEEN.now(),h+=s;for(var u in i){if(i[u]instanceof Array){if(0===i[u].length)continue;i[u]=[t[u]].concat(i[u])}void 0!==r[u]&&(r[u]=t[u],r[u]instanceof Array==!1&&(r[u]*=1),o[u]=r[u]||0)}return this},this.stop=function(){return f?(TWEEN.remove(this),f=!1,null!==M&&M.call(S),this.stopChainedTweens(),this):this},this.stopChainedTweens=function(){for(var n=0,t=p.length;t>n;n++)p[n].stop()},this.delay=function(n){return s=n,this},this.repeat=function(n){return e=n,this},this.yoyo=function(n){return a=n,this},this.easing=function(n){return l=n,this},this.interpolation=function(n){return E=n,this},this.chain=function(){return p=arguments,this},this.onStart=function(n,c){return d=n,ST=c,this},this.onUpdate=function(n){return w=n,this},this.onComplete=function(n,c){return I=n,C=c,this},this.onStop=function(n,c){return M=n,S=c,this},this.update=function(n){var f,M,T;if(h>n)return!0;v===!1&&(null!==d&&d.call(ST),v=!0),M=(n-h)/u,M=M>1?1:M,T=l(M);for(f in i)if(void 0!==r[f]){var N=r[f]||0,W=i[f];W instanceof Array?t[f]=E(W,T):("string"==typeof W&&(W="+"===W.charAt(0)||"-"===W.charAt(0)?N+parseFloat(W,10):parseFloat(W,10)),"number"==typeof W&&(t[f]=N+(W-N)*T))}if(null!==w&&w.call(t,T),1===M){if(e>0){isFinite(e)&&e--;for(f in o){if("string"==typeof i[f]&&(o[f]=o[f]+parseFloat(i[f],10)),a){var O=o[f];o[f]=i[f],i[f]=O}r[f]=o[f]}return a&&(c=!c),h=n+s,!0}null!==I&&I.call(C);for(var m=0,g=p.length;g>m;m++)p[m].start(h+u);return!1}return!0}},TWEEN.Easing={Linear:{None:function(n){return n}},Quadratic:{In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)}},Cubic:{In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}},Quartic:{In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}},Quintic:{In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}},Sinusoidal:{In:function(n){return 1-Math.cos(n*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return.5*(1-Math.cos(Math.PI*n))}},Exponential:{In:function(n){return 0===n?0:Math.pow(1024,n-1)},Out:function(n){return 1===n?1:1-Math.pow(2,-10*n)},InOut:function(n){return 0===n?0:1===n?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}},Circular:{In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)}},Elastic:{In:function(n){return 0===n?0:1===n?1:-Math.pow(2,10*(n-1))*Math.sin(5*(n-1.1)*Math.PI)},Out:function(n){return 0===n?0:1===n?1:Math.pow(2,-10*n)*Math.sin(5*(n-.1)*Math.PI)+1},InOut:function(n){return 0===n?0:1===n?1:(n*=2,1>n?-.5*Math.pow(2,10*(n-1))*Math.sin(5*(n-1.1)*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin(5*(n-1.1)*Math.PI)+1)}},Back:{In:function(n){var t=1.70158;return n*n*((t+1)*n-t)},Out:function(n){var t=1.70158;return--n*n*((t+1)*n+t)+1},InOut:function(n){var t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)}},Bounce:{In:function(n){return 1-TWEEN.Easing.Bounce.Out(1-n)},Out:function(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return.5>n?.5*TWEEN.Easing.Bounce.In(2*n):.5*TWEEN.Easing.Bounce.Out(2*n-1)+.5}}},TWEEN.Interpolation={Linear:function(n,t){var r=n.length-1,i=r*t,o=Math.floor(i),u=TWEEN.Interpolation.Utils.Linear;return 0>t?u(n[0],n[1],i):t>1?u(n[r],n[r-1],r-i):u(n[o],n[o+1>r?r:o+1],i-o)},Bezier:function(n,t){for(var r=0,i=n.length-1,o=Math.pow,u=TWEEN.Interpolation.Utils.Bernstein,e=0;i>=e;e++)r+=o(1-t,i-e)*o(t,e)*n[e]*u(i,e);return r},CatmullRom:function(n,t){var r=n.length-1,i=r*t,o=Math.floor(i),u=TWEEN.Interpolation.Utils.CatmullRom;return n[0]===n[r]?(0>t&&(o=Math.floor(i=r*(1+t))),u(n[(o-1+r)%r],n[o],n[(o+1)%r],n[(o+2)%r],i-o)):0>t?n[0]-(u(n[0],n[0],n[1],n[1],-i)-n[0]):t>1?n[r]-(u(n[r],n[r],n[r-1],n[r-1],i-r)-n[r]):u(n[o?o-1:0],n[o],n[o+1>r?r:o+1],n[o+2>r?r:o+2],i-o)},Utils:{Linear:function(n,t,r){return(t-n)*r+n},Bernstein:function(n,t){var r=TWEEN.Interpolation.Utils.Factorial;return r(n)/r(t)/r(n-t)},Factorial:function(){var n=[1];return function(t){var r=1;if(n[t])return n[t];for(var i=t;i>1;i--)r*=i;return n[t]=r,r}}(),CatmullRom:function(n,t,r,i,o){var u=.5*(r-n),e=.5*(i-t),a=o*o,f=o*a;return(2*t-2*r+u+e)*f+(-3*t+3*r-2*u-e)*a+u*o+t}}},function(n){"function"==typeof define&&define.amd?define([],function(){return TWEEN}):"undefined"!=typeof module&&"object"==typeof exports?module.exports=TWEEN:void 0!==n&&(n.TWEEN=TWEEN)}(this);
986
957
/*
987
958
* End File:
988
* /e/Development/Repositories/frameworkv3/framework/extensions/thirdparty.js
959
* /c/Users/Nick/source/repos/frameworkv3/framework/extensions/thirdparty.js
989
960
*/
990
961
991
962
/*
992
963
* Start File:
993
* /e/Development/Repositories/frameworkv3/framework/util/audio.js
964
* /c/Users/Nick/source/repos/frameworkv3/framework/util/audio.js
994
965
*/
995
966
var GameAudio =
996
967
{
@@ -1042,12 +1013,12 @@ var GameAudio =
1042
1013
}
1043
1014
/*
1044
1015
* End File:
1045
* /e/Development/Repositories/frameworkv3/framework/util/audio.js
1016
* /c/Users/Nick/source/repos/frameworkv3/framework/util/audio.js
1046
1017
*/
1047
1018
1048
1019
/*
1049
1020
* Start File:
1050
* /e/Development/Repositories/frameworkv3/framework/util/cookie.js
1021
* /c/Users/Nick/source/repos/frameworkv3/framework/util/cookie.js
1051
1022
*/
1052
1023
var CookieManager =
1053
1024
{
@@ -1097,12 +1068,12 @@ var CookieManager =
1097
1068
}
1098
1069
/*
1099
1070
* End File:
1100
* /e/Development/Repositories/frameworkv3/framework/util/cookie.js
1071
* /c/Users/Nick/source/repos/frameworkv3/framework/util/cookie.js
1101
1072
*/
1102
1073
1103
1074
/*
1104
1075
* Start File:
1105
* /e/Development/Repositories/frameworkv3/framework/util/ease.js
1076
* /c/Users/Nick/source/repos/frameworkv3/framework/util/ease.js
1106
1077
*/
1107
1078
//ease functions
1108
1079
@@ -1476,12 +1447,12 @@ var ease = {
1476
1447
};
1477
1448
/*
1478
1449
* End File:
1479
* /e/Development/Repositories/frameworkv3/framework/util/ease.js
1450
* /c/Users/Nick/source/repos/frameworkv3/framework/util/ease.js
1480
1451
*/
1481
1452
1482
1453
/*
1483
1454
* Start File:
1484
* /e/Development/Repositories/frameworkv3/framework/util/input.js
1455
* /c/Users/Nick/source/repos/frameworkv3/framework/util/input.js
1485
1456
*/
1486
1457
1487
1458
@@ -1663,12 +1634,12 @@ var GameInput =
1663
1634
}//
1664
1635
/*
1665
1636
* End File:
1666
* /e/Development/Repositories/frameworkv3/framework/util/input.js
1637
* /c/Users/Nick/source/repos/frameworkv3/framework/util/input.js
1667
1638
*/
1668
1639
1669
1640
/*
1670
1641
* Start File:
1671
* /e/Development/Repositories/frameworkv3/framework/util/particleEmitter.js
1642
* /c/Users/Nick/source/repos/frameworkv3/framework/util/particleEmitter.js
1672
1643
*/
1673
1644
class ParticleEmitter
1674
1645
{
@@ -1696,6 +1667,9 @@ class ParticleEmitter
1696
1667
animationSpeed = 0;
1697
1668
startFrame = 0;
1698
1669
1670
friction = null;
1671
angularFriction = 0;
1672
1699
1673
constructor(position, sprite, emissionRate, emissionAngle,
1700
1674
startRotation, startVelocity, startAngularVelocity, acceleration,
1701
1675
angularAcceleration, startSize, endSize, lifetimeMin,
@@ -1712,10 +1686,10 @@ class ParticleEmitter
1712
1686
this.emissionAngle = emissionAngle;
1713
1687
1714
1688
this.startRotation = startRotation;
1715
this.startVelocity = startVelocity;
1716
this.startAngularVelocity = startAngularVelocity;
1717
this.acceleration = acceleration;
1718
this.angularAcceleration = angularAcceleration;
1689
this.startVelocity = startVelocity * 10;
1690
this.startAngularVelocity = startAngularVelocity * 10;
1691
this.acceleration = acceleration.stretch(10);
1692
this.angularAcceleration = angularAcceleration * 10;
1719
1693
this.startSize = startSize;
1720
1694
this.endSize = endSize;
1721
1695
this.lifetimeMin = lifetimeMin;
@@ -1724,6 +1698,8 @@ class ParticleEmitter
1724
1698
this.fadeOut = fadeOut;
1725
1699
this.startFrame = startFrame;
1726
1700
this.animationSpeed = animationSpeed;
1701
1702
this.friction = new vector(0,0);
1727
1703
}
1728
1704
1729
1705
start()
@@ -1748,7 +1724,8 @@ class ParticleEmitter
1748
1724
velocity.x, velocity.y, this.startAngularVelocity, this.acceleration.x,
1749
1725
this.acceleration.y, this.angularAcceleration, this.sprite, this.startSize.x,
1750
1726
this.startSize.y, this.endSize.x, this.endSize.y, this.lifetimeMin,
1751
this.lifetimeMax, this.fadeIn, this.fadeOut, this.startFrame, this.animationSpeed)
1727
this.lifetimeMax, this.fadeIn, this.fadeOut, this.startFrame, this.animationSpeed,
1728
this.friction, this.angularFriction)
1752
1729
}
1753
1730
}
1754
1731
@@ -1822,6 +1799,8 @@ class Particle
1822
1799
fadeOutTime = 0;
1823
1800
lifeTime = 0;
1824
1801
lifeTimeStart = 0;
1802
friction = null;
1803
angularfriction = 0;
1825
1804
1826
1805
constructor()
1827
1806
{
@@ -1832,7 +1811,7 @@ class Particle
1832
1811
this.endSize = new vector(0,0)
1833
1812
}
1834
1813
1835
emit(parent, x, y, r, vx, vy, va, ax, ay, ar, spr, ssx, ssy, esx, esy, lmin, lmax, fi = 0, fo = 0, sf = 0, as = 0)
1814
emit(parent, x, y, r, vx, vy, va, ax, ay, ar, spr, ssx, ssy, esx, esy, lmin, lmax, fi = 0, fo = 0, sf = 0, as = 0, fric, anfric)
1836
1815
{
1837
1816
this.parent = parent;
1838
1817
this.position.x = x;
@@ -1857,17 +1836,24 @@ class Particle
1857
1836
this.animationSpeed = as;
1858
1837
this.animTimer = as;
1859
1838
this.subImage = sf;
1839
this.friction = fric;
1840
this.angularFriction = anfric;
1860
1841
}
1861
1842
1862
1843
update(deltaTime)
1863
1844
{
1864
this.position.x += this.velocity.x;
1865
this.position.y += this.velocity.y;
1866
this.velocity.x += this.acceleration.x;
1867
this.velocity.y += this.acceleration.y;
1845
this.position.x += this.velocity.x * deltaTime;
1846
this.position.y += this.velocity.y * deltaTime;
1847
this.velocity.x += this.acceleration.x * deltaTime;
1848
this.velocity.y += this.acceleration.y * deltaTime;
1849
1850
this.velocity.x += this.friction.x * deltaTime * -Math.sign(this.velocity.x * 10);
1851
this.velocity.y += this.friction.y * deltaTime * -Math.sign(this.velocity.y * 10);
1868
1852
1869
this.rotation += this.angularVelocity;
1870
this.angularVelocity += this.angularAcceleration;
1853
this.rotation += this.angularVelocity * deltaTime;
1854
this.angularVelocity += this.angularAcceleration * deltaTime;
1855
1856
this.angularVelocity += this.angularFriction * deltaTime * -Math.sign(this.angularVelocity * 10);
1871
1857
1872
1858
this.lifeTime -= deltaTime;
1873
1859
@@ -1911,59 +1897,65 @@ class Particle
1911
1897
}
1912
1898
/*
1913
1899
* End File:
1914
* /e/Development/Repositories/frameworkv3/framework/util/particleEmitter.js
1900
* /c/Users/Nick/source/repos/frameworkv3/framework/util/particleEmitter.js
1915
1901
*/
1916
1902
1917
1903
/*
1918
1904
* Start File:
1919
* /e/Development/Repositories/frameworkv3/framework/util/ray.js
1905
* /c/Users/Nick/source/repos/frameworkv3/framework/util/ray.js
1920
1906
*/
1921
1907
class Ray
1922
1908
{
1923
static Cast(scene, origin, direction, maxLength = -1)
1909
static Cast (scene, origin, direction, maxLength = -1)
1924
1910
{
1925
1911
direction = direction.normalize();
1926
let hits = [] // {hitObj, hitPoint}
1927
for(var i = 0; i < scene.activeObjects.length; i++)
1912
let hits = []; // {hitObj, hitPoint}
1913
for (var i = 0; i < scene.activeObjects.length; i++)
1928
1914
{
1929
1915
let castAngle = direction.toAngle();
1930
1916
1931
if(scene.activeObjects[i] != this && scene.activeObjects[i].collider.enabled)
1917
if (scene.activeObjects[i] != this && scene.activeObjects[i].collider.enabled)
1932
1918
{
1933
1919
var hw = scene.activeObjects[i].transform.size.x / 2;
1934
1920
var hh = scene.activeObjects[i].transform.size.y / 2;
1935
1936
let points =
1937
[
1938
new vector(scene.activeObjects[i].transform.position.x - hw, scene.activeObjects[i].transform.position.y - hh),
1939
new vector(scene.activeObjects[i].transform.position.x + hw, scene.activeObjects[i].transform.position.y - hh),
1940
new vector(scene.activeObjects[i].transform.position.x - hw, scene.activeObjects[i].transform.position.y + hh),
1941
new vector(scene.activeObjects[i].transform.position.x + hw, scene.activeObjects[i].transform.position.y + hh)
1942
]
1943
1944
points.sort((p1,p2) => p1.subtract(origin).length - p2.subtract(origin).length).pop();
1945
1946
for(let p = 0; p < points.length; p++)
1921
1922
let points =
1923
[
1924
new vector(scene.activeObjects[i].transform.position.x - hw, scene.activeObjects[i].transform.position.y - hh),
1925
new vector(scene.activeObjects[i].transform.position.x + hw, scene.activeObjects[i].transform.position.y - hh),
1926
new vector(scene.activeObjects[i].transform.position.x - hw, scene.activeObjects[i].transform.position.y + hh),
1927
new vector(scene.activeObjects[i].transform.position.x + hw, scene.activeObjects[i].transform.position.y + hh)
1928
];
1929
1930
points.sort((p1, p2) => p1.subtract(origin).length - p2.subtract(origin).length).pop();
1931
1932
for (let p = 0; p < points.length; p++)
1947
1933
{
1948
1934
let point = points[p];
1949
1935
let deltaDistance = point.subtract(origin).length;
1950
1936
1951
let stretched = direction.stretch(Math.min(deltaDistance, maxLength > 0? maxLength : deltaDistance))
1937
if (deltaDistance > maxLength && maxLength > 0)
1938
{
1939
continue;
1940
}
1941
1942
let stretched = direction.stretch(Math.min(deltaDistance, maxLength > 0 ? maxLength : deltaDistance));
1952
1943
1953
1944
let calcPoint = origin.add(stretched);
1954
1945
1955
if(scene.activeObjects[i].collider.isInBounds(calcPoint))
1946
if (scene.activeObjects[i].collider.isInBounds(calcPoint))
1956
1947
{
1957
1948
//determine in between which vector angles ray is
1958
var angles = points.map(p => Ray.mapPointToPointAndAngle(p, origin))
1949
var angles = points.map(p => Ray.mapPointToPointAndAngle(p, origin));
1959
1950
1960
1951
pointLoop:
1961
for(let pa = 0; pa < angles.length; pa++)
1952
for (let pa = 0; pa < angles.length; pa++)
1962
1953
{
1963
for(let pb = 0; pb < angles.length; pb++)
1954
for (let pb = 0; pb < angles.length; pb++)
1964
1955
{
1965
if(angles[pa].angle - angles[pb].angle > 270 || angles[pb].angle - angles[pa].angle > 270) {
1966
1956
if (angles[pa].angle - angles[pb].angle > 270 || angles[pb].angle - angles[pa].angle > 270)
1957
{
1958
1967
1959
castAngle = (castAngle + 180) % 360;
1968
1960
angles.forEach(pIn => pIn.angle = (pIn.angle + 180) % 360);
1969
1961
break pointLoop;
@@ -1971,9 +1963,9 @@ class Ray
1971
1963
}
1972
1964
}
1973
1965
1974
angles = angles.sort((a,b) => b.angle - a.angle);
1975
1976
if(angles[1].length > angles[0].length && angles[1].length > angles[2].length)
1966
angles = angles.sort((a, b) => b.angle - a.angle);
1967
1968
if (angles[1].length > angles[0].length && angles[1].length > angles[2].length)
1977
1969
{
1978
1970
//only one face can be hit at this time, which is between angles[0] and angles[2]
1979
1971
angles.removeAt(1); //remove the center, connecting to the un-hittable face
@@ -1983,12 +1975,12 @@ class Ray
1983
1975
//one of two faces can be hit at this time, either angles[0]-angles[1] or angles[1]-angles[2]
1984
1976
(castAngle > angles[1].angle) ? angles.pop() : angles.shift(); //figure out on which side we are, and remove the furthest
1985
1977
}
1986
1978
1987
1979
//calc % of angle in relation to the angles it is between
1988
1980
let smallAngle = Math.min(angles[1].angle, angles[0].angle);
1989
1981
let percent = (castAngle - smallAngle) / (Math.max(angles[1].angle, angles[0].angle) - smallAngle);
1990
1991
hits.push({hitObj: scene.activeObjects[i], hitPoint: angles[1].point.lerpTo(angles[0].point, percent)})
1982
1983
hits.push({ hitObj: scene.activeObjects[i], hitPoint: angles[1].point.lerpTo(angles[0].point, percent) });
1992
1984
break;
1993
1985
}
1994
1986
}
@@ -1997,9 +1989,9 @@ class Ray
1997
1989
1998
1990
let shortest = hits[0];
1999
1991
2000
for(let i = 0; i < hits.length; i++)
1992
for (let i = 0; i < hits.length; i++)
2001
1993
{
2002
if(hits[i].length < shortest.length)
1994
if (hits[i].length < shortest.length)
2003
1995
{
2004
1996
shortest = hits[i];
2005
1997
}
@@ -2008,7 +2000,7 @@ class Ray
2008
2000
return shortest;
2009
2001
}
2010
2002
2011
static mapPointToPointAndAngle(point, origin)
2003
static mapPointToPointAndAngle (point, origin)
2012
2004
{
2013
2005
let delta = point.subtract(origin);
2014
2006
@@ -2021,12 +2013,12 @@ class Ray
2021
2013
}
2022
2014
/*
2023
2015
* End File:
2024
* /e/Development/Repositories/frameworkv3/framework/util/ray.js
2016
* /c/Users/Nick/source/repos/frameworkv3/framework/util/ray.js
2025
2017
*/
2026
2018
2027
2019
/*
2028
2020
* Start File:
2029
* /e/Development/Repositories/frameworkv3/framework/util/signal.js
2021
* /c/Users/Nick/source/repos/frameworkv3/framework/util/signal.js
2030
2022
*/
2031
2023
// Basic event listeners, modeled after Phaser Signals
2032
2024
@@ -2095,12 +2087,12 @@ class signal
2095
2087
}
2096
2088
/*
2097
2089
* End File:
2098
* /e/Development/Repositories/frameworkv3/framework/util/signal.js
2090
* /c/Users/Nick/source/repos/frameworkv3/framework/util/signal.js
2099
2091
*/
2100
2092
2101
2093
/*
2102
2094
* Start File:
2103
* /e/Development/Repositories/frameworkv3/framework/util/timingUtil.js
2095
* /c/Users/Nick/source/repos/frameworkv3/framework/util/timingUtil.js
2104
2096
*/
2105
2097
/**
2106
2098
/* Timing utility
@@ -2153,12 +2145,12 @@ timingUtil =
2153
2145
}
2154
2146
/*
2155
2147
* End File:
2156
* /e/Development/Repositories/frameworkv3/framework/util/timingUtil.js
2148
* /c/Users/Nick/source/repos/frameworkv3/framework/util/timingUtil.js
2157
2149
*/
2158
2150
2159
2151
/*
2160
2152
* Start File:
2161
* /e/Development/Repositories/frameworkv3/framework/util/urlParams.js
2153
* /c/Users/Nick/source/repos/frameworkv3/framework/util/urlParams.js
2162
2154
*/
2163
2155
var UrlParams =
2164
2156
{
@@ -2182,12 +2174,12 @@ var UrlParams =
2182
2174
}
2183
2175
/*
2184
2176
* End File:
2185
* /e/Development/Repositories/frameworkv3/framework/util/urlParams.js
2177
* /c/Users/Nick/source/repos/frameworkv3/framework/util/urlParams.js
2186
2178
*/
2187
2179
2188
2180
/*
2189
2181
* Start File:
2190
* /e/Development/Repositories/frameworkv3/framework/util/vector.js
2182
* /c/Users/Nick/source/repos/frameworkv3/framework/util/vector.js
2191
2183
*/
2192
2184
class vector
2193
2185
{
@@ -2197,10 +2189,10 @@ class vector
2197
2189
constructor(x, y)
2198
2190
{
2199
2191
this.x = x;
2200
2192
2201
2193
this.y = y;
2202
2194
}
2203
2195
2204
2196
get length()
2205
2197
{
2206
2198
return Math.sqrt((this.x * this.x) + (this.y * this.y));
@@ -2210,16 +2202,16 @@ class vector
2210
2202
{
2211
2203
return Math.sqrt((this.x * this.x) + (this.y * this.y));
2212
2204
}
2213
2214
2205
2206
2215
2207
toAngle()
2216
2208
{
2217
2209
let angle = (Math.atan2(this.y, this.x) * 180 / Math.PI) + 90;
2218
if(angle < 0)
2210
if (angle < 0)
2219
2211
angle += 360;
2220
2212
return angle;
2221
2213
}
2222
2214
2223
2215
static fromAngle(angle)
2224
2216
{
2225
2217
angle = 360 - ((angle + 180) % 360);
@@ -2230,86 +2222,85 @@ class vector
2230
2222
normalize()
2231
2223
{
2232
2224
var newVector = this.getCopy();
2233
2234
if(newVector.length != 0)
2235
{
2225
2226
if (newVector.length != 0) {
2236
2227
var length = newVector.length;
2237
2228
newVector.x /= length;
2238
2229
newVector.y /= length;
2239
2230
}
2240
2231
2241
2232
return newVector;
2242
2233
}
2243
2244
2234
2235
2245
2236
lerpTo(otherVector, t)
2246
2237
{
2247
2238
var delta = otherVector.subtract(this);
2248
2239
2249
2240
return this.add(delta.stretch(t));
2250
2241
}
2251
2252
2242
2243
2253
2244
distanceTo(otherVector)
2254
2245
{
2255
2246
var dX = this.x - otherVector.x;
2256
2247
var dY = this.y - otherVector.y;
2257
2248
2258
2249
return new vector(dX, dY).length;
2259
2250
}
2260
2261
2251
2252
2262
2253
add(otherVector)
2263
2254
{
2264
2255
var newVector = this.getCopy();
2265
2256
2266
2257
newVector.x += otherVector.x;
2267
2258
newVector.y += otherVector.y;
2268
2259
2269
2260
return newVector;
2270
2261
}
2271
2272
2262
2263
2273
2264
subtract(otherVector)
2274
2265
{
2275
2266
var newVector = this.getCopy();
2276
2267
2277
2268
newVector.x -= otherVector.x;
2278
2269
newVector.y -= otherVector.y;
2279
2270
2280
2271
return newVector;
2281
2272
}
2282
2283
2273
2274
2284
2275
multiply(otherVector)
2285
2276
{
2286
2277
var newVector = this.getCopy();
2287
2278
2288
2279
newVector.x *= otherVector.x;
2289
2280
newVector.y *= otherVector.y;
2290
2281
2291
2282
return newVector;
2292
2283
}
2293
2294
2284
2285
2295
2286
divide(otherVector)
2296
2287
{
2297
2288
var newVector = this.getCopy();
2298
2289
2299
2290
newVector.x /= otherVector.x;
2300
2291
newVector.y /= otherVector.y;
2301
2292
2302
2293
return newVector;
2303
2294
}
2304
2305
2295
2296
2306
2297
stretch(length)
2307
2298
{
2308
2299
var newVector = this.getCopy();
2309
2300
2310
2301
newVector.x *= length;
2311
2302
newVector.y *= length;
2312
2303
2313
2304
return newVector;
2314
2305
}
2315
2306
@@ -2317,7 +2308,7 @@ class vector
2317
2308
{
2318
2309
var ca = Math.cos(degrees * (Math.PI / 180));
2319
2310
var sa = Math.sin(degrees * (Math.PI / 180));
2320
return new vector(ca*this.x - sa*this.y, sa*this.x + ca*this.y);
2311
return new vector(ca * this.x - sa * this.y, sa * this.x + ca * this.y);
2321
2312
}
2322
2313
2323
2314
deltaAngle(otherVector)
@@ -2332,8 +2323,8 @@ class vector
2332
2323
{
2333
2324
return this.x * otherVector.y - this.y * otherVector.x;
2334
2325
}
2335
2336
2326
2327
2337
2328
getCopy()
2338
2329
{
2339
2330
return new vector(this.x, this.y);
@@ -2341,5 +2332,5 @@ class vector
2341
2332
};
2342
2333
/*
2343
2334
* End File:
2344
* /e/Development/Repositories/frameworkv3/framework/util/vector.js
2335
* /c/Users/Nick/source/repos/frameworkv3/framework/util/vector.js
2345
2336
*/
@@ -1,7 +1,7 @@1
1
2
/*2
/*3
* Start File:3
* Start File:4
* /e/Development/Repositories/frameworkv3/framework/engine/game.js4
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/game.js5
*/ 5
*/ 6
class Game6
class Game7
{7
{@@ -115,12 +115,12 @@ class Game115
}115
}116
/*116
/*117
* End File:117
* End File:118
* /e/Development/Repositories/frameworkv3/framework/engine/game.js118
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/game.js119
*/ 119
*/ 120
120
121
/*121
/*122
* Start File:122
* Start File:123
* /e/Development/Repositories/frameworkv3/framework/engine/gameobject.js123
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/gameobject.js124
*/ 124
*/ 125
class GameObject125
class GameObject126
{126
{@@ -164,12 +164,12 @@ class GameObject164
}164
}165
/*165
/*166
* End File:166
* End File:167
* /e/Development/Repositories/frameworkv3/framework/engine/gameobject.js167
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/gameobject.js168
*/ 168
*/ 169
169
170
/*170
/*171
* Start File:171
* Start File:172
* /e/Development/Repositories/frameworkv3/framework/engine/image.js172
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/image.js173
*/ 173
*/ 174
class image{174
class image{175
subImages = null;175
subImages = null;@@ -273,12 +273,12 @@ class image{273
}273
}274
/*274
/*275
* End File:275
* End File:276
* /e/Development/Repositories/frameworkv3/framework/engine/image.js276
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/image.js277
*/ 277
*/ 278
278
279
/*279
/*280
* Start File:280
* Start File:281
* /e/Development/Repositories/frameworkv3/framework/engine/objectComponents/collider.js281
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/objectComponents/collider.js282
*/ 282
*/ 283
class Collider283
class Collider284
{284
{@@ -292,17 +292,14 @@ class Collider292
292
293
update(deltaTime)293
update(deltaTime)294
{294
{295
if(this.enabled) 295
if (this.enabled) {296
{297
let pressed = GameInput.mousePressed();296
let pressed = GameInput.mousePressed();298
let held = GameInput.mouseHeld();297
let held = GameInput.mouseHeld();299
if (pressed.left || pressed.middle || pressed.right)298
if (pressed.left || pressed.middle || pressed.right) {300
{301
this.checkClick(true, pressed);299
this.checkClick(true, pressed);302
}300
}303
301
304
if (held.left || held.middle || held.right)302
if (held.left || held.middle || held.right) {305
{306
this.checkClick(false, held);303
this.checkClick(false, held);307
}304
}308
305
@@ -314,26 +311,21 @@ class Collider314
{311
{315
var hit = false;312
var hit = false;316
var clickPos = GameInput.mousePosition.subtract(this.gameObject.scene.position).subtract(this.gameObject.scene.cameraPosition);313
var clickPos = GameInput.mousePosition.subtract(this.gameObject.scene.position).subtract(this.gameObject.scene.cameraPosition);317
314
318
var hw = this.gameObject.transform.size.x / 2;315
var hw = this.gameObject.transform.size.x / 2;319
var hh = this.gameObject.transform.size.y / 2;316
var hh = this.gameObject.transform.size.y / 2;320
317
321
if(clickPos.x > this.gameObject.transform.position.x - hw && clickPos.x < this.gameObject.transform.position.x + hw)318
if (clickPos.x > this.gameObject.transform.position.x - hw && clickPos.x < this.gameObject.transform.position.x + hw) {322
{319
if (clickPos.y > this.gameObject.transform.position.y - hh && clickPos.y < this.gameObject.transform.position.y + hh) {323
if(clickPos.y > this.gameObject.transform.position.y - hh && clickPos.y < this.gameObject.transform.position.y + hh)324
{325
hit = true;320
hit = true;326
}321
}327
}322
}328
323
329
if (hit)324
if (hit) {330
{325
if (thisFrame) {331
if (thisFrame)332
{333
this.gameObject.onClick && this.gameObject.onClick(btns);326
this.gameObject.onClick && this.gameObject.onClick(btns);334
}327
}335
else328
else {336
{337
this.gameObject.onMouseHeld && this.gameObject.onMouseHeld(btns);329
this.gameObject.onMouseHeld && this.gameObject.onMouseHeld(btns);338
}330
}339
}331
}@@ -344,10 +336,8 @@ class Collider344
var hw = this.gameObject.transform.size.x / 2;336
var hw = this.gameObject.transform.size.x / 2;345
var hh = this.gameObject.transform.size.y / 2;337
var hh = this.gameObject.transform.size.y / 2;346
338
347
if(point.x > this.gameObject.transform.position.x - hw && point.x < this.gameObject.transform.position.x + hw)339
if (point.x > this.gameObject.transform.position.x - hw && point.x < this.gameObject.transform.position.x + hw) {348
{340
if (point.y > this.gameObject.transform.position.y - hh && point.y < this.gameObject.transform.position.y + hh) {349
if(point.y > this.gameObject.transform.position.y - hh && point.y < this.gameObject.transform.position.y + hh)350
{351
return true;341
return true;352
}342
}353
}343
}@@ -357,77 +347,68 @@ class Collider357
347
358
checkCollisions()348
checkCollisions()359
{349
{360
if(this.enabled && !this.gameObject.destroyed)350
if (this.enabled && !this.gameObject.destroyed) {361
{351
for (var i = 0; i < this.gameObject.scene.activeObjects.length; i++) {362
for(var i = 0; i < this.gameObject.scene.activeObjects.length; i++)352
if (this.gameObject.scene.activeObjects[i] != this && this.gameObject.scene.activeObjects[i].collider.enabled) {363
{364
if(this.gameObject.scene.activeObjects[i] != this && this.gameObject.scene.activeObjects[i].collider.enabled)365
{366
var hit = false;353
var hit = false;367
var o2 = this.gameObject.scene.activeObjects[i];354
var o2 = this.gameObject.scene.activeObjects[i];368
355
369
//hw = halfWidth, hh = halfHeight356
//hw = halfWidth, hh = halfHeight370
var hw = this.gameObject.transform.size.x / 2;357
var hw = this.gameObject.transform.size.x / 2;371
var hh = this.gameObject.transform.size.y / 2;358
var hh = this.gameObject.transform.size.y / 2;372
359
373
var ohw = o2.transform.size.x / 2;360
var ohw = o2.transform.size.x / 2;374
var ohh = o2.transform.size.y / 2;361
var ohh = o2.transform.size.y / 2;375
362
376
//CHECK FROM OBJ PERSPECTIVE363
//CHECK FROM OBJ PERSPECTIVE377
var p = 364
var p =378
[365
[379
[this.gameObject.transform.position.x - hw, this.gameObject.transform.position.y - hh],366
[this.gameObject.transform.position.x - hw, this.gameObject.transform.position.y - hh],380
[this.gameObject.transform.position.x + hw, this.gameObject.transform.position.y - hh],367
[this.gameObject.transform.position.x + hw, this.gameObject.transform.position.y - hh],381
[this.gameObject.transform.position.x - hw, this.gameObject.transform.position.y + hh],368
[this.gameObject.transform.position.x - hw, this.gameObject.transform.position.y + hh],382
[this.gameObject.transform.position.x + hw, this.gameObject.transform.position.y + hh]369
[this.gameObject.transform.position.x + hw, this.gameObject.transform.position.y + hh]383
];370
];384
371
385
for(var pi = 0; pi < p.length; pi++)372
for (var pi = 0; pi < p.length; pi++) {386
{373
if (p[pi][0] > o2.transform.position.x - ohw && p[pi][0] < o2.transform.position.x + ohw) {387
if(p[pi][0] > o2.transform.position.x - ohw && p[pi][0] < o2.transform.position.x + ohw)374
if (p[pi][1] > o2.transform.position.y - ohh && p[pi][1] < o2.transform.position.y + ohh) {388
{389
if(p[pi][1] > o2.transform.position.y - ohh && p[pi][1] < o2.transform.position.y + ohh)390
{391
hit = true;375
hit = true;392
}376
}393
}377
}394
}378
}395
379
396
//CHECK FROM OTHER PERSPECTIVE380
//CHECK FROM OTHER PERSPECTIVE397
var p = 381
var p =398
[382
[399
[o2.transform.position.x - ohw, o2.transform.position.y - ohh],383
[o2.transform.position.x - ohw, o2.transform.position.y - ohh],400
[o2.transform.position.x + ohw, o2.transform.position.y - ohh],384
[o2.transform.position.x + ohw, o2.transform.position.y - ohh],401
[o2.transform.position.x - ohw, o2.transform.position.y + ohh],385
[o2.transform.position.x - ohw, o2.transform.position.y + ohh],402
[o2.transform.position.x + ohw, o2.transform.position.y + ohh]386
[o2.transform.position.x + ohw, o2.transform.position.y + ohh]403
];387
];404
388
405
for(var pi = 0; pi < p.length; pi++)389
for (var pi = 0; pi < p.length; pi++) {406
{390
if (p[pi][0] > this.gameObject.transform.position.x - hw && p[pi][0] < this.gameObject.transform.position.x + hw) {407
if(p[pi][0] > this.gameObject.transform.position.x - hw && p[pi][0] < this.gameObject.transform.position.x + hw)391
if (p[pi][1] > this.gameObject.transform.position.y - hh && p[pi][1] < this.gameObject.transform.position.y + hh) {408
{409
if(p[pi][1] > this.gameObject.transform.position.y - hh && p[pi][1] < this.gameObject.transform.position.y + hh)410
{411
hit = true;392
hit = true;412
}393
}413
}394
}414
}395
}415
396
416
if(hit)397
if (hit)417
if (!this.gameObject.destroyed && typeof this.gameObject.onCollision == 'function') { this.gameObject.onCollision(o2); }398
if (!this.gameObject.destroyed && typeof this.gameObject.onCollision == 'function') { this.gameObject.onCollision(o2); }418
}399
}419
} 400
}420
}401
}421
}402
}422
}403
}423
/*404
/*424
* End File:405
* End File:425
* /e/Development/Repositories/frameworkv3/framework/engine/objectComponents/collider.js406
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/objectComponents/collider.js426
*/ 407
*/ 427
408
428
/*409
/*429
* Start File:410
* Start File:430
* /e/Development/Repositories/frameworkv3/framework/engine/objectComponents/renderer.js411
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/objectComponents/renderer.js431
*/ 412
*/ 432
class Renderer413
class Renderer433
{414
{@@ -596,12 +577,12 @@ class Renderer596
}577
}597
/*578
/*598
* End File:579
* End File:599
* /e/Development/Repositories/frameworkv3/framework/engine/objectComponents/renderer.js580
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/objectComponents/renderer.js600
*/ 581
*/ 601
582
602
/*583
/*603
* Start File:584
* Start File:604
* /e/Development/Repositories/frameworkv3/framework/engine/objectComponents/transform.js585
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/objectComponents/transform.js605
*/ 586
*/ 606
class Transform587
class Transform607
{588
{@@ -672,12 +653,12 @@ class Transform672
}653
}673
/*654
/*674
* End File:655
* End File:675
* /e/Development/Repositories/frameworkv3/framework/engine/objectComponents/transform.js656
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/objectComponents/transform.js676
*/ 657
*/ 677
658
678
/*659
/*679
* Start File:660
* Start File:680
* /e/Development/Repositories/frameworkv3/framework/engine/scene.js661
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/scene.js681
*/ 662
*/ 682
class Scene663
class Scene683
{664
{@@ -847,73 +828,63 @@ class Scene847
}828
}848
/*829
/*849
* End File:830
* End File:850
* /e/Development/Repositories/frameworkv3/framework/engine/scene.js831
* /c/Users/Nick/source/repos/frameworkv3/framework/engine/scene.js851
*/ 832
*/ 852
833
853
/*834
/*854
* Start File:835
* Start File:855
* /e/Development/Repositories/frameworkv3/framework/extensions/extentions.js836
* /c/Users/Nick/source/repos/frameworkv3/framework/extensions/extentions.js856
*/ 837
*/ 857
/**838
/**858
* Extending exising functionality839
* Extending exising functionality859
*/840
*/860
841
861
Array.prototype.remove = function(element)842
Array.prototype.remove = function (element) {862
{863
var index = this.indexOf(element);843
var index = this.indexOf(element);864
844
865
if (index > -1) 845
if (index > -1) {866
{867
this.splice(index, 1);846
this.splice(index, 1);868
}847
}869
else848
else {870
{871
console.error("Element not part of array!", this, element);849
console.error("Element not part of array!", this, element);872
}850
}873
}851
}874
852
875
Array.prototype.removeAt = function(index)853
Array.prototype.removeAt = function (index) {876
{854
if (index > -1) {877
if (index > -1) 878
{879
this.splice(index, 1);855
this.splice(index, 1);880
}856
}881
}857
}882
858
883
Array.prototype.contains = function(element)859
Array.prototype.contains = function (element) {884
{885
var index = this.indexOf(element);860
var index = this.indexOf(element);886
861
887
return index > -1;862
return index > -1;888
}863
}889
864
890
Math.clamp = function(number, min, max)865
Math.clamp = function (number, min, max) {891
{892
return Math.min(max, Math.max(min, number));866
return Math.min(max, Math.max(min, number));893
}867
}894
868
895
Math.randomRange = function(min, max)869
Math.randomRange = function (min, max) {896
{897
return min + (Math.random() * (max - min));870
return min + (Math.random() * (max - min));898
}871
}899
872
900
Math.lerp = function(a, b, t)873
Math.lerp = function (a, b, t) {901
{902
return a + (b - a) * t;874
return a + (b - a) * t;903
}875
}904
876
905
Array.prototype.random = function () 877
Array.prototype.random = function () {906
{878
return this[Math.floor((Math.random() * this.length))];907
return this[Math.floor((Math.random()*this.length))];908
}879
}909
/*880
/*910
* End File:881
* End File:911
* /e/Development/Repositories/frameworkv3/framework/extensions/extentions.js882
* /c/Users/Nick/source/repos/frameworkv3/framework/extensions/extentions.js912
*/ 883
*/ 913
884
914
/*885
/*915
* Start File:886
* Start File:916
* /e/Development/Repositories/frameworkv3/framework/extensions/polyfills.js887
* /c/Users/Nick/source/repos/frameworkv3/framework/extensions/polyfills.js917
*/ 888
*/ 918
if (!Math.sign) {889
if (!Math.sign) {919
Math.sign = function(x) {890
Math.sign = function(x) {@@ -928,12 +899,12 @@ if (!Math.sign) {928
(function(e){var t=function(){try{return!!Symbol.iterator}catch(e){return false}};var n=t();var r=function(e){var t={next:function(){var t=e.shift();return{done:t===void 0,value:t}}};if(n){t[Symbol.iterator]=function(){return t}}return t};var i=function(e){return encodeURIComponent(e).replace(/%20/g,"+")};var o=function(e){return decodeURIComponent(e).replace(/\+/g," ")};var a=function(){var t=function(e){Object.defineProperty(this,"_entries",{value:{}});if(typeof e==="string"){if(e!==""){e=e.replace(/^\?/,"");var n=e.split("&");var r;for(var i=0;i<n.length;i++){r=n[i].split("=");this.append(o(r[0]),r.length>1?o(r[1]):"")}}}else if(e instanceof t){var a=this;e.forEach(function(e,t){a.append(e,t)})}};var a=t.prototype;a.append=function(e,t){if(e in this._entries){this._entries[e].push(t.toString())}else{this._entries[e]=[t.toString()]}};a.delete=function(e){delete this._entries[e]};a.get=function(e){return e in this._entries?this._entries[e][0]:null};a.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]};a.has=function(e){return e in this._entries};a.set=function(e,t){this._entries[e]=[t.toString()]};a.forEach=function(e,t){var n;for(var r in this._entries){if(this._entries.hasOwnProperty(r)){n=this._entries[r];for(var i=0;i<n.length;i++){e.call(t,n[i],r,this)}}}};a.keys=function(){var e=[];this.forEach(function(t,n){e.push(n)});return r(e)};a.values=function(){var e=[];this.forEach(function(t){e.push(t)});return r(e)};a.entries=function(){var e=[];this.forEach(function(t,n){e.push([n,t])});return r(e)};if(n){a[Symbol.iterator]=a.entries}a.toString=function(){var e=[];this.forEach(function(t,n){e.push(i(n)+"="+i(t))});return e.join("&")};e.URLSearchParams=t};if(!("URLSearchParams"in e)||new URLSearchParams("?a=1").toString()!=="a=1"){a()}})(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:this);(function(e){var t=function(){try{var e=new URL("b","http://a");e.pathname="c%20d";return e.href==="http://a/c%20d"&&e.searchParams}catch(e){return false}};var n=function(){var t=e.URL;var n=function(e,t){if(typeof e!=="string")e=String(e);var n=document.implementation.createHTMLDocument("");window.doc=n;if(t){var r=n.createElement("base");r.href=t;n.head.appendChild(r)}var i=n.createElement("a");i.href=e;n.body.appendChild(i);i.href=i.href;if(i.protocol===":"||!/:/.test(i.href)){throw new TypeError("Invalid URL")}Object.defineProperty(this,"_anchorElement",{value:i})};var r=n.prototype;var i=function(e){Object.defineProperty(r,e,{get:function(){return this._anchorElement[e]},set:function(t){this._anchorElement[e]=t},enumerable:true})};["hash","host","hostname","port","protocol","search"].forEach(function(e){i(e)});Object.defineProperties(r,{toString:{get:function(){var e=this;return function(){return e.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(e){this._anchorElement.href=e},enumerable:true},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(e){this._anchorElement.pathname=e},enumerable:true},origin:{get:function(){var e={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol];var t=this._anchorElement.port!=e&&this._anchorElement.port!=="";return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(t?":"+this._anchorElement.port:"")},enumerable:true},password:{get:function(){return""},set:function(e){},enumerable:true},username:{get:function(){return""},set:function(e){},enumerable:true},searchParams:{get:function(){var e=new URLSearchParams(this.search);var t=this;["append","delete","set"].forEach(function(n){var r=e[n];e[n]=function(){r.apply(e,arguments);t.search=e.toString()}});return e},enumerable:true}});n.createObjectURL=function(e){return t.createObjectURL.apply(t,arguments)};n.revokeObjectURL=function(e){return t.revokeObjectURL.apply(t,arguments)};e.URL=n};if(!t()){n()}if(e.location!==void 0&&!("origin"in e.location)){var r=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:r,enumerable:true})}catch(t){setInterval(function(){e.location.origin=r()},100)}}})(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:this);899
(function(e){var t=function(){try{return!!Symbol.iterator}catch(e){return false}};var n=t();var r=function(e){var t={next:function(){var t=e.shift();return{done:t===void 0,value:t}}};if(n){t[Symbol.iterator]=function(){return t}}return t};var i=function(e){return encodeURIComponent(e).replace(/%20/g,"+")};var o=function(e){return decodeURIComponent(e).replace(/\+/g," ")};var a=function(){var t=function(e){Object.defineProperty(this,"_entries",{value:{}});if(typeof e==="string"){if(e!==""){e=e.replace(/^\?/,"");var n=e.split("&");var r;for(var i=0;i<n.length;i++){r=n[i].split("=");this.append(o(r[0]),r.length>1?o(r[1]):"")}}}else if(e instanceof t){var a=this;e.forEach(function(e,t){a.append(e,t)})}};var a=t.prototype;a.append=function(e,t){if(e in this._entries){this._entries[e].push(t.toString())}else{this._entries[e]=[t.toString()]}};a.delete=function(e){delete this._entries[e]};a.get=function(e){return e in this._entries?this._entries[e][0]:null};a.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]};a.has=function(e){return e in this._entries};a.set=function(e,t){this._entries[e]=[t.toString()]};a.forEach=function(e,t){var n;for(var r in this._entries){if(this._entries.hasOwnProperty(r)){n=this._entries[r];for(var i=0;i<n.length;i++){e.call(t,n[i],r,this)}}}};a.keys=function(){var e=[];this.forEach(function(t,n){e.push(n)});return r(e)};a.values=function(){var e=[];this.forEach(function(t){e.push(t)});return r(e)};a.entries=function(){var e=[];this.forEach(function(t,n){e.push([n,t])});return r(e)};if(n){a[Symbol.iterator]=a.entries}a.toString=function(){var e=[];this.forEach(function(t,n){e.push(i(n)+"="+i(t))});return e.join("&")};e.URLSearchParams=t};if(!("URLSearchParams"in e)||new URLSearchParams("?a=1").toString()!=="a=1"){a()}})(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:this);(function(e){var t=function(){try{var e=new URL("b","http://a");e.pathname="c%20d";return e.href==="http://a/c%20d"&&e.searchParams}catch(e){return false}};var n=function(){var t=e.URL;var n=function(e,t){if(typeof e!=="string")e=String(e);var n=document.implementation.createHTMLDocument("");window.doc=n;if(t){var r=n.createElement("base");r.href=t;n.head.appendChild(r)}var i=n.createElement("a");i.href=e;n.body.appendChild(i);i.href=i.href;if(i.protocol===":"||!/:/.test(i.href)){throw new TypeError("Invalid URL")}Object.defineProperty(this,"_anchorElement",{value:i})};var r=n.prototype;var i=function(e){Object.defineProperty(r,e,{get:function(){return this._anchorElement[e]},set:function(t){this._anchorElement[e]=t},enumerable:true})};["hash","host","hostname","port","protocol","search"].forEach(function(e){i(e)});Object.defineProperties(r,{toString:{get:function(){var e=this;return function(){return e.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(e){this._anchorElement.href=e},enumerable:true},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(e){this._anchorElement.pathname=e},enumerable:true},origin:{get:function(){var e={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol];var t=this._anchorElement.port!=e&&this._anchorElement.port!=="";return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(t?":"+this._anchorElement.port:"")},enumerable:true},password:{get:function(){return""},set:function(e){},enumerable:true},username:{get:function(){return""},set:function(e){},enumerable:true},searchParams:{get:function(){var e=new URLSearchParams(this.search);var t=this;["append","delete","set"].forEach(function(n){var r=e[n];e[n]=function(){r.apply(e,arguments);t.search=e.toString()}});return e},enumerable:true}});n.createObjectURL=function(e){return t.createObjectURL.apply(t,arguments)};n.revokeObjectURL=function(e){return t.revokeObjectURL.apply(t,arguments)};e.URL=n};if(!t()){n()}if(e.location!==void 0&&!("origin"in e.location)){var r=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:r,enumerable:true})}catch(t){setInterval(function(){e.location.origin=r()},100)}}})(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:this);929
/*900
/*930
* End File:901
* End File:931
* /e/Development/Repositories/frameworkv3/framework/extensions/polyfills.js902
* /c/Users/Nick/source/repos/frameworkv3/framework/extensions/polyfills.js932
*/ 903
*/ 933
904
934
/*905
/*935
* Start File:906
* Start File:936
* /e/Development/Repositories/frameworkv3/framework/extensions/thirdparty.js907
* /c/Users/Nick/source/repos/frameworkv3/framework/extensions/thirdparty.js937
*/ 908
*/ 938
/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */909
/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */939
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)910
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)@@ -985,12 +956,12 @@ this.playing=!1;this.sound.pause();this.clear();try{this.sound.currentTime=this.985
var TWEEN=TWEEN||function(){var n=[];return{getAll:function(){return n},removeAll:function(){n=[]},add:function(t){n.push(t)},remove:function(t){var r=n.indexOf(t);-1!==r&&n.splice(r,1)},update:function(t,r){if(0===n.length)return!1;var i=0;for(t=void 0!==t?t:TWEEN.now();i<n.length;)n[i].update(t)||r?i++:n.splice(i,1);return!0}}}();!function(){void 0===this.window&&void 0!==this.process?TWEEN.now=function(){var n=process.hrtime();return 1e3*n[0]+n[1]/1e3}:void 0!==this.window&&void 0!==window.performance&&void 0!==window.performance.now?TWEEN.now=window.performance.now.bind(window.performance):void 0!==Date.now?TWEEN.now=Date.now:TWEEN.now=function(){return(new Date).getTime()}}(),TWEEN.Tween=function(n){var t=n,r={},i={},o={},u=1e3,e=0,a=!1,f=!1,c=!1,s=0,h=null,l=TWEEN.Easing.Linear.None,E=TWEEN.Interpolation.Linear,p=[],d=null,v=!1,w=null,I=null,M=null,C=null,S=null,ST=null;for(var T in n)r[T]=parseFloat(n[T],10);this.to=function(n,t){return void 0!==t&&(u=t),i=n,this},this.start=function(n){TWEEN.add(this),f=!0,v=!1,h=void 0!==n?n:TWEEN.now(),h+=s;for(var u in i){if(i[u]instanceof Array){if(0===i[u].length)continue;i[u]=[t[u]].concat(i[u])}void 0!==r[u]&&(r[u]=t[u],r[u]instanceof Array==!1&&(r[u]*=1),o[u]=r[u]||0)}return this},this.stop=function(){return f?(TWEEN.remove(this),f=!1,null!==M&&M.call(S),this.stopChainedTweens(),this):this},this.stopChainedTweens=function(){for(var n=0,t=p.length;t>n;n++)p[n].stop()},this.delay=function(n){return s=n,this},this.repeat=function(n){return e=n,this},this.yoyo=function(n){return a=n,this},this.easing=function(n){return l=n,this},this.interpolation=function(n){return E=n,this},this.chain=function(){return p=arguments,this},this.onStart=function(n,c){return d=n,ST=c,this},this.onUpdate=function(n){return w=n,this},this.onComplete=function(n,c){return I=n,C=c,this},this.onStop=function(n,c){return M=n,S=c,this},this.update=function(n){var f,M,T;if(h>n)return!0;v===!1&&(null!==d&&d.call(ST),v=!0),M=(n-h)/u,M=M>1?1:M,T=l(M);for(f in i)if(void 0!==r[f]){var N=r[f]||0,W=i[f];W instanceof Array?t[f]=E(W,T):("string"==typeof W&&(W="+"===W.charAt(0)||"-"===W.charAt(0)?N+parseFloat(W,10):parseFloat(W,10)),"number"==typeof W&&(t[f]=N+(W-N)*T))}if(null!==w&&w.call(t,T),1===M){if(e>0){isFinite(e)&&e--;for(f in o){if("string"==typeof i[f]&&(o[f]=o[f]+parseFloat(i[f],10)),a){var O=o[f];o[f]=i[f],i[f]=O}r[f]=o[f]}return a&&(c=!c),h=n+s,!0}null!==I&&I.call(C);for(var m=0,g=p.length;g>m;m++)p[m].start(h+u);return!1}return!0}},TWEEN.Easing={Linear:{None:function(n){return n}},Quadratic:{In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)}},Cubic:{In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}},Quartic:{In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}},Quintic:{In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}},Sinusoidal:{In:function(n){return 1-Math.cos(n*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return.5*(1-Math.cos(Math.PI*n))}},Exponential:{In:function(n){return 0===n?0:Math.pow(1024,n-1)},Out:function(n){return 1===n?1:1-Math.pow(2,-10*n)},InOut:function(n){return 0===n?0:1===n?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}},Circular:{In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)}},Elastic:{In:function(n){return 0===n?0:1===n?1:-Math.pow(2,10*(n-1))*Math.sin(5*(n-1.1)*Math.PI)},Out:function(n){return 0===n?0:1===n?1:Math.pow(2,-10*n)*Math.sin(5*(n-.1)*Math.PI)+1},InOut:function(n){return 0===n?0:1===n?1:(n*=2,1>n?-.5*Math.pow(2,10*(n-1))*Math.sin(5*(n-1.1)*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin(5*(n-1.1)*Math.PI)+1)}},Back:{In:function(n){var t=1.70158;return n*n*((t+1)*n-t)},Out:function(n){var t=1.70158;return--n*n*((t+1)*n+t)+1},InOut:function(n){var t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)}},Bounce:{In:function(n){return 1-TWEEN.Easing.Bounce.Out(1-n)},Out:function(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return.5>n?.5*TWEEN.Easing.Bounce.In(2*n):.5*TWEEN.Easing.Bounce.Out(2*n-1)+.5}}},TWEEN.Interpolation={Linear:function(n,t){var r=n.length-1,i=r*t,o=Math.floor(i),u=TWEEN.Interpolation.Utils.Linear;return 0>t?u(n[0],n[1],i):t>1?u(n[r],n[r-1],r-i):u(n[o],n[o+1>r?r:o+1],i-o)},Bezier:function(n,t){for(var r=0,i=n.length-1,o=Math.pow,u=TWEEN.Interpolation.Utils.Bernstein,e=0;i>=e;e++)r+=o(1-t,i-e)*o(t,e)*n[e]*u(i,e);return r},CatmullRom:function(n,t){var r=n.length-1,i=r*t,o=Math.floor(i),u=TWEEN.Interpolation.Utils.CatmullRom;return n[0]===n[r]?(0>t&&(o=Math.floor(i=r*(1+t))),u(n[(o-1+r)%r],n[o],n[(o+1)%r],n[(o+2)%r],i-o)):0>t?n[0]-(u(n[0],n[0],n[1],n[1],-i)-n[0]):t>1?n[r]-(u(n[r],n[r],n[r-1],n[r-1],i-r)-n[r]):u(n[o?o-1:0],n[o],n[o+1>r?r:o+1],n[o+2>r?r:o+2],i-o)},Utils:{Linear:function(n,t,r){return(t-n)*r+n},Bernstein:function(n,t){var r=TWEEN.Interpolation.Utils.Factorial;return r(n)/r(t)/r(n-t)},Factorial:function(){var n=[1];return function(t){var r=1;if(n[t])return n[t];for(var i=t;i>1;i--)r*=i;return n[t]=r,r}}(),CatmullRom:function(n,t,r,i,o){var u=.5*(r-n),e=.5*(i-t),a=o*o,f=o*a;return(2*t-2*r+u+e)*f+(-3*t+3*r-2*u-e)*a+u*o+t}}},function(n){"function"==typeof define&&define.amd?define([],function(){return TWEEN}):"undefined"!=typeof module&&"object"==typeof exports?module.exports=TWEEN:void 0!==n&&(n.TWEEN=TWEEN)}(this);956
var TWEEN=TWEEN||function(){var n=[];return{getAll:function(){return n},removeAll:function(){n=[]},add:function(t){n.push(t)},remove:function(t){var r=n.indexOf(t);-1!==r&&n.splice(r,1)},update:function(t,r){if(0===n.length)return!1;var i=0;for(t=void 0!==t?t:TWEEN.now();i<n.length;)n[i].update(t)||r?i++:n.splice(i,1);return!0}}}();!function(){void 0===this.window&&void 0!==this.process?TWEEN.now=function(){var n=process.hrtime();return 1e3*n[0]+n[1]/1e3}:void 0!==this.window&&void 0!==window.performance&&void 0!==window.performance.now?TWEEN.now=window.performance.now.bind(window.performance):void 0!==Date.now?TWEEN.now=Date.now:TWEEN.now=function(){return(new Date).getTime()}}(),TWEEN.Tween=function(n){var t=n,r={},i={},o={},u=1e3,e=0,a=!1,f=!1,c=!1,s=0,h=null,l=TWEEN.Easing.Linear.None,E=TWEEN.Interpolation.Linear,p=[],d=null,v=!1,w=null,I=null,M=null,C=null,S=null,ST=null;for(var T in n)r[T]=parseFloat(n[T],10);this.to=function(n,t){return void 0!==t&&(u=t),i=n,this},this.start=function(n){TWEEN.add(this),f=!0,v=!1,h=void 0!==n?n:TWEEN.now(),h+=s;for(var u in i){if(i[u]instanceof Array){if(0===i[u].length)continue;i[u]=[t[u]].concat(i[u])}void 0!==r[u]&&(r[u]=t[u],r[u]instanceof Array==!1&&(r[u]*=1),o[u]=r[u]||0)}return this},this.stop=function(){return f?(TWEEN.remove(this),f=!1,null!==M&&M.call(S),this.stopChainedTweens(),this):this},this.stopChainedTweens=function(){for(var n=0,t=p.length;t>n;n++)p[n].stop()},this.delay=function(n){return s=n,this},this.repeat=function(n){return e=n,this},this.yoyo=function(n){return a=n,this},this.easing=function(n){return l=n,this},this.interpolation=function(n){return E=n,this},this.chain=function(){return p=arguments,this},this.onStart=function(n,c){return d=n,ST=c,this},this.onUpdate=function(n){return w=n,this},this.onComplete=function(n,c){return I=n,C=c,this},this.onStop=function(n,c){return M=n,S=c,this},this.update=function(n){var f,M,T;if(h>n)return!0;v===!1&&(null!==d&&d.call(ST),v=!0),M=(n-h)/u,M=M>1?1:M,T=l(M);for(f in i)if(void 0!==r[f]){var N=r[f]||0,W=i[f];W instanceof Array?t[f]=E(W,T):("string"==typeof W&&(W="+"===W.charAt(0)||"-"===W.charAt(0)?N+parseFloat(W,10):parseFloat(W,10)),"number"==typeof W&&(t[f]=N+(W-N)*T))}if(null!==w&&w.call(t,T),1===M){if(e>0){isFinite(e)&&e--;for(f in o){if("string"==typeof i[f]&&(o[f]=o[f]+parseFloat(i[f],10)),a){var O=o[f];o[f]=i[f],i[f]=O}r[f]=o[f]}return a&&(c=!c),h=n+s,!0}null!==I&&I.call(C);for(var m=0,g=p.length;g>m;m++)p[m].start(h+u);return!1}return!0}},TWEEN.Easing={Linear:{None:function(n){return n}},Quadratic:{In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)}},Cubic:{In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}},Quartic:{In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}},Quintic:{In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}},Sinusoidal:{In:function(n){return 1-Math.cos(n*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return.5*(1-Math.cos(Math.PI*n))}},Exponential:{In:function(n){return 0===n?0:Math.pow(1024,n-1)},Out:function(n){return 1===n?1:1-Math.pow(2,-10*n)},InOut:function(n){return 0===n?0:1===n?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}},Circular:{In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)}},Elastic:{In:function(n){return 0===n?0:1===n?1:-Math.pow(2,10*(n-1))*Math.sin(5*(n-1.1)*Math.PI)},Out:function(n){return 0===n?0:1===n?1:Math.pow(2,-10*n)*Math.sin(5*(n-.1)*Math.PI)+1},InOut:function(n){return 0===n?0:1===n?1:(n*=2,1>n?-.5*Math.pow(2,10*(n-1))*Math.sin(5*(n-1.1)*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin(5*(n-1.1)*Math.PI)+1)}},Back:{In:function(n){var t=1.70158;return n*n*((t+1)*n-t)},Out:function(n){var t=1.70158;return--n*n*((t+1)*n+t)+1},InOut:function(n){var t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)}},Bounce:{In:function(n){return 1-TWEEN.Easing.Bounce.Out(1-n)},Out:function(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return.5>n?.5*TWEEN.Easing.Bounce.In(2*n):.5*TWEEN.Easing.Bounce.Out(2*n-1)+.5}}},TWEEN.Interpolation={Linear:function(n,t){var r=n.length-1,i=r*t,o=Math.floor(i),u=TWEEN.Interpolation.Utils.Linear;return 0>t?u(n[0],n[1],i):t>1?u(n[r],n[r-1],r-i):u(n[o],n[o+1>r?r:o+1],i-o)},Bezier:function(n,t){for(var r=0,i=n.length-1,o=Math.pow,u=TWEEN.Interpolation.Utils.Bernstein,e=0;i>=e;e++)r+=o(1-t,i-e)*o(t,e)*n[e]*u(i,e);return r},CatmullRom:function(n,t){var r=n.length-1,i=r*t,o=Math.floor(i),u=TWEEN.Interpolation.Utils.CatmullRom;return n[0]===n[r]?(0>t&&(o=Math.floor(i=r*(1+t))),u(n[(o-1+r)%r],n[o],n[(o+1)%r],n[(o+2)%r],i-o)):0>t?n[0]-(u(n[0],n[0],n[1],n[1],-i)-n[0]):t>1?n[r]-(u(n[r],n[r],n[r-1],n[r-1],i-r)-n[r]):u(n[o?o-1:0],n[o],n[o+1>r?r:o+1],n[o+2>r?r:o+2],i-o)},Utils:{Linear:function(n,t,r){return(t-n)*r+n},Bernstein:function(n,t){var r=TWEEN.Interpolation.Utils.Factorial;return r(n)/r(t)/r(n-t)},Factorial:function(){var n=[1];return function(t){var r=1;if(n[t])return n[t];for(var i=t;i>1;i--)r*=i;return n[t]=r,r}}(),CatmullRom:function(n,t,r,i,o){var u=.5*(r-n),e=.5*(i-t),a=o*o,f=o*a;return(2*t-2*r+u+e)*f+(-3*t+3*r-2*u-e)*a+u*o+t}}},function(n){"function"==typeof define&&define.amd?define([],function(){return TWEEN}):"undefined"!=typeof module&&"object"==typeof exports?module.exports=TWEEN:void 0!==n&&(n.TWEEN=TWEEN)}(this);986
/*957
/*987
* End File:958
* End File:988
* /e/Development/Repositories/frameworkv3/framework/extensions/thirdparty.js959
* /c/Users/Nick/source/repos/frameworkv3/framework/extensions/thirdparty.js989
*/ 960
*/ 990
961
991
/*962
/*992
* Start File:963
* Start File:993
* /e/Development/Repositories/frameworkv3/framework/util/audio.js964
* /c/Users/Nick/source/repos/frameworkv3/framework/util/audio.js994
*/ 965
*/ 995
var GameAudio = 966
var GameAudio = 996
{967
{@@ -1042,12 +1013,12 @@ var GameAudio =1042
}1013
}1043
/*1014
/*1044
* End File:1015
* End File:1045
* /e/Development/Repositories/frameworkv3/framework/util/audio.js1016
* /c/Users/Nick/source/repos/frameworkv3/framework/util/audio.js1046
*/ 1017
*/ 1047
1018
1048
/*1019
/*1049
* Start File:1020
* Start File:1050
* /e/Development/Repositories/frameworkv3/framework/util/cookie.js1021
* /c/Users/Nick/source/repos/frameworkv3/framework/util/cookie.js1051
*/ 1022
*/ 1052
var CookieManager =1023
var CookieManager =1053
{1024
{@@ -1097,12 +1068,12 @@ var CookieManager =1097
}1068
}1098
/*1069
/*1099
* End File:1070
* End File:1100
* /e/Development/Repositories/frameworkv3/framework/util/cookie.js1071
* /c/Users/Nick/source/repos/frameworkv3/framework/util/cookie.js1101
*/ 1072
*/ 1102
1073
1103
/*1074
/*1104
* Start File:1075
* Start File:1105
* /e/Development/Repositories/frameworkv3/framework/util/ease.js1076
* /c/Users/Nick/source/repos/frameworkv3/framework/util/ease.js1106
*/ 1077
*/ 1107
//ease functions1078
//ease functions1108
1079
@@ -1476,12 +1447,12 @@ var ease = {1476
};1447
};1477
/*1448
/*1478
* End File:1449
* End File:1479
* /e/Development/Repositories/frameworkv3/framework/util/ease.js1450
* /c/Users/Nick/source/repos/frameworkv3/framework/util/ease.js1480
*/ 1451
*/ 1481
1452
1482
/*1453
/*1483
* Start File:1454
* Start File:1484
* /e/Development/Repositories/frameworkv3/framework/util/input.js1455
* /c/Users/Nick/source/repos/frameworkv3/framework/util/input.js1485
*/ 1456
*/ 1486
1457
1487
1458
@@ -1663,12 +1634,12 @@ var GameInput =1663
}//1634
}//1664
/*1635
/*1665
* End File:1636
* End File:1666
* /e/Development/Repositories/frameworkv3/framework/util/input.js1637
* /c/Users/Nick/source/repos/frameworkv3/framework/util/input.js1667
*/ 1638
*/ 1668
1639
1669
/*1640
/*1670
* Start File:1641
* Start File:1671
* /e/Development/Repositories/frameworkv3/framework/util/particleEmitter.js1642
* /c/Users/Nick/source/repos/frameworkv3/framework/util/particleEmitter.js1672
*/ 1643
*/ 1673
class ParticleEmitter1644
class ParticleEmitter1674
{1645
{@@ -1696,6 +1667,9 @@ class ParticleEmitter1696
animationSpeed = 0;1667
animationSpeed = 0;1697
startFrame = 0;1668
startFrame = 0;1698
1669
1670
friction = null;1671
angularFriction = 0;1672
1699
constructor(position, sprite, emissionRate, emissionAngle,1673
constructor(position, sprite, emissionRate, emissionAngle,1700
startRotation, startVelocity, startAngularVelocity, acceleration, 1674
startRotation, startVelocity, startAngularVelocity, acceleration, 1701
angularAcceleration, startSize, endSize, lifetimeMin, 1675
angularAcceleration, startSize, endSize, lifetimeMin, @@ -1712,10 +1686,10 @@ class ParticleEmitter1712
this.emissionAngle = emissionAngle;1686
this.emissionAngle = emissionAngle;1713
1687
1714
this.startRotation = startRotation;1688
this.startRotation = startRotation;1715
this.startVelocity = startVelocity;1689
this.startVelocity = startVelocity * 10;1716
this.startAngularVelocity = startAngularVelocity;1690
this.startAngularVelocity = startAngularVelocity * 10;1717
this.acceleration = acceleration;1691
this.acceleration = acceleration.stretch(10);1718
this.angularAcceleration = angularAcceleration;1692
this.angularAcceleration = angularAcceleration * 10;1719
this.startSize = startSize;1693
this.startSize = startSize;1720
this.endSize = endSize;1694
this.endSize = endSize;1721
this.lifetimeMin = lifetimeMin;1695
this.lifetimeMin = lifetimeMin;@@ -1724,6 +1698,8 @@ class ParticleEmitter1724
this.fadeOut = fadeOut;1698
this.fadeOut = fadeOut;1725
this.startFrame = startFrame;1699
this.startFrame = startFrame;1726
this.animationSpeed = animationSpeed;1700
this.animationSpeed = animationSpeed;1701
1702
this.friction = new vector(0,0);1727
}1703
}1728
1704
1729
start()1705
start()@@ -1748,7 +1724,8 @@ class ParticleEmitter1748
velocity.x, velocity.y, this.startAngularVelocity, this.acceleration.x, 1724
velocity.x, velocity.y, this.startAngularVelocity, this.acceleration.x, 1749
this.acceleration.y, this.angularAcceleration, this.sprite, this.startSize.x, 1725
this.acceleration.y, this.angularAcceleration, this.sprite, this.startSize.x, 1750
this.startSize.y, this.endSize.x, this.endSize.y, this.lifetimeMin, 1726
this.startSize.y, this.endSize.x, this.endSize.y, this.lifetimeMin, 1751
this.lifetimeMax, this.fadeIn, this.fadeOut, this.startFrame, this.animationSpeed)1727
this.lifetimeMax, this.fadeIn, this.fadeOut, this.startFrame, this.animationSpeed, 1728
this.friction, this.angularFriction)1752
}1729
}1753
}1730
}1754
1731
@@ -1822,6 +1799,8 @@ class Particle1822
fadeOutTime = 0;1799
fadeOutTime = 0;1823
lifeTime = 0;1800
lifeTime = 0;1824
lifeTimeStart = 0;1801
lifeTimeStart = 0;1802
friction = null;1803
angularfriction = 0;1825
1804
1826
constructor()1805
constructor()1827
{1806
{@@ -1832,7 +1811,7 @@ class Particle1832
this.endSize = new vector(0,0)1811
this.endSize = new vector(0,0)1833
}1812
}1834
1813
1835
emit(parent, x, y, r, vx, vy, va, ax, ay, ar, spr, ssx, ssy, esx, esy, lmin, lmax, fi = 0, fo = 0, sf = 0, as = 0)1814
emit(parent, x, y, r, vx, vy, va, ax, ay, ar, spr, ssx, ssy, esx, esy, lmin, lmax, fi = 0, fo = 0, sf = 0, as = 0, fric, anfric)1836
{1815
{1837
this.parent = parent;1816
this.parent = parent;1838
this.position.x = x;1817
this.position.x = x;@@ -1857,17 +1836,24 @@ class Particle1857
this.animationSpeed = as;1836
this.animationSpeed = as;1858
this.animTimer = as;1837
this.animTimer = as;1859
this.subImage = sf;1838
this.subImage = sf;1839
this.friction = fric;1840
this.angularFriction = anfric;1860
}1841
}1861
1842
1862
update(deltaTime)1843
update(deltaTime)1863
{1844
{1864
this.position.x += this.velocity.x;1845
this.position.x += this.velocity.x * deltaTime;1865
this.position.y += this.velocity.y;1846
this.position.y += this.velocity.y * deltaTime;1866
this.velocity.x += this.acceleration.x;1847
this.velocity.x += this.acceleration.x * deltaTime;1867
this.velocity.y += this.acceleration.y;1848
this.velocity.y += this.acceleration.y * deltaTime;1849
1850
this.velocity.x += this.friction.x * deltaTime * -Math.sign(this.velocity.x * 10);1851
this.velocity.y += this.friction.y * deltaTime * -Math.sign(this.velocity.y * 10);1868
1852
1869
this.rotation += this.angularVelocity;1853
this.rotation += this.angularVelocity * deltaTime;1870
this.angularVelocity += this.angularAcceleration;1854
this.angularVelocity += this.angularAcceleration * deltaTime;1855
1856
this.angularVelocity += this.angularFriction * deltaTime * -Math.sign(this.angularVelocity * 10);1871
1857
1872
this.lifeTime -= deltaTime;1858
this.lifeTime -= deltaTime;1873
1859
@@ -1911,59 +1897,65 @@ class Particle1911
}1897
}1912
/*1898
/*1913
* End File:1899
* End File:1914
* /e/Development/Repositories/frameworkv3/framework/util/particleEmitter.js1900
* /c/Users/Nick/source/repos/frameworkv3/framework/util/particleEmitter.js1915
*/ 1901
*/ 1916
1902
1917
/*1903
/*1918
* Start File:1904
* Start File:1919
* /e/Development/Repositories/frameworkv3/framework/util/ray.js1905
* /c/Users/Nick/source/repos/frameworkv3/framework/util/ray.js1920
*/ 1906
*/ 1921
class Ray1907
class Ray1922
{1908
{1923
static Cast(scene, origin, direction, maxLength = -1)1909
static Cast (scene, origin, direction, maxLength = -1)1924
{1910
{1925
direction = direction.normalize();1911
direction = direction.normalize();1926
let hits = [] // {hitObj, hitPoint}1912
let hits = []; // {hitObj, hitPoint}1927
for(var i = 0; i < scene.activeObjects.length; i++)1913
for (var i = 0; i < scene.activeObjects.length; i++)1928
{1914
{1929
let castAngle = direction.toAngle();1915
let castAngle = direction.toAngle();1930
1916
1931
if(scene.activeObjects[i] != this && scene.activeObjects[i].collider.enabled)1917
if (scene.activeObjects[i] != this && scene.activeObjects[i].collider.enabled)1932
{1918
{1933
var hw = scene.activeObjects[i].transform.size.x / 2;1919
var hw = scene.activeObjects[i].transform.size.x / 2;1934
var hh = scene.activeObjects[i].transform.size.y / 2;1920
var hh = scene.activeObjects[i].transform.size.y / 2;1935
1921
1936
let points = 1922
let points =1937
[1923
[1938
new vector(scene.activeObjects[i].transform.position.x - hw, scene.activeObjects[i].transform.position.y - hh),1924
new vector(scene.activeObjects[i].transform.position.x - hw, scene.activeObjects[i].transform.position.y - hh),1939
new vector(scene.activeObjects[i].transform.position.x + hw, scene.activeObjects[i].transform.position.y - hh),1925
new vector(scene.activeObjects[i].transform.position.x + hw, scene.activeObjects[i].transform.position.y - hh),1940
new vector(scene.activeObjects[i].transform.position.x - hw, scene.activeObjects[i].transform.position.y + hh),1926
new vector(scene.activeObjects[i].transform.position.x - hw, scene.activeObjects[i].transform.position.y + hh),1941
new vector(scene.activeObjects[i].transform.position.x + hw, scene.activeObjects[i].transform.position.y + hh)1927
new vector(scene.activeObjects[i].transform.position.x + hw, scene.activeObjects[i].transform.position.y + hh)1942
]1928
];1943
1929
1944
points.sort((p1,p2) => p1.subtract(origin).length - p2.subtract(origin).length).pop();1930
points.sort((p1, p2) => p1.subtract(origin).length - p2.subtract(origin).length).pop();1945
1931
1946
for(let p = 0; p < points.length; p++)1932
for (let p = 0; p < points.length; p++)1947
{1933
{1948
let point = points[p];1934
let point = points[p];1949
let deltaDistance = point.subtract(origin).length;1935
let deltaDistance = point.subtract(origin).length;1950
1936
1951
let stretched = direction.stretch(Math.min(deltaDistance, maxLength > 0? maxLength : deltaDistance))1937
if (deltaDistance > maxLength && maxLength > 0)1938
{1939
continue;1940
}1941
1942
let stretched = direction.stretch(Math.min(deltaDistance, maxLength > 0 ? maxLength : deltaDistance));1952
1943
1953
let calcPoint = origin.add(stretched);1944
let calcPoint = origin.add(stretched);1954
1945
1955
if(scene.activeObjects[i].collider.isInBounds(calcPoint))1946
if (scene.activeObjects[i].collider.isInBounds(calcPoint))1956
{1947
{1957
//determine in between which vector angles ray is1948
//determine in between which vector angles ray is1958
var angles = points.map(p => Ray.mapPointToPointAndAngle(p, origin))1949
var angles = points.map(p => Ray.mapPointToPointAndAngle(p, origin));1959
1950
1960
pointLoop:1951
pointLoop:1961
for(let pa = 0; pa < angles.length; pa++) 1952
for (let pa = 0; pa < angles.length; pa++) 1962
{1953
{1963
for(let pb = 0; pb < angles.length; pb++)1954
for (let pb = 0; pb < angles.length; pb++)1964
{1955
{1965
if(angles[pa].angle - angles[pb].angle > 270 || angles[pb].angle - angles[pa].angle > 270) {1956
if (angles[pa].angle - angles[pb].angle > 270 || angles[pb].angle - angles[pa].angle > 270)1966
1957
{1958
1967
castAngle = (castAngle + 180) % 360;1959
castAngle = (castAngle + 180) % 360;1968
angles.forEach(pIn => pIn.angle = (pIn.angle + 180) % 360);1960
angles.forEach(pIn => pIn.angle = (pIn.angle + 180) % 360);1969
break pointLoop;1961
break pointLoop;@@ -1971,9 +1963,9 @@ class Ray1971
}1963
}1972
}1964
}1973
1965
1974
angles = angles.sort((a,b) => b.angle - a.angle);1966
angles = angles.sort((a, b) => b.angle - a.angle);1975
1967
1976
if(angles[1].length > angles[0].length && angles[1].length > angles[2].length)1968
if (angles[1].length > angles[0].length && angles[1].length > angles[2].length)1977
{1969
{1978
//only one face can be hit at this time, which is between angles[0] and angles[2]1970
//only one face can be hit at this time, which is between angles[0] and angles[2]1979
angles.removeAt(1); //remove the center, connecting to the un-hittable face1971
angles.removeAt(1); //remove the center, connecting to the un-hittable face@@ -1983,12 +1975,12 @@ class Ray1983
//one of two faces can be hit at this time, either angles[0]-angles[1] or angles[1]-angles[2]1975
//one of two faces can be hit at this time, either angles[0]-angles[1] or angles[1]-angles[2]1984
(castAngle > angles[1].angle) ? angles.pop() : angles.shift(); //figure out on which side we are, and remove the furthest1976
(castAngle > angles[1].angle) ? angles.pop() : angles.shift(); //figure out on which side we are, and remove the furthest1985
}1977
}1986
1978
1987
//calc % of angle in relation to the angles it is between1979
//calc % of angle in relation to the angles it is between1988
let smallAngle = Math.min(angles[1].angle, angles[0].angle);1980
let smallAngle = Math.min(angles[1].angle, angles[0].angle);1989
let percent = (castAngle - smallAngle) / (Math.max(angles[1].angle, angles[0].angle) - smallAngle);1981
let percent = (castAngle - smallAngle) / (Math.max(angles[1].angle, angles[0].angle) - smallAngle);1990
1982
1991
hits.push({hitObj: scene.activeObjects[i], hitPoint: angles[1].point.lerpTo(angles[0].point, percent)})1983
hits.push({ hitObj: scene.activeObjects[i], hitPoint: angles[1].point.lerpTo(angles[0].point, percent) });1992
break;1984
break;1993
}1985
}1994
}1986
}@@ -1997,9 +1989,9 @@ class Ray1997
1989
1998
let shortest = hits[0];1990
let shortest = hits[0];1999
1991
2000
for(let i = 0; i < hits.length; i++)1992
for (let i = 0; i < hits.length; i++)2001
{1993
{2002
if(hits[i].length < shortest.length)1994
if (hits[i].length < shortest.length)2003
{1995
{2004
shortest = hits[i];1996
shortest = hits[i];2005
}1997
}@@ -2008,7 +2000,7 @@ class Ray2008
return shortest;2000
return shortest;2009
}2001
}2010
2002
2011
static mapPointToPointAndAngle(point, origin) 2003
static mapPointToPointAndAngle (point, origin) 2012
{2004
{2013
let delta = point.subtract(origin);2005
let delta = point.subtract(origin);2014
2006
@@ -2021,12 +2013,12 @@ class Ray2021
}2013
}2022
/*2014
/*2023
* End File:2015
* End File:2024
* /e/Development/Repositories/frameworkv3/framework/util/ray.js2016
* /c/Users/Nick/source/repos/frameworkv3/framework/util/ray.js2025
*/ 2017
*/ 2026
2018
2027
/*2019
/*2028
* Start File:2020
* Start File:2029
* /e/Development/Repositories/frameworkv3/framework/util/signal.js2021
* /c/Users/Nick/source/repos/frameworkv3/framework/util/signal.js2030
*/ 2022
*/ 2031
// Basic event listeners, modeled after Phaser Signals2023
// Basic event listeners, modeled after Phaser Signals2032
2024
@@ -2095,12 +2087,12 @@ class signal2095
}2087
}2096
/*2088
/*2097
* End File:2089
* End File:2098
* /e/Development/Repositories/frameworkv3/framework/util/signal.js2090
* /c/Users/Nick/source/repos/frameworkv3/framework/util/signal.js2099
*/ 2091
*/ 2100
2092
2101
/*2093
/*2102
* Start File:2094
* Start File:2103
* /e/Development/Repositories/frameworkv3/framework/util/timingUtil.js2095
* /c/Users/Nick/source/repos/frameworkv3/framework/util/timingUtil.js2104
*/ 2096
*/ 2105
/**2097
/**2106
/* Timing utility2098
/* Timing utility@@ -2153,12 +2145,12 @@ timingUtil =2153
}2145
}2154
/*2146
/*2155
* End File:2147
* End File:2156
* /e/Development/Repositories/frameworkv3/framework/util/timingUtil.js2148
* /c/Users/Nick/source/repos/frameworkv3/framework/util/timingUtil.js2157
*/ 2149
*/ 2158
2150
2159
/*2151
/*2160
* Start File:2152
* Start File:2161
* /e/Development/Repositories/frameworkv3/framework/util/urlParams.js2153
* /c/Users/Nick/source/repos/frameworkv3/framework/util/urlParams.js2162
*/ 2154
*/ 2163
var UrlParams = 2155
var UrlParams = 2164
{2156
{@@ -2182,12 +2174,12 @@ var UrlParams =2182
}2174
}2183
/*2175
/*2184
* End File:2176
* End File:2185
* /e/Development/Repositories/frameworkv3/framework/util/urlParams.js2177
* /c/Users/Nick/source/repos/frameworkv3/framework/util/urlParams.js2186
*/ 2178
*/ 2187
2179
2188
/*2180
/*2189
* Start File:2181
* Start File:2190
* /e/Development/Repositories/frameworkv3/framework/util/vector.js2182
* /c/Users/Nick/source/repos/frameworkv3/framework/util/vector.js2191
*/ 2183
*/ 2192
class vector2184
class vector2193
{2185
{@@ -2197,10 +2189,10 @@ class vector2197
constructor(x, y)2189
constructor(x, y)2198
{2190
{2199
this.x = x;2191
this.x = x;2200
2192
2201
this.y = y;2193
this.y = y;2202
}2194
}2203
2195
2204
get length()2196
get length()2205
{2197
{2206
return Math.sqrt((this.x * this.x) + (this.y * this.y));2198
return Math.sqrt((this.x * this.x) + (this.y * this.y));@@ -2210,16 +2202,16 @@ class vector2210
{2202
{2211
return Math.sqrt((this.x * this.x) + (this.y * this.y));2203
return Math.sqrt((this.x * this.x) + (this.y * this.y));2212
}2204
}2213
2205
2214
2206
2215
toAngle()2207
toAngle()2216
{2208
{2217
let angle = (Math.atan2(this.y, this.x) * 180 / Math.PI) + 90;2209
let angle = (Math.atan2(this.y, this.x) * 180 / Math.PI) + 90;2218
if(angle < 0)2210
if (angle < 0)2219
angle += 360;2211
angle += 360;2220
return angle;2212
return angle;2221
}2213
}2222
2214
2223
static fromAngle(angle)2215
static fromAngle(angle)2224
{2216
{2225
angle = 360 - ((angle + 180) % 360);2217
angle = 360 - ((angle + 180) % 360);@@ -2230,86 +2222,85 @@ class vector2230
normalize()2222
normalize()2231
{2223
{2232
var newVector = this.getCopy();2224
var newVector = this.getCopy();2233
2225
2234
if(newVector.length != 0)2226
if (newVector.length != 0) {2235
{2236
var length = newVector.length;2227
var length = newVector.length;2237
newVector.x /= length;2228
newVector.x /= length;2238
newVector.y /= length;2229
newVector.y /= length;2239
}2230
}2240
2231
2241
return newVector;2232
return newVector;2242
}2233
}2243
2234
2244
2235
2245
lerpTo(otherVector, t)2236
lerpTo(otherVector, t)2246
{2237
{2247
var delta = otherVector.subtract(this);2238
var delta = otherVector.subtract(this);2248
2239
2249
return this.add(delta.stretch(t));2240
return this.add(delta.stretch(t));2250
}2241
}2251
2242
2252
2243
2253
distanceTo(otherVector)2244
distanceTo(otherVector)2254
{2245
{2255
var dX = this.x - otherVector.x;2246
var dX = this.x - otherVector.x;2256
var dY = this.y - otherVector.y;2247
var dY = this.y - otherVector.y;2257
2248
2258
return new vector(dX, dY).length;2249
return new vector(dX, dY).length;2259
}2250
}2260
2251
2261
2252
2262
add(otherVector)2253
add(otherVector)2263
{2254
{2264
var newVector = this.getCopy();2255
var newVector = this.getCopy();2265
2256
2266
newVector.x += otherVector.x;2257
newVector.x += otherVector.x;2267
newVector.y += otherVector.y;2258
newVector.y += otherVector.y;2268
2259
2269
return newVector;2260
return newVector;2270
}2261
}2271
2262
2272
2263
2273
subtract(otherVector)2264
subtract(otherVector)2274
{2265
{2275
var newVector = this.getCopy();2266
var newVector = this.getCopy();2276
2267
2277
newVector.x -= otherVector.x;2268
newVector.x -= otherVector.x;2278
newVector.y -= otherVector.y;2269
newVector.y -= otherVector.y;2279
2270
2280
return newVector;2271
return newVector;2281
}2272
}2282
2273
2283
2274
2284
multiply(otherVector)2275
multiply(otherVector)2285
{2276
{2286
var newVector = this.getCopy();2277
var newVector = this.getCopy();2287
2278
2288
newVector.x *= otherVector.x;2279
newVector.x *= otherVector.x;2289
newVector.y *= otherVector.y;2280
newVector.y *= otherVector.y;2290
2281
2291
return newVector;2282
return newVector;2292
}2283
}2293
2284
2294
2285
2295
divide(otherVector)2286
divide(otherVector)2296
{2287
{2297
var newVector = this.getCopy();2288
var newVector = this.getCopy();2298
2289
2299
newVector.x /= otherVector.x;2290
newVector.x /= otherVector.x;2300
newVector.y /= otherVector.y;2291
newVector.y /= otherVector.y;2301
2292
2302
return newVector;2293
return newVector;2303
}2294
}2304
2295
2305
2296
2306
stretch(length)2297
stretch(length)2307
{2298
{2308
var newVector = this.getCopy();2299
var newVector = this.getCopy();2309
2300
2310
newVector.x *= length;2301
newVector.x *= length;2311
newVector.y *= length;2302
newVector.y *= length;2312
2303
2313
return newVector;2304
return newVector;2314
}2305
}2315
2306
@@ -2317,7 +2308,7 @@ class vector2317
{2308
{2318
var ca = Math.cos(degrees * (Math.PI / 180));2309
var ca = Math.cos(degrees * (Math.PI / 180));2319
var sa = Math.sin(degrees * (Math.PI / 180));2310
var sa = Math.sin(degrees * (Math.PI / 180));2320
return new vector(ca*this.x - sa*this.y, sa*this.x + ca*this.y);2311
return new vector(ca * this.x - sa * this.y, sa * this.x + ca * this.y);2321
}2312
}2322
2313
2323
deltaAngle(otherVector)2314
deltaAngle(otherVector)@@ -2332,8 +2323,8 @@ class vector2332
{2323
{2333
return this.x * otherVector.y - this.y * otherVector.x;2324
return this.x * otherVector.y - this.y * otherVector.x;2334
}2325
}2335
2326
2336
2327
2337
getCopy()2328
getCopy()2338
{2329
{2339
return new vector(this.x, this.y);2330
return new vector(this.x, this.y);@@ -2341,5 +2332,5 @@ class vector2341
};2332
};2342
/*2333
/*2343
* End File:2334
* End File:2344
* /e/Development/Repositories/frameworkv3/framework/util/vector.js2335
* /c/Users/Nick/source/repos/frameworkv3/framework/util/vector.js2345
*/ 2336
*/ @@ -31,7 +31,7 @@ window.onload = function()
31
31
{name:"chao_yellow", url:"images/character/chao/yellow.png", subImgTotal: 67, perRow: 9},
32
32
{name:"tile_floor_brown", url:"images/tile/tile_floor_brown.png"},
33
33
{name:"tile_floor_explosion", url:"images/tile/tile_floor_explosion_anim.png", subImgTotal:10, perRow:5},
34
{name:"fruit", url:"images/object/fruit.png", subImgtotal: 15, perRow: 8}
34
{name:"fruit", url:"images/object/fruit.png", subImgTotal: 15, perRow: 8}
35
35
]
36
36
, function()
37
37
{
@@ -114,12 +114,12 @@ createMainScene = function(game)
114
114
scene.addObject(chao);
115
115
scene.addObject(caster);
116
116
117
//createSubScene(scene);
117
createSubScene(scene);
118
118
}
119
119
120
120
createSubScene = function(scene)
121
121
{
122
var subScene = new Scene(200,200,500,600, Scene.DisplayModes.absolute);
122
var subScene = new FrogScene(200,200,500,600, Scene.DisplayModes.absolute);
123
123
124
124
subScene.gameSpeed = 2;
125
125
@@ -31,7 +31,7 @@ window.onload = function()31
{name:"chao_yellow", url:"images/character/chao/yellow.png", subImgTotal: 67, perRow: 9},31
{name:"chao_yellow", url:"images/character/chao/yellow.png", subImgTotal: 67, perRow: 9},32
{name:"tile_floor_brown", url:"images/tile/tile_floor_brown.png"},32
{name:"tile_floor_brown", url:"images/tile/tile_floor_brown.png"},33
{name:"tile_floor_explosion", url:"images/tile/tile_floor_explosion_anim.png", subImgTotal:10, perRow:5},33
{name:"tile_floor_explosion", url:"images/tile/tile_floor_explosion_anim.png", subImgTotal:10, perRow:5},34
{name:"fruit", url:"images/object/fruit.png", subImgtotal: 15, perRow: 8}34
{name:"fruit", url:"images/object/fruit.png", subImgTotal: 15, perRow: 8}35
]35
]36
, function()36
, function()37
{37
{@@ -114,12 +114,12 @@ createMainScene = function(game)114
scene.addObject(chao);114
scene.addObject(chao);115
scene.addObject(caster);115
scene.addObject(caster);116
116
117
//createSubScene(scene);117
createSubScene(scene);118
}118
}119
119
120
createSubScene = function(scene) 120
createSubScene = function(scene) 121
{121
{122
var subScene = new Scene(200,200,500,600, Scene.DisplayModes.absolute);122
var subScene = new FrogScene(200,200,500,600, Scene.DisplayModes.absolute);123
123
124
subScene.gameSpeed = 2;124
subScene.gameSpeed = 2;125
125
@@ -5,17 +5,9 @@ class FloorTile extends GameObject{
5
5
super(x,y,sprite,layer);
6
6
this.collider.enabled = true;
7
7
}
8
9
update(deltaTime)
8
9
onDestroy()
10
10
{
11
super.update(deltaTime);
12
13
if(GameInput.mousePressed(GameInput.MouseButtons.Left))
14
{
15
if(this.collider.isInBounds(new vector(GameInput.mousePosition.x - this.scene.real_position.x, GameInput.mousePosition.y - this.scene.real_position.y))) {
16
this.scene.addObject(new FloorTileDestroyer(this.transform.position.x, this.transform.position.y, this.scene.game.images.tile_floor_explosion,0, .05, true));
17
this.destroy();
18
}
19
}
11
this.scene.addObject(new FloorTileDestroyer(this.transform.position.x, this.transform.position.y, this.scene.game.images.tile_floor_explosion,0, .05, true));
20
12
}
21
13
}
@@ -5,17 +5,9 @@ class FloorTile extends GameObject{5
super(x,y,sprite,layer);5
super(x,y,sprite,layer);6
this.collider.enabled = true;6
this.collider.enabled = true;7
}7
}8
8
9
update(deltaTime) 9
onDestroy()10
{10
{11
super.update(deltaTime);11
this.scene.addObject(new FloorTileDestroyer(this.transform.position.x, this.transform.position.y, this.scene.game.images.tile_floor_explosion,0, .05, true));12
13
if(GameInput.mousePressed(GameInput.MouseButtons.Left))14
{15
if(this.collider.isInBounds(new vector(GameInput.mousePosition.x - this.scene.real_position.x, GameInput.mousePosition.y - this.scene.real_position.y))) {16
this.scene.addObject(new FloorTileDestroyer(this.transform.position.x, this.transform.position.y, this.scene.game.images.tile_floor_explosion,0, .05, true));17
this.destroy();18
}19
}20
}12
}21
}13
}@@ -23,6 +23,8 @@ class Frog extends GameObject {
23
23
frog_tongue_base = null;
24
24
frog_tongue_tip = null;
25
25
26
floorTileConnections = [];
27
26
28
constructor(x,y,sprite,layer)
27
29
{
28
30
super(x,y,sprite,layer);
@@ -35,9 +37,24 @@ class Frog extends GameObject {
35
37
this.frog_tongue_tip = this.scene.game.images.frog_tongue_tip;
36
38
}
37
39
40
onCollision(obj)
41
{
42
43
}
44
45
isFloor()
46
{
47
let amount = this.renderer.sprite.width / 2;
48
this.currentFacing == this.facing.right ? amount *= 1 : amount *= -1;
49
50
let obj = Ray.Cast(this.scene, new vector(this.transform.position.x + amount, this.scene.real_size.y), new vector(0,-1),50);
51
52
return obj && obj.hitObj instanceof FloorTile;
53
}
54
38
55
update(deltaTime)
39
56
{
40
console.log(1 / deltaTime)
57
(1/deltaTime < 50) ? console.log(1/deltaTime) : null;
41
58
super.update(deltaTime);
42
59
43
60
this.idle = true;
@@ -47,12 +64,15 @@ class Frog extends GameObject {
47
64
if(GameInput.isHeld(GameInput.keys.ArrowLeft) || GameInput.isHeld(GameInput.keys.ArrowRight))
48
65
{
49
66
this.move(deltaTime);
67
50
68
}
51
69
}
52
70
53
71
if(GameInput.isHeld(GameInput.keys[" "]) && !this.retracting)
54
72
{
55
73
this.extendTongueLength(deltaTime);
74
75
this.checkCollision();
56
76
}
57
77
else
58
78
{
@@ -65,6 +85,8 @@ class Frog extends GameObject {
65
85
this.retracting = false;
66
86
this.tongueLength = 0;
67
87
this.tongueLengthBounce = 0;
88
this.tongueVector = null;
89
this.tongueVectorBounce = null;
68
90
}
69
91
}
70
92
@@ -81,9 +103,20 @@ class Frog extends GameObject {
81
103
82
104
}
83
105
106
checkCollision()
107
{
108
let collisionVector = this.tongueVectorBounce ? this.tongueVectorBounce : this.tongueVector;
109
110
if(!collisionVector)
111
{
112
return;
113
}
114
115
let obj = Ray.Cast(this.scene, collisionVector, new vector(this.tongueVectorBounce?this.currentFacing : this.opposite_facing, -1), 5);
116
}
117
84
118
calculateTongueVectors()
85
119
{
86
87
120
let dir = new vector(this.currentFacing, -1);
88
121
this.tongueVector = this.transform.position.add(dir.stretch(this.tongueLength)).add(new vector(this.getXOffset(this.currentFacing), 0));
89
122
@@ -113,6 +146,16 @@ class Frog extends GameObject {
113
146
{
114
147
super.draw(context);
115
148
149
150
let amount = this.renderer.sprite.width / 2;
151
this.currentFacing == this.facing.right ? amount *= 1 : amount *= -1;
152
153
let v = new vector(this.transform.position.x + amount, this.scene.real_size.y);
154
context.lineWidth = 3;
155
context.moveTo(v.x, v.y);
156
context.lineTo(v.x, v.y - 50);
157
context.stroke();
158
116
159
if(!this.tongue_retracted)
117
160
{
118
161
this.drawTongue();
@@ -146,7 +189,7 @@ class Frog extends GameObject {
146
189
147
190
canMove(nextPos)
148
191
{
149
return nextPos + this.transform.size.x / 2 < this.scene.real_size.x && nextPos - this.transform.size.x / 2 > 0
192
return nextPos + this.transform.size.x / 2 < this.scene.real_size.x && nextPos - this.transform.size.x / 2 > 0 && this.isFloor();
150
193
}
151
194
152
195
isVectorWithinSceneX(vector, scene)
@@ -23,6 +23,8 @@ class Frog extends GameObject {23
frog_tongue_base = null;23
frog_tongue_base = null;24
frog_tongue_tip = null;24
frog_tongue_tip = null;25
25
26
floorTileConnections = [];27
26
constructor(x,y,sprite,layer) 28
constructor(x,y,sprite,layer) 27
{29
{28
super(x,y,sprite,layer);30
super(x,y,sprite,layer);@@ -35,9 +37,24 @@ class Frog extends GameObject {35
this.frog_tongue_tip = this.scene.game.images.frog_tongue_tip;37
this.frog_tongue_tip = this.scene.game.images.frog_tongue_tip;36
}38
}37
39
40
onCollision(obj) 41
{42
43
}44
45
isFloor() 46
{47
let amount = this.renderer.sprite.width / 2;48
this.currentFacing == this.facing.right ? amount *= 1 : amount *= -1; 49
50
let obj = Ray.Cast(this.scene, new vector(this.transform.position.x + amount, this.scene.real_size.y), new vector(0,-1),50);51
52
return obj && obj.hitObj instanceof FloorTile;53
}54
38
update(deltaTime)55
update(deltaTime)39
{56
{40
console.log(1 / deltaTime)57
(1/deltaTime < 50) ? console.log(1/deltaTime) : null;41
super.update(deltaTime);58
super.update(deltaTime);42
59
43
this.idle = true;60
this.idle = true;@@ -47,12 +64,15 @@ class Frog extends GameObject {47
if(GameInput.isHeld(GameInput.keys.ArrowLeft) || GameInput.isHeld(GameInput.keys.ArrowRight))64
if(GameInput.isHeld(GameInput.keys.ArrowLeft) || GameInput.isHeld(GameInput.keys.ArrowRight))48
{65
{49
this.move(deltaTime);66
this.move(deltaTime);67
50
}68
}51
}69
}52
70
53
if(GameInput.isHeld(GameInput.keys[" "]) && !this.retracting)71
if(GameInput.isHeld(GameInput.keys[" "]) && !this.retracting)54
{72
{55
this.extendTongueLength(deltaTime);73
this.extendTongueLength(deltaTime);74
75
this.checkCollision();56
} 76
} 57
else77
else58
{78
{@@ -65,6 +85,8 @@ class Frog extends GameObject {65
this.retracting = false;85
this.retracting = false;66
this.tongueLength = 0;86
this.tongueLength = 0;67
this.tongueLengthBounce = 0;87
this.tongueLengthBounce = 0;88
this.tongueVector = null;89
this.tongueVectorBounce = null;68
}90
}69
}91
}70
92
@@ -81,9 +103,20 @@ class Frog extends GameObject {81
103
82
}104
}83
105
106
checkCollision()107
{108
let collisionVector = this.tongueVectorBounce ? this.tongueVectorBounce : this.tongueVector;109
110
if(!collisionVector)111
{112
return;113
}114
115
let obj = Ray.Cast(this.scene, collisionVector, new vector(this.tongueVectorBounce?this.currentFacing : this.opposite_facing, -1), 5);116
}117
84
calculateTongueVectors() 118
calculateTongueVectors() 85
{119
{86
87
let dir = new vector(this.currentFacing, -1);120
let dir = new vector(this.currentFacing, -1);88
this.tongueVector = this.transform.position.add(dir.stretch(this.tongueLength)).add(new vector(this.getXOffset(this.currentFacing), 0));121
this.tongueVector = this.transform.position.add(dir.stretch(this.tongueLength)).add(new vector(this.getXOffset(this.currentFacing), 0));89
122
@@ -113,6 +146,16 @@ class Frog extends GameObject {113
{146
{114
super.draw(context); 147
super.draw(context); 115
148
149
150
let amount = this.renderer.sprite.width / 2;151
this.currentFacing == this.facing.right ? amount *= 1 : amount *= -1; 152
153
let v = new vector(this.transform.position.x + amount, this.scene.real_size.y);154
context.lineWidth = 3;155
context.moveTo(v.x, v.y);156
context.lineTo(v.x, v.y - 50);157
context.stroke();158
116
if(!this.tongue_retracted) 159
if(!this.tongue_retracted) 117
{160
{118
this.drawTongue();161
this.drawTongue();@@ -146,7 +189,7 @@ class Frog extends GameObject {146
189
147
canMove(nextPos) 190
canMove(nextPos) 148
{191
{149
return nextPos + this.transform.size.x / 2 < this.scene.real_size.x && nextPos - this.transform.size.x / 2 > 0192
return nextPos + this.transform.size.x / 2 < this.scene.real_size.x && nextPos - this.transform.size.x / 2 > 0 && this.isFloor();150
}193
}151
194
152
isVectorWithinSceneX(vector, scene) 195
isVectorWithinSceneX(vector, scene) @@ -0,0 +1,88 @@
1
class FrogScene extends Scene
2
{
3
fruitMax = 10;
4
5
fruitSpawnRateMin = 1;
6
fruitSpawnRateMax = 2;
7
fruitSpawnTimer = 0;
8
9
fruitSpawnChance = .2;
10
11
fruits = [];
12
fruitPool = [];
13
14
gameSpeed = 1;
15
16
constructor(x, y, width, height, displayMode = 0)
17
{
18
super(x, y, width, height, displayMode);
19
20
this.fruitSpawnTimer = this.fruitSpawnRateMax;
21
}
22
23
onLoad()
24
{
25
while(this.fruitPool.length < this.fruitMax)
26
{
27
let fruit = new Fruit(0,0, this.game.images.fruit, 0);
28
this.fruitPool.push(fruit);
29
}
30
}
31
32
update(deltaTime)
33
{
34
super.update(deltaTime);
35
36
this.spawnFruits(deltaTime);
37
}
38
39
spawnFruits(deltaTime)
40
{
41
this.fruitSpawnTimer -= deltaTime;
42
if(this.fruitSpawnTimer < this.fruitSpawnRateMin)
43
{
44
if(this.shouldSpawn() || this.fruitSpawnTimer < 0)
45
{
46
let fruit = this.getFromFruitPoolOrCreate();
47
fruit.destroyed = false;
48
fruit.transform.position = this.getRandomVectorPosition(fruit);
49
this.setRandomSubImage(fruit);
50
this.addObject(fruit);
51
this.fruits.push(fruit);
52
53
this.fruitSpawnTimer = this.fruitSpawnRateMax;
54
}
55
}
56
}
57
58
destroyFruit(fruit)
59
{
60
this.fruits.remove(fruit);
61
this.fruitPool.push(fruit);
62
fruit.destroy();
63
}
64
65
getFromFruitPoolOrCreate()
66
{
67
return this.fruitPool.length > 0 ? this.fruitPool.pop() : new Fruit(0,0, this.game.images.fruit, 0);
68
}
69
70
setRandomSubImage(fruit)
71
{
72
fruit.renderer.subImage = Math.floor(Math.randomRange(0,fruit.renderer.sprite.subImages));
73
}
74
75
getRandomVectorPosition(fruit)
76
{
77
return new vector
78
(
79
Math.floor(Math.randomRange(0, this.real_size.x)),
80
0
81
);
82
}
83
84
shouldSpawn()
85
{
86
return this.fruits.length < this.fruitMax && Math.random() < this.fruitSpawnChance;
87
}
88
}
@@ -0,0 +1,88 @@1
class FrogScene extends Scene2
{3
fruitMax = 10;4
5
fruitSpawnRateMin = 1;6
fruitSpawnRateMax = 2;7
fruitSpawnTimer = 0;8
9
fruitSpawnChance = .2;10
11
fruits = [];12
fruitPool = [];13
14
gameSpeed = 1;15
16
constructor(x, y, width, height, displayMode = 0)17
{18
super(x, y, width, height, displayMode);19
20
this.fruitSpawnTimer = this.fruitSpawnRateMax;21
}22
23
onLoad()24
{25
while(this.fruitPool.length < this.fruitMax)26
{27
let fruit = new Fruit(0,0, this.game.images.fruit, 0);28
this.fruitPool.push(fruit);29
}30
}31
32
update(deltaTime)33
{34
super.update(deltaTime);35
36
this.spawnFruits(deltaTime);37
}38
39
spawnFruits(deltaTime)40
{41
this.fruitSpawnTimer -= deltaTime;42
if(this.fruitSpawnTimer < this.fruitSpawnRateMin) 43
{44
if(this.shouldSpawn() || this.fruitSpawnTimer < 0)45
{46
let fruit = this.getFromFruitPoolOrCreate();47
fruit.destroyed = false;48
fruit.transform.position = this.getRandomVectorPosition(fruit);49
this.setRandomSubImage(fruit);50
this.addObject(fruit);51
this.fruits.push(fruit);52
53
this.fruitSpawnTimer = this.fruitSpawnRateMax;54
}55
}56
}57
58
destroyFruit(fruit)59
{60
this.fruits.remove(fruit);61
this.fruitPool.push(fruit);62
fruit.destroy();63
}64
65
getFromFruitPoolOrCreate()66
{67
return this.fruitPool.length > 0 ? this.fruitPool.pop() : new Fruit(0,0, this.game.images.fruit, 0);68
}69
70
setRandomSubImage(fruit)71
{72
fruit.renderer.subImage = Math.floor(Math.randomRange(0,fruit.renderer.sprite.subImages));73
}74
75
getRandomVectorPosition(fruit)76
{77
return new vector78
(79
Math.floor(Math.randomRange(0, this.real_size.x)), 80
081
);82
}83
84
shouldSpawn()85
{86
return this.fruits.length < this.fruitMax && Math.random() < this.fruitSpawnChance;87
}88
}@@ -0,0 +1,35 @@
1
class Fruit extends GameObject
2
{
3
speed = 10;
4
5
constructor(x,y,sprite,layer)
6
{
7
super(x,y,sprite,layer);
8
9
this.transform.scale = new vector(0.7,0.7);
10
this.renderer.subImage = Math.floor(Math.randomRange(0,15));
11
12
this.collider.enabled = true;
13
}
14
15
onCollision(obj)
16
{
17
if(obj instanceof FloorTile)
18
{
19
obj.destroy();
20
this.scene.destroyFruit(this);
21
}
22
}
23
24
update(deltaTime)
25
{
26
super.update(deltaTime);
27
28
this.transform.position.y += this.speed * this.scene.gameSpeed * deltaTime;
29
30
if(this.transform.position.y > this.scene.real_size.y)
31
{
32
this.scene.destroyFruit(this);
33
}
34
}
35
}
@@ -0,0 +1,35 @@1
class Fruit extends GameObject2
{3
speed = 10;4
5
constructor(x,y,sprite,layer)6
{7
super(x,y,sprite,layer);8
9
this.transform.scale = new vector(0.7,0.7);10
this.renderer.subImage = Math.floor(Math.randomRange(0,15));11
12
this.collider.enabled = true;13
}14
15
onCollision(obj)16
{17
if(obj instanceof FloorTile)18
{19
obj.destroy();20
this.scene.destroyFruit(this);21
}22
}23
24
update(deltaTime)25
{26
super.update(deltaTime);27
28
this.transform.position.y += this.speed * this.scene.gameSpeed * deltaTime;29
30
if(this.transform.position.y > this.scene.real_size.y)31
{32
this.scene.destroyFruit(this);33
}34
}35
}@@ -45,9 +45,6 @@ class Chao extends GameObject
45
45
46
46
this.renderer.defaultAnimationSpeed = 0.2;
47
47
this.registerBehaviour(new BehaviourSneeze());
48
49
this.particler = new ParticleEmitter(new vector(100, 100), this.scene.game.images.gem, 0.1, 45, 0, 4, 0, new vector(0, 0.1), 0, new vector(30, 30), new vector(50, 50), 2, 2.5, 0.5, 1, 0)
50
this.particler.start();
51
48
}
52
49
53
50
onClick(btn)
@@ -63,9 +60,6 @@ class Chao extends GameObject
63
60
update(deltaTime)
64
61
{
65
62
super.update(deltaTime);
66
this.particler.emissionAngle = Math.randomRange(10, 60)
67
this.particler.startFrame = Math.floor(Math.randomRange(0, this.scene.game.images.gem.subImages))
68
this.particler.update(deltaTime)
69
63
70
64
if(this.busyWithBehaviour)
71
65
this.currentBehaviour.update(deltaTime);
@@ -84,6 +78,5 @@ class Chao extends GameObject
84
78
draw(context)
85
79
{
86
80
super.draw(context);
87
this.particler.draw(this.scene)
88
81
}
89
82
}
@@ -45,9 +45,6 @@ class Chao extends GameObject45
45
46
this.renderer.defaultAnimationSpeed = 0.2;46
this.renderer.defaultAnimationSpeed = 0.2;47
this.registerBehaviour(new BehaviourSneeze());47
this.registerBehaviour(new BehaviourSneeze());48
49
this.particler = new ParticleEmitter(new vector(100, 100), this.scene.game.images.gem, 0.1, 45, 0, 4, 0, new vector(0, 0.1), 0, new vector(30, 30), new vector(50, 50), 2, 2.5, 0.5, 1, 0)50
this.particler.start();51
}48
}52
49
53
onClick(btn)50
onClick(btn)@@ -63,9 +60,6 @@ class Chao extends GameObject63
update(deltaTime)60
update(deltaTime)64
{61
{65
super.update(deltaTime);62
super.update(deltaTime);66
this.particler.emissionAngle = Math.randomRange(10, 60)67
this.particler.startFrame = Math.floor(Math.randomRange(0, this.scene.game.images.gem.subImages))68
this.particler.update(deltaTime)69
63
70
if(this.busyWithBehaviour)64
if(this.busyWithBehaviour)71
this.currentBehaviour.update(deltaTime);65
this.currentBehaviour.update(deltaTime);@@ -84,6 +78,5 @@ class Chao extends GameObject84
draw(context)78
draw(context)85
{79
{86
super.draw(context);80
super.draw(context);87
this.particler.draw(this.scene)88
}81
}89
}82
}