diff --git a/CHANGELOG.md b/CHANGELOG.md index 71bf8e4..be061d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +v1.4.0 - June 11, 2015 + +* 1.4.0 (Jeff Tan) +* Add missing commonJS and AMD wrappers (Jeff Tan) + v1.3.0 - June 9, 2015 * 1.3.0 (Jeff Tan) diff --git a/dist/t3-jquery-1.3.0.min.js b/dist/t3-jquery-1.3.0.min.js deleted file mode 100644 index 3ea6761..0000000 --- a/dist/t3-jquery-1.3.0.min.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! t3-jquery v 1.3.0*/ -/*! -Copyright 2015 Box, Inc. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -var Box={};Box.EventTarget=function(){"use strict";function n(){this._handlers={}}return n.prototype={constructor:n,on:function(n,t){var e,r,o=this._handlers[n];for("undefined"==typeof o&&(o=this._handlers[n]=[]),e=0,r=o.length;r>e;e++)if(o[e]===t)return;o.push(t)},fire:function(n,t){var e,r,o,i={type:n,data:t};if(e=this._handlers[i.type],e instanceof Array)for(e=e.concat(),r=0,o=e.length;o>r;r++)e[r].call(this,i)},off:function(n,t){var e,r,o=this._handlers[n];if(o instanceof Array)for(e=0,r=o.length;r>e;e++)if(o[e]===t){o.splice(e,1);break}}},n}(),Box.JQueryDOM=function(){"use strict";return{type:"jquery",query:function(n,t){return $(n).find(t)[0]||null},queryAll:function(n,t){return $.makeArray($(n).find(t))},on:function(n,t,e){$(n).on(t,e)},off:function(n,t,e){$(n).off(t,e)}}}(),Box.DOM=Box.JQueryDOM,Box.Context=function(){"use strict";function n(n,t){this.application=n,this.element=t}return n.prototype={broadcast:function(n,t){this.application.broadcast(n,t)},getService:function(n){return this.application.getService(n)},getConfig:function(n){return this.application.getModuleConfig(this.element,n)},getGlobal:function(n){return this.application.getGlobal(n)},getGlobalConfig:function(n){return this.application.getGlobalConfig(n)},reportError:function(n){this.application.reportError(n)},getElement:function(){return this.element}},n}(),Box.Application=function(){"use strict";function n(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function t(n,t){return function(){return n.apply(t,arguments)}}function e(n,t){for(var e=0,r=n.length;r>e;e++)if(n[e]===t)return e;return-1}function r(){x={},b={},B={},w=[],E={},A={},M=!1;for(var n=0;nt;t++)if(w[t]===n)return!0;return!1}function i(n){if(x.debug)throw n;O.fire("error",{exception:n})}function a(n,t){var e,r;for(e in n)r=n[e],"function"==typeof r&&(n[e]=function(n,e){return function(){var r=t+"."+n+"() - ";try{return e.apply(this,arguments)}catch(o){o.name=r+o.name,o.message=r+o.message,i(o)}}}(e,r))}function u(n){var t=n.getAttribute("data-module");return t?t.split(" ")[0]:""}function s(n){return n&&n.hasAttribute("data-module")}function c(n){return n&&n.hasAttribute("data-type")}function f(n,t){"function"==typeof n[t]&&n[t].apply(n,Array.prototype.slice.call(arguments,2))}function l(n){var t=B[n];return t?o(n)?(i(new ReferenceError("Circular service dependency: "+w.join(" -> ")+" -> "+n)),null):(w.push(n),t.instance||(t.instance=t.creator(O)),w.pop(),t.instance):null}function d(n){var t,e,r,o,a=[];for(e=n.instance.behaviors||[],t=0;tp;p++)c=l[p],f(c,"init")}},stop:function(n){var t=y(n);if(t){v(t);for(var e,r=d(t),o=r.length-1;o>=0;o--)e=r[o],f(e,"destroy");f(t.instance,"destroy"),delete A[n.id]}else if(x.debug)return void i(new Error("Unable to stop module associated with element: "+n.id))},startAll:function(n){for(var t=Box.DOM.queryAll(n,m),e=0,r=t.length;r>e;e++)this.start(t[e])},stopAll:function(n){for(var t=Box.DOM.queryAll(n,m),e=0,r=t.length;r>e;e++)this.stop(t[e])},addModule:function(n,t){return"undefined"!=typeof b[n]?void i(new Error("Module "+n+" has already been added.")):void(b[n]={creator:t,counter:1})},getModuleConfig:function(n,t){var e,r=y(n);return r?(r.config||(e=Box.DOM.query(n,'script[type="text/x-config"]'),e&&(r.config=JSON.parse(e.text))),r.config?"undefined"==typeof t?r.config:t in r.config?r.config[t]:null:null):null},addService:function(n,t,e){if("undefined"!=typeof B[n])return void i(new Error("Service "+n+" has already been added."));if(e=e||{},B[n]={creator:t,instance:null},e.exports){var r,o=e.exports.length;for(r=0;o>r;r++){var a=e.exports[r],u=function(t){return function(){var e=l(n);return e[t].apply(e,arguments)}}(a);if(a in this)return void i(new Error(a+" already exists on Application object"));if(this[a]=u,a in Box.Context.prototype)return void i(new Error(a+" already exists on Context prototype"));Box.Context.prototype[a]=u,C.push(a)}}},getService:l,addBehavior:function(n,t){return"undefined"!=typeof E[n]?void i(new Error("Behavior "+n+" has already been added.")):void(E[n]={creator:t,instance:null})},broadcast:function(n,r){var o,i,a,u,s,c;for(i in A)if(A.hasOwnProperty(i)){for(c=[],a=A[i],-1!==e(a.instance.messages||[],n)&&c.push(t(a.instance.onmessage,a.instance)),s=d(a),o=0;ot;t++)if(o[t]===n)return;o.push(n)},fire:function(e,n){var t,r,o,i={type:e,data:n};if(t=this._handlers[i.type],t instanceof Array)for(t=t.concat(),r=0,o=t.length;o>r;r++)t[r].call(this,i)},off:function(e,n){var t,r,o=this._handlers[e];if(o instanceof Array)for(t=0,r=o.length;r>t;t++)if(o[t]===n){o.splice(t,1);break}}},e}(),n.JQueryDOM=function(){"use strict";return{type:"jquery",query:function(e,n){return $(e).find(n)[0]||null},queryAll:function(e,n){return $.makeArray($(e).find(n))},on:function(e,n,t){$(e).on(n,t)},off:function(e,n,t){$(e).off(n,t)}}}(),n.DOM=n.JQueryDOM,n.Context=function(){"use strict";function e(e,n){this.application=e,this.element=n}return e.prototype={broadcast:function(e,n){this.application.broadcast(e,n)},getService:function(e){return this.application.getService(e)},getConfig:function(e){return this.application.getModuleConfig(this.element,e)},getGlobal:function(e){return this.application.getGlobal(e)},getGlobalConfig:function(e){return this.application.getGlobalConfig(e)},reportError:function(e){this.application.reportError(e)},getElement:function(){return this.element}},e}(),n.Application=function(){"use strict";function t(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function r(e,n){return function(){return e.apply(n,arguments)}}function o(e,n){for(var t=0,r=e.length;r>t;t++)if(e[t]===n)return t;return-1}function i(){x={},E={},C={},A=[],M={},O={},S=!1;for(var e=0;en;n++)if(A[n]===e)return!0;return!1}function u(e){if(x.debug)throw e;G.fire("error",{exception:e})}function f(e,n){var t,r;for(t in e)r=e[t],"function"==typeof r&&(e[t]=function(e,t){return function(){var r=n+"."+e+"() - ";try{return t.apply(this,arguments)}catch(o){o.name=r+o.name,o.message=r+o.message,u(o)}}}(t,r))}function s(e){var n=e.getAttribute("data-module");return n?n.split(" ")[0]:""}function c(e){return e&&e.hasAttribute("data-module")}function l(e){return e&&e.hasAttribute("data-type")}function d(e,n){"function"==typeof e[n]&&e[n].apply(e,Array.prototype.slice.call(arguments,2))}function p(e){var n=C[e];return n?a(e)?(u(new ReferenceError("Circular service dependency: "+A.join(" -> ")+" -> "+e)),null):(A.push(e),n.instance||(n.instance=n.creator(G)),A.pop(),n.instance):null}function h(e){var n,t,r,o,i=[];for(t=e.instance.behaviors||[],n=0;np;p++)c=l[p],d(c,"init")}},stop:function(e){var n=b(e);if(n){m(n);for(var t,r=h(n),o=r.length-1;o>=0;o--)t=r[o],d(t,"destroy");d(n.instance,"destroy"),delete O[e.id]}else if(x.debug)return void u(new Error("Unable to stop module associated with element: "+e.id))},startAll:function(e){for(var t=n.DOM.queryAll(e,w),r=0,o=t.length;o>r;r++)this.start(t[r])},stopAll:function(e){for(var t=n.DOM.queryAll(e,w),r=0,o=t.length;o>r;r++)this.stop(t[r])},addModule:function(e,n){return"undefined"!=typeof E[e]?void u(new Error("Module "+e+" has already been added.")):void(E[e]={creator:n,counter:1})},getModuleConfig:function(e,t){var r,o=b(e);return o?(o.config||(r=n.DOM.query(e,'script[type="text/x-config"]'),r&&(o.config=JSON.parse(r.text))),o.config?"undefined"==typeof t?o.config:t in o.config?o.config[t]:null:null):null},addService:function(e,t,r){if("undefined"!=typeof C[e])return void u(new Error("Service "+e+" has already been added."));if(r=r||{},C[e]={creator:t,instance:null},r.exports){var o,i=r.exports.length;for(o=0;i>o;o++){var a=r.exports[o],f=function(n){return function(){var t=p(e);return t[n].apply(t,arguments)}}(a);if(a in this)return void u(new Error(a+" already exists on Application object"));if(this[a]=f,a in n.Context.prototype)return void u(new Error(a+" already exists on Context prototype"));n.Context.prototype[a]=f,D.push(a)}}},getService:p,addBehavior:function(e,n){return"undefined"!=typeof M[e]?void u(new Error("Behavior "+e+" has already been added.")):void(M[e]={creator:n,instance:null})},broadcast:function(e,n){var t,i,a,u,f,s;for(i in O)if(O.hasOwnProperty(i)){for(s=[],a=O[i],-1!==o(a.instance.messages||[],e)&&s.push(r(a.instance.onmessage,a.instance)),f=h(a),t=0;te;e++)if(o[e]===t)return;o.push(t)},fire:function(n,t){var e,r,o,i={type:n,data:t};if(e=this._handlers[i.type],e instanceof Array)for(e=e.concat(),r=0,o=e.length;o>r;r++)e[r].call(this,i)},off:function(n,t){var e,r,o=this._handlers[n];if(o instanceof Array)for(e=0,r=o.length;r>e;e++)if(o[e]===t){o.splice(e,1);break}}},n}(),Box.JQueryDOM=function(){"use strict";return{type:"jquery",query:function(n,t){return $(n).find(t)[0]||null},queryAll:function(n,t){return $.makeArray($(n).find(t))},on:function(n,t,e){$(n).on(t,e)},off:function(n,t,e){$(n).off(t,e)}}}(),Box.DOM=Box.JQueryDOM,Box.Context=function(){"use strict";function n(n,t){this.application=n,this.element=t}return n.prototype={broadcast:function(n,t){this.application.broadcast(n,t)},getService:function(n){return this.application.getService(n)},getConfig:function(n){return this.application.getModuleConfig(this.element,n)},getGlobal:function(n){return this.application.getGlobal(n)},getGlobalConfig:function(n){return this.application.getGlobalConfig(n)},reportError:function(n){this.application.reportError(n)},getElement:function(){return this.element}},n}(),Box.Application=function(){"use strict";function n(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function t(n,t){return function(){return n.apply(t,arguments)}}function e(n,t){for(var e=0,r=n.length;r>e;e++)if(n[e]===t)return e;return-1}function r(){x={},b={},B={},w=[],E={},A={},M=!1;for(var n=0;nt;t++)if(w[t]===n)return!0;return!1}function i(n){if(x.debug)throw n;O.fire("error",{exception:n})}function a(n,t){var e,r;for(e in n)r=n[e],"function"==typeof r&&(n[e]=function(n,e){return function(){var r=t+"."+n+"() - ";try{return e.apply(this,arguments)}catch(o){o.name=r+o.name,o.message=r+o.message,i(o)}}}(e,r))}function u(n){var t=n.getAttribute("data-module");return t?t.split(" ")[0]:""}function s(n){return n&&n.hasAttribute("data-module")}function c(n){return n&&n.hasAttribute("data-type")}function f(n,t){"function"==typeof n[t]&&n[t].apply(n,Array.prototype.slice.call(arguments,2))}function l(n){var t=B[n];return t?o(n)?(i(new ReferenceError("Circular service dependency: "+w.join(" -> ")+" -> "+n)),null):(w.push(n),t.instance||(t.instance=t.creator(O)),w.pop(),t.instance):null}function d(n){var t,e,r,o,a=[];for(e=n.instance.behaviors||[],t=0;tp;p++)c=l[p],f(c,"init")}},stop:function(n){var t=y(n);if(t){v(t);for(var e,r=d(t),o=r.length-1;o>=0;o--)e=r[o],f(e,"destroy");f(t.instance,"destroy"),delete A[n.id]}else if(x.debug)return void i(new Error("Unable to stop module associated with element: "+n.id))},startAll:function(n){for(var t=Box.DOM.queryAll(n,m),e=0,r=t.length;r>e;e++)this.start(t[e])},stopAll:function(n){for(var t=Box.DOM.queryAll(n,m),e=0,r=t.length;r>e;e++)this.stop(t[e])},addModule:function(n,t){return"undefined"!=typeof b[n]?void i(new Error("Module "+n+" has already been added.")):void(b[n]={creator:t,counter:1})},getModuleConfig:function(n,t){var e,r=y(n);return r?(r.config||(e=Box.DOM.query(n,'script[type="text/x-config"]'),e&&(r.config=JSON.parse(e.text))),r.config?"undefined"==typeof t?r.config:t in r.config?r.config[t]:null:null):null},addService:function(n,t,e){if("undefined"!=typeof B[n])return void i(new Error("Service "+n+" has already been added."));if(e=e||{},B[n]={creator:t,instance:null},e.exports){var r,o=e.exports.length;for(r=0;o>r;r++){var a=e.exports[r],u=function(t){return function(){var e=l(n);return e[t].apply(e,arguments)}}(a);if(a in this)return void i(new Error(a+" already exists on Application object"));if(this[a]=u,a in Box.Context.prototype)return void i(new Error(a+" already exists on Context prototype"));Box.Context.prototype[a]=u,C.push(a)}}},getService:l,addBehavior:function(n,t){return"undefined"!=typeof E[n]?void i(new Error("Behavior "+n+" has already been added.")):void(E[n]={creator:t,instance:null})},broadcast:function(n,r){var o,i,a,u,s,c;for(i in A)if(A.hasOwnProperty(i)){for(c=[],a=A[i],-1!==e(a.instance.messages||[],n)&&c.push(t(a.instance.onmessage,a.instance)),s=d(a),o=0;ot;t++)if(o[t]===n)return;o.push(n)},fire:function(e,n){var t,r,o,i={type:e,data:n};if(t=this._handlers[i.type],t instanceof Array)for(t=t.concat(),r=0,o=t.length;o>r;r++)t[r].call(this,i)},off:function(e,n){var t,r,o=this._handlers[e];if(o instanceof Array)for(t=0,r=o.length;r>t;t++)if(o[t]===n){o.splice(t,1);break}}},e}(),n.JQueryDOM=function(){"use strict";return{type:"jquery",query:function(e,n){return $(e).find(n)[0]||null},queryAll:function(e,n){return $.makeArray($(e).find(n))},on:function(e,n,t){$(e).on(n,t)},off:function(e,n,t){$(e).off(n,t)}}}(),n.DOM=n.JQueryDOM,n.Context=function(){"use strict";function e(e,n){this.application=e,this.element=n}return e.prototype={broadcast:function(e,n){this.application.broadcast(e,n)},getService:function(e){return this.application.getService(e)},getConfig:function(e){return this.application.getModuleConfig(this.element,e)},getGlobal:function(e){return this.application.getGlobal(e)},getGlobalConfig:function(e){return this.application.getGlobalConfig(e)},reportError:function(e){this.application.reportError(e)},getElement:function(){return this.element}},e}(),n.Application=function(){"use strict";function t(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function r(e,n){return function(){return e.apply(n,arguments)}}function o(e,n){for(var t=0,r=e.length;r>t;t++)if(e[t]===n)return t;return-1}function i(){x={},E={},C={},A=[],M={},O={},S=!1;for(var e=0;en;n++)if(A[n]===e)return!0;return!1}function u(e){if(x.debug)throw e;G.fire("error",{exception:e})}function f(e,n){var t,r;for(t in e)r=e[t],"function"==typeof r&&(e[t]=function(e,t){return function(){var r=n+"."+e+"() - ";try{return t.apply(this,arguments)}catch(o){o.name=r+o.name,o.message=r+o.message,u(o)}}}(t,r))}function s(e){var n=e.getAttribute("data-module");return n?n.split(" ")[0]:""}function c(e){return e&&e.hasAttribute("data-module")}function l(e){return e&&e.hasAttribute("data-type")}function d(e,n){"function"==typeof e[n]&&e[n].apply(e,Array.prototype.slice.call(arguments,2))}function p(e){var n=C[e];return n?a(e)?(u(new ReferenceError("Circular service dependency: "+A.join(" -> ")+" -> "+e)),null):(A.push(e),n.instance||(n.instance=n.creator(G)),A.pop(),n.instance):null}function h(e){var n,t,r,o,i=[];for(t=e.instance.behaviors||[],n=0;np;p++)c=l[p],d(c,"init")}},stop:function(e){var n=b(e);if(n){m(n);for(var t,r=h(n),o=r.length-1;o>=0;o--)t=r[o],d(t,"destroy");d(n.instance,"destroy"),delete O[e.id]}else if(x.debug)return void u(new Error("Unable to stop module associated with element: "+e.id))},startAll:function(e){for(var t=n.DOM.queryAll(e,w),r=0,o=t.length;o>r;r++)this.start(t[r])},stopAll:function(e){for(var t=n.DOM.queryAll(e,w),r=0,o=t.length;o>r;r++)this.stop(t[r])},addModule:function(e,n){return"undefined"!=typeof E[e]?void u(new Error("Module "+e+" has already been added.")):void(E[e]={creator:n,counter:1})},getModuleConfig:function(e,t){var r,o=b(e);return o?(o.config||(r=n.DOM.query(e,'script[type="text/x-config"]'),r&&(o.config=JSON.parse(r.text))),o.config?"undefined"==typeof t?o.config:t in o.config?o.config[t]:null:null):null},addService:function(e,t,r){if("undefined"!=typeof C[e])return void u(new Error("Service "+e+" has already been added."));if(r=r||{},C[e]={creator:t,instance:null},r.exports){var o,i=r.exports.length;for(o=0;i>o;o++){var a=r.exports[o],f=function(n){return function(){var t=p(e);return t[n].apply(t,arguments)}}(a);if(a in this)return void u(new Error(a+" already exists on Application object"));if(this[a]=f,a in n.Context.prototype)return void u(new Error(a+" already exists on Context prototype"));n.Context.prototype[a]=f,D.push(a)}}},getService:p,addBehavior:function(e,n){return"undefined"!=typeof M[e]?void u(new Error("Behavior "+e+" has already been added.")):void(M[e]={creator:n,instance:null})},broadcast:function(e,n){var t,i,a,u,f,s;for(i in O)if(O.hasOwnProperty(i)){for(s=[],a=O[i],-1!==o(a.instance.messages||[],e)&&s.push(r(a.instance.onmessage,a.instance)),f=h(a),t=0;tt;t++)if(o[t]===n)return;o.push(n)},fire:function(e,n){var t,r,o,i={type:e,data:n};if(t=this._handlers[i.type],t instanceof Array)for(t=t.concat(),r=0,o=t.length;o>r;r++)t[r].call(this,i)},off:function(e,n){var t,r,o=this._handlers[e];if(o instanceof Array)for(t=0,r=o.length;r>t;t++)if(o[t]===n){o.splice(t,1);break}}},e}(),Box.NativeDOM=function(){"use strict";return{type:"native",query:function(e,n){return e.querySelector(n)},queryAll:function(e,n){return e.querySelectorAll(n)},on:function(e,n,t){e.addEventListener(n,t,!1)},off:function(e,n,t){e.removeEventListener(n,t,!1)}}}(),Box.DOM=Box.NativeDOM,Box.Context=function(){"use strict";function e(e,n){this.application=e,this.element=n}return e.prototype={broadcast:function(e,n){this.application.broadcast(e,n)},getService:function(e){return this.application.getService(e)},getConfig:function(e){return this.application.getModuleConfig(this.element,e)},getGlobal:function(e){return this.application.getGlobal(e)},getGlobalConfig:function(e){return this.application.getGlobalConfig(e)},reportError:function(e){this.application.reportError(e)},getElement:function(){return this.element}},e}(),Box.Application=function(){"use strict";function e(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function n(e,n){return function(){return e.apply(n,arguments)}}function t(e,n){for(var t=0,r=e.length;r>t;t++)if(e[t]===n)return t;return-1}function r(){x={},b={},B={},w=[],E={},A={},M=!1;for(var e=0;en;n++)if(w[n]===e)return!0;return!1}function i(e){if(x.debug)throw e;O.fire("error",{exception:e})}function a(e,n){var t,r;for(t in e)r=e[t],"function"==typeof r&&(e[t]=function(e,t){return function(){var r=n+"."+e+"() - ";try{return t.apply(this,arguments)}catch(o){o.name=r+o.name,o.message=r+o.message,i(o)}}}(t,r))}function u(e){var n=e.getAttribute("data-module");return n?n.split(" ")[0]:""}function s(e){return e&&e.hasAttribute("data-module")}function c(e){return e&&e.hasAttribute("data-type")}function f(e,n){"function"==typeof e[n]&&e[n].apply(e,Array.prototype.slice.call(arguments,2))}function l(e){var n=B[e];return n?o(e)?(i(new ReferenceError("Circular service dependency: "+w.join(" -> ")+" -> "+e)),null):(w.push(e),n.instance||(n.instance=n.creator(O)),w.pop(),n.instance):null}function d(e){var n,t,r,o,a=[];for(t=e.instance.behaviors||[],n=0;np;p++)c=l[p],f(c,"init")}},stop:function(e){var n=y(e);if(n){g(n);for(var t,r=d(n),o=r.length-1;o>=0;o--)t=r[o],f(t,"destroy");f(n.instance,"destroy"),delete A[e.id]}else if(x.debug)return void i(new Error("Unable to stop module associated with element: "+e.id))},startAll:function(e){for(var n=Box.DOM.queryAll(e,m),t=0,r=n.length;r>t;t++)this.start(n[t])},stopAll:function(e){for(var n=Box.DOM.queryAll(e,m),t=0,r=n.length;r>t;t++)this.stop(n[t])},addModule:function(e,n){return"undefined"!=typeof b[e]?void i(new Error("Module "+e+" has already been added.")):void(b[e]={creator:n,counter:1})},getModuleConfig:function(e,n){var t,r=y(e);return r?(r.config||(t=Box.DOM.query(e,'script[type="text/x-config"]'),t&&(r.config=JSON.parse(t.text))),r.config?"undefined"==typeof n?r.config:n in r.config?r.config[n]:null:null):null},addService:function(e,n,t){if("undefined"!=typeof B[e])return void i(new Error("Service "+e+" has already been added."));if(t=t||{},B[e]={creator:n,instance:null},t.exports){var r,o=t.exports.length;for(r=0;o>r;r++){var a=t.exports[r],u=function(n){return function(){var t=l(e);return t[n].apply(t,arguments)}}(a);if(a in this)return void i(new Error(a+" already exists on Application object"));if(this[a]=u,a in Box.Context.prototype)return void i(new Error(a+" already exists on Context prototype"));Box.Context.prototype[a]=u,C.push(a)}}},getService:l,addBehavior:function(e,n){return"undefined"!=typeof E[e]?void i(new Error("Behavior "+e+" has already been added.")):void(E[e]={creator:n,instance:null})},broadcast:function(e,r){var o,i,a,u,s,c;for(i in A)if(A.hasOwnProperty(i)){for(c=[],a=A[i],-1!==t(a.instance.messages||[],e)&&c.push(n(a.instance.onmessage,a.instance)),s=d(a),o=0;ot;t++)if(o[t]===n)return;o.push(n)},fire:function(e,n){var t,r,o,i={type:e,data:n};if(t=this._handlers[i.type],t instanceof Array)for(t=t.concat(),r=0,o=t.length;o>r;r++)t[r].call(this,i)},off:function(e,n){var t,r,o=this._handlers[e];if(o instanceof Array)for(t=0,r=o.length;r>t;t++)if(o[t]===n){o.splice(t,1);break}}},e}(),n.NativeDOM=function(){"use strict";return{type:"native",query:function(e,n){return e.querySelector(n)},queryAll:function(e,n){return e.querySelectorAll(n)},on:function(e,n,t){e.addEventListener(n,t,!1)},off:function(e,n,t){e.removeEventListener(n,t,!1)}}}(),n.DOM=n.NativeDOM,n.Context=function(){"use strict";function e(e,n){this.application=e,this.element=n}return e.prototype={broadcast:function(e,n){this.application.broadcast(e,n)},getService:function(e){return this.application.getService(e)},getConfig:function(e){return this.application.getModuleConfig(this.element,e)},getGlobal:function(e){return this.application.getGlobal(e)},getGlobalConfig:function(e){return this.application.getGlobalConfig(e)},reportError:function(e){this.application.reportError(e)},getElement:function(){return this.element}},e}(),n.Application=function(){"use strict";function t(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function r(e,n){return function(){return e.apply(n,arguments)}}function o(e,n){for(var t=0,r=e.length;r>t;t++)if(e[t]===n)return t;return-1}function i(){x={},E={},C={},A=[],M={},O={},D=!1;for(var e=0;en;n++)if(A[n]===e)return!0;return!1}function u(e){if(x.debug)throw e;q.fire("error",{exception:e})}function s(e,n){var t,r;for(t in e)r=e[t],"function"==typeof r&&(e[t]=function(e,t){return function(){var r=n+"."+e+"() - ";try{return t.apply(this,arguments)}catch(o){o.name=r+o.name,o.message=r+o.message,u(o)}}}(t,r))}function f(e){var n=e.getAttribute("data-module");return n?n.split(" ")[0]:""}function c(e){return e&&e.hasAttribute("data-module")}function l(e){return e&&e.hasAttribute("data-type")}function d(e,n){"function"==typeof e[n]&&e[n].apply(e,Array.prototype.slice.call(arguments,2))}function p(e){var n=C[e];return n?a(e)?(u(new ReferenceError("Circular service dependency: "+A.join(" -> ")+" -> "+e)),null):(A.push(e),n.instance||(n.instance=n.creator(q)),A.pop(),n.instance):null}function h(e){var n,t,r,o,i=[];for(t=e.instance.behaviors||[],n=0;np;p++)c=l[p],d(c,"init")}},stop:function(e){var n=b(e);if(n){m(n);for(var t,r=h(n),o=r.length-1;o>=0;o--)t=r[o],d(t,"destroy");d(n.instance,"destroy"),delete O[e.id]}else if(x.debug)return void u(new Error("Unable to stop module associated with element: "+e.id))},startAll:function(e){for(var t=n.DOM.queryAll(e,w),r=0,o=t.length;o>r;r++)this.start(t[r])},stopAll:function(e){for(var t=n.DOM.queryAll(e,w),r=0,o=t.length;o>r;r++)this.stop(t[r])},addModule:function(e,n){return"undefined"!=typeof E[e]?void u(new Error("Module "+e+" has already been added.")):void(E[e]={creator:n,counter:1})},getModuleConfig:function(e,t){var r,o=b(e);return o?(o.config||(r=n.DOM.query(e,'script[type="text/x-config"]'),r&&(o.config=JSON.parse(r.text))),o.config?"undefined"==typeof t?o.config:t in o.config?o.config[t]:null:null):null},addService:function(e,t,r){if("undefined"!=typeof C[e])return void u(new Error("Service "+e+" has already been added."));if(r=r||{},C[e]={creator:t,instance:null},r.exports){var o,i=r.exports.length;for(o=0;i>o;o++){var a=r.exports[o],s=function(n){return function(){var t=p(e);return t[n].apply(t,arguments)}}(a);if(a in this)return void u(new Error(a+" already exists on Application object"));if(this[a]=s,a in n.Context.prototype)return void u(new Error(a+" already exists on Context prototype"));n.Context.prototype[a]=s,S.push(a)}}},getService:p,addBehavior:function(e,n){return"undefined"!=typeof M[e]?void u(new Error("Behavior "+e+" has already been added.")):void(M[e]={creator:n,instance:null})},broadcast:function(e,n){var t,i,a,u,s,f;for(i in O)if(O.hasOwnProperty(i)){for(f=[],a=O[i],-1!==o(a.instance.messages||[],e)&&f.push(r(a.instance.onmessage,a.instance)),s=h(a),t=0;tt;t++)if(o[t]===n)return;o.push(n)},fire:function(e,n){var t,r,o,i={type:e,data:n};if(t=this._handlers[i.type],t instanceof Array)for(t=t.concat(),r=0,o=t.length;o>r;r++)t[r].call(this,i)},off:function(e,n){var t,r,o=this._handlers[e];if(o instanceof Array)for(t=0,r=o.length;r>t;t++)if(o[t]===n){o.splice(t,1);break}}},e}(),Box.NativeDOM=function(){"use strict";return{type:"native",query:function(e,n){return e.querySelector(n)},queryAll:function(e,n){return e.querySelectorAll(n)},on:function(e,n,t){e.addEventListener(n,t,!1)},off:function(e,n,t){e.removeEventListener(n,t,!1)}}}(),Box.DOM=Box.NativeDOM,Box.Context=function(){"use strict";function e(e,n){this.application=e,this.element=n}return e.prototype={broadcast:function(e,n){this.application.broadcast(e,n)},getService:function(e){return this.application.getService(e)},getConfig:function(e){return this.application.getModuleConfig(this.element,e)},getGlobal:function(e){return this.application.getGlobal(e)},getGlobalConfig:function(e){return this.application.getGlobalConfig(e)},reportError:function(e){this.application.reportError(e)},getElement:function(){return this.element}},e}(),Box.Application=function(){"use strict";function e(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function n(e,n){return function(){return e.apply(n,arguments)}}function t(e,n){for(var t=0,r=e.length;r>t;t++)if(e[t]===n)return t;return-1}function r(){x={},b={},B={},w=[],E={},A={},M=!1;for(var e=0;en;n++)if(w[n]===e)return!0;return!1}function i(e){if(x.debug)throw e;O.fire("error",{exception:e})}function a(e,n){var t,r;for(t in e)r=e[t],"function"==typeof r&&(e[t]=function(e,t){return function(){var r=n+"."+e+"() - ";try{return t.apply(this,arguments)}catch(o){o.name=r+o.name,o.message=r+o.message,i(o)}}}(t,r))}function u(e){var n=e.getAttribute("data-module");return n?n.split(" ")[0]:""}function s(e){return e&&e.hasAttribute("data-module")}function c(e){return e&&e.hasAttribute("data-type")}function f(e,n){"function"==typeof e[n]&&e[n].apply(e,Array.prototype.slice.call(arguments,2))}function l(e){var n=B[e];return n?o(e)?(i(new ReferenceError("Circular service dependency: "+w.join(" -> ")+" -> "+e)),null):(w.push(e),n.instance||(n.instance=n.creator(O)),w.pop(),n.instance):null}function d(e){var n,t,r,o,a=[];for(t=e.instance.behaviors||[],n=0;np;p++)c=l[p],f(c,"init")}},stop:function(e){var n=y(e);if(n){g(n);for(var t,r=d(n),o=r.length-1;o>=0;o--)t=r[o],f(t,"destroy");f(n.instance,"destroy"),delete A[e.id]}else if(x.debug)return void i(new Error("Unable to stop module associated with element: "+e.id))},startAll:function(e){for(var n=Box.DOM.queryAll(e,m),t=0,r=n.length;r>t;t++)this.start(n[t])},stopAll:function(e){for(var n=Box.DOM.queryAll(e,m),t=0,r=n.length;r>t;t++)this.stop(n[t])},addModule:function(e,n){return"undefined"!=typeof b[e]?void i(new Error("Module "+e+" has already been added.")):void(b[e]={creator:n,counter:1})},getModuleConfig:function(e,n){var t,r=y(e);return r?(r.config||(t=Box.DOM.query(e,'script[type="text/x-config"]'),t&&(r.config=JSON.parse(t.text))),r.config?"undefined"==typeof n?r.config:n in r.config?r.config[n]:null:null):null},addService:function(e,n,t){if("undefined"!=typeof B[e])return void i(new Error("Service "+e+" has already been added."));if(t=t||{},B[e]={creator:n,instance:null},t.exports){var r,o=t.exports.length;for(r=0;o>r;r++){var a=t.exports[r],u=function(n){return function(){var t=l(e);return t[n].apply(t,arguments)}}(a);if(a in this)return void i(new Error(a+" already exists on Application object"));if(this[a]=u,a in Box.Context.prototype)return void i(new Error(a+" already exists on Context prototype"));Box.Context.prototype[a]=u,C.push(a)}}},getService:l,addBehavior:function(e,n){return"undefined"!=typeof E[e]?void i(new Error("Behavior "+e+" has already been added.")):void(E[e]={creator:n,instance:null})},broadcast:function(e,r){var o,i,a,u,s,c;for(i in A)if(A.hasOwnProperty(i)){for(c=[],a=A[i],-1!==t(a.instance.messages||[],e)&&c.push(n(a.instance.onmessage,a.instance)),s=d(a),o=0;ot;t++)if(o[t]===n)return;o.push(n)},fire:function(e,n){var t,r,o,i={type:e,data:n};if(t=this._handlers[i.type],t instanceof Array)for(t=t.concat(),r=0,o=t.length;o>r;r++)t[r].call(this,i)},off:function(e,n){var t,r,o=this._handlers[e];if(o instanceof Array)for(t=0,r=o.length;r>t;t++)if(o[t]===n){o.splice(t,1);break}}},e}(),n.NativeDOM=function(){"use strict";return{type:"native",query:function(e,n){return e.querySelector(n)},queryAll:function(e,n){return e.querySelectorAll(n)},on:function(e,n,t){e.addEventListener(n,t,!1)},off:function(e,n,t){e.removeEventListener(n,t,!1)}}}(),n.DOM=n.NativeDOM,n.Context=function(){"use strict";function e(e,n){this.application=e,this.element=n}return e.prototype={broadcast:function(e,n){this.application.broadcast(e,n)},getService:function(e){return this.application.getService(e)},getConfig:function(e){return this.application.getModuleConfig(this.element,e)},getGlobal:function(e){return this.application.getGlobal(e)},getGlobalConfig:function(e){return this.application.getGlobalConfig(e)},reportError:function(e){this.application.reportError(e)},getElement:function(){return this.element}},e}(),n.Application=function(){"use strict";function t(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function r(e,n){return function(){return e.apply(n,arguments)}}function o(e,n){for(var t=0,r=e.length;r>t;t++)if(e[t]===n)return t;return-1}function i(){x={},E={},C={},A=[],M={},O={},D=!1;for(var e=0;en;n++)if(A[n]===e)return!0;return!1}function u(e){if(x.debug)throw e;q.fire("error",{exception:e})}function s(e,n){var t,r;for(t in e)r=e[t],"function"==typeof r&&(e[t]=function(e,t){return function(){var r=n+"."+e+"() - ";try{return t.apply(this,arguments)}catch(o){o.name=r+o.name,o.message=r+o.message,u(o)}}}(t,r))}function f(e){var n=e.getAttribute("data-module");return n?n.split(" ")[0]:""}function c(e){return e&&e.hasAttribute("data-module")}function l(e){return e&&e.hasAttribute("data-type")}function d(e,n){"function"==typeof e[n]&&e[n].apply(e,Array.prototype.slice.call(arguments,2))}function p(e){var n=C[e];return n?a(e)?(u(new ReferenceError("Circular service dependency: "+A.join(" -> ")+" -> "+e)),null):(A.push(e),n.instance||(n.instance=n.creator(q)),A.pop(),n.instance):null}function h(e){var n,t,r,o,i=[];for(t=e.instance.behaviors||[],n=0;np;p++)c=l[p],d(c,"init")}},stop:function(e){var n=b(e);if(n){m(n);for(var t,r=h(n),o=r.length-1;o>=0;o--)t=r[o],d(t,"destroy");d(n.instance,"destroy"),delete O[e.id]}else if(x.debug)return void u(new Error("Unable to stop module associated with element: "+e.id))},startAll:function(e){for(var t=n.DOM.queryAll(e,w),r=0,o=t.length;o>r;r++)this.start(t[r])},stopAll:function(e){for(var t=n.DOM.queryAll(e,w),r=0,o=t.length;o>r;r++)this.stop(t[r])},addModule:function(e,n){return"undefined"!=typeof E[e]?void u(new Error("Module "+e+" has already been added.")):void(E[e]={creator:n,counter:1})},getModuleConfig:function(e,t){var r,o=b(e);return o?(o.config||(r=n.DOM.query(e,'script[type="text/x-config"]'),r&&(o.config=JSON.parse(r.text))),o.config?"undefined"==typeof t?o.config:t in o.config?o.config[t]:null:null):null},addService:function(e,t,r){if("undefined"!=typeof C[e])return void u(new Error("Service "+e+" has already been added."));if(r=r||{},C[e]={creator:t,instance:null},r.exports){var o,i=r.exports.length;for(o=0;i>o;o++){var a=r.exports[o],s=function(n){return function(){var t=p(e);return t[n].apply(t,arguments)}}(a);if(a in this)return void u(new Error(a+" already exists on Application object"));if(this[a]=s,a in n.Context.prototype)return void u(new Error(a+" already exists on Context prototype"));n.Context.prototype[a]=s,S.push(a)}}},getService:p,addBehavior:function(e,n){return"undefined"!=typeof M[e]?void u(new Error("Behavior "+e+" has already been added.")):void(M[e]={creator:n,instance:null})},broadcast:function(e,n){var t,i,a,u,s,f;for(i in O)if(O.hasOwnProperty(i)){for(f=[],a=O[i],-1!==o(a.instance.messages||[],e)&&f.push(r(a.instance.onmessage,a.instance)),s=h(a),t=0;te;e++)if(o[e]===t)return;o.push(t)},fire:function(n,t){var e,r,o,i={type:n,data:t};if(e=this._handlers[i.type],e instanceof Array)for(e=e.concat(),r=0,o=e.length;o>r;r++)e[r].call(this,i)},off:function(n,t){var e,r,o=this._handlers[n];if(o instanceof Array)for(e=0,r=o.length;r>e;e++)if(o[e]===t){o.splice(e,1);break}}},n}(),Box.JQueryDOM=function(){"use strict";return{type:"jquery",query:function(n,t){return $(n).find(t)[0]||null},queryAll:function(n,t){return $.makeArray($(n).find(t))},on:function(n,t,e){$(n).on(t,e)},off:function(n,t,e){$(n).off(t,e)}}}(),Box.DOM=Box.JQueryDOM,Box.Context=function(){"use strict";function n(n,t){this.application=n,this.element=t}return n.prototype={broadcast:function(n,t){this.application.broadcast(n,t)},getService:function(n){return this.application.getService(n)},getConfig:function(n){return this.application.getModuleConfig(this.element,n)},getGlobal:function(n){return this.application.getGlobal(n)},getGlobalConfig:function(n){return this.application.getGlobalConfig(n)},reportError:function(n){this.application.reportError(n)},getElement:function(){return this.element}},n}(),Box.Application=function(){"use strict";function n(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function t(n,t){return function(){return n.apply(t,arguments)}}function e(n,t){for(var e=0,r=n.length;r>e;e++)if(n[e]===t)return e;return-1}function r(){x={},b={},B={},w=[],E={},A={},M=!1;for(var n=0;nt;t++)if(w[t]===n)return!0;return!1}function i(n){if(x.debug)throw n;O.fire("error",{exception:n})}function a(n,t){var e,r;for(e in n)r=n[e],"function"==typeof r&&(n[e]=function(n,e){return function(){var r=t+"."+n+"() - ";try{return e.apply(this,arguments)}catch(o){o.name=r+o.name,o.message=r+o.message,i(o)}}}(e,r))}function u(n){var t=n.getAttribute("data-module");return t?t.split(" ")[0]:""}function s(n){return n&&n.hasAttribute("data-module")}function c(n){return n&&n.hasAttribute("data-type")}function f(n,t){"function"==typeof n[t]&&n[t].apply(n,Array.prototype.slice.call(arguments,2))}function l(n){var t=B[n];return t?o(n)?(i(new ReferenceError("Circular service dependency: "+w.join(" -> ")+" -> "+n)),null):(w.push(n),t.instance||(t.instance=t.creator(O)),w.pop(),t.instance):null}function d(n){var t,e,r,o,a=[];for(e=n.instance.behaviors||[],t=0;tp;p++)c=l[p],f(c,"init")}},stop:function(n){var t=y(n);if(t){v(t);for(var e,r=d(t),o=r.length-1;o>=0;o--)e=r[o],f(e,"destroy");f(t.instance,"destroy"),delete A[n.id]}else if(x.debug)return void i(new Error("Unable to stop module associated with element: "+n.id))},startAll:function(n){for(var t=Box.DOM.queryAll(n,m),e=0,r=t.length;r>e;e++)this.start(t[e])},stopAll:function(n){for(var t=Box.DOM.queryAll(n,m),e=0,r=t.length;r>e;e++)this.stop(t[e])},addModule:function(n,t){return"undefined"!=typeof b[n]?void i(new Error("Module "+n+" has already been added.")):void(b[n]={creator:t,counter:1})},getModuleConfig:function(n,t){var e,r=y(n);return r?(r.config||(e=Box.DOM.query(n,'script[type="text/x-config"]'),e&&(r.config=JSON.parse(e.text))),r.config?"undefined"==typeof t?r.config:t in r.config?r.config[t]:null:null):null},addService:function(n,t,e){if("undefined"!=typeof B[n])return void i(new Error("Service "+n+" has already been added."));if(e=e||{},B[n]={creator:t,instance:null},e.exports){var r,o=e.exports.length;for(r=0;o>r;r++){var a=e.exports[r],u=function(t){return function(){var e=l(n);return e[t].apply(e,arguments)}}(a);if(a in this)return void i(new Error(a+" already exists on Application object"));if(this[a]=u,a in Box.Context.prototype)return void i(new Error(a+" already exists on Context prototype"));Box.Context.prototype[a]=u,C.push(a)}}},getService:l,addBehavior:function(n,t){return"undefined"!=typeof E[n]?void i(new Error("Behavior "+n+" has already been added.")):void(E[n]={creator:t,instance:null})},broadcast:function(n,r){var o,i,a,u,s,c;for(i in A)if(A.hasOwnProperty(i)){for(c=[],a=A[i],-1!==e(a.instance.messages||[],n)&&c.push(t(a.instance.onmessage,a.instance)),s=d(a),o=0;ot;t++)if(o[t]===n)return;o.push(n)},fire:function(e,n){var t,r,o,i={type:e,data:n};if(t=this._handlers[i.type],t instanceof Array)for(t=t.concat(),r=0,o=t.length;o>r;r++)t[r].call(this,i)},off:function(e,n){var t,r,o=this._handlers[e];if(o instanceof Array)for(t=0,r=o.length;r>t;t++)if(o[t]===n){o.splice(t,1);break}}},e}(),n.JQueryDOM=function(){"use strict";return{type:"jquery",query:function(e,n){return $(e).find(n)[0]||null},queryAll:function(e,n){return $.makeArray($(e).find(n))},on:function(e,n,t){$(e).on(n,t)},off:function(e,n,t){$(e).off(n,t)}}}(),n.DOM=n.JQueryDOM,n.Context=function(){"use strict";function e(e,n){this.application=e,this.element=n}return e.prototype={broadcast:function(e,n){this.application.broadcast(e,n)},getService:function(e){return this.application.getService(e)},getConfig:function(e){return this.application.getModuleConfig(this.element,e)},getGlobal:function(e){return this.application.getGlobal(e)},getGlobalConfig:function(e){return this.application.getGlobalConfig(e)},reportError:function(e){this.application.reportError(e)},getElement:function(){return this.element}},e}(),n.Application=function(){"use strict";function t(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function r(e,n){return function(){return e.apply(n,arguments)}}function o(e,n){for(var t=0,r=e.length;r>t;t++)if(e[t]===n)return t;return-1}function i(){x={},E={},C={},A=[],M={},O={},S=!1;for(var e=0;en;n++)if(A[n]===e)return!0;return!1}function u(e){if(x.debug)throw e;G.fire("error",{exception:e})}function f(e,n){var t,r;for(t in e)r=e[t],"function"==typeof r&&(e[t]=function(e,t){return function(){var r=n+"."+e+"() - ";try{return t.apply(this,arguments)}catch(o){o.name=r+o.name,o.message=r+o.message,u(o)}}}(t,r))}function s(e){var n=e.getAttribute("data-module");return n?n.split(" ")[0]:""}function c(e){return e&&e.hasAttribute("data-module")}function l(e){return e&&e.hasAttribute("data-type")}function d(e,n){"function"==typeof e[n]&&e[n].apply(e,Array.prototype.slice.call(arguments,2))}function p(e){var n=C[e];return n?a(e)?(u(new ReferenceError("Circular service dependency: "+A.join(" -> ")+" -> "+e)),null):(A.push(e),n.instance||(n.instance=n.creator(G)),A.pop(),n.instance):null}function h(e){var n,t,r,o,i=[];for(t=e.instance.behaviors||[],n=0;np;p++)c=l[p],d(c,"init")}},stop:function(e){var n=b(e);if(n){m(n);for(var t,r=h(n),o=r.length-1;o>=0;o--)t=r[o],d(t,"destroy");d(n.instance,"destroy"),delete O[e.id]}else if(x.debug)return void u(new Error("Unable to stop module associated with element: "+e.id))},startAll:function(e){for(var t=n.DOM.queryAll(e,w),r=0,o=t.length;o>r;r++)this.start(t[r])},stopAll:function(e){for(var t=n.DOM.queryAll(e,w),r=0,o=t.length;o>r;r++)this.stop(t[r])},addModule:function(e,n){return"undefined"!=typeof E[e]?void u(new Error("Module "+e+" has already been added.")):void(E[e]={creator:n,counter:1})},getModuleConfig:function(e,t){var r,o=b(e);return o?(o.config||(r=n.DOM.query(e,'script[type="text/x-config"]'),r&&(o.config=JSON.parse(r.text))),o.config?"undefined"==typeof t?o.config:t in o.config?o.config[t]:null:null):null},addService:function(e,t,r){if("undefined"!=typeof C[e])return void u(new Error("Service "+e+" has already been added."));if(r=r||{},C[e]={creator:t,instance:null},r.exports){var o,i=r.exports.length;for(o=0;i>o;o++){var a=r.exports[o],f=function(n){return function(){var t=p(e);return t[n].apply(t,arguments)}}(a);if(a in this)return void u(new Error(a+" already exists on Application object"));if(this[a]=f,a in n.Context.prototype)return void u(new Error(a+" already exists on Context prototype"));n.Context.prototype[a]=f,D.push(a)}}},getService:p,addBehavior:function(e,n){return"undefined"!=typeof M[e]?void u(new Error("Behavior "+e+" has already been added.")):void(M[e]={creator:n,instance:null})},broadcast:function(e,n){var t,i,a,u,f,s;for(i in O)if(O.hasOwnProperty(i)){for(s=[],a=O[i],-1!==o(a.instance.messages||[],e)&&s.push(r(a.instance.onmessage,a.instance)),f=h(a),t=0;t