UNPKG

aq-web-front

Version:

A compilation framework to allow coding web frontends in a modern style.

1 lines 6.8 kB
var $$$AWF$$$=function(e,t){"use strict";function n(){function e(){var t=r.shift();return t?void o(t.url,e,t.exports):n()}function n(){for(var e=c.queue,t=0;t<e.length;t++){var n=e[t];n.body.call(n,n,n.exports,c.require)}c.queue=null}c.use["es5-shim"]=c.use["es5-sham"]=c.use.json3=!!c.legacyBrowser,t.head||(t.head=t.getElementsByTagName("head")[0]),t.body||(t.body=t.getElementsByTagName("body")[0]);var r=[];for(var i in c.use)if(c.use[i]){var u=c.lib[i];u&&r.push(u)}e()}function r(){}function o(n,r,o){function i(){function r(){if(!a){a=!0;for(var t=o?e[o]:null,n=0;n<u.cb.length;n++)u.cb[n](t,u);u.arg=t,u.cb=null}}var i=t.createElement("script"),a=!1;i.type="text/javascript",i.onload=r,i.onreadystatechange=function(){1==={loaded:1,complete:1}[i.readyState]&&setTimeout(r,2)},i.src=n,t.head.appendChild(i)}if(o&&e[o])return r();var u=f[n];u||(u=f[n]={cb:[],arg:null},setTimeout(i,2)),u.cb?u.cb.push(r):r(u.arg,u)}function i(e){function t(t,o,i){if(r.length&&!n.paused)for(var u={obj:e,key:t,newValue:o,oldValue:i},a=0;a<r.length;a++)r[a].call(e,u)}if(!u(e))throw new TypeError("Input is not an bound object");var n=e.$$$AWF$$$BoundObject,r=n.listener,o=n.old,a=n.child,c={signal:function(r){if(!n.keys||n.keys[r]){var s=o[r];u(s)&&(i(s).unlisten(a[r]),delete a[r]),delete o[r];var f=e[r];t(r,f,s),c.ref(r,f)}},ref:function(e,n){u(n)&&i(n).listen(a[e]=function(){t(e,n,n)}),"undefined"!=typeof n&&(o[e]=n)},listen:function(e){return"function"==typeof e&&-1==r.indexOf(e)&&r.push(e),c},unlisten:function(e){if("function"==typeof e){var t=r.indexOf(e);t>-1&&r.splice(t,1)}return c},once:function(e){function t(){c.unlisten(t),e.apply(this,arguments)}c.listen(t)},destroy:function(){for(var t in a)i(e[t]).unlisten(a[t]);delete e.$$$AWF$$$BoundObject},pause:function(e){return n.paused=!0,"function"==typeof e&&(e(),n.paused=!1),c},resume:function(){return n.paused=!1,c}};return c}function u(e){return e&&1==={"function":1,object:1}[typeof e]&&e.$$$AWF$$$BoundObject}var a={_temporalAssertDefined:function(e,t,n){if(e===n)throw new ReferenceError(t+" is not defined - temporal dead zone");return!0},_inherits:function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);if("function"!=typeof Symbol||c.legacyBrowser){var n=t.prototype;if(e.prototype={},n)for(var r in n)e.prototype[r]=n[r];e.$$$AWF$$$superClass=t}else e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},_instanceof:function(e,t){if("function"!=typeof Symbol||c.legacyBrowser){if(e instanceof t)return!0;for(e=e.$$$AWF$$$ClassType;e;){if(e==t)return!0;e=e.$$$AWF$$$superClass}return!1}return null!=t&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t},_classCallCheck:function(e,t){if(!c.legacyBrowser&&!a._instanceof(e,t))throw new TypeError("Cannot call a class as a function");e.$$$AWF$$$ClassType||(e.$$$AWF$$$ClassType=t)},_interopRequireDefault:function(e){return e&&e.__esModule?e:{"default":e}},_possibleConstructorReturn:function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},_newArrowCheck:function(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")},_boundProp:function(e,t){var n=e[t];return"function"!=typeof n||n.$$$AWF$$$Class?n:n.bind(e)},_iterator:function(e){var t=null===e?"null":typeof e;if("object"!=t&&"function"!=t)throw new TypeError("Type "+t+" not iterable");var n=[];if(e instanceof Array)for(var r=0;r<e.length;r++)n[r]=r;else n=Object.keys(e);var o,i=0;return{next:function(){return i>=n.length?!1:(o=n[i],i++,!0)},key:function(){return o},value:function(){return e[o]}}}};if(!e||!t)return a;Object.keys&&Object.keys.$$$AWF$$$||(Object.keys=function(e){var t=[];for(var n in e)if(!n.match(/^\$\$\$AWF\$\$\$/)){var r=e[n];"function"==typeof r&&r.$$$AWF$$$IgnoreKey||t.push(n)}return t},Object.keys.$$$AWF$$$=!0);var c={es6:a,mod:{},queue:[],lib:{},use:{},define:function(e,t,n,r,o){var i={};i.body=t,i.name=e,i.exports={},c.mod[e]=i,"."!=r?r+="/":r="",i.src=function(e){if("/"==e.substr(0,1))return r+e.substr(1);if("./"==e.substr(0,2))return r+o+"/"+e.substr(2);if("../"==e.substr(0,3)){var t=o.split("/");for(e=e.split("/");".."==e[0];)e.shift(),t.pop();return r+t.concat(e).join("/")}return e},n?i.body.call(i,i,i.exports,c.require):c.queue.push(i)},require:function(e){"react"==e&&c.mod.React&&(e="React");var t;if(t="/"==e.substr(0,1)?c.mod[e]:c.mod[e]||c.mod["/"+e])return t.exports;throw new Error("module not ready or doesn't exist")},signal:function(){},legacyBrowser:function(){return"undefined"==typeof navigator?!1:/MSIE (\d+\.\d+);/.test(navigator.userAgent)?RegExp.$1-0<9:!1}()};if("undefined"==typeof console)e.console={assert:r,clear:r,count:r,debug:r,dir:r,dirxml:r,error:r,group:r,groupCollapsed:r,groupEnd:r,info:r,log:r,profile:r,profileEnd:r,table:r,time:r,timeEnd:r,timeStamp:r,trace:r,warn:r};else if(!DEBUG)for(var s in console)"error"!=s&&"info"!=s&&"function"==typeof console[s]&&(console[s]=r);setTimeout(function(n){var r=!1,o=!0,i=t.documentElement,u=t.addEventListener,a=u?"addEventListener":"attachEvent",c=u?"removeEventListener":"detachEvent",s=u?"":"on",f=function(o){("readystatechange"!=o.type||"complete"==t.readyState)&&(("load"==o.type?e:t)[c](s+o.type,f,!1),!r&&(r=!0)&&n.call(e,o.type||o))},l=function(){try{i.doScroll("left")}catch(e){return void setTimeout(l,50)}f("poll")};if("complete"==t.readyState)n.call(e,"lazy");else{if(!u&&i.doScroll){try{o=!e.frameElement}catch($){}o&&l()}t[a](s+"DOMContentLoaded",f,!1),t[a](s+"readystatechange",f,!1),e[a](s+"load",f,!1)}}.bind(0,n),2);var f=e.$$$AWF$$$loadingScript=e.$$$AWF$$$loadingScript||{};return i.create=function(e,t){if(1==={undefined:1,"function":1,object:1}[typeof e]){if(e=e||{},!e.$$$AWF$$$BoundObject){if(e.$$$AWF$$$BoundObject={child:{},listener:[],old:{}},t instanceof Array)for(var n=e.$$$AWF$$$BoundObject.keys={},r=0;r<t.length;r++)n[t[r]]=1;for(var o=i(e),u=$$$AWF$$$.es6._iterator(e);u.next();)o.ref(u.key(),u.value());return e instanceof Array&&(o.ref("length",e.length),["push","pop","shift","unshift","splice","fill","sort","reverse"].map(function(t){e[t]=function(){var n=Array.prototype[t].apply(e,arguments);return o.signal("length"),n},e[t].$$$AWF$$$IgnoreKey=!0})),e}throw new Error("Target is already a BoundObject")}throw new Error("Must create from object or function")},i.isBoundObject=u,c.BoundObject=i,c.signal=function(e,t){u(e)&&i(e).signal(t)},c}("undefined"!=typeof window?window:null,"undefined"!=typeof document?document:null);"object"==typeof module&&module.exports&&(module.exports=$$$AWF$$$);var BoundObject=$$$AWF$$$.BoundObject;