Beispiel #1
0
!function(b,c){typeof a!="undefined"?a.exports=c():typeof define=="function"&&define.amd?define(b,c):this[b]=c()}("bonzo",function(){function B(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function C(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c||a[d],a[d],d,a);return a}function D(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function E(a){return a&&a.nodeName&&a.nodeType==1}function F(a,b,c,d){for(d=0,j=a.length;d<j;++d)if(b.call(c,a[d],d,a))return!0;return!1}function G(a){return a=="transform"&&(a=x.transform)||/^transform-?[Oo]rigin$/.test(a)&&(a=x.transform+"Origin")||a=="float"&&(a=x.cssFloat),a?D(a):null}function I(a,b,c){var d=0,e=b||this,h=[],i=g&&typeof a=="string"&&a.charAt(0)!="<"?g(a):a;return C(P(i),function(a){C(e,function(b){var g=!b[f]||b[f]&&!b[f][f]?function(){var a=b.cloneNode(!0);return e.$&&e.cloneEvents&&e.$(a).cloneEvents(b),a}():b;c(a,g),h[d]=g,d++})},this),C(h,function(a,b){e[b]=a}),e.length=d,e}function J(a,b,c){var d=T(a),e=d.css("position"),f=d.offset(),g="relative",h=e==g,i=[parseInt(d.css("left"),10),parseInt(d.css("top"),10)];e=="static"&&(d.css("position",g),e=g),isNaN(i[0])&&(i[0]=h?0:a.offsetLeft),isNaN(i[1])&&(i[1]=h?0:a.offsetTop),b!=null&&(a.style.left=b-f.left+i[0]+t),c!=null&&(a.style.top=c-f.top+i[1]+t)}function K(a,b){return B(b).test(a.className)}function L(a,b){a.className=A(a.className+" "+b)}function M(a,b){a.className=A(a.className.replace(B(b)," "))}function N(a,b){return typeof b=="function"?b(a):b}function O(a){this.length=0;if(a){a=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a],this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]}}function P(a){return typeof a=="string"?T.create(a):E(a)?[a]:a}function Q(a,b,d){var e=this[0];return a==null&&b==null?(R(e)?S():{x:e.scrollLeft,y:e.scrollTop})[d]:(R(e)?c.scrollTo(a,b):(a!=null&&(e.scrollLeft=a),b!=null&&(e.scrollTop=b)),this)}function R(a){return a===c||/^(?:body|html)$/i.test(a.tagName)}function S(){return{x:c.pageXOffset||e.scrollLeft,y:c.pageYOffset||e.scrollTop}}function T(a,b){return new O(a,b)}var a=this,b=a.bonzo,c=window,d=c.document,e=d.documentElement,f="parentNode",g=null,h=/^checked|value|selected$/,i=/select|fieldset|table|tbody|tfoot|td|tr|colgroup/i,k=["<table>","</table>",1],l=["<table><tbody><tr>","</tr></tbody></table>",3],m=["<select>","</select>",1],n={thead:k,tbody:k,tfoot:k,colgroup:k,caption:k,tr:["<table><tbody>","</tbody></table>",2],th:l,td:l,col:["<table><colgroup>","</colgroup></table>",2],fieldset:["<form>","</form>",1],legend:["<form><fieldset>","</fieldset></form>",2],option:m,optgroup:m},o=/^checked|selected$/,p=/msie/i.test(navigator.userAgent),q=[],r=0,s=/^-?[\d\.]+$/,t="px",u="setAttribute",v="getAttribute",w="getElementsByTagName",x=function(){var a=d.createElement("p");return a.innerHTML='<a href="#x">x</a><table style="float:left;"></table>',{hrefExtended:a[w]("a")[0][v]("href")!="#x",autoTbody:a[w]("tbody").length!==0,computedStyle:d.defaultView&&d.defaultView.getComputedStyle,cssFloat:a[w]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var b=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],c;for(c=0;c<b.length;c++)if(b[c]in a.style)return b[c]}()}}(),y=/(^\s*|\s*$)/g,z={lineHeight:1,zoom:1,zIndex:1,opacity:1},A=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(y,"")},H=x.computedStyle?function(a,b){var c=null,e=d.defaultView.getComputedStyle(a,"");return e&&(c=e[b]),a.style[b]||c}:p&&e.currentStyle?function(a,b){if(b=="opacity"){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[b]};return O.prototype={get:function(a){return this[a]},each:function(a,b){return C(this,a,b)},map:function(a,b){var c=[],d,e;for(e=0;e<this.length;e++)d=a.call(this,this[e],e),b?b(d)&&c.push(d):c.push(d);return c},first:function(){return T(this[0])},last:function(){return T(this[this.length-1])},html:function(a,b){function f(b){while(b.firstChild)b.removeChild(b.firstChild);C(P(a),function(a){b.appendChild(a)})}var c=b?e.textContent===undefined?"innerText":"textContent":"innerHTML",d;return typeof a!="undefined"?this.each(function(e){!b&&(d=e.tagName.match(i))?f(e,d[0]):e[c]=a}):this[0]?this[0][c]:""},text:function(a){return this.html(a,1)},addClass:function(a){return this.each(function(b){K(b,N(b,a))||L(b,N(b,a))})},removeClass:function(a){return this.each(function(b){K(b,N(b,a))&&M(b,N(b,a))})},hasClass:function(a){return F(this,function(b){return K(b,a)})},toggleClass:function(a,b){return this.each(function(c){typeof b!="undefined"?b?L(c,a):M(c,a):K(c,a)?M(c,a):L(c,a)})},show:function(a){return this.each(function(b){b.style.display=a||""})},hide:function(){return this.each(function(a){a.style.display="none"})},append:function(a){return this.each(function(b){C(P(a),function(a){b.appendChild(a)})})},prepend:function(a){return this.each(function(b){var c=b.firstChild;C(P(a),function(a){b.insertBefore(a,c)})})},appendTo:function(a,b){return I.call(this,a,b,function(a,b){a.appendChild(b)})},prependTo:function(a,b){return I.call(this,a,b,function(a,b){a.insertBefore(b,a.firstChild)})},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},related:function(a){return this.map(function(b){b=b[a];while(b&&b.nodeType!==1)b=b[a];return b||0},function(a){return a})},before:function(a){return this.each(function(b){C(T.create(a),function(a){b[f].insertBefore(a,b)})})},after:function(a){return this.each(function(b){C(T.create(a),function(a){b[f].insertBefore(a,b.nextSibling)})})},insertBefore:function(a,b){return I.call(this,a,b,function(a,b){a[f].insertBefore(b,a)})},insertAfter:function(a,b){return I.call(this,a,b,function(a,b){var c=a.nextSibling;c?a[f].insertBefore(b,c):a[f].appendChild(b)})},replaceWith:function(a){return this.each(function(b){b.parentNode.replaceChild(T.create(a)[0],b)})},css:function(a,b,e){function g(a,b,c){for(var d in f)f.hasOwnProperty(d)&&(c=f[d],(b=G(d))&&s.test(c)&&!(b in z)&&(c+=t),a.style[b]=N(a,c))}if(b===undefined&&typeof a=="string")return b=this[0],b?b===d||b===c?(e=b===d?T.doc():T.viewport(),a=="width"?e.width:a=="height"?e.height:""):(a=G(a))?H(b,a):null:null;var f=a;return typeof a=="string"&&(f={},f[a]=b),p&&f.opacity&&(f.filter="alpha(opacity="+f.opacity*100+")",f.zoom=a.zoom||1,delete f.opacity),this.each(g)},offset:function(a,b){if(typeof a=="number"||typeof b=="number")return this.each(function(c){J(c,a,b)});var c=this[0],d=c.offsetWidth,e=c.offsetHeight,f=c.offsetTop,g=c.offsetLeft;while(c=c.offsetParent)f+=c.offsetTop,g+=c.offsetLeft;return{top:f,left:g,height:e,width:d}},dim:function(){var a=this[0],b=!a.offsetWidth&&!a.offsetHeight?function(b,c){return c={position:a.style.position||"",visibility:a.style.visibility||"",display:a.style.display||""},b.first().css({position:"absolute",visibility:"hidden",display:"block"}),c}(this):null,c=a.offsetWidth,d=a.offsetHeight;return b&&this.first().css(b),{height:d,width:c}},attr:function(a,b){var c=this[0];if(typeof a=="string"||a instanceof String)return typeof b=="undefined"?h.test(a)?o.test(a)&&typeof c[a]=="string"?!0:c[a]:a!="href"&&a!="src"||!x.hrefExtended?c[v](a):c[v](a,2):this.each(function(c){h.test(a)?c[a]=N(c,b):c[u](a,N(c,b))});for(var d in a)a.hasOwnProperty(d)&&this.attr(d,a[d]);return this},val:function(a){return typeof a=="string"?this.attr("value",a):this[0].value},removeAttr:function(a){return this.each(function(b){o.test(a)?b[a]=!1:b.removeAttribute(a)})},data:function(a,b){var c=this[0],d,e;return typeof b=="undefined"?(c[v]("data-node-uid")||c[u]("data-node-uid",++r),d=c[v]("data-node-uid"),q[d]||(q[d]={}),q[d][a]):this.each(function(c){c[v]("data-node-uid")||c[u]("data-node-uid",++r),d=c[v]("data-node-uid"),e=q[d]||(q[d]={}),e[a]=b})},remove:function(){return this.each(function(a){a[f]&&a[f].removeChild(a)})},empty:function(){return this.each(function(a){while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.map(function(a){return a[f].removeChild(a)})},scrollTop:function(a){return Q.call(this,null,a,"y")},scrollLeft:function(a){return Q.call(this,a,null,"x")},toggle:function(a){return this.each(function(a){a.style.display=a.offsetWidth||a.offsetHeight?"none":"block"}),a&&a(),this}},T.setQueryEngine=function(a){g=a,delete T.setQueryEngine},T.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||O.prototype)[c]=a[c])},T.create=function(a){return typeof a=="string"&&a!==""?function(){var b=/^\s*<([^\s>]+)/.exec(a),c=d.createElement("div"),e=[],g=b?n[b[1].toLowerCase()]:null,h=g?g[2]+1:1,i=f,j=x.autoTbody&&g&&g[0]=="<table>"&&!/<tbody/i.test(a);c.innerHTML=g?g[0]+a+g[1]:a;while(h--)c=c.firstChild;do(!b||c.nodeType==1)&&(!j||c.tagName.toLowerCase()!="tbody")&&e.push(c);while(c=c.nextSibling);return C(e,function(a){a[i]&&a[i].removeChild(a)}),e}():E(a)?[a.cloneNode(!0)]:[]},T.doc=function(){var a=T.viewport();return{width:Math.max(d.body.scrollWidth,e.scrollWidth,a.width),height:Math.max(d.body.scrollHeight,e.scrollHeight,a.height)}},T.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c<d;c++)b[c].nodeType===1&&(e=b[d=c]);return e},T.viewport=function(){return{width:p?e.clientWidth:self.innerWidth,height:p?e.clientHeight:self.innerHeight}},T.isAncestor="compareDocumentPosition"in e?function(a,b){return(a.compareDocumentPosition(b)&16)==16}:"contains"in e?function(a,b){return a!==b&&a.contains(b)}:function(a,b){while(b=b[f])if(b===a)return!0;return!1},T.noConflict=function(){return a.bonzo=b,this},T}),provide("bonzo",a.exports),!function(a){function c(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}function d(a){var b=[],c,d;e:for(c=0;c<a.length;c++){for(d=0;d<b.length;d++)if(b[d]==a[c])continue e;b[b.length]=a[c]}return b}function e(a,b,c){return a?b.css(c,a):function(a){return a=parseInt(b.css(c),10),isNaN(a)?b[0]["offset"+c.replace(/^\w/,function(a){return a.toUpperCase()})]:a}()}var b=require("bonzo");b.setQueryEngine(a),a.ender(b),a.ender(b(),!0),a.ender({create:function(c){return a(b.create(c))}}),a.id=function(b){return a([document.getElementById(b)])},a.ender({parents:function(b,e){var f=a(b),g,h,i,j=[];for(g=0,h=this.length;g<h;g++){i=this[g];while(i=i.parentNode)if(~c(f,i)){j.push(i);if(e)break}}return a(d(j))},closest:function(a){return this.parents(a,!0)},first:function(){return a(this[0])},last:function(){return a(this[this.length-1])},next:function(){return a(b(this).next())},previous:function(){return a(b(this).previous())},appendTo:function(a){return b(this.selector).appendTo(a,this)},prependTo:function(a){return b(this.selector).prependTo(a,this)},insertAfter:function(a){return b(this.selector).insertAfter(a,this)},insertBefore:function(a){return b(this.selector).insertBefore(a,this)},siblings:function(){var b,c,d,e=[];for(b=0,c=this.length;b<c;b++){d=this[b];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[b];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return a(e)},children:function(){var c,e,f=[];for(c=0,l=this.length;c<l;c++){if(!(e=b.firstChild(this[c])))continue;f.push(e);while(e=e.nextSibling)e.nodeType==1&&f.push(e)}return a(d(f))},height:function(a){return e(a,this,"height")},width:function(a){return e(a,this,"width")}},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;!function(b,c){typeof define=="function"?define(c):typeof a!="undefined"?a.exports=c():this[b]=this.domReady=c()}("domready",function(a){function l(a){k=1;while(a=b.shift())a()}var b=[],c,d=!1,e=document,f=e.documentElement,g=f.doScroll,h="DOMContentLoaded",i="addEventListener",j="onreadystatechange",k=/^loade|c/.test(e.readyState);return e[i]&&e[i](h,c=function(){e.removeEventListener(h,c,d),l()},d),g&&e.attachEvent(j,c=function(){/^c/.test(e.readyState)&&(e.detachEvent(j,c),l())}),a=g?function(c){self!=top?k?c():b.push(c):function(){try{f.doScroll("left")}catch(b){return setTimeout(function(){a(c)},50)}c()}()}:function(a){k?a():b.push(a)}}),provide("domready",a.exports),!function(a){var b=require("domready");a.ender({domReady:b}),a.ender({ready:function(a){return b(a),this}},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;
Beispiel #2
0
 !function ($) {
 
   var b = bonzo;
   b.setQueryEngine($);
   $.ender(b);
   $.ender(b(), true);
   $.ender({
     create: function (node) {
       return $(b.create(node));
     }
   });
 
   $.id = function (id) {
     return $([document.getElementById(id)]);
   };
 
   function indexOf(ar, val) {
     for (var i = 0; i < ar.length; i++) {
       if (ar[i] === val) {
         return i;
       }
     }
     return -1;
   }
 
   function uniq(ar) {
     var a = [], i, j;
     label:
     for (i = 0; i < ar.length; i++) {
       for (j = 0; j < a.length; j++) {
         if (a[j] == ar[i]) {
           continue label;
         }
       }
       a[a.length] = ar[i];
     }
     return a;
   }
 
   $.ender({
     parents: function (selector, closest) {
       var collection = $(selector), j, k, p, r = [];
       for (j = 0, k = this.length; j < k; j++) {
         p = this[j];
         while (p = p.parentNode) {
           if (indexOf(collection, p) !== -1) {
             r.push(p);
             if (closest) break;
           }
         }
       }
       return $(uniq(r));
     },
 
     closest: function (selector) {
       return this.parents(selector, true);
     },
 
     first: function () {
       return $(this[0]);
     },
 
     last: function () {
       return $(this[this.length - 1]);
     },
 
     next: function () {
       return $(b(this).next());
     },
 
     previous: function () {
       return $(b(this).previous());
     },
 
     appendTo: function (t) {
       return b(this.selector).appendTo(t, this);
     },
 
     prependTo: function (t) {
       return b(this.selector).prependTo(t, this);
     },
 
     insertAfter: function (t) {
       return b(this.selector).insertAfter(t, this);
     },
 
     insertBefore: function (t) {
       return b(this.selector).insertBefore(t, this);
     },
 
     siblings: function () {
       var i, l, p, r = [];
       for (i = 0, l = this.length; i < l; i++) {
         p = this[i];
         while (p = p.previousSibling) {
           p.nodeType == 1 && r.push(p);
         }
         p = this[i];
         while (p = p.nextSibling) {
           p.nodeType == 1 && r.push(p);
         }
       }
       return $(r);
     },
 
     children: function () {
       var i, el, r = [];
       for (i = 0, l = this.length; i < l; i++) {
         if (!(el = b.firstChild(this[i]))) {
           continue;
         }
         r.push(el);
         while (el = el.nextSibling) {
           el.nodeType == 1 && r.push(el);
         }
       }
       return $(uniq(r));
     },
 
     height: function (v) {
       return dimension(v, this, 'height')
     },
 
     width: function (v) {
       return dimension(v, this, 'width')
     }
   }, true);
 
   function dimension(v, self, which) {
     return v ?
       self.css(which, v) :
       function (r) {
         r = parseInt(self.css(which), 10);
         return isNaN(r) ? self[0]['offset' + which.replace(/^\w/, function (m) {return m.toUpperCase()})] : r
       }()
   }
 
 }(ender || $);
Beispiel #3
0
!function(b,c){typeof a!="undefined"?a.exports=c():typeof define=="function"?define(c):this[b]=c()}("bonzo",function(){function x(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function y(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c||a[d],a[d],d,a);return a}function z(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function A(a){return a&&a.nodeName&&a.nodeType==1}function B(a,b,c,d){for(d=0,j=a.length;d<j;++d)if(b.call(c,a[d],d,a))return!0;return!1}function D(a,b,c){var d=0,g=b||this,h=[],i=f&&typeof a=="string"&&a.charAt(0)!="<"?f(a):a;return y(K(i),function(a){y(g,function(b){var f=!b[e]||b[e]&&!b[e][e]?function(){var a=b.cloneNode(!0);return g.$&&g.cloneEvents&&g.$(a).cloneEvents(b),a}():b;c(a,f),h[d]=f,d++})},this),y(h,function(a,b){g[b]=a}),g.length=d,g}function E(a,b,c){var d=O(a),e=d.css("position"),f=d.offset(),g="relative",h=e==g,i=[parseInt(d.css("left"),10),parseInt(d.css("top"),10)];e=="static"&&(d.css("position",g),e=g),isNaN(i[0])&&(i[0]=h?0:a.offsetLeft),isNaN(i[1])&&(i[1]=h?0:a.offsetTop),b!=null&&(a.style.left=b-f.left+i[0]+q),c!=null&&(a.style.top=c-f.top+i[1]+q)}function F(a,b){return x(b).test(a.className)}function G(a,b){a.className=w(a.className+" "+b)}function H(a,b){a.className=w(a.className.replace(x(b)," "))}function I(a,b){return typeof b=="function"?b(a):b}function J(a){this.length=0;if(a){a=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a],this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]}}function K(a){return typeof a=="string"?O.create(a):A(a)?[a]:a}function L(a,c,d){var e=this[0];return a==null&&c==null?(M(e)?N():{x:e.scrollLeft,y:e.scrollTop})[d]:(M(e)?b.scrollTo(a,c):(a!=null&&(e.scrollLeft=a),c!=null&&(e.scrollTop=c)),this)}function M(a){return a===b||/^(?:body|html)$/i.test(a.tagName)}function N(){return{x:b.pageXOffset||d.scrollLeft,y:b.pageYOffset||d.scrollTop}}function O(a,b){return new J(a,b)}var a=this,b=window,c=b.document,d=c.documentElement,e="parentNode",f=null,g=/^checked|value|selected$/,h=/select|fieldset|table|tbody|tfoot|td|tr|colgroup/i,i="table",k={thead:i,tbody:i,tfoot:i,tr:"tbody",th:"tr",td:"tr",fieldset:"form",option:"select"},l=/^checked|selected$/,m=/msie/i.test(navigator.userAgent),n=[],o=0,p=/^-?[\d\.]+$/,q="px",r="setAttribute",s="getAttribute",t=/(^\s*|\s*$)/g,u={lineHeight:1,zoom:1,zIndex:1,opacity:1},v=function(){var a=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],b;for(b=0;b<a.length;b++)if(a[b]in c.createElement("a").style)return a[b]}(),w=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(t,"")},C=c.defaultView&&c.defaultView.getComputedStyle?function(a,b){b=b=="transform"?v:b,b=b=="transform-origin"?v+"Origin":b;var d=null;b=="float"&&(b="cssFloat");var e=c.defaultView.getComputedStyle(a,"");return e&&(d=e[z(b)]),a.style[b]||d}:m&&d.currentStyle?function(a,b){b=z(b),b=b=="float"?"styleFloat":b;if(b=="opacity"){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[z(b)]};J.prototype={get:function(a){return this[a]},each:function(a,b){return y(this,a,b)},map:function(a,b){var c=[],d,e;for(e=0;e<this.length;e++)d=a.call(this,this[e],e),b?b(d)&&c.push(d):c.push(d);return c},first:function(){return O(this[0])},last:function(){return O(this[this.length-1])},html:function(a,b){function f(b){while(b.firstChild)b.removeChild(b.firstChild);y(K(a),function(a){b.appendChild(a)})}var c=b?d.textContent===null?"innerText":"textContent":"innerHTML",e;return typeof a!="undefined"?this.each(function(b){(e=b.tagName.match(h))?f(b,e[0]):b[c]=a}):this[0]?this[0][c]:""},text:function(a){return this.html(a,1)},addClass:function(a){return this.each(function(b){F(b,I(b,a))||G(b,I(b,a))})},removeClass:function(a){return this.each(function(b){F(b,I(b,a))&&H(b,I(b,a))})},hasClass:function(a){return B(this,function(b){return F(b,a)})},toggleClass:function(a,b){return this.each(function(c){typeof b!="undefined"?b?G(c,a):H(c,a):F(c,a)?H(c,a):G(c,a)})},show:function(a){return this.each(function(b){b.style.display=a||""})},hide:function(a){return this.each(function(a){a.style.display="none"})},append:function(a){return this.each(function(b){y(K(a),function(a){b.appendChild(a)})})},prepend:function(a){return this.each(function(b){var c=b.firstChild;y(K(a),function(a){b.insertBefore(a,c)})})},appendTo:function(a,b){return D.call(this,a,b,function(a,b){a.appendChild(b)})},prependTo:function(a,b){return D.call(this,a,b,function(a,b){a.insertBefore(b,a.firstChild)})},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},related:function(a){return this.map(function(b){b=b[a];while(b&&b.nodeType!==1)b=b[a];return b||0},function(a){return a})},before:function(a){return this.each(function(b){y(O.create(a),function(a){b[e].insertBefore(a,b)})})},after:function(a){return this.each(function(b){y(O.create(a),function(a){b[e].insertBefore(a,b.nextSibling)})})},insertBefore:function(a,b){return D.call(this,a,b,function(a,b){a[e].insertBefore(b,a)})},insertAfter:function(a,b){return D.call(this,a,b,function(a,b){var c=a.nextSibling;c?a[e].insertBefore(b,c):a[e].appendChild(b)})},replaceWith:function(a){return this.each(function(b){b.parentNode.replaceChild(O.create(a)[0],b)})},css:function(a,d,e){function g(a,b,c){for(var d in f)f.hasOwnProperty(d)&&(c=f[d],(b=z(d))&&p.test(c)&&!(b in u)&&(c+=q),b=b=="transform"?v:b,b=b=="transformOrigin"?v+"Origin":b,a.style[b]=I(a,c))}if(d===undefined&&typeof a=="string")return d=this[0],d?d==c||d==b?(e=d==c?O.doc():O.viewport(),a=="width"?e.width:a=="height"?e.height:""):C(d,a):null;var f=a;typeof a=="string"&&(f={},f[a]=d),m&&f.opacity&&(f.filter="alpha(opacity="+f.opacity*100+")",f.zoom=a.zoom||1,delete f.opacity);if(d=f["float"])m?f.styleFloat=d:f.cssFloat=d,delete f["float"];return this.each(g)},offset:function(a,b){if(typeof a=="number"||typeof b=="number")return this.each(function(c){E(c,a,b)});var c=this[0],d=c.offsetWidth,e=c.offsetHeight,f=c.offsetTop,g=c.offsetLeft;while(c=c.offsetParent)f=f+c.offsetTop,g=g+c.offsetLeft;return{top:f,left:g,height:e,width:d}},attr:function(a,b){var c=this[0];if(typeof a=="string"||a instanceof String)return typeof b=="undefined"?g.test(a)?l.test(a)&&typeof c[a]=="string"?!0:c[a]:c[s](a):this.each(function(c){g.test(a)?c[a]=I(c,b):c[r](a,I(c,b))});for(var d in a)a.hasOwnProperty(d)&&this.attr(d,a[d]);return this},val:function(a){return typeof a=="string"?this.attr("value",a):this[0].value},removeAttr:function(a){return this.each(function(b){l.test(a)?b[a]=!1:b.removeAttribute(a)})},data:function(a,b){var c=this[0];if(typeof b=="undefined"){c[s]("data-node-uid")||c[r]("data-node-uid",++o);var d=c[s]("data-node-uid");return n[d]||(n[d]={}),n[d][a]}return this.each(function(c){c[s]("data-node-uid")||c[r]("data-node-uid",++o);var d=c[s]("data-node-uid"),e=n[d]||(n[d]={});e[a]=b})},remove:function(){return this.each(function(a){a[e]&&a[e].removeChild(a)})},empty:function(){return this.each(function(a){while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.map(function(a){return a[e].removeChild(a)})},scrollTop:function(a){return L.call(this,null,a,"y")},scrollLeft:function(a){return L.call(this,a,null,"x")},toggle:function(a){return this.each(function(a){a.style.display=a.offsetWidth||a.offsetHeight?"none":"block"}),a&&a(),this}},O.setQueryEngine=function(a){f=a,delete O.setQueryEngine},O.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||J.prototype)[c]=a[c])},O.create=function(a){return typeof a=="string"&&a!==""?function(){var b=/^<([^\s>]+)/.exec(a),d=c.createElement(b&&k[b[1].toLowerCase()]||"div"),e=[];d.innerHTML=a;var f=d.childNodes;d=d.firstChild,d.nodeType==1&&e.push(d);while(d=d.nextSibling)d.nodeType==1&&e.push(d);return e}():A(a)?[a.cloneNode(!0)]:[]},O.doc=function(){var a=this.viewport();return{width:Math.max(c.body.scrollWidth,d.scrollWidth,a.width),height:Math.max(c.body.scrollHeight,d.scrollHeight,a.height)}},O.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c<d;c++)b[c].nodeType===1&&(e=b[d=c]);return e},O.viewport=function(){return{width:m?d.clientWidth:self.innerWidth,height:m?d.clientHeight:self.innerHeight}},O.isAncestor="compareDocumentPosition"in d?function(a,b){return(a.compareDocumentPosition(b)&16)==16}:"contains"in d?function(a,b){return a!==b&&a.contains(b)}:function(a,b){while(b=b[e])if(b===a)return!0;return!1};var P=a.bonzo;return O.noConflict=function(){return a.bonzo=P,this},O}),provide("bonzo",a.exports),!function(a){function c(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}function d(a){var b=[],c,d;e:for(c=0;c<a.length;c++){for(d=0;d<b.length;d++)if(b[d]==a[c])continue e;b[b.length]=a[c]}return b}function e(a,b,c){return a?b.css(c,a):function(a){return a=parseInt(b.css(c),10),isNaN(a)?b[0]["offset"+c.replace(/^\w/,function(a){return a.toUpperCase()})]:a}()}var b=require("bonzo");b.setQueryEngine(a),a.ender(b),a.ender(b(),!0),a.ender({create:function(c){return a(b.create(c))}}),a.id=function(b){return a([document.getElementById(b)])},a.ender({parents:function(b,e){var f=a(b),g,h,i,j=[];for(g=0,h=this.length;g<h;g++){i=this[g];while(i=i.parentNode)if(~c(f,i)){j.push(i);if(e)break}}return a(d(j))},closest:function(a){return this.parents(a,!0)},first:function(){return a(this[0])},last:function(){return a(this[this.length-1])},next:function(){return a(b(this).next())},previous:function(){return a(b(this).previous())},appendTo:function(a){return b(this.selector).appendTo(a,this)},prependTo:function(a){return b(this.selector).prependTo(a,this)},insertAfter:function(a){return b(this.selector).insertAfter(a,this)},insertBefore:function(a){return b(this.selector).insertBefore(a,this)},siblings:function(){var b,c,d,e=[];for(b=0,c=this.length;b<c;b++){d=this[b];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[b];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return a(e)},children:function(){var c,e,f=[];for(c=0,l=this.length;c<l;c++){if(!(e=b.firstChild(this[c])))continue;f.push(e);while(e=e.nextSibling)e.nodeType==1&&f.push(e)}return a(d(f))},height:function(a){return e(a,this,"height")},width:function(a){return e(a,this,"width")}},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;!function(b,c){typeof define=="function"?define(c):typeof a!="undefined"?a.exports=c():this[b]=this.domReady=c()}("domready",function(a){function l(a){k=1;while(a=b.shift())a()}var b=[],c,d=!1,e=document,f=e.documentElement,g=f.doScroll,h="DOMContentLoaded",i="addEventListener",j="onreadystatechange",k=/^loade|c/.test(e.readyState);return e[i]&&e[i](h,c=function(){e.removeEventListener(h,c,d),l()},d),g&&e.attachEvent(j,c=function(){/^c/.test(e.readyState)&&(e.detachEvent(j,c),l())}),a=g?function(c){self!=top?k?c():b.push(c):function(){try{f.doScroll("left")}catch(b){return setTimeout(function(){a(c)},50)}c()}()}:function(a){k?a():b.push(a)}}),provide("domready",a.exports),!function(a){var b=require("domready");a.ender({domReady:b}),a.ender({ready:function(a){return b(a),this}},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;
Beispiel #4
0
(function(name,context,definition){typeof module!="undefined"&&module.exports?module.exports=definition():typeof define=="function"&&define.amd?define(definition):context[name]=definition()})("bonzo",this,function(){function isNode(node){return node&&node.nodeName&&(node.nodeType==1||node.nodeType==11)}function normalize(node,host,clone){var i,l,ret;if(typeof node=="string")return bonzo.create(node);isNode(node)&&(node=[node]);if(clone){ret=[];for(i=0,l=node.length;i<l;i++)ret[i]=cloneNode(host,node[i]);return ret}return node}function classReg(c){return new RegExp("(^|\\s+)"+c+"(\\s+|$)")}function each(ar,fn,opt_scope,opt_rev){var ind,i=0,l=ar.length;for(;i<l;i++){ind=opt_rev?ar.length-i-1:i;fn.call(opt_scope||ar[ind],ar[ind],ind,ar)}return ar}function deepEach(ar,fn,opt_scope){for(var i=0,l=ar.length;i<l;i++)if(isNode(ar[i])){deepEach(ar[i].childNodes,fn,opt_scope);fn.call(opt_scope||ar[i],ar[i],i,ar)}return ar}function camelize(s){return s.replace(/-(.)/g,function(m,m1){return m1.toUpperCase()})}function decamelize(s){return s?s.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():s}function data(el){el[getAttribute]("data-node-uid")||el[setAttribute]("data-node-uid",++uuids);var uid=el[getAttribute]("data-node-uid");return uidMap[uid]||(uidMap[uid]={})}function clearData(el){var uid=el[getAttribute]("data-node-uid");uid&&delete uidMap[uid]}function dataValue(d){var f;try{return d===null||d===undefined?undefined:d==="true"?!0:d==="false"?!1:d==="null"?null:(f=parseFloat(d))==d?f:d}catch(e){}return undefined}function some(ar,fn,opt_scope){for(var i=0,j=ar.length;i<j;++i)if(fn.call(opt_scope||null,ar[i],i,ar))return!0;return!1}function styleProperty(p){p=="transform"&&(p=features.transform)||/^transform-?[Oo]rigin$/.test(p)&&(p=features.transform+"Origin")||p=="float"&&(p=features.cssFloat);return p?camelize(p):null}function insert(target,host,fn,rev){var i=0,self=host||this,r=[],nodes=query&&typeof target=="string"&&target.charAt(0)!="<"?query(target):target;each(normalize(nodes),function(t,j){each(self,function(el){fn(t,r[i++]=j>0?cloneNode(self,el):el)},null,rev)},this,rev);self.length=i;each(r,function(e){self[--i]=e},null,!rev);return self}function xy(el,x,y){var $el=bonzo(el),style=$el.css("position"),offset=$el.offset(),rel="relative",isRel=style==rel,delta=[parseInt($el.css("left"),10),parseInt($el.css("top"),10)];if(style=="static"){$el.css("position",rel);style=rel}isNaN(delta[0])&&(delta[0]=isRel?0:el.offsetLeft);isNaN(delta[1])&&(delta[1]=isRel?0:el.offsetTop);x!=null&&(el.style.left=x-offset.left+delta[0]+px);y!=null&&(el.style.top=y-offset.top+delta[1]+px)}function setter(el,v){return typeof v=="function"?v(el):v}function scroll(x,y,type){var el=this[0];if(!el)return this;if(x==null&&y==null)return(isBody(el)?getWindowScroll():{x:el.scrollLeft,y:el.scrollTop})[type];if(isBody(el))win.scrollTo(x,y);else{x!=null&&(el.scrollLeft=x);y!=null&&(el.scrollTop=y)}return this}function Bonzo(elements){this.length=0;if(elements){elements=typeof elements!="string"&&!elements.nodeType&&typeof elements.length!="undefined"?elements:[elements];this.length=elements.length;for(var i=0;i<elements.length;i++)this[i]=elements[i]}}function cloneNode(host,el){var c=el.cloneNode(!0),cloneElems,elElems,i;if(host.$&&typeof host.cloneEvents=="function"){host.$(c).cloneEvents(el);cloneElems=host.$(c).find("*");elElems=host.$(el).find("*");for(i=0;i<elElems.length;i++)host.$(cloneElems[i]).cloneEvents(elElems[i])}return c}function isBody(element){return element===win||/^(?:body|html)$/i.test(element.tagName)}function getWindowScroll(){return{x:win.pageXOffset||html.scrollLeft,y:win.pageYOffset||html.scrollTop}}function createScriptFromHtml(html){var scriptEl=document.createElement("script"),matches=html.match(simpleScriptTagRe);scriptEl.src=matches[1];return scriptEl}function bonzo(els){return new Bonzo(els)}var win=window,doc=win.document,html=doc.documentElement,parentNode="parentNode",specialAttributes=/^(checked|value|selected|disabled)$/i,specialTags=/^(select|fieldset|table|tbody|tfoot|td|tr|colgroup)$/i,simpleScriptTagRe=/\s*<script +src=['"]([^'"]+)['"]>/,table=["<table>","</table>",1],td=["<table><tbody><tr>","</tr></tbody></table>",3],option=["<select>","</select>",1],noscope=["_","",0,1],tagMap={thead:table,tbody:table,tfoot:table,colgroup:table,caption:table,tr:["<table><tbody>","</tbody></table>",2],th:td,td:td,col:["<table><colgroup>","</colgroup></table>",2],fieldset:["<form>","</form>",1],legend:["<form><fieldset>","</fieldset></form>",2],option:option,optgroup:option,script:noscope,style:noscope,link:noscope,param:noscope,base:noscope},stateAttributes=/^(checked|selected|disabled)$/,ie=/msie/i.test(navigator.userAgent),hasClass,addClass,removeClass,uidMap={},uuids=0,digit=/^-?[\d\.]+$/,dattr=/^data-(.+)$/,px="px",setAttribute="setAttribute",getAttribute="getAttribute",byTag="getElementsByTagName",features=function(){var e=doc.createElement("p");e.innerHTML='<a href="#x">x</a><table style="float:left;"></table>';return{hrefExtended:e[byTag]("a")[0][getAttribute]("href")!="#x",autoTbody:e[byTag]("tbody").length!==0,computedStyle:doc.defaultView&&doc.defaultView.getComputedStyle,cssFloat:e[byTag]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var props=["transform","webkitTransform","MozTransform","OTransform","msTransform"],i;for(i=0;i<props.length;i++)if(props[i]in e.style)return props[i]}(),classList:"classList"in e,opasity:function(){return typeof doc.createElement("a").style.opacity!="undefined"}()}}(),trimReplace=/(^\s*|\s*$)/g,whitespaceRegex=/\s+/,toString=String.prototype.toString,unitless={lineHeight:1,zoom:1,zIndex:1,opacity:1,boxFlex:1,WebkitBoxFlex:1,MozBoxFlex:1},query=doc.querySelectorAll&&function(selector){return doc.querySelectorAll(selector)},trim=String.prototype.trim?function(s){return s.trim()}:function(s){return s.replace(trimReplace,"")},getStyle=features.computedStyle?function(el,property){var value=null,computed=doc.defaultView.getComputedStyle(el,"");computed&&(value=computed[property]);return el.style[property]||value}:!ie||!html.currentStyle?function(el,property){return el.style[property]}:function(el,property){var val,value;if(property=="opacity"&&!features.opasity){val=100;try{val=el.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(e1){try{val=el.filters("alpha").opacity}catch(e2){}}return val/100}value=el.currentStyle?el.currentStyle[property]:null;return el.style[property]||value};if(features.classList){hasClass=function(el,c){return el.classList.contains(c)};addClass=function(el,c){el.classList.add(c)};removeClass=function(el,c){el.classList.remove(c)}}else{hasClass=function(el,c){return classReg(c).test(el.className)};addClass=function(el,c){el.className=trim(el.className+" "+c)};removeClass=function(el,c){el.className=trim(el.className.replace(classReg(c)," "))}}Bonzo.prototype={get:function(index){return this[index]||null},each:function(fn,opt_scope){return each(this,fn,opt_scope)},deepEach:function(fn,opt_scope){return deepEach(this,fn,opt_scope)},map:function(fn,opt_reject){var m=[],n,i;for(i=0;i<this.length;i++){n=fn.call(this,this[i],i);opt_reject?opt_reject(n)&&m.push(n):m.push(n)}return m},html:function(h,opt_text){var method=opt_text?html.textContent===undefined?"innerText":"textContent":"innerHTML",that=this,append=function(el,i){each(normalize(h,that,i),function(node){el.appendChild(node)})},updateElement=function(el,i){try{if(opt_text||typeof h=="string"&&!specialTags.test(el.tagName))return el[method]=h}catch(e){}append(el,i)};return typeof h!="undefined"?this.empty().each(updateElement):this[0]?this[0][method]:""},text:function(opt_text){return this.html(opt_text,!0)},append:function(node){var that=this;return this.each(function(el,i){each(normalize(node,that,i),function(i){el.appendChild(i)})})},prepend:function(node){var that=this;return this.each(function(el,i){var first=el.firstChild;each(normalize(node,that,i),function(i){el.insertBefore(i,first)})})},appendTo:function(target,opt_host){return insert.call(this,target,opt_host,function(t,el){t.appendChild(el)})},prependTo:function(target,opt_host){return insert.call(this,target,opt_host,function(t,el){t.insertBefore(el,t.firstChild)},1)},before:function(node){var that=this;return this.each(function(el,i){each(normalize(node,that,i),function(i){el[parentNode].insertBefore(i,el)})})},after:function(node){var that=this;return this.each(function(el,i){each(normalize(node,that,i),function(i){el[parentNode].insertBefore(i,el.nextSibling)},null,1)})},insertBefore:function(target,opt_host){return insert.call(this,target,opt_host,function(t,el){t[parentNode].insertBefore(el,t)})},insertAfter:function(target,opt_host){return insert.call(this,target,opt_host,function(t,el){var sibling=t.nextSibling;sibling?t[parentNode].insertBefore(el,sibling):t[parentNode].appendChild(el)},1)},replaceWith:function(node){bonzo(normalize(node)).insertAfter(this);return this.remove()},clone:function(opt_host){var ret=[],l,i;for(i=0,l=this.length;i<l;i++)ret[i]=cloneNode(opt_host||this,this[i]);return bonzo(ret)},addClass:function(c){c=toString.call(c).split(whitespaceRegex);return this.each(function(el){each(c,function(c){c&&!hasClass(el,setter(el,c))&&addClass(el,setter(el,c))})})},removeClass:function(c){c=toString.call(c).split(whitespaceRegex);return this.each(function(el){each(c,function(c){c&&hasClass(el,setter(el,c))&&removeClass(el,setter(el,c))})})},hasClass:function(c){c=toString.call(c).split(whitespaceRegex);return some(this,function(el){return some(c,function(c){return c&&hasClass(el,c)})})},toggleClass:function(c,opt_condition){c=toString.call(c).split(whitespaceRegex);return this.each(function(el){each(c,function(c){c&&(typeof opt_condition!="undefined"?opt_condition?!hasClass(el,c)&&addClass(el,c):removeClass(el,c):hasClass(el,c)?removeClass(el,c):addClass(el,c))})})},show:function(opt_type){opt_type=typeof opt_type=="string"?opt_type:"";return this.each(function(el){el.style.display=opt_type})},hide:function(){return this.each(function(el){el.style.display="none"})},toggle:function(opt_callback,opt_type){opt_type=typeof opt_type=="string"?opt_type:"";typeof opt_callback!="function"&&(opt_callback=null);return this.each(function(el){el.style.display=el.offsetWidth||el.offsetHeight?"none":opt_type;opt_callback&&opt_callback.call(el)})},first:function(){return bonzo(this.length?this[0]:[])},last:function(){return bonzo(this.length?this[this.length-1]:[])},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},parent:function(){return this.related(parentNode)},related:function(method){return bonzo(this.map(function(el){el=el[method];while(el&&el.nodeType!==1)el=el[method];return el||0},function(el){return el}))},focus:function(){this.length&&this[0].focus();return this},blur:function(){this.length&&this[0].blur();return this},css:function(o,opt_v){function fn(el,p,v){for(var k in iter)if(iter.hasOwnProperty(k)){v=iter[k];(p=styleProperty(k))&&digit.test(v)&&!(p in unitless)&&(v+=px);try{el.style[p]=setter(el,v)}catch(e){}}}var p,iter=o;if(opt_v===undefined&&typeof o=="string"){opt_v=this[0];if(!opt_v)return null;if(opt_v===doc||opt_v===win){p=opt_v===doc?bonzo.doc():bonzo.viewport();return o=="width"?p.width:o=="height"?p.height:""}return(o=styleProperty(o))?getStyle(opt_v,o):null}if(typeof o=="string"){iter={};iter[o]=opt_v}if(ie&&iter.opacity){iter.filter="alpha(opacity="+iter.opacity*100+")";iter.zoom=o.zoom||1;delete iter.opacity}return this.each(fn)},offset:function(opt_x,opt_y){if(!opt_x||typeof opt_x!="object"||typeof opt_x.top!="number"&&typeof opt_x.left!="number"){if(typeof opt_x=="number"||typeof opt_y=="number")return this.each(function(el){xy(el,opt_x,opt_y)});if(!this[0])return{top:0,left:0,height:0,width:0};var el=this[0],de=el.ownerDocument.documentElement,bcr=el.getBoundingClientRect(),scroll=getWindowScroll(),width=el.offsetWidth,height=el.offsetHeight,top=bcr.top+scroll.y-Math.max(0,de&&de.clientTop,doc.body.clientTop),left=bcr.left+scroll.x-Math.max(0,de&&de.clientLeft,doc.body.clientLeft);return{top:top,left:left,height:height,width:width}}return this.each(function(el){xy(el,opt_x.left,opt_x.top)})},dim:function(){if(!this.length)return{height:0,width:0};var el=this[0],de=el.nodeType==9&&el.documentElement,orig=!de&&!!el.style&&!el.offsetWidth&&!el.offsetHeight?function(t){var s={position:el.style.position||"",visibility:el.style.visibility||"",display:el.style.display||""};t.first().css({position:"absolute",visibility:"hidden",display:"block"});return s}(this):null,width=de?Math.max(el.body.scrollWidth,el.body.offsetWidth,de.scrollWidth,de.offsetWidth,de.clientWidth):el.offsetWidth,height=de?Math.max(el.body.scrollHeight,el.body.offsetHeight,de.scrollHeight,de.offsetHeight,de.clientHeight):el.offsetHeight;orig&&this.first().css(orig);return{height:height,width:width}},attr:function(k,opt_v){var el=this[0],n;if(typeof k=="string"||k instanceof String)return typeof opt_v=="undefined"?el?specialAttributes.test(k)?stateAttributes.test(k)&&typeof el[k]=="string"?!0:el[k]:k!="href"&&k!="src"||!features.hrefExtended?el[getAttribute](k):el[getAttribute](k,2):null:this.each(function(el){specialAttributes.test(k)?el[k]=setter(el,opt_v):el[setAttribute](k,setter(el,opt_v))});for(n in k)k.hasOwnProperty(n)&&this.attr(n,k[n]);return this},removeAttr:function(k){return this.each(function(el){stateAttributes.test(k)?el[k]=!1:el.removeAttribute(k)})},val:function(s){return typeof s=="string"?this.attr("value",s):this.length?this[0].value:null},data:function(opt_k,opt_v){var el=this[0],o,m;if(typeof opt_v=="undefined"){if(!el)return null;o=data(el);if(typeof opt_k=="undefined"){each(el.attributes,function(a){(m=(""+a.name).match(dattr))&&(o[camelize(m[1])]=dataValue(a.value))});return o}typeof o[opt_k]=="undefined"&&(o[opt_k]=dataValue(this.attr("data-"+decamelize(opt_k))));return o[opt_k]}return this.each(function(el){data(el)[opt_k]=opt_v})},remove:function(){this.deepEach(clearData);return this.detach()},empty:function(){return this.each(function(el){deepEach(el.childNodes,clearData);while(el.firstChild)el.removeChild(el.firstChild)})},detach:function(){return this.each(function(el){el[parentNode]&&el[parentNode].removeChild(el)})},scrollTop:function(y){return scroll.call(this,null,y,"y")},scrollLeft:function(x){return scroll.call(this,x,null,"x")}};bonzo.setQueryEngine=function(q){query=q;delete bonzo.setQueryEngine};bonzo.aug=function(o,target){for(var k in o)o.hasOwnProperty(k)&&((target||Bonzo.prototype)[k]=o[k])};bonzo.create=function(node){return typeof node=="string"&&node!==""?function(){if(simpleScriptTagRe.test(node))return[createScriptFromHtml(node)];var tag=node.match(/^\s*<([^\s>]+)/),el=doc.createElement("div"),els=[],p=tag?tagMap[tag[1].toLowerCase()]:null,dep=p?p[2]+1:1,ns=p&&p[3],pn=parentNode,tb=features.autoTbody&&p&&p[0]=="<table>"&&!/<tbody/i.test(node);el.innerHTML=p?p[0]+node+p[1]:node;while(dep--)el=el.firstChild;ns&&el&&el.nodeType!==1&&(el=el.nextSibling);do(!tag||el.nodeType==1)&&(!tb||el.tagName&&el.tagName!="TBODY")&&els.push(el);while(el=el.nextSibling);each(els,function(el){el[pn]&&el[pn].removeChild(el)});return els}():isNode(node)?[node.cloneNode(!0)]:[]};bonzo.doc=function(){var vp=bonzo.viewport();return{width:Math.max(doc.body.scrollWidth,html.scrollWidth,vp.width),height:Math.max(doc.body.scrollHeight,html.scrollHeight,vp.height)}};bonzo.firstChild=function(el){for(var c=el.childNodes,i=0,j=c&&c.length||0,e;i<j;i++)c[i].nodeType===1&&(e=c[j=i]);return e};bonzo.viewport=function(){return{width:ie?html.clientWidth:self.innerWidth,height:ie?html.clientHeight:self.innerHeight}};bonzo.isAncestor="compareDocumentPosition"in html?function(container,element){return(container.compareDocumentPosition(element)&16)==16}:"contains"in html?function(container,element){return container!==element&&container.contains(element)}:function(container,element){while(element=element[parentNode])if(element===container)return!0;return!1};return bonzo});provide("bonzo",module.exports);(function($){function indexOf(ar,val){for(var i=0;i<ar.length;i++)if(ar[i]===val)return i;return-1}function uniq(ar){var r=[],i=0,j=0,k,item,inIt;for(;item=ar[i];++i){inIt=!1;for(k=0;k<r.length;++k)if(r[k]===item){inIt=!0;break}inIt||(r[j++]=item)}return r}function dimension(type,opt_v){return typeof opt_v=="undefined"?b(this).dim()[type]:this.css(type,opt_v)}var b=require("bonzo");b.setQueryEngine($);$.ender(b);$.ender(b(),!0);$.ender({create:function(node){return $(b.create(node))}});$.id=function(id){return $([document.getElementById(id)])};$.ender({parents:function(selector,closest){if(!this.length)return this;selector||(selector="*");var collection=$(selector),j,k,p,r=[];for(j=0,k=this.length;j<k;j++){p=this[j];while(p=p.parentNode)if(~indexOf(collection,p)){r.push(p);if(closest)break}}return $(uniq(r))},parent:function(){return $(uniq(b(this).parent()))},closest:function(selector){return this.parents(selector,!0)},first:function(){return $(this.length?this[0]:this)},last:function(){return $(this.length?this[this.length-1]:[])},next:function(){return $(b(this).next())},previous:function(){return $(b(this).previous())},related:function(t){return $(b(this).related(t))},appendTo:function(t){return b(this.selector).appendTo(t,this)},prependTo:function(t){return b(this.selector).prependTo(t,this)},insertAfter:function(t){return b(this.selector).insertAfter(t,this)},insertBefore:function(t){return b(this.selector).insertBefore(t,this)},clone:function(){return $(b(this).clone(this))},siblings:function(){var i,l,p,r=[];for(i=0,l=this.length;i<l;i++){p=this[i];while(p=p.previousSibling)p.nodeType==1&&r.push(p);p=this[i];while(p=p.nextSibling)p.nodeType==1&&r.push(p)}return $(r)},children:function(){var i,l,el,r=[];for(i=0,l=this.length;i<l;i++){if(!(el=b.firstChild(this[i])))continue;r.push(el);while(el=el.nextSibling)el.nodeType==1&&r.push(el)}return $(uniq(r))},height:function(v){return dimension.call(this,"height",v)},width:function(v){return dimension.call(this,"width",v)}},!0)})(ender)})();(function(){var module={exports:{}},exports=module.exports;
Beispiel #5
0
!function(b,c){typeof a!="undefined"?a.exports=c():typeof define=="function"&&define.amd?define(b,c):this[b]=c()}("bonzo",function(){function G(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function H(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c||a[d],a[d],d,a);return a}function I(a,b,c){for(var d=0,e=a.length;d<e;d++)O(a[d])&&(I(a[d].childNodes,b,c),b.call(c||a[d],a[d],d,a));return a}function J(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function K(a){return a?a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():a}function L(a){return a[y]("data-node-uid")||a[x]("data-node-uid",++t),uid=a[y]("data-node-uid"),s[uid]||(s[uid]={})}function M(a){uid=a[y]("data-node-uid"),uid&&delete s[uid]}function N(a,b){try{return a===null||a===undefined?undefined:a==="true"?!0:a==="false"?!1:a==="null"?null:(b=parseFloat(a))==a?b:a}catch(c){}return undefined}function O(a){return a&&a.nodeName&&a.nodeType==1}function P(a,b,c,d,e){for(d=0,e=a.length;d<e;++d)if(b.call(c,a[d],d,a))return!0;return!1}function Q(a){return a=="transform"&&(a=A.transform)||/^transform-?[Oo]rigin$/.test(a)&&(a=A.transform+"Origin")||a=="float"&&(a=A.cssFloat),a?J(a):null}function S(a,b,c){var d=0,g=b||this,h=[],i=f&&typeof a=="string"&&a.charAt(0)!="<"?f(a):a;return H(W(i),function(a){H(g,function(b){var f=!b[e]||b[e]&&!b[e][e]?function(){var a=b.cloneNode(!0),c,d;if(g.$&&g.cloneEvents){g.$(a).cloneEvents(b),c=g.$(a).find("*"),d=g.$(b).find("*");for(var e=0;e<d.length;e++)g.$(c[e]).cloneEvents(d[e])}return a}():b;c(a,f),h[d]=f,d++})},this),H(h,function(a,b){g[b]=a}),g.length=d,g}function T(a,b,c){var d=$(a),e=d.css("position"),f=d.offset(),g="relative",h=e==g,i=[parseInt(d.css("left"),10),parseInt(d.css("top"),10)];e=="static"&&(d.css("position",g),e=g),isNaN(i[0])&&(i[0]=h?0:a.offsetLeft),isNaN(i[1])&&(i[1]=h?0:a.offsetTop),b!=null&&(a.style.left=b-f.left+i[0]+w),c!=null&&(a.style.top=c-f.top+i[1]+w)}function U(a,b){return typeof b=="function"?b(a):b}function V(a){this.length=0;if(a){a=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a],this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]}}function W(a){return typeof a=="string"?$.create(a):O(a)?[a]:a}function X(a,c,d){var e=this[0];return e?a==null&&c==null?(Y(e)?Z():{x:e.scrollLeft,y:e.scrollTop})[d]:(Y(e)?b.scrollTo(a,c):(a!=null&&(e.scrollLeft=a),c!=null&&(e.scrollTop=c)),this):this}function Y(a){return a===b||/^(?:body|html)$/i.test(a.tagName)}function Z(){return{x:b.pageXOffset||d.scrollLeft,y:b.pageYOffset||d.scrollTop}}function $(a,b){return new V(a,b)}var a=this,b=window,c=b.document,d=c.documentElement,e="parentNode",f=null,g=/^(checked|value|selected)$/i,h=/^(select|fieldset|table|tbody|tfoot|td|tr|colgroup)$/i,i=["<table>","</table>",1],j=["<table><tbody><tr>","</tr></tbody></table>",3],k=["<select>","</select>",1],l=["_","",0,1],m={thead:i,tbody:i,tfoot:i,colgroup:i,caption:i,tr:["<table><tbody>","</tbody></table>",2],th:j,td:j,col:["<table><colgroup>","</colgroup></table>",2],fieldset:["<form>","</form>",1],legend:["<form><fieldset>","</fieldset></form>",2],option:k,optgroup:k,script:l,style:l,link:l,param:l,base:l},n=/^(checked|selected)$/,o=/msie/i.test(navigator.userAgent),p,q,r,s={},t=0,u=/^-?[\d\.]+$/,v=/^data-(.+)$/,w="px",x="setAttribute",y="getAttribute",z="getElementsByTagName",A=function(){var a=c.createElement("p");return a.innerHTML='<a href="#x">x</a><table style="float:left;"></table>',{hrefExtended:a[z]("a")[0][y]("href")!="#x",autoTbody:a[z]("tbody").length!==0,computedStyle:c.defaultView&&c.defaultView.getComputedStyle,cssFloat:a[z]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var b=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],c;for(c=0;c<b.length;c++)if(b[c]in a.style)return b[c]}(),classList:"classList"in a}}(),B=/(^\s*|\s*$)/g,C=/\s+/,D=String.prototype.toString,E={lineHeight:1,zoom:1,zIndex:1,opacity:1},F=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(B,"")},R=A.computedStyle?function(a,b){var d=null,e=c.defaultView.getComputedStyle(a,"");return e&&(d=e[b]),a.style[b]||d}:o&&d.currentStyle?function(a,b){if(b=="opacity"){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[b]};return A.classList?(p=function(a,b){return a.classList.contains(b)},q=function(a,b){a.classList.add(b)},r=function(a,b){a.classList.remove(b)}):(p=function(a,b){return G(b).test(a.className)},q=function(a,b){a.className=F(a.className+" "+b)},r=function(a,b){a.className=F(a.className.replace(G(b)," "))}),V.prototype={get:function(a){return this[a]||null},each:function(a,b){return H(this,a,b)},deepEach:function(a,b){return I(this,a,b)},map:function(a,b){var c=[],d,e;for(e=0;e<this.length;e++)d=a.call(this,this[e],e),b?b(d)&&c.push(d):c.push(d);return c},html:function(a,b){function e(b){H(W(a),function(a){b.appendChild(a)})}var c=b?d.textContent===undefined?"innerText":"textContent":"innerHTML";return typeof a!="undefined"?this.empty().each(function(d){!b&&h.test(d.tagName)?e(d):!function(){try{d[c]=a}catch(b){e(d)}}()}):this[0]?this[0][c]:""},text:function(a){return this.html(a,1)},append:function(a){return this.each(function(b){H(W(a),function(a){b.appendChild(a)})})},prepend:function(a){return this.each(function(b){var c=b.firstChild;H(W(a),function(a){b.insertBefore(a,c)})})},appendTo:function(a,b){return S.call(this,a,b,function(a,b){a.appendChild(b)})},prependTo:function(a,b){return S.call(this,a,b,function(a,b){a.insertBefore(b,a.firstChild)})},before:function(a){return this.each(function(b){H($.create(a),function(a){b[e].insertBefore(a,b)})})},after:function(a){return this.each(function(b){H($.create(a),function(a){b[e].insertBefore(a,b.nextSibling)})})},insertBefore:function(a,b){return S.call(this,a,b,function(a,b){a[e].insertBefore(b,a)})},insertAfter:function(a,b){return S.call(this,a,b,function(a,b){var c=a.nextSibling;c?a[e].insertBefore(b,c):a[e].appendChild(b)})},replaceWith:function(a){return this.deepEach(M),this.each(function(b){b.parentNode.replaceChild($.create(a)[0],b)})},addClass:function(a){return a=D.call(a).split(C),this.each(function(b){H(a,function(a){a&&!p(b,U(b,a))&&q(b,U(b,a))})})},removeClass:function(a){return a=D.call(a).split(C),this.each(function(b){H(a,function(a){a&&p(b,U(b,a))&&r(b,U(b,a))})})},hasClass:function(a){return a=D.call(a).split(C),P(this,function(b){return P(a,function(a){return a&&p(b,a)})})},toggleClass:function(a,b){return a=D.call(a).split(C),this.each(function(c){H(a,function(a){a&&(typeof b!="undefined"?b?q(c,a):r(c,a):p(c,a)?r(c,a):q(c,a))})})},show:function(a){return this.each(function(b){b.style.display=a||""})},hide:function(){return this.each(function(a){a.style.display="none"})},toggle:function(a,b){return this.each(function(a){a.style.display=a.offsetWidth||a.offsetHeight?"none":b||""}),a&&a(),this},first:function(){return $(this.length?this[0]:[])},last:function(){return $(this.length?this[this.length-1]:[])},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},parent:function(){return this.related(e)},related:function(a){return this.map(function(b){b=b[a];while(b&&b.nodeType!==1)b=b[a];return b||0},function(a){return a})},focus:function(){return this.length&&this[0].focus(),this},blur:function(){return this.each(function(a){a.blur()})},css:function(a,d,e){function g(a,b,c){for(var d in f)f.hasOwnProperty(d)&&(c=f[d],(b=Q(d))&&u.test(c)&&!(b in E)&&(c+=w),a.style[b]=U(a,c))}if(d===undefined&&typeof a=="string")return d=this[0],d?d===c||d===b?(e=d===c?$.doc():$.viewport(),a=="width"?e.width:a=="height"?e.height:""):(a=Q(a))?R(d,a):null:null;var f=a;return typeof a=="string"&&(f={},f[a]=d),o&&f.opacity&&(f.filter="alpha(opacity="+f.opacity*100+")",f.zoom=a.zoom||1,delete f.opacity),this.each(g)},offset:function(a,b){if(typeof a=="number"||typeof b=="number")return this.each(function(c){T(c,a,b)});if(!this[0])return{top:0,left:0,height:0,width:0};var c=this[0],d=c.offsetWidth,e=c.offsetHeight,f=c.offsetTop,g=c.offsetLeft;while(c=c.offsetParent)f+=c.offsetTop,g+=c.offsetLeft;return{top:f,left:g,height:e,width:d}},dim:function(){if(!this.length)return{height:0,width:0};var a=this[0],b=!a.offsetWidth&&!a.offsetHeight?function(b,c){return c={position:a.style.position||"",visibility:a.style.visibility||"",display:a.style.display||""},b.first().css({position:"absolute",visibility:"hidden",display:"block"}),c}(this):null,c=a.offsetWidth,d=a.offsetHeight;return b&&this.first().css(b),{height:d,width:c}},attr:function(a,b){var c=this[0];if(typeof a=="string"||a instanceof String)return typeof b=="undefined"?c?g.test(a)?n.test(a)&&typeof c[a]=="string"?!0:c[a]:a!="href"&&a!="src"||!A.hrefExtended?c[y](a):c[y](a,2):null:this.each(function(c){g.test(a)?c[a]=U(c,b):c[x](a,U(c,b))});for(var d in a)a.hasOwnProperty(d)&&this.attr(d,a[d]);return this},removeAttr:function(a){return this.each(function(b){n.test(a)?b[a]=!1:b.removeAttribute(a)})},val:function(a){return typeof a=="string"?this.attr("value",a):this.length?this[0].value:null},data:function(a,b){var c=this[0],d,e,f;return typeof b=="undefined"?c?(e=L(c),typeof a=="undefined"?(H(c.attributes,function(a){(f=(""+a.name).match(v))&&(e[J(f[1])]=N(a.value))}),e):(typeof e[a]=="undefined"&&(e[a]=N(this.attr("data-"+K(a)))),e[a])):null:this.each(function(c){L(c)[a]=b})},remove:function(){return this.deepEach(M),this.each(function(a){a[e]&&a[e].removeChild(a)})},empty:function(){return this.each(function(a){I(a.childNodes,M);while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.map(function(a){return a[e].removeChild(a)})},scrollTop:function(a){return X.call(this,null,a,"y")},scrollLeft:function(a){return X.call(this,a,null,"x")}},$.setQueryEngine=function(a){f=a,delete $.setQueryEngine},$.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||V.prototype)[c]=a[c])},$.create=function(a){return typeof a=="string"&&a!==""?function(){var b=/^\s*<([^\s>]+)/.exec(a),d=c.createElement("div"),f=[],g=b?m[b[1].toLowerCase()]:null,h=g?g[2]+1:1,i=g&&g[3],j=e,k=A.autoTbody&&g&&g[0]=="<table>"&&!/<tbody/i.test(a);d.innerHTML=g?g[0]+a+g[1]:a;while(h--)d=d.firstChild;i&&d&&d.nodeType!==1&&(d=d.nextSibling);do(!b||d.nodeType==1)&&(!k||d.tagName.toLowerCase()!="tbody")&&f.push(d);while(d=d.nextSibling);return H(f,function(a){a[j]&&a[j].removeChild(a)}),f}():O(a)?[a.cloneNode(!0)]:[]},$.doc=function(){var a=$.viewport();return{width:Math.max(c.body.scrollWidth,d.scrollWidth,a.width),height:Math.max(c.body.scrollHeight,d.scrollHeight,a.height)}},$.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c<d;c++)b[c].nodeType===1&&(e=b[d=c]);return e},$.viewport=function(){return{width:o?d.clientWidth:self.innerWidth,height:o?d.clientHeight:self.innerHeight}},$.isAncestor="compareDocumentPosition"in d?function(a,b){return(a.compareDocumentPosition(b)&16)==16}:"contains"in d?function(a,b){return a!==b&&a.contains(b)}:function(a,b){while(b=b[e])if(b===a)return!0;return!1},$}),provide("bonzo",a.exports),!function(a){function c(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}function d(a){var b=[],c=0,d=0,e,f,g;for(;f=a[c];++c){g=!1;for(e=0;e<b.length;++e)if(b[e]===f){g=!0;break}g||(b[d++]=f)}return b}function e(a,c){return typeof c=="undefined"?b(this).dim()[a]:this.css(a,c)}var b=require("bonzo");b.setQueryEngine(a),a.ender(b),a.ender(b(),!0),a.ender({create:function(c){return a(b.create(c))}}),a.id=function(b){return a([document.getElementById(b)])},a.ender({parents:function(b,e){if(!this.length)return this;var f=a(b),g,h,i,j=[];for(g=0,h=this.length;g<h;g++){i=this[g];while(i=i.parentNode)if(~c(f,i)){j.push(i);if(e)break}}return a(d(j))},parent:function(){return a(d(b(this).parent()))},closest:function(a){return this.parents(a,!0)},first:function(){return a(this.length?this[0]:this)},last:function(){return a(this.length?this[this.length-1]:[])},next:function(){return a(b(this).next())},previous:function(){return a(b(this).previous())},appendTo:function(a){return b(this.selector).appendTo(a,this)},prependTo:function(a){return b(this.selector).prependTo(a,this)},insertAfter:function(a){return b(this.selector).insertAfter(a,this)},insertBefore:function(a){return b(this.selector).insertBefore(a,this)},siblings:function(){var b,c,d,e=[];for(b=0,c=this.length;b<c;b++){d=this[b];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[b];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return a(e)},children:function(){var c,e,f=[];for(c=0,l=this.length;c<l;c++){if(!(e=b.firstChild(this[c])))continue;f.push(e);while(e=e.nextSibling)e.nodeType==1&&f.push(e)}return a(d(f))},height:function(a){return e.call(this,"height",a)},width:function(a){return e.call(this,"width",a)}},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;
Beispiel #6
0
(function(b,c,d){typeof a!="undefined"&&a.exports?a.exports=c():typeof d["define"]=="function"&&d.define.amd?define(b,c):d[b]=c()})("bonzo",function(){function F(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function G(a,b,c,d){var e,f=0,g=a.length;for(;f<g;f++){e=d?a.length-f-1:f;b.call(c||a[e],a[e],e,a)}return a}function H(a,b,c){for(var d=0,e=a.length;d<e;d++)if(N(a[d])){H(a[d].childNodes,b,c);b.call(c||a[d],a[d],d,a)}return a}function I(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function J(a){return a?a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():a}function K(a){a[x]("data-node-uid")||a[w]("data-node-uid",++s);var b=a[x]("data-node-uid");return r[b]||(r[b]={})}function L(a){var b=a[x]("data-node-uid");b&&delete r[b]}function M(a){var b;try{return a===null||a===undefined?undefined:a==="true"?!0:a==="false"?!1:a==="null"?null:(b=parseFloat(a))==a?b:a}catch(c){}return undefined}function N(a){return a&&a.nodeName&&(a.nodeType==1||a.nodeType==11)}function O(a,b,c){for(var d=0,e=a.length;d<e;++d)if(b.call(c||null,a[d],d,a))return!0;return!1}function P(a){a=="transform"&&(a=z.transform)||/^transform-?[Oo]rigin$/.test(a)&&(a=z.transform+"Origin")||a=="float"&&(a=z.cssFloat);return a?I(a):null}function R(a,b,c,d){var f=0,g=b||this,h=[],i=e&&typeof a=="string"&&a.charAt(0)!="<"?e(a):a;G(V(i),function(a,b){G(g,function(d){c(a,h[f++]=b>0?W(g,d):d)},null,d)},this,d);g.length=f;G(h,function(a){g[--f]=a},null,!d);return g}function S(a,b,c){var d=$(a),e=d.css("position"),f=d.offset(),g="relative",h=e==g,i=[parseInt(d.css("left"),10),parseInt(d.css("top"),10)];if(e=="static"){d.css("position",g);e=g}isNaN(i[0])&&(i[0]=h?0:a.offsetLeft);isNaN(i[1])&&(i[1]=h?0:a.offsetTop);b!=null&&(a.style.left=b-f.left+i[0]+v);c!=null&&(a.style.top=c-f.top+i[1]+v)}function T(a,b){return typeof b=="function"?b(a):b}function U(a){this.length=0;if(a){a=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a];this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]}}function V(a,b,c){var d,e,f;if(typeof a=="string")return $.create(a);N(a)&&(a=[a]);if(c){f=[];for(d=0,e=a.length;d<e;d++)f[d]=W(b,a[d]);return f}return a}function W(a,b){var c=b.cloneNode(!0),d,e;if(a.$&&typeof a.cloneEvents=="function"){a.$(c).cloneEvents(b);d=a.$(c).find("*");e=a.$(b).find("*");for(var f=0;f<e.length;f++)a.$(d[f]).cloneEvents(e[f])}return c}function X(b,c,d){var e=this[0];if(!e)return this;if(b==null&&c==null)return(Y(e)?Z():{x:e.scrollLeft,y:e.scrollTop})[d];if(Y(e))a.scrollTo(b,c);else{b!=null&&(e.scrollLeft=b);c!=null&&(e.scrollTop=c)}return this}function Y(b){return b===a||/^(?:body|html)$/i.test(b.tagName)}function Z(){return{x:a.pageXOffset||c.scrollLeft,y:a.pageYOffset||c.scrollTop}}function $(a){return new U(a)}var a=window,b=a.document,c=b.documentElement,d="parentNode",e=null,f=/^(checked|value|selected|disabled)$/i,g=/^(select|fieldset|table|tbody|tfoot|td|tr|colgroup)$/i,h=["<table>","</table>",1],i=["<table><tbody><tr>","</tr></tbody></table>",3],j=["<select>","</select>",1],k=["_","",0,1],l={thead:h,tbody:h,tfoot:h,colgroup:h,caption:h,tr:["<table><tbody>","</tbody></table>",2],th:i,td:i,col:["<table><colgroup>","</colgroup></table>",2],fieldset:["<form>","</form>",1],legend:["<form><fieldset>","</fieldset></form>",2],option:j,optgroup:j,script:k,style:k,link:k,param:k,base:k},m=/^(checked|selected|disabled)$/,n=/msie/i.test(navigator.userAgent),o,p,q,r={},s=0,t=/^-?[\d\.]+$/,u=/^data-(.+)$/,v="px",w="setAttribute",x="getAttribute",y="getElementsByTagName",z=function(){var a=b.createElement("p");a.innerHTML='<a href="#x">x</a><table style="float:left;"></table>';return{hrefExtended:a[y]("a")[0][x]("href")!="#x",autoTbody:a[y]("tbody").length!==0,computedStyle:b.defaultView&&b.defaultView.getComputedStyle,cssFloat:a[y]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var b=["transform","webkitTransform","MozTransform","OTransform","msTransform"],c;for(c=0;c<b.length;c++)if(b[c]in a.style)return b[c]}(),classList:"classList"in a,opasity:function(){return typeof b.createElement("a").style.opacity!="undefined"}()}}(),A=/(^\s*|\s*$)/g,B=/\s+/,C=String.prototype.toString,D={lineHeight:1,zoom:1,zIndex:1,opacity:1,boxFlex:1,WebkitBoxFlex:1,MozBoxFlex:1},E=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(A,"")},Q=z.computedStyle?function(a,c){var d=null,e=b.defaultView.getComputedStyle(a,"");e&&(d=e[c]);return a.style[c]||d}:n&&c.currentStyle?function(a,b){if(b=="opacity"&&!z.opasity){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[b]};if(z.classList){o=function(a,b){return a.classList.contains(b)};p=function(a,b){a.classList.add(b)};q=function(a,b){a.classList.remove(b)}}else{o=function(a,b){return F(b).test(a.className)};p=function(a,b){a.className=E(a.className+" "+b)};q=function(a,b){a.className=E(a.className.replace(F(b)," "))}}U.prototype={get:function(a){return this[a]||null},each:function(a,b){return G(this,a,b)},deepEach:function(a,b){return H(this,a,b)},map:function(a,b){var c=[],d,e;for(e=0;e<this.length;e++){d=a.call(this,this[e],e);b?b(d)&&c.push(d):c.push(d)}return c},html:function(a,b){var d=b?c.textContent===undefined?"innerText":"textContent":"innerHTML",e=this,f=function(b,c){G(V(a,e,c),function(a){b.appendChild(a)})},h=function(c,e){try{if(b||typeof a=="string"&&!g.test(c.tagName))return c[d]=a}catch(h){}f(c,e)};return typeof a!="undefined"?this.empty().each(h):this[0]?this[0][d]:""},text:function(a){return this.html(a,!0)},append:function(a){var b=this;return this.each(function(c,d){G(V(a,b,d),function(a){c.appendChild(a)})})},prepend:function(a){var b=this;return this.each(function(c,d){var e=c.firstChild;G(V(a,b,d),function(a){c.insertBefore(a,e)})})},appendTo:function(a,b){return R.call(this,a,b,function(a,b){a.appendChild(b)})},prependTo:function(a,b){return R.call(this,a,b,function(a,b){a.insertBefore(b,a.firstChild)},1)},before:function(a){var b=this;return this.each(function(c,e){G(V(a,b,e),function(a){c[d].insertBefore(a,c)})})},after:function(a){var b=this;return this.each(function(c,e){G(V(a,b,e),function(a){c[d].insertBefore(a,c.nextSibling)},null,1)})},insertBefore:function(a,b){return R.call(this,a,b,function(a,b){a[d].insertBefore(b,a)})},insertAfter:function(a,b){return R.call(this,a,b,function(a,b){var c=a.nextSibling;c?a[d].insertBefore(b,c):a[d].appendChild(b)},1)},replaceWith:function(a){$(V(a)).insertAfter(this);return this.remove()},addClass:function(a){a=C.call(a).split(B);return this.each(function(b){G(a,function(a){a&&!o(b,T(b,a))&&p(b,T(b,a))})})},removeClass:function(a){a=C.call(a).split(B);return this.each(function(b){G(a,function(a){a&&o(b,T(b,a))&&q(b,T(b,a))})})},hasClass:function(a){a=C.call(a).split(B);return O(this,function(b){return O(a,function(a){return a&&o(b,a)})})},toggleClass:function(a,b){a=C.call(a).split(B);return this.each(function(c){G(a,function(a){a&&(typeof b!="undefined"?b?p(c,a):q(c,a):o(c,a)?q(c,a):p(c,a))})})},show:function(a){a=typeof a=="string"?a:"";return this.each(function(b){b.style.display=a})},hide:function(){return this.each(function(a){a.style.display="none"})},toggle:function(a,b){b=typeof b=="string"?b:"";typeof a!="function"&&(a=null);return this.each(function(c){c.style.display=c.offsetWidth||c.offsetHeight?"none":b;a&&a.call(c)})},first:function(){return $(this.length?this[0]:[])},last:function(){return $(this.length?this[this.length-1]:[])},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},parent:function(){return this.related(d)},related:function(a){return this.map(function(b){b=b[a];while(b&&b.nodeType!==1)b=b[a];return b||0},function(a){return a})},focus:function(){this.length&&this[0].focus();return this},blur:function(){this.length&&this[0].blur();return this},css:function(c,d){function g(a,b,c){for(var d in f)if(f.hasOwnProperty(d)){c=f[d];(b=P(d))&&t.test(c)&&!(b in D)&&(c+=v);try{a.style[b]=T(a,c)}catch(e){}}}var e,f=c;if(d===undefined&&typeof c=="string"){d=this[0];if(!d)return null;if(d===b||d===a){e=d===b?$.doc():$.viewport();return c=="width"?e.width:c=="height"?e.height:""}return(c=P(c))?Q(d,c):null}if(typeof c=="string"){f={};f[c]=d}if(n&&f.opacity){f.filter="alpha(opacity="+f.opacity*100+")";f.zoom=c.zoom||1;delete f.opacity}return this.each(g)},offset:function(a,c){if(!a||typeof a!="object"||typeof a.top!="number"&&typeof a.left!="number"){if(typeof a=="number"||typeof c=="number")return this.each(function(b){S(b,a,c)});if(!this[0])return{top:0,left:0,height:0,width:0};var d=this[0],e=d.ownerDocument.documentElement,f=d.getBoundingClientRect(),g=Z(),h=d.offsetWidth,i=d.offsetHeight,j=f.top+g.y-Math.max(0,e&&e.clientTop,b.body.clientTop),k=f.left+g.x-Math.max(0,e&&e.clientLeft,b.body.clientLeft);return{top:j,left:k,height:i,width:h}}return this.each(function(b){S(b,a.left,a.top)})},dim:function(){if(!this.length)return{height:0,width:0};var a=this[0],b=a.nodeType==9&&a.documentElement,c=!b&&!!a.style&&!a.offsetWidth&&!a.offsetHeight?function(b){var c={position:a.style.position||"",visibility:a.style.visibility||"",display:a.style.display||""};b.first().css({position:"absolute",visibility:"hidden",display:"block"});return c}(this):null,d=b?Math.max(a.body.scrollWidth,a.body.offsetWidth,b.scrollWidth,b.offsetWidth,b.clientWidth):a.offsetWidth,e=b?Math.max(a.body.scrollHeight,a.body.offsetHeight,b.scrollWidth,b.offsetWidth,b.clientHeight):a.offsetHeight;c&&this.first().css(c);return{height:e,width:d}},attr:function(a,b){var c=this[0];if(typeof a=="string"||a instanceof String)return typeof b=="undefined"?c?f.test(a)?m.test(a)&&typeof c[a]=="string"?!0:c[a]:a!="href"&&a!="src"||!z.hrefExtended?c[x](a):c[x](a,2):null:this.each(function(c){f.test(a)?c[a]=T(c,b):c[w](a,T(c,b))});for(var d in a)a.hasOwnProperty(d)&&this.attr(d,a[d]);return this},removeAttr:function(a){return this.each(function(b){m.test(a)?b[a]=!1:b.removeAttribute(a)})},val:function(a){return typeof a=="string"?this.attr("value",a):this.length?this[0].value:null},data:function(a,b){var c=this[0],d,e;if(typeof b=="undefined"){if(!c)return null;d=K(c);if(typeof a=="undefined"){G(c.attributes,function(a){(e=(""+a.name).match(u))&&(d[I(e[1])]=M(a.value))});return d}typeof d[a]=="undefined"&&(d[a]=M(this.attr("data-"+J(a))));return d[a]}return this.each(function(c){K(c)[a]=b})},remove:function(){this.deepEach(L);return this.detach()},empty:function(){return this.each(function(a){H(a.childNodes,L);while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.each(function(a){a[d]&&a[d].removeChild(a)})},scrollTop:function(a){return X.call(this,null,a,"y")},scrollLeft:function(a){return X.call(this,a,null,"x")}};$.setQueryEngine=function(a){e=a;delete $.setQueryEngine};$.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||U.prototype)[c]=a[c])};$.create=function(a){return typeof a=="string"&&a!==""?function(){var c=/^\s*<([^\s>]+)/.exec(a),e=b.createElement("div"),f=[],g=c?l[c[1].toLowerCase()]:null,h=g?g[2]+1:1,i=g&&g[3],j=d,k=z.autoTbody&&g&&g[0]=="<table>"&&!/<tbody/i.test(a);e.innerHTML=g?g[0]+a+g[1]:a;while(h--)e=e.firstChild;i&&e&&e.nodeType!==1&&(e=e.nextSibling);do(!c||e.nodeType==1)&&(!k||e.tagName.toLowerCase()!="tbody")&&f.push(e);while(e=e.nextSibling);G(f,function(a){a[j]&&a[j].removeChild(a)});return f}():N(a)?[a.cloneNode(!0)]:[]};$.doc=function(){var a=$.viewport();return{width:Math.max(b.body.scrollWidth,c.scrollWidth,a.width),height:Math.max(b.body.scrollHeight,c.scrollHeight,a.height)}};$.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c<d;c++)b[c].nodeType===1&&(e=b[d=c]);return e};$.viewport=function(){return{width:n?c.clientWidth:self.innerWidth,height:n?c.clientHeight:self.innerHeight}};$.isAncestor="compareDocumentPosition"in c?function(a,b){return(a.compareDocumentPosition(b)&16)==16}:"contains"in c?function(a,b){return a!==b&&a.contains(b)}:function(a,b){while(b=b[d])if(b===a)return!0;return!1};return $},this);provide("bonzo",a.exports);(function(a){function c(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}function d(a){var b=[],c=0,d=0,e,f,g;for(;f=a[c];++c){g=!1;for(e=0;e<b.length;++e)if(b[e]===f){g=!0;break}g||(b[d++]=f)}return b}function e(a,c){return typeof c=="undefined"?b(this).dim()[a]:this.css(a,c)}var b=require("bonzo");b.setQueryEngine(a);a.ender(b);a.ender(b(),!0);a.ender({create:function(c){return a(b.create(c))}});a.id=function(b){return a([document.getElementById(b)])};a.ender({parents:function(b,e){if(!this.length)return this;b||(b="*");var f=a(b),g,h,i,j=[];for(g=0,h=this.length;g<h;g++){i=this[g];while(i=i.parentNode)if(~c(f,i)){j.push(i);if(e)break}}return a(d(j))},parent:function(){return a(d(b(this).parent()))},closest:function(a){return this.parents(a,!0)},first:function(){return a(this.length?this[0]:this)},last:function(){return a(this.length?this[this.length-1]:[])},next:function(){return a(b(this).next())},previous:function(){return a(b(this).previous())},appendTo:function(a){return b(this.selector).appendTo(a,this)},prependTo:function(a){return b(this.selector).prependTo(a,this)},insertAfter:function(a){return b(this.selector).insertAfter(a,this)},insertBefore:function(a){return b(this.selector).insertBefore(a,this)},siblings:function(){var b,c,d,e=[];for(b=0,c=this.length;b<c;b++){d=this[b];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[b];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return a(e)},children:function(){var c,e,f,g=[];for(c=0,e=this.length;c<e;c++){if(!(f=b.firstChild(this[c])))continue;g.push(f);while(f=f.nextSibling)f.nodeType==1&&g.push(f)}return a(d(g))},height:function(a){return e.call(this,"height",a)},width:function(a){return e.call(this,"width",a)}},!0)})(ender)})();(function(){var a={exports:{}},b=a.exports;
Beispiel #7
0
(function(t,n,r){typeof e!="undefined"&&e.exports?e.exports=r():typeof define=="function"&&define.amd?define(r):n[t]=r()})("bonzo",this,function(){function D(e){return e&&e.nodeName&&(e.nodeType==1||e.nodeType==11)}function P(e,t,n){var r,i,s;if(typeof e=="string")return et.create(e);D(e)&&(e=[e]);if(n){s=[];for(r=0,i=e.length;r<i;r++)s[r]=Q(t,e[r]);return s}return e}function H(e){return new RegExp("(^|\\s+)"+e+"(\\s+|$)")}function B(e,t,n,r){var i,s=0,o=e.length;for(;s<o;s++)i=r?e.length-s-1:s,t.call(n||e[i],e[i],i,e);return e}function j(e,t,n){for(var r=0,i=e.length;r<i;r++)D(e[r])&&(j(e[r].childNodes,t,n),t.call(n||e[r],e[r],r,e));return e}function F(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function I(e){return e?e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():e}function q(e){e[x]("data-node-uid")||e[S]("data-node-uid",++y);var t=e[x]("data-node-uid");return g[t]||(g[t]={})}function R(e){var t=e[x]("data-node-uid");t&&delete g[t]}function U(e){var t;try{return e===null||e===undefined?undefined:e==="true"?!0:e==="false"?!1:e==="null"?null:(t=parseFloat(e))==e?t:e}catch(n){}return undefined}function z(e,t,n){for(var r=0,i=e.length;r<i;++r)if(t.call(n||null,e[r],r,e))return!0;return!1}function W(e){return e=="transform"&&(e=N.transform)||/^transform-?[Oo]rigin$/.test(e)&&(e=N.transform+"Origin")||e=="float"&&(e=N.cssFloat),e?F(e):null}function X(e,t,n,r){var i=0,s=t||this,o=[],u=O&&typeof e=="string"&&e.charAt(0)!="<"?O(e):e;return B(P(u),function(e,t){B(s,function(r){n(e,o[i++]=t>0?Q(s,r):r)},null,r)},this,r),s.length=i,B(o,function(e){s[--i]=e},null,!r),s}function V(e,t,n){var r=et(e),i=r.css("position"),s=r.offset(),o="relative",u=i==o,a=[parseInt(r.css("left"),10),parseInt(r.css("top"),10)];i=="static"&&(r.css("position",o),i=o),isNaN(a[0])&&(a[0]=u?0:e.offsetLeft),isNaN(a[1])&&(a[1]=u?0:e.offsetTop),t!=null&&(e.style.left=t-s.left+a[0]+E),n!=null&&(e.style.top=n-s.top+a[1]+E)}function $(e,t){return typeof t=="function"?t(e):t}function J(t,n,r){var i=this[0];return i?t==null&&n==null?(G(i)?Y():{x:i.scrollLeft,y:i.scrollTop})[r]:(G(i)?e.scrollTo(t,n):(t!=null&&(i.scrollLeft=t),n!=null&&(i.scrollTop=n)),this):this}function K(e){this.length=0;if(e){e=typeof e!="string"&&!e.nodeType&&typeof e.length!="undefined"?e:[e],this.length=e.length;for(var t=0;t<e.length;t++)this[t]=e[t]}}function Q(e,t){var n=t.cloneNode(!0),r,i,s;if(e.$&&typeof e.cloneEvents=="function"){e.$(n).cloneEvents(t),r=e.$(n).find("*"),i=e.$(t).find("*");for(s=0;s<i.length;s++)e.$(r[s]).cloneEvents(i[s])}return n}function G(t){return t===e||/^(?:body|html)$/i.test(t.tagName)}function Y(){return{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop}}function Z(e){var t=document.createElement("script"),n=e.match(o);return t.src=n[1],t}function et(e){return new K(e)}var e=window,t=e.document,n=t.documentElement,r="parentNode",i=/^(checked|value|selected|disabled)$/i,s=/^(select|fieldset|table|tbody|tfoot|td|tr|colgroup)$/i,o=/\s*<script +src=['"]([^'"]+)['"]>/,u=["<table>","</table>",1],a=["<table><tbody><tr>","</tr></tbody></table>",3],f=["<select>","</select>",1],l=["_","",0,1],c={thead:u,tbody:u,tfoot:u,colgroup:u,caption:u,tr:["<table><tbody>","</tbody></table>",2],th:a,td:a,col:["<table><colgroup>","</colgroup></table>",2],fieldset:["<form>","</form>",1],legend:["<form><fieldset>","</fieldset></form>",2],option:f,optgroup:f,script:l,style:l,link:l,param:l,base:l},h=/^(checked|selected|disabled)$/,p=/msie/i.test(navigator.userAgent),d,v,m,g={},y=0,b=/^-?[\d\.]+$/,w=/^data-(.+)$/,E="px",S="setAttribute",x="getAttribute",T="getElementsByTagName",N=function(){var e=t.createElement("p");return e.innerHTML='<a href="#x">x</a><table style="float:left;"></table>',{hrefExtended:e[T]("a")[0][x]("href")!="#x",autoTbody:e[T]("tbody").length!==0,computedStyle:t.defaultView&&t.defaultView.getComputedStyle,cssFloat:e[T]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var t=["transform","webkitTransform","MozTransform","OTransform","msTransform"],n;for(n=0;n<t.length;n++)if(t[n]in e.style)return t[n]}(),classList:"classList"in e,opasity:function(){return typeof t.createElement("a").style.opacity!="undefined"}()}}(),C=/(^\s*|\s*$)/g,k=/\s+/,L=String.prototype.toString,A={lineHeight:1,zoom:1,zIndex:1,opacity:1,boxFlex:1,WebkitBoxFlex:1,MozBoxFlex:1},O=t.querySelectorAll&&function(e){return t.querySelectorAll(e)},M=String.prototype.trim?function(e){return e.trim()}:function(e){return e.replace(C,"")},_=N.computedStyle?function(e,n){var r=null,i=t.defaultView.getComputedStyle(e,"");return i&&(r=i[n]),e.style[n]||r}:!p||!n.currentStyle?function(e,t){return e.style[t]}:function(e,t){var n,r;if(t=="opacity"&&!N.opasity){n=100;try{n=e.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(i){try{n=e.filters("alpha").opacity}catch(s){}}return n/100}return r=e.currentStyle?e.currentStyle[t]:null,e.style[t]||r};return N.classList?(d=function(e,t){return e.classList.contains(t)},v=function(e,t){e.classList.add(t)},m=function(e,t){e.classList.remove(t)}):(d=function(e,t){return H(t).test(e.className)},v=function(e,t){e.className=M(e.className+" "+t)},m=function(e,t){e.className=M(e.className.replace(H(t)," "))}),K.prototype={get:function(e){return this[e]||null},each:function(e,t){return B(this,e,t)},deepEach:function(e,t){return j(this,e,t)},map:function(e,t){var n=[],r,i;for(i=0;i<this.length;i++)r=e.call(this,this[i],i),t?t(r)&&n.push(r):n.push(r);return n},html:function(e,t){var r=t?n.textContent===undefined?"innerText":"textContent":"innerHTML",i=this,o=function(t,n){B(P(e,i,n),function(e){t.appendChild(e)})},u=function(n,i){try{if(t||typeof e=="string"&&!s.test(n.tagName))return n[r]=e}catch(u){}o(n,i)};return typeof e!="undefined"?this.empty().each(u):this[0]?this[0][r]:""},text:function(e){return this.html(e,!0)},append:function(e){var t=this;return this.each(function(n,r){B(P(e,t,r),function(e){n.appendChild(e)})})},prepend:function(e){var t=this;return this.each(function(n,r){var i=n.firstChild;B(P(e,t,r),function(e){n.insertBefore(e,i)})})},appendTo:function(e,t){return X.call(this,e,t,function(e,t){e.appendChild(t)})},prependTo:function(e,t){return X.call(this,e,t,function(e,t){e.insertBefore(t,e.firstChild)},1)},before:function(e){var t=this;return this.each(function(n,i){B(P(e,t,i),function(e){n[r].insertBefore(e,n)})})},after:function(e){var t=this;return this.each(function(n,i){B(P(e,t,i),function(e){n[r].insertBefore(e,n.nextSibling)},null,1)})},insertBefore:function(e,t){return X.call(this,e,t,function(e,t){e[r].insertBefore(t,e)})},insertAfter:function(e,t){return X.call(this,e,t,function(e,t){var n=e.nextSibling;n?e[r].insertBefore(t,n):e[r].appendChild(t)},1)},replaceWith:function(e){return et(P(e)).insertAfter(this),this.remove()},clone:function(e){var t=[],n,r;for(r=0,n=this.length;r<n;r++)t[r]=Q(e||this,this[r]);return et(t)},addClass:function(e){return e=L.call(e).split(k),this.each(function(t){B(e,function(e){e&&!d(t,$(t,e))&&v(t,$(t,e))})})},removeClass:function(e){return e=L.call(e).split(k),this.each(function(t){B(e,function(e){e&&d(t,$(t,e))&&m(t,$(t,e))})})},hasClass:function(e){return e=L.call(e).split(k),z(this,function(t){return z(e,function(e){return e&&d(t,e)})})},toggleClass:function(e,t){return e=L.call(e).split(k),this.each(function(n){B(e,function(e){e&&(typeof t!="undefined"?t?!d(n,e)&&v(n,e):m(n,e):d(n,e)?m(n,e):v(n,e))})})},show:function(e){return e=typeof e=="string"?e:"",this.each(function(t){t.style.display=e})},hide:function(){return this.each(function(e){e.style.display="none"})},toggle:function(e,t){return t=typeof t=="string"?t:"",typeof e!="function"&&(e=null),this.each(function(n){n.style.display=n.offsetWidth||n.offsetHeight?"none":t,e&&e.call(n)})},first:function(){return et(this.length?this[0]:[])},last:function(){return et(this.length?this[this.length-1]:[])},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},parent:function(){return this.related(r)},related:function(e){return et(this.map(function(t){t=t[e];while(t&&t.nodeType!==1)t=t[e];return t||0},function(e){return e}))},focus:function(){return this.length&&this[0].focus(),this},blur:function(){return this.length&&this[0].blur(),this},css:function(n,r){function o(e,t,n){for(var r in s)if(s.hasOwnProperty(r)){n=s[r],(t=W(r))&&b.test(n)&&!(t in A)&&(n+=E);try{e.style[t]=$(e,n)}catch(i){}}}var i,s=n;return r===undefined&&typeof n=="string"?(r=this[0],r?r===t||r===e?(i=r===t?et.doc():et.viewport(),n=="width"?i.width:n=="height"?i.height:""):(n=W(n))?_(r,n):null:null):(typeof n=="string"&&(s={},s[n]=r),p&&s.opacity&&(s.filter="alpha(opacity="+s.opacity*100+")",s.zoom=n.zoom||1,delete s.opacity),this.each(o))},offset:function(e,n){if(!e||typeof e!="object"||typeof e.top!="number"&&typeof e.left!="number"){if(typeof e=="number"||typeof n=="number")return this.each(function(t){V(t,e,n)});if(!this[0])return{top:0,left:0,height:0,width:0};var r=this[0],i=r.ownerDocument.documentElement,s=r.getBoundingClientRect(),o=Y(),u=r.offsetWidth,a=r.offsetHeight,f=s.top+o.y-Math.max(0,i&&i.clientTop,t.body.clientTop),l=s.left+o.x-Math.max(0,i&&i.clientLeft,t.body.clientLeft);return{top:f,left:l,height:a,width:u}}return this.each(function(t){V(t,e.left,e.top)})},dim:function(){if(!this.length)return{height:0,width:0};var e=this[0],t=e.nodeType==9&&e.documentElement,n=!t&&!!e.style&&!e.offsetWidth&&!e.offsetHeight?function(t){var n={position:e.style.position||"",visibility:e.style.visibility||"",display:e.style.display||""};return t.first().css({position:"absolute",visibility:"hidden",display:"block"}),n}(this):null,r=t?Math.max(e.body.scrollWidth,e.body.offsetWidth,t.scrollWidth,t.offsetWidth,t.clientWidth):e.offsetWidth,i=t?Math.max(e.body.scrollHeight,e.body.offsetHeight,t.scrollHeight,t.offsetHeight,t.clientHeight):e.offsetHeight;return n&&this.first().css(n),{height:i,width:r}},attr:function(e,t){var n=this[0],r;if(typeof e=="string"||e instanceof String)return typeof t=="undefined"?n?i.test(e)?h.test(e)&&typeof n[e]=="string"?!0:n[e]:e!="href"&&e!="src"||!N.hrefExtended?n[x](e):n[x](e,2):null:this.each(function(n){i.test(e)?n[e]=$(n,t):n[S](e,$(n,t))});for(r in e)e.hasOwnProperty(r)&&this.attr(r,e[r]);return this},removeAttr:function(e){return this.each(function(t){h.test(e)?t[e]=!1:t.removeAttribute(e)})},val:function(e){return typeof e=="string"?this.attr("value",e):this.length?this[0].value:null},data:function(e,t){var n=this[0],r,i;return typeof t=="undefined"?n?(r=q(n),typeof e=="undefined"?(B(n.attributes,function(e){(i=(""+e.name).match(w))&&(r[F(i[1])]=U(e.value))}),r):(typeof r[e]=="undefined"&&(r[e]=U(this.attr("data-"+I(e)))),r[e])):null:this.each(function(n){q(n)[e]=t})},remove:function(){return this.deepEach(R),this.detach()},empty:function(){return this.each(function(e){j(e.childNodes,R);while(e.firstChild)e.removeChild(e.firstChild)})},detach:function(){return this.each(function(e){e[r]&&e[r].removeChild(e)})},scrollTop:function(e){return J.call(this,null,e,"y")},scrollLeft:function(e){return J.call(this,e,null,"x")}},et.setQueryEngine=function(e){O=e,delete et.setQueryEngine},et.aug=function(e,t){for(var n in e)e.hasOwnProperty(n)&&((t||K.prototype)[n]=e[n])},et.create=function(e){return typeof e=="string"&&e!==""?function(){if(o.test(e))return[Z(e)];var n=e.match(/^\s*<([^\s>]+)/),i=t.createElement("div"),s=[],u=n?c[n[1].toLowerCase()]:null,a=u?u[2]+1:1,f=u&&u[3],l=r,h=N.autoTbody&&u&&u[0]=="<table>"&&!/<tbody/i.test(e);i.innerHTML=u?u[0]+e+u[1]:e;while(a--)i=i.firstChild;f&&i&&i.nodeType!==1&&(i=i.nextSibling);do(!n||i.nodeType==1)&&(!h||i.tagName&&i.tagName!="TBODY")&&s.push(i);while(i=i.nextSibling);return B(s,function(e){e[l]&&e[l].removeChild(e)}),s}():D(e)?[e.cloneNode(!0)]:[]},et.doc=function(){var e=et.viewport();return{width:Math.max(t.body.scrollWidth,n.scrollWidth,e.width),height:Math.max(t.body.scrollHeight,n.scrollHeight,e.height)}},et.firstChild=function(e){for(var t=e.childNodes,n=0,r=t&&t.length||0,i;n<r;n++)t[n].nodeType===1&&(i=t[r=n]);return i},et.viewport=function(){return{width:p?n.clientWidth:self.innerWidth,height:p?n.clientHeight:self.innerHeight}},et.isAncestor="compareDocumentPosition"in n?function(e,t){return(e.compareDocumentPosition(t)&16)==16}:"contains"in n?function(e,t){return e!==t&&e.contains(t)}:function(e,t){while(t=t[r])if(t===e)return!0;return!1},et}),typeof provide=="function"&&provide("bonzo",e.exports),function(e){function n(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}function r(e){var t=[],n=0,r=0,i,s,o;for(;s=e[n];++n){o=!1;for(i=0;i<t.length;++i)if(t[i]===s){o=!0;break}o||(t[r++]=s)}return t}function i(e,n){return typeof n=="undefined"?t(this).dim()[e]:this.css(e,n)}var t=require("bonzo");t.setQueryEngine(e),e.ender(t),e.ender(t(),!0),e.ender({create:function(n){return e(t.create(n))}}),e.id=function(t){return e([document.getElementById(t)])},e.ender({parents:function(t,i){if(!this.length)return this;t||(t="*");var s=e(t),o,u,a,f=[];for(o=0,u=this.length;o<u;o++){a=this[o];while(a=a.parentNode)if(~n(s,a)){f.push(a);if(i)break}}return e(r(f))},parent:function(){return e(r(t(this).parent()))},closest:function(e){return this.parents(e,!0)},first:function(){return e(this.length?this[0]:this)},last:function(){return e(this.length?this[this.length-1]:[])},next:function(){return e(t(this).next())},previous:function(){return e(t(this).previous())},related:function(n){return e(t(this).related(n))},appendTo:function(e){return t(this.selector).appendTo(e,this)},prependTo:function(e){return t(this.selector).prependTo(e,this)},insertAfter:function(e){return t(this.selector).insertAfter(e,this)},insertBefore:function(e){return t(this.selector).insertBefore(e,this)},clone:function(){return e(t(this).clone(this))},siblings:function(){var t,n,r,i=[];for(t=0,n=this.length;t<n;t++){r=this[t];while(r=r.previousSibling)r.nodeType==1&&i.push(r);r=this[t];while(r=r.nextSibling)r.nodeType==1&&i.push(r)}return e(i)},children:function(){var n,i,s,o=[];for(n=0,i=this.length;n<i;n++){if(!(s=t.firstChild(this[n])))continue;o.push(s);while(s=s.nextSibling)s.nodeType==1&&o.push(s)}return e(r(o))},height:function(e){return i.call(this,"height",e)},width:function(e){return i.call(this,"width",e)}},!0)}(ender)}(),function(){var e={exports:{}},t=e.exports;
Beispiel #8
0
!function(a,b){function u(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function v(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c||a[d],a[d],d,a);return a}function x(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function y(a){return a&&a.nodeName&&a.nodeType==1}function z(a,b,c){for(var d=0,e=a.length;d<e;++d)if(b.call(c,a[d],d,a))return!0;return!1}function B(a,b,c){var d=0,g=b||this,h=[],i=f&&typeof a=="string"&&a.charAt(0)!="<"?function(b){return(b=f(a))&&(b.selected=1)&&b}():a;return v(E(i),function(a){v(g,function(b){var f=!b[e]||b[e]&&!b[e][e]?function(){var a=b.cloneNode(!0);return g.$&&g.cloneEvents&&g.$(a).cloneEvents(b),a}():b;c(a,f),h[d]=f,d++})},this),v(h,function(a,b){g[b]=a}),g.length=d,g}function C(a,b,c){var d=I(a),e=d.css("position"),f=d.offset(),g="relative",h=e==g,i=[parseInt(d.css("left"),10),parseInt(d.css("top"),10)];e=="static"&&(d.css("position",g),e=g),isNaN(i[0])&&(i[0]=h?0:a.offsetLeft),isNaN(i[1])&&(i[1]=h?0:a.offsetTop),b!==null&&(a.style.left=b-f.left+i[0]+p),c!==null&&(a.style.top=c-f.top+i[1]+p)}function D(a){this.length=0;if(a){a=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a],this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]}}function E(a){return typeof a=="string"?I.create(a):y(a)?[a]:a}function F(a,c,d){var e=this[0];return a==null&&c==null?(G(e)?H():{x:e.scrollLeft,y:e.scrollTop})[d]:(G(e)?b.scrollTo(a,c):(a!=null&&(e.scrollLeft=a),c!=null&&(e.scrollTop=c)),this)}function G(a){return a===b||/^(?:body|html)$/i.test(a.tagName)}function H(){return{x:b.pageXOffset||d.scrollLeft,y:b.pageYOffset||d.scrollTop}}function I(a,b){return new D(a,b)}var c=a.document,d=c.documentElement,e="parentNode",f=null,g=/^checked|value|selected$/,h=/select|fieldset|table|tbody|tfoot|td|tr|colgroup/i,i="table",j={thead:i,tbody:i,tfoot:i,tr:"tbody",th:"tr",td:"tr",fieldset:"form",option:"select"},k=/^checked|selected$/,l=/msie/i.test(navigator.userAgent),m=[],n=0,o=/^-?[\d\.]+$/,p="px",q="setAttribute",r="getAttribute",s=/(^\s*|\s*$)/g,t={lineHeight:1,zoom:1,zIndex:1,opacity:1},w=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(s,"")},A=c.defaultView&&c.defaultView.getComputedStyle?function(a,b){var d=null;b=="float"&&(b="cssFloat");var e=c.defaultView.getComputedStyle(a,"");return e&&(d=e[x(b)]),a.style[b]||d}:l&&d.currentStyle?function(a,b){b=x(b),b=b=="float"?"styleFloat":b;if(b=="opacity"){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[x(b)]};D.prototype={get:function(a){return this[a]},each:function(a,b){return v(this,a,b)},map:function(a,b){var c=[],d,e;for(e=0;e<this.length;e++)d=a.call(this,this[e],e),b?b(d)&&c.push(d):c.push(d);return c},first:function(){return I(this[0])},last:function(){return I(this[this.length-1])},html:function(a,b){function f(b){while(b.firstChild)b.removeChild(b.firstChild);v(E(a),function(a){b.appendChild(a)})}var c=b?d.textContent==null?"innerText":"textContent":"innerHTML",e;return typeof a!="undefined"?this.each(function(b){(e=b.tagName.match(h))?f(b,e[0]):b[c]=a}):this[0]?this[0][c]:""},text:function(a){return this.html(a,1)},addClass:function(a){return this.each(function(b){this.hasClass(b,a)||(b.className=w(b.className+" "+a))},this)},removeClass:function(a){return this.each(function(b){this.hasClass(b,a)&&(b.className=w(b.className.replace(u(a)," ")))},this)},hasClass:function(a,b){return typeof b=="undefined"?z(this,function(b){return u(a).test(b.className)}):u(b).test(a.className)},toggleClass:function(a,b){return typeof b!="undefined"&&!b?this:this.each(function(b){this.hasClass(b,a)?b.className=w(b.className.replace(u(a)," ")):b.className=w(b.className+" "+a)},this)},show:function(a){return this.each(function(b){b.style.display=a||""})},hide:function(a){return this.each(function(a){a.style.display="none"})},append:function(a){return this.each(function(b){v(E(a),function(a){b.appendChild(a)})})},prepend:function(a){return this.each(function(b){var c=b.firstChild;v(E(a),function(a){b.insertBefore(a,c)})})},appendTo:function(a,b){return B.call(this,a,b,function(a,b){a.appendChild(b)})},prependTo:function(a,b){return B.call(this,a,b,function(a,b){a.insertBefore(b,a.firstChild)})},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},related:function(a){return this.map(function(b){b=b[a];while(b&&b.nodeType!==1)b=b[a];return b||0},function(a){return a})},before:function(a){return this.each(function(b){v(I.create(a),function(a){b[e].insertBefore(a,b)})})},after:function(a){return this.each(function(b){v(I.create(a),function(a){b[e].insertBefore(a,b.nextSibling)})})},insertBefore:function(a,b){return B.call(this,a,b,function(a,b){a[e].insertBefore(b,a)})},insertAfter:function(a,b){return B.call(this,a,b,function(a,b){var c=a.nextSibling;c?a[e].insertBefore(b,c):a[e].appendChild(b)})},css:function(a,d,e){if(d===undefined&&typeof a=="string")return d=this[0],d?d==c||d==b?(e=d==c?I.doc():I.viewport(),a=="width"?e.width:a=="height"?e.height:""):A(d,a):null;var f=a;typeof a=="string"&&(f={},f[a]=d),l&&f.opacity&&(f.filter="alpha(opacity="+f.opacity*100+")",f.zoom=a.zoom||1,delete f.opacity);if(d=f["float"])l?f.styleFloat=d:f.cssFloat=d,delete f["float"];var g=function(a,b,c){for(var d in f)f.hasOwnProperty(d)&&(c=f[d],(b=x(d))&&o.test(c)&&!(b in t)&&(c+=p),a.style[b]=c)};return this.each(g)},offset:function(a,b){if(typeof a=="number"||typeof b=="number")return this.each(function(c){C(c,a,b)});var c=this[0],d=c.offsetWidth,e=c.offsetHeight,f=c.offsetTop,g=c.offsetLeft;while(c=c.offsetParent)f=f+c.offsetTop,g=g+c.offsetLeft;return{top:f,left:g,height:e,width:d}},attr:function(a,b){var c=this[0];if(typeof a=="string"||a instanceof String)return typeof b=="undefined"?g.test(a)?k.test(a)&&typeof c[a]=="string"?!0:c[a]:c[r](a):this.each(function(c){a=="value"?c.value=b:c[q](a,b)});for(var d in a)a.hasOwnProperty(d)&&this.attr(d,a[d]);return this},val:function(a){return typeof a=="string"?this.attr("value",a):this[0].value},removeAttr:function(a){return this.each(function(b){b.removeAttribute(a)})},data:function(a,b){var c=this[0];if(typeof b=="undefined"){c[r]("data-node-uid")||c[q]("data-node-uid",++n);var d=c[r]("data-node-uid");return m[d]||(m[d]={}),m[d][a]}return this.each(function(c){c[r]("data-node-uid")||c[q]("data-node-uid",++n);var d=c[r]("data-node-uid"),e={};e[a]=b,m[d]=e})},remove:function(){return this.each(function(a){a[e]&&a[e].removeChild(a)})},empty:function(){return this.each(function(a){while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.map(function(a){return a[e].removeChild(a)})},scrollTop:function(a){return F.call(this,null,a,"y")},scrollLeft:function(a){return F.call(this,a,null,"x")}},I.setQueryEngine=function(a){f=a,delete I.setQueryEngine},I.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||D.prototype)[c]=a[c])},I.create=function(a){return typeof a=="string"?function(){var b=/^<([^\s>]+)/.exec(a),d=c.createElement(b&&j[b[1].toLowerCase()]||"div"),e=[];d.innerHTML=a;var f=d.childNodes;d=d.firstChild,e.push(d);while(d=d.nextSibling)d.nodeType==1&&e.push(d);return e}():y(a)?[a.cloneNode(!0)]:[]},I.doc=function(){var a=this.viewport();return{width:Math.max(c.body.scrollWidth,d.scrollWidth,a.width),height:Math.max(c.body.scrollHeight,d.scrollHeight,a.height)}},I.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c<d;c++)b[c].nodeType===1&&(e=b[d=c]);return e},I.viewport=function(){return{width:l?d.clientWidth:self.innerWidth,height:l?d.clientHeight:self.innerHeight}},I.isAncestor="compareDocumentPosition"in d?function(a,b){return(a.compareDocumentPosition(b)&16)==16}:"contains"in d?function(a,b){return a!==b&&a.contains(b)}:function(a,b){while(b=b[e])if(b===a)return!0;return!1};var J=a.bonzo;I.noConflict=function(){return a.bonzo=J,this},a.bonzo=I}(this,window),provide("bonzo",a.exports),!function(a){function c(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}function d(a){var b=[],c,d;e:for(c=0;c<a.length;c++){for(d=0;d<b.length;d++)if(b[d]==a[c])continue e;b[b.length]=a[c]}return b}function e(a,b,c){return a?b.css(c,a):function(a){return a=parseInt(b.css(c),10),isNaN(a)?b[0]["offset"+c.replace(/^\w/,function(a){return a.toUpperCase()})]:a}()}var b=bonzo;b.setQueryEngine(a),a.ender(b),a.ender(b(),!0),a.ender({create:function(c){return a(b.create(c))}}),a.id=function(b){return a([document.getElementById(b)])},a.ender({parents:function(b,e){var f=a(b),g,h,i,j=[];for(g=0,h=this.length;g<h;g++){i=this[g];while(i=i.parentNode)if(c(f,i)!==-1){j.push(i);if(e)break}}return a(d(j))},closest:function(a){return this.parents(a,!0)},first:function(){return a(this[0])},last:function(){return a(this[this.length-1])},next:function(){return a(b(this).next())},previous:function(){return a(b(this).previous())},appendTo:function(a){return b(this.selector).appendTo(a,this)},prependTo:function(a){return b(this.selector).prependTo(a,this)},insertAfter:function(a){return b(this.selector).insertAfter(a,this)},insertBefore:function(a){return b(this.selector).insertBefore(a,this)},siblings:function(){var b,c,d,e=[];for(b=0,c=this.length;b<c;b++){d=this[b];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[b];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return a(e)},children:function(){var c,e,f=[];for(c=0,l=this.length;c<l;c++){if(!(e=b.firstChild(this[c])))continue;f.push(e);while(e=e.nextSibling)e.nodeType==1&&f.push(e)}return a(d(f))},height:function(a){return e(a,this,"height")},width:function(a){return e(a,this,"width")}},!0)}(ender||$)}(),!function(){var a={exports:{}},b=a.exports;
Beispiel #9
0
!function(a){function g(a,b){return f(a,b)}function f(a,b,c){g._select&&(typeof a=="string"||a.nodeName||a.length&&"item"in a||a==window)?(c=g._select(a,b),c.selector=a):c=isFinite(a.length)?a:[a];return e(c,f)}function e(a,b){for(var c in b)c!="noConflict"&&c!="_VERSION"&&(a[c]=b[c]);return a}function d(a,c){return b[a]=c}function c(a){var c=b[a]||window[a];if(!c)throw new Error("Requested module has not been defined.");return c}var b={};a.provide=d,a.require=c,e(g,{_VERSION:"0.2.5",ender:function(a,b){e(b?f:g,a)},fn:a.$&&a.$.fn||{}}),e(f,{forEach:function(a,b,c){for(c=0,l=this.length;c<l;++c)c in this&&a.call(b||this[c],this[c],c,this);return this},$:g});var h=a.$;g.noConflict=function(){a.$=h;return this},typeof module!="undefined"&&module.exports&&(module.exports=g),a.ender=a.$=g}(this),!function(){var a={exports:{}},b=a.exports;!function(a,b){function m(a){l=1;while(a=c.shift())a()}var c=[],d,e,f=!1,g=b.documentElement,h=g.doScroll,i="DOMContentLoaded",j="addEventListener",k="onreadystatechange",l=/^loade|c/.test(b.readyState);b[j]&&b[j](i,e=function(){b.removeEventListener(i,e,f),m()},f),h&&b.attachEvent(k,d=function(){/^c/.test(b.readyState)&&(b.detachEvent(k,d),m())}),a.domReady=h?function(a){self!=top?l?a():c.push(a):function(){try{g.doScroll("left")}catch(b){return setTimeout(function(){domReady(a)},50)}a()}()}:function(a){l?a():c.push(a)}}(this,document),provide("domready",a.exports),!function(a){a.ender({domReady:domReady}),a.ender({ready:function(a){domReady(a);return this}},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;!function(a,b){function _(a,c){var d=typeof c=="string"?_(c)[0]:c||b;if(!d||!a)return[];if(h=Y(a,c,_))return h;return bb(a,d)}function $(a){var b=[],c,d;label:for(c=0;c<a.length;c++){for(d=0;d<b.length;d++)if(b[d]==a[c])continue label;b[b.length]=a[c]}return b}function Z(a){return a&&a.nodeType&&(a.nodeType==1||a.nodeType==9)}function Y(a,c,d){var e=typeof c=="string"?d(c)[0]:c||b;if(a===window||Z(a))return!c||a!==window&&Z(e)&&ba(a,e)?[a]:[];if(a&&typeof a=="object"&&isFinite(a.length))return R(a);if(h=a.match(x))return(m=b.getElementById(h[1]))?[m]:[];if(h=a.match(z))return R(e.getElementsByTagName(h[1]));return!1}function X(a){var c=[],d=[],e,f=0,g,h,i,j,k,l,m,n,o,q,r,s=Q.g(a)||Q.s(a,a.split(F)),t=a.match(E),u;s=s.slice(0);if(!s.length)return c;k=s.pop(),n=s.length&&(i=s[s.length-1].match(x))?b.getElementById(i[1]):b;if(!n)return c;o=T(k),m=t&&/^[+~]$/.test(t[t.length-1])?function(a){while(n=n.nextSibling)n.nodeType==1&&(o[1]?o[1]==n.tagName.toLowerCase():1)&&a.push(n);return a}([]):n.getElementsByTagName(o[1]||"*");for(e=0,h=m.length;e<h;e++)if(q=U.apply(m[e],o))c[f++]=q;if(!s.length)return c;for(f=0,h=c.length,g=0;f<h;f++){j=c[f];for(e=s.length;e--;)while(j=L[t[e]](j,c[f]))if(p=U.apply(j,T(s[e])))break;p&&(d[g++]=c[f])}return d}function W(a,b,c){switch(a){case"=":return b==c;case"^=":return b.match(P.g("^="+c)||P.s("^="+c,new RegExp("^"+V(c))));case"$=":return b.match(P.g("$="+c)||P.s("$="+c,new RegExp(V(c)+"$")));case"*=":return b.match(P.g(c)||P.s(c,new RegExp(V(c))));case"~=":return b.match(P.g("~="+c)||P.s("~="+c,new RegExp("(?:^|\\s+)"+V(c)+"(?:\\s+|$)")));case"|=":return b.match(P.g("|="+c)||P.s("|="+c,new RegExp("^"+V(c)+"(-|$)")))}return 0}function V(a){return O.g(a)||O.s(a,a.replace(G,"\\$1"))}function U(a,b,c,e,f,g,h,j,k,l,m){var n,o,p;if(b&&this.tagName.toLowerCase()!==b)return!1;if(c&&(n=c.match(v))&&n[1]!==this.id)return!1;if(c&&(q=c.match(w)))for(d=q.length;d--;){o=q[d].slice(1);if(!(N.g(o)||N.s(o,new RegExp("(^|\\s+)"+o+"(\\s+|$)"))).test(this.className))return!1}if(k&&_.pseudos[k]&&!_.pseudos[k](this,m))return!1;if(e&&!h){i=this.attributes;for(p in i)if(Object.prototype.hasOwnProperty.call(i,p)&&(i[p].name||p)==f)return this}if(e&&!W(g,this.getAttribute(f)||"",h))return!1;return this}function T(a){return a.match(K)}function S(a){while(a=a.previousSibling)if(a.nodeType==1)break;return a}function R(a){k=[];for(d=0,o=a.length;d<o;d++)k[d]=a[d];return k}function M(){this.c={}}var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u=b.documentElement,v=/#([\w\-]+)/,w=/\.[\w\-]+/g,x=/^#([\w\-]+$)/,y=/^\.([\w\-]+)$/,z=/^([\w\-]+)$/,A=/^([\w]+)?\.([\w\-]+)$/,B=/\s*([\s\+\~>])\s*/g,C=/[\s\>\+\~]/,D=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\])/,E=new RegExp("("+C.source+")"+D.source,"g"),F=new RegExp(C.source+D.source),G=/([.*+?\^=!:${}()|\[\]\/\\])/g,H=/^([a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,I=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,J=/:([\w\-]+)(\(['"]?(\w+)['"]?\))?/,K=new RegExp(H.source+"("+I.source+")?"+"("+J.source+")?"),L={" ":function(a){return a&&a!==u&&a.parentNode},">":function(a,b){return a&&a.parentNode==b.parentNode&&a.parentNode},"~":function(a){return a&&a.previousSibling},"+":function(a,b,c,d){if(!a)return!1;c=S(a),d=S(b);return c&&d&&c==d&&c}};M.prototype={g:function(a){return this.c[a]||undefined},s:function(a,b){this.c[a]=b;return b}};var N=new M,O=new M,P=new M,Q=new M,ba="compareDocumentPosition"in u?function(a,b){return(b.compareDocumentPosition(a)&16)==16}:"contains"in u?function(a,c){c=c==b||c==window?u:c;return c!==a&&c.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0},bb=b.querySelector&&b.querySelectorAll?function(a,c){if(b.getElementsByClassName&&(h=a.match(y)))return R(c.getElementsByClassName(h[1]));return R(c.querySelectorAll(a))}:function(a,c){a=a.replace(B,"$1");var d=[],f,i=[],j;if(h=a.match(A)){s=c.getElementsByTagName(h[1]||"*"),k=N.g(h[2])||N.s(h[2],new RegExp("(^|\\s+)"+h[2]+"(\\s+|$)"));for(j=0,g=s.length,e=0;j<g;j++)k.test(s[j].className)&&(d[e++]=s[j]);return d}for(j=0,s=a.split(","),g=s.length;j<g;j++)i[j]=X(s[j]);for(j=0,g=i.length;j<g&&(f=i[j]);j++){var l=f;if(c!==b){l=[];for(e=0,h=f.length;e<h&&(element=f[e]);e++)ba(element,c)&&l.push(element)}d=d.concat(l)}return $(d)};_.uniq=$,_.pseudos={};var bc=a.qwery;_.noConflict=function(){a.qwery=bc;return this},a.qwery=_}(this,document),provide("qwery",a.exports),!function(a){function e(b,c){var e=/^<([^\s>]+)/.exec(b)[1],f=(c||a).createElement(d[e]||"div"),g=[];f.innerHTML=b;var h=f.childNodes;f=f.firstChild,g.push(f);while(f=f.nextSibling)f.nodeType==1&&g.push(f);return g}var b=qwery.noConflict(),c="table",d={thead:c,tbody:c,tfoot:c,tr:"tbody",th:"tr",td:"tr",fieldset:"form",option:"select"};$._select=function(a,c){return/^\s*</.test(a)?e(a,c):b(a,c)},$.pseudos=b.pseudos,$.ender({find:function(a){var c=[],d,e,f,g,h;for(d=0,e=this.length;d<e;d++){h=b(a,this[d]);for(f=0,g=h.length;f<g;f++)c.push(h[f])}return $(b.uniq(c))},and:function(a){var b=$(a);for(var c=this.length,d=0,e=this.length+b.length;c<e;c++,d++)this[c]=b[d];return this}},!0)}(document)}(),!function(){var a={exports:{}},b=a.exports;!function(b){function G(a){var b=a.relatedTarget;if(!b)return b===null;return b!=this&&b.prefix!="xul"&&!/document/.test(this.toString())&&!q(this,b)}var c=1,d={},e={},f=/over|out/,g=/[^\.]*(?=\..*)\.|.*/,h=/\..*/,i="addEventListener",j="attachEvent",k="removeEventListener",l="detachEvent",m=b.document||{},n=m.documentElement||{},o=n[i],p=o?i:j,q=function(a,b){var c=b.parentNode;while(c!==null){if(c==a)return!0;c=c.parentNode}},r=function(a,b){return a.__uid=b||a.__uid||c++},s=function(a){var b=r(a);return d[b]=d[b]||{}},t=o?function(a,b,c,d){a[d?i:k](b,c,!1)}:function(a,b,c,d,e){e&&d&&(a["_on"+e]=a["_on"+e]||0),a[d?j:l]("on"+b,c)},u=function(a,c,d){return function(e){e=E(e||((this.ownerDocument||this.document||this).parentWindow||b).event);return c.apply(a,[e].concat(d))}},v=function(a,b,c,d,e){return function(f){(d?d.call(this,f):o?!0:f&&f.propertyName=="_on"+c||!f)&&b.apply(a,[f].concat(e))}},w=function(a,b,c,d){var f=b.replace(h,""),i=s(a),j=i[f]||(i[f]={}),k=c,l=r(c,b.replace(g,""));if(j[l])return a;var m=H[f];m&&(c=m.condition?v(a,c,f,m.condition):c,f=m.base||f);var n=F[f];c=n?u(a,c,d):v(a,c,f,!1,d),n=o||n;if(f=="unload"){var q=c;c=function(){x(a,f,c)&&q()}}a[p]&&t(a,n?f:"propertychange",c,!0,!n&&f),j[l]=c,c.__uid=l,c.__originalFn=k;return f=="unload"?a:e[r(a)]=a},x=function(a,b,c){var d,e,f,i,j=s(a),k=b.replace(h,"");if(!j||!j[k])return a;e=b.replace(g,""),f=e?e.split("."):[c.__uid];for(i=f.length;i--;){d=f[i],c=j[k][d],delete j[k][d];if(a[p]){k=H[k]?H[k].base:k;var l=o||F[k];t(a,l?k:"propertychange",c,!1,!l&&k)}}return a},y=function(a,b,c){return function(d){var e=typeof a=="string"?c(a,this):a;for(var f=d.target;f&&f!=this;f=f.parentNode)for(var g=e.length;g--;)if(e[g]==f)return b.apply(f,arguments)}},z=function(a,b,c,d,e){if(typeof b=="object"&&!c)for(var f in b)b.hasOwnProperty(f)&&z(a,f,b[f]);else{var g=typeof c=="string",h=(g?c:b).split(" ");c=g?y(b,d,e):c;for(var i=h.length;i--;)w(a,h[i],c,Array.prototype.slice.call(arguments,g?4:3))}return a},A=function(a,b,c){var d,e,f,i,j=typeof b=="string",k=j&&b.replace(g,""),l=x,m=s(a);if(j&&/\s/.test(b)){b=b.split(" "),i=b.length-1;while(A(a,b[i])&&i--);return a}f=j?b.replace(h,""):b;if(!m||j&&!m[f])return a;if(typeof c=="function")l(a,f,c);else if(k)l(a,b);else{l=f?l:A,e=j&&f,f=f?c||m[f]||f:m;for(d in f)f.hasOwnProperty(d)&&(l(a,e||d,f[d]),delete f[d])}return a},B=function(a,b,c){var d,e,f,i=b.split(" ");for(f=i.length;f--;){b=i[f].replace(h,"");var j=F[b],k=i[f].replace(g,""),l=s(a)[b];if(k){k=k.split(".");for(e=k.length;e--;)l[k[e]]&&l[k[e]].apply(a,c)}else if(!c&&a[p])C(j,b,a);else for(e in l)l.hasOwnProperty(e)&&l[e].apply(a,c)}return a},C=o?function(a,c,d){evt=document.createEvent(a?"HTMLEvents":"UIEvents"),evt[a?"initEvent":"initUIEvent"](c,!0,!0,b,1),d.dispatchEvent(evt)}:function(a,b,c){a?c.fireEvent("on"+b,document.createEventObject()):c["_on"+b]++},D=function(a,b,c){var d=s(b),e,f,g=r(a);e=c?d[c]:d;for(f in e)e.hasOwnProperty(f)&&(c?z:D)(a,c||b,c?e[f].__originalFn:f);return a},E=function(a){var b={};if(!a)return b;var c=a.type,d=a.target||a.srcElement;b.preventDefault=E.preventDefault(a),b.stopPropagation=E.stopPropagation(a),b.target=d&&d.nodeType==3?d.parentNode:d;if(~c.indexOf("key"))b.keyCode=a.which||a.keyCode;else if(/click|mouse|menu/i.test(c)){b.rightClick=a.which==3||a.button==2,b.pos={x:0,y:0};if(a.pageX||a.pageY)b.clientX=a.pageX,b.clientY=a.pageY;else if(a.clientX||a.clientY)b.clientX=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,b.clientY=a.clientY+document.body.scrollTop+document.documentElement.scrollTop;f.test(c)&&(b.relatedTarget=a.relatedTarget||a[(c=="mouseover"?"from":"to")+"Element"])}for(var e in a)e in b||(b[e]=a[e]);return b};E.preventDefault=function(a){return function(){a.preventDefault?a.preventDefault():a.returnValue=!1}},E.stopPropagation=function(a){return function(){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}};var F={click:1,dblclick:1,mouseup:1,mousedown:1,contextmenu:1,mousewheel:1,DOMMouseScroll:1,mouseover:1,mouseout:1,mousemove:1,selectstart:1,selectend:1,keydown:1,keypress:1,keyup:1,orientationchange:1,touchstart:1,touchmove:1,touchend:1,touchcancel:1,gesturestart:1,gesturechange:1,gestureend:1,focus:1,blur:1,change:1,reset:1,select:1,submit:1,load:1,unload:1,beforeunload:1,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1},H={mouseenter:{base:"mouseover",condition:G},mouseleave:{base:"mouseout",condition:G},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}},I={add:z,remove:A,clone:D,fire:B},J=function(a){var b=A(a).__uid;b&&(delete e[b],delete d[b])};b[j]&&z(b,"unload",function(){for(var a in e)e.hasOwnProperty(a)&&J(e[a]);b.CollectGarbage&&CollectGarbage()});var K=b.bean;I.noConflict=function(){b.bean=K;return this},typeof a!="undefined"&&a.exports?a.exports=I:b.bean=I}(this),provide("bean",a.exports),!function(a){var b=require("bean"),c=function(c,d,e){var f=d?[d]:[];return function(){for(var e,g=0,h=this.length;g<h;g++)e=[this[g]].concat(f,Array.prototype.slice.call(arguments,0)),e.length==4&&e.push(a),!arguments.length&&c=="add"&&d&&(c="fire"),b[c].apply(this,e);return this}},d=c("add"),e=c("remove"),f=c("fire"),g={on:d,addListener:d,bind:d,listen:d,delegate:d,unbind:e,unlisten:e,removeListener:e,undelegate:e,emit:f,trigger:f,cloneEvents:c("clone"),hover:function(a,c,d){for(d=this.length;d--;)b.add.call(this,this[d],"mouseenter",a),b.add.call(this,this[d],"mouseleave",c);return this}},h,i=["blur","change","click","dblclick","error","focus","focusin","focusout","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mouseout","mouseover","mouseup","mousemove","resize","scroll","select","submit","unload"];for(h=i.length;h--;)g[i[h]]=c("add",i[h]);a.ender(g,!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;!function(a,b){function J(a,b){return new E(a,b)}function I(){return{x:b.pageXOffset||d.scrollLeft,y:b.pageYOffset||d.scrollTop}}function H(a){return a===b||/^(?:body|html)$/i.test(a.tagName)}function G(a,c,d){var e=this[0];if(a==null&&c==null)return(H(e)?I():{x:e.scrollLeft,y:e.scrollTop})[d];H(e)?b.scrollTo(a,c):(a!=null&&(e.scrollLeft=a),c!=null&&(e.scrollTop=c));return this}function F(a){return typeof a=="string"?J.create(a):z(a)?[a]:a}function E(a){this.length=0;if(a){a=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a],this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]}}function D(a,b,c){var d=J(a),e=d.css("position"),f=d.offset(),g="relative",h=e==g,i=[parseInt(d.css("left"),10),parseInt(d.css("top"),10)];e=="static"&&(d.css("position",g),e=g),isNaN(i[0])&&(i[0]=h?0:a.offsetLeft),isNaN(i[1])&&(i[1]=h?0:a.offsetTop),b!==null&&(a.style.left=b-f.left+i[0]+"px"),c!==null&&(a.style.top=c-f.top+i[1]+"px")}function C(a,b,c){var d=0,g=b||this,h=[],i=f&&typeof a=="string"&&a.charAt(0)!="<"?function(b){return(b=f(a))&&(b.selected=1)&&b}():a;w(F(i),function(a){w(g,function(b){var f=!b[e]||b[e]&&!b[e][e]?function(){var a=b.cloneNode(!0);g.$&&g.cloneEvents&&g.$(a).cloneEvents(b);return a}():b;c(a,f),h[d]=f,d++})},this),w(h,function(a,b){g[b]=a}),g.length=d;return g}function A(a,b,c){for(var d=0,e=a.length;d<e;++d)if(b.call(c,a[d],d,a))return!0;return!1}function z(a){return a&&a.nodeName&&a.nodeType==1}function y(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function w(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c||a[d],a[d],d,a);return a}function v(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}var c=a.document,d=c.documentElement,e="parentNode",f=null,g="getElementsByTagName",h=/^checked|value|selected$/,i=/select|fieldset|table|tbody|tfoot|td|tr|colgroup/i,j="table",k={thead:j,tbody:j,tfoot:j,tr:"tbody",th:"tr",td:"tr",fieldset:"form",option:"select"},l=/^checked|selected$/,m=/msie/i.test(navigator.userAgent),n=[],o=0,p=/^-?[\d\.]+$/,q="px",r="setAttribute",s="getAttribute",t=/(^\s*|\s*$)/g,u={lineHeight:1,zoom:1,zIndex:1,opacity:1},x=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(t,"")},B=c.defaultView&&c.defaultView.getComputedStyle?function(a,b){var d=null;b=="float"&&(b="cssFloat");var e=c.defaultView.getComputedStyle(a,"");e&&(d=e[y(b)]);return a.style[b]||d}:m&&d.currentStyle?function(a,b){b=y(b),b=b=="float"?"styleFloat":b;if(b=="opacity"){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[y(b)]};E.prototype={each:function(a,b){return w(this,a,b)},map:function(a,b){var c=[],d,e;for(e=0;e<this.length;e++)d=a.call(this,this[e]),b?b(d)&&c.push(d):c.push(d);return c},first:function(){return J(this[0])},last:function(){return J(this[this.length-1])},html:function(a,b){function f(b){while(b.firstChild)b.removeChild(b.firstChild);w(F(a),function(a){b.appendChild(a)})}var c=b?d.textContent==null?"innerText":"textContent":"innerHTML",e;return typeof a!="undefined"?this.each(function(b){(e=b.tagName.match(i))?f(b,e[0]):b[c]=a}):this[0]?this[0][c]:""},text:function(a){return this.html(a,1)},addClass:function(a){return this.each(function(b){this.hasClass(b,a)||(b.className=x(b.className+" "+a))},this)},removeClass:function(a){return this.each(function(b){this.hasClass(b,a)&&(b.className=x(b.className.replace(v(a)," ")))},this)},hasClass:function(a,b){return typeof b=="undefined"?A(this,function(b){return v(a).test(b.className)}):v(b).test(a.className)},toggleClass:function(a,b){if(typeof b!="undefined"&&!b)return this;return this.each(function(b){this.hasClass(b,a)?b.className=x(b.className.replace(v(a)," ")):b.className=x(b.className+" "+a)},this)},show:function(a){return this.each(function(b){b.style.display=a||""})},hide:function(a){return this.each(function(a){a.style.display="none"})},append:function(a){return this.each(function(b){w(F(a),function(a){b.appendChild(a)})})},prepend:function(a){return this.each(function(b){var c=b.firstChild;w(F(a),function(a){b.insertBefore(a,c)})})},appendTo:function(a,b){return C.call(this,a,b,function(a,b){a.appendChild(b)})},prependTo:function(a,b){return C.call(this,a,b,function(a,b){a.insertBefore(b,a.firstChild)})},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},related:function(a){return this.map(function(b){b=b[a];while(b&&b.nodeType!==1)b=b[a];return b||0},function(a){return a})},before:function(a){return this.each(function(b){w(J.create(a),function(a){b[e].insertBefore(a,b)})})},after:function(a){return this.each(function(b){w(J.create(a),function(a){b[e].insertBefore(a,b.nextSibling)})})},insertBefore:function(a,b){return C.call(this,a,b,function(a,b){a[e].insertBefore(b,a)})},insertAfter:function(a,b){return C.call(this,a,b,function(a,b){var c=a.nextSibling;c?a[e].insertBefore(b,c):a[e].appendChild(b)})},css:function(a,d,e){if(d===undefined&&typeof a=="string"){d=this[0];if(!d)return null;if(d==c||d==b){e=d==c?J.doc():J.viewport();return a=="width"?e.width:a=="height"?e.height:""}return B(d,a)}var f=a;typeof a=="string"&&(f={},f[a]=d),m&&f.opacity&&(f.filter="alpha(opacity="+f.opacity*100+")",f.zoom=a.zoom||1,delete f.opacity);if(d=f["float"])m?f.styleFloat=d:f.cssFloat=d,delete f["float"];var g=function(a,b,c){for(var d in f)f.hasOwnProperty(d)&&(c=f[d],(b=y(d))&&p.test(c)&&!(b in u)&&(c+=q),a.style[b]=c)};return this.each(g)},offset:function(a,b){if(a||b)return this.each(function(c){D(c,a,b)});var c=this[0],d=c.offsetWidth,e=c.offsetHeight,f=c.offsetTop,g=c.offsetLeft;while(c=c.offsetParent)f=f+c.offsetTop,g=g+c.offsetLeft;return{top:f,left:g,height:e,width:d}},attr:function(a,b){var c=this[0];return typeof b=="undefined"?h.test(a)?l.test(a)&&typeof c[a]=="string"?!0:c[a]:c[s](a):this.each(function(c){a=="value"?c.value=b:c[r](a,b)})},val:function(a){return typeof a=="string"?this.attr("value",a):this[0].value},removeAttr:function(a){return this.each(function(b){b.removeAttribute(a)})},data:function(a,b){var c=this[0];if(typeof b=="undefined"){c[s]("data-node-uid")||c[r]("data-node-uid",++o);var d=c[s]("data-node-uid");n[d]||(n[d]={});return n[d][a]}return this.each(function(c){c[s]("data-node-uid")||c[r]("data-node-uid",++o);var d=c[s]("data-node-uid"),e={};e[a]=b,n[d]=e})},remove:function(){return this.each(function(a){a[e]&&a[e].removeChild(a)})},empty:function(){return this.each(function(a){while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.map(function(a){return a[e].removeChild(a)})},scrollTop:function(a){return G.call(this,null,a,"y")},scrollLeft:function(a){return G.call(this,a,null,"x")}},J.setQueryEngine=function(a){f=a,delete J.setQueryEngine},J.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||E.prototype)[c]=a[c])},J.create=function(a){return typeof a=="string"?function(){var b=/^<([^\s>]+)/.exec(a),d=c.createElement(b&&k[b[1].toLowerCase()]||"div"),e=[];d.innerHTML=a;var f=d.childNodes;d=d.firstChild,e.push(d);while(d=d.nextSibling)d.nodeType==1&&e.push(d);return e}():z(a)?[a.cloneNode(!0)]:[]},J.doc=function(){var a=d.scrollWidth,b=d.scrollHeight,c=this.viewport();return{width:Math.max(a,c.width),height:Math.max(b,c.height)}},J.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c<d;c++)b[c].nodeType===1&&(e=b[d=c]);return e},J.viewport=function(){var a=self.innerHeight,b=self.innerWidth;m&&(a=d.clientHeight,b=d.clientWidth);return{width:b,height:a}},J.isAncestor="compareDocumentPosition"in d?function(a,b){return(a.compareDocumentPosition(b)&16)==16}:"contains"in d?function(a,b){return a!==b&&a.contains(b)}:function(a,b){while(b=b[e])if(b===a)return!0;return!1};var K=a.bonzo;J.noConflict=function(){a.bonzo=K;return this},a.bonzo=J}(this,window),provide("bonzo",a.exports),!function(a){function e(a,b,c){return a?b.css(c,a):function(a){a=parseInt(b.css(c),10);return isNaN(a)?b[0]["offset"+c.replace(/^\w/,function(a){return a.toUpperCase()})]:a}()}function d(a){var b=[],c,d;label:for(c=0;c<a.length;c++){for(d=0;d<b.length;d++)if(b[d]==a[c])continue label;b[b.length]=a[c]}return b}function c(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}var b=bonzo;b.setQueryEngine(a),a.ender(b),a.ender(b(),!0),a.ender({create:function(c){return a(b.create(c))}}),a.id=function(b){return a([document.getElementById(b)])},a.ender({parents:function(b,e){var f=a(b),g,h,i,j=[];for(g=0,h=this.length;g<h;g++){i=this[g];while(i=i.parentNode)if(c(f,i)!==-1){j.push(i);if(e)break}}return a(d(j))},closest:function(a){return this.parents(a,!0)},first:function(){return a(this[0])},last:function(){return a(this[this.length-1])},next:function(){return a(b(this).next())},previous:function(){return a(b(this).previous())},appendTo:function(a){return b(this.selector).appendTo(a,this)},prependTo:function(a){return b(this.selector).prependTo(a,this)},insertAfter:function(a){return b(this.selector).insertAfter(a,this)},insertBefore:function(a){return b(this.selector).insertBefore(a,this)},siblings:function(){var b,c,d,e=[];for(b=0,c=this.length;b<c;b++){d=this[b];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[b];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return a(e)},children:function(){var c,e,f=[];for(c=0,l=this.length;c<l;c++){if(!(e=b.firstChild(this[c])))continue;f.push(e);while(e=e.nextSibling)e.nodeType==1&&f.push(e)}return a(d(f))},height:function(a){return e(a,this,"height")},width:function(a){return e(a,this,"width")}},!0)}(ender||$)}(),!function(){var a={exports:{}},b=a.exports;!function(a){function A(a,b){a=typeof a=="string"?document.getElementById(a):a,b=z(b);var c={duration:b.duration,easing:b.easing,after:b.after};delete b.duration,delete b.easing,delete b.after;if(e&&typeof c.easing!="function")return y(a,b,c);var d=q(b,function(a,b){a=r(a);return p(a)in h&&g.test(b)?[a,b+"px"]:[a,b]});x(a,d,c)}function z(a){var b={};for(var c in a)b[c]=a[c],c=="after"&&delete a[c];return b}function y(a,b,c){var d=[],f=[],i=c.duration||1e3,j=c.easing||"ease-out",k="";i=i+"ms",a.addEventListener(l,function m(){a.setAttribute("style",k),c.after&&c.after(),a.removeEventListener(l,m,!0)},!0),setTimeout(function(){var c;for(c in b)b.hasOwnProperty(c)&&d.push(r(c)+" "+i+" "+j);for(c in b){var f=p(c)in h&&g.test(b[c])?b[c]+"px":b[c];b.hasOwnProperty(c)&&(a.style[p(c)]=f)}k=a.getAttribute("style"),d=d.join(","),a.style[e+"Transition"]=d},10)}function x(a,b,c,d){c=c||{};var e=w(b),f=a.currentStyle?a.currentStyle:getComputedStyle(a,null),g={},h=+(new Date),i,j=c.duration||200,k=h+j,l,m=c.easing||function(a){return-Math.cos(a*Math.PI)/2+.5};for(i in e)g[i]=v(f[i]);l=setInterval(function(){var b=+(new Date),f,i=b>k?1:(b-h)/j;for(f in e)a.style[f]=e[f].f(g[f].v,e[f].v,m(i))+e[f].u;b>k&&(clearInterval(l),c.after&&c.after(),d&&setTimeout(d,1))},10)}function w(a){var c,d={},e=k.length,f;b.innerHTML='<div style="'+a+'"></div>',c=b.childNodes[0].style;while(e--)(f=c[k[e]])&&(d[k[e]]=v(f));return d}function v(a){var b=parseFloat(a),c=a?a.replace(/^[\-\d\.]+/,""):a;return isNaN(b)?{v:c,f:u,u:""}:{v:b,f:s,u:c}}function u(a,b,c){var d=2,e,f,g,h=[],i=[];while((e=3)&&(f=arguments[d-1])&&d--)if(t(f,0)=="r"){f=f.match(/\d+/g);while(e--)h.push(~~f[e])}else{f.length==4&&(f="#"+t(f,1)+t(f,1)+t(f,2)+t(f,2)+t(f,3)+t(f,3));while(e--)h.push(parseInt(t(f,1+e*2,2),16))}while(e--)g=~~(h[e+3]+(h[e]-h[e+3])*c),i.push(g<0?0:g>255?255:g);return"rgb("+i.join(",")+")"}function t(a,b,c){return a.substr(b,c||1)}function s(a,b,c){return(a+(b-a)*c).toFixed(3)}function r(a){if(a.toUpperCase()===a)return a;return a.replace(/([a-zA-Z0-9])([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()}function q(a,b){return o(a,function(a,c){var d=b?b(c,a):[c,a];return d[0]+":"+d[1]+";"}).join("")}function p(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function o(a,b,c){var d=[],e;for(e in a)d.push(b.call(c,a[e],e,a));return d}var b=document.createElement("div"),c=["webkit","Moz","O"],d=3,e,f,g=/\d+$/,h={},i="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color fontWeight lineHeight opacity outlineColor zIndex",j="top bottom left right borderWidth borderBottomWidth borderLeftWidth borderRightWidth borderTopWidth borderSpacing borderRadius marginBottom marginLeft marginRight marginTop width height maxHeight maxWidth minHeight minWidth paddingBottom paddingLeft paddingRight paddingTop fontSize wordSpacing textIndent letterSpacing outlineWidth outlineOffset",k=(i+" "+j).split(" ");while(d--)f=c[d],b.style.cssText="-"+f.toLowerCase()+"-transition-property:opacity;",typeof b.style[f+"TransitionProperty"]!="undefined"&&(e=f);var l=/^w/.test(e)?"webkitTransitionEnd":"transitionend";for(var m=j.split(" "),n=m.length;n--;)h[m[n]]=1;var B=a.emile;A.noConflict=function(){a.emile=B;return this},a.emile=A}(this),provide("emile",a.exports),!function(){function c(a,c,d){var e=b(a,c);for(var f=0,g=this.length;f<g;f++)this[f].currentStyle||(this[f].style.opacity=d?0:1),this[f].currentStyle&&(this[f].style.filter="alpha(opacity="+(d?0:1)*100+")"),this[f].currentStyle&&!this[f].currentStyle.hasLayout&&(this[f].style.zoom=1),this[f].style.display="";return this.animate({opacity:d,duration:e[0],after:e[1]})}var a=emile.noConflict(),b=function(a,b){var c=typeof a=="number"?a:1e3,d=typeof b=="function"?b:typeof a=="function"?a:function(){};return[c,d]};$.ender({animate:function(b){var c=this;setTimeout(function(){for(var d=0,f=c.length;d<f;d++)a(c[d],b)},0);return this},fadeIn:function(a,b){return c.call(this,a,b,1)},fadeOut:function(a,b){return c.call(this,a,b,0)}},!0)}()}(),!function(){var a={exports:{}},b=a.exports;!function(b,c){function k(a,b){function c(){}c[f]=this[f];var d=this,e=new c,h=g(a),i=h?a:this,k=h?{}:a,l=function(){this.initialize?this.initialize.apply(this,arguments):(b||h&&d.apply(this,arguments),i.apply(this,arguments))};l.methods=function(a){j(e,a,d),l[f]=e;return this},l.methods.call(l,k).prototype.constructor=l,l.extend=arguments.callee,l[f].implement=l.statics=function(a,b){a=typeof a=="string"?function(){var c={};c[a]=b;return c}():a,j(this,a,d);return this};return l}function j(a,b,c){for(var e in b)b.hasOwnProperty(e)&&(a[e]=g(b[e])&&g(c[f][e])&&d.test(b[e])?i(e,b[e],c):b[e])}function i(a,b,c){return function(){var d=this.supr;this.supr=c[f][a];var e=b.apply(this,arguments);this.supr=d;return e}}function h(a){return k.call(g(a)?a:e,a,1)}var d=/xyz/.test(function(){xyz})?/\bsupr\b/:/.*/,e=function(){},f="prototype",g=function(a){return typeof a===c};if(typeof a!="undefined"&&a.exports)a.exports=h;else{var l=b.klass;h.noConflict=function(){b.klass=l;return this},b.klass=h}}(this,"function"),provide("klass",a.exports),$.ender({klass:require("klass")})}(),!function(){var a={exports:{}},b=a.exports;!function(b){function j(){if(d)return{msie:1,version:c.match(/msie (\d+(\.\d+)?);/i)[1]};if(e)return{webkit:1,chrome:1,version:c.match(/chrome\/(\d+(\.\d+)?)/i)[1]};if(f)return{webkit:1,safari:1,version:c.match(/version\/(\d+(\.\d+)?)/i)[1]};if(g)return{opera:1,version:c.match(/version\/(\d+(\.\d+)?)/i)[1]};if(i){var a={gecko:1,version:c.match(/firefox\/(\d+(\.\d+)?)/i)[1]};h&&(a.firefox=1);return a}}var c=navigator.userAgent,d=/msie/i.test(c),e=/chrome/i.test(c),f=/safari/i.test(c)&&!e,g=/opera/i.test(c),h=/firefox/i.test(c),i=/gecko\//i.test(c),k=j();k.msie&&k.version>=6||k.chrome&&k.version>=8||k.firefox&&k.version>=3.6||k.safari&&k.version>=5||k.opera&&k.version>=9.5?k.a=!0:k.msie&&k.version<6||k.chrome&&k.version<8||k.firefox&&k.version<3.6||k.safari&&k.version<5||k.opera&&k.version<9.5?k.c=!0:k.x=!0,typeof a!="undefined"&&a.exports?a.exports.browser=k:b.bowser=k}(this),provide("bowser",a.exports),$.ender(a.exports)}(),!function(){var a={exports:{}},b=a.exports;!function(b){function k(a,b){for(var c in b)a[c]=b[c]}var c=function(a,b){return new o(a,b)},d=[],e={},f=d.slice,g="map"in d,h="reduce"in d,i=/(^\s*|\s*$)/g,j={each:g?function(a,b,c){d.forEach.call(a,b,c)}:function(a,b,c){for(var d=0,e=a.length;d<e;d++)d in a&&b.call(c,a[d],d,a)},map:g?function(a,b,c){return d.map.call(a,b,c)}:function(a,b,c){var d=[],e;for(e=0,l=a.length;e<l;e++)e in a&&(d[e]=b.call(c,a[e],e,a));return d},some:g?function(a,b,c){return a.some(b,c)}:function(a,b,c){for(var d=0,e=a.length;d<e;d++)if(d in a&&b.call(c,a[d],d,a))return!0;return!1},every:g?function(a,b,c){return a.every(b,c)}:function(a,b,c){for(var d=0,e=a.length;d<e;d++)if(d in a&&!b.call(c,a[d],d,a))return!1;return!0},filter:g?function(a,b,c){return a.filter(b,c)}:function(a,b,c){var d=[];for(var e=0,f=0,g=a.length;e<g;e++)if(e in a){if(!b.call(c,a[e],e,a))continue;d[f++]=a[e]}return d},indexOf:g?function(a,b,c){return a.indexOf(b,isFinite(c)?c:0)}:function(a,b,c){c=c||0;for(var d=0;d<a.length;d++)if(d in a&&a[d]===b)return d;return-1},lastIndexOf:g?function(a,b,c){return a.lastIndexOf(b,isFinite(c)?c:a.length)}:function(a,b,c){c=c||a.length,c=c>=a.length?a.length:c<0?a.length+c:c;for(var d=c;d>=0;--d)if(d in a&&a[d]===b)return d;return-1},reduce:h?function(a,b,c,e){return d.reduce.call(a,b,c,e)}:function(a,b,c,d){!a&&(a=[]);var e=0,f=a.length;if(arguments.length<3)do{if(e in a){c=a[e++];break}if(++e>=f)throw new TypeError("Empty array")}while(1);for(;e<f;e++)e in a&&(c=b.call(d,c,a[e],e,a));return c},reduceRight:h?function(a,b,c,e){return d.reduceRight.call(a,b,c,e)}:function(a,b,c,d){!a&&(a=[]);var e=a.length,f=e-1;if(arguments.length<3)do{if(f in a){c=a[f--];break}if(--f<0)throw new TypeError("Empty array")}while(1);for(;f>=0;f--)f in a&&(c=b.call(d,c,a[f],f,a));return c},find:function(a,b,c){var d;j.some(a,function(a,e,f){if(b.call(c,a,e,f)){d=a;return!0}});return d},reject:function(a,b,c){var d=[];for(var e=0,f=0,g=a.length;e<g;e++)if(e in a){if(b.call(c,a[e],e,a))continue;d[f++]=a[e]}return d},size:function(a){return n.toArray(a).length},pluck:function(a,b){return j.map(a,function(a){return a[b]})},compact:function(a){return j.filter(a,function(a){return!!a})},flatten:function(a){return j.reduce(a,function(a,b){if(m.arr(b))return a.concat(j.flatten(b));a[a.length]=b;return a},[])},uniq:function(a){var b=[],c,d;label:for(c=0;c<a.length;c++){for(d=0;d<b.length;d++)if(b[d]==a[c])continue label;b[b.length]=a[c]}return b},merge:function(a,b){var c=a.length,d=0,e;if(isFinite(b.length))for(e=b.length;d<e;d++)a[c++]=b[d];else while(b[d]!==undefined)first[c++]=second[d++];a.length=c;return a}},m={fun:function(a){return typeof a=="function"},str:function(a){return typeof a=="string"},ele:function(a){!!a&&!!a.nodeType&&a.nodeType==1},arr:function(a){return a instanceof Array},arrLike:function(a){return a&&a.length&&isFinite(a.length)},num:function(a){return typeof a=="number"},bool:function(a){return a===!0||a===!1},args:function(a){return!!a&&!!e.hasOwnProperty.call(a,"callee")},emp:function(a){var b=0;return m.arr(a)?a.length===0:m.obj(a)?function(){for(var c in a){b++;break}return b===0}():a===""},dat:function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)},reg:function(a){return!(!(a&&a.test&&a.exec)||!a.ignoreCase&&a.ignoreCase!==!1)},nan:function(a){return a!==a},nil:function(a){return a===null},und:function(a){return typeof a=="undefined"},obj:function(a){return a instanceof Object&&!m.fun(a)&&!m.arr(a)}},n={each:function(a,b,c){m.arrLike(a)?j.each(a,b,c):function(){for(var d in a)e.hasOwnProperty.call(a,d)&&b.call(c,d,a[d],a)}()},map:function(a,b,c){var d=[],f=0;return m.arrLike(a)?j.map(a,b,c):!function(){for(var g in a)e.hasOwnProperty.call(a,g)&&(d[f++]=b.call(c,g,a[g],a))}()&&d},toArray:function(a){if(!a)return[];if(a.toArray)return a.toArray();if(m.arr(a))return a;if(m.args(a))return f.call(a);return j.map(a,function(a){return a})},first:function(a){return a[0]},last:function(a){return a[a.length-1]},keys:Object.keys?function(a){return Object.keys(a)}:function(a){var b=[];for(var c in a)e.hasOwnProperty.call(a,c)&&(b[b.length]=c);return b},values:function(a){return n.map(a,function(a,b){return b})},extend:function(a){n.each(f.call(arguments,1),function(b){for(var c in b)!m.und(b[c])&&(a[c]=b[c])});return a},trim:String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(i,"")},bind:function(a,b){return function(){b.apply(a,arguments)}}};k(c,j),k(c,n),c.is=m,c.v=c;var o=function(a,b){this.val=a,this._scope=b||null,this._chained=0};c.each(c.extend({},j,n),function(a,b){o.prototype[a]=function(){var a=c.toArray(arguments);a.unshift(this.val);var d=b.apply(this._scope,a);this.val=d;return this._chained?this:d}}),o.prototype.chain=function(){this._chained=1;return this},o.prototype.value=function(){return this.val};var p=b.v;c.noConflict=function(){b.v=p;return this},typeof a!="undefined"&&a.exports?a.exports=c:b.v=c}(this),provide("valentine",a.exports);var c=require("valentine");ender.ender(c),ender.ender({merge:c.merge,extend:c.extend,each:c.each,map:c.map,toArray:c.toArray,keys:c.keys,values:c.values,trim:c.trim,bind:c.bind})}(),!function(){var module={exports:{}},exports=module.exports;!function(window){function serial(a){var b=a.name;if(a.disabled||!b)return"";b=enc(b);switch(a.tagName.toLowerCase()){case"input":switch(a.type){case"reset":case"button":case"image":case"file":return"";case"checkbox":case"radio":return a.checked?b+"="+(a.value?enc(a.value):!0)+"&":"";default:return b+"="+(a.value?enc(a.value):"")+"&"}break;case"textarea":return b+"="+enc(a.value)+"&";case"select":return b+"="+enc(a.options[a.selectedIndex].value)+"&"}return""}function enc(a){return encodeURIComponent(a)}function reqwest(a,b){return new Reqwest(a,b)}function init(o,fn){function error(a){o.error&&o.error(a),complete(a)}function success(resp){o.timeout&&clearTimeout(self.timeout)&&(self.timeout=null);var r=resp.responseText,JSON;switch(type){case"json":resp=JSON?JSON.parse(r):eval("("+r+")");break;case"js":resp=eval(r);break;case"html":resp=r}fn(resp),o.success&&o.success(resp),complete(resp)}function complete(a){o.complete&&o.complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort(),error()},o.timeout)),this.request=getRequest(o,success,error)}function setType(a){if(/\.json$/.test(a))return"json";if(/\.jsonp$/.test(a))return"jsonp";if(/\.js$/.test(a))return"js";if(/\.html?$/.test(a))return"html";if(/\.xml$/.test(a))return"xml";return"js"}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function getRequest(a,b,c){if(a.type!="jsonp"){var f=xhr();f.open(a.method||"GET",typeof a=="string"?a:a.url,!0),setHeaders(f,a),f.onreadystatechange=readyState(f,b,c),a.before&&a.before(f),f.send(a.data||null);return f}var d=doc.createElement("script");window[getCallbackName(a)]=generalCallback,d.type="text/javascript",d.src=a.url,d.async=!0;var e=function(){a.success&&a.success(lastValue),lastValue=undefined,head.removeChild(d)};d.onload=e,d.onreadystatechange=function(){/^loaded|complete$/.test(d.readyState)&&e()},head.appendChild(d)}function generalCallback(a){lastValue=a}function getCallbackName(a){var b=a.jsonpCallback||"callback";if(a.url.slice(-(b.length+2))==b+"=?"){var c="reqwest_"+uniqid++;a.url=a.url.substr(0,a.url.length-1)+c;return c}var d=new RegExp(b+"=([\\w]+)");return a.url.match(d)[1]}function setHeaders(a,b){var c=b.headers||{};c.Accept=c.Accept||"text/javascript, text/html, application/xml, text/xml, */*",c["X-Requested-With"]=c["X-Requested-With"]||"XMLHttpRequest";if(b.data){c["Content-type"]=c["Content-type"]||"application/x-www-form-urlencoded";for(var d in c)c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d],!1)}}function readyState(a,b,c){return function(){a&&a.readyState==4&&(twoHundo.test(a.status)?b(a):c(a))}}var twoHundo=/^20\d$/,doc=document,byTag="getElementsByTagName",head=doc[byTag]("head")[0],xhr="XMLHttpRequest"in window?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")},uniqid=0,lastValue;Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}},reqwest.serialize=function(a){var b=a[byTag]("input"),c=a[byTag]("select"),d=a[byTag]("textarea");return(v(b).chain().toArray().map(serial).value().join("")+v(c).chain().toArray().map(serial).value().join("")+v(d).chain().toArray().map(serial).value().join("")).replace(/&$/,"")},reqwest.serializeArray=function(a){for(var b=this.serialize(a).split("&"),c=0,d=b.length,e=[],f;c<d;c++)b[c]&&(f=b[c].split("="))&&e.push({name:f[0],value:f[1]});return e};var old=window.reqwest;reqwest.noConflict=function(){window.reqwest=old;return this},window.reqwest=reqwest}(this),provide("reqwest",module.exports),ender.ender({ajax:reqwest}),ender.ender({serialize:function(){return reqwest.serialize(this[0])},serializeArray:function(){return reqwest.serializeArray(this[0])}},!0)}()
Beispiel #10
0
!function(a){function h(a,b){return g(a,b)}function g(a,b,c){typeof a=="string"||a.nodeName||a.length&&"item"in a||a==window?(c=h._select(a,b),c.selector=a):c=isFinite(a.length)?a:[a];return f(c,g)}function f(a,b){for(var c in b)c!="noConflict"&&c!="_VERSION"&&(a[c]=b[c]);return a}function e(a,c){return b[a]=c}function d(a){var c=b[a]||window[a];if(!c)throw new Error("Requested module '"+a+"' has not been defined.");return c}a.global=a;var b={},c=a.$;a.provide=e,a.require=d,f(h,{_VERSION:"0.3.6",fn:g,ender:function(a,b){f(b?g:h,a)},_select:function(a,b){return(b||document).querySelectorAll(a)}}),f(g,{forEach:function(a,b,c){for(c=0,l=this.length;c<l;++c)c in this&&a.call(b||this[c],this[c],c,this);return this},$:h}),h.noConflict=function(){a.$=c;return this},typeof module!="undefined"&&module.exports&&(module.exports=h),a.ender=a.$=a.ender||h}(this),!function(){var a={exports:{}},b=a.exports;!function(b,c){typeof a!="undefined"?a.exports=c():typeof define=="function"&&typeof define.amd=="object"?define(c):this[b]=c()}("bean",function(){function F(a){var b=a.relatedTarget;return b?b!=this&&b.prefix!="xul"&&!/document/.test(this.toString())&&!p(this,b):b===null}var a=window,b=1,c={},d={},e=/over|out/,f=/[^\.]*(?=\..*)\.|.*/,g=/\..*/,h="addEventListener",i="attachEvent",j="removeEventListener",k="detachEvent",l=document||{},m=l.documentElement||{},n=m[h],o=n?h:i,p=function(a,b){var c=b.parentNode;while(c!==null){if(c==a)return!0;c=c.parentNode}},q=function(a,c){return a.__uid=c&&c+"::"+b++||a.__uid||b++},r=function(a){var b=q(a);return c[b]=c[b]||{}},s=n?function(a,b,c,d){a[d?h:j](b,c,!1)}:function(a,b,c,d,e){e&&d&&a["_on"+e]===null&&(a["_on"+e]=0),a[d?i:k]("on"+b,c)},t=function(b,c,d){return function(e){e=D(e||((this.ownerDocument||this.document||this).parentWindow||a).event);return c.apply(b,[e].concat(d))}},u=function(b,c,d,e,f){return function(g){if(e?e.apply(this,arguments):n?!0:g&&g.propertyName=="_on"+d||!g)g=g?D(g||((this.ownerDocument||this.document||this).parentWindow||a).event):null,c.apply(b,Array.prototype.slice.call(arguments,g?0:1).concat(f))}},v=function(a,b,c,e){var h=b.replace(g,""),i=r(a),j=i[h]||(i[h]={}),k=c,l=q(c,b.replace(f,""));if(j[l])return a;var m=G[h];m&&(c=m.condition?u(a,c,h,m.condition):c,h=m.base||h);var p=E[h];c=p?t(a,c,e):u(a,c,h,!1,e),p=n||p;if(h=="unload"){var v=c;c=function(){w(a,h,c)&&v()}}a[o]&&s(a,p?h:"propertychange",c,!0,!p&&h),j[l]=c,c.__uid=l,c.__originalFn=k;return h=="unload"?a:d[q(a)]=a},w=function(a,b,c){function l(b){c=j[k][b];if(!!c){delete j[k][b];if(a[o]){k=G[k]?G[k].base:k;var d=n||E[k];s(a,d?k:"propertychange",c,!1,!d&&k)}}}var d,e,h,i,j=r(a),k=b.replace(g,"");if(!j||!j[k])return a;e=b.replace(f,""),h=e?e.split("."):[c.__uid],l(e);for(i=h.length;i--;l(h[i]));return a},x=function(a,b,c){return function(d){var e=typeof a=="string"?c(a,this):a;for(var f=d.target;f&&f!=this;f=f.parentNode)for(var g=e.length;g--;)if(e[g]==f)return b.apply(f,arguments)}},y=function(a,b,c,d,e){if(typeof b=="object"&&!c)for(var f in b)b.hasOwnProperty(f)&&y(a,f,b[f]);else{var g=typeof c=="string",h=(g?c:b).split(" ");c=g?x(b,d,e):c;for(var i=h.length;i--;)v(a,h[i],c,Array.prototype.slice.call(arguments,g?4:3))}return a},z=function(a,b,c){var d,e,h,i,j,k=typeof b=="string",l=k&&b.replace(f,""),m=w,n=r(a);l=l&&l.split(".");if(k&&/\s/.test(b)){b=b.split(" "),j=b.length-1;while(z(a,b[j])&&j--);return a}i=k?b.replace(g,""):b;if(!n||l||k&&!n[i]){for(d in n)if(n.hasOwnProperty(d))for(j in n[d])for(e=l.length;e--;)n[d].hasOwnProperty(j)&&(new RegExp("^"+l[e]+"::\\d*(\\..*)?$")).test(j)&&m(a,[d,j].join("."));return a}if(typeof c=="function")m(a,i,c);else if(l)m(a,b);else{m=i?m:z,h=k&&i,i=i?c||n[i]||i:n;for(d in i)i.hasOwnProperty(d)&&(m(a,h||d,i[d]),delete i[d])}return a},A=function(a,b,c){var d,e,h,i,j=b.split(" ");for(h=j.length;h--;){b=j[h].replace(g,"");var k=E[b],l=j[h].replace(f,""),m=r(a)[b];if(l){l=l.split(".");for(e=l.length;e--;)for(i in m)m.hasOwnProperty(i)&&(new RegExp("^"+l[e]+"::\\d*(\\..*)?$")).test(i)&&m[i].apply(a,[!1].concat(c))}else if(!c&&a[o])B(k,b,a);else for(e in m)m.hasOwnProperty(e)&&m[e].apply(a,[!1].concat(c))}return a},B=n?function(b,c,d){evt=document.createEvent(b?"HTMLEvents":"UIEvents"),evt[b?"initEvent":"initUIEvent"](c,!0,!0,a,1),d.dispatchEvent(evt)}:function(a,b,c){a?c.fireEvent("on"+b,document.createEventObject()):c["_on"+b]++},C=function(a,b,c){var d=r(b),e,f,g=q(a);e=c?d[c]:d;for(f in e)e.hasOwnProperty(f)&&(c?y:C)(a,c||b,c?e[f].__originalFn:f);return a},D=function(a){var b={};if(!a)return b;var c=a.type,d=a.target||a.srcElement;b.preventDefault=D.preventDefault(a),b.stopPropagation=D.stopPropagation(a),b.target=d&&d.nodeType==3?d.parentNode:d;if(~c.indexOf("key"))b.keyCode=a.which||a.keyCode;else if(/click|mouse|menu/i.test(c)){b.rightClick=a.which==3||a.button==2,b.pos={x:0,y:0};if(a.pageX||a.pageY)b.clientX=a.pageX,b.clientY=a.pageY;else if(a.clientX||a.clientY)b.clientX=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,b.clientY=a.clientY+document.body.scrollTop+document.documentElement.scrollTop;e.test(c)&&(b.relatedTarget=a.relatedTarget||a[(c=="mouseover"?"from":"to")+"Element"])}for(var f in a)f in b||(b[f]=a[f]);return b};D.preventDefault=function(a){return function(){a.preventDefault?a.preventDefault():a.returnValue=!1}},D.stopPropagation=function(a){return function(){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}};var E={click:1,dblclick:1,mouseup:1,mousedown:1,contextmenu:1,mousewheel:1,DOMMouseScroll:1,mouseover:1,mouseout:1,mousemove:1,selectstart:1,selectend:1,keydown:1,keypress:1,keyup:1,orientationchange:1,touchstart:1,touchmove:1,touchend:1,touchcancel:1,gesturestart:1,gesturechange:1,gestureend:1,focus:1,blur:1,change:1,reset:1,select:1,submit:1,load:1,unload:1,beforeunload:1,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1},G={mouseenter:{base:"mouseover",condition:F},mouseleave:{base:"mouseout",condition:F},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}},H={add:y,remove:z,clone:C,fire:A},I=function(a){var b=z(a).__uid;b&&(delete d[b],delete c[b])};a[i]&&y(a,"unload",function(){for(var b in d)d.hasOwnProperty(b)&&I(d[b]);a.CollectGarbage&&CollectGarbage()}),H.noConflict=function(){context.bean=old;return this};return H}),provide("bean",a.exports),!function(a){var b=require("bean"),c=function(c,d,e){var f=d?[d]:[];return function(){for(var e,g=0,h=this.length;g<h;g++)e=[this[g]].concat(f,Array.prototype.slice.call(arguments,0)),e.length==4&&e.push(a),!arguments.length&&c=="add"&&d&&(c="fire"),b[c].apply(this,e);return this}},d=c("add"),e=c("remove"),f=c("fire"),g={on:d,addListener:d,bind:d,listen:d,delegate:d,unbind:e,unlisten:e,removeListener:e,undelegate:e,emit:f,trigger:f,cloneEvents:c("clone"),hover:function(a,c,d){for(d=this.length;d--;)b.add.call(this,this[d],"mouseenter",a),b.add.call(this,this[d],"mouseleave",c);return this}},h,i=["blur","change","click","dblclick","error","focus","focusin","focusout","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mouseout","mouseover","mouseup","mousemove","resize","scroll","select","submit","unload"];for(h=i.length;h--;)g[i[h]]=c("add",i[h]);a.ender(g,!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;!function(b,c){typeof a!="undefined"?a.exports=c():typeof define=="function"&&define.amd?define(b,c):this[b]=c()}("bonzo",function(){function Z(a,b){return new U(a,b)}function Y(){return{x:c.pageXOffset||e.scrollLeft,y:c.pageYOffset||e.scrollTop}}function X(a){return a===c||/^(?:body|html)$/i.test(a.tagName)}function W(a,b,d){var e=this[0];if(a==null&&b==null)return(X(e)?Y():{x:e.scrollLeft,y:e.scrollTop})[d];X(e)?c.scrollTo(a,b):(a!=null&&(e.scrollLeft=a),b!=null&&(e.scrollTop=b));return this}function V(a){return typeof a=="string"?Z.create(a):K(a)?[a]:a}function U(a){this.length=0;if(a){a=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a],this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]}}function T(a,b){return typeof b=="function"?b(a):b}function S(a,b){a.className=B(a.className.replace(C(b)," "))}function R(a,b){a.className=B(a.className+" "+b)}function Q(a,b){return C(b).test(a.className)}function P(a,b,c){var d=Z(a),e=d.css("position"),f=d.offset(),g="relative",h=e==g,i=[parseInt(d.css("left"),10),parseInt(d.css("top"),10)];e=="static"&&(d.css("position",g),e=g),isNaN(i[0])&&(i[0]=h?0:a.offsetLeft),isNaN(i[1])&&(i[1]=h?0:a.offsetTop),b!=null&&(a.style.left=b-f.left+i[0]+u),c!=null&&(a.style.top=c-f.top+i[1]+u)}function O(a,b,c){var d=0,e=b||this,h=[],i=g&&typeof a=="string"&&a.charAt(0)!="<"?g(a):a;D(V(i),function(a){D(e,function(b){var g=!b[f]||b[f]&&!b[f][f]?function(){var a=b.cloneNode(!0);e.$&&e.cloneEvents&&e.$(a).cloneEvents(b);return a}():b;c(a,g),h[d]=g,d++})},this),D(h,function(a,b){e[b]=a}),e.length=d;return e}function M(a){a=="transform"&&(a=y.transform)||/^transform-?[Oo]rigin$/.test(a)&&(a=y.transform+"Origin")||a=="float"&&(a=y.cssFloat);return a?F(a):null}function L(a,b,c,d){for(d=0,j=a.length;d<j;++d)if(b.call(c,a[d],d,a))return!0;return!1}function K(a){return a&&a.nodeName&&a.nodeType==1}function J(a){try{return a==="true"?!0:a==="false"?!1:a==="null"?null:isNaN(a)?a:parseFloat(a)}catch(b){}return undefined}function I(a){uid=a[w]("data-node-uid"),uid&&delete q[uid]}function H(a){a[w]("data-node-uid")||a[v]("data-node-uid",++r),uid=a[w]("data-node-uid");return q[uid]||(q[uid]={})}function G(a){return a?a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():a}function F(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function E(a,b,c){for(var d=0,e=a.length;d<e;d++)K(a[d])&&(E(a[d].childNodes,b,c),b.call(c||a[d],a[d],d,a));return a}function D(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c||a[d],a[d],d,a);return a}function C(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}var a=this,b=a.bonzo,c=window,d=c.document,e=d.documentElement,f="parentNode",g=null,h=/^checked|value|selected$/,i=/select|fieldset|table|tbody|tfoot|td|tr|colgroup/i,k=["<table>","</table>",1],l=["<table><tbody><tr>","</tr></tbody></table>",3],m=["<select>","</select>",1],n={thead:k,tbody:k,tfoot:k,colgroup:k,caption:k,tr:["<table><tbody>","</tbody></table>",2],th:l,td:l,col:["<table><colgroup>","</colgroup></table>",2],fieldset:["<form>","</form>",1],legend:["<form><fieldset>","</fieldset></form>",2],option:m,optgroup:m},o=/^checked|selected$/,p=/msie/i.test(navigator.userAgent),q={},r=0,s=/^-?[\d\.]+$/,t=/^data-(.+)$/,u="px",v="setAttribute",w="getAttribute",x="getElementsByTagName",y=function(){var a=d.createElement("p");a.innerHTML='<a href="#x">x</a><table style="float:left;"></table>';return{hrefExtended:a[x]("a")[0][w]("href")!="#x",autoTbody:a[x]("tbody").length!==0,computedStyle:d.defaultView&&d.defaultView.getComputedStyle,cssFloat:a[x]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var b=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],c;for(c=0;c<b.length;c++)if(b[c]in a.style)return b[c]}()}}(),z=/(^\s*|\s*$)/g,A={lineHeight:1,zoom:1,zIndex:1,opacity:1},B=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(z,"")},N=y.computedStyle?function(a,b){var c=null,e=d.defaultView.getComputedStyle(a,"");e&&(c=e[b]);return a.style[b]||c}:p&&e.currentStyle?function(a,b){if(b=="opacity"){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[b]};U.prototype={get:function(a){return this[a]},each:function(a,b){return D(this,a,b)},deepEach:function(a,b){return E(this,a,b)},map:function(a,b){var c=[],d,e;for(e=0;e<this.length;e++)d=a.call(this,this[e],e),b?b(d)&&c.push(d):c.push(d);return c},first:function(){return Z(this.length?this[0]:[])},last:function(){return Z(this.length?this[this.length-1]:[])},html:function(a,b){function f(b){D(V(a),function(a){b.appendChild(a)})}var c=b?e.textContent===undefined?"innerText":"textContent":"innerHTML",d;return typeof a!="undefined"?this.empty().each(function(e){!b&&(d=e.tagName.match(i))?f(e,d[0]):e[c]=a}):this[0]?this[0][c]:""},text:function(a){return this.html(a,1)},addClass:function(a){return this.each(function(b){Q(b,T(b,a))||R(b,T(b,a))})},removeClass:function(a){return this.each(function(b){Q(b,T(b,a))&&S(b,T(b,a))})},hasClass:function(a){return L(this,function(b){return Q(b,a)})},toggleClass:function(a,b){return this.each(function(c){typeof b!="undefined"?b?R(c,a):S(c,a):Q(c,a)?S(c,a):R(c,a)})},show:function(a){return this.each(function(b){b.style.display=a||""})},hide:function(){return this.each(function(a){a.style.display="none"})},append:function(a){return this.each(function(b){D(V(a),function(a){b.appendChild(a)})})},prepend:function(a){return this.each(function(b){var c=b.firstChild;D(V(a),function(a){b.insertBefore(a,c)})})},appendTo:function(a,b){return O.call(this,a,b,function(a,b){a.appendChild(b)})},prependTo:function(a,b){return O.call(this,a,b,function(a,b){a.insertBefore(b,a.firstChild)})},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},related:function(a){return this.map(function(b){b=b[a];while(b&&b.nodeType!==1)b=b[a];return b||0},function(a){return a})},before:function(a){return this.each(function(b){D(Z.create(a),function(a){b[f].insertBefore(a,b)})})},after:function(a){return this.each(function(b){D(Z.create(a),function(a){b[f].insertBefore(a,b.nextSibling)})})},insertBefore:function(a,b){return O.call(this,a,b,function(a,b){a[f].insertBefore(b,a)})},insertAfter:function(a,b){return O.call(this,a,b,function(a,b){var c=a.nextSibling;c?a[f].insertBefore(b,c):a[f].appendChild(b)})},replaceWith:function(a){this.deepEach(I);return this.each(function(b){b.parentNode.replaceChild(Z.create(a)[0],b)})},css:function(a,b,e){function g(a,b,c){for(var d in f)f.hasOwnProperty(d)&&(c=f[d],(b=M(d))&&s.test(c)&&!(b in A)&&(c+=u),a.style[b]=T(a,c))}if(b===undefined&&typeof a=="string"){b=this[0];if(!b)return null;if(b===d||b===c){e=b===d?Z.doc():Z.viewport();return a=="width"?e.width:a=="height"?e.height:""}return(a=M(a))?N(b,a):null}var f=a;typeof a=="string"&&(f={},f[a]=b),p&&f.opacity&&(f.filter="alpha(opacity="+f.opacity*100+")",f.zoom=a.zoom||1,delete f.opacity);return this.each(g)},offset:function(a,b){if(typeof a=="number"||typeof b=="number")return this.each(function(c){P(c,a,b)});if(!this[0])return{top:0,left:0,height:0,width:0};var c=this[0],d=c.offsetWidth,e=c.offsetHeight,f=c.offsetTop,g=c.offsetLeft;while(c=c.offsetParent)f=f+c.offsetTop,g=g+c.offsetLeft;return{top:f,left:g,height:e,width:d}},dim:function(){var a=this[0],b=!a.offsetWidth&&!a.offsetHeight?function(b,c){c={position:a.style.position||"",visibility:a.style.visibility||"",display:a.style.display||""},b.first().css({position:"absolute",visibility:"hidden",display:"block"});return c}(this):null,c=a.offsetWidth,d=a.offsetHeight;b&&this.first().css(b);return{height:d,width:c}},attr:function(a,b){var c=this[0];if(typeof a=="string"||a instanceof String)return typeof b=="undefined"?h.test(a)?o.test(a)&&typeof c[a]=="string"?!0:c[a]:(a=="href"||a=="src")&&y.hrefExtended?c[w](a,2):c[w](a):this.each(function(c){h.test(a)?c[a]=T(c,b):c[v](a,T(c,b))});for(var d in a)a.hasOwnProperty(d)&&this.attr(d,a[d]);return this},val:function(a){return typeof a=="string"?this.attr("value",a):this[0].value},removeAttr:function(a){return this.each(function(b){o.test(a)?b[a]=!1:b.removeAttribute(a)})},data:function(a,b){var c=this[0],d,e,f;if(typeof b=="undefined"){e=H(c);if(typeof a=="undefined"){D(c.attributes,function(a){(f=(""+a.name).match(t))&&(e[F(f[1])]=J(a.value))});return e}return typeof e[a]=="undefined"?e[a]=J(this.attr("data-"+G(a))):e[a]}return this.each(function(c){H(c)[a]=b})},remove:function(){this.deepEach(I);return this.each(function(a){a[f]&&a[f].removeChild(a)})},empty:function(){return this.each(function(a){E(a.childNodes,I);while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.map(function(a){return a[f].removeChild(a)})},scrollTop:function(a){return W.call(this,null,a,"y")},scrollLeft:function(a){return W.call(this,a,null,"x")},toggle:function(a,b){this.each(function(a){a.style.display=a.offsetWidth||a.offsetHeight?"none":b||""}),a&&a();return this}},Z.setQueryEngine=function(a){g=a,delete Z.setQueryEngine},Z.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||U.prototype)[c]=a[c])},Z.create=function(a){return typeof a=="string"&&a!==""?function(){var b=/^\s*<([^\s>]+)/.exec(a),c=d.createElement("div"),e=[],g=b?n[b[1].toLowerCase()]:null,h=g?g[2]+1:1,i=f,j=y.autoTbody&&g&&g[0]=="<table>"&&!/<tbody/i.test(a);c.innerHTML=g?g[0]+a+g[1]:a;while(h--)c=c.firstChild;do(!b||c.nodeType==1)&&(!j||c.tagName.toLowerCase()!="tbody")&&e.push(c);while(c=c.nextSibling);D(e,function(a){a[i]&&a[i].removeChild(a)});return e}():K(a)?[a.cloneNode(!0)]:[]},Z.doc=function(){var a=Z.viewport();return{width:Math.max(d.body.scrollWidth,e.scrollWidth,a.width),height:Math.max(d.body.scrollHeight,e.scrollHeight,a.height)}},Z.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c<d;c++)b[c].nodeType===1&&(e=b[d=c]);return e},Z.viewport=function(){return{width:p?e.clientWidth:self.innerWidth,height:p?e.clientHeight:self.innerHeight}},Z.isAncestor="compareDocumentPosition"in e?function(a,b){return(a.compareDocumentPosition(b)&16)==16}:"contains"in e?function(a,b){return a!==b&&a.contains(b)}:function(a,b){while(b=b[f])if(b===a)return!0;return!1},Z.noConflict=function(){a.bonzo=b;return this};return Z}),provide("bonzo",a.exports),!function(a){function e(a,b,c){return a?b.css(c,a):function(a){if(!b[0])return 0;a=parseInt(b.css(c),10);return isNaN(a)?b[0]["offset"+c.replace(/^\w/,function(a){return a.toUpperCase()})]:a}()}function d(a){var b=[],c,d;label:for(c=0;c<a.length;c++){for(d=0;d<b.length;d++)if(b[d]==a[c])continue label;b[b.length]=a[c]}return b}function c(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}var b=require("bonzo");b.setQueryEngine(a),a.ender(b),a.ender(b(),!0),a.ender({create:function(c){return a(b.create(c))}}),a.id=function(b){return a([document.getElementById(b)])},a.ender({parents:function(b,e){var f=a(b),g,h,i,j=[];for(g=0,h=this.length;g<h;g++){i=this[g];while(i=i.parentNode)if(~c(f,i)){j.push(i);if(e)break}}return a(d(j))},closest:function(a){return this.parents(a,!0)},first:function(){return a(this.length?this[0]:this)},last:function(){return a(this.length?this[this.length-1]:[])},next:function(){return a(b(this).next())},previous:function(){return a(b(this).previous())},appendTo:function(a){return b(this.selector).appendTo(a,this)},prependTo:function(a){return b(this.selector).prependTo(a,this)},insertAfter:function(a){return b(this.selector).insertAfter(a,this)},insertBefore:function(a){return b(this.selector).insertBefore(a,this)},siblings:function(){var b,c,d,e=[];for(b=0,c=this.length;b<c;b++){d=this[b];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[b];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return a(e)},children:function(){var c,e,f=[];for(c=0,l=this.length;c<l;c++){if(!(e=b.firstChild(this[c])))continue;f.push(e);while(e=e.nextSibling)e.nodeType==1&&f.push(e)}return a(d(f))},height:function(a){return e(a,this,"height")},width:function(a){return e(a,this,"width")}},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;!function(b,c){typeof define=="function"?define(c):typeof a!="undefined"?a.exports=c():this[b]=this.domReady=c()}("domready",function(a){function l(a){k=1;while(a=b.shift())a()}var b=[],c,d=!1,e=document,f=e.documentElement,g=f.doScroll,h="DOMContentLoaded",i="addEventListener",j="onreadystatechange",k=/^loade|c/.test(e.readyState);e[i]&&e[i](h,c=function(){e.removeEventListener(h,c,d),l()},d),g&&e.attachEvent(j,c=function(){/^c/.test(e.readyState)&&(e.detachEvent(j,c),l())});return a=g?function(c){self!=top?k?c():b.push(c):function(){try{f.doScroll("left")}catch(b){return setTimeout(function(){a(c)},50)}c()}()}:function(a){k?a():b.push(a)}}),provide("domready",a.exports),!function(a){var b=require("domready");a.ender({domReady:b}),a.ender({ready:function(a){b(a);return this}},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;!function(b,c){typeof a!="undefined"?a.exports=c():typeof define=="function"&&typeof define.amd=="object"?define(c):this[b]=c()}("qwery",function(){function Y(a,b){return function(c){var d,e;p.test(c)?a.nodeType!==9&&((e=d=a.getAttribute("id"))||a.setAttribute("id",e="__qwerymeupscotty"),c='[id="'+e+'"]'+c,b(a.parentNode||a,c,!0),d||a.removeAttribute("id")):c.length&&b(a,c,!1)}}function X(a,b){var c,d,h=W(b);if(!h||!a)return[];if(a===window||T(a))return!b||a!==window&&T(h)&&Z(a,h)?[a]:[];if(a&&V(a))return J(a);if(c=a.match(o)){if(c[1])return(d=h[g](c[1]))?[d]:[];if(c[2])return K(h[f](c[2]));if(_&&c[3])return K(h[e](c[3]))}return bd(a,h)}function W(a){return a?typeof a=="string"?X(a)[0]:V(a)?a[0]:a:b}function V(a){return typeof a=="object"&&isFinite(a.length)}function U(a){var b=[],c,d;label:for(c=0;c<a.length;c++){for(d=0;d<b.length;d++)if(b[d]==a[c])continue label;b[b.length]=a[c]}return b}function T(a){return a&&typeof a=="object"&&a.nodeType&&(a.nodeType==1||a.nodeType==9)}function S(a,b,c,d){function f(a,d,g){while(g=B[c[d]](g,a))if(T(g)&&(found=N.apply(g,M(b[d])))){if(!d)return g;if(e=f(g,d-1,g))return e}}var e;return(e=f(a,b.length-1,a))&&(!d||Z(e,d))}function R(a,b,c){if(T(b))return a==b;if(V(b))return!!~J(b).indexOf(a);var d=b.split(","),e,f;while(b=d.pop()){e=G.g(b)||G.s(b,b.split(y)),f=b.match(x),e=e.slice(0);if(N.apply(a,M(e.pop()))&&(!e.length||S(a,e,f,c)))return!0}}function Q(a,b){var c=[],d=[],e,h,i,j,l,m,n,o,p=b,q=G.g(a)||G.s(a,a.split(y)),r=a.match(x);if(!q.length)return c;j=(q=q.slice(0)).pop(),q.length&&(i=q[q.length-1].match(k))&&(p=b[g](i[1]));if(!p)return c;n=M(j),m=p!==b&&p.nodeType!==9&&r&&/^[+~]$/.test(r[r.length-1])?function(a){while(p=p.nextSibling)p.nodeType==1&&(n[1]?n[1]==p.tagName.toLowerCase():1)&&(a[a.length]=p);return a}([]):p[f](n[1]||"*");for(e=0,h=m.length;e<h;e++)if(o=N.apply(m[e],n))c[c.length]=o;if(!q.length)return c;I(c,function(a){S(a,q,r)&&(d[d.length]=a)});return d}function P(a,b,c){switch(a){case"=":return b==c;case"^=":return b.match(F.g("^="+c)||F.s("^="+c,new RegExp("^"+O(c))));case"$=":return b.match(F.g("$="+c)||F.s("$="+c,new RegExp(O(c)+"$")));case"*=":return b.match(F.g(c)||F.s(c,new RegExp(O(c))));case"~=":return b.match(F.g("~="+c)||F.s("~="+c,new RegExp("(?:^|\\s+)"+O(c)+"(?:\\s+|$)")));case"|=":return b.match(F.g("|="+c)||F.s("|="+c,new RegExp("^"+O(c)+"(-|$)")))}return 0}function O(a){return E.g(a)||E.s(a,a.replace(t,"\\$1"))}function N(a,b,c,d,e,f,g,h,k,l,m){var n,o,p,q,r;if(b&&this.tagName&&this.tagName.toLowerCase()!==b)return!1;if(c&&(o=c.match(i))&&o[1]!==this.id)return!1;if(c&&(r=c.match(j)))for(n=r.length;n--;)if(!H(r[n].slice(1)).test(this.className))return!1;if(k&&X.pseudos[k]&&!X.pseudos[k](this,m))return!1;if(d&&!g){q=this.attributes;for(p in q)if(Object.prototype.hasOwnProperty.call(q,p)&&(q[p].name||p)==e)return this}return d&&!P(f,$(this,e)||"",g)?!1:this}function M(a){return a.match(z)}function L(a){while(a=a.previousSibling)if(a.nodeType==1)break;return a}function K(a){var b=0,c=a.length,d=[];for(;b<c;b++)d[b]=a[b];return d}function J(a){var b=[];I(a,function(a){V(a)?b=b.concat(a):b[b.length]=a});return b}function I(a,b){var c=0,d=a.length;for(;c<d;c++)b.call(null,a[c])}function H(a){return D.g(a)||D.s(a,new RegExp("(^|\\s+)"+a+"(\\s+|$)"))}function C(){this.c={}}var a=this,b=document,c=a.qwery,d=b.documentElement,e="getElementsByClassName",f="getElementsByTagName",g="getElementById",h="querySelectorAll",i=/#([\w\-]+)/,j=/\.[\w\-]+/g,k=/^#([\w\-]+)$/,l=/^\.([\w\-]+)$/,m=/^([\w\-]+)$/,n=/^([\w]+)?\.([\w\-]+)$/,o=new RegExp(k.source+"|"+m.source+"|"+l.source),p=/(^|,)\s*[>~+]/,q=/^\s+|\s*([,\s\+\~>]|$)\s*/g,r=/[\s\>\+\~]/,s=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,t=/([.*+?\^=!:${}()|\[\]\/\\])/g,u=/^([a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,v=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,w=/:([\w\-]+)(\(['"]?([\s\w\+\-]+)['"]?\))?/,x=new RegExp("("+r.source+")"+s.source,"g"),y=new RegExp(r.source+s.source),z=new RegExp(u.source+"("+v.source+")?"+"("+w.source+")?"),A=/^(([\w\-]*[#\.]?[\w\-]+|\*)?(\[[\w\-]+([\~\|]?=['"][ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+["'])?\])?(\:(link|visited|active|hover))?([\s>+~\.,]|(?:$)))+$/,B={" ":function(a){return a&&a!==d&&a.parentNode},">":function(a,b){return a&&a.parentNode==b.parentNode&&a.parentNode},"~":function(a){return a&&a.previousSibling},"+":function(a,b,c,d){return a?(c=L(a))&&(d=L(b))&&c==d&&c:!1}};C.prototype={g:function(a){return this.c[a]||undefined},s:function(a,b){return this.c[a]=b}};var D=new C,E=new C,F=new C,G=new C,Z="compareDocumentPosition"in d?function(a,b){return(b.compareDocumentPosition(a)&16)==16}:"contains"in d?function(a,b){b=b.nodeType===9||b==window?d:b;return b!==a&&b.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0},$=function(){var a=b.createElement("p");return(a.innerHTML='<a href="#x">x</a>')&&a.firstChild.getAttribute("href")!="#x"?function(a,b){return b==="class"?a.className:b==="href"||b==="src"?a.getAttribute(b,2):a.getAttribute(b)}:function(a,b){return a.getAttribute(b)}}(),_=function(){if(b[e]&&b.querySelector&&b[h])try{var a=b.createElement("p");a.innerHTML="<a/>";return a[h](":nth-of-type(1)").length}catch(c){}return!1}(),ba=function(a,b){var c=[],d,e;if(b.nodeType===9||!p.test(a))return K(b[h](a));I(d=a.split(","),Y(b,function(a,b){e=a[h](b),e.length==1?c[c.length]=e.item(0):e.length&&(c=c.concat(K(e)))}));return d.length>1&&c.length>1?U(c):c},bb=function(a,b){var c,d,e,f,g=[];a=a.replace(q,"$1");if(!p.test(a)&&A.test(a))return K(b[h](a));I(f=a.split(","),Y(b,function(a,f,i){d=A.test(f)?a[h](f):Q(f,a);for(c=0,e=d.length;c<e;c++)if(a.nodeType===9||i||Z(d[c],b))g[g.length]=d[c]}));return f.length>1&&g.length>1?U(g):g},bc=function(a,b){var c=[],d,e,g,h,i;a=a.replace(q,"$1");if(d=a.match(n)){h=H(d[2]),items=b[f](d[1]||"*");for(e=0,g=items.length;e<g;e++)h.test(items[e].className)&&(c[c.length]=items[e]);return c}I(i=a.split(","),Y(b,function(a,d,f){h=Q(d,a);for(e=0,g=h.length;e<g;e++)if(a.nodeType===9||f||Z(h[e],b))c[c.length]=h[e]}));return i.length>1&&c.length>1?U(c):c},bd=_?ba:b[h]?bb:bc;X.uniq=U,X.is=R,X.pseudos={},X.noConflict=function(){a.qwery=c;return this};return X}),provide("qwery",a.exports),!function(a,b){var c=require("qwery"),d;b.pseudos=c.pseudos,b._select=function(a,e){b._select=(d=require("bonzo"))?function(a,b){return/^\s*</.test(a)?d.create(a,b):c(a,b)}:c;return d&&/^\s*</.test(a)?d.create(a,e):c(a,e)},b.ender({find:function(a){var d=[],e,f,g,h,i;for(e=0,f=this.length;e<f;e++){i=c(a,this[e]);for(g=0,h=i.length;g<h;g++)d.push(i[g])}return b(c.uniq(d))},and:function(a){var c=b(a);for(var d=this.length,e=0,f=this.length+c.length;d<f;d++,e++)this[d]=c[e];return this},is:function(a,b){var d,e;for(d=0,e=this.length;d<e;d++)if(c.is(this[d],a,b))return!0;return!1}},!0)}(document,ender)}()