I printed most of the upgrades

This commit is contained in:
Geekoid
2020-07-09 20:32:33 +02:00
parent 8512635a72
commit 980d5fb176
128 changed files with 910923 additions and 0 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

View File

@ -0,0 +1,903 @@
// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// Contributors:
// Justin Palmer (http://encytemedia.com/)
// Mark Pilgrim (http://diveintomark.org/)
// Martin Bialasinki
//
// See scriptaculous.js for full license.
/* ------------- element ext -------------- */
// converts rgb() and #xxx to #xxxxxx format,
// returns self (or first argument) if not convertable
String.prototype.parseColor = function() {
var color = '#';
if(this.slice(0,4) == 'rgb(') {
var cols = this.slice(4,this.length-1).split(',');
var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);
} else {
if(this.slice(0,1) == '#') {
if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();
if(this.length==7) color = this.toLowerCase();
}
}
return(color.length==7 ? color : (arguments[0] || this));
}
Element.collectTextNodes = function(element) {
return $A($(element).childNodes).collect( function(node) {
return (node.nodeType==3 ? node.nodeValue :
(node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
}).flatten().join('');
}
Element.collectTextNodesIgnoreClass = function(element, className) {
return $A($(element).childNodes).collect( function(node) {
return (node.nodeType==3 ? node.nodeValue :
((node.hasChildNodes() && !Element.hasClassName(node,className)) ?
Element.collectTextNodes(node) : ''));
}).flatten().join('');
}
Element.setStyle = function(element, style) {
element = $(element);
for(k in style) element.style[k.camelize()] = style[k];
}
Element.setContentZoom = function(element, percent) {
Element.setStyle(element, {fontSize: (percent/100) + 'em'});
if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);
}
Element.getOpacity = function(element){
var opacity;
if (opacity = Element.getStyle(element, 'opacity'))
return parseFloat(opacity);
if (opacity = (Element.getStyle(element, 'filter') || '').match(/alpha\(opacity=(.*)\)/))
if(opacity[1]) return parseFloat(opacity[1]) / 100;
return 1.0;
}
Element.setOpacity = function(element, value){
element= $(element);
if (value == 1){
Element.setStyle(element, { opacity:
(/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ?
0.999999 : null });
if(/MSIE/.test(navigator.userAgent))
Element.setStyle(element, {filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'')});
} else {
if(value < 0.00001) value = 0;
Element.setStyle(element, {opacity: value});
if(/MSIE/.test(navigator.userAgent))
Element.setStyle(element,
{ filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'') +
'alpha(opacity='+value*100+')' });
}
}
Element.getInlineOpacity = function(element){
return $(element).style.opacity || '';
}
Element.childrenWithClassName = function(element, className) {
return $A($(element).getElementsByTagName('*')).select(
function(c) { return Element.hasClassName(c, className) });
}
Array.prototype.call = function() {
var args = arguments;
this.each(function(f){ f.apply(this, args) });
}
/*--------------------------------------------------------------------------*/
var Effect = {
tagifyText: function(element) {
var tagifyStyle = 'position:relative';
if(/MSIE/.test(navigator.userAgent)) tagifyStyle += ';zoom:1';
element = $(element);
$A(element.childNodes).each( function(child) {
if(child.nodeType==3) {
child.nodeValue.toArray().each( function(character) {
element.insertBefore(
Builder.node('span',{style: tagifyStyle},
character == ' ' ? String.fromCharCode(160) : character),
child);
});
Element.remove(child);
}
});
},
multiple: function(element, effect) {
var elements;
if(((typeof element == 'object') ||
(typeof element == 'function')) &&
(element.length))
elements = element;
else
elements = $(element).childNodes;
var options = Object.extend({
speed: 0.1,
delay: 0.0
}, arguments[2] || {});
var masterDelay = options.delay;
$A(elements).each( function(element, index) {
new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
});
},
PAIRS: {
'slide': ['SlideDown','SlideUp'],
'blind': ['BlindDown','BlindUp'],
'appear': ['Appear','Fade']
},
toggle: function(element, effect) {
element = $(element);
effect = (effect || 'appear').toLowerCase();
var options = Object.extend({
queue: { position:'end', scope:(element.id || 'global') }
}, arguments[2] || {});
Effect[Element.visible(element) ?
Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
}
};
var Effect2 = Effect; // deprecated
/* ------------- transitions ------------- */
Effect.Transitions = {}
Effect.Transitions.linear = function(pos) {
return pos;
}
Effect.Transitions.sinoidal = function(pos) {
return (-Math.cos(pos*Math.PI)/2) + 0.5;
}
Effect.Transitions.reverse = function(pos) {
return 1-pos;
}
Effect.Transitions.flicker = function(pos) {
return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;
}
Effect.Transitions.wobble = function(pos) {
return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;
}
Effect.Transitions.pulse = function(pos) {
return (Math.floor(pos*10) % 2 == 0 ?
(pos*10-Math.floor(pos*10)) : 1-(pos*10-Math.floor(pos*10)));
}
Effect.Transitions.none = function(pos) {
return 0;
}
Effect.Transitions.full = function(pos) {
return 1;
}
/* ------------- core effects ------------- */
Effect.ScopedQueue = Class.create();
Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), {
initialize: function() {
this.effects = [];
this.interval = null;
},
_each: function(iterator) {
this.effects._each(iterator);
},
add: function(effect) {
var timestamp = new Date().getTime();
var position = (typeof effect.options.queue == 'string') ?
effect.options.queue : effect.options.queue.position;
switch(position) {
case 'front':
// move unstarted effects after this effect
this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) {
e.startOn += effect.finishOn;
e.finishOn += effect.finishOn;
});
break;
case 'end':
// start effect after last queued effect has finished
timestamp = this.effects.pluck('finishOn').max() || timestamp;
break;
}
effect.startOn += timestamp;
effect.finishOn += timestamp;
this.effects.push(effect);
if(!this.interval)
this.interval = setInterval(this.loop.bind(this), 40);
},
remove: function(effect) {
this.effects = this.effects.reject(function(e) { return e==effect });
if(this.effects.length == 0) {
clearInterval(this.interval);
this.interval = null;
}
},
loop: function() {
var timePos = new Date().getTime();
this.effects.invoke('loop', timePos);
}
});
Effect.Queues = {
instances: $H(),
get: function(queueName) {
if(typeof queueName != 'string') return queueName;
if(!this.instances[queueName])
this.instances[queueName] = new Effect.ScopedQueue();
return this.instances[queueName];
}
}
Effect.Queue = Effect.Queues.get('global');
Effect.DefaultOptions = {
transition: Effect.Transitions.sinoidal,
duration: 1.0, // seconds
fps: 25.0, // max. 25fps due to Effect.Queue implementation
sync: false, // true for combining
from: 0.0,
to: 1.0,
delay: 0.0,
queue: 'parallel'
}
Effect.Base = function() {};
Effect.Base.prototype = {
position: null,
start: function(options) {
this.options = Object.extend(Object.extend({},Effect.DefaultOptions), options || {});
this.currentFrame = 0;
this.state = 'idle';
this.startOn = this.options.delay*1000;
this.finishOn = this.startOn + (this.options.duration*1000);
this.event('beforeStart');
if(!this.options.sync)
Effect.Queues.get(typeof this.options.queue == 'string' ?
'global' : this.options.queue.scope).add(this);
},
loop: function(timePos) {
if(timePos >= this.startOn) {
if(timePos >= this.finishOn) {
this.render(1.0);
this.cancel();
this.event('beforeFinish');
if(this.finish) this.finish();
this.event('afterFinish');
return;
}
var pos = (timePos - this.startOn) / (this.finishOn - this.startOn);
var frame = Math.round(pos * this.options.fps * this.options.duration);
if(frame > this.currentFrame) {
this.render(pos);
this.currentFrame = frame;
}
}
},
render: function(pos) {
if(this.state == 'idle') {
this.state = 'running';
this.event('beforeSetup');
if(this.setup) this.setup();
this.event('afterSetup');
}
if(this.state == 'running') {
if(this.options.transition) pos = this.options.transition(pos);
pos *= (this.options.to-this.options.from);
pos += this.options.from;
this.position = pos;
this.event('beforeUpdate');
if(this.update) this.update(pos);
this.event('afterUpdate');
}
},
cancel: function() {
if(!this.options.sync)
Effect.Queues.get(typeof this.options.queue == 'string' ?
'global' : this.options.queue.scope).remove(this);
this.state = 'finished';
},
event: function(eventName) {
if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this);
if(this.options[eventName]) this.options[eventName](this);
},
inspect: function() {
return '#<Effect:' + $H(this).inspect() + ',options:' + $H(this.options).inspect() + '>';
}
}
Effect.Parallel = Class.create();
Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), {
initialize: function(effects) {
this.effects = effects || [];
this.start(arguments[1]);
},
update: function(position) {
this.effects.invoke('render', position);
},
finish: function(position) {
this.effects.each( function(effect) {
effect.render(1.0);
effect.cancel();
effect.event('beforeFinish');
if(effect.finish) effect.finish(position);
effect.event('afterFinish');
});
}
});
Effect.Opacity = Class.create();
Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), {
initialize: function(element) {
this.element = $(element);
// make this work on IE on elements without 'layout'
if(/MSIE/.test(navigator.userAgent) && (!this.element.hasLayout))
Element.setStyle(this.element, {zoom: 1});
var options = Object.extend({
from: Element.getOpacity(this.element) || 0.0,
to: 1.0
}, arguments[1] || {});
this.start(options);
},
update: function(position) {
Element.setOpacity(this.element, position);
}
});
Effect.Move = Class.create();
Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), {
initialize: function(element) {
this.element = $(element);
var options = Object.extend({
x: 0,
y: 0,
mode: 'relative'
}, arguments[1] || {});
this.start(options);
},
setup: function() {
// Bug in Opera: Opera returns the "real" position of a static element or
// relative element that does not have top/left explicitly set.
// ==> Always set top and left for position relative elements in your stylesheets
// (to 0 if you do not need them)
Element.makePositioned(this.element);
this.originalLeft = parseFloat(Element.getStyle(this.element,'left') || '0');
this.originalTop = parseFloat(Element.getStyle(this.element,'top') || '0');
if(this.options.mode == 'absolute') {
// absolute movement, so we need to calc deltaX and deltaY
this.options.x = this.options.x - this.originalLeft;
this.options.y = this.options.y - this.originalTop;
}
},
update: function(position) {
Element.setStyle(this.element, {
left: this.options.x * position + this.originalLeft + 'px',
top: this.options.y * position + this.originalTop + 'px'
});
}
});
// for backwards compatibility
Effect.MoveBy = function(element, toTop, toLeft) {
return new Effect.Move(element,
Object.extend({ x: toLeft, y: toTop }, arguments[3] || {}));
};
Effect.Scale = Class.create();
Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), {
initialize: function(element, percent) {
this.element = $(element)
var options = Object.extend({
scaleX: true,
scaleY: true,
scaleContent: true,
scaleFromCenter: false,
scaleMode: 'box', // 'box' or 'contents' or {} with provided values
scaleFrom: 100.0,
scaleTo: percent
}, arguments[2] || {});
this.start(options);
},
setup: function() {
this.restoreAfterFinish = this.options.restoreAfterFinish || false;
this.elementPositioning = Element.getStyle(this.element,'position');
this.originalStyle = {};
['top','left','width','height','fontSize'].each( function(k) {
this.originalStyle[k] = this.element.style[k];
}.bind(this));
this.originalTop = this.element.offsetTop;
this.originalLeft = this.element.offsetLeft;
var fontSize = Element.getStyle(this.element,'font-size') || '100%';
['em','px','%'].each( function(fontSizeType) {
if(fontSize.indexOf(fontSizeType)>0) {
this.fontSize = parseFloat(fontSize);
this.fontSizeType = fontSizeType;
}
}.bind(this));
this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
this.dims = null;
if(this.options.scaleMode=='box')
this.dims = [this.element.offsetHeight, this.element.offsetWidth];
if(/^content/.test(this.options.scaleMode))
this.dims = [this.element.scrollHeight, this.element.scrollWidth];
if(!this.dims)
this.dims = [this.options.scaleMode.originalHeight,
this.options.scaleMode.originalWidth];
},
update: function(position) {
var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
if(this.options.scaleContent && this.fontSize)
Element.setStyle(this.element, {fontSize: this.fontSize * currentScale + this.fontSizeType });
this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);
},
finish: function(position) {
if (this.restoreAfterFinish) Element.setStyle(this.element, this.originalStyle);
},
setDimensions: function(height, width) {
var d = {};
if(this.options.scaleX) d.width = width + 'px';
if(this.options.scaleY) d.height = height + 'px';
if(this.options.scaleFromCenter) {
var topd = (height - this.dims[0])/2;
var leftd = (width - this.dims[1])/2;
if(this.elementPositioning == 'absolute') {
if(this.options.scaleY) d.top = this.originalTop-topd + 'px';
if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px';
} else {
if(this.options.scaleY) d.top = -topd + 'px';
if(this.options.scaleX) d.left = -leftd + 'px';
}
}
Element.setStyle(this.element, d);
}
});
Effect.Highlight = Class.create();
Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), {
initialize: function(element) {
this.element = $(element);
var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {});
this.start(options);
},
setup: function() {
// Prevent executing on elements not in the layout flow
if(Element.getStyle(this.element, 'display')=='none') { this.cancel(); return; }
// Disable background image during the effect
this.oldStyle = {
backgroundImage: Element.getStyle(this.element, 'background-image') };
Element.setStyle(this.element, {backgroundImage: 'none'});
if(!this.options.endcolor)
this.options.endcolor = Element.getStyle(this.element, 'background-color').parseColor('#ffffff');
if(!this.options.restorecolor)
this.options.restorecolor = Element.getStyle(this.element, 'background-color');
// init color calculations
this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
},
update: function(position) {
Element.setStyle(this.element,{backgroundColor: $R(0,2).inject('#',function(m,v,i){
return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) });
},
finish: function() {
Element.setStyle(this.element, Object.extend(this.oldStyle, {
backgroundColor: this.options.restorecolor
}));
}
});
Effect.ScrollTo = Class.create();
Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), {
initialize: function(element) {
this.element = $(element);
this.start(arguments[1] || {});
},
setup: function() {
Position.prepare();
var offsets = Position.cumulativeOffset(this.element);
if(this.options.offset) offsets[1] += this.options.offset;
var max = window.innerHeight ?
window.height - window.innerHeight :
document.body.scrollHeight -
(document.documentElement.clientHeight ?
document.documentElement.clientHeight : document.body.clientHeight);
this.scrollStart = Position.deltaY;
this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart;
},
update: function(position) {
Position.prepare();
window.scrollTo(Position.deltaX,
this.scrollStart + (position*this.delta));
}
});
/* ------------- combination effects ------------- */
Effect.Fade = function(element) {
var oldOpacity = Element.getInlineOpacity(element);
var options = Object.extend({
from: Element.getOpacity(element) || 1.0,
to: 0.0,
afterFinishInternal: function(effect) { with(Element) {
if(effect.options.to!=0) return;
hide(effect.element);
setStyle(effect.element, {opacity: oldOpacity}); }}
}, arguments[1] || {});
return new Effect.Opacity(element,options);
}
Effect.Appear = function(element) {
var options = Object.extend({
from: (Element.getStyle(element, 'display') == 'none' ? 0.0 : Element.getOpacity(element) || 0.0),
to: 1.0,
beforeSetup: function(effect) { with(Element) {
setOpacity(effect.element, effect.options.from);
show(effect.element); }}
}, arguments[1] || {});
return new Effect.Opacity(element,options);
}
Effect.Puff = function(element) {
element = $(element);
var oldStyle = { opacity: Element.getInlineOpacity(element), position: Element.getStyle(element, 'position') };
return new Effect.Parallel(
[ new Effect.Scale(element, 200,
{ sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }),
new Effect.Opacity(element, { sync: true, to: 0.0 } ) ],
Object.extend({ duration: 1.0,
beforeSetupInternal: function(effect) { with(Element) {
setStyle(effect.effects[0].element, {position: 'absolute'}); }},
afterFinishInternal: function(effect) { with(Element) {
hide(effect.effects[0].element);
setStyle(effect.effects[0].element, oldStyle); }}
}, arguments[1] || {})
);
}
Effect.BlindUp = function(element) {
element = $(element);
Element.makeClipping(element);
return new Effect.Scale(element, 0,
Object.extend({ scaleContent: false,
scaleX: false,
restoreAfterFinish: true,
afterFinishInternal: function(effect) { with(Element) {
[hide, undoClipping].call(effect.element); }}
}, arguments[1] || {})
);
}
Effect.BlindDown = function(element) {
element = $(element);
var oldHeight = Element.getStyle(element, 'height');
var elementDimensions = Element.getDimensions(element);
return new Effect.Scale(element, 100,
Object.extend({ scaleContent: false,
scaleX: false,
scaleFrom: 0,
scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
restoreAfterFinish: true,
afterSetup: function(effect) { with(Element) {
makeClipping(effect.element);
setStyle(effect.element, {height: '0px'});
show(effect.element);
}},
afterFinishInternal: function(effect) { with(Element) {
undoClipping(effect.element);
setStyle(effect.element, {height: oldHeight});
}}
}, arguments[1] || {})
);
}
Effect.SwitchOff = function(element) {
element = $(element);
var oldOpacity = Element.getInlineOpacity(element);
return new Effect.Appear(element, {
duration: 0.4,
from: 0,
transition: Effect.Transitions.flicker,
afterFinishInternal: function(effect) {
new Effect.Scale(effect.element, 1, {
duration: 0.3, scaleFromCenter: true,
scaleX: false, scaleContent: false, restoreAfterFinish: true,
beforeSetup: function(effect) { with(Element) {
[makePositioned,makeClipping].call(effect.element);
}},
afterFinishInternal: function(effect) { with(Element) {
[hide,undoClipping,undoPositioned].call(effect.element);
setStyle(effect.element, {opacity: oldOpacity});
}}
})
}
});
}
Effect.DropOut = function(element) {
element = $(element);
var oldStyle = {
top: Element.getStyle(element, 'top'),
left: Element.getStyle(element, 'left'),
opacity: Element.getInlineOpacity(element) };
return new Effect.Parallel(
[ new Effect.Move(element, {x: 0, y: 100, sync: true }),
new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
Object.extend(
{ duration: 0.5,
beforeSetup: function(effect) { with(Element) {
makePositioned(effect.effects[0].element); }},
afterFinishInternal: function(effect) { with(Element) {
[hide, undoPositioned].call(effect.effects[0].element);
setStyle(effect.effects[0].element, oldStyle); }}
}, arguments[1] || {}));
}
Effect.Shake = function(element) {
element = $(element);
var oldStyle = {
top: Element.getStyle(element, 'top'),
left: Element.getStyle(element, 'left') };
return new Effect.Move(element,
{ x: 20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {
new Effect.Move(effect.element,
{ x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
new Effect.Move(effect.element,
{ x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
new Effect.Move(effect.element,
{ x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
new Effect.Move(effect.element,
{ x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
new Effect.Move(effect.element,
{ x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { with(Element) {
undoPositioned(effect.element);
setStyle(effect.element, oldStyle);
}}}) }}) }}) }}) }}) }});
}
Effect.SlideDown = function(element) {
element = $(element);
Element.cleanWhitespace(element);
// SlideDown need to have the content of the element wrapped in a container element with fixed height!
var oldInnerBottom = Element.getStyle(element.firstChild, 'bottom');
var elementDimensions = Element.getDimensions(element);
return new Effect.Scale(element, 100, Object.extend({
scaleContent: false,
scaleX: false,
scaleFrom: 0,
scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
restoreAfterFinish: true,
afterSetup: function(effect) { with(Element) {
makePositioned(effect.element);
makePositioned(effect.element.firstChild);
if(window.opera) setStyle(effect.element, {top: ''});
makeClipping(effect.element);
setStyle(effect.element, {height: '0px'});
show(element); }},
afterUpdateInternal: function(effect) { with(Element) {
setStyle(effect.element.firstChild, {bottom:
(effect.dims[0] - effect.element.clientHeight) + 'px' }); }},
afterFinishInternal: function(effect) { with(Element) {
undoClipping(effect.element);
undoPositioned(effect.element.firstChild);
undoPositioned(effect.element);
setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }}
}, arguments[1] || {})
);
}
Effect.SlideUp = function(element) {
element = $(element);
Element.cleanWhitespace(element);
var oldInnerBottom = Element.getStyle(element.firstChild, 'bottom');
return new Effect.Scale(element, 0,
Object.extend({ scaleContent: false,
scaleX: false,
scaleMode: 'box',
scaleFrom: 100,
restoreAfterFinish: true,
beforeStartInternal: function(effect) { with(Element) {
makePositioned(effect.element);
makePositioned(effect.element.firstChild);
if(window.opera) setStyle(effect.element, {top: ''});
makeClipping(effect.element);
show(element); }},
afterUpdateInternal: function(effect) { with(Element) {
setStyle(effect.element.firstChild, {bottom:
(effect.dims[0] - effect.element.clientHeight) + 'px' }); }},
afterFinishInternal: function(effect) { with(Element) {
[hide, undoClipping].call(effect.element);
undoPositioned(effect.element.firstChild);
undoPositioned(effect.element);
setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }}
}, arguments[1] || {})
);
}
// Bug in opera makes the TD containing this element expand for a instance after finish
Effect.Squish = function(element) {
return new Effect.Scale(element, window.opera ? 1 : 0,
{ restoreAfterFinish: true,
beforeSetup: function(effect) { with(Element) {
makeClipping(effect.element); }},
afterFinishInternal: function(effect) { with(Element) {
hide(effect.element);
undoClipping(effect.element); }}
});
}
Effect.Grow = function(element) {
element = $(element);
var options = Object.extend({
direction: 'center',
moveTransistion: Effect.Transitions.sinoidal,
scaleTransition: Effect.Transitions.sinoidal,
opacityTransition: Effect.Transitions.full
}, arguments[1] || {});
var oldStyle = {
top: element.style.top,
left: element.style.left,
height: element.style.height,
width: element.style.width,
opacity: Element.getInlineOpacity(element) };
var dims = Element.getDimensions(element);
var initialMoveX, initialMoveY;
var moveX, moveY;
switch (options.direction) {
case 'top-left':
initialMoveX = initialMoveY = moveX = moveY = 0;
break;
case 'top-right':
initialMoveX = dims.width;
initialMoveY = moveY = 0;
moveX = -dims.width;
break;
case 'bottom-left':
initialMoveX = moveX = 0;
initialMoveY = dims.height;
moveY = -dims.height;
break;
case 'bottom-right':
initialMoveX = dims.width;
initialMoveY = dims.height;
moveX = -dims.width;
moveY = -dims.height;
break;
case 'center':
initialMoveX = dims.width / 2;
initialMoveY = dims.height / 2;
moveX = -dims.width / 2;
moveY = -dims.height / 2;
break;
}
return new Effect.Move(element, {
x: initialMoveX,
y: initialMoveY,
duration: 0.01,
beforeSetup: function(effect) { with(Element) {
hide(effect.element);
makeClipping(effect.element);
makePositioned(effect.element);
}},
afterFinishInternal: function(effect) {
new Effect.Parallel(
[ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),
new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),
new Effect.Scale(effect.element, 100, {
scaleMode: { originalHeight: dims.height, originalWidth: dims.width },
sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})
], Object.extend({
beforeSetup: function(effect) { with(Element) {
setStyle(effect.effects[0].element, {height: '0px'});
show(effect.effects[0].element); }},
afterFinishInternal: function(effect) { with(Element) {
[undoClipping, undoPositioned].call(effect.effects[0].element);
setStyle(effect.effects[0].element, oldStyle); }}
}, options)
)
}
});
}
Effect.Shrink = function(element) {
element = $(element);
var options = Object.extend({
direction: 'center',
moveTransistion: Effect.Transitions.sinoidal,
scaleTransition: Effect.Transitions.sinoidal,
opacityTransition: Effect.Transitions.none
}, arguments[1] || {});
var oldStyle = {
top: element.style.top,
left: element.style.left,
height: element.style.height,
width: element.style.width,
opacity: Element.getInlineOpacity(element) };
var dims = Element.getDimensions(element);
var moveX, moveY;
switch (options.direction) {
case 'top-left':
moveX = moveY = 0;
break;
case 'top-right':
moveX = dims.width;
moveY = 0;
break;
case 'bottom-left':
moveX = 0;
moveY = dims.height;
break;
case 'bottom-right':
moveX = dims.width;
moveY = dims.height;
break;
case 'center':
moveX = dims.width / 2;
moveY = dims.height / 2;
break;
}
return new Effect.Parallel(
[ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),
new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),
new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
], Object.extend({
beforeStartInternal: function(effect) { with(Element) {
[makePositioned, makeClipping].call(effect.effects[0].element) }},
afterFinishInternal: function(effect) { with(Element) {
[hide, undoClipping, undoPositioned].call(effect.effects[0].element);
setStyle(effect.effects[0].element, oldStyle); }}
}, options)
);
}
Effect.Pulsate = function(element) {
element = $(element);
var options = arguments[1] || {};
var oldOpacity = Element.getInlineOpacity(element);
var transition = options.transition || Effect.Transitions.sinoidal;
var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) };
reverser.bind(transition);
return new Effect.Opacity(element,
Object.extend(Object.extend({ duration: 3.0, from: 0,
afterFinishInternal: function(effect) { Element.setStyle(effect.element, {opacity: oldOpacity}); }
}, options), {transition: reverser}));
}
Effect.Fold = function(element) {
element = $(element);
var oldStyle = {
top: element.style.top,
left: element.style.left,
width: element.style.width,
height: element.style.height };
Element.makeClipping(element);
return new Effect.Scale(element, 5, Object.extend({
scaleContent: false,
scaleX: false,
afterFinishInternal: function(effect) {
new Effect.Scale(element, 1, {
scaleContent: false,
scaleY: false,
afterFinishInternal: function(effect) { with(Element) {
[hide, undoClipping].call(effect.element);
setStyle(effect.element, oldStyle);
}} });
}}, arguments[1] || {}));
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

View File

@ -0,0 +1,80 @@
#lightbox{
position: absolute;
left: 0;
width: 100%;
z-index: 100;
text-align: center;
line-height: 0;
}
#lightbox a img{ border: none; }
#outerImageContainer{
position: relative;
background-color: #666;
width: 250px;
height: 250px;
margin: 0 auto;
}
#imageContainer{
padding: 6px;
}
#loading{
position: absolute;
top: 40%;
left: 0%;
height: 25%;
width: 100%;
text-align: center;
line-height: 0;
}
#hoverNav{
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 10;
}
#imageContainer>#hoverNav{ left: 0;}
#hoverNav a{ outline: none;}
#prevLink, #nextLink{
width: 49%;
height: 100%;
background: transparent url(blank.gif) no-repeat; /* Trick IE into showing hover */
display: block;
}
#prevLink { left: 0; float: left;}
#nextLink { right: 0; float: right;}
#prevLink:hover, #prevLink:visited:hover { background: url(prevlabel.gif) left 15% no-repeat; }
#nextLink:hover, #nextLink:visited:hover { background: url(nextlabel.gif) right 15% no-repeat; }
#imageDataContainer{
font-size: 11px;
color: #fff;
background-color: #666;
margin: 0 auto;
line-height: 1.4em;
overflow: auto;
width: 100%
}
#imageData{ padding:0 10px; color: #fff; }
#imageData #imageDetails{ width: 70%; float: left; text-align: left; color: #fff; }
#imageData #caption{ font-weight: bold; }
#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.4em; }
#overlay{
position: absolute;
top: 0;
left: 0;
z-index: 90;
width: 100%;
height: 500px;
background-color: #fff;
}

View File

@ -0,0 +1,758 @@
//
// Configuration
//
var fileLoadingImage = "loading.gif";
var fileBottomNavCloseImage = "closelabel.gif";
var overlayOpacity = 0.1; // controls transparency of shadow overlay
var animate = true; // toggles resizing animations
var resizeSpeed = 7; // controls the speed of the image resizing animations (1=slowest and 10=fastest)
var borderSize = 6; //if you adjust the padding in the CSS, you will need to update this variable
// -----------------------------------------------------------------------------------
//
// Global Variables
//
var imageArray = new Array;
var activeImage;
if(animate == true){
overlayDuration = 0.2; // shadow fade in/out duration
if(resizeSpeed > 10){ resizeSpeed = 10;}
if(resizeSpeed < 1){ resizeSpeed = 1;}
resizeDuration = (11 - resizeSpeed) * 0.15;
} else {
overlayDuration = 0;
resizeDuration = 0;
}
// -----------------------------------------------------------------------------------
//
// Additional methods for Element added by SU, Couloir
// - further additions by Lokesh Dhakar (huddletogether.com)
//
Object.extend(Element, {
getWidth: function(element) {
element = $(element);
return element.offsetWidth;
},
setWidth: function(element,w) {
element = $(element);
element.style.width = w +"px";
},
setHeight: function(element,h) {
element = $(element);
element.style.height = h +"px";
},
setTop: function(element,t) {
element = $(element);
element.style.top = t +"px";
},
setLeft: function(element,l) {
element = $(element);
element.style.left = l +"px";
},
setSrc: function(element,src) {
element = $(element);
element.src = src;
},
setHref: function(element,href) {
element = $(element);
element.href = href;
},
setInnerHTML: function(element,content) {
element = $(element);
element.innerHTML = content;
}
});
// -----------------------------------------------------------------------------------
//
// Extending built-in Array object
// - array.removeDuplicates()
// - array.empty()
//
Array.prototype.removeDuplicates = function () {
for(i = 0; i < this.length; i++){
for(j = this.length-1; j>i; j--){
if(this[i][0] == this[j][0]){
this.splice(j,1);
}
}
}
}
// -----------------------------------------------------------------------------------
Array.prototype.empty = function () {
for(i = 0; i <= this.length; i++){
this.shift();
}
}
// -----------------------------------------------------------------------------------
//
// Lightbox Class Declaration
// - initialize()
// - start()
// - changeImage()
// - resizeImageContainer()
// - showImage()
// - updateDetails()
// - updateNav()
// - enableKeyboardNav()
// - disableKeyboardNav()
// - keyboardNavAction()
// - preloadNeighborImages()
// - end()
//
// Structuring of code inspired by Scott Upton (http://www.uptonic.com/)
//
var Lightbox = Class.create();
Lightbox.prototype = {
// initialize()
// Constructor runs on completion of the DOM loading. Calls updateImageList and then
// the function inserts html at the bottom of the page which is used to display the shadow
// overlay and the image container.
//
initialize: function() {
this.updateImageList();
// Code inserts html at the bottom of the page that looks similar to this:
//
// <div id="overlay"></div>
// <div id="lightbox">
// <div id="outerImageContainer">
// <div id="imageContainer">
// <img id="lightboxImage">
// <div style="" id="hoverNav">
// <a href="#" id="prevLink"></a>
// <a href="#" id="nextLink"></a>
// </div>
// <div id="loading">
// <a href="#" id="loadingLink">
// <img src="images/loading.gif">
// </a>
// </div>
// </div>
// </div>
// <div id="imageDataContainer">
// <div id="imageData">
// <div id="imageDetails">
// <span id="caption"></span>
// <span id="numberDisplay"></span>
// </div>
// <div id="bottomNav">
// <a href="#" id="bottomNavClose">
// <img src="images/close.gif">
// </a>
// </div>
// </div>
// </div>
// </div>
var objBody = document.getElementsByTagName("body").item(0);
var objOverlay = document.createElement("div");
objOverlay.setAttribute('id','overlay');
objOverlay.style.display = 'none';
objOverlay.onclick = function() { myLightbox.end(); }
objBody.appendChild(objOverlay);
var objLightbox = document.createElement("div");
objLightbox.setAttribute('id','lightbox');
objLightbox.style.display = 'none';
objLightbox.onclick = function(e) { // close Lightbox is user clicks shadow overlay
if (!e) var e = window.event;
var clickObj = Event.element(e).id;
if ( clickObj == 'lightbox') {
myLightbox.end();
}
};
objBody.appendChild(objLightbox);
var objOuterImageContainer = document.createElement("div");
objOuterImageContainer.setAttribute('id','outerImageContainer');
objLightbox.appendChild(objOuterImageContainer);
// When Lightbox starts it will resize itself from 250 by 250 to the current image dimension.
// If animations are turned off, it will be hidden as to prevent a flicker of a
// white 250 by 250 box.
if(animate){
Element.setWidth('outerImageContainer', 250);
Element.setHeight('outerImageContainer', 250);
} else {
Element.setWidth('outerImageContainer', 1);
Element.setHeight('outerImageContainer', 1);
}
var objImageContainer = document.createElement("div");
objImageContainer.setAttribute('id','imageContainer');
objOuterImageContainer.appendChild(objImageContainer);
var objLightboxImage = document.createElement("img");
objLightboxImage.setAttribute('id','lightboxImage');
objImageContainer.appendChild(objLightboxImage);
var objHoverNav = document.createElement("div");
objHoverNav.setAttribute('id','hoverNav');
objImageContainer.appendChild(objHoverNav);
var objPrevLink = document.createElement("a");
objPrevLink.setAttribute('id','prevLink');
objPrevLink.setAttribute('href','#');
objHoverNav.appendChild(objPrevLink);
var objNextLink = document.createElement("a");
objNextLink.setAttribute('id','nextLink');
objNextLink.setAttribute('href','#');
objHoverNav.appendChild(objNextLink);
var objLoading = document.createElement("div");
objLoading.setAttribute('id','loading');
objImageContainer.appendChild(objLoading);
var objLoadingLink = document.createElement("a");
objLoadingLink.setAttribute('id','loadingLink');
objLoadingLink.setAttribute('href','#');
objLoadingLink.onclick = function() { myLightbox.end(); return false; }
objLoading.appendChild(objLoadingLink);
var objLoadingImage = document.createElement("img");
objLoadingImage.setAttribute('src', fileLoadingImage);
objLoadingLink.appendChild(objLoadingImage);
var objImageDataContainer = document.createElement("div");
objImageDataContainer.setAttribute('id','imageDataContainer');
objLightbox.appendChild(objImageDataContainer);
var objImageData = document.createElement("div");
objImageData.setAttribute('id','imageData');
objImageDataContainer.appendChild(objImageData);
var objImageDetails = document.createElement("div");
objImageDetails.setAttribute('id','imageDetails');
objImageData.appendChild(objImageDetails);
var objCaption = document.createElement("span");
objCaption.setAttribute('id','caption');
objImageDetails.appendChild(objCaption);
var objNumberDisplay = document.createElement("span");
objNumberDisplay.setAttribute('id','numberDisplay');
objImageDetails.appendChild(objNumberDisplay);
var objBottomNav = document.createElement("div");
objBottomNav.setAttribute('id','bottomNav');
objImageData.appendChild(objBottomNav);
var objBottomNavCloseLink = document.createElement("a");
objBottomNavCloseLink.setAttribute('id','bottomNavClose');
objBottomNavCloseLink.setAttribute('href','#');
objBottomNavCloseLink.onclick = function() { myLightbox.end(); return false; }
objBottomNav.appendChild(objBottomNavCloseLink);
var objBottomNavCloseImage = document.createElement("img");
objBottomNavCloseImage.setAttribute('src', fileBottomNavCloseImage);
objBottomNavCloseLink.appendChild(objBottomNavCloseImage);
},
//
// updateImageList()
// Loops through anchor tags looking for 'lightbox' references and applies onclick
// events to appropriate links. You can rerun after dynamically adding images w/ajax.
//
updateImageList: function() {
if (!document.getElementsByTagName){ return; }
var anchors = document.getElementsByTagName('a');
var areas = document.getElementsByTagName('area');
// loop through all anchor tags
for (var i=0; i<anchors.length; i++){
var anchor = anchors[i];
var relAttribute = String(anchor.getAttribute('rel'));
// use the string.match() method to catch 'lightbox' references in the rel attribute
if (anchor.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){
anchor.onclick = function () {myLightbox.start(this); return false;}
}
}
// loop through all area tags
// todo: combine anchor & area tag loops
for (var i=0; i< areas.length; i++){
var area = areas[i];
var relAttribute = String(area.getAttribute('rel'));
// use the string.match() method to catch 'lightbox' references in the rel attribute
if (area.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){
area.onclick = function () {myLightbox.start(this); return false;}
}
}
},
//
// start()
// Display overlay and lightbox. If image is part of a set, add siblings to imageArray.
//
start: function(imageLink) {
hideSelectBoxes();
hideFlash();
// stretch overlay to fill page and fade in
var arrayPageSize = getPageSize();
Element.setWidth('overlay', arrayPageSize[0]);
Element.setHeight('overlay', arrayPageSize[1]);
new Effect.Appear('overlay', { duration: overlayDuration, from: 0.0, to: overlayOpacity });
imageArray = [];
imageNum = 0;
if (!document.getElementsByTagName){ return; }
var anchors = document.getElementsByTagName( imageLink.tagName);
// if image is NOT part of a set..
if((imageLink.getAttribute('rel') == 'lightbox')){
// add single image to imageArray
imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title')));
} else {
// if image is part of a set..
// loop through anchors, find other images in set, and add them to imageArray
for (var i=0; i<anchors.length; i++){
var anchor = anchors[i];
if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title')));
}
}
imageArray.removeDuplicates();
while(imageArray[imageNum][0] != imageLink.getAttribute('href')) { imageNum++;}
}
// calculate top and left offset for the lightbox
var arrayPageScroll = getPageScroll();
var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 20);
var lightboxLeft = arrayPageScroll[0];
Element.setTop('lightbox', lightboxTop);
Element.setLeft('lightbox', lightboxLeft);
Element.show('lightbox');
this.changeImage(imageNum);
},
//
// changeImage()
// Hide most elements and preload image in preparation for resizing image container.
//
changeImage: function(imageNum) {
activeImage = imageNum; // update global var
// hide elements during transition
if(animate){ Element.show('loading');}
Element.hide('lightboxImage');
Element.hide('hoverNav');
Element.hide('prevLink');
Element.hide('nextLink');
Element.hide('imageDataContainer');
Element.hide('numberDisplay');
imgPreloader = new Image();
// once image is preloaded, resize image container
imgPreloader.onload=function(){
Element.setSrc('lightboxImage', imageArray[activeImage][0]);
myLightbox.resizeImageContainer(imgPreloader.width, imgPreloader.height);
imgPreloader.onload=function(){}; // clear onLoad, IE behaves irratically with animated gifs otherwise
}
imgPreloader.src = imageArray[activeImage][0];
},
//
// resizeImageContainer()
//
resizeImageContainer: function( imgWidth, imgHeight) {
// get curren width and height
this.widthCurrent = Element.getWidth('outerImageContainer');
this.heightCurrent = Element.getHeight('outerImageContainer');
// get new width and height
var widthNew = (imgWidth + (borderSize * 2));
var heightNew = (imgHeight + (borderSize * 2));
// scalars based on change from old to new
this.xScale = ( widthNew / this.widthCurrent) * 100;
this.yScale = ( heightNew / this.heightCurrent) * 100;
// calculate size difference between new and old image, and resize if necessary
wDiff = this.widthCurrent - widthNew;
hDiff = this.heightCurrent - heightNew;
if(!( hDiff == 0)){ new Effect.Scale('outerImageContainer', this.yScale, {scaleX: false, duration: resizeDuration, queue: 'front'}); }
if(!( wDiff == 0)){ new Effect.Scale('outerImageContainer', this.xScale, {scaleY: false, delay: resizeDuration, duration: resizeDuration}); }
// if new and old image are same size and no scaling transition is necessary,
// do a quick pause to prevent image flicker.
if((hDiff == 0) && (wDiff == 0)){
if (navigator.appVersion.indexOf("MSIE")!=-1){ pause(250); } else { pause(100);}
}
Element.setHeight('prevLink', imgHeight);
Element.setHeight('nextLink', imgHeight);
Element.setWidth( 'imageDataContainer', widthNew);
this.showImage();
},
//
// showImage()
// Display image and begin preloading neighbors.
//
showImage: function(){
Element.hide('loading');
new Effect.Appear('lightboxImage', { duration: resizeDuration, queue: 'end', afterFinish: function(){ myLightbox.updateDetails(); } });
this.preloadNeighborImages();
},
//
// updateDetails()
// Display caption, image number, and bottom nav.
//
updateDetails: function() {
// if caption is not null
if(imageArray[activeImage][1]){
Element.show('caption');
Element.setInnerHTML( 'caption', imageArray[activeImage][1]);
}
// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Bild " + eval(activeImage + 1) + " von " + imageArray.length);
}
new Effect.Parallel(
[ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: resizeDuration, from: 0.0, to: 1.0 }),
new Effect.Appear('imageDataContainer', { sync: true, duration: resizeDuration }) ],
{ duration: resizeDuration, afterFinish: function() {
// update overlay size and update nav
var arrayPageSize = getPageSize();
Element.setHeight('overlay', arrayPageSize[1]);
myLightbox.updateNav();
}
}
);
},
//
// updateNav()
// Display appropriate previous and next hover navigation.
//
updateNav: function() {
Element.show('hoverNav');
// if not first image in set, display prev image button
if(activeImage != 0){
Element.show('prevLink');
document.getElementById('prevLink').onclick = function() {
myLightbox.changeImage(activeImage - 1); return false;
}
}
// if not last image in set, display next image button
if(activeImage != (imageArray.length - 1)){
Element.show('nextLink');
document.getElementById('nextLink').onclick = function() {
myLightbox.changeImage(activeImage + 1); return false;
}
}
this.enableKeyboardNav();
},
//
// enableKeyboardNav()
//
enableKeyboardNav: function() {
document.onkeydown = this.keyboardAction;
},
//
// disableKeyboardNav()
//
disableKeyboardNav: function() {
document.onkeydown = '';
},
//
// keyboardAction()
//
keyboardAction: function(e) {
if (e == null) { // ie
keycode = event.keyCode;
escapeKey = 27;
} else { // mozilla
keycode = e.keyCode;
escapeKey = e.DOM_VK_ESCAPE;
}
key = String.fromCharCode(keycode).toLowerCase();
if((key == 'x') || (key == 'o') || (key == 'c') || (keycode == escapeKey)){ // close lightbox
myLightbox.end();
} else if((key == 'p') || (keycode == 37)){ // display previous image
if(activeImage != 0){
myLightbox.disableKeyboardNav();
myLightbox.changeImage(activeImage - 1);
}
} else if((key == 'n') || (keycode == 39)){ // display next image
if(activeImage != (imageArray.length - 1)){
myLightbox.disableKeyboardNav();
myLightbox.changeImage(activeImage + 1);
}
}
},
//
// preloadNeighborImages()
// Preload previous and next images.
//
preloadNeighborImages: function(){
if((imageArray.length - 1) > activeImage){
preloadNextImage = new Image();
preloadNextImage.src = imageArray[activeImage + 1][0];
}
if(activeImage > 0){
preloadPrevImage = new Image();
preloadPrevImage.src = imageArray[activeImage - 1][0];
}
},
//
// end()
//
end: function() {
this.disableKeyboardNav();
Element.hide('lightbox');
new Effect.Fade('overlay', { duration: overlayDuration});
showSelectBoxes();
showFlash();
}
}
// -----------------------------------------------------------------------------------
//
// getPageScroll()
// Returns array with x,y page scroll values.
// Core code from - quirksmode.com
//
function getPageScroll(){
var xScroll, yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
xScroll = self.pageXOffset;
} else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict
yScroll = document.documentElement.scrollTop;
xScroll = document.documentElement.scrollLeft;
} else if (document.body) {// all other Explorers
yScroll = document.body.scrollTop;
xScroll = document.body.scrollLeft;
}
arrayPageScroll = new Array(xScroll,yScroll)
return arrayPageScroll;
}
// -----------------------------------------------------------------------------------
//
// getPageSize()
// Returns array with page width, height and window width, height
// Core code from - quirksmode.com
// Edit for Firefox by pHaez
//
function getPageSize(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = window.innerWidth + window.scrollMaxX;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
// console.log(self.innerWidth);
// console.log(document.documentElement.clientWidth);
if (self.innerHeight) { // all except Explorer
if(document.documentElement.clientWidth){
windowWidth = document.documentElement.clientWidth;
} else {
windowWidth = self.innerWidth;
}
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
// for small pages with total height less then height of the viewport
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
// console.log("xScroll " + xScroll)
// console.log("windowWidth " + windowWidth)
// for small pages with total width less then width of the viewport
if(xScroll < windowWidth){
pageWidth = xScroll;
} else {
pageWidth = windowWidth;
}
// console.log("pageWidth " + pageWidth)
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}
// -----------------------------------------------------------------------------------
//
// getKey(key)
// Gets keycode. If 'x' is pressed then it hides the lightbox.
//
function getKey(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
key = String.fromCharCode(keycode).toLowerCase();
if(key == 'x'){
}
}
// -----------------------------------------------------------------------------------
//
// listenKey()
//
function listenKey () { document.onkeypress = getKey; }
// ---------------------------------------------------
function showSelectBoxes(){
var selects = document.getElementsByTagName("select");
for (i = 0; i != selects.length; i++) {
selects[i].style.visibility = "visible";
}
}
// ---------------------------------------------------
function hideSelectBoxes(){
var selects = document.getElementsByTagName("select");
for (i = 0; i != selects.length; i++) {
selects[i].style.visibility = "hidden";
}
}
// ---------------------------------------------------
function showFlash(){
var flashObjects = document.getElementsByTagName("object");
for (i = 0; i < flashObjects.length; i++) {
flashObjects[i].style.visibility = "visible";
}
var flashEmbeds = document.getElementsByTagName("embed");
for (i = 0; i < flashEmbeds.length; i++) {
flashEmbeds[i].style.visibility = "visible";
}
}
// ---------------------------------------------------
function hideFlash(){
var flashObjects = document.getElementsByTagName("object");
for (i = 0; i < flashObjects.length; i++) {
flashObjects[i].style.visibility = "hidden";
}
var flashEmbeds = document.getElementsByTagName("embed");
for (i = 0; i < flashEmbeds.length; i++) {
flashEmbeds[i].style.visibility = "hidden";
}
}
// ---------------------------------------------------
//
// pause(numberMillis)
// Pauses code execution for specified time. Uses busy code, not good.
// Help from Ran Bar-On [ran2103@gmail.com]
//
function pause(ms){
var date = new Date();
curDate = null;
do{var curDate = new Date();}
while( curDate - date < ms);
}
/*
function pause(numberMillis) {
var curently = new Date().getTime() + sender;
while (new Date().getTime();
}
*/
// ---------------------------------------------------
function initLightbox() { myLightbox = new Lightbox(); }
Event.observe(window, 'load', initLightbox, false);

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -0,0 +1,152 @@
function t(t,a,n,p) {
alert(+n+" St<53>ck "+t+" "+a+" wurde in den Warenkorb gelegt! ");
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
document.cookie = name1+"=";}
// 16x4 Spindeln nach L<>nge bestellen
function ts(t, a ,n,l, p) {
machen = true;
if ( l.length != 3 ) { alert("Bitte die L<>nge richtig eingeben (3 Stellen)!");machen = false; }
if ( l > 999 ) { alert("Maximale L<>nge des Trapezgewindes ist 999 mm!");machen = false; }
if ( l < 100 ) { alert("Minimale L<>nge des Trapezgewindes ist 100 mm!");machen = false; }
if (machen == true ) {
p = 0.02; // Preis pro mm
p = (p * l);
p = p.toFixed(2);
a = a + l + "c";
alert(+n+" St<53>ck "+t+" "+a+" wurde in den Warenkorb gelegt! ");
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
document.cookie = name1+"="; }
}
// 12x3 Spindeln langes Gewinde
function tsl1(t, a ,n,l, p) {
machen = true;
if ( l.length != 3 ) { alert("Bitte die L<>nge richtig eingeben (3 Stellen)!");machen = false; }
if ( l > 900 ) { alert("Maximale L<>nge des Trapezgewindes ist 900 mm!");machen = false; }
if ( l < 100 ) { alert("Minimale L<>nge des Trapezgewindes ist 100 mm!");machen = false; }
if (machen == true ) {
p = 0.015; // Preis pro mm
p = (p * l) + 12.14;
p = p.toFixed(2);
a = a + l + "c";
alert(+n+" St<53>ck "+t+" "+a+" wurde in den Warenkorb gelegt! ");
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
document.cookie = name1+"="; }
}
// 16x4 Spindeln kurzes Gewinde
function tsk(t, a ,n,l, p) {
machen = true;
if ( l.length == 3 ) { a = "16X4TK0"; }
if ( l.length == 4 ) { a = "16X4TK"; }
if ( l > 1230 ) { alert("Maximale L<>nge des Trapezgewindes ist 1230 mm!");machen = false; }
if ( l < 100 ) { alert("Minimale L<>nge des Trapezgewindes ist 100 mm!");machen = false; }
if (machen == true ) {
p = 0.02; // Preis pro mm
p = (p * l) + 13.14;
p = p.toFixed(2);
if ( l < 1100 ) { a = a + l + "c"; }
if ( l > 1099 ) { a = a + l + "e"; }
alert(+n+" St<53>ck "+t+" "+a+" wurde in den Warenkorb gelegt! ");
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
document.cookie = name1+"="; }
}
// 16x4 Spindeln langes Gewinde
function tsl(t, a ,n,l, p) {
machen = true;
if ( l.length == 3 ) { a = "16X4TL0"; }
if ( l.length == 4 ) { a = "16X4TL"; }
if ( l > 1230 ) { alert("Maximale L<>nge des Trapezgewindes ist 1230 mm!");machen = false; }
if ( l < 100 ) { alert("Minimale L<>nge des Trapezgewindes ist 100 mm!");machen = false; }
if (machen == true ) {
p = 0.02; // Preis pro mm
p = (p * l) + 13.14;
p = p.toFixed(2);
if ( l < 1100 ) { a = a + l + "c"; }
if ( l > 1099 ) { a = a + l + "e"; }
alert(+n+" St<53>ck "+t+" "+a+" wurde in den Warenkorb gelegt! ");
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
document.cookie = name1+"="; }
}
// 16x4 Spindeln langes Gewinde 33mm
function tss(t, a ,n,l, p) {
machen = true;
if ( l.length == 3 ) { a = "16X4TS0"; }
if ( l.length == 4 ) { a = "16X4TS"; }
if ( l > 1230 ) { alert("Maximale L<>nge des Trapezgewindes ist 1230 mm!");machen = false; }
if ( l < 100 ) { alert("Minimale L<>nge des Trapezgewindes ist 100 mm!");machen = false; }
if (machen == true ) {
p = 0.02; // Preis pro mm
p = (p * l) + 13.14;
p = p.toFixed(2);
if ( l < 1100 ) { a = a + l + "c"; }
if ( l > 1099 ) { a = a + l + "e"; }
alert(+n+" St<53>ck "+t+" "+a+" wurde in den Warenkorb gelegt! ");
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
document.cookie = name1+"="; }
}
function CookieSetzen (name, wert, verfall, pfad, domain, sicher) {
document.cookie = name + "=" + escape (wert) +
((verfall) ? "; expires=" + verfall.toGMTString() : "") +
((pfad) ? "; path=" + pfad : "") +
((domain) ? "; domain=" + domain : "") +
((sicher) ? "; secure=" + sicher : "");
}
function WegdaCookie(name, pfad, domain) {
Ehemals = new Date ();
Ehemals.setTime (Ehemals.getTime () - (365 * 24 * 60 * 60 * 1000));
CookieSetzen (name, "", Ehemals, pfad, domain);
}
function agb() {
if (document.form.B_.value == '') alert("Ihr Warenkorb ist leer! Bitte zuerst eine Ware durch anklicken in den Warenkorb legen !");
else
if (document.form.AGBs________.checked != true ) alert("Bitte zuerst AGB's best<73>tigen !");
else
if (document.form.email_______.value == '' ) alert("Bitte Emailadresse eingeben!");
else
if (document.form.email_______.value.indexOf('.') < 0) alert("Emailadresse ungueltig!");
else
if (document.form.email_______.value.indexOf('@') < 0) alert("Emailadresse ungueltig!");
else
if (document.form.Name________.value == '' ) alert("Bitte Ihren Namen eingeben !");
else
if (document.form.Strasse_____.value == '' ) alert("Bitte Strasse mit Nummer eingeben !");
else
if (document.form.Plz_________.value == '' ) alert("Bitte Ihre PLZ eingeben !");
else
if (document.form.Ort_________.value == '' ) alert("Bitte Ihren Ort eingeben !");
}
function focus1() {
document.form.Name________.select();
}

View File

@ -0,0 +1,40 @@
function get_z1()
{
return("Vorkasse");
}
function get_z2()
{
return("");
}
function get_z3()
{
return("");
}
function get_z4()
{
return("");
}
function get_p1()
{
return("2.45");
}
function get_p2()
{
return("");
}
function get_p3()
{
return("");
}
function get_p4()
{
return("");
}
function get_waehrung()
{
return("Euro");
}
function get_text1()
{
return("");
}

View File

@ -0,0 +1,480 @@
var ursprung='';
var sprung=0;
var ziel='';
felder = new Array("document.form.besteller","form.strasse","plz","ort" );
function del()
{//WegdaCookie(document.cookie,0,0);
}
function del_wk()
{
document.form.B_.value = "";
// document.cookie = "=";
WegdaCookie(document.cookie,0,0);
}
function onload1() {
zahlungsarten();
berechne();
}
function zahlungsarten () {
// ***************************************************************
// Zahlungsarten eintragen ist aber nicht wichtig
// ***************************************************************
if(get_z4()!="") {
element = new Option(get_z4(),get_p4(), false, true);
document.form.Versand_____.options[3] = element;
}
if(get_z3()!="") {
element = new Option(get_z3(),get_p3(), false, true);
document.form.Versand_____.options[2] = element;
}
if(get_z2()!="") {
element = new Option(get_z2(),get_p2(), false, true);
document.form.Versand_____.options[1] = element;
}
if(get_z1()!="") {
element = new Option(get_z1(),get_p1(), false, true);
document.form.Versand_____.options[0] = element;
}
}
function berechne () {
anmerkung = 0;
anmerkungg = 0;
versand = "";
versand = "2.45";
versandz = 0;
// cookie in B_ schreiben
c = document.cookie;
//if(documern.Name________.value == "debug")alert(c);
px1 = 0;
px2 = 0;
// 1. Test ob Warenkorb brauchbar
px1 = c.indexOf('p1r2i');
if (px1<0) c = ""; // Warenkorb hat keine Positionen
//if(documern.Name________.value == "debug") alert(c);
c = c+";";
l = c.length;
document.form.B_.value = "";
// alert(c+" "+l);
// alert(l);
if ( l > 7 ) {
i = 0;
w = true;
pos = 0;
len1 = 0;
f = 0;
position = 0;
pos_gpreis = 0.0;
pos_epreis = 0.0;
pos_menge = 0.0;
spos_gpreis = " ";
sum_gpreis = 0.0;
rabatt = " ";
sum_vpreis = 0.0;
ssum_gpreis = " ";
while( w == true) {
px1 = c.indexOf('p1r2i');
c = c.substr(px1+6,l); // vorne abschneiden
px2 = c.indexOf(';');
pos = 1;
sub1 = c.substr(0,px2); // eine Position im String
c = c.substr(px2+1,l); // Position wird rausgeschnitten
len1 = sub1.length; // L<>nge Positionsstring
// alert(c);
// alert("sub1: "+sub1);
// eine Position ermittelt
// alert("|"+sub1+" "+len1);
ab1 = 0;
ab2 = 0;
ab3 = 0;
for (f=0;f<len1;f++){ if(sub1.substr(f,1)=="|") { if(ab2!=0) ab3 = f;
if(ab1!=0&&ab2==0) ab2 = f;
if(ab1==0) ab1 = f;
}
} // for
artikel = sub1.substr(0,ab1);
text = sub1.substr(ab1+1,ab2-ab1-1);
menge = sub1.substr(ab2+1,ab3-ab2-1);
preis = sub1.substr(ab3+1,len1-ab3);
// wegen Mozilla !!
pl = preis.length;
if(preis.substr(pl-1,1)== '=') preis = preis.substr(0,pl-1);
pos_menge = menge;
pos_epreis = preis;
pos_gpreis = pos_menge * pos_epreis;
sum_gpreis = sum_gpreis + pos_gpreis;
//spos_gpreis = pos_gpreis.toString();
spos_gpreis = pos_gpreis.toFixed(2); // 2 Nachkommastellen
lg = spos_gpreis.length
if (spos_gpreis.indexOf('.')== -1) spos_gpreis = spos_gpreis+".00";
if (spos_gpreis.indexOf('.')== lg-2 ) spos_gpreis = spos_gpreis+"0";
fixlen = 7;
spos_gpreis = spos_gpreis.substr(0,fixlen);
alen = spos_gpreis.length;
text1 = "";
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text1 = text1+spos_gpreis;
spos_gpreis = text1;
apos = "0";
position = position +1;
apos = position;
text1 = "";
if (position <10 ) text1 = "0";
text1 = text1+apos;
apos = text1;
fixlen = 11;
artikel = artikel.substr(0,fixlen);
alen = artikel.length;
text1 = artikel;
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
artikel = text1;
fixlen = 30;
text = text.substr(0,fixlen);
alen = text.length;
text1 = text;
//for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text = text1;
fixlen = 5;
menge = menge.substr(0,fixlen);
alen = menge.length;
text1 = "";
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text1 = text1+menge;
menge = text1;
fixlen = 6;
preis = preis.substr(0,fixlen);
text1 = ""
alen = preis.length;
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
if (alen == 4) text1 = " " + text1;
text1 = text1+preis;
preis = text1;
//alert("|"+artikel);
//alert(text);
//alert(menge);
//alert(preis);
//b WegdaCookie(sub1,0,0);
text1 = " "+apos+""+menge+"St<53>ck "+artikel+" Preis:"+preis+"<22> Summe:"+spos_gpreis+"<22> "+text+"\n";
lg = artikel.length;
if (artikel.indexOf('a')==lg-1) if (versandz < 1)versandz = 1;
if (artikel.indexOf('b')==lg-1) if (versandz < 2)versandz = 2;
if (artikel.indexOf('c')==lg-1) if (versandz < 3)versandz = 3;
if (artikel.indexOf('d')==lg-1) if (versandz < 4)versandz = 4;
if (artikel.indexOf('e')==lg-1) if (versandz < 5)versandz = 5;
if (artikel.indexOf('f')==lg-1) if (versandz < 6)versandz = 6;
if (artikel.indexOf('g')==lg-1) if (versandz < 7)versandz = 7;
if (artikel.indexOf('h')==lg-1) if (versandz < 8)versandz = 8;
if (artikel.indexOf('x')==lg-2) anmerkung = 1;
if (artikel.indexOf('g')==lg-1) anmerkungg = 1;
if (artikel.indexOf('h')==lg-1) anmerkungg = 1;
document.form.B_.value = document.form.B_.value + text1;
if(c.indexOf('p1r2i') < 0 ) break;
} // end while ----------------------------------------------------------
if (versandz == 1) versand = "4.45";
if (versandz == 2) versand = "5.95";
if (versandz == 3) versand = "8.95";
if (versandz == 4) versand = "9.95";
if (versandz == 5) versand = "14.95";
if (versandz == 6) versand = "19.95";
if (versandz == 7) versand = "159.00";
if (versandz == 8) versand = "159.00";
gesammtpreis = sum_gpreis.toFixed(2); // 2 Nachkommastellen
//if (sum_gpreis > 49.99) if (sum_gpreis < 100) sum_gpreis = sum_gpreis /100 * 97 ;
//if (sum_gpreis > 99.99) if (sum_gpreis < 150) sum_gpreis = sum_gpreis /100 * 96 ;
//if (sum_gpreis > 149.99) sum_gpreis = sum_gpreis /100 * 95 ;
if (sum_gpreis > 350) if (versand == "5.95") versand = "8.95";
if (sum_gpreis > 150) if (versand == "4.45") versand = "5.95";
//ssum_gpreis = sum_gpreis.toString();
ssum_gpreis = sum_gpreis.toFixed(2); // 2 Nachkommastellen
lg = ssum_gpreis.length;
if (ssum_gpreis.indexOf('.')== lg-1) ssum_gpreis = ssum_gpreis + ".00";
if (ssum_gpreis.indexOf('.')== lg-2 ) ssum_gpreis = ssum_gpreis +"0";
lx1 = ssum_gpreis.indexOf('.');
ssum_gpreis = ssum_gpreis.substr(0,lx1+3);
fixlen = 10;
ssum_gpreis = ssum_gpreis.substr(0,fixlen);
alen = ssum_gpreis.length;
text1 = "";
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text1 = text1+ssum_gpreis;
ssum_gpreis = text1;
//
//
text1 = "\n";
document.form.B_.value = document.form.B_.value + text1;
rabatt = " ";
//if (gesammtpreis > 49.99) if (gesammtpreis < 100) rabatt = " vom Warenwert " +gesammtpreis+" Euro wurden 3% Rabatt abgezogen!";
//if (gesammtpreis > 99.99) if (gesammtpreis < 150) rabatt = " vom Warenwert " +gesammtpreis+" Euro wurden 4% Rabatt abgezogen!";
//if (gesammtpreis > 149.99) rabatt = " vom Warenwert " +gesammtpreis+" Euro wurden 5% Rabatt abgezogen!";
text1 = "Warenwert Summe: "+get_waehrung()+ssum_gpreis+rabatt+"\n";
document.form.B_.value = document.form.B_.value + text1;
//
//
vtext = "";
vpreis = "";
if (get_z1() != "") if(document.form.Versand_____.options[0].selected) vtext = get_z1();
if (get_z2() != "") if(document.form.Versand_____.options[1].selected) vtext = get_z2();
if (get_z3() != "") if(document.form.Versand_____.options[2].selected) vtext = get_z3();
if (get_z4() != "") if(document.form.Versand_____.options[3].selected) vtext = get_z4();
if (get_z1() != "") if(document.form.Versand_____.options[0].selected) vpreis = get_p1();
if (get_z2() != "") if(document.form.Versand_____.options[1].selected) vpreis = get_p2();
if (get_z3() != "") if(document.form.Versand_____.options[2].selected) vpreis = get_p3();
if (get_z4() != "") if(document.form.Versand_____.options[3].selected) vpreis = get_p4();
if (vpreis > 0 ) {
if (versand > 0) vpreis = versand; //Versand wird erh<72>ht;
sum_vpreis = vpreis;
sum_gpreis += (sum_vpreis * 1);
fixlen = 6;
vpreis = vpreis.substr(0,fixlen);
alen = vpreis.length;
text1 = "";
//for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text1 = text1+vpreis;
vpreis = text1;
fixlen = 12;
vtext = vtext.substr(0,fixlen);
alen = vtext.length;
text1 = "";
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text1 = text1+vtext;
vtext = text1;
text1 = "Versandkosten incl: "+get_waehrung()+" "+vpreis+"\n";
document.form.B_.value = document.form.B_.value + text1;
} // Ende Berechnung der Versandkosten
ssum_gpreis = sum_gpreis.toString();
//alert(ssum_gpreis);
lg = ssum_gpreis.length
if (ssum_gpreis.indexOf('.')== -1) ssum_gpreis = ssum_gpreis + ".00";
if (ssum_gpreis.indexOf('.')== lg-2 ) ssum_gpreis = ssum_gpreis +"0";
lx1 = ssum_gpreis.indexOf('.');
ssum_gpreis = ssum_gpreis.substr(0,lx1+3);
fixlen = 10;
ssum_gpreis = ssum_gpreis.substr(0,fixlen);
alen = ssum_gpreis.length;
text1 = "";
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text1 = text1+ssum_gpreis;
ssum_gpreis = text1;
//
//
if (vpreis > 0 ) {
text1 = "Rechnungssumme: "+get_waehrung()+ssum_gpreis+"\n";
document.form.B_.value = document.form.B_.value + text1;
mwst = sum_gpreis; // Endpreis <20>bernehmen
mwst = mwst/119*19;
mwst = mwst.toFixed(2); // 2 Nachkommastellen
text1 ="enth<74>lt 19% MwSt: "+get_waehrung()+" "+mwst+"\n\n";
document.form.B_.value = document.form.B_.value + text1;
if (anmerkung > 0)text1 = "Wir pr<70>fen, ob der gew<65>nschte Sonderposten verf<72>gbar ist. Best<73>tigung erfolgt per extra Mail!\n\n";
if (anmerkung > 0)document.form.B_.value = document.form.B_.value + text1;
if ( versand == "159.00")text1 = "Sie brauchen das Geld f<>r die Maschine nicht gleich <20>berweisen. In den n<>chsten\n";
if ( versand == "159.00")document.form.B_.value = document.form.B_.value + text1;
if ( versand == "159.00")text1 = "Tagen erhalten Sie eine Anzahlungsrechnung, die Sie dann bitte <20>berweisen.\n\n";
if ( versand == "159.00")document.form.B_.value = document.form.B_.value + text1;
} // end Vpreis > 0
if (get_text1().length > 0) document.form.B_.value = document.form.B_.value + get_text1()+"\n";
} // end if l > 7
} // end function
function CookieSetzen (name, wert, verfall, pfad, domain, sicher) {
document.cookie = name + "=" + escape (wert) +
((verfall) ? "; expires=" + verfall.toGMTString() : "") +
((pfad) ? "; path=" + pfad : "") +
((domain) ? "; domain=" + domain : "") +
((sicher) ? "; secure=" + sicher : "");
}
function WegdaCookie(name, pfad, domain) {
Ehemals = new Date ();
Ehemals.setTime (Ehemals.getTime () - (365 * 24 * 60 * 60 * 1000));
CookieSetzen (name, "", Ehemals, pfad, domain);
}
function d(pos1)
{
npos1 = 0;
zpos1 = 0;
len1 = 0;
len2 = 0;
npos1 = pos1;
if(document.form.Name________.value == "debug") alert(document.cookie);
else {
c = document.cookie;
c = c+";";
npos1 = 0;
while (true) {
px1 = c.indexOf('p1r2i');
c = c.substr(px1,l); // vorne abschneiden
px2 = c.indexOf(';');
sub1 = c.substr(0,px2); // eine Position im String
c = c.substr(px2+1,l); // Position wird rausgeschnitten
len1 = sub1.length; // L<>nge Positionsstring
npos1 = npos1 +1;
if (npos1 == pos1) break;
}
// eine Position ermittelt
// alert(sub1);
// alert(c);
alert("Position "+pos1+" gel<65>scht !");
WegdaCookie(sub1,0,0);
berechne();
}
}

View File

@ -0,0 +1,26 @@
var Scriptaculous = {
Version: '1.5.1',
require: function(libraryName) {
// inserting via DOM fails in Safari 2.0, so brute force approach
document.write('<script type="text/javascript" src="'+libraryName+'"></script>');
},
load: function() {
if((typeof Prototype=='undefined') ||
parseFloat(Prototype.Version.split(".")[0] + "." +
Prototype.Version.split(".")[1]) < 1.4)
throw("script.aculo.us requires the Prototype JavaScript framework >= 1.4.0");
$A(document.getElementsByTagName("script")).findAll( function(s) {
return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
}).each( function(s) {
var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
var includes = s.src.match(/\?.*load=([a-z,]*)/);
(includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each(
function(include) { Scriptaculous.require(path+include+'.js') });
});
}
}
Scriptaculous.load();

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -0,0 +1,2 @@
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body></body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

View File

@ -0,0 +1,903 @@
// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// Contributors:
// Justin Palmer (http://encytemedia.com/)
// Mark Pilgrim (http://diveintomark.org/)
// Martin Bialasinki
//
// See scriptaculous.js for full license.
/* ------------- element ext -------------- */
// converts rgb() and #xxx to #xxxxxx format,
// returns self (or first argument) if not convertable
String.prototype.parseColor = function() {
var color = '#';
if(this.slice(0,4) == 'rgb(') {
var cols = this.slice(4,this.length-1).split(',');
var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);
} else {
if(this.slice(0,1) == '#') {
if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();
if(this.length==7) color = this.toLowerCase();
}
}
return(color.length==7 ? color : (arguments[0] || this));
}
Element.collectTextNodes = function(element) {
return $A($(element).childNodes).collect( function(node) {
return (node.nodeType==3 ? node.nodeValue :
(node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
}).flatten().join('');
}
Element.collectTextNodesIgnoreClass = function(element, className) {
return $A($(element).childNodes).collect( function(node) {
return (node.nodeType==3 ? node.nodeValue :
((node.hasChildNodes() && !Element.hasClassName(node,className)) ?
Element.collectTextNodes(node) : ''));
}).flatten().join('');
}
Element.setStyle = function(element, style) {
element = $(element);
for(k in style) element.style[k.camelize()] = style[k];
}
Element.setContentZoom = function(element, percent) {
Element.setStyle(element, {fontSize: (percent/100) + 'em'});
if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);
}
Element.getOpacity = function(element){
var opacity;
if (opacity = Element.getStyle(element, 'opacity'))
return parseFloat(opacity);
if (opacity = (Element.getStyle(element, 'filter') || '').match(/alpha\(opacity=(.*)\)/))
if(opacity[1]) return parseFloat(opacity[1]) / 100;
return 1.0;
}
Element.setOpacity = function(element, value){
element= $(element);
if (value == 1){
Element.setStyle(element, { opacity:
(/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ?
0.999999 : null });
if(/MSIE/.test(navigator.userAgent))
Element.setStyle(element, {filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'')});
} else {
if(value < 0.00001) value = 0;
Element.setStyle(element, {opacity: value});
if(/MSIE/.test(navigator.userAgent))
Element.setStyle(element,
{ filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'') +
'alpha(opacity='+value*100+')' });
}
}
Element.getInlineOpacity = function(element){
return $(element).style.opacity || '';
}
Element.childrenWithClassName = function(element, className) {
return $A($(element).getElementsByTagName('*')).select(
function(c) { return Element.hasClassName(c, className) });
}
Array.prototype.call = function() {
var args = arguments;
this.each(function(f){ f.apply(this, args) });
}
/*--------------------------------------------------------------------------*/
var Effect = {
tagifyText: function(element) {
var tagifyStyle = 'position:relative';
if(/MSIE/.test(navigator.userAgent)) tagifyStyle += ';zoom:1';
element = $(element);
$A(element.childNodes).each( function(child) {
if(child.nodeType==3) {
child.nodeValue.toArray().each( function(character) {
element.insertBefore(
Builder.node('span',{style: tagifyStyle},
character == ' ' ? String.fromCharCode(160) : character),
child);
});
Element.remove(child);
}
});
},
multiple: function(element, effect) {
var elements;
if(((typeof element == 'object') ||
(typeof element == 'function')) &&
(element.length))
elements = element;
else
elements = $(element).childNodes;
var options = Object.extend({
speed: 0.1,
delay: 0.0
}, arguments[2] || {});
var masterDelay = options.delay;
$A(elements).each( function(element, index) {
new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
});
},
PAIRS: {
'slide': ['SlideDown','SlideUp'],
'blind': ['BlindDown','BlindUp'],
'appear': ['Appear','Fade']
},
toggle: function(element, effect) {
element = $(element);
effect = (effect || 'appear').toLowerCase();
var options = Object.extend({
queue: { position:'end', scope:(element.id || 'global') }
}, arguments[2] || {});
Effect[Element.visible(element) ?
Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
}
};
var Effect2 = Effect; // deprecated
/* ------------- transitions ------------- */
Effect.Transitions = {}
Effect.Transitions.linear = function(pos) {
return pos;
}
Effect.Transitions.sinoidal = function(pos) {
return (-Math.cos(pos*Math.PI)/2) + 0.5;
}
Effect.Transitions.reverse = function(pos) {
return 1-pos;
}
Effect.Transitions.flicker = function(pos) {
return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;
}
Effect.Transitions.wobble = function(pos) {
return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;
}
Effect.Transitions.pulse = function(pos) {
return (Math.floor(pos*10) % 2 == 0 ?
(pos*10-Math.floor(pos*10)) : 1-(pos*10-Math.floor(pos*10)));
}
Effect.Transitions.none = function(pos) {
return 0;
}
Effect.Transitions.full = function(pos) {
return 1;
}
/* ------------- core effects ------------- */
Effect.ScopedQueue = Class.create();
Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), {
initialize: function() {
this.effects = [];
this.interval = null;
},
_each: function(iterator) {
this.effects._each(iterator);
},
add: function(effect) {
var timestamp = new Date().getTime();
var position = (typeof effect.options.queue == 'string') ?
effect.options.queue : effect.options.queue.position;
switch(position) {
case 'front':
// move unstarted effects after this effect
this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) {
e.startOn += effect.finishOn;
e.finishOn += effect.finishOn;
});
break;
case 'end':
// start effect after last queued effect has finished
timestamp = this.effects.pluck('finishOn').max() || timestamp;
break;
}
effect.startOn += timestamp;
effect.finishOn += timestamp;
this.effects.push(effect);
if(!this.interval)
this.interval = setInterval(this.loop.bind(this), 40);
},
remove: function(effect) {
this.effects = this.effects.reject(function(e) { return e==effect });
if(this.effects.length == 0) {
clearInterval(this.interval);
this.interval = null;
}
},
loop: function() {
var timePos = new Date().getTime();
this.effects.invoke('loop', timePos);
}
});
Effect.Queues = {
instances: $H(),
get: function(queueName) {
if(typeof queueName != 'string') return queueName;
if(!this.instances[queueName])
this.instances[queueName] = new Effect.ScopedQueue();
return this.instances[queueName];
}
}
Effect.Queue = Effect.Queues.get('global');
Effect.DefaultOptions = {
transition: Effect.Transitions.sinoidal,
duration: 1.0, // seconds
fps: 25.0, // max. 25fps due to Effect.Queue implementation
sync: false, // true for combining
from: 0.0,
to: 1.0,
delay: 0.0,
queue: 'parallel'
}
Effect.Base = function() {};
Effect.Base.prototype = {
position: null,
start: function(options) {
this.options = Object.extend(Object.extend({},Effect.DefaultOptions), options || {});
this.currentFrame = 0;
this.state = 'idle';
this.startOn = this.options.delay*1000;
this.finishOn = this.startOn + (this.options.duration*1000);
this.event('beforeStart');
if(!this.options.sync)
Effect.Queues.get(typeof this.options.queue == 'string' ?
'global' : this.options.queue.scope).add(this);
},
loop: function(timePos) {
if(timePos >= this.startOn) {
if(timePos >= this.finishOn) {
this.render(1.0);
this.cancel();
this.event('beforeFinish');
if(this.finish) this.finish();
this.event('afterFinish');
return;
}
var pos = (timePos - this.startOn) / (this.finishOn - this.startOn);
var frame = Math.round(pos * this.options.fps * this.options.duration);
if(frame > this.currentFrame) {
this.render(pos);
this.currentFrame = frame;
}
}
},
render: function(pos) {
if(this.state == 'idle') {
this.state = 'running';
this.event('beforeSetup');
if(this.setup) this.setup();
this.event('afterSetup');
}
if(this.state == 'running') {
if(this.options.transition) pos = this.options.transition(pos);
pos *= (this.options.to-this.options.from);
pos += this.options.from;
this.position = pos;
this.event('beforeUpdate');
if(this.update) this.update(pos);
this.event('afterUpdate');
}
},
cancel: function() {
if(!this.options.sync)
Effect.Queues.get(typeof this.options.queue == 'string' ?
'global' : this.options.queue.scope).remove(this);
this.state = 'finished';
},
event: function(eventName) {
if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this);
if(this.options[eventName]) this.options[eventName](this);
},
inspect: function() {
return '#<Effect:' + $H(this).inspect() + ',options:' + $H(this.options).inspect() + '>';
}
}
Effect.Parallel = Class.create();
Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), {
initialize: function(effects) {
this.effects = effects || [];
this.start(arguments[1]);
},
update: function(position) {
this.effects.invoke('render', position);
},
finish: function(position) {
this.effects.each( function(effect) {
effect.render(1.0);
effect.cancel();
effect.event('beforeFinish');
if(effect.finish) effect.finish(position);
effect.event('afterFinish');
});
}
});
Effect.Opacity = Class.create();
Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), {
initialize: function(element) {
this.element = $(element);
// make this work on IE on elements without 'layout'
if(/MSIE/.test(navigator.userAgent) && (!this.element.hasLayout))
Element.setStyle(this.element, {zoom: 1});
var options = Object.extend({
from: Element.getOpacity(this.element) || 0.0,
to: 1.0
}, arguments[1] || {});
this.start(options);
},
update: function(position) {
Element.setOpacity(this.element, position);
}
});
Effect.Move = Class.create();
Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), {
initialize: function(element) {
this.element = $(element);
var options = Object.extend({
x: 0,
y: 0,
mode: 'relative'
}, arguments[1] || {});
this.start(options);
},
setup: function() {
// Bug in Opera: Opera returns the "real" position of a static element or
// relative element that does not have top/left explicitly set.
// ==> Always set top and left for position relative elements in your stylesheets
// (to 0 if you do not need them)
Element.makePositioned(this.element);
this.originalLeft = parseFloat(Element.getStyle(this.element,'left') || '0');
this.originalTop = parseFloat(Element.getStyle(this.element,'top') || '0');
if(this.options.mode == 'absolute') {
// absolute movement, so we need to calc deltaX and deltaY
this.options.x = this.options.x - this.originalLeft;
this.options.y = this.options.y - this.originalTop;
}
},
update: function(position) {
Element.setStyle(this.element, {
left: this.options.x * position + this.originalLeft + 'px',
top: this.options.y * position + this.originalTop + 'px'
});
}
});
// for backwards compatibility
Effect.MoveBy = function(element, toTop, toLeft) {
return new Effect.Move(element,
Object.extend({ x: toLeft, y: toTop }, arguments[3] || {}));
};
Effect.Scale = Class.create();
Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), {
initialize: function(element, percent) {
this.element = $(element)
var options = Object.extend({
scaleX: true,
scaleY: true,
scaleContent: true,
scaleFromCenter: false,
scaleMode: 'box', // 'box' or 'contents' or {} with provided values
scaleFrom: 100.0,
scaleTo: percent
}, arguments[2] || {});
this.start(options);
},
setup: function() {
this.restoreAfterFinish = this.options.restoreAfterFinish || false;
this.elementPositioning = Element.getStyle(this.element,'position');
this.originalStyle = {};
['top','left','width','height','fontSize'].each( function(k) {
this.originalStyle[k] = this.element.style[k];
}.bind(this));
this.originalTop = this.element.offsetTop;
this.originalLeft = this.element.offsetLeft;
var fontSize = Element.getStyle(this.element,'font-size') || '100%';
['em','px','%'].each( function(fontSizeType) {
if(fontSize.indexOf(fontSizeType)>0) {
this.fontSize = parseFloat(fontSize);
this.fontSizeType = fontSizeType;
}
}.bind(this));
this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
this.dims = null;
if(this.options.scaleMode=='box')
this.dims = [this.element.offsetHeight, this.element.offsetWidth];
if(/^content/.test(this.options.scaleMode))
this.dims = [this.element.scrollHeight, this.element.scrollWidth];
if(!this.dims)
this.dims = [this.options.scaleMode.originalHeight,
this.options.scaleMode.originalWidth];
},
update: function(position) {
var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
if(this.options.scaleContent && this.fontSize)
Element.setStyle(this.element, {fontSize: this.fontSize * currentScale + this.fontSizeType });
this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);
},
finish: function(position) {
if (this.restoreAfterFinish) Element.setStyle(this.element, this.originalStyle);
},
setDimensions: function(height, width) {
var d = {};
if(this.options.scaleX) d.width = width + 'px';
if(this.options.scaleY) d.height = height + 'px';
if(this.options.scaleFromCenter) {
var topd = (height - this.dims[0])/2;
var leftd = (width - this.dims[1])/2;
if(this.elementPositioning == 'absolute') {
if(this.options.scaleY) d.top = this.originalTop-topd + 'px';
if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px';
} else {
if(this.options.scaleY) d.top = -topd + 'px';
if(this.options.scaleX) d.left = -leftd + 'px';
}
}
Element.setStyle(this.element, d);
}
});
Effect.Highlight = Class.create();
Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), {
initialize: function(element) {
this.element = $(element);
var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {});
this.start(options);
},
setup: function() {
// Prevent executing on elements not in the layout flow
if(Element.getStyle(this.element, 'display')=='none') { this.cancel(); return; }
// Disable background image during the effect
this.oldStyle = {
backgroundImage: Element.getStyle(this.element, 'background-image') };
Element.setStyle(this.element, {backgroundImage: 'none'});
if(!this.options.endcolor)
this.options.endcolor = Element.getStyle(this.element, 'background-color').parseColor('#ffffff');
if(!this.options.restorecolor)
this.options.restorecolor = Element.getStyle(this.element, 'background-color');
// init color calculations
this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
},
update: function(position) {
Element.setStyle(this.element,{backgroundColor: $R(0,2).inject('#',function(m,v,i){
return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) });
},
finish: function() {
Element.setStyle(this.element, Object.extend(this.oldStyle, {
backgroundColor: this.options.restorecolor
}));
}
});
Effect.ScrollTo = Class.create();
Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), {
initialize: function(element) {
this.element = $(element);
this.start(arguments[1] || {});
},
setup: function() {
Position.prepare();
var offsets = Position.cumulativeOffset(this.element);
if(this.options.offset) offsets[1] += this.options.offset;
var max = window.innerHeight ?
window.height - window.innerHeight :
document.body.scrollHeight -
(document.documentElement.clientHeight ?
document.documentElement.clientHeight : document.body.clientHeight);
this.scrollStart = Position.deltaY;
this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart;
},
update: function(position) {
Position.prepare();
window.scrollTo(Position.deltaX,
this.scrollStart + (position*this.delta));
}
});
/* ------------- combination effects ------------- */
Effect.Fade = function(element) {
var oldOpacity = Element.getInlineOpacity(element);
var options = Object.extend({
from: Element.getOpacity(element) || 1.0,
to: 0.0,
afterFinishInternal: function(effect) { with(Element) {
if(effect.options.to!=0) return;
hide(effect.element);
setStyle(effect.element, {opacity: oldOpacity}); }}
}, arguments[1] || {});
return new Effect.Opacity(element,options);
}
Effect.Appear = function(element) {
var options = Object.extend({
from: (Element.getStyle(element, 'display') == 'none' ? 0.0 : Element.getOpacity(element) || 0.0),
to: 1.0,
beforeSetup: function(effect) { with(Element) {
setOpacity(effect.element, effect.options.from);
show(effect.element); }}
}, arguments[1] || {});
return new Effect.Opacity(element,options);
}
Effect.Puff = function(element) {
element = $(element);
var oldStyle = { opacity: Element.getInlineOpacity(element), position: Element.getStyle(element, 'position') };
return new Effect.Parallel(
[ new Effect.Scale(element, 200,
{ sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }),
new Effect.Opacity(element, { sync: true, to: 0.0 } ) ],
Object.extend({ duration: 1.0,
beforeSetupInternal: function(effect) { with(Element) {
setStyle(effect.effects[0].element, {position: 'absolute'}); }},
afterFinishInternal: function(effect) { with(Element) {
hide(effect.effects[0].element);
setStyle(effect.effects[0].element, oldStyle); }}
}, arguments[1] || {})
);
}
Effect.BlindUp = function(element) {
element = $(element);
Element.makeClipping(element);
return new Effect.Scale(element, 0,
Object.extend({ scaleContent: false,
scaleX: false,
restoreAfterFinish: true,
afterFinishInternal: function(effect) { with(Element) {
[hide, undoClipping].call(effect.element); }}
}, arguments[1] || {})
);
}
Effect.BlindDown = function(element) {
element = $(element);
var oldHeight = Element.getStyle(element, 'height');
var elementDimensions = Element.getDimensions(element);
return new Effect.Scale(element, 100,
Object.extend({ scaleContent: false,
scaleX: false,
scaleFrom: 0,
scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
restoreAfterFinish: true,
afterSetup: function(effect) { with(Element) {
makeClipping(effect.element);
setStyle(effect.element, {height: '0px'});
show(effect.element);
}},
afterFinishInternal: function(effect) { with(Element) {
undoClipping(effect.element);
setStyle(effect.element, {height: oldHeight});
}}
}, arguments[1] || {})
);
}
Effect.SwitchOff = function(element) {
element = $(element);
var oldOpacity = Element.getInlineOpacity(element);
return new Effect.Appear(element, {
duration: 0.4,
from: 0,
transition: Effect.Transitions.flicker,
afterFinishInternal: function(effect) {
new Effect.Scale(effect.element, 1, {
duration: 0.3, scaleFromCenter: true,
scaleX: false, scaleContent: false, restoreAfterFinish: true,
beforeSetup: function(effect) { with(Element) {
[makePositioned,makeClipping].call(effect.element);
}},
afterFinishInternal: function(effect) { with(Element) {
[hide,undoClipping,undoPositioned].call(effect.element);
setStyle(effect.element, {opacity: oldOpacity});
}}
})
}
});
}
Effect.DropOut = function(element) {
element = $(element);
var oldStyle = {
top: Element.getStyle(element, 'top'),
left: Element.getStyle(element, 'left'),
opacity: Element.getInlineOpacity(element) };
return new Effect.Parallel(
[ new Effect.Move(element, {x: 0, y: 100, sync: true }),
new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
Object.extend(
{ duration: 0.5,
beforeSetup: function(effect) { with(Element) {
makePositioned(effect.effects[0].element); }},
afterFinishInternal: function(effect) { with(Element) {
[hide, undoPositioned].call(effect.effects[0].element);
setStyle(effect.effects[0].element, oldStyle); }}
}, arguments[1] || {}));
}
Effect.Shake = function(element) {
element = $(element);
var oldStyle = {
top: Element.getStyle(element, 'top'),
left: Element.getStyle(element, 'left') };
return new Effect.Move(element,
{ x: 20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {
new Effect.Move(effect.element,
{ x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
new Effect.Move(effect.element,
{ x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
new Effect.Move(effect.element,
{ x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
new Effect.Move(effect.element,
{ x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
new Effect.Move(effect.element,
{ x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { with(Element) {
undoPositioned(effect.element);
setStyle(effect.element, oldStyle);
}}}) }}) }}) }}) }}) }});
}
Effect.SlideDown = function(element) {
element = $(element);
Element.cleanWhitespace(element);
// SlideDown need to have the content of the element wrapped in a container element with fixed height!
var oldInnerBottom = Element.getStyle(element.firstChild, 'bottom');
var elementDimensions = Element.getDimensions(element);
return new Effect.Scale(element, 100, Object.extend({
scaleContent: false,
scaleX: false,
scaleFrom: 0,
scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
restoreAfterFinish: true,
afterSetup: function(effect) { with(Element) {
makePositioned(effect.element);
makePositioned(effect.element.firstChild);
if(window.opera) setStyle(effect.element, {top: ''});
makeClipping(effect.element);
setStyle(effect.element, {height: '0px'});
show(element); }},
afterUpdateInternal: function(effect) { with(Element) {
setStyle(effect.element.firstChild, {bottom:
(effect.dims[0] - effect.element.clientHeight) + 'px' }); }},
afterFinishInternal: function(effect) { with(Element) {
undoClipping(effect.element);
undoPositioned(effect.element.firstChild);
undoPositioned(effect.element);
setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }}
}, arguments[1] || {})
);
}
Effect.SlideUp = function(element) {
element = $(element);
Element.cleanWhitespace(element);
var oldInnerBottom = Element.getStyle(element.firstChild, 'bottom');
return new Effect.Scale(element, 0,
Object.extend({ scaleContent: false,
scaleX: false,
scaleMode: 'box',
scaleFrom: 100,
restoreAfterFinish: true,
beforeStartInternal: function(effect) { with(Element) {
makePositioned(effect.element);
makePositioned(effect.element.firstChild);
if(window.opera) setStyle(effect.element, {top: ''});
makeClipping(effect.element);
show(element); }},
afterUpdateInternal: function(effect) { with(Element) {
setStyle(effect.element.firstChild, {bottom:
(effect.dims[0] - effect.element.clientHeight) + 'px' }); }},
afterFinishInternal: function(effect) { with(Element) {
[hide, undoClipping].call(effect.element);
undoPositioned(effect.element.firstChild);
undoPositioned(effect.element);
setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }}
}, arguments[1] || {})
);
}
// Bug in opera makes the TD containing this element expand for a instance after finish
Effect.Squish = function(element) {
return new Effect.Scale(element, window.opera ? 1 : 0,
{ restoreAfterFinish: true,
beforeSetup: function(effect) { with(Element) {
makeClipping(effect.element); }},
afterFinishInternal: function(effect) { with(Element) {
hide(effect.element);
undoClipping(effect.element); }}
});
}
Effect.Grow = function(element) {
element = $(element);
var options = Object.extend({
direction: 'center',
moveTransistion: Effect.Transitions.sinoidal,
scaleTransition: Effect.Transitions.sinoidal,
opacityTransition: Effect.Transitions.full
}, arguments[1] || {});
var oldStyle = {
top: element.style.top,
left: element.style.left,
height: element.style.height,
width: element.style.width,
opacity: Element.getInlineOpacity(element) };
var dims = Element.getDimensions(element);
var initialMoveX, initialMoveY;
var moveX, moveY;
switch (options.direction) {
case 'top-left':
initialMoveX = initialMoveY = moveX = moveY = 0;
break;
case 'top-right':
initialMoveX = dims.width;
initialMoveY = moveY = 0;
moveX = -dims.width;
break;
case 'bottom-left':
initialMoveX = moveX = 0;
initialMoveY = dims.height;
moveY = -dims.height;
break;
case 'bottom-right':
initialMoveX = dims.width;
initialMoveY = dims.height;
moveX = -dims.width;
moveY = -dims.height;
break;
case 'center':
initialMoveX = dims.width / 2;
initialMoveY = dims.height / 2;
moveX = -dims.width / 2;
moveY = -dims.height / 2;
break;
}
return new Effect.Move(element, {
x: initialMoveX,
y: initialMoveY,
duration: 0.01,
beforeSetup: function(effect) { with(Element) {
hide(effect.element);
makeClipping(effect.element);
makePositioned(effect.element);
}},
afterFinishInternal: function(effect) {
new Effect.Parallel(
[ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),
new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),
new Effect.Scale(effect.element, 100, {
scaleMode: { originalHeight: dims.height, originalWidth: dims.width },
sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})
], Object.extend({
beforeSetup: function(effect) { with(Element) {
setStyle(effect.effects[0].element, {height: '0px'});
show(effect.effects[0].element); }},
afterFinishInternal: function(effect) { with(Element) {
[undoClipping, undoPositioned].call(effect.effects[0].element);
setStyle(effect.effects[0].element, oldStyle); }}
}, options)
)
}
});
}
Effect.Shrink = function(element) {
element = $(element);
var options = Object.extend({
direction: 'center',
moveTransistion: Effect.Transitions.sinoidal,
scaleTransition: Effect.Transitions.sinoidal,
opacityTransition: Effect.Transitions.none
}, arguments[1] || {});
var oldStyle = {
top: element.style.top,
left: element.style.left,
height: element.style.height,
width: element.style.width,
opacity: Element.getInlineOpacity(element) };
var dims = Element.getDimensions(element);
var moveX, moveY;
switch (options.direction) {
case 'top-left':
moveX = moveY = 0;
break;
case 'top-right':
moveX = dims.width;
moveY = 0;
break;
case 'bottom-left':
moveX = 0;
moveY = dims.height;
break;
case 'bottom-right':
moveX = dims.width;
moveY = dims.height;
break;
case 'center':
moveX = dims.width / 2;
moveY = dims.height / 2;
break;
}
return new Effect.Parallel(
[ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),
new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),
new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
], Object.extend({
beforeStartInternal: function(effect) { with(Element) {
[makePositioned, makeClipping].call(effect.effects[0].element) }},
afterFinishInternal: function(effect) { with(Element) {
[hide, undoClipping, undoPositioned].call(effect.effects[0].element);
setStyle(effect.effects[0].element, oldStyle); }}
}, options)
);
}
Effect.Pulsate = function(element) {
element = $(element);
var options = arguments[1] || {};
var oldOpacity = Element.getInlineOpacity(element);
var transition = options.transition || Effect.Transitions.sinoidal;
var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) };
reverser.bind(transition);
return new Effect.Opacity(element,
Object.extend(Object.extend({ duration: 3.0, from: 0,
afterFinishInternal: function(effect) { Element.setStyle(effect.element, {opacity: oldOpacity}); }
}, options), {transition: reverser}));
}
Effect.Fold = function(element) {
element = $(element);
var oldStyle = {
top: element.style.top,
left: element.style.left,
width: element.style.width,
height: element.style.height };
Element.makeClipping(element);
return new Effect.Scale(element, 5, Object.extend({
scaleContent: false,
scaleX: false,
afterFinishInternal: function(effect) {
new Effect.Scale(element, 1, {
scaleContent: false,
scaleY: false,
afterFinishInternal: function(effect) { with(Element) {
[hide, undoClipping].call(effect.element);
setStyle(effect.element, oldStyle);
}} });
}}, arguments[1] || {}));
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 B

View File

@ -0,0 +1,43 @@
.SPRITE_close{background:no-repeat url(iw_sprite.png) -42px -69px;width:14px;height:13px}
.SPRITE_maximize{background:no-repeat url(iw_sprite.png) -14px -95px;width:14px;height:13px}
.SPRITE_restore{background:no-repeat url(iw_sprite.png) -47px -150px;width:14px;height:13px}
.SPRITE_iw_ne{background:no-repeat url(iw_sprite.png) -48px -53px;width:6px;height:6px}
.SPRITE_iw_nw{background:no-repeat url(iw_sprite.png) -78px 0;width:6px;height:6px}
.SPRITE_iw_se0{background:no-repeat url(iw_sprite.png) -106px 0;width:6px;height:6px}
.SPRITE_iw_sw0{background:no-repeat url(iw_sprite.png) -21px 0;width:6px;height:6px}
.SPRITE_iw_tab_1dl{background:no-repeat url(iw_sprite.png) -107px -116px;width:6px;height:26px}
.SPRITE_iw_tab_1l{background:no-repeat url(iw_sprite.png) -27px 0;width:6px;height:26px}
.SPRITE_iw_tab_dl{background:no-repeat url(iw_sprite.png) -8px -116px;width:11px;height:26px}
.SPRITE_iw_tab_dr{background:no-repeat url(iw_sprite.png) -92px 0;width:14px;height:26px}
.SPRITE_iw_tab_l{background:no-repeat url(iw_sprite.png) -60px -69px;width:11px;height:26px}
.SPRITE_iw_tab_r{background:no-repeat url(iw_sprite.png) -78px -6px;width:14px;height:26px}
.SPRITE_iw_tabback_1dl{background:no-repeat url(iw_sprite.png) -21px -6px;width:6px;height:26px}
.SPRITE_iw_tabback_1l{background:no-repeat url(iw_sprite.png) -8px -69px;width:6px;height:26px}
.SPRITE_iw_tabback_dl{background:no-repeat url(iw_sprite.png) -102px -40px;width:11px;height:26px}
.SPRITE_iw_tabback_dr{background:no-repeat url(iw_sprite.png) -80px -32px;width:14px;height:26px}
.SPRITE_iw_tabback_l{background:no-repeat url(iw_sprite.png) -47px -116px;width:11px;height:26px}
.SPRITE_iw_tabback_r{background:no-repeat url(iw_sprite.png) -14px -69px;width:14px;height:26px}
.SPRITE_iw_xtap{background:no-repeat url(iw_sprite.png) -48px -32px;width:32px;height:21px}
.SPRITE_iw_xtap_l{background:no-repeat url(iw_sprite.png) -61px -137px;width:32px;height:21px}
.SPRITE_iw_xtap_ld{background:no-repeat url(iw_sprite.png) 0 0;width:21px;height:32px}
.SPRITE_iw_xtap_rd{background:no-repeat url(iw_sprite.png) -49px 0;width:21px;height:32px}
.SPRITE_iw_xtap_u{background:no-repeat url(iw_sprite.png) -71px -69px;width:32px;height:21px}
.SPRITE_iw_xtap_ul{background:no-repeat url(iw_sprite.png) -69px -116px;width:32px;height:21px}
.SPRITE_iws_ne{background:no-repeat url(iw_sprite.png) -47px -142px;width:8px;height:8px}
.SPRITE_iws_nw{background:no-repeat url(iw_sprite.png) -33px 0;width:8px;height:8px}
.SPRITE_iws_se{background:no-repeat url(iw_sprite.png) -102px -32px;width:8px;height:8px}
.SPRITE_iws_sw{background:no-repeat url(iw_sprite.png) -61px -116px;width:8px;height:8px}
.SPRITE_iws_tab_1dl{background:no-repeat url(iw_sprite.png) -70px 0;width:8px;height:28px}
.SPRITE_iws_tab_1l{background:no-repeat url(iw_sprite.png) -41px 0;width:8px;height:28px}
.SPRITE_iws_tab_dl{background:no-repeat url(iw_sprite.png) 0 -69px;width:8px;height:28px}
.SPRITE_iws_tab_do{background:no-repeat url(iw_sprite.png) -19px -153px;width:14px;height:28px}
.SPRITE_iws_tab_dr{background:no-repeat url(iw_sprite.png) -93px -137px;width:14px;height:28px}
.SPRITE_iws_tab_l{background:no-repeat url(iw_sprite.png) -94px -32px;width:8px;height:28px}
.SPRITE_iws_tab_o{background:no-repeat url(iw_sprite.png) -33px -153px;width:14px;height:28px}
.SPRITE_iws_tab_r{background:no-repeat url(iw_sprite.png) -28px -69px;width:14px;height:28px}
.SPRITE_iws_tap{background:no-repeat url(iw_sprite.png) -61px -165px;width:37px;height:16px}
.SPRITE_iws_tap_l{background:no-repeat url(iw_sprite.png) -28px -97px;width:32px;height:16px}
.SPRITE_iws_tap_ld{background:no-repeat url(iw_sprite.png) -19px -116px;width:26px;height:37px}
.SPRITE_iws_tap_rd{background:no-repeat url(iw_sprite.png) 0 -32px;width:16px;height:37px}
.SPRITE_iws_tap_u{background:no-repeat url(iw_sprite.png) -71px -90px;width:37px;height:26px}
.SPRITE_iws_tap_ul{background:no-repeat url(iw_sprite.png) -16px -32px;width:32px;height:26px}

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

View File

@ -0,0 +1,80 @@
#lightbox{
position: absolute;
left: 0;
width: 100%;
z-index: 100;
text-align: center;
line-height: 0;
}
#lightbox a img{ border: none; }
#outerImageContainer{
position: relative;
background-color: #666;
width: 250px;
height: 250px;
margin: 0 auto;
}
#imageContainer{
padding: 6px;
}
#loading{
position: absolute;
top: 40%;
left: 0%;
height: 25%;
width: 100%;
text-align: center;
line-height: 0;
}
#hoverNav{
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 10;
}
#imageContainer>#hoverNav{ left: 0;}
#hoverNav a{ outline: none;}
#prevLink, #nextLink{
width: 49%;
height: 100%;
background: transparent url(blank.gif) no-repeat; /* Trick IE into showing hover */
display: block;
}
#prevLink { left: 0; float: left;}
#nextLink { right: 0; float: right;}
#prevLink:hover, #prevLink:visited:hover { background: url(prevlabel.gif) left 15% no-repeat; }
#nextLink:hover, #nextLink:visited:hover { background: url(nextlabel.gif) right 15% no-repeat; }
#imageDataContainer{
font-size: 11px;
color: #fff;
background-color: #666;
margin: 0 auto;
line-height: 1.4em;
overflow: auto;
width: 100%
}
#imageData{ padding:0 10px; color: #fff; }
#imageData #imageDetails{ width: 70%; float: left; text-align: left; color: #fff; }
#imageData #caption{ font-weight: bold; }
#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.4em; }
#overlay{
position: absolute;
top: 0;
left: 0;
z-index: 90;
width: 100%;
height: 500px;
background-color: #fff;
}

View File

@ -0,0 +1,758 @@
//
// Configuration
//
var fileLoadingImage = "loading.gif";
var fileBottomNavCloseImage = "closelabel.gif";
var overlayOpacity = 0.1; // controls transparency of shadow overlay
var animate = true; // toggles resizing animations
var resizeSpeed = 7; // controls the speed of the image resizing animations (1=slowest and 10=fastest)
var borderSize = 6; //if you adjust the padding in the CSS, you will need to update this variable
// -----------------------------------------------------------------------------------
//
// Global Variables
//
var imageArray = new Array;
var activeImage;
if(animate == true){
overlayDuration = 0.2; // shadow fade in/out duration
if(resizeSpeed > 10){ resizeSpeed = 10;}
if(resizeSpeed < 1){ resizeSpeed = 1;}
resizeDuration = (11 - resizeSpeed) * 0.15;
} else {
overlayDuration = 0;
resizeDuration = 0;
}
// -----------------------------------------------------------------------------------
//
// Additional methods for Element added by SU, Couloir
// - further additions by Lokesh Dhakar (huddletogether.com)
//
Object.extend(Element, {
getWidth: function(element) {
element = $(element);
return element.offsetWidth;
},
setWidth: function(element,w) {
element = $(element);
element.style.width = w +"px";
},
setHeight: function(element,h) {
element = $(element);
element.style.height = h +"px";
},
setTop: function(element,t) {
element = $(element);
element.style.top = t +"px";
},
setLeft: function(element,l) {
element = $(element);
element.style.left = l +"px";
},
setSrc: function(element,src) {
element = $(element);
element.src = src;
},
setHref: function(element,href) {
element = $(element);
element.href = href;
},
setInnerHTML: function(element,content) {
element = $(element);
element.innerHTML = content;
}
});
// -----------------------------------------------------------------------------------
//
// Extending built-in Array object
// - array.removeDuplicates()
// - array.empty()
//
Array.prototype.removeDuplicates = function () {
for(i = 0; i < this.length; i++){
for(j = this.length-1; j>i; j--){
if(this[i][0] == this[j][0]){
this.splice(j,1);
}
}
}
}
// -----------------------------------------------------------------------------------
Array.prototype.empty = function () {
for(i = 0; i <= this.length; i++){
this.shift();
}
}
// -----------------------------------------------------------------------------------
//
// Lightbox Class Declaration
// - initialize()
// - start()
// - changeImage()
// - resizeImageContainer()
// - showImage()
// - updateDetails()
// - updateNav()
// - enableKeyboardNav()
// - disableKeyboardNav()
// - keyboardNavAction()
// - preloadNeighborImages()
// - end()
//
// Structuring of code inspired by Scott Upton (http://www.uptonic.com/)
//
var Lightbox = Class.create();
Lightbox.prototype = {
// initialize()
// Constructor runs on completion of the DOM loading. Calls updateImageList and then
// the function inserts html at the bottom of the page which is used to display the shadow
// overlay and the image container.
//
initialize: function() {
this.updateImageList();
// Code inserts html at the bottom of the page that looks similar to this:
//
// <div id="overlay"></div>
// <div id="lightbox">
// <div id="outerImageContainer">
// <div id="imageContainer">
// <img id="lightboxImage">
// <div style="" id="hoverNav">
// <a href="#" id="prevLink"></a>
// <a href="#" id="nextLink"></a>
// </div>
// <div id="loading">
// <a href="#" id="loadingLink">
// <img src="images/loading.gif">
// </a>
// </div>
// </div>
// </div>
// <div id="imageDataContainer">
// <div id="imageData">
// <div id="imageDetails">
// <span id="caption"></span>
// <span id="numberDisplay"></span>
// </div>
// <div id="bottomNav">
// <a href="#" id="bottomNavClose">
// <img src="images/close.gif">
// </a>
// </div>
// </div>
// </div>
// </div>
var objBody = document.getElementsByTagName("body").item(0);
var objOverlay = document.createElement("div");
objOverlay.setAttribute('id','overlay');
objOverlay.style.display = 'none';
objOverlay.onclick = function() { myLightbox.end(); }
objBody.appendChild(objOverlay);
var objLightbox = document.createElement("div");
objLightbox.setAttribute('id','lightbox');
objLightbox.style.display = 'none';
objLightbox.onclick = function(e) { // close Lightbox is user clicks shadow overlay
if (!e) var e = window.event;
var clickObj = Event.element(e).id;
if ( clickObj == 'lightbox') {
myLightbox.end();
}
};
objBody.appendChild(objLightbox);
var objOuterImageContainer = document.createElement("div");
objOuterImageContainer.setAttribute('id','outerImageContainer');
objLightbox.appendChild(objOuterImageContainer);
// When Lightbox starts it will resize itself from 250 by 250 to the current image dimension.
// If animations are turned off, it will be hidden as to prevent a flicker of a
// white 250 by 250 box.
if(animate){
Element.setWidth('outerImageContainer', 250);
Element.setHeight('outerImageContainer', 250);
} else {
Element.setWidth('outerImageContainer', 1);
Element.setHeight('outerImageContainer', 1);
}
var objImageContainer = document.createElement("div");
objImageContainer.setAttribute('id','imageContainer');
objOuterImageContainer.appendChild(objImageContainer);
var objLightboxImage = document.createElement("img");
objLightboxImage.setAttribute('id','lightboxImage');
objImageContainer.appendChild(objLightboxImage);
var objHoverNav = document.createElement("div");
objHoverNav.setAttribute('id','hoverNav');
objImageContainer.appendChild(objHoverNav);
var objPrevLink = document.createElement("a");
objPrevLink.setAttribute('id','prevLink');
objPrevLink.setAttribute('href','#');
objHoverNav.appendChild(objPrevLink);
var objNextLink = document.createElement("a");
objNextLink.setAttribute('id','nextLink');
objNextLink.setAttribute('href','#');
objHoverNav.appendChild(objNextLink);
var objLoading = document.createElement("div");
objLoading.setAttribute('id','loading');
objImageContainer.appendChild(objLoading);
var objLoadingLink = document.createElement("a");
objLoadingLink.setAttribute('id','loadingLink');
objLoadingLink.setAttribute('href','#');
objLoadingLink.onclick = function() { myLightbox.end(); return false; }
objLoading.appendChild(objLoadingLink);
var objLoadingImage = document.createElement("img");
objLoadingImage.setAttribute('src', fileLoadingImage);
objLoadingLink.appendChild(objLoadingImage);
var objImageDataContainer = document.createElement("div");
objImageDataContainer.setAttribute('id','imageDataContainer');
objLightbox.appendChild(objImageDataContainer);
var objImageData = document.createElement("div");
objImageData.setAttribute('id','imageData');
objImageDataContainer.appendChild(objImageData);
var objImageDetails = document.createElement("div");
objImageDetails.setAttribute('id','imageDetails');
objImageData.appendChild(objImageDetails);
var objCaption = document.createElement("span");
objCaption.setAttribute('id','caption');
objImageDetails.appendChild(objCaption);
var objNumberDisplay = document.createElement("span");
objNumberDisplay.setAttribute('id','numberDisplay');
objImageDetails.appendChild(objNumberDisplay);
var objBottomNav = document.createElement("div");
objBottomNav.setAttribute('id','bottomNav');
objImageData.appendChild(objBottomNav);
var objBottomNavCloseLink = document.createElement("a");
objBottomNavCloseLink.setAttribute('id','bottomNavClose');
objBottomNavCloseLink.setAttribute('href','#');
objBottomNavCloseLink.onclick = function() { myLightbox.end(); return false; }
objBottomNav.appendChild(objBottomNavCloseLink);
var objBottomNavCloseImage = document.createElement("img");
objBottomNavCloseImage.setAttribute('src', fileBottomNavCloseImage);
objBottomNavCloseLink.appendChild(objBottomNavCloseImage);
},
//
// updateImageList()
// Loops through anchor tags looking for 'lightbox' references and applies onclick
// events to appropriate links. You can rerun after dynamically adding images w/ajax.
//
updateImageList: function() {
if (!document.getElementsByTagName){ return; }
var anchors = document.getElementsByTagName('a');
var areas = document.getElementsByTagName('area');
// loop through all anchor tags
for (var i=0; i<anchors.length; i++){
var anchor = anchors[i];
var relAttribute = String(anchor.getAttribute('rel'));
// use the string.match() method to catch 'lightbox' references in the rel attribute
if (anchor.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){
anchor.onclick = function () {myLightbox.start(this); return false;}
}
}
// loop through all area tags
// todo: combine anchor & area tag loops
for (var i=0; i< areas.length; i++){
var area = areas[i];
var relAttribute = String(area.getAttribute('rel'));
// use the string.match() method to catch 'lightbox' references in the rel attribute
if (area.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){
area.onclick = function () {myLightbox.start(this); return false;}
}
}
},
//
// start()
// Display overlay and lightbox. If image is part of a set, add siblings to imageArray.
//
start: function(imageLink) {
hideSelectBoxes();
hideFlash();
// stretch overlay to fill page and fade in
var arrayPageSize = getPageSize();
Element.setWidth('overlay', arrayPageSize[0]);
Element.setHeight('overlay', arrayPageSize[1]);
new Effect.Appear('overlay', { duration: overlayDuration, from: 0.0, to: overlayOpacity });
imageArray = [];
imageNum = 0;
if (!document.getElementsByTagName){ return; }
var anchors = document.getElementsByTagName( imageLink.tagName);
// if image is NOT part of a set..
if((imageLink.getAttribute('rel') == 'lightbox')){
// add single image to imageArray
imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title')));
} else {
// if image is part of a set..
// loop through anchors, find other images in set, and add them to imageArray
for (var i=0; i<anchors.length; i++){
var anchor = anchors[i];
if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title')));
}
}
imageArray.removeDuplicates();
while(imageArray[imageNum][0] != imageLink.getAttribute('href')) { imageNum++;}
}
// calculate top and left offset for the lightbox
var arrayPageScroll = getPageScroll();
var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 20);
var lightboxLeft = arrayPageScroll[0];
Element.setTop('lightbox', lightboxTop);
Element.setLeft('lightbox', lightboxLeft);
Element.show('lightbox');
this.changeImage(imageNum);
},
//
// changeImage()
// Hide most elements and preload image in preparation for resizing image container.
//
changeImage: function(imageNum) {
activeImage = imageNum; // update global var
// hide elements during transition
if(animate){ Element.show('loading');}
Element.hide('lightboxImage');
Element.hide('hoverNav');
Element.hide('prevLink');
Element.hide('nextLink');
Element.hide('imageDataContainer');
Element.hide('numberDisplay');
imgPreloader = new Image();
// once image is preloaded, resize image container
imgPreloader.onload=function(){
Element.setSrc('lightboxImage', imageArray[activeImage][0]);
myLightbox.resizeImageContainer(imgPreloader.width, imgPreloader.height);
imgPreloader.onload=function(){}; // clear onLoad, IE behaves irratically with animated gifs otherwise
}
imgPreloader.src = imageArray[activeImage][0];
},
//
// resizeImageContainer()
//
resizeImageContainer: function( imgWidth, imgHeight) {
// get curren width and height
this.widthCurrent = Element.getWidth('outerImageContainer');
this.heightCurrent = Element.getHeight('outerImageContainer');
// get new width and height
var widthNew = (imgWidth + (borderSize * 2));
var heightNew = (imgHeight + (borderSize * 2));
// scalars based on change from old to new
this.xScale = ( widthNew / this.widthCurrent) * 100;
this.yScale = ( heightNew / this.heightCurrent) * 100;
// calculate size difference between new and old image, and resize if necessary
wDiff = this.widthCurrent - widthNew;
hDiff = this.heightCurrent - heightNew;
if(!( hDiff == 0)){ new Effect.Scale('outerImageContainer', this.yScale, {scaleX: false, duration: resizeDuration, queue: 'front'}); }
if(!( wDiff == 0)){ new Effect.Scale('outerImageContainer', this.xScale, {scaleY: false, delay: resizeDuration, duration: resizeDuration}); }
// if new and old image are same size and no scaling transition is necessary,
// do a quick pause to prevent image flicker.
if((hDiff == 0) && (wDiff == 0)){
if (navigator.appVersion.indexOf("MSIE")!=-1){ pause(250); } else { pause(100);}
}
Element.setHeight('prevLink', imgHeight);
Element.setHeight('nextLink', imgHeight);
Element.setWidth( 'imageDataContainer', widthNew);
this.showImage();
},
//
// showImage()
// Display image and begin preloading neighbors.
//
showImage: function(){
Element.hide('loading');
new Effect.Appear('lightboxImage', { duration: resizeDuration, queue: 'end', afterFinish: function(){ myLightbox.updateDetails(); } });
this.preloadNeighborImages();
},
//
// updateDetails()
// Display caption, image number, and bottom nav.
//
updateDetails: function() {
// if caption is not null
if(imageArray[activeImage][1]){
Element.show('caption');
Element.setInnerHTML( 'caption', imageArray[activeImage][1]);
}
// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Bild " + eval(activeImage + 1) + " von " + imageArray.length);
}
new Effect.Parallel(
[ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: resizeDuration, from: 0.0, to: 1.0 }),
new Effect.Appear('imageDataContainer', { sync: true, duration: resizeDuration }) ],
{ duration: resizeDuration, afterFinish: function() {
// update overlay size and update nav
var arrayPageSize = getPageSize();
Element.setHeight('overlay', arrayPageSize[1]);
myLightbox.updateNav();
}
}
);
},
//
// updateNav()
// Display appropriate previous and next hover navigation.
//
updateNav: function() {
Element.show('hoverNav');
// if not first image in set, display prev image button
if(activeImage != 0){
Element.show('prevLink');
document.getElementById('prevLink').onclick = function() {
myLightbox.changeImage(activeImage - 1); return false;
}
}
// if not last image in set, display next image button
if(activeImage != (imageArray.length - 1)){
Element.show('nextLink');
document.getElementById('nextLink').onclick = function() {
myLightbox.changeImage(activeImage + 1); return false;
}
}
this.enableKeyboardNav();
},
//
// enableKeyboardNav()
//
enableKeyboardNav: function() {
document.onkeydown = this.keyboardAction;
},
//
// disableKeyboardNav()
//
disableKeyboardNav: function() {
document.onkeydown = '';
},
//
// keyboardAction()
//
keyboardAction: function(e) {
if (e == null) { // ie
keycode = event.keyCode;
escapeKey = 27;
} else { // mozilla
keycode = e.keyCode;
escapeKey = e.DOM_VK_ESCAPE;
}
key = String.fromCharCode(keycode).toLowerCase();
if((key == 'x') || (key == 'o') || (key == 'c') || (keycode == escapeKey)){ // close lightbox
myLightbox.end();
} else if((key == 'p') || (keycode == 37)){ // display previous image
if(activeImage != 0){
myLightbox.disableKeyboardNav();
myLightbox.changeImage(activeImage - 1);
}
} else if((key == 'n') || (keycode == 39)){ // display next image
if(activeImage != (imageArray.length - 1)){
myLightbox.disableKeyboardNav();
myLightbox.changeImage(activeImage + 1);
}
}
},
//
// preloadNeighborImages()
// Preload previous and next images.
//
preloadNeighborImages: function(){
if((imageArray.length - 1) > activeImage){
preloadNextImage = new Image();
preloadNextImage.src = imageArray[activeImage + 1][0];
}
if(activeImage > 0){
preloadPrevImage = new Image();
preloadPrevImage.src = imageArray[activeImage - 1][0];
}
},
//
// end()
//
end: function() {
this.disableKeyboardNav();
Element.hide('lightbox');
new Effect.Fade('overlay', { duration: overlayDuration});
showSelectBoxes();
showFlash();
}
}
// -----------------------------------------------------------------------------------
//
// getPageScroll()
// Returns array with x,y page scroll values.
// Core code from - quirksmode.com
//
function getPageScroll(){
var xScroll, yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
xScroll = self.pageXOffset;
} else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict
yScroll = document.documentElement.scrollTop;
xScroll = document.documentElement.scrollLeft;
} else if (document.body) {// all other Explorers
yScroll = document.body.scrollTop;
xScroll = document.body.scrollLeft;
}
arrayPageScroll = new Array(xScroll,yScroll)
return arrayPageScroll;
}
// -----------------------------------------------------------------------------------
//
// getPageSize()
// Returns array with page width, height and window width, height
// Core code from - quirksmode.com
// Edit for Firefox by pHaez
//
function getPageSize(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = window.innerWidth + window.scrollMaxX;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
// console.log(self.innerWidth);
// console.log(document.documentElement.clientWidth);
if (self.innerHeight) { // all except Explorer
if(document.documentElement.clientWidth){
windowWidth = document.documentElement.clientWidth;
} else {
windowWidth = self.innerWidth;
}
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
// for small pages with total height less then height of the viewport
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
// console.log("xScroll " + xScroll)
// console.log("windowWidth " + windowWidth)
// for small pages with total width less then width of the viewport
if(xScroll < windowWidth){
pageWidth = xScroll;
} else {
pageWidth = windowWidth;
}
// console.log("pageWidth " + pageWidth)
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}
// -----------------------------------------------------------------------------------
//
// getKey(key)
// Gets keycode. If 'x' is pressed then it hides the lightbox.
//
function getKey(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
key = String.fromCharCode(keycode).toLowerCase();
if(key == 'x'){
}
}
// -----------------------------------------------------------------------------------
//
// listenKey()
//
function listenKey () { document.onkeypress = getKey; }
// ---------------------------------------------------
function showSelectBoxes(){
var selects = document.getElementsByTagName("select");
for (i = 0; i != selects.length; i++) {
selects[i].style.visibility = "visible";
}
}
// ---------------------------------------------------
function hideSelectBoxes(){
var selects = document.getElementsByTagName("select");
for (i = 0; i != selects.length; i++) {
selects[i].style.visibility = "hidden";
}
}
// ---------------------------------------------------
function showFlash(){
var flashObjects = document.getElementsByTagName("object");
for (i = 0; i < flashObjects.length; i++) {
flashObjects[i].style.visibility = "visible";
}
var flashEmbeds = document.getElementsByTagName("embed");
for (i = 0; i < flashEmbeds.length; i++) {
flashEmbeds[i].style.visibility = "visible";
}
}
// ---------------------------------------------------
function hideFlash(){
var flashObjects = document.getElementsByTagName("object");
for (i = 0; i < flashObjects.length; i++) {
flashObjects[i].style.visibility = "hidden";
}
var flashEmbeds = document.getElementsByTagName("embed");
for (i = 0; i < flashEmbeds.length; i++) {
flashEmbeds[i].style.visibility = "hidden";
}
}
// ---------------------------------------------------
//
// pause(numberMillis)
// Pauses code execution for specified time. Uses busy code, not good.
// Help from Ran Bar-On [ran2103@gmail.com]
//
function pause(ms){
var date = new Date();
curDate = null;
do{var curDate = new Date();}
while( curDate - date < ms);
}
/*
function pause(numberMillis) {
var curently = new Date().getTime() + sender;
while (new Date().getTime();
}
*/
// ---------------------------------------------------
function initLightbox() { myLightbox = new Lightbox(); }
Event.observe(window, 'load', initLightbox, false);

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -0,0 +1,152 @@
function t(t,a,n,p) {
alert(+n+" St<53>ck "+t+" "+a+" wurde in den Warenkorb gelegt! ");
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
document.cookie = name1+"=";}
// 16x4 Spindeln nach L<>nge bestellen
function ts(t, a ,n,l, p) {
machen = true;
if ( l.length != 3 ) { alert("Bitte die L<>nge richtig eingeben (3 Stellen)!");machen = false; }
if ( l > 999 ) { alert("Maximale L<>nge des Trapezgewindes ist 999 mm!");machen = false; }
if ( l < 100 ) { alert("Minimale L<>nge des Trapezgewindes ist 100 mm!");machen = false; }
if (machen == true ) {
p = 0.02; // Preis pro mm
p = (p * l);
p = p.toFixed(2);
a = a + l + "c";
alert(+n+" St<53>ck "+t+" "+a+" wurde in den Warenkorb gelegt! ");
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
document.cookie = name1+"="; }
}
// 12x3 Spindeln langes Gewinde
function tsl1(t, a ,n,l, p) {
machen = true;
if ( l.length != 3 ) { alert("Bitte die L<>nge richtig eingeben (3 Stellen)!");machen = false; }
if ( l > 900 ) { alert("Maximale L<>nge des Trapezgewindes ist 900 mm!");machen = false; }
if ( l < 100 ) { alert("Minimale L<>nge des Trapezgewindes ist 100 mm!");machen = false; }
if (machen == true ) {
p = 0.015; // Preis pro mm
p = (p * l) + 12.14;
p = p.toFixed(2);
a = a + l + "c";
alert(+n+" St<53>ck "+t+" "+a+" wurde in den Warenkorb gelegt! ");
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
document.cookie = name1+"="; }
}
// 16x4 Spindeln kurzes Gewinde
function tsk(t, a ,n,l, p) {
machen = true;
if ( l.length == 3 ) { a = "16X4TK0"; }
if ( l.length == 4 ) { a = "16X4TK"; }
if ( l > 1230 ) { alert("Maximale L<>nge des Trapezgewindes ist 1230 mm!");machen = false; }
if ( l < 100 ) { alert("Minimale L<>nge des Trapezgewindes ist 100 mm!");machen = false; }
if (machen == true ) {
p = 0.02; // Preis pro mm
p = (p * l) + 13.14;
p = p.toFixed(2);
if ( l < 1100 ) { a = a + l + "c"; }
if ( l > 1099 ) { a = a + l + "e"; }
alert(+n+" St<53>ck "+t+" "+a+" wurde in den Warenkorb gelegt! ");
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
document.cookie = name1+"="; }
}
// 16x4 Spindeln langes Gewinde
function tsl(t, a ,n,l, p) {
machen = true;
if ( l.length == 3 ) { a = "16X4TL0"; }
if ( l.length == 4 ) { a = "16X4TL"; }
if ( l > 1230 ) { alert("Maximale L<>nge des Trapezgewindes ist 1230 mm!");machen = false; }
if ( l < 100 ) { alert("Minimale L<>nge des Trapezgewindes ist 100 mm!");machen = false; }
if (machen == true ) {
p = 0.02; // Preis pro mm
p = (p * l) + 13.14;
p = p.toFixed(2);
if ( l < 1100 ) { a = a + l + "c"; }
if ( l > 1099 ) { a = a + l + "e"; }
alert(+n+" St<53>ck "+t+" "+a+" wurde in den Warenkorb gelegt! ");
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
document.cookie = name1+"="; }
}
// 16x4 Spindeln langes Gewinde 33mm
function tss(t, a ,n,l, p) {
machen = true;
if ( l.length == 3 ) { a = "16X4TS0"; }
if ( l.length == 4 ) { a = "16X4TS"; }
if ( l > 1230 ) { alert("Maximale L<>nge des Trapezgewindes ist 1230 mm!");machen = false; }
if ( l < 100 ) { alert("Minimale L<>nge des Trapezgewindes ist 100 mm!");machen = false; }
if (machen == true ) {
p = 0.02; // Preis pro mm
p = (p * l) + 13.14;
p = p.toFixed(2);
if ( l < 1100 ) { a = a + l + "c"; }
if ( l > 1099 ) { a = a + l + "e"; }
alert(+n+" St<53>ck "+t+" "+a+" wurde in den Warenkorb gelegt! ");
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
document.cookie = name1+"="; }
}
function CookieSetzen (name, wert, verfall, pfad, domain, sicher) {
document.cookie = name + "=" + escape (wert) +
((verfall) ? "; expires=" + verfall.toGMTString() : "") +
((pfad) ? "; path=" + pfad : "") +
((domain) ? "; domain=" + domain : "") +
((sicher) ? "; secure=" + sicher : "");
}
function WegdaCookie(name, pfad, domain) {
Ehemals = new Date ();
Ehemals.setTime (Ehemals.getTime () - (365 * 24 * 60 * 60 * 1000));
CookieSetzen (name, "", Ehemals, pfad, domain);
}
function agb() {
if (document.form.B_.value == '') alert("Ihr Warenkorb ist leer! Bitte zuerst eine Ware durch anklicken in den Warenkorb legen !");
else
if (document.form.AGBs________.checked != true ) alert("Bitte zuerst AGB's best<73>tigen !");
else
if (document.form.email_______.value == '' ) alert("Bitte Emailadresse eingeben!");
else
if (document.form.email_______.value.indexOf('.') < 0) alert("Emailadresse ungueltig!");
else
if (document.form.email_______.value.indexOf('@') < 0) alert("Emailadresse ungueltig!");
else
if (document.form.Name________.value == '' ) alert("Bitte Ihren Namen eingeben !");
else
if (document.form.Strasse_____.value == '' ) alert("Bitte Strasse mit Nummer eingeben !");
else
if (document.form.Plz_________.value == '' ) alert("Bitte Ihre PLZ eingeben !");
else
if (document.form.Ort_________.value == '' ) alert("Bitte Ihren Ort eingeben !");
}
function focus1() {
document.form.Name________.select();
}

View File

@ -0,0 +1,40 @@
function get_z1()
{
return("Vorkasse");
}
function get_z2()
{
return("");
}
function get_z3()
{
return("");
}
function get_z4()
{
return("");
}
function get_p1()
{
return("2.45");
}
function get_p2()
{
return("");
}
function get_p3()
{
return("");
}
function get_p4()
{
return("");
}
function get_waehrung()
{
return("Euro");
}
function get_text1()
{
return("");
}

View File

@ -0,0 +1,480 @@
var ursprung='';
var sprung=0;
var ziel='';
felder = new Array("document.form.besteller","form.strasse","plz","ort" );
function del()
{//WegdaCookie(document.cookie,0,0);
}
function del_wk()
{
document.form.B_.value = "";
// document.cookie = "=";
WegdaCookie(document.cookie,0,0);
}
function onload1() {
zahlungsarten();
berechne();
}
function zahlungsarten () {
// ***************************************************************
// Zahlungsarten eintragen ist aber nicht wichtig
// ***************************************************************
if(get_z4()!="") {
element = new Option(get_z4(),get_p4(), false, true);
document.form.Versand_____.options[3] = element;
}
if(get_z3()!="") {
element = new Option(get_z3(),get_p3(), false, true);
document.form.Versand_____.options[2] = element;
}
if(get_z2()!="") {
element = new Option(get_z2(),get_p2(), false, true);
document.form.Versand_____.options[1] = element;
}
if(get_z1()!="") {
element = new Option(get_z1(),get_p1(), false, true);
document.form.Versand_____.options[0] = element;
}
}
function berechne () {
anmerkung = 0;
anmerkungg = 0;
versand = "";
versand = "2.45";
versandz = 0;
// cookie in B_ schreiben
c = document.cookie;
//if(documern.Name________.value == "debug")alert(c);
px1 = 0;
px2 = 0;
// 1. Test ob Warenkorb brauchbar
px1 = c.indexOf('p1r2i');
if (px1<0) c = ""; // Warenkorb hat keine Positionen
//if(documern.Name________.value == "debug") alert(c);
c = c+";";
l = c.length;
document.form.B_.value = "";
// alert(c+" "+l);
// alert(l);
if ( l > 7 ) {
i = 0;
w = true;
pos = 0;
len1 = 0;
f = 0;
position = 0;
pos_gpreis = 0.0;
pos_epreis = 0.0;
pos_menge = 0.0;
spos_gpreis = " ";
sum_gpreis = 0.0;
rabatt = " ";
sum_vpreis = 0.0;
ssum_gpreis = " ";
while( w == true) {
px1 = c.indexOf('p1r2i');
c = c.substr(px1+6,l); // vorne abschneiden
px2 = c.indexOf(';');
pos = 1;
sub1 = c.substr(0,px2); // eine Position im String
c = c.substr(px2+1,l); // Position wird rausgeschnitten
len1 = sub1.length; // L<>nge Positionsstring
// alert(c);
// alert("sub1: "+sub1);
// eine Position ermittelt
// alert("|"+sub1+" "+len1);
ab1 = 0;
ab2 = 0;
ab3 = 0;
for (f=0;f<len1;f++){ if(sub1.substr(f,1)=="|") { if(ab2!=0) ab3 = f;
if(ab1!=0&&ab2==0) ab2 = f;
if(ab1==0) ab1 = f;
}
} // for
artikel = sub1.substr(0,ab1);
text = sub1.substr(ab1+1,ab2-ab1-1);
menge = sub1.substr(ab2+1,ab3-ab2-1);
preis = sub1.substr(ab3+1,len1-ab3);
// wegen Mozilla !!
pl = preis.length;
if(preis.substr(pl-1,1)== '=') preis = preis.substr(0,pl-1);
pos_menge = menge;
pos_epreis = preis;
pos_gpreis = pos_menge * pos_epreis;
sum_gpreis = sum_gpreis + pos_gpreis;
//spos_gpreis = pos_gpreis.toString();
spos_gpreis = pos_gpreis.toFixed(2); // 2 Nachkommastellen
lg = spos_gpreis.length
if (spos_gpreis.indexOf('.')== -1) spos_gpreis = spos_gpreis+".00";
if (spos_gpreis.indexOf('.')== lg-2 ) spos_gpreis = spos_gpreis+"0";
fixlen = 7;
spos_gpreis = spos_gpreis.substr(0,fixlen);
alen = spos_gpreis.length;
text1 = "";
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text1 = text1+spos_gpreis;
spos_gpreis = text1;
apos = "0";
position = position +1;
apos = position;
text1 = "";
if (position <10 ) text1 = "0";
text1 = text1+apos;
apos = text1;
fixlen = 11;
artikel = artikel.substr(0,fixlen);
alen = artikel.length;
text1 = artikel;
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
artikel = text1;
fixlen = 30;
text = text.substr(0,fixlen);
alen = text.length;
text1 = text;
//for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text = text1;
fixlen = 5;
menge = menge.substr(0,fixlen);
alen = menge.length;
text1 = "";
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text1 = text1+menge;
menge = text1;
fixlen = 6;
preis = preis.substr(0,fixlen);
text1 = ""
alen = preis.length;
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
if (alen == 4) text1 = " " + text1;
text1 = text1+preis;
preis = text1;
//alert("|"+artikel);
//alert(text);
//alert(menge);
//alert(preis);
//b WegdaCookie(sub1,0,0);
text1 = " "+apos+""+menge+"St<53>ck "+artikel+" Preis:"+preis+"<22> Summe:"+spos_gpreis+"<22> "+text+"\n";
lg = artikel.length;
if (artikel.indexOf('a')==lg-1) if (versandz < 1)versandz = 1;
if (artikel.indexOf('b')==lg-1) if (versandz < 2)versandz = 2;
if (artikel.indexOf('c')==lg-1) if (versandz < 3)versandz = 3;
if (artikel.indexOf('d')==lg-1) if (versandz < 4)versandz = 4;
if (artikel.indexOf('e')==lg-1) if (versandz < 5)versandz = 5;
if (artikel.indexOf('f')==lg-1) if (versandz < 6)versandz = 6;
if (artikel.indexOf('g')==lg-1) if (versandz < 7)versandz = 7;
if (artikel.indexOf('h')==lg-1) if (versandz < 8)versandz = 8;
if (artikel.indexOf('x')==lg-2) anmerkung = 1;
if (artikel.indexOf('g')==lg-1) anmerkungg = 1;
if (artikel.indexOf('h')==lg-1) anmerkungg = 1;
document.form.B_.value = document.form.B_.value + text1;
if(c.indexOf('p1r2i') < 0 ) break;
} // end while ----------------------------------------------------------
if (versandz == 1) versand = "4.45";
if (versandz == 2) versand = "5.95";
if (versandz == 3) versand = "8.95";
if (versandz == 4) versand = "9.95";
if (versandz == 5) versand = "14.95";
if (versandz == 6) versand = "19.95";
if (versandz == 7) versand = "159.00";
if (versandz == 8) versand = "159.00";
gesammtpreis = sum_gpreis.toFixed(2); // 2 Nachkommastellen
//if (sum_gpreis > 49.99) if (sum_gpreis < 100) sum_gpreis = sum_gpreis /100 * 97 ;
//if (sum_gpreis > 99.99) if (sum_gpreis < 150) sum_gpreis = sum_gpreis /100 * 96 ;
//if (sum_gpreis > 149.99) sum_gpreis = sum_gpreis /100 * 95 ;
if (sum_gpreis > 350) if (versand == "5.95") versand = "8.95";
if (sum_gpreis > 150) if (versand == "4.45") versand = "5.95";
//ssum_gpreis = sum_gpreis.toString();
ssum_gpreis = sum_gpreis.toFixed(2); // 2 Nachkommastellen
lg = ssum_gpreis.length;
if (ssum_gpreis.indexOf('.')== lg-1) ssum_gpreis = ssum_gpreis + ".00";
if (ssum_gpreis.indexOf('.')== lg-2 ) ssum_gpreis = ssum_gpreis +"0";
lx1 = ssum_gpreis.indexOf('.');
ssum_gpreis = ssum_gpreis.substr(0,lx1+3);
fixlen = 10;
ssum_gpreis = ssum_gpreis.substr(0,fixlen);
alen = ssum_gpreis.length;
text1 = "";
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text1 = text1+ssum_gpreis;
ssum_gpreis = text1;
//
//
text1 = "\n";
document.form.B_.value = document.form.B_.value + text1;
rabatt = " ";
//if (gesammtpreis > 49.99) if (gesammtpreis < 100) rabatt = " vom Warenwert " +gesammtpreis+" Euro wurden 3% Rabatt abgezogen!";
//if (gesammtpreis > 99.99) if (gesammtpreis < 150) rabatt = " vom Warenwert " +gesammtpreis+" Euro wurden 4% Rabatt abgezogen!";
//if (gesammtpreis > 149.99) rabatt = " vom Warenwert " +gesammtpreis+" Euro wurden 5% Rabatt abgezogen!";
text1 = "Warenwert Summe: "+get_waehrung()+ssum_gpreis+rabatt+"\n";
document.form.B_.value = document.form.B_.value + text1;
//
//
vtext = "";
vpreis = "";
if (get_z1() != "") if(document.form.Versand_____.options[0].selected) vtext = get_z1();
if (get_z2() != "") if(document.form.Versand_____.options[1].selected) vtext = get_z2();
if (get_z3() != "") if(document.form.Versand_____.options[2].selected) vtext = get_z3();
if (get_z4() != "") if(document.form.Versand_____.options[3].selected) vtext = get_z4();
if (get_z1() != "") if(document.form.Versand_____.options[0].selected) vpreis = get_p1();
if (get_z2() != "") if(document.form.Versand_____.options[1].selected) vpreis = get_p2();
if (get_z3() != "") if(document.form.Versand_____.options[2].selected) vpreis = get_p3();
if (get_z4() != "") if(document.form.Versand_____.options[3].selected) vpreis = get_p4();
if (vpreis > 0 ) {
if (versand > 0) vpreis = versand; //Versand wird erh<72>ht;
sum_vpreis = vpreis;
sum_gpreis += (sum_vpreis * 1);
fixlen = 6;
vpreis = vpreis.substr(0,fixlen);
alen = vpreis.length;
text1 = "";
//for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text1 = text1+vpreis;
vpreis = text1;
fixlen = 12;
vtext = vtext.substr(0,fixlen);
alen = vtext.length;
text1 = "";
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text1 = text1+vtext;
vtext = text1;
text1 = "Versandkosten incl: "+get_waehrung()+" "+vpreis+"\n";
document.form.B_.value = document.form.B_.value + text1;
} // Ende Berechnung der Versandkosten
ssum_gpreis = sum_gpreis.toString();
//alert(ssum_gpreis);
lg = ssum_gpreis.length
if (ssum_gpreis.indexOf('.')== -1) ssum_gpreis = ssum_gpreis + ".00";
if (ssum_gpreis.indexOf('.')== lg-2 ) ssum_gpreis = ssum_gpreis +"0";
lx1 = ssum_gpreis.indexOf('.');
ssum_gpreis = ssum_gpreis.substr(0,lx1+3);
fixlen = 10;
ssum_gpreis = ssum_gpreis.substr(0,fixlen);
alen = ssum_gpreis.length;
text1 = "";
for(n=0;n<fixlen-alen;n++) text1 = text1+" ";
text1 = text1+ssum_gpreis;
ssum_gpreis = text1;
//
//
if (vpreis > 0 ) {
text1 = "Rechnungssumme: "+get_waehrung()+ssum_gpreis+"\n";
document.form.B_.value = document.form.B_.value + text1;
mwst = sum_gpreis; // Endpreis <20>bernehmen
mwst = mwst/119*19;
mwst = mwst.toFixed(2); // 2 Nachkommastellen
text1 ="enth<74>lt 19% MwSt: "+get_waehrung()+" "+mwst+"\n\n";
document.form.B_.value = document.form.B_.value + text1;
if (anmerkung > 0)text1 = "Wir pr<70>fen, ob der gew<65>nschte Sonderposten verf<72>gbar ist. Best<73>tigung erfolgt per extra Mail!\n\n";
if (anmerkung > 0)document.form.B_.value = document.form.B_.value + text1;
if ( versand == "159.00")text1 = "Sie brauchen das Geld f<>r die Maschine nicht gleich <20>berweisen. In den n<>chsten\n";
if ( versand == "159.00")document.form.B_.value = document.form.B_.value + text1;
if ( versand == "159.00")text1 = "Tagen erhalten Sie eine Anzahlungsrechnung, die Sie dann bitte <20>berweisen.\n\n";
if ( versand == "159.00")document.form.B_.value = document.form.B_.value + text1;
} // end Vpreis > 0
if (get_text1().length > 0) document.form.B_.value = document.form.B_.value + get_text1()+"\n";
} // end if l > 7
} // end function
function CookieSetzen (name, wert, verfall, pfad, domain, sicher) {
document.cookie = name + "=" + escape (wert) +
((verfall) ? "; expires=" + verfall.toGMTString() : "") +
((pfad) ? "; path=" + pfad : "") +
((domain) ? "; domain=" + domain : "") +
((sicher) ? "; secure=" + sicher : "");
}
function WegdaCookie(name, pfad, domain) {
Ehemals = new Date ();
Ehemals.setTime (Ehemals.getTime () - (365 * 24 * 60 * 60 * 1000));
CookieSetzen (name, "", Ehemals, pfad, domain);
}
function d(pos1)
{
npos1 = 0;
zpos1 = 0;
len1 = 0;
len2 = 0;
npos1 = pos1;
if(document.form.Name________.value == "debug") alert(document.cookie);
else {
c = document.cookie;
c = c+";";
npos1 = 0;
while (true) {
px1 = c.indexOf('p1r2i');
c = c.substr(px1,l); // vorne abschneiden
px2 = c.indexOf(';');
sub1 = c.substr(0,px2); // eine Position im String
c = c.substr(px2+1,l); // Position wird rausgeschnitten
len1 = sub1.length; // L<>nge Positionsstring
npos1 = npos1 +1;
if (npos1 == pos1) break;
}
// eine Position ermittelt
// alert(sub1);
// alert(c);
alert("Position "+pos1+" gel<65>scht !");
WegdaCookie(sub1,0,0);
berechne();
}
}

View File

@ -0,0 +1,26 @@
var Scriptaculous = {
Version: '1.5.1',
require: function(libraryName) {
// inserting via DOM fails in Safari 2.0, so brute force approach
document.write('<script type="text/javascript" src="'+libraryName+'"></script>');
},
load: function() {
if((typeof Prototype=='undefined') ||
parseFloat(Prototype.Version.split(".")[0] + "." +
Prototype.Version.split(".")[1]) < 1.4)
throw("script.aculo.us requires the Prototype JavaScript framework >= 1.4.0");
$A(document.getElementsByTagName("script")).findAll( function(s) {
return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
}).each( function(s) {
var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
var includes = s.src.match(/\?.*load=([a-z,]*)/);
(includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each(
function(include) { Scriptaculous.require(path+include+'.js') });
});
}
}
Scriptaculous.load();

View File

@ -0,0 +1,747 @@
/* Copyright 2011 Google */'use strict';var tn_a,tn_b=tn_b||{};tn_b.scope={};tn_b.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};tn_b.ASSUME_ES5=!1;tn_b.ASSUME_NO_NATIVE_MAP=!1;tn_b.ASSUME_NO_NATIVE_SET=!1;tn_b.SIMPLE_FROUND_POLYFILL=!1;tn_b.ISOLATE_POLYFILLS=!1;
tn_b.defineProperty=tn_b.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};tn_b.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};tn_b.global=tn_b.getGlobal(this);
tn_b.polyfills={};tn_b.propertyToPolyfillSymbol={};tn_b.POLYFILL_PREFIX="$jscp$";tn_b.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");tn_b.polyfill=function(a,b,c,d){b&&(tn_b.ISOLATE_POLYFILLS?tn_b.polyfillIsolated(a,b,c,d):tn_b.polyfillUnisolated(a,b,c,d))};
tn_b.polyfillUnisolated=function(a,b){var c=tn_b.global;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&tn_b.defineProperty(c,a,{configurable:!0,writable:!0,value:b})};
tn_b.polyfillIsolated=function(a,b,c){var d=a.split(".");a=1===d.length;var e=d[0];e=!a&&e in tn_b.polyfills?tn_b.polyfills:tn_b.global;for(var f=0;f<d.length-1;f++){var g=d[f];g in e||(e[g]={});e=e[g]}d=d[d.length-1];c=tn_b.IS_SYMBOL_NATIVE&&"es6"===c?e[d]:null;b=b(c);null!=b&&(a?tn_b.defineProperty(tn_b.polyfills,d,{configurable:!0,writable:!0,value:b}):b!==c&&(tn_b.propertyToPolyfillSymbol[d]=tn_b.IS_SYMBOL_NATIVE?tn_b.global.Symbol(d):tn_b.POLYFILL_PREFIX+d,d=tn_b.propertyToPolyfillSymbol[d],
tn_b.defineProperty(e,d,{configurable:!0,writable:!0,value:b})))};tn_b.checkStringArgs=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};
tn_b.polyfill("String.prototype.endsWith",function(a){return a?a:a=function(b,c){var d=tn_b.checkStringArgs(this,b,"endsWith");b+="";void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}},"es6","es3");tn_b.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};tn_b.arrayIterator=function(a){return{next:tn_b.arrayIteratorImpl(a)}};tn_b.SYMBOL_PREFIX="jscomp_symbol_";
tn_b.initSymbol=function(){tn_b.initSymbol=function(){};tn_b.global.Symbol||(tn_b.global.Symbol=tn_b.Symbol)};tn_b.SymbolClass=function(a,b){this.$jscomp$symbol$id_=a;tn_b.defineProperty(this,"description",{configurable:!0,writable:!0,value:b})};tn_b.SymbolClass.prototype.toString=function(){return this.$jscomp$symbol$id_};
tn_b.Symbol=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new tn_b.SymbolClass(tn_b.SYMBOL_PREFIX+(c||"")+"_"+b++,c)}var b=0;return a}();
tn_b.initSymbolIterator=function(){tn_b.initSymbol();var a=tn_b.global.Symbol.iterator;a||(a=tn_b.global.Symbol.iterator=tn_b.global.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&tn_b.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return tn_b.iteratorPrototype(tn_b.arrayIteratorImpl(this))}});tn_b.initSymbolIterator=function(){}};
tn_b.initSymbolAsyncIterator=function(){tn_b.initSymbol();var a=tn_b.global.Symbol.asyncIterator;a||(a=tn_b.global.Symbol.asyncIterator=tn_b.global.Symbol("Symbol.asyncIterator"));tn_b.initSymbolAsyncIterator=function(){}};tn_b.iteratorPrototype=function(a){tn_b.initSymbolIterator();a={next:a};a[tn_b.global.Symbol.iterator]=function(){return this};return a};
tn_b.iteratorFromArray=function(a,b){tn_b.initSymbolIterator();a instanceof String&&(a+="");var c=0,d={next:function(){if(c<a.length){var e=c++;return{value:b(e,a[e]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d};
tn_b.polyfill("Array.from",function(a){return a?a:a=function(b,c,d){c=null!=c?c:function(l){return l};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}},"es6","es3");
tn_b.checkEs6ConformanceViaProxy=function(){try{var a={},b=Object.create(new tn_b.global.Proxy(a,{get:function(c,d,e){return c==a&&"q"==d&&e==b}}));return!0===b.q}catch(c){return!1}};tn_b.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;tn_b.ES6_CONFORMANCE=tn_b.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&tn_b.checkEs6ConformanceViaProxy();tn_b.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):tn_b.arrayIterator(a)};
tn_b.owns=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};
tn_b.polyfill("WeakMap",function(a){function b(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),h=Object.seal({}),m=new a([[k,2],[h,3]]);if(2!=m.get(k)||3!=m.get(h))return!1;m.delete(k);m.set(h,4);return!m.has(k)&&4==m.get(h)}catch(p){return!1}}function c(){}function d(k){var h=typeof k;return"object"===h&&null!==k||"function"===h}function e(k){if(!tn_b.owns(k,g)){var h=new c;tn_b.defineProperty(k,g,{value:h})}}function f(k){var h=Object[k];h&&(Object[k]=function(m){if(m instanceof c)return m;
e(m);return h(m)})}if(tn_b.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(a&&tn_b.ES6_CONFORMANCE)return a}else if(b())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var l=0,n=function(k){this.id_=(l+=Math.random()+1).toString();if(k){k=tn_b.makeIterator(k);for(var h;!(h=k.next()).done;)h=h.value,this.set(h[0],h[1])}};n.prototype.set=function(k,h){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!tn_b.owns(k,g))throw Error("WeakMap key fail: "+k);k[g][this.id_]=
h;return this};n.prototype.get=function(k){return d(k)&&tn_b.owns(k,g)?k[g][this.id_]:void 0};n.prototype.has=function(k){return d(k)&&tn_b.owns(k,g)&&tn_b.owns(k[g],this.id_)};n.prototype.delete=function(k){return d(k)&&tn_b.owns(k,g)&&tn_b.owns(k[g],this.id_)?delete k[g][this.id_]:!1};return n},"es6","es3");function tn_aa(a){return a in tn_ba?tn_ba[a]:tn_ba[a]=-1!=navigator.userAgent.toLowerCase().indexOf(a)}var tn_ba={},tn_ca={ieQuirks_:function(a){return a.document.body.scrollTop},ieStandards_:function(a){return a.document.documentElement.scrollTop},dom_:function(a){return a.pageYOffset}},tn_da={ieQuirks_:function(a){return a.document.body.scrollLeft},ieStandards_:function(a){return a.document.documentElement.scrollLeft},dom_:function(a){return a.pageXOffset}};
function tn_ea(a,b){try{if(tn_aa("safari")||tn_aa("konqueror"))return b.dom_(a);if(!window.opera&&"compatMode"in a.document&&"CSS1Compat"==a.document.compatMode)return b.ieStandards_(a);if((tn_aa("msie")||tn_aa("trident"))&&!window.opera)return b.ieQuirks_(a)}catch(c){}return b.dom_(a)};function tn_c(a,b,c){this.x=a;this.y=b;this.coordinateFrame=c||null}tn_c.prototype.toString=function(){return"[P "+this.x+","+this.y+"]"};tn_c.prototype.clone=function(){return new tn_c(this.x,this.y,this.coordinateFrame)};function Rect(a,b,c,d,e){this.x=a;this.y=b;this.w=c;this.h=d;this.coordinateFrame=e||null}Rect.prototype.contains=function(a){return this.x<=a.x&&a.x<this.x+this.w&&this.y<=a.y&&a.y<this.y+this.h};
Rect.prototype.intersects=function(a){var b=function(c,d){return new tn_c(c,d,null)};return this.contains(b(a.x,a.y))||this.contains(b(a.x+a.w,a.y))||this.contains(b(a.x+a.w,a.y+a.h))||this.contains(b(a.x,a.y+a.h))||a.contains(b(this.x,this.y))||a.contains(b(this.x+this.w,this.y))||a.contains(b(this.x+this.w,this.y+this.h))||a.contains(b(this.x,this.y+this.h))};Rect.prototype.toString=function(){return"[R "+this.w+"x"+this.h+"+"+this.x+"+"+this.y+"]"};
Rect.prototype.clone=function(){return new Rect(this.x,this.y,this.w,this.h,this.coordinateFrame)};function tn_fa(a){function b(g){for(var l=a.offsetParent;l&&l.offsetParent;l=l.offsetParent)l.scrollLeft&&(g.x-=l.scrollLeft),l.scrollTop&&(g.y-=l.scrollTop)}if(!a)return null;var c=a.ownerDocument&&a.ownerDocument.parentWindow?a.ownerDocument.parentWindow:a.ownerDocument&&a.ownerDocument.defaultView?a.ownerDocument.defaultView:window;if(a.getBoundingClientRect){var d=a.getBoundingClientRect();return new Rect(d.left+tn_ea(c,tn_da),d.top+tn_ea(c,tn_ca),d.right-d.left,d.bottom-d.top,c)}if(a.ownerDocument&&
a.ownerDocument.getBoxObjectFor)return d=a.ownerDocument.getBoxObjectFor(a),c=new Rect(d.x,d.y,d.width,d.height,c),b(c),c;for(var e=d=0,f=a;f.offsetParent;f=f.offsetParent)d+=f.offsetLeft,e+=f.offsetTop;c=new Rect(d,e,a.offsetWidth,a.offsetHeight,c);b(c);return c};/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var tn_=tn_||{};tn_.global=this||self;tn_.exportPath_=function(a,b,c){a=a.split(".");c=c||tn_.global;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}:c[d]=b};tn_.define=function(a,b){return a=b};tn_.FEATURESET_YEAR=2012;tn_.DEBUG=!0;tn_.LOCALE="en";tn_.TRUSTED_SITE=!0;tn_.STRICT_MODE_COMPATIBLE=!1;tn_.DISALLOW_TEST_ONLY_CODE=!tn_.DEBUG;
tn_.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1;tn_.provide=function(a){if(tn_.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");tn_.constructNamespace_(a)};tn_.constructNamespace_=function(a,b){tn_.exportPath_(a,b)};tn_.getScriptNonce=function(a){if(a&&a!=tn_.global)return tn_.getScriptNonce_(a.document);null===tn_.cspNonce_&&(tn_.cspNonce_=tn_.getScriptNonce_(tn_.global.document));return tn_.cspNonce_};tn_.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/;tn_.cspNonce_=null;
tn_.getScriptNonce_=function(a){return(a=a.querySelector&&a.querySelector("script[nonce]"))&&(a=a.nonce||a.getAttribute("nonce"))&&tn_.NONCE_PATTERN_.test(a)?a:""};tn_.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
tn_.module=function(a){if("string"!==typeof a||!a||-1==a.search(tn_.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!tn_.isInGoogModuleLoader_())throw Error("Module "+a+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(tn_.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");
tn_.moduleLoaderState_.moduleName=a};tn_.module.get=function(){return null};tn_.module.getInternal_=function(){return null};tn_.ModuleType={ES6:"es6",GOOG:"goog"};tn_.moduleLoaderState_=null;tn_.isInModuleLoader_=function(){return tn_.isInGoogModuleLoader_()||tn_.isInEs6ModuleLoader_()};tn_.isInGoogModuleLoader_=function(){return!!tn_.moduleLoaderState_&&tn_.moduleLoaderState_.type==tn_.ModuleType.GOOG};
tn_.isInEs6ModuleLoader_=function(){var a=!!tn_.moduleLoaderState_&&tn_.moduleLoaderState_.type==tn_.ModuleType.ES6;return a?!0:(a=tn_.global.$jscomp)?"function"!=typeof a.getCurrentModulePath?!1:!!a.getCurrentModulePath():!1};tn_.module.declareLegacyNamespace=function(){tn_.moduleLoaderState_.declareLegacyNamespace=!0};
tn_.declareModuleId=function(a){if(tn_.moduleLoaderState_)tn_.moduleLoaderState_.moduleName=a;else{var b=tn_.global.$jscomp;if(!b||"function"!=typeof b.getCurrentModulePath)throw Error('Module with namespace "'+a+'" has been loaded incorrectly.');b=b.require(b.getCurrentModulePath());tn_.loadedModules_[a]={exports:b,type:tn_.ModuleType.ES6,moduleId:a}}};
tn_.setTestOnly=function(a){if(tn_.DISALLOW_TEST_ONLY_CODE)throw a=a||"",Error("Importing test-only code into non-debug environment"+(a?": "+a:"."));};tn_.forwardDeclare=function(){};tn_.getObjectByName=function(a,b){a=a.split(".");b=b||tn_.global;for(var c=0;c<a.length;c++)if(b=b[a[c]],null==b)return null;return b};tn_.globalize=function(a,b){b=b||tn_.global;for(var c in a)b[c]=a[c]};tn_.addDependency=function(){};tn_.useStrictRequires=!1;tn_.ENABLE_DEBUG_LOADER=!0;
tn_.logToConsole_=function(a){tn_.global.console&&tn_.global.console.error(a)};tn_.require=function(){};tn_.requireType=function(){return{}};tn_.basePath="";tn_.nullFunction=function(){};tn_.abstractMethod=function(){throw Error("unimplemented abstract method");};tn_.addSingletonGetter=function(a){a.instance_=void 0;a.getInstance=function(){if(a.instance_)return a.instance_;tn_.DEBUG&&(tn_.instantiatedSingletons_[tn_.instantiatedSingletons_.length]=a);return a.instance_=new a}};
tn_.instantiatedSingletons_=[];tn_.LOAD_MODULE_USING_EVAL=!0;tn_.SEAL_MODULE_EXPORTS=tn_.DEBUG;tn_.loadedModules_={};tn_.DEPENDENCIES_ENABLED=!1;tn_.TRANSPILE="detect";tn_.ASSUME_ES_MODULES_TRANSPILED=!1;tn_.TRANSPILE_TO_LANGUAGE="";tn_.TRANSPILER="transpile.js";tn_.hasBadLetScoping=null;tn_.useSafari10Workaround=function(){if(null==tn_.hasBadLetScoping){try{var a=!eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";')}catch(b){a=!1}tn_.hasBadLetScoping=a}return tn_.hasBadLetScoping};
tn_.workaroundSafari10EvalBug=function(a){return"(function(){"+a+"\n;})();\n"};
tn_.loadModule=function(a){var b=tn_.moduleLoaderState_;try{tn_.moduleLoaderState_={moduleName:"",declareLegacyNamespace:!1,type:tn_.ModuleType.GOOG};if(tn_.isFunction(a))var c=a.call(void 0,{});else if("string"===typeof a)tn_.useSafari10Workaround()&&(a=tn_.workaroundSafari10EvalBug(a)),c=tn_.loadModuleFromSource_.call(void 0,a);else throw Error("Invalid module definition");var d=tn_.moduleLoaderState_.moduleName;if("string"===typeof d&&d){tn_.moduleLoaderState_.declareLegacyNamespace?tn_.constructNamespace_(d,
c):tn_.SEAL_MODULE_EXPORTS&&Object.seal&&"object"==typeof c&&null!=c&&Object.seal(c);var e={exports:c,type:tn_.ModuleType.GOOG,moduleId:tn_.moduleLoaderState_.moduleName};tn_.loadedModules_[d]=e}else throw Error('Invalid module name "'+d+'"');}finally{tn_.moduleLoaderState_=b}};tn_.loadModuleFromSource_=function(a){var b={};eval(a);return b};tn_.normalizePath_=function(a){a=a.split("/");for(var b=0;b<a.length;)"."==a[b]?a.splice(b,1):b&&".."==a[b]&&a[b-1]&&".."!=a[b-1]?a.splice(--b,2):b++;return a.join("/")};
tn_.loadFileSync_=function(a){if(tn_.global.CLOSURE_LOAD_FILE_SYNC)return tn_.global.CLOSURE_LOAD_FILE_SYNC(a);try{var b=new tn_.global.XMLHttpRequest;b.open("get",a,!1);b.send();return 0==b.status||200==b.status?b.responseText:null}catch(c){return null}};
tn_.transpile_=function(a,b,c){var d=tn_.global.$jscomp;d||(tn_.global.$jscomp=d={});var e=d.transpile;if(!e){var f=tn_.basePath+tn_.TRANSPILER,g=tn_.loadFileSync_(f);if(g){(function(){(0,eval)(g+"\n//# sourceURL="+f)}).call(tn_.global);if(tn_.global.$gwtExport&&tn_.global.$gwtExport.$jscomp&&!tn_.global.$gwtExport.$jscomp.transpile)throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: '+JSON.stringify(tn_.global.$gwtExport));tn_.global.$jscomp.transpile=tn_.global.$gwtExport.$jscomp.transpile;
d=tn_.global.$jscomp;e=d.transpile}}if(!e){var l=" requires transpilation but no transpiler was found.";l+=' Please add "//javascript/closure:transpiler" as a data dependency to ensure it is included.';e=d.transpile=function(n,k){tn_.logToConsole_(k+l);return n}}return e(a,b,c)};
tn_.typeOf=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b};tn_.isArray=function(a){return"array"==tn_.typeOf(a)};tn_.isArrayLike=function(a){var b=tn_.typeOf(a);return"array"==b||"object"==b&&"number"==typeof a.length};tn_.isDateLike=function(a){return tn_.isObject(a)&&"function"==typeof a.getFullYear};tn_.isFunction=function(a){return"function"==tn_.typeOf(a)};tn_.isObject=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b};
tn_.getUid=function(a){return Object.prototype.hasOwnProperty.call(a,tn_.UID_PROPERTY_)&&a[tn_.UID_PROPERTY_]||(a[tn_.UID_PROPERTY_]=++tn_.uidCounter_)};tn_.hasUid=function(a){return!!a[tn_.UID_PROPERTY_]};tn_.removeUid=function(a){null!==a&&"removeAttribute"in a&&a.removeAttribute(tn_.UID_PROPERTY_);try{delete a[tn_.UID_PROPERTY_]}catch(b){}};tn_.UID_PROPERTY_="closure_uid_"+(1E9*Math.random()>>>0);tn_.uidCounter_=0;tn_.getHashCode=tn_.getUid;tn_.removeHashCode=tn_.removeUid;
tn_.cloneObject=function(a){var b=tn_.typeOf(a);if("object"==b||"array"==b){if("function"===typeof a.clone)return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=tn_.cloneObject(a[c]);return b}return a};tn_.bindNative_=function(a,b,c){return a.call.apply(a.bind,arguments)};
tn_.bindJs_=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}};tn_.bind=function(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?tn_.bind=tn_.bindNative_:tn_.bind=tn_.bindJs_;return tn_.bind.apply(null,arguments)};
tn_.partial=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}};tn_.mixin=function(a,b){for(var c in b)a[c]=b[c]};tn_.now=tn_.TRUSTED_SITE&&Date.now||function(){return+new Date};
tn_.globalEval=function(a){if(tn_.global.execScript)tn_.global.execScript(a,"JavaScript");else if(tn_.global.eval){if(null==tn_.evalWorks_)try{tn_.global.eval(""),tn_.evalWorks_=!0}catch(d){tn_.evalWorks_=!1}if(tn_.evalWorks_)tn_.global.eval(a);else{var b=tn_.global.document,c=b.createElement("script");c.type="text/javascript";c.defer=!1;c.appendChild(b.createTextNode(a));b.head.appendChild(c);b.head.removeChild(c)}}else throw Error("goog.globalEval not available");};tn_.evalWorks_=null;
tn_.getCssName=function(a,b){if("."==String(a).charAt(0))throw Error('className passed in goog.getCssName must not start with ".". You passed: '+a);var c=function(e){return tn_.cssNameMapping_[e]||e},d=function(e){e=e.split("-");for(var f=[],g=0;g<e.length;g++)f.push(c(e[g]));return f.join("-")};d=tn_.cssNameMapping_?"BY_WHOLE"==tn_.cssNameMappingStyle_?c:d:function(e){return e};a=b?a+"-"+d(b):d(a);return tn_.global.CLOSURE_CSS_NAME_MAP_FN?tn_.global.CLOSURE_CSS_NAME_MAP_FN(a):a};
tn_.setCssNameMapping=function(a,b){tn_.cssNameMapping_=a;tn_.cssNameMappingStyle_=b};tn_.getMsg=function(a,b,c){c&&c.html&&(a=a.replace(/</g,"&lt;"));b&&(a=a.replace(/\{\$([^}]+)}/g,function(d,e){return null!=b&&e in b?b[e]:d}));return a};tn_.getMsgWithFallback=function(a){return a};tn_.exportSymbol=function(a,b,c){tn_.exportPath_(a,b,c)};tn_.exportProperty=function(a,b,c){a[b]=c};
tn_.inherits=function(a,b){function c(){}c.prototype=b.prototype;a.superClass_=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.base=function(d,e,f){for(var g=Array(arguments.length-2),l=2;l<arguments.length;l++)g[l-2]=arguments[l];return b.prototype[e].apply(d,g)}};tn_.scope=function(a){if(tn_.isInModuleLoader_())throw Error("goog.scope is not supported within a module.");a.call(tn_.global)};
tn_.defineClass=function(a,b){var c=b.constructor,d=b.statics;c&&c!=Object.prototype.constructor||(c=function(){throw Error("cannot instantiate an interface (no constructor defined).");});c=tn_.defineClass.createSealingConstructor_(c,a);a&&tn_.inherits(c,a);delete b.constructor;delete b.statics;tn_.defineClass.applyProperties_(c.prototype,b);null!=d&&(d instanceof Function?d(c):tn_.defineClass.applyProperties_(c,d));return c};tn_.defineClass.SEAL_CLASS_INSTANCES=tn_.DEBUG;
tn_.defineClass.createSealingConstructor_=function(a){if(!tn_.defineClass.SEAL_CLASS_INSTANCES)return a;var b=function(){var c=a.apply(this,arguments)||this;c[tn_.UID_PROPERTY_]=c[tn_.UID_PROPERTY_];return c};return b};tn_.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
tn_.defineClass.applyProperties_=function(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c]);for(var d=0;d<tn_.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;d++)c=tn_.defineClass.OBJECT_PROTOTYPE_FIELDS_[d],Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])};tn_.TRUSTED_TYPES_POLICY_NAME="";tn_.identity_=function(a){return a};
tn_.createTrustedTypesPolicy=function(a){var b=null,c=tn_.global.trustedTypes;if(!c||!c.createPolicy)return b;try{b=c.createPolicy(a,{createHTML:tn_.identity_,createScript:tn_.identity_,createScriptURL:tn_.identity_})}catch(d){tn_.logToConsole_(d.message)}return b};tn_.debug={};tn_.debug.Error=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,tn_.debug.Error);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};tn_.inherits(tn_.debug.Error,Error);tn_.debug.Error.prototype.name="CustomError";tn_.dom={};tn_.dom.NodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};tn_.asserts={};tn_.asserts.ENABLE_ASSERTS=tn_.DEBUG;tn_.asserts.AssertionError=function(a,b){tn_.debug.Error.call(this,tn_.asserts.subs_(a,b))};tn_.inherits(tn_.asserts.AssertionError,tn_.debug.Error);tn_.asserts.AssertionError.prototype.name="AssertionError";tn_.asserts.DEFAULT_ERROR_HANDLER=function(a){throw a;};tn_.asserts.errorHandler_=tn_.asserts.DEFAULT_ERROR_HANDLER;
tn_.asserts.subs_=function(a,b){a=a.split("%s");for(var c="",d=a.length-1,e=0;e<d;e++){var f=e<b.length?b[e]:"%s";c+=a[e]+f}return c+a[d]};tn_.asserts.doAssertFailure_=function(a,b,c,d){var e="Assertion failed";if(c){e+=": "+c;var f=d}else a&&(e+=": "+a,f=b);a=new tn_.asserts.AssertionError(""+e,f||[]);tn_.asserts.errorHandler_(a)};tn_.asserts.setErrorHandler=function(a){tn_.asserts.ENABLE_ASSERTS&&(tn_.asserts.errorHandler_=a)};
tn_.asserts.assert=function(a,b,c){tn_.asserts.ENABLE_ASSERTS&&!a&&tn_.asserts.doAssertFailure_("",null,b,Array.prototype.slice.call(arguments,2));return a};tn_.asserts.assertExists=function(a,b,c){tn_.asserts.ENABLE_ASSERTS&&null==a&&tn_.asserts.doAssertFailure_("Expected to exist: %s.",[a],b,Array.prototype.slice.call(arguments,2));return a};
tn_.asserts.fail=function(a,b){tn_.asserts.ENABLE_ASSERTS&&tn_.asserts.errorHandler_(new tn_.asserts.AssertionError("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1)))};tn_.asserts.assertNumber=function(a,b,c){tn_.asserts.ENABLE_ASSERTS&&"number"!==typeof a&&tn_.asserts.doAssertFailure_("Expected number but got %s: %s.",[tn_.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};
tn_.asserts.assertString=function(a,b,c){tn_.asserts.ENABLE_ASSERTS&&"string"!==typeof a&&tn_.asserts.doAssertFailure_("Expected string but got %s: %s.",[tn_.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};tn_.asserts.assertFunction=function(a,b,c){tn_.asserts.ENABLE_ASSERTS&&!tn_.isFunction(a)&&tn_.asserts.doAssertFailure_("Expected function but got %s: %s.",[tn_.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};
tn_.asserts.assertObject=function(a,b,c){tn_.asserts.ENABLE_ASSERTS&&!tn_.isObject(a)&&tn_.asserts.doAssertFailure_("Expected object but got %s: %s.",[tn_.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};tn_.asserts.assertArray=function(a,b,c){tn_.asserts.ENABLE_ASSERTS&&!Array.isArray(a)&&tn_.asserts.doAssertFailure_("Expected array but got %s: %s.",[tn_.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};
tn_.asserts.assertBoolean=function(a,b,c){tn_.asserts.ENABLE_ASSERTS&&"boolean"!==typeof a&&tn_.asserts.doAssertFailure_("Expected boolean but got %s: %s.",[tn_.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};tn_.asserts.assertElement=function(a,b,c){!tn_.asserts.ENABLE_ASSERTS||tn_.isObject(a)&&a.nodeType==tn_.dom.NodeType.ELEMENT||tn_.asserts.doAssertFailure_("Expected Element but got %s: %s.",[tn_.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};
tn_.asserts.assertInstanceof=function(a,b,c,d){!tn_.asserts.ENABLE_ASSERTS||a instanceof b||tn_.asserts.doAssertFailure_("Expected instanceof %s but got %s.",[tn_.asserts.getType_(b),tn_.asserts.getType_(a)],c,Array.prototype.slice.call(arguments,3));return a};tn_.asserts.assertFinite=function(a,b,c){!tn_.asserts.ENABLE_ASSERTS||"number"==typeof a&&isFinite(a)||tn_.asserts.doAssertFailure_("Expected %s to be a finite number but it is not.",[a],b,Array.prototype.slice.call(arguments,2));return a};
tn_.asserts.assertObjectPrototypeIsIntact=function(){for(var a in Object.prototype)tn_.asserts.fail(a+" should not be enumerable in Object.prototype.")};tn_.asserts.getType_=function(a){return a instanceof Function?a.displayName||a.name||"unknown type name":a instanceof Object?a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a):null===a?"null":typeof a};tn_.dom.asserts={};tn_.dom.asserts.assertIsLocation=function(a){if(tn_.asserts.ENABLE_ASSERTS){var b=tn_.dom.asserts.getWindow_(a);b&&(!a||!(a instanceof b.Location)&&a instanceof b.Element)&&tn_.asserts.fail("Argument is not a Location (or a non-Element mock); got: %s",tn_.dom.asserts.debugStringForType_(a))}return a};
tn_.dom.asserts.assertIsElementType_=function(a,b){if(tn_.asserts.ENABLE_ASSERTS){var c=tn_.dom.asserts.getWindow_(a);c&&"undefined"!=typeof c[b]&&(a&&(a instanceof c[b]||!(a instanceof c.Location||a instanceof c.Element))||tn_.asserts.fail("Argument is not a %s (or a non-Element, non-Location mock); got: %s",b,tn_.dom.asserts.debugStringForType_(a)))}return a};tn_.dom.asserts.assertIsHTMLAnchorElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLAnchorElement")};
tn_.dom.asserts.assertIsHTMLButtonElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLButtonElement")};tn_.dom.asserts.assertIsHTMLLinkElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLLinkElement")};tn_.dom.asserts.assertIsHTMLImageElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLImageElement")};tn_.dom.asserts.assertIsHTMLAudioElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLAudioElement")};
tn_.dom.asserts.assertIsHTMLVideoElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLVideoElement")};tn_.dom.asserts.assertIsHTMLInputElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLInputElement")};tn_.dom.asserts.assertIsHTMLTextAreaElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLTextAreaElement")};tn_.dom.asserts.assertIsHTMLCanvasElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLCanvasElement")};
tn_.dom.asserts.assertIsHTMLEmbedElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLEmbedElement")};tn_.dom.asserts.assertIsHTMLFormElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLFormElement")};tn_.dom.asserts.assertIsHTMLFrameElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLFrameElement")};tn_.dom.asserts.assertIsHTMLIFrameElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLIFrameElement")};
tn_.dom.asserts.assertIsHTMLObjectElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLObjectElement")};tn_.dom.asserts.assertIsHTMLScriptElement=function(a){return tn_.dom.asserts.assertIsElementType_(a,"HTMLScriptElement")};
tn_.dom.asserts.debugStringForType_=function(a){if(tn_.isObject(a))try{return a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a)}catch(b){return"<object could not be stringified>"}else return void 0===a?"undefined":null===a?"null":typeof a};tn_.dom.asserts.getWindow_=function(a){try{var b=a&&a.ownerDocument,c=b&&(b.defaultView||b.parentWindow);c=c||tn_.global;if(c.Element&&c.Location)return c}catch(d){}return null};tn_.array={};tn_.NATIVE_ARRAY_PROTOTYPES=tn_.TRUSTED_SITE;tn_.array.ASSUME_NATIVE_FUNCTIONS=2012<tn_.FEATURESET_YEAR;tn_.array.peek=function(a){return a[a.length-1]};tn_.array.last=tn_.array.peek;
tn_.array.indexOf=tn_.NATIVE_ARRAY_PROTOTYPES&&(tn_.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.indexOf)?function(a,b,c){tn_.asserts.assert(null!=a.length);return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if("string"===typeof a)return"string"!==typeof b||1!=b.length?-1:a.indexOf(b,c);for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};
tn_.array.lastIndexOf=tn_.NATIVE_ARRAY_PROTOTYPES&&(tn_.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.lastIndexOf)?function(a,b,c){tn_.asserts.assert(null!=a.length);c=null==c?a.length-1:c;return Array.prototype.lastIndexOf.call(a,b,c)}:function(a,b,c){c=null==c?a.length-1:c;0>c&&(c=Math.max(0,a.length+c));if("string"===typeof a)return"string"!==typeof b||1!=b.length?-1:a.lastIndexOf(b,c);for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1};
tn_.array.forEach=tn_.NATIVE_ARRAY_PROTOTYPES&&(tn_.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(a,b,c){tn_.asserts.assert(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e="string"===typeof a?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)};tn_.array.forEachRight=function(a,b,c){var d=a.length,e="string"===typeof a?a.split(""):a;for(--d;0<=d;--d)d in e&&b.call(c,e[d],d,a)};
tn_.array.filter=tn_.NATIVE_ARRAY_PROTOTYPES&&(tn_.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.filter)?function(a,b,c){tn_.asserts.assert(null!=a.length);return Array.prototype.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,g="string"===typeof a?a.split(""):a,l=0;l<d;l++)if(l in g){var n=g[l];b.call(c,n,l,a)&&(e[f++]=n)}return e};
tn_.array.map=tn_.NATIVE_ARRAY_PROTOTYPES&&(tn_.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.map)?function(a,b,c){tn_.asserts.assert(null!=a.length);return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f="string"===typeof a?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e};
tn_.array.reduce=tn_.NATIVE_ARRAY_PROTOTYPES&&(tn_.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduce)?function(a,b,c,d){tn_.asserts.assert(null!=a.length);d&&(b=tn_.bind(b,d));return Array.prototype.reduce.call(a,b,c)}:function(a,b,c,d){var e=c;tn_.array.forEach(a,function(f,g){e=b.call(d,e,f,g,a)});return e};
tn_.array.reduceRight=tn_.NATIVE_ARRAY_PROTOTYPES&&(tn_.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduceRight)?function(a,b,c,d){tn_.asserts.assert(null!=a.length);tn_.asserts.assert(null!=b);d&&(b=tn_.bind(b,d));return Array.prototype.reduceRight.call(a,b,c)}:function(a,b,c,d){var e=c;tn_.array.forEachRight(a,function(f,g){e=b.call(d,e,f,g,a)});return e};
tn_.array.some=tn_.NATIVE_ARRAY_PROTOTYPES&&(tn_.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.some)?function(a,b,c){tn_.asserts.assert(null!=a.length);return Array.prototype.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e="string"===typeof a?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1};
tn_.array.every=tn_.NATIVE_ARRAY_PROTOTYPES&&(tn_.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.every)?function(a,b,c){tn_.asserts.assert(null!=a.length);return Array.prototype.every.call(a,b,c)}:function(a,b,c){for(var d=a.length,e="string"===typeof a?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return!1;return!0};tn_.array.count=function(a,b,c){var d=0;tn_.array.forEach(a,function(e,f,g){b.call(c,e,f,g)&&++d},c);return d};
tn_.array.find=function(a,b,c){b=tn_.array.findIndex(a,b,c);return 0>b?null:"string"===typeof a?a.charAt(b):a[b]};tn_.array.findIndex=function(a,b,c){for(var d=a.length,e="string"===typeof a?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return f;return-1};tn_.array.findRight=function(a,b,c){b=tn_.array.findIndexRight(a,b,c);return 0>b?null:"string"===typeof a?a.charAt(b):a[b]};
tn_.array.findIndexRight=function(a,b,c){var d=a.length,e="string"===typeof a?a.split(""):a;for(--d;0<=d;d--)if(d in e&&b.call(c,e[d],d,a))return d;return-1};tn_.array.contains=function(a,b){return 0<=tn_.array.indexOf(a,b)};tn_.array.isEmpty=function(a){return 0==a.length};tn_.array.clear=function(a){if(!Array.isArray(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0};tn_.array.insert=function(a,b){tn_.array.contains(a,b)||a.push(b)};
tn_.array.insertAt=function(a,b,c){tn_.array.splice(a,c,0,b)};tn_.array.insertArrayAt=function(a,b,c){tn_.partial(tn_.array.splice,a,c,0).apply(null,b)};tn_.array.insertBefore=function(a,b,c){var d;2==arguments.length||0>(d=tn_.array.indexOf(a,c))?a.push(b):tn_.array.insertAt(a,b,d)};tn_.array.remove=function(a,b){b=tn_.array.indexOf(a,b);var c;(c=0<=b)&&tn_.array.removeAt(a,b);return c};tn_.array.removeLast=function(a,b){b=tn_.array.lastIndexOf(a,b);return 0<=b?(tn_.array.removeAt(a,b),!0):!1};
tn_.array.removeAt=function(a,b){tn_.asserts.assert(null!=a.length);return 1==Array.prototype.splice.call(a,b,1).length};tn_.array.removeIf=function(a,b,c){b=tn_.array.findIndex(a,b,c);return 0<=b?(tn_.array.removeAt(a,b),!0):!1};tn_.array.removeAllIf=function(a,b,c){var d=0;tn_.array.forEachRight(a,function(e,f){b.call(c,e,f,a)&&tn_.array.removeAt(a,f)&&d++});return d};tn_.array.concat=function(a){return Array.prototype.concat.apply([],arguments)};
tn_.array.join=function(a){return Array.prototype.concat.apply([],arguments)};tn_.array.toArray=function(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]};tn_.array.clone=tn_.array.toArray;tn_.array.extend=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(tn_.isArrayLike(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var g=0;g<f;g++)a[e+g]=d[g]}else a.push(d)}};
tn_.array.splice=function(a,b,c,d){tn_.asserts.assert(null!=a.length);return Array.prototype.splice.apply(a,tn_.array.slice(arguments,1))};tn_.array.slice=function(a,b,c){tn_.asserts.assert(null!=a.length);return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};
tn_.array.removeDuplicates=function(a,b,c){b=b||a;var d=function(n){return tn_.isObject(n)?"o"+tn_.getUid(n):(typeof n).charAt(0)+n};c=c||d;d={};for(var e=0,f=0;f<a.length;){var g=a[f++],l=c(g);Object.prototype.hasOwnProperty.call(d,l)||(d[l]=!0,b[e++]=g)}b.length=e};tn_.array.binarySearch=function(a,b,c){return tn_.array.binarySearch_(a,c||tn_.array.defaultCompare,!1,b)};tn_.array.binarySelect=function(a,b,c){return tn_.array.binarySearch_(a,b,!0,void 0,c)};
tn_.array.binarySearch_=function(a,b,c,d,e){for(var f=0,g=a.length,l;f<g;){var n=f+(g-f>>>1);var k=c?b.call(e,a[n],n,a):b(d,a[n]);0<k?f=n+1:(g=n,l=!k)}return l?f:-f-1};tn_.array.sort=function(a,b){a.sort(b||tn_.array.defaultCompare)};tn_.array.stableSort=function(a,b){function c(g,l){return f(g.value,l.value)||g.index-l.index}for(var d=Array(a.length),e=0;e<a.length;e++)d[e]={index:e,value:a[e]};var f=b||tn_.array.defaultCompare;tn_.array.sort(d,c);for(e=0;e<a.length;e++)a[e]=d[e].value};
tn_.array.sortByKey=function(a,b,c){var d=c||tn_.array.defaultCompare;tn_.array.sort(a,function(e,f){return d(b(e),b(f))})};tn_.array.sortObjectsByKey=function(a,b,c){tn_.array.sortByKey(a,function(d){return d[b]},c)};tn_.array.isSorted=function(a,b,c){b=b||tn_.array.defaultCompare;for(var d=1;d<a.length;d++){var e=b(a[d-1],a[d]);if(0<e||0==e&&c)return!1}return!0};
tn_.array.equals=function(a,b,c){if(!tn_.isArrayLike(a)||!tn_.isArrayLike(b)||a.length!=b.length)return!1;var d=a.length;c=c||tn_.array.defaultCompareEquality;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0};tn_.array.compare3=function(a,b,c){c=c||tn_.array.defaultCompare;for(var d=Math.min(a.length,b.length),e=0;e<d;e++){var f=c(a[e],b[e]);if(0!=f)return f}return tn_.array.defaultCompare(a.length,b.length)};tn_.array.defaultCompare=function(a,b){return a>b?1:a<b?-1:0};
tn_.array.inverseDefaultCompare=function(a,b){return-tn_.array.defaultCompare(a,b)};tn_.array.defaultCompareEquality=function(a,b){return a===b};tn_.array.binaryInsert=function(a,b,c){c=tn_.array.binarySearch(a,b,c);return 0>c?(tn_.array.insertAt(a,b,-(c+1)),!0):!1};tn_.array.binaryRemove=function(a,b,c){b=tn_.array.binarySearch(a,b,c);return 0<=b?tn_.array.removeAt(a,b):!1};
tn_.array.bucket=function(a,b,c){for(var d={},e=0;e<a.length;e++){var f=a[e],g=b.call(c,f,e,a);void 0!==g&&(g=d[g]||(d[g]=[]),g.push(f))}return d};tn_.array.toObject=function(a,b,c){var d={};tn_.array.forEach(a,function(e,f){d[b.call(c,e,f,a)]=e});return d};tn_.array.range=function(a,b,c){var d=[],e=0,f=a;c=c||1;void 0!==b&&(e=a,f=b);if(0>c*(f-e))return[];if(0<c)for(a=e;a<f;a+=c)d.push(a);else for(a=e;a>f;a+=c)d.push(a);return d};tn_.array.repeat=function(a,b){for(var c=[],d=0;d<b;d++)c[d]=a;return c};
tn_.array.flatten=function(a){for(var b=[],c=0;c<arguments.length;c++){var d=arguments[c];if(Array.isArray(d))for(var e=0;e<d.length;e+=8192){var f=tn_.array.slice(d,e,e+8192);f=tn_.array.flatten.apply(null,f);for(var g=0;g<f.length;g++)b.push(f[g])}else b.push(d)}return b};tn_.array.rotate=function(a,b){tn_.asserts.assert(null!=a.length);a.length&&(b%=a.length,0<b?Array.prototype.unshift.apply(a,a.splice(-b,b)):0>b&&Array.prototype.push.apply(a,a.splice(0,-b)));return a};
tn_.array.moveItem=function(a,b,c){tn_.asserts.assert(0<=b&&b<a.length);tn_.asserts.assert(0<=c&&c<a.length);b=Array.prototype.splice.call(a,b,1);Array.prototype.splice.call(a,c,0,b[0])};tn_.array.zip=function(a){if(!arguments.length)return[];for(var b=[],c=arguments[0].length,d=1;d<arguments.length;d++)arguments[d].length<c&&(c=arguments[d].length);for(d=0;d<c;d++){for(var e=[],f=0;f<arguments.length;f++)e.push(arguments[f][d]);b.push(e)}return b};
tn_.array.shuffle=function(a,b){b=b||Math.random;for(var c=a.length-1;0<c;c--){var d=Math.floor(b()*(c+1)),e=a[c];a[c]=a[d];a[d]=e}};tn_.array.copyByIndex=function(a,b){var c=[];tn_.array.forEach(b,function(d){c.push(a[d])});return c};tn_.array.concatMap=function(a,b,c){return tn_.array.concat.apply([],tn_.array.map(a,b,c))};tn_.dom.HtmlElement=function(){};tn_.functions={};tn_.functions.constant=function(a){return function(){return a}};tn_.functions.FALSE=function(){return!1};tn_.functions.TRUE=function(){return!0};tn_.functions.NULL=function(){return null};tn_.functions.identity=function(a){return a};tn_.functions.error=function(a){return function(){throw Error(a);}};tn_.functions.fail=function(a){return function(){throw a;}};
tn_.functions.lock=function(a,b){b=b||0;return function(){var c=this;return a.apply(c,Array.prototype.slice.call(arguments,0,b))}};tn_.functions.nth=function(a){return function(){return arguments[a]}};tn_.functions.partialRight=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=this,e=Array.prototype.slice.call(arguments);e.push.apply(e,c);return a.apply(d,e)}};tn_.functions.withReturnValue=function(a,b){return tn_.functions.sequence(a,tn_.functions.constant(b))};
tn_.functions.equalTo=function(a,b){return function(c){return b?a==c:a===c}};tn_.functions.compose=function(a,b){var c=arguments,d=c.length;return function(){var e=this,f;d&&(f=c[d-1].apply(e,arguments));for(var g=d-2;0<=g;g--)f=c[g].call(e,f);return f}};tn_.functions.sequence=function(a){var b=arguments,c=b.length;return function(){for(var d=this,e,f=0;f<c;f++)e=b[f].apply(d,arguments);return e}};
tn_.functions.and=function(a){var b=arguments,c=b.length;return function(){for(var d=this,e=0;e<c;e++)if(!b[e].apply(d,arguments))return!1;return!0}};tn_.functions.or=function(a){var b=arguments,c=b.length;return function(){for(var d=this,e=0;e<c;e++)if(b[e].apply(d,arguments))return!0;return!1}};tn_.functions.not=function(a){return function(){var b=this;return!a.apply(b,arguments)}};
tn_.functions.create=function(a,b){var c=function(){};c.prototype=a.prototype;c=new c;a.apply(c,Array.prototype.slice.call(arguments,1));return c};tn_.functions.CACHE_RETURN_VALUE=!0;tn_.functions.cacheReturnValue=function(a){var b=!1,c;return function(){if(!tn_.functions.CACHE_RETURN_VALUE)return a();b||(c=a(),b=!0);return c}};tn_.functions.once=function(a){var b=a;return function(){if(b){var c=b;b=null;c()}}};
tn_.functions.debounce=function(a,b,c){var d=0;return function(e){tn_.global.clearTimeout(d);var f=arguments;d=tn_.global.setTimeout(function(){a.apply(c,f)},b)}};tn_.functions.throttle=function(a,b,c){var d=0,e=!1,f=[],g=function(){d=0;e&&(e=!1,l())},l=function(){d=tn_.global.setTimeout(g,b);a.apply(c,f)};return function(n){f=arguments;d?e=!0:l()}};tn_.functions.rateLimit=function(a,b,c){var d=0,e=function(){d=0};return function(f){d||(d=tn_.global.setTimeout(e,b),a.apply(c,arguments))}};tn_.dom.TagName=function(a){this.tagName_=a};tn_.dom.TagName.prototype.toString=function(){return this.tagName_};tn_.dom.TagName.A=new tn_.dom.TagName("A");tn_.dom.TagName.ABBR=new tn_.dom.TagName("ABBR");tn_.dom.TagName.ACRONYM=new tn_.dom.TagName("ACRONYM");tn_.dom.TagName.ADDRESS=new tn_.dom.TagName("ADDRESS");tn_.dom.TagName.APPLET=new tn_.dom.TagName("APPLET");tn_.dom.TagName.AREA=new tn_.dom.TagName("AREA");tn_.dom.TagName.ARTICLE=new tn_.dom.TagName("ARTICLE");tn_.dom.TagName.ASIDE=new tn_.dom.TagName("ASIDE");
tn_.dom.TagName.AUDIO=new tn_.dom.TagName("AUDIO");tn_.dom.TagName.B=new tn_.dom.TagName("B");tn_.dom.TagName.BASE=new tn_.dom.TagName("BASE");tn_.dom.TagName.BASEFONT=new tn_.dom.TagName("BASEFONT");tn_.dom.TagName.BDI=new tn_.dom.TagName("BDI");tn_.dom.TagName.BDO=new tn_.dom.TagName("BDO");tn_.dom.TagName.BIG=new tn_.dom.TagName("BIG");tn_.dom.TagName.BLOCKQUOTE=new tn_.dom.TagName("BLOCKQUOTE");tn_.dom.TagName.BODY=new tn_.dom.TagName("BODY");tn_.dom.TagName.BR=new tn_.dom.TagName("BR");
tn_.dom.TagName.BUTTON=new tn_.dom.TagName("BUTTON");tn_.dom.TagName.CANVAS=new tn_.dom.TagName("CANVAS");tn_.dom.TagName.CAPTION=new tn_.dom.TagName("CAPTION");tn_.dom.TagName.CENTER=new tn_.dom.TagName("CENTER");tn_.dom.TagName.CITE=new tn_.dom.TagName("CITE");tn_.dom.TagName.CODE=new tn_.dom.TagName("CODE");tn_.dom.TagName.COL=new tn_.dom.TagName("COL");tn_.dom.TagName.COLGROUP=new tn_.dom.TagName("COLGROUP");tn_.dom.TagName.COMMAND=new tn_.dom.TagName("COMMAND");tn_.dom.TagName.DATA=new tn_.dom.TagName("DATA");
tn_.dom.TagName.DATALIST=new tn_.dom.TagName("DATALIST");tn_.dom.TagName.DD=new tn_.dom.TagName("DD");tn_.dom.TagName.DEL=new tn_.dom.TagName("DEL");tn_.dom.TagName.DETAILS=new tn_.dom.TagName("DETAILS");tn_.dom.TagName.DFN=new tn_.dom.TagName("DFN");tn_.dom.TagName.DIALOG=new tn_.dom.TagName("DIALOG");tn_.dom.TagName.DIR=new tn_.dom.TagName("DIR");tn_.dom.TagName.DIV=new tn_.dom.TagName("DIV");tn_.dom.TagName.DL=new tn_.dom.TagName("DL");tn_.dom.TagName.DT=new tn_.dom.TagName("DT");
tn_.dom.TagName.EM=new tn_.dom.TagName("EM");tn_.dom.TagName.EMBED=new tn_.dom.TagName("EMBED");tn_.dom.TagName.FIELDSET=new tn_.dom.TagName("FIELDSET");tn_.dom.TagName.FIGCAPTION=new tn_.dom.TagName("FIGCAPTION");tn_.dom.TagName.FIGURE=new tn_.dom.TagName("FIGURE");tn_.dom.TagName.FONT=new tn_.dom.TagName("FONT");tn_.dom.TagName.FOOTER=new tn_.dom.TagName("FOOTER");tn_.dom.TagName.FORM=new tn_.dom.TagName("FORM");tn_.dom.TagName.FRAME=new tn_.dom.TagName("FRAME");tn_.dom.TagName.FRAMESET=new tn_.dom.TagName("FRAMESET");
tn_.dom.TagName.H1=new tn_.dom.TagName("H1");tn_.dom.TagName.H2=new tn_.dom.TagName("H2");tn_.dom.TagName.H3=new tn_.dom.TagName("H3");tn_.dom.TagName.H4=new tn_.dom.TagName("H4");tn_.dom.TagName.H5=new tn_.dom.TagName("H5");tn_.dom.TagName.H6=new tn_.dom.TagName("H6");tn_.dom.TagName.HEAD=new tn_.dom.TagName("HEAD");tn_.dom.TagName.HEADER=new tn_.dom.TagName("HEADER");tn_.dom.TagName.HGROUP=new tn_.dom.TagName("HGROUP");tn_.dom.TagName.HR=new tn_.dom.TagName("HR");tn_.dom.TagName.HTML=new tn_.dom.TagName("HTML");
tn_.dom.TagName.I=new tn_.dom.TagName("I");tn_.dom.TagName.IFRAME=new tn_.dom.TagName("IFRAME");tn_.dom.TagName.IMG=new tn_.dom.TagName("IMG");tn_.dom.TagName.INPUT=new tn_.dom.TagName("INPUT");tn_.dom.TagName.INS=new tn_.dom.TagName("INS");tn_.dom.TagName.ISINDEX=new tn_.dom.TagName("ISINDEX");tn_.dom.TagName.KBD=new tn_.dom.TagName("KBD");tn_.dom.TagName.KEYGEN=new tn_.dom.TagName("KEYGEN");tn_.dom.TagName.LABEL=new tn_.dom.TagName("LABEL");tn_.dom.TagName.LEGEND=new tn_.dom.TagName("LEGEND");
tn_.dom.TagName.LI=new tn_.dom.TagName("LI");tn_.dom.TagName.LINK=new tn_.dom.TagName("LINK");tn_.dom.TagName.MAIN=new tn_.dom.TagName("MAIN");tn_.dom.TagName.MAP=new tn_.dom.TagName("MAP");tn_.dom.TagName.MARK=new tn_.dom.TagName("MARK");tn_.dom.TagName.MATH=new tn_.dom.TagName("MATH");tn_.dom.TagName.MENU=new tn_.dom.TagName("MENU");tn_.dom.TagName.MENUITEM=new tn_.dom.TagName("MENUITEM");tn_.dom.TagName.META=new tn_.dom.TagName("META");tn_.dom.TagName.METER=new tn_.dom.TagName("METER");
tn_.dom.TagName.NAV=new tn_.dom.TagName("NAV");tn_.dom.TagName.NOFRAMES=new tn_.dom.TagName("NOFRAMES");tn_.dom.TagName.NOSCRIPT=new tn_.dom.TagName("NOSCRIPT");tn_.dom.TagName.OBJECT=new tn_.dom.TagName("OBJECT");tn_.dom.TagName.OL=new tn_.dom.TagName("OL");tn_.dom.TagName.OPTGROUP=new tn_.dom.TagName("OPTGROUP");tn_.dom.TagName.OPTION=new tn_.dom.TagName("OPTION");tn_.dom.TagName.OUTPUT=new tn_.dom.TagName("OUTPUT");tn_.dom.TagName.P=new tn_.dom.TagName("P");tn_.dom.TagName.PARAM=new tn_.dom.TagName("PARAM");
tn_.dom.TagName.PICTURE=new tn_.dom.TagName("PICTURE");tn_.dom.TagName.PRE=new tn_.dom.TagName("PRE");tn_.dom.TagName.PROGRESS=new tn_.dom.TagName("PROGRESS");tn_.dom.TagName.Q=new tn_.dom.TagName("Q");tn_.dom.TagName.RP=new tn_.dom.TagName("RP");tn_.dom.TagName.RT=new tn_.dom.TagName("RT");tn_.dom.TagName.RTC=new tn_.dom.TagName("RTC");tn_.dom.TagName.RUBY=new tn_.dom.TagName("RUBY");tn_.dom.TagName.S=new tn_.dom.TagName("S");tn_.dom.TagName.SAMP=new tn_.dom.TagName("SAMP");
tn_.dom.TagName.SCRIPT=new tn_.dom.TagName("SCRIPT");tn_.dom.TagName.SECTION=new tn_.dom.TagName("SECTION");tn_.dom.TagName.SELECT=new tn_.dom.TagName("SELECT");tn_.dom.TagName.SMALL=new tn_.dom.TagName("SMALL");tn_.dom.TagName.SOURCE=new tn_.dom.TagName("SOURCE");tn_.dom.TagName.SPAN=new tn_.dom.TagName("SPAN");tn_.dom.TagName.STRIKE=new tn_.dom.TagName("STRIKE");tn_.dom.TagName.STRONG=new tn_.dom.TagName("STRONG");tn_.dom.TagName.STYLE=new tn_.dom.TagName("STYLE");tn_.dom.TagName.SUB=new tn_.dom.TagName("SUB");
tn_.dom.TagName.SUMMARY=new tn_.dom.TagName("SUMMARY");tn_.dom.TagName.SUP=new tn_.dom.TagName("SUP");tn_.dom.TagName.SVG=new tn_.dom.TagName("SVG");tn_.dom.TagName.TABLE=new tn_.dom.TagName("TABLE");tn_.dom.TagName.TBODY=new tn_.dom.TagName("TBODY");tn_.dom.TagName.TD=new tn_.dom.TagName("TD");tn_.dom.TagName.TEMPLATE=new tn_.dom.TagName("TEMPLATE");tn_.dom.TagName.TEXTAREA=new tn_.dom.TagName("TEXTAREA");tn_.dom.TagName.TFOOT=new tn_.dom.TagName("TFOOT");tn_.dom.TagName.TH=new tn_.dom.TagName("TH");
tn_.dom.TagName.THEAD=new tn_.dom.TagName("THEAD");tn_.dom.TagName.TIME=new tn_.dom.TagName("TIME");tn_.dom.TagName.TITLE=new tn_.dom.TagName("TITLE");tn_.dom.TagName.TR=new tn_.dom.TagName("TR");tn_.dom.TagName.TRACK=new tn_.dom.TagName("TRACK");tn_.dom.TagName.TT=new tn_.dom.TagName("TT");tn_.dom.TagName.U=new tn_.dom.TagName("U");tn_.dom.TagName.UL=new tn_.dom.TagName("UL");tn_.dom.TagName.VAR=new tn_.dom.TagName("VAR");tn_.dom.TagName.VIDEO=new tn_.dom.TagName("VIDEO");tn_.dom.TagName.WBR=new tn_.dom.TagName("WBR");tn_.object={};tn_.object.is=function(a,b){return a===b?0!==a||1/a===1/b:a!==a&&b!==b};tn_.object.forEach=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};tn_.object.filter=function(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d};tn_.object.map=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d};tn_.object.some=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return!0;return!1};
tn_.object.every=function(a,b,c){for(var d in a)if(!b.call(c,a[d],d,a))return!1;return!0};tn_.object.getCount=function(a){var b=0,c;for(c in a)b++;return b};tn_.object.getAnyKey=function(a){for(var b in a)return b};tn_.object.getAnyValue=function(a){for(var b in a)return a[b]};tn_.object.contains=function(a,b){return tn_.object.containsValue(a,b)};tn_.object.getValues=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b};tn_.object.getKeys=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b};
tn_.object.getValueByKeys=function(a,b){var c=tn_.isArrayLike(b),d=c?b:arguments;for(c=c?0:1;c<d.length;c++){if(null==a)return;a=a[d[c]]}return a};tn_.object.containsKey=function(a,b){return null!==a&&b in a};tn_.object.containsValue=function(a,b){for(var c in a)if(a[c]==b)return!0;return!1};tn_.object.findKey=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};tn_.object.findValue=function(a,b,c){return(b=tn_.object.findKey(a,b,c))&&a[b]};
tn_.object.isEmpty=function(a){for(var b in a)return!1;return!0};tn_.object.clear=function(a){for(var b in a)delete a[b]};tn_.object.remove=function(a,b){var c;(c=b in a)&&delete a[b];return c};tn_.object.add=function(a,b,c){if(null!==a&&b in a)throw Error('The object already contains the key "'+b+'"');tn_.object.set(a,b,c)};tn_.object.get=function(a,b,c){return null!==a&&b in a?a[b]:c};tn_.object.set=function(a,b,c){a[b]=c};tn_.object.setIfUndefined=function(a,b,c){return b in a?a[b]:a[b]=c};
tn_.object.setWithReturnValueIfNotSet=function(a,b,c){if(b in a)return a[b];c=c();return a[b]=c};tn_.object.equals=function(a,b){for(var c in a)if(!(c in b)||a[c]!==b[c])return!1;for(var d in b)if(!(d in a))return!1;return!0};tn_.object.clone=function(a){var b={},c;for(c in a)b[c]=a[c];return b};tn_.object.unsafeClone=function(a){var b=tn_.typeOf(a);if("object"==b||"array"==b){if(tn_.isFunction(a.clone))return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=tn_.object.unsafeClone(a[c]);return b}return a};
tn_.object.transpose=function(a){var b={},c;for(c in a)b[a[c]]=c;return b};tn_.object.PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");tn_.object.extend=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<tn_.object.PROTOTYPE_FIELDS_.length;f++)c=tn_.object.PROTOTYPE_FIELDS_[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};
tn_.object.create=function(a){var b=arguments.length;if(1==b&&Array.isArray(arguments[0]))return tn_.object.create.apply(null,arguments[0]);if(b%2)throw Error("Uneven number of arguments");for(var c={},d=0;d<b;d+=2)c[arguments[d]]=arguments[d+1];return c};tn_.object.createSet=function(a){var b=arguments.length;if(1==b&&Array.isArray(arguments[0]))return tn_.object.createSet.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c};
tn_.object.createImmutableView=function(a){var b=a;Object.isFrozen&&!Object.isFrozen(a)&&(b=Object.create(a),Object.freeze(b));return b};tn_.object.isImmutableView=function(a){return!!Object.isFrozen&&Object.isFrozen(a)};
tn_.object.getAllPropertyNames=function(a,b,c){if(!a)return[];if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)return tn_.object.getKeys(a);for(var d={};a&&(a!==Object.prototype||b)&&(a!==Function.prototype||c);){for(var e=Object.getOwnPropertyNames(a),f=0;f<e.length;f++)d[e[f]]=!0;a=Object.getPrototypeOf(a)}return tn_.object.getKeys(d)};tn_.object.getSuperClass=function(a){return(a=Object.getPrototypeOf(a.prototype))&&a.constructor};tn_.dom.tags={};tn_.dom.tags.VOID_TAGS_={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};tn_.dom.tags.isVoidTag=function(a){return!0===tn_.dom.tags.VOID_TAGS_[a]};tn_.memoize=function(a,b){var c=b||tn_.memoize.simpleSerializer;return function(){if(tn_.memoize.ENABLE_MEMOIZE){var d=this||tn_.global;d=d[tn_.memoize.CACHE_PROPERTY_]||(d[tn_.memoize.CACHE_PROPERTY_]={});var e=c(tn_.getUid(a),arguments);return d.hasOwnProperty(e)?d[e]:d[e]=a.apply(this,arguments)}return a.apply(this,arguments)}};tn_.memoize.ENABLE_MEMOIZE=!0;tn_.memoize.clearCache=function(a){a[tn_.memoize.CACHE_PROPERTY_]={}};tn_.memoize.CACHE_PROPERTY_="closure_memoize_cache_";
tn_.memoize.simpleSerializer=function(a,b){a=[a];for(var c=b.length-1;0<=c;--c)a.push(typeof b[c],b[c]);return a.join("\x0B")};tn_.html={};tn_.html.trustedtypes={};tn_.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse=function(){return tn_.TRUSTED_TYPES_POLICY_NAME?tn_.memoize(tn_.createTrustedTypesPolicy)(tn_.TRUSTED_TYPES_POLICY_NAME+"#html"):null};tn_.string={};tn_.string.TypedString=function(){};tn_.string.Const=function(a,b){this.stringConstValueWithSecurityContract__googStringSecurityPrivate_=a===tn_.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_&&b||"";this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_=tn_.string.Const.TYPE_MARKER_};tn_.string.Const.prototype.implementsGoogStringTypedString=!0;tn_.string.Const.prototype.getTypedStringValue=function(){return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_};
tn_.DEBUG&&(tn_.string.Const.prototype.toString=function(){return"Const{"+this.stringConstValueWithSecurityContract__googStringSecurityPrivate_+"}"});tn_.string.Const.unwrap=function(a){if(a instanceof tn_.string.Const&&a.constructor===tn_.string.Const&&a.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_===tn_.string.Const.TYPE_MARKER_)return a.stringConstValueWithSecurityContract__googStringSecurityPrivate_;tn_.asserts.fail("expected object of type Const, got '"+a+"'");return"type_error:Const"};
tn_.string.Const.from=function(a){return new tn_.string.Const(tn_.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_,a)};tn_.string.Const.TYPE_MARKER_={};tn_.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_={};tn_.string.Const.EMPTY=tn_.string.Const.from("");tn_.html.SafeScript=function(){this.privateDoNotAccessOrElseSafeScriptWrappedValue_="";this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=tn_.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};tn_.html.SafeScript.prototype.implementsGoogStringTypedString=!0;tn_.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};tn_.html.SafeScript.fromConstant=function(a){a=tn_.string.Const.unwrap(a);return 0===a.length?tn_.html.SafeScript.EMPTY:tn_.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(a)};
tn_.html.SafeScript.fromConstantAndArgs=function(a,b){for(var c=[],d=1;d<arguments.length;d++)c.push(tn_.html.SafeScript.stringify_(arguments[d]));return tn_.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("("+tn_.string.Const.unwrap(a)+")("+c.join(", ")+");")};tn_.html.SafeScript.fromJson=function(a){return tn_.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(tn_.html.SafeScript.stringify_(a))};tn_.html.SafeScript.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_.toString()};
tn_.DEBUG&&(tn_.html.SafeScript.prototype.toString=function(){return"SafeScript{"+this.privateDoNotAccessOrElseSafeScriptWrappedValue_+"}"});tn_.html.SafeScript.unwrap=function(a){return tn_.html.SafeScript.unwrapTrustedScript(a).toString()};
tn_.html.SafeScript.unwrapTrustedScript=function(a){if(a instanceof tn_.html.SafeScript&&a.constructor===tn_.html.SafeScript&&a.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===tn_.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return a.privateDoNotAccessOrElseSafeScriptWrappedValue_;tn_.asserts.fail("expected object of type SafeScript, got '"+a+"' of type "+tn_.typeOf(a));return"type_error:SafeScript"};
tn_.html.SafeScript.stringify_=function(a){a=JSON.stringify(a);return a.replace(/</g,"\\x3c")};tn_.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse=function(a){return(new tn_.html.SafeScript).initSecurityPrivateDoNotAccessOrElse_(a)};tn_.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_=function(a){var b=tn_.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse();this.privateDoNotAccessOrElseSafeScriptWrappedValue_=b?b.createScript(a):a;return this};
tn_.html.SafeScript.EMPTY=tn_.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("");tn_.fs={};tn_.fs.url={};tn_.fs.url.createObjectUrl=function(a){return tn_.fs.url.getUrlObject_().createObjectURL(a)};tn_.fs.url.revokeObjectUrl=function(a){tn_.fs.url.getUrlObject_().revokeObjectURL(a)};tn_.fs.url.UrlObject_=function(){};tn_.fs.url.UrlObject_.prototype.createObjectURL=function(){};tn_.fs.url.UrlObject_.prototype.revokeObjectURL=function(){};
tn_.fs.url.getUrlObject_=function(){var a=tn_.fs.url.findUrlObject_();if(null!=a)return a;throw Error("This browser doesn't seem to support blob URLs");};tn_.fs.url.findUrlObject_=function(){return void 0!==tn_.global.URL&&void 0!==tn_.global.URL.createObjectURL?tn_.global.URL:void 0!==tn_.global.webkitURL&&void 0!==tn_.global.webkitURL.createObjectURL?tn_.global.webkitURL:void 0!==tn_.global.createObjectURL?tn_.global:null};tn_.fs.url.browserSupportsObjectUrls=function(){return null!=tn_.fs.url.findUrlObject_()};tn_.fs.blob={};tn_.fs.blob.getBlob=function(a){var b=tn_.global.BlobBuilder||tn_.global.WebKitBlobBuilder;if(void 0!==b){b=new b;for(var c=0;c<arguments.length;c++)b.append(arguments[c]);return b.getBlob()}return tn_.fs.blob.getBlobWithProperties(tn_.array.toArray(arguments))};
tn_.fs.blob.getBlobWithProperties=function(a,b,c){var d=tn_.global.BlobBuilder||tn_.global.WebKitBlobBuilder;if(void 0!==d){d=new d;for(var e=0;e<a.length;e++)d.append(a[e],c);return d.getBlob(b)}if(void 0!==tn_.global.Blob)return d={},b&&(d.type=b),c&&(d.endings=c),new Blob(a,d);throw Error("This browser doesn't seem to support creating Blobs");};tn_.i18n={};tn_.i18n.bidi={};tn_.i18n.bidi.FORCE_RTL=!1;
tn_.i18n.bidi.IS_RTL=tn_.i18n.bidi.FORCE_RTL||("ar"==tn_.LOCALE.substring(0,2).toLowerCase()||"fa"==tn_.LOCALE.substring(0,2).toLowerCase()||"he"==tn_.LOCALE.substring(0,2).toLowerCase()||"iw"==tn_.LOCALE.substring(0,2).toLowerCase()||"ps"==tn_.LOCALE.substring(0,2).toLowerCase()||"sd"==tn_.LOCALE.substring(0,2).toLowerCase()||"ug"==tn_.LOCALE.substring(0,2).toLowerCase()||"ur"==tn_.LOCALE.substring(0,2).toLowerCase()||"yi"==tn_.LOCALE.substring(0,2).toLowerCase())&&(2==tn_.LOCALE.length||"-"==tn_.LOCALE.substring(2,
3)||"_"==tn_.LOCALE.substring(2,3))||3<=tn_.LOCALE.length&&"ckb"==tn_.LOCALE.substring(0,3).toLowerCase()&&(3==tn_.LOCALE.length||"-"==tn_.LOCALE.substring(3,4)||"_"==tn_.LOCALE.substring(3,4))||7<=tn_.LOCALE.length&&("-"==tn_.LOCALE.substring(2,3)||"_"==tn_.LOCALE.substring(2,3))&&("adlm"==tn_.LOCALE.substring(3,7).toLowerCase()||"arab"==tn_.LOCALE.substring(3,7).toLowerCase()||"hebr"==tn_.LOCALE.substring(3,7).toLowerCase()||"nkoo"==tn_.LOCALE.substring(3,7).toLowerCase()||"rohg"==tn_.LOCALE.substring(3,
7).toLowerCase()||"thaa"==tn_.LOCALE.substring(3,7).toLowerCase())||8<=tn_.LOCALE.length&&("-"==tn_.LOCALE.substring(3,4)||"_"==tn_.LOCALE.substring(3,4))&&("adlm"==tn_.LOCALE.substring(4,8).toLowerCase()||"arab"==tn_.LOCALE.substring(4,8).toLowerCase()||"hebr"==tn_.LOCALE.substring(4,8).toLowerCase()||"nkoo"==tn_.LOCALE.substring(4,8).toLowerCase()||"rohg"==tn_.LOCALE.substring(4,8).toLowerCase()||"thaa"==tn_.LOCALE.substring(4,8).toLowerCase());
tn_.i18n.bidi.Format={LRE:"\u202a",RLE:"\u202b",PDF:"\u202c",LRM:"\u200e",RLM:"\u200f"};tn_.i18n.bidi.Dir={LTR:1,RTL:-1,NEUTRAL:0};tn_.i18n.bidi.RIGHT="right";tn_.i18n.bidi.LEFT="left";tn_.i18n.bidi.I18N_RIGHT=tn_.i18n.bidi.IS_RTL?tn_.i18n.bidi.LEFT:tn_.i18n.bidi.RIGHT;tn_.i18n.bidi.I18N_LEFT=tn_.i18n.bidi.IS_RTL?tn_.i18n.bidi.RIGHT:tn_.i18n.bidi.LEFT;
tn_.i18n.bidi.toDir=function(a,b){return"number"==typeof a?0<a?tn_.i18n.bidi.Dir.LTR:0>a?tn_.i18n.bidi.Dir.RTL:b?null:tn_.i18n.bidi.Dir.NEUTRAL:null==a?null:a?tn_.i18n.bidi.Dir.RTL:tn_.i18n.bidi.Dir.LTR};tn_.i18n.bidi.ltrChars_="A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0900-\u1fff\u200e\u2c00-\ud801\ud804-\ud839\ud83c-\udbff\uf900-\ufb1c\ufe00-\ufe6f\ufefd-\uffff";tn_.i18n.bidi.rtlChars_="\u0591-\u06ef\u06fa-\u08ff\u200f\ud802-\ud803\ud83a-\ud83b\ufb1d-\ufdff\ufe70-\ufefc";
tn_.i18n.bidi.htmlSkipReg_=/<[^>]*>|&[^;]+;/g;tn_.i18n.bidi.stripHtmlIfNeeded_=function(a,b){return b?a.replace(tn_.i18n.bidi.htmlSkipReg_,""):a};tn_.i18n.bidi.rtlCharReg_=new RegExp("["+tn_.i18n.bidi.rtlChars_+"]");tn_.i18n.bidi.ltrCharReg_=new RegExp("["+tn_.i18n.bidi.ltrChars_+"]");tn_.i18n.bidi.hasAnyRtl=function(a,b){return tn_.i18n.bidi.rtlCharReg_.test(tn_.i18n.bidi.stripHtmlIfNeeded_(a,b))};tn_.i18n.bidi.hasRtlChar=tn_.i18n.bidi.hasAnyRtl;
tn_.i18n.bidi.hasAnyLtr=function(a,b){return tn_.i18n.bidi.ltrCharReg_.test(tn_.i18n.bidi.stripHtmlIfNeeded_(a,b))};tn_.i18n.bidi.ltrRe_=new RegExp("^["+tn_.i18n.bidi.ltrChars_+"]");tn_.i18n.bidi.rtlRe_=new RegExp("^["+tn_.i18n.bidi.rtlChars_+"]");tn_.i18n.bidi.isRtlChar=function(a){return tn_.i18n.bidi.rtlRe_.test(a)};tn_.i18n.bidi.isLtrChar=function(a){return tn_.i18n.bidi.ltrRe_.test(a)};tn_.i18n.bidi.isNeutralChar=function(a){return!tn_.i18n.bidi.isLtrChar(a)&&!tn_.i18n.bidi.isRtlChar(a)};
tn_.i18n.bidi.ltrDirCheckRe_=new RegExp("^[^"+tn_.i18n.bidi.rtlChars_+"]*["+tn_.i18n.bidi.ltrChars_+"]");tn_.i18n.bidi.rtlDirCheckRe_=new RegExp("^[^"+tn_.i18n.bidi.ltrChars_+"]*["+tn_.i18n.bidi.rtlChars_+"]");tn_.i18n.bidi.startsWithRtl=function(a,b){return tn_.i18n.bidi.rtlDirCheckRe_.test(tn_.i18n.bidi.stripHtmlIfNeeded_(a,b))};tn_.i18n.bidi.isRtlText=tn_.i18n.bidi.startsWithRtl;
tn_.i18n.bidi.startsWithLtr=function(a,b){return tn_.i18n.bidi.ltrDirCheckRe_.test(tn_.i18n.bidi.stripHtmlIfNeeded_(a,b))};tn_.i18n.bidi.isLtrText=tn_.i18n.bidi.startsWithLtr;tn_.i18n.bidi.isRequiredLtrRe_=/^http:\/\/.*/;tn_.i18n.bidi.isNeutralText=function(a,b){a=tn_.i18n.bidi.stripHtmlIfNeeded_(a,b);return tn_.i18n.bidi.isRequiredLtrRe_.test(a)||!tn_.i18n.bidi.hasAnyLtr(a)&&!tn_.i18n.bidi.hasAnyRtl(a)};
tn_.i18n.bidi.ltrExitDirCheckRe_=new RegExp("["+tn_.i18n.bidi.ltrChars_+"][^"+tn_.i18n.bidi.rtlChars_+"]*$");tn_.i18n.bidi.rtlExitDirCheckRe_=new RegExp("["+tn_.i18n.bidi.rtlChars_+"][^"+tn_.i18n.bidi.ltrChars_+"]*$");tn_.i18n.bidi.endsWithLtr=function(a,b){return tn_.i18n.bidi.ltrExitDirCheckRe_.test(tn_.i18n.bidi.stripHtmlIfNeeded_(a,b))};tn_.i18n.bidi.isLtrExitText=tn_.i18n.bidi.endsWithLtr;
tn_.i18n.bidi.endsWithRtl=function(a,b){return tn_.i18n.bidi.rtlExitDirCheckRe_.test(tn_.i18n.bidi.stripHtmlIfNeeded_(a,b))};tn_.i18n.bidi.isRtlExitText=tn_.i18n.bidi.endsWithRtl;tn_.i18n.bidi.rtlLocalesRe_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;tn_.i18n.bidi.isRtlLanguage=function(a){return tn_.i18n.bidi.rtlLocalesRe_.test(a)};tn_.i18n.bidi.bracketGuardTextRe_=/(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g;
tn_.i18n.bidi.guardBracketInText=function(a,b){b=(b=void 0===b?tn_.i18n.bidi.hasAnyRtl(a):b)?tn_.i18n.bidi.Format.RLM:tn_.i18n.bidi.Format.LRM;return a.replace(tn_.i18n.bidi.bracketGuardTextRe_,b+"$&"+b)};tn_.i18n.bidi.enforceRtlInHtml=function(a){return"<"==a.charAt(0)?a.replace(/<\w+/,"$& dir=rtl"):"\n<span dir=rtl>"+a+"</span>"};tn_.i18n.bidi.enforceRtlInText=function(a){return tn_.i18n.bidi.Format.RLE+a+tn_.i18n.bidi.Format.PDF};
tn_.i18n.bidi.enforceLtrInHtml=function(a){return"<"==a.charAt(0)?a.replace(/<\w+/,"$& dir=ltr"):"\n<span dir=ltr>"+a+"</span>"};tn_.i18n.bidi.enforceLtrInText=function(a){return tn_.i18n.bidi.Format.LRE+a+tn_.i18n.bidi.Format.PDF};tn_.i18n.bidi.dimensionsRe_=/:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g;tn_.i18n.bidi.leftRe_=/left/gi;tn_.i18n.bidi.rightRe_=/right/gi;tn_.i18n.bidi.tempRe_=/%%%%/g;
tn_.i18n.bidi.mirrorCSS=function(a){return a.replace(tn_.i18n.bidi.dimensionsRe_,":$1 $4 $3 $2").replace(tn_.i18n.bidi.leftRe_,"%%%%").replace(tn_.i18n.bidi.rightRe_,tn_.i18n.bidi.LEFT).replace(tn_.i18n.bidi.tempRe_,tn_.i18n.bidi.RIGHT)};tn_.i18n.bidi.doubleQuoteSubstituteRe_=/([\u0591-\u05f2])"/g;tn_.i18n.bidi.singleQuoteSubstituteRe_=/([\u0591-\u05f2])'/g;
tn_.i18n.bidi.normalizeHebrewQuote=function(a){return a.replace(tn_.i18n.bidi.doubleQuoteSubstituteRe_,"$1\u05f4").replace(tn_.i18n.bidi.singleQuoteSubstituteRe_,"$1\u05f3")};tn_.i18n.bidi.wordSeparatorRe_=/\s+/;tn_.i18n.bidi.hasNumeralsRe_=/[\d\u06f0-\u06f9]/;tn_.i18n.bidi.rtlDetectionThreshold_=.4;
tn_.i18n.bidi.estimateDirection=function(a,b){var c=0,d=0,e=!1;a=tn_.i18n.bidi.stripHtmlIfNeeded_(a,b).split(tn_.i18n.bidi.wordSeparatorRe_);for(b=0;b<a.length;b++){var f=a[b];tn_.i18n.bidi.startsWithRtl(f)?(c++,d++):tn_.i18n.bidi.isRequiredLtrRe_.test(f)?e=!0:tn_.i18n.bidi.hasAnyLtr(f)?d++:tn_.i18n.bidi.hasNumeralsRe_.test(f)&&(e=!0)}return 0==d?e?tn_.i18n.bidi.Dir.LTR:tn_.i18n.bidi.Dir.NEUTRAL:c/d>tn_.i18n.bidi.rtlDetectionThreshold_?tn_.i18n.bidi.Dir.RTL:tn_.i18n.bidi.Dir.LTR};
tn_.i18n.bidi.detectRtlDirectionality=function(a,b){return tn_.i18n.bidi.estimateDirection(a,b)==tn_.i18n.bidi.Dir.RTL};tn_.i18n.bidi.setElementDirAndAlign=function(a,b){a&&(b=tn_.i18n.bidi.toDir(b))&&(a.style.textAlign=b==tn_.i18n.bidi.Dir.RTL?tn_.i18n.bidi.RIGHT:tn_.i18n.bidi.LEFT,a.dir=b==tn_.i18n.bidi.Dir.RTL?"rtl":"ltr")};
tn_.i18n.bidi.setElementDirByTextDirectionality=function(a,b){switch(tn_.i18n.bidi.estimateDirection(b)){case tn_.i18n.bidi.Dir.LTR:a.dir="ltr";break;case tn_.i18n.bidi.Dir.RTL:a.dir="rtl";break;default:a.removeAttribute("dir")}};tn_.i18n.bidi.DirectionalString=function(){};tn_.html.TrustedResourceUrl=function(a,b){this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=a===tn_.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_&&b||"";this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=tn_.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};tn_a=tn_.html.TrustedResourceUrl.prototype;tn_a.implementsGoogStringTypedString=!0;tn_a.getTypedStringValue=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_.toString()};
tn_a.implementsGoogI18nBidiDirectionalString=!0;tn_a.getDirection=function(){return tn_.i18n.bidi.Dir.LTR};tn_a.cloneWithParams=function(a,b){var c=tn_.html.TrustedResourceUrl.unwrap(this),d=tn_.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(c);c=d[1];var e=d[2]||"";d=d[3]||"";return tn_.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(c+tn_.html.TrustedResourceUrl.stringifyParams_("?",e,a)+tn_.html.TrustedResourceUrl.stringifyParams_("#",d,b))};
tn_.DEBUG&&(tn_.html.TrustedResourceUrl.prototype.toString=function(){return"TrustedResourceUrl{"+this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_+"}"});tn_.html.TrustedResourceUrl.unwrap=function(a){return tn_.html.TrustedResourceUrl.unwrapTrustedScriptURL(a).toString()};
tn_.html.TrustedResourceUrl.unwrapTrustedScriptURL=function(a){if(a instanceof tn_.html.TrustedResourceUrl&&a.constructor===tn_.html.TrustedResourceUrl&&a.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===tn_.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return a.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;tn_.asserts.fail("expected object of type TrustedResourceUrl, got '"+a+"' of type "+tn_.typeOf(a));return"type_error:TrustedResourceUrl"};
tn_.html.TrustedResourceUrl.format=function(a,b){var c=tn_.string.Const.unwrap(a);if(!tn_.html.TrustedResourceUrl.BASE_URL_.test(c))throw Error("Invalid TrustedResourceUrl format: "+c);a=c.replace(tn_.html.TrustedResourceUrl.FORMAT_MARKER_,function(d,e){if(!Object.prototype.hasOwnProperty.call(b,e))throw Error('Found marker, "'+e+'", in format string, "'+c+'", but no valid label mapping found in args: '+JSON.stringify(b));d=b[e];return d instanceof tn_.string.Const?tn_.string.Const.unwrap(d):encodeURIComponent(String(d))});
return tn_.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(a)};tn_.html.TrustedResourceUrl.FORMAT_MARKER_=/%{(\w+)}/g;tn_.html.TrustedResourceUrl.BASE_URL_=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i;tn_.html.TrustedResourceUrl.URL_PARAM_PARSER_=/^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/;tn_.html.TrustedResourceUrl.formatWithParams=function(a,b,c,d){a=tn_.html.TrustedResourceUrl.format(a,b);return a.cloneWithParams(c,d)};
tn_.html.TrustedResourceUrl.fromConstant=function(a){return tn_.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(tn_.string.Const.unwrap(a))};tn_.html.TrustedResourceUrl.fromConstants=function(a){for(var b="",c=0;c<a.length;c++)b+=tn_.string.Const.unwrap(a[c]);return tn_.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b)};
tn_.html.TrustedResourceUrl.fromSafeScript=function(a){a=tn_.fs.blob.getBlobWithProperties([tn_.html.SafeScript.unwrap(a)],"text/javascript");a=tn_.fs.url.createObjectUrl(a);return tn_.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(a)};tn_.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};
tn_.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse=function(a){var b=tn_.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse();a=b?b.createScriptURL(a):a;return new tn_.html.TrustedResourceUrl(tn_.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_,a)};
tn_.html.TrustedResourceUrl.stringifyParams_=function(a,b,c){if(null==c)return b;if("string"===typeof c)return c?a+encodeURIComponent(c):"";for(var d in c){var e=c[d];e=Array.isArray(e)?e:[e];for(var f=0;f<e.length;f++){var g=e[f];null!=g&&(b||(b=a),b+=(b.length>a.length?"&":"")+encodeURIComponent(d)+"="+encodeURIComponent(String(g)))}}return b};tn_.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_={};tn_.string.internal={};tn_.string.internal.startsWith=function(a,b){return 0==a.lastIndexOf(b,0)};tn_.string.internal.endsWith=function(a,b){var c=a.length-b.length;return 0<=c&&a.indexOf(b,c)==c};tn_.string.internal.caseInsensitiveStartsWith=function(a,b){return 0==tn_.string.internal.caseInsensitiveCompare(b,a.substr(0,b.length))};tn_.string.internal.caseInsensitiveEndsWith=function(a,b){return 0==tn_.string.internal.caseInsensitiveCompare(b,a.substr(a.length-b.length,b.length))};
tn_.string.internal.caseInsensitiveEquals=function(a,b){return a.toLowerCase()==b.toLowerCase()};tn_.string.internal.isEmptyOrWhitespace=function(a){return/^[\s\xa0]*$/.test(a)};tn_.string.internal.trim=tn_.TRUSTED_SITE&&String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]};tn_.string.internal.caseInsensitiveCompare=function(a,b){a=String(a).toLowerCase();b=String(b).toLowerCase();return a<b?-1:a==b?0:1};
tn_.string.internal.newLineToBr=function(a,b){return a.replace(/(\r\n|\r|\n)/g,b?"<br />":"<br>")};
tn_.string.internal.htmlEscape=function(a,b){if(b)a=a.replace(tn_.string.internal.AMP_RE_,"&amp;").replace(tn_.string.internal.LT_RE_,"&lt;").replace(tn_.string.internal.GT_RE_,"&gt;").replace(tn_.string.internal.QUOT_RE_,"&quot;").replace(tn_.string.internal.SINGLE_QUOTE_RE_,"&#39;").replace(tn_.string.internal.NULL_RE_,"&#0;");else{if(!tn_.string.internal.ALL_RE_.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(tn_.string.internal.AMP_RE_,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(tn_.string.internal.LT_RE_,
"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(tn_.string.internal.GT_RE_,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(tn_.string.internal.QUOT_RE_,"&quot;"));-1!=a.indexOf("'")&&(a=a.replace(tn_.string.internal.SINGLE_QUOTE_RE_,"&#39;"));-1!=a.indexOf("\x00")&&(a=a.replace(tn_.string.internal.NULL_RE_,"&#0;"))}return a};tn_.string.internal.AMP_RE_=/&/g;tn_.string.internal.LT_RE_=/</g;tn_.string.internal.GT_RE_=/>/g;tn_.string.internal.QUOT_RE_=/"/g;tn_.string.internal.SINGLE_QUOTE_RE_=/'/g;
tn_.string.internal.NULL_RE_=/\x00/g;tn_.string.internal.ALL_RE_=/[\x00&<>"']/;tn_.string.internal.whitespaceEscape=function(a,b){return tn_.string.internal.newLineToBr(a.replace(/ /g," &#160;"),b)};tn_.string.internal.contains=function(a,b){return-1!=a.indexOf(b)};tn_.string.internal.caseInsensitiveContains=function(a,b){return tn_.string.internal.contains(a.toLowerCase(),b.toLowerCase())};
tn_.string.internal.compareVersions=function(a,b){var c=0;a=tn_.string.internal.trim(String(a)).split(".");b=tn_.string.internal.trim(String(b)).split(".");for(var d=Math.max(a.length,b.length),e=0;0==c&&e<d;e++){var f=a[e]||"",g=b[e]||"";do{f=/(\d*)(\D*)(.*)/.exec(f)||["","","",""];g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];if(0==f[0].length&&0==g[0].length)break;c=0==f[1].length?0:parseInt(f[1],10);var l=0==g[1].length?0:parseInt(g[1],10);c=tn_.string.internal.compareElements_(c,l)||tn_.string.internal.compareElements_(0==
f[2].length,0==g[2].length)||tn_.string.internal.compareElements_(f[2],g[2]);f=f[3];g=g[3]}while(0==c)}return c};tn_.string.internal.compareElements_=function(a,b){return a<b?-1:a>b?1:0};tn_.html.SafeUrl=function(a,b){this.privateDoNotAccessOrElseSafeUrlWrappedValue_=a===tn_.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_&&b||"";this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=tn_.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};tn_.html.SafeUrl.INNOCUOUS_STRING="about:invalid#zClosurez";tn_.html.SafeUrl.prototype.implementsGoogStringTypedString=!0;tn_.html.SafeUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString()};
tn_.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString=!0;tn_.html.SafeUrl.prototype.getDirection=function(){return tn_.i18n.bidi.Dir.LTR};tn_.DEBUG&&(tn_.html.SafeUrl.prototype.toString=function(){return"SafeUrl{"+this.privateDoNotAccessOrElseSafeUrlWrappedValue_+"}"});
tn_.html.SafeUrl.unwrap=function(a){if(a instanceof tn_.html.SafeUrl&&a.constructor===tn_.html.SafeUrl&&a.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===tn_.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return a.privateDoNotAccessOrElseSafeUrlWrappedValue_;tn_.asserts.fail("expected object of type SafeUrl, got '"+a+"' of type "+tn_.typeOf(a));return"type_error:SafeUrl"};tn_.html.SafeUrl.fromConstant=function(a){return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(tn_.string.Const.unwrap(a))};
tn_.html.SAFE_MIME_TYPE_PATTERN_=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|font\/\w+|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i;tn_.html.SafeUrl.isSafeMimeType=function(a){return tn_.html.SAFE_MIME_TYPE_PATTERN_.test(a)};
tn_.html.SafeUrl.fromBlob=function(a){a=tn_.html.SafeUrl.isSafeMimeType(a.type)?tn_.fs.url.createObjectUrl(a):tn_.html.SafeUrl.INNOCUOUS_STRING;return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};tn_.html.SafeUrl.fromMediaSource=function(a){tn_.asserts.assert("MediaSource"in tn_.global,"No support for MediaSource");a=a instanceof MediaSource?tn_.fs.url.createObjectUrl(a):tn_.html.SafeUrl.INNOCUOUS_STRING;return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
tn_.html.DATA_URL_PATTERN_=/^data:(.*);base64,[a-z0-9+\/]+=*$/i;tn_.html.SafeUrl.fromDataUrl=function(a){a=a.replace(/(%0A|%0D)/g,"");var b=a.match(tn_.html.DATA_URL_PATTERN_);b=b&&tn_.html.SafeUrl.isSafeMimeType(b[1]);return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b?a:tn_.html.SafeUrl.INNOCUOUS_STRING)};tn_.html.SafeUrl.fromTelUrl=function(a){tn_.string.internal.caseInsensitiveStartsWith(a,"tel:")||(a=tn_.html.SafeUrl.INNOCUOUS_STRING);return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
tn_.html.SIP_URL_PATTERN_=/^sip[s]?:[+a-z0-9_.!$%&'*\/=^`{|}~-]+@([a-z0-9-]+\.)+[a-z0-9]{2,63}$/i;tn_.html.SafeUrl.fromSipUrl=function(a){tn_.html.SIP_URL_PATTERN_.test(decodeURIComponent(a))||(a=tn_.html.SafeUrl.INNOCUOUS_STRING);return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};tn_.html.SafeUrl.fromFacebookMessengerUrl=function(a){tn_.string.internal.caseInsensitiveStartsWith(a,"fb-messenger://share")||(a=tn_.html.SafeUrl.INNOCUOUS_STRING);return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
tn_.html.SafeUrl.fromWhatsAppUrl=function(a){tn_.string.internal.caseInsensitiveStartsWith(a,"whatsapp://send")||(a=tn_.html.SafeUrl.INNOCUOUS_STRING);return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};tn_.html.SafeUrl.fromSmsUrl=function(a){tn_.string.internal.caseInsensitiveStartsWith(a,"sms:")&&tn_.html.SafeUrl.isSmsUrlBodyValid_(a)||(a=tn_.html.SafeUrl.INNOCUOUS_STRING);return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
tn_.html.SafeUrl.isSmsUrlBodyValid_=function(a){var b=a.indexOf("#");0<b&&(a=a.substring(0,b));b=a.match(/[?&]body=/gi);if(!b)return!0;if(1<b.length)return!1;a=a.match(/[?&]body=([^&]*)/)[1];if(!a)return!0;try{decodeURIComponent(a)}catch(c){return!1}return/^(?:[a-z0-9\-_.~]|%[0-9a-f]{2})+$/i.test(a)};tn_.html.SafeUrl.fromSshUrl=function(a){tn_.string.internal.caseInsensitiveStartsWith(a,"ssh://")||(a=tn_.html.SafeUrl.INNOCUOUS_STRING);return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
tn_.html.SafeUrl.sanitizeChromeExtensionUrl=function(a,b){return tn_.html.SafeUrl.sanitizeExtensionUrl_(/^chrome-extension:\/\/([^\/]+)\//,a,b)};tn_.html.SafeUrl.sanitizeFirefoxExtensionUrl=function(a,b){return tn_.html.SafeUrl.sanitizeExtensionUrl_(/^moz-extension:\/\/([^\/]+)\//,a,b)};tn_.html.SafeUrl.sanitizeEdgeExtensionUrl=function(a,b){return tn_.html.SafeUrl.sanitizeExtensionUrl_(/^ms-browser-extension:\/\/([^\/]+)\//,a,b)};
tn_.html.SafeUrl.sanitizeExtensionUrl_=function(a,b,c){(a=a.exec(b))?(a=a[1],c=c instanceof tn_.string.Const?[tn_.string.Const.unwrap(c)]:c.map(function(d){return tn_.string.Const.unwrap(d)}),-1==c.indexOf(a)&&(b=tn_.html.SafeUrl.INNOCUOUS_STRING)):b=tn_.html.SafeUrl.INNOCUOUS_STRING;return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)};tn_.html.SafeUrl.fromTrustedResourceUrl=function(a){return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(tn_.html.TrustedResourceUrl.unwrap(a))};
tn_.html.SAFE_URL_PATTERN_=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;tn_.html.SafeUrl.SAFE_URL_PATTERN=tn_.html.SAFE_URL_PATTERN_;tn_.html.SafeUrl.sanitize=function(a){if(a instanceof tn_.html.SafeUrl)return a;a="object"==typeof a&&a.implementsGoogStringTypedString?a.getTypedStringValue():String(a);tn_.html.SAFE_URL_PATTERN_.test(a)||(a=tn_.html.SafeUrl.INNOCUOUS_STRING);return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
tn_.html.SafeUrl.sanitizeAssertUnchanged=function(a,b){if(a instanceof tn_.html.SafeUrl)return a;a="object"==typeof a&&a.implementsGoogStringTypedString?a.getTypedStringValue():String(a);if(b&&/^data:/i.test(a)&&(b=tn_.html.SafeUrl.fromDataUrl(a),b.getTypedStringValue()==a))return b;tn_.asserts.assert(tn_.html.SAFE_URL_PATTERN_.test(a),"%s does not match the safe URL pattern",a)||(a=tn_.html.SafeUrl.INNOCUOUS_STRING);return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
tn_.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse=function(a){return new tn_.html.SafeUrl(tn_.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_,a)};tn_.html.SafeUrl.ABOUT_BLANK=tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank");tn_.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_={};tn_.html.SafeStyle=function(){this.privateDoNotAccessOrElseSafeStyleWrappedValue_="";this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=tn_.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};tn_.html.SafeStyle.prototype.implementsGoogStringTypedString=!0;tn_.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};
tn_.html.SafeStyle.fromConstant=function(a){a=tn_.string.Const.unwrap(a);if(0===a.length)return tn_.html.SafeStyle.EMPTY;tn_.asserts.assert(tn_.string.internal.endsWith(a,";"),"Last character of style string is not ';': "+a);tn_.asserts.assert(tn_.string.internal.contains(a,":"),"Style string must contain at least one ':', to specify a \"name: value\" pair: "+a);return tn_.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(a)};tn_.html.SafeStyle.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_};
tn_.DEBUG&&(tn_.html.SafeStyle.prototype.toString=function(){return"SafeStyle{"+this.privateDoNotAccessOrElseSafeStyleWrappedValue_+"}"});
tn_.html.SafeStyle.unwrap=function(a){if(a instanceof tn_.html.SafeStyle&&a.constructor===tn_.html.SafeStyle&&a.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===tn_.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return a.privateDoNotAccessOrElseSafeStyleWrappedValue_;tn_.asserts.fail("expected object of type SafeStyle, got '"+a+"' of type "+tn_.typeOf(a));return"type_error:SafeStyle"};tn_.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse=function(a){return(new tn_.html.SafeStyle).initSecurityPrivateDoNotAccessOrElse_(a)};
tn_.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_=function(a){this.privateDoNotAccessOrElseSafeStyleWrappedValue_=a;return this};tn_.html.SafeStyle.EMPTY=tn_.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse("");tn_.html.SafeStyle.INNOCUOUS_STRING="zClosurez";
tn_.html.SafeStyle.create=function(a){var b="",c;for(c in a){if(!/^[-_a-zA-Z0-9]+$/.test(c))throw Error("Name allows only [-_a-zA-Z0-9], got: "+c);var d=a[c];null!=d&&(d=Array.isArray(d)?tn_.array.map(d,tn_.html.SafeStyle.sanitizePropertyValue_).join(" "):tn_.html.SafeStyle.sanitizePropertyValue_(d),b+=c+":"+d+";")}return b?tn_.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b):tn_.html.SafeStyle.EMPTY};
tn_.html.SafeStyle.sanitizePropertyValue_=function(a){if(a instanceof tn_.html.SafeUrl)return a=tn_.html.SafeUrl.unwrap(a),'url("'+a.replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+'")';a=a instanceof tn_.string.Const?tn_.string.Const.unwrap(a):tn_.html.SafeStyle.sanitizePropertyValueString_(String(a));if(/[{;}]/.test(a))throw new tn_.asserts.AssertionError("Value does not allow [{;}], got: %s.",[a]);return a};
tn_.html.SafeStyle.sanitizePropertyValueString_=function(a){var b=a.replace(tn_.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(tn_.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(tn_.html.SafeStyle.URL_RE_,"url");if(tn_.html.SafeStyle.VALUE_RE_.test(b)){if(tn_.html.SafeStyle.COMMENT_RE_.test(a))return tn_.asserts.fail("String value disallows comments, got: "+a),tn_.html.SafeStyle.INNOCUOUS_STRING;if(!tn_.html.SafeStyle.hasBalancedQuotes_(a))return tn_.asserts.fail("String value requires balanced quotes, got: "+
a),tn_.html.SafeStyle.INNOCUOUS_STRING;if(!tn_.html.SafeStyle.hasBalancedSquareBrackets_(a))return tn_.asserts.fail("String value requires balanced square brackets and one identifier per pair of brackets, got: "+a),tn_.html.SafeStyle.INNOCUOUS_STRING}else return tn_.asserts.fail("String value allows only "+tn_.html.SafeStyle.VALUE_ALLOWED_CHARS_+" and simple functions, got: "+a),tn_.html.SafeStyle.INNOCUOUS_STRING;return tn_.html.SafeStyle.sanitizeUrl_(a)};
tn_.html.SafeStyle.hasBalancedQuotes_=function(a){for(var b=!0,c=!0,d=0;d<a.length;d++){var e=a.charAt(d);"'"==e&&c?b=!b:'"'==e&&b&&(c=!c)}return b&&c};tn_.html.SafeStyle.hasBalancedSquareBrackets_=function(a){for(var b=!0,c=/^[-_a-zA-Z0-9]$/,d=0;d<a.length;d++){var e=a.charAt(d);if("]"==e){if(b)return!1;b=!0}else if("["==e){if(!b)return!1;b=!1}else if(!b&&!c.test(e))return!1}return b};tn_.html.SafeStyle.VALUE_ALLOWED_CHARS_="[-,.\"'%_!# a-zA-Z0-9\\[\\]]";
tn_.html.SafeStyle.VALUE_RE_=new RegExp("^"+tn_.html.SafeStyle.VALUE_ALLOWED_CHARS_+"+$");tn_.html.SafeStyle.URL_RE_=/\b(url\([ \t\n]*)('[ -&(-\[\]-~]*'|"[ !#-\[\]-~]*"|[!#-&*-\[\]-~]*)([ \t\n]*\))/g;tn_.html.SafeStyle.ALLOWED_FUNCTIONS_="calc cubic-bezier fit-content hsl hsla linear-gradient matrix minmax repeat rgb rgba (rotate|scale|translate)(X|Y|Z|3d)?".split(" ");
tn_.html.SafeStyle.FUNCTIONS_RE_=new RegExp("\\b("+tn_.html.SafeStyle.ALLOWED_FUNCTIONS_.join("|")+")\\([-+*/0-9a-z.%\\[\\], ]+\\)","g");tn_.html.SafeStyle.COMMENT_RE_=/\/\*/;tn_.html.SafeStyle.sanitizeUrl_=function(a){return a.replace(tn_.html.SafeStyle.URL_RE_,function(b,c,d,e){var f="";d=d.replace(/^(['"])(.*)\1$/,function(g,l,n){f=l;return n});b=tn_.html.SafeUrl.sanitize(d).getTypedStringValue();return c+f+b+f+e})};
tn_.html.SafeStyle.concat=function(a){var b="",c=function(d){Array.isArray(d)?tn_.array.forEach(d,c):b+=tn_.html.SafeStyle.unwrap(d)};tn_.array.forEach(arguments,c);return b?tn_.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b):tn_.html.SafeStyle.EMPTY};tn_.html.SafeStyleSheet=function(){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_="";this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=tn_.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};tn_.html.SafeStyleSheet.prototype.implementsGoogStringTypedString=!0;tn_.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};
tn_.html.SafeStyleSheet.createRule=function(a,b){if(tn_.string.internal.contains(a,"<"))throw Error("Selector does not allow '<', got: "+a);var c=a.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g,"");if(!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=^$|]+$/.test(c))throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=^$|] and strings, got: "+a);if(!tn_.html.SafeStyleSheet.hasBalancedBrackets_(c))throw Error("() and [] in selector must be balanced, got: "+a);b instanceof tn_.html.SafeStyle||(b=tn_.html.SafeStyle.create(b));
a=a+"{"+tn_.html.SafeStyle.unwrap(b).replace(/</g,"\\3C ")+"}";return tn_.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(a)};tn_.html.SafeStyleSheet.hasBalancedBrackets_=function(a){for(var b={"(":")","[":"]"},c=[],d=0;d<a.length;d++){var e=a[d];if(b[e])c.push(b[e]);else if(tn_.object.contains(b,e)&&c.pop()!=e)return!1}return 0==c.length};
tn_.html.SafeStyleSheet.concat=function(a){var b="",c=function(d){Array.isArray(d)?tn_.array.forEach(d,c):b+=tn_.html.SafeStyleSheet.unwrap(d)};tn_.array.forEach(arguments,c);return tn_.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)};
tn_.html.SafeStyleSheet.fromConstant=function(a){a=tn_.string.Const.unwrap(a);if(0===a.length)return tn_.html.SafeStyleSheet.EMPTY;tn_.asserts.assert(!tn_.string.internal.contains(a,"<"),"Forbidden '<' character in style sheet string: "+a);return tn_.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(a)};tn_.html.SafeStyleSheet.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_};
tn_.DEBUG&&(tn_.html.SafeStyleSheet.prototype.toString=function(){return"SafeStyleSheet{"+this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_+"}"});
tn_.html.SafeStyleSheet.unwrap=function(a){if(a instanceof tn_.html.SafeStyleSheet&&a.constructor===tn_.html.SafeStyleSheet&&a.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===tn_.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return a.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_;tn_.asserts.fail("expected object of type SafeStyleSheet, got '"+a+"' of type "+tn_.typeOf(a));return"type_error:SafeStyleSheet"};
tn_.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse=function(a){return(new tn_.html.SafeStyleSheet).initSecurityPrivateDoNotAccessOrElse_(a)};tn_.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_=function(a){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_=a;return this};tn_.html.SafeStyleSheet.EMPTY=tn_.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse("");tn_.labs={};tn_.labs.userAgent={};tn_.labs.userAgent.util={};tn_.labs.userAgent.util.getNativeUserAgentString_=function(){var a=tn_.labs.userAgent.util.getNavigator_();return a&&(a=a.userAgent)?a:""};tn_.labs.userAgent.util.getNavigator_=function(){return tn_.global.navigator};tn_.labs.userAgent.util.userAgent_=tn_.labs.userAgent.util.getNativeUserAgentString_();tn_.labs.userAgent.util.setUserAgent=function(a){tn_.labs.userAgent.util.userAgent_=a||tn_.labs.userAgent.util.getNativeUserAgentString_()};
tn_.labs.userAgent.util.getUserAgent=function(){return tn_.labs.userAgent.util.userAgent_};tn_.labs.userAgent.util.matchUserAgent=function(a){var b=tn_.labs.userAgent.util.getUserAgent();return tn_.string.internal.contains(b,a)};tn_.labs.userAgent.util.matchUserAgentIgnoreCase=function(a){var b=tn_.labs.userAgent.util.getUserAgent();return tn_.string.internal.caseInsensitiveContains(b,a)};
tn_.labs.userAgent.util.extractVersionTuples=function(a){for(var b=/(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g,c=[],d;d=b.exec(a);)c.push([d[1],d[2],d[3]||void 0]);return c};tn_.labs.userAgent.browser={};tn_.labs.userAgent.browser.matchOpera_=function(){return tn_.labs.userAgent.util.matchUserAgent("Opera")};tn_.labs.userAgent.browser.matchIE_=function(){return tn_.labs.userAgent.util.matchUserAgent("Trident")||tn_.labs.userAgent.util.matchUserAgent("MSIE")};tn_.labs.userAgent.browser.matchEdgeHtml_=function(){return tn_.labs.userAgent.util.matchUserAgent("Edge")};tn_.labs.userAgent.browser.matchEdgeChromium_=function(){return tn_.labs.userAgent.util.matchUserAgent("Edg/")};
tn_.labs.userAgent.browser.matchOperaChromium_=function(){return tn_.labs.userAgent.util.matchUserAgent("OPR")};tn_.labs.userAgent.browser.matchFirefox_=function(){return tn_.labs.userAgent.util.matchUserAgent("Firefox")||tn_.labs.userAgent.util.matchUserAgent("FxiOS")};
tn_.labs.userAgent.browser.matchSafari_=function(){return tn_.labs.userAgent.util.matchUserAgent("Safari")&&!(tn_.labs.userAgent.browser.matchChrome_()||tn_.labs.userAgent.browser.matchCoast_()||tn_.labs.userAgent.browser.matchOpera_()||tn_.labs.userAgent.browser.matchEdgeHtml_()||tn_.labs.userAgent.browser.matchEdgeChromium_()||tn_.labs.userAgent.browser.matchOperaChromium_()||tn_.labs.userAgent.browser.matchFirefox_()||tn_.labs.userAgent.browser.isSilk()||tn_.labs.userAgent.util.matchUserAgent("Android"))};
tn_.labs.userAgent.browser.matchCoast_=function(){return tn_.labs.userAgent.util.matchUserAgent("Coast")};tn_.labs.userAgent.browser.matchIosWebview_=function(){return(tn_.labs.userAgent.util.matchUserAgent("iPad")||tn_.labs.userAgent.util.matchUserAgent("iPhone"))&&!tn_.labs.userAgent.browser.matchSafari_()&&!tn_.labs.userAgent.browser.matchChrome_()&&!tn_.labs.userAgent.browser.matchCoast_()&&!tn_.labs.userAgent.browser.matchFirefox_()&&tn_.labs.userAgent.util.matchUserAgent("AppleWebKit")};
tn_.labs.userAgent.browser.matchChrome_=function(){return(tn_.labs.userAgent.util.matchUserAgent("Chrome")||tn_.labs.userAgent.util.matchUserAgent("CriOS"))&&!tn_.labs.userAgent.browser.matchEdgeHtml_()};tn_.labs.userAgent.browser.matchAndroidBrowser_=function(){return tn_.labs.userAgent.util.matchUserAgent("Android")&&!(tn_.labs.userAgent.browser.isChrome()||tn_.labs.userAgent.browser.isFirefox()||tn_.labs.userAgent.browser.isOpera()||tn_.labs.userAgent.browser.isSilk())};
tn_.labs.userAgent.browser.isOpera=tn_.labs.userAgent.browser.matchOpera_;tn_.labs.userAgent.browser.isIE=tn_.labs.userAgent.browser.matchIE_;tn_.labs.userAgent.browser.isEdge=tn_.labs.userAgent.browser.matchEdgeHtml_;tn_.labs.userAgent.browser.isEdgeChromium=tn_.labs.userAgent.browser.matchEdgeChromium_;tn_.labs.userAgent.browser.isOperaChromium=tn_.labs.userAgent.browser.matchOperaChromium_;tn_.labs.userAgent.browser.isFirefox=tn_.labs.userAgent.browser.matchFirefox_;
tn_.labs.userAgent.browser.isSafari=tn_.labs.userAgent.browser.matchSafari_;tn_.labs.userAgent.browser.isCoast=tn_.labs.userAgent.browser.matchCoast_;tn_.labs.userAgent.browser.isIosWebview=tn_.labs.userAgent.browser.matchIosWebview_;tn_.labs.userAgent.browser.isChrome=tn_.labs.userAgent.browser.matchChrome_;tn_.labs.userAgent.browser.isAndroidBrowser=tn_.labs.userAgent.browser.matchAndroidBrowser_;tn_.labs.userAgent.browser.isSilk=function(){return tn_.labs.userAgent.util.matchUserAgent("Silk")};
tn_.labs.userAgent.browser.getVersion=function(){function a(e){e=tn_.array.find(e,d);return c[e]||""}var b=tn_.labs.userAgent.util.getUserAgent();if(tn_.labs.userAgent.browser.isIE())return tn_.labs.userAgent.browser.getIEVersion_(b);b=tn_.labs.userAgent.util.extractVersionTuples(b);var c={};tn_.array.forEach(b,function(e){var f=e[0];e=e[1];c[f]=e});var d=tn_.partial(tn_.object.containsKey,c);return tn_.labs.userAgent.browser.isOpera()?a(["Version","Opera"]):tn_.labs.userAgent.browser.isEdge()?a(["Edge"]):
tn_.labs.userAgent.browser.isEdgeChromium()?a(["Edg"]):tn_.labs.userAgent.browser.isChrome()?a(["Chrome","CriOS","HeadlessChrome"]):(b=b[2])&&b[1]||""};tn_.labs.userAgent.browser.isVersionOrHigher=function(a){return 0<=tn_.string.internal.compareVersions(tn_.labs.userAgent.browser.getVersion(),a)};
tn_.labs.userAgent.browser.getIEVersion_=function(a){var b=/rv: *([\d\.]*)/.exec(a);if(b&&b[1])return b[1];b="";var c=/MSIE +([\d\.]+)/.exec(a);if(c&&c[1])if(a=/Trident\/(\d.\d)/.exec(a),"7.0"==c[1])if(a&&a[1])switch(a[1]){case "4.0":b="8.0";break;case "5.0":b="9.0";break;case "6.0":b="10.0";break;case "7.0":b="11.0"}else b="7.0";else b=c[1];return b};tn_.html.SafeHtml=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="";this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=tn_.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;this.dir_=null};tn_.html.SafeHtml.ENABLE_ERROR_MESSAGES=tn_.DEBUG;tn_.html.SafeHtml.SUPPORT_STYLE_ATTRIBUTE=!0;tn_.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString=!0;tn_.html.SafeHtml.prototype.getDirection=function(){return this.dir_};
tn_.html.SafeHtml.prototype.implementsGoogStringTypedString=!0;tn_.html.SafeHtml.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_.toString()};tn_.DEBUG&&(tn_.html.SafeHtml.prototype.toString=function(){return"SafeHtml{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"});tn_.html.SafeHtml.unwrap=function(a){return tn_.html.SafeHtml.unwrapTrustedHTML(a).toString()};
tn_.html.SafeHtml.unwrapTrustedHTML=function(a){if(a instanceof tn_.html.SafeHtml&&a.constructor===tn_.html.SafeHtml&&a.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===tn_.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;tn_.asserts.fail("expected object of type SafeHtml, got '"+a+"' of type "+tn_.typeOf(a));return"type_error:SafeHtml"};
tn_.html.SafeHtml.htmlEscape=function(a){if(a instanceof tn_.html.SafeHtml)return a;var b="object"==typeof a,c=null;b&&a.implementsGoogI18nBidiDirectionalString&&(c=a.getDirection());a=b&&a.implementsGoogStringTypedString?a.getTypedStringValue():String(a);return tn_.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(tn_.string.internal.htmlEscape(a),c)};
tn_.html.SafeHtml.htmlEscapePreservingNewlines=function(a){if(a instanceof tn_.html.SafeHtml)return a;a=tn_.html.SafeHtml.htmlEscape(a);return tn_.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(tn_.string.internal.newLineToBr(tn_.html.SafeHtml.unwrap(a)),a.getDirection())};
tn_.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces=function(a){if(a instanceof tn_.html.SafeHtml)return a;a=tn_.html.SafeHtml.htmlEscape(a);return tn_.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(tn_.string.internal.whitespaceEscape(tn_.html.SafeHtml.unwrap(a)),a.getDirection())};tn_.html.SafeHtml.from=tn_.html.SafeHtml.htmlEscape;
tn_.html.SafeHtml.comment=function(a){return tn_.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("\x3c!--"+tn_.string.internal.htmlEscape(a)+"--\x3e",null)};tn_.html.SafeHtml.VALID_NAMES_IN_TAG_=/^[a-zA-Z0-9-]+$/;tn_.html.SafeHtml.URL_ATTRIBUTES_={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0};tn_.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0};
tn_.html.SafeHtml.create=function(a,b,c){tn_.html.SafeHtml.verifyTagName(String(a));return tn_.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(a),b,c)};
tn_.html.SafeHtml.verifyTagName=function(a){if(!tn_.html.SafeHtml.VALID_NAMES_IN_TAG_.test(a))throw Error(tn_.html.SafeHtml.ENABLE_ERROR_MESSAGES?"Invalid tag name <"+a+">.":"");if(a.toUpperCase()in tn_.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_)throw Error(tn_.html.SafeHtml.ENABLE_ERROR_MESSAGES?"Tag name <"+a+"> is not allowed for SafeHtml.":"");};
tn_.html.SafeHtml.createIframe=function(a,b,c,d){a&&tn_.html.TrustedResourceUrl.unwrap(a);var e={};e.src=a||null;e.srcdoc=b&&tn_.html.SafeHtml.unwrap(b);a={sandbox:""};c=tn_.html.SafeHtml.combineAttributes(e,a,c);return tn_.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",c,d)};
tn_.html.SafeHtml.createSandboxIframe=function(a,b,c,d){if(!tn_.html.SafeHtml.canUseSandboxIframe())throw Error(tn_.html.SafeHtml.ENABLE_ERROR_MESSAGES?"The browser does not support sandboxed iframes.":"");var e={};e.src=a?tn_.html.SafeUrl.unwrap(tn_.html.SafeUrl.sanitize(a)):null;e.srcdoc=b||null;e.sandbox="";a=tn_.html.SafeHtml.combineAttributes(e,{},c);return tn_.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",a,d)};
tn_.html.SafeHtml.canUseSandboxIframe=function(){return tn_.global.HTMLIFrameElement&&"sandbox"in tn_.global.HTMLIFrameElement.prototype};tn_.html.SafeHtml.createScriptSrc=function(a,b){tn_.html.TrustedResourceUrl.unwrap(a);a={src:a};var c={};b=tn_.html.SafeHtml.combineAttributes(a,c,b);return tn_.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",b)};
tn_.html.SafeHtml.createScript=function(a,b){for(var c in b){var d=c.toLowerCase();if("language"==d||"src"==d||"text"==d||"type"==d)throw Error(tn_.html.SafeHtml.ENABLE_ERROR_MESSAGES?'Cannot set "'+d+'" attribute':"");}c="";a=tn_.array.concat(a);for(d=0;d<a.length;d++)c+=tn_.html.SafeScript.unwrap(a[d]);a=tn_.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c,tn_.i18n.bidi.Dir.NEUTRAL);return tn_.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",b,a)};
tn_.html.SafeHtml.createStyle=function(a,b){var c={type:"text/css"},d={};b=tn_.html.SafeHtml.combineAttributes(c,d,b);c="";a=tn_.array.concat(a);for(d=0;d<a.length;d++)c+=tn_.html.SafeStyleSheet.unwrap(a[d]);a=tn_.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c,tn_.i18n.bidi.Dir.NEUTRAL);return tn_.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style",b,a)};
tn_.html.SafeHtml.createMetaRefresh=function(a,b){a=tn_.html.SafeUrl.unwrap(tn_.html.SafeUrl.sanitize(a));(tn_.labs.userAgent.browser.isIE()||tn_.labs.userAgent.browser.isEdge())&&tn_.string.internal.contains(a,";")&&(a="'"+a.replace(/'/g,"%27")+"'");b={"http-equiv":"refresh",content:(b||0)+"; url="+a};return tn_.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta",b)};
tn_.html.SafeHtml.getAttrNameAndValue_=function(a,b,c){if(c instanceof tn_.string.Const)c=tn_.string.Const.unwrap(c);else if("style"==b.toLowerCase())if(tn_.html.SafeHtml.SUPPORT_STYLE_ATTRIBUTE)c=tn_.html.SafeHtml.getStyleValue_(c);else throw Error(tn_.html.SafeHtml.ENABLE_ERROR_MESSAGES?'Attribute "style" not supported.':"");else{if(/^on/i.test(b))throw Error(tn_.html.SafeHtml.ENABLE_ERROR_MESSAGES?'Attribute "'+b+'" requires goog.string.Const value, "'+c+'" given.':"");if(b.toLowerCase()in tn_.html.SafeHtml.URL_ATTRIBUTES_)if(c instanceof
tn_.html.TrustedResourceUrl)c=tn_.html.TrustedResourceUrl.unwrap(c);else if(c instanceof tn_.html.SafeUrl)c=tn_.html.SafeUrl.unwrap(c);else if("string"===typeof c)c=tn_.html.SafeUrl.sanitize(c).getTypedStringValue();else throw Error(tn_.html.SafeHtml.ENABLE_ERROR_MESSAGES?'Attribute "'+b+'" on tag "'+a+'" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+c+'" given.':"");}c.implementsGoogStringTypedString&&(c=c.getTypedStringValue());tn_.asserts.assert("string"===typeof c||"number"===
typeof c,"String or number value expected, got "+typeof c+" with value: "+c);return b+'="'+tn_.string.internal.htmlEscape(String(c))+'"'};tn_.html.SafeHtml.getStyleValue_=function(a){if(!tn_.isObject(a))throw Error(tn_.html.SafeHtml.ENABLE_ERROR_MESSAGES?'The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof a+" given: "+a:"");a instanceof tn_.html.SafeStyle||(a=tn_.html.SafeStyle.create(a));return tn_.html.SafeStyle.unwrap(a)};
tn_.html.SafeHtml.createWithDir=function(a,b,c,d){b=tn_.html.SafeHtml.create(b,c,d);b.dir_=a;return b};
tn_.html.SafeHtml.join=function(a,b){a=tn_.html.SafeHtml.htmlEscape(a);var c=a.getDirection(),d=[],e=function(f){Array.isArray(f)?tn_.array.forEach(f,e):(f=tn_.html.SafeHtml.htmlEscape(f),d.push(tn_.html.SafeHtml.unwrap(f)),f=f.getDirection(),c==tn_.i18n.bidi.Dir.NEUTRAL?c=f:f!=tn_.i18n.bidi.Dir.NEUTRAL&&c!=f&&(c=null))};tn_.array.forEach(b,e);return tn_.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(d.join(tn_.html.SafeHtml.unwrap(a)),c)};
tn_.html.SafeHtml.concat=function(a){return tn_.html.SafeHtml.join(tn_.html.SafeHtml.EMPTY,Array.prototype.slice.call(arguments))};tn_.html.SafeHtml.concatWithDir=function(a,b){var c=tn_.html.SafeHtml.concat(tn_.array.slice(arguments,1));c.dir_=a;return c};tn_.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};tn_.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse=function(a,b){return(new tn_.html.SafeHtml).initSecurityPrivateDoNotAccessOrElse_(a,b)};
tn_.html.SafeHtml.createSafeHtmlFromTrustedHtmlSecurityPrivateDoNotAccessOrElse=function(a){return(new tn_.html.SafeHtml).initSecurityFromTrustedHtmlPrivateDoNotAccessOrElse_(a,tn_.i18n.bidi.Dir.NEUTRAL)};tn_.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_=function(a,b){var c=tn_.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse();this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=c?c.createHTML(a):a;this.dir_=b;return this};
tn_.html.SafeHtml.prototype.initSecurityFromTrustedHtmlPrivateDoNotAccessOrElse_=function(a,b){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=a;this.dir_=b;return this};
tn_.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse=function(a,b,c){var d=null,e="<"+a;e+=tn_.html.SafeHtml.stringifyAttributes(a,b);null==c?c=[]:Array.isArray(c)||(c=[c]);tn_.dom.tags.isVoidTag(a.toLowerCase())?(tn_.asserts.assert(!c.length,"Void tag <"+a+"> does not allow content."),e+=">"):(d=tn_.html.SafeHtml.concat(c),e+=">"+tn_.html.SafeHtml.unwrap(d)+"</"+a+">",d=d.getDirection());(a=b&&b.dir)&&(d=/^(ltr|rtl|auto)$/i.test(a)?tn_.i18n.bidi.Dir.NEUTRAL:null);return tn_.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(e,
d)};tn_.html.SafeHtml.stringifyAttributes=function(a,b){var c="";if(b)for(var d in b){if(!tn_.html.SafeHtml.VALID_NAMES_IN_TAG_.test(d))throw Error(tn_.html.SafeHtml.ENABLE_ERROR_MESSAGES?'Invalid attribute name "'+d+'".':"");var e=b[d];null!=e&&(c+=" "+tn_.html.SafeHtml.getAttrNameAndValue_(a,d,e))}return c};
tn_.html.SafeHtml.combineAttributes=function(a,b,c){var d={},e;for(e in a)tn_.asserts.assert(e.toLowerCase()==e,"Must be lower case"),d[e]=a[e];for(e in b)tn_.asserts.assert(e.toLowerCase()==e,"Must be lower case"),d[e]=b[e];if(c)for(e in c){var f=e.toLowerCase();if(f in a)throw Error(tn_.html.SafeHtml.ENABLE_ERROR_MESSAGES?'Cannot override "'+f+'" attribute, got "'+e+'" with value "'+c[e]+'"':"");f in b&&delete d[f];d[e]=c[e]}return d};
tn_.html.SafeHtml.DOCTYPE_HTML=tn_.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>",tn_.i18n.bidi.Dir.NEUTRAL);tn_.html.SafeHtml.EMPTY=tn_.html.SafeHtml.createSafeHtmlFromTrustedHtmlSecurityPrivateDoNotAccessOrElse(tn_.global.trustedTypes?tn_.global.trustedTypes.emptyHTML:"");tn_.html.SafeHtml.BR=tn_.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>",tn_.i18n.bidi.Dir.NEUTRAL);tn_.html.uncheckedconversions={};tn_.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(a,b,c){tn_.asserts.assertString(tn_.string.Const.unwrap(a),"must provide justification");tn_.asserts.assert(!tn_.string.internal.isEmptyOrWhitespace(tn_.string.Const.unwrap(a)),"must provide non-empty justification");return tn_.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(b,c||null)};
tn_.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract=function(a,b){tn_.asserts.assertString(tn_.string.Const.unwrap(a),"must provide justification");tn_.asserts.assert(!tn_.string.internal.isEmptyOrWhitespace(tn_.string.Const.unwrap(a)),"must provide non-empty justification");return tn_.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(b)};
tn_.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract=function(a,b){tn_.asserts.assertString(tn_.string.Const.unwrap(a),"must provide justification");tn_.asserts.assert(!tn_.string.internal.isEmptyOrWhitespace(tn_.string.Const.unwrap(a)),"must provide non-empty justification");return tn_.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b)};
tn_.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract=function(a,b){tn_.asserts.assertString(tn_.string.Const.unwrap(a),"must provide justification");tn_.asserts.assert(!tn_.string.internal.isEmptyOrWhitespace(tn_.string.Const.unwrap(a)),"must provide non-empty justification");return tn_.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)};
tn_.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract=function(a,b){tn_.asserts.assertString(tn_.string.Const.unwrap(a),"must provide justification");tn_.asserts.assert(!tn_.string.internal.isEmptyOrWhitespace(tn_.string.Const.unwrap(a)),"must provide non-empty justification");return tn_.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)};
tn_.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract=function(a,b){tn_.asserts.assertString(tn_.string.Const.unwrap(a),"must provide justification");tn_.asserts.assert(!tn_.string.internal.isEmptyOrWhitespace(tn_.string.Const.unwrap(a)),"must provide non-empty justification");return tn_.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b)};tn_.dom.safe={};tn_.dom.safe.InsertAdjacentHtmlPosition={AFTERBEGIN:"afterbegin",AFTEREND:"afterend",BEFOREBEGIN:"beforebegin",BEFOREEND:"beforeend"};tn_.dom.safe.insertAdjacentHtml=function(a,b,c){a.insertAdjacentHTML(b,tn_.html.SafeHtml.unwrapTrustedHTML(c))};tn_.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0};
tn_.dom.safe.isInnerHtmlCleanupRecursive_=tn_.functions.cacheReturnValue(function(){if(tn_.DEBUG&&"undefined"===typeof document)return!1;var a=document.createElement("div"),b=document.createElement("div");b.appendChild(document.createElement("div"));a.appendChild(b);if(tn_.DEBUG&&!a.firstChild)return!1;b=a.firstChild.firstChild;a.innerHTML=tn_.html.SafeHtml.unwrapTrustedHTML(tn_.html.SafeHtml.EMPTY);return!b.parentElement});
tn_.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse=function(a,b){if(tn_.dom.safe.isInnerHtmlCleanupRecursive_())for(;a.lastChild;)a.removeChild(a.lastChild);a.innerHTML=tn_.html.SafeHtml.unwrapTrustedHTML(b)};tn_.dom.safe.setInnerHtml=function(a,b){if(tn_.asserts.ENABLE_ASSERTS){var c=a.tagName.toUpperCase();if(tn_.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[c])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+a.tagName+".");}tn_.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(a,b)};
tn_.dom.safe.setOuterHtml=function(a,b){a.outerHTML=tn_.html.SafeHtml.unwrapTrustedHTML(b)};tn_.dom.safe.setFormElementAction=function(a,b){b=b instanceof tn_.html.SafeUrl?b:tn_.html.SafeUrl.sanitizeAssertUnchanged(b);tn_.dom.asserts.assertIsHTMLFormElement(a).action=tn_.html.SafeUrl.unwrap(b)};tn_.dom.safe.setButtonFormAction=function(a,b){b=b instanceof tn_.html.SafeUrl?b:tn_.html.SafeUrl.sanitizeAssertUnchanged(b);tn_.dom.asserts.assertIsHTMLButtonElement(a).formAction=tn_.html.SafeUrl.unwrap(b)};
tn_.dom.safe.setInputFormAction=function(a,b){b=b instanceof tn_.html.SafeUrl?b:tn_.html.SafeUrl.sanitizeAssertUnchanged(b);tn_.dom.asserts.assertIsHTMLInputElement(a).formAction=tn_.html.SafeUrl.unwrap(b)};tn_.dom.safe.setStyle=function(a,b){a.style.cssText=tn_.html.SafeStyle.unwrap(b)};tn_.dom.safe.documentWrite=function(a,b){a.write(tn_.html.SafeHtml.unwrapTrustedHTML(b))};
tn_.dom.safe.setAnchorHref=function(a,b){tn_.dom.asserts.assertIsHTMLAnchorElement(a);b=b instanceof tn_.html.SafeUrl?b:tn_.html.SafeUrl.sanitizeAssertUnchanged(b);a.href=tn_.html.SafeUrl.unwrap(b)};tn_.dom.safe.setImageSrc=function(a,b){tn_.dom.asserts.assertIsHTMLImageElement(a);if(!(b instanceof tn_.html.SafeUrl)){var c=/^data:image\//i.test(b);b=tn_.html.SafeUrl.sanitizeAssertUnchanged(b,c)}a.src=tn_.html.SafeUrl.unwrap(b)};
tn_.dom.safe.setAudioSrc=function(a,b){tn_.dom.asserts.assertIsHTMLAudioElement(a);if(!(b instanceof tn_.html.SafeUrl)){var c=/^data:audio\//i.test(b);b=tn_.html.SafeUrl.sanitizeAssertUnchanged(b,c)}a.src=tn_.html.SafeUrl.unwrap(b)};tn_.dom.safe.setVideoSrc=function(a,b){tn_.dom.asserts.assertIsHTMLVideoElement(a);if(!(b instanceof tn_.html.SafeUrl)){var c=/^data:video\//i.test(b);b=tn_.html.SafeUrl.sanitizeAssertUnchanged(b,c)}a.src=tn_.html.SafeUrl.unwrap(b)};
tn_.dom.safe.setEmbedSrc=function(a,b){tn_.dom.asserts.assertIsHTMLEmbedElement(a);a.src=tn_.html.TrustedResourceUrl.unwrapTrustedScriptURL(b)};tn_.dom.safe.setFrameSrc=function(a,b){tn_.dom.asserts.assertIsHTMLFrameElement(a);a.src=tn_.html.TrustedResourceUrl.unwrap(b)};tn_.dom.safe.setIframeSrc=function(a,b){tn_.dom.asserts.assertIsHTMLIFrameElement(a);a.src=tn_.html.TrustedResourceUrl.unwrap(b)};tn_.dom.safe.setIframeSrcdoc=function(a,b){tn_.dom.asserts.assertIsHTMLIFrameElement(a);a.srcdoc=tn_.html.SafeHtml.unwrapTrustedHTML(b)};
tn_.dom.safe.setLinkHrefAndRel=function(a,b,c){tn_.dom.asserts.assertIsHTMLLinkElement(a);a.rel=c;tn_.string.internal.caseInsensitiveContains(c,"stylesheet")?(tn_.asserts.assert(b instanceof tn_.html.TrustedResourceUrl,'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'),a.href=tn_.html.TrustedResourceUrl.unwrap(b)):a.href=b instanceof tn_.html.TrustedResourceUrl?tn_.html.TrustedResourceUrl.unwrap(b):b instanceof tn_.html.SafeUrl?tn_.html.SafeUrl.unwrap(b):tn_.html.SafeUrl.unwrap(tn_.html.SafeUrl.sanitizeAssertUnchanged(b))};
tn_.dom.safe.setObjectData=function(a,b){tn_.dom.asserts.assertIsHTMLObjectElement(a);a.data=tn_.html.TrustedResourceUrl.unwrapTrustedScriptURL(b)};tn_.dom.safe.setScriptSrc=function(a,b){tn_.dom.asserts.assertIsHTMLScriptElement(a);a.src=tn_.html.TrustedResourceUrl.unwrapTrustedScriptURL(b);tn_.dom.safe.setNonceForScriptElement_(a)};tn_.dom.safe.setScriptContent=function(a,b){tn_.dom.asserts.assertIsHTMLScriptElement(a);a.text=tn_.html.SafeScript.unwrapTrustedScript(b);tn_.dom.safe.setNonceForScriptElement_(a)};
tn_.dom.safe.setNonceForScriptElement_=function(a){var b=a.ownerDocument&&a.ownerDocument.defaultView;(b=tn_.getScriptNonce(b))&&a.setAttribute("nonce",b)};tn_.dom.safe.setLocationHref=function(a,b){tn_.dom.asserts.assertIsLocation(a);b=b instanceof tn_.html.SafeUrl?b:tn_.html.SafeUrl.sanitizeAssertUnchanged(b);a.href=tn_.html.SafeUrl.unwrap(b)};
tn_.dom.safe.assignLocation=function(a,b){tn_.dom.asserts.assertIsLocation(a);b=b instanceof tn_.html.SafeUrl?b:tn_.html.SafeUrl.sanitizeAssertUnchanged(b);a.assign(tn_.html.SafeUrl.unwrap(b))};tn_.dom.safe.replaceLocation=function(a,b){b=b instanceof tn_.html.SafeUrl?b:tn_.html.SafeUrl.sanitizeAssertUnchanged(b);a.replace(tn_.html.SafeUrl.unwrap(b))};
tn_.dom.safe.openInWindow=function(a,b,c,d,e){a=a instanceof tn_.html.SafeUrl?a:tn_.html.SafeUrl.sanitizeAssertUnchanged(a);b=b||tn_.global;c=c instanceof tn_.string.Const?tn_.string.Const.unwrap(c):c||"";return b.open(tn_.html.SafeUrl.unwrap(a),c,d,e)};tn_.dom.safe.parseFromStringHtml=function(a,b){return tn_.dom.safe.parseFromString(a,b,"text/html")};tn_.dom.safe.parseFromString=function(a,b,c){return a.parseFromString(tn_.html.SafeHtml.unwrapTrustedHTML(b),c)};
tn_.dom.safe.createImageFromBlob=function(a){if(!/^image\/.*/g.test(a.type))throw Error("goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");var b=tn_.global.URL.createObjectURL(a);a=new tn_.global.Image;a.onload=function(){tn_.global.URL.revokeObjectURL(b)};tn_.dom.safe.setImageSrc(a,tn_.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(tn_.string.Const.from("Image blob URL."),b));return a};var tn_ga;a:{for(var tn_ha=[" ","\u0120",-1,"!","\u0120",-1,"\u0120","\u0120",0,"\u0121","\u0120",-1,"\u0121","\u0120|\u0121",0,"\u0122","\u0120|\u0121",-1,"\u0120","[\u0120]",0,"\u0121","[\u0120]",-1,"\u0121","[\u0120\u0121]",0,"\u0122","[\u0120\u0121]",-1,"\u0121","[\u0120-\u0121]",0,"\u0122","[\u0120-\u0121]",-1],tn_ia=0;tn_ia<tn_ha.length;tn_ia+=3)if(tn_ha[tn_ia].search(new RegExp(tn_ha[tn_ia+1]))!=tn_ha[tn_ia+2]){tn_ga=!1;break a}tn_ga=!0}
var tn_d=tn_ga,tn_ja=tn_d?"A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u00ff\u0100-\u0131\u0134-\u013e\u0141-\u0148\u014a-\u017e\u0180-\u01c3\u01cd-\u01f0\u01f4-\u01f5\u01fa-\u0217\u0250-\u02a8\u02bb-\u02c1\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03ce\u03d0-\u03d6\u03da\u03dc\u03de\u03e0\u03e2-\u03f3\u0401-\u040c\u040e-\u044f\u0451-\u045c\u045e-\u0481\u0490-\u04c4\u04c7-\u04c8\u04cb-\u04cc\u04d0-\u04eb\u04ee-\u04f5\u04f8-\u04f9\u0531-\u0556\u0559\u0561-\u0586\u05d0-\u05ea\u05f0-\u05f2\u0621-\u063a\u0641-\u064a\u0671-\u06b7\u06ba-\u06be\u06c0-\u06ce\u06d0-\u06d3\u06d5\u06e5-\u06e6\u0905-\u0939\u093d\u0958-\u0961\u0985-\u098c\u098f-\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09dc-\u09dd\u09df-\u09e1\u09f0-\u09f1\u0a05-\u0a0a\u0a0f-\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32-\u0a33\u0a35-\u0a36\u0a38-\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8b\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2-\u0ab3\u0ab5-\u0ab9\u0abd\u0ae0\u0b05-\u0b0c\u0b0f-\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32-\u0b33\u0b36-\u0b39\u0b3d\u0b5c-\u0b5d\u0b5f-\u0b61\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99-\u0b9a\u0b9c\u0b9e-\u0b9f\u0ba3-\u0ba4\u0ba8-\u0baa\u0bae-\u0bb5\u0bb7-\u0bb9\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c60-\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cde\u0ce0-\u0ce1\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d28\u0d2a-\u0d39\u0d60-\u0d61\u0e01-\u0e2e\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0e82\u0e84\u0e87-\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa-\u0eab\u0ead-\u0eae\u0eb0\u0eb2-\u0eb3\u0ebd\u0ec0-\u0ec4\u0f40-\u0f47\u0f49-\u0f69\u10a0-\u10c5\u10d0-\u10f6\u1100\u1102-\u1103\u1105-\u1107\u1109\u110b-\u110c\u110e-\u1112\u113c\u113e\u1140\u114c\u114e\u1150\u1154-\u1155\u1159\u115f-\u1161\u1163\u1165\u1167\u1169\u116d-\u116e\u1172-\u1173\u1175\u119e\u11a8\u11ab\u11ae-\u11af\u11b7-\u11b8\u11ba\u11bc-\u11c2\u11eb\u11f0\u11f9\u1e00-\u1e9b\u1ea0-\u1ef9\u1f00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2126\u212a-\u212b\u212e\u2180-\u2182\u3041-\u3094\u30a1-\u30fa\u3105-\u312c\uac00-\ud7a3":"A-Za-z",
tn_ka=tn_d?"\u4e00-\u9fa5\u3007\u3021-\u3029":"",tn_la=tn_d?"\u0300-\u0345\u0360-\u0361\u0483-\u0486\u0591-\u05a1\u05a3-\u05b9\u05bb-\u05bd\u05bf\u05c1-\u05c2\u05c4\u064b-\u0652\u0670\u06d6-\u06dc\u06dd-\u06df\u06e0-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0901-\u0903\u093c\u093e-\u094c\u094d\u0951-\u0954\u0962-\u0963\u0981-\u0983\u09bc\u09be\u09bf\u09c0-\u09c4\u09c7-\u09c8\u09cb-\u09cd\u09d7\u09e2-\u09e3\u0a02\u0a3c\u0a3e\u0a3f\u0a40-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a70-\u0a71\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0b01-\u0b03\u0b3c\u0b3e-\u0b43\u0b47-\u0b48\u0b4b-\u0b4d\u0b56-\u0b57\u0b82-\u0b83\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c82-\u0c83\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d43\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86-\u0f8b\u0f90-\u0f95\u0f97\u0f99-\u0fad\u0fb1-\u0fb7\u0fb9\u20d0-\u20dc\u20e1\u302a-\u302f\u3099\u309a":
"",tn_ma=tn_d?"0-9\u0660-\u0669\u06f0-\u06f9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be7-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29":"0-9",tn_na=tn_d?"\u00b7\u02d0\u02d1\u0387\u0640\u0e46\u0ec6\u3005\u3031-\u3035\u309d-\u309e\u30fc-\u30fe":"",tn_oa=tn_ja+tn_ka,tn_pa=tn_oa+tn_ma+"\\._:"+tn_la+tn_na+"-",tn_qa="["+tn_oa+"_:]["+tn_pa+"]*",tn_ra="&"+tn_qa+";",tn_sa=tn_ra+"|&#[0-9]+;|&#x[0-9a-fA-F]+;",tn_ta='"(([^<&"]|'+tn_sa+")*)\"|'(([^<&']|"+
tn_sa+")*)'",tn_ua="("+tn_qa+")([ \t\r\n]+)?=([ \t\r\n]+)?("+tn_ta+")",tn_va=tn_d?":A-Z_a-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd":":A-Z_a-z",tn_wa=tn_va+(tn_d?"\\.0-9\u00b7\u0300-\u036f\u203f-\u2040-":"\\.0-9-"),tn_xa="["+tn_va+"]["+tn_wa+"]*",tn_ya="&"+tn_xa+";",tn_za=tn_ya+"|&#[0-9]+;|&#x[0-9a-fA-F]+;",tn_Aa='"(([^<&"]|'+tn_za+")*)\"|'(([^<&']|"+tn_za+")*)'",tn_Ba="("+tn_xa+")([ \t\r\n]+)?=([ \t\r\n]+)?("+
tn_Aa+")",tn_Ca=tn_oa+tn_ma+"\\._"+tn_la+tn_na+"-",tn_Da="["+tn_oa+"_]["+tn_Ca+"]*";function tn_e(a){a||tn_f("Assertion failed")}function tn_g(a,b){var c=a.indexOf(b);if(-1==c)return[a];var d=[];for(d.push(a.substr(0,c));-1!=c;){var e=a.indexOf(b,c+1);-1!=e?d.push(a.substr(c+1,e-c-1)):d.push(a.substr(c+1));c=e}return d}
function tn_Ea(a,b){if(3==b.nodeType)return a.createTextNode(b.nodeValue);if(4==b.nodeType)return a.createCDATASection(b.nodeValue);if(1==b.nodeType){for(var c=a.createElement(b.nodeName),d=0;d<b.attributes.length;++d){var e=b.attributes[d],f=e.nodeName;e=e.nodeValue;c.setAttribute(f,e)}for(b=b.firstChild;b;b=b.nextSibling)d=tn_Ea(a,b),c.appendChild(d);return c}return a.createComment(b.nodeName)}function Set(){this.keys=[]}tn_a=Set.prototype;tn_a.size=function(){return this.keys.length};
tn_a.add=function(a,b){b=b||1;this.contains(a)||(this[":"+a]=b,this.keys.push(a))};tn_a.set=function(a,b){b=b||1;this.contains(a)?this[":"+a]=b:(this[":"+a]=b,this.keys.push(a))};tn_a.get=function(a){if(this.contains(a))return this[":"+a];var b;return b};tn_a.remove=function(a){this.contains(a)&&(delete this[":"+a],tn_Fa(this.keys,a,!0))};tn_a.contains=function(a){return"undefined"!=typeof this[":"+a]};tn_a.has=Set.prototype.contains;
tn_a.items=function(){for(var a=[],b=0;b<this.keys.length;++b){var c=this.keys[b];c=this[":"+c];a.push(c)}return a};tn_a.map=function(a){for(var b=0;b<this.keys.length;++b){var c=this.keys[b];a.call(this,c,this[":"+c])}};tn_a.clear=function(){for(var a=0;a<this.keys.length;++a)delete this[":"+this.keys[a]];this.keys.length=0};function tn_Ga(a,b){for(var c=0;c<a.length;++c)b.call(this,a[c],c)}function tn_Ha(a,b){for(var c=[],d=0;d<a.length;++d)c.push(b(a[d]));return c}
function tn_Ia(a){for(var b=0;b<a.length/2;++b){var c=a[b],d=a.length-b-1;a[b]=a[d];a[d]=c}}function tn_Fa(a,b,c){for(var d=0,e=0;e<a.length;++e)if(a[e]===b||c&&a[e]==b)a.splice(e--,1),d++;return d}function tn_Ja(a,b){for(var c=0;c<b.length;++c)a.push(b[c])}function tn_h(a){if(!a)return"";var b="";if(3==a.nodeType||4==a.nodeType||2==a.nodeType)b+=a.nodeValue;else if(1==a.nodeType||9==a.nodeType||11==a.nodeType)for(var c=0;c<a.childNodes.length;++c)b+=tn_h(a.childNodes[c]);return b}
function tn_Ka(a,b){var c=[];tn_La(a,c,b);return c.join("")}
function tn_La(a,b,c){if(3==a.nodeType)b.push(tn_Ma(a.nodeValue));else if(4==a.nodeType)c?b.push(a.nodeValue):b.push("<![CDATA["+a.nodeValue+"]]\x3e");else if(8==a.nodeType)b.push("\x3c!--"+a.nodeValue+"--\x3e");else if(1==a.nodeType){b.push("<"+tn_Na(a));for(var d=0;d<a.attributes.length;++d){var e=a.attributes[d];e&&e.nodeName&&e.nodeValue&&b.push(" "+tn_Na(e)+'="'+tn_Ma(e.nodeValue).replace(/"/g,"&quot;")+'"')}if(0==a.childNodes.length)b.push("/>");else{b.push(">");for(d=0;d<a.childNodes.length;++d)tn_La(a.childNodes[d],
b,c);b.push("</"+tn_Na(a)+">")}}else if(9==a.nodeType||11==a.nodeType)for(d=0;d<a.childNodes.length;++d)tn_La(a.childNodes[d],b,c)}function tn_Na(a){return a.prefix&&0!=a.nodeName.indexOf(a.prefix+":")?a.prefix+":"+a.nodeName:a.nodeName}function tn_Ma(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function tn_f(a){if("undefined"!=typeof Error)throw Error(a||"Assertion Failed");throw a;};function tn_Oa(a){a=tn_g(a,"&");for(var b=a[0],c=1;c<a.length;++c){var d=a[c].indexOf(";");if(-1==d)b+=a[c];else{var e=a[c].substring(0,d);d=a[c].substring(d+1);switch(e){case "lt":e="<";break;case "gt":e=">";break;case "amp":e="&";break;case "quot":e='"';break;case "apos":e="'";break;case "nbsp":e=String.fromCharCode(160);break;default:var f=window.document.createElement("span");f.innerHTML="&"+e+"; ";e=f.childNodes[0].nodeValue.charAt(0)}b+=e+d}}return b}
var tn_Pa=new RegExp("^("+tn_qa+")"),tn_Qa=new RegExp(tn_ua,"g"),tn_Ra=new RegExp("^("+tn_xa+")"),tn_Sa=new RegExp(tn_Ba,"g");
function tn_Ta(a){var b=/\/$/;if(a.match(/^<\?xml/))if(5==a.search(/[ \t\r\n]+version([ \t\r\n]+)?=([ \t\r\n]+)?("1\.0"|'1\.0')/)){var c=tn_Pa;var d=tn_Qa}else 5==a.search(/[ \t\r\n]+version([ \t\r\n]+)?=([ \t\r\n]+)?("1\.1"|'1\.1')/)?(c=tn_Ra,d=tn_Sa):alert("VersionInfo is missing, or unknown version number.");else c=tn_Pa,d=tn_Qa;var e=new tn_Ua,f=e,g=[],l=f;g.push(l);var n="";a=tn_g(a,"<");for(var k=1;k<a.length;++k){var h=tn_g(a[k],">"),m=h[0];h=tn_Oa(h[1]||"");if(n)if(m=a[k].indexOf(n),-1!=m){var p=
a[k].substring(0,m);l.nodeValue+="<"+p;g.pop();l=g[g.length-1];h=a[k].substring(m+n.length);n=""}else l.nodeValue+="<"+a[k],h=null;else if(0==m.indexOf("![CDATA["))if(p=8,m=a[k].indexOf("]]\x3e"),-1!=m){p=a[k].substring(p,m);var q=e.createCDATASection(p);l.appendChild(q)}else p=a[k].substring(p),h=null,q=e.createCDATASection(p),l.appendChild(q),l=q,g.push(q),n="]]\x3e";else if(0==m.indexOf("!--"))p=3,m=a[k].indexOf("--\x3e"),-1!=m?(p=a[k].substring(p,m),q=e.createComment(p),l.appendChild(q)):(p=a[k].substring(p),
h=null,q=e.createComment(p),l.appendChild(q),l=q,g.push(q),n="--\x3e");else if("/"==m.charAt(0))g.pop(),l=g[g.length-1];else if("?"!=m.charAt(0)&&"!"!=m.charAt(0)){p=m.match(b);q=c.exec(m)[1];q=e.createElement(q);for(var t;t=d.exec(m);){var r=tn_Oa(t[5]||t[7]||"");q.setAttribute(t[1],r)}l.appendChild(q);p||(l=q,g.push(q))}h&&l!=f&&(h=e.createTextNode(h),l.appendChild(h))}return f}
function tn_Va(a,b,c){if(b){var d=b.call(null,a);if("boolean"==typeof d&&!d)return!1}for(var e=a.firstChild;e;e=e.nextSibling)if(1==e.nodeType&&(d=tn_Va.call(this,e,b,c),"boolean"==typeof d&&!d))return!1;if(c&&(d=c.call(null,a),"boolean"==typeof d&&!d))return!1}function tn_i(a,b,c,d){this.attributes=[];this.childNodes=[];tn_i.init.call(this,a,b,c,d)}
tn_i.init=function(a,b,c,d){this.nodeType=a-0;this.nodeName=""+b;this.nodeValue=""+c;this.ownerDocument=d;this.parentNode=this.previousSibling=this.nextSibling=this.lastChild=this.firstChild=null};tn_i.unused_=[];
tn_i.recycle=function(a){if(a)if(a.constructor==tn_Ua)tn_i.recycle(a.documentElement);else if(a.constructor==this){tn_i.unused_.push(a);for(var b=0;b<a.attributes.length;++b)tn_i.recycle(a.attributes[b]);for(b=0;b<a.childNodes.length;++b)tn_i.recycle(a.childNodes[b]);a.attributes.length=0;a.childNodes.length=0;tn_i.init.call(a,0,"","",null)}};tn_i.create=function(a,b,c,d){if(0<tn_i.unused_.length){var e=tn_i.unused_.pop();tn_i.init.call(e,a,b,c,d);return e}return new tn_i(a,b,c,d)};tn_a=tn_i.prototype;
tn_a.appendChild=function(a){0==this.childNodes.length&&(this.firstChild=a);a.previousSibling=this.lastChild;a.nextSibling=null;this.lastChild&&(this.lastChild.nextSibling=a);a.parentNode=this;this.lastChild=a;this.childNodes.push(a)};
tn_a.replaceChild=function(a,b){if(b!=a)for(var c=0;c<this.childNodes.length;++c)if(this.childNodes[c]==b){this.childNodes[c]=a;c=b.parentNode;b.parentNode=null;a.parentNode=c;c=b.previousSibling;b.previousSibling=null;a.previousSibling=c;a.previousSibling&&(a.previousSibling.nextSibling=a);c=b.nextSibling;b.nextSibling=null;a.nextSibling=c;a.nextSibling&&(a.nextSibling.previousSibling=a);this.firstChild==b&&(this.firstChild=a);this.lastChild==b&&(this.lastChild=a);break}};
tn_a.insertBefore=function(a,b){if(b!=a&&b.parentNode==this){a.parentNode&&a.parentNode.removeChild(a);for(var c=[],d=0;d<this.childNodes.length;++d){var e=this.childNodes[d];e==b&&(c.push(a),a.parentNode=this,a.previousSibling=b.previousSibling,b.previousSibling=a,a.previousSibling&&(a.previousSibling.nextSibling=a),a.nextSibling=b,this.firstChild==b&&(this.firstChild=a));c.push(e)}this.childNodes=c}};
tn_a.removeChild=function(a){for(var b=[],c=0;c<this.childNodes.length;++c){var d=this.childNodes[c];d!=a?b.push(d):(d.previousSibling&&(d.previousSibling.nextSibling=d.nextSibling),d.nextSibling&&(d.nextSibling.previousSibling=d.previousSibling),this.firstChild==d&&(this.firstChild=d.nextSibling),this.lastChild==d&&(this.lastChild=d.previousSibling))}this.childNodes=b};tn_a.hasAttributes=function(){return 0<this.attributes.length};
tn_a.setAttribute=function(a,b){for(var c=0;c<this.attributes.length;++c)if(this.attributes[c].nodeName==a){this.attributes[c].nodeValue=""+b;return}this.attributes.push(tn_i.create(2,a,b,this))};tn_a.getAttribute=function(a){for(var b=0;b<this.attributes.length;++b)if(this.attributes[b].nodeName==a)return this.attributes[b].nodeValue;return null};
tn_a.removeAttribute=function(a){for(var b=[],c=0;c<this.attributes.length;++c)this.attributes[c].nodeName!=a&&b.push(this.attributes[c]);this.attributes=b};tn_a.getElementsByTagName=function(a){var b=[];tn_Va(this,function(c){c.nodeName==a&&b.push(c)},null);return b};tn_a.getElementById=function(a){var b=null;tn_Va(this,function(c){if(c.getAttribute("id")==a)return b=c,!1},null);return b};function tn_Ua(){tn_i.call(this,9,"#document",null,null);this.documentElement=null}
tn_Ua.prototype=new tn_i(9,"#document");tn_a=tn_Ua.prototype;tn_a.clear=function(){tn_i.recycle(this.documentElement);this.documentElement=null};tn_a.appendChild=function(a){tn_i.prototype.appendChild.call(this,a);this.documentElement=this.childNodes[0]};tn_a.createElement=function(a){return tn_i.create(1,a,null,this)};tn_a.createDocumentFragment=function(){return tn_i.create(11,"#document-fragment",null,this)};tn_a.createTextNode=function(a){return tn_i.create(3,"#text",a,this)};
tn_a.createAttribute=function(a){return tn_i.create(2,a,null,this)};tn_a.createComment=function(a){return tn_i.create(8,"#comment",a,this)};tn_a.createCDATASection=function(a){return tn_i.create(4,"#cdata-section",a,this)};function tn_Wa(a,b){tn_Xa(new tn_j(a,b),b)}
function tn_Xa(a,b){var c=b.getAttribute("select");if(c){b.removeAttribute("select");var d=b;c=c.split(/;/);var e=tn_Ya(c[0],a).nodeSetValue();if(0<e.length){b=[];for(var f=1;f<e.length;++f){var g=tn_Ea(d.ownerDocument,d);b.push(g);d.parentNode.insertBefore(g,d)}b.push(d);d=[];for(f=1;f<c.length;++f){var l=c[f],n=0;"#"==l.charAt(n)?(g="number",n++):g="text";"-"==l.charAt(n)?(l="descending",n++):l="ascending";n=tn_Za(c[f].substr(n));d.push({expr:n,type:g,order:l})}a=a.clone(e[0],0,e);tn__a(a,d);for(f=
0;f<a.nodelist.length;++f)1==a.nodelist[f].nodeType&&tn_Xa(a.clone(a.nodelist[f],f),b[f])}else d.parentNode.removeChild(d)}else{if(c=b.getAttribute("display"))if(tn_Ya(c,a).booleanValue())b.removeAttribute("display");else{b.parentNode.removeChild(b);return}if(d=b.getAttribute("values"))for(b.removeAttribute("values"),c=a,e=b,d=d.split(/;/),f=0;f<d.length;++f)n=d[f].indexOf(":"),0>n||(g=d[f].substr(0,n),n=tn_Ya(d[f].substr(n+1),c),"$"==g.charAt(0)?c.setVariable(g.substr(1),n):g&&(n=n.stringValue(),
e.setAttribute(g,n)));if(e=b.getAttribute("transclude"))c=b.ownerDocument,c=(e=c.getElementById(e))?tn_Ea(c,e):null,c?(b.parentNode.replaceChild(c,b),tn_Xa(a,c)):b.parentNode.removeChild(b),tn_i.recycle(b);else if(c=b.getAttribute("content")){for(b.removeAttribute("content");b.firstChild;)b.removeChild(b.firstChild);a=tn_Ya(c,a);if("node-set"==a.type)for(c=0;c<a.value.length;++c)if(e=a.value[c],1==e.nodeType)for(e=e.firstChild;e;e=e.nextSibling)d=tn_Ea(b.ownerDocument,e),b.appendChild(d);else 2==
e.nodeType&&(e=b.ownerDocument.createTextNode(e.nodeValue),b.appendChild(e));else a=a.stringValue(),e=b.ownerDocument.createTextNode(a),b.appendChild(e)}else{c=[];for(e=0;e<b.childNodes.length;++e)1==b.childNodes[e].nodeType&&c.push(b.childNodes[e]);for(e=0;e<c.length;++e)tn_Xa(a,c[e])}}}function tn_Ya(a,b){a=tn_Za(a);return b=a.evaluate(b)};function tn_Za(a){tn_0a();var b=tn_1a[a];if(b)return b;if(a.match(/^(\$|@)?\w+$/i))return b=tn_2a(a),tn_1a[a]=b;if(a.match(/^\w+(\/\w+)*$/i)){b=tn_g(a,"/");for(var c=new tn_k,d=0;d<b.length;++d){var e=new tn_3a(b[d]);e=new tn_l("child",e);c.appendStep(e)}b=c;return tn_1a[a]=b}b=a;c=[];d=null;for(var f=!1,g=0,l=0,n=0;!f;){g++;a=a.replace(/^\s*/,"");e=d;for(var k=d=null,h="",m=0;m<tn_4a.length;++m){var p=tn_4a[m].re.exec(a);l++;if(p&&0<p.length&&p[0].length>h.length){k=tn_4a[m];h=p[0];break}}!k||k!=
tn_5a&&k!=tn_6a&&k!=tn_7a&&k!=tn_8a||e&&e.tag!=tn_9a&&e.tag!=tn_m&&e.tag!=tn_n&&e.tag!=tn_$a&&e.tag!=tn_ab||(k=tn_bb);k?(a=a.substr(h.length),d={tag:k,match:h,prec:k.prec?k.prec:0,expr:new tn_cb(h)}):f=!0;for(;tn_db(c,d);)n++}if(1!=c.length){a="";for(d=0;d<c.length;++d)a&&(a+="\n"),a+=c[d].tag.label;tn_f("XPath parse error "+b+":\n"+a)}p=c[0].expr;return tn_1a[b]=p}var tn_1a={};
function tn_db(a,b){var c=null;if(0<a.length){var d=a[a.length-1];if(d=tn_eb[d.tag.key])for(var e=0;e<d.length;++e){var f=d[e],g=tn_fb(a,f[1]);if(g.length){c={tag:f[0],rule:f,match:g};c.prec=tn_gb(c);break}}}if(c&&(!b||c.prec>b.prec||b.tag.left&&c.prec>=b.prec)){for(e=0;e<c.match.matchlength;++e)a.pop();b=tn_Ha(c.match,function(l){return l.expr});c.expr=c.rule[3].apply(null,b);a.push(c);a=!0}else b&&a.push(b),a=!1;return a}
function tn_fb(a,b){var c=a.length,d=b.length,e=[],f=e.matchlength=0;--d;for(--c;0<=d&&0<=c;--d,c-=f){f=0;var g=[];if(b[d]==tn_hb)for(--d,e.push(g);0<=c-f&&a[c-f].tag==b[d];)g.push(a[c-f]),f+=1,e.matchlength+=1;else if(b[d]==tn_ib)for(--d,e.push(g);0<=c-f&&2>f&&a[c-f].tag==b[d];)g.push(a[c-f]),f+=1,e.matchlength+=1;else if(b[d]==tn_jb)if(--d,e.push(g),a[c].tag==b[d])for(;0<=c-f&&a[c-f].tag==b[d];)g.push(a[c-f]),f+=1,e.matchlength+=1;else return[];else if(a[c].tag==b[d])e.push(a[c]),f+=1,e.matchlength+=
1;else return[];tn_Ia(g);g.expr=tn_Ha(g,function(l){return l.expr})}tn_Ia(e);return-1==d?e:[]}function tn_gb(a){var b=0;if(a.rule)if(3<=a.rule.length&&0<=a.rule[2])b=a.rule[2];else for(var c=0;c<a.rule[1].length;++c){var d=a.rule[1][c].prec||2;b=Math.max(b,d)}else if(a.tag)b=a.tag.prec||2;else if(a.length)for(c=0;c<a.length;++c)d=tn_gb(a[c]),b=Math.max(b,d);return b}
function tn_j(a,b,c,d,e){this.node=a;this.stylesheet=b||null;this.position=c||0;this.nodelist=d||[a];this.variables={};this.parent=e||null;this.root=e?e.root:9==this.node.nodeType?a:a.ownerDocument}tn_j.prototype.clone=function(a,b,c){return new tn_j(a||this.node,this.stylesheet,"undefined"!=typeof b?b:this.position,c||this.nodelist,this)};tn_j.prototype.setVariable=function(a,b){this.variables[a]=b};
tn_j.prototype.getVariable=function(a){return"undefined"!=typeof this.variables[a]?this.variables[a]:this.parent?this.parent.getVariable(a):null};tn_j.prototype.setNode=function(a){this.node=this.nodelist[a];this.position=a};function tn_o(a){this.value=a;this.type="string"}tn_o.prototype.stringValue=function(){return this.value};tn_o.prototype.booleanValue=function(){return 0<this.value.length};tn_o.prototype.numberValue=function(){return this.value-0};tn_o.prototype.nodeSetValue=function(){tn_f(this)};
function tn_p(a){this.value=a;this.type="boolean"}tn_p.prototype.stringValue=function(){return""+this.value};tn_p.prototype.booleanValue=function(){return this.value};tn_p.prototype.numberValue=function(){return this.value?1:0};tn_p.prototype.nodeSetValue=function(){tn_f(this)};function tn_q(a){this.value=a;this.type="number"}tn_q.prototype.stringValue=function(){return""+this.value};tn_q.prototype.booleanValue=function(){return!!this.value};
tn_q.prototype.numberValue=function(){return this.value-0};tn_q.prototype.nodeSetValue=function(){tn_f(this)};function tn_r(a){this.value=a;this.type="node-set"}tn_r.prototype.stringValue=function(){return 0==this.value.length?"":tn_h(this.value[0])};tn_r.prototype.booleanValue=function(){return 0<this.value.length};tn_r.prototype.numberValue=function(){return this.stringValue()-0};tn_r.prototype.nodeSetValue=function(){return this.value};function tn_cb(a){this.value=a}tn_cb.prototype.evaluate=function(){return new tn_o(this.value)};
function tn_k(){this.absolute=!1;this.rootExpr=null;this.steps=[]}tn_k.prototype.appendStep=function(a){this.steps.push(a)};tn_k.prototype.prependStep=function(a){this.steps.unshift(a)};tn_k.prototype.evaluate=function(a){var b=this.rootExpr?this.rootExpr.evaluate(a).nodeSetValue():this.absolute?[a.root]:[a.node];for(var c=[],d=0;d<b.length;++d){var e=b[d];tn_kb(c,this.steps,0,e,a)}return new tn_r(c)};
function tn_kb(a,b,c,d,e){var f=b[c];d=e.clone(d);f=f.evaluate(d).nodeSetValue();for(d=0;d<f.length;++d)c==b.length-1?a.push(f[d]):tn_kb(a,b,c+1,f[d],e)}function tn_l(a,b,c){this.axis=a;this.nodetest=b;this.predicate=c||[]}tn_l.prototype.appendPredicate=function(a){this.predicate.push(a)};
tn_l.prototype.evaluate=function(a){var b=a.node,c=[];if(this.axis==tn_s.ANCESTOR_OR_SELF)for(c.push(b),b=b.parentNode;b;b=b.parentNode)c.push(b);else if(this.axis==tn_s.ANCESTOR)for(b=b.parentNode;b;b=b.parentNode)c.push(b);else if(this.axis==tn_s.ATTRIBUTE)tn_Ja(c,b.attributes);else if(this.axis==tn_s.CHILD)tn_Ja(c,b.childNodes);else if(this.axis==tn_s.DESCENDANT_OR_SELF)c.push(b),tn_lb(c,b);else if(this.axis==tn_s.DESCENDANT)tn_lb(c,b);else if(this.axis==tn_s.FOLLOWING)for(;b;b=b.parentNode)for(var d=
b.nextSibling;d;d=d.nextSibling)c.push(d),tn_lb(c,d);else if(this.axis==tn_s.FOLLOWING_SIBLING)for(b=b.nextSibling;b;b=b.nextSibling)c.push(b);else if(this.axis==tn_s.NAMESPACE)tn_f("not implemented: axis namespace");else if(this.axis==tn_s.PARENT)b.parentNode&&c.push(b.parentNode);else if(this.axis==tn_s.PRECEDING)for(;b;b=b.parentNode)for(d=b.previousSibling;d;d=d.previousSibling)c.push(d),tn_mb(c,d);else if(this.axis==tn_s.PRECEDING_SIBLING)for(b=b.previousSibling;b;b=b.previousSibling)c.push(b);
else this.axis==tn_s.SELF?c.push(b):tn_f("ERROR -- NO SUCH AXIS: "+this.axis);d=c;c=[];for(var e=0;e<d.length;++e)b=d[e],this.nodetest.evaluate(a.clone(b,e,d)).booleanValue()&&c.push(b);for(e=0;e<this.predicate.length;++e){d=c;c=[];for(var f=0;f<d.length;++f)b=d[f],this.predicate[e].evaluate(a.clone(b,f,d)).booleanValue()&&c.push(b)}return new tn_r(c)};function tn_nb(){this.value=new tn_p(!0)}tn_nb.prototype.evaluate=function(){return this.value};function tn_ob(){}
tn_ob.prototype.evaluate=function(a){return new tn_p(1==a.node.nodeType||2==a.node.nodeType)};function tn_pb(){}tn_pb.prototype.evaluate=function(a){return new tn_p(3==a.node.nodeType)};function tn_qb(){}tn_qb.prototype.evaluate=function(a){return new tn_p(8==a.node.nodeType)};function tn_rb(a){this.target=a}tn_rb.prototype.evaluate=function(a){return new tn_p(7==a.node.nodeType&&(!this.target||a.node.nodeName==this.target))};function tn_sb(a){this.regex=new RegExp("^"+a+":")}
tn_sb.prototype.evaluate=function(a){a=a.node;return new tn_p(this.regex.test(a.nodeName))};function tn_3a(a){this.name=a}tn_3a.prototype.evaluate=function(a){a=a.node;return new tn_p(a.nodeName==this.name)};function tn_tb(a){this.expr=a}tn_tb.prototype.evaluate=function(a){var b=this.expr.evaluate(a);return"number"==b.type?new tn_p(a.position==b.numberValue()-1):new tn_p(b.booleanValue())};function tn_ub(a){this.name=a;this.args=[]}tn_ub.prototype.appendArg=function(a){this.args.push(a)};
tn_ub.prototype.evaluate=function(a){var b=""+this.name.value;return(b=this.xpathfunctions[b])?b.call(this,a):new tn_p(!1)};
tn_ub.prototype.xpathfunctions={last:function(a){tn_e(0==this.args.length);return new tn_q(a.nodelist.length)},position:function(a){tn_e(0==this.args.length);return new tn_q(a.position+1)},count:function(a){tn_e(1==this.args.length);a=this.args[0].evaluate(a);return new tn_q(a.nodeSetValue().length)},id:function(a){tn_e(1==this.args.length);var b=this.args[0].evaluate(a),c=[];if("node-set"==b.type){var d=[];var e=b.nodeSetValue();for(b=0;b<e.length;++b)for(var f=tn_h(e[b]).split(/\s+/),g=0;g<f.length;++g)d.push(f[g])}else d=
b.stringValue().split(/\s+/);a=a.node.ownerDocument;for(b=0;b<d.length;++b)(e=a.getElementById(d[b]))&&c.push(e);return new tn_r(c)},"local-name":function(){tn_f("not implmented yet: XPath function local-name()")},"namespace-uri":function(){tn_f("not implmented yet: XPath function namespace-uri()")},name:function(a){tn_e(1==this.args.length||0==this.args.length);a=0==this.args.length?[a.node]:this.args[0].evaluate(a).nodeSetValue();return 0==a.length?new tn_o(""):new tn_o(a[0].nodeName)},string:function(a){tn_e(1==
this.args.length||0==this.args.length);return 0==this.args.length?new tn_o((new tn_r([a.node])).stringValue()):new tn_o(this.args[0].evaluate(a).stringValue())},concat:function(a){for(var b="",c=0;c<this.args.length;++c)b+=this.args[c].evaluate(a).stringValue();return new tn_o(b)},document:function(a){var b=this.args[0].evaluate(a).stringValue();if(""===b&&a.stylesheet)return new tn_r([a.stylesheet]);tn_f("Can't resolve uri in document(\""+b+'")')},"starts-with":function(a){tn_e(2==this.args.length);
var b=this.args[0].evaluate(a).stringValue();a=this.args[1].evaluate(a).stringValue();return new tn_p(0==b.indexOf(a))},contains:function(a){tn_e(2==this.args.length);var b=this.args[0].evaluate(a).stringValue();a=this.args[1].evaluate(a).stringValue();return new tn_p(-1!=b.indexOf(a))},"substring-before":function(a){tn_e(2==this.args.length);var b=this.args[0].evaluate(a).stringValue();a=this.args[1].evaluate(a).stringValue();a=b.indexOf(a);b=-1==a?"":b.substr(0,a);return new tn_o(b)},"substring-after":function(a){tn_e(2==
this.args.length);var b=this.args[0].evaluate(a).stringValue();a=this.args[1].evaluate(a).stringValue();var c=b.indexOf(a);b=-1==c?"":b.substr(c+a.length);return new tn_o(b)},substring:function(a){tn_e(2==this.args.length||3==this.args.length);var b=this.args[0].evaluate(a).stringValue(),c=this.args[1].evaluate(a).numberValue();if(2==this.args.length)c=Math.max(0,Math.round(c)-1),b=b.substr(c);else{a=this.args[2].evaluate(a).numberValue();var d=Math.round(c)-1;c=Math.max(0,d);a=Math.round(a)-Math.max(0,
-d);b=b.substr(c,a)}return new tn_o(b)},"string-length":function(a){a=0<this.args.length?this.args[0].evaluate(a).stringValue():(new tn_r([a.node])).stringValue();return new tn_q(a.length)},"normalize-space":function(a){a=0<this.args.length?this.args[0].evaluate(a).stringValue():(new tn_r([a.node])).stringValue();a=a.replace(/^\s*/,"").replace(/\s*$/,"").replace(/\s+/g," ");return new tn_o(a)},translate:function(a){tn_e(3==this.args.length);var b=this.args[0].evaluate(a).stringValue(),c=this.args[1].evaluate(a).stringValue();
a=this.args[2].evaluate(a).stringValue();for(var d=0;d<c.length;++d)b=b.replace(new RegExp(c.charAt(d),"g"),a.charAt(d));return new tn_o(b)},"boolean":function(a){tn_e(1==this.args.length);return new tn_p(this.args[0].evaluate(a).booleanValue())},not:function(a){tn_e(1==this.args.length);a=!this.args[0].evaluate(a).booleanValue();return new tn_p(a)},"true":function(){tn_e(0==this.args.length);return new tn_p(!0)},"false":function(){tn_e(0==this.args.length);return new tn_p(!1)},lang:function(a){tn_e(1==
this.args.length);var b=this.args[0].evaluate(a).stringValue(),c;for(a=a.node;a&&a!=a.parentNode&&!(c=a.getAttribute("xml:lang"));)a=a.parentNode;return c?(b=new RegExp("^"+b+"$","i"),new tn_p(b.test(c)||b.test(c.replace(/_.*$/,"")))):new tn_p(!1)},number:function(a){tn_e(1==this.args.length||0==this.args.length);return 1==this.args.length?new tn_q(this.args[0].evaluate(a).numberValue()):new tn_q((new tn_r([a.node])).numberValue())},sum:function(a){tn_e(1==this.args.length);a=this.args[0].evaluate(a).nodeSetValue();
for(var b=0,c=0;c<a.length;++c)b+=tn_h(a[c])-0;return new tn_q(b)},floor:function(a){tn_e(1==this.args.length);a=this.args[0].evaluate(a).numberValue();return new tn_q(Math.floor(a))},ceiling:function(a){tn_e(1==this.args.length);a=this.args[0].evaluate(a).numberValue();return new tn_q(Math.ceil(a))},round:function(a){tn_e(1==this.args.length);a=this.args[0].evaluate(a).numberValue();return new tn_q(Math.round(a))},"ext-join":function(a){tn_e(2==this.args.length);var b=this.args[0].evaluate(a).nodeSetValue();
a=this.args[1].evaluate(a).stringValue();for(var c="",d=0;d<b.length;++d)c&&(c+=a),c+=tn_h(b[d]);return new tn_o(c)},"ext-if":function(a){tn_e(3==this.args.length);return this.args[0].evaluate(a).booleanValue()?this.args[1].evaluate(a):this.args[2].evaluate(a)},"ext-cardinal":function(a){tn_e(1<=this.args.length);for(var b=this.args[0].evaluate(a).numberValue(),c=[],d=0;d<b;++d)c.push(a.node);return new tn_r(c)}};function tn_vb(a,b){this.expr1=a;this.expr2=b}
tn_vb.prototype.evaluate=function(a){var b=this.expr1.evaluate(a).nodeSetValue();a=this.expr2.evaluate(a).nodeSetValue();for(var c=b.length,d=0;d<a.length;++d){for(var e=a[d],f=!1,g=0;g<c;++g)b[g]==e&&(f=!0,g=c);f||b.push(e)}return new tn_r(b)};function tn_wb(a,b){this.filter=a;this.rel=b}tn_wb.prototype.evaluate=function(a){for(var b=this.filter.evaluate(a).nodeSetValue(),c=[],d=0;d<b.length;++d)for(var e=this.rel.evaluate(a.clone(b[d],d,b)).nodeSetValue(),f=0;f<e.length;++f)c.push(e[f]);return new tn_r(c)};
function tn_xb(a,b){this.expr=a;this.predicate=b}tn_xb.prototype.evaluate=function(a){for(var b=this.expr.evaluate(a).nodeSetValue(),c=0;c<this.predicate.length;++c){var d=b;b=[];for(var e=0;e<d.length;++e){var f=d[e];this.predicate[c].evaluate(a.clone(f,e,d)).booleanValue()&&b.push(f)}}return new tn_r(b)};function tn_yb(a){this.expr=a}tn_yb.prototype.evaluate=function(a){return new tn_q(-this.expr.evaluate(a).numberValue())};function tn_zb(a,b,c){this.expr1=a;this.expr2=c;this.op=b}
tn_zb.prototype.evaluate=function(a){switch(this.op.value){case "or":var b=new tn_p(this.expr1.evaluate(a).booleanValue()||this.expr2.evaluate(a).booleanValue());break;case "and":b=new tn_p(this.expr1.evaluate(a).booleanValue()&&this.expr2.evaluate(a).booleanValue());break;case "+":b=new tn_q(this.expr1.evaluate(a).numberValue()+this.expr2.evaluate(a).numberValue());break;case "-":b=new tn_q(this.expr1.evaluate(a).numberValue()-this.expr2.evaluate(a).numberValue());break;case "*":b=new tn_q(this.expr1.evaluate(a).numberValue()*
this.expr2.evaluate(a).numberValue());break;case "mod":b=new tn_q(this.expr1.evaluate(a).numberValue()%this.expr2.evaluate(a).numberValue());break;case "div":b=new tn_q(this.expr1.evaluate(a).numberValue()/this.expr2.evaluate(a).numberValue());break;case "=":b=this.compare(a,function(c,d){return c==d});break;case "!=":b=this.compare(a,function(c,d){return c!=d});break;case "<":b=this.compare(a,function(c,d){return c<d});break;case "<=":b=this.compare(a,function(c,d){return c<=d});break;case ">":b=
this.compare(a,function(c,d){return c>d});break;case ">=":b=this.compare(a,function(c,d){return c>=d});break;default:tn_f("BinaryExpr.evaluate: "+this.op.value)}return b};
tn_zb.prototype.compare=function(a,b){var c=this.expr1.evaluate(a);a=this.expr2.evaluate(a);if("node-set"==c.type&&"node-set"==a.type){c=c.nodeSetValue();var d=a.nodeSetValue();a=!1;for(var e=0;e<c.length;++e)for(var f=0;f<d.length;++f)b(tn_h(c[e]),tn_h(d[f]))&&(a=!0,f=d.length,e=c.length)}else if("node-set"==c.type||"node-set"==a.type)if("number"==c.type)for(c=c.numberValue(),d=a.nodeSetValue(),a=!1,e=0;e<d.length;++e){if(f=tn_h(d[e])-0,b(c,f)){a=!0;break}}else if("number"==a.type)for(d=c.nodeSetValue(),
c=a.numberValue(),a=!1,e=0;e<d.length;++e){if(f=tn_h(d[e])-0,b(f,c)){a=!0;break}}else if("string"==c.type)for(c=c.stringValue(),d=a.nodeSetValue(),a=!1,e=0;e<d.length;++e){if(f=tn_h(d[e]),b(c,f)){a=!0;break}}else if("string"==a.type)for(d=c.nodeSetValue(),c=a.stringValue(),a=!1,e=0;e<d.length;++e){if(f=tn_h(d[e]),b(f,c)){a=!0;break}}else a=b(c.booleanValue(),a.booleanValue());else a="boolean"==c.type||"boolean"==a.type?b(c.booleanValue(),a.booleanValue()):"number"==c.type||"number"==a.type?b(c.numberValue(),
a.numberValue()):b(c.stringValue(),a.stringValue());return new tn_p(!!a)};function tn_Ab(a){this.value=a}tn_Ab.prototype.evaluate=function(){return new tn_o(this.value)};function tn_Bb(a){this.value=a}tn_Bb.prototype.evaluate=function(){return new tn_q(this.value)};function tn_Cb(a){this.name=a}tn_Cb.prototype.evaluate=function(a){return a.getVariable(this.name)};function tn_t(a){return a}function tn_Db(a,b){b.absolute=!0;return b}
function tn_Eb(a,b){b.absolute=!0;b.prependStep(tn_u(a.value));return b}function tn_Fb(){var a=new tn_k;a.appendStep(tn_u("."));a.absolute=!0;return a}function tn_Gb(a){var b=new tn_k;b.absolute=!0;b.appendStep(tn_u(a.value));return b}function tn_Hb(a){var b=new tn_k;b.appendStep(a);return b}function tn_Ib(a,b,c){a.appendStep(c);return a}function tn_Jb(a,b){a.appendStep(tn_u(b.value));return a}function tn_Kb(a,b,c){b=new tn_k;b.rootExpr=a;b.appendStep(c);return b}
function tn_Lb(a){return tn_u(a.value)}function tn_Mb(a){return tn_u(a.value)}function tn_Nb(a,b,c){return new tn_l(a.value,c)}function tn_Ob(a,b){return new tn_l("attribute",b)}function tn_Pb(a){return new tn_l("child",a)}function tn_Qb(a,b){a.appendPredicate(b);return a}function tn_u(a){switch(a){case "//":return new tn_l("descendant-or-self",new tn_nb);case ".":return new tn_l("self",new tn_nb);case "..":return new tn_l("parent",new tn_nb)}}function tn_Rb(){return new tn_ob}
function tn_Sb(a){return new tn_sb(a.value)}function tn_Tb(a){return new tn_3a(a.value)}function tn_Ub(a){a=a.value.replace(/\s*\($/,"");switch(a){case "node":return new tn_nb;case "text":return new tn_pb;case "comment":return new tn_qb;case "processing-instruction":return new tn_rb("")}}function tn_Vb(a,b){a=a.replace(/\s*\($/,"");"processing-instruction"!=a&&tn_f(a);return new tn_rb(b.value)}function tn_Wb(a,b){return new tn_tb(b)}function tn_Xb(a,b){return b}
function tn_Yb(a){return new tn_ub(a)}function tn_Zb(a,b,c,d){a=new tn_ub(a);a.appendArg(c);for(c=0;c<d.length;++c)a.appendArg(d[c]);return a}function tn__b(a,b){return b}function tn_0b(a,b,c){return new tn_vb(a,c)}function tn_1b(a,b,c){return new tn_wb(a,c)}function tn_2b(a,b,c){c.prependStep(tn_u(b.value));return new tn_wb(a,c)}function tn_3b(a,b){return 0<b.length?new tn_xb(a,b):a}function tn_4b(a,b){return new tn_yb(b)}function tn_v(a,b,c){return new tn_zb(a,b,c)}
function tn_5b(a){a=a.value.substring(1,a.value.length-1);return new tn_Ab(a)}function tn_6b(a){return new tn_Bb(a.value)}function tn_7b(a,b){return new tn_Cb(b.value)}function tn_2a(a){if("$"==a.charAt(0))return new tn_Cb(a.substr(1));if("@"==a.charAt(0)){a=new tn_3a(a.substr(1));a=new tn_l("attribute",a);var b=new tn_k;b.appendStep(a);return b}if(a.match(/^[0-9]+$/))return new tn_Bb(a);a=new tn_3a(a);a=new tn_l("child",a);b=new tn_k;b.appendStep(a);return b}
var tn_s={ANCESTOR_OR_SELF:"ancestor-or-self",ANCESTOR:"ancestor",ATTRIBUTE:"attribute",CHILD:"child",DESCENDANT_OR_SELF:"descendant-or-self",DESCENDANT:"descendant",FOLLOWING_SIBLING:"following-sibling",FOLLOWING:"following",NAMESPACE:"namespace",PARENT:"parent",PRECEDING_SIBLING:"preceding-sibling",PRECEDING:"preceding",SELF:"self"},tn_8b=[tn_s.ANCESTOR_OR_SELF,tn_s.ANCESTOR,tn_s.ATTRIBUTE,tn_s.CHILD,tn_s.DESCENDANT_OR_SELF,tn_s.DESCENDANT,tn_s.FOLLOWING_SIBLING,tn_s.FOLLOWING,tn_s.NAMESPACE,tn_s.PARENT,
tn_s.PRECEDING_SIBLING,tn_s.PRECEDING,tn_s.SELF].join("|"),tn_9b={label:"|",prec:17,re:/^\|/},tn_m={label:"//",prec:19,re:/^\/\//},tn_n={label:"/",prec:30,re:/^\//},tn_$a={label:"::",prec:20,re:/^::/},tn_$b={label:":",prec:1E3,re:/^:/},tn_ac={label:"[axis]",re:new RegExp("^("+tn_8b+")")},tn_bc={label:"(",prec:34,re:/^\(/},tn_cc={label:")",re:/^\)/},tn_dc={label:"..",prec:34,re:/^\.\./},tn_ec={label:".",prec:34,re:/^\./},tn_9a={label:"@",prec:34,re:/^@/},tn_fc={label:",",re:/^,/},tn_8a={label:"or",
prec:10,re:/^or\b/},tn_7a={label:"and",prec:11,re:/^and\b/},tn_gc={label:"=",prec:12,re:/^=/},tn_hc={label:"!=",prec:12,re:/^!=/},tn_ic={label:">=",prec:13,re:/^>=/},tn_jc={label:">",prec:13,re:/^>/},tn_kc={label:"<=",prec:13,re:/^<=/},tn_lc={label:"<",prec:13,re:/^</},tn_mc={label:"+",prec:14,re:/^\+/,left:!0},tn_nc={label:"-",prec:14,re:/^\-/,left:!0},tn_5a={label:"div",prec:15,re:/^div\b/,left:!0},tn_6a={label:"mod",prec:15,re:/^mod\b/,left:!0},tn_oc={label:"[",prec:32,re:/^\[/},tn_pc={label:"]",
re:/^\]/},tn_ab={label:"$",re:/^\$/},tn_qc={label:"[ncname]",re:new RegExp("^"+tn_Da)},tn_rc={label:"*",prec:15,re:/^\*/,left:!0},tn_sc={label:"[litq]",prec:20,re:/^'[^\']*'/},tn_tc={label:"[litqq]",prec:20,re:/^"[^\"]*"/},tn_uc={label:"[number]",prec:35,re:/^\d+(\.\d*)?/},tn_bb={label:"[qname]",re:new RegExp("^("+tn_Da+":)?"+tn_Da)},tn_vc={label:"[nodetest-start]",re:/^(processing-instruction|comment|text|node)\(/},tn_4a=[tn_m,tn_n,tn_dc,tn_ec,tn_$a,tn_$b,tn_ac,tn_vc,tn_bc,tn_cc,tn_oc,tn_pc,tn_9a,
tn_fc,tn_8a,tn_7a,tn_hc,tn_gc,tn_ic,tn_jc,tn_kc,tn_lc,tn_mc,tn_nc,tn_rc,tn_9b,tn_6a,tn_5a,tn_sc,tn_tc,tn_uc,tn_bb,tn_qc,tn_ab],tn_wc={label:"LocationPath"},tn_w={label:"RelativeLocationPath"},tn_xc={label:"AbsoluteLocationPath"},tn_x={label:"Step"},tn_y={label:"NodeTest"},tn_yc={label:"Predicate"},tn_zc={label:"Literal"},tn_z={label:"Expr"},tn_A={label:"PrimaryExpr"},tn_Ac={label:"Variablereference"},tn_Bc={label:"Number"},tn_Cc={label:"FunctionCall"},tn_Dc={label:"ArgumentRemainder"},tn_B={label:"PathExpr"},
tn_Ec={label:"UnionExpr"},tn_Fc={label:"FilterExpr"},tn_Gc={label:"Digits"},tn_Hc=[tn_wc,tn_w,tn_xc,tn_x,tn_y,tn_yc,tn_zc,tn_z,tn_A,tn_Ac,tn_Bc,tn_Cc,tn_Dc,tn_B,tn_Ec,tn_Fc,tn_Gc],tn_ib={label:"?"},tn_hb={label:"*"},tn_jb={label:"+"},tn_Ic=[[tn_wc,[tn_w],18,tn_t],[tn_wc,[tn_xc],18,tn_t],[tn_xc,[tn_n,tn_w],18,tn_Db],[tn_xc,[tn_m,tn_w],18,tn_Eb],[tn_xc,[tn_n],0,tn_Fb],[tn_xc,[tn_m],0,tn_Gb],[tn_w,[tn_x],31,tn_Hb],[tn_w,[tn_w,tn_n,tn_x],31,tn_Ib],[tn_w,[tn_w,tn_m,tn_x],31,tn_Jb],[tn_w,[tn_A,tn_n,tn_x],
31,tn_Kb],[tn_x,[tn_ec],33,tn_Lb],[tn_x,[tn_dc],33,tn_Mb],[tn_x,[tn_ac,tn_$a,tn_y],33,tn_Nb],[tn_x,[tn_9a,tn_y],33,tn_Ob],[tn_x,[tn_y],33,tn_Pb],[tn_x,[tn_x,tn_yc],33,tn_Qb],[tn_y,[tn_rc],33,tn_Rb],[tn_y,[tn_qc,tn_$b,tn_rc],33,tn_Sb],[tn_y,[tn_bb],33,tn_Tb],[tn_y,[tn_vc,tn_cc],33,tn_Ub],[tn_y,[tn_vc,tn_zc,tn_cc],33,tn_Vb],[tn_yc,[tn_oc,tn_z,tn_pc],33,tn_Wb],[tn_A,[tn_Ac],33,tn_t],[tn_A,[tn_bc,tn_z,tn_cc],33,tn_Xb],[tn_A,[tn_zc],30,tn_t],[tn_A,[tn_Bc],30,tn_t],[tn_A,[tn_Cc],30,tn_t],[tn_Cc,[tn_bb,
tn_bc,tn_cc],-1,tn_Yb],[tn_Cc,[tn_bb,tn_bc,tn_z,tn_Dc,tn_hb,tn_cc],-1,tn_Zb],[tn_Dc,[tn_fc,tn_z],-1,tn__b],[tn_Ec,[tn_B],20,tn_t],[tn_Ec,[tn_Ec,tn_9b,tn_B],20,tn_0b],[tn_B,[tn_wc],20,tn_t],[tn_B,[tn_Fc],19,tn_t],[tn_B,[tn_Fc,tn_n,tn_w],20,tn_1b],[tn_B,[tn_Fc,tn_m,tn_w],20,tn_2b],[tn_Fc,[tn_A,tn_yc,tn_hb],20,tn_3b],[tn_z,[tn_A],16,tn_t],[tn_z,[tn_Ec],16,tn_t],[tn_z,[tn_nc,tn_z],-1,tn_4b],[tn_z,[tn_z,tn_8a,tn_z],-1,tn_v],[tn_z,[tn_z,tn_7a,tn_z],-1,tn_v],[tn_z,[tn_z,tn_gc,tn_z],-1,tn_v],[tn_z,[tn_z,
tn_hc,tn_z],-1,tn_v],[tn_z,[tn_z,tn_lc,tn_z],-1,tn_v],[tn_z,[tn_z,tn_kc,tn_z],-1,tn_v],[tn_z,[tn_z,tn_jc,tn_z],-1,tn_v],[tn_z,[tn_z,tn_ic,tn_z],-1,tn_v],[tn_z,[tn_z,tn_mc,tn_z],-1,tn_v,!0],[tn_z,[tn_z,tn_nc,tn_z],-1,tn_v,!0],[tn_z,[tn_z,tn_rc,tn_z],-1,tn_v,!0],[tn_z,[tn_z,tn_5a,tn_z],-1,tn_v,!0],[tn_z,[tn_z,tn_6a,tn_z],-1,tn_v,!0],[tn_zc,[tn_sc],-1,tn_5b],[tn_zc,[tn_tc],-1,tn_5b],[tn_Bc,[tn_uc],-1,tn_6b],[tn_Ac,[tn_ab,tn_bb],200,tn_7b]],tn_eb=[];
function tn_0a(){function a(f,g,l){f[g]||(f[g]=[]);f[g].push(l)}if(!tn_eb.length){tn_Ic.sort(function(f,g){f=f[1].length;g=g[1].length;return f<g?1:f>g?-1:0});for(var b=1,c=0;c<tn_Hc.length;++c)tn_Hc[c].key=b++;for(c=0;c<tn_4a.length;++c)tn_4a[c].key=b++;for(c=0;c<tn_Ic.length;++c){b=tn_Ic[c];for(var d=b[1],e=d.length-1;0<=e;--e)if(d[e]==tn_jb){a(tn_eb,d[e-1].key,b);break}else if(d[e]==tn_hb||d[e]==tn_ib)a(tn_eb,d[e-1].key,b),--e;else{a(tn_eb,d[e].key,b);break}}tn_Ga(tn_eb,function(){})}}
function tn_lb(a,b){for(b=b.firstChild;b;b=b.nextSibling)a.push(b),tn_lb(a,b)}function tn_mb(a,b){for(b=b.lastChild;b;b=b.previousSibling)a.push(b),tn_mb(a,b)}
function tn__a(a,b){if(0!=b.length){for(var c=[],d=0;d<a.nodelist.length;++d){var e=a.nodelist[d],f={node:e,key:[]};e=a.clone(e,0,[e]);for(var g=0;g<b.length;++g){var l=b[g],n=l.expr.evaluate(e),k;"text"==l.type?k=n.stringValue():"number"==l.type&&(k=n.numberValue());f.key.push({value:k,order:l.order})}f.key.push({value:d,order:"ascending"});c.push(f)}c.sort(tn_Jc);b=[];for(d=0;d<c.length;++d)b.push(c[d].node);a.nodelist=b;a.setNode(0)}}
function tn_Jc(a,b){for(var c=0;c<a.key.length;++c){var d="descending"==a.key[c].order?-1:1;if(a.key[c].value>b.key[c].value)return 1*d;if(a.key[c].value<b.key[c].value)return-1*d}return 0}function tn_C(a,b){a=tn_Za(a);return b=a.evaluate(b)};function tn_Kc(a,b){var c=(new tn_Ua).createDocumentFragment();tn_Lc(new tn_j(a,b),b,c);return a=tn_Ka(c)}
function tn_Lc(a,b,c){var d=9==c.nodeType?c:c.ownerDocument;var e=b.nodeName.split(/:/);if(1==e.length||"xsl"!=e[0])if(3==b.nodeType)tn_Mc(b)&&(d=d.createTextNode(b.nodeValue),c.appendChild(d));else if(1==b.nodeType){d=d.createElement(b.nodeName);for(e=0;e<b.attributes.length;++e){var f=b.attributes[e];if(f){var g=f.nodeName;f=tn_Nc(f.nodeValue,a);d.setAttribute(g,f)}}c.appendChild(d);tn_D(a,b,d)}else tn_D(a,b,c);else switch(e[1]){case "apply-imports":alert("not implemented: "+e[1]);break;case "apply-templates":e=
(e=tn_E(b,"select"))?tn_C(e,a).nodeSetValue():a.node.childNodes;a=a.clone(e[0],0,e);tn_Oc(a,b);tn_Pc(a,b);f=tn_E(b,"mode");d=b.ownerDocument.documentElement;e=[];for(b=0;b<d.childNodes.length;++b)g=d.childNodes[b],1==g.nodeType&&"xsl:template"==g.nodeName&&g.getAttribute("mode")==f&&e.push(g);for(d=0;d<a.nodelist.length;++d)for(g=a.nodelist[d],b=0;b<e.length;++b)tn_Lc(a.clone(g,d),e[b],c);break;case "attribute":e=tn_E(b,"name");e=tn_Nc(e,a);g=d.createDocumentFragment();tn_D(a,b,g);b=tn_h(g);c.setAttribute(e,
b);break;case "attribute-set":alert("not implemented: "+e[1]);break;case "call-template":e=tn_E(b,"name");d=b.ownerDocument.documentElement;a=a.clone();tn_Oc(a,b);for(b=0;b<d.childNodes.length;++b)if(g=d.childNodes[b],1==g.nodeType&&"xsl:template"==g.nodeName&&g.getAttribute("name")==e){tn_D(a,g,c);break}break;case "choose":for(d=0;d<b.childNodes.length;++d)if(e=b.childNodes[d],1==e.nodeType)if("xsl:when"==e.nodeName){if(g=tn_E(e,"test"),tn_C(g,a).booleanValue()){tn_D(a,e,c);break}}else if("xsl:otherwise"==
e.nodeName){tn_D(a,e,c);break}break;case "comment":g=d.createDocumentFragment();tn_D(a,b,g);b=tn_h(g);b=d.createComment(b);c.appendChild(b);break;case "copy":(g=tn_Qc(c,a.node,d))&&tn_D(a,b,g);break;case "copy-of":e=tn_E(b,"select");b=tn_C(e,a);if("node-set"==b.type)for(e=b.nodeSetValue(),b=0;b<e.length;++b)tn_Rc(c,e[b],d);else b=b.stringValue(),g=d.createTextNode(b),c.appendChild(g);break;case "decimal-format":alert("not implemented: "+e[1]);break;case "element":e=tn_E(b,"name");e=tn_Nc(e,a);g=d.createElement(e);
c.appendChild(g);tn_D(a,b,g);break;case "fallback":alert("not implemented: "+e[1]);break;case "for-each":d=tn_E(b,"select");d=tn_C(d,a).nodeSetValue();a=a.clone(d[0],0,d);tn_Pc(a,b);for(d=0;d<a.nodelist.length;++d)e=a.nodelist[d],tn_D(a.clone(e,d),b,c);break;case "if":d=tn_E(b,"test");d=tn_C(d,a);null!=d&&d.booleanValue()&&tn_D(a,b,c);break;case "import":alert("not implemented: "+e[1]);break;case "include":alert("not implemented: "+e[1]);break;case "key":alert("not implemented: "+e[1]);break;case "message":alert("not implemented: "+
e[1]);break;case "namespace-alias":alert("not implemented: "+e[1]);break;case "number":alert("not implemented: "+e[1]);break;case "otherwise":alert("error if here: "+e[1]);break;case "output":break;case "preserve-space":break;case "processing-instruction":alert("not implemented: "+e[1]);break;case "sort":break;case "strip-space":alert("not implemented: "+e[1]);break;case "stylesheet":case "transform":tn_D(a,b,c);break;case "template":if(d=e=tn_E(b,"match")){d=a;e=tn_Za(e);if(e.steps&&!e.absolute&&
1==e.steps.length&&"child"==e.steps[0].axis&&0==e.steps[0].predicate.length)g=e.steps[0].nodetest.evaluate(d).booleanValue();else for(g=!1,f=d.node;!g&&f;){for(var l=e.evaluate(d.clone(f,0,[f])).nodeSetValue(),n=0;n<l.length;++n)if(l[n]==d.node){g=!0;break}f=f.parentNode}d=g}d&&tn_D(a,b,c);break;case "text":b=tn_h(b);g=d.createTextNode(b);c.appendChild(g);break;case "value-of":e=tn_E(b,"select");b=tn_C(e,a).stringValue();g=d.createTextNode(b);c.appendChild(g);break;case "param":tn_Sc(a,b,!1);break;
case "variable":tn_Sc(a,b,!0);break;case "when":alert("error if here: "+e[1]);break;case "with-param":alert("error if here: "+e[1]);break;default:alert("error if here: "+e[1])}}function tn_Oc(a,b){for(var c=0;c<b.childNodes.length;++c){var d=b.childNodes[c];1==d.nodeType&&"xsl:with-param"==d.nodeName&&tn_Sc(a,d,!0)}}
function tn_Pc(a,b){for(var c=[],d=0;d<b.childNodes.length;++d){var e=b.childNodes[d];if(1==e.nodeType&&"xsl:sort"==e.nodeName){var f=tn_E(e,"select");f=tn_Za(f);var g=tn_E(e,"data-type")||"text";e=tn_E(e,"order")||"ascending";c.push({expr:f,type:g,order:e})}}tn__a(a,c)}function tn_Sc(a,b,c){var d=tn_E(b,"name"),e=tn_E(b,"select");0<b.childNodes.length?(e=b.ownerDocument.createDocumentFragment(),tn_D(a,b,e),b=new tn_r([e])):b=e?tn_C(e,a):new tn_o("");!c&&a.getVariable(d)||a.setVariable(d,b)}
function tn_D(a,b,c){a=a.clone();for(var d=0;d<b.childNodes.length;++d)tn_Lc(a,b.childNodes[d],c)}function tn_Mc(a){if(!a.nodeValue.match(/^\s*$/))return!0;a=a.parentNode;if("xsl:text"==a.nodeName)return!0;for(;a&&1==a.nodeType;){var b=a.getAttribute("xml:space");if(b)if("default"==b)break;else if("preserve"==b)return!0;a=a.parentNode}return!1}
function tn_Nc(a,b){var c=tn_g(a,"{");if(1==c.length)return a;a="";for(var d=0;d<c.length;++d){var e=tn_g(c[d],"}");if(2!=e.length)a+=c[d];else{var f=tn_C(e[0],b).stringValue();a+=f+e[1]}}return a}function tn_E(a,b){return(a=a.getAttribute(b))?tn_Oa(a):a}
function tn_Rc(a,b,c){if(11==b.nodeType||9==b.nodeType)for(var d=0;d<b.childNodes.length;++d)tn_Rc(a,b.childNodes[d],c);else if(a=tn_Qc(a,b,c)){for(d=0;d<b.attributes.length;++d)tn_Rc(a,b.attributes[d],c);for(d=0;d<b.childNodes.length;++d)tn_Rc(a,b.childNodes[d],c)}}
function tn_Qc(a,b,c){if(1==b.nodeType)return b=c.createElement(b.nodeName),a.appendChild(b),b;3==b.nodeType?(b=c.createTextNode(b.nodeValue),a.appendChild(b)):4==b.nodeType?(b=c.createCDATASection(b.nodeValue),a.appendChild(b)):8==b.nodeType?(b=c.createComment(b.nodeValue),a.appendChild(b)):2==b.nodeType&&a.setAttribute(b.nodeName,b.nodeValue);return null};window.nxslProcess=tn_Wa;window.xmlParse=tn_Ta;window.xsltProcess=tn_Kc;window.xmlText=tn_Ka;window.xmlImportNode=tn_Ea;tn_.dom.classlist={};tn_.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST=!1;tn_.dom.classlist.getClassName_=function(a){return"string"==typeof a.className?a.className:a.getAttribute&&a.getAttribute("class")||""};tn_.dom.classlist.get=function(a){return tn_.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||a.classList?a.classList:tn_.dom.classlist.getClassName_(a).match(/\S+/g)||[]};tn_.dom.classlist.set=function(a,b){"string"==typeof a.className?a.className=b:a.setAttribute&&a.setAttribute("class",b)};
tn_.dom.classlist.contains=function(a,b){return tn_.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||a.classList?a.classList.contains(b):tn_.array.contains(tn_.dom.classlist.get(a),b)};tn_.dom.classlist.add=function(a,b){if(tn_.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||a.classList)a.classList.add(b);else if(!tn_.dom.classlist.contains(a,b)){var c=tn_.dom.classlist.getClassName_(a);tn_.dom.classlist.set(a,c+(0<c.length?" "+b:b))}};
tn_.dom.classlist.addAll=function(a,b){if(tn_.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||a.classList)tn_.array.forEach(b,function(e){tn_.dom.classlist.add(a,e)});else{var c={};tn_.array.forEach(tn_.dom.classlist.get(a),function(e){c[e]=!0});tn_.array.forEach(b,function(e){c[e]=!0});b="";for(var d in c)b+=0<b.length?" "+d:d;tn_.dom.classlist.set(a,b)}};
tn_.dom.classlist.remove=function(a,b){tn_.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||a.classList?a.classList.remove(b):tn_.dom.classlist.contains(a,b)&&tn_.dom.classlist.set(a,tn_.array.filter(tn_.dom.classlist.get(a),function(c){return c!=b}).join(" "))};
tn_.dom.classlist.removeAll=function(a,b){tn_.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||a.classList?tn_.array.forEach(b,function(c){tn_.dom.classlist.remove(a,c)}):tn_.dom.classlist.set(a,tn_.array.filter(tn_.dom.classlist.get(a),function(c){return!tn_.array.contains(b,c)}).join(" "))};tn_.dom.classlist.enable=function(a,b,c){c?tn_.dom.classlist.add(a,b):tn_.dom.classlist.remove(a,b)};tn_.dom.classlist.enableAll=function(a,b,c){c=c?tn_.dom.classlist.addAll:tn_.dom.classlist.removeAll;c(a,b)};
tn_.dom.classlist.swap=function(a,b,c){return tn_.dom.classlist.contains(a,b)?(tn_.dom.classlist.remove(a,b),tn_.dom.classlist.add(a,c),!0):!1};tn_.dom.classlist.toggle=function(a,b){var c=!tn_.dom.classlist.contains(a,b);tn_.dom.classlist.enable(a,b,c);return c};tn_.dom.classlist.addRemove=function(a,b,c){tn_.dom.classlist.remove(a,b);tn_.dom.classlist.add(a,c)};tn_.string.DETECT_DOUBLE_ESCAPING=!1;tn_.string.FORCE_NON_DOM_HTML_UNESCAPING=!1;tn_.string.Unicode={NBSP:"\u00a0"};tn_.string.startsWith=tn_.string.internal.startsWith;tn_.string.endsWith=tn_.string.internal.endsWith;tn_.string.caseInsensitiveStartsWith=tn_.string.internal.caseInsensitiveStartsWith;tn_.string.caseInsensitiveEndsWith=tn_.string.internal.caseInsensitiveEndsWith;tn_.string.caseInsensitiveEquals=tn_.string.internal.caseInsensitiveEquals;
tn_.string.subs=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")};tn_.string.collapseWhitespace=function(a){return a.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")};tn_.string.isEmptyOrWhitespace=tn_.string.internal.isEmptyOrWhitespace;tn_.string.isEmptyString=function(a){return 0==a.length};tn_.string.isEmpty=tn_.string.isEmptyOrWhitespace;tn_.string.isEmptyOrWhitespaceSafe=function(a){return tn_.string.isEmptyOrWhitespace(tn_.string.makeSafe(a))};
tn_.string.isEmptySafe=tn_.string.isEmptyOrWhitespaceSafe;tn_.string.isBreakingWhitespace=function(a){return!/[^\t\n\r ]/.test(a)};tn_.string.isAlpha=function(a){return!/[^a-zA-Z]/.test(a)};tn_.string.isNumeric=function(a){return!/[^0-9]/.test(a)};tn_.string.isAlphaNumeric=function(a){return!/[^a-zA-Z0-9]/.test(a)};tn_.string.isSpace=function(a){return" "==a};tn_.string.isUnicodeChar=function(a){return 1==a.length&&" "<=a&&"~">=a||"\u0080"<=a&&"\ufffd">=a};
tn_.string.stripNewlines=function(a){return a.replace(/(\r\n|\r|\n)+/g," ")};tn_.string.canonicalizeNewlines=function(a){return a.replace(/(\r\n|\r|\n)/g,"\n")};tn_.string.normalizeWhitespace=function(a){return a.replace(/\xa0|\s/g," ")};tn_.string.normalizeSpaces=function(a){return a.replace(/\xa0|[ \t]+/g," ")};tn_.string.collapseBreakingSpaces=function(a){return a.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")};tn_.string.trim=tn_.string.internal.trim;
tn_.string.trimLeft=function(a){return a.replace(/^[\s\xa0]+/,"")};tn_.string.trimRight=function(a){return a.replace(/[\s\xa0]+$/,"")};tn_.string.caseInsensitiveCompare=tn_.string.internal.caseInsensitiveCompare;
tn_.string.numberAwareCompare_=function(a,b,c){if(a==b)return 0;if(!a)return-1;if(!b)return 1;for(var d=a.toLowerCase().match(c),e=b.toLowerCase().match(c),f=Math.min(d.length,e.length),g=0;g<f;g++){c=d[g];var l=e[g];if(c!=l)return a=parseInt(c,10),!isNaN(a)&&(b=parseInt(l,10),!isNaN(b)&&a-b)?a-b:c<l?-1:1}return d.length!=e.length?d.length-e.length:a<b?-1:1};tn_.string.intAwareCompare=function(a,b){return tn_.string.numberAwareCompare_(a,b,/\d+|\D+/g)};
tn_.string.floatAwareCompare=function(a,b){return tn_.string.numberAwareCompare_(a,b,/\d+|\.\d+|\D+/g)};tn_.string.numerateCompare=tn_.string.floatAwareCompare;tn_.string.urlEncode=function(a){return encodeURIComponent(String(a))};tn_.string.urlDecode=function(a){return decodeURIComponent(a.replace(/\+/g," "))};tn_.string.newLineToBr=tn_.string.internal.newLineToBr;
tn_.string.htmlEscape=function(a,b){a=tn_.string.internal.htmlEscape(a,b);tn_.string.DETECT_DOUBLE_ESCAPING&&(a=a.replace(tn_.string.E_RE_,"&#101;"));return a};tn_.string.E_RE_=/e/g;tn_.string.unescapeEntities=function(a){return tn_.string.contains(a,"&")?!tn_.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in tn_.global?tn_.string.unescapeEntitiesUsingDom_(a):tn_.string.unescapePureXmlEntities_(a):a};
tn_.string.unescapeEntitiesWithDocument=function(a,b){return tn_.string.contains(a,"&")?tn_.string.unescapeEntitiesUsingDom_(a,b):a};
tn_.string.unescapeEntitiesUsingDom_=function(a,b){var c={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'};var d=b?b.createElement("div"):tn_.global.document.createElement("div");return a.replace(tn_.string.HTML_ENTITY_PATTERN_,function(e,f){var g=c[e];if(g)return g;"#"==f.charAt(0)&&(f=Number("0"+f.substr(1)),isNaN(f)||(g=String.fromCharCode(f)));g||(tn_.dom.safe.setInnerHtml(d,tn_.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(tn_.string.Const.from("Single HTML entity."),
e+" ")),g=d.firstChild.nodeValue.slice(0,-1));return c[e]=g})};tn_.string.unescapePureXmlEntities_=function(a){return a.replace(/&([^;]+);/g,function(b,c){switch(c){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:return"#"!=c.charAt(0)||(c=Number("0"+c.substr(1)),isNaN(c))?b:String.fromCharCode(c)}})};tn_.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g;tn_.string.whitespaceEscape=function(a,b){return tn_.string.newLineToBr(a.replace(/ /g," &#160;"),b)};
tn_.string.preserveSpaces=function(a){return a.replace(/(^|[\n ]) /g,"$1"+tn_.string.Unicode.NBSP)};tn_.string.stripQuotes=function(a,b){for(var c=b.length,d=0;d<c;d++){var e=1==c?b:b.charAt(d);if(a.charAt(0)==e&&a.charAt(a.length-1)==e)return a.substring(1,a.length-1)}return a};tn_.string.truncate=function(a,b,c){c&&(a=tn_.string.unescapeEntities(a));a.length>b&&(a=a.substring(0,b-3)+"...");c&&(a=tn_.string.htmlEscape(a));return a};
tn_.string.truncateMiddle=function(a,b,c,d){c&&(a=tn_.string.unescapeEntities(a));if(d&&a.length>b){d>b&&(d=b);var e=a.length-d;b-=d;a=a.substring(0,b)+"..."+a.substring(e)}else a.length>b&&(e=Math.floor(b/2),d=a.length-e,e+=b%2,a=a.substring(0,e)+"..."+a.substring(d));c&&(a=tn_.string.htmlEscape(a));return a};tn_.string.specialEscapeChars_={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"};tn_.string.jsEscapeCache_={"'":"\\'"};
tn_.string.quote=function(a){a=String(a);for(var b=['"'],c=0;c<a.length;c++){var d=a.charAt(c),e=d.charCodeAt(0);b[c+1]=tn_.string.specialEscapeChars_[d]||(31<e&&127>e?d:tn_.string.escapeChar(d))}b.push('"');return b.join("")};tn_.string.escapeString=function(a){for(var b=[],c=0;c<a.length;c++)b[c]=tn_.string.escapeChar(a.charAt(c));return b.join("")};
tn_.string.escapeChar=function(a){if(a in tn_.string.jsEscapeCache_)return tn_.string.jsEscapeCache_[a];if(a in tn_.string.specialEscapeChars_)return tn_.string.jsEscapeCache_[a]=tn_.string.specialEscapeChars_[a];var b=a.charCodeAt(0);if(31<b&&127>b)var c=a;else{if(256>b){if(c="\\x",16>b||256<b)c+="0"}else c="\\u",4096>b&&(c+="0");c+=b.toString(16).toUpperCase()}return tn_.string.jsEscapeCache_[a]=c};tn_.string.contains=tn_.string.internal.contains;tn_.string.caseInsensitiveContains=tn_.string.internal.caseInsensitiveContains;
tn_.string.countOf=function(a,b){return a&&b?a.split(b).length-1:0};tn_.string.removeAt=function(a,b,c){var d=a;0<=b&&b<a.length&&0<c&&(d=a.substr(0,b)+a.substr(b+c,a.length-b-c));return d};tn_.string.remove=function(a,b){return a.replace(b,"")};tn_.string.removeAll=function(a,b){b=new RegExp(tn_.string.regExpEscape(b),"g");return a.replace(b,"")};tn_.string.replaceAll=function(a,b,c){b=new RegExp(tn_.string.regExpEscape(b),"g");return a.replace(b,c.replace(/\$/g,"$$$$"))};
tn_.string.regExpEscape=function(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};tn_.string.repeat=String.prototype.repeat?function(a,b){return a.repeat(b)}:function(a,b){return Array(b+1).join(a)};tn_.string.padNumber=function(a,b,c){a=void 0!==c?a.toFixed(c):String(a);c=a.indexOf(".");-1==c&&(c=a.length);return tn_.string.repeat("0",Math.max(0,b-c))+a};tn_.string.makeSafe=function(a){return null==a?"":String(a)};
tn_.string.buildString=function(a){return Array.prototype.join.call(arguments,"")};tn_.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^tn_.now()).toString(36)};tn_.string.compareVersions=tn_.string.internal.compareVersions;tn_.string.hashCode=function(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c)>>>0;return b};tn_.string.uniqueStringCounter_=2147483648*Math.random()|0;
tn_.string.createUniqueString=function(){return"goog_"+tn_.string.uniqueStringCounter_++};tn_.string.toNumber=function(a){var b=Number(a);return 0==b&&tn_.string.isEmptyOrWhitespace(a)?NaN:b};tn_.string.isLowerCamelCase=function(a){return/^[a-z]+([A-Z][a-z]*)*$/.test(a)};tn_.string.isUpperCamelCase=function(a){return/^([A-Z][a-z]*)+$/.test(a)};tn_.string.toCamelCase=function(a){return String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()})};
tn_.string.toSelectorCase=function(a){return String(a).replace(/([A-Z])/g,"-$1").toLowerCase()};tn_.string.toTitleCase=function(a,b){b=(b="string"===typeof b?tn_.string.regExpEscape(b):"\\s")?"|["+b+"]+":"";b=new RegExp("(^"+b+")([a-z])","g");return a.replace(b,function(c,d,e){return d+e.toUpperCase()})};tn_.string.capitalize=function(a){return String(a.charAt(0)).toUpperCase()+String(a.substr(1)).toLowerCase()};
tn_.string.parseInt=function(a){isFinite(a)&&(a=String(a));return"string"===typeof a?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN};tn_.string.splitLimit=function(a,b,c){a=a.split(b);for(var d=[];0<c&&a.length;)d.push(a.shift()),c--;a.length&&d.push(a.join(b));return d};tn_.string.lastComponent=function(a,b){if(b)"string"==typeof b&&(b=[b]);else return a;for(var c=-1,d=0;d<b.length;d++)if(""!=b[d]){var e=a.lastIndexOf(b[d]);e>c&&(c=e)}return-1==c?a:a.slice(c+1)};
tn_.string.editDistance=function(a,b){var c=[],d=[];if(a==b)return 0;if(!a.length||!b.length)return Math.max(a.length,b.length);for(var e=0;e<b.length+1;e++)c[e]=e;for(e=0;e<a.length;e++){d[0]=e+1;for(var f=0;f<b.length;f++){var g=Number(a[e]!=b[f]);d[f+1]=Math.min(d[f]+1,c[f+1]+1,c[f]+g)}for(f=0;f<c.length;f++)c[f]=d[f]}return d[b.length]};tn_.labs.userAgent.engine={};tn_.labs.userAgent.engine.isPresto=function(){return tn_.labs.userAgent.util.matchUserAgent("Presto")};tn_.labs.userAgent.engine.isTrident=function(){return tn_.labs.userAgent.util.matchUserAgent("Trident")||tn_.labs.userAgent.util.matchUserAgent("MSIE")};tn_.labs.userAgent.engine.isEdge=function(){return tn_.labs.userAgent.util.matchUserAgent("Edge")};tn_.labs.userAgent.engine.isWebKit=function(){return tn_.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit")&&!tn_.labs.userAgent.engine.isEdge()};
tn_.labs.userAgent.engine.isGecko=function(){return tn_.labs.userAgent.util.matchUserAgent("Gecko")&&!tn_.labs.userAgent.engine.isWebKit()&&!tn_.labs.userAgent.engine.isTrident()&&!tn_.labs.userAgent.engine.isEdge()};
tn_.labs.userAgent.engine.getVersion=function(){var a=tn_.labs.userAgent.util.getUserAgent();if(a){a=tn_.labs.userAgent.util.extractVersionTuples(a);var b=tn_.labs.userAgent.engine.getEngineTuple_(a);if(b)return"Gecko"==b[0]?tn_.labs.userAgent.engine.getVersionForKey_(a,"Firefox"):b[1];a=a[0];var c;if(a&&(c=a[2])&&(c=/Trident\/([^\s;]+)/.exec(c)))return c[1]}return""};
tn_.labs.userAgent.engine.getEngineTuple_=function(a){if(!tn_.labs.userAgent.engine.isEdge())return a[1];for(var b=0;b<a.length;b++){var c=a[b];if("Edge"==c[0])return c}};tn_.labs.userAgent.engine.isVersionOrHigher=function(a){return 0<=tn_.string.compareVersions(tn_.labs.userAgent.engine.getVersion(),a)};tn_.labs.userAgent.engine.getVersionForKey_=function(a,b){return(a=tn_.array.find(a,function(c){return b==c[0]}))&&a[1]||""};tn_.labs.userAgent.platform={};tn_.labs.userAgent.platform.isAndroid=function(){return tn_.labs.userAgent.util.matchUserAgent("Android")};tn_.labs.userAgent.platform.isIpod=function(){return tn_.labs.userAgent.util.matchUserAgent("iPod")};tn_.labs.userAgent.platform.isIphone=function(){return tn_.labs.userAgent.util.matchUserAgent("iPhone")&&!tn_.labs.userAgent.util.matchUserAgent("iPod")&&!tn_.labs.userAgent.util.matchUserAgent("iPad")};tn_.labs.userAgent.platform.isIpad=function(){return tn_.labs.userAgent.util.matchUserAgent("iPad")};
tn_.labs.userAgent.platform.isIos=function(){return tn_.labs.userAgent.platform.isIphone()||tn_.labs.userAgent.platform.isIpad()||tn_.labs.userAgent.platform.isIpod()};tn_.labs.userAgent.platform.isMacintosh=function(){return tn_.labs.userAgent.util.matchUserAgent("Macintosh")};tn_.labs.userAgent.platform.isLinux=function(){return tn_.labs.userAgent.util.matchUserAgent("Linux")};tn_.labs.userAgent.platform.isWindows=function(){return tn_.labs.userAgent.util.matchUserAgent("Windows")};
tn_.labs.userAgent.platform.isChromeOS=function(){return tn_.labs.userAgent.util.matchUserAgent("CrOS")};tn_.labs.userAgent.platform.isChromecast=function(){return tn_.labs.userAgent.util.matchUserAgent("CrKey")};tn_.labs.userAgent.platform.isKaiOS=function(){return tn_.labs.userAgent.util.matchUserAgentIgnoreCase("KaiOS")};
tn_.labs.userAgent.platform.getVersion=function(){var a=tn_.labs.userAgent.util.getUserAgent(),b="";tn_.labs.userAgent.platform.isWindows()?(b=/Windows (?:NT|Phone) ([0-9.]+)/,b=(a=b.exec(a))?a[1]:"0.0"):tn_.labs.userAgent.platform.isIos()?(b=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/,b=(a=b.exec(a))&&a[1].replace(/_/g,".")):tn_.labs.userAgent.platform.isMacintosh()?(b=/Mac OS X ([0-9_.]+)/,b=(a=b.exec(a))?a[1].replace(/_/g,"."):"10"):tn_.labs.userAgent.platform.isKaiOS()?(b=/(?:KaiOS)\/(\S+)/i,b=(a=
b.exec(a))&&a[1]):tn_.labs.userAgent.platform.isAndroid()?(b=/Android\s+([^\);]+)(\)|;)/,b=(a=b.exec(a))&&a[1]):tn_.labs.userAgent.platform.isChromeOS()&&(b=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/,b=(a=b.exec(a))&&a[1]);return b||""};tn_.labs.userAgent.platform.isVersionOrHigher=function(a){return 0<=tn_.string.compareVersions(tn_.labs.userAgent.platform.getVersion(),a)};tn_.reflect={};tn_.reflect.object=function(a,b){return b};tn_.reflect.objectProperty=function(a){return a};tn_.reflect.sinkValue=function(a){tn_.reflect.sinkValue[" "](a);return a};tn_.reflect.sinkValue[" "]=tn_.nullFunction;tn_.reflect.canAccessProperty=function(a,b){try{return tn_.reflect.sinkValue(a[b]),!0}catch(c){}return!1};tn_.reflect.cache=function(a,b,c,d){d=d?d(b):b;return Object.prototype.hasOwnProperty.call(a,d)?a[d]:a[d]=c(b)};tn_.userAgent={};tn_.userAgent.ASSUME_IE=!1;tn_.userAgent.ASSUME_EDGE=!1;tn_.userAgent.ASSUME_GECKO=!1;tn_.userAgent.ASSUME_WEBKIT=!1;tn_.userAgent.ASSUME_MOBILE_WEBKIT=!1;tn_.userAgent.ASSUME_OPERA=!1;tn_.userAgent.ASSUME_ANY_VERSION=!1;tn_.userAgent.BROWSER_KNOWN_=tn_.userAgent.ASSUME_IE||tn_.userAgent.ASSUME_EDGE||tn_.userAgent.ASSUME_GECKO||tn_.userAgent.ASSUME_MOBILE_WEBKIT||tn_.userAgent.ASSUME_WEBKIT||tn_.userAgent.ASSUME_OPERA;tn_.userAgent.getUserAgentString=function(){return tn_.labs.userAgent.util.getUserAgent()};
tn_.userAgent.getNavigatorTyped=function(){return tn_.global.navigator||null};tn_.userAgent.getNavigator=function(){return tn_.userAgent.getNavigatorTyped()};tn_.userAgent.OPERA=tn_.userAgent.BROWSER_KNOWN_?tn_.userAgent.ASSUME_OPERA:tn_.labs.userAgent.browser.isOpera();tn_.userAgent.IE=tn_.userAgent.BROWSER_KNOWN_?tn_.userAgent.ASSUME_IE:tn_.labs.userAgent.browser.isIE();tn_.userAgent.EDGE=tn_.userAgent.BROWSER_KNOWN_?tn_.userAgent.ASSUME_EDGE:tn_.labs.userAgent.engine.isEdge();
tn_.userAgent.EDGE_OR_IE=tn_.userAgent.EDGE||tn_.userAgent.IE;tn_.userAgent.GECKO=tn_.userAgent.BROWSER_KNOWN_?tn_.userAgent.ASSUME_GECKO:tn_.labs.userAgent.engine.isGecko();tn_.userAgent.WEBKIT=tn_.userAgent.BROWSER_KNOWN_?tn_.userAgent.ASSUME_WEBKIT||tn_.userAgent.ASSUME_MOBILE_WEBKIT:tn_.labs.userAgent.engine.isWebKit();tn_.userAgent.isMobile_=function(){return tn_.userAgent.WEBKIT&&tn_.labs.userAgent.util.matchUserAgent("Mobile")};tn_.userAgent.MOBILE=tn_.userAgent.ASSUME_MOBILE_WEBKIT||tn_.userAgent.isMobile_();
tn_.userAgent.SAFARI=tn_.userAgent.WEBKIT;tn_.userAgent.determinePlatform_=function(){var a=tn_.userAgent.getNavigatorTyped();return a&&a.platform||""};tn_.userAgent.PLATFORM=tn_.userAgent.determinePlatform_();tn_.userAgent.ASSUME_MAC=!1;tn_.userAgent.ASSUME_WINDOWS=!1;tn_.userAgent.ASSUME_LINUX=!1;tn_.userAgent.ASSUME_X11=!1;tn_.userAgent.ASSUME_ANDROID=!1;tn_.userAgent.ASSUME_IPHONE=!1;tn_.userAgent.ASSUME_IPAD=!1;tn_.userAgent.ASSUME_IPOD=!1;tn_.userAgent.ASSUME_KAIOS=!1;
tn_.userAgent.PLATFORM_KNOWN_=tn_.userAgent.ASSUME_MAC||tn_.userAgent.ASSUME_WINDOWS||tn_.userAgent.ASSUME_LINUX||tn_.userAgent.ASSUME_X11||tn_.userAgent.ASSUME_ANDROID||tn_.userAgent.ASSUME_IPHONE||tn_.userAgent.ASSUME_IPAD||tn_.userAgent.ASSUME_IPOD;tn_.userAgent.MAC=tn_.userAgent.PLATFORM_KNOWN_?tn_.userAgent.ASSUME_MAC:tn_.labs.userAgent.platform.isMacintosh();tn_.userAgent.WINDOWS=tn_.userAgent.PLATFORM_KNOWN_?tn_.userAgent.ASSUME_WINDOWS:tn_.labs.userAgent.platform.isWindows();
tn_.userAgent.isLegacyLinux_=function(){return tn_.labs.userAgent.platform.isLinux()||tn_.labs.userAgent.platform.isChromeOS()};tn_.userAgent.LINUX=tn_.userAgent.PLATFORM_KNOWN_?tn_.userAgent.ASSUME_LINUX:tn_.userAgent.isLegacyLinux_();tn_.userAgent.isX11_=function(){var a=tn_.userAgent.getNavigatorTyped();return!!a&&tn_.string.contains(a.appVersion||"","X11")};tn_.userAgent.X11=tn_.userAgent.PLATFORM_KNOWN_?tn_.userAgent.ASSUME_X11:tn_.userAgent.isX11_();
tn_.userAgent.ANDROID=tn_.userAgent.PLATFORM_KNOWN_?tn_.userAgent.ASSUME_ANDROID:tn_.labs.userAgent.platform.isAndroid();tn_.userAgent.IPHONE=tn_.userAgent.PLATFORM_KNOWN_?tn_.userAgent.ASSUME_IPHONE:tn_.labs.userAgent.platform.isIphone();tn_.userAgent.IPAD=tn_.userAgent.PLATFORM_KNOWN_?tn_.userAgent.ASSUME_IPAD:tn_.labs.userAgent.platform.isIpad();tn_.userAgent.IPOD=tn_.userAgent.PLATFORM_KNOWN_?tn_.userAgent.ASSUME_IPOD:tn_.labs.userAgent.platform.isIpod();
tn_.userAgent.IOS=tn_.userAgent.PLATFORM_KNOWN_?tn_.userAgent.ASSUME_IPHONE||tn_.userAgent.ASSUME_IPAD||tn_.userAgent.ASSUME_IPOD:tn_.labs.userAgent.platform.isIos();tn_.userAgent.KAIOS=tn_.userAgent.PLATFORM_KNOWN_?tn_.userAgent.ASSUME_KAIOS:tn_.labs.userAgent.platform.isKaiOS();tn_.userAgent.determineVersion_=function(){var a="",b=tn_.userAgent.getVersionRegexResult_();b&&(a=b?b[1]:"");return tn_.userAgent.IE&&(b=tn_.userAgent.getDocumentMode_(),null!=b&&b>parseFloat(a))?String(b):a};
tn_.userAgent.getVersionRegexResult_=function(){var a=tn_.userAgent.getUserAgentString();if(tn_.userAgent.GECKO)return/rv:([^\);]+)(\)|;)/.exec(a);if(tn_.userAgent.EDGE)return/Edge\/([\d\.]+)/.exec(a);if(tn_.userAgent.IE)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(tn_.userAgent.WEBKIT)return/WebKit\/(\S+)/.exec(a);if(tn_.userAgent.OPERA)return/(?:Version)[ \/]?(\S+)/.exec(a)};tn_.userAgent.getDocumentMode_=function(){var a=tn_.global.document;return a?a.documentMode:void 0};
tn_.userAgent.VERSION=tn_.userAgent.determineVersion_();tn_.userAgent.compare=function(a,b){return tn_.string.compareVersions(a,b)};tn_.userAgent.isVersionOrHigherCache_={};tn_.userAgent.isVersionOrHigher=function(a){return tn_.userAgent.ASSUME_ANY_VERSION||tn_.reflect.cache(tn_.userAgent.isVersionOrHigherCache_,a,function(){return 0<=tn_.string.compareVersions(tn_.userAgent.VERSION,a)})};tn_.userAgent.isVersion=tn_.userAgent.isVersionOrHigher;
tn_.userAgent.isDocumentModeOrHigher=function(a){return Number(tn_.userAgent.DOCUMENT_MODE)>=a};tn_.userAgent.isDocumentMode=tn_.userAgent.isDocumentModeOrHigher;var tn_Tc;var tn_Uc=tn_.global.document;if(tn_Uc&&tn_.userAgent.IE){var tn_Vc=tn_.userAgent.getDocumentMode_();if(tn_Vc)tn_Tc=tn_Vc;else{var tn_Wc=parseInt(tn_.userAgent.VERSION,10);tn_Tc=tn_Wc||void 0}}else tn_Tc=void 0;tn_.userAgent.DOCUMENT_MODE=tn_Tc;tn_.dom.BrowserFeature={};tn_.dom.BrowserFeature.ASSUME_NO_OFFSCREEN_CANVAS=!1;tn_.dom.BrowserFeature.ASSUME_OFFSCREEN_CANVAS=!1;tn_.dom.BrowserFeature.detectOffscreenCanvas_=function(a){try{return!!(new self.OffscreenCanvas(0,0)).getContext(a)}catch(b){}return!1};tn_.dom.BrowserFeature.OFFSCREEN_CANVAS_2D=!tn_.dom.BrowserFeature.ASSUME_NO_OFFSCREEN_CANVAS&&(tn_.dom.BrowserFeature.ASSUME_OFFSCREEN_CANVAS||tn_.dom.BrowserFeature.detectOffscreenCanvas_("2d"));
tn_.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES=!tn_.userAgent.IE||tn_.userAgent.isDocumentModeOrHigher(9);tn_.dom.BrowserFeature.CAN_USE_CHILDREN_ATTRIBUTE=!tn_.userAgent.GECKO&&!tn_.userAgent.IE||tn_.userAgent.IE&&tn_.userAgent.isDocumentModeOrHigher(9)||tn_.userAgent.GECKO&&tn_.userAgent.isVersionOrHigher("1.9.1");tn_.dom.BrowserFeature.CAN_USE_INNER_TEXT=tn_.userAgent.IE&&!tn_.userAgent.isVersionOrHigher("9");
tn_.dom.BrowserFeature.CAN_USE_PARENT_ELEMENT_PROPERTY=tn_.userAgent.IE||tn_.userAgent.OPERA||tn_.userAgent.WEBKIT;tn_.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT=tn_.userAgent.IE;tn_.dom.BrowserFeature.LEGACY_IE_RANGES=tn_.userAgent.IE&&!tn_.userAgent.isDocumentModeOrHigher(9);tn_.math={};tn_.math.randomInt=function(a){return Math.floor(Math.random()*a)};tn_.math.uniformRandom=function(a,b){return a+Math.random()*(b-a)};tn_.math.clamp=function(a,b,c){return Math.min(Math.max(a,b),c)};tn_.math.modulo=function(a,b){a%=b;return 0>a*b?a+b:a};tn_.math.lerp=function(a,b,c){return a+c*(b-a)};tn_.math.nearlyEquals=function(a,b,c){return Math.abs(a-b)<=(c||1E-6)};tn_.math.standardAngle=function(a){return tn_.math.modulo(a,360)};
tn_.math.standardAngleInRadians=function(a){return tn_.math.modulo(a,2*Math.PI)};tn_.math.toRadians=function(a){return a*Math.PI/180};tn_.math.toDegrees=function(a){return 180*a/Math.PI};tn_.math.angleDx=function(a,b){return b*Math.cos(tn_.math.toRadians(a))};tn_.math.angleDy=function(a,b){return b*Math.sin(tn_.math.toRadians(a))};tn_.math.angle=function(a,b,c,d){return tn_.math.standardAngle(tn_.math.toDegrees(Math.atan2(d-b,c-a)))};
tn_.math.angleDifference=function(a,b){a=tn_.math.standardAngle(b)-tn_.math.standardAngle(a);180<a?a-=360:-180>=a&&(a=360+a);return a};tn_.math.sign=function(a){return 0<a?1:0>a?-1:a};
tn_.math.longestCommonSubsequence=function(a,b,c,d){c=c||function(h,m){return h==m};d=d||function(h){return a[h]};for(var e=a.length,f=b.length,g=[],l=0;l<e+1;l++)g[l]=[],g[l][0]=0;for(var n=0;n<f+1;n++)g[0][n]=0;for(l=1;l<=e;l++)for(n=1;n<=f;n++)c(a[l-1],b[n-1])?g[l][n]=g[l-1][n-1]+1:g[l][n]=Math.max(g[l-1][n],g[l][n-1]);var k=[];l=e;for(n=f;0<l&&0<n;)c(a[l-1],b[n-1])?(k.unshift(d(l-1,n-1)),l--,n--):g[l-1][n]>g[l][n-1]?l--:n--;return k};
tn_.math.sum=function(a){return tn_.array.reduce(arguments,function(b,c){return b+c},0)};tn_.math.average=function(a){return tn_.math.sum.apply(null,arguments)/arguments.length};tn_.math.sampleVariance=function(a){var b=arguments.length;if(2>b)return 0;var c=tn_.math.average.apply(null,arguments);return b=tn_.math.sum.apply(null,tn_.array.map(arguments,function(d){return Math.pow(d-c,2)}))/(b-1)};tn_.math.standardDeviation=function(a){return Math.sqrt(tn_.math.sampleVariance.apply(null,arguments))};
tn_.math.isInt=function(a){return isFinite(a)&&0==a%1};tn_.math.isFiniteNumber=function(a){return isFinite(a)};tn_.math.isNegativeZero=function(a){return 0==a&&0>1/a};tn_.math.log10Floor=function(a){if(0<a){var b=Math.round(Math.log(a)*Math.LOG10E);return b-(parseFloat("1e"+b)>a?1:0)}return 0==a?-Infinity:NaN};tn_.math.safeFloor=function(a,b){tn_.asserts.assert(void 0===b||0<b);return Math.floor(a+(b||2E-15))};
tn_.math.safeCeil=function(a,b){tn_.asserts.assert(void 0===b||0<b);return Math.ceil(a-(b||2E-15))};tn_.math.Coordinate=function(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0};tn_.math.Coordinate.prototype.clone=function(){return new tn_.math.Coordinate(this.x,this.y)};tn_.DEBUG&&(tn_.math.Coordinate.prototype.toString=function(){return"("+this.x+", "+this.y+")"});tn_.math.Coordinate.prototype.equals=function(a){return a instanceof tn_.math.Coordinate&&tn_.math.Coordinate.equals(this,a)};tn_.math.Coordinate.equals=function(a,b){return a==b?!0:a&&b?a.x==b.x&&a.y==b.y:!1};
tn_.math.Coordinate.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};tn_.math.Coordinate.magnitude=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)};tn_.math.Coordinate.azimuth=function(a){return tn_.math.angle(0,0,a.x,a.y)};tn_.math.Coordinate.squaredDistance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return c*c+a*a};tn_.math.Coordinate.difference=function(a,b){return new tn_.math.Coordinate(a.x-b.x,a.y-b.y)};
tn_.math.Coordinate.sum=function(a,b){return new tn_.math.Coordinate(a.x+b.x,a.y+b.y)};tn_a=tn_.math.Coordinate.prototype;tn_a.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};tn_a.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};tn_a.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};
tn_a.translate=function(a,b){a instanceof tn_.math.Coordinate?(this.x+=a.x,this.y+=a.y):(this.x+=Number(a),"number"===typeof b&&(this.y+=b));return this};tn_a.scale=function(a,b){b="number"===typeof b?b:a;this.x*=a;this.y*=b;return this};tn_.math.Size=function(a,b){this.width=a;this.height=b};tn_.math.Size.equals=function(a,b){return a==b?!0:a&&b?a.width==b.width&&a.height==b.height:!1};tn_.math.Size.prototype.clone=function(){return new tn_.math.Size(this.width,this.height)};tn_.DEBUG&&(tn_.math.Size.prototype.toString=function(){return"("+this.width+" x "+this.height+")"});tn_a=tn_.math.Size.prototype;tn_a.area=function(){return this.width*this.height};tn_a.aspectRatio=function(){return this.width/this.height};tn_a.isEmpty=function(){return!this.area()};
tn_a.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};tn_a.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};tn_a.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};tn_a.scale=function(a,b){b="number"===typeof b?b:a;this.width*=a;this.height*=b;return this};tn_.dom.ASSUME_QUIRKS_MODE=!1;tn_.dom.ASSUME_STANDARDS_MODE=!1;tn_.dom.COMPAT_MODE_KNOWN_=tn_.dom.ASSUME_QUIRKS_MODE||tn_.dom.ASSUME_STANDARDS_MODE;tn_.dom.getDomHelper=function(a){return a?new tn_.dom.DomHelper(tn_.dom.getOwnerDocument(a)):tn_.dom.defaultDomHelper_||(tn_.dom.defaultDomHelper_=new tn_.dom.DomHelper)};tn_.dom.getDocument=function(){return document};tn_.dom.getElement=function(a){return tn_.dom.getElementHelper_(document,a)};
tn_.dom.getElementHelper_=function(a,b){return"string"===typeof b?a.getElementById(b):b};tn_.dom.getRequiredElement=function(a){return tn_.dom.getRequiredElementHelper_(document,a)};tn_.dom.getRequiredElementHelper_=function(a,b){tn_.asserts.assertString(b);a=tn_.dom.getElementHelper_(a,b);return a=tn_.asserts.assertElement(a,"No element found with id: "+b)};tn_.dom.$=tn_.dom.getElement;tn_.dom.getElementsByTagName=function(a,b){b=b||document;return b.getElementsByTagName(String(a))};
tn_.dom.getElementsByTagNameAndClass=function(a,b,c){return tn_.dom.getElementsByTagNameAndClass_(document,a,b,c)};tn_.dom.getElementByTagNameAndClass=function(a,b,c){return tn_.dom.getElementByTagNameAndClass_(document,a,b,c)};tn_.dom.getElementsByClass=function(a,b){var c=b||document;return tn_.dom.canUseQuerySelector_(c)?c.querySelectorAll("."+a):tn_.dom.getElementsByTagNameAndClass_(document,"*",a,b)};
tn_.dom.getElementByClass=function(a,b){var c=b||document;return(a=c.getElementsByClassName?c.getElementsByClassName(a)[0]:tn_.dom.getElementByTagNameAndClass_(document,"*",a,b))||null};tn_.dom.getRequiredElementByClass=function(a,b){b=tn_.dom.getElementByClass(a,b);return tn_.asserts.assert(b,"No element found with className: "+a)};tn_.dom.canUseQuerySelector_=function(a){return!(!a.querySelectorAll||!a.querySelector)};
tn_.dom.getElementsByTagNameAndClass_=function(a,b,c,d){a=d||a;b=b&&"*"!=b?String(b).toUpperCase():"";if(tn_.dom.canUseQuerySelector_(a)&&(b||c))return c=b+(c?"."+c:""),a.querySelectorAll(c);if(c&&a.getElementsByClassName){a=a.getElementsByClassName(c);if(b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;return d}return a}a=a.getElementsByTagName(b||"*");if(c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&tn_.array.contains(b.split(/\s+/),c)&&(d[e++]=
g);d.length=e;return d}return a};tn_.dom.getElementByTagNameAndClass_=function(a,b,c,d){var e=d||a,f=b&&"*"!=b?String(b).toUpperCase():"";if(tn_.dom.canUseQuerySelector_(e)&&(f||c))return e.querySelector(f+(c?"."+c:""));a=tn_.dom.getElementsByTagNameAndClass_(a,b,c,d);return a[0]||null};tn_.dom.$$=tn_.dom.getElementsByTagNameAndClass;
tn_.dom.setProperties=function(a,b){tn_.object.forEach(b,function(c,d){c&&"object"==typeof c&&c.implementsGoogStringTypedString&&(c=c.getTypedStringValue());"style"==d?a.style.cssText=c:"class"==d?a.className=c:"for"==d?a.htmlFor=c:tn_.dom.DIRECT_ATTRIBUTE_MAP_.hasOwnProperty(d)?a.setAttribute(tn_.dom.DIRECT_ATTRIBUTE_MAP_[d],c):tn_.string.startsWith(d,"aria-")||tn_.string.startsWith(d,"data-")?a.setAttribute(d,c):a[d]=c})};
tn_.dom.DIRECT_ATTRIBUTE_MAP_={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};tn_.dom.getViewportSize=function(a){return tn_.dom.getViewportSize_(a||window)};tn_.dom.getViewportSize_=function(a){a=a.document;a=tn_.dom.isCss1CompatMode_(a)?a.documentElement:a.body;return new tn_.math.Size(a.clientWidth,a.clientHeight)};
tn_.dom.getDocumentHeight=function(){return tn_.dom.getDocumentHeight_(window)};tn_.dom.getDocumentHeightForWindow=function(a){return tn_.dom.getDocumentHeight_(a)};
tn_.dom.getDocumentHeight_=function(a){var b=a.document,c=0;if(b){c=b.body;var d=b.documentElement;if(!d||!c)return 0;a=tn_.dom.getViewportSize_(a).height;if(tn_.dom.isCss1CompatMode_(b)&&d.scrollHeight)c=d.scrollHeight!=a?d.scrollHeight:d.offsetHeight;else{b=d.scrollHeight;var e=d.offsetHeight;d.clientHeight!=e&&(b=c.scrollHeight,e=c.offsetHeight);c=b>a?b>e?b:e:b<e?b:e}}return c};tn_.dom.getPageScroll=function(a){a=a||tn_.global||window;return tn_.dom.getDomHelper(a.document).getDocumentScroll()};
tn_.dom.getDocumentScroll=function(){return tn_.dom.getDocumentScroll_(document)};tn_.dom.getDocumentScroll_=function(a){var b=tn_.dom.getDocumentScrollElement_(a);a=tn_.dom.getWindow_(a);return tn_.userAgent.IE&&tn_.userAgent.isVersionOrHigher("10")&&a.pageYOffset!=b.scrollTop?new tn_.math.Coordinate(b.scrollLeft,b.scrollTop):new tn_.math.Coordinate(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)};tn_.dom.getDocumentScrollElement=function(){return tn_.dom.getDocumentScrollElement_(document)};
tn_.dom.getDocumentScrollElement_=function(a){return a.scrollingElement?a.scrollingElement:!tn_.userAgent.WEBKIT&&tn_.dom.isCss1CompatMode_(a)?a.documentElement:a.body||a.documentElement};tn_.dom.getWindow=function(a){return a?tn_.dom.getWindow_(a):window};tn_.dom.getWindow_=function(a){return a.parentWindow||a.defaultView};tn_.dom.createDom=function(a,b,c){return tn_.dom.createDom_(document,arguments)};
tn_.dom.createDom_=function(a,b){var c=String(b[0]),d=b[1];if(!tn_.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',tn_.string.htmlEscape(d.name),'"');if(d.type){c.push(' type="',tn_.string.htmlEscape(d.type),'"');var e={};tn_.object.extend(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=tn_.dom.createElement_(a,c);d&&("string"===typeof d?c.className=d:Array.isArray(d)?c.className=d.join(" "):tn_.dom.setProperties(c,d));2<b.length&&tn_.dom.append_(a,
c,b,2);return c};tn_.dom.append_=function(a,b,c,d){function e(g){g&&b.appendChild("string"===typeof g?a.createTextNode(g):g)}for(;d<c.length;d++){var f=c[d];tn_.isArrayLike(f)&&!tn_.dom.isNodeLike(f)?tn_.array.forEach(tn_.dom.isNodeList(f)?tn_.array.toArray(f):f,e):e(f)}};tn_.dom.$dom=tn_.dom.createDom;tn_.dom.createElement=function(a){return tn_.dom.createElement_(document,a)};tn_.dom.createElement_=function(a,b){b=String(b);"application/xhtml+xml"===a.contentType&&(b=b.toLowerCase());return a.createElement(b)};
tn_.dom.createTextNode=function(a){return document.createTextNode(String(a))};tn_.dom.createTable=function(a,b,c){return tn_.dom.createTable_(document,a,b,!!c)};tn_.dom.createTable_=function(a,b,c,d){for(var e=tn_.dom.createElement_(a,"TABLE"),f=e.appendChild(tn_.dom.createElement_(a,"TBODY")),g=0;g<b;g++){for(var l=tn_.dom.createElement_(a,"TR"),n=0;n<c;n++){var k=tn_.dom.createElement_(a,"TD");d&&tn_.dom.setTextContent(k,tn_.string.Unicode.NBSP);l.appendChild(k)}f.appendChild(l)}return e};
tn_.dom.constHtmlToNode=function(a){var b=tn_.array.map(arguments,tn_.string.Const.unwrap);b=tn_.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(tn_.string.Const.from("Constant HTML string, that gets turned into a Node later, so it will be automatically balanced."),b.join(""));return tn_.dom.safeHtmlToNode(b)};tn_.dom.safeHtmlToNode=function(a){return tn_.dom.safeHtmlToNode_(document,a)};
tn_.dom.safeHtmlToNode_=function(a,b){var c=tn_.dom.createElement_(a,"DIV");tn_.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT?(tn_.dom.safe.setInnerHtml(c,tn_.html.SafeHtml.concat(tn_.html.SafeHtml.BR,b)),c.removeChild(tn_.asserts.assert(c.firstChild))):tn_.dom.safe.setInnerHtml(c,b);return tn_.dom.childrenToNode_(a,c)};
tn_.dom.childrenToNode_=function(a,b){if(1==b.childNodes.length)return b.removeChild(tn_.asserts.assert(b.firstChild));for(a=a.createDocumentFragment();b.firstChild;)a.appendChild(b.firstChild);return a};tn_.dom.isCss1CompatMode=function(){return tn_.dom.isCss1CompatMode_(document)};tn_.dom.isCss1CompatMode_=function(a){return tn_.dom.COMPAT_MODE_KNOWN_?tn_.dom.ASSUME_STANDARDS_MODE:"CSS1Compat"==a.compatMode};tn_.dom.canHaveChildren=function(a){if(a.nodeType!=tn_.dom.NodeType.ELEMENT)return!1;switch(a.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "COMMAND":case "EMBED":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "KEYGEN":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "SOURCE":case "STYLE":case "TRACK":case "WBR":return!1}return!0};
tn_.dom.appendChild=function(a,b){tn_.asserts.assert(null!=a&&null!=b,"goog.dom.appendChild expects non-null arguments");a.appendChild(b)};tn_.dom.append=function(a,b){tn_.dom.append_(tn_.dom.getOwnerDocument(a),a,arguments,1)};tn_.dom.removeChildren=function(a){for(var b;b=a.firstChild;)a.removeChild(b)};tn_.dom.insertSiblingBefore=function(a,b){tn_.asserts.assert(null!=a&&null!=b,"goog.dom.insertSiblingBefore expects non-null arguments");b.parentNode&&b.parentNode.insertBefore(a,b)};
tn_.dom.insertSiblingAfter=function(a,b){tn_.asserts.assert(null!=a&&null!=b,"goog.dom.insertSiblingAfter expects non-null arguments");b.parentNode&&b.parentNode.insertBefore(a,b.nextSibling)};tn_.dom.insertChildAt=function(a,b,c){tn_.asserts.assert(null!=a,"goog.dom.insertChildAt expects a non-null parent");a.insertBefore(b,a.childNodes[c]||null)};tn_.dom.removeNode=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null};
tn_.dom.replaceNode=function(a,b){tn_.asserts.assert(null!=a&&null!=b,"goog.dom.replaceNode expects non-null arguments");var c=b.parentNode;c&&c.replaceChild(a,b)};tn_.dom.flattenElement=function(a){var b,c=a.parentNode;if(c&&c.nodeType!=tn_.dom.NodeType.DOCUMENT_FRAGMENT){if(a.removeNode)return a.removeNode(!1);for(;b=a.firstChild;)c.insertBefore(b,a);return tn_.dom.removeNode(a)}};
tn_.dom.getChildren=function(a){return tn_.dom.BrowserFeature.CAN_USE_CHILDREN_ATTRIBUTE&&void 0!=a.children?a.children:tn_.array.filter(a.childNodes,function(b){return b.nodeType==tn_.dom.NodeType.ELEMENT})};tn_.dom.getFirstElementChild=function(a){return void 0!==a.firstElementChild?a.firstElementChild:tn_.dom.getNextElementNode_(a.firstChild,!0)};tn_.dom.getLastElementChild=function(a){return void 0!==a.lastElementChild?a.lastElementChild:tn_.dom.getNextElementNode_(a.lastChild,!1)};
tn_.dom.getNextElementSibling=function(a){return void 0!==a.nextElementSibling?a.nextElementSibling:tn_.dom.getNextElementNode_(a.nextSibling,!0)};tn_.dom.getPreviousElementSibling=function(a){return void 0!==a.previousElementSibling?a.previousElementSibling:tn_.dom.getNextElementNode_(a.previousSibling,!1)};tn_.dom.getNextElementNode_=function(a,b){for(;a&&a.nodeType!=tn_.dom.NodeType.ELEMENT;)a=b?a.nextSibling:a.previousSibling;return a};
tn_.dom.getNextNode=function(a){if(!a)return null;if(a.firstChild)return a.firstChild;for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null};tn_.dom.getPreviousNode=function(a){if(!a)return null;if(!a.previousSibling)return a.parentNode;for(a=a.previousSibling;a&&a.lastChild;)a=a.lastChild;return a};tn_.dom.isNodeLike=function(a){return tn_.isObject(a)&&0<a.nodeType};tn_.dom.isElement=function(a){return tn_.isObject(a)&&a.nodeType==tn_.dom.NodeType.ELEMENT};
tn_.dom.isWindow=function(a){return tn_.isObject(a)&&a.window==a};tn_.dom.getParentElement=function(a){if(tn_.dom.BrowserFeature.CAN_USE_PARENT_ELEMENT_PROPERTY){var b=tn_.userAgent.IE&&tn_.userAgent.isVersionOrHigher("9")&&!tn_.userAgent.isVersionOrHigher("10");if(!(b&&tn_.global.SVGElement&&a instanceof tn_.global.SVGElement)&&(b=a.parentElement))return b}b=a.parentNode;return tn_.dom.isElement(b)?b:null};
tn_.dom.contains=function(a,b){if(!a||!b)return!1;if(a.contains&&b.nodeType==tn_.dom.NodeType.ELEMENT)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};
tn_.dom.compareNodeOrder=function(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(tn_.userAgent.IE&&!tn_.userAgent.isDocumentModeOrHigher(9)){if(a.nodeType==tn_.dom.NodeType.DOCUMENT)return-1;if(b.nodeType==tn_.dom.NodeType.DOCUMENT)return 1}if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=a.nodeType==tn_.dom.NodeType.ELEMENT,d=b.nodeType==tn_.dom.NodeType.ELEMENT;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,
f=b.parentNode;return e==f?tn_.dom.compareSiblingOrder_(a,b):!c&&tn_.dom.contains(e,b)?-1*tn_.dom.compareParentsDescendantNodeIe_(a,b):!d&&tn_.dom.contains(f,a)?tn_.dom.compareParentsDescendantNodeIe_(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=tn_.dom.getOwnerDocument(a);c=d.createRange();c.selectNode(a);c.collapse(!0);a=d.createRange();a.selectNode(b);a.collapse(!0);return c.compareBoundaryPoints(tn_.global.Range.START_TO_END,a)};
tn_.dom.compareParentsDescendantNodeIe_=function(a,b){var c=a.parentNode;if(c==b)return-1;for(;b.parentNode!=c;)b=b.parentNode;return tn_.dom.compareSiblingOrder_(b,a)};tn_.dom.compareSiblingOrder_=function(a,b){for(;b=b.previousSibling;)if(b==a)return-1;return 1};
tn_.dom.findCommonAncestor=function(a){var b,c=arguments.length;if(!c)return null;if(1==c)return arguments[0];var d=[],e=Infinity;for(b=0;b<c;b++){for(var f=[],g=arguments[b];g;)f.unshift(g),g=g.parentNode;d.push(f);e=Math.min(e,f.length)}f=null;for(b=0;b<e;b++){g=d[0][b];for(var l=1;l<c;l++)if(g!=d[l][b])return f;f=g}return f};tn_.dom.isInDocument=function(a){return 16==(a.ownerDocument.compareDocumentPosition(a)&16)};
tn_.dom.getOwnerDocument=function(a){tn_.asserts.assert(a,"Node cannot be null or undefined.");return a.nodeType==tn_.dom.NodeType.DOCUMENT?a:a.ownerDocument||a.document};tn_.dom.getFrameContentDocument=function(a){return a.contentDocument||a.contentWindow.document};tn_.dom.getFrameContentWindow=function(a){try{return a.contentWindow||(a.contentDocument?tn_.dom.getWindow(a.contentDocument):null)}catch(b){}return null};
tn_.dom.setTextContent=function(a,b){tn_.asserts.assert(null!=a,"goog.dom.setTextContent expects a non-null value for node");if("textContent"in a)a.textContent=b;else if(a.nodeType==tn_.dom.NodeType.TEXT)a.data=String(b);else if(a.firstChild&&a.firstChild.nodeType==tn_.dom.NodeType.TEXT){for(;a.lastChild!=a.firstChild;)a.removeChild(tn_.asserts.assert(a.lastChild));a.firstChild.data=String(b)}else{tn_.dom.removeChildren(a);var c=tn_.dom.getOwnerDocument(a);a.appendChild(c.createTextNode(String(b)))}};
tn_.dom.getOuterHtml=function(a){tn_.asserts.assert(null!==a,"goog.dom.getOuterHtml expects a non-null value for element");if("outerHTML"in a)return a.outerHTML;var b=tn_.dom.getOwnerDocument(a);b=tn_.dom.createElement_(b,"DIV");b.appendChild(a.cloneNode(!0));return b.innerHTML};tn_.dom.findNode=function(a,b){var c=[];return(a=tn_.dom.findNodes_(a,b,c,!0))?c[0]:void 0};tn_.dom.findNodes=function(a,b){var c=[];tn_.dom.findNodes_(a,b,c,!1);return c};
tn_.dom.findNodes_=function(a,b,c,d){if(null!=a)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||tn_.dom.findNodes_(a,b,c,d))return!0;a=a.nextSibling}return!1};tn_.dom.findElement=function(a,b){for(a=tn_.dom.getChildrenReverse_(a);0<a.length;){var c=a.pop();if(b(c))return c;for(c=c.lastElementChild;c;c=c.previousElementSibling)a.push(c)}return null};
tn_.dom.findElements=function(a,b){var c=[];for(a=tn_.dom.getChildrenReverse_(a);0<a.length;){var d=a.pop();b(d)&&c.push(d);for(d=d.lastElementChild;d;d=d.previousElementSibling)a.push(d)}return c};tn_.dom.getChildrenReverse_=function(a){if(a.nodeType==tn_.dom.NodeType.DOCUMENT)return[a.documentElement];var b=[];for(a=a.lastElementChild;a;a=a.previousElementSibling)b.push(a);return b};tn_.dom.TAGS_TO_IGNORE_={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1};tn_.dom.PREDEFINED_TAG_VALUES_={IMG:" ",BR:"\n"};
tn_.dom.isFocusableTabIndex=function(a){return tn_.dom.hasSpecifiedTabIndex_(a)&&tn_.dom.isTabIndexFocusable_(a)};tn_.dom.setFocusableTabIndex=function(a,b){b?a.tabIndex=0:(a.tabIndex=-1,a.removeAttribute("tabIndex"))};tn_.dom.isFocusable=function(a){var b;return(b=tn_.dom.nativelySupportsFocus_(a)?!a.disabled&&(!tn_.dom.hasSpecifiedTabIndex_(a)||tn_.dom.isTabIndexFocusable_(a)):tn_.dom.isFocusableTabIndex(a))&&tn_.userAgent.IE?tn_.dom.hasNonZeroBoundingRect_(a):b};
tn_.dom.hasSpecifiedTabIndex_=function(a){return tn_.userAgent.IE&&!tn_.userAgent.isVersionOrHigher("9")?(a=a.getAttributeNode("tabindex"),null!=a&&a.specified):a.hasAttribute("tabindex")};tn_.dom.isTabIndexFocusable_=function(a){a=a.tabIndex;return"number"===typeof a&&0<=a&&32768>a};tn_.dom.nativelySupportsFocus_=function(a){return"A"==a.tagName&&a.hasAttribute("href")||"INPUT"==a.tagName||"TEXTAREA"==a.tagName||"SELECT"==a.tagName||"BUTTON"==a.tagName};
tn_.dom.hasNonZeroBoundingRect_=function(a){a=!tn_.isFunction(a.getBoundingClientRect)||tn_.userAgent.IE&&null==a.parentElement?{height:a.offsetHeight,width:a.offsetWidth}:a.getBoundingClientRect();return null!=a&&0<a.height&&0<a.width};
tn_.dom.getTextContent=function(a){if(tn_.dom.BrowserFeature.CAN_USE_INNER_TEXT&&null!==a&&"innerText"in a)a=tn_.string.canonicalizeNewlines(a.innerText);else{var b=[];tn_.dom.getTextContent_(a,b,!0);a=b.join("")}a=a.replace(/ \xAD /g," ").replace(/\xAD/g,"");a=a.replace(/\u200B/g,"");tn_.dom.BrowserFeature.CAN_USE_INNER_TEXT||(a=a.replace(/ +/g," "));" "!=a&&(a=a.replace(/^\s*/,""));return a};tn_.dom.getRawTextContent=function(a){var b=[];tn_.dom.getTextContent_(a,b,!1);return b.join("")};
tn_.dom.getTextContent_=function(a,b,c){if(!(a.nodeName in tn_.dom.TAGS_TO_IGNORE_))if(a.nodeType==tn_.dom.NodeType.TEXT)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in tn_.dom.PREDEFINED_TAG_VALUES_)b.push(tn_.dom.PREDEFINED_TAG_VALUES_[a.nodeName]);else for(a=a.firstChild;a;)tn_.dom.getTextContent_(a,b,c),a=a.nextSibling};tn_.dom.getNodeTextLength=function(a){return tn_.dom.getTextContent(a).length};
tn_.dom.getNodeTextOffset=function(a,b){b=b||tn_.dom.getOwnerDocument(a).body;for(var c=[];a&&a!=b;){for(var d=a;d=d.previousSibling;)c.unshift(tn_.dom.getTextContent(d));a=a.parentNode}return tn_.string.trimLeft(c.join("")).replace(/ +/g," ").length};
tn_.dom.getNodeAtOffset=function(a,b,c){a=[a];for(var d=0,e=null;0<a.length&&d<b;)if(e=a.pop(),!(e.nodeName in tn_.dom.TAGS_TO_IGNORE_))if(e.nodeType==tn_.dom.NodeType.TEXT){var f=e.nodeValue.replace(/(\r\n|\r|\n)/g,"").replace(/ +/g," ");d+=f.length}else if(e.nodeName in tn_.dom.PREDEFINED_TAG_VALUES_)d+=tn_.dom.PREDEFINED_TAG_VALUES_[e.nodeName].length;else for(f=e.childNodes.length-1;0<=f;f--)a.push(e.childNodes[f]);tn_.isObject(c)&&(c.remainder=e?e.nodeValue.length+b-d-1:0,c.node=e);return e};
tn_.dom.isNodeList=function(a){if(a&&"number"==typeof a.length){if(tn_.isObject(a))return"function"==typeof a.item||"string"==typeof a.item;if(tn_.isFunction(a))return"function"==typeof a.item}return!1};tn_.dom.getAncestorByTagNameAndClass=function(a,b,c,d){if(!b&&!c)return null;var e=b?String(b).toUpperCase():null;return tn_.dom.getAncestor(a,function(f){return(!e||f.nodeName==e)&&(!c||"string"===typeof f.className&&tn_.array.contains(f.className.split(/\s+/),c))},!0,d)};
tn_.dom.getAncestorByClass=function(a,b,c){return tn_.dom.getAncestorByTagNameAndClass(a,null,b,c)};tn_.dom.getAncestor=function(a,b,c,d){a&&!c&&(a=a.parentNode);for(c=0;a&&(null==d||c<=d);){tn_.asserts.assert("parentNode"!=a.name);if(b(a))return a;a=a.parentNode;c++}return null};tn_.dom.getActiveElement=function(a){try{var b=a&&a.activeElement;return b&&b.nodeName?b:null}catch(c){return null}};
tn_.dom.getPixelRatio=function(){var a=tn_.dom.getWindow();return void 0!==a.devicePixelRatio?a.devicePixelRatio:a.matchMedia?tn_.dom.matchesPixelRatio_(3)||tn_.dom.matchesPixelRatio_(2)||tn_.dom.matchesPixelRatio_(1.5)||tn_.dom.matchesPixelRatio_(1)||.75:1};tn_.dom.matchesPixelRatio_=function(a){var b=tn_.dom.getWindow(),c="(min-resolution: "+a+"dppx),(min--moz-device-pixel-ratio: "+a+"),(min-resolution: "+96*a+"dpi)";return b.matchMedia(c).matches?a:0};tn_.dom.getCanvasContext2D=function(a){return a.getContext("2d")};
tn_.dom.DomHelper=function(a){this.document_=a||tn_.global.document||document};tn_a=tn_.dom.DomHelper.prototype;tn_a.getDomHelper=tn_.dom.getDomHelper;tn_a.getDocument=function(){return this.document_};tn_a.getElement=function(a){return tn_.dom.getElementHelper_(this.document_,a)};tn_a.getRequiredElement=function(a){return tn_.dom.getRequiredElementHelper_(this.document_,a)};tn_a.$=tn_.dom.DomHelper.prototype.getElement;tn_a.getElementsByTagName=function(a,b){b=b||this.document_;return b.getElementsByTagName(String(a))};
tn_a.getElementsByTagNameAndClass=function(a,b,c){return tn_.dom.getElementsByTagNameAndClass_(this.document_,a,b,c)};tn_a.getElementByTagNameAndClass=function(a,b,c){return tn_.dom.getElementByTagNameAndClass_(this.document_,a,b,c)};tn_a.getElementsByClass=function(a,b){b=b||this.document_;return tn_.dom.getElementsByClass(a,b)};tn_a.getElementByClass=function(a,b){b=b||this.document_;return tn_.dom.getElementByClass(a,b)};
tn_a.getRequiredElementByClass=function(a,b){b=b||this.document_;return tn_.dom.getRequiredElementByClass(a,b)};tn_a.$$=tn_.dom.DomHelper.prototype.getElementsByTagNameAndClass;tn_a.setProperties=tn_.dom.setProperties;tn_a.getViewportSize=function(a){return tn_.dom.getViewportSize(a||this.getWindow())};tn_a.getDocumentHeight=function(){return tn_.dom.getDocumentHeight_(this.getWindow())};tn_a.createDom=function(a,b,c){return tn_.dom.createDom_(this.document_,arguments)};tn_a.$dom=tn_.dom.DomHelper.prototype.createDom;
tn_a.createElement=function(a){return tn_.dom.createElement_(this.document_,a)};tn_a.createTextNode=function(a){return this.document_.createTextNode(String(a))};tn_a.createTable=function(a,b,c){return tn_.dom.createTable_(this.document_,a,b,!!c)};tn_a.safeHtmlToNode=function(a){return tn_.dom.safeHtmlToNode_(this.document_,a)};tn_a.isCss1CompatMode=function(){return tn_.dom.isCss1CompatMode_(this.document_)};tn_a.getWindow=function(){return tn_.dom.getWindow_(this.document_)};
tn_a.getDocumentScrollElement=function(){return tn_.dom.getDocumentScrollElement_(this.document_)};tn_a.getDocumentScroll=function(){return tn_.dom.getDocumentScroll_(this.document_)};tn_a.getActiveElement=function(a){return tn_.dom.getActiveElement(a||this.document_)};tn_a.appendChild=tn_.dom.appendChild;tn_a.append=tn_.dom.append;tn_a.canHaveChildren=tn_.dom.canHaveChildren;tn_a.removeChildren=tn_.dom.removeChildren;tn_a.insertSiblingBefore=tn_.dom.insertSiblingBefore;tn_a.insertSiblingAfter=tn_.dom.insertSiblingAfter;
tn_a.insertChildAt=tn_.dom.insertChildAt;tn_a.removeNode=tn_.dom.removeNode;tn_a.replaceNode=tn_.dom.replaceNode;tn_a.flattenElement=tn_.dom.flattenElement;tn_a.getChildren=tn_.dom.getChildren;tn_a.getFirstElementChild=tn_.dom.getFirstElementChild;tn_a.getLastElementChild=tn_.dom.getLastElementChild;tn_a.getNextElementSibling=tn_.dom.getNextElementSibling;tn_a.getPreviousElementSibling=tn_.dom.getPreviousElementSibling;tn_a.getNextNode=tn_.dom.getNextNode;tn_a.getPreviousNode=tn_.dom.getPreviousNode;
tn_a.isNodeLike=tn_.dom.isNodeLike;tn_a.isElement=tn_.dom.isElement;tn_a.isWindow=tn_.dom.isWindow;tn_a.getParentElement=tn_.dom.getParentElement;tn_a.contains=tn_.dom.contains;tn_a.compareNodeOrder=tn_.dom.compareNodeOrder;tn_a.findCommonAncestor=tn_.dom.findCommonAncestor;tn_a.getOwnerDocument=tn_.dom.getOwnerDocument;tn_a.getFrameContentDocument=tn_.dom.getFrameContentDocument;tn_a.getFrameContentWindow=tn_.dom.getFrameContentWindow;tn_a.setTextContent=tn_.dom.setTextContent;
tn_a.getOuterHtml=tn_.dom.getOuterHtml;tn_a.findNode=tn_.dom.findNode;tn_a.findNodes=tn_.dom.findNodes;tn_a.isFocusableTabIndex=tn_.dom.isFocusableTabIndex;tn_a.setFocusableTabIndex=tn_.dom.setFocusableTabIndex;tn_a.isFocusable=tn_.dom.isFocusable;tn_a.getTextContent=tn_.dom.getTextContent;tn_a.getNodeTextLength=tn_.dom.getNodeTextLength;tn_a.getNodeTextOffset=tn_.dom.getNodeTextOffset;tn_a.getNodeAtOffset=tn_.dom.getNodeAtOffset;tn_a.isNodeList=tn_.dom.isNodeList;
tn_a.getAncestorByTagNameAndClass=tn_.dom.getAncestorByTagNameAndClass;tn_a.getAncestorByClass=tn_.dom.getAncestorByClass;tn_a.getAncestor=tn_.dom.getAncestor;tn_a.getCanvasContext2D=tn_.dom.getCanvasContext2D;tn_.dom.InputType={BUTTON:"button",CHECKBOX:"checkbox",COLOR:"color",DATE:"date",DATETIME:"datetime",DATETIME_LOCAL:"datetime-local",EMAIL:"email",FILE:"file",HIDDEN:"hidden",IMAGE:"image",MENU:"menu",MONTH:"month",NUMBER:"number",PASSWORD:"password",RADIO:"radio",RANGE:"range",RESET:"reset",SEARCH:"search",SELECT_MULTIPLE:"select-multiple",SELECT_ONE:"select-one",SUBMIT:"submit",TEL:"tel",TEXT:"text",TEXTAREA:"textarea",TIME:"time",URL:"url",WEEK:"week"};tn_.iter={};tn_.iter.StopIteration="StopIteration"in tn_.global?tn_.global.StopIteration:{message:"StopIteration",stack:""};tn_.iter.Iterator=function(){};tn_.iter.Iterator.prototype.next=function(){throw tn_.iter.StopIteration;};tn_.iter.Iterator.prototype.__iterator__=function(){return this};
tn_.iter.toIterator=function(a){if(a instanceof tn_.iter.Iterator)return a;if("function"==typeof a.__iterator__)return a.__iterator__(!1);if(tn_.isArrayLike(a)){var b=a,c=0;a=new tn_.iter.Iterator;a.next=function(){for(;;){if(c>=b.length)throw tn_.iter.StopIteration;if(c in b)return b[c++];c++}};return a}throw Error("Not implemented");};
tn_.iter.forEach=function(a,b,c){if(tn_.isArrayLike(a))try{tn_.array.forEach(a,b,c)}catch(d){if(d!==tn_.iter.StopIteration)throw d;}else{a=tn_.iter.toIterator(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(d){if(d!==tn_.iter.StopIteration)throw d;}}};tn_.iter.filter=function(a,b,c){var d=tn_.iter.toIterator(a);a=new tn_.iter.Iterator;a.next=function(){for(;;){var e=d.next();if(b.call(c,e,void 0,d))return e}};return a};
tn_.iter.filterFalse=function(a,b,c){return tn_.iter.filter(a,tn_.functions.not(b),c)};tn_.iter.range=function(a,b,c){var d=0,e=a,f=c||1;1<arguments.length&&(d=a,e=+b);if(0==f)throw Error("Range step argument must not be zero");var g=new tn_.iter.Iterator;g.next=function(){if(0<f&&d>=e||0>f&&d<=e)throw tn_.iter.StopIteration;var l=d;d+=f;return l};return g};tn_.iter.join=function(a,b){return tn_.iter.toArray(a).join(b)};
tn_.iter.map=function(a,b,c){var d=tn_.iter.toIterator(a);a=new tn_.iter.Iterator;a.next=function(){var e=d.next();return b.call(c,e,void 0,d)};return a};tn_.iter.reduce=function(a,b,c,d){var e=c;tn_.iter.forEach(a,function(f){e=b.call(d,e,f)});return e};tn_.iter.some=function(a,b,c){a=tn_.iter.toIterator(a);try{for(;;)if(b.call(c,a.next(),void 0,a))return!0}catch(d){if(d!==tn_.iter.StopIteration)throw d;}return!1};
tn_.iter.every=function(a,b,c){a=tn_.iter.toIterator(a);try{for(;;)if(!b.call(c,a.next(),void 0,a))return!1}catch(d){if(d!==tn_.iter.StopIteration)throw d;}return!0};tn_.iter.chain=function(a){return tn_.iter.chainFromIterable(arguments)};tn_.iter.chainFromIterable=function(a){var b=tn_.iter.toIterator(a);a=new tn_.iter.Iterator;var c=null;a.next=function(){for(;;){if(null==c){var d=b.next();c=tn_.iter.toIterator(d)}try{return c.next()}catch(e){if(e!==tn_.iter.StopIteration)throw e;c=null}}};return a};
tn_.iter.dropWhile=function(a,b,c){var d=tn_.iter.toIterator(a);a=new tn_.iter.Iterator;var e=!0;a.next=function(){for(;;){var f=d.next();if(!e||!b.call(c,f,void 0,d))return e=!1,f}};return a};tn_.iter.takeWhile=function(a,b,c){var d=tn_.iter.toIterator(a);a=new tn_.iter.Iterator;a.next=function(){var e=d.next();if(b.call(c,e,void 0,d))return e;throw tn_.iter.StopIteration;};return a};
tn_.iter.toArray=function(a){if(tn_.isArrayLike(a))return tn_.array.toArray(a);a=tn_.iter.toIterator(a);var b=[];tn_.iter.forEach(a,function(c){b.push(c)});return b};tn_.iter.equals=function(a,b,c){var d={};a=tn_.iter.zipLongest(d,a,b);var e=c||tn_.array.defaultCompareEquality;return tn_.iter.every(a,function(f){return e(f[0],f[1])})};tn_.iter.nextOrValue=function(a,b){try{return tn_.iter.toIterator(a).next()}catch(c){if(c!=tn_.iter.StopIteration)throw c;return b}};
tn_.iter.product=function(a){var b=tn_.array.some(arguments,function(e){return!e.length});if(b||!arguments.length)return new tn_.iter.Iterator;b=new tn_.iter.Iterator;var c=arguments,d=tn_.array.repeat(0,c.length);b.next=function(){if(d){for(var e=tn_.array.map(d,function(g,l){return c[l][g]}),f=d.length-1;0<=f;f--){tn_.asserts.assert(d);if(d[f]<c[f].length-1){d[f]++;break}if(0==f){d=null;break}d[f]=0}return e}throw tn_.iter.StopIteration;};return b};
tn_.iter.cycle=function(a){var b=tn_.iter.toIterator(a),c=[],d=0;a=new tn_.iter.Iterator;var e=!1;a.next=function(){var f=null;if(!e)try{return f=b.next(),c.push(f),f}catch(g){if(g!=tn_.iter.StopIteration||tn_.array.isEmpty(c))throw g;e=!0}f=c[d];d=(d+1)%c.length;return f};return a};tn_.iter.count=function(a,b){var c=a||0,d=void 0!==b?b:1;a=new tn_.iter.Iterator;a.next=function(){var e=c;c+=d;return e};return a};
tn_.iter.repeat=function(a){var b=new tn_.iter.Iterator;b.next=tn_.functions.constant(a);return b};tn_.iter.accumulate=function(a){var b=tn_.iter.toIterator(a),c=0;a=new tn_.iter.Iterator;a.next=function(){return c+=b.next()};return a};tn_.iter.zip=function(a){var b=arguments,c=new tn_.iter.Iterator;if(0<b.length){var d=tn_.array.map(b,tn_.iter.toIterator);c.next=function(){var e=tn_.array.map(d,function(f){return f.next()});return e}}return c};
tn_.iter.zipLongest=function(a,b){var c=tn_.array.slice(arguments,1),d=new tn_.iter.Iterator;if(0<c.length){var e=tn_.array.map(c,tn_.iter.toIterator);d.next=function(){var f=!1,g=tn_.array.map(e,function(l){try{var n=l.next();f=!0}catch(k){if(k!==tn_.iter.StopIteration)throw k;n=a}return n});if(!f)throw tn_.iter.StopIteration;return g}}return d};tn_.iter.compress=function(a,b){var c=tn_.iter.toIterator(b);return tn_.iter.filter(a,function(){return!!c.next()})};
tn_.iter.GroupByIterator_=function(a,b){this.iterator=tn_.iter.toIterator(a);this.keyFunc=b||tn_.functions.identity};tn_.inherits(tn_.iter.GroupByIterator_,tn_.iter.Iterator);tn_.iter.GroupByIterator_.prototype.next=function(){for(;this.currentKey==this.targetKey;)this.currentValue=this.iterator.next(),this.currentKey=this.keyFunc(this.currentValue);this.targetKey=this.currentKey;return[this.currentKey,this.groupItems_(this.targetKey)]};
tn_.iter.GroupByIterator_.prototype.groupItems_=function(a){for(var b=[];this.currentKey==a;){b.push(this.currentValue);try{this.currentValue=this.iterator.next()}catch(c){if(c!==tn_.iter.StopIteration)throw c;break}this.currentKey=this.keyFunc(this.currentValue)}return b};tn_.iter.groupBy=function(a,b){return new tn_.iter.GroupByIterator_(a,b)};
tn_.iter.starMap=function(a,b,c){var d=tn_.iter.toIterator(a);a=new tn_.iter.Iterator;a.next=function(){var e=tn_.iter.toArray(d.next());return b.apply(c,tn_.array.concat(e,void 0,d))};return a};
tn_.iter.tee=function(a,b){var c=tn_.iter.toIterator(a);a="number"===typeof b?b:2;var d=tn_.array.map(tn_.array.range(a),function(){return[]}),e=function(){var f=c.next();tn_.array.forEach(d,function(g){g.push(f)})};a=function(f){var g=new tn_.iter.Iterator;g.next=function(){tn_.array.isEmpty(f)&&e();tn_.asserts.assert(!tn_.array.isEmpty(f));return f.shift()};return g};return tn_.array.map(d,a)};tn_.iter.enumerate=function(a,b){return tn_.iter.zip(tn_.iter.count(b),a)};
tn_.iter.limit=function(a,b){tn_.asserts.assert(tn_.math.isInt(b)&&0<=b);var c=tn_.iter.toIterator(a);a=new tn_.iter.Iterator;var d=b;a.next=function(){if(0<d--)return c.next();throw tn_.iter.StopIteration;};return a};tn_.iter.consume=function(a,b){tn_.asserts.assert(tn_.math.isInt(b)&&0<=b);for(a=tn_.iter.toIterator(a);0<b--;)tn_.iter.nextOrValue(a,null);return a};
tn_.iter.slice=function(a,b,c){tn_.asserts.assert(tn_.math.isInt(b)&&0<=b);a=tn_.iter.consume(a,b);"number"===typeof c&&(tn_.asserts.assert(tn_.math.isInt(c)&&c>=b),a=tn_.iter.limit(a,c-b));return a};tn_.iter.hasDuplicates_=function(a){var b=[];tn_.array.removeDuplicates(a,b);return a.length!=b.length};tn_.iter.permutations=function(a,b){a=tn_.iter.toArray(a);b="number"===typeof b?b:a.length;b=tn_.array.repeat(a,b);b=tn_.iter.product.apply(void 0,b);return tn_.iter.filter(b,function(c){return!tn_.iter.hasDuplicates_(c)})};
tn_.iter.combinations=function(a,b){function c(f){return d[f]}var d=tn_.iter.toArray(a);a=tn_.iter.range(d.length);b=tn_.iter.permutations(a,b);var e=tn_.iter.filter(b,function(f){return tn_.array.isSorted(f)});b=new tn_.iter.Iterator;b.next=function(){return tn_.array.map(e.next(),c)};return b};
tn_.iter.combinationsWithReplacement=function(a,b){function c(f){return d[f]}var d=tn_.iter.toArray(a);a=tn_.array.range(d.length);b=tn_.array.repeat(a,b);b=tn_.iter.product.apply(void 0,b);var e=tn_.iter.filter(b,function(f){return tn_.array.isSorted(f)});b=new tn_.iter.Iterator;b.next=function(){return tn_.array.map(e.next(),c)};return b};tn_.dom.TagWalkType={START_TAG:1,OTHER:0,END_TAG:-1};tn_.dom.TagIterator=function(a,b,c,d,e){this.reversed=!!b;this.node=null;this.tagType=tn_.dom.TagWalkType.OTHER;this.started_=!1;this.constrained=!c;a&&this.setPosition(a,d);this.depth=void 0!=e?e:this.tagType||0;this.reversed&&(this.depth*=-1)};tn_.inherits(tn_.dom.TagIterator,tn_.iter.Iterator);tn_a=tn_.dom.TagIterator.prototype;
tn_a.setPosition=function(a,b,c){if(this.node=a)this.tagType="number"===typeof b?b:this.node.nodeType!=tn_.dom.NodeType.ELEMENT?tn_.dom.TagWalkType.OTHER:this.reversed?tn_.dom.TagWalkType.END_TAG:tn_.dom.TagWalkType.START_TAG;"number"===typeof c&&(this.depth=c)};tn_a.clone=function(){return new tn_.dom.TagIterator(this.node,this.reversed,!this.constrained,this.tagType,this.depth)};
tn_a.restartTag=function(){var a=this.reversed?tn_.dom.TagWalkType.START_TAG:tn_.dom.TagWalkType.END_TAG;this.tagType==a&&(this.tagType=-1*a,this.depth+=this.tagType*(this.reversed?-1:1))};
tn_a.next=function(){if(this.started_){if(!this.node||this.constrained&&0==this.depth)throw tn_.iter.StopIteration;var a=this.node;var b=this.reversed?tn_.dom.TagWalkType.END_TAG:tn_.dom.TagWalkType.START_TAG;if(this.tagType==b){var c=this.reversed?a.lastChild:a.firstChild;c?this.setPosition(c):this.setPosition(a,-1*b)}else(c=this.reversed?a.previousSibling:a.nextSibling)?this.setPosition(c):this.setPosition(a.parentNode,-1*b);this.depth+=this.tagType*(this.reversed?-1:1)}else this.started_=!0;a=
this.node;if(!this.node)throw tn_.iter.StopIteration;return a};tn_a.isEndTag=function(){return this.tagType==tn_.dom.TagWalkType.END_TAG};tn_a.equals=function(a){return a.node==this.node&&(!this.node||a.tagType==this.tagType)};
tn_a.splice=function(a){var b=this.node;this.restartTag();this.reversed=!this.reversed;tn_.dom.TagIterator.prototype.next.call(this);this.reversed=!this.reversed;for(var c=tn_.isArrayLike(arguments[0])?arguments[0]:arguments,d=c.length-1;0<=d;d--)tn_.dom.insertSiblingAfter(c[d],b);tn_.dom.removeNode(b)};tn_.dom.NodeIterator=function(a,b,c,d){tn_.dom.TagIterator.call(this,a,b,c,null,d)};tn_.inherits(tn_.dom.NodeIterator,tn_.dom.TagIterator);tn_.dom.NodeIterator.prototype.next=function(){do tn_.dom.NodeIterator.superClass_.next.call(this);while(this.isEndTag());return this.node};tn_.userAgent.product={};tn_.userAgent.product.ASSUME_FIREFOX=!1;tn_.userAgent.product.ASSUME_IPHONE=!1;tn_.userAgent.product.ASSUME_IPAD=!1;tn_.userAgent.product.ASSUME_ANDROID=!1;tn_.userAgent.product.ASSUME_CHROME=!1;tn_.userAgent.product.ASSUME_SAFARI=!1;
tn_.userAgent.product.PRODUCT_KNOWN_=tn_.userAgent.ASSUME_IE||tn_.userAgent.ASSUME_EDGE||tn_.userAgent.ASSUME_OPERA||tn_.userAgent.product.ASSUME_FIREFOX||tn_.userAgent.product.ASSUME_IPHONE||tn_.userAgent.product.ASSUME_IPAD||tn_.userAgent.product.ASSUME_ANDROID||tn_.userAgent.product.ASSUME_CHROME||tn_.userAgent.product.ASSUME_SAFARI;tn_.userAgent.product.OPERA=tn_.userAgent.OPERA;tn_.userAgent.product.IE=tn_.userAgent.IE;tn_.userAgent.product.EDGE=tn_.userAgent.EDGE;
tn_.userAgent.product.FIREFOX=tn_.userAgent.product.PRODUCT_KNOWN_?tn_.userAgent.product.ASSUME_FIREFOX:tn_.labs.userAgent.browser.isFirefox();tn_.userAgent.product.isIphoneOrIpod_=function(){return tn_.labs.userAgent.platform.isIphone()||tn_.labs.userAgent.platform.isIpod()};tn_.userAgent.product.IPHONE=tn_.userAgent.product.PRODUCT_KNOWN_?tn_.userAgent.product.ASSUME_IPHONE:tn_.userAgent.product.isIphoneOrIpod_();
tn_.userAgent.product.IPAD=tn_.userAgent.product.PRODUCT_KNOWN_?tn_.userAgent.product.ASSUME_IPAD:tn_.labs.userAgent.platform.isIpad();tn_.userAgent.product.ANDROID=tn_.userAgent.product.PRODUCT_KNOWN_?tn_.userAgent.product.ASSUME_ANDROID:tn_.labs.userAgent.browser.isAndroidBrowser();tn_.userAgent.product.CHROME=tn_.userAgent.product.PRODUCT_KNOWN_?tn_.userAgent.product.ASSUME_CHROME:tn_.labs.userAgent.browser.isChrome();
tn_.userAgent.product.isSafariDesktop_=function(){return tn_.labs.userAgent.browser.isSafari()&&!tn_.labs.userAgent.platform.isIos()};tn_.userAgent.product.SAFARI=tn_.userAgent.product.PRODUCT_KNOWN_?tn_.userAgent.product.ASSUME_SAFARI:tn_.userAgent.product.isSafariDesktop_();tn_.html.CssSpecificity={};var tn_Xc={};
function tn_Yc(a){if(tn_.userAgent.product.IE&&!tn_.userAgent.isVersionOrHigher(9))return[0,0,0,0];var b=tn_Xc.hasOwnProperty(a)?tn_Xc[a]:null;if(b)return b;65536<Object.keys(tn_Xc).length&&(tn_Xc={});b=a;var c=[0,0,0,0],d=/\\[0-9A-Fa-f]{6}\s?/g,e=/\\[0-9A-Fa-f]{1,5}\s/g,f=/\\./g;b=tn_Zc(b,d);b=tn_Zc(b,e);b=tn_Zc(b,f);d=/:not\(([^\)]*)\)/g;b=b.replace(d," $1 ");d=/{[^]*/gm;b=b.replace(d,"");d=/(\[[^\]]+\])/g;b=tn_F(b,c,d,2);d=/(#[^\#\s\+>~\.\[:]+)/g;b=tn_F(b,c,d,1);d=/(\.[^\s\+>~\.\[:]+)/g;b=
tn_F(b,c,d,2);d=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi;b=tn_F(b,c,d,3);d=/(:[\w-]+\([^\)]*\))/gi;b=tn_F(b,c,d,2);d=/(:[^\s\+>~\.\[:]+)/g;b=tn_F(b,c,d,2);b=b.replace(/[\*\s\+>~]/g," ");b=b.replace(/[#\.]/g," ");d=/([^\s\+>~\.\[:]+)/g;tn_F(b,c,d,3);b=c;return tn_Xc[a]=b}function tn_F(a,b,c,d){return a.replace(c,function(e){b[d]+=1;return Array(e.length+1).join(" ")})}function tn_Zc(a,b){return a.replace(b,function(c){return Array(c.length+1).join("A")})}
tn_.html.CssSpecificity.getSpecificity=tn_Yc;tn_.html.sanitizer={};tn_.html.sanitizer.CssPropertySanitizer={};
var tn__c={rgb:!0,rgba:!0,alpha:!0,rect:!0,image:!0,"linear-gradient":!0,"radial-gradient":!0,"repeating-linear-gradient":!0,"repeating-radial-gradient":!0,"cubic-bezier":!0,matrix:!0,perspective:!0,rotate:!0,rotate3d:!0,rotatex:!0,rotatey:!0,steps:!0,rotatez:!0,scale:!0,scale3d:!0,scalex:!0,scaley:!0,scalez:!0,skew:!0,skewx:!0,skewy:!0,translate:!0,translate3d:!0,translatex:!0,translatey:!0,translatez:!0},tn_0c=/[\n\f\r"'()*<>]/g,tn_1c={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",
")":"%29","*":"%2a","<":"%3c",">":"%3e"};function tn_2c(a){return tn_.asserts.assert(tn_1c[a])}
tn_.html.sanitizer.CssPropertySanitizer.sanitizeProperty=function(a,b,c){b=tn_.string.trim(b);if(""==b)return null;if(tn_.string.caseInsensitiveStartsWith(b,"url(")){if(!b.endsWith(")")||1<tn_.string.countOf(b,"(")||1<tn_.string.countOf(b,")")||!c)return null;b=tn_.string.stripQuotes(b.substring(4,b.length-1),"\"'");b=c?(b=c(b,a))&&tn_.html.SafeUrl.unwrap(b)!=tn_.html.SafeUrl.INNOCUOUS_STRING?'url("'+tn_.html.SafeUrl.unwrap(b).replace(tn_0c,tn_2c)+'")':null:null;return b}if(0<b.indexOf("(")){if(/"|'/.test(b))return null;
for(a=/([\-\w]+)\(/g;c=a.exec(b);)if(!(c[1].toLowerCase()in tn__c))return null}return b};tn_.html.sanitizer.noclobber={};function tn_G(a,b){a=tn_.global[a];return a&&a.prototype?(b=Object.getOwnPropertyDescriptor(a.prototype,b))&&b.get||null:null}function tn_H(a,b){return(a=tn_.global[a])&&a.prototype&&a.prototype[b]||null}
var tn_I={ATTRIBUTES_GETTER:tn_G("Element","attributes")||tn_G("Node","attributes"),HAS_ATTRIBUTE:tn_H("Element","hasAttribute"),GET_ATTRIBUTE:tn_H("Element","getAttribute"),SET_ATTRIBUTE:tn_H("Element","setAttribute"),REMOVE_ATTRIBUTE:tn_H("Element","removeAttribute"),INNER_HTML_GETTER:tn_G("Element","innerHTML")||tn_G("HTMLElement","innerHTML"),GET_ELEMENTS_BY_TAG_NAME:tn_H("Element","getElementsByTagName"),MATCHES:tn_H("Element","matches")||tn_H("Element","msMatchesSelector"),NODE_NAME_GETTER:tn_G("Node",
"nodeName"),NODE_TYPE_GETTER:tn_G("Node","nodeType"),PARENT_NODE_GETTER:tn_G("Node","parentNode"),CHILD_NODES_GETTER:tn_G("Node","childNodes"),APPEND_CHILD:tn_H("Node","appendChild"),STYLE_GETTER:tn_G("HTMLElement","style")||tn_G("Element","style"),SHEET_GETTER:tn_G("HTMLStyleElement","sheet"),GET_PROPERTY_VALUE:tn_H("CSSStyleDeclaration","getPropertyValue"),SET_PROPERTY:tn_H("CSSStyleDeclaration","setProperty")};
function tn_J(a,b,c,d){if(a)return a.apply(b);a=b[c];if(!d(a))throw Error("Clobbering detected");return a}function tn_K(a,b,c,d){if(a)return a.apply(b,d);if(tn_.userAgent.product.IE&&10>document.documentMode){if(!b[c].call)throw Error("IE Clobbering detected");}else if("function"!=typeof b[c])throw Error("Clobbering detected");return b[c].apply(b,d)}function tn_3c(a){return tn_J(tn_I.ATTRIBUTES_GETTER,a,"attributes",function(b){return b instanceof NamedNodeMap})}
function tn_4c(a,b){return tn_K(tn_I.HAS_ATTRIBUTE,a,"hasAttribute",[b])}function tn_5c(a,b){return tn_K(tn_I.GET_ATTRIBUTE,a,"getAttribute",[b])||null}function tn_6c(a,b,c){try{tn_K(tn_I.SET_ATTRIBUTE,a,"setAttribute",[b,c])}catch(d){if(-1==d.message.indexOf("A security problem occurred"))throw d;}}function tn_7c(a,b){tn_K(tn_I.REMOVE_ATTRIBUTE,a,"removeAttribute",[b])}function tn_8c(a){return tn_J(tn_I.INNER_HTML_GETTER,a,"innerHTML",function(b){return"string"==typeof b})}
function tn_9c(a){tn_$c(a);return tn_J(tn_I.STYLE_GETTER,a,"style",function(b){return b instanceof CSSStyleDeclaration})}function tn_$c(a){if(tn_.asserts.ENABLE_ASSERTS&&!(a instanceof HTMLElement))throw Error("Not an HTMLElement");}function tn_ad(a,b){return Array.from(tn_K(tn_I.GET_ELEMENTS_BY_TAG_NAME,a,"getElementsByTagName",[b]))}function tn_bd(a){tn_$c(a);return tn_J(tn_I.SHEET_GETTER,a,"sheet",function(b){return b instanceof CSSStyleSheet})}
function tn_cd(a,b){return tn_K(tn_I.MATCHES,a,a.matches?"matches":"msMatchesSelector",[b])}function tn_dd(a){tn_.asserts.ENABLE_ASSERTS&&!tn_ed(a)&&tn_.asserts.fail("Expected Node of type Element but got Node of type %s",tn_fd(a));return a}function tn_ed(a){return tn_fd(a)==tn_.dom.NodeType.ELEMENT}function tn_gd(a){return tn_J(tn_I.NODE_NAME_GETTER,a,"nodeName",function(b){return"string"==typeof b})}
function tn_fd(a){return tn_J(tn_I.NODE_TYPE_GETTER,a,"nodeType",function(b){return"number"==typeof b})}function tn_hd(a){return tn_J(tn_I.PARENT_NODE_GETTER,a,"parentNode",function(b){return!(b&&"string"==typeof b.name&&b.name&&"parentnode"==b.name.toLowerCase())})}function tn_id(a){return tn_J(tn_I.CHILD_NODES_GETTER,a,"childNodes",function(b){return b instanceof NodeList})}function tn_jd(a,b){return tn_K(tn_I.APPEND_CHILD,a,"appendChild",[b])}
function tn_kd(a,b){return tn_K(tn_I.GET_PROPERTY_VALUE,a,a.getPropertyValue?"getPropertyValue":"getAttribute",[b])||""}function tn_ld(a,b,c){tn_K(tn_I.SET_PROPERTY,a,a.setProperty?"setProperty":"setAttribute",[b,c])}tn_.html.sanitizer.noclobber.getElementAttributes=tn_3c;tn_.html.sanitizer.noclobber.hasElementAttribute=tn_4c;tn_.html.sanitizer.noclobber.getElementAttribute=tn_5c;tn_.html.sanitizer.noclobber.setElementAttribute=tn_6c;tn_.html.sanitizer.noclobber.removeElementAttribute=tn_7c;
tn_.html.sanitizer.noclobber.getElementInnerHTML=tn_8c;tn_.html.sanitizer.noclobber.getElementStyle=tn_9c;tn_.html.sanitizer.noclobber.getElementsByTagName=tn_ad;tn_.html.sanitizer.noclobber.getElementStyleSheet=tn_bd;tn_.html.sanitizer.noclobber.elementMatches=tn_cd;tn_.html.sanitizer.noclobber.assertNodeIsElement=tn_dd;tn_.html.sanitizer.noclobber.isNodeElement=tn_ed;tn_.html.sanitizer.noclobber.getNodeName=tn_gd;tn_.html.sanitizer.noclobber.getNodeType=tn_fd;
tn_.html.sanitizer.noclobber.getParentNode=tn_hd;tn_.html.sanitizer.noclobber.getChildNodes=tn_id;tn_.html.sanitizer.noclobber.appendNodeChild=tn_jd;tn_.html.sanitizer.noclobber.getCssPropertyValue=tn_kd;tn_.html.sanitizer.noclobber.setCssProperty=tn_ld;tn_.html.sanitizer.noclobber.Methods=tn_I;tn_.html.sanitizer.CssSanitizer={};tn_.html.sanitizer.CssSanitizer.SELECTOR_REGEX_=tn_.userAgent.IE&&10>document.documentMode?null:/\s*([^\s'",]+[^'",]*(('([^'\r\n\f\\]|\\[^])*')|("([^"\r\n\f\\]|\\[^])*")|[^'",])*)/g;tn_.html.sanitizer.CHROME_INCLUDE_VENDOR_PREFIX_WHITELIST_={"-webkit-border-horizontal-spacing":!0,"-webkit-border-vertical-spacing":!0};
tn_.html.sanitizer.CssSanitizer.withoutVendorPrefix_=function(a){return tn_.userAgent.WEBKIT&&a in tn_.html.sanitizer.CHROME_INCLUDE_VENDOR_PREFIX_WHITELIST_?a:a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/i,"")};
tn_.html.sanitizer.CssSanitizer.sanitizeStyleSheet_=function(a,b,c){var d=[];a=tn_.html.sanitizer.CssSanitizer.getOnlyStyleRules_(tn_.array.toArray(a.cssRules));tn_.array.forEach(a,function(e){if(b&&!/[a-zA-Z][\w-:\.]*/.test(b))throw Error("Invalid container id");if(!(b&&tn_.userAgent.product.IE&&10==document.documentMode&&/\\['"]/.test(e.selectorText))){var f=b?e.selectorText.replace(tn_.html.sanitizer.CssSanitizer.SELECTOR_REGEX_,"#"+b+" $1"):e.selectorText;d.push(tn_.html.SafeStyleSheet.createRule(f,
tn_.html.sanitizer.CssSanitizer.sanitizeInlineStyle(e.style,c)))}});return tn_.html.SafeStyleSheet.concat(d)};tn_.html.sanitizer.CssSanitizer.getOnlyStyleRules_=function(a){return tn_.array.filter(a,function(b){return b instanceof CSSStyleRule||b.type==CSSRule.STYLE_RULE})};
tn_.html.sanitizer.CssSanitizer.sanitizeStyleSheetString=function(a,b,c){a=tn_.html.sanitizer.CssSanitizer.safeParseHtmlAndGetInertElement("<style>"+a+"</style>");if(null==a||null==a.sheet)return tn_.html.SafeStyleSheet.EMPTY;b=void 0!=b?b:null;return tn_.html.sanitizer.CssSanitizer.sanitizeStyleSheet_(a.sheet,b,c)};
tn_.html.sanitizer.CssSanitizer.safeParseHtmlAndGetInertElement=function(a){if(tn_.userAgent.IE&&!tn_.userAgent.isVersionOrHigher(10)||"function"!=typeof tn_.global.DOMParser)return null;a=tn_.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(tn_.string.Const.from("Never attached to DOM."),"<html><head></head><body>"+a+"</body></html>");return tn_.dom.safe.parseFromStringHtml(new DOMParser,a).body.children[0]};
tn_.html.sanitizer.CssSanitizer.sanitizeInlineStyle=function(a,b){if(!a)return tn_.html.SafeStyle.EMPTY;var c=document.createElement("div").style,d=tn_.html.sanitizer.CssSanitizer.getCssPropNames_(a);tn_.array.forEach(d,function(e){var f=tn_.html.sanitizer.CssSanitizer.withoutVendorPrefix_(e);tn_.html.sanitizer.CssSanitizer.isDisallowedPropertyName_(f)||(e=tn_kd(a,e),e=tn_.html.sanitizer.CssPropertySanitizer.sanitizeProperty(f,e,b),null!=e&&tn_ld(c,f,e))});return tn_.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract(tn_.string.Const.from("Output of CSS sanitizer"),
c.cssText||"")};tn_.html.sanitizer.CssSanitizer.sanitizeInlineStyleString=function(a,b){if(tn_.userAgent.IE&&10>document.documentMode)return new tn_.html.SafeStyle;var c=tn_.html.sanitizer.CssSanitizer.createInertDocument_().createElement("DIV");c.style.cssText=a;return tn_.html.sanitizer.CssSanitizer.sanitizeInlineStyle(c.style,b)};
tn_.html.sanitizer.CssSanitizer.inlineStyleRules=function(a){var b=tn_ad(a,"STYLE"),c=tn_.array.concatMap(b,function(e){return tn_.array.toArray(tn_bd(e).cssRules)});c=tn_.html.sanitizer.CssSanitizer.getOnlyStyleRules_(c);c.sort(function(e,f){e=tn_Yc(e.selectorText);f=tn_Yc(f.selectorText);return-tn_.array.compare3(e,f)});a=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,null,!1);for(var d;d=a.nextNode();)tn_.array.forEach(c,function(e){tn_cd(d,e.selectorText)&&e.style&&tn_.html.sanitizer.CssSanitizer.mergeStyleDeclarations_(d,
e.style)});tn_.array.forEach(b,tn_.dom.removeNode)};tn_.html.sanitizer.CssSanitizer.mergeStyleDeclarations_=function(a,b){var c=tn_.html.sanitizer.CssSanitizer.getCssPropNames_(a.style),d=tn_.html.sanitizer.CssSanitizer.getCssPropNames_(b);tn_.array.forEach(d,function(e){if(!(0<=c.indexOf(e))){var f=tn_kd(b,e);tn_ld(a.style,e,f)}})};
tn_.html.sanitizer.CssSanitizer.createInertDocument_=function(){var a=document;"function"===typeof HTMLTemplateElement&&(a=tn_.dom.createElement("TEMPLATE").content.ownerDocument);return a.implementation.createHTMLDocument("")};tn_.html.sanitizer.CssSanitizer.getCssPropNames_=function(a){tn_.isArrayLike(a)?a=tn_.array.toArray(a):(a=tn_.object.getKeys(a),tn_.array.remove(a,"cssText"));return a};
tn_.html.sanitizer.CssSanitizer.isDisallowedPropertyName_=function(a){return tn_.string.startsWith(a,"--")||tn_.string.startsWith(a,"var")};tn_.dom.vendor={};tn_.dom.vendor.getVendorJsPrefix=function(){return tn_.userAgent.WEBKIT?"Webkit":tn_.userAgent.GECKO?"Moz":tn_.userAgent.IE?"ms":tn_.userAgent.OPERA?"O":null};tn_.dom.vendor.getVendorPrefix=function(){return tn_.userAgent.WEBKIT?"-webkit":tn_.userAgent.GECKO?"-moz":tn_.userAgent.IE?"-ms":tn_.userAgent.OPERA?"-o":null};
tn_.dom.vendor.getPrefixedPropertyName=function(a,b){if(b&&a in b)return a;var c=tn_.dom.vendor.getVendorJsPrefix();return c?(c=c.toLowerCase(),a=c+tn_.string.toTitleCase(a),void 0===b||a in b?a:null):null};tn_.dom.vendor.getPrefixedEventType=function(a){var b=tn_.dom.vendor.getVendorJsPrefix()||"";return(b+a).toLowerCase()};tn_.math.Box=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d};tn_.math.Box.boundingBox=function(a){for(var b=new tn_.math.Box(arguments[0].y,arguments[0].x,arguments[0].y,arguments[0].x),c=1;c<arguments.length;c++)b.expandToIncludeCoordinate(arguments[c]);return b};tn_.math.Box.prototype.clone=function(){return new tn_.math.Box(this.top,this.right,this.bottom,this.left)};
tn_.DEBUG&&(tn_.math.Box.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"});tn_.math.Box.prototype.contains=function(a){return tn_.math.Box.contains(this,a)};tn_.math.Box.prototype.expand=function(a,b,c,d){tn_.isObject(a)?(this.top-=a.top,this.right+=a.right,this.bottom+=a.bottom,this.left-=a.left):(this.top-=a,this.right+=Number(b),this.bottom+=Number(c),this.left-=Number(d));return this};
tn_.math.Box.prototype.expandToIncludeCoordinate=function(a){this.top=Math.min(this.top,a.y);this.right=Math.max(this.right,a.x);this.bottom=Math.max(this.bottom,a.y);this.left=Math.min(this.left,a.x)};tn_.math.Box.equals=function(a,b){return a==b?!0:a&&b?a.top==b.top&&a.right==b.right&&a.bottom==b.bottom&&a.left==b.left:!1};
tn_.math.Box.contains=function(a,b){return a&&b?b instanceof tn_.math.Box?b.left>=a.left&&b.right<=a.right&&b.top>=a.top&&b.bottom<=a.bottom:b.x>=a.left&&b.x<=a.right&&b.y>=a.top&&b.y<=a.bottom:!1};tn_.math.Box.relativePositionX=function(a,b){return b.x<a.left?b.x-a.left:b.x>a.right?b.x-a.right:0};tn_.math.Box.relativePositionY=function(a,b){return b.y<a.top?b.y-a.top:b.y>a.bottom?b.y-a.bottom:0};
tn_.math.Box.distance=function(a,b){var c=tn_.math.Box.relativePositionX(a,b);a=tn_.math.Box.relativePositionY(a,b);return Math.sqrt(c*c+a*a)};tn_.math.Box.intersects=function(a,b){return a.left<=b.right&&b.left<=a.right&&a.top<=b.bottom&&b.top<=a.bottom};tn_.math.Box.intersectsWithPadding=function(a,b,c){return a.left<=b.right+c&&b.left<=a.right+c&&a.top<=b.bottom+c&&b.top<=a.bottom+c};tn_a=tn_.math.Box.prototype;
tn_a.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};tn_a.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};tn_a.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};
tn_a.translate=function(a,b){a instanceof tn_.math.Coordinate?(this.left+=a.x,this.right+=a.x,this.top+=a.y,this.bottom+=a.y):(tn_.asserts.assertNumber(a),this.left+=a,this.right+=a,"number"===typeof b&&(this.top+=b,this.bottom+=b));return this};tn_a.scale=function(a,b){b="number"===typeof b?b:a;this.left*=a;this.right*=a;this.top*=b;this.bottom*=b;return this};tn_.math.IRect=function(){};tn_.math.Rect=function(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d};tn_.math.Rect.prototype.clone=function(){return new tn_.math.Rect(this.left,this.top,this.width,this.height)};tn_.math.Rect.createFromPositionAndSize=function(a,b){return new tn_.math.Rect(a.x,a.y,b.width,b.height)};tn_.math.Rect.createFromBox=function(a){return new tn_.math.Rect(a.left,a.top,a.right-a.left,a.bottom-a.top)};
tn_.DEBUG&&(tn_.math.Rect.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"});tn_.math.Rect.equals=function(a,b){return a==b?!0:a&&b?a.left==b.left&&a.width==b.width&&a.top==b.top&&a.height==b.height:!1};
tn_.math.Rect.prototype.intersection=function(a){var b=Math.max(this.left,a.left),c=Math.min(this.left+this.width,a.left+a.width);if(b<=c){var d=Math.max(this.top,a.top);a=Math.min(this.top+this.height,a.top+a.height);if(d<=a)return this.left=b,this.top=d,this.width=c-b,this.height=a-d,!0}return!1};
tn_.math.Rect.intersection=function(a,b){var c=Math.max(a.left,b.left),d=Math.min(a.left+a.width,b.left+b.width);if(c<=d){var e=Math.max(a.top,b.top);a=Math.min(a.top+a.height,b.top+b.height);if(e<=a)return new tn_.math.Rect(c,e,d-c,a-e)}return null};tn_.math.Rect.intersects=function(a,b){return a.left<=b.left+b.width&&b.left<=a.left+a.width&&a.top<=b.top+b.height&&b.top<=a.top+a.height};tn_.math.Rect.prototype.intersects=function(a){return tn_.math.Rect.intersects(this,a)};
tn_.math.Rect.difference=function(a,b){var c=tn_.math.Rect.intersection(a,b);if(!c||!c.height||!c.width)return[a.clone()];c=[];var d=a.top,e=a.height,f=a.left+a.width,g=a.top+a.height,l=b.left+b.width,n=b.top+b.height;b.top>a.top&&(c.push(new tn_.math.Rect(a.left,a.top,a.width,b.top-a.top)),d=b.top,e-=b.top-a.top);n<g&&(c.push(new tn_.math.Rect(a.left,n,a.width,g-n)),e=n-d);b.left>a.left&&c.push(new tn_.math.Rect(a.left,d,b.left-a.left,e));l<f&&c.push(new tn_.math.Rect(l,d,f-l,e));return c};
tn_.math.Rect.prototype.difference=function(a){return tn_.math.Rect.difference(this,a)};tn_.math.Rect.prototype.boundingRect=function(a){var b=Math.max(this.left+this.width,a.left+a.width),c=Math.max(this.top+this.height,a.top+a.height);this.left=Math.min(this.left,a.left);this.top=Math.min(this.top,a.top);this.width=b-this.left;this.height=c-this.top};tn_.math.Rect.boundingRect=function(a,b){if(!a||!b)return null;a=new tn_.math.Rect(a.left,a.top,a.width,a.height);a.boundingRect(b);return a};
tn_a=tn_.math.Rect.prototype;tn_a.contains=function(a){return a instanceof tn_.math.Coordinate?a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height:this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height};tn_a.squaredDistance=function(a){var b=a.x<this.left?this.left-a.x:Math.max(a.x-(this.left+this.width),0);a=a.y<this.top?this.top-a.y:Math.max(a.y-(this.top+this.height),0);return b*b+a*a};tn_a.distance=function(a){return Math.sqrt(this.squaredDistance(a))};
tn_a.getSize=function(){return new tn_.math.Size(this.width,this.height)};tn_a.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};tn_a.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
tn_a.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};tn_a.translate=function(a,b){a instanceof tn_.math.Coordinate?(this.left+=a.x,this.top+=a.y):(this.left+=tn_.asserts.assertNumber(a),"number"===typeof b&&(this.top+=b));return this};tn_a.scale=function(a,b){b="number"===typeof b?b:a;this.left*=a;this.width*=a;this.top*=b;this.height*=b;return this};tn_.style={};tn_.style.setStyle=function(a,b,c){if("string"===typeof b)tn_.style.setStyle_(a,c,b);else for(var d in b)tn_.style.setStyle_(a,b[d],d)};tn_.style.setStyle_=function(a,b,c){(c=tn_.style.getVendorJsStyleName_(a,c))&&(a.style[c]=b)};tn_.style.styleNameCache_={};
tn_.style.getVendorJsStyleName_=function(a,b){var c=tn_.style.styleNameCache_[b];if(!c){var d=tn_.string.toCamelCase(b);c=d;void 0===a.style[d]&&(d=tn_.dom.vendor.getVendorJsPrefix()+tn_.string.toTitleCase(d),void 0!==a.style[d]&&(c=d));tn_.style.styleNameCache_[b]=c}return c};
tn_.style.getVendorStyleName_=function(a,b){var c=tn_.string.toCamelCase(b);return void 0===a.style[c]&&(c=tn_.dom.vendor.getVendorJsPrefix()+tn_.string.toTitleCase(c),void 0!==a.style[c])?tn_.dom.vendor.getVendorPrefix()+"-"+b:b};tn_.style.getStyle=function(a,b){var c=a.style[tn_.string.toCamelCase(b)];return"undefined"!==typeof c?c:a.style[tn_.style.getVendorJsStyleName_(a,b)]||""};
tn_.style.getComputedStyle=function(a,b){var c=tn_.dom.getOwnerDocument(a);return c.defaultView&&c.defaultView.getComputedStyle&&(a=c.defaultView.getComputedStyle(a,null))?a[b]||a.getPropertyValue(b)||"":""};tn_.style.getCascadedStyle=function(a,b){return a.currentStyle?a.currentStyle[b]:null};tn_.style.getStyle_=function(a,b){return tn_.style.getComputedStyle(a,b)||tn_.style.getCascadedStyle(a,b)||a.style&&a.style[b]};
tn_.style.getComputedBoxSizing=function(a){return tn_.style.getStyle_(a,"boxSizing")||tn_.style.getStyle_(a,"MozBoxSizing")||tn_.style.getStyle_(a,"WebkitBoxSizing")||null};tn_.style.getComputedPosition=function(a){return tn_.style.getStyle_(a,"position")};tn_.style.getBackgroundColor=function(a){return tn_.style.getStyle_(a,"backgroundColor")};tn_.style.getComputedOverflowX=function(a){return tn_.style.getStyle_(a,"overflowX")};
tn_.style.getComputedOverflowY=function(a){return tn_.style.getStyle_(a,"overflowY")};tn_.style.getComputedZIndex=function(a){return tn_.style.getStyle_(a,"zIndex")};tn_.style.getComputedTextAlign=function(a){return tn_.style.getStyle_(a,"textAlign")};tn_.style.getComputedCursor=function(a){return tn_.style.getStyle_(a,"cursor")};tn_.style.getComputedTransform=function(a){var b=tn_.style.getVendorStyleName_(a,"transform");return tn_.style.getStyle_(a,b)||tn_.style.getStyle_(a,"transform")};
tn_.style.setPosition=function(a,b,c){if(b instanceof tn_.math.Coordinate){var d=b.x;b=b.y}else d=b,b=c;a.style.left=tn_.style.getPixelStyleValue_(d,!1);a.style.top=tn_.style.getPixelStyleValue_(b,!1)};tn_.style.getPosition=function(a){return new tn_.math.Coordinate(a.offsetLeft,a.offsetTop)};
tn_.style.getClientViewportElement=function(a){a=a?tn_.dom.getOwnerDocument(a):tn_.dom.getDocument();return!tn_.userAgent.IE||tn_.userAgent.isDocumentModeOrHigher(9)||tn_.dom.getDomHelper(a).isCss1CompatMode()?a.documentElement:a.body};tn_.style.getViewportPageOffset=function(a){var b=a.body,c=a.documentElement;a=b.scrollLeft||c.scrollLeft;b=b.scrollTop||c.scrollTop;return new tn_.math.Coordinate(a,b)};
tn_.style.getBoundingClientRect_=function(a){try{return a.getBoundingClientRect()}catch(b){return{left:0,top:0,right:0,bottom:0}}};
tn_.style.getOffsetParent=function(a){if(tn_.userAgent.IE&&!tn_.userAgent.isDocumentModeOrHigher(8))return tn_.asserts.assert(a&&"offsetParent"in a),a.offsetParent;var b=tn_.dom.getOwnerDocument(a),c=tn_.style.getStyle_(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(a.nodeType==tn_.dom.NodeType.DOCUMENT_FRAGMENT&&a.host&&(a=a.host),c=tn_.style.getStyle_(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>
a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null};
tn_.style.getVisibleRectForElement=function(a){for(var b=new tn_.math.Box(0,Infinity,Infinity,0),c=tn_.dom.getDomHelper(a),d=c.getDocument().body,e=c.getDocument().documentElement,f=c.getDocumentScrollElement();a=tn_.style.getOffsetParent(a);)if(!(tn_.userAgent.IE&&0==a.clientWidth||tn_.userAgent.WEBKIT&&0==a.clientHeight&&a==d)&&a!=d&&a!=e&&"visible"!=tn_.style.getStyle_(a,"overflow")){var g=tn_.style.getPageOffset(a),l=tn_.style.getClientLeftTop(a);g.x+=l.x;g.y+=l.y;b.top=Math.max(b.top,g.y);b.right=
Math.min(b.right,g.x+a.clientWidth);b.bottom=Math.min(b.bottom,g.y+a.clientHeight);b.left=Math.max(b.left,g.x)}d=f.scrollLeft;f=f.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,f);c=c.getViewportSize();b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,f+c.height);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null};
tn_.style.getContainerOffsetToScrollInto=function(a,b,c){var d=b||tn_.dom.getDocumentScrollElement(),e=tn_.style.getPageOffset(a),f=tn_.style.getPageOffset(d),g=tn_.style.getBorderBox(d);d==tn_.dom.getDocumentScrollElement()?(b=e.x-d.scrollLeft,e=e.y-d.scrollTop,tn_.userAgent.IE&&!tn_.userAgent.isDocumentModeOrHigher(10)&&(b+=g.left,e+=g.top)):(b=e.x-f.x-g.left,e=e.y-f.y-g.top);g=tn_.style.getSizeWithDisplay_(a);a=d.clientWidth-g.width;g=d.clientHeight-g.height;f=d.scrollLeft;d=d.scrollTop;c?(f+=
b-a/2,d+=e-g/2):(f+=Math.min(b,Math.max(b-a,0)),d+=Math.min(e,Math.max(e-g,0)));return new tn_.math.Coordinate(f,d)};tn_.style.scrollIntoContainerView=function(a,b,c){b=b||tn_.dom.getDocumentScrollElement();a=tn_.style.getContainerOffsetToScrollInto(a,b,c);b.scrollLeft=a.x;b.scrollTop=a.y};tn_.style.getClientLeftTop=function(a){return new tn_.math.Coordinate(a.clientLeft,a.clientTop)};
tn_.style.getPageOffset=function(a){var b=tn_.dom.getOwnerDocument(a);tn_.asserts.assertObject(a,"Parameter is required");var c=new tn_.math.Coordinate(0,0),d=tn_.style.getClientViewportElement(b);if(a==d)return c;a=tn_.style.getBoundingClientRect_(a);b=tn_.dom.getDomHelper(b).getDocumentScroll();c.x=a.left+b.x;c.y=a.top+b.y;return c};tn_.style.getPageOffsetLeft=function(a){return tn_.style.getPageOffset(a).x};tn_.style.getPageOffsetTop=function(a){return tn_.style.getPageOffset(a).y};
tn_.style.getFramedPageOffset=function(a,b){var c=new tn_.math.Coordinate(0,0),d=tn_.dom.getWindow(tn_.dom.getOwnerDocument(a));if(!tn_.reflect.canAccessProperty(d,"parent"))return c;do{var e=d==b?tn_.style.getPageOffset(a):tn_.style.getClientPositionForElement_(tn_.asserts.assert(a));c.x+=e.x;c.y+=e.y}while(d&&d!=b&&d!=d.parent&&(a=d.frameElement)&&(d=d.parent));return c};
tn_.style.translateRectForAnotherFrame=function(a,b,c){if(b.getDocument()!=c.getDocument()){var d=b.getDocument().body;c=tn_.style.getFramedPageOffset(d,c.getWindow());c=tn_.math.Coordinate.difference(c,tn_.style.getPageOffset(d));!tn_.userAgent.IE||tn_.userAgent.isDocumentModeOrHigher(9)||b.isCss1CompatMode()||(c=tn_.math.Coordinate.difference(c,b.getDocumentScroll()));a.left+=c.x;a.top+=c.y}};
tn_.style.getRelativePosition=function(a,b){a=tn_.style.getClientPosition(a);b=tn_.style.getClientPosition(b);return new tn_.math.Coordinate(a.x-b.x,a.y-b.y)};tn_.style.getClientPositionForElement_=function(a){a=tn_.style.getBoundingClientRect_(a);return new tn_.math.Coordinate(a.left,a.top)};
tn_.style.getClientPosition=function(a){tn_.asserts.assert(a);if(a.nodeType==tn_.dom.NodeType.ELEMENT)return tn_.style.getClientPositionForElement_(a);a=a.changedTouches?a.changedTouches[0]:a;return new tn_.math.Coordinate(a.clientX,a.clientY)};tn_.style.setPageOffset=function(a,b,c){var d=tn_.style.getPageOffset(a);b instanceof tn_.math.Coordinate&&(c=b.y,b=b.x);b=tn_.asserts.assertNumber(b)-d.x;c=Number(c)-d.y;tn_.style.setPosition(a,a.offsetLeft+b,a.offsetTop+c)};
tn_.style.setSize=function(a,b,c){if(b instanceof tn_.math.Size)c=b.height,b=b.width;else if(void 0==c)throw Error("missing height argument");tn_.style.setWidth(a,b);tn_.style.setHeight(a,c)};tn_.style.getPixelStyleValue_=function(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a};tn_.style.setHeight=function(a,b){a.style.height=tn_.style.getPixelStyleValue_(b,!0)};tn_.style.setWidth=function(a,b){a.style.width=tn_.style.getPixelStyleValue_(b,!0)};
tn_.style.getSize=function(a){return tn_.style.evaluateWithTemporaryDisplay_(tn_.style.getSizeWithDisplay_,a)};tn_.style.evaluateWithTemporaryDisplay_=function(a,b){if("none"!=tn_.style.getStyle_(b,"display"))return a(b);var c=b.style,d=c.display,e=c.visibility,f=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";a=a(b);c.display=d;c.position=f;c.visibility=e;return a};
tn_.style.getSizeWithDisplay_=function(a){var b=a.offsetWidth,c=a.offsetHeight,d=tn_.userAgent.WEBKIT&&!b&&!c;return(void 0===b||d)&&a.getBoundingClientRect?(a=tn_.style.getBoundingClientRect_(a),new tn_.math.Size(a.right-a.left,a.bottom-a.top)):new tn_.math.Size(b,c)};tn_.style.getTransformedSize=function(a){if(!a.getBoundingClientRect)return null;a=tn_.style.evaluateWithTemporaryDisplay_(tn_.style.getBoundingClientRect_,a);return new tn_.math.Size(a.right-a.left,a.bottom-a.top)};
tn_.style.getBounds=function(a){var b=tn_.style.getPageOffset(a);a=tn_.style.getSize(a);return new tn_.math.Rect(b.x,b.y,a.width,a.height)};tn_.style.toCamelCase=function(a){return tn_.string.toCamelCase(String(a))};tn_.style.toSelectorCase=function(a){return tn_.string.toSelectorCase(a)};
tn_.style.getOpacity=function(a){tn_.asserts.assert(a);var b=a.style;a="";"opacity"in b?a=b.opacity:"MozOpacity"in b?a=b.MozOpacity:"filter"in b&&(b=b.filter.match(/alpha\(opacity=([\d.]+)\)/))&&(a=String(b[1]/100));return""==a?a:Number(a)};tn_.style.setOpacity=function(a,b){tn_.asserts.assert(a);a=a.style;"opacity"in a?a.opacity=b:"MozOpacity"in a?a.MozOpacity=b:"filter"in a&&(a.filter=""===b?"":"alpha(opacity="+100*Number(b)+")")};
tn_.style.setTransparentBackgroundImage=function(a,b){a=a.style;tn_.userAgent.IE&&!tn_.userAgent.isVersionOrHigher("8")?a.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+b+'", sizingMethod="crop")':(a.backgroundImage="url("+b+")",a.backgroundPosition="top left",a.backgroundRepeat="no-repeat")};tn_.style.clearTransparentBackgroundImage=function(a){a=a.style;"filter"in a?a.filter="":a.backgroundImage="none"};tn_.style.showElement=function(a,b){tn_.style.setElementShown(a,b)};
tn_.style.setElementShown=function(a,b){a.style.display=b?"":"none"};tn_.style.isElementShown=function(a){return"none"!=a.style.display};
tn_.style.installSafeStyleSheet=function(a,b){b=tn_.dom.getDomHelper(b);var c=b.getDocument();if(tn_.userAgent.IE&&c.createStyleSheet)return b=c.createStyleSheet(),tn_.style.setSafeStyleSheet(b,a),b;c=b.getElementsByTagNameAndClass("HEAD")[0];if(!c){var d=b.getElementsByTagNameAndClass("BODY")[0];c=b.createDom("HEAD");d.parentNode.insertBefore(c,d)}d=b.createDom("STYLE");tn_.style.setSafeStyleSheet(d,a);b.appendChild(c,d);return d};
tn_.style.uninstallStyles=function(a){a=a.ownerNode||a.owningElement||a;tn_.dom.removeNode(a)};tn_.style.setSafeStyleSheet=function(a,b){b=tn_.html.SafeStyleSheet.unwrap(b);tn_.userAgent.IE&&void 0!==a.cssText?a.cssText=b:tn_.global.trustedTypes?tn_.dom.setTextContent(a,b):a.innerHTML=b};tn_.style.setPreWrap=function(a){a=a.style;tn_.userAgent.IE&&!tn_.userAgent.isVersionOrHigher("8")?(a.whiteSpace="pre",a.wordWrap="break-word"):a.whiteSpace=tn_.userAgent.GECKO?"-moz-pre-wrap":"pre-wrap"};
tn_.style.setInlineBlock=function(a){a=a.style;a.position="relative";tn_.userAgent.IE&&!tn_.userAgent.isVersionOrHigher("8")?(a.zoom="1",a.display="inline"):a.display="inline-block"};tn_.style.isRightToLeft=function(a){return"rtl"==tn_.style.getStyle_(a,"direction")};tn_.style.unselectableStyle_=tn_.userAgent.GECKO?"MozUserSelect":tn_.userAgent.WEBKIT||tn_.userAgent.EDGE?"WebkitUserSelect":null;
tn_.style.isUnselectable=function(a){return tn_.style.unselectableStyle_?"none"==a.style[tn_.style.unselectableStyle_].toLowerCase():tn_.userAgent.IE||tn_.userAgent.OPERA?"on"==a.getAttribute("unselectable"):!1};
tn_.style.setUnselectable=function(a,b,c){c=c?null:a.getElementsByTagName("*");var d=tn_.style.unselectableStyle_;if(d){if(b=b?"none":"",a.style&&(a.style[d]=b),c){a=0;for(var e;e=c[a];a++)e.style&&(e.style[d]=b)}}else if(tn_.userAgent.IE||tn_.userAgent.OPERA)if(b=b?"on":"",a.setAttribute("unselectable",b),c)for(a=0;e=c[a];a++)e.setAttribute("unselectable",b)};tn_.style.getBorderBoxSize=function(a){return new tn_.math.Size(a.offsetWidth,a.offsetHeight)};
tn_.style.setBorderBoxSize=function(a,b){var c=tn_.dom.getOwnerDocument(a),d=tn_.dom.getDomHelper(c).isCss1CompatMode();!tn_.userAgent.IE||tn_.userAgent.isVersionOrHigher("10")||d&&tn_.userAgent.isVersionOrHigher("8")?tn_.style.setBoxSizingSize_(a,b,"border-box"):(c=a.style,d?(d=tn_.style.getPaddingBox(a),a=tn_.style.getBorderBox(a),c.pixelWidth=b.width-a.left-d.left-d.right-a.right,c.pixelHeight=b.height-a.top-d.top-d.bottom-a.bottom):(c.pixelWidth=b.width,c.pixelHeight=b.height))};
tn_.style.getContentBoxSize=function(a){var b=tn_.dom.getOwnerDocument(a),c=tn_.userAgent.IE&&a.currentStyle;if(c&&tn_.dom.getDomHelper(b).isCss1CompatMode()&&"auto"!=c.width&&"auto"!=c.height&&!c.boxSizing)return b=tn_.style.getIePixelValue_(a,c.width,"width","pixelWidth"),a=tn_.style.getIePixelValue_(a,c.height,"height","pixelHeight"),new tn_.math.Size(b,a);c=tn_.style.getBorderBoxSize(a);b=tn_.style.getPaddingBox(a);a=tn_.style.getBorderBox(a);return new tn_.math.Size(c.width-a.left-b.left-b.right-
a.right,c.height-a.top-b.top-b.bottom-a.bottom)};
tn_.style.setContentBoxSize=function(a,b){var c=tn_.dom.getOwnerDocument(a),d=tn_.dom.getDomHelper(c).isCss1CompatMode();!tn_.userAgent.IE||tn_.userAgent.isVersionOrHigher("10")||d&&tn_.userAgent.isVersionOrHigher("8")?tn_.style.setBoxSizingSize_(a,b,"content-box"):(c=a.style,d?(c.pixelWidth=b.width,c.pixelHeight=b.height):(d=tn_.style.getPaddingBox(a),a=tn_.style.getBorderBox(a),c.pixelWidth=b.width+a.left+d.left+d.right+a.right,c.pixelHeight=b.height+a.top+d.top+d.bottom+a.bottom))};
tn_.style.setBoxSizingSize_=function(a,b,c){a=a.style;tn_.userAgent.GECKO?a.MozBoxSizing=c:tn_.userAgent.WEBKIT?a.WebkitBoxSizing=c:a.boxSizing=c;a.width=Math.max(b.width,0)+"px";a.height=Math.max(b.height,0)+"px"};tn_.style.getIePixelValue_=function(a,b,c,d){if(/^\d+px?$/.test(b))return parseInt(b,10);var e=a.style[c],f=a.runtimeStyle[c];a.runtimeStyle[c]=a.currentStyle[c];a.style[c]=b;b=a.style[d];a.style[c]=e;a.runtimeStyle[c]=f;return+b};
tn_.style.getIePixelDistance_=function(a,b){return(b=tn_.style.getCascadedStyle(a,b))?tn_.style.getIePixelValue_(a,b,"left","pixelLeft"):0};
tn_.style.getBox_=function(a,b){if(tn_.userAgent.IE){var c=tn_.style.getIePixelDistance_(a,b+"Left"),d=tn_.style.getIePixelDistance_(a,b+"Right"),e=tn_.style.getIePixelDistance_(a,b+"Top");a=tn_.style.getIePixelDistance_(a,b+"Bottom");return new tn_.math.Box(e,d,a,c)}c=tn_.style.getComputedStyle(a,b+"Left");d=tn_.style.getComputedStyle(a,b+"Right");e=tn_.style.getComputedStyle(a,b+"Top");a=tn_.style.getComputedStyle(a,b+"Bottom");return new tn_.math.Box(parseFloat(e),parseFloat(d),parseFloat(a),parseFloat(c))};
tn_.style.getPaddingBox=function(a){return tn_.style.getBox_(a,"padding")};tn_.style.getMarginBox=function(a){return tn_.style.getBox_(a,"margin")};tn_.style.ieBorderWidthKeywords_={thin:2,medium:4,thick:6};tn_.style.getIePixelBorder_=function(a,b){if("none"==tn_.style.getCascadedStyle(a,b+"Style"))return 0;b=tn_.style.getCascadedStyle(a,b+"Width");return b in tn_.style.ieBorderWidthKeywords_?tn_.style.ieBorderWidthKeywords_[b]:tn_.style.getIePixelValue_(a,b,"left","pixelLeft")};
tn_.style.getBorderBox=function(a){if(tn_.userAgent.IE&&!tn_.userAgent.isDocumentModeOrHigher(9)){var b=tn_.style.getIePixelBorder_(a,"borderLeft"),c=tn_.style.getIePixelBorder_(a,"borderRight"),d=tn_.style.getIePixelBorder_(a,"borderTop");a=tn_.style.getIePixelBorder_(a,"borderBottom");return new tn_.math.Box(d,c,a,b)}b=tn_.style.getComputedStyle(a,"borderLeftWidth");c=tn_.style.getComputedStyle(a,"borderRightWidth");d=tn_.style.getComputedStyle(a,"borderTopWidth");a=tn_.style.getComputedStyle(a,
"borderBottomWidth");return new tn_.math.Box(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))};tn_.style.getFontFamily=function(a){var b=tn_.dom.getOwnerDocument(a),c="";if(b.body.createTextRange&&tn_.dom.contains(b,a)){b=b.body.createTextRange();b.moveToElementText(a);try{c=b.queryCommandValue("FontName")}catch(d){c=""}}c||(c=tn_.style.getStyle_(a,"fontFamily"));a=c.split(",");1<a.length&&(c=a[0]);return tn_.string.stripQuotes(c,"\"'")};tn_.style.lengthUnitRegex_=/[^\d]+$/;
tn_.style.getLengthUnits=function(a){return(a=a.match(tn_.style.lengthUnitRegex_))&&a[0]||null};tn_.style.ABSOLUTE_CSS_LENGTH_UNITS_={cm:1,"in":1,mm:1,pc:1,pt:1};tn_.style.CONVERTIBLE_RELATIVE_CSS_UNITS_={em:1,ex:1};
tn_.style.getFontSize=function(a){var b=tn_.style.getStyle_(a,"fontSize"),c=tn_.style.getLengthUnits(b);if(b&&"px"==c)return parseInt(b,10);if(tn_.userAgent.IE){if(String(c)in tn_.style.ABSOLUTE_CSS_LENGTH_UNITS_)return tn_.style.getIePixelValue_(a,b,"left","pixelLeft");if(a.parentNode&&a.parentNode.nodeType==tn_.dom.NodeType.ELEMENT&&String(c)in tn_.style.CONVERTIBLE_RELATIVE_CSS_UNITS_)return a=a.parentNode,c=tn_.style.getStyle_(a,"fontSize"),tn_.style.getIePixelValue_(a,b==c?"1em":b,"left","pixelLeft")}c=
tn_.dom.createDom("SPAN",{style:"visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;"});tn_.dom.appendChild(a,c);b=c.offsetHeight;tn_.dom.removeNode(c);return b};tn_.style.parseStyleAttribute=function(a){var b={};tn_.array.forEach(a.split(/\s*;\s*/),function(c){var d=c.match(/\s*([\w-]+)\s*:(.+)/);d&&(c=d[1],d=tn_.string.trim(d[2]),b[tn_.string.toCamelCase(c.toLowerCase())]=d)});return b};
tn_.style.toStyleAttribute=function(a){var b=[];tn_.object.forEach(a,function(c,d){b.push(tn_.string.toSelectorCase(d),":",c,";")});return b.join("")};tn_.style.setFloat=function(a,b){a.style[tn_.userAgent.IE?"styleFloat":"cssFloat"]=b};tn_.style.getFloat=function(a){return a.style[tn_.userAgent.IE?"styleFloat":"cssFloat"]||""};
tn_.style.getScrollbarWidth=function(a){var b=tn_.dom.createElement("DIV");a&&(b.className=a);b.style.cssText="overflow:auto;position:absolute;top:0;width:100px;height:100px";a=tn_.dom.createElement("DIV");tn_.style.setSize(a,"200px","200px");b.appendChild(a);tn_.dom.appendChild(tn_.dom.getDocument().body,b);a=b.offsetWidth-b.clientWidth;tn_.dom.removeNode(b);return a};tn_.style.MATRIX_TRANSLATION_REGEX_=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;
tn_.style.getCssTranslation=function(a){a=tn_.style.getComputedTransform(a);return a?(a=a.match(tn_.style.MATRIX_TRANSLATION_REGEX_))?new tn_.math.Coordinate(parseFloat(a[1]),parseFloat(a[2])):new tn_.math.Coordinate(0,0):new tn_.math.Coordinate(0,0)};var tn_L={asserts:{}};tn_L.asserts.assert={};var tn_md=tn_.dom.createElement("DIV"),tn_nd=new Set(["methods","CHECKED","dataFld","dataFormatAs","dataSrc"]),tn_od=function(a,b){return a==b},tn_pd=function(a,b){return a.toString()===b.toString()},tn_qd={String:tn_od,Number:tn_od,Boolean:tn_od,Date:function(a,b){return a.getTime()==b.getTime()},RegExp:tn_pd,Function:tn_pd};
function tn_rd(a,b,c){var d=tn_.html.sanitizer.CssSanitizer.safeParseHtmlAndGetInertElement("<div></div>");tn_.dom.safe.setInnerHtml(tn_.asserts.assertObject(d),tn_.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(tn_.string.Const.from("Added into an inert element"),a));var e="\nExpected\n"+d.innerHTML+"\nActual\n"+b.innerHTML,f=tn_.iter.filter(tn_.iter.map(new tn_.dom.TagIterator(b),tn_sd),tn_td);a=tn_.iter.filter(new tn_.dom.NodeIterator(d),tn_td);var g,l=!1,n=function(){l||
(g=tn_.iter.nextOrValue(f,null));for(l=!1;g==tn_md||g&&g.nodeType==Node.COMMENT_NODE;)g=tn_.iter.nextOrValue(f,null)},k=tn_.userAgent.IE&&!tn_.userAgent.isVersionOrHigher("9"),h=!0,m=0;tn_.iter.forEach(a,function(p){if(p.nodeType!=Node.COMMENT_NODE&&(n(),tn_.asserts.assert(g,"Finished actual HTML before finishing expected HTML at node number "+m+": "+tn_ud(p)+e),p!=d)){tn_vd("Should have the same node type, got "+tn_ud(g)+" but expected "+tn_ud(p)+"."+e,p.nodeType,g.nodeType);if(p.nodeType==tn_.dom.NodeType.ELEMENT){p=
tn_.asserts.assertElement(p);var q=tn_.asserts.assertElement(g);tn_vd("Tag names should match"+e,p.tagName,q.tagName);tn_wd("Should have same styles"+e,tn_.style.parseStyleAttribute(p.style.cssText),tn_.style.parseStyleAttribute(q.style.cssText));var t=e,r=p,u=q,v=!!c;if(v){var z=u,w=tn_.dom.classlist.get(r);w=tn_.array.toArray(w);w.sort();var A=tn_.array.toArray(tn_.dom.classlist.get(z));A.sort();tn_xd("Expected class was: "+w.join(" ")+", but actual class was: "+z.className+" in node "+tn_ud(z),
w,A)}z=r.attributes;w=u.attributes;A=0;for(var G=z.length;A<G;A++){var y=z[A].name,x=tn_yd(r,y),B=w[y],C=tn_yd(u,y);if(x||C)"id"==y&&tn_.userAgent.IE?(y=x,x=t,""===y?v&&tn_zd("Unexpected attribute with name id in element "+x,""==B.value):(tn_.asserts.assert(B,"Expected to find attribute with name id, in element "+x),tn_.asserts.assert(""!==B.value,"Expected to find attribute with name id, in element "+x),tn_vd("Expected attribute has a different value "+x,y,B.value))):tn_Ad(y)||(tn_.asserts.assert(B,
"Expected to find attribute with name "+y+", in element "+tn_ud(u)+t),tn_.asserts.assert(String(x)===String(tn_yd(u,B.name)),"Expected attribute "+y+" has a different value "+t))}if(v)for(A=0;A<w.length;A++)r=w[A].name,(B=w.getNamedItem(r))&&!tn_Ad(r)&&tn_.asserts.assert(z[r],"Unexpected attribute with name "+r+" in element "+tn_ud(u)+t);k&&"inline"!=tn_.style.getCascadedStyle(q,"display")&&(h=!0);"template"==q.tagName.toLowerCase()&&q.content&&(p=p.innerHTML,q=q.innerHTML,t=c,u=tn_.dom.createDom("DIV"),
tn_.dom.safe.setInnerHtml(u,tn_.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(tn_.string.Const.from("The element is never inserted into DOM"),q)),tn_rd(p,u,t))}else{q=g.nodeValue;for(l=!0;(g=tn_.iter.nextOrValue(f,null))&&g.nodeType==tn_.dom.NodeType.TEXT;)q+=g.nodeValue;k&&(h&&!tn_.string.isEmptyOrWhitespace(q)&&(q=tn_.string.trimLeft(q)),h=/\s$/.test(q));p=p.nodeValue;if(q&&!tn_.string.isBreakingWhitespace(q)||p&&!tn_.string.isBreakingWhitespace(p))q=q.replace(/\s+/g," "),
p=p.replace(/\s+/g," "),tn_.asserts.assert(p===q,"Text should match"+e)}m++}});n();tn_.asserts.assert(null===tn_.iter.nextOrValue(f,null),"Finished expected HTML before finishing actual HTML"+e)}function tn_ud(a){if(a.nodeType==tn_.dom.NodeType.TEXT)return"[Text: "+a.nodeValue+"]";var b=a instanceof Element?a.id:void 0;return"<"+a.nodeName+(b?" #"+b:"")+" .../>"}function tn_sd(a,b,c){return c.isEndTag()?tn_md:a}
function tn_td(a){return a.nodeType!=tn_.dom.NodeType.TEXT||!tn_.string.isBreakingWhitespace(a.nodeValue)||a.previousSibling&&a.previousSibling.nodeType==tn_.dom.NodeType.TEXT||a.nextSibling&&a.nextSibling.nodeType==tn_.dom.NodeType.TEXT?!0:!1}
function tn_yd(a,b){return tn_.userAgent.WEBKIT&&"INPUT"==a.tagName&&a.type==tn_.dom.InputType.RADIO&&"checked"==b?!1:(tn_.userAgent.IE||tn_.userAgent.EDGE)&&"src"==b?a.getAttribute(b):void 0!==a[b]&&typeof a.getAttribute(b)!=typeof a[b]?a[b]:a.getAttribute(b)}function tn_Ad(a){return"style"==a||"class"==a?!0:tn_.userAgent.IE&&tn_nd.has(a)}function tn_vd(a,b,c){var d=tn_M(1,2,arguments),e=tn_M(2,2,arguments);tn_.asserts.assert(d===e,tn_Bd(2,arguments))}
function tn_M(a,b,c){return c.length==b+1?c[a]:c[a-1]}function tn_Bd(a,b){return b.length==a+1?b[0]:null}function tn_zd(a,b){var c=tn_M(1,1,arguments);tn_.asserts.assert("boolean"===typeof c);tn_.asserts.assert(c,"Call to assertTrue(boolean) with false")}
function tn_xd(a,b,c){var d=tn_M(1,2,arguments),e=tn_M(2,2,arguments),f=tn_Bd(2,arguments)?tn_Bd(2,arguments):"",g=tn_Cd(d);tn_.asserts.assert("Array"==g,"Expected an array for assertArrayEquals but found a "+g);g=tn_Cd(e);tn_.asserts.assert("Array"==g,"Expected an array for assertArrayEquals but found a "+g);tn_wd(f,Array.prototype.concat.call(d),Array.prototype.concat.call(e))}
function tn_wd(a,b,c){var d=tn_M(1,2,arguments),e=tn_M(2,2,arguments);d=tn_Dd(d,e);tn_.asserts.assert(!d,d+(tn_Bd(2,arguments)?tn_Bd(2,arguments):""))}
function tn_Dd(a,b,c){function d(k,h,m){for(var p=0;p<g.length;++p){var q=g[p]===k,t=l[p]===h;if(q||t){q&&t||f.push("Asymmetric cycle detected at "+m);return}}g.push(k);l.push(h);e(k,h,m);g.pop();l.pop()}function e(k,h,m){if(k!==h){var p=tn_Cd(k),q=tn_Cd(h);if(p==q){var t="Array"==p,r=n(p,k,h);if(null!=r)""!=r&&f.push(m+": "+r);else if(t&&k.length!=h.length)f.push(m+": Expected "+k.length+"-element array but got a "+h.length+"-element array");else if("String"==p)k!=h&&f.push(m+': Expected String "'+
k+'" but got "'+h+'"');else{var u=m+(t?"[%s]":m?".%s":"%s");if("undefined"!=typeof Map&&k instanceof Map||"undefined"!=typeof Set&&k instanceof Set)k.forEach(function(z,w){h.has(w)?h.get&&d(z,h.get(w),u.replace("%s",w)):f.push(w+" not present in actual "+(m||q))}),h.forEach(function(z,w){k.has(w)||f.push(w+" not present in expected "+(m||p))});else if(k.__iterator__)tn_.isFunction(k.equals)?k.equals(h)||f.push("equals() returned false for "+(m||p)):k.map_?d(k.map_,h.map_,u.replace("%s","map_")):f.push("unable to check "+
(m||p)+" for equality: it has an iterator we do not know how to handle. please add an equals method");else{for(var v in k)if(!t||isNaN(v))v in h?d(k[v],h[v],u.replace("%s",v)):f.push("property "+v+" not present in actual "+(m||q));for(v in h)if(!t||isNaN(v))v in k||f.push("property "+v+" not present in expected "+(m||p));if(t)for(v=0;v<k.length;v++)d(k[v],h[v],u.replace("%s",String(v)))}}}else f.push(m)}}var f=[],g=[],l=[],n=c||function(k,h,m){k=tn_qd[k];if(!k)return null;h=(k=k(h,m))?"":"string"==
typeof h&&"string"==typeof m?h+" does not equal to "+m:"Expected object does not match actual";return h};d(a,b,"");return f.join("\n ")}
function tn_Cd(a){var b=typeof a;try{switch(b){case "object":if(null==a){b="null";break}case "function":switch(a.constructor){case (new String("")).constructor:b="String";break;case (new Boolean(!0)).constructor:b="Boolean";break;case (new Number(0)).constructor:b="Number";break;case [].constructor:b="Array";break;case RegExp().constructor:b="RegExp";break;case (new Date).constructor:b="Date";break;case Function:b="Function";break;default:var c=a.constructor.toString().match(/function\s*([^( ]+)\(/);
c&&(b=c[1])}}}catch(d){}finally{b=b.substr(0,1).toUpperCase()+b.substr(1)}return b}tn_L.asserts.assert.assertHtmlContentsMatch=tn_rd;tn_.html.sanitizer.AttributeWhitelist={"* ARIA-CHECKED":!0,"* ARIA-COLCOUNT":!0,"* ARIA-COLINDEX":!0,"* ARIA-CONTROLS":!0,"* ARIA-DESCRIBEDBY":!0,"* ARIA-DISABLED":!0,"* ARIA-EXPANDED":!0,"* ARIA-GOOG-EDITABLE":!0,"* ARIA-HASPOPUP":!0,"* ARIA-HIDDEN":!0,"* ARIA-LABEL":!0,"* ARIA-LABELLEDBY":!0,"* ARIA-MULTILINE":!0,"* ARIA-MULTISELECTABLE":!0,"* ARIA-ORIENTATION":!0,"* ARIA-PLACEHOLDER":!0,"* ARIA-READONLY":!0,"* ARIA-REQUIRED":!0,"* ARIA-ROLEDESCRIPTION":!0,"* ARIA-ROWCOUNT":!0,"* ARIA-ROWINDEX":!0,
"* ARIA-SELECTED":!0,"* ABBR":!0,"* ACCEPT":!0,"* ACCESSKEY":!0,"* ALIGN":!0,"* ALT":!0,"* AUTOCOMPLETE":!0,"* AXIS":!0,"* BGCOLOR":!0,"* BORDER":!0,"* CELLPADDING":!0,"* CELLSPACING":!0,"* CHAROFF":!0,"* CHAR":!0,"* CHECKED":!0,"* CLEAR":!0,"* COLOR":!0,"* COLSPAN":!0,"* COLS":!0,"* COMPACT":!0,"* COORDS":!0,"* DATETIME":!0,"* DIR":!0,"* DISABLED":!0,"* ENCTYPE":!0,"* FACE":!0,"* FRAME":!0,"* HEIGHT":!0,"* HREFLANG":!0,"* HSPACE":!0,"* ISMAP":!0,"* LABEL":!0,"* LANG":!0,"* MAX":!0,"* MAXLENGTH":!0,
"* METHOD":!0,"* MULTIPLE":!0,"* NOHREF":!0,"* NOSHADE":!0,"* NOWRAP":!0,"* OPEN":!0,"* READONLY":!0,"* REQUIRED":!0,"* REL":!0,"* REV":!0,"* ROLE":!0,"* ROWSPAN":!0,"* ROWS":!0,"* RULES":!0,"* SCOPE":!0,"* SELECTED":!0,"* SHAPE":!0,"* SIZE":!0,"* SPAN":!0,"* START":!0,"* SUMMARY":!0,"* TABINDEX":!0,"* TITLE":!0,"* TYPE":!0,"* VALIGN":!0,"* VALUE":!0,"* VSPACE":!0,"* WIDTH":!0};
tn_.html.sanitizer.AttributeSanitizedWhitelist={"* USEMAP":!0,"* ACTION":!0,"* CITE":!0,"* HREF":!0,"* LONGDESC":!0,"* SRC":!0,"LINK HREF":!0,"* FOR":!0,"* HEADERS":!0,"* NAME":!0,"A TARGET":!0,"* CLASS":!0,"* ID":!0,"* STYLE":!0};var tn_Ed="undefined"!=typeof WeakMap&&-1!=WeakMap.toString().indexOf("[native code]"),tn_Fd=0,tn_N=function(){this.keys_=[];this.values_=[];this.dataAttributeName_="data-elementweakmap-index-"+tn_Fd++};tn_N.prototype.set=function(a,b){if(tn_4c(a,this.dataAttributeName_)){var c=parseInt(tn_5c(a,this.dataAttributeName_),10);this.values_[c]=b}else c=this.values_.push(b)-1,tn_6c(a,this.dataAttributeName_,c.toString()),this.keys_.push(a);return this};
tn_N.prototype.get=function(a){if(tn_4c(a,this.dataAttributeName_))return a=parseInt(tn_5c(a,this.dataAttributeName_),10),this.values_[a]};tn_N.prototype.clear=function(){this.keys_.forEach(function(a){tn_7c(a,this.dataAttributeName_)},this);this.keys_=[];this.values_=[]};tn_N.newWeakMap=function(){return tn_Ed?new WeakMap:new tn_N};tn_.html.sanitizer.ElementWeakMap=tn_N;tn_.debug.errorcontext={};tn_.debug.errorcontext.addErrorContext=function(a,b,c){a[tn_.debug.errorcontext.CONTEXT_KEY_]||(a[tn_.debug.errorcontext.CONTEXT_KEY_]={});a[tn_.debug.errorcontext.CONTEXT_KEY_][b]=c};tn_.debug.errorcontext.getErrorContext=function(a){return a[tn_.debug.errorcontext.CONTEXT_KEY_]||{}};tn_.debug.errorcontext.CONTEXT_KEY_="__closure__error__context__984382";tn_.debug.LOGGING_ENABLED=tn_.DEBUG;tn_.debug.FORCE_SLOPPY_STACKS=!1;tn_.debug.catchErrors=function(a,b,c){c=c||tn_.global;var d=c.onerror,e=!!b;tn_.userAgent.WEBKIT&&!tn_.userAgent.isVersionOrHigher("535.3")&&(e=!e);c.onerror=function(f,g,l,n,k){d&&d(f,g,l,n,k);a({message:f,fileName:g,line:l,lineNumber:l,col:n,error:k});return e}};
tn_.debug.expose=function(a,b){if("undefined"==typeof a)return"undefined";if(null==a)return"NULL";var c=[],d;for(d in a)if(b||!tn_.isFunction(a[d])){var e=d+" = ";try{e+=a[d]}catch(f){e+="*** "+f+" ***"}c.push(e)}return c.join("\n")};
tn_.debug.deepExpose=function(a,b){var c=[],d=[],e={},f=function(g,l){var n=l+" ";try{if(void 0===g)c.push("undefined");else if(null===g)c.push("NULL");else if("string"===typeof g)c.push('"'+g.replace(/\n/g,"\n"+l)+'"');else if(tn_.isFunction(g))c.push(String(g).replace(/\n/g,"\n"+l));else if(tn_.isObject(g)){tn_.hasUid(g)||d.push(g);var k=tn_.getUid(g);if(e[k])c.push("*** reference loop detected (id="+k+") ***");else{e[k]=!0;c.push("{");for(var h in g)if(b||!tn_.isFunction(g[h]))c.push("\n"),c.push(n),
c.push(h+" = "),f(g[h],n);c.push("\n"+l+"}");delete e[k]}}else c.push(g)}catch(m){c.push("*** "+m+" ***")}};f(a,"");for(a=0;a<d.length;a++)tn_.removeUid(d[a]);return c.join("")};tn_.debug.exposeArray=function(a){for(var b=[],c=0;c<a.length;c++)Array.isArray(a[c])?b.push(tn_.debug.exposeArray(a[c])):b.push(a[c]);return"[ "+b.join(", ")+" ]"};
tn_.debug.normalizeErrorObject=function(a){var b=tn_.getObjectByName("window.location.href");null==a&&(a='Unknown Error of type "null/undefined"');if("string"===typeof a)return{message:a,name:"Unknown error",lineNumber:"Not available",fileName:b,stack:"Not available"};var c=!1;try{var d=a.lineNumber||a.line||"Not available"}catch(f){d="Not available",c=!0}try{var e=a.fileName||a.filename||a.sourceURL||tn_.global.$googDebugFname||b}catch(f){e="Not available",c=!0}return!c&&a.lineNumber&&a.fileName&&
a.stack&&a.message&&a.name?a:(b=a.message,null==b&&(a.constructor&&a.constructor instanceof Function?(b=a.constructor.name?a.constructor.name:tn_.debug.getFunctionName(a.constructor),b='Unknown Error of type "'+b+'"'):b="Unknown Error of unknown type"),{message:b,name:a.name||"UnknownError",lineNumber:d,fileName:e,stack:a.stack||"Not available"})};
tn_.debug.enhanceError=function(a,b){a instanceof Error||(a=Error(a),Error.captureStackTrace&&Error.captureStackTrace(a,tn_.debug.enhanceError));a.stack||(a.stack=tn_.debug.getStacktrace(tn_.debug.enhanceError));if(b){for(var c=0;a["message"+c];)++c;a["message"+c]=String(b)}return a};tn_.debug.enhanceErrorWithContext=function(a,b){a=tn_.debug.enhanceError(a);if(b)for(var c in b)tn_.debug.errorcontext.addErrorContext(a,c,b[c]);return a};
tn_.debug.getStacktraceSimple=function(a){if(!tn_.debug.FORCE_SLOPPY_STACKS){var b=tn_.debug.getNativeStackTrace_(tn_.debug.getStacktraceSimple);if(b)return b}b=[];for(var c=arguments.callee.caller,d=0;c&&(!a||d<a);){b.push(tn_.debug.getFunctionName(c));b.push("()\n");try{c=c.caller}catch(e){b.push("[exception trying to get caller]\n");break}d++;if(d>=tn_.debug.MAX_STACK_DEPTH){b.push("[...long stack...]");break}}a&&d>=a?b.push("[...reached max depth limit...]"):b.push("[end]");return b.join("")};
tn_.debug.MAX_STACK_DEPTH=50;tn_.debug.getNativeStackTrace_=function(a){var b=Error();if(Error.captureStackTrace)return Error.captureStackTrace(b,a),String(b.stack);try{throw b;}catch(c){b=c}return(a=b.stack)?String(a):null};tn_.debug.getStacktrace=function(a){if(!tn_.debug.FORCE_SLOPPY_STACKS){var b=a||tn_.debug.getStacktrace;b=tn_.debug.getNativeStackTrace_(b)}b||(b=tn_.debug.getStacktraceHelper_(a||arguments.callee.caller,[]));return b};
tn_.debug.getStacktraceHelper_=function(a,b){var c=[];if(tn_.array.contains(b,a))c.push("[...circular reference...]");else if(a&&b.length<tn_.debug.MAX_STACK_DEPTH){c.push(tn_.debug.getFunctionName(a)+"(");for(var d=a.arguments,e=0;d&&e<d.length;e++){0<e&&c.push(", ");var f=d[e];switch(typeof f){case "object":f=f?"object":"null";break;case "string":break;case "number":f=String(f);break;case "boolean":f=f?"true":"false";break;case "function":f=(f=tn_.debug.getFunctionName(f))?f:"[fn]";break;default:f=
typeof f}40<f.length&&(f=f.substr(0,40)+"...");c.push(f)}b.push(a);c.push(")\n");try{c.push(tn_.debug.getStacktraceHelper_(a.caller,b))}catch(g){c.push("[exception trying to get caller]\n")}}else a?c.push("[...long stack...]"):c.push("[end]");return c.join("")};
tn_.debug.getFunctionName=function(a){if(tn_.debug.fnNameCache_[a])return tn_.debug.fnNameCache_[a];a=String(a);if(!tn_.debug.fnNameCache_[a]){var b=/function\s+([^\(]+)/m.exec(a);b?(b=b[1],tn_.debug.fnNameCache_[a]=b):tn_.debug.fnNameCache_[a]="[Anonymous]"}return tn_.debug.fnNameCache_[a]};tn_.debug.makeWhitespaceVisible=function(a){return a.replace(/ /g,"[_]").replace(/\f/g,"[f]").replace(/\n/g,"[n]\n").replace(/\r/g,"[r]").replace(/\t/g,"[t]")};
tn_.debug.runtimeType=function(a){return a instanceof Function?a.displayName||a.name||"unknown type name":a instanceof Object?a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a):null===a?"null":typeof a};tn_.debug.fnNameCache_={};tn_.debug.freezeInternal_=tn_.DEBUG&&Object.freeze||function(a){return a};tn_.debug.freeze=function(a){return tn_.debug.freezeInternal_(a)};tn_.debug.LogRecord=function(a,b,c,d,e){this.reset(a,b,c,d,e)};tn_.debug.LogRecord.prototype.exception_=null;tn_.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS=!0;tn_.debug.LogRecord.nextSequenceNumber_=0;tn_.debug.LogRecord.prototype.reset=function(a,b,c,d,e){tn_.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS&&("number"==typeof e||tn_.debug.LogRecord.nextSequenceNumber_++);d||tn_.now();this.level_=a;this.msg_=b;delete this.exception_};tn_.debug.LogRecord.prototype.setException=function(a){this.exception_=a};
tn_.debug.LogRecord.prototype.setLevel=function(a){this.level_=a};tn_.debug.LogBuffer=function(){tn_.asserts.assert(tn_.debug.LogBuffer.isBufferingEnabled(),"Cannot use goog.debug.LogBuffer without defining goog.debug.LogBuffer.CAPACITY.");this.clear()};tn_.debug.LogBuffer.getInstance=function(){tn_.debug.LogBuffer.instance_||(tn_.debug.LogBuffer.instance_=new tn_.debug.LogBuffer);return tn_.debug.LogBuffer.instance_};tn_.debug.LogBuffer.CAPACITY=0;
tn_.debug.LogBuffer.prototype.addRecord=function(a,b,c){var d=(this.curIndex_+1)%tn_.debug.LogBuffer.CAPACITY;this.curIndex_=d;if(this.isFull_)return d=this.buffer_[d],d.reset(a,b,c),d;this.isFull_=d==tn_.debug.LogBuffer.CAPACITY-1;return this.buffer_[d]=new tn_.debug.LogRecord(a,b,c)};tn_.debug.LogBuffer.isBufferingEnabled=function(){return 0<tn_.debug.LogBuffer.CAPACITY};
tn_.debug.LogBuffer.prototype.clear=function(){this.buffer_=Array(tn_.debug.LogBuffer.CAPACITY);this.curIndex_=-1;this.isFull_=!1};tn_.debug.Logger=function(a){this.name_=a;this.handlers_=this.children_=this.level_=this.parent_=null};tn_.debug.Logger.ROOT_LOGGER_NAME="";tn_.debug.Logger.ENABLE_HIERARCHY=!0;tn_.debug.Logger.ENABLE_PROFILER_LOGGING=!1;tn_.debug.Logger.ENABLE_HIERARCHY||(tn_.debug.Logger.rootHandlers_=[]);tn_.debug.Logger.Level=function(a,b){this.name=a;this.value=b};tn_.debug.Logger.Level.prototype.toString=function(){return this.name};tn_.debug.Logger.Level.OFF=new tn_.debug.Logger.Level("OFF",Infinity);
tn_.debug.Logger.Level.SHOUT=new tn_.debug.Logger.Level("SHOUT",1200);tn_.debug.Logger.Level.SEVERE=new tn_.debug.Logger.Level("SEVERE",1E3);tn_.debug.Logger.Level.WARNING=new tn_.debug.Logger.Level("WARNING",900);tn_.debug.Logger.Level.INFO=new tn_.debug.Logger.Level("INFO",800);tn_.debug.Logger.Level.CONFIG=new tn_.debug.Logger.Level("CONFIG",700);tn_.debug.Logger.Level.FINE=new tn_.debug.Logger.Level("FINE",500);tn_.debug.Logger.Level.FINER=new tn_.debug.Logger.Level("FINER",400);
tn_.debug.Logger.Level.FINEST=new tn_.debug.Logger.Level("FINEST",300);tn_.debug.Logger.Level.ALL=new tn_.debug.Logger.Level("ALL",0);tn_.debug.Logger.Level.PREDEFINED_LEVELS=[tn_.debug.Logger.Level.OFF,tn_.debug.Logger.Level.SHOUT,tn_.debug.Logger.Level.SEVERE,tn_.debug.Logger.Level.WARNING,tn_.debug.Logger.Level.INFO,tn_.debug.Logger.Level.CONFIG,tn_.debug.Logger.Level.FINE,tn_.debug.Logger.Level.FINER,tn_.debug.Logger.Level.FINEST,tn_.debug.Logger.Level.ALL];
tn_.debug.Logger.Level.predefinedLevelsCache_=null;tn_.debug.Logger.Level.createPredefinedLevelsCache_=function(){tn_.debug.Logger.Level.predefinedLevelsCache_={};for(var a=0,b;b=tn_.debug.Logger.Level.PREDEFINED_LEVELS[a];a++)tn_.debug.Logger.Level.predefinedLevelsCache_[b.value]=b,tn_.debug.Logger.Level.predefinedLevelsCache_[b.name]=b};
tn_.debug.Logger.Level.getPredefinedLevel=function(a){tn_.debug.Logger.Level.predefinedLevelsCache_||tn_.debug.Logger.Level.createPredefinedLevelsCache_();return tn_.debug.Logger.Level.predefinedLevelsCache_[a]||null};
tn_.debug.Logger.Level.getPredefinedLevelByValue=function(a){tn_.debug.Logger.Level.predefinedLevelsCache_||tn_.debug.Logger.Level.createPredefinedLevelsCache_();if(a in tn_.debug.Logger.Level.predefinedLevelsCache_)return tn_.debug.Logger.Level.predefinedLevelsCache_[a];for(var b=0;b<tn_.debug.Logger.Level.PREDEFINED_LEVELS.length;++b){var c=tn_.debug.Logger.Level.PREDEFINED_LEVELS[b];if(c.value<=a)return c}return null};tn_.debug.Logger.getLogger=function(a){return tn_.debug.LogManager.getLogger(a)};
tn_.debug.Logger.logToProfilers=function(a){if(tn_.debug.Logger.ENABLE_PROFILER_LOGGING){var b=tn_.global.msWriteProfilerMark;b?b(a):(b=tn_.global.console)&&b.timeStamp&&b.timeStamp(a)}};tn_a=tn_.debug.Logger.prototype;tn_a.addHandler=function(a){tn_.debug.LOGGING_ENABLED&&(tn_.debug.Logger.ENABLE_HIERARCHY?(this.handlers_||(this.handlers_=[]),this.handlers_.push(a)):(tn_.asserts.assert(!this.name_,"Cannot call addHandler on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."),tn_.debug.Logger.rootHandlers_.push(a)))};
tn_a.removeHandler=function(a){if(tn_.debug.LOGGING_ENABLED){var b=tn_.debug.Logger.ENABLE_HIERARCHY?this.handlers_:tn_.debug.Logger.rootHandlers_;return!!b&&tn_.array.remove(b,a)}return!1};tn_a.getParent=function(){return this.parent_};tn_a.getChildren=function(){this.children_||(this.children_={});return this.children_};
tn_a.setLevel=function(a){tn_.debug.LOGGING_ENABLED&&(tn_.debug.Logger.ENABLE_HIERARCHY?this.level_=a:(tn_.asserts.assert(!this.name_,"Cannot call setLevel() on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."),tn_.debug.Logger.rootLevel_=a))};
tn_a.getEffectiveLevel=function(){if(!tn_.debug.LOGGING_ENABLED)return tn_.debug.Logger.Level.OFF;if(!tn_.debug.Logger.ENABLE_HIERARCHY)return tn_.debug.Logger.rootLevel_;if(this.level_)return this.level_;if(this.parent_)return this.parent_.getEffectiveLevel();tn_.asserts.fail("Root logger has no level set.");return null};tn_a.isLoggable=function(a){return tn_.debug.LOGGING_ENABLED&&a.value>=this.getEffectiveLevel().value};
tn_a.log=function(a,b,c){tn_.debug.LOGGING_ENABLED&&this.isLoggable(a)&&(tn_.isFunction(b)&&(b=b()),this.doLogRecord_(this.getLogRecord(a,b,c)))};tn_a.getLogRecord=function(a,b,c){a=tn_.debug.LogBuffer.isBufferingEnabled()?tn_.debug.LogBuffer.getInstance().addRecord(a,b,this.name_):new tn_.debug.LogRecord(a,String(b),this.name_);c&&a.setException(c);return a};tn_a.severe=function(a,b){tn_.debug.LOGGING_ENABLED&&this.log(tn_.debug.Logger.Level.SEVERE,a,b)};
tn_a.warning=function(a,b){tn_.debug.LOGGING_ENABLED&&this.log(tn_.debug.Logger.Level.WARNING,a,b)};tn_a.info=function(a,b){tn_.debug.LOGGING_ENABLED&&this.log(tn_.debug.Logger.Level.INFO,a,b)};tn_a.fine=function(a,b){tn_.debug.LOGGING_ENABLED&&this.log(tn_.debug.Logger.Level.FINE,a,b)};
tn_a.doLogRecord_=function(a){tn_.debug.Logger.ENABLE_PROFILER_LOGGING&&tn_.debug.Logger.logToProfilers("log:"+a.msg_);if(tn_.debug.Logger.ENABLE_HIERARCHY)for(var b=this;b;)b.callPublish_(a),b=b.getParent();else{b=0;for(var c;c=tn_.debug.Logger.rootHandlers_[b++];)c(a)}};tn_a.callPublish_=function(a){if(this.handlers_)for(var b=0,c;c=this.handlers_[b];b++)c(a)};tn_a.setParent_=function(a){this.parent_=a};tn_a.addChild_=function(a,b){this.getChildren()[a]=b};tn_.debug.LogManager={};
tn_.debug.LogManager.loggers_={};tn_.debug.LogManager.rootLogger_=null;tn_.debug.LogManager.initialize=function(){tn_.debug.LogManager.rootLogger_||(tn_.debug.LogManager.rootLogger_=new tn_.debug.Logger(tn_.debug.Logger.ROOT_LOGGER_NAME),tn_.debug.LogManager.loggers_[tn_.debug.Logger.ROOT_LOGGER_NAME]=tn_.debug.LogManager.rootLogger_,tn_.debug.LogManager.rootLogger_.setLevel(tn_.debug.Logger.Level.CONFIG))};tn_.debug.LogManager.getLoggers=function(){return tn_.debug.LogManager.loggers_};
tn_.debug.LogManager.getRoot=function(){tn_.debug.LogManager.initialize();return tn_.debug.LogManager.rootLogger_};tn_.debug.LogManager.getLogger=function(a){tn_.debug.LogManager.initialize();var b=tn_.debug.LogManager.loggers_[a];return b||tn_.debug.LogManager.createLogger_(a)};tn_.debug.LogManager.createFunctionForCatchErrors=function(a){return function(b){var c=a||tn_.debug.LogManager.getRoot();c.severe("Error: "+b.message+" ("+b.fileName+" @ Line: "+b.line+")")}};
tn_.debug.LogManager.createLogger_=function(a){var b=new tn_.debug.Logger(a);if(tn_.debug.Logger.ENABLE_HIERARCHY){var c=a.lastIndexOf("."),d=a.substr(0,c);c=a.substr(c+1);d=tn_.debug.LogManager.getLogger(d);d.addChild_(c,b);b.setParent_(d)}return tn_.debug.LogManager.loggers_[a]=b};tn_.log={};tn_.log.ENABLED=tn_.debug.LOGGING_ENABLED;tn_.log.ROOT_LOGGER_NAME=tn_.debug.Logger.ROOT_LOGGER_NAME;tn_.log.Logger=tn_.debug.Logger;tn_.log.Level=tn_.debug.Logger.Level;tn_.log.LogRecord=tn_.debug.LogRecord;tn_.log.getLogger=function(a,b){return tn_.log.ENABLED?(a=tn_.debug.LogManager.getLogger(a),b&&a&&a.setLevel(b),a):null};tn_.log.addHandler=function(a,b){tn_.log.ENABLED&&a&&a.addHandler(b)};tn_.log.removeHandler=function(a,b){return tn_.log.ENABLED&&a?a.removeHandler(b):!1};
tn_.log.log=function(a,b,c,d){tn_.log.ENABLED&&a&&a.log(b,c,d)};tn_.log.error=function(a,b,c){tn_.log.ENABLED&&a&&a.severe(b,c)};tn_.log.warning=function(a,b,c){tn_.log.ENABLED&&a&&a.warning(b,c)};tn_.log.info=function(a,b,c){tn_.log.ENABLED&&a&&a.info(b,c)};tn_.log.fine=function(a,b,c){tn_.log.ENABLED&&a&&a.fine(b,c)};var tn_Gd=tn_.log.getLogger("goog.html.sanitizer.SafeDomTreeProcessor"),tn_Hd=!tn_.userAgent.IE||tn_.userAgent.isDocumentModeOrHigher(10),tn_Id=!tn_.userAgent.IE||null==document.documentMode,tn_Jd=function(){};tn_a=tn_Jd.prototype;tn_a.processToString=function(a){if(!tn_Hd)return"";a=this.processToTree(a);if(0<tn_3c(a).length){var b=tn_.dom.createElement("SPAN");b.appendChild(a);a=b}a=(new XMLSerializer).serializeToString(a);return a.slice(a.indexOf(">")+1,a.lastIndexOf("</"))};
tn_a.processToTree=function(a){if(!tn_Hd)return tn_.dom.createElement("SPAN");var b=tn_.dom.createElement("SPAN");this.processRoot(b);a=this.preProcessHtml(a);a=tn_.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(tn_.string.Const.from("Never attached to DOM."),a);var c=document.createElement("template");if(tn_Id&&"content"in c)tn_.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(c,a),c=c.content;else{var d=document.implementation.createHTMLDocument("x");c=d.body;tn_.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(d.body,
a)}a=document.createTreeWalker(c,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null,!1);c=tn_N.newWeakMap();for(var e;e=a.nextNode();)if(d=this.createNode_(e)){tn_ed(d)&&c.set(e,d);e=tn_hd(e);var f=!1;if(e){var g=tn_fd(e),l=tn_gd(e).toLowerCase(),n=tn_hd(e);g!=tn_.dom.NodeType.DOCUMENT_FRAGMENT||n?"body"==l&&n&&(g=tn_hd(n))&&!tn_hd(g)&&(f=!0):f=!0;g=null;f||!e?g=b:tn_ed(e)&&(g=c.get(e));g.content&&(g=g.content);g.appendChild(d)}}else tn_.dom.removeChildren(e);c.clear&&c.clear();return b};
tn_a.createNode_=function(a){var b=tn_fd(a);switch(b){case tn_.dom.NodeType.TEXT:return this.createTextNode(a);case tn_.dom.NodeType.ELEMENT:return this.createElement_(tn_dd(a));default:return tn_.log.warning(tn_Gd,"Dropping unknown node type: "+b),null}};tn_a.createElement_=function(a){if("TEMPLATE"==tn_gd(a).toUpperCase())return null;var b=this.createElementWithoutAttributes(a);if(!b)return null;this.processElementAttributes_(a,b);return b};
tn_a.processElementAttributes_=function(a,b){var c=tn_3c(a);if(null!=c)for(var d=0,e;e=c[d];d++)if(e.specified){var f=this.processElementAttribute(a,e);null!==f&&tn_6c(b,e.name,f)}};tn_.html.sanitizer.SafeDomTreeProcessor=tn_Jd;tn_.html.sanitizer.TagBlacklist={APPLET:!0,AUDIO:!0,BASE:!0,BGSOUND:!0,EMBED:!0,FORM:!0,IFRAME:!0,ISINDEX:!0,KEYGEN:!0,LAYER:!0,LINK:!0,META:!0,OBJECT:!0,SCRIPT:!0,SVG:!0,STYLE:!0,TEMPLATE:!0,VIDEO:!0};tn_.html.sanitizer.TagWhitelist={A:!0,ABBR:!0,ACRONYM:!0,ADDRESS:!0,AREA:!0,ARTICLE:!0,ASIDE:!0,B:!0,BDI:!0,BDO:!0,BIG:!0,BLOCKQUOTE:!0,BR:!0,BUTTON:!0,CAPTION:!0,CENTER:!0,CITE:!0,CODE:!0,COL:!0,COLGROUP:!0,DATA:!0,DATALIST:!0,DD:!0,DEL:!0,DETAILS:!0,DFN:!0,DIALOG:!0,DIR:!0,DIV:!0,DL:!0,DT:!0,EM:!0,FIELDSET:!0,FIGCAPTION:!0,FIGURE:!0,FONT:!0,FOOTER:!0,FORM:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,HEADER:!0,HGROUP:!0,HR:!0,I:!0,IMG:!0,INPUT:!0,INS:!0,KBD:!0,LABEL:!0,LEGEND:!0,LI:!0,MAIN:!0,MAP:!0,MARK:!0,
MENU:!0,METER:!0,NAV:!0,NOSCRIPT:!0,OL:!0,OPTGROUP:!0,OPTION:!0,OUTPUT:!0,P:!0,PRE:!0,PROGRESS:!0,Q:!0,S:!0,SAMP:!0,SECTION:!0,SELECT:!0,SMALL:!0,SOURCE:!0,SPAN:!0,STRIKE:!0,STRONG:!0,STYLE:!0,SUB:!0,SUMMARY:!0,SUP:!0,TABLE:!0,TBODY:!0,TD:!0,TEXTAREA:!0,TFOOT:!0,TH:!0,THEAD:!0,TIME:!0,TR:!0,TT:!0,U:!0,UL:!0,VAR:!0,WBR:!0};tn_.html.sanitizer.HTML_SANITIZER_BOOKKEEPING_PREFIX_="data-sanitizer-";tn_.html.sanitizer.HTML_SANITIZER_SANITIZED_ATTR_NAME_=tn_.html.sanitizer.HTML_SANITIZER_BOOKKEEPING_PREFIX_+"original-tag";tn_.html.sanitizer.HTML_SANITIZER_INVALID_CUSTOM_TAGS_={"ANNOTATION-XML":!0,"COLOR-PROFILE":!0,"FONT-FACE":!0,"FONT-FACE-SRC":!0,"FONT-FACE-URI":!0,"FONT-FACE-FORMAT":!0,"FONT-FACE-NAME":!0,"MISSING-GLYPH":!0};tn_.html.sanitizer.RANDOM_CONTAINER_="*";
tn_.html.sanitizer.HtmlSanitizer=function(a){a=a||new tn_.html.sanitizer.HtmlSanitizer.Builder;a.installPolicies_();this.attributeHandlers_=tn_.object.clone(a.attributeWhitelist_);this.tagBlacklist_=tn_.object.clone(a.tagBlacklist_);this.tagWhitelist_=tn_.object.clone(a.tagWhitelist_);this.shouldAddOriginalTagNames_=a.shouldAddOriginalTagNames_;tn_.array.forEach(a.dataAttributeWhitelist_,function(b){if(!tn_.string.startsWith(b,"data-"))throw new tn_.asserts.AssertionError('Only "data-" attributes allowed, got: %s.',
[b]);if(tn_.string.startsWith(b,tn_.html.sanitizer.HTML_SANITIZER_BOOKKEEPING_PREFIX_))throw new tn_.asserts.AssertionError('Attributes with "%s" prefix are not allowed, got: %s.',[tn_.html.sanitizer.HTML_SANITIZER_BOOKKEEPING_PREFIX_,b]);this.attributeHandlers_["* "+b.toUpperCase()]=tn_.html.sanitizer.HtmlSanitizer.cleanUpAttribute_},this);tn_.array.forEach(a.customElementTagWhitelist_,function(b){b=b.toUpperCase();if(!tn_.string.contains(b,"-")||tn_.html.sanitizer.HTML_SANITIZER_INVALID_CUSTOM_TAGS_[b])throw new tn_.asserts.AssertionError("Only valid custom element tag names allowed, got: %s.",
[b]);this.tagWhitelist_[b]=!0},this);this.networkRequestUrlPolicy_=a.networkRequestUrlPolicy_;this.styleContainerId_=a.styleContainerId_;this.currentStyleContainerId_=null;this.inlineStyleRules_=a.inlineStyleRules_};tn_.inherits(tn_.html.sanitizer.HtmlSanitizer,tn_Jd);
tn_.html.sanitizer.HtmlSanitizer.wrapUrlPolicy_=function(a){return function(b,c){b=tn_.html.sanitizer.HtmlSanitizer.cleanUpAttribute_(b);return(c=a(b,c))&&tn_.html.SafeUrl.unwrap(c)!=tn_.html.SafeUrl.INNOCUOUS_STRING?tn_.html.SafeUrl.unwrap(c):null}};
tn_.html.sanitizer.HtmlSanitizer.Builder=function(){this.attributeWhitelist_={};tn_.array.forEach([tn_.html.sanitizer.AttributeWhitelist,tn_.html.sanitizer.AttributeSanitizedWhitelist],function(a){tn_.array.forEach(tn_.object.getKeys(a),function(b){this.attributeWhitelist_[b]=tn_.html.sanitizer.HtmlSanitizer.cleanUpAttribute_},this)},this);this.attributeOverrideList_={};this.dataAttributeWhitelist_=[];this.customElementTagWhitelist_=[];this.tagBlacklist_=tn_.object.clone(tn_.html.sanitizer.TagBlacklist);
this.tagWhitelist_=tn_.object.clone(tn_.html.sanitizer.TagWhitelist);this.shouldAddOriginalTagNames_=!1;this.urlPolicy_=tn_.html.sanitizer.HtmlSanitizer.defaultUrlPolicy_;this.networkRequestUrlPolicy_=tn_.html.sanitizer.HtmlSanitizer.defaultNetworkRequestUrlPolicy_;this.namePolicy_=tn_.html.sanitizer.HtmlSanitizer.defaultNamePolicy_;this.tokenPolicy_=tn_.html.sanitizer.HtmlSanitizer.defaultTokenPolicy_;this.sanitizeInlineCssPolicy_=tn_.functions.NULL;this.styleContainerId_=null;this.policiesInstalled_=
this.inlineStyleRules_=!1};tn_a=tn_.html.sanitizer.HtmlSanitizer.Builder.prototype;
tn_a.inlineStyleRules=function(){if(this.sanitizeInlineCssPolicy_==tn_.functions.NULL)throw Error("Inlining style rules requires allowing STYLE attributes first.");if(!("STYLE"in this.tagBlacklist_))throw Error("You have already configured the builder to allow STYLE tags in the output. Inlining style rules would prevent STYLE tags from appearing in the output and conflict with such directive.");this.inlineStyleRules_=!0;return this};
tn_a.allowCssStyles=function(){this.sanitizeInlineCssPolicy_=tn_.html.sanitizer.HtmlSanitizer.sanitizeCssDeclarationList_;return this};tn_a.withCustomNetworkRequestUrlPolicy=function(a){this.networkRequestUrlPolicy_=a;return this};tn_a.withCustomUrlPolicy=function(a){this.urlPolicy_=a;return this};tn_a.withCustomNamePolicy=function(a){this.namePolicy_=a;return this};tn_a.withCustomTokenPolicy=function(a){this.tokenPolicy_=a;return this};
tn_.html.sanitizer.HtmlSanitizer.wrapPolicy_=function(a,b){return function(c,d,e,f){c=a(c,d,e,f);return null==c?null:b(c,d,e,f)}};tn_.html.sanitizer.HtmlSanitizer.installDefaultPolicy_=function(a,b,c,d){a[c]&&!b[c]&&(a[c]=tn_.html.sanitizer.HtmlSanitizer.wrapPolicy_(a[c],d))};tn_.html.sanitizer.HtmlSanitizer.Builder.prototype.build=function(){return new tn_.html.sanitizer.HtmlSanitizer(this)};
tn_.html.sanitizer.HtmlSanitizer.Builder.prototype.installPolicies_=function(){if(this.policiesInstalled_)throw Error("HtmlSanitizer.Builder.build() can only be used once.");var a=tn_.html.sanitizer.HtmlSanitizer.installDefaultPolicy_;a(this.attributeWhitelist_,this.attributeOverrideList_,"* USEMAP",tn_.html.sanitizer.HtmlSanitizer.sanitizeUrlFragment_);var b=["* ACTION","* CITE","* HREF"],c=tn_.html.sanitizer.HtmlSanitizer.wrapUrlPolicy_(this.urlPolicy_);tn_.array.forEach(b,function(e){a(this.attributeWhitelist_,
this.attributeOverrideList_,e,c)},this);b=["* LONGDESC","* SRC","LINK HREF"];var d=tn_.html.sanitizer.HtmlSanitizer.wrapUrlPolicy_(this.networkRequestUrlPolicy_);tn_.array.forEach(b,function(e){a(this.attributeWhitelist_,this.attributeOverrideList_,e,d)},this);b=["* FOR","* HEADERS","* NAME"];tn_.array.forEach(b,function(e){a(this.attributeWhitelist_,this.attributeOverrideList_,e,tn_.partial(tn_.html.sanitizer.HtmlSanitizer.sanitizeName_,this.namePolicy_))},this);a(this.attributeWhitelist_,this.attributeOverrideList_,
"A TARGET",tn_.partial(tn_.html.sanitizer.HtmlSanitizer.allowedAttributeValues_,["_blank","_self"]));a(this.attributeWhitelist_,this.attributeOverrideList_,"* CLASS",tn_.partial(tn_.html.sanitizer.HtmlSanitizer.sanitizeClasses_,this.tokenPolicy_));a(this.attributeWhitelist_,this.attributeOverrideList_,"* ID",tn_.partial(tn_.html.sanitizer.HtmlSanitizer.sanitizeId_,this.tokenPolicy_));a(this.attributeWhitelist_,this.attributeOverrideList_,"* STYLE",tn_.partial(this.sanitizeInlineCssPolicy_,d));this.policiesInstalled_=
!0};tn_.html.sanitizer.HtmlSanitizer.defaultUrlPolicy_=tn_.html.SafeUrl.sanitize;tn_.html.sanitizer.HtmlSanitizer.defaultNetworkRequestUrlPolicy_=tn_.functions.NULL;tn_.html.sanitizer.HtmlSanitizer.defaultNamePolicy_=tn_.functions.NULL;tn_.html.sanitizer.HtmlSanitizer.defaultTokenPolicy_=tn_.functions.NULL;tn_.html.sanitizer.HtmlSanitizer.attrIdentifier_=function(a,b){a||(a="*");return(a+" "+b).toUpperCase()};
tn_.html.sanitizer.HtmlSanitizer.sanitizeCssDeclarationList_=function(a,b,c,d){if(!d.cssStyle)return null;b=function(e,f){c.cssProperty=f;e=a(e,c);return null==e?null:tn_.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(tn_.string.Const.from("HtmlSanitizerPolicy created with networkRequestUrlPolicy_ when installing '* STYLE' handler."),e)};d=tn_.html.SafeStyle.unwrap(tn_.html.sanitizer.CssSanitizer.sanitizeInlineStyle(d.cssStyle,b));return""==d?null:d};
tn_.html.sanitizer.HtmlSanitizer.cleanUpAttribute_=function(a){return tn_.string.trim(a)};tn_.html.sanitizer.HtmlSanitizer.allowedAttributeValues_=function(a,b){b=tn_.string.trim(b);return tn_.array.contains(a,b.toLowerCase())?b:null};tn_.html.sanitizer.HtmlSanitizer.sanitizeUrlFragment_=function(a){return(a=tn_.string.trim(a))&&"#"==a.charAt(0)?a:null};tn_.html.sanitizer.HtmlSanitizer.sanitizeName_=function(a,b,c){b=tn_.string.trim(b);return a(b,c)};
tn_.html.sanitizer.HtmlSanitizer.sanitizeClasses_=function(a,b,c){b=b.split(/(?:\s+)/);for(var d=[],e=0;e<b.length;e++){var f=a(b[e],c);f&&d.push(f)}return 0==d.length?null:d.join(" ")};tn_.html.sanitizer.HtmlSanitizer.sanitizeId_=function(a,b,c){b=tn_.string.trim(b);return a(b,c)};tn_.html.sanitizer.HtmlSanitizer.getContext_=function(a,b){var c={cssStyle:void 0};"style"==a&&(c.cssStyle=tn_9c(b));return c};tn_a=tn_.html.sanitizer.HtmlSanitizer.prototype;
tn_a.sanitize=function(a){this.currentStyleContainerId_=this.getStyleContainerId_();a=this.processToString(a);return tn_.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(tn_.string.Const.from("Output of HTML sanitizer"),a)};tn_a.processRoot=function(a){this.currentStyleContainerId_&&this.styleContainerId_==tn_.html.sanitizer.RANDOM_CONTAINER_&&(a.id=this.currentStyleContainerId_)};
tn_a.preProcessHtml=function(a){if(!this.inlineStyleRules_)return a;a=tn_.html.sanitizer.CssSanitizer.safeParseHtmlAndGetInertElement("<div>"+a+"</div>");tn_.asserts.assert(a,"Older browsers that don't support inert parsing should not get to this branch");tn_.html.sanitizer.CssSanitizer.inlineStyleRules(a);return a.innerHTML};
tn_a.getStyleContainerId_=function(){var a=this.styleContainerId_==tn_.html.sanitizer.RANDOM_CONTAINER_,b=!("STYLE"in this.tagBlacklist_)&&"STYLE"in this.tagWhitelist_;return a&&b?"sanitizer-"+tn_.string.getRandomString():this.styleContainerId_};
tn_a.createTextNode=function(a){var b=a.data;(a=tn_hd(a))&&"style"==tn_gd(a).toLowerCase()&&!("STYLE"in this.tagBlacklist_)&&"STYLE"in this.tagWhitelist_&&(b=tn_.html.SafeStyleSheet.unwrap(tn_.html.sanitizer.CssSanitizer.sanitizeStyleSheetString(b,this.currentStyleContainerId_,tn_.bind(function(c,d){return this.networkRequestUrlPolicy_(c,{cssProperty:d})},this))));return document.createTextNode(b)};
tn_a.createElementWithoutAttributes=function(a){a=tn_gd(a).toUpperCase();if(a in this.tagBlacklist_)return null;if(this.tagWhitelist_[a])return document.createElement(a);var b=tn_.dom.createElement("SPAN");this.shouldAddOriginalTagNames_&&tn_6c(b,tn_.html.sanitizer.HTML_SANITIZER_SANITIZED_ATTR_NAME_,a.toLowerCase());return b};
tn_a.processElementAttribute=function(a,b){var c=b.name;if(tn_.string.startsWith(c,tn_.html.sanitizer.HTML_SANITIZER_BOOKKEEPING_PREFIX_))return null;var d=tn_gd(a);b=b.value;var e={tagName:tn_.string.trim(d).toLowerCase(),attributeName:tn_.string.trim(c).toLowerCase()};a=tn_.html.sanitizer.HtmlSanitizer.getContext_(e.attributeName,a);d=tn_.html.sanitizer.HtmlSanitizer.attrIdentifier_(d,c);if(d in this.attributeHandlers_)return c=this.attributeHandlers_[d],c(b,e,a);c=tn_.html.sanitizer.HtmlSanitizer.attrIdentifier_(null,
c);return c in this.attributeHandlers_?(c=this.attributeHandlers_[c],c(b,e,a)):null};tn_.html.sanitizer.HtmlSanitizer.sanitize=function(a){var b=(new tn_.html.sanitizer.HtmlSanitizer.Builder).build();return b.sanitize(a)};tn_L.sanitizer={};tn_L.sanitizer.htmlSanitizer={};tn_L.sanitizer.htmlSanitizer.sanitizeHtmlAssertUnchangedWithSanitizer=function(a,b){a=a.sanitize(b);if(tn_.DEBUG){var c=tn_.dom.createElement("DIV");tn_.dom.safe.setInnerHtml(c,a);tn_rd(b,c,!1)}return a};
tn_L.sanitizer.htmlSanitizer.lenientlySanitizeHtmlAssertUnchanged=function(a){var b=(new tn_.html.sanitizer.HtmlSanitizer.Builder).allowCssStyles().withCustomNamePolicy(tn_.functions.identity).withCustomTokenPolicy(tn_.functions.identity).withCustomNetworkRequestUrlPolicy(tn_.html.SafeUrl.sanitize).withCustomUrlPolicy(tn_.html.SafeUrl.sanitize).build();return tn_L.sanitizer.htmlSanitizer.sanitizeHtmlAssertUnchangedWithSanitizer(b,a)};
tn_L.sanitizer.htmlSanitizer.sanitizeHtmlAssertUnchanged=function(a){var b=(new tn_.html.sanitizer.HtmlSanitizer.Builder).build();return tn_L.sanitizer.htmlSanitizer.sanitizeHtmlAssertUnchangedWithSanitizer(b,a)};var tn_Kd="http://www.gstatic.com/translate/infowindow/";function tn_Ld(){return tn_Kd+"transparent.png"};function tn_O(a,b,c,d,e,f){var g=((b?b.ownerDocument:null)||document).createElement(a);c&&tn_P(g,c);d&&tn_Md(g,d);g.style.display="none";b&&!e&&(b.appendChild(g),b.windo&&(g.windo=b.windo));f||window.setTimeout(function(){g.style.display=""},0);return g}function tn_Nd(a,b){a=((b?b.ownerDocument:null)||document).createTextNode(a);b&&b.appendChild(a);return a}function tn_Q(a){return tn_R(a)+"px"}function tn_P(a,b){a=a.style;a.position="absolute";a.left=tn_Q(b.x);a.top=tn_Q(b.y)}
function tn_Md(a,b){a=a.style;a.width=tn_Q(b.width);a.height=tn_Q(b.height)}function tn_S(a,b){a.style.width=tn_Q(b)}function tn_T(a,b){a.style.height=tn_Q(b)}function tn_U(a){a.style.display="none"}function tn_V(a){a.style.display=""}function tn_Od(a){a.style.visibility="hidden"}var tn_Pd=Math.min,tn_W=Math.max,tn_R=Math.round;function tn_X(a,b){try{a.style.cursor=b}catch(c){"pointer"==b&&tn_X(a,"hand")}}
function tn_Qd(a){var b=a,c="gmnoscreen",d=b.className?""+b.className:"";if(d&&-1!=d.indexOf(c)){d=d.split(/\s+/);for(var e=0;e<d.length;++e)d[e]==c&&d.splice(e--,1);b.className=d.join(" ")}b="gmnoprint";if(c=a.className?""+a.className:""){c=c.split(/\s+/);d=!1;for(e=0;e<c.length;++e)if(c[e]==b){d=!0;break}d||c.push(b);a.className=c.join(" ")}else a.className=b}function tn_Rd(a,b,c){return window.setTimeout(function(){b.apply(a)},c)}
function tn_Sd(a){a.parentNode&&(a.parentNode.removeChild(a),tn_Va(a,tn_Td))}function tn_Ud(a,b){for(var c=a.length,d=0;d<c;++d)b(a[d],d)}function tn_Vd(a,b,c){for(var d in a)(c||!a.hasOwnProperty||a.hasOwnProperty(d))&&b(d,a[d])}function tn_Wd(a,b,c,d){c=c||0;for(d=d||b.length;c<d;++c)a.push(b[c])}function tn_Xd(){return!1}
function tn_Y(a,b){var c=(a?a.ownerDocument:null)||document;if(a.currentStyle)return b=tn_Yd(b),a.currentStyle[b];if(c.defaultView&&c.defaultView.getComputedStyle)return(a=c.defaultView.getComputedStyle(a,""))?a.getPropertyValue(b):"";b=tn_Yd(b);return a.style[b]}
function tn_Zd(a,b,c){b=c?c:tn_Y(a,b);if("number"==typeof b||isNaN(parseInt(b,10)))return b;if(2<b.length&&"px"==b.substring(b.length-2))return parseInt(b,10);(c=a.ownerDocument.getElementById("__mapsBaseCssDummy__"))?a.parentNode.appendChild(c):(c=tn_O("div",a,new tn_c(0,0),new tn_Z(0,0)),c.id="__mapsBaseCssDummy__",tn_Od(c));c.style.width="0px";c.style.width=b;return c.offsetWidth}function tn__d(a){return new tn_Z(tn_0d(a,"border-left-width"),tn_0d(a,"border-top-width"))}
function tn_0d(a,b){var c=tn_Y(a,b);return isNaN(parseInt(c,10))?0:tn_Zd(a,b,c)}function tn_Yd(a){return a.replace(/-(\w)/g,function(b,c){return(""+c).toUpperCase()})}function tn_1d(a){var b=!1;a&&"object"==typeof a&&(b="function"==typeof Window?a instanceof Window:"object"==typeof a.navigator&&"object"==typeof a.history&&"object"==typeof a.document);return a=b?a:a&&a.windo?a.windo:window};function tn_2d(a,b,c){tn_3d([a],function(d){b(d[0])},c)}
function tn_3d(a,b,c){c=c||screen.width;var d=tn_O("div",window.document.body,new tn_c(-screen.width,-screen.height),new tn_Z(c,screen.height)),e=[];for(c=0;c<a.length;c++){var f=tn_O("div",d,tn_c.ORIGIN);f.appendChild(a[c]);e.push(f)}window.setTimeout(function(){for(var g=[],l=new tn_Z(0,0),n=0;n<e.length;n++){var k=e[n],h=new tn_Z(k.offsetWidth,k.offsetHeight);g.push(h);k.removeChild(a[n]);tn_Sd(k);l.width=tn_W(l.width,h.width);l.height=tn_W(l.height,h.height)}tn_Sd(d);e=null;b(g,l)},0)};function tn_4d(a,b,c,d,e,f,g){e&&1==tn__.type?(b=tn_O("div",b,c,d),b.style.overflow="hidden",d&&f&&(b.sizingMethod="scale"),d=tn_O("img",b),tn_Od(d),tn_5d(d,tn_6d,tn_7d)):(b=tn_O("img",b,c,d),g&&tn_5d(b,tn_6d,tn_8d));g&&(b.hideAndTrackLoading=!0);g=b;tn__.isGeckoBased()?g.style.MozUserSelect="none":(g.unselectable="on",g.onselectstart=tn_Xd);1==tn__.type&&(b.galleryImg="no");b.style.border=tn_Q(0);b.style.padding=tn_Q(0);b.style.margin=tn_Q(0);b.oncontextmenu=tn_9d;g=b;"DIV"==g.tagName?(g.firstChild.src=
a,g.src=a,g.hideAndTrackLoading&&(g.style.filter="",g.loaded=!1)):g.hideAndTrackLoading&&a!=tn_Ld()?(a!=tn_Ld()?(g.loaded=!1,g.pendingSrc=a):g.pendingSrc=null,g.src=tn_Ld()):g.src=a;return b}function tn_7d(){var a=this.parentNode;a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod="+(a.sizingMethod?a.sizingMethod:"crop")+',src="'+this.src+'")';a.hideAndTrackLoading&&(a.loaded=!0)}
function tn_8d(){var a=this;a.src==tn_Ld()&&a.pendingSrc?(a.src=a.pendingSrc,a.pendingSrc=null):a.loaded=!0};var tn_$d="dblclick",tn_6d="load",tn_ae="unload",tn_be="clearlisteners";var tn_ce=!1;function tn_0(){this.listeners_=[]}function tn_de(){}tn_0.instance=function(a){a||(a=window);a.gEventListenerPool||(a.gEventListenerPool=new tn_0);return a.gEventListenerPool};tn_0.remove=function(a){tn_0.instance(tn_1d(a)).remove_(a)};tn_0.prototype.remove_=function(a){var b=this.listeners_.pop(),c=a.index_;c<this.listeners_.length&&(this.listeners_[c]=b,b.setIndex_(c));a.setIndex_(-1)};tn_0.push=function(a){tn_0.instance(tn_1d(a)).push_(a)};
tn_0.prototype.push_=function(a){this.listeners_.push(a);a.setIndex_(this.listeners_.length-1)};tn_0.prototype.clear=function(){for(var a=0;a<this.listeners_.length;++a)this.listeners_[a].setIndex_(-1);this.listeners_=[]};function tn_ee(a,b,c){a=new EventListener(a,b,c,0);tn_0.push(a);return a}function tn_fe(a){a.remove();tn_0.remove(a)}function tn_Td(a){tn_1(a,tn_be);tn_Ud(tn_ge(a),function(b){b.remove();tn_0.remove(b)})}
function tn_ge(a,b){var c=[];(a=a.__e_)&&(b?a[b]&&tn_Wd(c,a[b]):tn_Vd(a,function(d,e){tn_Wd(c,e)}));return c}function tn_he(a,b,c){var d=a.__e_;if(d){var e=d[b];e||(e=[],c&&(d[b]=e))}else e=[],c&&(a.__e_={},a.__e_[b]=e);return e}function tn_1(a,b,c){var d=[];tn_Wd(d,arguments,2);tn_Ud(tn_ge(a,b),function(e){if(tn_ce)e.apply(a,d);else try{e.apply(a,d)}catch(f){}})}
function tn_5d(a,b,c){3==tn__.type&&b==tn_$d?(a["on"+b]=c,c=new EventListener(a,b,c,3)):a.addEventListener?(a.addEventListener(b,c,!1),c=new EventListener(a,b,c,1)):a.attachEvent?(c=tn_ie(a,c),a.attachEvent("on"+b,c),c=new EventListener(a,b,c,2)):(a["on"+b]=c,c=new EventListener(a,b,c,3));var d=tn_1d(a);a==d&&b==tn_ae||tn_0.push(c);return c}function tn_2(a,b,c,d){c=tn_je(c,d);return tn_5d(a,b,c)}function tn_ke(a,b,c){tn_2(a,"click",b,c);1==tn__.type&&tn_2(a,tn_$d,b,c)}
function tn_je(a,b){return function(c){c||(c=window.event);c&&!c.target&&(c.target=c.srcElement);b.call(a,c,this)}}function tn_ie(a,b){return function(){return b.apply(a,arguments)}}function EventListener(a,b,c,d){tn_e(a);tn_e("function"==typeof c);var e=this;e.instance_=a;e.eventName_=b;e.handler_=c;e.registrationType_=d;e.index_=-1;c=tn_1d(a);e.windo=c;tn_he(a,b,!0).push(e)}
EventListener.prototype.remove=function(){var a=this;switch(a.registrationType_){case 1:a.instance_.removeEventListener(a.eventName_,a.handler_,!1);break;case 2:a.instance_.detachEvent("on"+a.eventName_,a.handler_);break;case 3:a.instance_["on"+a.eventName_]=null}tn_Fa(tn_he(a.instance_,a.eventName_),a);a.instance_=null;a.handler_=null;a.remove=tn_de;a.apply=tn_de};EventListener.prototype.setIndex_=function(a){this.index_=a};
EventListener.prototype.apply=function(a,b){return this.handler_.apply(a,b)};EventListener.prototype.getInstance=function(){return this.instance_};function tn_le(a){"click"==a.type&&tn_1(document,"logclick",a);1==tn__.type?(window.event.cancelBubble=!0,window.event.returnValue=!1):(a.preventDefault(),a.stopPropagation())}function tn_me(a){"click"==a.type&&tn_1(document,"logclick",a);1==tn__.type?window.event.cancelBubble=!0:a.stopPropagation()}
function tn_9d(a){1==tn__.type?window.event.returnValue=!1:a.preventDefault()};var tn_ne="opera msie chrome applewebkit firefox camino mozilla".split(" "),tn_oe="x11; macintosh windows android ipad ipod iphone webos".split(" ");
function tn_3(a){this.agent=a;this.os=this.type=-1;this.build=this.revision=this.version=0;a=a.toLowerCase();for(var b=0;b<tn_ne.length;b++){var c=tn_ne[b];if(-1!=a.indexOf(c)){this.type=b;b=new RegExp(c+"[ /]?([0-9]+(.[0-9]+)?)");if(b=b.exec(a))this.version=parseFloat(b[1]);break}}6==this.type&&(b=/^Mozilla\/.*Gecko\/.*(Minefield|Shiretoko)[ /]?([0-9]+(.[0-9]+)?)/,b=b.exec(this.agent))&&(this.type=4,this.version=parseFloat(b[2]));3==this.type&&(b=/^.*Version\/?([0-9]+(.[0-9]+)?)/,b=b.exec(this.agent))&&
(this.build=this.version,this.version=parseFloat(b[1]));0==this.type&&(b=/^Opera\/9.[89].*Version\/?([0-9]+(.[0-9]+)?)/,b=b.exec(this.agent))&&(this.version=parseFloat(b[1]));for(b=0;b<tn_oe.length;b++)if(c=tn_oe[b],-1!=a.indexOf(c)){this.os=b;break}1==this.os?(b=/Mac OS X[ ]+([0-9]+)[\._]([0-9]+)/,b.exec(this.agent)):2==this.os&&(b=/Windows NT ([0-9]+.[0-9]+)/,b.exec(this.agent));1==this.os&&a.indexOf("intel");a=/\brv:\s*(\d+\.\d+)/.exec(a);this.isGeckoBased()&&a&&(this.revision=parseFloat(a[1]))}
tn_3.prototype.isGeckoBased=function(){return 4==this.type||6==this.type||5==this.type};tn_3.prototype.isSafari=function(){return 3==this.type};tn_3.prototype.isOpera=function(){return 0==this.type};tn_3.OS_NAMES={};tn_3.OS_NAMES[2]="windows";tn_3.OS_NAMES[1]="macos";tn_3.OS_NAMES[0]="unix";tn_3.OS_NAMES[3]="android";tn_3.OS_NAMES[6]="iphone";tn_3.OS_NAMES[-1]="other";tn_3.BROWSER_NAMES={};tn_3.BROWSER_NAMES[1]="ie";tn_3.BROWSER_NAMES[4]="firefox";tn_3.BROWSER_NAMES[2]="chrome";
tn_3.BROWSER_NAMES[3]="safari";tn_3.BROWSER_NAMES[0]="opera";tn_3.BROWSER_NAMES[5]="camino";tn_3.BROWSER_NAMES[6]="mozilla";tn_3.BROWSER_NAMES[-1]="other";var tn__=new tn_3(navigator.userAgent);tn_c.ORIGIN=new tn_c(0,0);tn_c.prototype.toString=function(){return"("+this.x+", "+this.y+")"};tn_c.prototype.equals=function(a){return a?a.x==this.x&&a.y==this.y:!1};function tn_Z(a,b){this.width=a;this.height=b}tn_Z.ZERO=new tn_Z(0,0);tn_Z.prototype.toString=function(){return"("+this.width+", "+this.height+")"};tn_Z.prototype.equals=function(a){return a?a.width==this.width&&a.height==this.height:!1};function tn_pe(a,b){for(var c=new tn_c(0,0);a&&a!=b;){if("BODY"==a.nodeName){var d=c,e=a,f=!1;if(tn__.isGeckoBased()){f="visible"!=tn_Y(e,"overflow")&&"visible"!=tn_Y(e.parentNode,"overflow");var g="static"!=tn_Y(e,"position");if(g||f){d.x+=tn_Zd(e,"margin-left");d.y+=tn_Zd(e,"margin-top");var l=tn__d(e.parentNode);d.x+=l.width;d.y+=l.height}g&&(d.x+=tn_Zd(e,"left"),d.y+=tn_Zd(e,"top"))}if((tn__.isGeckoBased()||1==tn__.type)&&"BackCompat"!=document.compatMode||f)self.pageYOffset?(d.x-=self.pageXOffset,
d.y-=self.pageYOffset):(d.x-=document.documentElement.scrollLeft,d.y-=document.documentElement.scrollTop)}d=tn__d(a);c.x+=d.width;c.y+=d.height;"BODY"==a.nodeName&&tn__.isGeckoBased()||(c.x+=a.offsetLeft,c.y+=a.offsetTop);tn__.isGeckoBased()&&1.8<=tn__.revision&&a.offsetParent&&"BODY"!=a.offsetParent.nodeName&&"visible"!=tn_Y(a.offsetParent,"overflow")&&(d=tn__d(a.offsetParent),c.x+=d.width,c.y+=d.height);a.offsetParent&&(c.x-=a.offsetParent.scrollLeft,c.y-=a.offsetParent.scrollTop);if(d=1!=tn__.type)a:{d=
a;if(d.offsetParent&&"BODY"==d.offsetParent.nodeName&&"static"==tn_Y(d.offsetParent,"position"))if(0==tn__.type&&"static"!=tn_Y(d,"position")){d=!0;break a}else if(0!=tn__.type&&"absolute"==tn_Y(d,"position")){d=!0;break a}d=!1}if(d){tn__.isGeckoBased()&&(c.x-=self.pageXOffset,c.y-=self.pageYOffset,d=tn__d(a.offsetParent.parentNode),c.x+=d.width,c.y+=d.height);break}3==tn__.type&&a.offsetParent&&(d=tn__d(a.offsetParent),c.x-=d.width,c.y-=d.height);a=a.offsetParent}1==tn__.type&&!b&&document.documentElement&&
(c.x+=document.documentElement.clientLeft,c.y+=document.documentElement.clientTop);return b&&null==a?(a=tn_pe(b),new tn_c(c.x-a.x,c.y-a.y)):c}
function tn_qe(a,b){if("undefined"!=typeof a.offsetX){var c=a.target||a.srcElement;3==c.nodeType&&(c=c.parentNode);b=tn_pe(c,b);a=new tn_c(a.offsetX,a.offsetY);3==tn__.type&&(c=tn__d(c),a.x-=c.width,a.y-=c.height);return new tn_c(b.x+a.x,b.y+a.y)}return"undefined"!=typeof a.clientX?(a=3==tn__.type?new tn_c(a.pageX-self.pageXOffset,a.pageY-self.pageYOffset):new tn_c(a.clientX,a.clientY),b=tn_pe(b),new tn_c(a.x-b.x,a.y-b.y)):tn_c.ORIGIN};function tn_re(a){this.ticks=a;this.tick=0}tn_re.prototype.reset=function(){this.tick=0};tn_re.prototype.next=function(){this.tick++;var a=Math.PI*(this.tick/this.ticks-.5);return(Math.sin(a)+1)/2};tn_re.prototype.more=function(){return this.tick<this.ticks};tn_re.prototype.extend=function(){this.tick>this.ticks/3&&(this.tick=tn_R(this.ticks/3))};var tn_se=!1;function tn_te(a,b,c){this.name=a;if("string"==typeof b){var d=a=tn_O("div",null);if(d.innerHTML!=b){for(var e=d,f;f=e.firstChild;)tn_Va(f,tn_Td),e.removeChild(f);d.innerHTML=b}b=a}this.contentElem=b;b.style.zIndex=9500;this.onclick=c}
function tn_ue(){this.rectPosition_=new Rect(0,0,0,0);this.pixelOffset_=tn_Z.ZERO;this.tabs_=[];this.contentContainers_=[];this.tabImages_=[];this.tabShadowOverlapImages_=[];this.selectedTab_=this.totalTabWidth_=0;this.centerSize_=this.boundSize_(tn_Z.ZERO);this.images_={};this.allowBeside_=this.allowDownwards_=this.keepInBounds_=!1;this.tabPos_=new tn_c(8,8);this.interfaceDirection_="ltr"}tn_a=tn_ue.prototype;
tn_a.create=function(a,b){var c=this.images_;a=tn_ve(c,a,[["iw_n",628,6,0,0,"iw_n1"],["iw_n",628,6,0,0,"iw_n2"],["iw_w",6,598,0,0],["iw_e",6,598,0,0],["iw_s0",628,6,0,0,"iw_s1"],["iw_s0",628,6,0,0,"iw_s2"],["iw_c",628,598,0,0]]);var d=new tn_Z(6,6);tn_4(c,a,"iw_nw",d);tn_4(c,a,"iw_ne",d);tn_4(c,a,"iw_xtap",new tn_Z(32,21));tn_4(c,a,"iw_xtap_l",new tn_Z(32,21));tn_4(c,a,"iw_xtap_u",new tn_Z(32,21));tn_4(c,a,"iw_xtap_ul",new tn_Z(32,21));tn_4(c,a,"iw_xtap_rd",new tn_Z(21,32));tn_4(c,a,"iw_xtap_ld",
new tn_Z(21,32));tn_4(c,a,"iw_sw0",d,"iw_sw");tn_4(c,a,"iw_se0",d,"iw_se");tn_Qd(a);this.window_=a;d=new tn_Z(8,8);b=tn_ve(c,b,[["iws_n",628,8,0,0,"iws_n1"],["iws_n",628,8,0,0,"iws_n2"],["iws_w",8,598,0,0],["iws_e",8,598,0,0],["iws_s",628,8,0,0,"iws_s1"],["iws_s",628,8,0,0,"iws_s2"],["iws_c",628,598,0,0]]);tn_4(c,b,"iws_nw",d);tn_4(c,b,"iws_ne",d);tn_4(c,b,"iws_sw",d);tn_4(c,b,"iws_se",d);tn_4(c,b,"iws_tap",new tn_Z(37,16));tn_4(c,b,"iws_tap_l",new tn_Z(32,16));tn_4(c,b,"iws_tap_u",new tn_Z(37,26));
tn_4(c,b,"iws_tap_ul",new tn_Z(32,26));tn_4(c,b,"iws_tap_rd",new tn_Z(16,37));tn_4(c,b,"iws_tap_ld",new tn_Z(26,37));tn_4(c,b,"iws_tab_dl",new tn_Z(8,28));tn_4(c,b,"iws_tab_dr",new tn_Z(14,28));tn_4(c,b,"iws_tab_l",new tn_Z(8,28));tn_4(c,b,"iws_tab_r",new tn_Z(14,28));tn_U(c.iws_tab_dl);tn_U(c.iws_tab_dr);tn_U(c.iws_tab_l);tn_U(c.iws_tab_r);tn_Qd(b);this.shadow_=b;b=new tn_Z(14,13);d=tn_4(c,a,"close",b,"close",!0);d.style.zIndex=1E4;tn_X(d,"pointer");tn_ke(d,this,this.onCloseClick_);d=tn_4(c,a,"maximize",
b,"maximize",!0);d.style.zIndex=1E4;tn_Od(d);tn_X(d,"pointer");tn_ke(d,this,this.maximize);c=tn_4(c,a,"restore",b,"restore",!0);c.style.zIndex=10001;tn_Od(c);tn_X(c,"pointer");tn_ke(c,this,this.restore);tn_2(a,"mousedown",this,this.filterMouseDown_);tn_2(a,tn_$d,this,this.filterMouseDblClick_);tn_2(a,"click",this,this.filterMouseDown_);tn_2(a,"contextmenu",this,tn_me);tn_2(a,"mousewheel",this,tn_me);tn_2(a,"DOMMouseScroll",this,tn_me);this.hide()};tn_a.remove=function(){tn_Sd(this.shadow_);tn_Sd(this.window_)};
tn_a.allowMaximizeAndRestoreButtons=function(a){a?(tn_V(this.images_.maximize),tn_V(this.images_.restore)):(tn_U(this.images_.maximize),tn_U(this.images_.restore))};tn_a.showCloseButton=function(a){this.images_.close.style.visibility=a?"visible":"hidden"};tn_a.setInterfaceDirection=function(a){this.interfaceDirection_=!0===a||"rtl"===a?"rtl":"ltr"};tn_a.keepInBounds=function(a){this.keepInBounds_=a};tn_a.keepInScrollpane=function(a){this.keepInScrollpane_=a};
tn_a.allowDownwards=function(a){this.allowDownwards_=a};
tn_a.setNodePosition=function(a){if(!a.getClientRects)return this.setRectPosition(tn_fa(a));var b=this.getCenterSize(),c=this.images_,d=b.width,e=b.height,f=window.innerWidth||document.body.scrollWidth;b=document.documentElement.scrollLeft||window.scrollX||document.body.scrollLeft;var g=document.documentElement.scrollTop||window.scrollY||document.body.scrollTop,l=0,n=0;document.body.getClientRects&&(n=document.body.getClientRects(),l=b+n[0].left,n=g+n[0].top);tn_U(c.iw_xtap);tn_U(c.iw_xtap_l);tn_U(c.iw_xtap_u);
tn_U(c.iw_xtap_ul);tn_U(c.iw_xtap_ld);tn_U(c.iw_xtap_rd);tn_U(c.iws_tap);tn_U(c.iws_tap_l);tn_U(c.iws_tap_u);tn_U(c.iws_tap_ul);tn_U(c.iws_tap_ld);tn_U(c.iws_tap_rd);c=a.getClientRects();var k=Array(c.length),h=tn_fa(a);a=c[0].top-h.y;for(var m=0;m<c.length;++m){k[m]={left:c[m].left-l,right:c[m].right-l,top:c[m].top-n,bottom:c[m].bottom-n};0<m&&k[m].bottom==k[m-1].bottom&&(k[m].left==k[m-1].right?(k[m].left=k[m-1].left,k[m].top=tn_Pd(k[m].top,k[m-1].top)):k[m].right==k[m-1].left&&(k[m].right=k[m-
1].right,k[m].top=tn_Pd(k[m].top,k[m-1].top)));if(!p||k[m].left<=p.left)var p=k[m];if(!q||k[m].right>=q.right)var q=k[m];if(!t||k[m].top<=t.top)var t=k[m];if(!r||k[m].bottom>=r.bottom)var r=k[m]}if(this.allowBeside_&&21+d+6+12+q.right<f)return this.setRectPosition(new Rect(p.left+b,q.top-a,q.right-p.left,q.bottom-q.top));if(this.allowBeside_&&18+d+21<p.left)return this.setRectPosition(new Rect(p.left+b,p.top-a,q.right-p.left,p.bottom-p.top));this.allowDownwards_&&21+e+6+12+(1<this.tabs_.length?20:
0)>h.y-(this.keepInScrollpane_?g:0)?(d=this.allowBeside_,this.allowBeside_=!1,t=this.setRectPosition(new Rect(r.left+b,t.top-a,r.right-r.left,r.bottom-t.top))):(d=this.allowBeside_,this.allowBeside_=!1,t=this.setRectPosition(new Rect(t.left+b,t.top-a,t.right-t.left,r.bottom-t.top)));this.allowBeside_=d;return t};
tn_a.setRectPosition=function(a,b){var c=this.getCenterSize(),d=this.images_,e=c.width,f=c.height,g=document.body.scrollWidth,l=document.documentElement.scrollLeft||window.scrollX||document.body.scrollLeft,n=document.documentElement.scrollTop||window.scrollY||document.body.scrollTop;tn_U(d.iw_xtap);tn_U(d.iw_xtap_l);tn_U(d.iw_xtap_u);tn_U(d.iw_xtap_ul);tn_U(d.iw_xtap_ld);tn_U(d.iw_xtap_rd);tn_U(d.iws_tap);tn_U(d.iws_tap_l);tn_U(d.iws_tap_u);tn_U(d.iws_tap_ul);tn_U(d.iws_tap_ld);tn_U(d.iws_tap_rd);
var k=0;c=0;var h=0,m=this.allowBeside_;if(m&&21+e+6+12+a.x+a.w<l+g){var p=!0;f=d.iw_xtap_ld;n=d.iws_tap_ld}else if(m&&18+e+21+l<a.x){var q=!0;f=d.iw_xtap_rd;n=d.iws_tap_rd;c=5}else{if(this.allowDownwards_&&21+f+6+12+(1<this.tabs_.length?20:0)+(this.keepInScrollpane_?n:0)>a.y){f=d.iw_xtap_u;n=d.iws_tap_u;k=0;var t=!0}else f=d.iw_xtap,n=d.iws_tap,k=0;tn_R(a.x+a.w/2)+32+6+12>l+g&&(f==d.iw_xtap_u?(f=d.iw_xtap_ul,n=d.iws_tap_ul):(f=d.iw_xtap_l,n=d.iws_tap_l),c=5,k=32);var r=tn_R((e-32)/2);this.keepInBounds_&&
(r+6+12+k+l>a.x+tn_R(a.w/2)?(r=a.x+tn_R(a.w/2)-6-12-k-l,0>r&&(h=tn_Pd(-r,tn_R(a.w/2)),r=0)):a.x+tn_R(a.w/2)-k+e-r+18>l+g&&(t?(f=d.iw_xtap_ul,n=d.iws_tap_ul):(f=d.iw_xtap_l,n=d.iws_tap_l),c=5,k=32,r=a.x+tn_R(a.w/2)-k+e+6+12-g-l,r>e-32&&(h=tn_W(e-32-r,-tn_R(a.w/2)),r=e-32)));var u=e-32-r}tn_V(f);tn_V(n);this.pointerOffset_=p?0:q?6+e+21:6+r+k;b=this.pixelOffset_=b||tn_Z.ZERO;e=this.pointerOffset_-h;h=p||q?6:t?0:this.getTotalSize().height+(1<this.tabs_.length?20:0);e-=b.width;h-=b.height;b=new tn_c(a.x+
(p?a.w:q?0:a.w/2)-e,a.y+(p||q?a.h/2:t?a.h:0)-h);tn_P(this.window_,b);tn_P(this.shadow_,b);this.rectPosition_=a;this.nodePosition_=void 0;return this.position_(p,q,t,r,u,f,n,c)};
tn_a.position_=function(a,b,c,d,e,f,g,l){var n=!(a||b||c);this.tapImg_=f;this.shadowTapImg_=g;var k=this.getCenterSize(),h=this.images_,m=k.width,p=k.height,q=1<this.tabs_.length?this.totalTabWidth_:0;c?(tn_S(h.iw_n1,tn_W(d,0)),tn_S(h.iw_n2,tn_W(e,0)),tn_S(h.iw_s1,m-q),tn_S(h.iw_s2,0),tn_S(h.iws_n1,tn_W(d,0)),tn_S(h.iws_n2,tn_W(e,0)),tn_S(h.iws_s1,m-q),tn_S(h.iws_s2,0)):n?(tn_S(h.iw_n1,m-q),tn_S(h.iw_n2,0),tn_S(h.iw_s1,tn_W(d,0)),tn_S(h.iw_s2,tn_W(e,0)),tn_S(h.iws_n1,m-q),tn_S(h.iws_n2,0),tn_S(h.iws_s1,
tn_W(d,0)),tn_S(h.iws_s2,tn_W(e,0))):(tn_S(h.iw_n1,m),tn_S(h.iw_n2,0),tn_S(h.iw_s1,m-q),tn_S(h.iw_s2,0),tn_S(h.iws_n1,m),tn_S(h.iws_n2,0),tn_S(h.iws_s1,m-q),tn_S(h.iws_s2,0));tn_Md(h.iw_c,k);a?(tn_T(h.iw_w,tn_W(p-32,0)),tn_T(h.iw_e,tn_W(p,32)),tn_T(h.iws_w,tn_W(p-32,0)),tn_T(h.iws_e,tn_W(p,32))):b?(tn_T(h.iw_e,tn_W(p-32,0)),tn_T(h.iw_w,tn_W(p,32)),tn_T(h.iws_e,tn_W(p-32,0)),tn_T(h.iws_w,tn_W(p,32))):(tn_T(h.iw_w,p),tn_T(h.iw_e,p),tn_T(h.iws_w,p),tn_T(h.iws_e,p));e=a?15:0;k=e+5-2;var t=e+6,r=t+5,u=
t+m,v=u+5,z=a?0:b?u:t+d,w=z+l,A=z+32,G=A+5;m=c?15:!a&&!b&&1<this.tabs_.length?20:0;var y=m+5-2,x=m+6,B=x+5,C=x+(a||b?tn_W(p,32):p),E=C+5;p=c||a||b?C:0;l=p+5-(c||a||b?0:2);d=c||a||b?C+6-1:0;var H=new tn_c(t,C),I=new tn_c(r,E),J=new tn_c(t,m),K=new tn_c(r,y);tn_P(h.iw_nw,new tn_c(e,m));tn_P(h.iws_nw,new tn_c(k,y));n?(tn_P(h.iw_n1,new tn_c(t+q,m)),tn_P(h.iws_n1,new tn_c(r+q,y)),tn_P(h.iw_s1,H),tn_P(h.iws_s1,I),tn_P(h.iw_s2,new tn_c(A,C)),tn_P(h.iws_s2,new tn_c(G,E)),tn_U(h.iws_tab_dl),tn_U(h.iws_tab_dr),
tn_V(h.iws_tab_l),tn_V(h.iws_tab_r),tn_P(h.iws_tab_l,new tn_c(k,l)),tn_P(h.iws_tab_r,new tn_c(r+q-14,l))):(tn_P(h.iw_n1,J),tn_P(h.iws_n1,K),tn_P(h.iw_s2,H),tn_P(h.iws_s2,I),tn_P(h.iw_s1,new tn_c(t+q,C)),tn_P(h.iws_s1,new tn_c(r+q,E)),tn_V(h.iws_tab_dl),tn_V(h.iws_tab_dr),tn_U(h.iws_tab_l),tn_U(h.iws_tab_r),tn_P(h.iws_tab_dl,new tn_c(k,l)),tn_P(h.iws_tab_dr,new tn_c(r+q-14,l)));c?(tn_P(h.iw_n2,new tn_c(A,m)),tn_P(h.iws_n2,new tn_c(G,y))):(tn_P(h.iw_n2,J),tn_P(h.iws_n2,K));tn_P(h.iw_ne,new tn_c(u,m));
tn_P(h.iws_ne,new tn_c(v,y));tn_P(h.iw_w,new tn_c(e,x+(a?32:0)));tn_P(h.iws_w,new tn_c(k,B+(a?32:0)));tn_P(h.iw_c,new tn_c(t,x));tn_P(h.iws_c,new tn_c(r,B));tn_S(h.iw_c,u-t);tn_T(h.iw_c,C-x);tn_S(h.iws_c,v-r);tn_T(h.iws_c,E-B);tn_P(h.iw_e,new tn_c(u,x+(b?32:0)));tn_P(h.iws_e,new tn_c(v,B+(b?32:0)));tn_P(h.iw_sw,new tn_c(e,C));tn_P(h.iws_sw,new tn_c(k,E));tn_P(h.iw_se,new tn_c(u,C));tn_P(h.iws_se,new tn_c(v,E));a?(tn_P(f,new tn_c(0,x)),tn_P(g,new tn_c(0,x))):b?(tn_P(f,new tn_c(u,x)),tn_P(g,new tn_c(v,
x))):c?(tn_P(f,new tn_c(z,0)),tn_P(g,new tn_c(w,0))):(tn_P(f,new tn_c(z,C)),tn_P(g,new tn_c(w,E)));a="rtl"==this.interfaceDirection_?-0+t:u-14;b=x-0;tn_P(h.close,new tn_c(a,b));"hidden"!=h.close.style.visibility&&(a="rtl"==this.interfaceDirection_?a+16:a-16);a=new tn_c(a,b);tn_P(h.maximize,a);tn_P(h.restore,a);this.tabPos_=new tn_c(e+8,m+8);for(a=0;a<this.contentContainers_.length;a++)b=this.contentContainers_[a],tn_P(b,this.tabPos_);if(2>this.tabs_.length)tn_U(h.iws_tab_l),tn_U(h.iws_tab_r),tn_U(h.iws_tab_dl),
tn_U(h.iws_tab_dr),tn_V(h.iw_sw),tn_V(h.iws_sw),tn_V(h.iw_nw),tn_V(h.iws_nw);else for(n?(tn_U(h.iw_nw),tn_U(h.iws_nw),tn_V(h.iw_sw),tn_V(h.iws_sw)):(tn_U(h.iw_sw),tn_U(h.iws_sw),tn_V(h.iw_nw),tn_V(h.iws_nw)),a=0;a<this.tabs_.length;++a){h=this.tabs_[a];m=h.images;f=h.textWidth;b=h.labelNode;r=b.style;var D;0<a&&(D=this.tabShadowOverlapImages_[a-1]);tn_U(m.iw_tabback_dl);tn_U(m.iw_tabback_dm);tn_U(m.iw_tabback_dr);tn_U(m.iw_tabback_l);tn_U(m.iw_tabback_m);tn_U(m.iw_tabback_r);tn_U(m.iw_tab_dl);tn_U(m.iw_tab_dm);
tn_U(m.iw_tab_dr);tn_U(m.iw_tab_l);tn_U(m.iw_tab_m);tn_U(m.iw_tab_r);tn_U(m.iws_tab_m);tn_U(m.iws_tab_dm);D?(tn_U(D.iws_tab_do),tn_U(D.iws_tab_o)):(tn_U(m.iw_tab_1l),tn_U(m.iw_tab_1dl),tn_U(m.iw_tabback_1l),tn_U(m.iw_tabback_1dl),tn_U(m.iws_tab_1l),tn_U(m.iws_tab_1dl));c=this.window_.style.zIndex;if(n){this.selectedTab_==a?(g=0==a?m.iw_tab_1l:m.iw_tab_l,q=m.iw_tab_m,t=m.iw_tab_r,++c):(g=0==a?m.iw_tabback_1l:m.iw_tabback_l,q=m.iw_tabback_m,t=m.iw_tabback_r);m=m.iws_tab_m;if(D)var F=D.iws_tab_o;r.paddingTop=
tn_Q(4);r.paddingBottom=tn_Q(0)}else this.selectedTab_==a?(g=0==a?m.iw_tab_1dl:m.iw_tab_dl,q=m.iw_tab_dm,t=m.iw_tab_dr,++c):(g=0==a?m.iw_tabback_1dl:m.iw_tabback_dl,q=m.iw_tabback_dm,t=m.iw_tabback_dr),m=m.iws_tab_dm,D&&(F=D.iws_tab_do),r.paddingTop=tn_Q(4),r.paddingBottom="";tn_V(g);tn_V(q);tn_V(t);tn_V(m);r=h.offset+(0==a?6:11);tn_P(g,new tn_c(e+h.offset,p));tn_P(q,new tn_c(e+r,p));tn_S(q,f);tn_P(m,new tn_c(k+2+r,l));tn_S(m,f);tn_P(t,new tn_c(e+r+f,p));F&&(tn_V(F),tn_P(F,new tn_c(k+r-14+2,l)),F.parentNode||
this.shadow_.appendChild(F));g.style.zIndex=c;q.style.zIndex=c;t.style.zIndex=c;f=f+2+3;tn_S(b,f);tn_P(b,new tn_c(e+r-2,d));tn_V(b);b.style.zIndex=c+1;!b.parentNode&&0<h.textWidth&&this.window_.appendChild(b)}};tn_a.resetPixelPosition=function(){this.nodePosition_?this.setNodePosition(this.nodePosition_,this.pixelOffset_):this.rectPosition_&&this.setRectPosition(this.rectPosition_,this.pixelOffset_)};tn_a.getCenterSize=function(){return new tn_Z(tn_W(this.centerSize_.width,this.totalTabWidth_),this.centerSize_.height)};
tn_a.reset=function(a,b,c,d,e){this.setContent(c,b,e);this.setRectPosition(a,d);this.show();tn_Od(this.images_.restore)};tn_a.hide=function(){this.tapImg_&&tn_U(this.tapImg_);this.shadowTapImg_&&tn_U(this.shadowTapImg_);tn_U(this.window_);tn_U(this.shadow_)};tn_a.show=function(){this.isHidden()&&(tn_V(this.window_),tn_V(this.shadow_),this.tapImg_&&tn_V(this.tapImg_),this.shadowTapImg_&&tn_V(this.shadowTapImg_))};tn_a.isHidden=function(){return"none"==this.window_.style.display};
tn_a.selectTab=function(a){if(a!=this.selectedTab_){this.setTab_(a);var b=this.contentContainers_;tn_Ud(b,tn_U);tn_V(b[a]);var c=this;window.setTimeout(function(){c.resetPixelPosition()},0)}};tn_a.onCloseClick_=function(){tn_1(this,"closeclick")};
tn_a.maximize=function(a){if(!this.isMaximized_){tn_1(this,"maximizeclick");this.images_.restore.style.visibility="";this.smallSize_=this.centerSize_;this.smallTabs_=this.tabs_;this.smallSelectedTab_=this.selectedTab_;this.maximizedSize_=this.maximizedSize_||new tn_Z(628,598);var b=new tn_Z(4+this.maximizedSize_.width,4+this.maximizedSize_.height);tn__.isGeckoBased()&&(b.width+=1);this.grow_(b,a)}};
tn_a.restore=function(a){this.isMaximized_&&(tn_1(this,"restoreclick"),tn_Od(this.images_.restore),this.setContent(this.maximizedSize_,this.smallTabs_,this.smallSelectedTab_),this.grow_(this.smallSize_,a))};tn_a.grow_=function(a,b){this.growSiner_=new tn_re(!0===b?1:10);this.growStartSize_=this.centerSize_;this.growEndSize_=a;this.doGrow_()};
tn_a.doGrow_=function(){var a=this.growSiner_.next();this.growSiner_.more()&&tn_Rd(this,this.doGrow_,10);var b=this.growStartSize_.width+(this.growEndSize_.width-this.growStartSize_.width)*a;a=this.growStartSize_.height+(this.growEndSize_.height-this.growStartSize_.height)*a;this.setCenterSize_(new tn_Z(b,a));this.resetPixelPosition();this.updateContentSize();this.growSiner_.more()||this.growDone_()};
tn_a.growDone_=function(){this.isMaximized_?(this.isMaximized_=!1,tn_1(this,"restoreend")):(this.isMaximized_=!0,tn_1(this,"maximizeend"),this.maximizedSize_&&this.maximizedTabs_&&this.setContent(this.maximizedSize_,this.maximizedTabs_,this.maximizedSelectedTab_))};tn_a.setCenterSize_=function(a){return a=this.centerSize_=this.boundSize_(a)};tn_a.filterMouseDblClick_=function(a){if(1==tn__.type)tn_le(a);else{var b=tn_qe(a,this.window_);b.y<=this.getWindowHeight()&&tn_le(a)}};
tn_a.filterMouseDown_=function(a){if(1==tn__.type)tn_me(a);else{var b=tn_qe(a,this.window_);b.y<=this.getWindowHeight()&&(a.cancelDrag=!0)}};tn_a.getWindowHeight=function(){return this.getCenterSize().height+12};tn_a.getTotalSize=function(){var a=this.getCenterSize();return new tn_Z(a.width+12,a.height+21+6)};
tn_a.setContent=function(a,b,c){this.clearContent();a=new tn_Z(4+a.width,4+a.height);tn__.isGeckoBased()&&(a.width+=1);var d=this.setCenterSize_(a),e=[];this.tabs_=e;var f=c||0;a=new tn_Z(d.width+-4,d.height+-4);var g=this.tabPos_,l=this.contentContainers_=[];for(c=0;c<b.length;c++){var n=tn_O("div",this.window_,g,a);n.style.overflow="hidden";c!=f&&tn_U(n);n.style.zIndex=10;n.appendChild(b[c].contentElem);l.push(n)}if(1<b.length){a=[];g=new tn_Z(11,26);l=new tn_Z(14,26);this.initializeTabs_();for(c=
0;c<b.length;++c){var k={images:b[c].images||{},textWidth:b[c].textWidth||0,offset:b[c].offset||0,name:b[c].name,contentElem:b[c].contentElem,onclick:b[c].onclick},h=k.images;tn_ve(h,this.window_,[["iw_tabback_dm",1,26,0,0],["iw_tabback_m",1,26,0,0],["iw_tab_dm",1,26,0,0],["iw_tab_m",1,26,0,0]]);tn_4(h,this.window_,"iw_tabback_dl",g);tn_4(h,this.window_,"iw_tabback_dr",l);tn_4(h,this.window_,"iw_tabback_l",g);tn_4(h,this.window_,"iw_tabback_r",l);tn_4(h,this.window_,"iw_tab_dl",g);tn_4(h,this.window_,
"iw_tab_dr",l);tn_4(h,this.window_,"iw_tab_l",g);tn_4(h,this.window_,"iw_tab_r",l);tn_ve(h,this.shadow_,[["iws_tab_dm",1,28,0,0],["iws_tab_m",1,28,0,0]]);n=function(q,t){tn_U(t);q.tabImages_.push(t)};if(0==c){var m=new tn_Z(6,26);tn_4(h,this.window_,"iw_tab_1dl",m);tn_4(h,this.window_,"iw_tab_1l",m);tn_4(h,this.window_,"iw_tabback_1dl",m);tn_4(h,this.window_,"iw_tabback_1l",m);m=new tn_Z(8,28);tn_4(h,this.shadow_,"iws_tab_1dl",m);tn_4(h,this.shadow_,"iws_tab_1l",m);n(this,h.iw_tab_1dl);n(this,h.iw_tab_1l);
n(this,h.iw_tabback_1dl);n(this,h.iw_tabback_1l);n(this,h.iws_tab_1dl);n(this,h.iws_tab_1l)}n(this,h.iw_tabback_dl);n(this,h.iw_tabback_dm);n(this,h.iw_tabback_dr);n(this,h.iw_tabback_l);n(this,h.iw_tabback_m);n(this,h.iw_tabback_r);n(this,h.iw_tab_dl);n(this,h.iw_tab_dm);n(this,h.iw_tab_dr);n(this,h.iw_tab_l);n(this,h.iw_tab_m);n(this,h.iw_tab_r);n(this,h.iws_tab_dm);n(this,h.iws_tab_m);h=document.createElement("div");k.labelNode=h;tn_T(h,20);m=h.style;h.style.overflow="hidden";m.fontWeight="bold";
m.fontFamily="Arial,sans-serif";m.fontSize=tn_Q(12);m.textAlign="center";m.display="inline";tn_we(h);tn_Nd(k.name,h);(function(q,t,r,u){tn_ke(u,q,function(){q.selectTab(t);r&&r()})})(this,c,b[c].onclick,h);this.tabImages_.push(h);a.push(h);this.tabs_.push(k);0<c&&(k={},h=new tn_Z(14,28),tn_4(k,this.shadow_,"iws_tab_do",h),tn_4(k,this.shadow_,"iws_tab_o",h),n(this,k.iws_tab_do),n(this,k.iws_tab_o),this.tabShadowOverlapImages_.push(k))}var p=this;tn_3d(a,function(q){var t;if(q.length==e.length){for(var r=
0;r<q.length;++r){var u=t=e[r];0!=q[r].width&&(u.textWidth=tn_W(0,q[r].width-2-3));tn_V(u.labelNode);p.window_.appendChild(u.labelNode);if(0<r){var v=e[r-1];u.offset=v.offset+v.textWidth+(1==r?6:11)+14-11}}p.totalTabWidth_=t.offset+t.textWidth+14+11-6;if(p.totalTabWidth_+30>d.width)for(p.setCenterSize_(new tn_Z(p.totalTabWidth_+30,d.height)),q=new tn_Z(p.totalTabWidth_+30+-4,d.height+-4),r=0;r<p.contentContainers_.length;++r)tn_Md(p.contentContainers_[r],q)}p.setTab_(f);p.resetPixelPosition()})}else k=
{images:b[0].images||{},textWidth:b[0].textWidth||0,offset:b[0].offset||0,name:b[0].name,contentElem:b[0].contentElem,onclick:b[0].onclick},this.tabs_.push(k),this.resetPixelPosition()};tn_a.updateContentSize=function(){for(var a=new tn_Z(this.centerSize_.width+-4,this.centerSize_.height+-4),b=0;b<this.contentContainers_.length;b++){var c=this.contentContainers_[b];tn_Md(c,a)}};
tn_a.setMaximizedContent=function(a,b,c){this.maximizedSize_=a;this.maximizedTabs_=b;this.maximizedSelectedTab_=c;this.images_.maximize.style.visibility=""};tn_a.clearContent=function(){var a=this.contentContainers_;tn_Ud(a,tn_Sd);a.length=0;a=this.tabImages_;tn_Ud(a,tn_Sd);this.selectedTab_=a.length=0};tn_a.boundSize_=function(a){return new tn_Z(tn_W(a.width,32),tn_W(a.height,0))};tn_a.initializeTabs_=function(){this.tabImages_=[];this.tabShadowOverlapImages_=[];this.totalTabWidth_=0};
tn_a.setTab_=function(a){tn_we(this.tabs_[this.selectedTab_].labelNode);this.selectedTab_=a;a=this.tabs_[a].labelNode;var b=a.style;b.color="";b.textDecoration="";tn_X(a,"")};function tn_we(a){var b=a.style;b.color="#0000cc";b.textDecoration="underline";tn_X(a,"pointer")}function tn_ve(a,b,c){b=tn_O("div",b,null,null,!1,!0);for(var d=0;d<c.length;d++){var e=c[d],f=new tn_Z(e[1],e[2]),g=new tn_c(e[3],e[4]),l=tn_Kd+e[0]+".png";f=tn_4d(l,b,g,f,!0,!0);a[e[5]||e[0]]=f}return b}
function tn_4(a,b,c,d,e,f){if(1==tn__.type&&7>tn__.version)return b=tn_4d(tn_Kd+c+(f?".gif":".png"),b,new tn_c(0,0),d,!0,!0),a[e||c]=b;tn_se||(tn_se=!0,d=document.createElement("link"),d.rel="stylesheet",d.type="text/css",d.href=tn_Kd+"iw_sprite.css",document.getElementsByTagName("head")[0].appendChild(d));d=document.createElement("div");d.className="SPRITE_"+c;d.style.overflow="hidden";b.appendChild(d);return a[e||c]=d};if(window.jstiming){window.jstiming.beaconImageReferences_={};window.jstiming.reportCounter_=1;var tn_xe=function(a,b,c){var d=a.t[b],e=a.t.start;if(d&&(e||c))return d=a.t[b][0],e=void 0!=c?c:e[0],a=d-e,Math.round(a)},tn_ye=function(a,b,c){var d="";window.jstiming.srt&&(d+="&srt="+window.jstiming.srt,delete window.jstiming.srt);window.jstiming.pt&&(d+="&tbsrt="+window.jstiming.pt,delete window.jstiming.pt);try{window.external&&window.external.tran?d+="&tran="+window.external.tran:window.gtbExternal&&
window.gtbExternal.tran?d+="&tran="+window.gtbExternal.tran():window.chrome&&window.chrome.csi&&(d+="&tran="+window.chrome.csi().tran)}catch(m){}var e=window.chrome;if(e&&(e=e.loadTimes)){e().wasFetchedViaSpdy&&(d+="&p=s");if(e().wasNpnNegotiated){d+="&npn=1";var f=e().npnNegotiatedProtocol;f&&(d+="&npnv="+(encodeURIComponent||escape)(f))}e().wasAlternateProtocolAvailable&&(d+="&apa=1")}var g=a.t,l=g.start;e=[];f=[];for(var n in g)if("start"!=n&&0!=n.indexOf("_")){var k=g[n][1];k?g[k]&&f.push(n+"."+
tn_xe(a,n,g[k][0])):l&&e.push(n+"."+tn_xe(a,n))}delete g.start;if(b)for(var h in b)d+="&"+h+"="+b[h];(b=c)||(b="https:"==document.location.protocol?"https://csi.gstatic.com/csi":"http://csi.gstatic.com/csi");return a=[b,"?v=3","&s="+(window.jstiming.sn||"translate")+"&action=",a.name,f.length?"&it="+f.join(","):"",d,"&rt=",e.join(",")].join("")},tn_ze=function(a,b,c){a=tn_ye(a,b,c);if(!a)return"";b=new Image;var d=window.jstiming.reportCounter_++;window.jstiming.beaconImageReferences_[d]=b;b.onload=
b.onerror=function(){window.jstiming&&delete window.jstiming.beaconImageReferences_[d]};b.src=a;b=null;return a};window.jstiming.report=function(a,b,c){var d=document.visibilityState,e="visibilitychange";d||(d=document.webkitVisibilityState,e="webkitvisibilitychange");if("prerender"==d){var f=!1,g=function(){if(!f){b?b.prerender="1":b={prerender:"1"};if("prerender"==(document.visibilityState||document.webkitVisibilityState))var l=!1;else tn_ze(a,b,c),l=!0;l&&(f=!0,document.removeEventListener(e,g,
!1))}};document.addEventListener(e,g,!1);return""}return tn_ze(a,b,c)}};var tn_5,tn_6=null,tn_7,tn_Ae,tn_Be,tn_Ce=!1,tn_De=!1,tn_8=!1,tn_9=!1,tn_Ee={right:"left",left:"right",ltr:"rtl",rtl:"ltr"},tn_Fe;function tn_Ge(a){return a.substring(0,1).toUpperCase()+a.substring(1)}
var _intlStrings={_originalText:"Original Text:",_interfaceDirection:"ltr",_interfaceAlign:"left",_langpair:"",_currentBy:"",_unknown:"unknown",_suggestTranslation:"Suggest a translation",_submit:"Submit",_feedbackUrl:"https://translate.google.com/translate_suggestion?client=wt",_suggestThanks:"Thank you for helping us improve the quality of our translations.",_reverse:!1,_staticContentPath:""};
function tn_He(a){if(3==a.nodeType)return a.nodeValue;if(1==a.nodeType){for(var b="",c=0;c<a.childNodes.length;++c)b+=tn_He(a.childNodes[c]);return b}return""}function tn_Ie(a,b){if(a)if(3==b.nodeType)a.appendChild(document.createTextNode(b.nodeValue));else if(1==b.nodeType){if("a"===b.nodeName||"A"===b.nodeName){var c=document.createElement("a");var d=b.getAttribute("href");d&&c.setAttribute("href",d);a.appendChild(c)}else c=a;for(a=0;a<b.childNodes.length;++a)tn_Ie(c,b.childNodes[a])}}
function _setupIW(a){tn_Fe=a;if(!tn_Ce){_intlStrings._staticContentPath&&(tn_Kd=_intlStrings._staticContentPath);tn_5=new tn_ue;tn_7=document.createElement("div");tn_7.id="google-infowindow";tn_7.className="notranslate";tn_Ae=document.createElement("span");tn_7.onmouseover=function(){tn_De=!0;tn_Je(tn_6)};tn_7.onmouseout=function(){tn_Ke()};document.body.appendChild(tn_Ae);document.body.appendChild(tn_7);a=document.createElement("div");document.body.appendChild(a);tn_U(a);var b=tn_.html.SafeHtml.createIframe(void 0,
void 0,{id:"google-feedback-frame",name:"FEEDBACK_TARGET_IFRAME_NAME"});tn_.dom.safe.setInnerHtml(a,b);tn_5.create(tn_7,tn_Ae);tn_7.firstChild.style.zIndex=2147483647;tn_Ae.firstChild.style.zIndex=2147483647;tn_5.showCloseButton(!0);tn_5.keepInBounds(!0);tn_5.keepInScrollpane(!0);tn_5.allowDownwards(!0);tn_5.allowMaximizeAndRestoreButtons(!1);tn_5.setInterfaceDirection(_intlStrings._interfaceDirection);tn_ee(tn_5,"closeclick",function(){tn_Ke(!0);tn_9&&tn_Le(!1)});var c=document.getElementById("gt-nvframe");
c&&window.addEventListener("scroll",function(){c.style.top=-document.body.scrollTop+"px"},!1);tn_Ce=!0}}var tn_$=null;
function tn_Je(a){if(a&&(null!==tn_$&&(window.clearTimeout(tn_$),tn_$=null),!tn_8))if(tn_6==a)tn_9||(tn_Be=tn_6.style.backgroundColor,tn_6.style.backgroundColor="#E6ECF9");else{tn_9&&(tn_5.restore(!0),tn_9=!1);for(var b,c=a.cloneNode(!0),d=a.childNodes.length-1;0<=d;--d)"google-src-text"==a.childNodes[d].className&&(b=a.childNodes[d].cloneNode(!0),c.removeChild(c.childNodes[d]),b.className="google-src-active-text");if(b){tn_5.showCloseButton(!0);tn_Be=a.style.backgroundColor;a.style.backgroundColor=
"#E6ECF9";var e=document.createElement("div");d=document.createElement("div");var f=tn_.dom.createElement("IMG"),g=document.createElement("div");g.appendChild(f);f.style.width="48px";f.style.height="16px";f.border="0";f.style.display="inline";f.style.padding="0px";f.style.border="0px solid black";g.style.margin="0px";g.style.marginBottom="-17px";g.style.padding="0px";g.style.textAlign=tn_Ee[_intlStrings._interfaceAlign];f.src="https://www.gstatic."+tn_Fe+"/images/branding/googlelogo/1x/googlelogo_color_48x16dp.png";
f.style["margin"+tn_Ge(_intlStrings._interfaceAlign)]="6px";f.style["margin"+tn_Ge(tn_Ee[_intlStrings._interfaceAlign])]=tn_Q(18);e.appendChild(g);e.appendChild(d);d.appendChild(document.createTextNode(_intlStrings._originalText));d.style.color="#333";d.style.direction=_intlStrings._interfaceDirection;d.style.textAlign=_intlStrings._interfaceAlign;d.style.fontWeight="bold";d.style.fontSize="12px";d.style.minHeight="19px";d.style.fontFamily="arial,sans-serif";d.style["margin"+tn_Ge(tn_Ee[_intlStrings._interfaceAlign])]=
tn_Q(72);d=document.createElement("div");d.className="google-src-active-text";d.style.lineHeight="19px";d.style.direction=_intlStrings._interfaceDirection;d.style.textAlign=_intlStrings._interfaceAlign;tn_Ie(d,b);e.appendChild(d);e.style.zIndex=2147483647;if(0==_intlStrings._langpair.length)tn_6=a,tn_2d(e,function(q){tn_5.hide();tn_5.setContent(q,[new tn_te(_intlStrings._originalText,e)]);tn_5.setNodePosition(tn_6);tn_5.show()},(document.width||document.body.scrollWidth)/2);else{d=e.cloneNode(!0);
var l=document.createElement("div");l.appendChild(d);d=document.createElement("div");f=document.createElement("span");g=document.createElement("div");g.style.direction=_intlStrings._interfaceDirection;g.style.textAlign=_intlStrings._interfaceAlign;g.style.marginTop=tn_Q(5);d.appendChild(g);var n=tn_.dom.createElement("IMG");n.src="http://www.google.com/images/zippy_plus_sm.gif";n.style.width="12px";n.style.height="12px";n.border="0";n.style.border="none";n.style.verticalAlign="middle";g.appendChild(n);
g.appendChild(document.createTextNode(" "));g.appendChild(f);f.appendChild(document.createTextNode(_intlStrings._suggestTranslation));f.style.direction=_intlStrings._interfaceDirection;f.style.textAlign=_intlStrings._interfaceAlign;f.style.color="#0000CC";f.style.textDecoration="underline";f.style.fontFamily="arial,sans-serif";f.style.fontSize="12px";g.onclick=tn_Me;tn_X(f,"pointer");e.appendChild(d);var k=document.createElement("div");d=document.createElement("div");f=document.createElement("span");
d.style.direction=_intlStrings._interfaceDirection;d.style.textAlign=_intlStrings._interfaceAlign;d.style.marginTop=tn_Q(5);d.style.marginBottom=tn_Q(6);k.appendChild(d);g=tn_.dom.createElement("IMG");g.src="http://www.google.com/images/zippy_minus_sm.gif";g.style.width="12px";g.style.height="12px";g.border="0";g.style.border="none";g.style.verticalAlign="middle";d.appendChild(g);d.appendChild(document.createTextNode(" "));d.appendChild(f);f.appendChild(document.createTextNode(_intlStrings._suggestTranslation));
f.style.direction=_intlStrings._interfaceDirection;f.style.textAlign=_intlStrings._interfaceAlign;f.style.color="#0000CC";f.style.textDecoration="underline";f.style.fontFamily="arial,sans-serif";f.style.fontSize="12px";d.onclick=function(){tn_Le(!0)};tn_X(f,"pointer");tn_6=a;a=document.createElement("div");d=document.createElement("form");d.style.marginBottom="0px";d.style.paddingBottom="0px";d.target="google-feedback-frame";d.method="post";d.action=_intlStrings._feedbackUrl;a.appendChild(d);var h=
tn_.dom.createElement("INPUT");h.type="hidden";h.name="gtrans";d.appendChild(h);_intlStrings._reverse?(f=tn_He(c),c=tn_He(b)):(c=tn_He(c),f=tn_He(b));h.value=c;b=tn_.dom.createElement("INPUT");b.type="hidden";b.value=f;b.name="text";d.appendChild(b);b=tn_.dom.createElement("INPUT");b.name="langpair";b.type="hidden";b.value=_intlStrings._langpair;d.appendChild(b);b=tn_.dom.createElement("INPUT");b.name="u";b.type="hidden";b.value=tn_Ne("u");d.appendChild(b);b=tn_.dom.createElement("INPUT");b.name=
"oe";b.type="hidden";if(document.charset)b.value=document.charset,d.appendChild(b);else if(document.characterSet)b.value=document.characterSet,d.appendChild(b);else if(f=tn_Ne("oe"))d.appendChild(b),b.value=f;var m=document.createElement("textarea");m.rows=3;m.name="utrans";m.value=c;d.appendChild(m);b=document.createElement("div");b.style.direction=_intlStrings._interfaceDirection;b.style.textAlign=tn_Ee[_intlStrings._interfaceAlign];b.style.marginTop=tn_Q(6);b.style.marginBottom="0px";d.appendChild(b);
c=tn_.dom.createElement("INPUT");c.type="submit";c.value=_intlStrings._submit;b.appendChild(c);var p=document.createElement("div");p.appendChild(document.createElement("hr"));p.appendChild(document.createTextNode(_intlStrings._suggestThanks));p.style.direction=_intlStrings._interfaceDirection;p.style.textAlign=_intlStrings._interfaceAlign;p.style.fontFamily="arial,sans-serif";p.style.fontSize="12px";p.style.overflow="auto";p.style.marginTop="10px";tn_U(p);k.appendChild(a);l.appendChild(k);l.appendChild(p);
d.onsubmit=function(){window.setTimeout(function(){tn_U(k);tn_V(p)},1);tn_8=!1;return m.value!=h.value};tn_3d([l,e],function(q){m.style.width=tn_Q(q[0].width-6);m.style.padding=tn_Q(2);tn_5.hide();tn_5.setContent(q[1],[new tn_te(_intlStrings._originalText,e)]);tn_5.setMaximizedContent(q[0],[new tn_te(_intlStrings._originalText,l)]);tn_5.setNodePosition(tn_6);tn_5.showCloseButton(!0);tn_5.show()},(document.width||document.body.scrollWidth)/2)}}}}
function tn_Ne(a){var b=window.location.search.substring(1);b=b.split("&");for(var c=0;c<b.length;c++){var d=b[c].split("=");if(d[0].toLowerCase()==a&&0<d.length)return window.unescape(d[1])}return""}function tn_Oe(a){tn_Ce&&(tn_De=!0,tn_8||(null!==tn_$&&(window.clearTimeout(tn_$),tn_$=null),tn_6==a?(tn_Be=tn_6.style.backgroundColor,tn_6.style.backgroundColor="#E6ECF9"):tn_$=window.setTimeout(function(){tn_Je(a)},500)))}
function tn_Ke(a){tn_Ce&&(!0!==a&&(tn_De=!1),tn_8||(tn_6&&tn_6.style&&(tn_6.style.backgroundColor=tn_Be),tn_$&&(window.clearTimeout(tn_$),tn_$=null),!0!==a?tn_$=window.setTimeout(tn_Pe,250):tn_Pe()))}function tn_Pe(){tn_8||(tn_5.hide(),tn_9&&(tn_5.restore(!0),tn_9=!1),tn_6=null)}function tn_Me(){tn_9=tn_8=!0;var a=tn_ee(tn_5,"maximizeend",function(){tn_fe(a)});tn_5.maximize()}
function tn_Le(a){var b=tn_ee(tn_5,"restoreend",function(){tn_fe(b);tn_9=!1;a?window.setTimeout(function(){tn_8=!1;tn_De||tn_Ke(!0)},500):(tn_8=!1,tn_De||tn_Ke(!0))});tn_5.restore()}function _csi(a,b){var c={};c.sl=a;c.tl=b;a=window.jstiming.load;a.tick("prt");a.tick("ol");a.name="w";window.jstiming.sn="translate";window.jstiming.report(a,c);try{window.external&&window.external.resT()}catch(d){}}function tn_Qe(a){var b=window.onload;window.onload=b?function(){try{a()}catch(c){}b(null)}:a}
var _tipon=tn_Oe,_tipoff=tn_Ke,_addload=tn_Qe,tn_Re=window.jstiming.load;tn_Re.tick("jl");

View File

@ -0,0 +1 @@
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><script>if (window.parent && window.parent.parent == window.top) {window.top.gtcomm._updaten('de','Allemand','en','de','https://www.ems-moederl.de/ws201.html');}</script></head><body></body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B