!function e(t,a,r){function i(s,o){if(!a[s]){if(!t[s]){var l="function"==typeof require&&require;if(!o&&l)return l(s,!0);if(n)return n(s,!0);var d=new Error("Cannot find module '"+s+"'");throw d.code="MODULE_NOT_FOUND",d}var c=a[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,a,r)}return a[s].exports}for(var n="function"==typeof require&&require,s=0;s1;)a=a[r.shift()];a[r.shift()]=t}},{key:"removeDataByString",value:function(e){for(var t=this.data,a=e.split(".");a.length>1;)t=t[a.shift()];var r=a.shift();r.match(/^\d+$/)?t.splice(Number(r),1):delete t[r]}},{key:"resolveBlock",value:function(e,t,a){var r=this,i=e.match(//g),n=e.match(//g),s=e.match(//g),o=e.match(//g);if(i)for(var l=0,d=i.length;l/g,(function(e,t){return(0,o.selector)("#"+t).innerHTML}))}},{key:"resolveWith",value:function(e){return e=e.replace(/(([\n\r\t]|.)*?)/g,(function(e,t){return e=e.replace(/data\-bind=['"](.*?)['"]/g,"data-bind='"+t+".$1'")}))}},{key:"resolveLoop",value:function(e){var t=this;return e=e.replace(/(([\n\r\t]|.)*?)/g,(function(e,a,r){var i=t.getDataByString(a),n=[],s="";if((n="function"==typeof i?i.apply(t):i)instanceof Array)for(var o=0,l=n.length;o(([\n\r\t]|.)*?)/g)}},{key:"getHtml",value:function(e,t){var a=this.atemplate.find((function(t){return t.id===e})),r="";if(a&&a.html&&(r=a.html),t&&(r=e),!r)return"";var i=this.data;for(r=this.resolveInclude(r),r=this.resolveWith(r);this.hasLoop(r);)r=this.resolveLoop(r);return r=(r=this.resolveBlock(r,i)).replace(/\\([^\\])/g,"$1"),(r=this.resolveAbsBlock(r)).replace(/^([\t ])*\n/gm,"")}},{key:"update",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"html",a=arguments[1],r=this.templates;this.beforeUpdated&&this.beforeUpdated();for(var i=function(i,n){var l=r[i],d="#"+l,c=e.getHtml(l),u=(0,o.selector)("[data-id='"+l+"']");if(u)if("text"===t)u.innerText=c;else if(a){var p=document.createElement("div");p.innerHTML=c;var f=p.querySelector(a).outerHTML;(0,s.default)(u.querySelector(a),f)}else(0,s.default)(u,"
"+c+"
");else(0,o.selector)(d).insertAdjacentHTML("afterend",'
'),"text"===t?(0,o.selector)("[data-id='"+l+"']").innerText=c:(0,o.selector)("[data-id='"+l+"']").innerHTML=c;var h=e.atemplate.find((function(e){return e.id===l}));h.binded||(h.binded=!0,e.addDataBind((0,o.selector)("[data-id='"+l+"']")),e.addActionBind((0,o.selector)("[data-id='"+l+"']")))},n=0,l=r.length;n1?a-1:0),i=1;i1;)t=t[a.shift()];var r=a.shift();return r.match(/^\d+$/)?t.splice(Number(r),1):delete t[r],this}}]),e}();a.default=p,t.exports=a.default},{"./util":2,"ie-array-find-polyfill":6,morphdom:7}],2:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=a.matches=function(e,t){for(var a=(e.document||e.ownerDocument).querySelectorAll(t),r=a.length;--r>=0&&a.item(r)!==e;);return r>-1},i=(a.selector=function(e){return document.querySelector(e)},a.findAncestor=function(e,t){if("function"==typeof e.closest)return e.closest(t)||null;for(;e&&e!==document;){if(r(e,t))return e;e=e.parentElement}return null}),n=[];a.on=function(e,t,a,r){var s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];a.split(" ").forEach((function(a){var o=function(e){var a=i(e.target,t);a&&(e.delegateTarget=a,r(e))};n.push({listener:o,element:e,query:t,event:a,capture:s}),e.addEventListener(a,o,s)}))},a.off=function(e,t,a){a.split(" ").forEach((function(a){n.forEach((function(r,i){r.element===e&&r.query===t&&r.event===a&&(e.removeEventListener(a,r.listener,r.capture),n.splice(i,1))}))}))}},{}],3:[function(e,t,a){"use strict";try{var r=new window.CustomEvent("test");if(r.preventDefault(),!0!==r.defaultPrevented)throw new Error("Could not prevent default")}catch(e){var i=function(e,t){var a,r;return t=t||{bubbles:!1,cancelable:!1,detail:void 0},(a=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r=a.preventDefault,a.preventDefault=function(){r.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},a};i.prototype=window.Event.prototype,window.CustomEvent=i}},{}],4:[function(e,t,a){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(a,"__esModule",{value:!0}),a.$=y,a.add=function(){for(var e,t,a=arguments.length,r=new Array(a),i=0;i0){var t=s.que.shift();s.animate(t[0],t[1])}},animate:function(e,t){if(s.animating)return s.que.push([e,t]),s;var a=[];s.elements.each((function(t,i){var n,o,l,d,c;t.dom7AnimateInstance||(s.elements[i].dom7AnimateInstance=s),a[i]={container:t},Object.keys(e).forEach((function(s){n=r.getComputedStyle(t,null).getPropertyValue(s).replace(",","."),o=parseFloat(n),l=n.replace(o,""),d=parseFloat(e[s]),c=e[s]+l,a[i][s]={initialFullValue:n,initialValue:o,unit:l,finalValue:d,finalFullValue:c,currentValue:o}}))}));var i,o,l=null,d=0,c=0,u=!1;return s.animating=!0,s.frameId=r.requestAnimationFrame((function p(){var f,h;i=(new Date).getTime(),u||(u=!0,t.begin&&t.begin(n)),null===l&&(l=i),t.progress&&t.progress(n,Math.max(Math.min((i-l)/t.duration,1),0),l+t.duration-i<0?0:l+t.duration-i,l),a.forEach((function(r){var n=r;o||n.done||Object.keys(e).forEach((function(r){if(!o&&!n.done){f=Math.max(Math.min((i-l)/t.duration,1),0),h=s.easingProgress(t.easing,f);var u=n[r],p=u.initialValue,m=u.finalValue,v=u.unit;n[r].currentValue=p+h*(m-p);var g=n[r].currentValue;(m>p&&g>=m||m=0&&(t[(n=i.name.split("data-")[1],n.toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=i.value)}var n;for(var s in t)"false"===t[s]?t[s]=!1:"true"===t[s]?t[s]=!0:parseFloat(t[s])===1*t[s]&&(t[s]*=1);return t},a.default=void 0,a.detach=function(){return this.remove()},a.each=function(e){return e?(this.forEach((function(t,a){e.apply(t,[t,a])})),this):this},a.empty=function(){for(var e=0;et-1)return y([]);if(e<0){var a=t+e;return y(a<0?[]:[this[a]])}return y([this[e]])},a.filter=function(e){return y(g(this,e))},a.find=function(e){for(var t=[],a=0;a0})).length>0},a.height=function(){var e=(0,i.getWindow)();if(this[0]===e)return e.innerHeight;if(this.length>0)return parseFloat(this.css("height"));return null},a.hide=function(){for(var e=0;e1)for(var r=0;r1)for(var r=0;r0)return e?this[0].nextElementSibling&&y(this[0].nextElementSibling).is(e)?y([this[0].nextElementSibling]):y([]):this[0].nextElementSibling?y([this[0].nextElementSibling]):y([]);return y([])},a.nextAll=function(e){var t=[],a=this[0];if(!a)return y([]);for(;a.nextElementSibling;){var r=a.nextElementSibling;e?y(r).is(e)&&t.push(r):t.push(r),a=r}return y(t)},a.off=function(){for(var e=arguments.length,t=new Array(e),a=0;a=0;f-=1){var h=p[f];n&&h.listener===n||n&&h.listener&&h.listener.dom7proxy&&h.listener.dom7proxy===n?(u.removeEventListener(d,h.proxyListener,s),p.splice(f,1)):n||(u.removeEventListener(d,h.proxyListener,s),p.splice(f,1))}}return this},a.offset=function(){if(this.length>0){var e=(0,i.getWindow)(),t=(0,i.getDocument)(),a=this[0],r=a.getBoundingClientRect(),n=t.body,s=a.clientTop||n.clientTop||0,o=a.clientLeft||n.clientLeft||0,l=a===e?e.scrollY:a.scrollTop,d=a===e?e.scrollX:a.scrollLeft;return{top:r.top+l-s,left:r.left+d-o}}return null},a.on=function(){for(var e=arguments.length,t=new Array(e),a=0;a0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},a.outerWidth=function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},a.parent=function(e){for(var t=[],a=0;a=0;a-=1)this[t].insertBefore(n.childNodes[a],this[t].childNodes[0])}else if(e instanceof m)for(a=0;a0){var t=this[0];return e?t.previousElementSibling&&y(t.previousElementSibling).is(e)?y([t.previousElementSibling]):y([]):t.previousElementSibling?y([t.previousElementSibling]):y([])}return y([])},a.prevAll=function(e){var t=[],a=this[0];if(!a)return y([]);for(;a.previousElementSibling;){var r=a.previousElementSibling;e?y(r).is(e)&&t.push(r):t.push(r),a=r}return y(t)},a.prop=function(e,t){if(1!==arguments.length||"string"!=typeof e){for(var a=0;a0?o[0].scrollLeft:null;return o.scrollTo(r,void 0,i,n,s)},a.scrollTo=function(){for(var e=(0,i.getWindow)(),t=arguments.length,a=new Array(t),r=0;r0||0===s,v=n>0||0===n;if(void 0===l&&(l="swing"),m&&(t=h.scrollTop,o||(h.scrollTop=s)),v&&(a=h.scrollLeft,o||(h.scrollLeft=n)),o){m&&(r=h.scrollHeight-h.offsetHeight,c=Math.max(Math.min(s,r),0)),v&&(i=h.scrollWidth-h.offsetWidth,u=Math.max(Math.min(n,i),0));var g=null;m&&c===t&&(m=!1),v&&u===a&&(v=!1),e.requestAnimationFrame((function r(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(new Date).getTime();null===g&&(g=i);var n,s=Math.max(Math.min((i-g)/o,1),0),y="linear"===l?s:.5-Math.cos(s*Math.PI)/2;m&&(p=t+y*(c-t)),v&&(f=a+y*(u-a)),m&&c>t&&p>=c&&(h.scrollTop=c,n=!0),m&&ca&&f>=u&&(h.scrollLeft=u,n=!0),v&&u0?o[0].scrollTop:null;return o.scrollTo(void 0,r,i,n,s)},a.show=function(){for(var e=(0,i.getWindow)(),t=0;t0})),c.dispatchEvent(u),c.dom7EventData=[],delete c.dom7EventData}}return this},a.val=function(e){if(void 0===e){var t=this[0];if(!t)return;if(t.multiple&&"select"===t.nodeName.toLowerCase()){for(var a=[],r=0;r=0;else n.value=e}return this},a.value=function(e){return this.val(e)},a.width=function(){var e=(0,i.getWindow)();if(this[0]===e)return e.innerWidth;if(this.length>0)return parseFloat(this.css("width"));return null};var i=e("ssr-window");function n(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){Array.isArray(t)?e.push.apply(e,n(v(t))):e.push(t)})),e}function g(e,t){return Array.prototype.filter.call(e,t)}function y(e,t){var a=(0,i.getWindow)(),r=(0,i.getDocument)(),n=[];if(!t&&e instanceof m)return e;if(!e)return new m(n);if("string"==typeof e){var s=e.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){var o="div";0===s.indexOf(">>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i=97?i===n.toUpperCase():r<=90&&a>=97&&n===i.toUpperCase())}function c(e,t,a){e[a]!==t[a]&&(e[a]=t[a],e[a]?e.setAttribute(a,""):e.removeAttribute(a))}var u={OPTION:function(e,t){var a=e.parentNode;if(a){var r=a.nodeName.toUpperCase();"OPTGROUP"===r&&(r=(a=a.parentNode)&&a.nodeName.toUpperCase()),"SELECT"!==r||a.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),a.selectedIndex=-1)}c(e,t,"selected")},INPUT:function(e,t){c(e,t,"checked"),c(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var a=t.value;e.value!==a&&(e.value=a);var r=e.firstChild;if(r){var i=r.nodeValue;if(i==a||!a&&i==e.placeholder)return;r.nodeValue=a}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var a,r,i=-1,n=0,s=e.firstChild;s;)if("OPTGROUP"===(r=s.nodeName&&s.nodeName.toUpperCase()))s=(a=s).firstChild;else{if("OPTION"===r){if(s.hasAttribute("selected")){i=n;break}n++}!(s=s.nextSibling)&&a&&(s=a.nextSibling,a=null)}e.selectedIndex=i}}};function p(){}function f(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var h=function(e){return function(t,a,r){if(r||(r={}),"string"==typeof a)if("#document"===t.nodeName||"HTML"===t.nodeName||"BODY"===t.nodeName){var s=a;(a=n.createElement("html")).innerHTML=s}else a=l(a);var o=r.getNodeKey||f,c=r.onBeforeNodeAdded||p,h=r.onNodeAdded||p,m=r.onBeforeElUpdated||p,v=r.onElUpdated||p,g=r.onBeforeNodeDiscarded||p,y=r.onNodeDiscarded||p,b=r.onBeforeElChildrenUpdated||p,w=!0===r.childrenOnly,x=Object.create(null),S=[];function E(e){S.push(e)}function C(e,t){if(1===e.nodeType)for(var a=e.firstChild;a;){var r=void 0;t&&(r=o(a))?E(r):(y(a),a.firstChild&&C(a,t)),a=a.nextSibling}}function T(e,t,a){!1!==g(e)&&(t&&t.removeChild(e),y(e),C(e,a))}function j(e){h(e);for(var t=e.firstChild;t;){var a=t.nextSibling,r=o(t);if(r){var i=x[r];i&&d(t,i)?(t.parentNode.replaceChild(i,t),P(i,t)):j(t)}else j(t);t=a}}function P(t,a,r){var i=o(a);if(i&&delete x[i],!r){if(!1===m(t,a))return;if(e(t,a),v(t),!1===b(t,a))return}"TEXTAREA"!==t.nodeName?function(e,t){var a,r,i,s,l,p=t.firstChild,f=e.firstChild;e:for(;p;){for(s=p.nextSibling,a=o(p);f;){if(i=f.nextSibling,p.isSameNode&&p.isSameNode(f)){p=s,f=i;continue e}r=o(f);var h=f.nodeType,m=void 0;if(h===p.nodeType&&(1===h?(a?a!==r&&((l=x[a])?i===l?m=!1:(e.insertBefore(l,f),r?E(r):T(f,e,!0),f=l):m=!1):r&&(m=!1),(m=!1!==m&&d(f,p))&&P(f,p)):3!==h&&8!=h||(m=!0,f.nodeValue!==p.nodeValue&&(f.nodeValue=p.nodeValue))),m){p=s,f=i;continue e}r?E(r):T(f,e,!0),f=i}if(a&&(l=x[a])&&d(l,p))e.appendChild(l),P(l,p);else{var v=c(p);!1!==v&&(v&&(p=v),p.actualize&&(p=p.actualize(e.ownerDocument||n)),e.appendChild(p),j(p))}p=s,f=i}!function(e,t,a){for(;t;){var r=t.nextSibling;(a=o(t))?E(a):T(t,e,!0),t=r}}(e,f,r);var g=u[e.nodeName];g&&g(e,t)}(t,a):u.TEXTAREA(t,a)}!function e(t){if(1===t.nodeType||11===t.nodeType)for(var a=t.firstChild;a;){var r=o(a);r&&(x[r]=a),e(a),a=a.nextSibling}}(t);var M,_,k=t,O=k.nodeType,I=a.nodeType;if(!w)if(1===O)1===I?d(t,a)||(y(t),k=function(e,t){for(var a=e.firstChild;a;){var r=a.nextSibling;t.appendChild(a),a=r}return t}(t,(M=a.nodeName,(_=a.namespaceURI)&&_!==i?n.createElementNS(_,M):n.createElement(M)))):k=a;else if(3===O||8===O){if(I===O)return k.nodeValue!==a.nodeValue&&(k.nodeValue=a.nodeValue),k;k=a}if(k===a)y(t);else{if(a.isSameNode&&a.isSameNode(k))return;if(P(k,a,w),S)for(var A=0,$=S.length;A<$;A++){var D=x[S[A]];D&&T(D,D.parentNode,!1)}}return!w&&k!==t&&t.parentNode&&(k.actualize&&(k=k.actualize(t.ownerDocument||n)),t.parentNode.replaceChild(k,t)),k}}((function(e,t){var a,r,i,n,s=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var o=s.length-1;o>=0;o--)r=(a=s[o]).name,i=a.namespaceURI,n=a.value,i?(r=a.localName||r,e.getAttributeNS(i,r)!==n&&("xmlns"===a.prefix&&(r=a.name),e.setAttributeNS(i,r,n))):e.getAttribute(r)!==n&&e.setAttribute(r,n);for(var l=e.attributes,d=l.length-1;d>=0;d--)r=(a=l[d]).name,(i=a.namespaceURI)?(r=a.localName||r,t.hasAttributeNS(i,r)||e.removeAttributeNS(i,r)):t.hasAttribute(r)||e.removeAttribute(r)}}));t.exports=h},{}],8:[function(e,t,a){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var i,n=(i=e("a-template"))&&i.__esModule?i:{default:i};function s(e){return s="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},s(e)}function o(e,t){for(var a=0;a