-
Notifications
You must be signed in to change notification settings - Fork 2
/
all.js
executable file
·40 lines (31 loc) · 60.8 KB
/
all.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
* @name : So.js
* @version : 5.140.1
* @description : Multipurpose JavaScript library. <http://github.com/krmgns/so>
* @copyright : Kerem Güneş (2013-2020) <http://qeremy.com/sojs>
* @license : MIT license <http://opensource.org/licenses/mit>
*
* Internal Modules : so.js (base), so_animation.js, so_class.js, so_dom.js,
* so_event.js, so_http.js, so_list.js, so_ua.js, so_util.js.
* External Modules : -
* Compress Tools : jscompress.com, uglifyjs.net
* Orig/GZip Sizes : 60000/20000 bytes (±)
*/
// so.js
NODE=typeof module=="object"&&module.exports,NODE&&(window=global),function(i,c,f,s,t){"use strict";if(!"".trim)throw"Archaic browser!";function u(n,t,r){return un(n)?u.ready(n,t):u.dom(n,t,r)}i.so=u,i.so.VERSION="5.140.1";var n="prototype",r="window",e="document",o="nodeType",a="length",h="defaultView",l="ownerDocument",p=i.Array,d=i.Object,m=i.String,v=i.Number,g=i.Date,w=i.RegExp,y=i.Math,x=i.console,b=function(n,t,r){return n.call(t,r)},O=function(n,t,r){return n.apply(t,r)};i.Int=D,i.Float=R,i.log=function(){O(x.log,c,arguments)};var j=/([\d.]+)(\w+)?/,A=/^[-+]?(?:\.?\d+|\d+\.\d+)$/,N=/^\s+|\s+$/g,C=/^\s+/g,E=/\s+$/g,I={};function q(n,t){return n==c?"":(""+n).replace(t?1==t?C:E:N,"")}function D(n){return 0|v(n)}function R(n){return v(n)||0}function L(n){return""+(n!=c?n:"")}function $(n){return!!n}function F(n){return L(n).toLowerCase()}function S(n){return L(n).toUpperCase()}function k(n){var t=n.split(j),n=t[2],t=R(t[1]);return"s"==n||"sec"==n?t*=1e3:"m"==n||"min"==n?t*=6e4:"h"!=n&&"hour"!=n||(t*=36e5),t}function W(n,t,r,i){if(!n)throw"Pattern required!";if((t=t||(en(n)?n.flags:""))&&tn(t)&&(r=t,t=""),i&&!en(n)&&(n=P(n)),!r)return new w(n,t);rn(r)&&(r=k(r)),r=0<=r?r:6e4;var e=n+t;return I[e]=I[e]||new w(n,t),u.fire(r,function(){delete I[e]}),I[e]}function P(n){return L(n).replace(/[\/.*+?^$|{}()\[\]\\]/g,"\\$&")}function T(n){return n&&n[a]}var V=0,M=s,U=[].slice,B={}.toString,K={}.hasOwnProperty;function z(n){return!n||rn(n)||sn(n)||n[o]||n[a]==c?[n]:b(U,n)}function G(){for(var n,t,r=z(arguments),i=r.shift()||{};T(r);)for(t in n=r.shift())b(K,n,t)&&(i[t]=n[t]);return i}function H(n,t,r,i,e){var u,o,r=r||n,c=T(n),f=0;if(c&&e)for(;f<c&&(o=n[f],M!==O(t,r,i?[f,o,f++]:[o,f++])););else for(u in n)if(b(K,n,u)&&(o=n[u],M===O(t,r,i?[u,o,f++]:[o,f++])))break;return r}function J(n,t,r){return H(n,t,r,s,f)}function Q(n,t,r){return H(n,t,r,f,s)}function X(n,t){return typeof n===t}function Y(n,t){return n instanceof t}function Z(n,t){return $(n&&n.constructor===t)}function _(n){return X(n,"number")}function nn(n){return _(n)||A.test(n)}function tn(n){return _(n)&&n===(0|n)}function rn(n){return X(n,"string")||Y(n,m)}function en(n){return Y(n,w)}function un(n){return X(n,"function")}function on(n){return p.isArray(n)}function cn(n,t){return t?X(n,"object"):Z(n,d)}function fn(n){return cn(n,f)&&(Z(n,d)||Z(n,t))}function sn(n){return $(n&&n===n[r]&&n===n[r][r])}function an(n){return $(n&&9===n[o])}function hn(n,t,r){return t&&(en(n)?t.search(n):r?t.lastIndexOf(n):t.indexOf(n))}function ln(n,t){return t&&t.indexOf(n)}function pn(r,n,i){return""===r||""===n?i=-1:rn(n)||on(n)?i=hn(r,n):cn(n)&&J(n,function(n,t){if(r===n)return i=t,M}),-1<i}function dn(n,t){return $(t&&rn(t)?t[n]:n in t)}function mn(n,t,r){return n="("+(n=L(n)).split("").uniq().map(P).unsplit("|")+")",W(n=1==t?"^"+n:n+"$",r?"i":"")}function vn(n,t,r,i){return n=L(n),n=t?P(n):n,W(n=r?1==r?"^"+n:n+"$":n,i?"i":"")}function gn(n,t,r,i,e){for(var n=n.slice(r),u=1==i?wn:yn,o=0,c=T(t=z(t));o<c;o++)if(u(n,t[o],i,e))return f;return s}function wn(n,t,r,i){return n.test(vn(t,f,r,i))}function yn(n,t,r,i){return n.test(vn(t,f,r,i))}G(u,{each:H,for:function(n,t,r,i){return H(n,t,r,s,i)},forEach:function(n,t,r,i){return H(n,t,r,f,i)}}),G(u,{isVoid:function(n){return n==c},isNull:function(n){return n===c},isNulls:function(n){return""===n},isDefined:function(n){return n!==t},isUndefined:function(n){return n===t},isNumber:_,isNumeric:nn,isInt:tn,isFloat:function(n){return _(n=n)&&n!==(0|n)},isString:rn,isBool:function(n){return n===f||n===s},isTrue:function(n){return n===f},isFalse:function(n){return n===s},isRegExp:en,isFunction:un,isArray:on,isObject:cn,isPlainObject:fn,isIterable:function(n){return on(n)||cn(n)||$(n&&n[a]!=c&&!n[o])},isPrimitive:function(n){return n!==d(n)},isWindow:sn,isDocument:an}),d.keys=d.keys||function(n,t){return t=[],Q(n,function(n){t.push(n)}),t},d.values=d.values||function(n,r){return r=[],Q(n,function(n,t){r.push(t)}),r},d.entries=d.entries||function(n,r){return r=[],Q(n,function(n,t){r.push([n,t])}),r},G(p[n],{len:function(){return T(this)},has:function(n){return pn(n,this)},hasIndex:function(n){return dn(n,this)},index:function(n,t){t=hn(n,this,t);return-1<t?t:c},each:function(n){return J(this,n,this)},first:function(){return this[0]},last:function(){return this[T(this)-1]},add:function(n,t){var r=ln(n,this);return 0<=r&&t?this[r]=n:this.push(n),this},remove:function(n){return this.removeAt(ln(n,this))},removeAt:function(n){return 0<=n&&this.splice(n,1),this},append:function(){return O(this.push,this,arguments),this},prepend:function(){return O(this.unshift,this,arguments),this},uniq:function(){return this.filter(function(n,t,r){return r.indexOf(n)===t})},ununiq:function(){return this.filter(function(n,t,r){return r.indexOf(n)!==t})},top:function(){return O(this.shift,this,arguments)},unpop:function(){return O(this.push,this,arguments)},unsplit:function(n){return this.join(n)},filter:function(r){r=r||function(n){return q(n)};var i=this,e=[];return J(i,function(n,t){r(n,t,i)&&e.push(n)}),e},rand:function(){return this[T(this)*y.random()|0]},copy:function(){return this.slice()},chunk:function(n){var t=[];if(!n)return this;for(;T(this);)t.push(this.splice(0,n));return t},pull:function(){var r=this,n=z(arguments),t=[];return J(n,function(n){r.hasIndex(n)&&t.push(r[n])}),J(t,function(n,t){r.splice(t,1)}),1==T(n)?t[0]:t},extract:function(){var r=this,n=z(arguments),i={};return J(n,function(n,t){n&&(i[n]=r[t])}),i}}),G(m[n],{len:function(){return T(this)},has:function(n){return pn(n,this)},hasIndex:function(n){return dn(n,this)},index:function(n,t,r){return-1<(r=hn(n,this,t))?r:c},in:function(n){return pn(this,n)},equals:function(n){return this===n},isNumeric:function(){return nn(this)},toInt:function(){return D(this)},toFloat:function(){return R(this)},toNumber:function(){return v(this)},toRegExp:function(n,t,r){return W(this,n,t,r)},lower:function(){return F(this)},upper:function(){return S(this)},toCamelCase:function(n){var t=this;return t=t&&F((n=t.split(n||" "))[0])+n.slice(1).map(function(n){return F(n).toCapitalCase()}).join("")},toCapitalCase:function(n,t){var r,i,e=this;if(e)if(t&&(e=F(e)),n){for(r=0,i=T(e=e.split(" "));r<i;r++)e[r]=e[r].toCapitalCase(s);e=e.join(" ")}else e=S(e[0])+e.slice(1);return e},strip:function(n){return this.trim(n)},splits:function(n,t){var r,i=this.split(n);return t&&(r=i.slice(t-1),i=i.slice(0,t-1),T(r)&&(i=i.concat(r.join(n)))),i},sliceAt:function(n,t){return(this.splits(n,2)[0]||"").slice(0,t)},sliceFrom:function(n,t){return(this.splits(n,2)[1]||"").slice(0,t)},format:function(){var n=this,t=0,r=arguments,i=n.match(/(%s)/g)||[];for(T(r)<T(i)&&x.warn("No enough arguments.");i.shift();)n=n.replace(/(%s)/,r[t++]);return n},test:function(n,t){return en(n)||(n=W(n,c,c,t)),n.test(this)},grep:function(n,t){n=this.grepAll(n);return n?n[0][0|t]:c},grepAll:function(n,t){var n=this.matchAll(n),r=c;if(n){for(r=[];T(n);)r.push(n.shift().filter(function(n,t){return t&&n!=c}));if(t!=c)return r[0|t]}return r},matchAll:function(n){var t,r,i,e=n.source,u=n.flags,o=[];for(u==c&&(i=hn("/",n=L(n),f),e=n.slice(1,i),u=n.slice(i+1)),u.has("g")||(u+="g"),r=W(e,u);t=r.exec(this);)o.push(t);return T(o)?o:c},remove:function(n){return this.replace(W(n,c,c,f),"")},removeAll:function(n){return this.replace(W(n,"g",c,f),"")},replaceAll:function(n,t){return this.replace(W(n,"g",c,f),t)},translate:function(n){for(var t,r=this,i=0;t=r[i++];)t in n&&(r=r.replace(t,n[t]));return r},trim:function(n,t,r){return r=this,n?r.trimLeft(n,t).trimRight(n,t):q(r)},trimLeft:function(n,t){var r,i=this;if(!n)return q(i,1);for(r=mn(n,1,t);r.test(i);)i=i.replace(r,"");return i},trimRight:function(n,t){var r,i=this;if(!n)return q(i,2);for(r=mn(n,2,t);r.test(i);)i=i.replace(r,"");return i},startsWith:function(n,t,r){return gn(this,n,t,1,r)},endsWith:function(n,t,r){return gn(this,n,t,2,r)}}),G(v[n],{equals:function(n){return this===n},between:function(n,t){return n<=this&&this<=t}}),G(u,{fn:function(){return function(){}},now:function(n){return n?y.round(g.now()/1e3):g.now()},id:function(){return++V},rid:function(){return u.now()+L(y.random()).slice(-7)},re:W,reEsc:P,len:T,fire:function(n,t,r,i){return n&&!t?clearTimeout(n):setTimeout(function(){O(t,i,r)},0|(rn(n)?k(n):n))},ifire:function(n,t,r,i){return n&&!t?clearInterval(n):setInterval(function(){O(t,i,r)},0|(rn(n)?k(n):n))},trim:function(n,t){return n!=c?L(n).trim(t):""},trimLeft:function(n,t){return n!=c?L(n).trimLeft(t):""},trimRight:function(n,t){return n!=c?L(n).trimRight(t):""},dig:function(n,t){if(on(n)||cn(n)){var r=q(t).split(".");return t=r.shift(),T(r)?u.dig(n[t],r.join(".")):n[t]}},type:function(n){return n===c?"null":n===t?"undefined":sn(n)?r:an(n)?e:F(b(B,n).slice(8,-1))},int:D,float:R,string:L,bool:function(n){return!!n},has:function(n,t){return pn(n,t)},hasKey:dn,empty:function(n){return $(!n||_(n[a])&&!T(n)||cn(n)&&!T(d.keys(n)))},extend:function(){return O(G,c,arguments)},equals:function(n,t){return n===t},array:function(){for(var n=[],t=arguments,r=T(t),i=0;i<r;)n=n.concat(z(t[i++]));return n},object:function(n){return G(d.create(c),n)},map:function(r,i,e){return on(r)?r.map(i):cn(r,f)?(e=fn(r)?u.object():{},Q(r,function(n,t){e[n]=i(t,n,r)}),e):void 0},filter:function(r,i,e){return i=i||function(n){return q(n)},on(r)?r.filter(i):cn(r,f)?(e=fn(r)?u.object():{},Q(r,function(n,t){i(t,n,r)&&(e[n]=t)}),e):void 0},getWindow:function(n){return n?n[l]?n[l][h]:sn(n)?n:an(n)?n[h]:t:i},getDocument:function(n){return n?n[l]||(an(n)?n:sn(n)?n[e]:t):i[e]},win:function(n){return u.getWindow(n)},doc:function(n){return u.getDocument(n)}}),J(["q","qa","loadStyle","loadScript"],function(n){u[n]=function(){return O(u.dom[n],u.dom,arguments)}}),J(["get","post","put","delete","request","load"],function(n){u[n]=function(){return O(u.http[n],u.http,arguments)}});var xn=[];u.ready=u.onReady=function(n,t){un(n)&&xn.push(n),t=t||i[e];var r="DOMContentLoaded";t.addEventListener(r,function n(){t.removeEventListener(r,n,s),function(){for(;T(xn);)b(xn.shift(),i,u)}()},s)},u.ext={},NODE&&(module.exports=u)}(window,null,!0,!1);
// so_util.js
!function(i,o){"use strict";var n=i.win(),u=n.Math,e=n.JSON,a=i.int,c=i.float,s=i.trim,r=i.string,l=/.*rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(.*))?\)/i,f=/^((\w+):)?(\/\/(([\w-]+)?(:([^@]+))?@)?([^/?:]+)(:(\d+))?)?([/]?([^/?#][^?#]*)?)?(\?([^#]*))?(#(.*)$)?/;function d(n,r){return u.random().toString(r||16).slice(n?-n:2)}function p(n,r,t,e){var o;for(n=n||10,r=r||36,o=t&&e?[~~(e=i.now()/1e3),(~~(1e3*(e-(0|e)))/1e3).toFixed(6).slice(2),d(4,r)].map(function(n){return a(n).toString(r)}).join(""):t?i.now().toString(r):d(0,r);n&&o.len()<n;)o+=d(0,r);return o.slice(0,n)}i.util={rid:function(n,r){return p(n,r)},uid:function(n,r,t){return p(n,r,1,t)},uuid:function(n){var r="%s-%s-%s-%s-%s".format(d(8),d(4),d(4),d(4),d(12));return n&&(r=r.removeAll("-")),r},range:function(n,r,t){for(var e=[n];n<r;)e.push(n+=t||1);return e},randInt:function(n,r){return n=n||0,r=r||u.pow(2,53)-1,u.floor(u.random()*(r-n+1))+n},randFloat:function(n,r){return n=n||0,r=r||1+n,u.random()*(r-n)+n},randString:function(n,r){if(!n||n<1)throw"Len: min=1";if((r=r||62)<2||62<r)throw"Base: min-max=2-62";for(var t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".slice(0,r),e=t.len(),o="";o.len()<n;)o+=t[u.random()*e|0];return o},parseRgb:function(n,r){if((n=s(n)).has("rgb")){var t=l.exec(n),e={r:0,g:0,b:0,opacity:0};return(t&&(e.r=a(t[1]),e.g=a(t[2]),e.b=a(t[3]),t[4]&&(e.opacity=c(t[4]))),r)?(n=e.r.toString(16),t=e.g.toString(16),r=e.b.toString(16),"#"+((1==n.len()?"0"+n:n)+(1==t.len()?"0"+t:t)+(1==r.len()?"0"+r:r))):e}},url:function(n){var n=r(n).match(f)||[],t={protocol:n[2],user:n[5],pass:n[7],host:n[8],port:a(n[10]),path:n[11],query:n[14],queryParams:o,hash:n[16],dir:o,file:o,fileExt:o},e=r(t.path).split("/");return t.dir=e.slice(0,-1).join("/"),t.file=e.pop(),(n=t.file)&&1<(n=n.split(".")).len()&&(t.fileExt=n.last()),(n=t.query)&&(n=n.split("&"),e={},n.each(function(n,r,t){r=(n=n.splits("=",2))[0],t=n[1],r in e?(e[r]=[e[r]],e[r].push(t)):e[r]=t}),t.queryParams=e),i.forEach(t,function(n,r){r||(t[n]=o)})},urlEncode:function(n){return encodeURIComponent(n)},urlDecode:function(n){return decodeURIComponent(n)},jsonEncode:function(n,r,t){try{return e.stringify(n,r,t)}catch(n){}},jsonDecode:function(n,r){try{return e.parse(n,r)}catch(n){}},toStyleName:function(n,r,t){return n=s(n),r?(t=/[A-Z]/,n.has(t)?n.replaceAll(t,function(n){return"-"+n.lower()}):n):(t=/- */,n.has(t)?n.toCamelCase(t):n)}}}(window.so,null);
// so_class.js
!function(t){"use strict";function n(e){return{extends:function(t){var n=c({},t[r],e[r],{constructor:e,super:t});return e[r]=Object.create(n),e}}}var r="prototype",c=t.extend;n.extend=function(t,n){return c(t[r],n)},t.class=n}(window.so);
// so_list.js (open if needed)
// !function(a,e){"use strict";var t=a.win(),u="object",s=t.Object,o=a.for,f=a.forEach,c=a.object;function r(t){return t.slice().sort(function(){return.5-Math.random()})}function i(t,n){this.init(t,n)}function n(t,n){return new i(t,n)}i.prototype={init:function(t,n){if(t=t||{},!a.isIterable(t))throw"Non-iterable object!";var i=a.type(t);a.isList(t)&&(i=t._type,t=t._data),n=a.extend({type:i},n);var e=c(),n=n.type,r=0;return f(t,function(t,n){e[t]=n,r++}),s.defineProperties(this,{_len:{value:r,writable:!0},_data:{value:e,writable:!0},_type:{value:n}}),this},extend:function(t,i){return i=this,f(t,function(t,n){i._data[t]=n,i._len++}),i},for:function(t){return o(this._data,t,this)},forEach:function(t){return f(this._data,t,this)},set:function(t,n){var i=this;return(t=t!=e?t:i._len)in i._data||i._len++,i._data[t]=n,i},get:function(t,n){return this.hasKey(t)?this._data[t]:n},add:function(t){return this.append(t)},addBy:function(t,n){return this.set(t,n)},remove:function(t){return this.pull(this.findKey(t)),this},removeBy:function(t){return this.pull(t),this},replace:function(i,e){return this.forEach(function(t,n){n===i&&(this._data[t]=e)})},replaceBy:function(t,n){return this._data[t]=n,this},empty:function(){return this._data=c(),this._len=0,this},isEmpty:function(){return!this._len},keys:function(){return s.keys(this._data)},values:function(){return s.values(this._data)},entries:function(){return s.entries(this._data)},has:function(t){return a.has(t,this._data)},hasKey:function(t){return t in this._data},append:function(t){return this.set(e,t)},prepend:function(t){var n=this,i=c({0:t});return n.forEach(function(t,n){a.isNumeric(t)&&t++,i[t]=n}),n._data=i,n},top:function(){return this.pull(this.keys().shift())},pop:function(){return this.pull(this.keys().pop())},find:function(n,i){var e,r=n;return a.isFunction(r)||(r=function(t){return t===n}),this.forEach(function(t,n){if(r(n,t))return e=i?t:n,!1}),e},findKey:function(t){return this.find(t,!0)},push:function(t){return this.append(t)},pushAll:function(){return o(arguments,function(t){this.append(t)},this)},pull:function(t){var n,i=this,e=c();return t in i._data&&(n=i._data[t],delete i._data[t],i._len--,i._type!=u&&(o(i.values(),function(t,n){e[n]=t}),i._data=e)),n},pullAll:function(){var n=this,i=c(),e=c(),r=0;return o(arguments,function(t){e[r]=void 0,t in n._data&&(e[r]=n._data[t],delete n._data[t],n._len--,r++)}),n._type==u||a.empty(e)||(o(n.values(),function(t,n){i[n]=t}),n._data=i),e},copy:function(){return n(this,this.options)},copyTo:function(t,n){return t.init(this._data,n||this.options)},map:function(e){var r=this,u=c();return r.forEach(function(t,n,i){u[t]=e(n,t,i,r._data)}),n(u,{type:r._type})},filter:function(e){e=e||function(t){return a.trim(t)};var r=this,u=c();return r.forEach(function(t,n,i){e(n,t,i,r._data)&&(u[t]=n)}),n(u,{type:r._type})},reduce:function(e,r){return this.forEach(function(t,n,i){e=r(e,n,t,i,this._data)}),e},uniq:function(){return n(this.values().uniq(),{type:this._type})},ununiq:function(){return n(this.values().ununiq(),{type:this._type})},reverse:function(){var n=this,i=c();return n._type==u?o(n.keys().reverse(),function(t){i[t]=n._data[t]}):o(n.values().reverse(),function(t,n){i[n]=t}),n._data=i,n},rand:function(t){for(var n=r(this.values()),i=[],e=t=t||1;e--;)i[e]=n[e];return 1==t?i[0]:i},shuffle:function(){var n=this,i=c();return n._type==u?o(r(n.keys()),function(t){i[t]=n._data[t]}):o(r(n.values()),function(t,n){i[n]=t}),n._data=i,n},sort:function(t){var e=c(),r=this.values().sort(t);return f(this._data,function(t,n,i){e[t]=r[i]}),this._data=e,this},sortKey:function(t){var n=this,i=c(),t=n.keys().sort(t);return o(t,function(t){i[t]=n._data[t]}),n._data=i,n},flip:function(){var i=c();return f(this._data,function(t,n){i[n]=t}),this._data=i,this},test:function(e){var r=!1;return this.forEach(function(t,n,i){if(e(n,t,i))return!(r=!0)}),r},testAll:function(e){var r=!0;return this.forEach(function(t,n,i){if(!e(n,t,i))return r=!1}),r},first:function(){return this.nth(1)},last:function(){return this.nth(this._len)},nth:function(t){return this._data[this.keys()[t-1]]},len:function(){return this._len},data:function(){return this._data},type:function(){return this._type}},a.list=n,a.isList=function(t){return t instanceof i}}(window.so,null);
// so_ua.js
!function(c){"use strict";var d=c.win(),l=/(opr|edge)\/([\d.]+)/,u=/(chrome|safari|firefox|opera|msie|trident(?=\/))(?:.*version)?\/? *([\d.]+)/,p=/mobile|android|ip(?:hone|ad|od)|opera *mini|webos|blackberry|bb\d+|windows *phone/,b=/tablet|ipad/,m=/(linux|mac|windows)/,f=[/(android) *([\d.]+)/,/(ip(?:hone|ad|od))(?:; cpu)? *os ([\d_]+)/,/(windows *phone) *(?:os)? *([\d.]+)/],g=/(os(?: x))? ([\d_]+)/,w=/(64|32)/,h=/(linux|mac(ppc|int(osh|el)|68k)?|win(dows|ce|\d+)?|(free|open)bsd|symbian|blackberry|(sun|web|palm)os)/,x=d.navigator,v=x.userAgent.lower().slice(0,250),y=x.platform.lower(),T=d.screen,k=d.orientation||T.orientation&&T.orientation.angle;c.ua=function(){var e,o,n={os:{},screen:((o=[T.width,T.height,k]).isSmall=function(){return o[0]<768},o),isMobile:function(){return p.test(v)},isTablet:function(){return b.test(v)},isTouchable:function(){return 0<x.maxTouchPoints||"ontouchend"in d}};if(n.device=n.isTablet()?"tablet":n.isMobile()?"mobile":"desktop",(e=l.exec(v)||u.exec(v))&&(e[1]&&(n.name="msie"==e[1]?"ie":"opr"==e[1]?"opera":e[1]),e[2]&&(n.version=e[2],n.versionArray=e[2].split(".").map(Int))),e=m.exec(v)){var i,t,r,s=n.os,a=e[1];if(n.isMobile()){for(;e=f.shift();)if(e=e.exec(v)){e[1].startsWith("ip")&&(t=e[1],e=[,"ios",e[2].replace(/_/g,".")]),a=e[1].remove(" "),i=e[2];break}}else"mac"==a&&(a=((e=g.exec(v))[1]||"").replace(/ /g,""),i=(e[2]||"").replace(/_/g,"."));r=y.grep(w)||v.grep(w),t=t||y.grep(h),s.name=a,s.version=i,s.platform=t,s.bit=r}return n.getGeoposition=function(o,e,n){n=c.extend({timeout:5e3,maximumAge:0,enableHighAccuracy:!0},n),x.geolocation.getCurrentPosition(function(e){o(e,e.coords.latitude,e.coords.longitude)},e,n)},n.sendBeacon=function(e,o){var n;x.sendBeacon?x.sendBeacon(e,o):((n=new XMLHttpRequest).open("POST",e,!1),n.setRequestHeader("Content-Type","text/plain; charset=utf-8"),n.send(o))},n}()}(window.so);
// so_http.js
!function(o,u,d,c){"use strict";var s=o.win(),a=o.trim,p=o.extend,i=(o.for,o.forEach),f=o.isFunction,h=o.isString,l=o.isArray,m=o.isObject,T=o.isNumeric,n=o.isDocument,w=o.isDefined,e=o.class,y=console.warn,t=/%20/g,b=/^(?:https?:)?\/\/([^/]+)/i,g=/^P(?:OST|UT|ATCH)$/i,x=/^([A-Z]+)?\s*(.*?)\s*(?:@(json|xml|html|plain))?$/,q=/\/(json|xml|html|plain)(?:[; ])?/i,v="XMLHttpRequest",C={method:"GET",uri:"",uriParams:u,data:u,dataType:u,async:d,autoSend:d,noCache:void 0,headers:{"X-Requested-With":v},on:{}},P=1,S=2,R=3,j=4;function H(e){return w(e)?o.util.urlEncode(e):""}var k={parseXml:function(e,t){return n(e)?e:h(e)?(new DOMParser).parseFromString(e,t||"text/xml"):(y("No valid XML!"),u)},parseJson:function(e){return e=o.util.jsonDecode(e),w(e)?e:(y("No valid JSON!"),u)},parseHeaders:function(e){var t,n,r=0,s={};return(e=a(e))&&e.split(/\r?\n/).each(function(e){(e=e.splits(":",2))[1]==u?s[r++]=a(e[0]):(t=a(e[0]).toCamelCase("-"),n=a(e[1]),t in s?(s[t]=l(s[t])?s[t]:[s[t]],s[t].push(n)):s[t]=n)}),s},serialize:function(e){if(h(e)||!l(e)&&!m(e))return e;var n=[];return i(e,function(e,t){l(t)||m(t)?n.push(function e(t,n){var r,s,o,i=[],a=m(t);for(r in t)t.hasOwnProperty(r)&&(s=n?n+"["+(a?H(r):"")+"]":H(r),o=t[r],i.push(m(o)?e(o,s):s+"="+H(o)));return i.join("&")}(t,e)):n.push("%s=%s".format(H(e),H(t)))}),n.join("&").replace(t,"+")}};function r(e,t){(t=this).client=e,t.headers={},t.data=t.dataType=u}function D(e,t){(t=this).super(e),t.method=e.options.method,t.uri=e.options.uri,t.uriParams=e.options.uriParams}function O(e,t){(t=this).super(e),t.status=t.statusCode=t.statusText=u}function X(e,t){return o.empty(t)?e:e+=(e.has("?")?"&":"?")+k.serialize(t)}function F(e){e.api.onreadystatechange=u}function A(e,t){if(!(e=a(e)))throw"URI required!";(t=p({},C,t)).method=(t.method||C.method).upper(),t.uri=e,t.headers=p({},C.headers,t.headers);var n=e.match(b);n&&n[1]!=s.location.host&&delete t.headers["X-Requested-With"],t.method.test(g)&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.uriParams?t.uri=X(t.uri,t.uriParams):t.data&&"GET"==t.method&&(t.uri=X(t.uri,t.data)),t.noCache&&(t.uri=X(t.uri,{_:o.now()})),t.uri.has("?")&&(t.uriParams=t.uriParams||{},t.uri.split("?")[1].split("&").each(function(e){(e=e.splits("=",2))[0]&&(t.uriParams[e[0]]=e[1])}));var r=this;r.sent=r.done=r.error=r.aborted=c,r.state=u,r.options=t,r.request=new D(r),r.response=new O(r),r.request.data=t.data,r.request.dataType=t.dataType,r.request.headers=t.headers,r.api=new s[v],r.api.open(r.request.method,r.request.uri,!!t.async),r.api.onerror=function(e){r.fire("error",e),r.error=d},r.api.client=r,t.async&&(r.api.onreadystatechange=function(){!function(e){if(e.aborted)return F(e);switch(e.state=e.api.readyState,e.state){case P:e.fire("start");break;case S:e.fire("headers");break;case R:e.fire("progress");break;case j:e.done=d;var t=e.api.status,n=e.api.statusText,r=t?"HTTP/1.1 %s %s".format(t,n):u,s=k.parseHeaders(e.api.getAllResponseHeaders()),o=e.api.responseText,i=e.options.dataType||(q.exec(s.contentType)||[,u])[1],a=e.options.trigger;a&&(a.disabled=c),r&&(e.response.status=s[0]=r),e.response.statusCode=t,e.response.statusText=n,e.response.headers=s,"json"==i?o=k.parseJson(o):"xml"==i&&(o=k.parseXml(o)),e.response.data=o,e.response.dataType=i,e.fire(t),e.fire(99<t&&t<400?"success":"failure",o),e.fire("done",o),F(e);break;default:y("Unknown HTTP error!")}}(r)}),t.autoSend&&r.send()}function E(e,t){return new A(e,t)}function N(e,t,n,r,s,o){if(f(t)&&(n=t,t=u),t=t||{},!h(e))throw"URI must be a string!";if(!m(t))throw"Options must be an object!";var i;return(e=a(e)).has(" ")?(i=x.exec(e))&&(t.method=i[1]||o,t.uri=e=i[2],t.dataType=i[3]):o&&(t.method=o,t.uri=e),E(e,p(t,{onDone:t.onDone||t.on&&t.on.done||n,onSuccess:t.onSuccess||t.on&&t.on.success||r,onFailure:t.onFailure||t.on&&t.on.failure||s}))}e(D).extends(r),e(O).extends(r),p(A.prototype,{send:function(){var e,n=this,t=n.request,r=n.options.timeout,s=n.options.trigger;return n.sent||n.aborted||(n.fire("beforeSend"),i(t.headers,function(e,t){n.api.setRequestHeader(e,t)}),t.method.test(g)&&(e=k.serialize(t.data)),n.api.send(e),n.fire("afterSend"),n.sent=d,s&&(s.disabled=d),r&&o.fire(r,function(){n.cancel(d)})),n},fire:function(e,t){var n,r=this;r.options.on[e]?e=r.options.on[e]:f(e)||(e=T(e)?e:"on"+e.toCapitalCase(),r.options[e]&&(e=r.options[e])),f(e)&&(n=[r],w(t)&&(n=[t].concat(n)),e.apply(r,n))},cancel:function(e){this.api.abort(),this.fire("abort"),this.aborted=d,e&&this.fire("timeout")},end:function(e){return this.on("done",e)},ok:function(){return this.code(200)},code:function(e){return e==this.response.statusCode},isSuccess:function(e){return(e=this.response.statusCode)&&200<=e&&e<=299},isFailure:function(e){return(e=this.response.statusCode)&&400<=e&&e<=599},on:function(e,t){return this.options.on[e]=t,this}}),p(k,{Client:E,Request:function(e){return new D(e)},Response:function(e){return new O(e)},get:function(e,t,n,r,s){return N(e,t,n,r,s,"get")},post:function(e,t,n,r,s){return N(e,t,n,r,s,"post")},put:function(e,t,n,r,s){return N(e,t,n,r,s,"put")},delete:function(e,t,n,r,s){return N(e,t,n,r,s,"delete")},request:function(e,t,n,r,s){return N(e,t,n,r,s)},load:function(e,t,n,r,s){return N(e,t,n,r,s,"get")}}),o.http=k}(window.so,null,!0,!1);
// so_event.js
!function(u,s,a,c){"use strict";var e="prototype",f="$events",r=u.win(),v=u.doc(),p=u.trim,d=u.extend,l=u.for,y=u.forEach,E=u.fire,h=u.isObject,g=u.isFunction,b=r.Object.defineProperty,m=console.warn,K={UIEvent:"resize|scroll|select|(un)?load|DOMActivate",MouseEvent:"(dbl)?click|mouse(up|down|enter|leave|in|out|over|move|wheel)|show|contextmenu|DOMMouseScroll",FocusEvent:"blur|focus(in|out)?|DOMFocus(In|Out)",KeyboardEvent:"key(up|down|press)",TouchEvent:"touch(end|start|move|cancel)",DragEvent:"drag(end|start|enter|leave|over|exit|gesture|drop)?|drop",WheelEvent:"wheel",HashChangeEvent:"hashchange",BeforeUnloadEvent:"beforeunload",MutationEvent:"DOM((Attr|CharacterData|Subtree)Modified|Node(Inserted(IntoDocument)?|Removed(FromDocument)?))",MessageEvent:"message",PopStateEvent:"popstate",StorageEvent:"storage",AnimationEvent:"animation(end|start|iteration)",TransitionEvent:"transition(end|start)",PageTransitionEvent:"page(hide|show)",ProgressEvent:"load(end|start)|progress|timeout",CompositionEvent:"composition(end|start|update)",DeviceMotionEvent:"devicemotion",DeviceOrientationEvent:"deviceorientation"},w=/^(UI|Mouse|Mutation|HTML)Event$/i,C=/\s*,\s*/,T=v.adoptNode?3:2,A={bubbles:a,cancelable:a,scoped:c,composed:c,view:r,detail:s,relatedNode:s,prevValue:"",newValue:"",attrName:"",attrChange:0,screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:c,altKey:c,shiftKey:c,metaKey:c,button:1,relatedTarget:s,once:c,capture:c,passive:c,useCapture:c,data:{},delay:0},D=8,M=9,O=13,R=27,N=37,P=38,I=39,L=40,U=46,S=36,W=35,k=33,H=34,_=45,F=20,B=37,G=38,x=39,V=40,X=16,Y=17,$=18,j=225,q=0,z=c;function J(e,t){return p(e).split(t).filter()}function Q(n,o,e){if(!(o=p(o)))throw"Type required!";var t,i;e=d({},A,e),n||y(K,function(e,t){if((t=u.re("^("+t+")$","i","1m")).test(o))return n=i=e,z}),n=i=n||"Event";try{t="MutationEvent"!=n&&new r[n](o,e)}catch(e){}return t||(T<3&&w.test(n)&&(n+="s"),t=v.createEvent(n),"UIEvent"==i?t.initUIEvent(o,e.bubbles,e.cancelable,e.view,e.detail):"MouseEvent"==i||"DragEvent"==i||"WheelEvent"==i?t.initMouseEvent(o,e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget):"MutationEvent"==i?t.initMutationEvent(o,e.bubbles,e.cancelable,e.relatedNode,e.prevValue,e.newValue,e.attrName,e.attrChange):"CustomEvent"==n?t.initCustomEvent(o,e.bubbles,e.cancelable,e.detail):t.initEvent(o,e.bubbles,e.cancelable)),[t,n in K?n:"CustomEvent"]}function Z(o,i){if(i)return function(t){var e;o.once&&o.unbind(),o.event=t,o.fired++,t.data||(t=b(t,"data",{value:o.options.data||{},writable:a})),t.target||(t=b(t,"target",{value:o.target})),d(t,{$:u(t.target),event:o,eventTarget:o.eventTarget,stop:function(e){t.stopDefault(),t.stopBubble(e)},stopDefault:function(){t.preventDefault()},stopBubble:function(e){t.stopPropagation(),e&&t.stopImmediatePropagation()}}),"input"!=t.type||(e=h(t.data)?s:t.data)!=s&&(t.key=e,t.keyCode=e.upper().charCodeAt());function n(e){return e==t.keyCode}return d(t,{isKey:n,isBackspaceKey:function(){return n(D)},isTabKey:function(){return n(M)},isEnterKey:function(){return n(O)},isEscKey:function(){return n(R)},isLeftKey:function(){return n(N)},isUpKey:function(){return n(P)},isRightKey:function(){return n(I)},isDownKey:function(){return n(L)},isDeleteKey:function(){return n(U)},isHomeKey:function(){return n(S)},isEndKey:function(){return n(W)},isPageUpKey:function(){return n(k)},isPageDownKey:function(){return n(H)},isInsertKey:function(){return n(_)},isCapsLockKey:function(){return n(F)},isArrowLeftKey:function(){return n(B)},isArrowUpKey:function(){return n(G)},isArrowRightKey:function(){return n(x)},isArrowDownKey:function(){return n(V)},isShiftKey:function(){return n(X)},isControlKey:function(){return n(Y)},isAltKey:function(){return n($)},isAltGraphKey:function(){return n(j)}}),i.call(o.target,t,o.target)}}function ee(e,t,n){return new o(e,t,n)}function te(e){return new t(e)}function ne(e,t){if(!e)throw"No target given!";return e[f]||(e[f]={}),t&&!e[f][t]&&(e[f][t]={}),e}function o(e,t,n){var o,i;e=p(e),n=n||{},h(t)&&(t=(n=t).fn),n=d({},A,n),(o=this).type=e,o.options=n,o.custom=!!n.custom,o.custom&&(o.options.eventClass="CustomEvent"),i=Q(o.options.eventClass,o.type,n),o.event=i[0],o.eventClass=i[1],o.eventTarget=s,o.target=n.target,o.useCapture=n.useCapture,o.fn=Z(o,t),o.fno=t,o.once=n.once,o.passive=n.passive,o.id=++q,o.fired=0,o.cancalled=c}function t(e){this.target=ne(e)}function oe(e,t,n){return t=t||{},h(e)&&(e=(t=e).fn),{fn:e,options:d(t,{target:n})}}d(o[e],{copy:function(){var e=ee(this.type,this.fno,this.options);return d(e,this)},bind:function(e){var t=this.copy(),n=te(t.target);return e?J(e,C).each(function(e){t.type=e,n.addEvent(t)}):n.addEvent(t),t},bindTo:function(e){var t,n=this.copy();return n.target=n.options.target=e,t=n.fno,n.fn=Z(n,t),n.fno=t,te(e).addEvent(n),n},unbind:function(e){var t=this.copy(),n=te(t.target);return e?J(e,C).each(function(e){t.type=e,n.removeEvent(t)}):n.removeEvent(t),t},fire:function(e,t,n){var o=this.copy(),i=te(o.target);return e?J(e,C).each(function(e){o.type=e,i.fireEvent(o,t,n)}):i.fireEvent(o,t,n),o},off:function(e){return this.unbind(e)}}),d(t[e],{addEvent:function(e){var t=ne(this.target,e.type);e.id=e.id||++q,e.target=t,e.eventTarget=this,t[f][e.type][e.id]=e,t.addEventListener(e.type,e.fn,e.useCapture)},removeEvent:function(e){var t,n,o,i=ne(this.target),r=i[f],a=[];i[f]?("*"==e.type?l(r,function(e){l(e,function(e){a.push(e)})}):"**"==e.type?l(r,function(e){l(e,function(e){e&&e.fired&&a.push(e)})}):e.type.endsWith("**")?(t=e.type.slice(0,-2),l(i[f][t],function(e){e&&e.fired&&a.push(e)})):r[e.type]&&(n=e.fno,o=r[e.type],l(o,n?function(e){e&&e.fno==n&&a.push(e)}:function(e){a.push(e)})),a.len()?(l(a,function(e){e&&e.id in r[e.type]&&(delete r[e.type][e.id],i.removeEventListener(e.type,e.fn,e.useCapture))}),y(r,function(e,t){r[e]=u.empty(t)?s:t})):g(i["on"+e.type])&&(i["on"+e.type]=s)):m('No "'+e.type+'" to remove!')},fireEvent:function(e,t,n){var o,i=ne(this.target);i[f][e.type]?l(i[f][e.type],function(e){if(t=t||e.options.data,n=n||e.options.delay,t)for(o in e.event.data=e.event.data||{},t)e.event.data[o]=t[o];E(n,function(){e.fn(e.event)})}):g(i[e.type])?(n=n||e.options.delay,E(n,function(){i[e.type](e.event)})):m('No "'+e.type+'" to fire!')}}),u.event={on:function(t,e,n,o){var i,r=oe(n,o,t);J(e,C).each(function(e){i=ee(e,r.fn,r.options),te(t).addEvent(i)})},off:function(t,e,n,o){var i,r=oe(n,o,t);J(e,C).each(function(e){i=ee(e,r.fn,r.options),te(t).removeEvent(i)})},once:function(t,e,n,o){var i,r=oe(n,d(o,{once:a}),t);J(e,C).each(function(e){i=ee(e,r.fn,r.options),te(t).addEvent(i)})},fire:function(e,t,n,o){var i=oe(n,o,e);J(t,C).each(function(e){ee(e,i.fn,i.options).fire(e,i.options.data,i.options.delay)})},has:function(e,t,n,o){var i=e&&e[f],r=c;return i&&(o?r=!!i[t]:i[t]&&n?l(i[t],function(e){if(e.fno&&e.fno==n)return r=a,z}):g(e[t])&&(r=a)),r},create:Q,Event:ee,EventTarget:te,CustomEvent:function(e,t,n){return new o(e,t,d(n,{custom:a}))},key:{BACKSPACE:D,TAB:M,ENTER:O,ESC:R,LEFT:N,UP:P,RIGHT:I,DOWN:L,DELETE:U,HOME:S,END:W,PAGE_UP:W,PAGE_DOWN:H,INSERT:_,CAPS_LOCK:F,ARROW_LEFT:B,ARROW_UP:G,ARROW_RIGHT:x,ARROW_DOWN:V,SHIFT:X,CONTROL:Y,ALT:$,ALT_GRAPH:j}}}(window.so,null,!0,!1);
// so_animation.js (https://uglifyjs.net/)
!function(s,a,n,o){"use strict";var e=s.win(),l=s.util.toStyleName,d=s.ext&&s.ext.easing||{},t=s.extend,r=s.for,f=s.forEach,m=s.float,u=s.now,c=s.isNumber,p=s.isString,v=s.isFunction,$=/^[\d.]+/,g=/scroll(?:Top|Left)/,y=/(?:(?:fill-?)?opacity|z(?:oom|index)|(?:font-?w|line-?h)eight|column(?:-?count|s))/i,h={fast:50,slow:650,ease:255,normal:150,default:325},T=function(e,t,n,i){return-n*(e/=i)*(e-2)+t},w=e.requestAnimationFrame||function(e){e.setTimeout(e,1e3/60)};function k(e,t,n,i,r){var u=this;u.$dom=s(e);u.properties=t;if(v(n)){r=n,n=a}else if(v(i)){r=i,i=a}u.speed=c(n)?n:h[n]||h.default;u.easing=i?d[i]||T:a;u.callback=r?function(){r(u)}:a;u.running=u.stopped=u.ended=o;u.startTime=u.elapsedTime=0;u.tasks=[];if(u.$dom.len()){u.$dom.set("$animation",u);f(t,function(e,t){var n,i,r,s,a,o="";e=l(e);n=g.test(e);if(!n){a=p(t)?u.$dom.getCssStyles(e)[e]:u.$dom.getComputedStyles(e)[e];i=m(a);r=m(t);if(!y.test(e)){o=a.remove($)}}else{i=u.$dom.scroll()[e.slice(6).lower()];r=t}s=Math.abs(r-i);if(!s)return;u.tasks.push({name:e,scroll:n,startValue:i,endValue:r,reverse:i>r,diff:s,unit:o})})}}t(k.prototype,{run:function(){var e=this;e.stop();e.running=n;e.startTime=u();!function t(){if(!e.$dom.len()){return e.running=o,e.stopped=e.ended=n}if(!e.stopped&&!e.ended){if(e.elapsedTime<e.speed){w(t);e.start()}else{e.end();e.stop()}}}();return e},start:function(){var t=this,n=t.$dom,e,i;t.elapsedTime=u()-t.startTime;r(t.tasks,function(e){i=T(t.elapsedTime,0,e.diff,t.speed);i=e.reverse?e.startValue-i:e.startValue+i;if(!e.scroll){n.setStyle(e.name,i.toFixed(9)+e.unit)}else{n.set(e.name,i.toFixed(0))}});return t},end:function(){var e=this,t=e.$dom;r(e.tasks,function(e){if(!e.scroll){t.setStyle(e.name,e.endValue+e.unit)}else{t.set(e.name,e.endValue)}});e.ended=n;if(v(e.callback)){e.callback(e)}return e},stop:function(){var e=this,t=e.$dom;if(e.running){e.running=o,e.stopped=n}t.set("$animation",a);return e}});function x(e,t,n,i,r){return new k(e,t,n,i,r)}s.animation={Animation:x,animate:function(e,t,n,i,r){return x(e,t,n,i,r).run()}}}(window.so,null,!0,!1);
// so_dom.js
!function(i,v,h,c,u){"use strict";var e="prototype",o="$data",f="$animation",s="$observer",a="$events",n="nodeName",l="nodeType",d="parentNode",p="parentElement",m="children",g="childNodes",y="firstChild",b="nextElementSibling",A="previousElementSibling",w="marginTop",x="marginBottom",C="marginLeft",$="marginRight",T="borderTopWidth",D="borderBottomWidth",W="borderLeftWidth",S="borderRightWidth",k="width",E="innerWidth",N="outerWidth",H="offsetWidth",L="height",P="innerHeight",O="outerHeight",j="offsetHeight",z="top",B="offsetTop",_="scrollTop",q="left",M="offsetLeft",V="scrollLeft",r="innerHTML",I="textContent",R="id",F="name",X="value",G="text",J="style",U="className",Y="tagName",K="options",Q="checked",Z="selected",tt="disabled",nt="readOnly",rt="display",et="visibility",it="cssText",ut="ownerDocument",ot="documentElement",ft="#window",ct="#document",st="html",at="body",ht=i.doc(),lt=i.event,dt=i.util,pt=dt.toStyleName,vt=i.re,mt=i.array,gt=dt.uid,yt=i.each,bt=i.for,At=i.forEach,wt=i.len,xt=i.trim,Ct=i.extend,$t=i.fire,t=i.int,Tt=i.float,Dt=i.string,Wt=i.bool,St=i.isNull,kt=i.isNulls,Et=i.isVoid,Nt=i.isDefined,Ht=i.isUndefined,Lt=i.isString,Pt=i.isNumber,Ot=i.isNumeric,jt=i.isArray,zt=i.isObject,Bt=i.isFunction,_t=i.isTrue,qt=i.isFalse,Mt=i.isWindow,Vt=i.isDocument,It=i.win,Rt=i.doc,Ft=console.warn,Xt=/\s+/g,Gt=/\s*,\s*/,Jt=/^<([\w-]+)[^>]*>/i,Ut=/^area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr$/i;function Yt(t,n){return n.test(t)}function Kt(t,n){return xt(t).split(n).filter()}function Qt(t,n,r){return t in n&&(r=Dt(n[t]),delete n[t]),r}function Zt(t,n){return t.querySelector(n)}function tn(t,n){return t.querySelectorAll(n)}function nn(t){return t&&t[n]?t[n].lower():Mt(t)?ft:v}function rn(t,n){return(n=nn(t))==ft||n==ct}function en(t,n){return(n=nn(t))==st||n==at}function un(t){return Wt(t&&(1===t[l]||9===t[l]||11===t[l]))}function on(t){return Wt(t&&1===t[l])}function fn(t){return t instanceof Cn}function cn(t,n,r){return fn(t)?t:new Cn(t,n,r)}function sn(t){return t.map(function(t){return new Cn(t)})}function an(t,n){Ct(t[e],n)}function hn(t,n){var r=t||{};return Lt(r)&&((r={})[t]=n),r}function ln(t,n){return{$tag:t,$content:n}}var dn=/(?::first|last|nth)(?!-)|(?:[\w-]+):(?:\d+)/,pn=/([\w-]+|):(first|last|nth([^-]+))|([\w-]+):(\d+)/g,vn=/\[.+\]/,mn=/([.:])/g,gn=/\[([\w.:]+)(=[^\]]+)?\]/g,yn=/([\w-]+)?\[(data-[\w-]+)\*/,bn=/^([#.])([\w-]+)$/,An="so:id",wn="<so-temp>";function xn(t,n,r){if(t){n?fn(n)?n=n[0]:Lt(n)&&(n=Zt(ht,n)):n=ht;var e,i,u,o,f,c,s,a=[];if(t=t.replace(Xt," "),u=Yt(t,vn),u&&(i=t.matchAll(yn))){for(c=0,f=[];e=i[c++];)f.push(e[1]||"");return f=f.filter().len()?f.join(","):"*",mt(tn(n,f)).each(function(n){for(c=0;e=i[c++];)gr(n,h).each(function(t){t.startsWith(e[2])&&a.push(n)})}),a}if(Yt(t,dn))for(c=0,s=wt(t.matchAll(dn));c++<s;)t=t.replace(pn,function(t){return(t=mt(arguments))[4]?t[4]+":nth-child("+t[5]+")":t[1]+":"+(t[3]?"nth-child"+t[3]:t[2]+"-child")});else t.has(":parent")&&(t=t.removeAll(":parent"),o=h);return u&&(t=t.replace(gn,function(t,n,r){return"["+(n=n.replace(mn,"\\$1"))+((r=r?r.slice(1):"")?Ot(r)?'="'+r+'"':"="+r:"")+"]"})),a=mt((r?Zt:tn)(n,t)),o&&(a=a.each(function(t,n){a[n]=t[d]})),a}}function Cn(t,n,r){var e,i,u,o=this,f=0;t&&(Lt(t)?(t=xt(t))&&(n&&(zt(n)||zt(r))?e=Sn(Lt(n)?Ct(ln(t,n),r):Ct(ln(t),n)):(u=t.match(bn))?e="#"==u[1]?[(n=ht).getElementById(u[2])]:(n||ht).getElementsByClassName(u[2]):(u=t.match(Jt))?(e=Sn(t,n,n,u[1]),n=v):e=">"==t[0]?(u=mr(n=on(n)?n:ht[ot],i=An)||gt(),vr(n,i,u,c),1==t.len()&&(t="> *"),xn(t='[%s="%s"] %s'.format(i,u,t),v,r)):xn(t,n,r)):rn(t)?e=[t]:un(t)?n&&n!=t[d]||(e=[t]):jt(t)?(e=[],t.each(function(t){fn(t)?e=e.concat(t.all()):e.push(t)})):e=zt(t)?Sn(t):t,bt(e,function(t){t&&(o[f++]=t)})),Object.defineProperties(o,{_len:{value:f},_root:{value:n||ht},_selector:{value:t,writable:h}})}function $n(t,n){t.appendChild(n)}function Tn(t,n){t.removeChild(n)}function Dn(t,n,r){t.replaceChild(n,r)}function Wn(t,n,r){t.insertBefore(n,r)}function Sn(t,n,e,r){if(fn(t))return t.all();if(un(t))return[t];if(jt(t))return t;if(zt(t)||zt(n)){var i=Ct({},t,e);zt(n)&&(i=Ct(i,n)),i.$tag=i.$tag||r;var u,o,f=Qt("$tag",i,"").trim(),c=Qt("$content",i,""),s=[];if(!f)throw"Empty $tag in content!";"<"==f[0]&&(f=(s=f.grepAll(/^<([\w-]+)([^>]*)>(.*)/i,0))[0]),u="<"+f.trimLeft("<"),"/"!=s[1]&&(u+=s[1]||""),u+=">"+(s[2]||"")+c,Yt(f,Ut)||(o="</"+f+">","/"!=s[1]&&(s[2]||"").endsWith(o)||(u+=o)),r=f,t=u,e=i,n=v}var a,h,l,d=wn.strip("<>"),p=0;if(r=r||t&&t.grep(Jt))switch(r=r.lower()){case"tr":d="tbody";break;case"th":case"td":d="tr";break;case"thead":case"tbody":case"tfoot":d="table";break;case"body":d="html"}for(h=En(n=n&&Vt(n)?n:ht,d,{innerHTML:t}),a=n.createDocumentFragment(),l=wt(h=mt(h[g]));p<l;)2==l&&"body"==r&&p++,$n(a,h[p++]);return e&&zt(e)&&bt(a[g],function(r){on(r)&&At(e,function(t,n){Bt(n)?(t.startsWith("on")&&(t=t.slice(2)),lt&<.on(r,t,n)):t==J?At(n,function(t,n){tr(r,t,n)}):vr(r,t,n)})}),mt(a[g])}function kn(t,n,r){return Sn(n,Rt(t),r)}function En(t,n,r){var e=(t||ht).createElement(n);return r&&At(r,function(t,n){e[t]=n}),e}function Nn(t,n,r){for(qt(n)||(t[o]=t[f]=t[s]=t[a]=v);r=t[y];)on(r)&&Nn(r),Tn(t,r);return t}an(Cn,{len:function(){return this._len},root:function(){return this._root},find:function(t,n){return(n=this)[0]?cn(t,n[0],h):n},findAll:function(t,n){return(n=this)[0]?cn(t,n[0]):n},concat:function(){var t=mt(arguments).reduce(function(t,n){return t.append(cn(n))},[]);return cn(this.all().concat(t).uniq())},toArray:function(){for(var t,n=0,r=[];t=this[n];n++)r[n]=t;return r},toDomArray:function(){return sn(this.toArray())},each:function(t,n){var r=this.all();return n&&(r=r.map(function(t){return cn(t,v,h)})),yt(r,t,this)},for:function(t){return bt(this.all(),t,this)},forEach:function(t){return At(this.all(),t,this)},copy:function(){return cn(this.all())},map:function(t){return cn(this.all().map(t))},filter:function(t){var n,r=this.all();return Bt(t)?cn(r.filter(t)):(n=cn(t),cn(r.filter(function(t){return n.has(t)})))},reverse:function(){return cn(this.all().reverse())},el:function(t){return this[(t||1)-1]},els:function(){var n,r=[],e=this,t=mt(arguments);return t.len()?bt(t,function(t){(n=e.el(t))&&r.push(n)}):r=e.all(),r},item:function(t){return cn(this.el(t))},items:function(){return sn(this.els.apply(this,arguments))},first:function(){return this.item(1)},last:function(){return this.item(this._len)},nth:function(r){return Pt(r)?this.item(r):(r=t(r),cn(this.filter(function(t,n){return!((n+1)%r)&&r})))},odd:function(){return cn(this.filter(function(t,n){return 1&n}))},even:function(){return cn(this.filter(function(t,n){return!(1&n)}))},tag:function(){return nn(this[0])},tags:function(){var n=[];return this.for(function(t){n.push(nn(t))}),n},all:function(t){return t?this.toDomArray():this.toArray()},$:function(t){return this.find(t)},$$:function(t){return this.findAll(t)}});var Hn=0,Ln="so:clone-id";function Pn(t,n){var r=t.cloneNode();return on(t)&&vr(r,Ln,++Hn,c),qt(n)||(r[o]=t[o]||{},r[o][Ln]=Hn,On(t,r),t[g]&&bt(t[g],function(t){$n(r,Pn(t,n))})),r}function On(t,n,r){r&&t[o]&&(delete t[o][Ln],n[o]=t[o]),t[s]&&(n[s]=t[s],n[s].observe(n,t[s].options)),t[a]&&bt(t[a],function(t){bt(t,function(t){t.bindTo(n)})})}function jn(t,n){return qt(t)||!_t(t)||pr(n,Ln)||kr(n,Ln)||(n=Pn(n)),n}function zn(t,n){return r=t,t=0,(n=n)?r[t]&&r[t][n]:r[t];var r}function Bn(t,n,r){var e,i=n.len()>t.len()?(i=n,n=t,t=i):v;return t.filter(function(t){return e=n.indexOf(t),r?-1<e:e<0})}function _n(n,t){return t.filter(function(t){return t!=n})}function qn(t,n){for(var r=t,e=[];r=r&&r[n];)un(r)?e.push(r):e=e.concat(mt(r));return e}function Mn(t){return(t=xt(t))&&">"!=t[0]?">"+t:t}function Vn(t,n){return qn(t[p],m).filter(function(t){return n==nn(t)})}an(Cn,{clone:function(r){var e=[];return this.for(function(t,n){e[n]=Pn(t,r)}),cn(e)},clean:function(n){return this.for(function(t){Nn(t,n)})},empty:function(){return this.clean(c)},remove:function(t){var r=this;return t?(r[0]&&r.$$(t).for(function(t,n){(n=t[d])&&n==r[0]&&Tn(r[0],Nn(t))}),r):r.for(function(t){Nn(t),t[d]&&Tn(t[d],t)})},append:function(t,n,r,e){return(Lt(n)||zt(n))&&(t=Lt(n)?Ct(ln(t,n),r):Ct(ln(t),n)),this.for(function(n){kn(n,t,r).each(function(t){$n(n,jn(e,t))})})},appendTo:function(t,r){return fn(t)||(t=cn(t)),this.for(function(n){t.for(function(t){$n(t,jn(r,n))})})},prepend:function(t,n,r,e){return(Lt(n)||zt(n))&&(t=Lt(n)?Ct(ln(t,n),r):Ct(ln(t),n)),this.for(function(n){kn(n,t,r).each(function(t){Wn(n,jn(e,t),n[y])})})},prependTo:function(t,r){return fn(t)||(t=cn(t)),this.for(function(n){t.for(function(t){Wn(t,jn(r,n),t[y])})})},insert:function(){return this.append.apply(this,arguments)},insertTo:function(){return this.appendTo.apply(this,arguments)},insertAfter:function(t,r){return fn(t)||(t=cn(t)),this.for(function(n){t.for(function(t){Wn(t[d],jn(r,n),t.nextSibling)})})},insertBefore:function(t,r){return fn(t)||(t=cn(t)),this.for(function(n){t.for(function(t){Wn(t[d],jn(r,n),t)})})},replace:function(t,n,r,e){return this.clean().replaceWith(i(wn).append(t,n,r,e).children())},replaceContent:function(t,n,r,e){return this.clean().append(t,n,r,e)},replaceWith:function(t,e,i){fn(t)||(t=cn(t));var u=this;return u.for(function(n,r){t.for(function(t){t=u[r]=jn(e,t),i&&On(n,t,h),Dn(n[d],t,n)})})},replaceWithClone:function(){var r=this;return r.for(function(t,n){Dn(t[d],r[n]=Pn(t),t)})},wrap:function(t,n){var r,e,i=this[0],u=i&&i[d],o=[];return u&&(e=kn(i,t,n)[0],n=kn(u,wn,{style:"display:none"})[0],Wn(u,n,i),this.for(function(t){r=Pn(t),o.push(r),$n(e,r),Tn(u,Nn(t))}),Dn(u,e,n)),cn(o)},unwrap:function(t){var n,r=this[0],e=r&&r[d],i=e&&e[d],u=[];return i&&(this.for(function(t){n=Pn(t),u.push(n),Wn(i,n,e),Tn(e,Nn(t))}),!t&&i.hasChildNodes()||Tn(i,Nn(e))),cn(u)}}),an(Cn,{property:function(t,n){return Nt(n)?this.setProperty(t,n):this.getProperty(t)},properties:function(t){return this.getProperties(t)},hasProperty:function(t){return Wt(this[0]&&t in this[0])},setProperty:function(n,t){var r=hn(n,t);return this.for(function(t){for(n in r)t[n]=r[n]})},getProperty:function(t){return zn(this,t)},getProperties:function(t){var n,r=this[0],e={};if(r){if(!(t=Kt(t,Gt)).len())for(n in r)t.push(n);yt(t,function(t){e[t]=r[t]})}return e},set:function(t,n){return this.property(t,n)},get:function(t){return this.property(t)}}),an(Cn,{text:function(t){return Nt(t)?this.setText(t):this.getText()},setText:function(n){return this.for(function(t){t[I]=n})},getText:function(){return zn(this,I)},html:function(t){return Ht(t)||_t(t)?this.getHtml(t):this.setHtml(t)},setHtml:function(n){return this.for(function(t){t[r]=n})},getHtml:function(t){return zn(this,t?"outerHTML":r)},isEmpty:function(t){var n;switch(this.tag()){case"input":case"select":case"textarea":n=this.value();break;case ft:case ct:n=1;break;default:n=this.html()}return kt(t?xt(n):n)}}),an(Cn,{not:function(t,n){var r,e=this,i=[],i=Lt(t)?Bn(e.all(),(qt(n)?cn(t):e.parent().$$(Mn(t))).all()):fn(t)?Bn(e.all(),t.all()):on(t)?_n(t,e):(r=mt(arguments),e.filter(function(t,n){if(!r.has(n+1))return t}));return cn(i)},parent:function(){return cn(zn(this,d))},parents:function(){return cn(qn(this[0],d))},siblings:function(t){var n,r=this[0];return r&&(n=_n(r,qn(r[d],m))).len()&&(t=Mn(t))&&(n=Bn(n,_n(r,cn(r[d]).$$(t).all()),h)),cn(n)},children:function(){return cn(mt(zn(this,m)))},firstChild:function(){return this.$("> :first")},lastChild:function(){return this.$("> :last")},nthChild:function(t){return this.$("> :nth("+t+")")},comments:function(){var t,n=this[0],r=[],e=0;if(n)for(;t=n[g][e++];)8===t[l]&&r.push(t);return cn(r)},prev:function(){return cn(zn(this,A))},prevAll:function(t){var n=this[0],r=[];return n&&(r=qn(n,A).reverse()).len()&&(t=Mn(t))&&(r=Bn(r,cn(n[d]).$$(t).all(),h)),cn(r)},next:function(){return cn(zn(this,b))},nextAll:function(t){var n=this[0],r=[];return n&&(r=qn(n,b)).len()&&(t=Mn(t))&&(r=Bn(r,cn(n[d]).$$(t).all(),h)),cn(r)},equals:function(t,n){return Wt((n=this[0])&&(n==t||n==cn(t)[0]))},matches:function(t,n){return Wt((n=this[0])&&cn(t).has(n))},contains:function(t,n){return Wt((n=this[0])&&cn(t,n).len())},has:function(t){return Lt(t)&&(t=cn(t)[0]),Wt(t&&this.all().has(t))},hasParent:function(){return 0<this.parent().len()},hasParents:function(){return 1<this.parent().parent().len()},hasChild:function(){return 0<this.children().len()},hasChildren:function(){return 1<this.children().len()},hasContent:function(){return!this.isEmpty(h)}}),an(Cn,{getWindow:function(t,n){return cn((n=this[0])&&(t?n.contentWindow:It(n)))},getDocument:function(t,n){return cn((n=this[0])&&(t?n.contentDocument:Rt(n)))},isWindow:function(){return Mt(this[0])},isDocument:function(){return Vt(this[0])}}),an(Cn,{path:function(t){var n,r,e=this[0],i=[];if(on(e)){for(;e;)r=n=nn(e),n=Vn(e,n),e.id&&(r+="#"+e.id),e[U]&&(r+="."+e[U].replace(Xt,".")),i.push(1<n.len()&&!Yt(r,/[#.]/)?r+":nth-child("+(n.index(e)+1)+")":r),e=e[p];return i=i.reverse(),t?i.join(" > "):i}},xpath:function(t){var n,r,e=this[0],i=[];if(on(e)){for(;e;)r=Vn(e,n=nn(e)),i.push(1<r.len()?n+"["+(r.index(e)+1)+"]":n),e=e[p];return i=i.reverse(),t?"/"+i.join("/"):i}}});var In=/rgb/i,Rn=/(?:px|em|%)/i,Fn=/(?:ex|in|[cm]m|p[tc]|v[hw]?min)/i,Xn=/(-?\d*\.?\d+).*/g,Gn=/(?:(?:fill-?)?opacity|z(?:oom|index)|(?:font-?w|line-?h)eight|column(?:-?count|s))/i,Jn=/\s*:\s*/,Un=/\s*;\s*/,Yn=ht[ot].matches||function(t){for(var n=0,r=mt(tn(this[ut],t));n<r.len();)if(r[n++]==this)return h;return c},Kn={};function Qn(n){var r,t=n[ut].styleSheets,e=[];return bt(t,function(t){r=t.rules||t.cssRules,bt(r,function(t){Yn.call(n,t.selectorText)&&e.push(t[J])})}),i.filter(e[e.len()-1]||{})}function Zn(t){return It(t).getComputedStyle(t)}function tr(t,n,r){n=pt(n),(r=Dt(r))&&Ot(r)&&!Yt(n,Gn)&&(r+="px"),t[J][n]=r}function nr(t,n){return n?Zn(t)[pt(n)]||"":Zn(t)}function rr(t){var n,r={};for(t=Dt(t).split(Un);t.len();)(n=t.shift().split(Jn))&&(n[0]=xt(n[0]))&&(r[n[0]]=n[1]||"");return r}function er(t){return Dt(t).replace(Xn,"$1")}function ir(t,n){for(var r,e=2,i=arguments,u=0,n=n||nr(t);r=i[e++];)u+=Tt(er(n[r]));return u}function ur(t){var n,r={};for(n in t)!Ot(n)&&Lt(t[n])&&(r[n]=t[n]);return r}function or(t){return Wt(t&&(t[H]||t[j]))}function fr(t){for(var n=t&&t[p];n;){if(or(n))return h;n=n[p]}return c}function cr(n,t){for(var r=[],e=Rt(n),i=e[at],u=gt(),o=" "+u,f=n[J][it],c=n[p],s=[];c;)or(c)||(s.push({el:c,styleText:c[J][it]}),c[U]+=o,c[J][rt]="",c[J][et]=""),c=c[p];for($n(i,u=En(e,J,{textContent:"."+u+"{display:block!important;visibility:hidden!important}"})),n[U]+=o,n[J][rt]="",n[J][et]="",yt(t,function(t){t=n[t];t.call&&(t=t.call(n)),r.push(t)}),Tn(i,u),n[U]=n[U].remove(o),f&&(n[J][it]=f);c=s.shift();)c.el[U]=c.el[U].remove(o),c.styleText&&(c.el[J][it]=c.styleText);return r}function sr(t){var n,r={width:0,height:0};return on(t)?or(t)&&fr(t)?(r[k]=t[H],r[L]=t[j]):(n=cr(t,[H,j]),r[k]=n[0],r[L]=n[1]):rn(t)&&(t=It(t),r[k]=t[E],r[L]=t[P]),r}function ar(t,n,r){var e=sr(t),i=Ct(e,{innerWidth:e[k],outerWidth:e[k],innerHeight:e[L],outerHeight:e[L]});if(on(t)){if(t=nr(t),(!n||n==k)&&(e[k]&&(i[k]-=ir(v,t,"paddingLeft","paddingRight")+ir(v,t,W,S)),n))return i[n];if((!n||n==E)&&(e[k]&&(i[E]-=ir(v,t,W,S)),n))return i[n];if((!n||n==N)&&(e[k]&&r&&(i[N]+=ir(v,t,C,$)),n))return i[n];if((!n||n==L)&&(e[L]&&(i[L]-=ir(v,t,"paddingTop","paddingBottom")+ir(v,t,T,D)),n))return i[n];if((!n||n==P)&&(e[L]&&(i[P]-=ir(v,t,T,D)),n))return i[n];if((!n||n==O)&&(e[L]&&r&&(i[O]+=ir(v,t,w,x)),n))return i[n]}return n?i[n]:i}function hr(t,n){var r,e={top:0,left:0};return on(t)&&(or(t)&&fr(t)?(e[z]=t[B],e[q]=t[M]):(r=cr(t,[B,M]),e[z]=r[0],e[q]=r[1]),r=Rt(t)[at],e[z]+=r[_],e[q]+=r[V],n&&(n=hr(t[p],n),e[z]+=n[z],e[q]+=n[q])),e}function lr(t){var n={top:0,left:0};return on(t)?(n[z]=t[_],n[q]=t[V]):(rn(t)||en(t))&&(t=It(t),n[z]=t.pageYOffset,n[q]=t.pageXOffset),n}an(Cn,{style:function(t,n){return St(t)||kt(t)?this.removeAttr(J):St(n)||kt(n)?this.removeStyle(t):Lt(n)||Pt(n)||zt(t)||t&&t.has(":")?this.setStyle(t,n):this.getStyle(t,n)},hasStyle:function(t,n){return Wt((n=this[0])&&n[J]&&n[J][it].has(vt("[^-]"+t+":")))},setStyle:function(t,n){var e=t;return Lt(e)&&(e=Et(n)?rr(t):hn(t,n)),this.for(function(r){At(e,function(t,n){tr(r,t,n)})})},getStyle:function(t,n){var r,e=this[0];return e&&(r=nr(e,t),r=kt(r)?v:qt(n)?r:Yt(r,In)?dt.parseRgb(r,h):Yt(r,Rn)||Yt(r,Fn)?Tt(er(r)):r),r},removeStyle:function(t){return"*"==t?this.attr(J,""):(t=Kt(t,Gt),this.for(function(n){yt(t,function(t){tr(n,t,"")})})),this},getStyles:function(t,n){var r=this[0],e={};return r&&(t?(r=cn(r),Kt(t,Gt).each(function(t){e[t]=r.getStyle(t,n)})):e=ur(nr(r))),e},getCssStyles:function(t){var n=this[0],r={};return n&&(r=ur(Qn(n)),t&&(r=Kt(t,Gt).reduce(function(t,n){return t[n]=r[n],t},{}))),r},getInlinedStyles:function(t){var n=this[0],r={};return n&&(r=rr(n[J][it]),t&&(r=Kt(t,Gt).reduce(function(t,n){return t[n]=r[n],t},{}))),r},getComputedStyles:function(t){var n=this[0],e={};return n&&(e=ur(Zn(n)),t&&(e=Kt(t,Gt).reduce(function(t,n,r){return r=e[n],Ht(r)&&(r=e[pt(n)],Ht(r)&&(r=e.cssText.grep(vt(n+"\\s*([^;]+)")))),t[n]=r==u?u:r,t},{}))),e}}),an(Cn,{dims:function(){return sr(this[0])},width:function(){return ar(this[0],k)},innerWidth:function(){return ar(this[0],E)},outerWidth:function(t){return ar(this[0],N,t)},height:function(){return ar(this[0],L)},innerHeight:function(){return ar(this[0],P)},outerHeight:function(t){return ar(this[0],O,t)}}),an(Cn,{offset:function(t){return hr(this[0],t)},scroll:function(){return lr(this[0])},box:function(){var t,n,r,e,i,u,o,f=this[0],c={};return f&&(o=nr(f),t=ir(v,o,W,S),n=ir(v,o,T,D),r=ir(v,o,C,$),e=ir(v,o,w,x),i=ar(f),u=sr(f[p]),o=hr(f),f=lr(f),(c=i).outerWidthMargined=i[k]+r,c.outerHeightMargined=i[L]+e,c.offset=o,c.offset.right=c.offset.x=u[k]-t-(o[q]+i[N]),c.offset.bottom=c.offset.y=u[L]-n-(o[z]+i[O]),c.scroll=f,c.scroll.x=f[q],c.scroll.y=f[z]),c},visible:function(){return or(this[0])}});var dr=/^(?:(?:check|select|disabl)ed|readonly|hidden)$/i;function pr(t,n){return Wt(t&&t.hasAttribute&&t.hasAttribute(n))}function vr(t,n,r,e){on(t)&&(n==X?t[X]=r:n==G&&"option"==nn(t)?t[G]=r:((e=e!==c&&(e||Yt(n,dr)))&&(r=r?"":v),St(r)?yr(t,n):t.setAttribute(n,r),e&&(t[n]=pr(t,n))))}function mr(t,n){return pr(t,n)?t.getAttribute(n):u}function gr(t,n,r){if(on(t))return r=mt(t.attributes),n&&(r=r.map(function(t){return t[F]})),r}function yr(t,n){on(t)&&t.removeAttribute(n)}function br(t){return"data-"+pt(t,h)}function Ar(t){return Wt(t&&("radio"==t.type||"checkbox"==t.type))}function wr(t){return Wt(t&&t[K])}function xr(t,n){return vt("(^|\\s+)"+xt(t).replaceAll(" ","\\s+")+"(\\s+|$)","g",n?"1m":"")}function Cr(t,n,r,e){return Wt((e=Dr(t))&&Yt(e,xr(n,r)))}function $r(n,t){yt(Kt(t,Xt),function(t){Cr(n,t)||Tr(n,Dr(n)+" "+t)})}function Tr(t,n){t&&(t[U]=xt(n))}function Dr(t){return xt(t&&t[U])}function Wr(n,t){yt(Kt(t,Xt),function(t){Tr(n,Dr(n).replace(xr(t)," "))})}function Sr(t){t[o]=t[o]||{}}function kr(t,n){return Wt(t&&Nt(n)?Nt(Er(t,n)):!i.empty(Er(t,"*")))}function Er(t,n,r){var e;if(t)return Sr(t),"*"==(n=xt(n))?(e=t[o],r&&delete t[o]):(e=t[o][n],r&&delete t[o][n]),e}an(Cn,{attr:function(t,n){return zt(t)||Nt(n)||St(n)?this.setAttr(t,n):this.getAttr(t)},attrs:function(t,n){var e=this,r={};if(gr(e[0]).each(function(t){r[t[F]]=Yt(t[F],dr)?t[F]:t[X]}),t){if(Lt(t)&&St(n))return t="*"==t?i.keys(r):Kt(t,Gt),bt(e,function(n){bt(t,function(t){yr(n,t)})}),e;if(zt(t))return At(t,function(n,r){bt(e,function(t){vr(t,n,r)})}),e;r=Kt(t,Gt).reduce(function(t,n){return t[n]=r[n],t},{})}return r},attribute:function(t,n){return this.attr(t,n)},attributes:function(){return this.attrs()},hasAttr:function(t){return pr(this[0],t)},setAttr:function(n,t){var r=hn(n,t);return this.for(function(t){for(n in r)vr(t,n,r[n])})},getAttr:function(t){return mr(this[0],t)},removeAttr:function(t){return t=Kt(t,Gt),this.for(function(n){yt("*"==t[0]?gr(n,h):t,function(t){yr(n,t)})})},toggleAttr:function(t,r){return t=Kt(t,Gt),this.for(function(n){yt(t,function(t){pr(n,t)?yr(n,t):vr(n,t,Nt(r)?r:t)})})},dataAttr:function(t,n){var r;return Lt(t)?t=br(t):zt(t)&&(r={},At(t,function(t,n){r[br(t)]=n}),t=r),this.attr(t,n)},setDataAttr:function(t,n){return this.dataAttr(t,n)},getDataAttr:function(t){return this.dataAttr(t)},removeDataAttr:function(t){return t=Kt(t,Gt),this.for(function(n){t="*"==t[0]?gr(n,h).filter(function(t){return t.startsWith("data-")}):t.map(br),yt(t,function(t){yr(n,t)})})},soId:function(t){return t?this.for(function(t){mr(t,An)||vr(t,An,gt())}):mr(this[0],An)},soAttr:function(t,n){if(!zt(t)&&!Nt(n))return this.attr("so:"+t);var r=hn(t,n);return At(r,function(t,n){r["so:"+t]=n,delete r[t]}),this.attr(r)}}),an(Cn,{value:function(t){return Nt(t)?this.setValue(t):this.getValue()},setValue:function(n){return n=St(n)?"":""+n,this.for(function(t){wr(t)?bt(t[K],function(t){t[X]===n&&(t[Z]=h,vr(t,Z,h,h))}):"textarea"==nn(t)?t[X]=t[I]=n:vr(t,X,n,c)})},getValue:function(){var t,n=this[0];return n&&(t=wr(n)?(t=n[K][n.selectedIndex])&&pr(t,X)?t[X]:"":Ar(n)?n[Q]?n[X]||"on":"":n[X]),t}}),an(Cn,{id:function(t){return this.attr(R,t)},name:function(t){return this.attr(F,t)}}),an(Cn,{class:function(t,n){return Ht(t)?this.getClass():Ht(n)?this.addClass(t):St(n)||kt(n)?this.removeClass(t):_t(n)?this.setClass(t):this.replaceClass(t,n)},classList:function(){return this.getClass().split(Xt).filter()},hasClass:function(t){return Cr(this[0],t)},addClass:function(n){return this.for(function(t){$r(t,n)})},removeClass:function(n){return this.for(function(t){"*"==n&&(n=Dr(t)),Wr(t,n)})},replaceClass:function(n,r){return this.for(function(t){Cr(t,n)?Tr(t,Dr(t).replace(xr(n)," "+xt(r)+" ")):$r(t,r)})},toggleClass:function(n,r,t){var e=this;return e.for(function(t){(Cr(t,n,!!r)?Wr:$r)(t,n)}),r&&(t?$t(t,r,e,e):r(e)),e},toggleClasses:function(n,r,e,t){var i=this;return i.for(function(t){Cr(t,n,!!e)?(Wr(t,n),$r(t,r)):Cr(t,r,!!e)&&(Wr(t,r),$r(t,n))}),e&&(t?$t(t,e,i,i):e(i)),i},setClass:function(n){return this.for(function(t){Tr(t,n)})},getClass:function(){return Dr(this[0])}}),an(Cn,{data:function(t,n){return zt(t)?this.setData(t):Nt(n)?this.setData(t,n):Nt(t)?this.getData(t):this.getData("*")},hasData:function(t){return kr(this[0],t)},setData:function(n,r){return this.for(function(t){!function(t,n,r){if(t)if(Sr(t),Lt(n))t[o][xt(n)]=r;else{var e=hn(n,r);for(n in e)t[o][n]=e[n]}}(t,n,r)})},getData:function(t){return Er(this[0],t)},removeData:function(t){return t=Kt(t,Gt),this.for(function(n){Sr(n),"*"==t[0]?n[o]=v:yt(t,function(t){delete n[o][t]})})}});var Nr=/%20/g,Hr=dt.urlEncode,Lr=dt.urlDecode;function Pr(t,n,r){vr(t,n,r,h)}function Or(t,n){return Wt(t&&t[n])}function jr(t){return _t(t)&&(t=function(t){t.$dom.remove()}),t}function zr(t,n,r,e){var i,u,o;t[J][rt]=n?"none":(u=rt,o=Rt(i=t),n=o[at],t=i[Y],Kn[t]||($n(n,i=En(o,t)),Kn[t]=Zn(i)[pt(u)],Tn(n,i)),Kn[t]),(r=jr(r))&&r(e)}function Br(t){return{opacity:t}}function _r(t){var n=t;return t=Ct({direction:z},t),Ot(n)&&(t[t.direction]=Tt(n)),t}an(Cn,{serialize:function(t){var r,e,n,i=this[0],u=[];return"form"==nn(i)&&(At(i.elements,function(t,n){Ot(t)&&(r=xt(n[F]))&&!n[tt]&&(Ar(n)&&!n[Q]||(e=cn(n).getValue())!=v&&u.push(Hr(r)+"="+Hr(e)))}),n=u.join("&"),qt(t)||(n=n.replace(Nr,"+"))),n},serializeArray:function(){var t,n;return t=this.serialize(c),n=[],t.split("&").each(function(t){t=t.splits("=",2),n.push({key:Lr(t[0]),value:Lr(t[1])})}),n},serializeObject:function(){var t,n;return t=this.serializeArray(),n={},bt(t,function(t){t.key&&(n[t.key]=t.value)}),n},serializeJson:function(){var t,n;return t=this.serializeArray(),n={},bt(t,function(t){t.key&&(n[t.key]=t.value)}),dt.jsonEncode(n)}}),an(Cn,{checked:function(n){return Ht(n)?Or(this[0],Q):this.for(function(t){Pr(t,Q,n)})},selected:function(n){return Ht(n)?Or(this[0],Z):this.for(function(t){Pr(t,Z,n)})},disabled:function(n){return Ht(n)?Or(this[0],tt):this.for(function(t){Pr(t,tt,n)})},readonly:function(n){return Ht(n)?Or(this[0],nt):this.for(function(t){Pr(t,nt,n)})},hidden:function(n){return Ht(n)?Or(this[0],"hidden"):this.for(function(t){Pr(t,"hidden",n)})}}),lt&&an(Cn,{on:function(t,n,e){return this.for(function(r){Lt(t)?lt.on(r,t,n,e):zt(t)&&At(t,function(t,n){lt.on(r,t,n)})})},off:function(t,n,e){return this.for(function(r){Lt(t)?lt.off(r,t,n,e):zt(t)&&At(t,function(t,n){lt.off(r,t,n)})})},once:function(t,n,e){return this.for(function(r){Lt(t)?lt.once(r,t,n,e):zt(t)&&At(t,function(t,n){lt.once(r,t,n)})})},fire:function(n,r,e){return zt(r)&&(e=r,r=v),this.for(function(t){lt.fire(t,n,r,e)})},event:function(t,n,r){return this.on(t,n,r)},hasEvent:function(t,n,r){return lt.has(this[0],t,n,r)}}),an(Cn,{observe:function(n){try{var i=this;return i.for(function(e){e[s]=new MutationObserver(function(t){bt(t,function(r){At(n,function(t,n){r.type==t&&n.call(e,e,i,r)})})}),e[s].options=n,e[s].observe(e,n)})}catch(t){Ft(t)}},unobserve:function(){return this.for(function(t){t[s]&&t[s].disconnect()})}});var qr=i.animation&&i.animation.animate;function Mr(t,n,r){var e,i,u=n||ht,o=u.evaluate,f=u&&u[ot],n=f&&f.selectNodes,c=[];if(!f)throw"No XPath support by root!";if(o)for(i=o.call(u,t,f,v,0,v);(e=i.iterateNext())&&(c.push(e),!r););else n&&(c=n.call(u,t),r&&(c=c[0]));return(u=cn(c))._selector=t,u}function Vr(t,n,r){return Bt(n)?cn(t).each(n,r):cn(t,n,r)}qr&&an(Cn,{animate:function(n,r,e,i){return qt(n)?this.for(function(t,n){(n=t[f])&&n.running&&n.stop()}):this.for(function(t){qr(t,n,r,e,i)})},animated:function(){return Wt(this[0]&&Nt(this[0][f]))},stop:function(){return this.animate(c)},fade:function(t,n,r){return this.animate(Br(t),n,r)},fadeIn:function(t,n){return this.fade(1,t,n)},fadeOut:function(t,n){return this.fade(0,t,jr(n))},show:function(n,r){return this.for(function(t){zr(t),qr(t,Br(1),n||0,r)})},hide:function(t,r){return this.for(function(n){qr(n,Br(0),t||0,function(t){zr(n,h,r,t)})})},toggle:function(t,r){return t=t||0,this.for(function(n){or(n)?qr(n,Br(0),t,function(t){zr(n,h,r,t)}):(zr(n),qr(n,Br(1),t,r))})},toggleDisplay:function(t,n){var r=this;return r.for(function(t){or(t)?tr(t,rt,"none"):tr(t,rt,"")}),t&&(n?$t(n,t,r,r):t(r)),r},toggleWith:function(t,r,e){r=r||0;var i=cn(t);return this.for(function(n){or(n)?qr(n,Br(0),r,function(t){zr(n,h,e,t),i.for(function(n){qr(n,Br(0),r,function(t){zr(n,h,e,t)})})}):(zr(n),qr(n,Br(1),r,function(){i.for(function(n){or(n)?qr(n,Br(0),r,function(t){zr(n,h,e,t)}):(zr(n),qr(n,Br(1),r,e))})}))})},toggleBy:function(t,n,r){return this[t?"show":"hide"](n,r)},blip:function(e,i,u){return e=e||1/0,i=i||255,this.for(function(n){var r=0<e?1:0;!function t(){r&&e<r?u&&u():qr(n,Br(0),i,function(){qr(n,Br(1),i,t),r++})}()})},scrollTo:function(r,e){return r=_r(r),this.for(function(t){(rn(t)||en(t))&&(t=Rt(t).scrollingElement||Rt(t)[ot]);var n={};n[_]=r[z]!=v?r[z]:t[B],n[V]=r[q]!=v?r[q]:t[M],r[z]!=v&&r.gapTop&&(n[_]-=Tt(r.gapTop)),r[q]!=v&&r.gapLeft&&(n[V]-=Tt(r.gapLeft)),qr(t,n,r.speed,r.easing,e)})},scrollAt:function(t,n,r){var e,i=cn(t)[0];return i&&((n=_r(n)).relative=n.relative||"absolute"==Qn(i).position,e={},t=hr(i,n.relative),n.direction&&(e[n.direction]=t[n.direction]),(n=Ct(n,e)).noGap&&(n[z]!=v&&i[p]&&(n[z]=n[z]-i[p][B]),n[q]!=v&&i[p]&&(n[q]=n[q]-i[p][M])),this.scrollTo(n,r)),this}}),Ct(Vr,{find:function(t,n){return cn(t,n,h)},findAll:function(t,n){return cn(t,n)},xfind:function(t,n){return Mr(t,n,h)},xfindAll:function(t,n){return Mr(t,n)},define:function(t,n){var r=Object.keys(Cn[e]);At(hn(t,n),function(t,n){if(r.has(t))throw"Cannot override Dom."+t+"!";Cn[e][t]=n})},create:function(t,n,r){return Sn(t,r,n)},createDom:function(t,n,r){return cn(Sn(t,r,n))},loadStyle:function(t,n,r,e){Bt(n)&&(r=n,n=v);var i=En(v,"link");i.href=t,i.onload=r,i.rel="stylesheet",e&&At(e,function(t,n){vr(i,t,n)}),$n(cn(n||ht.head)[0],i)},loadScript:function(t,n,r,e){Bt(n)&&(r=n,n=v);var i=En(v,"script");i.src=t,i.onload=r,e&&At(e,function(t,n){vr(i,t,n)}),$n(cn(n||ht.head)[0],i)},q:function(t,n){return Zt(n||ht,t)},qa:function(t,n){return mt(tn(n||ht,t))}}),i.dom=Vr}(window.so,null,!0,!1);