UNPKG

betajs-browser

Version:

BetaJS-Browser is a client-side JavaScript framework for Browser-specific methods.

7 lines (6 loc) 76.1 kB
/*! betajs-browser - v1.0.138 - 2023-03-03 Copyright (c) Oliver Friedmann,Rashad Aliyev Apache-2.0 Software License. */ var Scoped=function(){var p=function(){return{get:function(e){return"undefined"!=typeof window?e?window[e]:window:"undefined"!=typeof global?e?global[e]:global:"undefined"!=typeof self?e?self[e]:self:undefined},set:function(e,t){return"undefined"!=typeof window&&(window[e]=t),"undefined"!=typeof global&&(global[e]=t),"undefined"!=typeof self&&(self[e]=t),t},getPath:function(e){if(!e)return this.get();var t=e.split(".");if(1==t.length)return this.get(e);for(var n=this.get(t[0]),i=1;i<t.length;++i){if(!n)return n;n=n[t[i]]}return n},setPath:function(e,t){var n=e.split(".");if(1==n.length)return this.set(e,t);for(var i=this.get(n[0])||this.set(n[0],{}),o=1;o<n.length-1;++o)n[o]in i||(i[n[o]]={}),i=i[n[o]];return i[n[n.length-1]]=t}}}.call(this),f=function(){return{method:function(e,t){return function(){return t.apply(e,arguments)}},extend:function(e,t){for(var n in e=e||{},t=t||{})e[n]=t[n];return e},typeOf:function(e){return"[object Array]"===Object.prototype.toString.call(e)?"array":typeof e},isEmpty:function(e){if(null==e)return!0;if("array"==this.typeOf(e))return 0===e.length;if("object"!=typeof e)return!1;for(var t in e)return!1;return!0},matchArgs:function(e,t){var n,i=0,o={};for(n in t)!0===t[n]||this.typeOf(e[i])==t[n]?(o[n]=e[i],i++):"undefined"==this.typeOf(e[i])&&i++;return o},stringify:function(e){return"function"==this.typeOf(e)?""+e:JSON.stringify(e)}}}.call(this),s=function(){return{__namespace:"Scoped",__revert:null,upgrade:function(e){var t=p.get(e||s.__namespace);if(t&&"object"===f.typeOf(t)&&t.guid===this.guid&&"string"===f.typeOf(t.version)){if(!1===this.upgradable||!1===t.upgradable)return t;for(var n=this.version.split("."),i=t.version.split("."),o=!1,r=0;r<Math.min(n.length,i.length)&&(o=parseInt(n[r],10)>parseInt(i[r],10),n[r]===i[r]);++r);return o?this.attach(e):t}return this.attach(e)},attach:function(e){e&&(s.__namespace=e);e=p.get(s.__namespace);if(e===this)return this;if(s.__revert=e)try{var t=e.__exportScoped();this.__exportBackup=this.__exportScoped(),this.__importScoped(t)}catch(n){}return p.set(s.__namespace,this),this},detach:function(e){return e&&p.set(s.__namespace,null),"undefined"!=typeof s.__revert&&p.set(s.__namespace,s.__revert),delete s.__revert,s.__exportBackup&&this.__importScoped(s.__exportBackup),this},exports:function(e,t,n){return"object"==typeof(e=e||("undefined"!=typeof module?module:null))&&e&&"exports"in e&&(n||e.exports===this||!e.exports||f.isEmpty(e.exports))&&(e.exports=t||this),this}}}.call(this);function m(e){var s={tree:"boolean"==typeof e.tree&&e.tree,global:"boolean"==typeof e.global&&e.global,root:"object"==typeof e.root?e.root:{}};function o(e){return{route:"string"==typeof e.route?e.route:null,parent:"object"==typeof e.parent?e.parent:null,ready:"boolean"==typeof e.ready&&e.ready,children:{},watchers:[],data:{},lazy:[]}}var r=o({ready:!0});if(s.tree)if(s.global){try{window&&(r.data=window)}catch(t){}try{global&&(r.data=global)}catch(t){}try{self&&(r.data=self)}catch(t){}}else r.data=s.root;function a(e){if(!e.ready)if(!e.parent||e.parent.ready){if(e.route&&e.parent&&e.route in e.parent.data){e.data=e.parent.data[e.route],e.ready=!0;for(var t,n=0;n<e.watchers.length;++n)e.watchers[n].callback.call(e.watchers[n].context||this,e.data);for(t in e.watchers=[],e.children)a(e.children[t])}}else a(e.parent)}function n(e,t){if("object"==typeof t&&e.ready)for(var n in t)e.data[n]=t[n];else e.data=t;if("object"==typeof t)for(var i in t)e.children[i]&&(e.children[i].data=t[i]);for(var o in!function r(e){if(!e.ready){e.parent&&!e.parent.ready&&r(e.parent),e.ready=!0,e.parent&&s.tree&&"object"==typeof e.parent.data&&(e.parent.data[e.route]=e.data);for(var t=0;t<e.watchers.length;++t)e.watchers[t].callback.call(e.watchers[t].context||this,e.data);e.watchers=[]}}(e),e.children)a(e.children[o])}function i(e){if(!e)return r;for(var t=e.split("."),n=r,i=0;i<t.length;++i)t[i]in n.children?n=n.children[t[i]]:(n.children[t[i]]=o({parent:n,route:t[i]}),a(n=n.children[t[i]]));return n}return{extend:function(e,t){n(i(e),t)},set:function(e,t){e=i(e);e.data&&function(e){if(e.ready&&e.data)for(var t in e.data)delete e.data[t]}(e),n(e,t)},get:function(e){e=i(e);return e.ready?e.data:null},lazy:function(e,t,n){e=i(e);e.ready?t(n||this,e.data):e.lazy.push({callback:t,context:n})},digest:function(e){a(i(e))},obtain:function(e,t,n){!function(e,t,n){var i;e.ready?t.call(n||this,e.data):(e.watchers.push({callback:t,context:n}),0<e.lazy.length&&(i=function(e){var t;0<e.lazy.length&&((t=e.lazy.shift()).callback.call(t.context||this,e.data),i(e))})(e))}(i(e),t,n)},unresolvedWatchers:function(e){return function o(e,t,n){for(var i in n=n||[],!(e=e||r).ready&&0===e.lazy.length&&0<e.watchers.length&&n.push(t),e.children)i=e.children[i],n=o(i,(t?t+".":"")+i.route,n);return n}(i(e),e)},__export:function(){return{options:s,nsRoot:r}},__import:function(e){s=e.options,r=e.nsRoot}}}var t=m({tree:!0,global:!0}),n=m({tree:!0}),i=function _(e,t,n,i){var o=null,r=[],s=t,a=n,u=i,c=m({tree:!0}),l=m({tree:!1}),d={global:{namespace:u},root:{namespace:a},local:{namespace:c},"default":{namespace:l},parent:{namespace:s},scope:{namespace:c,readonly:!1}},h=function(r,s,a){var u=f.matchArgs(r,{options:"object",namespaceLocator:!0,dependencies:"array",hiddenDependencies:"array",callback:!0,context:"object"}),e=f.extend({lazy:this.options.lazy},u.options||{}),c=this.resolve(u.namespaceLocator),t=function(){this.require(u.dependencies,u.hiddenDependencies,function(){for(var e=[],t=0;t<arguments.length;++t)e.push(arguments[t]);if(e[e.length-1].ns=c,this.options.compile){for(var n=[],i=0;i<r.length;++i)n.push(f.stringify(r[i]));this.compiled+=this.options.ident+"."+s+"("+n.join(", ")+");\n\n"}this.options.dependencies&&(this.dependencies[c.path]=this.dependencies[c.path]||{},u.dependencies&&u.dependencies.forEach(function(e){this.dependencies[c.path][this.resolve(e).path]=!0},this),u.hiddenDependencies&&u.hiddenDependencies.forEach(function(e){this.dependencies[c.path][this.resolve(e).path]=!0},this));var o=this.options.compile?{}:u.callback.apply(u.context||this,e);a.call(this,c,o)},this)};return e.lazy?c.namespace.lazy(c.path,t,this):t.apply(this),this};return{getGlobal:f.method(p,p.getPath),setGlobal:f.method(p,p.setPath),options:{lazy:!1,ident:"Scoped",compile:!1,dependencies:!1},compiled:"",dependencies:{},nextScope:function(){return o=o||_(0,c,a,u)},subScope:function(){var e=this.nextScope();return r.push(e),o=null,e},binding:function(e,t,n){return d[e]&&d[e].readonly||(t="string"!=f.typeOf(t)?{namespace:m({tree:!0,root:t}),path:null}:this.resolve(t),d[e]=f.extend(n,t)),this},resolve:function(e){var t=e.split(":");if(1==t.length)throw"The locator '"+t[0]+"' requires a namespace.";if(!(e=d[t[0]]))throw"The namespace '"+t[0]+"' has not been defined (yet).";return{namespace:e.namespace,path:e.path&&t[1]?e.path+"."+t[1]:e.path||t[1]}},define:function(){return h.call(this,arguments,"define",function(e,t){if(e.namespace.get(e.path))throw"Scoped namespace "+e.path+" has already been defined. Use extend to extend an existing namespace instead";e.namespace.set(e.path,t)})},assumeVersion:function(){var r=f.matchArgs(arguments,{assumption:!0,dependencies:"array",callback:!0,context:"object",error:"string"}),e=r.dependencies||[];e.unshift(r.assumption),this.require(e,function(){var e=arguments,t=e[0].replace(/[^\d\.]/g,"");e[0]=t.split(".");for(var n=0;n<e[0].length;++n)e[0][n]=parseInt(e[0][n],10);if("function"===f.typeOf(r.callback)){if(!r.callback.apply(r.context||this,r))throw"Scoped Assumption '"+r.assumption+"' failed, value is "+t+(r.error?", but assuming "+r.error:"")}else for(var i=(r.callback+"").replace(/[^\d\.]/g,"").split("."),o=0;o<Math.min(e[0].length,i.length);++o)if(parseInt(i[o],10)>e[0][o])throw"Scoped Version Assumption '"+r.assumption+"' failed, value is "+t+", but assuming at least "+r.callback})},extend:function(){return h.call(this,arguments,"extend",function(e,t){e.namespace.extend(e.path,t)})},require:function(){var t=f.matchArgs(arguments,{dependencies:"array",hiddenDependencies:"array",callback:"function",context:"object"});t.callback=t.callback||function(){};var e=t.dependencies||[],n=e.concat(t.hiddenDependencies||[]),i=n.length,o=[],r={};if(i)for(var s=function(e){this.i<o.length&&(o[this.i]=e),0==--i&&(o.push(r),t.callback.apply(t.context||this.ctx,o))},a=0;a<n.length;++a){var u=this.resolve(n[a]);a<e.length&&o.push(null),u.namespace.obtain(u.path,s,{ctx:this,i:a})}else o.push(r),t.callback.apply(t.context||this,o);return this},digest:function(e){return(e=this.resolve(e)).namespace.digest(e.path),this},unresolved:function(e){return(e=this.resolve(e)).namespace.unresolvedWatchers(e.path)},__export:function(){return{parentNamespace:s.__export(),rootNamespace:a.__export(),globalNamespace:u.__export(),localNamespace:c.__export(),privateNamespace:l.__export()}},__import:function(e){s.__import(e.parentNamespace),a.__import(e.rootNamespace),u.__import(e.globalNamespace),c.__import(e.localNamespace),l.__import(e.privateNamespace)}}}(0,n,n,t),e=f.extend(i,function(){return{guid:"4b6878ee-cb6a-46b3-94ac-27d91f58d666",version:"0.0.22",upgradable:!0,upgrade:s.upgrade,attach:s.attach,detach:s.detach,exports:s.exports,__exportScoped:function(){return{globalNamespace:t.__export(),rootNamespace:n.__export(),rootScope:i.__export()}},__importScoped:function(e){t.__import(e.globalNamespace),n.__import(e.rootNamespace),i.__import(e.rootScope)}}}.call(this));return(e=e.upgrade()).exports(),e}.call(this);!function(){var e=this.subScope();e.binding("module","global:BetaJS.Browser"),e.binding("base","global:BetaJS"),e.define("module:",function(){return{guid:"02450b15-9bbf-4be2-b8f6-b483bc015d06",version:"1.0.138",datetime:1677885475806}}),e.assumeVersion("base:version","~1.0.104"),e.define("module:Ajax.IframePostmessageAjax",["base:Ajax.Support","base:Net.Uri","base:Net.HttpHeader","base:Promise","base:Types","base:Ajax.RequestException","base:Tokens","base:Objs"],function(c,l,e,d,h,t,p,f){var m=1,n={supports:function(e){return!!e.postmessage},execute:function(t){var n="postmessage_"+p.generate_token()+"_"+m++,e=f.objectBy(t.postmessage,n),e=f.extend(e,t.query),e=l.appendUriParams(t.uri,e),i=document.createElement("iframe");i.id=n,i.name=n,i.style.display="none";var o=document.createElement("form");o.method=t.method,o.target=n,e=c.finalizeUri(t,e),o.action=e,o.style.display="none";var r=d.create();document.body.appendChild(i),document.body.appendChild(o),f.iter(t.data,function(e,t){var n=document.createElement("input");n.type="hidden",n.name=t,n.value=h.is_array(e)||h.is_object(e)?JSON.stringify(e):e,o.appendChild(n)},this);var s=!("postMessage"in window),a=null,u=function(e){a(e.data)},a=function(e){"string"==typeof e&&(e=JSON.parse(e)),n in e&&(e=e[n],s&&(window.postMessage=null),window.removeEventListener("message",u,!1),document.body.removeChild(o),document.body.removeChild(i),c.promiseReturnData(r,t,e,"json"))};return i.onerror=function(){s&&(window.postMessage=null),window.removeEventListener("message",u,!1),document.body.removeChild(o),document.body.removeChild(i)},window.addEventListener("message",u,!1),s&&(window.postMessage=a),o.submit(),r}};return c.register(n,4),n}),e.define("module:Ajax.JsonpScriptAjax",["base:Ajax.Support","base:Net.Uri","base:Net.HttpHeader","base:Promise","base:Types","base:Ajax.RequestException","base:Tokens","base:Objs","base:Async","module:Info"],function(u,c,l,d,e,t,h,p,f,m){var _=1,n={supports:function(e){return!!e.jsonp&&"GET"===e.method},execute:function(n){var i="jsonp_"+h.generate_token()+"_"+_++,e=p.objectBy(n.jsonp,i),e=p.extend(e,n.query);e=p.extend(e,n.data);var e=c.appendUriParams(n.uri,e),o=!1;window[i]=function(e){if(!o){o=!0;try{delete window[i]}catch(t){window[i]=undefined}u.promiseReturnData(r,n,e,"json")}};var r=d.create(),t=document.getElementsByTagName("head")[0],s=document.createElement("script"),a=!1;return s.onerror=function(e){e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0),o||(o=!0,u.promiseRequestException(r,l.HTTP_STATUS_BAD_REQUEST,l.format(l.HTTP_STATUS_BAD_REQUEST),null,"json"))},s.onload=s.onreadystatechange=function(){a||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(a=!0,s.onload=s.onreadystatechange=null,t.removeChild(s),m.isInternetExplorer()&&m.internetExplorerVersion()<9&&f.eventually(function(){o||s.onerror()}))},e=u.finalizeUri(n,e),s.src=e,t.appendChild(s),r}};return u.register(n,5),n}),e.define("module:Ajax.XDomainRequestAjax",["base:Ajax.Support","base:Net.Uri","base:Net.HttpHeader","base:Promise","base:Types","base:Ajax.RequestException","module:Info","base:Async","base:Ids"],function(o,r,s,a,u,e,t,c,l){var d={__requests:{},supports:function(e){return!!window.XDomainRequest&&(!e.forceJsonp&&!e.forcePostmessage&&(!!e.isCorsRequest&&!(!t.isInternetExplorer()||9<t.internetExplorerVersion())))},execute:function(e){var t=r.appendUriParams(e.uri,e.query||{});"GET"===e.method&&(t=r.appendUriParams(t,e.data||{}));var n=a.create(),i=new XDomainRequest;return(d.__requests[l.objectId(i)]=i).onload=function(){o.promiseReturnData(n,e,i.responseText,"json"),delete d.__requests[l.objectId(i)]},i.ontimeout=function(){o.promiseRequestException(n,s.HTTP_STATUS_GATEWAY_TIMEOUT,s.format(s.HTTP_STATUS_GATEWAY_TIMEOUT),null,"json"),delete d.__requests[l.objectId(i)]},i.onerror=function(){o.promiseRequestException(n,s.HTTP_STATUS_BAD_REQUEST,s.format(s.HTTP_STATUS_BAD_REQUEST),null,"json"),delete d.__requests[l.objectId(i)]},t=o.finalizeUri(e,t),i.open(e.method,t),c.eventually(function(){"GET"===e.method||u.is_empty(e.data)?i.send():"json"===e.contentType?i.send(JSON.stringify(e.data)):i.send(r.encodeUriParams(e.data,undefined,!0))},this),n}};return o.register(d,9),d}),e.define("module:Ajax.XmlHttpRequestAjax",["base:Ajax.Support","base:Net.Uri","base:Net.HttpHeader","base:Promise","base:Types","base:Objs","base:Ajax.RequestException","module:Info"],function(u,c,l,d,h,p,e,f){var t={supports:function(t){if("undefined"==typeof window)return!0;if(!window.XMLHttpRequest)return!1;if(t.forceJsonp||t.forcePostmessage)return!1;if(f.isInternetExplorer()&&f.internetExplorerVersion()<10&&t.isCorsRequest)return!1;try{p.iter(t.data,function(e){("undefined"!=typeof window.Blob&&e instanceof window.Blob||"undefined"!=typeof File&&e instanceof File)&&(t.requireFormData=!0)}),t.requireFormData&&new window.FormData}catch(e){t.requireFormData=!1}return!0},create:function(){return new XMLHttpRequest},execute:function(e,t,n,i){var o=c.appendUriParams(e.uri,e.query||{});e.methodSupportsPayload||(o=c.appendUriParams(o,e.data||{}));var r=d.create();(i=i||this.create()).onreadystatechange=function(){4===i.readyState&&(l.isSuccessStatus(i.status)||0===i.status&&i.responseText?u.promiseReturnData(r,e,"binary"===e.contentType?i.response:"xml"===e.contentType?i.responseXML:i.responseText,e.decodeType||"json"):u.promiseRequestException(r,i.status,i.statusText,i.responseText,e.decodeType||"json"))},t&&((i.upload||i).onprogress=function(e){e.lengthComputable&&t.call(n||this,e.loaded,e.total)});var s,o=u.finalizeUri(e,o),a=c.parse(o);return f.isFirefox()&&a.user&&a.password&&(o=o.replace(a.user+":"+a.password+"@","")),i.open(e.method,o,!0),e.corscreds&&(i.withCredentials=!0),e.bearer&&i.setRequestHeader("Authorization","Bearer "+e.bearer),e.accept&&i.setRequestHeader("Accept",e.accept),"binary"===e.contentType&&(i.responseType="blob"),(a.user||a.password)&&i.setRequestHeader("Authorization","Basic "+btoa(a.user+":"+a.password)),e.methodSupportsPayload&&!h.is_empty(e.data)?e.noFormData?i.send(e.data.file):e.requireFormData?(s=new window.FormData,p.iter(e.data,function(e,t){s.append(t,e)},this),i.send(s)):"json"===e.contentType?(e.sendContentType&&i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.send(JSON.stringify(e.data))):"xml"===e.contentType?(i.overrideMimeType("application/xml"),i.send(JSON.stringify(e.data))):(e.sendContentType&&i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.send(c.encodeUriParams(e.data,undefined,!0))):i.send(),r}};return u.register(t,10),t}),e.define("module:Apps",["base:Time","base:Async","base:Promise","module:Info","module:Loader"],function(i,o,r,s,e){return{STATE_INCOMPATIBLE_DEVICE:1,STATE_APP_LAUNCHED:2,STATE_APP_INSTALLED_AND_LAUNCHED:3,STATE_APP_NOT_INSTALLED:4,STATE_UNKNOWN:5,launch:function(e){var t=r.create(),n=i.now();return s.isiOS()&&e.ios?(o.eventually(function(){3e3<i.now()-n?t.asyncSuccess(this.STATE_APP_LAUNCHED):(n=i.now(),o.eventually(function(){3e3<i.now()-n?t.asyncSuccess(this.STATE_APP_INSTALLED_AND_LAUNCHED):t.asyncError(this.STATE_APP_NOT_INSTALLED)},this,2500),document.location=e.ios.install)},this,2500),document.location=e.ios.launch):t.asyncError(this.STATE_INCOMPATIBLE_DEVICE),t},appStoreLink:function(e){return"itms://itunes.apple.com/us/app/"+e+"?mt=8&uo=4"},playStoreLink:function(e){return"https://play.google.com/store/apps/details?id=<"+e+">"},iOSAppURL:function(e,t){return e+"://"+t},androidAppUrl:function(e,t){return e+"://"+t},googleIntent:function(e,t,n){return"intent://"+t+";scheme="+e+";package="+n+";end"}}}),e.define("module:Blobs",["base:Promise"],function(o){return{createBlobByArrayBufferView:function(e,t,n,i){try{return new window.Blob([new DataView(e,t,n)],{type:i})}catch(r){try{return new window.Blob([new Uint8Array(e,t,n)],{type:i})}catch(s){var o=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder);return o.append(e.slice(t,t+n)),o.getBlob(i)}}},loadFileIntoArrayBuffer:function(e){var t=o.create();try{var n=new FileReader;n.onloadend=function(e){t.asyncSuccess(e.target.result)},n.readAsArrayBuffer(e.files?e.files[0]:e)}catch(i){t.asyncError(i)}return t},loadFileIntoString:function(e){var t=o.create();try{var n=new FileReader;n.onloadend=function(e){t.asyncSuccess(e.target.result)},n.readAsText(e.files?e.files[0]:e)}catch(i){t.asyncError(i)}return t}}}),e.define("module:Cookies",["base:Net.Cookies"],function(a){return{get:function(e){return a.getCookielikeValue(document.cookie,e)},set:function(e,t,n,i,o,r,s){document.cookie=a.createCookielikeValue(e,t,n,i,o,r,s)},remove:function(e,t,n,i){document.cookie=a.removeCookielikeValue(e,t,n,i)},has:function(e){return a.hasCookielikeValue(document.cookie,e)},keys:function(){return a.keysCookielike(document.cookie)}}}),e.define("module:Events",["base:Class","base:Objs","base:Functions","module:Dom"],function(e,t,s,a,n){return e.extend({scoped:n},function(e){return{constructor:function(){e.constructor.call(this),this.__callbacks={}},destroy:function(){this.clear(),e.destroy.call(this)},on:function(n,e,i,o,r){return e.split(" ").forEach(function(e){var t;e&&(t=s.as_method(i,o||n),n.addEventListener(e,t,!(!r||!a.passiveEventsSupported())&&r),this.__callbacks[e]=this.__callbacks[e]||[],this.__callbacks[e].push({element:n,callback_function:t,callback:i,context:o}))},this),this},off:function(o,e,r,s){return e.split(" ").forEach(function(e){if(e){var t=this.__callbacks[e];if(t)for(var n=0;n<t.length;){var i=t[n];o&&o!==i.element||r&&r!==i.callback||s&&s!==i.context?++n:(i.element.removeEventListener(e,i.callback_function,!1),t[n]=t[t.length-1],t.pop())}}},this),this},clear:function(){t.iter(this.__callbacks,function(e,t){e.forEach(function(e){e.element.removeEventListener(t,e.callback_function,!1)})}),this.__callbacks={}}}})}),e.define("module:FlashDetect",["base:Class"],function(e,t){return e.extend({scoped:t},function(s){return{constructor:function(){if(s.constructor.call(this),this.__version=null,navigator.plugins&&0<navigator.plugins.length){var e="application/x-shockwave-flash",t=navigator.mimeTypes;t&&t[e]&&t[e].enabledPlugin&&t[e].enabledPlugin.description&&(this.__version=this.parseVersion(t[e].enabledPlugin.description))}else if(-1==navigator.appVersion.indexOf("Mac")&&"execScript"in window)for(var n=0;n<this.__activeXDetectRules.length;n++)try{var i=new ActiveXObject(this.__activeXDetectRules[n].name),o=this.__activeXDetectRules[n].version(i);if(o){this.__version=this.parseActiveXVersion(o);break}}catch(r){}},parseVersion:function(e){var t=e.split(/ +/),n=t[2].split(/\./),t=t[3];return{raw:e,major:parseInt(n[0],10),minor:parseInt(n[1],10),revisionStr:t,revision:parseInt(t.replace(/[a-zA-Z]/g,""),10)}},parseActiveXVersion:function(e){var t=e.split(",");return{raw:e,major:parseInt(t[0].split(" ")[1],10),minor:parseInt(t[1],10),revision:parseInt(t[2],10),revisionStr:t[2]}},version:function(){return this.__version},installed:function(){return null!==this.__version},supported:function(){var e=navigator.userAgent;return this.installed()||!(-1!=e.indexOf("iPhone")||-1!=e.indexOf("iPod")||-1!=e.indexOf("iPad"))},majorAtLeast:function(e){return this.installed()&&this.version().major>=e},minorAtLeast:function(e){return this.installed()&&this.version().minor>=e},revisionAtLeast:function(e){return this.installed()&&this.version().revision>=e},versionAtLeast:function(e){if(!this.installed())return!1;for(var t=[this.version().major,this.version().minor,this.version().revision],n=Math.min(t.length,arguments.length),i=0;i<n;i++)if(t[i]!=arguments[i])return arguments[i]<t[i];return!0},__activeXDetectRules:[{name:"ShockwaveFlash.ShockwaveFlash.7",version:function(e){try{return e.GetVariable("$version")}catch(t){return null}}},{name:"ShockwaveFlash.ShockwaveFlash.6",version:function(e){try{e.AllowScriptAccess="always";try{return e.GetVariable("$version")}catch(t){return null}}catch(t){return"6,0,21"}}},{name:"ShockwaveFlash.ShockwaveFlash",version:function(e){try{return e.GetVariable("$version")}catch(t){return null}}}]}})}),e.define("module:FlashHelper",["base:Time","base:Objs","base:Types","base:Net.Uri","base:Ids","module:Info","module:Dom"],function(r,s,a,u,c,o,l){return{getFlashObject:function(e){var t=(e=l.unbox(e)).getElementsByTagName("EMBED")[0];if(!(t=(t=o.isInternetExplorer()&&o.internetExplorerVersion()<=10?null:t)||e.getElementsByTagName("OBJECT")[0]))for(var n=document.getElementsByTagName("OBJECT"),i=0;i<n.length;++i)e.contains(n[i])&&(t=n[i]);return t},embedTemplate:function(e){e=e||{};var t=[];t.push({objectKey:"classid",value:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"}),t.push({objectKey:"codebase",value:"https://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"}),t.push({embedKey:"align",value:"middle"}),t.push({embedKey:"play",value:"true"}),t.push({embedKey:"loop",value:"false"}),t.push({embedKey:"type",value:"application/x-shockwave-flash"}),t.push({embedKey:"pluginspage",value:"https://get.adobe.com/flashplayer"}),t.push({objectParam:"quality",embedKey:"quality",value:"high"}),t.push({objectParam:"allowScriptAccess",embedKey:"allowScriptAccess",value:"always"}),t.push({objectParam:"wmode",embedKey:"wmode",value:"opaque"}),t.push({objectParam:"movie",embedKey:"src",value:e.flashFile+(e.forceReload?"?"+r.now():"")}),e.width&&t.push({objectKey:"width",embedKey:"width",value:e.width}),e.height&&t.push({objectKey:"height",embedKey:"height",value:e.height}),e.bgcolor&&t.push({objectParam:"bgcolor",embedKey:"bgcolor",value:e.bgcolor}),e.FlashVars&&t.push({objectParam:"FlashVars",embedKey:"FlashVars",value:a.is_object(e.FlashVars)?u.encodeUriParams(e.FlashVars):e.FlashVars}),t.push({objectKey:"id",value:e.objectId||c.uniqueId("flash")});var n=[],i=[],o=[];return s.iter(t,function(e){e.objectKey&&n.push(e.objectKey+'="'+e.value+'"'),e.embedKey&&o.push(e.embedKey+'="'+e.value+'"'),e.objectParam&&i.push('<param name="'+e.objectParam+'" value="'+e.value+'" />')},this),"<object "+n.join(" ")+">"+i.join(" ")+"<embed "+o.join(" ")+"></embed></object>"},embedFlashObject:function(e,t){if(e=l.unbox(e),(t=t||{}).parentBgcolor)try{var n,i,o=e.style.backgroundColor||"";0<=o.indexOf("rgb")&&(n=o.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/),i=function(e){return("0"+parseInt(e,10).toString(16)).slice(-2)},n&&3<n.length&&(o="#"+i(n[1])+i(n[2])+i(n[3]))),t.bgcolor=o}catch(s){}if(t.fixHalfPixels)try{var r=l.elementOffset(e);r.top%1!=0&&(e.style.marginTop=Math.round(r.top)-r.top+"px"),r.left%1!=0&&(e.style.marginLeft=Math.round(r.left)-r.left+"px")}catch(s){}return e.innerHTML=this.embedTemplate(t),this.getFlashObject(e)}}}),e.define("module:Hotkeys",["base:Objs"],function(c){return{SHIFT_NUMS:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},SPECIAL_KEYS:{esc:27,escape:27,tab:9,space:32,"return":13,enter:13,backspace:8,scrolllock:145,scroll_lock:145,scroll:145,capslock:20,caps_lock:20,caps:20,numlock:144,num_lock:144,num:144,pause:19,"break":19,insert:45,home:36,"delete":46,end:35,pageup:33,page_up:33,pu:33,pagedown:34,page_down:34,pd:34,left:37,up:38,right:39,down:40,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},MODIFIERS:["ctrl","alt","shift","meta"],keyCodeToCharacter:function(e){return 188==e?",":190==e?".":String.fromCharCode(e).toLowerCase()},handleKeyEvent:function(e,t,n){n=c.extend({disable_in_input:!1,keycode:!1},n);var i=e.toLowerCase().split("+");if(n.disable_in_input){var o=t.target||t.srcElement||null;if((o=o&&3==o.nodeType?o.parentNode:o)&&("INPUT"==o.tagName||"TEXTAREA"==o.tagName))return!1}var r=t.keyCode||t.which||0,s=this.keyCodeToCharacter(r),a=0,u={};c.iter(this.MODIFIERS,function(e){u[e]={pressed:t[e+"Key"],wanted:!1}},this),c.iter(i,function(e){e in u?(u[e].wanted=!0,a++):1<e.length?this.SPECIAL_KEYS[e]==r&&a++:n.keycode?n.keycode==r&&a++:(s==e||t.shiftKey&&this.SHIFT_NUMS[s]==e)&&a++},this);e=e.toLowerCase().split("^");return 1<e.length&&c.iter(e,function(e){1<e.length&&t.keyCode===this.SPECIAL_KEYS[e]&&(32===r&&t.preventDefault(),this.SPECIAL_KEYS[e]==r&&a++)},this),a==i.length&&c.all(u,function(e){return e.wanted==e.pressed})},register:function(t,n,i,o){o=c.extend({type:"keyup",propagate:!1,disable_in_input:!1,target:document,keycode:!1},o);var r=this,e=function(e){r.handleKeyEvent(t,e,o)&&(o.propagate||(e.preventDefault(),e.stopPropagation()),n.call(i||this,e))};return o.target.addEventListener(o.type,e,!1),{target:o.target,type:o.type,func:e}},unregister:function(e){e.target.removeEventListener(e.type,e.func,!1)}}}),e.define("module:Info",["base:Objs","module:FlashDetect"],function(i,t){return{__navigator:null,getNavigator:function(){return this.__navigator||(this.__navigator={appCodeName:navigator.appCodeName,appName:navigator.appName,appVersion:navigator.appVersion,cookieEnabled:navigator.cookieEnabled,onLine:navigator.onLine,platform:navigator.platform,userAgent:navigator.userAgent,window_chrome:"undefined"!=typeof window&&"chrome"in window,window_opera:"undefined"!=typeof window&&"opera"in window,language:navigator.language||navigator.userLanguage||"",isTouchable:this.isTouchable()}),this.__navigator},__cache:{},__cached:function(e,t,n){return e in this.__cache&&!n||(n=this.getNavigator(),this.__cache[e]=t.call(this,n,n.userAgent,n.userAgent.toLowerCase())),this.__cache[e]},setNavigator:function(e){this.__navigator=e,this.__cache={}},language:function(){return this.__cached("language",function(e){return e.language})},flash:function(e){return this.__cached("flash",function(){return new t},e)},isiOS:function(){return this.__cached("isiOS",function(e,t){if(this.isInternetExplorer()||this.isIEMobile())return!1;t=[t];e.platform&&t.push(e.platform);var n=["iPhone","iPod","iPad"];return t.some(function(t){return n.some(function(e){return-1!=t.indexOf(e)})})||e.platform&&"MacIntel"===e.platform&&e.isTouchable})},isEdge:function(){return this.__cached("isEdge",function(e,t){return-1!=t.indexOf("Edge")})},isCordova:function(){return"undefined"!=typeof window&&(!!window.cordova||!!window._cordovaNative)||0===document.location.href.indexOf("file:///android_asset/www")||0===document.location.href.indexOf("file:///var/mobile/Containers/Bundle/Application")},isLocalCordova:function(){return this.__cached("isLocalCordova",function(){return this.isCordova()&&0!==document.location.href.indexOf("http")})},isChrome:function(){return this.__cached("isChrome",function(e,t){return(e.window_chrome||-1!=t.indexOf("CriOS"))&&!this.isOpera()&&!this.isEdge()})},isChromium:function(){return this.__cached("isChromium",function(e,t,n){return!this.isChrome()&&this.isAndroid()&&0<=n.indexOf("linux")})},isChromiumBased:function(){return this.__cached("isChromiumBased",function(){return this.isChrome()||this.isChromium()})},isOpera:function(){return this.__cached("isOpera",function(e,t){return e.window_opera||0<=t.indexOf(" OPR/")||0<=t.indexOf("OPiOS")||0<=t.indexOf("Opera")})},isAndroid:function(){return this.__cached("isAndroid",function(e,t,n){return-1!=n.indexOf("android")})},isWebOS:function(){return this.__cached("isWebOS",function(e,t,n){return-1!=n.indexOf("webos")})},isWindowsPhone:function(){return this.__cached("isWindowsPhone",function(e,t,n){return-1!=n.indexOf("windows phone")})},isBlackberry:function(){return this.__cached("isBlackberry",function(e,t,n){return-1!=n.indexOf("blackberry")})},iOSversion:function(){return this.__cached("iOSversion",function(e){if(!this.isiOS())return!1;e=e.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return{major:parseInt(e[1],10),minor:parseInt(e[2],10),revision:parseInt(e[3]||0,10)}})},androidVersion:function(){return this.__cached("androidVersion",function(e){if(!this.isAndroid())return!1;e=e.userAgent.match(/Android (\d+)\.(\d+)\.?(\d+)?/);return{major:parseInt(e[1],10),minor:parseInt(e[2],10),revision:parseInt(e[3]||0,10)}})},isMobile:function(){return this.__cached("isMobile",function(){return this.isiOS()||this.isAndroid()||this.isWebOS()||this.isWindowsPhone()||this.isBlackberry()})},isDesktop:function(){return this.__cached("isDesktop",function(){return!this.isMobile()})},isInternetExplorer:function(){return this.__cached("isInternetExplorer",function(){return!this.isIEMobile()&&null!==this.internetExplorerVersion()})},isIEMobile:function(){return this.__cached("isIEMobile",function(e,t,n){return 0<=n.indexOf("iemobile")})},isFirefox:function(){return this.__cached("isFirefox",function(e,t,n){return-1!=n.indexOf("firefox")||-1!=n.indexOf("fxios")})},isSafari:function(){return this.__cached("isSafari",function(e,t,n){if(!(this.isChrome()||this.isOpera()||this.isEdge()||this.isFirefox()||-1==n.indexOf("safari")||this.isAndroid()))return!0;if(this.isiOS()&&-1!=t.indexOf("Macintosh")&&e.platform){if("iPad"===e.platform)return!0;if(e.isTouchable&&"MacIntel"===e.platform)return!0}return!1})},isWindows:function(){return this.__cached("isWindows",function(e){return-1!=e.appVersion.toLowerCase().indexOf("win")&&!this.isWindowsPhone()})},isMacOS:function(){return this.__cached("isMacOS",function(e){return!this.isiOS()&&-1!=e.appVersion.toLowerCase().indexOf("mac")})},isUnix:function(){return this.__cached("isUnix",function(e){return-1!=e.appVersion.toLowerCase().indexOf("x11")})},isLinux:function(){return this.__cached("isLinux",function(e){return!this.isAndroid()&&-1!=e.appVersion.toLowerCase().indexOf("linux")})},isTouchable:function(){return"undefined"!=typeof window&&"ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints},isScreenRecorderSupported:function(){return!("undefined"==typeof navigator.mediaDevices||!(this.isChrome()||this.isFirefox()||this.isOpera()||this.isEdge())||this.isMobile()||"undefined"==typeof navigator.mediaDevices.getDisplayMedia)},internetExplorerVersion:function(){return this.__cached("internetExplorerVersion",function(e,t){if("Microsoft Internet Explorer"==e.appName){t=new RegExp("MSIE ([0-9]+)").exec(t);if(t)return t[1]}else if("Netscape"==e.appName){e=new RegExp("Trident/.*rv:([0-9]+)").exec(e.userAgent);if(e)return parseFloat(e[1])}return null})},chromeVersion:function(){return this.__cached("chromeVersion",function(e,t){t=/(Chrome|CriOS)\/(\d+\.\d+)[^\d]/gi.exec(t);return t?parseFloat(t[2]):null})},operaVersion:function(){return this.__cached("operaVersion",function(e,t){t=/OPR\/(\d+\.\d+)[^\d]/gi.exec(t);return t?parseFloat(t[1]):null})},safariVersion:function(){return this.__cached("safariVersion",function(e,t){t=/Version\/(\d+\.\d+)[^\d]/gi.exec(t);return t?parseFloat(t[1]):null})},firefoxVersion:function(){return this.__cached("firefoxVersion",function(e,t){t=/Firefox\/(\d+\.\d+)/gi.exec(t);return t?parseFloat(t[1]):null})},edgeVersion:function(){return this.__cached("edgeVersion",function(e,t){t=/Edg\/(\d+\.\d+)|Edge\/(\d+\.\d+)/gi.exec(t);return t?parseFloat(t[1]):null})},inIframe:function(){try{return"undefined"!=typeof window&&window.self!==window.top}catch(e){return!0}},__devicesMap:{mobile:{format:"Mobile",check:function(){return this.isMobile()}},desktop:{format:"Desktop",check:function(){return this.isDesktop()}}},__obtainMatch:function(e,t){var n=null;return i.iter(e,function(e,t){if(e.check.apply(this)){if(n)return n=null,!1;delete(n=i.clone(e,1)).check,n.key=t}},this),n||t},getDevice:function(){return this.__cached("getDevice",function(){return this.__obtainMatch(this.__devicesMap,{key:"unknown",format:"Unknown Device"})})},formatDevice:function(){return this.getDevice().format},__osMap:{macosx:{format:"Mac OS-X",check:function(){return this.isMacOS()}},windows:{format:"Windows",check:function(){return this.isWindows()}},unix:{format:"Unix",check:function(){return this.isUnix()}},linux:{format:"Linux",check:function(){return this.isLinux()}},ios:{format:"iOS",check:function(){return this.isiOS()},version:function(){return this.iOSversion().major+"."+this.iOSversion().minor+"."+this.iOSversion().revision}},android:{format:"Android",check:function(){return this.isAndroid()}},webos:{format:"WebOS",check:function(){return this.isWebOS()}},windowsphone:{format:"Windows Phone",check:function(){return this.isWindowsPhone()}},blackberry:{format:"Blackberry",check:function(){return this.isBlackberry()}}},getOS:function(){return this.__cached("getOS",function(){return this.__obtainMatch(this.__osMap,{key:"unknown",format:"Unknown Operating System"})})},formatOS:function(){return this.getOS().format},formatOSVersion:function(){return this.getOS().version?this.getOS().version.apply(this):""},__browserMap:{chrome:{format:"Chrome",check:function(){return this.isChrome()},version:function(){return this.chromeVersion()}},chromium:{format:"Chromium",check:function(){return this.isChromium()}},opera:{format:"Opera",check:function(){return this.isOpera()},version:function(){return this.operaVersion()}},internetexplorer:{format:"Internet Explorer",check:function(){return this.isInternetExplorer()},version:function(){return this.internetExplorerVersion()}},firefox:{format:"Firefox",check:function(){return this.isFirefox()},version:function(){return this.firefoxVersion()}},safari:{format:"Safari",check:function(){return this.isSafari()},version:function(){return this.safariVersion()}},webos:{format:"WebOS",check:function(){return this.isWebOS()}},blackberry:{format:"Blackberry",check:function(){return this.isBlackberry()}},edge:{format:"Edge",check:function(){return this.isEdge()}},iemobile:{format:"IE Mobile",check:function(){return this.isIEMobile()}}},getBrowser:function(){return this.__cached("getBrowser",function(){return this.__obtainMatch(this.__browserMap,{key:"unknown",format:"Unknown Browser"})})},formatBrowser:function(){return this.getBrowser().format},formatBrowserVersion:function(){return this.getBrowser().version?this.getBrowser().version.apply(this):""},formatFlash:function(){return this.flash().installed()?"Flash "+this.flash().version().raw:this.flash().supported()?"Flash not installed but supported":"Flash not supported"}}}),e.define("module:Loader",["base:Ajax.Support","module:Info"],function(i,o){return{loadScript:function(e,t,n){var i=!1,o=document.getElementsByTagName("head")[0],r=document.createElement("script");r.src=e,r.onload=r.onreadystatechange=function(){i||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(i=!0,r.onload=r.onreadystatechange=null,t&&t.call(n||this,e))},o.appendChild(r)},loadStyles:function(e,t,n){var i=!1,o=document.getElementsByTagName("head")[0],r=document.createElement("link");r.rel="stylesheet",r.href=e,r.onload=r.onreadystatechange=function(){i||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(i=!0,r.onload=r.onreadystatechange=null,t&&t.call(n||this,e))},o.appendChild(r)},inlineStyles:function(e){var t=document.getElementsByTagName("head")[0],n=document.createElement("style");return o.isInternetExplorer()&&o.internetExplorerVersion()<9?(n.setAttribute("type","text/css"),n.styleSheet.cssText=e):n.textContent=e,t.appendChild(n),n},loadHtml:function(t,n,e){i.execute({uri:t,decodeType:"html"}).success(function(e){n.call(this,e,t)},e)},findScript:function(e){for(var t=0;t<document.scripts.length;++t)if(0<=document.scripts[t].src.toLowerCase().indexOf(e.toLowerCase()))return document.scripts[t];return null},loadByIframe:function(i,o,r){var s=document.createElement("iframe");i.visible?(s.style.border="none",s.style.width="1px",s.style.height="1px"):s.style.display="none";var e=function(){var e=null,t=null;try{t=(e=s.contentDocument.body).textContent||e.innerText}catch(n){}o.call(r||this,t,e,s),i.remove&&document.body.removeChild(s)};s.attachEvent?s.attachEvent("onload",e):s.onload=e,s.src=i.url,document.body.appendChild(s)}}}),e.define("module:HashRouteBinder",["base:Router.RouteBinder","module:Events"],function(e,n,t){return e.extend({scoped:t},function(t){return{constructor:function(e){t.constructor.call(this,e),this.auto_destroy(new n).on(window,"hashchange",function(){this._localRouteChanged()},this)},_getLocalRoute:function(){var e=window.location.hash;return e.length&&"#"==e[0]?e.slice(1):e},_setLocalRoute:function(e){window.location.hash="#"+e.route}}})}),e.define("module:HistoryRouteBinder",["base:Router.RouteBinder","module:Events"],function(e,n,t){return e.extend({scoped:t},function(t){return{__used:!1,constructor:function(e){t.constructor.call(this,e),this.auto_destroy(new n).on(window,"hashchange",function(){this.__used&&this._localRouteChanged()},this)},_getLocalRoute:function(){return window.location.pathname},_setLocalRoute:function(e){window.history.pushState({},document.title,e.route),this.__used=!0}}},{supported:function(){return window.history&&window.history.pushState}})}),e.define("module:LocationRouteBinder",["base:Router.RouteBinder"],function(e,t){return e.extend({scoped:t},{_getLocalRoute:function(){return window.location.pathname},_setLocalRoute:function(e){window.location.pathname=e.route}})}),e.define("module:DomExtend.DomExtension",["base:Class","base:Objs","base:Functions","base:Async","module:Dom","module:DomMutation.NodeRemoveObserver","module:DomMutation.NodeResizeObserver"],function(e,i,o,r,s,a,u,t){return e.extend({scoped:t},function(n){return{_domMethods:[],_domAttrs:{},constructor:function(e,t){n.constructor.call(this),this._element=s.unbox(e),(this._element.domExtension=this)._actualBB=null,this._idealBB=null,this._attrs=t||{},i.iter(this._domMethods,function(e){this._element[e]=o.as_method(this[e],this)},this),i.iter(["get","set"],function(e){this._element[e]=o.as_method(this[e],this)},this),r.eventually(function(){this._nodeRemoveObserver=this.auto_destroy(new a(this._element)),this._nodeRemoveObserver.on("node-removed",this.weakDestroy,this),this._nodeResizeObserver=this.auto_destroy(new u(this._element)),this._nodeResizeObserver.on("node-resized",function(){this.recomputeBB(),this._notify("resized")},this)},this),this._element.style.display&&"inline"!=this._element.style.display||(this._element.style.display="inline-block")},domEvent:function(e){s.triggerDomEvent(this._element,e)},readAttr:function(e){return e in this._element.attributes?this._element.attributes[e].value:(e in this._element?this._element:this._attrs)[e]},hasAttr:function(e){return e in this._element.attributes||e in this._element||e in this._attrs},writeAttr:function(e,t){e in this._element.attributes?this._element.attributes[e].value=t:e in this._element?this._element[e]=t:this._attrs[e]=t},unsetAttr:function(e){delete this._element[e],this._element.removeAttribute(e),delete this._attrs[e]},get:function(e){var t=this._domAttrs[e]||{};if(!t.get)return this.readAttr(e);t=o.callWithin(this,t.get);return this.writeAttr(e,t),t},set:function(e,t){this.writeAttr(e,t);e=this._domAttrs[e]||{};e.set&&o.callWithin(this,e.set,t)},computeActualBB:function(e){if((t=s.elementDimensions(this._element).width)<e.width&&!this._element.style.width){this._element.style.width=e.width+"px";for(var t=s.elementDimensions(this._element).width,n=this._element;n!=document.body;)n=n.parentNode,t=Math.min(t,s.elementDimensions(n).width);this._element.style.width=null}return{width:t,height:t*e.height/e.width}},idealBB:function(){return null},recomputeBB:function(){var e,t=this.idealBB();t&&(e=this.computeActualBB(t),this._idealBB=t,this._actualBB=e,this.setActualBB(e))},setActualBB:function(e){}}})}),e.define("module:DomMutation.NodeRemoveObserver",["base:Classes.ConditionalInstance","base:Events.EventsMixin"],function(e,t,n){return e.extend({scoped:n},[t,function(t){return{constructor:function(e){t.constructor.call(this),this._node=e},_nodeRemoved:function(e){e===this._node&&this.trigger("node-removed")}}}])}),e.define("module:DomMutation.MutationObserverNodeRemoveObserver",["module:DomMutation.NodeRemoveObserver","base:Objs"],function(e,i,t){return e.extend({scoped:t},function(t){return{constructor:function(e){t.constructor.call(this,e);var n=this;this._observer=new window.MutationObserver(function(e){i.iter(e,function(e){for(var t=0;t<e.removedNodes.length;++t)n._nodeRemoved(e.removedNodes[t])})}),this._observer.observe(e.parentNode,{childList:!0})},destroy:function(){this._observer.disconnect(),t.destroy.call(this)}}},{supported:function(e){try{return!!window.MutationObserver}catch(t){return!1}}})}),e.define("module:DomMutation.DOMNodeRemovedNodeRemoveObserver",["module:DomMutation.NodeRemoveObserver","module:Info","module:Events"],function(e,t,n,i){return e.extend({scoped:i},function(t){return{constructor:function(e){t.constructor.call(this,e),this.auto_destroy(new n).on(document,"DOMNodeRemoved",function(e){this._nodeRemoved(e.target)},this)}}},{supported:function(e){return!t.isInternetExplorer()||9<=t.internetExplorerVersion()}})}),e.define("module:DomMutation.TimerNodeRemoveObserver",["module:DomMutation.NodeRemoveObserver","base:Timers.Timer"],function(e,n,t){return e.extend({scoped:t},function(t){return{constructor:function(e){t.constructor.call(this,e),this._timer=new n({context:this,fire:this._fire,delay:100})},destroy:function(){this._timer.weakDestroy(),t.destroy.call(this)},_fire:function(){this._node.parentElement||(this._timer.stop(),this._nodeRemoved(this._node))}}},{supported:function(e){return!0}})}),e.extend("module:DomMutation.NodeRemoveObserver",["module:DomMutation.NodeRemoveObserver","module:DomMutation.MutationObserverNodeRemoveObserver","module:DomMutation.DOMNodeRemovedNodeRemoveObserver","module:DomMutation.TimerNodeRemoveObserver"],function(e,t,n,i){return e.register(t,3),e.register(n,2),e.register(i,1),{}}),e.define("module:DomMutation.NodeResizeObserver",["base:Class","base:Events.EventsMixin","module:Events"],function(e,t,n,i){return e.extend({scoped:i},[t,function(t){return{constructor:function(e){t.constructor.call(this),this.auto_destroy(new n).on(window,"resize",function(e){this._resized()},this)},_resized:function(){this.trigger("node-resized")}}}])}),e.define("module:DomMutation.NodeInsertObserver",["base:Classes.ConditionalInstance","base:Events.EventsMixin"],function(e,t,n){return e.extend({scoped:n},[t,function(e){return{_nodeInserted:function(e,t){if(t)for(var n=0;n<e.childNodes.length;++n)this._nodeInserted(e.childNodes[n],t);this._options.parent&&e.parentNode!==this._options.parent||this._options.root&&!this._options.root.contains(e)||this._options.filter&&!this._options.filter.call(this._options.context||this,e)||this.trigger("node-inserted",e)}}}])}),e.define("module:DomMutation.MutationObserverNodeInsertObserver",["module:DomMutation.NodeInsertObserver","base:Objs"],function(e,i,t){return e.extend({scoped:t},function(t){return{constructor:function(e){t.constructor.call(this,e=e||{});var n=this;this._observer=new window.MutationObserver(function(e){i.iter(e,function(e){for(var t=0;t<e.addedNodes.length;++t)n._nodeInserted(e.addedNodes[t],!0)})}),this._observer.observe(this._options.root||this._options.parent||document.body,{childList:!0,subtree:!this._options.parent})},destroy:function(){this._observer.disconnect(),t.destroy.call(this)}}},{supported:function(e){try{return!!window.MutationObserver}catch(t){return!1}}})}),e.define("module:DomMutation.DOMNodeInsertedNodeInsertObserver",["module:DomMutation.NodeInsertObserver","module:Events"],function(e,n,t){return e.extend({scoped:t},function(t){return{constructor:function(e){t.constructor.call(this,e=e||{}),this.auto_destroy(new n).on(document,"DOMNodeInserted",function(e){this._nodeInserted(e.target,!0)},this)}}},{supported:function(e){return!0}})}),e.extend("module:DomMutation.NodeInsertObserver",["module:DomMutation.NodeInsertObserver","module:DomMutation.MutationObserverNodeInsertObserver","module:DomMutation.DOMNodeInsertedNodeInsertObserver"],function(e,t,n){return e.register(t,3),e.register(n,2),{}}),e.define("module:Dom",["base:Types","base:Objs","module:Info","base:Async"],function(a,c,u,r){var l={tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"]},n=["click","mousedown","mouseup","touchstart","touchend","keydown","keyup","keypress"],i=[],o=!1,s=function(){i.forEach(function(e){e.callback.call(e.context||this)}),o=!(i=[]),n.forEach(function(e){window.removeEventListener(e,s)})},d={ready:function(e,t){var n,i,o;"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?r.eventually(e,t):(n=!1,i=null,o=function(){clearInterval(i),document.removeEventListener("DOMContentLoaded",o),window.removeEventListener("load",o),n||(n=!0,e.apply(t||this))},document.addEventListener("DOMContentLoaded",o),window.addEventListener("load",o),i=setInterval(function(){"complete"!==document.readyState&&("loading"===document.readyState||document.documentElement.doScroll)||o()},10))},userInteraction:function(e,t){i.push({callback:e,context:t}),o||(o=!0,n.forEach(function(e){window.addEventListener(e,s)}))},isTabHidden:function(){return document.hidden||document.webkitHidden||document.mozHidden||document.msHidden},elementsByTemplate:function(n){n=n.trim();var i=u.isInternetExplorer()&&u.internetExplorerVersion()<9,o=[];c.iter(l,function(e,t){0===n.indexOf("<"+t)&&(o=e,i=!1)});var e=[o.map(function(e){return"<"+e+">"}).join(""),i?"<br/>":"",n,o.map(function(e){return"</"+e+">"}).join("")].join(""),t=document.createElement("div");t.innerHTML=e,o.forEach(function(){t=t.children[0]});for(var r=[],s=i?1:0;s<t.children.length;++s)r.push(t.children[s]);return r=i?r.filter(function(e){return!(0===e.tagName.indexOf("/")&&0<=n.toLowerCase().indexOf("<"+e.tagName.toLowerCase()))}):r},elementByTemplate:function(e,t){e=this.elementsByTemplate(e);if(1===e.length)return e[0];if(0===e.length||!t)return null;t=document.createElement("div");return e.forEach(t.appendChild,t),t},changeTag:function(e,t){for(var n=document.createElement(t),i=0;i<e.attributes.length;++i){var o=e.attributes[i];n.setAttribute(o.nodeName,"value"in o?o.value:o.nodeValue)}for(;e.firstChild;)n.appendChild(e.firstChild);return e.parentNode&&e.parentNode.replaceChild(n,e),n},traverseNext:function(e,t){return(e=this.unbox(e)).firstChild&&!t?e.firstChild:e.parentNode?e.nextSibling||this.traverseNext(e.parentNode,!0):null},splitNode:function(e,t,n){return t=t||0,(n=n||(e.wholeText?e.wholeText.length:0))<(e.wholeText?e.wholeText.length:0)&&e.splitText(n),e=0<t?e.splitText(t):e},__FULLSCREEN_EVENTS:["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],__FULLSCREEN_METHODS:["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","webkitEnterFullScreen"],__FULLSCREEN_ATTRS:["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"],__FULLSCREEN_EXIT_METHODS:["exitFullscreen","mozCancelFullScreen","webkitExitFullscreen","msExitFullscreen"],elementSupportsFullscreen:function(t){return t&&this.__FULLSCREEN_METHODS.some(function(e){return e in t})},elementEnterFullscreen:function(t){var n=!1;this.__FULLSCREEN_METHODS.forEach(function(e){!n&&e in t&&(t[e].call(t),n=!0)})},documentExitFullscreen:function(){this.__FULLSCREEN_EXIT_METHODS.forEach(function(e){document[e]&&document[e]()})},elementIsFullscreen:function(t){return this.__FULLSCREEN_ATTRS.some(function(e){return document[e]===t})},elementOnFullscreenChange:function(t,e,n){var i=this,o=function(){e.call(n||this,t,i.elementIsFullscreen(t))};return this.__FULLSCREEN_EVENTS.forEach(function(e){t.addEventListener(e,o,!1)}),o},elementOffFullscreenChange:function(t,n){this.__FULLSCREEN_EVENTS.forEach(function(e){t.removeEventListener(e,n,!1)})},__PIP_EVENTS:["enterpictureinpicture","leavepictureinpicture"],browserSupportsPIP:function(e){return e=e||HTMLVideoElement.prototype||{},"pictureInPictureEnabled"in document||!!(u.isMacOS()&&9<=u.safariVersion())&&!(!e.webkitSupportsPresentationMode||"function"!=typeof e.webkitSetPresentationMode)},videoElementEnterPIPMode:function(e){if(e&&e instanceof HTMLVideoElement){if(e=e||HTMLVideoElement.prototype||{},"pictureInPictureElement"in document&&!document.pictureInPictureElement&&"function"==typeof e.requestPictureInPicture)try{e.requestPictureInPicture()}catch(t){console.warn(t)}u.isMacOS()&&9<=u.safariVersion()&&"function"==typeof e.webkitSetPresentationMode&&e.webkitSetPresentationMode("picture-in-picture")}},videoElementExitPIPMode:function(e){if(e=e||HTMLVideoElement.prototype||{},"pictureInPictureElement"in document&&document.pictureInPictureElement&&"function"==typeof document.exitPictureInPic