/*! Essential JavaScript - v0.4.0 ❀ http://essentialjs.com Copyright (c) 2011-2014 Henrik Vendelbo This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation. Additionally, Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ function Resolver(a,b,c){"use strict";function d(a,b,c,d){if(void 0==Resolver[a]){if(!d)return b;Resolver[a]=Resolver(b||{},c||{}),Resolver[a].named=a}return Resolver[a]}function e(a,b,d){for(var e,f=i.namespace,g=0;g1?(2==c.length&&(a+="::"),Resolver(a,b)):e(a.split("."),null,b)}function j(){var a={};for(var b in q)a[b]=[];return a}function k(a,b,c){function d(){if(1==arguments.length){var a="object"==typeof arguments[0]?arguments[0]:arguments[0].split("."),c=e(F,a,b);return c}var d=e(F,null,b);return d}function g(){var a;if(arguments.length>1){var b="object"==typeof arguments[0]?arguments[0]:arguments[0].split("."),c=b.pop(),d=e(F,b,I),g=F.concat(b),h=g.join(".");b.push(c);var j=arguments[1];if(a=!j,f(a,g,d,c)){var k=i.references[h+"."+c];k&&k._callListener("change",g,d,c,a,j);var l=i.references[h];l&&l._callListener("change",g,d,c,a,j)}}else{var d=e(H,null,I),j=arguments[0];if(a=!j,f(a,H,d,E)&&(this._callListener("change",H,d,E,a,j),G)){var l=i.references[G];l&&l._callListener("change",H,d,E,a,j)}}return a}function k(){if(arguments.length>0){var a="object"==typeof arguments[0]?arguments[0]:arguments[0].split("."),b=a.pop(),c=e(F,a,I),d=F.concat(a),f=d.join(".");a.push(b);var g=c[b];if(void 0===g)return;delete c[b];var h=i.references[f+"."+b];h&&h._callListener("change",d,c,b,void 0,g);var j=i.references[f];j&&j._callListener("change",d,c,b,void 0,g)}else{var b=F[F.length-1],c=e(H,null,I),g=c[b];if(void 0===g)return;if(delete c[b],this._callListener("change",H,c,E,void 0,g),G){var j=i.references[G];j&&j._callListener("change",H,c,E,void 0,g)}}return g}function l(a){if(arguments.length>1){var b="object"==typeof arguments[0]?arguments[0]:arguments[0].split("."),c=b.pop(),d=e(F,b,I),g=F.concat(b),h=g.join(".");b.push(c),a=arguments[1];var j=d[c];if(f(a,g,d,c)){var k=i.references[h+"."+c];k&&k._callListener("change",g,d,c,a,j);var l=i.references[h];l&&l._callListener("change",g,d,c,a,j)}}else{var d=e(H,null,I),j=d[c];if(f(a,H,d,E)&&(this._callListener("change",H,d,E,a,j),G)){var l=i.references[G];l&&l._callListener("change",H,d,E,a,j)}}return a}function m(a){if(arguments.length>1){var b="object"==typeof arguments[0]?arguments[0]:arguments[0].split("."),c=b.pop(),d=e(F,b,I),g=F.concat(b),h=g.join(".");b.push(c),a=arguments[1];var j=d[c];if(void 0===d[c]&&f(a,g,d,c)){var k=i.references[h+"."+c];k&&k._callListener("change",g,d,c,a,j);var l=i.references[h];l&&l._callListener("change",g,d,c,a,j)}return d[c]}var d=e(H,null,I),j=d[c];if(void 0===d[E]&&f(a,H,d,E)&&(this._callListener("change",H,d,E,a,j),G)){var l=i.references[G];l&&l._callListener("change",H,d,E,a,j)}return d[E]}function n(a){var c=e(F,null,b);return arguments.length?c[a]:c}function o(a,c){var d=F.pop(),g=e(F,null,b),h=g[d];F.push(d),void 0===g[d]&&f({},F,g,d),void 0===g[d][a]&&(F.push(a),f(c,F,g[d],a)&&this._callListener("change",F,g,a,c,h),F.pop())}function p(a,c){var d=F.pop(),g=e(F,null,b),h=g[d];F.push(d),void 0===g[d]&&f({},F,g,d),F.push(a),f(c,F,g[d],a)&&this._callListener("change",F,g,a,c,h),F.pop()}function q(a){var c=F.pop(),d=e(F,null,b);F.push(c),void 0===d[c]&&f({},F,d,c);var g=F.length,h={};for(var i in a)F[g]=i,f(a[i],F,d[c],i)&&(h[i]=a[i]);F.pop(),this._callListener("change",F,d[c],null,h)}function r(a){var c=F.pop(),d=e(F,null,b);F.push(c),void 0===d[c]&&f({},F,d,c);var g=F.length,h={};for(var i in a)F[g]=i,f(void 0,F,d[c],i)&&(h[i]=void 0);F.pop(),this._callListener("change",F,d[c],null,h)}function s(a){var c=e(F,null,b);for(var d in c)a[d]=c[d]}function t(b,c,d){switch(arguments.length){case 2:this._addListener(b,a,null,arguments[1]);break;case 3:this._addListener(b,a,c,d)}}function u(a){var c=e(H,null,b),d=c[E];this._callListener(a,H,c,E,d);var f=i.references[G];f&&f._callListener(a,H,e(H,null),E,d)}function v(a){var b=sessionStorage[this.id];if(void 0!=b){var c;try{c=JSON.parse(b)}catch(d){}a.set(c)}}function w(a){var b;if(window.localStorage&&(b=localStorage[this.id]),void 0!=b){var c;try{c=JSON.parse(b)}catch(d){}a.set(c)}}function x(a){function b(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d1&&n){var p="reference";switch(b){case"0":case"false":case"generate":case"null":case"undefined":case"throw":return Resolver[m].get(n,b);default:case"reference":return Resolver[m].reference(n)}return Resolver[m][p](n)}return Resolver[m];case"function":case"object":c=b||{},b=a}i.get=i,i.named=c.name,c.name&&(Resolver[c.name]=i),i.namespace=arguments[0],i.references={};var q={"true":!0,"false":!0,reflect:!0,get:!0,change:!0,undefined:!0};return i.on=function(a,b,c,d){switch(arguments.length){case 2:break;case 3:"string"==typeof arguments[1]&&this.reference(b).on(a,null,arguments[2]);break;case 4:this.reference(b).on(a,c,d)}},i.remove=function(a,b){var c;if("object"==typeof a&&a.join)c=a,a=a.join(".");else{if(c=a.split("::"),c.length>1)return Resolver(c.shift()).remove(c[0],b);c=a.split(".")}var d=c.pop(),f=e(c,null,b),g=f[d];if(void 0!==g){delete f[d];var h=i.references[a];h&&h._callListener("change",c,f,d,void 0);var j=c.join("."),k=i.references[j];return k&&k._callListener("change",c,f,d,void 0),g}},i.declare=function(a,b,c){var d;if("object"==typeof a&&a.join)d=a,a=a.join(".");else{if(d=a.split("::"),d.length>1)return Resolver(d.shift()).declare(d[0],b,c);d=a.split(".")}var g=d.pop(),h=e(d,null,c);if(void 0===h[g]){if(f(b,d,h,g)){var j=i.references[a];j&&j._callListener("change",d,h,g,b);var k=d.join("."),l=i.references[k];l&&l._callListener("change",d,h,g,b)}return b}return h[g]},i.set=function(a,b,c){var d;if("object"==typeof a&&a.join)d=a,a=a.join(".");else{if(d=a.split("::"),d.length>1)return Resolver(d.shift()).set(d[0],b,c);d=a.split(".")}var g=d.pop(),h=e(d,null,c);if("force"==c&&("object"!=typeof h||"function"!=typeof h)){var j=d.pop();e(d,null,c)[j]={},d.push(j),h=e(d,null,c)}var k=h[g];if(f(b,d,h,g)){var l=i.references[a];l&&l._callListener("change",d,h,g,b,k);var m=d.join("."),n=i.references[m];n&&n._callListener("change",d,h,g,b,k)}return b},i.toggle=function(a,b){var c;if("object"==typeof a&&a.join)c=a,a=a.join(".");else{if(c=a.split("::"),c.length>1)return Resolver(c.shift()).toggle(c[0],h,b);c=a.split(".")}var d=c.pop(),g=e(c,null,b),h=!g[d];if(f(h,c,g,d)){var j=i.references[a];j&&j._callListener("change",c,g,d,h,!h);var k=c.join("."),l=i.references[k];l&&l._callListener("change",c,g,d,h,!h)}return h},i.reference=function(a,b){if(a=a||"","object"==typeof a)b=a.onundefined,a=a.name;else if(a.indexOf("::")>=0)return Resolver(a,b);var c=b?a+":"+b:a,d=this.references[c];if(d)return d;var e=this.references[a];return void 0==e&&(e=this.references[a]=k(a,b),c==a)?e:this.references[c]=k(a,b,e.listeners)},i.proxy=function(a,b,c){b.on("change",c,this,function(b){b.data.set(a,b.value)})},i.override=function(a){return this.namespace=a,this},i.destroy=function(){for(var a in this.references)delete this.references[a]},c.mixinto&&(null==c.mixinto.get&&(c.mixinto.get=i),null==c.mixinto.declare&&(c.mixinto.declare=i.declare),null==c.mixinto.set&&(c.mixinto.set=i.set),null==c.mixinto.reference&&(c.mixinto.reference=i.reference),null==c.mixinto.override&&(c.mixinto.override=i.override),null==c.mixinto.on&&(c.mixinto.on=i.on)),i}function Generator(a,b){function c(a,b,c,d,e,f,g,h,i,j,k,l){var m;if(p.info.existing){var n=p.info.identifier.apply(p.info,arguments);if(n in p.info.existing)return m=p.info.existing[n];m=p.info.existing[n]=new p.type}else m=new p.type;m.__context__={generator:p,info:o,args:[a,b,c,d,e,f,g,h,i,j,k,l]};for(var q,i=0;q=o.constructors[i];++i)q.apply(m,m.__context__.args);return delete m.__context__,m}function d(a,b,c,d,e,f,g,h,i,j,k,l){var m,n=o.constructors[0],q={generator:p,info:o,args:[a,b,c,d,e,f,g,h,i,j,k,l]};if(p.info.existing){var r=p.info.identifier.apply(p.info,arguments);if(r in p.info.existing)return m=p.info.existing[r];m=p.info.existing[r]=p.type.apply(null,q.args)}else m=p.type.apply(null,q.args);m.__context__=q;for(var i=1;n=o.constructors[i];++i)n.apply(m,m.__context__.args);return delete m.__context__,m}function e(b,c,d,e,f,g,h,i,j,k,l,m){"no strict";var n;if(p.info.existing){var q=p.info.identifier.apply(p.info,arguments);if(q in p.info.existing)return n=p.info.existing[q];n=p.info.existing[q]=o.extendsBuiltin[arguments.length].apply(null,arguments)}else{n=o.extendsBuiltin[arguments.length].apply(null,arguments);for(var r in p.prototype)n[r]=p.prototype[r];a.prototype=o.extendsBuiltin.ctr.prototype}n.__context__={generator:p,info:o,args:[b,c,d,e,f,g,h,i,j,k,l,m]};for(var s,j=0;s=o.constructors[j];++j)o.extendsBuiltin.ctr!==s&&s.apply(n,n.__context__.args);return delete n.__context__,n}function f(){for(var a,b=this.__context__.args,c=0;a=p.args[c];++c)if(void 0===b[c]){var d=p.args[c].name,e=p.args[c]["default"];d in o.restrictedArgs?b[c]=o.restrictedArgs[d]:e&&(b[c]=e)}}function g(){p.presets.reference("").mixinto(this)}function h(){for(var a,b=this.__context__.generator.args,c=0;a=b[c];++c)a.preset&&(this[a.preset]=arguments[c])}function i(a,b){return function(c,d,e,f,g,h,i,j,k,l,m,n){switch(b){case 1:return new a(c);case 2:return new a(c,d);case 3:return new a(c,d,e);case 4:return new a(c,d,e,f);case 5:return new a(c,d,e,f,g);case 6:return new a(c,d,e,f,g,h);case 7:return new a(c,d,e,f,g,h,i);case 8:return new a(c,d,e,f,g,h,i,j);case 9:return new a(c,d,e,f,g,h,i,j,k);case 10:return new a(c,d,e,f,g,h,i,j,k,l);case 11:return new a(c,d,e,f,g,h,i,j,k,l,m);case 12:return new a(c,d,e,f,g,h,i,j,k,l,m,n);default:return new a}}}function j(a,b,c,d,e,f){if(void 0==b){if("string"==typeof a){var g=this.variants[a];if(g&&g.generator)return g.generator}else for(var h,i=0;h=a[i];++i){var g=this.variants[h];if(g&&g.generator)return g.generator}var g=this.variants[""];return g&&g.generator?g.generator:this}var j=b.handlers,k=b.bases,l=Generator(b);return this.variants[a]={func:b,generator:l,handlers:j||{},bases:k||[],additional:[c,d,e,f]},l}function k(){var a=[];a.push("function "),a.push(this.info.package),a.push("."),a.push(this.info.symbol),a.push("(");for(var b,c=[],d=0;b=this.args[d];++d)c.push(b.name+":"+b.variantName);return a.push(c.join(",")),a.push(")"),a.push(" {"),a.push("
"),a.push("
}"),a.push("
"),a.join("")}function l(a,b){if(a.singleton)this.info.singleton=!0,this.info.lifecycle=a.lifecycle,this.info.existing={},this.info.identifier=function(){return 0},this.info.restricted||(Generator.restricted.push(p),this.info.restricted=!0);else if(a.identifier){var c="string"==typeof a.identifier?a.identifier:"identifier";this.info.identifier=this.info.constructors[-1][c],this.info.existing={},this.info.restricted||(Generator.restricted.push(p),this.info.restricted=!0)}else void 0!=a.size?this.info.restricted||(Generator.restricted.push(p),this.info.restricted=!0):(this.info.singleton=!1,this.info.existing=null);return this.info.restrictedArgs=b,b&&this.info.constructors.unshift(f),this}function m(){}function n(){var a=this.info.constructors[-1].discarded;for(var b in this.info.existing){var c=this.info.existing[b];a&&a.call(this,c),this.discarded&&this.discarded.call(this,c),this.info.options.discarded&&this.info.options.discarded.call(this,c)}this.info.existing={}}if(a.__generator__)return a.__generator__;var o={arguments:{},presets:{},options:b,constructors:[]},p=function(b){function f(){}var j=b.length-1,k=b[j];"function"==typeof k?k={}:--j,o.options=k;var l=a.bases||[];if(j>0){l=[];for(var m,n=j;n>=1&&(m=b[n]);--n){switch(m){case Array:case String:o.extendsBuiltin={ctr:m};for(var p=12;p>=0;--p)o.extendsBuiltin[p]=i(m,p)}l.push(m)}}for(var q,r=f,s=o.constructors,n=0;q=l[n];++n){if(q.bases&&q.info&&q.info.constructors){for(var t,u=0;t=q.bases[u];++u)s.push(q.bases[u]);q=l[n]=q.info.constructors[-1]}s.push(q)}s.push(a),s[-1]=a;var v=!1;l.length&&s[0].__generator__&&(v=0==s[0].__generator__.info.options.alloc),(v||k.alloc===!1)&&(r=s.shift());var w=c;v?w=d:k.alloc===!1?w=d:o.extendsBuiltin&&(w=e),w.__generator__=w,w.info=o,w.bases=l,w.args=k.args||a.args||[];for(var x,y=!1,n=0;x=w.args[n];++n)x.no=n,o.arguments[x.name]=x,x.preset&&(y=!0);if(o.constructors.unshift(g),y&&o.constructors.unshift(h),l.length)for(var q,z=Generator(l[0]),A=w.prototype=new z.type,n=1;q=l[n];++n)for(var B in q.prototype)A[B]=q.prototype[B];w.type=r,w.type.prototype=w.prototype;for(var B in a.prototype)w.prototype[B]=a.prototype[B];if(k.prototype)for(var B in k.prototype)w.prototype[B]=k.prototype[B];return a.prototype=w.prototype,w}(arguments);return Resolver(p.prototype,{mixinto:p,generator:Generator.ObjectGenerator}),p.presets=Resolver(o.presets),p.variant=j,p.variants={},p.toRepr=k,p.restrict=l,p.destroy=m,p.discard=n,a.__generator__=p,p}Resolver.readloads=[],Resolver.storeunloads=[],Resolver.loadReadStored=function(){for(var a,b=0;a=Resolver.readloads[b];++b)for(var c in a.readloads)a.readloads[c].call(a)},Resolver.unloadWriteStored=function(){for(var a,b=0;a=Resolver.storeunloads[b];++b)for(var c in a.storeunloads)a.storeunloads[c].call(a)},Resolver.hasGenerator=function(a){return a.__generator__?!0:"function"==typeof a&&"function"==typeof a.type?!0:!1},Resolver.exists=function(a){return void 0!=this[a]},Resolver({},{name:"default"}),Resolver(window,{name:"window"}),Generator.restricted=[],Generator.ObjectGenerator=Generator(Object),Generator.discardRestricted=function(){for(var a,b=Generator.restricted.length-1;a=Generator.restricted[b];--b)a.destroy();for(var a,b=Generator.restricted.length-1;a=Generator.restricted[b];--b)a.discard(),a.info.constructors[-1].__generator__=void 0,a.__generator__=void 0},!function(a){"use strict";function b(a){this.options=a||{},this.name=this.options.name,this.preset=this.options.preset===!0?this.name:this.options.preset}function c(){this.type=String,this.variantName="String"}function d(){this.type=Number,this.variantName="Number"}function e(){this.type=Date,this.variantName="Date"}function f(){this.type=Boolean,this.variantName="Boolean"}function g(){this.type=Object,this.variantName="Object"}function h(){this.type=Array,this.variantName="Array"}function i(a,b){if(a.indexOf)return a.indexOf(b)>=0;for(var c,d=0;c=a[d];++d)if(c==b)return!0;return!1}function j(){this._set={};for(var a=this.length-1;a>=0;--a){var b=this[a];(this._set[b]||""===b)&&this.splice(a,1),""!=b&&null!=b&&(this._set[b]=!0)}}function k(a){return a.replace(/\\\\\\"/g,'\\\\\\\\"').replace(/\\\\"/g,'\\\\\\"').replace(/\\"/g,'\\\\"').replace(/"/g,'\\"')}function l(){}function m(a){return a=a.replace(/ /g," ").replace(/ /g," ").replace(/ $/,"").replace(/^ /,"")}function n(a,b){void 0==a._cleaners&&(a._cleaners=[]),i(a._cleaners,b)||a._cleaners.push(b)}function o(a){if("object"==typeof a&&a){var b,c=a._cleaners;if(void 0!=c){c._incall=(c._incall||0)+1;do b=c.pop(),b&&b.call(a);while(b);a._cleaners=void 0}}}function p(a,b,c){b=b||0;var d=a._cleaners=a._cleaners||[],e=d._incall||0,f=!c&&!d._inrecurse;if(!(e>b)){d._inrecurse=(d._inrecurse||0)+1;for(var g=void 0!==a.firstElementChild?a.firstElementChild:a.firstChild;g;g=void 0!==g.nextElementSibling?g.nextElementSibling:g.nextSibling)1==g.nodeType&&p(g,b,!0);f&&o(a),--d._inrecurse}}function q(a,b,c){for(var d,e=y.all[b.uniqueID],f=Resolver("essential::ApplicationConfig::")(),g=0;d=b.children[g];++g){var h=d.getAttribute("role"),c=f.getConfig(d)||{},i=this.sizingElement(b,b,d,h,c);if(i){var j=y(d,h,c,!1,f);j.context.layouterParent=e.layouter,X[j.uniqueID]=j}}}function r(){}function s(a,b){var c=[],d={list:c};if("string"==typeof a){var e=u(a);if(b){var d={list:c};t(b||document.body,d,e)}else for(var f in V){var g=V[f];e(g.el,g)&&c.push(g)}}else{var h=P("ApplicationConfig")();if(b=a,a=void 0,"number"==typeof b.length)for(var i,j=0;i=b[j];++j){var k=h.getConfig(i),l=i.getAttribute("role"),g=y(i,l,k,!1,h);g&&c.push(g)}else if(1==b.nodeType){var k=P("ApplicationConfig")().getConfig(b),l=b.getAttribute("role"),g=y(b,l,k);g&&c.push(g)}}c.el=b;for(var m in s.fn)c[m]=s.fn[m];return c}function t(a,b,c){for(var d=void 0!==a.firstElementChild?a.firstElementChild:a.firstChild;d;){if(d.attributes){var e=P("ApplicationConfig")().getConfig(d),f=d.getAttribute("role"),g=y(d,f,e),h=!0;c&&(h=c(d,g,e)),g&&h&&b.list&&b.list.push(g),null!=g&&g.state.contentManaged||t(d,{layouter:b.layouter,list:b.list},c)}d=void 0!==d.nextElementSibling?d.nextElementSibling:d.nextSibling}}function u(a){var b={};if("["==a.charAt(0)&&"]"==a.charAt(a.length-1))for(var c,d=a.substring(1,a.length-1).split(","),e=0;c=d[e];++e){var f=c.split("=");b[f[0]]=f[1]}return function(a){for(var c in b){var d=a.getAttribute(c);if(d!=b[c])return!1}return!0}}function v(){}function w(a,b,c,d,e){var f=b?b.split(" "):[];this.el=a,this.placement=P("ElementPlacement")(a,[]),this.placement.manually(["overflow"]),"visible"==this.placement.style.overflow&&(this._updateDisplayed=this._updateDisplayedNotNone),this.sizing={contentWidth:0,contentHeight:0,currentStyle:this.placement.style,track:{sizeBy:"offset",contentBy:"scroll",width:!0,height:!0,contentWidth:!0,contentHeight:!0,scrollLeft:!1,scrollTop:!1}},this.layout={currentStyle:this.placement.style,lastDirectCall:0,enable:!1,throttle:null},this._updateDisplayed(),this.ensureStateful(),n(this.el,x),this.stateful.set("state.needEnhance",f.length>0),this.uniqueID=e,this.roles=f,this.role=f[0],this.conf=c||{},this.context=new v,this.context.placement=this.placement,this.instance=null,this.controller=null,this.state.initDone=!1,this.state.enhanced=!1,this.state.discarded=!1,this.state.contentManaged=!1,this.page=d,this.handlers=d.resolver("handlers"),this.enabledRoles=d.resolver("enabledRoles"),this.inits=[],this.role&&this.inits.push(this._roleInit),this._updateContext()}function x(){if(null!=this.uniqueID){var a=V[this.uniqueID];if(a){var b=a.state.enhanced;a.laidout&&a.laidout.destroy(a.el),a.layouter&&a.layouter.destroy(a.el);var c=a.controller||a.getController();c&&c.destroyed&&c.destroyed(a.el,a.instance);var d=a.discardHandler(a.el,a.role,a.instance);return a._unlist(!0),c&&c.discarded&&c.discarded(a.el,a.instance),c&&b&&(--c.__enhanced,0==c.__enhanced&&c.destroy&&(c.destroy(a.el),c.__init_called=!1)),d}}}function y(a,b,c,d,e){var f=a.uniqueID;void 0==f&&(f=a.uniqueID=++$);var g=V[f];if(g&&!d)return g;if(!d&&null==b&&null==c&&arguments.length>=3)return null;if(void 0==e){var h=Resolver("page");e=h(["pagesById",(a.ownerDocument||document).uniquePageID||"main"],"null"),null==e&&(e=Resolver("essential::ApplicationConfig::")())}g=new w(a,b,c,e,f),V[f]=g;var i=e.resolver("descriptors");return i[f]=g,g}function z(){for(var a in V){var b=V[a];b.discardNow(),b._unlist(!0)}V=y.all=P.set("enhancedElements",{})}function A(){var a=Resolver("page"),b=a("handlers"),c=a("enabledRoles");if(b.prepare)for(var d in c){var e=b.prepare[d];if(e)for(var f,g=document.body.querySelectorAll("[role="+d+"]"),h=0;f=g[h];++h)e(f,d)}}function B(){for(var a,b=0;a=Generator.restricted[b];++b)"page"==a.info.lifecycle&&a()}function C(){if(!ab){ab=!0;var a=Resolver("page::liveTimeout","null");a?setTimeout(function(){Resolver("page").set("state.livepage",!0)},a):0==a&&Resolver("page").set("state.livepage",!0),Resolver.loadReadStored();try{P("_queueDelayedAssets")(),P.set("_queueDelayedAssets",function(){}),B(),A()}catch(b){bb.error("Failed to launch delayed assets and singletons",b)}}}function D(){}function E(){Resolver.unloadWriteStored(),Generator.discardRestricted(),y.maintainer&&clearInterval(y.maintainer),y.maintainer=null,z(),Z.discardAll();for(var a in Resolver)"function"==typeof Resolver[a].destroy&&Resolver[a].destroy();Resolver("page").set("state.launched",!1),Resolver("page").set("state.livepage",!1),Resolver("page").set("pages",null),Resolver("page").set("pagesById",null)}function F(){try{a.document.documentElement.doScroll("left")}catch(b){return setTimeout(F,1),void 0}C()}function G(){if(a.document.addEventListener){var b=function(){a.document.removeEventListener("DOMContentLoaded",b,!1),C()};a.document.addEventListener("DOMContentLoaded",b,!1),a.addEventListener("load",C,!1)}else if(a.document.attachEvent){var c=function(){"complete"===a.document.readyState&&(a.document.detachEvent("onreadystatechange",c),C())};a.document.attachEvent("onreadystatechange",c),a.attachEvent("onload",C);var d=!1;try{d=null==a.frameElement}catch(e){}a.document.documentElement.doScroll&&d&&F()}}function H(){function a(){}bb.log=function(){a("none",arguments)},bb.trace=function(){a("trace",arguments)},bb.debug=function(){a("debug",arguments)},bb.info=function(){a("info",arguments)},bb.warn=function(){a("warn",arguments)},bb.error=function(){a("error",arguments)},bb.group=function(){a("group",arguments)},bb.groupEnd=function(){a("groupEnd",arguments)}}function I(){bb.log=function(){window.console.log.apply(window.console,arguments)},bb.trace=function(){window.console.trace()},bb.debug=function(){(window.console.debug||window.console.info).apply(window.console,arguments)},bb.info=function(){window.console.info.apply(window.console,arguments)},bb.warn=function(){window.console.warn.apply(window.console,arguments)},bb.error=function(){window.console.error.apply(window.console,arguments)},void 0==window.console.debug&&(bb.log=function(){window.console.log(Array.prototype.join.call(arguments," "))},bb.trace=function(){window.console.trace()},bb.debug=function(){window.console.log(Array.prototype.join.call(arguments," "))},bb.info=function(){window.console.info(Array.prototype.join.call(arguments," "))},bb.warn=function(){window.console.warn(Array.prototype.join.call(arguments," "))},bb.error=function(){window.console.error(Array.prototype.join.call(arguments," "))})}function J(a){return null==a?a:String(a).replace(/&/g,"&").replace(/"/g,"&").replace(/'/g,"&").replace(//g,"&")}function K(a){var b={},c=a.split("-");return b.chain=1==c.length?"en":c[0],b}function L(a){for(var b,c=0;b=a[c];++c)b=b.toLowerCase().replace("_","-"),cb.declare(["locales",b],K(b))}function M(a,b,c,d){var e=a.toLowerCase().replace("_","-");for(var f in c){var g=c[f];d&&cb.declare(["keys",b,f],d()),cb.set(["keys",b,f,e],g),d&&cb.declare(["sentences",g,b],d()),cb.set(["sentences",g,b,e,"key"],f)}}function N(a){function b(b,c){var d=null,e=a.defaultContext||null;"object"==typeof b&&(d=b.phrase,e=b.context||null,b=b.key);var f=cb("locales"),g=cb("locale");g&&(g=g.toLowerCase().replace("_","-"));var h,i;if(b)for(i=a.get(["keys",e,b],"undefined");void 0==h&&i&&g;)h=i[g],g=f[g]?f[g].chain:null;else if(d)for(i=a.get(["phrases",e,d],"undefined");void 0==h&&i&&g;)h=i[g],g=f[g]?f[g].chain:null;if(h){if(c&&i.begin&&i.end)for(var j in c)h=h.replace(i.begin+j+i.end,c[j]);return h}return d}function c(){var b=cb("locale");b&&(b=b.toLowerCase().replace("_","-"));for(var c in a.namespace.keys){var d=a.namespace.keys[c];for(var e in d){var f=d[e];f[b]&&a.set(["sentences",f[b].toLowerCase(),c,b,"key"],e)}}}function d(b){void 0==a.namespace.sentences&&c();var d=null,e=cb("locale");e&&(e=e.toLowerCase().replace("_","-")),b=b.toLowerCase();var f=a(["sentences",b,d,e],"undefined");if(void 0==f){f={matches:[]};var g=a("sentences");if(b.length>1)for(var h in g){var i=a(["sentences",g[h],d,e],"undefined");i&&i.key&&h.indexOf(b)>=0&&f.matches.push(i.key)}}return f}a.translate=b,a._=b,a.set("translate",b),a.reverseTranslate=d,a.set("translate",d)}function O(a){var b=Resolver({});N(b);var c=null,d=cb("locale");d&&(d=d.toLowerCase().replace("_","-"));var e=cb(["keys",null]);for(var f in e)if(f.substring(0,a.length)==a){var g=e[f];b.set(["keys",c,f],g)}var h=cb(["keys",a],"undefined");return h&&(b.defaultContext=a,b.set(["keys",a],h)),b}var P=Resolver("essential",{}),Q="file:"===location.protocol||"chrome:"===location.protocol||"chrome-extension:"===location.protocol||"resource:"===location.protocol;P.declare("isFileProtocol",Q);var R="127.0.0.1"==location.hostname||"0.0.0.0"==location.hostname||"localhost"==location.hostname||location.port.length>0||Q?"development":"production";P.declare("serverMode",R),P.set("Type",Generator(b)),P.set("StringType",Generator(c,b)),P.namespace.Type.variant("String",P.namespace.StringType),P.set("NumberType",Generator(d,b)),P.namespace.Type.variant("Number",P.namespace.NumberType),P.set("DateType",Generator(e,b)),P.namespace.Type.variant("Date",P.namespace.DateType),P.set("BooleanType",Generator(f,b)),P.namespace.Type.variant("Boolean",P.namespace.BooleanType),P.set("ObjectType",Generator(g,b)),P.namespace.Type.variant("Object",P.namespace.ObjectType),P.set("ArrayType",Generator(h,b)),P.namespace.Type.variant("Array",P.namespace.ArrayType),P.declare("arrayContains",i),P.set("ArraySet",Generator(j,Array)),j.prototype.item=function(a){return this[a]},j.prototype.contains=j.prototype.has=function(a){var b=this._set[a];return b===a?!0:"object"==typeof b&&b.multiple_values?i(b,a):!1},j.prototype.set=function(a,b){b?this.add(a):this.remove(a)},j.prototype.add=function(a){var b=this._set[a];if(void 0===b)this._set[a]=a,this.push(a);else{if(b===a)return;"object"==typeof b&&b.multiple_values||(b=this._set[a]=[b],b.multiple_values=!0),i(b,a)||(b.push(a),this.push(a))}},j.prototype.remove=function(a){var b=this._set[a];if(void 0!==b){if(b===a){for(var c=this.length-1;c>=0;--c)this[c]===a&&this.splice(c,1);return delete this._set[a],void 0}if("object"==typeof b&&b.multiple_values){for(var c=this.length-1;c>=0;--c)this[c]===a&&this.splice(c,1);for(var c=b.length-1;c>=0;--c)b[c]===a&&b.splice(c,1);0==b.length&&delete this._set[a]}}},j.prototype.toggle=function(a){this.has(a)?this.remove(a):this.add(a)},j.prototype.separator=" ",j.prototype.toString=function(){return this.join(this.separator)},P.set("escapeJs",k);var S=P.set("DOMTokenList",Generator(l,j,Array));S.prototype.emulateClassList=!0,S.set=function(a,b,c){c?a.add(b):a.remove(b)},S.mixin=function(a,b){if(b.split)for(var c,d=m(b).split(" "),e=0;c=d[e];++e)a.add(c);else if("number"!=typeof b.length)for(var f in b)a.set(f,b[f]);else for(var c,e=0;c=b[e];++e)a.add(c)},S.tmplClass=function(a,b,c,d){for(var e=a.classList,f=e.length-1;f>=0;--f){var g=e.item(f),h=b?g.substring(0,b.length)==b:!0,i=c?g.substring(g.length-c.length,g.length)==c:!0;h&&i&&e.remove(g)}d&&e.add((b||"")+d+(c||"")),e.emulateClassList&&(a.className=a.classList.join(a.classList.separator))},S.eitherClass=function(a,b,c,d){var e=a.classList,f=d?c:b,g=d?b:c;f&&e.remove(f),g&&e.add(g),e.emulateClassList&&(a.className=a.classList.join(a.classList.separator))},P.declare("ensureCleaner",n),P.declare("callCleaners",o),P.declare("cleanRecursively",p);var T=P.declare("Layouter",Generator(q));q.prototype.init=function(){},q.prototype.destroy=function(){},q.prototype.sizingElement=function(){return!1},q.prototype.calcSizing=function(){},q.prototype.layout=function(){},q.prototype.updateActiveArea=function(){},q.prototype.childLayouterUpdated=function(){},q.prototype.childLaidoutUpdated=function(){};var U=P.declare("Laidout",Generator(r));r.prototype.init=function(){},r.prototype.destroy=function(){},r.prototype.layout=function(){},r.prototype.calcSizing=function(){};var V=P.declare("enhancedElements",{}),W=P.declare("unfinishedElements",{}),X=P.declare("sizingElements",{}),Y=P.declare("maintainedElements",{}),Z=P.declare("enhancedWindows",[]); P.declare("DescriptorQuery",s),s.fn={},s.fn.enhance=function(){for(var a,b=Resolver("page"),c=b("handlers"),d=b("enabledRoles"),e=0;a=this[e];++e)a.inits.length>0&&a._init();for(var a,e=0;a=this[e];++e)a._tryEnhance(c,d),a._tryMakeLayouter(""),a._tryMakeLaidout(""),a.conf.sizingElement&&(X[a.uniqueID]=a)},s.fn.discard=function(){for(var a,b=0;a=this[b];++b)a&&(a.discardNow(),a._unlist())},s.fn.queue=function(){for(var a,b=0;a=this[b];++b)a&&(y.unfinished[a.uniqueID]=a)},s.fn.getInstance=function(){return this.length?this[0].instance:null},s.fn.onlyBranch=function(){if(void 0==this.el)throw new Error("Branch of undefined element");var a={list:this};return this.length=0,t(this.el,a),this},s.fn.withBranch=function(){this.onlyBranch();var a=P("ApplicationConfig")().getConfig(this.el),b=this.el.getAttribute("role"),c=y(this.el,b,a);return c&&this.shift(c),this},v.prototype.clear=function(){this.instance=null,this.placement=null,this.el=null,this.stateful=null,this.controller=null,this.controllerID=null,this.controllerStateful=null,this.layouterParent=null,this.layouterEl=null},w.prototype._init=function(){this._updateContext();for(var a,b=0;a=this.inits[b];++b)a.call(this);this.inits.length=0},w.prototype._roleInit=function(){this.handlers.init[this.role]&&this.handlers.init[this.role].call(this,this.el,this.role,this.conf,this.context)},w.prototype._layouterInit=function(){this.layouter&&this.layouter.init(this.el,this.conf,this.sizing,this.layout)},w.prototype._laidoutInit=function(){this.laidout&&this.laidout.init(this.el,this.conf,this.sizing,this.layout)},w.prototype._updateContext=function(){if(void 0!=this.conf.controllerID){var a=y.all[this.conf.controllerID];return this.context.controllerID=a.uniqueID,this.context.controller=a.controller||a.instance,this.context.controllerStateful=this.context.controller.stateful||a.stateful,void 0}this.context.el=null,this.context.controller=null;for(var b=this.el.parentNode;b;b=b.parentNode)if(b.uniqueID){var a=V[b.uniqueID];a&&(null==this.context.layouterParent&&a.layouter&&(this.context.layouterParent=a.layouter,this.context.layouterEl=a.el),null==this.context.el&&(this.state.enhanced||this.state.needEnhance)&&(this.context.el=b,this.context.uniqueID=b.uniqueID,this.context.instance=a.instance,this.context.stateful=a.stateful),null==this.context.controller&&a.conf.controller&&(this.context.controllerID=a.uniqueID,this.context.controller=a.controller||a.instance,this.context.controllerStateful=this.context.controller?this.context.controller.stateful||a.stateful:null))}},w.prototype._updateLayouterContext=function(){this.context.el=null,this.context.controller=null;for(var a=this.el.parentNode;a;a=a.parentNode)if(a.uniqueID){var b=V[a.uniqueID];b&&null==this.context.layouterParent&&b.layouter&&(this.context.layouterParent=b.layouter,this.context.layouterEl=b.el)}},w.prototype.discardHandler=function(){},w.prototype.ensureStateful=function(){if(!this.stateful){var a=this.stateful=P("StatefulResolver")(this.el,!0);this.state=a("state"),a.set("sizing",this.sizing),a.set("layout",this.layout),a.on("change","state",this,this.onStateChange)}},w.prototype.onStateChange=function(a){switch(a.symbol){case"expanded":a.data.layout.queued=!0}},w.prototype.getAttribute=function(a){return this.el.getAttribute(a)},w.prototype.setAttribute=function(a,b){return this.el.setAttribute(a,b)},w.prototype.setInstance=function(a){this._initController(),this.instance=a,this._setInstance()},w.prototype._initController=function(){this._updateContext();var a=this.getController();a&&!a.__init_called&&a.init&&(a.init(this.el,this.config,this.context),a.__init_called=!0)},w.prototype._setInstance=function(){if(this.state.enhanced=this.instance===!1?!1:!0,this.state.needEnhance=!this.state.enhanced,this.state.enhanced){var a=this.getController();a&&(a.enhanced&&a.enhanced(this.el,this.instance,this.config,this.context),a.__enhanced=a.__enhanced?a.__enhanced+1:1),this.sizingHandler=this.handlers.sizing[this.role],this.layoutHandler=this.handlers.layout[this.role],this.layoutHandler&&this.layoutHandler.throttle&&(this.layout.throttle=this.layoutHandler.throttle);var b=this.handlers.discard[this.role];b&&(this.discardHandler=b),this.sizingHandler!==!1&&(X[this.uniqueID]=this),this.layoutHandler&&(this.layout.enable=!0,Y[this.uniqueID]=this)}},w.prototype._tryEnhance=function(a,b){this.state.needEnhance&&(void 0==a.enhance,this.role&&a.enhance[this.role]&&b[this.role]&&(this._initController(),this.instance=a.enhance[this.role].call(this,this.el,this.role,this.conf,this.context),this._setInstance()))},w.prototype._tryMakeLayouter=function(a){if(this.conf.layouter&&void 0==this.layouter){this._updateLayouterContext();var b=T.variants[this.conf.layouter];b&&(this.layouter=this.el.layouter=b.generator(a,this.el,this.conf,this.context.layouterParent),this.context.layouterParent&&(X[this.uniqueID]=this),b.generator.prototype.hasOwnProperty("layout")&&(this.layout.enable=!0,Y[this.uniqueID]=this),this.inits.push(this._layouterInit))}},w.prototype._tryMakeLaidout=function(a){if(this.conf.laidout&&void 0==this.laidout){this._updateLayouterContext();var b=U.variants[this.conf.laidout];b&&(this.laidout=this.el.laidout=b.generator(a,this.el,this.conf,this.context.layouterParent),X[this.uniqueID]=this,b.generator.prototype.hasOwnProperty("layout")&&(this.layout.enable=!0,this.layout.queued=!0,Y[this.uniqueID]=this),this.inits.push(this._laidoutInit))}},w.prototype.refresh=function(){var a=P("getActiveArea"),b=!1;if(this.el&&null==this.el.stateful&&this.liveCheck(),this.layout.area!=a()&&(this.layout.area=a(),b=!0),b||this.layout.queued){this.layoutHandler&&this.layoutHandler(this.el,this.layout,this.instance);var c=this.layouter,d=this.laidout;c&&c.layout(this.el,this.layout,this.laidouts()),d&&(d.layout(this.el,this.layout),this.context.layouterEl&&this.context.layouterEl.stateful.set("layout.queued",!0)),this.layout.queued=!1}},w.prototype.laidouts=function(){var a=[];for(var b in X){var c=X[b];c.context.layouterParent==this.layouter&&c.laidout&&a.push(c.el)}return a},w.prototype._domCheck=function(){var a=document.body==this.el||P("contains")(document.body,this.el);a||this.discardNow()},w.prototype.liveCheck=function(){this.state.enhanced&&!this.state.discarded&&this._domCheck()},w.prototype._null=function(){this.instance=null,this.controller=null,this.sizingHandler=void 0,this.layoutHandler=void 0,this.layouter=void 0,this.laidout=void 0,this.sizing.currentStyle=null,this.layout.currentStyle=null,this.layout.enable=!1,this.context&&this.context.clear(),this.context=void 0,this._updateContext=function(){}},w.prototype.discardNow=function(){this.state.discarded||(p(this.el),this._null(),this.el=void 0,this.state.enhanced=!1,this.state.discarded=!0)},w.prototype._unlist=function(a){this.state.discarded=!0,this.layout.enable&&delete Y[this.uniqueID],X[this.uniqueID]&&delete X[this.uniqueID],W[this.uniqueID]&&delete W[this.uniqueID],a&&delete V[this.uniqueID],this._null()},w.prototype._queueLayout=function(){this.layout.displayed!=this.sizing.displayed&&(this.layout.displayed=this.sizing.displayed,this.layout.queued=!0),(this.layout.width!=this.sizing.width||this.layout.height!=this.sizing.height)&&(this.layout.oldWidth=this.layout.width,this.layout.oldHeight=this.layout.height,this.layout.width=this.sizing.width,this.layout.height=this.sizing.height,this.layout.queued=!0),(this.layout.contentWidth!=this.sizing.contentWidth||this.layout.contentHeight!=this.sizing.contentHeight)&&(this.layout.oldContentWidth=this.layout.contentWidth,this.layout.oldContentHeight=this.layout.contentHeight,this.layout.contentWidth=this.sizing.contentWidth,this.layout.contentHeight=this.sizing.contentHeight,this.layout.queued=!0)},w.prototype._updateDisplayed=function(){this.sizing.displayed=!(0==this.sizing.width&&0==this.sizing.height)},w.prototype._updateDisplayedNotNone=function(){this.placement.manually(["display"]),this.sizing.displayed="none"!=this.placement.style.display},w.prototype.checkSizing=function(){var a=this.sizing.track;this.sizing.width=this.el[a.sizeBy+"Width"],this.sizing.height=this.el[a.sizeBy+"Height"],this._updateDisplayed(),this.sizing.displayed?(this.placement.compute(),a.contentWidth&&(this.sizing.contentWidth=this.el[a.contentBy+"Width"]),a.contentHeight&&(this.sizing.contentHeight=this.el[a.contentBy+"Height"]),a.scrollTop&&(this.sizing.scrollTop=this.el.scrollTop),a.scrollLeft&&(this.sizing.scrollLeft=this.el.scrollLeft),this.sizingHandler&&this.sizingHandler(this.el,this.sizing,this.instance),this.laidout&&this.laidout.calcSizing(this.el,this.sizing),this.context.layouterParent&&this.context.layouterParent.calcSizing(this.el,this.sizing,this.laidout),this.sizing.forceLayout&&(this.sizing.forceLayout=!1,this.sizing.queued=!0),this._queueLayout()):this.layout.displayed&&(this.layout.displayed=!1,this.layout.queued=!0)},w.prototype.applyStyle=function(){for(var a in this.layout.style)this.el.style[a]=this.layout.style[a]},w.prototype.getController=function(){return this.context?this.context.controller:null},w.prototype.query=function(a){var b=s(a,this.el);return b};var $=555;y.all=V,y.unfinished=W,y.query=s,y.maintainer=null,P.declare("EnhancedDescriptor",y),y.discardAll=z,y.refreshAll=function(){if(void 0!=document.body){for(var a in Y){var b=Y[a];b.inits.length>0&&b._init()}for(var a in X){var b=X[a];b.checkSizing()}for(var a in Y){var b=Y[a];b.laidout&&b.layout.enable&&!b.state.discarded&&b.refresh()}for(var a in Y){var b=Y[a];b.laidout||!b.layout.enable||b.state.discarded||b.refresh()}for(var a in X){var b=X[a];b.layout.style&&(b.applyStyle(),b.layout.style=void 0),b.layout.queued=!1}}},y.maintainAll=function(){if(void 0!=document.body)for(var a in Y){var b=Y[a];b.liveCheck(),b.state.discarded&&(b.el&&p(b.el),b._unlist())}},y.get=function(a){return"object"==typeof a?a.uniqueID?this.all[a.uniqueID]:null:this.all[a]},Z.notifyAll=function(){for(var a,b=0;a=Z[b];++b)a.notify(ev)},Z.discardAll=function(){for(var a,b=0;a=Z[b];++b)a.window&&a.window.close();Z=null,P.set("enhancedWindows.length",0)},P.set("instantiatePageSingletons",B),P.set("_queueDelayedAssets",function(){});var _=!!document.documentElement.getAttribute("essential-testing"),ab=_;window.widget&&(widget.notifyContentExited=function(){E()}),window.device||(G(),a.addEventListener?a.addEventListener("load",D,!1):a.attachEvent("onload",D),a.addEventListener?a.addEventListener("unload",E,!1):a.attachEvent("onunload",E));var bb=P.declare("console",{});P.declare("setStubConsole",H),P.declare("setWindowConsole",I),window.console?I():H(),P.declare("htmlEscape",J);var cb=Resolver("translations",{}),db=window.navigator.userLanguage||window.navigator.language||"en";cb.declare("defaultLocale",db),cb.declare("locale",db),cb.declare("locales",{}),cb.declare("keys",{}),cb.declare("phrases",{}),cb.setLocales=L,cb.setKeysForLocale=M,N(cb),P.set("translate",cb._),cb.makeKeyTranslationSubset=O}(window),!function(){function a(a,b){return a!==b&&(a.contains?a.contains(b):!0)}function b(a,b){return!!(16&a.compareDocumentPosition(b))}function c(){return!1}function d(a,b){"object"==typeof a&&"number"==typeof a.length&&(a=a.join("")),"object"==typeof b&&"number"==typeof b.length&&(b=b.join("")),a&&b&&(""+a+""),""+b+""));var c=(a||"")+(b||"");return"/.test(c)===!1&&(c=""+c+""),/<\/html>/.test(c)===!1&&(c=""+c+""),c=c.replace("0)for(var e,g=0;e=b.attributes[g];++g)d.setAttribute(e.nodeName,b.getAttribute(e.nodeName));if(c&&b.childNodes&&b.childNodes.length>0)for(var h,g=0;h=b.childNodes[g];++g)d.appendChild(f(a,h,c));return d}return a.createTextNode(b.nodeValue)}function g(a){if(void 0==eb){for(var b,c=[""),eb=c.join("")}return a.indexOf("")>=0||a.indexOf("")>=0?(a=a.replace("",""+eb),a=a.replace("",""+eb)):(a=a.replace("1&&(h=g,--d),"object"==typeof e&&(f=e,e=f.tagName||"span",--c),f&&f.nodeName&&f.attributes&&"#"!=f.nodeName[0]){for(var i,j={},k=0;i=f.attributes[k];++k)j[i.name]=i.value;f=j}var l,m=h.createElement(e),n=!1,o=!1;for(var p in f)switch(p){case"tagName":break;case"class":void 0!==f[p]&&(m.className=f[p]);break;case"style":void 0!==f[p]&&(m.style.cssText=f[p]);break;case"src":void 0!==f[p]&&(m[p]=/cachebuster=/.test(f[p])?f[p].replace(/cachebuster=*[0-9]/,"cachebuster="+String((new Date).getTime())):f[p]);break;case"data-role":if("object"==typeof f[p]){var q=JSON.stringify(f[p]);m.setAttribute(p,q.substring(1,q.length-1))}else m.setAttribute(p,f[p]);break;case"id":case"className":case"rel":case"lang":case"language":void 0!==f[p]&&(m[p]=f[p]);break;case"set impl":f[p]&&(m.impl=U.impl(m));break;case"append to":l=f[p];break;case"enhanced element":n=f[p];break;case"enhance element":o=f[p];break;case"make stateful":Z("StatefulResolver")(m,f[p]);break;case"onload":V(m,f.onload);break;case"onclick":case"onmousemove":case"onmouseup":case"onmousedown":m.addEventListener?m.addEventListener(p.substring(2),f[p],!1):m.attachEvent&&m.attachEvent(p,f[p]);break;default:null!=f[p]&&m.setAttribute(p,f[p])}for(var r=[],k=c;d>=k;++k){var s=arguments[k];"object"==typeof s&&"length"in s?r.concat(s):"string"==typeof s&&r.push(arguments[k])}return r.length&&mb(h,m,r.join("")),l&&l.appendChild(m),n&&U.query([m]).queue(),o&&U.query([m]).enhance(),m}function V(a,b){a.onload=function(a){this.onloadDone||(this.onloadDone=!0,b.call(this,a||event))},a.onreadystatechange=function(a){"loaded"!==this.readyState&&"complete"!==this.readyState||this.onloadDone||(this.onloadDone=!0,b.call(this,a||event))}}function W(a,b){return U("SCRIPT",a,b)}function X(a,b,c){this.bounds={},this.style={},this.track=b||["display","visibility","marginLeft","marginRight","marginTop","marginBottom"],this.calcBounds=c,this.compute(a||null)}function Y(a){var b="pixel"+a.substring(0,1).toUpperCase()+a.substring(1);return function(c,d){var e=c.style[a],f=c.runtimeStyle[a];try{c.runtimeStyle[a]=c.currentStyle[a],c.style[a]=d||0,d=c.style[b]+"px"}catch(g){}return c.style[a]=e,c.runtimeStyle[a]=f,d}}var Z=Resolver("essential",{}),$=Z("console"),_=Z("EnhancedDescriptor"),ab=navigator.userAgent.indexOf("; MSIE ")>-1&&navigator.userAgent.indexOf("; Trident/")>-1;Z.declare("baseUrl",location.href.substring(0,location.href.split("?")[0].lastIndexOf("/")+1));var bb=document.getElementsByTagName("BASE")[0];if(bb){var cb=bb.href;"/"!=cb.charAt(cb.length-1)&&(cb+="/"),Z.set("baseUrl",cb)}var db;db=document.documentElement.contains?a:document.documentElement.compareDocumentPosition?b:c,Z.declare("contains",db);var eb,fb="template message abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),gb=444;Z.declare("importHTMLDocument",h),Z.declare("createHTMLDocument",i);var hb={form:{role:"form"},iframe:{role:"presentation"},object:{role:"presentation"},a:{role:"link"},img:{role:"img"},label:{role:"note"},input:{role:"textbox",type:{range:"slider",checkbox:"checkbox",radio:"radio",button:"button",submit:"button",reset:"button"}},select:{role:"listbox"},button:{role:"button"},textarea:{role:"textbox"},fieldset:{role:"group"},progress:{role:"progressbar"},"default":{role:"default"}};j.ROLE=hb,Z.set("effectiveRole",j),y.prototype.__=function(a){if(a)for(var b in a)this[b]=a[b]},y.prototype.cancelable=!0,y.prototype.create=r,y.prototype.init=s,y.prototype.trigger=w,"function"!=typeof document.createEvent&&(y.prototype.create=q,y.prototype.trigger=x),z.prototype=new y,z.prototype.type="MouseEvents",z.prototype.init=v,z.prototype.copy=n,A.prototype=new y,A.prototype.type="MouseEvents",A.prototype.init=v,A.prototype.copy=o,B.prototype=new y,B.prototype.type="KeyboardEvent",B.prototype.init=s,B.prototype.copy=k,C.prototype=new y,C.prototype.type="FocusEvent",C.prototype.init=t,C.prototype.cancelable=!1,C.prototype.copy=l,D.prototype=new y,D.prototype.type="FocusEvent",D.prototype.init=t,D.prototype.cancelable=!1,D.prototype.copy=l,E.prototype=new y,E.prototype.type="UIEvent",E.prototype.init=u,E.prototype.cancelable=!1,E.prototype.copy=m;var ib={1:0,2:2,4:1},jb={click:new z({cancelable:!1}),dblclick:new z({cancelable:!1}),contextmenu:new z({cancelable:!1}),mousemove:new z({cancelable:!1}),mouseup:new z,mousedown:new z,mousewheel:new z({cancelable:!1,type:"MouseWheelEvent"}),wheel:new z({type:"MouseEvent"}),mouseenter:new z({cancelable:!1}),mouseleave:new z({cancelable:!1}),mouseout:new A,mouseover:new A,keyup:new B,keydown:new B,keypress:new B,blur:new D,focus:new D,focusin:new D,focusout:new D,copy:new C,cut:new C,change:new C,selectstart:new C,scroll:new E,reset:new C,submit:new C,select:new E,abort:new E,error:new E,haschange:new E,load:new E,unload:new E,resize:new E,"":{}};for(var kb in jb)jb[kb].name=kb;I.prototype.relatedTarget=null,I.prototype.withMouseInfo=F,I.prototype.withActionInfo=G,I.prototype.withDefaultSubmit=H,I.prototype.stopPropagation=function(){this._original.cancelBubble=!0},I.prototype.preventDefault=function(){this.defaultPrevented=!0},I.prototype.isDefaultPrevented=function(){return this.defaultPrevented},I.prototype.CAPTURING_PHASE=1,I.prototype.AT_TARGET=2,I.prototype.BUBBLING_PHASE=3,I.prototype.trigger=function(a){return jb[this.type].trigger(a||this.target,this._original)};var lb;lb=navigator.userAgent.match(/Firefox\//)?Z.declare("MutableEvent",M):navigator.userAgent.match(/MSIE /)&&!navigator.userAgent.match(/Opera/)?Z.declare("MutableEvent",N):Z.declare("MutableEvent",L),Z.declare("addEventListeners",P),Z.declare("removeEventListeners",Q),Z.declare("getScrollOffsets",R),Z.declare("getPageOffsets",S);var mb=function(a,b,c){b.innerHTML=c};ab&&(mb=T),Z.set("HTMLElement",U),U.query=Z("DescriptorQuery"),U.getEnhancedParent=function(a){for(a=a.parentNode;a;a=a.parentNode){var b=_.all[a.uniqueID];if(b&&(b.state.enhanced||b.state.needEnhance))return a}return null},U.discard=function(a,b){this.query(a).discard(),b||a.parentNode.removeChild(a)},Z.set("HTMLScriptElement",W);Z.declare("ElementPlacement",Generator(X));X.prototype.setElement=function(a){this.el=a,this.computes=[],this.el&&this.el.currentStyle&&(void 0==document.defaultView||void 0==document.defaultView.getComputedStyle)&&(this._setComputed=this._setComputedIE,this._compute=this._computeIE),void 0==document.body.getBoundingClientRect().width&&(this._bounds=this._boundsIE),this.calcBounds===!1&&(this._bounds=function(){}),this.doCompute=!(null==this.el||1!==this.el.nodeType),this.computes=this._getComputes(this.track)},X.prototype.setTrack=function(a){this.track=a,this.computes=this._getComputes(this.track)},X.prototype._getComputes=function(a){for(var b,c=[],d=0;this.doCompute&&(b=a[d]);++d)switch(b){case"display":case"visibility":case"breakBefore":case"breakAfter":c.push(this._compute_simple);break;default:c.push(this._compute)}return c},X.prototype.compute=function(a){if(void 0!=a&&this.setElement(a),(void 0==a||db(document.body,a))&&this.doCompute){this.calcBounds!==!1&&this._bounds(),this._setComputed();for(var b,c=0;b=this.computes[c];++c)this.style[this.track[c]]=b.call(this,this.track[c])}},X.prototype.manually=function(a){var b=this._getComputes(a);this._setComputed();for(var c,d=0;c=b[d];++d)this.style[a[d]]=c.call(this,a[d])},X.prototype._bounds=function(){this.bounds=this.el.getBoundingClientRect()},X.prototype._boundsIE=function(){var a=this.el.getBoundingClientRect();this.bounds={width:a.right-a.left,height:a.bottom-a.top,left:a.left,right:a.right,top:a.top,bottom:a.bottom}},X.prototype.KEYWORDS={medium:"2px"},X.prototype.CSS_TYPES={"border-width":"size","border-left-width":"size","border-right-width":"size","border-bottom-width":"top","border-top-width":"top",borderWidth:"size",borderLeftWidth:"size",borderRightWidth:"size",borderBottomWidth:"top",borderTopWidth:"top",padding:"size","padding-left":"size","padding-right":"size","padding-top":"top","padding-bottom":"top",paddingLeft:"size",paddingRight:"size",paddingTop:"top",paddingBottom:"top",margin:"size","margin-left":"size","margin-right":"size","margin-top":"top","margin-bottom":"top",marginLeft:"size",marginRight:"size",marginTop:"top",marginBottom:"top","font-size":"size",fontSize:"size","line-height":"top",lineHeight:"top","text-indent":"size",textIndent:"size",width:"size",height:"top","max-width":"size","max-height":"top","min-width":"size","min-height":"top",maxWidth:"size",maxHeight:"top",minWidth:"size",minHeight:"top",left:"size",right:"size",top:"top",bottom:"top"},X.prototype.OFFSET_NAME={left:"offsetLeft",width:"offsetWidth",top:"offsetTop",height:"offsetHeight"},X.prototype.CSS_NAME={backgroundColor:"background-color",backgroundImage:"background-image",backgroundPosition:"background-position",backgroundRepeat:"background-repeat",borderWidth:"border-width",borderLeft:"border-left",borderRight:"border-right",borderTop:"border-top",borderBottom:"border-bottom",borderLeftWidth:"border-left-width",borderRightWidth:"border-right-width",borderBottomWidth:"border-bottom-width",borderTopWidth:"border-top-width",paddingLeft:"padding-left",paddingRight:"padding-right",paddingTop:"padding-top",paddingBottom:"padding-bottom",marginLeft:"margin-left",marginRight:"margin-right",marginTop:"margin-top",marginBottom:"margin-bottom",breakBefore:"break-before",breakAfter:"break-after",fontSize:"font-size",lineHeight:"line-height",textIndent:"text-indent"},X.prototype.JS_NAME={"background-color":"backgroundColor","background-image":"backgroundImage","background-position":"backgroundPosition","background-repeat":"backgroundRepeat","border-width":"borderWidth","border-left":"borderLeft","border-right":"borderRight","border-top":"borderTop","border-bottom":"borderBottom","border-left-width":"borderLeftWidth","border-right-width":"borderRightWidth","border-bottom-width":"borderBottomWidth","border-top-width":"borderTopWidth","padding-left":"paddingLeft","padding-right":"paddingRight","padding-top":"paddingTop","padding-bottom":"paddingBottom","margin-left":"marginLeft","margin-right":"marginRight","margin-top":"marginTop","margin-bottom":"marginBottom","break-before":"breakBefore","break-after":"breakAfter","alt breakBefore":"pageBreakBefore","alt breakAfter":"pageBreakAfter","font-size":"fontSize","line-height":"lineHeight","text-indent":"textIndent"},X.prototype.TO_PIXELS_IE={left:Y("left"),top:Y("top"),size:Y("left")},X.prototype._compute_simple=function(a){var b=this.JS_NAME["alt "+a],c=this.el.style[a]||this.el.style[b];return c?c:this.el.currentStyle?this.el.currentStyle[a]||this.el.currentStyle[b]:this._computed[a]||this._computed[b]},X.prototype._setComputed=function(){this._computed=document.defaultView.getComputedStyle(this.el,null)},X.prototype._compute=function(a){var b=this._computed[a];return"string"==typeof b&&b.indexOf("%")>-1&&(b=this.el[this.OFFSET_NAME[a]]+"px"),b},X.prototype._setComputedIE=function(){},X.prototype._computeIE=function(a){var b;a=this.JS_NAME[a]||a;var c=this.el.currentStyle[a],d=this.KEYWORDS[c];if(void 0!==d)return d;if("0"==c||"px"==c.substring(c.length-2))return c;var e=this.TO_PIXELS_IE[this.CSS_TYPES[a]];return b=e?e(this.el,c):c}}(),!function(Scripted_gather){function outerHtml(a){for(var b,c=[a.tagName.toLowerCase()],d=0;b=COPY_ATTRS[d];++d){var e=a[b]||a.getAttribute(b)||null;null!=e&&c.push(b+'="'+e+'"')}var f="";return EMPTY_TAGS[c[0]]||(f=(a.text||a.innerHTML)+""),"<"+c.join(" ")+">"+f}function readElementState(a,b){for(var c in state_treatment){var d,e=state_treatment[c];e.read&&(d=e.read(a,c)),void 0==d&&(d=e["default"]),void 0!==d&&(b[c]=d)}}function reflectProperty(a,b,c){a[b]=!!c}function reflectAttribute(a,b,c){return"boolean"==typeof a[b]?(a[b]=!!c,void 0):(c?a.setAttribute(b,this["true"]||"true"):a.removeAttribute(b),void 0) }function reflectAria(a,b,c){c?a.setAttribute("aria-"+b,this["true"]||"true"):a.removeAttribute("aria-"+b)}function reflectAttributeAria(a,b,c){c?a.setAttribute(b,this["true"]||"true"):a.removeAttribute(b),c?a.setAttribute("aria-"+b,this["true"]||"true"):a.removeAttribute("aria-"+b)}function reflectPropertyAria(a,b,c){"boolean"==typeof a[b]?a[b]=!!c:c?a.setAttribute(b,this["true"]||"true"):a.removeAttribute(b),c?a.setAttribute("aria-"+b,this["true"]||"true"):a.removeAttribute("aria-"+b)}function reflectAriaProp(a,b,c){a[this.property]=c}function reflectBoolean(a,b,c){this.html5!==!1&&"boolean"==typeof a[this.html5||b]&&(a[this.html5]=!!c),this.aria&&"boolean"==typeof a[this.aria]&&(a[this.aria]=!!c),c?(this.aria&&a.setAttribute("aria-"+b,this["true"]||"true"),a.setAttribute(this.html5,this["true"]||"true")):(this.aria&&a.removeAttribute("aria-"+b),a.removeAttribute(this.html5))}function readPropertyAria(a,b){var c,d=a.getAttribute("aria-"+b);return null!=d&&(c="false"!=d&&""!=d),void 0==a[b]||a[b]===this["default"]&&void 0!==c||(c=a[b]),void 0!=c||contains(a.ownerDocument.body,a)||(d=a.getAttribute(b),null!=d&&(c="false"!=d)),c}function readAttribute(a,b){var c,d=a.getAttribute(b);return null!=d&&(c="false"!=d&&""!=d),c}function readAttributeAria(a,b){var c,d=a.getAttribute("aria-"+b);return null!=d&&(c="false"!=d&&""!=d),d=a.getAttribute(b),null!=d&&(c="false"!=d&&""!=d),c}function readBoolean(a,b){if(this.html5!==!1&&"boolean"==typeof a[this.html5||b]&&a[this.html5])return!0;if(this.aria&&"boolean"==typeof a[this.aria]&&a[this.aria])return!0;var c,d=a.getAttribute("aria-"+b);return null!=d&&(c="false"!=d&&""!=d),d=a.getAttribute(this.html5||b),null!=d&&(c="false"!=d&&""!=d),!!c}function readAria(a,b){var c,d=a.getAttribute("aria-"+b);return null!=d&&(c="false"!=d&&""!=d),d=a.getAttribute(b),null!=d&&(c="false"!=d&&""!=d),c}function reflectElementState(a){var b=a.data,c=state_treatment[a.symbol];c&&c.reflect(b,a.symbol,a.value);var d=b.stateful("map.class","undefined");if(d){var e=d.state[a.symbol],f=d.notstate[a.symbol],g=(e||"").split("%");g.length>1?DOMTokenList_tmplClass(b,g[0],g[1],a.value):DOMTokenList_eitherClass(b,e,f,a.value)}}function reflectElementClass(){var a=[];a[0]=state.disabled?"state-disabled":""}function ClassForState(){}function ClassForNotState(){}function make_Stateful_fireAction(a){return function(){var b=MutableEvent({target:a}).withActionInfo();fireAction(b)}}function Stateful_reflectStateOn(a,b){var c=a.stateful=this;ensureCleaner(a,statefulCleaner),0!=b&&readElementState(a,c("state")),c.on("change reflect","state",a,reflectElementState),nativeClassList||(a.classList=DOMTokenList(),DOMTokenList_mixin(a.classList,a.className));var d=a.stateful("map.class","undefined");d&&StatefulResolver.updateClass(c,a)}function statefulCleaner(){this.stateful&&(this.stateful.destroy(),this.stateful.discard&&this.stateful.discard(),this.stateful.fireAction=void 0,this.stateful=void 0)}function StatefulResolver(a,b){if(a&&a.stateful)return a.stateful;var c={};"object"==typeof b&&(c=b,b=b.mapClassForState);var d=Resolver({state:{}},c);return b&&(d.set("map.class.state",new ClassForState),d.set("map.class.notstate",new ClassForNotState)),d.fireAction=make_Stateful_fireAction(a),d.reflectStateOn=Stateful_reflectStateOn,a&&(d.reflectStateOn(a),d.uniqueID=a.uniqueID),d}function getUniquePageID(a){return void 0==a.uniquePageID&&(a.uniquePageID=NEXT_PAGE_ID++),a.uniquePageID}function activateArea(a){if(!pageResolver("state.livepage"))return _activeAreaName=a,void 0;for(var b in EnhancedDescriptor.all){var c=EnhancedDescriptor.all[b];c.layouter&&c.layouter.updateActiveArea(a,c.el)}_activeAreaName=a,EnhancedDescriptor.maintainAll()}function getActiveArea(){return _activeAreaName}function launchWindows(){for(var a,b=0;a=enhancedWindows[b];++b)a.openWhenReady&&(a.openNow(),delete a.openWhenReady);EnhancedWindow.prototype.open=EnhancedWindow.prototype.openNow}function _Scripted(){this.config=this.resolver.reference("config","undefined"),this.resolver.declare("resources",[]),this.resources=this.resolver.reference("resources"),this.resolver.declare("inits",[]),this.inits=this.resolver.reference("inits")}function delayedScriptOnload(){function a(){var a=this,b=a.getAttribute("src"),c=a.getAttribute("name");c&&(ApplicationConfig().modules[c]=!0),setTimeout(function(){var c=pageResolver(["state","loadingScriptsUrl"]);void 0!=c[b]?pageResolver.set(["state","loadingScriptsUrl",b],!1):void 0!=c[a.src.replace(serverUrl,"")]&&pageResolver.set(["state","loadingScriptsUrl",a.src.replace(serverUrl,"")],!1)},0)}return a}function updateScripts(a,b){function c(a){for(var c in b.loadingScriptsUrl){var d=b.loadingScriptsUrl[c];d&&d.rel==a&&!d.added&&(HTMLScriptElement(d.attrs),d.added=!0)}}c("preload"),b.preloading||(c("load"),b.authenticated&&c("protected"))}function describeLink(link,lang){var attrsStr=link.getAttribute("attrs"),attrs={};if(attrsStr)try{eval("attrs = {"+attrsStr+"}")}catch(ex){}switch(attrs.rel=link.rel,attrs.type=link.type||link.getAttribute("type")||"text/javascript",attrs.name=link.getAttribute("data-name")||link.getAttribute("name")||void 0,attrs.base=essential("baseUrl"),attrs.subpage="false"==link.getAttribute("subpage")||"false"==link.getAttribute("data-subpage")?!1:!0,attrs.onload=delayedScriptOnload(link.rel),attrs.src=(link.getAttribute("src")||"").replace(essential("baseUrl"),""),attrs.langOk=lang&&link.lang?link.lang==lang:!0,attrs.rel){case"preload":case"load":case"protected":attrs.langOk&&"text/javascript"==attrs.type&&(attrs.tagName="script",attrs["append to"]=link.ownerDocument.body)}return attrs}function onLoadingScripts(a){var b=this("state.loadingScriptsUrl"),c=!1,d=!1;for(var e in b){var f=b[e];f&&(c=!0,"preload"==f.rel&&(d=!0))}this.set("state.loadingScripts",c),this.set("state.preloading",d),0==a.value&&document.body&&essential("instantiatePageSingletons")()}function onLoadingConfig(a){var b=this("state.loadingConfigUrl"),c=!1;for(var d in b)b[d]&&(c=!0);this.set("state.loadingConfig",c),0==a.value&&document.body&&essential("instantiatePageSingletons")()}function _SubPage(a){this.resolver=Resolver({config:{},descriptors:{},handlers:pageResolver("handlers"),enabledRoles:pageResolver("enabledRoles")}),this.document=document,_Scripted.call(this),a&&(this.appConfig=a),this.body=document.createElement("DIV")}function handleResponse(a,b,c,d){a.status>=200&&a.status<300?c.call(b,a.responseText,a.getResponseHeader("Last-Modified")):"function"==typeof d&&d.call(b,a.status)}function cacheError(){pageResolver.set(["state","online"],!1)}function updateOnlineStatus(){var a=navigator.onLine;void 0!=a&&pageResolver.set(["state","online"],a)}function _ApplicationConfig(){this.resolver=pageResolver,this.uniquePageID=getUniquePageID(document),this.resolver.set(["pagesById",this.uniquePageID],this),this.document=document,this.head=this.document.head||this.document.body.previousSibling,this.body=this.document.body,_Scripted.call(this);var a=this.resolver.reference("state","undefined");for(var b in this.state)a.set(b,this.state[b]);this.state=a,document.documentElement.lang=this.state("lang"),this.pages=this.resolver.reference("pages",{generator:SubPage}),SubPage.prototype.appConfig=this,pageResolver.reflectStateOn(document.body,!1),this.prepareEnhance();var c=this.getConfig(this.body),d=this.body.getAttribute("role");(c||d)&&EnhancedDescriptor(this.body,d,c,!1,this),this._markPermanents(),this.applied=!0;var e=this.resolver("descriptors");for(var b in e)EnhancedDescriptor.unfinished[b]=e[b];var f=document.body.getAttribute("data-src")||document.body.getAttribute("src");f&&this._requiredPage(f)}function enhanceUnfinishedElements(){var a=pageResolver("handlers"),b=pageResolver("enabledRoles");for(var c in EnhancedDescriptor.unfinished){var d=EnhancedDescriptor.unfinished[c];d&&!d.state.initDone&&d._init()}for(var c in EnhancedDescriptor.unfinished){var d=EnhancedDescriptor.unfinished[c];d&&d.page.applied&&(d.ensureStateful(),d._tryEnhance(a,b),d._tryMakeLayouter(""),d._tryMakeLaidout(""),d.conf.sizingElement&&(sizingElements[c]=d),d.state.needEnhance||(EnhancedDescriptor.unfinished[c]=void 0))}}function onStateChange(a){var b=a.base;switch(a.symbol){case"livepage":if(a.value){var c=ApplicationConfig();b.loadingScripts||b.loadingConfig?(c.doInitScripts(),enhanceUnfinishedElements()):(--a.inTrigger,this.set("state.loading",!1),++a.inTrigger),_activeAreaName?activateArea(_activeAreaName):a.base.authenticated?activateArea(c.getAuthenticatedArea()):activateArea(c.getIntroductionArea())}break;case"loadingScripts":case"loadingConfig":--a.inTrigger,this.set("state.loading",b.loadingScripts||b.loadingConfig),++a.inTrigger;break;case"preloading":updateScripts(document,b);break;case"loading":if(0==a.value){updateScripts(document,b);var c=ApplicationConfig();document.body&&essential("instantiatePageSingletons")(),c.doInitScripts(),enhanceUnfinishedElements(),window.widget&&widget.notifyContentIsReady(),b.configured&&b.authenticated&&b.authorised&&b.connected&&!b.launched&&(this.set("state.launching",!0),document.body&&essential("instantiatePageSingletons")(),enhanceUnfinishedElements())}break;case"authenticated":if(b.livepage){updateScripts(document,b);var c=ApplicationConfig();b.authenticated?activateArea(c.getAuthenticatedArea()):activateArea(c.getIntroductionArea())}case"authorised":case"configured":if(!b.loading&&b.configured&&b.authenticated&&b.authorised&&b.connected&&!b.launched){this.set("state.launching",!0);var c=ApplicationConfig();document.body&&essential("instantiatePageSingletons")(),c.doInitScripts(),enhanceUnfinishedElements()}break;case"launching":case"launched":if(1==a.value){var c=ApplicationConfig();document.body&&essential("instantiatePageSingletons")(),c.doInitScripts(),enhanceUnfinishedElements(),"launched"==a.symbol&&0==b.requiredPages&&this.set("state.launching",!1)}break;case"requiredPages":0!=a.value||b.launching||this.set("state.launching",!1);break;case"lang":document.documentElement.lang=a.value;break;default:0==b.loading&&0==b.launching&&0==b.launched&&document.body&&essential("instantiatePageSingletons")()}!b.launched||b.authorised&&b.authenticated||b.autoUnlaunch===!1||this.set("state.launched",!1)}function onmessage(a){if(a.data){var b=JSON.parse(a.data);b&&b.enhanced&&b.enhanced.main.width&&b.enhanced.main.height&&(placement.setOptions(b.enhanced.options),placement.setMain(b.enhanced.main),placement.track())}}function placementBroadcaster(){placement.measure();for(var a,b=0;a=enhancedWindows[b];++b)a.notify();placement.notifyNeeded,placement.notifyNeeded=!1}function trackMainWindow(){placement.track()}function EnhancedWindow(a,b,c,d){this.name=b,this.url=a,this.options=c||{},this.notifyNeeded=!0,this.index=d,this.width=this.options.width||100,this.height=this.options.height||500,placement.ensureBroadcaster()}function defineWindow(a,b,c){if(b)for(var d,e=0;d=enhancedWindows[e];++e)if(b==d.name)return d.override(a,c),d.open(),void 0;var f=new EnhancedWindow(a,b,c,enhancedWindows.length);return enhancedWindows.push(f),f}function openSidebar(a){var b=HTMLElement("nav"),c=getSubPage(a);c.fetch(),b.innerHTML=c.body.content,document.body.appendChild(b)}function openWindow(a,b,c){var d=defineWindow(a,b,c);return d.open(),d}var essential=Resolver("essential",{}),console=essential("console"),DOMTokenList=essential("DOMTokenList"),MutableEvent=essential("MutableEvent"),ensureCleaner=essential("ensureCleaner"),escapeJs=essential("escapeJs"),HTMLElement=essential("HTMLElement"),serverUrl=location.protocol+"//"+location.host,HTMLScriptElement=essential("HTMLScriptElement"),EnhancedDescriptor=essential("EnhancedDescriptor"),sizingElements=essential("sizingElements"),enhancedWindows=essential("enhancedWindows"),contains=essential("contains"),importHTMLDocument=essential("importHTMLDocument"),COPY_ATTRS=["rel","href","media","type","src","lang","defer","async","name","content","http-equiv","charset"],EMPTY_TAGS={link:!0,meta:!0,base:!0,img:!0,br:!0,hr:!0,input:!0,param:!0},nativeClassList=!!document.documentElement.classList,state_treatment={disabled:{index:0,reflect:reflectPropertyAria,read:readPropertyAria,"default":!1,property:"ariaDisabled","true":"disabled"},readOnly:{index:1,read:readPropertyAria,"default":!1,reflect:reflectProperty},hidden:{index:2,reflect:reflectBoolean,read:readBoolean,aria:"ariaHidden",html5:"hidden"},required:{index:3,reflect:reflectBoolean,read:readBoolean,aria:"ariaRequired",html5:"required"},invalid:{index:4,reflect:reflectBoolean,read:readBoolean,aria:"ariaInvalid",html5:!1},expanded:{index:5,reflect:reflectBoolean,read:readBoolean,aria:"ariaExpanded"},checked:{index:6,reflect:reflectProperty,read:readPropertyAria,property:"ariaChecked"},pressed:{index:7,reflect:reflectBoolean,read:readBoolean,aria:"ariaPressed",html5:!1},selected:{index:8,reflect:reflectBoolean,read:readBoolean,"default":!1,aria:"ariaSelected",html5:"selected"},active:{index:9,reflect:reflectAttribute,read:readAttribute}};document.addEventListener&&(state_treatment.disabled.reflect=reflectAria);var DOMTokenList_eitherClass=essential("DOMTokenList.eitherClass"),DOMTokenList_mixin=essential("DOMTokenList.mixin"),DOMTokenList_tmplClass=essential("DOMTokenList.tmplClass");ClassForState.prototype.disabled="state-disabled",ClassForState.prototype.readOnly="state-readOnly",ClassForState.prototype.hidden="state-hidden",ClassForState.prototype.required="state-required",ClassForState.prototype.expanded="state-expanded",ClassForState.prototype.active="state-active",ClassForNotState.prototype.disabled="",ClassForNotState.prototype.readOnly="",ClassForNotState.prototype.hidden="",ClassForNotState.prototype.required="",ClassForNotState.prototype.expanded="",ClassForNotState.prototype.active="",essential.declare("statefulCleaner",statefulCleaner),essential.declare("StatefulResolver",StatefulResolver);var pageResolver=StatefulResolver(null,{name:"page",mapClassForState:!0});pageResolver.declare("config",{}),pageResolver.declare("descriptors",{}),pageResolver.reference("state").mixin({livepage:!1,background:!1,managed:!1,authenticated:!0,authorised:!0,connected:!0,online:!0,preloading:!1,loading:!0,loadingConfig:!1,loadingScripts:!1,configured:!0,fullscreen:!1,launching:!1,launched:!1,lang:document.documentElement.lang||"en",loadingScriptsUrl:{},loadingConfigUrl:{}}),Resolver("translations").on("change bind","locale",function(a){var b=a.value.split("-");1==b.length&&(b=a.value.split("_")),Resolver.exists("page")&&pageResolver.set("state.lang",b[0])}),pageResolver.reference("connection").mixin({loadingProgress:"",status:"connected",detail:"",userName:"",logStatus:!1}),pageResolver.declare("enabledRoles",{}),pageResolver.declare("handlers.init",{}),pageResolver.declare("handlers.enhance",{}),pageResolver.declare("handlers.sizing",{}),pageResolver.declare("handlers.layout",{}),pageResolver.declare("handlers.discard",{}),pageResolver.declare("templates",{}),pageResolver.reference("map.class.state").mixin({authenticated:"authenticated",loading:"loading",launched:"launched",launching:"launching",livepage:"livepage"}),pageResolver.reference("map.class.notstate").mixin({authenticated:"login"});var NEXT_PAGE_ID=1;getUniquePageID(document),StatefulResolver.updateClass=function(a){var b={};for(var c in state_treatment)b[c]=!0;for(var c in a("map.class.state"))b[c]=!0;for(var c in a("map.class.notstate"))b[c]=!0;for(var c in b)a.reference("state."+c,"null").trigger("reflect")};var oldActiveElement=null;pageResolver.set("activeElement",null),pageResolver.reference("activeElement").on("change",function(a){oldActiveElement&&StatefulResolver(oldActiveElement).set("state.active",!1),a.value&&StatefulResolver(a.value,!0).set("state.active",!0),oldActiveElement=a.value});var _activeAreaName;essential.set("activateArea",activateArea),essential.set("getActiveArea",getActiveArea),essential.set("launchWindows",launchWindows),pageResolver.declare("pages",{}),pageResolver.declare("pagesById",{}),pageResolver.declare("state.requiredPages",0),_Scripted.prototype.declare=function(a,b){this.config.declare(a,b),"object"==typeof b&&(b["introduction-area"]&&this.resolver.declare("introduction-area",b["introduction-area"]),b["authenticated-area"]&&this.resolver.declare("authenticated-area",b["authenticated-area"]))},_Scripted.prototype.modules={domReady:!0},_Scripted.prototype.context={require:function(a){if(void 0==this.modules[a]){var b=new Error("Missing module '"+a+"'");throw b.ignore=!0,b}},modules:_Scripted.prototype.modules},_Scripted.prototype._gather=Scripted_gather;var _singleQuotesRe=new RegExp("'","g");_Scripted.prototype._getElementRoleConfig=function(a,b){var c=null;if(b){var d=this.config(b);if(d){c={};for(var e in d)c[e]=d[e]}}if(a==this.body){var d=this.config("body");if(d){c=c||{};for(var e in d)c[e]=d[e]}}else if(a==this.head){var d=this.config("head");if(d){c=c||{};for(var e in d)c[e]=d[e]}}var f=a.getAttribute("data-role");if(f)try{c=c||{};var g=JSON.parse("{"+f.replace(_singleQuotesRe,'"')+"}");for(var e in g)c[e]=g[e]}catch(h){console.debug("Invalid config: ",f,h),c["invalid-config"]=f}return c},_Scripted.prototype.getElement=function(a){var b=a.split("."),c=this.document.body.querySelector("#"+b[0]);return c&&b.length>1&&(c=c.getElementByName(b[1])),c},_Scripted.prototype.declare=function(a,b){this.config.declare(a,b)},_Scripted.prototype.getConfig=function(a){if(a.id)return this._getElementRoleConfig(a,a.id);var b;try{b=a.getAttribute("name")}catch(c){return null}if(b)for(var d=a.parentNode;d&&d.tagName;){if(d.id)return this._getElementRoleConfig(a,d.id+"."+b);d=d.parentNode}return this._getElementRoleConfig(a)},_Scripted.prototype.doInitScripts=function(){for(var inits=this.inits(),i=0,s;s=inits[i];++i)if(s.parentNode&&!s.done)try{with(this.context.element=s,this.context.parentElement=s.parentElement||s.parentNode,this.context)eval(s.text);s.done=!0}catch(ex){}this.context["this"]=void 0},_Scripted.prototype._prep=function(a,b){for(var c=void 0!==a.firstElementChild?a.firstElementChild:a.firstChild;c;){if(c.attributes){var d=this.getConfig(c),e=c.getAttribute("role"),f=EnhancedDescriptor(c,e,d,!1,this);f&&(b.list&&b.list.push(f),f.layouterParent=b.layouter,f.conf.layouter&&(b.layouter=f)),null!=f&&f.state.contentManaged||this._prep(c,{layouter:b.layouter,list:b.list})}c=void 0!==c.nextElementSibling?c.nextElementSibling:c.nextSibling}},_Scripted.prototype.prepareEnhance=function(){this._gather(this.head.getElementsByTagName("script")),this._gather(this.body.getElementsByTagName("script")),this._prep(this.body,{})},_Scripted.prototype._queueAssets=function(){for(var a,b=this.document.getElementsByTagName("link"),c=this.resolver("state.lang"),d=0;a=b[d];++d){var e=a.attrs=describeLink(a,c);switch(a.rel){case"stylesheet":this.resources().push(a);break;case"protected":case"load":"script"==e.tagName&&(this.resolver.set(["state","loadingScripts"],!0),this.resolver.set(["state","loadingScriptsUrl",e.src],a));break;case"preload":"script"==e.tagName&&(this.resolver.set(["state","preloading"],!0),this.resolver.set(["state","loadingScripts"],!0),this.resolver.set(["state","loadingScriptsUrl",e.src],a),HTMLScriptElement(e),a.added=!0)}}updateScripts(document,this.resolver("state"))},pageResolver.on("change","state.loadingScriptsUrl",onLoadingScripts),pageResolver.on("change","state.loadingConfigUrl",onLoadingConfig);var SubPage=Generator(_SubPage,{prototype:_Scripted.prototype});SubPage.prototype.destroy=function(){this.applied&&this.unapplyBody(),this.head=void 0,this.body=void 0,this.document=void 0,this.url&&delete Resolver("page::pages::")[this.url],this.uniquePageID&&delete Resolver("page::pagesById::")[this.uniquePageID]},SubPage.prototype.page=function(a){console.error("SubPage application/config cannot define pages ("+a+")",this.url)},SubPage.prototype.headPrefix=[""];for(var metas=(document.head||document.documentElement.firstChild).getElementsByTagName("meta"),i=0,e;e=metas[i];++i)SubPage.prototype.headPrefix.push(outerHtml(e));SubPage.prototype.fetch=function(){var a=essential("XMLHttpRequest"),b=a();b.page=this,"function"==typeof b.overrideMimeType&&b.overrideMimeType("text/html"),b.open("GET",this.url,!0),b.setRequestHeader("Accept","text/html; q=0.9, */*; q=0.5");try{b.send(null),essential("isFileProtocol")?0===b.status||b.status>=200&&b.status<300?this.loadedPageDone(b.responseText):this.loadedPageError(b.status):b.onreadystatechange=function(){4==b.readyState&&handleResponse(b,this.page,this.page.loadedPageDone,this.page.loadedPageError)}}catch(c){this.loadedPageError(null,c)}},SubPage.prototype.loadedPageDone=function(a){var b=this.document=importHTMLDocument(a);if(this.uniquePageID=getUniquePageID(b),pageResolver.set(["pagesById",this.uniquePageID],this),this.head=b.head,this.body=b.body,this.documentLoaded=!0,this.prepareEnhance(),this.requiredForLaunch){var c=pageResolver("state.requiredPages")-1;pageResolver.set("state.requiredPages",c)}this.onload&&this.onload({})},SubPage.prototype.loadedPageError=function(a){this.documentError=a,this.documentLoaded=!0},SubPage.prototype.parseHTML=function(a,b){var c=this.options&&this.options["track main"]?'':b||"",d=this.document=importHTMLDocument(c,a);this.uniquePageID=getUniquePageID(d),pageResolver.set(["pagesById",this.uniquePageID],this),this.head=d.head,this.body=d.body,this.documentLoaded=!0,this.resolver.declare("handlers",pageResolver("handlers")),this.prepareEnhance()},SubPage.prototype.applyBody=function(){var a=void 0!==this.body.firstElementChild?this.body.firstElementChild:this.body.firstChild,b=document.body,c=void 0!==b.firstElementChild?b.firstElementChild:b.firstChild;if(!this.applied){for(var d=this.applied=[];a;)null==c?b.appendChild(a):b.insertBefore(a,c),d.push(a),a=void 0!==this.body.firstElementChild?this.body.firstElementChild:this.body.firstChild;this.doInitScripts();var e=this.resolver("descriptors");for(var f in e)EnhancedDescriptor.unfinished[f]=e[f];enhanceUnfinishedElements()}},SubPage.prototype.unapplyBody=function(){var a=document.body,b=void 0!==a.lastElementChild?a.lastElementChild:a.lastChild;if(null!=this.applied){var c=this.applied;this.applied=null;var d=this.resolver("descriptors");for(var e in d)EnhancedDescriptor.unfinished[e]=d[e];enhanceUnfinishedElements();for(var b,f=0;b=c[f];++f)this.body.appendChild(b)}},SubPage.prototype.doesElementApply=function(a){return a.attrs?0==a.attrs.subpage?!1:!0:"false"==a.getAttribute("subpage")?!1:"false"==a.getAttribute("data-subpage")?!1:!0},SubPage.prototype.getHeadHtml=function(){for(var a,b=ApplicationConfig().resources(),c=ApplicationConfig().resolver("state.loadingScriptsUrl"),d=[],e="",f=0;a=b[f];++f)this.doesElementApply(a)&&d.push(outerHtml(a));for(var g in c){var h=c[g];e=h.attrs.base,this.doesElementApply(h)&&d.push(outerHtml(h))}return this.options&&this.options["track main"]&&d.push(''),e&&d.push(''),d.push(""),escapeJs(this.headPrefix.join("")+d.join(""))},SubPage.prototype.getBodyHtml=function(){var a=["",this.body.innerHTML,""];return a.join("")},SubPage.prototype.getInlineUrl=function(){var a=['javascript:document.write("',"",this.getHeadHtml(),this.getBodyHtml(),"",'");'];return a.join("")},essential.set("updateOnlineStatus",updateOnlineStatus);var ApplicationConfig=essential.set("ApplicationConfig",Generator(_ApplicationConfig,{prototype:_Scripted.prototype,discarded:function(a){delete Resolver("page::pagesById::")[a.uniquePageID],a.document=null,a.head=null,a.body=null,a.resolver=null,a.config=null,a.resources=null,a.inits=null}}));ApplicationConfig.presets.declare("state",{}),ApplicationConfig.prototype.getIntroductionArea=function(){var a=this.resolver("pages");for(var b in a){var c=a[b];if(c.applied){var d=c.resolver("introduction-area","null");if(d)return d}}return this.resolver("introduction-area","null")||"introduction"},ApplicationConfig.prototype.getAuthenticatedArea=function(){var a=this.resolver("pages");for(var b in a){var c=a[b];if(c.applied){var d=c.resolver("authenticated-area","null");if(d)return d}}return this.resolver("authenticated-area","null")||"authenticated"},ApplicationConfig.prototype.page=function(a,b,c,d){var e=this.pages()[a];return void 0==e&&(e=this.pages()[a]=SubPage()),e.documentLoaded||(e.url=a,e.options=b,e.parseHTML(c,d)),e},ApplicationConfig.prototype._requiredPage=function(a){var b=this.loadPage(a,!0);this.bodySrc=a,this.appliedSrc=null,b.onload=function(){this.applyBody()}},ApplicationConfig.prototype.loadPage=function(a,b,c){var d=this.pages()[a];if(void 0==d){if(d=this.pages()[a]=SubPage(),d.url=a,d.requiredForLaunch=b,b){var e=pageResolver("state.requiredPages")+1;pageResolver.set("state.requiredPages",e)}d.onload=c}return d.documentLoaded||d.fetch(),d},EnhancedDescriptor.enhanceUnfinished=enhanceUnfinishedElements,pageResolver.on("change","state",onStateChange),ApplicationConfig.prototype.isPageState=function(a){return this.resolver("state."+a)},ApplicationConfig.prototype.setPageState=function(a,b){this.resolver.set(["state",a],b)},ApplicationConfig.prototype._markPermanents=function(){for(var a=void 0!==document.body.firstElementChild?document.body.firstElementChild:document.body.firstChild;a;){try{a.permanent=!0}catch(b){}a=void 0!==a.nextElementSibling?a.nextElementSibling:a.nextSibling}},window.widget&&(widget.pauseAudioVisual=function(){pageResolver.set("state.background",!0)},widget.didEnterWidgetMode=function(){pageResolver.set("state.background",!1)});var placement={x:void 0,y:void 0,width:void 0,height:void 0,options:{},main:{},notifyNeeded:!1,setOptions:function(a){this.options=a},setMain:function(a){this.main=a},measure:function(){var a=window.screenX,b=window.screenY,c=window.outerWidth,d=window.outerHeight;this.notifyNeeded=this.notifyNeeded||a!=this.x||b!=this.y||c!=this.width||d!=this.height,this.x=a,this.y=b,this.width=c,this.height=d,this.data=JSON.stringify({x:a,y:b,width:c,height:d})},track:function(){var a=this.x,b=this.y,c=this.width,d=this.height;if(this.options.glueHeight&&(b=this.main.y,d=this.main.height),this.options.glueWidth&&(a=this.main.x,c=this.main.width),this.options.glueLeft?a=this.main.x-this.options.width:this.options.glueRight&&(a=this.main.x+this.main.width),this.options.glueTop?b=this.main.y-this.options.height:this.options.glueBottom&&(b=this.main.y+this.main.height),a!=this.x||b!=this.y){var e=screen.width-this.width,f=screen.height-this.height;a=void 0===a?0:Math.min(Math.max(0,a),e),b=void 0===b?0:Math.min(Math.max(0,b),f)}(a!=this.x||b!=this.y)&&window.moveTo&&window.moveTo(a-screen.availLeft,b-screen.availTop),(c!=this.width||d!=this.height)&&window.resizeTo&&window.resizeTo(c,d),this.notifyNeeded=this.notifyNeeded||a!=this.x||b!=this.y||c!=this.width||d!=this.height,this.x=a,this.y=b,this.width=c,this.height=d},startTrackMain:function(){this.mainTracker||(this.mainTracker=setInterval(trackMainWindow,250),window.postMessage&&(window.addEventListener?window.addEventListener("message",onmessage,!1):window.attachEvent&&window.attachEvent("onmessage",onmessage)))},stopTrackMain:function(){this.mainTracker&&(clearInterval(this.mainTracker),this.mainTracker=null,window.postMessage&&(window.removeEventListener?window.removeEventListener("message",onmessage):window.attachEvent&&window.deattachEvent("onmessage",onmessage)))},ensureBroadcaster:function(){this.broadcaster||(placement.measure(),placement.notifyNeeded=!1,this.broadcaster=setInterval(placementBroadcaster,250))}};essential.declare("placement",placement),EnhancedWindow.prototype.override=function(a,b){this.url=a,this.options=b,this.notifyNeeded=!0},EnhancedWindow.prototype.content=function(){},EnhancedWindow.prototype.close=function(){this.window&&this.window.close(),this.window=null},EnhancedWindow.prototype.open=function(){this.openWhenReady=!0},EnhancedWindow.prototype.openNow=function(){this.close();var a="menubar=no,width="+this.width+",height="+this.height+",status=no,location=no,toolbar=no",b=ApplicationConfig().pages()[this.url],c=b?b.getInlineUrl():this.url;this.window=window.open(c,this.name,a);var d=this;setTimeout(function(){d.notify({})},50)},EnhancedWindow.prototype.anchor=function(a,b){var c={href:"javascript:void(0);"},d=this;return this.name&&(c.target=this.name),c.onclick=function(a){return d.open(),a&&a.preventDefault&&a.preventDefault(),!1},b["class"]&&(c["class"]=b["class"]),HTMLElement("a",c,a)},EnhancedWindow.prototype.notify=function(){if(this.window&&this.window.postMessage&&(this.notifyNeeded||placement.notifyNeeded)){var a=JSON.stringify(this.options);this.window.postMessage('{"enhanced":{"options":'+a+', "main":'+placement.data+"}}","*")}this.notifyNeeded=!1},EnhancedWindow.prototype.reposition=function(){this.options.focus&&this.window.focus&&this.window.focus()},essential.declare("defineWindow",defineWindow),essential.declare("openSidebar",openSidebar),essential.declare("openWindow",openWindow)}(function(scripts){for(var resources=this.resources(),inits=this.inits(),i=0,s;s=scripts[i];++i)switch(s.getAttribute("type")){case"application/config":try{with(this)eval(s.text)}catch(ex){Resolver("essential::console").error("Failed to parse application/config",s.text)}break;case"application/init":inits.push(s);break;default:var name=s.getAttribute("name");name&&null==s.getAttribute("src")&&(this.modules[name]=!0),s.parentNode==document.head&&resources.push(s)}}),!function(){function a(){this._object=h&&!k?new h:new window.ActiveXObject("Microsoft.XMLHTTP"),this._listeners=[]}function b(){return new a}function c(a){if(a._object.send(a._data),i&&!a._async)for(a.readyState=b.OPENED,f(a);a.readyState4?this._object.open(a,c,e,h,k):arguments.length>3?this._object.open(a,c,e,h):this._object.open(a,c,e),this.readyState=b.OPENED,d(this),this._object.onreadystatechange=function(){return!i||e?(l.readyState=l._object.readyState,f(l),l._aborted?(l.readyState=b.UNSENT,void 0):(l.readyState==b.DONE&&(delete l._data,g(l),j&&e&&window.detachEvent("onunload",n),m!=l.readyState&&d(l),m=l.readyState),void 0)):void 0}},b.prototype.send=function(a){b.onsend&&b.onsend.apply(this,arguments),arguments.length||(a=null),a&&a.nodeType&&(a=window.XMLSerializer?(new window.XMLSerializer).serializeToString(a):a.xml,this._headers["Content-Type"]||this._object.setRequestHeader("Content-Type","application/xml")),this._data=a,c(this) },b.prototype.sendEncoded=function(a){if(b.onsend&&b.onsend.apply(this,arguments),arguments.length||(a=null),a&&"object"==typeof a){var d=this._headers["Content-Type"];switch(d||(this._object.setRequestHeader("Content-Type","text/json"),d="text/json"),d){case"text/json":a=JSON.stringify(a);break;case"application/x-www-form-urlencoded":var e=[];for(var f in a)e.push(f+"="+encodeURIComponent(a[f]));a=e.join("&")}}this._data=a,c(this)},b.prototype.abort=function(){b.onabort&&b.onabort.apply(this,arguments),this.readyState>b.UNSENT&&(this._aborted=!0),this._object.abort(),g(this),this.readyState=b.UNSENT,delete this._data},b.prototype.getAllResponseHeaders=function(){return this._object.getAllResponseHeaders()},b.prototype.getResponseHeader=function(a){return this._object.getResponseHeader(a)},b.prototype.setRequestHeader=function(a,b){return this._headers||(this._headers={}),this._headers[a]=b,this._object.setRequestHeader(a,b)},b.prototype.addEventListener=function(a,b,c){for(var d,e=0;d=this._listeners[e];e++)if(d[0]==a&&d[1]==b&&d[2]==c)return;this._listeners.push([a,b,c])},b.prototype.removeEventListener=function(a,b,c){for(var d,e=0;(d=this._listeners[e])&&(d[0]!=a||d[1]!=b||d[2]!=c);e++);d&&this._listeners.splice(e,1)},b.prototype.dispatchEvent=function(a){var b={type:a.type,target:this,currentTarget:this,eventPhase:2,bubbles:a.bubbles,cancelable:a.cancelable,timeStamp:a.timeStamp,stopPropagation:function(){},preventDefault:function(){},initEvent:function(){}};"readystatechange"==b.type&&this.onreadystatechange&&(this.onreadystatechange.handleEvent||this.onreadystatechange).apply(this,[b]);for(var c,d=0;c=this._listeners[d];d++)c[0]!=b.type||c[2]||(c[1].handleEvent||c[1]).apply(this,[b])},b.prototype.toString=function(){return"[object XMLHttpRequest]"},b.toString=function(){return"[XMLHttpRequest]"},Resolver("essential").set("XMLHttpRequest",b)}(),!function(){"use strict";function a(a){if("string"==typeof a)var b=a,c=a;else{if("object"==typeof a.impl)return a.impl;var d=a.getAttribute?a.getAttribute("type"):null,b=d?a.nodeName.toLowerCase()+" "+d:a.nodeName.toLowerCase(),c=a.nodeName.toLowerCase()}return M[b]?M[b]:M[c]?M[c]:M.span}function b(a){this._init(a)}function c(a){this._init(a)}function d(a){this._init(a)}function e(a){this._init(a)}function f(a){this._init(a)}function g(a){this._init(a)}function h(a){this._init(a)}function i(a){this._init(a)}function j(a){this._init(a)}function k(a){this._init(a)}function l(a,b){var c=this.nodeName?this:this.root,d=c.ownerDocument.createDocumentFragment();return a&&c.impl.renderStream(d,this,b),d}function m(a){for(var b,c,d=a.split(";"),e={},f=0;c=d[f];++f)b=c.split(":"),e[b.shift().replace(/ /g,"")]=b.join(":").replace(/^ +/,"");return e}function n(a){for(var b,c=[],d=0,e=!1;d');document.body.appendChild(a),P=a.offsetWidth-a.clientWidth||7,document.body.removeChild(a)}return P}var E=Resolver("essential",{}),F=(E("ObjectType"),E("console")),G=E("MutableEvent"),H=E("StatefulResolver"),I=E("ApplicationConfig"),J=Resolver("page"),K=E("HTMLElement"),L=(E("callCleaners"),E("cleanRecursively"),E("addEventListeners"));K.impl=E.set("HTMLImplementation",a),K.fn=a.fn=b.prototype,K.fn._init=function(a){this.core=this;for(var b in a)this[b]=a[b]},c.prototype=new b,K.Button=c,d.prototype=new b,K.Select=d,e.prototype=new b,K.TextInput=e,f.prototype=new b,K.DateInput=f,g.prototype=new b,K.NumberInput=g,h.prototype=new b,K.Radio=h,i.prototype=new b,K.Checkbox=i,j.prototype=new b,K.Wrapper=j,k.prototype=new b,K.Fragment=k,k.prototype.copyAttributes=function(){};var M=a.IMPL={input:new e,"input search":new e,"input date":new f,"input time":new f,"input number":new g,"input range":new g,"input image":new b({getContent:function(){return""},setContent:function(){return""},getValue:function(){return""},setValue:function(){return""}}),"input button":new e,button:new c,"button radio":new h,"input radio":new h,"button checkbox":new i,"input checkbox":new i,select:new d,textarea:new b,img:new j,a:new j,iframe:new j,object:new j,fieldset:new j,form:new j,"#document-fragment":new k,span:new b};K.fn.isFragment=function(a){return"object"==typeof a&&a instanceof DocumentFragment},K.fn.isFragmentIE=function(a){return"object"==typeof a&&"#document-fragment"==a.nodeName},K.fn.copyAttributes=function(a,b,c){if(c&&void 0===c["class"]||(b.className=b.className?b.className+" "+a.className:a.className),(!c||void 0!==c.style&&""!=a.style.cssText)&&(b.style.cssText=a.style.cssText),c){for(var d in c)if("class"!=d&&"style"!=d){var e=a.getAttribute(d);null!=e&&e!==c[d]&&b.setAttribute(d,e)}}else for(var f,g=0;f=a.attributes[g];++g){var d=f.name;if(!this.IGNORE_ATTRIBUTES[d]){var e=a.getAttribute(d);null!=e?b.setAttribute(d,e):b.removeAttribute(d)}}},K.fn.CLONED_ATTRIBUTES={"class":"",style:"",size:"",cols:0,rows:0,role:"","data-role":"",name:"",id:"",title:"",dir:"",lang:"",language:"",accesskey:"",tabindex:0},K.fn.IGNORE_ATTRIBUTES={"class":!0,classList:!0,style:!0,layouter:!0,laidout:!0,impl:!0,stateful:!0,_cleaners:!0},K.describeStream=function(b,c){var d=[];d.cloneNode=l,null==b.impl&&(b.impl=a(b)),d.root=b;var e=b.childNodes[0];return d.prefix=e&&3==e.nodeType?e.nodeValue:"",this._describeStream(b,d,b.impl,c),d},K.forgetStream=function(a){for(var b,c=0;b=a[c];++c)"object"==typeof b&&b.forgetUnique&&b.forgetUnique()},K.fn.childWrapper=function(a,b,c,d){var e=this.uniqueForChild(b,d);e.original=b,e.toClone=b.cloneNode(!1);var f=b.childNodes[0];f&&3!=f.nodeType&&(f=null),f&&e.toClone.appendChild(e.toClone.ownerDocument.createTextNode(f.nodeValue)),e.idx=c.idx,e.parent=c.parent,e.attributes=e.describeAttributes(a,d),e.context=e.describeContext(a,d),e.decorators=e.describeDecorators(e,d);var g=b.getAttribute("repeat");e.repeat="string"==typeof g?parseFloat(g):1;for(var h in e.attributes)e.toClone.removeAttribute(h);return e.toClone.removeAttribute("repeat"),e},K.fn._cloneNode=function(a,b){return a.cloneNode(b)},K.fn._cloneNodeIE=function(a){var b=a.ownerDocument.createElement(a.tagName);return this.copyAttributes(a,b),a.firstChild&&b.appendChild(b.ownerDocument.createTextNode(a.firstChild.data)),b},/MSIE/.test(navigator.userAgent)&&(K.fn._cloneNode=K.fn._cloneNodeIE),K.fn.uniqueForChild=function(b,c){return a(b).makeUnique(c)},K.fn.makeUnique=function(){function a(){}return a.prototype=this,new a},K.fn.forgetUnique=function(){},K.fn.describeAttributes=function(a,b){var c={},d=b.DECORATORS||{};for(var e in d){var f=a.getAttribute(e);if(null!=f){var g={value:f,defaults:[],is_context:d[e].context,is_refs:d[e].refs,is_simple:d[e].simple};if(d[e].props&&(g.props=m(f)),d[e].refs){for(var h,i=[],j=f.indexOf(" ")>=0?f.split(" "):f.split(","),k=0;h=j[k];++k){var l=h.split(":");i[k]=/([!+-]*)(.*)/.exec(l[0]),i[k].mapping=l[1],i[k].name=j[k]=i[k][2]}g.name=j[0],g.parts=i,g.names=j}c[e]=g}}return c},K.fn.describeContext=function(a,b){for(var c=this;c;c=c.parent){var d=b.DECORATORS||{};for(var e in d)if(b.DECORATORS[e].context){var f=a.getAttribute(e);if(f)return f}}return b.defaultContext},K.fn.describeDecorators=function(a,b){var c=[];for(var d in a.attributes){var e=a.attributes[d],f=b.DECORATORS[d];if("function"==typeof f){var g=f.call(a,d,e);g&&c.push(g)}}return c},K.fn.decorate=function(){},K.fn.undecorate=function(){},K.fn.enhance=function(){},K.fn.cloneOriginal=function(){var a=this._cloneNode(this.toClone,!0);a.impl=this,this.decorate(a);for(var b,c=0;b=this.decorators[c];++c)b.call(this,a.state,a);return a},K.fn.setPrefix=function(a,b){null==a.firstChild?a.appendChild(a.ownerDocument.createTextNode("")):3!=a.firstChild.nodeType&&a.insertBefore(a.ownerDocument.createTextNode(""),a.firstChild),a.firstChild.nodeValue=b},K.fn.setPostfix=function(a,b){(null==a.lastChild||3!=a.lastChild.nodeType)&&a.appendChild(a.ownerDocument.createTextNode("")),a.lastChild.nodeValue=b},K._describeStream=function(a,b,c,d){for(var e,f=null,g=0,h=a.childNodes;e=h[g];++g)switch(e.nodeType){case 1:var i=c.childWrapper(a,e,{idx:g},d);i.postfix="",b.push(i),f=i,(e.firstElementChild||e.children&&e.children[0])&&(b.push(1),this._describeStream(e,b,i,d),b.push(-1));break;case 3:f&&(f.postfix=e.nodeValue);break;case 4:case 7:case 8:case 12:}},K.fn.renderStream=function(a,b,c){b.prefix&&a.appendChild(document.createTextNode(b.prefix));for(var d,e=a,f=[e],g=0;d=b[g];++g)if(-1===d)f.pop();else if(1===d)f.push(e);else{for(var h=f[f.length-1],i=0;i=0){for(var f,g=b.nodeValue.split(/{{|}}/),h=[],i=0,j=!1;i0||a.ctrlKey||a.altKey||a.shiftKey||a.metaKey)){Resolver("page").set("activeElement",b),b.parentNode.appendChild(b),a.preventDefault&&a.preventDefault();var c=new H;return c.track=function(a,c,d){b.style.left=c+"px",b.style.top=d+"px"},c.start(this,a),c.startY=b.offsetTop,c.startX=b.offsetLeft,c.maxY=document.body.offsetHeight-b.offsetHeight,c.maxX=document.body.offsetWidth-b.offsetWidth,!1}}}function k(a,b){if(a.querySelector&&!/; MSIE /.test(navigator.userAgent))return a.querySelector("[role="+b+"]");for(var c=a.firstChild;c;c=c.nextSibling)if(c.getAttribute){if(c.getAttribute("role")==b)return c;if(c.firstChild){var d=k(c,b);if(d)return d}}return null}function l(a,b,f){for(var l,m=f.template,n=f["content-template"],q=f["content-class"]||"dialog-content",r=f["content-role"],s=f["content-config"],t=[],u=0;l=a.childNodes[u];++u)t.push(l);if(m){var v=Resolver("page::templates","null")([m]);if(null==v)return!1;var w=v.content.cloneNode(!0);a.appendChild(w)}var x=a.getElementsByTagName("HEADER")[0],y=a.getElementsByTagName("FOOTER")[0],z=k(a,"content");if(n){var v=Resolver("page::templates","null")([n]);if(null==v)return!1;var w=v.content.cloneNode(!0);(z||a).appendChild(w)}else{for(null==z&&(z=U("div",{})),r&&z.setAttribute("role",r);t.length;)z.appendChild(t.shift());if(s){if("object"==typeof s){var l=JSON.stringify(s);s=l.substring(1,l.length-1)}z.setAttribute("data-role",s)}}if(z&&(z.className=((z.className||"")+" "+q).replace(" "," "),X(z).withBranch().enhance()),a.offsetHeight>document.body.offsetHeight){var A=document.body.offsetHeight-20;x&&(A-=x.offsetHeight),y&&(A-=y.offsetHeight),z.style.maxHeight=A+"px"}switch(f.placement?(f.placement.bottom?a.style.bottom=f.placement.bottom+"px":a.style.top=(f.placement.top||0)+"px",f.placement.right?a.style.right=f.placement.right+"px":a.style.left=(f.placement.left||0)+"px"):(jb+a.offsetHeight>document.body.offsetHeight&&(jb=fb),kb+a.offsetWidth>document.body.offsetWidth&&(gb+=ib,kb=gb,f.tile&&(lb+a.offsetHeight>document.body.offsetHeight&&(fb+=hb,lb=fb),jb=lb)),a.style.top=Math.max(0,Math.min(jb,document.body.offsetHeight-a.offsetHeight-12))+"px",a.style.left=Math.max(0,kb)+"px",f.tile?(kb+=a.offsetWidth+ib,lb=jb+a.offsetHeight+hb):(jb+=hb,kb+=ib)),x&&x.parentNode==a&&$(x,{mousedown:j}),a.tagName.toLowerCase()){case"form":a.onsubmit=c,a.__builtinSubmit=a.submit,a.submit=d,a.__builtinBlur=a.blur,a.blur=g,a.__builtinFocus=a.focus,a.focus=h;break;default:p(a.getElementsByTagName("BUTTON")),o(a.getElementsByTagName("BUTTON")),o(a.getElementsByTagName("A")),a.submit=e}return $(a,{click:i},!1),{}}function m(a){var b=a.offsetTop,c=a.offsetHeight,d=Math.max(0,Math.min(b,document.body.offsetHeight-c-12));b!=d&&(a.style.top=d+"px")}function n(){for(var a,b=0,c=X("[role=dialog]"),d=0;a=c[d];++d)a.state.enhanced&&!a.state.discarded&&++b;1==b&&(jb=fb,kb=gb)}function o(a){for(var b,c=0;b=a[c];++c)switch(b.tagName){case"button":case"BUTTON":b.setAttribute("role","button");break;case"a":case"A":b.setAttribute("role","link")}}function p(a){for(var b,c=0;b=a[c];++c)"submit"===b.type&&(b.setAttribute("type","button"),"submit"===b.type&&(b.type="submit"))}function q(a){return p(a.getElementsByTagName("BUTTON")),o(a.getElementsByTagName("BUTTON")),o(a.getElementsByTagName("A")),a.submit=f,$(a,{click:i},!1),{}}function r(){}function s(){}function t(){return{}}function u(a,b,c){if(void 0==window.Spinner)return!1;var d={lines:8,length:5,width:5,radius:8,color:"#fff",speed:1,trail:60,shadow:!1,hwaccel:!0,className:"spinner",zIndex:void 0!=c.zIndex?c.zIndex:2e9,top:"auto",left:"auto"};return new Spinner(d).spin(a)}function v(){}function w(a,b,c){c.stop(),a.innerHTML=""}function x(a,b){var c=Resolver(b||"default")(a,"null");return c?Generator(c):null}function y(a,b,c,d){if(c.template){var e=Resolver("page::templates","null")([c.template]);if(null==e)return!1;var f=e.content.cloneNode(!0);a.appendChild(f)}if(c.variant,c.generator){var g=x(c.generator,c.resolver);if(g){var h=g(a,b,c,d);return h}return!1}return{}}function z(){}function A(){}function B(a,b){b=b||{};var c={};for(var d in a)d in b||(c[d]=a[d]);var e=JSON.stringify(c);return e.substring(1,e.length-1)}function C(a,b){if(this.el=a,this.tagName=a.tagName,this.dataRole=B(b,{id:!0}),this.id=b.id||a.id,this.selector=b.selector||(this.id?"#"+this.id:null),"content"in a)this.content=a.content;else{for(this.content=a.content=a.ownerDocument.createDocumentFragment();a.firstChild;)this.content.appendChild(a.firstChild);var c={};this.stream=U.describeStream(this.content,c),this.content.cloneNode=this.stream.cloneNode.bind(this.stream)}}function D(a,b,c){var d=new C(a,c);return d.selector&&ab.set(["templates",d.selector],d),d}function E(){this.state.contentManaged=!0}function F(){this.state.contentManaged=!0}function G(a){for(var b=[];a&&a!=a.ownerDocument.body;)b.push(a),a=a.parentNode;return b}function H(){}function I(a){if(null==pb){a.preventDefault&&a.preventDefault();var b=this.parentNode.scrolled,c=new H;return c.track=function(a,c,d){b.scrollTop=d,b.stateful.set("pos.scrollTop",d)},c.start(this,a),c.startY=b.scrollTop,c.startX=b.scrollLeft,c.factorY=b.scrollHeight/c.el.offsetHeight,c.maxY=b.scrollHeight-b.clientHeight,!1}}function J(a){if(null==pb){a.preventDefault&&a.preventDefault();var b=this.parentNode.scrolled,c=new H;return c.track=function(a,c,d){b.stateful.set("pos.scrollTop",d),this.scrolledTo=d},c.start(this,a),c.startY=b.stateful("pos.scrollTop","0"),c.startX=b.stateful("pos.scrollLeft","0"),c.factorY=b.stateful("pos.scrollHeight","0")/c.el.offsetHeight,c.maxY=b.stateful("pos.scrollHeight","0")-b.clientHeight,!1}}function K(a){if(null==pb){a.preventDefault&&a.preventDefault();var b=this.parentNode.scrolled,c=new H;return c.track=function(a,c){b.scrollLeft=c,b.stateful.set("pos.scrollLeft",c)},c.start(this,a),c.startY=b.scrollTop,c.startX=b.scrollLeft,c.factorX=b.scrollWidth/c.el.offsetWidth,c.maxX=b.scrollWidth-b.clientWidth,!1}}function L(a){if(null==pb){a.preventDefault&&a.preventDefault();var b=this.parentNode.scrolled,c=new H;return c.track=function(a,c){b.stateful.set("pos.scrollLeft",c),this.scrolledTo=c},c.start(this,a),c.startY=b.stateful("pos.scrollTop","0"),c.startX=b.stateful("pos.scrollLeft","0"),c.factorX=b.stateful("pos.scrollWidth","0")/c.el.offsetWidth,c.maxY=b.stateful("pos.scrollWidth","0")-b.clientWidth,!1}}function M(a,b,c,d,e){this.enable=d.enable!==!1;var f=(cb(),d.horzvert.toLowerCase()),g=f+"-scroller";c.obscured&&(g+=" obscured"),c.overhang&&(g+=" overhang"),this.scrolled=a;var h=g;this.el=U("div",{"class":h},"
"),b.appendChild(this.el),this.contentName="content"+d.sizeName,this.scrollName="scroll"+d.sizeName,this.sizeName=this.sizeStyle=d.sizeName.toLowerCase(),this.posName=d.posName,this.posStyle=d.posName.toLowerCase(),this.autoHide=d.autoHide,this.trackScroll=0==d.trackScroll?!1:!0,this.sizing=a.stateful("sizing"),$(a,ob),$(this.el,{mousedown:e}),c.initialDisplay!==!1&&this.show()&&(this.hiding=setTimeout(this.hide.bind(this),parseInt(d.initialDisplay,10)||3e3))}function N(a,b){void 0==b.overhang&&(b.overhang=!!b.obscured),b.obscured=b.obscured!==!1;var c=this._getContainer(a,b),d=!(0==b.trackScrollVert||0==b.trackScroll),e=!(0==b.trackScrollHorz||0==b.trackScroll);a.stateful.declare("pos.scrollVert",d),a.stateful.declare("pos.scrollHorz",e),a.stateful.declare("pos.scrollTop",0),a.stateful.declare("pos.scrollLeft",0),a.stateful.set("sizing.track.sizeBy","client"),this.x=!1!==b.x,this.y=!1!==b.y,this.vert=new M(a,c,b,{enable:b.vert,horzvert:"Vert",trackScroll:d,sizeName:"Height",posName:"Top",thicknessName:"width",edgeName:"right"},d?I:J),this.horz=new M(a,c,b,{enable:b.horz,horzvert:"Horz",trackScroll:e,sizeName:"Width",posName:"Left",thicknessName:"height",edgeName:"bottom"},e?K:L),c.scrolled=a,T(c,!0),$(c,mb),c.scrollContainer="top",a.stateful.on("change","pos.scrollTop",{el:a,es:this},this.scrollTopChanged),a.stateful.on("change","pos.scrollLeft",{el:a,es:this},this.scrollLeftChanged)}function O(a,b,c){var d=c.template;if(d){var e=Resolver("page::templates","null")([d]);if(null==e)return!1;var f=e.content.cloneNode(!0);a.appendChild(f),X(a).onlyBranch().enhance()}a.style.cssText="position:absolute;left:0;right:0;top:0;bottom:0;overflow:scroll;";var g=new N(a,c);return g}function P(a,b,c){c.layout(a,b)}function Q(a,b,c){c.discard(a),a.stateful&&a.stateful.destroy()}var R=Resolver("essential",{}),S=(R("ObjectType"),R("console"),R("MutableEvent")),T=R("StatefulResolver"),U=(R("statefulCleaner"),R("HTMLElement")),V=(R("HTMLScriptElement"),R("Layouter")),W=R("Laidout"),X=R("DescriptorQuery"),Y=R("EnhancedDescriptor"),Z=R("callCleaners"),$=R("addEventListeners"),_=R("removeEventListeners"),ab=(R("ApplicationConfig"),Resolver("page")),bb=R("fireAction"),cb=R("scrollbarSize"),db=(location.protocol+"//"+location.host,R.declare("StageLayouter",Generator(a,V)));V.variant("area-stage",db),a.prototype.refreshClass=function(a){for(var b,c=[],d=0;b=this.areaNames[d];++d)b==this.activeArea?c.push(b+"-area-active"):c.push(b+"-area-inactive");var e=this.baseClass+c.join(" ");a.className!=e&&(a.className=e)},a.prototype.updateActiveArea=function(a,b){this.activeArea=a,this.refreshClass(b)};var eb=R.declare("MemberLaidout",Generator(b,W));W.variant("area-member",eb);var fb=100,gb=40,hb=32,ib=32,jb=fb,kb=gb,lb=fb;ab.set("handlers.enhance.dialog",l),ab.set("handlers.layout.dialog",m),ab.set("handlers.discard.dialog",n),ab.set("handlers.enhance.toolbar",q),ab.set("handlers.enhance.menu",q),ab.set("handlers.enhance.menubar",q),ab.set("handlers.enhance.navigation",q),ab.set("handlers.layout.toolbar",r),ab.set("handlers.discard.toolbar",s),ab.set("handlers.enhance.sheet",t),ab.set("handlers.enhance.spinner",u),ab.set("handlers.layout.spinner",v),ab.set("handlers.discard.spinner",w),ab.set("handlers.enhance.application",y),ab.set("handlers.layout.application",z),ab.set("handlers.discard.application",A),R.declare("JSON2Attr",B),C.prototype.getDataRole=function(){return this.dataRole},C.prototype.getAttribute=function(a){return this.el.getAttribute(a)},C.prototype.setAttribute=function(a,b){return this.el.setAttribute(a,b)},C.prototype.contentCloneFunc=function(a){return function(b){var c=a.ownerDocument.createDocumentFragment();if(!b)return c;for(var d=a.firstChild;d;d=d.nextSibling)switch(d.nodeType){case 1:c.appendChild(d.cloneNode(!0));break;case 3:c.appendChild(a.ownerDocument.createTextNode(d.data));break;case 8:}return c}},ab.set("handlers.enhance.template",D),ab.set("handlers.init.template",E),ab.set("handlers.sizing.template",!1),ab.set("handlers.init.templated",F);var mb={mousemove:function(){},mouseover:function(){var a=Y(this.scrolled).instance;this.stateful.movedOutInterval&&clearTimeout(this.stateful.movedOutInterval),this.stateful.movedOutInterval=null,this.stateful.set("state.over",!0),a.vert.show(),a.horz.show()},mouseout:function(){var a=this,b=Y(this.scrolled).instance;this.stateful.movedOutInterval&&clearTimeout(this.stateful.movedOutInterval),this.stateful.movedOutInterval=setTimeout(function(){a.stateful.set("state.over",!1),1!=a.stateful("state.dragging")&&(b.vert.hide(),b.horz.hide())},30)}},nb=!1,ob={scroll:function(a){var b=a?a.target||a.scrElement:event.srcElement;b.stateful("pos.scrollVert","0")&&b.stateful.set("pos.scrollTop",b.scrollTop),b.stateful("pos.scrollHorz","0")&&b.stateful.set("pos.scrollLeft",b.scrollLeft)},DOMMouseScroll:function(){},wheel:function(){},mousewheel:function(a){a=S(a).withMouseInfo();var b=G(a.target),c=nb&&a.deltaX>0&&b.every(function(a){return 0==a.scrollLeft}),d=nb&&a.deltaY>0&&b.every(function(a){return 0==a.scrollTop}),e=!1;if(this.stateful("pos.scrollVert","0"));else if(0!=a.deltaY){var f=Math.max(0,this.stateful("pos.scrollHeight","0")-this.offsetHeight),g=this.stateful("pos.scrollTop","0");g=Math.min(f,Math.max(0,g-a.deltaY)),this.stateful.set("pos.scrollTop",g),e=!0}if(this.stateful("pos.scrollHorz","0"));else if(0!=a.deltaX){var f=Math.max(0,this.stateful("pos.scrollWidth","0")-this.offsetWidth),h=this.stateful("pos.scrollLeft","0");h=Math.min(f,Math.max(0,h+a.deltaY)),this.stateful.set("pos.scrollLeft",h),e=!0}return e||c||d?(a.preventDefault(),!1):void 0}},pb=null;Resolver("page").set("activeMovement",null),H.prototype.track=function(){},H.prototype.start=function(a,b){var c=this;return this.el=a,this.event=b,this.startY=a.offsetTop,this.minY=0,this.maxY=1e3,this.startX=a.offsetLeft,this.minX=0,this.maxX=1e3,this.factorX=1,this.factorY=1,this.startPageY=b.pageY,this.startPageX=b.pageX,document.onselectstart=function(){return!1},a.stateful&&a.stateful.set("state.dragging",!0),this.target=document.body,document.body.setCapture&&(this.target=this.el,this.target.setCapture()),this.drag_events={keyup:function(){},mousemove:function(a){var b=Math.min(Math.max(c.startY+c.factorY*(a.pageY-c.startPageY),c.minY),c.maxY),d=Math.min(Math.max(c.startX+c.factorX*(a.pageX-c.startPageX),c.minX),c.maxX);c.track(a,d,b)},click:function(a){return a.preventDefault(),a.stopPropagation(),!1},mouseup:function(a){return c.end(),a.preventDefault(),a.stopPropagation(),!1}},$(this.target,this.drag_events),pb=this,Resolver("page").set("activeMovement",this),this},H.prototype.end=function(){return this.el.stateful&&this.el.stateful.set("state.dragging",!1),_(this.target,this.drag_events),this.target.releaseCapture&&this.target.releaseCapture(),this.target=null,delete document.onselectstart,pb=null,Resolver("page").set("activeMovement",null),this},M.prototype.trackScrolled=function(a){this.trackScroll?(this.scrolledTo=a["scroll"+this.posName],this.scrolledContentSize=this.sizing[this.contentName]):(this.scrolledTo=this.scrolled.stateful("pos.scroll"+this.posName,"0"),this.scrolledContentSize=this.scrolled.stateful("pos."+this.scrollName,"0"))},M.prototype.update=function(){this.scrolledContentSize?(this.el.lastChild.style[this.posStyle]=100*this.scrolledTo/this.scrolledContentSize+"%",this.el.lastChild.style[this.sizeStyle]=100*this.sizing[this.sizeName]/this.scrolledContentSize+"%"):(this.el.lastChild.style[this.posStyle]="0%",this.el.lastChild.style[this.sizeStyle]="0%"),(!this.enable||!this.scrolledContentSize||this.scrolledContentSize<=this.sizing[this.sizeName])&&this.hide()},M.prototype.show=function(){return!this.enable||!this.scrolledContentSize||this.scrolledContentSize<=this.sizing[this.sizeName]?!1:this.shown?void 0:(this.update(this.scrolled),this.el.className+=" shown",this.hiding&&(clearTimeout(this.hiding),delete this.hiding),this.shown=!0,!0)},M.prototype.hide=function(){this.autoHide!==!1&&this.shown&&this.enable&&(this.el.className=this.el.className.replace(" shown",""),this.hiding&&(clearTimeout(this.hiding),delete this.hiding),this.shown=!1)},M.prototype.delayedHide=function(a){var b=this;this.hiding=setTimeout(function(){b.hide()},a||1500)},M.prototype.destroy=function(){this.el&&(this.el.parentNode&&this.el.parentNode.removeChild(this.el),Z(this.el),this.el=void 0,this.shown=this.enable=!1)},N.prototype.scrollTopChanged=function(a){var b=a.data.el,c=a.data.es;c.vert.shown||(c.vert.show(),a.resolver("state.over")||a.resolver("state.dragging")||c.vert.delayedHide()),c.vert.trackScrolled(b),c.vert.update(b)},N.prototype.scrollLeftChanged=function(a){var b=a.data.el,c=a.data.es;c.horz.shown||(c.horz.show(),b.stateful("state.over")||b.stateful("state.dragging")||c.horz.delayedHide()),c.horz.trackScrolled(b),c.horz.update(b)};var qb=!!window.controllers,rb=window.document.all&&!window.opera;N.prototype._getContainer=function(a,b){var c=cb(),d=a.parentNode;return b.obscured&&(b.unstyledParent||(a.parentNode.style.cssText="position:absolute;left:0;right:0;top:0;bottom:0;overflow:hidden;"),a.style.right="-"+c+"px",a.style.bottom="-"+c+"px",qb||rb||(a.style.paddingRight=c+"px",a.style.paddingBottom=c+"px"),d=d.parentNode),d},N.prototype.refresh=function(a){this.vert.trackScrolled(a),this.vert.update(a),this.horz.trackScrolled(a),this.horz.update(a)},N.prototype.layout=function(a,b){b.contentHeight==b.oldContentHeight||this.vert.shown||(this.vert.show()===!1&&this.vert.hide(),a.stateful("state.over")||a.stateful("state.dragging")||this.vert.delayedHide(750)),b.contentWidth==b.oldContentWidth||this.horz.shown||(this.horz.show()===!1&&this.horz.hide(),a.stateful("state.over")||a.stateful("state.dragging")||this.horz.delayedHide(750)),this.refresh(a)},N.prototype.discard=function(a){this.vert&&this.vert.destroy(),this.horz&&this.horz.destroy(),delete this.vert,delete this.horz,Z(a.parentNode),Z(a)},N.prototype.setContentHeight=function(){},ab.set("handlers.enhance.scrolled",O),ab.set("handlers.layout.scrolled",P),ab.set("handlers.discard.scrolled",Q)}(),Resolver("essential::ApplicationConfig::").restrict({singleton:!0,lifecycle:"page"}),Resolver("page").set("liveTimeout",60),!function(){function a(){Resolver("page").set("state.livepage",!0)}window.addEventListener?window.addEventListener("load",a,!1):window.attachEvent&&window.attachEvent("onload",a)}(),Resolver("page::state.livepage").on("change",function(a){function b(a){c.refreshAll(),d.notifyAll(a);for(var b,e=0;b=d[e];++e)b.notify(a)}var c=Resolver("essential::EnhancedDescriptor::"),d=Resolver("essential::enhancedWindows::"),e=Resolver("essential::placement::"),f=Resolver("essential::defaultButtonClick::"),g=Resolver("page"),h=Resolver("essential::updateOnlineStatus::");a.value?(g.uosInterval=setInterval(Resolver("essential::updateOnlineStatus::"),5e3),c.maintainer=setInterval(c.maintainAll,330),c.refresher=setInterval(c.refreshAll,160),h(),window.addEventListener?(document.body.addEventListener("online",h),document.body.addEventListener("offline",h),window.applicationCache&&applicationCache.addEventListener("error",h),window.addEventListener("resize",b,!1),document.body.addEventListener("orientationchange",b,!1),document.body.addEventListener("click",f,!1)):(window.attachEvent("onresize",b),document.body.attachEvent("onclick",f),document.body.attachEvent("online",h),document.body.attachEvent("offline",h)),Resolver("essential")("launchWindows")()):(window.removeEventListener?(window.removeEventListener("resize",b),document.body.removeEventListener("orientationchange",b),document.body.removeEventListener("click",f)):(window.detachEvent("onresize",b),document.body.detachEvent("onclick",f)),clearInterval(g.uosInterval),g.uosInterval=null,clearInterval(c.maintainer),c.maintainer=null,clearInterval(c.refresher),c.refresher=null,e.broadcaster&&clearInterval(e.broadcaster),e.broadcaster=null,e.stopTrackMain())}),Resolver("page::state.managed").on("change",function(a){var b=Resolver("essential::placement::"); a.value&&b.startTrackMain()});