示例#1
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;
示例#2
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)}()
示例#3
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;
示例#4
0
!function(b,c){typeof define=="function"?define(c):typeof a!="undefined"?a.exports=c():this[b]=c()}("morpheus",function(){function s(a,b,c){if(Array.prototype.indexOf)return a.indexOf(b);for(c=0;c<a.length;++c)if(a[c]===b)return c}function t(a){var b,c,d=r.length;for(b=d;b--;)r[b](a),c=!0;c&&q(t)}function u(a){r.push(a)===1&&t()}function v(a){var b,c,d=s(r,a);d>=0&&(c=r.slice(d+1),r.length=d,r=r.concat(c))}function w(a,b){var c={},d;if(d=a.match(i))c.rotate=G(d[1],b?b.rotate:null);if(d=a.match(j))c.scale=G(d[1],b?b.scale:null);if(d=a.match(k))c.skewx=G(d[1],b?b.skewx:null),c.skewy=G(d[3],b?b.skewy:null);if(d=a.match(l))c.translatex=G(d[1],b?b.translatex:null),c.translatey=G(d[3],b?b.translatey:null);return c}function x(a){var b="";return"rotate"in a&&(b+="rotate("+a.rotate+"deg) "),"scale"in a&&(b+="scale("+a.scale+") "),"translatex"in a&&(b+="translate("+a.translatex+"px,"+a.translatey+"px) "),"skewx"in a&&(b+="skew("+a.skewx+"deg,"+a.skewy+"deg)"),b}function y(a,b,c){return"#"+(1<<24|a<<16|b<<8|c).toString(16).slice(1)}function z(a){var b=/rgba?\((\d+),\s*(\d+),\s*(\d+)/.exec(a);return(b?y(b[1],b[2],b[3]):a).replace(/#(\w)(\w)(\w)$/,"#$1$1$2$2$3$3")}function A(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function B(a){return typeof a=="function"}function C(a,b,c,d,f,g){function n(a){var e=a-k;if(e>h||l)return g=isFinite(g)?g:1,l?m&&b(g):b(g),v(n),c&&c.apply(i);isFinite(g)?b(j*d(e/h)+f):b(d(e/h))}d=B(d)?d:H.easings[d]||function(a){return Math.sin(a*Math.PI/2)};var h=a||e,i=this,j=g-f,k=+(new Date),l=0,m=0;return u(n),{stop:function(a){l=1,m=a,a||(c=null)}}}function D(a,b){var c=a.length,d=[],e,f;for(e=0;e<c;++e)d[e]=[a[e][0],a[e][1]];for(f=1;f<c;++f)for(e=0;e<c-f;++e)d[e][0]=(1-b)*d[e][0]+b*d[parseInt(e+1,10)][0],d[e][1]=(1-b)*d[e][1]+b*d[parseInt(e+1,10)][1];return[d[0][0],d[0][1]]}function E(a,b,c){var d=[],e,f,g,h;for(e=0;e<6;e++)g=Math.min(15,parseInt(b.charAt(e),16)),h=Math.min(15,parseInt(c.charAt(e),16)),f=Math.floor((h-g)*a+g),f=f>15?15:f<0?0:f,d[e]=f.toString(16);return"#"+d.join("")}function F(a,b,c,d,f,g,h){if(f=="transform"){h={};for(var i in c[g][f])h[i]=i in d[g][f]?Math.round(((d[g][f][i]-c[g][f][i])*a+c[g][f][i])*e)/e:c[g][f][i];return h}return typeof c[g][f]=="string"?E(a,c[g][f],d[g][f]):(h=Math.round(((d[g][f]-c[g][f])*a+c[g][f])*e)/e,f in m||(h+=b[g][f]||"px"),h)}function G(a,b,c,d,e){return(c=g.exec(a))?(e=parseFloat(c[2]))&&b+(c[1]=="+"?1:-1)*e:parseFloat(a)}function H(a,b){var c=a?c=isFinite(a.length)?a:[a]:[],d,e=b.complete,g=b.duration,i=b.easing,j=b.bezier,k=[],l=[],m=[],q=[],r,s;delete b.complete,delete b.duration,delete b.easing,delete b.bezier,j&&(r=b.left,s=b.top,delete b.right,delete b.bottom,delete b.left,delete b.top);for(d=c.length;d--;){k[d]={},l[d]={},m[d]={};if(j){var t=p(c[d],"left"),u=p(c[d],"top"),v=[G(B(r)?r(c[d]):r||0,parseFloat(t)),G(B(s)?s(c[d]):s||0,parseFloat(u))];q[d]=B(j)?j(c[d],v):j,q[d].push(v),q[d].unshift([parseInt(t,10),parseInt(u,10)])}for(var y in b){var E=p(c[d],y),H,I=B(b[y])?b[y](c[d]):b[y];if(typeof I=="string"&&f.test(I)&&!f.test(E)){delete b[y];continue}k[d][y]=y=="transform"?w(E):typeof I=="string"&&f.test(I)?z(E).slice(1):parseFloat(E),l[d][y]=y=="transform"?w(I,k[d][y]):typeof I=="string"&&I.charAt(0)=="#"?z(I).slice(1):G(I,parseFloat(E)),typeof I=="string"&&(H=I.match(h))&&(m[d][y]=H[1])}}return C.apply(c,[g,function(a,e,f){for(d=c.length;d--;){j&&(f=D(q[d],a),c[d].style.left=f[0]+"px",c[d].style.top=f[1]+"px");for(var g in b)e=F(a,m,k,l,g,d),g=="transform"?c[d].style[n]=x(e):g=="opacity"&&!o?c[d].style.filter="alpha(opacity="+e*100+")":c[d].style[A(g)]=e}},e,i])}var a=this,b=document,c=window,d=b.documentElement,e=1e3,f=/^rgb\(|#/,g=/^([+\-])=([\d\.]+)/,h=/^(?:[\+\-]=)?\d+(?:\.\d+)?(%|in|cm|mm|em|ex|pt|pc|px)$/,i=/rotate\(((?:[+\-]=)?([\-\d\.]+))deg\)/,j=/scale\(((?:[+\-]=)?([\d\.]+))\)/,k=/skew\(((?:[+\-]=)?([\-\d\.]+))deg, ?((?:[+\-]=)?([\-\d\.]+))deg\)/,l=/translate\(((?:[+\-]=)?([\-\d\.]+))px, ?((?:[+\-]=)?([\-\d\.]+))px\)/,m={lineHeight:1,zoom:1,zIndex:1,opacity:1,transform:1},n=function(){var a=b.createElement("a").style,c=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],d;for(d=0;d<c.length;d++)if(c[d]in a)return c[d]}(),o=function(){return typeof b.createElement("a").style.opacity!="undefined"}(),p=b.defaultView&&b.defaultView.getComputedStyle?function(a,c){c=c=="transform"?n:c;var d=null,e=b.defaultView.getComputedStyle(a,"");return e&&(d=e[A(c)]),a.style[c]||d}:d.currentStyle?function(a,b){b=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[A(b)]},q=function(){return c.requestAnimationFrame||c.webkitRequestAnimationFrame||c.mozRequestAnimationFrame||c.oRequestAnimationFrame||c.msRequestAnimationFrame||function(a){c.setTimeout(function(){a(+(new Date))},11)}}(),r=[];return H.tween=C,H.getStyle=p,H.bezier=D,H.transform=n,H.parseTransform=w,H.formatTransform=x,H.easings={},H}),provide("morpheus",a.exports);var c=require("morpheus");!function(a){a.ender({animate:function(a){return c(this,a)},fadeIn:function(a,b){return c(this,{duration:a,opacity:1,complete:b})},fadeOut:function(a,b){return c(this,{duration:a,opacity:0,complete:b})}},!0),a.ender({tween:c.tween})}(ender)}(),!function(){var a={exports:{}},b=a.exports;