targetj 1.0.260 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/targetjs.js CHANGED
@@ -1 +1 @@
1
- (function(){"use strict";var __webpack_modules__={768:function(e,t,r){r.d(t,{J:function(){return u}});var n=r(34),i=r(855);function a(e){return a="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},a(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var u=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"string"==typeof t)this.selector=t,this.element=e.query(t);else if(t&&(this.element=t,1===t.nodeType)){var r=this.element.getAttribute("id");this.selector="string"==typeof r?r.startsWith("#")?r:"#"+r:null}this.hasRealChildren=!1,this.slotModeEnabled=!1,this.contentSlot=null,this.originalContent=void 0,this.textOnly=!0,this.transformProp=null,this.initTransformProp(),this.restoreSlotState()}return t=e,r=[{key:"create",value:function(e){this.element=document.createElement(e),this.initTransformProp()}},{key:"initTransformProp",value:function(){if(this.element&&this.element.style){var e=this.element.style;this.transformProp="transform"in e?"transform":"webkitTransform"in e?"webkitTransform":null}else this.transformProp=null}},{key:"cloneTemplate",value:function(){var t;return new e(null===(t=this.element.content)||void 0===t?void 0:t.cloneNode(!0).children[0])}},{key:"clone",value:function(){return this.element.cloneNode(!0)}},{key:"exists",value:function(){var e;return!(null===(e=this.element)||void 0===e||!e.isConnected)}},{key:"getElement",value:function(){return this.element}},{key:"supportsWAAPI",value:function(){return!(!this.element||"function"!=typeof this.element.animate)}},{key:"restoreSlotState",value:function(){var e;if(1===(null===(e=this.element)||void 0===e?void 0:e.nodeType)&&!this.isNoSlotHost()){var t=this.element.querySelector(':scope > [data-tj-slot="content"]');t&&(this.contentSlot=t,this.slotModeEnabled=!0,this.hasRealChildren=Array.from(this.element.childNodes).some((function(e){return e!==t&&"true"===e.getAttribute("tgjs")})))}}},{key:"findContentSlot",value:function(){if(this.contentSlot&&this.contentSlot.parentNode===this.element)return this.contentSlot;if(!this.element.firstElementChild)return null;var e=this.element.querySelector(':scope > [data-tj-slot="content"]');return e&&(this.contentSlot=e),e}},{key:"isNoSlotHost",value:function(){var e;return 1!==(null===(e=this.element)||void 0===e?void 0:e.nodeType)||"body"===this.getTagName()||"true"===this.element.getAttribute("data-tj-no-slot")}},{key:"ensureContentSlotFirst",value:function(){var e=this.findContentSlot();return e?this.element.firstChild!==e&&this.element.insertBefore(e,this.element.firstChild):((e=document.createElement("div")).setAttribute("data-tj-slot","content"),this.element.insertBefore(e,this.element.firstChild),this.contentSlot=e),e}},{key:"isManagedChildNode",value:function(e){return 1===(null==e?void 0:e.nodeType)&&"true"===e.getAttribute("tgjs")}},{key:"enableSlotMode",value:function(){var e=this;if(!this.slotModeEnabled)if(this.isNoSlotHost())this.slotModeEnabled=!0;else{var t=this.findContentSlot();if(!t){var r=Array.from(this.element.childNodes);(t=document.createElement("div")).setAttribute("data-tj-slot","content"),this.element.insertBefore(t,this.element.firstChild);for(var n=0,i=r;n<i.length;n++){var a=i[n];this.isManagedChildNode(a)||t.appendChild(a)}}this.contentSlot=t,this.slotModeEnabled=!0,this.hasRealChildren=Array.from(this.element.children).some((function(r){return r!==t&&e.isManagedChildNode(r)}))}}},{key:"ensureSlotMode",value:function(){if(this.isNoSlotHost())this.slotModeEnabled=!0;else{this.enableSlotMode();var e=this.findContentSlot();e&&this.element.firstChild!==e&&this.element.insertBefore(e,this.element.firstChild)}}},{key:"getComputedStyle",value:function(e){if(this.element){var t=window.getComputedStyle(this.element);return e?t.getPropertyValue(e)||t[e]:t}}},{key:"contains",value:function(e){return e instanceof Node&&this.element.contains(e)}},{key:"getTagName",value:function(){var e;return null===(e=this.element)||void 0===e||null===(e=e.tagName)||void 0===e?void 0:e.toLowerCase()}},{key:"setSelector",value:function(e){this.selector=e}},{key:"ensureId",value:function(e){this.selector="#"===e[0]?e:"#"+e,this.attr("id",this.selector.slice(1))}},{key:"getId",value:function(){return this.attr("id")}},{key:"focus",value:function(){this.element.focus()}},{key:"blur",value:function(){this.element.blur()}},{key:"attr",value:function(e,t){if(this.element)return n.d.isDefined(t)?void this.element.setAttribute(e,t):this.element.getAttribute(e)}},{key:"value",value:function(e){if(this.element){var t=this.element.value;return n.d.isDefined(e)&&(this.element.value=e),t}}},{key:"select",value:function(){this.element&&"function"==typeof this.element.select&&this.element.select()}},{key:"width",value:function(e){if(!n.d.isDefined(e))return this.element.offsetWidth;this.element.style.width=n.d.isNumber(e)?"".concat(e,"px"):e}},{key:"height",value:function(e){if(!n.d.isDefined(e))return this.element.offsetHeight;this.element.style.height=n.d.isNumber(e)?"".concat(e,"px"):e}},{key:"css",value:function(e){if(!n.d.isDefined(e))return this.element.className;this.element.className=e}},{key:"setStyleByMap",value:function(e){var t=this;Object.keys(e).forEach((function(r){t.style(r,e[r])}))}},{key:"style",value:function(e,t){if(2!==arguments.length)return 1===arguments.length?this.element.style[e]:this.element.style;this.element.style[e]=t}},{key:"getStyleValue",value:function(e){var t=this.style(e),r=n.d.isDefined(t)?t.replace(/[^-\d.]/g,""):0;return parseFloat(r)}},{key:"getBoundingClientRect",value:function(){return this.element.getBoundingClientRect()}},{key:"isXYWithinElement",value:function(e,t){var r=this.getBoundingClientRect();return e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom}},{key:"parent",value:function(){return this.element?this.element.parentElement:null}},{key:"detach",value:function(){e.detach(this.element)}},{key:"child",value:function(e){return this.element.children[e]}},{key:"elementCount",value:function(){return this.element.children.length}},{key:"swapElements",value:function(e,t){var r=t.nextSibling;r===e?this.element.insertBefore(e,t):(this.element.insertBefore(t,e),this.element.insertBefore(e,r))}},{key:"insertAfterContentSlot",value:function(e){if(this.element)if(this.isNoSlotHost())this.element.appendChild(e);else{var t=this.ensureContentSlotFirst(),r=t?t.nextSibling:this.element.firstChild;r?this.element.insertBefore(e,r):this.element.appendChild(e)}}},{key:"insertFirst$Dom",value:function(e){this.ensureSlotMode(),this.insertAfterContentSlot(e.element),this.hasRealChildren=!0}},{key:"relocate",value:function(e,t){this.ensureSlotMode();var r=t+(this.findContentSlot()?1:0);this.element.insertBefore(e.$dom.element,this.element.children[r]||null)}},{key:"appendTModel$Dom",value:function(e){this.ensureSlotMode(),this.element.appendChild(e.$dom.element),this.hasRealChildren=!0}},{key:"append$Dom",value:function(e){this.ensureSlotMode(),this.element.appendChild(e.element),this.hasRealChildren=!0}},{key:"appendElement",value:function(e){this.ensureSlotMode(),this.element.appendChild(e),this.hasRealChildren=!0}},{key:"removeElement",value:function(e){if(e){var t=e.parentNode;return t===this.element?(this.element.removeChild(e),!0):t?(t.removeChild(e),!1):void 0}}},{key:"html",value:function(e){n.d.isDefined(e)&&(this.isNoSlotHost()||!this.hasRealChildren?this.element.innerHTML=e:this.ensureContentSlotFirst().innerHTML=e,this.originalContent=e,this.textOnly=!1)}},{key:"text",value:function(e){n.d.isDefined(e)&&(this.isNoSlotHost()||!this.hasRealChildren?this.element.textContent=e:this.ensureContentSlotFirst().textContent=e,this.originalContent=e,this.textOnly=!0)}},{key:"clearContent",value:function(){this.element&&(!this.isNoSlotHost()&&this.hasRealChildren?this.ensureContentSlotFirst().innerHTML=this.originalContent||"":this.element.innerHTML=this.originalContent||"")}},{key:"deleteAll",value:function(){this.element&&(this.element.innerHTML=this.originalContent||"",this.hasRealChildren=!1,this.contentSlot=null,this.slotModeEnabled=!1)}},{key:"outerHTML",value:function(e){this.element.outerHTML=e}},{key:"isEmpty",value:function(){return""===this.element.innerHTML}},{key:"innerHTML",value:function(e){if(!n.d.isDefined(e))return this.element.innerHTML;this.element.innerHTML=e}},{key:"innerText",value:function(e){if(!n.d.isDefined(e))return this.element.innerText;this.element.innerText=e}},{key:"addClass",value:function(e){var t=this.attr("class"),r=t?t.includes(e)?t:"".concat(t," ").concat(e):e;r!==t&&this.attr("class",r)}},{key:"addEvent",value:function(e,t,r,n){this.element.addEventListener?this.element.addEventListener(e,t,{capture:!!r,passive:!!n}):this.element.attachEvent("on".concat(e),t)}},{key:"detachEvent",value:function(e,t,r){this.element.removeEventListener?this.element.removeEventListener(e,t,r):this.element.detachEvent?this.element.detachEvent("on".concat(e),t):this.element["on".concat(e)]=null}},{key:"transform",value:function(e){this.element.style[this.transformProp]=e}},{key:"animate",value:function(e,t){return this.element.animate(e,t)}},{key:"getContext",value:function(t,r){var i=n.d.isDefined(r)?e.query(r):this.query("canvas");return i?i.getContext(t):void 0}},{key:"query",value:function(e){return this.element.querySelector(e)}},{key:"queryAll",value:function(e){return this.element.querySelectorAll(e)}},{key:"findFirstByClass",value:function(t){return e.findFirstByClass(t,this.element)}},{key:"findFirstByTag",value:function(t){return e.findFirstByTag(t,this.element)}},{key:"getScrollTop",value:function(){var e,t;return null!==(e=null===(t=this.element)||void 0===t?void 0:t.scrollTop)&&void 0!==e?e:0}},{key:"getScrollLeft",value:function(){var e,t;return null!==(e=null===(t=this.element)||void 0===t?void 0:t.scrollLeft)&&void 0!==e?e:0}}],a=[{key:"createTemplate",value:function(t){var r=new e;return r.create("template"),r.innerHTML(t.trim()),r}},{key:"createDocumentFragment",value:function(){return document.createDocumentFragment()}},{key:"query",value:function(t){return"#"===t[0]?e.findById(t):"."===t[0]?e.findFirstByClass(t):e.findFirstByTag(t)}},{key:"querySelector",value:function(e){return document.querySelector(e)}},{key:"findById",value:function(e){return document.getElementById("#"===e[0]?e.slice(1):e)}},{key:"findFirstByClass",value:function(t,r){var n=e.findByClass(t,r);return n.length>0?n[0]:null}},{key:"findFirstByTag",value:function(t,r){var n=e.findByTag(t,r);return n.length>0?n[0]:null}},{key:"findByTag",value:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).getElementsByTagName(e)}},{key:"findByClass",value:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).getElementsByClassName("."===e[0]?e.slice(1):e)}},{key:"findNearestParentWithId",value:function(e){for(;e;){var t="function"==typeof e.getAttribute&&e.getAttribute("id")?e.getAttribute("id"):null;if(t&&(0,i.EI)().visibleOidMap[t])return t;e=e.parentElement}}},{key:"detach",value:function(e){var t=n.d.isDefined(e)?e.parentElement:null;t&&t.removeChild(e)}},{key:"hasFocus",value:function(e){return e.hasDom()&&document.activeElement===e.$dom.element}},{key:"getWindowScrollTop",value:function(){return window.pageYOffset||document.documentElement.scrollTop||0}},{key:"getWindowScrollLeft",value:function(){return window.pageXOffset||document.documentElement.scrollLeft||0}},{key:"getScreenWidth",value:function(){return document.documentElement.clientWidth||document.body.clientWidth}},{key:"getScreenHeight",value:function(){return document.documentElement.clientHeight||document.body.clientHeight}},{key:"ready",value:function(t){new e(document).addEvent("DOMContentLoaded",t)}},{key:"ajax",value:function(e){var t=new XMLHttpRequest,r="";e.data&&(r=Object.keys(e.data).map((function(t){return"".concat(t,"=").concat(encodeURIComponent(e.data[t]))})).join("&")),t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status){var r="json"===e.dataType?JSON.parse(this.responseText):this.responseText;e.success(r)}else e.error(t.status)},"POST"===e.type?(t.open(e.type,e.url,!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.send(r)):(e.url+=r?e.url>""&&e.url.indexOf("?")>=0?"&".concat(r):"?".concat(r):"",t.open(e.type,e.url,!0),t.send())}}],r&&o(t.prototype,r),a&&o(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,a}()},357:function(e,t,r){r.d(t,{_:function(){return x}});var n=r(249),i=r(980),a=r(585),o=r(855),l=r(333),u=r(34),s=r(161);function c(e){return c="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},c(e)}function d(){d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var a=t&&t.prototype instanceof b?t:b,o=Object.create(a.prototype),l=new A(n||[]);return i(o,"_invoke",{value:D(e,r,l)}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var v="suspendedStart",p="suspendedYield",g="executing",y="completed",m={};function b(){}function T(){}function w(){}var k={};s(k,o,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(j([])));x&&x!==r&&n.call(x,o)&&(k=x);var M=w.prototype=b.prototype=Object.create(k);function C(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,o,l){var u=f(e[i],e,a);if("throw"!==u.type){var s=u.arg,d=s.value;return d&&"object"==c(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(d).then((function(e){s.value=e,o(s)}),(function(e){return r("throw",e,o,l)}))}l(u.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function D(t,r,n){var i=v;return function(a,o){if(i===g)throw Error("Generator is already running");if(i===y){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var u=P(l,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=g;var s=f(t,r,n);if("normal"===s.type){if(i=n.done?y:p,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=y,n.method="throw",n.arg=s.arg)}}}function P(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(c(t)+" is not iterable")}return T.prototype=w,i(M,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:T,configurable:!0}),T.displayName=s(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,s(e,u,"GeneratorFunction")),e.prototype=Object.create(M),e},t.awrap=function(e){return{__await:e}},C(E.prototype),s(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(h(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(M),s(M,u,"Generator"),s(M,o,(function(){return this})),s(M,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function h(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){h(a,n,i,o,l,"next",e)}function l(e){h(a,n,i,o,l,"throw",e)}o(void 0)}))}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function g(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(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 y(e,t){if(e){if("string"==typeof e)return m(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){w(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function w(e,t,r){return(t=S(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S(n.key),n)}}function S(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}var x=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.waapiPoller={rafId:0,alive:!0},this.recordMap=new Map,this.isShuttingDown=!1,this.toid="blank"},t=[{key:"animate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.T.emptyBatch(),r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;if(!this.isShuttingDown){if(t.frames.sort((function(e,t){return e.keyTime-t.keyTime})),e.lastBatch){var o=Math.min(u.d.now()-e.lastBatch.startTime,e.lastBatch.totalDuration);if(e.lastBatch=this.cutLastBatch(e,e.lastBatch,o),i.T.rebaseCutBatchMeta(e,e.lastBatch),null!=a&&a.size){var s={styleMap:T({},e.lastBatch.frames[0].styleMap),tfMap:T({},e.lastBatch.frames[0].tfMap),keyMeta:new Map(e.lastBatch.frames[0].keyMeta)};i.T.addToUpdatingTargets(e,a),i.T.removeKeysFromBatch(e.lastBatch,a),this.callFireOnEndOnConflict(e,e.lastBatch,t),this.mergeBatches(e.lastBatch,t),this.deleteAnimation(e),this.fixTModelStyleFromFrame(e,s)}else this.callFireOnEndOnConflict(e,e.lastBatch,t),this.mergeBatches(e.lastBatch,t),this.deleteAnimation(e)}if(e.hasDom()&&t.frames.length&&Object.keys(t.keyMap).length){var c,d=e.$dom.getElement(),h=Math.max(t.totalDuration,1),f=g(new Set(Object.values(t.keyMap).flatMap((function(e){return g(e)})))),v=p(f);try{for(v.s();!(c=v.n()).done;){var y=c.value;this.backfillKeyAcrossFramesUsingMorph(e,y,t.frames)}}catch(e){v.e(e)}finally{v.f()}for(var m=!1,b={},w=0,k=Object.keys(e.tfMap);w<k.length;w++){var S=k[w];b[S]=e.val(S)}var x=t.frames.map((function(t){var r=T({},t.styleMap);if(r.offset=t.keyTime/h,Object.keys(t.tfMap).length){var a=T(T({},b),t.tfMap);r.transform=n.a.getTransformString(e,a),m=!0}return i.T.addUnitsToFrame(r),r})),M=this.filterRedundantKeyframes(x),C={duration:h,fill:"none",iterations:1,easing:t.easing||"linear"};t.startTime=u.d.now(),e.lastBatch=t,e.lastBatch.transformAnimation=m,e.finalKeyframe=M[M.length-1],e.finalRawFrame=t.frames[t.frames.length-1];var E,D=d.animate(M,C),P=p(f);try{for(P.s();!(E=P.n()).done;){var O=E.value,L=l.g.getTargetName(O),A=this.getRecordId(e,O),j=l.g.getOriginalNames(e,O),_=j.originalTModel,I=j.originalTargetName,R={recId:A,cleanKey:L,originalKey:O,tmodel:e,anim:D,originalTModel:_,originalTargetName:I,frames:this.collectFramesForKey(t,L),status:"playing",needsFireOnStep:!0,hooks:r},V=e.targetValues[O];V&&(e.addToAnimatingMap(O),V.status=V.snapAnimation?"done":"updating"),this.recordMap.set(A,R)}}catch(e){P.e(e)}finally{P.f()}this.startProgressPoller()}}}},{key:"pauseAnimations",value:function(e,t){var r,n,a;(r=t?t instanceof Map?new Set(t.keys()):new Set(t):new Set(null!==(n=null===(a=e.animatingMap)||void 0===a?void 0:a.keys())&&void 0!==n?n:[])).size&&this.animate(e,i.T.emptyBatch(),i.T.getAnimationHooks(),r)}},{key:"finalizeAnimation",value:function(e){var t,r=!1,n=p(this.recordMap);try{for(n.s();!(t=n.n()).done;){var a=v(t.value,2),l=a[0],u=a[1];if(u.anim===e&&"playing"!==u.status&&"canceled"!==u.status){r=!0;var s=u.tmodel,c=u.originalKey,d=u.cleanKey;s.removeFromAnimatingMap(c),this.recordMap.delete(l),this.completeRecord(s,u,d,c),s.hasAnimatingTargets()||(s.finalKeyframe&&s.hasDom()&&i.T.fixStyleByAnimation(s,s.finalKeyframe),s.lastBatch=void 0),u.status="complete",u.hooks.fireOnEnd(s,c),(0,o.fB)().scheduleOnlyIfEarlier(1,"animate-".concat(s.oid,"---").concat(c))}}}catch(e){n.e(e)}finally{n.f()}if(r)try{e.cancel()}catch(e){}(0,o.fB)().schedule(35,"finalizeAnimation")}},{key:"startProgressPoller",value:function(){var e=this;if(!this.waapiPoller.rafId){this.waapiPoller.alive=!0;var t=function(){var r,n=new Set,a=new Map,o=!1,l=p(e.recordMap);try{for(l.s();!(r=l.n()).done;){var u,c,d,h,f=v(r.value,2)[1];if("canceled"!==f.status&&"detached"!==f.status){var g=f.tmodel,y=f.originalKey;if("finished"!==f.status&&s.O.shouldPauseTarget(g,y)){var m=a.get(g);m||(m=new Set,a.set(g,m)),m.add(y)}else{"playing"===f.status&&(o=!0);var b=f.anim.playState,T=null===(u=f.anim.effect)||void 0===u||null===(c=(d=u).getComputedTiming)||void 0===c?void 0:c.call(d),w=null!==(h=null==T?void 0:T.progress)&&void 0!==h?h:0;if(("finished"===b||"idle"===b||w>=.999999)&&(f.status="done",n.add(f.anim)),w>0&&"finished"!==f.status){var k=i.T.updateTModelFromRecord(f);"finished"===(null==k?void 0:k.status)&&(f.status="finished")}}}}}catch(e){l.e(e)}finally{l.f()}var S,x=p(a);try{for(x.s();!(S=x.n()).done;){var M=v(S.value,2),C=M[0],E=M[1];e.pauseAnimations(C,E)}}catch(e){x.e(e)}finally{x.f()}var D,P=p(n);try{for(P.s();!(D=P.n()).done;){var O=D.value;e.finalizeAnimation(O)}}catch(e){P.e(e)}finally{P.f()}e.recordMap.size>0||o?e.waapiPoller.rafId=requestAnimationFrame(t):(e.waapiPoller.alive=!1,e.waapiPoller.rafId=0)};this.waapiPoller.rafId=requestAnimationFrame(t)}}},{key:"getAt",value:function(e,t){return a.u.isTransformKey(t)?e.tfMap[t]:e.styleMap[t]}},{key:"setAt",value:function(e,t,r){a.u.isTransformKey(t)?e.tfMap[t]=r:e.styleMap[t]=r}},{key:"completeRecord",value:function(e,t,r,n){if(e.finalRawFrame){var i=t.frames,a=i&&i[i.length-1],o=a?a.value:this.getAt(e.finalRawFrame,r);this.setAt(e,r,o),e.val(n,o);var l,u=e.targetValues[n];u&&(u.step=e.getTargetSteps(n),u.valuePointer=null!==(l=u.valueList)&&void 0!==l&&l.length?u.valueList.length-1:0,e.setActual(n,o),e.isTargetImperative(n)&&(u.cycle=u.cycles))}}},{key:"backfillKeyAcrossFramesUsingMorph",value:function(e,t,r){for(var i=l.g.getTargetName(t),a=[],o=0;o<r.length;o++)void 0!==this.getAt(r[o],i)&&a.push(o);if(a.length>=2)for(var s=0;s<a.length-1;s++){var c,d,h=a[s],f=a[s+1],v=r[h],p=r[f],g=this.getAt(v,i),y=this.getAt(p,i),m=null===(c=p.keyMeta)||void 0===c?void 0:c.get(i);if(m){var b=m.steps,w=m.stepOffset||0,k=null!==(d=m.segmentSteps)&&void 0!==d?d:b,S=v.keyTime,x=p.keyTime-S;if(!(!u.d.isDefined(b)||b<=0||x<=0))for(var M=w,C=h+1;C<f;C++){var E=r[C],D=u.d.limit((E.keyTime-S)/x,0,1),P=Math.round(D*b),O=u.d.limit(w+P,0,k),L=Math.max(O-M,0),A=n.a.morph(t,g,y,D);this.setAt(E,i,A),E.keyMeta.set(i,T(T({},m),{},{steps:L,stepOffset:M,segmentSteps:k,done:!1})),M=O}}}if(a.length){var j,_,I,R=a[a.length-1],V=r[R],N=this.getAt(V,i),F=null===(j=V.keyMeta)||void 0===j?void 0:j.get(i);if(!F)return;for(var B=null!==(_=null!==(I=F.segmentSteps)&&void 0!==I?I:F.steps)&&void 0!==_?_:0,H=R+1;H<r.length;H++){var U=r[H];this.setAt(U,i,N),U.keyMeta.set(i,T(T({},F),{},{steps:0,stepOffset:B,segmentSteps:B,done:!0}))}}}},{key:"fixTModelStyleFromFrame",value:function(e,t){if(e.hasDom()&&t){var r=T({},t.styleMap);if(Object.keys(t.tfMap).length>0){Object.keys(e.tfMap).forEach((function(t){e.tfMap[t]=e.val(t)}));var a=T(T({},e.tfMap),t.tfMap);t.tfMap=a,r.transform=n.a.getTransformString(e,a)}i.T.addUnitsToFrame(r),i.T.fixStyleByAnimation(e,r)}}},{key:"collectFramesForKey",value:function(e,t){var r,n=[],i=e.totalDuration,a=p(e.frames);try{for(a.s();!(r=a.n()).done;){var o=r.value,l=this.getAt(o,t);if(void 0!==l){var u=o.keyMeta.get(t);n.push({value:l,time:o.keyTime,offset:o.keyTime/i,steps:null==u?void 0:u.steps,segmentSteps:null==u?void 0:u.segmentSteps,interval:null==u?void 0:u.interval,easing:null==u?void 0:u.easing,stepOffset:(null==u?void 0:u.stepOffset)||0,valuePointer:null==u?void 0:u.valuePointer,cycle:null==u?void 0:u.cycle,done:!(null==u||!u.done)})}}}catch(e){a.e(e)}finally{a.f()}return n.sort((function(e,t){return e.time-t.time})),n.length>=2?n:void 0}},{key:"getRecordId",value:function(e,t){return"".concat(e.oid,"-").concat(t)}},{key:"delete",value:function(e){var t=e.recId,r=e.originalKey,n=e.tmodel;e.anim.cancel(),n.removeFromAnimatingMap(r),this.recordMap.delete(t)}},{key:"deleteAnimation",value:function(e){var t,r=[],i=p(this.recordMap.values());try{for(i.s();!(t=i.n()).done;){var a=t.value;a.tmodel===e&&r.push(a)}}catch(e){i.e(e)}finally{i.f()}if(!r.length)return!1;for(var o=new Set,l=new Set,u=0,s=r;u<s.length;u++){var c=s[u];o.add(c.originalKey),l.add(c.anim)}n.a.commitAnimatedStyles(e,o);var d,h=p(l);try{for(h.s();!(d=h.n()).done;){var f=d.value;try{f.cancel()}catch(e){}}}catch(e){h.e(e)}finally{h.f()}return e.clearAnimatingMap(),e.lastBatch=void 0,e.waapiBatch=void 0,e.finalKeyframe=void 0,e.finalRawFrame=void 0,!0}},{key:"cancelKey",value:function(e,t){var r=this.getRecordId(e,t),n=this.recordMap.get(r);n&&(n.status="canceled")}},{key:"deleteAll",value:(h=f(d().mark((function e(){var t,r,a,o,l,u,s,c,h,f,g,y,m,b,T,w;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.isShuttingDown=!0,this.waapiPoller.rafId&&(cancelAnimationFrame(this.waapiPoller.rafId),this.waapiPoller.rafId=0,this.waapiPoller.alive=!1),t=new Set,r=new Map,a=p(this.recordMap.values()),e.prev=5,a.s();case 7:if((o=a.n()).done){e.next=18;break}if("canceled"!==(l=o.value).status&&"detached"!==l.status){e.next=11;break}return e.abrupt("continue",16);case 11:i.T.updateTModelFromRecord(l),t.add(l.anim),(u=r.get(l.tmodel))||(u=new Set,r.set(l.tmodel,u)),u.add(l.originalKey);case 16:e.next=7;break;case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(5),a.e(e.t0);case 23:return e.prev=23,a.f(),e.finish(23);case 26:s=p(r);try{for(s.s();!(c=s.n()).done;)h=v(c.value,2),f=h[0],g=h[1],n.a.commitAnimatedStyles(f,g),i.T.addToUpdatingTargets(f,g),f.lastBatch=void 0,f.waapiBatch=void 0,f.finalKeyframe=void 0,f.finalRawFrame=void 0}catch(e){s.e(e)}finally{s.f()}y=p(this.recordMap.values());try{for(y.s();!(m=y.n()).done;)m.value.status="detached"}catch(e){y.e(e)}finally{y.f()}b=p(t);try{for(b.s();!(T=b.n()).done;){w=T.value;try{w.cancel()}catch(e){}}}catch(e){b.e(e)}finally{b.f()}this.recordMap.clear();case 33:case"end":return e.stop()}}),e,this,[[5,20,23,26]])}))),function(){return h.apply(this,arguments)})},{key:"flushOneFrame",value:(c=f(d().mark((function e(){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(requestAnimationFrame);case 2:this.isShuttingDown=!1;case 3:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"cancelTModelAnimation",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.mode,o=void 0===a?"resume":a,l=r.commitStyle,u=void 0===l||l,s=[],c=p(this.recordMap.values());try{for(c.s();!(t=c.n()).done;){var d=t.value;d.tmodel===e&&s.push(d)}}catch(e){c.e(e)}finally{c.f()}if(!s.length)return!1;for(var h=new Set,f=new Set,v=0,g=s;v<g.length;v++){var y=g[v];"canceled"!==y.status&&"detached"!==y.status&&i.T.updateTModelFromRecord(y),h.add(y.originalKey),f.add(y.anim)}u&&n.a.commitAnimatedStyles(e,h);for(var m=0,b=s;m<b.length;m++){var T=b[m];T.status="detached",this.recordMap.delete(T.recId)}var w,k=p(f);try{for(k.s();!(w=k.n()).done;){var S=w.value;try{S.cancel()}catch(e){}}}catch(e){k.e(e)}finally{k.f()}return e.clearAnimatingMap(),this.applyCanceledTargetMode(e,h,o),e.lastBatch=void 0,e.waapiBatch=void 0,e.finalKeyframe=void 0,e.finalRawFrame=void 0,!0}},{key:"applyCanceledTargetMode",value:function(e,t,r){var n,i=p(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;e.targetValues[a]&&("resume"!==r?"finish"!==r||this.finishCanceledTarget(e,a):e.setTargetStatus(a,"updating"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"finishCanceledTarget",value:function(e,t){var r=this.recordMap.get(this.getRecordId(e,t));r&&(this.completeRecord(e,r,r.cleanKey,t),e.removeFromAnimatingMap(t),r.hooks.fireOnEnd(e,t))}},{key:"fillCutFrameFromRecords",value:function(e,t,r,n){var a,o=n>0?u.d.limit(r/n,0,1):1,l=p(this.recordMap);try{for(l.s();!(a=l.n()).done;){var s,c,d,h,f,g,y,m=v(a.value,2)[1];if(m.tmodel===e&&"canceled"!==m.status&&"detached"!==m.status){var b=i.T.getValueFromFrames(m,o);if(b){var T=m.cleanKey,w=m.originalKey,k=e.targetValues[w];this.setAt(t,T,b.value),t.keyMeta.set(T,{steps:null!==(s=null!==(c=null!==(d=b.remainingSteps)&&void 0!==d?d:b.steps)&&void 0!==c?c:null==k?void 0:k.steps)&&void 0!==s?s:0,segmentSteps:null!==(h=null!==(f=b.steps)&&void 0!==f?f:null==k?void 0:k.steps)&&void 0!==h?h:0,interval:null!==(g=null==k?void 0:k.interval)&&void 0!==g?g:8,stepOffset:null!==(y=b.step)&&void 0!==y?y:0,valuePointer:b.valuePointer,cycle:b.cycle,done:"finished"===b.status})}}}}catch(e){l.e(e)}finally{l.f()}}},{key:"cutLastBatch",value:function(e,t,r){for(var n=0;n<t.frames.length&&t.frames[n].keyTime<=r;)n++;var i=t.totalDuration;if(n<t.frames.length&&r!==t.frames[n].keyTime){var a={keyTime:r,tfMap:{},styleMap:{},keyMeta:new Map};t.frames.splice(n,0,a),this.fillCutFrameFromRecords(e,a,r,i);var o,l=p(g(new Set(Object.values(t.keyMap).flatMap((function(e){return g(e)})))));try{for(l.s();!(o=l.n()).done;){var u=o.value;this.backfillKeyAcrossFramesUsingMorph(e,u,t.frames)}}catch(e){l.e(e)}finally{l.f()}t.frames=t.frames.slice(n)}return t.frames.forEach((function(e){e.keyTime=Math.max(0,e.keyTime-r)})),t.totalDuration=t.frames.length?t.frames[t.frames.length-1].keyTime:0,t}},{key:"callFireOnEndOnConflict",value:function(e,t,r){for(var n=t.keyMap,i=r.keyMap,a=0,o=Object.keys(i);a<o.length;a++){var l=o[a],u=n[l],s=i[l];if(u&&s){var c,d=p(u);try{for(d.s();!(c=d.n()).done;){var h=c.value;if(!s.has(h)){var f=this.getRecordId(e,h),v=this.recordMap.get(f);v&&(this.completeRecord(e,v,l,h),v.status="complete",v.hooks.fireOnEnd(v.tmodel,h),v.tmodel.removeFromAnimatingMap(h),this.recordMap.delete(f))}}}catch(e){d.e(e)}finally{d.f()}}}}},{key:"mergeBatches",value:function(e,t){for(var r=new Set(Object.keys(t.keyMap)),n={},i=0,a=Object.entries(e.keyMap);i<a.length;i++){var o=v(a[i],2),l=o[0],s=o[1];r.has(l)||(n[l]=s)}var c=Object.keys(n),d=[];if(c.length){var h,f=p(e.frames);try{for(f.s();!(h=f.n()).done;){var y,m=h.value,b={keyTime:m.keyTime,tfMap:{},styleMap:{},keyMeta:new Map},w=p(c);try{for(w.s();!(y=w.n()).done;){var k,S=y.value;u.d.isDefined(m.tfMap[S])&&(b.tfMap[S]=m.tfMap[S]),u.d.isDefined(m.styleMap[S])&&(b.styleMap[S]=m.styleMap[S]);var x=null===(k=m.keyMeta)||void 0===k?void 0:k.get(S);x&&b.keyMeta.set(S,x)}}catch(e){w.e(e)}finally{w.f()}(Object.keys(b.tfMap).length||Object.keys(b.styleMap).length)&&d.push(b)}}catch(e){f.e(e)}finally{f.f()}}var M=[].concat(d,g(t.frames));M.sort((function(e,t){return e.keyTime-t.keyTime}));var C,E=[],D=p(M);try{for(D.s();!(C=D.n()).done;){var P=C.value,O=E[E.length-1];if(O&&Math.abs(O.keyTime-P.keyTime)<1e-4){Object.assign(O.styleMap,P.styleMap),Object.assign(O.tfMap,P.tfMap);var L,A=p(P.keyMeta);try{for(A.s();!(L=A.n()).done;){var j=v(L.value,2),_=j[0],I=j[1];O.keyMeta.set(_,I)}}catch(e){A.e(e)}finally{A.f()}}else E.push(P)}}catch(e){D.e(e)}finally{D.f()}t.frames=E,t.keyMap=T(T({},n),t.keyMap),t.totalDuration=E.reduce((function(e,t){return Math.max(e,t.keyTime)}),0)}},{key:"areFramesEqual",value:function(e,t){var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var i=0,a=r;i<a.length;i++){var o=a[i];if("offset"!==o&&e[o]!==t[o])return!1}return!0}},{key:"filterRedundantKeyframes",value:function(e){if(e.length<=2)return e;for(var t=[e[0]],r=1;r<e.length-1;r++){var n=t[t.length-1],i=e[r];this.areFramesEqual(n,i)||t.push(i)}return t.push(e[e.length-1]),t}},{key:"rebaseAutoLayoutTransform",value:function(e,t){if(!e.lastBatch)return!1;var r=Math.min(u.d.now()-e.lastBatch.startTime,e.lastBatch.totalDuration),n=this.cutLastBatch(e,e.lastBatch,r);i.T.rebaseCutBatchMeta(e,n);var a,o=p(n.frames);try{for(o.s();!(a=o.n()).done;)for(var l=a.value,s=0,c=Object.entries(t);s<c.length;s++){var d=v(c[s],2),h=d[0],f=d[1];l.tfMap[h]=f}}catch(e){o.e(e)}finally{o.f()}for(var g=0,y=Object.entries(t);g<y.length;g++){var m=v(y[g],2),b=m[0],T=m[1];e.tfMap[b]=T,e.val(b,T),e.actualValues[b]=T}return this.deleteAnimation(e),this.animate(e,n,i.T.getAnimationHooks()),!0}}],t&&k(e.prototype,t),r&&k(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,c,h}()},980:function(e,t,r){r.d(t,{T:function(){return y}});var n=r(333),i=r(585),a=r(249),o=r(855),l=r(161),u=r(34);function s(e){return s="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},s(e)}function c(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(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 d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=f(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function f(e,t){if(e){if("string"==typeof e)return v(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function g(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}var y=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,s=[{key:"emptyBatch",value:function(){return{frames:[],keyMap:{},totalDuration:0}}},{key:"overrideAnimatedKeyWithSnap",value:function(t,r,a){for(var l=Array.isArray(r)?r:[r],u=Array.isArray(a)?a:[a],s={},c={},d=new Map,h={},f={},v=new Map,p={},g=!1,y=0;y<l.length;y++){var m=l[y];g=!0;var b=u[y],T=t.targetValues[m]||n.g.emptyValue(),w=n.g.getTargetName(m);i.u.isTransformKey(w)?(s[w]=b,h[w]=b):(c[w]=b,f[w]=b),d.set(w,{steps:1,interval:1}),v.set(w,{steps:1,interval:1}),(p[w]=new Set).add(m),T.value=b,T.steps=1,T.interval=0,T.snapAnimation=!0}if(g){var k=[];k.push({keyTime:0,tfMap:s,styleMap:c,keyMeta:d}),k.push({keyTime:1,tfMap:h,styleMap:f,keyMeta:v});var S={frames:k,keyMap:p,snap:!0,totalDuration:1};(0,o.s)().animate(t,S,e.getAnimationHooks())}}},{key:"fixStyleByAnimation",value:function(e,t){if(e.hasDom())for(var r=0,n=Object.keys(t);r<n.length;r++){var a=n[r];if("offset"!==a){var o=t[a];if(null!==o){var l=o;if("string"==typeof o&&o.endsWith("px")){var u=Number(o.slice(0,-2));Number.isNaN(u)||(l=u)}"width"===a?(e.styleMap.width=l,e.$dom.width(o)):"height"===a?(e.styleMap.height=l,e.$dom.height(o)):"transform"===a?e.$dom.transform(o,e.val("transformOrder")):i.u.transformMap[a]||(e.$dom.style(a,o),e.styleMap[a]=l)}}}}},{key:"addUnitsToFrame",value:function(e){for(var t=0,r=Object.keys(e);t<r.length;t++){var n=r[t];if("offset"!==n&&"transform"!==n){var a=e[n];null==a||Number.isNaN(a)?delete e[n]:"number"==typeof a&&i.u.styleWithUnitMap[n]&&(("width"===n||"height"===n)&&a<0&&(a=0),e[n]="".concat(a,"px"))}}}},{key:"getAnimationHooks",value:function(){return{morph:function(e,t,r,n,i,o){return a.a.easingMorph(e,t,r,n,i,o)},fireOnStep:function(e,t,r){return(0,o.HJ)().fireOnStep(e,t,r)},fireOnEnd:function(e,t){return(0,o.HJ)().fireOnEnd(e,t)}}}},{key:"addToUpdatingTargets",value:function(e,t){var r,n=[],i=h((0,o.s)().recordMap);try{for(i.s();!(r=i.n()).done;){var a=d(r.value,2)[1];a.tmodel===e&&(t&&!t.has(a.originalKey)||n.push(a))}}catch(e){i.e(e)}finally{i.f()}for(var l=0,u=n;l<u.length;l++){var s,c,f=u[l].originalKey;e.targetValues[f]&&(null===(s=e.noDomUpdatingTargets)||void 0===s||s.delete(f),0===(null===(c=e.noDomUpdatingTargets)||void 0===c?void 0:c.size)&&(e.noDomUpdatingTargets=void 0),e.setTargetStatus(f,"updating"),e.removeFromAnimatingMap(f))}}},{key:"addToNODomUpdatingTargets",value:function(e,t){var r,n=[],i=h((0,o.s)().recordMap);try{for(i.s();!(r=i.n()).done;){var a=d(r.value,2)[1];a.tmodel===e&&(t&&!t.has(a.originalKey)||n.push(a))}}catch(e){i.e(e)}finally{i.f()}for(var l=0,u=n;l<u.length;l++){var s=u[l].originalKey;e.addToNoDomUpdatingTargets(s)}}},{key:"removeKeysFromBatch",value:function(e,t){if(e&&null!=t&&t.size){var r,i=h(e.frames);try{for(i.s();!(r=i.n()).done;){var a,o=r.value,l=h(t);try{for(l.s();!(a=l.n()).done;){var u=a.value,s=n.g.getTargetName(u);delete o.styleMap[s],delete o.tfMap[s],o.keyMeta&&o.keyMeta.delete(s)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}var c,d=h(t);try{for(d.s();!(c=d.n()).done;){var f=c.value,v=n.g.getTargetName(f);delete e.keyMap[v]}}catch(e){d.e(e)}finally{d.f()}e.frames=e.frames.filter((function(e){return Object.keys(e.styleMap).length||Object.keys(e.tfMap).length})),e.totalDuration=e.frames.length?e.frames[e.frames.length-1].keyTime:0}}},{key:"updateTModelFromRecord",value:function(t){var r=t.tmodel,n=t.originalKey,i=t.cleanKey;if(r.hasDom()){var a=e.getValueFromAnim(t);if(a){var l=a.value,s=a.step,c=a.steps,d=a.cycle,h=a.valuePointer,f=a.from,v=a.to,p=a.interval,g=a.easing;(0,o.s)().setAt(r,i,l),r.val(n,l);var y=r.targetValues[n];if(y){var m;null!==(m=y.valueList)&&void 0!==m&&m.length?e.syncListTargetSegment(y,a):(u.d.isDefined(f)&&(y.initialValue=f),u.d.isDefined(v)&&(y.value=v),u.d.isDefined(c)&&(y.steps=c),u.d.isDefined(p)&&(y.interval=p),u.d.isDefined(g)&&(y.easing=g)),u.d.isDefined(s)&&(y.step=s),u.d.isDefined(h)&&(y.valuePointer=h),u.d.isDefined(d)&&(y.cycle=d),y.lastUpdate=u.d.now(),r.setActual(n,l);var b="".concat(d,":").concat(h,":").concat(s);t.needsFireOnStep&&s>0&&c>0&&t.lastFireOnStepKey!==b&&(t.lastFireOnStepKey=b,t.hooks.fireOnStep(r,n,s)||(t.needsFireOnStep=!1))}return a}}}},{key:"getValueFromAnim",value:function(t){var r,n,i=null===(r=t.anim.effect)||void 0===r||null===(n=r.getComputedTiming)||void 0===n?void 0:n.call(r);if(i){var a=u.d.isDefined(i.progress)?u.d.limit(i.progress,0,1):1;return e.getValueFromFrames(t,a)}}},{key:"getValueFromFrames",value:function(e,t){var r,n,i,o,l,s=e.originalKey,c=e.frames;if(c&&!(c.length<2)){var d=u.d.limit(t,0,1),h=c.length-1,f=0;if(d<=c[0].offset)f=0;else if(d>=c[h].offset)f=h-1;else for(var v=0;v<h;v++)if(d>=c[v].offset&&d<c[v+1].offset){f=v;break}var p=c[f],g=c[f+1],y=p.value,m=g.value,b=p.offset,T=g.offset-b;if(!(T<=0)){var w,k,S,x,M=u.d.limit((d-b)/T,0,1),C=a.a.morph(s,y,m,M),E=g.steps;if(!u.d.isDefined(E)||E<=0)return{value:C,framePointer:f,step:g.segmentSteps,steps:g.segmentSteps,from:y,to:m,interval:g.interval,easing:g.easing,valuePointer:null!==(w=null!==(k=g.valuePointer)&&void 0!==k?k:p.valuePointer)&&void 0!==w?w:0,cycle:null!==(S=null!==(x=g.cycle)&&void 0!==x?x:p.cycle)&&void 0!==S?S:0,status:g.done?"finished":"playing"};var D=Math.round(M*E);D=u.d.limit(D,0,E);var P=g.stepOffset||0,O=null!==(r=g.segmentSteps)&&void 0!==r?r:P+E;return{value:C,step:u.d.limit(P+D,0,O),steps:O,from:y,to:m,interval:g.interval,easing:g.easing,valuePointer:null!==(n=null!==(i=g.valuePointer)&&void 0!==i?i:p.valuePointer)&&void 0!==n?n:0,cycle:null!==(o=null!==(l=g.cycle)&&void 0!==l?l:p.cycle)&&void 0!==o?o:0,status:g.done?"finished":"playing"}}}}},{key:"detachAnimationsOnDeleteDom",value:function(t){var r,n=(0,o.s)().recordMap,i=new Set,a=new Set,u=h(n);try{for(u.s();!(r=u.n()).done;){var s=d(r.value,2)[1];s.tmodel===t&&(l.O.shouldPauseTarget(t,s.originalKey)?i.add(s.originalKey):a.add(s.originalKey))}}catch(e){u.e(e)}finally{u.f()}i.size&&e.addToUpdatingTargets(t,i),a.size&&e.addToNODomUpdatingTargets(t,a),e.deleteDetachedRecords(t,new Set([].concat(c(i),c(a))))}},{key:"deleteDetachedRecords",value:function(e,t){var r,n=(0,o.s)().recordMap,i=h(n);try{for(i.s();!(r=i.n()).done;){var a=d(r.value,2),l=a[0],u=a[1];if(u.tmodel===e&&t.has(u.originalKey)){u.status="detached";try{u.anim.cancel()}catch(e){}e.removeFromAnimatingMap(u.originalKey),n.delete(l)}}}catch(e){i.e(e)}finally{i.f()}e.clearAnimatingMap(),e.lastBatch=void 0,e.finalKeyframe=void 0,e.finalRawFrame=void 0}},{key:"rebaseCutBatchMeta",value:function(e,t){var r;if(t&&null!==(r=t.frames)&&void 0!==r&&r.length)for(var n=0,i=Object.entries(t.keyMap);n<i.length;n++){var a,l=d(i[n],2),s=l[0],c=h(l[1]);try{for(c.s();!(a=c.n()).done;){var f=a.value,v=e.targetValues[f];if(v)for(var p=v.step||0,g=1;g<t.frames.length;g++){var y,m=t.frames[g];if(void 0!==(0,o.s)().getAt(m,s)){var b=null===(y=m.keyMeta)||void 0===y?void 0:y.get(s);if(b&&u.d.isDefined(b.steps)){var T=b.stepOffset||0,w=T+b.steps;p>T&&p<w&&(b.stepOffset=p,b.steps=w-p);break}}}}}catch(e){c.e(e)}finally{c.f()}}}},{key:"removeCleanKeyFromBatch",value:function(e,t){if(!e)return!1;var r,n=e.totalDuration||0,i=!1,a=h(e.frames);try{for(a.s();!(r=a.n()).done;){var o,l=r.value;void 0===l.tfMap[t]&&void 0===l.styleMap[t]||(i=!0),delete l.tfMap[t],delete l.styleMap[t],null===(o=l.keyMeta)||void 0===o||o.delete(t)}}catch(e){a.e(e)}finally{a.f()}return delete e.keyMap[t],e.frames=e.frames.filter((function(e){return Object.keys(e.tfMap).length||Object.keys(e.styleMap).length})),e.frames.sort((function(e,t){return e.keyTime-t.keyTime})),e.totalDuration=e.frames.length?Math.max.apply(Math,[n].concat(c(e.frames.map((function(e){return e.keyTime}))))):0,i}},{key:"syncListTargetSegment",value:function(e,t){var r,n,i,a,o,l;if(null!=e&&null!==(r=e.valueList)&&void 0!==r&&r.length){var s=e.valueList.length-1,c=u.d.limit(null!==(n=null!==(i=t.valuePointer)&&void 0!==i?i:e.valuePointer)&&void 0!==n?n:1,1,s),d=c-1;e.valuePointer=c,e.initialValue=e.valueList[d],e.value=e.valueList[c],null!==(a=e.stepList)&&void 0!==a&&a.length&&(e.steps=e.stepList[d%e.stepList.length]),null!==(o=e.intervalList)&&void 0!==o&&o.length&&(e.interval=e.intervalList[d%e.intervalList.length]),null!==(l=e.easingList)&&void 0!==l&&l.length&&(e.easing=e.easingList[d%e.easingList.length])}}},{key:"handleWebAnimationAPI",value:function(t,r,n,a,o,l,u,s,c,d,h){var f,v=arguments.length>11&&void 0!==arguments[11]&&arguments[11],p=!(arguments.length>12&&void 0!==arguments[12])||arguments[12],g=t.waapiBatch||(t.waapiBatch={frames:[],easing:void 0,keyMap:{},totalDuration:0});p&&e.removeCleanKeyFromBatch(g,r)&&(h=0);var y=i.u.isTransformKey(r),m=function(e){for(var t=Math.max(0,e+h),r=0;r<g.frames.length;r++){var n=g.frames[r];if(Math.abs(n.keyTime-t)<1e-4)return n}var i={keyTime:t,tfMap:{},styleMap:{},keyMeta:new Map};return g.frames.push(i),i},b=function(e,t){y?e.tfMap[r]=t:e.styleMap[r]=t},T=0;if(a.valueList&&a.valueList.length){var w,k,S=a.valueList,x=a.stepList||[1],M=a.intervalList||[d||8],C=null!==(w=a.cycles)&&void 0!==w?w:1,E=null!==(k=a.cycle)&&void 0!==k?k:0,D=u;if(!v){var P,O,L=m(0);b(L,o),L.keyMeta.set(r,{steps:0,segmentSteps:c||a.steps||0,interval:d||a.interval||8,stepOffset:s||0,valuePointer:null!==(P=null!=u?u:a.valuePointer)&&void 0!==P?P:1,cycle:null!==(O=a.cycle)&&void 0!==O?O:0})}for(;E<C;){for(var A=D;A<S.length;A++){var j,_=x[(A-1)%x.length],I=M[(A-1)%M.length]||8,R=E===(null!==(j=a.cycle)&&void 0!==j?j:0)&&A===u?s:0,V=Math.max(_-R,0);if(!(V<=0)){var N=m(T+=V*I);b(N,S[A]),N.keyMeta.set(r,{steps:V,segmentSteps:_,interval:I,stepOffset:R,valuePointer:A,cycle:E})}}E++,D=1}}else{var F;d=d||8;var B=Math.max(c-s,0);if(B<=0)return t.val(n,l),a.step=c,0;T=B*d,v||b(m(0),o);var H=m(T);b(H,l),H.keyMeta.set(r,{steps:B,segmentSteps:c,interval:d,stepOffset:s,valuePointer:0,cycle:null!==(F=a.cycle)&&void 0!==F?F:0})}return T<=0?(t.removeFromUpdatingTargets(n),0):(t.getTargetEasing(n)&&(g.easing=t.getTargetEasing(n)),g.totalDuration=Math.max(0,g.totalDuration,h+T),((f=g.keyMap)[r]||(f[r]=new Set)).add(n),t.removeFromUpdatingTargets(n),t.addToAnimatingMap(n),T)}}],(r=null)&&p(t.prototype,r),s&&p(t,s),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,s}()},855:function(e,t,r){r.d(t,{qw:function(){return ht},hd:function(){return mt},aK:function(){return bt},s:function(){return kt},UR:function(){return Lt},kQ:function(){return pt},qI:function(){return yt},zw:function(){return xt},EI:function(){return Tt},cI:function(){return gt},S9:function(){return Dt},fB:function(){return St},c$:function(){return Ct},r5:function(){return Mt},iP:function(){return Ot},HJ:function(){return wt},U$:function(){return Et},W_:function(){return ft},wk:function(){return Pt},E_:function(){return et},Bt:function(){return vt}});var n=r(768),i=r(90),a=r(756),o=r(34),l=r(585),u=r(484);function s(e){return s="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},s(e)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function h(e,t){if(e){if("string"==typeof e)return f(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function p(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}var y=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$document=new n.J(document),this.currentTouch={deltaY:0,deltaX:0,prevDeltaX:0,prevDeltaY:0,pinchDelta:0,key:"",manualMomentumFlag:!1,orientation:"none",dir:"",source:""},this.lastEvent=void 0,this.touchTimeStamp=0,this.cursor={x:0,y:0},this.start0=void 0,this.start1=void 0,this.end0=void 0,this.end1=void 0,this.touchCount=0,this.canFindHandlers=!0,this.swipeStartX=0,this.swipeStartY=0,this.currentEventName="",this.currentEventType="",this.currentEventTModel=void 0,this.currentOriginalEvent=void 0,this.currentKey="",this.currentHandlers={gestureTarget:null,touch:null,click:null,scrollLeft:null,scrollTop:null,swipe:null,pinch:null,focus:null,justFocused:null,blur:null,leave:null,enter:null,start:null,endCandidate:null,end:null,hover:null},this.eventQueue=[],this.attachedEventMap={},this.eventTargetMap={},this.allEvents={},this.windowScrollX=0|window.scrollX,this.windowScrollY=0|window.scrollY,this.windowScrollEndTimer=0,this.scrollEndTimeStamp={x:0,y:0},this.windowEpoch=0,this.eventEpoch=0,Object.values(l.u.events).forEach((function(e){Object.assign(t.allEvents,e)})),this.hovered=new Set,this.bindedHandleWindowEvent=this.handleWindowEvent.bind(this),this.bindedHandleEvent=this.handleEvent.bind(this),this.bindedParentHandleEvent=this.handleDocEvent.bind(this),this.maxPointerMoveDistance=0}return t=e,r=[{key:"detachWindowEvents",value:function(){var e=this;Object.keys(l.u.events.windowEvents).forEach((function(t){et.$window.detachEvent(t,e.bindedHandleWindowEvent)}))}},{key:"attachWindowEvents",value:function(){var e=this;Object.keys(l.u.events.windowEvents).forEach((function(t){et.$window.addEvent(t,e.bindedHandleWindowEvent)}))}},{key:"detachDocumentEvents",value:function(e){var t=this,r=l.u.events[e];Object.keys(r).forEach((function(e){var n=r[e];t.$document.detachEvent(e,t.bindedParentHandleEvent,n.capture)}))}},{key:"attachDocumentEvents",value:function(e){var t=this,r=l.u.events[e];Object.keys(r).forEach((function(e){var n=r[e];t.$document.addEvent(e,t.bindedParentHandleEvent,n.capture,n.passive)}))}},{key:"attachEvents",value:function(e){var t,r=d(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n.externalEventMap){var i,a=d(n.externalEventMap);try{for(a.s();!(i=a.n()).done;){var o=c(i.value,1)[0];this.attachTargetEvents(n,o,!0)}}catch(e){a.e(e)}finally{a.f()}}}}catch(e){r.e(e)}finally{r.f()}}},{key:"attachTargetEvents",value:function(e,t,r){var n=this,i="".concat(e.oid," ").concat(t),a=l.u.targetToEventsMapping[t];a&&Array.isArray(a)&&0!==a.length&&a.forEach((function(t){var a=l.u.events[t];if(a){var o="undefined"!=typeof window&&!!window.PointerEvent;Object.keys(a).forEach((function(t){if(!o||!t.startsWith("mouse")){var l=a[t],u=!!l.windowEvent,s=u?et.$window:e.hasDom()?e.$dom:null;if(!s)return!1;var c="".concat(i," ").concat(u?"win":"dom"),d=n.eventTargetMap[c]===s,h="".concat(e.oid," ").concat(t," ").concat(u?"win":"dom"),f=n.attachedEventMap[h]&&n.attachedEventMap[h].$dom===s;!r&&d&&f||(s.detachEvent(t,n.bindedHandleEvent,l.capture),s.addEvent(t,n.bindedHandleEvent,l.capture,l.passive),n.eventTargetMap[c]=s,n.attachedEventMap[h]={$dom:s,event:t,capture:!!l.capture})}}))}}))}},{key:"detachAll",value:function(){for(var e=0,t=Object.keys(this.attachedEventMap);e<t.length;e++){var r=t[e],n=this.attachedEventMap[r],i=n.$dom,a=n.event,o=n.capture;i.exists()&&i.detachEvent(a,this.bindedHandleEvent,o)}this.attachedEventMap={},this.eventTargetMap={}}},{key:"resetEventsOnTimeout",value:function(){if((this.scrollEndTimeStamp.x>0||this.scrollEndTimeStamp.y>0||0!==this.currentTouch.pinchDelta)&&!(this.touchCount>0)){var e=o.d.now(),t=Math.max(this.scrollEndTimeStamp.x-e,this.scrollEndTimeStamp.y-e);t>100&&(this.currentTouch.deltaY*=.95,this.currentTouch.deltaX*=.95,this.currentTouch.pinchDelta*=.95,Math.abs(this.currentTouch.deltaY)<.1&&(this.currentTouch.deltaY=0),Math.abs(this.currentTouch.deltaX)<.1&&(this.currentTouch.deltaX=0),Math.abs(this.currentTouch.pinchDelta)<.1&&(this.currentTouch.pinchDelta=0)),t<=0&&(this.currentTouch.deltaY=0,this.currentTouch.deltaX=0,this.currentTouch.pinchDelta=0),!this.currentTouch.deltaX&&this.scrollEndTimeStamp.x&&e>=this.scrollEndTimeStamp.x&&(this.scrollEndTimeStamp.x=0,this.queueScrollEndEvent("x",this.currentHandlers.scrollLeft)),!this.currentTouch.deltaY&&this.scrollEndTimeStamp.y&&e>=this.scrollEndTimeStamp.y&&(this.queueScrollEndEvent("y",this.currentHandlers.scrollTop),this.scrollEndTimeStamp.y=0),St().schedule(10,"scroll decay")}}},{key:"findEventHandlers",value:function(e){var t,r,i,o,l,u,s,c,d,h,f=e.tmodel,v=e.eventType;f&&(t=a.X.findFirstClickHandler(f),r=a.X.findFirstSwipeHandler(f),d=a.X.findFirstStartHandler(f),h=a.X.findFirstEndHandler(f),s=a.X.findFirstEnterHandler(f),c=a.X.findFirstLeaveHandler(f),i=a.X.findFirstScrollLeftHandler(f,v),o=a.X.findFirstScrollTopHandler(f,v),l=a.X.findFirstPinchHandler(f),u=n.J.hasFocus(f)?f:this.currentHandlers.focus),this.currentHandlers.scrollLeft===i&&this.currentHandlers.scrollTop===o||this.clearTouch(),this.currentHandlers.focus!==u&&(this.currentHandlers.justFocused=u,this.currentHandlers.blur=this.currentHandlers.focus),this.currentHandlers.hover=null!=f&&f.canHandleEvent("onHover")?f:void 0,this.currentHandlers.click=t,this.currentHandlers.swipe=r,this.currentHandlers.start=d,this.currentHandlers.endCandidate=h,this.currentHandlers.scrollLeft=i,this.currentHandlers.scrollTop=o,this.currentHandlers.pinch=l,this.currentHandlers.focus=u,this.currentHandlers.enter=s,this.currentHandlers.leave=c}},{key:"captureEvents",value:function(){if(this.currentTouch.prevDeltaX=0,this.currentTouch.prevDeltaY=0,this.currentHandlers.enter=void 0,this.currentHandlers.leave=void 0,this.currentHandlers.justFocused=void 0,this.currentHandlers.blur=void 0,this.currentHandlers.end=void 0,this.currentKey=this.currentTouch.key,0===this.eventQueue.length)return this.currentEventName="",this.currentEventType="",this.currentEventTModel=void 0,this.currentOriginalEvent=void 0,void(this.currentKey="");var e=this.eventQueue.shift();return this.canFindHandlers&&!e.synthetic&&this.findEventHandlers(e),"end"===e.eventType&&(this.currentHandlers.end=this.currentHandlers.endCandidate,this.currentHandlers.start=void 0,this.currentHandlers.endCandidate=void 0,this.currentHandlers.gestureTarget=void 0),this.currentEventName=e.eventName,this.currentEventType=e.eventType,this.currentEventTModel=e.tmodel,this.currentOriginalEvent=e.originalEvent,this.currentTouch.key="",this.markCapturedEventDirty(e),"end"!==e.eventType&&"click"!==e.eventType||(this.canFindHandlers=!0),e}},{key:"markCapturedEventDirty",value:function(e){var t=function(e,t){e&&(e.markEventDirty(),e.markLayoutDirty(t))};switch(t(e.tmodel,"".concat(e.eventType,"-event")),e.eventType){case"click":t(this.currentHandlers.click,"click-event");break;case"start":t(this.currentHandlers.start,"start-event");break;case"end":t(this.currentHandlers.end,"end-event");break;case"move":t(this.currentHandlers.swipe,"swipe-event"),t(this.currentHandlers.scrollLeft,"scrollleft-event"),t(this.currentHandlers.scrollTop,"scrolltop-event"),t(this.currentHandlers.pinch,"pinch-event")}}},{key:"handleDocEvent",value:function(e){this.handleEvent(e,!0,!1)}},{key:"handleWindowEvent",value:function(e){this.handleEvent(e,!1,!0)}},{key:"handleEvent",value:function(t,r,n){var i,l,u,s,c,d,h,f,v,p,g=this;if(t){var y=t.type,m=this.allEvents[y];if(m){var b,T,w=m.eventName,k=m.inputType,S=m.eventType,x=m.order,M=m.queue,C=m.rateLimit,E=o.d.now(),D={eventName:w,eventItem:m,eventType:S,originalName:y,tmodel:b="move"===S&&this.touchCount>0&&this.currentHandlers.gestureTarget?this.currentHandlers.gestureTarget:this.getTModelFromEvent(t),originalEvent:t,timeStamp:E};if(null!==(i=this.lastEvent)&&void 0!==i&&i.eventItem){var P=this.lastEvent,O=P.eventItem,L=E-P.timeStamp;if("end"!==S&&"cancel"!==S&&"start"!==S&&k&&O.inputType&&O.inputType!==k&&x>O.order)return;if(this.eventQueue.length>e.MAX_EVENT_QUEUE_SIZE&&C>0&&L<C)for(var A=0,j=this.eventQueue.length-1;j>=0;j--){var _;if((null===(_=this.eventQueue[j].eventItem)||void 0===_?void 0:_.eventType)!==S)break;if(++A>e.MAX_EVENT_TYPE_CAPACITY)return void(this.preventDefault(b,w)&&(t.preventDefault(),t.stopPropagation()))}}switch(this.eventEpoch++,null===(l=b)||void 0===l||l.markEventDirty(),null===(u=b)||void 0===u||u.markLayoutDirty("event"),this.lastEvent=D,M&&this.eventQueue.push(this.lastEvent),w){case"mousedown":case"touchstart":this.maxPointerMoveDistance=0,this.clearStart(),this.clearEnd(),this.clearTouch(),this.eventQueue.length=0,this.eventQueue.push(this.lastEvent),this.touchCount=this.countTouches(t)||1,this.preventDefault(b,w)&&t.cancelable&&t.preventDefault(),this.start0=this.getTouch(t),this.start1=this.getTouch(t,1),this.cursor.x=this.start0.x,this.cursor.y=this.start0.y,this.currentHandlers.gestureTarget=b,this.findEventHandlers(D),this.canFindHandlers=!1,this.swipeStartX=this.start0.x-(null!==(s=null===(c=this.currentHandlers.swipe)||void 0===c?void 0:c.getX())&&void 0!==s?s:0),this.swipeStartY=this.start0.y-(null!==(d=null===(h=this.currentHandlers.swipe)||void 0===h?void 0:h.getY())&&void 0!==d?d:0),t.stopPropagation(),this.detachDocumentEvents("documentDragEvents"),this.attachDocumentEvents("documentDragEvents");break;case"mousemove":case"touchmove":var I;T=this.getTouch(t),this.cursor.x=T.x,this.cursor.y=T.y,this.preventDefault(b,w)&&t.cancelable&&t.preventDefault(),this.touchCount>0?(this.scrollEndTimeStamp.x=0,this.scrollEndTimeStamp.y=0,this.move(t),t.stopPropagation(),null===(I=this.currentHandlers.swipe)||void 0===I||I.markLayoutDirty("swipe-event")):this.isCurrentSource("wheel")&&this.clearTouch();break;case"mouseup":case"touchend":this.detachDocumentEvents("documentDragEvents"),this.preventDefault(b,w)&&t.cancelable&&t.preventDefault(),this.end(t),this.clearEnd(),this.touchCount=0,t.stopPropagation();break;case"click":this.preventDefault(b,w)&&t.preventDefault(),this.end0=this.getTouch(t);var R=a.X.findFirstClickHandler(b),V=!this.start0||R===this.currentHandlers.click&&this.maxPointerMoveDistance<e.CLICK_MOVE_THRESHOLD;R&&V&&(this.eventQueue.length=0,this.eventQueue.push({eventName:w,eventItem:m,eventType:S,originalName:y,tmodel:b,originalEvent:t,timeStamp:E})),this.clearEnd(),this.clearStart(),this.maxPointerMoveDistance=0,this.touchCount=0,t.stopPropagation();break;case"wheel":this.preventDefault(b,w)&&(t.preventDefault(),t.stopPropagation()),this.touchCount=0,this.wheel(t);break;case"mouseleave":r&&this.touchCount>0&&(this.detachDocumentEvents("documentDragEvents"),T=this.getTouch(t),this.cursor.x=T.x,this.cursor.y=T.y,this.end(t),this.clearEnd(),this.touchCount=0,t.stopPropagation());break;case"mousecancel":case"touchcancel":this.canFindHandlers=!0,this.detachDocumentEvents("documentDragEvents"),this.clearStart(),this.clearEnd(),this.clearTouch(),this.maxPointerMoveDistance=0,this.touchCount=0,t.stopPropagation();break;case"key":this.currentTouch.key=t.which||t.keyCode,null===(f=this.currentHandlers.focus)||void 0===f||f.markLayoutDirty("key-event");break;case"keydown":this.currentTouch.key=t.which||t.keyCode,null===(v=this.currentHandlers.focus)||void 0===v||v.markLayoutDirty("keydown-event");break;case"resize":this.windowEpoch++,this.resizeRoot(),Tt().getAvailableDoms().forEach((function(e){e.targets.onResize&&e.markLayoutDirty("resize-event")}));break;case"scroll":clearTimeout(this.windowScrollEndTimer),this.windowScrollEndTimer=setTimeout((function(){g.queueWindowScrollEndEvent("x",b),g.queueWindowScrollEndEvent("y",b),g.windowScrollEndTimer=0}),450),n?(this.windowEpoch++,this.windowScrollX=0|window.scrollX,this.windowScrollY=0|window.scrollY,xt().domIslandSet.forEach((function(e){e.markLayoutDirty("window-scroll-event")}))):b.markLayoutDirty("container-scroll-event")}St().schedule(0,"".concat(null===(p=b)||void 0===p?void 0:p.oid,"-").concat(y,"-").concat(w,"-").concat((t.target.tagName||"").toUpperCase()))}}}},{key:"queueScrollEndEvent",value:function(e,t){if(t){var r="x"===e?"scrollleftend":"scrolltopend";this.removeScrollEndEvents(e),this.eventQueue.push({eventName:r,eventType:r,originalName:r,tmodel:t,originalEvent:void 0,timeStamp:o.d.now(),synthetic:!0}),this.eventEpoch++,t.markEventDirty(),t.markLayoutDirty(r),St().schedule(0,r)}}},{key:"queueWindowScrollEndEvent",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"window",n="x"===e?"windowscrollleftend":"windowscrolltopend";this.removeScrollEndEvents(e),this.eventQueue.push({eventName:n,eventType:n,originalName:n,tmodel:t,originalEvent:void 0,timeStamp:o.d.now(),synthetic:!0,scrollSource:r}),this.eventEpoch++,xt().domIslandSet.forEach((function(e){e.markEventDirty(),e.markLayoutDirty(n)})),St().schedule(0,n)}},{key:"removeScrollEndEvents",value:function(e){var t="x"===e?new Set(["scrollleftend","windowscrollleftend"]):new Set(["scrolltopend","windowscrolltopend"]);this.eventQueue=this.eventQueue.filter((function(e){return!t.has(e.eventType)}))}},{key:"resizeRoot",value:function(){u.j.executeDeclarativeTarget(vt(),"screenWidth"),u.j.executeDeclarativeTarget(vt(),"screenHeight")}},{key:"preventDefault",value:function(e,t){return!(!e||!(!0===e.preventDefault()||Array.isArray(e.preventDefault())&&e.preventDefault().includes(t)))}},{key:"getTModelFromEvent",value:function(e){var t,r=e.currentTarget||e.target;return r&&1===r.nodeType&&(t=r.getAttribute("tgjs-oid")||r.id),t&&et.manager.visibleOidMap[t]||(t=null==r?void 0:r.id)&&Tt().visibleOidMap[t]||(t=n.J.findNearestParentWithId(e.target)),Tt().visibleOidMap[t]}},{key:"clearStart",value:function(){this.start0=void 0,this.start1=void 0}},{key:"clearEnd",value:function(){this.end0=void 0,this.end1=void 0}},{key:"clearTouch",value:function(){this.currentTouch={deltaY:0,deltaX:0,prevDeltaX:0,prevDeltaY:0,pinchDelta:0,key:"",manualMomentumFlag:!1,orientation:"none",dir:"",source:""}}},{key:"clearAll",value:function(){this.clearStart(),this.clearEnd(),this.clearTouch(),this.eventQueue.length=0,this.touchCount=0,this.canFindHandlers=!0,this.lastEvent=void 0,this.attachedEventMap={},this.eventTargetMap={},this.swipeStartX=0,this.swipeStartY=0,this.hovered.clear(),clearTimeout(this.windowScrollEndTimer),this.windowScrollEndTimer=0,this.scrollEndTimeStamp.x=0,this.scrollEndTimeStamp.y=0,this.maxPointerMoveDistance=0,this.currentHandlers={touch:null,click:null,scrollLeft:null,scrollTop:null,swipe:null,pinch:null,focus:null,justFocused:null,blur:null,leave:null,enter:null,start:null,end:null,hover:null}}},{key:"deltaX",value:function(){return this.currentTouch.deltaX}},{key:"deltaY",value:function(){return this.currentTouch.deltaY}},{key:"cursorX",value:function(){return this.cursor.x}},{key:"cursorY",value:function(){return this.cursor.y}},{key:"swipeX",value:function(){return this.cursor.x-this.swipeStartX}},{key:"swipeY",value:function(){return this.cursor.y-this.swipeStartY}},{key:"pinchDelta",value:function(){return this.currentTouch.pinchDelta}},{key:"dir",value:function(){return this.currentTouch.dir}},{key:"getScrollLeftHandler",value:function(){return this.currentHandlers.scrollLeft}},{key:"getScrollTopHandler",value:function(){return this.currentHandlers.scrollTop}},{key:"getWindowScrollX",value:function(){return this.windowScrollX}},{key:"getWindowScrollY",value:function(){return this.windowScrollY}},{key:"getWindowEpoch",value:function(){return this.windowEpoch}},{key:"getPinchHandler",value:function(){return this.currentHandlers.pinch}},{key:"getClickHandler",value:function(){return this.currentHandlers.click}},{key:"getTouchCount",value:function(){return this.touchCount}},{key:"isClickEvent",value:function(){return"click"===this.getEventType()}},{key:"isMoveEvent",value:function(){return"move"===this.getEventType()}},{key:"isResizeEvent",value:function(){return"resize"===this.getEventType()}},{key:"isSwipeEvent",value:function(){return this.isMoveEvent()&&this.hasDelta()&&1===this.touchCount}},{key:"isScrollEvent",value:function(){return this.hasDelta()&&this.isCurrentSource("wheel")}},{key:"hasDelta",value:function(){return 0!==this.deltaX()||0!==this.deltaY()}},{key:"isEndEvent",value:function(){return"end"===this.getEventType()||"click"===this.getEventType()}},{key:"isStartEvent",value:function(){return"start"===this.getEventType()}},{key:"getEventName",value:function(){return this.currentEventName}},{key:"getCurrentOriginalEvent",value:function(){return this.currentOriginalEvent}},{key:"getEventType",value:function(){return this.currentEventType}},{key:"getEventTModel",value:function(){return this.currentEventTModel}},{key:"isClickHandler",value:function(e){return this.getClickHandler()===e&&this.isClickEvent()}},{key:"isEnterHandler",value:function(e){return!(!e||e!==this.currentHandlers.enter||"mouseenter"!==this.getEventName()||this.hovered.has(e.oid)||(this.hovered.add(e.oid),0))}},{key:"isLeaveHandler",value:function(e){return!(!e||e!==this.currentHandlers.leave||"mouseleave"!==this.getEventName()||!this.hovered.has(e.oid)||(this.hovered.delete(e.oid),0))}},{key:"isHoverHandler",value:function(e){return e===this.currentHandlers.hover}},{key:"isSwipeHandler",value:function(e){return e===this.currentHandlers.swipe}},{key:"isStartHandler",value:function(e){return e===this.currentHandlers.start}},{key:"isEndHandler",value:function(e){return e===this.currentHandlers.end}},{key:"onFocus",value:function(e){return this.currentHandlers.justFocused===e}},{key:"onBlur",value:function(e){return this.currentHandlers.blur===e}},{key:"hasFocus",value:function(e){return this.currentHandlers.focus===e}},{key:"isScrollLeftHandler",value:function(e){return this.currentHandlers.scrollLeft===e}},{key:"isScrollTopHandler",value:function(e){return this.currentHandlers.scrollTop===e}},{key:"isScrollLeftEndHandler",value:function(e){return this.currentHandlers.scrollLeft===e&&"scrollleftend"===this.currentEventType}},{key:"isScrollTopEndHandler",value:function(e){return this.currentHandlers.scrollTop===e&&"scrolltopend"===this.currentEventType}},{key:"isScrolling",value:function(){return this.scrollEndTimeStamp.x>0||this.scrollEndTimeStamp.y>0}},{key:"isWindowScrolling",value:function(){return this.windowScrollEndTimer>0}},{key:"isPinchHandler",value:function(e){return this.currentHandlers.pinch===e}},{key:"isCurrentSource",value:function(e){return this.currentTouch.source===e}},{key:"isFormHandler",value:function(e){var t,r,n=this.currentOriginalEvent,i=null===(t=e.$dom)||void 0===t?void 0:t.element,a=null==n?void 0:n.target;return!!(i&&a&&(a===i||null!==(r=i.contains)&&void 0!==r&&r.call(i,a)))}},{key:"getOrientation",value:function(){return this.currentTouch.orientation}},{key:"countTouches",value:function(e){var t,r;return(null===(t=e.touches)||void 0===t?void 0:t.length)||(null===(r=e.originalEvent)||void 0===r||null===(r=r.touches)||void 0===r?void 0:r.length)}},{key:"getTouch",value:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(null===(t=e.touches)||void 0===t?void 0:t[n])||(null===(r=e.originalEvent)||void 0===r||null===(r=r.touches)||void 0===r?void 0:r[n])||e,a=o.d.isDefined(i.clientX)?i.clientX:i.pageX||0,l=o.d.isDefined(i.clientY)?i.clientY:i.pageY||0;return{x:a,y:l,originalX:a,originalY:l,target:i.target,timeStamp:o.d.now()}}},{key:"move",value:function(e){if(1===this.touchCount){if(this.start0.y=this.end0?this.end0.y:this.start0.y,this.start0.x=this.end0?this.end0.x:this.start0.x,this.end0=this.getTouch(e),o.d.isDefined(this.end0)){var t=o.d.distance(this.start0.originalX,this.start0.originalY,this.end0.x,this.end0.y);this.maxPointerMoveDistance=Math.max(this.maxPointerMoveDistance,t);var r=this.start0.x-this.end0.x,n=this.start0.y-this.end0.y;this.setDeltaXDeltaY(r,n,"touch")}}else if(this.touchCount>=2){this.end0=this.getTouch(e),this.end1=this.getTouch(e,1);var i=o.d.distance(this.start0.x,this.start0.y,this.start1.x,this.start1.y),a=o.d.distance(this.end0.x,this.end0.y,this.end1.x,this.end1.y)-i;this.currentTouch.pinchDelta=a>0?.3:a<0?-.3:0}}},{key:"end",value:function(){if(this.touchCount<=1&&this.start0){var e,t=0,r=0,n=0;o.d.isDefined(this.end0)&&(t=this.start0.originalX-this.end0.x,r=this.start0.originalY-this.end0.y,n=o.d.now()-this.start0.timeStamp<250?o.d.now()-this.start0.timeStamp:0),"horizontal"===this.currentTouch.orientation&&Math.abs(t)>0&&n>0?(e=o.d.momentum(0,t,n),this.scrollEndTimeStamp.x=this.end0.timeStamp+e.duration,this.scrollEndTimeStamp.x-o.d.now()>0&&(this.currentTouch.deltaX=e.distance,this.currentTouch.manualMomentumFlag=!0)):"vertical"===this.currentTouch.orientation&&Math.abs(r)>0&&n>0&&(e=o.d.momentum(0,r,n),this.scrollEndTimeStamp.y=this.end0.timeStamp+e.duration,this.scrollEndTimeStamp.y-o.d.now()>0&&(this.currentTouch.deltaY=e.distance,this.currentTouch.manualMomentumFlag=!0))}}},{key:"setDeltaXDeltaY",value:function(e,t,r){var n=Math.abs(e)-Math.abs(t);n>=1?("none"===this.currentTouch.orientation||"vertical"===this.currentTouch.orientation&&n>=2||"horizontal"===this.currentTouch.orientation)&&(this.currentTouch.orientation="horizontal"):("none"===this.currentTouch.orientation||"horizontal"===this.currentTouch.orientation&&n<=-2||"vertical"===this.currentTouch.orientation)&&(this.currentTouch.orientation="vertical");var i=o.d.now(),a="touch"===r?0:500;"horizontal"===this.currentTouch.orientation?(this.currentTouch.dir=e<0?"left":e>0?"right":this.currentTouch.dir,this.scrollEndTimeStamp.x=i+a,this.removeScrollEndEvents("x")):(this.currentTouch.dir=t<0?"up":t>0?"down":this.currentTouch.dir,this.scrollEndTimeStamp.y=i+a,this.removeScrollEndEvents("y")),this.currentTouch.source=r,this.currentTouch.prevDeltaX+=e,this.currentTouch.prevDeltaY+=t,this.currentTouch.deltaX=this.currentTouch.prevDeltaX,this.currentTouch.deltaY=this.currentTouch.prevDeltaY,a&&(this.scrollEndTimeStamp.x>0||this.scrollEndTimeStamp.y>0)&&St().schedule(a,"scroll-end-check")}},{key:"wheel",value:function(e){var t=0,r=0;this.currentTouch.pinchDelta=0,this.start0=this.getTouch(e),e.ctrlKey&&"deltaY"in e?this.currentTouch.pinchDelta=-e.deltaY/10:"deltaX"in e?(t=e.deltaX,r=e.deltaY):"wheelDeltaX"in e?(t=-e.wheelDeltaX/120,r=-e.wheelDeltaY/120):"wheelDelta"in e?t=-e.wheelDelta/120:"detail"in e&&(t=e.detail/3),this.setDeltaXDeltaY(t,r,"wheel")}}],r&&v(t.prototype,r),i&&v(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,i}();p(y,"MAX_EVENT_QUEUE_SIZE",10),p(y,"MAX_EVENT_TYPE_CAPACITY",2),p(y,"CLICK_MOVE_THRESHOLD",10);var m=r(333),b=r(791),T=["url","cacheId"];function w(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=x(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function k(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(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){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return M(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?M(e,t):void 0}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function E(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function D(e,t,r){return(t=L(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P(e){return P="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},P(e)}function O(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,L(n.key),n)}}function L(e){var t=function(e,t){if("object"!=P(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==P(t)?t:t+""}var A=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cacheMap={},this.tmodelKeyMap={},this.fetchingAPIMap={},this.fetchingImageMap={},this.targetPageKeyMap=new WeakMap,this.fetchSeq=0,this.runtimeEpoch=0},t=[{key:"clear",value:function(){this.runtimeEpoch++,this.fetchingAPIMap={},this.fetchingImageMap={}}},{key:"clearAll",value:function(){this.runtimeEpoch++,this.cacheMap={},this.tmodelKeyMap={},this.fetchingAPIMap={},this.fetchingImageMap={},this.targetPageKeyMap=new WeakMap,this.fetchSeq=0}},{key:"setTargetPageKey",value:function(e,t,r){var n=this.targetPageKeyMap.get(e);n||(n=new Map,this.targetPageKeyMap.set(e,n)),n.set(t,r)}},{key:"getTargetPageKey",value:function(e,t){var r,n;return null!==(r=null===(n=this.targetPageKeyMap.get(e))||void 0===n?void 0:n.get(t))&&void 0!==r?r:document.URL}},{key:"fetchCommon",value:function(e,t,r,n,i,a){m.g.markFetchAction(r);var l=document.URL,u=r.key;return this.setTargetPageKey(r,u,l),this.isFetched(t)?n[e]||(n[e]={fetchId:e,cacheId:t,request:i,startTime:o.d.now(),epoch:this.runtimeEpoch,targets:[{tmodel:r,targetName:u}],fetchMap:n}):n[e]||(n[e]={fetchId:e,cacheId:t,request:i,startTime:o.d.now(),epoch:this.runtimeEpoch,targets:[{tmodel:r,targetName:u}],fetchMap:n},a(n[e])),this.addToTModelKeyMap(r,u,e,t,n),e}},{key:"fetch",value:function(e,t,r,n){var i=this;if(!t||"object"!==P(t)||Array.isArray(t))(Array.isArray(t)?t:[t]).forEach((function(t){i.fetchOne(e,t,r,n)}));else{var a=t.url,o=t.cacheId,l=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,T);this.fetchOne(e,a,l,null!=o?o:n)}}},{key:"fetchOne",value:function(e,t,r,n){var i=this,a=this.getFetchKey(e,t,r),o={type:"api",url:t,query:b.s.encodeValue(r)};this.fetchCommon(a,n,e,this.fetchingAPIMap,o,(function(e){return i.ajaxAPI(t,r,e)}))}},{key:"fetchImage",value:function(e,t,r){var n=this;(Array.isArray(t)?t:[t]).forEach((function(t){var i=n.getFetchKey(e,t),a={type:"image",src:t};n.fetchCommon(i,r,e,n.fetchingImageMap,a,(function(e){return n.loadImage(t,e)}))}))}},{key:"getFetchKey",value:function(e,t,r){var n=r?"".concat(e.oid,"_").concat(t,"_").concat(e.getTargetCycle(e.key),"_").concat(JSON.stringify(r)):"".concat(e.oid,"_").concat(t,"_").concat(e.getTargetCycle(e.key));return"".concat(n,"_").concat(++this.fetchSeq)}},{key:"getTModelKey",value:function(e,t){var r=this.getTargetPageKey(e,t);return"".concat(r,"_").concat(e.oid,"_").concat(t)}},{key:"createTModelEntry",value:function(e,t){return{pageKey:this.getTargetPageKey(e,t),oid:e.oid,targetName:t,fetchMap:{},entryCount:0,resultCount:0,errorCount:0,activeIndex:0,accessIndex:0}}},{key:"addToTModelKeyMap",value:function(e,t,r,n,i){var a=this.getTModelKey(e,t),l=o.d.getLoadTargetName(t),u=this.isLoadingComplete(e,t),s=this.tmodelKeyMap[a];!u&&s&&Array.isArray(e.val(l))||(s=this.createTModelEntry(e,t),this.tmodelKeyMap[a]=s,e.val(l,[])),s.fetchMap[r]={fetchId:r,order:s.entryCount},s.entryCount++,e.val(l).push(void 0),n&&this.isFetched(n)&&(i[r].startTime=o.d.now(),this.handleSuccess(i[r],this.cacheMap[n].result))}},{key:"getPendingRequestSnapshots",value:function(e){var t=this;return Object.values(e).map((function(e){return{cacheId:e.cacheId,request:b.s.encodeValue(e.request),targets:e.targets.map((function(r){var n,i=r.tmodel,a=r.targetName,o=t.getTModelKey(i,a),l=t.tmodelKeyMap[o],u=null==l||null===(n=l.fetchMap)||void 0===n?void 0:n[e.fetchId];return{oid:i.oid,targetName:a,order:null==u?void 0:u.order}})).filter((function(e){return Number.isFinite(e.order)}))}}))}},{key:"removeFromTModelKeyMap",value:function(e,t){var r=this.getTModelKey(e,t);delete this.tmodelKeyMap[r]}},{key:"isLoading",value:function(e,t){var r=this.getTModelKey(e,t);return this.tmodelKeyMap[r]}},{key:"isLoadingSuccessful",value:function(e,t){var r=this.getTModelKey(e,t);return this.tmodelKeyMap[r]&&this.tmodelKeyMap[r].resultCount===this.tmodelKeyMap[r].entryCount}},{key:"isLoadingComplete",value:function(e,t){var r=this.getTModelKey(e,t);return!!this.tmodelKeyMap[r]&&this.tmodelKeyMap[r].resultCount===this.tmodelKeyMap[r].entryCount&&this.tmodelKeyMap[r].activeIndex===this.tmodelKeyMap[r].entryCount&&this.tmodelKeyMap[r].resultCount===e.getTargetCycles(t)}},{key:"resetLoadingError",value:function(e,t){var r=this.getTModelKey(e,t),n=this.tmodelKeyMap[r];n&&(n.errorCount=0)}},{key:"nextActiveItem",value:function(e,t){var r=this.getTModelKey(e,t),n=this.tmodelKeyMap[r];return!!n&&n.activeIndex++}},{key:"isNextLoadingItemSuccessful",value:function(e,t){var r=this.getTModelKey(e,t),n=this.tmodelKeyMap[r];if(!n)return!1;var i=o.d.getLoadTargetName(t),a=e.val(i);return Array.isArray(a)&&o.d.isDefined(a[n.activeIndex])&&o.d.isDefined(a[n.accessIndex])}},{key:"getLoadingItemValue",value:function(e,t,r){var n=this.getTModelKey(e,t),i=this.tmodelKeyMap[n];if(i&&!(i.accessIndex>=i.resultCount)){var a,l=o.d.getLoadTargetName(t),u=e.val(l);return u&&(null!=r&&r.endsWith("$$")?(a=u.slice(i.accessIndex,i.resultCount),i.accessIndex+=a.length):o.d.isDefined(u[i.accessIndex])&&(a=u[i.accessIndex],i.accessIndex=Math.min(i.accessIndex+1,i.entryCount))),a}}},{key:"isFetched",value:function(e){var t,r;return null!==(t=null===(r=this.cacheMap[e])||void 0===r?void 0:r.success)&&void 0!==t&&t}},{key:"getFetchingPeriod",value:function(e){return this.fetchingAPIMap[e]?o.d.now()-this.fetchingAPIMap[e].startTime:void 0}},{key:"fetchCache",value:function(e){return this.cacheMap[e]}},{key:"calculateTargetStatus",value:function(e,t){var r=e.getTargetCycle(t),n=e.getTargetCycles(t);return e.isTargetInLoop(t)||r<n-1?"active":this.isLoadingSuccessful(e,t)?"done":"fetching"}},{key:"handleSuccess",value:function(e,t){var r=this;if(e.epoch===this.runtimeEpoch){var n=o.d.now(),i=e.fetchId,a=e.cacheId,l=e.startTime,u=e.targets,s=e.fetchMap,c={fetchingPeriod:n-l,success:!0,result:t};u.forEach((function(e){var t=e.tmodel,n=e.targetName,a=r.getTModelKey(t,n),l=r.tmodelKeyMap[a],u=o.d.getLoadTargetName(n);if(l&&l.fetchMap[i]){var s=l.fetchMap[i];r.callOnSuccessHandler(t,n,E(E({},c),{},{order:s.order}));var d=t.val(u);d&&(o.d.isDefined(d[s.order])||l.resultCount++,d[s.order]=c.result),t.val(n,c.result);var h=r.calculateTargetStatus(t,n);t.setTargetStatus(n,h),t.setLastUpdate(n),m.g.shouldActivateNextTarget(t,n)}})),delete s[i],a&&(this.cacheMap[a]=c),St().schedule(0,"api_success_".concat(i))}}},{key:"handleError",value:function(e,t){var r=this;if(e.epoch===this.runtimeEpoch){var n=o.d.now(),i=e.fetchId,a=e.cacheId,l=e.startTime,u=e.targets,s=e.fetchMap;u.forEach((function(e){var a=e.tmodel,u=e.targetName,s=r.getTModelKey(a,u),c=r.tmodelKeyMap[s],d=o.d.getLoadTargetName(u);if(c&&c.fetchMap[i]){var h=c.fetchMap[i],f={fetchingPeriod:n-l,success:!1,order:h.order,error:t},v=a.val(d);v&&(o.d.isDefined(v[h.order])||c.resultCount++,v[h.order]=f),a.val(u,f),c.errorCount++,r.callOnErrorHandler(a,u);var p=r.calculateTargetStatus(a,u);a.setTargetStatus(u,p),a.setLastUpdate(u),m.g.shouldActivateNextTarget(a,u)}})),delete s[i],a&&delete this.cacheMap[a],St().schedule(0,"api_error_".concat(i))}}},{key:"callOnSuccessHandler",value:function(e,t,r){var n,i=null===(n=e.targets[t])||void 0===n?void 0:n.onSuccess;i&&("function"==typeof i?(e.setTargetMethodName(t,"onSuccess"),i.call(e,r)):Array.isArray(i)?i.forEach((function(t){return m.g.activateSingleTarget(e,t)})):m.g.activateSingleTarget(e,i))}},{key:"callOnErrorHandler",value:function(e,t){var r,n=null===(r=e.targets[t])||void 0===r?void 0:r.onError;n&&("function"==typeof n?(e.setTargetMethodName(t,"onError"),n.call(e,e.val(t))):Array.isArray(n)?n.forEach((function(t){return m.g.activateSingleTarget(e,t)})):m.g.activateSingleTarget(e,n))}},{key:"ajaxAPI",value:function(e,t,r){var i,a,o,l=this,u={url:e,dataType:"json",type:"GET",success:function(e){return l.handleSuccess(r,e)},error:function(e){return l.handleError(r,e)}};if((s=t)&&"object"===P(s)&&!Array.isArray(s)){for(var s,c=new Set(["data","type","method","requestType","dataType","headers","contentType","timeout","processData","cache","beforeSend","withCredentials","xhrFields"]),d={},h={},f=0,v=Object.entries(t);f<v.length;f++){var p=S(v[f],2),g=p[0],y=p[1];"requestType"===g?d.type=y:c.has(g)?d[g]=y:h[g]=y}var m=E(E(E({},u),d),{},{type:null!==(i=null!==(a=d.method)&&void 0!==a?a:d.type)&&void 0!==i?i:u.type,dataType:null!==(o=d.dataType)&&void 0!==o?o:u.dataType});!("data"in m)&&Object.keys(h).length&&(m.data=h),n.J.ajax(m)}else n.J.ajax(E(E({},u),{},{data:t}))}},{key:"loadImage",value:function(e,t){var r=this,n=new Image;n.src=e,n.onload=function(){var e={width:n.width,height:n.height,src:n.src};r.handleSuccess(t,e)},n.onerror=function(){r.handleError(t,"not found")}}},{key:"createRuntimeSnapshot",value:function(){return{cacheMap:b.s.encodeValue(this.cacheMap),entries:Object.values(this.tmodelKeyMap).map((function(e){return{pageKey:e.pageKey,oid:e.oid,targetName:e.targetName,entryCount:e.entryCount,resultCount:e.resultCount,errorCount:e.errorCount,activeIndex:e.activeIndex,accessIndex:e.accessIndex}})),pendingRequests:[].concat(k(this.getPendingRequestSnapshots(this.fetchingAPIMap)),k(this.getPendingRequestSnapshots(this.fetchingImageMap)))}}},{key:"restorePendingRequest",value:function(e,t){var r,n=b.s.decodeValue(e.request,t),i=[],a=w(e.targets||[]);try{for(a.s();!(r=a.n()).done;){var l=r.value,u=t[l.oid];if(u){var s=this.getTModelKey(u,l.targetName);this.tmodelKeyMap[s]&&i.push({tmodel:u,targetName:l.targetName,order:l.order})}}}catch(e){a.e(e)}finally{a.f()}if(i.length){var c="restored_".concat(++this.fetchSeq),d="image"===n.type?this.fetchingImageMap:this.fetchingAPIMap,h={fetchId:c,cacheId:e.cacheId,request:n,startTime:o.d.now(),epoch:this.runtimeEpoch,targets:i.map((function(e){return{tmodel:e.tmodel,targetName:e.targetName}})),fetchMap:d};d[c]=h;for(var f=0,v=i;f<v.length;f++){var p=v[f],g=p.tmodel,y=p.targetName,m=p.order,T=this.getTModelKey(g,y);this.tmodelKeyMap[T].fetchMap[c]={fetchId:c,order:m}}e.cacheId&&this.isFetched(e.cacheId)?this.handleSuccess(h,this.cacheMap[e.cacheId].result):"image"===n.type?this.loadImage(n.src,h):this.ajaxAPI(n.url,n.query,h)}}},{key:"restoreRuntimeSnapshot",value:function(e,t){this.clear(),this.cacheMap=b.s.decodeValue((null==e?void 0:e.cacheMap)||{},t),this.tmodelKeyMap={},this.targetPageKeyMap=new WeakMap;var r,n=w((null==e?void 0:e.entries)||[]);try{for(n.s();!(r=n.n()).done;){var i=r.value,a=t[i.oid];if(a){this.setTargetPageKey(a,i.targetName,i.pageKey);var o=this.getTModelKey(a,i.targetName);this.tmodelKeyMap[o]={pageKey:i.pageKey,oid:i.oid,targetName:i.targetName,fetchMap:{},entryCount:i.entryCount,resultCount:i.resultCount,errorCount:i.errorCount,activeIndex:i.activeIndex,accessIndex:i.accessIndex}}}}catch(e){n.e(e)}finally{n.f()}var l,u=w((null==e?void 0:e.pendingRequests)||[]);try{for(u.s();!(l=u.n()).done;){var s=l.value;this.restorePendingRequest(s,t)}}catch(e){u.e(e)}finally{u.f()}}}],t&&O(e.prototype,t),r&&O(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}(),j=r(714),_=r(249),I=r(161);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)}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||B(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e){return function(e){if(Array.isArray(e))return H(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||B(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 F(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=B(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function B(e,t){if(e){if("string"==typeof e)return H(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?H(e,t):void 0}}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function W(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q(e,t,r){return(t=X(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K(){K=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new O(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};s(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(i,a,o,l){var u=d(e[i],e,a);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==R(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){s.value=e,o(s)}),(function(e){return r("throw",e,o,l)}))}l(u.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var u=E(l,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var s=d(t,r,n);if("normal"===s.type){if(i=n.done?p:f,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=p,n.method="throw",n.arg=s.arg)}}}function E(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(R(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=s(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(M.prototype),s(M.prototype,l,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new M(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),s(S,u,"Generator"),s(S,o,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function $(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,i)}function G(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){$(a,n,i,o,l,"next",e)}function l(e){$(a,n,i,o,l,"throw",e)}o(void 0)}))}}function Y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,X(n.key),n)}}function X(e){var t=function(e,t){if("object"!=R(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==R(t)?t:t+""}var z=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hasLocationList=[],this.hasLocationMap={},this.visibleChildrenLengthMap={},this.updatedContainerMap={},this.locationListStats=[],this.domIslandSet=new Set,this.activatedList=[],this.activatedMap={},this.calcBusy=!1,this.calcQueued=!1,this.calcEpoch=0},t=[{key:"clear",value:function(){this.visibleChildrenLengthMap={},this.updatedContainerMap={},this.activatedList=[],this.activatedMap={},this.domIslandSet.clear(),this.calcBusy=!1,this.calcQueued=!1}},{key:"calculateActivated",value:function(){var e=0,t=this.activatedList;for(this.activatedList=[],this.activatedMap={};e<t.length;){var r=t[e++],n=r.activatedTargets.slice(0);r.activatedTargets.length=0,wt().applyTargetValues(r,n),r.updatingTargetList.length>0&&wt().setActualValues(r,r.updatingTargetList),this.hasLocationMap[r.oid]||this.addToLocationList(r)}}},{key:"calculateAll",value:(i=G(K().mark((function e(){var t,r,n,i,a=arguments;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=a.length>0&&void 0!==a[0]?a[0]:8,r=this.calcEpoch,!this.calcBusy){e.next=5;break}return this.calcQueued=!0,e.abrupt("return");case 5:return this.calcBusy=!0,this.hasLocationList.length=0,this.hasLocationMap={},this.locationListStats=[],n=[{container:vt(),stage:"init",children:[],viewport:void 0,index:0}],i={budgetMs:t,sliceStart:o.d.now(),calcEpoch:r},e.next=13,this.processStack(n,i);case 13:if(i.calcEpoch===this.calcEpoch){e.next=15;break}return e.abrupt("return");case 15:if(this.processAfterStack(),this.calcBusy=!1,!this.calcQueued){e.next=20;break}return this.calcQueued=!1,e.abrupt("return",this.calculateAll(t));case 20:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"cancelCurrentCalculation",value:function(){this.calcEpoch++,this.calcBusy=!1,this.calcQueued=!1}},{key:"processStack",value:(n=G(K().mark((function e(t,r){var n,i,a,l,u,s,c,d=this;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=function(e){var t,r,n=e.container;n.adjustViewport(),n.calcContentWidthHeight(),null===(t=n.markLayoutComplete)||void 0===t||t.call(n,e.layoutEpoch),null===(r=n.requestParticleRender)||void 0===r||r.call(n)},i=function(e){var t=e.children[e.index];t&&t.getDirtyLayout()&&t.isComplete()&&!t.hasChildren()&&t.removeLayoutDirty(t,t.dirtyLayout.oids?Object.keys(t.dirtyLayout.oids):void 0),e.stage="afterChild"},a=function(e){var t=e.container,r=e.children,n=e.viewport,i=r[e.index];i&&(i.useContentHeight()&&(i.actualValues.height!==i.getContentHeight()&&(i.actualValues.height=i.getContentHeight(),i.markLayoutDirty("contentWidthHeight")),i.addToStyleTargetList("height")),i.useContentWidth()&&(i.actualValues.width!==i.getContentWidth()&&(i.actualValues.width=i.getContentWidth(),i.markLayoutDirty("contentWidthHeight")),i.addToStyleTargetList("width")),i.isInFlow()&&(o.d.isNumber(i.val("appendNewLine"))?n.appendNewLine():n.nextLocation(),t.calcContentWidthHeight()),(i.hasEventDirty()||pt().getEventType()||pt().hasDelta())&&(d.checkExternalEvents(i),i.hasEventDirty()&&(i.processedEventEpoch=i.eventDirtyEpoch))),e.index++,e.index<e.children.length&&(e.stage="child")},l=function(e){var r,n=e.container,i=e.children,a=e.viewport,o=i[e.index];if(o){if(o.isDomIsland()&&o.originWindowEpoch!==pt().getWindowEpoch()&&o.hasDom()&&(o.calcAbsolutePositionFromDom(),o.originWindowEpoch=pt().getWindowEpoch()),a.setCurrentChild(o),!o.getDirtyLayout()&&!o.currentStatus&&0===o.activeTargetList.length)return d.calcNextLocation(o,n,a),void e.index++;o.isDomIsland()&&d.domIslandSet.add(o),a.setLocation(),a.isOverflow()&&(a.overflow(),a.setLocation(),o.markLayoutDirty("overflow"));var l,u,s,c,h=Math.floor(o.actualValues.x),f=Math.floor(o.actualValues.y);o.isIncluded()&&d.calculateTargets(o),o.isIncluded()&&o.targets.onVisibleChildrenChange&&!d.visibleChildrenLengthMap[o.oid]&&(d.visibleChildrenLengthMap[o.oid]={tmodel:o,visibleCount:o.visibleChildren.length}),d.addToLocationList(o),_.a.isXDefined(o)||(o.actualValues.x=o.x),_.a.isYDefined(o)||(o.actualValues.y=o.y),o.isDomIsland()||o.calcAbsolutePosition(o.getX(),o.getY()),o.excludeDefaultStyling()||d.fixLocation(o,h,f),d.calculateVisibility(o),(null===(r=o.getDirtyLayout())||void 0===r?void 0:r.count)>0?d.locationListStats.push("".concat(o.oid,"|").concat(null===(l=o.getDirtyLayout())||void 0===l?void 0:l.count,"|").concat(null===(u=o.getDirtyLayout())||void 0===u?void 0:u.lastKey)):d.locationListStats.push("".concat(o.oid,"|").concat(null!==(s=null===(c=o.getDirtyLayout())||void 0===c?void 0:c.count)&&void 0!==s?s:0)),e.stage="resetDirtyLayout",o.hasChildren()&&o.shouldCalculateChildren()&&t.push({container:o,stage:"init",children:[],viewport:void 0,index:0})}else e.index++};case 4:if(!t.length){e.next=25;break}if(r.calcEpoch===this.calcEpoch){e.next=7;break}return e.abrupt("return");case 7:if(!(o.d.now()-r.sliceStart>r.budgetMs)){e.next=14;break}return e.next=10,new Promise(requestAnimationFrame);case 10:if(r.calcEpoch===this.calcEpoch){e.next=12;break}return e.abrupt("return");case 12:return r.sliceStart=o.d.now(),e.abrupt("continue",4);case 14:if("init"===(u=t[t.length-1]).stage&&(s=u.container,u.layoutEpoch=s.layoutEpoch,c=this.calcChildren(s),s.childrenUpdateFlag&&(s.childrenUpdateFlag=!1,s.targets.onChildrenChange&&(this.updatedContainerMap[s.oid]=s)),s.shouldBeBracketed()&&(s.backupDirtyLayout=W({},s.dirtyLayout)),s.visibleChildren.length=0,u.children=c.slice(0),u.index=0,u.viewport=s.createViewport(),u.stage="child"),"resetDirtyLayout"===u.stage&&i(u),"afterChild"===u.stage&&a(u),!(u.index>=u.children.length)){e.next=22;break}return n(u),t.pop(),e.abrupt("continue",4);case 22:"child"===u.stage&&l(u),e.next=4;break;case 25:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"processAfterStack",value:function(){for(var e in this.visibleChildrenLengthMap){var t=this.visibleChildrenLengthMap[e],r=t.tmodel,n=t.visibleCount;!r.isVisible()||n===r.visibleChildren.length&&0!==r.visibleChildren.length||(this.runEventTargets(r,["onVisibleChildrenChange"]),this.visibleChildrenLengthMap[e].visibleCount=r.visibleChildren.length)}for(var i in this.updatedContainerMap){var a=this.updatedContainerMap[i];a.isVisible()&&this.runEventTargets(a,["onChildrenChange"]),delete this.updatedContainerMap[i]}}},{key:"calcChildren",value:function(e){return e.getChildren(),e.shouldBeBracketed()?j.M.generate(e):(e.lastChildrenUpdate.additions.length=0,e.lastChildrenUpdate.deletions.length=0,j.M.bracketMap[e.oid]&&(delete j.M.bracketMap[e.oid],delete j.M.pageMap[e.oid]),e.getChildren())}},{key:"calcNextLocation",value:function(e,t,r){var n;e.isLightweightChild?this.calcNextLightweightLocation(e,t,r):(r.setLocation(),r.isOverflow()&&(r.overflow(),r.setLocation(),e.markLayoutDirty("overflow")),e.isIncluded()&&e.targets.onVisibleChildrenChange&&!this.visibleChildrenLengthMap[e.oid]&&(this.visibleChildrenLengthMap[e.oid]={tmodel:e,visibleCount:e.visibleChildren.length}),_.a.isXDefined(e)||(e.actualValues.x=e.x),_.a.isYDefined(e)||(e.actualValues.y=e.y),e.isDomIsland()||e.calcAbsolutePosition(e.getX(),e.getY()),e.excludeDefaultStyling()||(this.addToTransformTargetList(e,"x"),this.addToTransformTargetList(e,"y")),((null===(n=e.styleTargetMap)||void 0===n?void 0:n.size)>0||e.updatingTargetList.length>0)&&this.addToLocationList(e),this.calculateVisibility(e),e.isInFlow()&&(o.d.isNumber(e.val("appendNewLine"))?r.appendNewLine():r.nextLocation(),t.calcContentWidthHeight()))}},{key:"calcNextLightweightLocation",value:function(e,t,r){r.setLocation(),r.isOverflow()&&(r.overflow(),r.setLocation()),e.calcAbsolutePosition(e.getX(),e.getY());var n=e.calcVisibility();e.actualValues.isVisible=n,n&&e.isInFlow()&&t.visibleChildren.push(e),e.isInFlow()&&(o.d.isNumber(e.val("appendNewLine"))?r.appendNewLine():r.nextLocation())}},{key:"calculateVisibility",value:function(e){var t,r,n,i=e.isVisible(),a=null!==(t=null===(r=e.visibilityStatus)||void 0===r?void 0:r.isVisible)&&void 0!==t?t:void 0;if(e.visibilityStatus||(e.visibilityStatus={}),e.visibilityStatus.lastIsVisible=e.visibilityStatus.isVisible,o.d.isDefined(e.targets.isVisible))n="function"==typeof e.targets.isVisible.value?e.targets.isVisible.value.call(e):!!e.targets.isVisible,e.actualValues.isVisible=n,e.isNowVisible=!i&&n,e.isNowInvisible=(i||void 0===i)&&!n;else{var l=e.calcVisibility();n=l,e.isNowVisible=!i&&n||!a&&l,e.isNowInvisible=(i||void 0===i)&&!n||a&&!l,e.actualValues.isVisible=n}(e.isNowVisible||e.isNowInvisible)&&e.markLayoutDirty("isNowVisible"),e.isNowInvisible&&this.addToLocationList(e),I.O.pauseResumeSchedule(e),"BI"!==e.type&&e.isVisible()&&e.isInFlow()&&e.getParent()&&e.getParent().visibleChildren.push(e)}},{key:"calculateTargets",value:function(e){this.checkInternalEvents(e);for(var t=0;e.activatedTargets.length&&t++<50;){var r=e.activatedTargets.slice(0);e.activatedTargets.length=0;var n,i=F(r);try{for(i.s();!(n=i.n()).done;){var a=n.value;wt().applyTargetValue(e,a)}}catch(e){i.e(e)}finally{i.f()}}if(I.O.pauseResumeSchedule(e),e.activateChangedPassiveTargets(),wt().applyTargetValues(e),e.updatingTargetList.length>0&&wt().setActualValues(e,e.updatingTargetList),_.a.shouldMeasureWidthFromDom(e)&&(e.hasDom()?_.a.setWidthFromDom(e):e.markLayoutDirty("width")),_.a.shouldMeasureHeightFromDom(e)&&(e.hasDom()?_.a.setHeightFromDom(e):e.markLayoutDirty("height")),e.isNowVisible||e.hasDomNow){var o=e.pendingTargets;if(o)for(var l=0,u=N(o);l<u.length;l++){var s=u[l];m.g.cleanupTarget(e,s),m.g.shouldActivateNextTarget(e,s)}}e.isNowVisible=!1,e.hasDomNow=!1,e.targetExecutionCount++}},{key:"checkExternalEvents",value:function(e){var t=e.externalEventMap;if((null==t?void 0:t.size)>0){var r,n=[],i=l.u.allEventMap,a=F(t);try{for(a.s();!(r=a.n()).done;){var o=V(r.value,1)[0];i[o](e)&&n.push(e.allTargetMap[o])}}catch(e){a.e(e)}finally{a.f()}this.runEventTargets(e,n)}}},{key:"checkInternalEvents",value:function(e){var t=[],r=l.u.internalEventMap,n=e.internalEventMap;if((null==n?void 0:n.size)>0){var i,a=F(n);try{for(a.s();!(i=a.n()).done;){var o=V(i.value,1)[0];r[o](e)&&t.push(e.allTargetMap[o])}}catch(e){a.e(e)}finally{a.f()}}this.runEventTargets(e,t)}},{key:"runEventTargets",value:function(e,t){t.forEach((function(t){if(e.isTargetEnabled(t)&&!e.isTargetUpdating(t)){e.targetValues[t]&&(e.targetValues[t].status=""),u.j.prepareTarget(e,t),u.j.resolveTargetValue(e,t),u.j.updateTarget(e,e.targetValues[t],t,!1);var r=e.val(t);Array.isArray(r)?r.forEach((function(t){return m.g.activateSingleTarget(e,t)})):"string"==typeof r&&m.g.activateSingleTarget(e,r),m.g.shouldActivateNextTarget(e,t)}}))}},{key:"addToLocationList",value:function(e){this.hasLocationMap[e.oid]||(this.hasLocationList.push(e),this.hasLocationMap[e.oid]=e)}},{key:"addToActivatedList",value:function(e){this.activatedMap[e.oid]||(this.activatedList.push(e),this.activatedMap[e.oid]=e)}},{key:"fixLocation",value:function(e,t,r){if(e.hasValidAnimation()){var n=Math.floor(e.actualValues.x)!==t,i=Math.floor(e.actualValues.y)!==r,a={};if(n&&"updating"!==e.getTargetStatus(e.allTargetMap.x)&&(a.x=e.actualValues.x),i&&"updating"!==e.getTargetStatus(e.allTargetMap.y)&&(a.y=e.actualValues.y),Object.keys(a).length)return void kt().rebaseAutoLayoutTransform(e,a)}this.addToTransformTargetList(e,"x"),this.addToTransformTargetList(e,"y")}},{key:"addToTransformTargetList",value:function(e,t){_.a.getTransformValue(e,t)!==Math.floor(e.tfMap[t])&&e.addToStyleTargetList(t)}},{key:"isActivated",value:function(e){return this.activatedMap[e.oid]}}],t&&Y(e.prototype,t),r&&Y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,n,i}(),Q=r(260);function Z(e){return Z="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},Z(e)}function J(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=te(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function ee(e){return function(e){if(Array.isArray(e))return re(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||te(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 te(e,t){if(e){if("string"==typeof e)return re(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(r),!0).forEach((function(t){ae(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ae(e,t,r){return(t=ce(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oe(){oe=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new O(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};s(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(i,a,o,l){var u=d(e[i],e,a);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==Z(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){s.value=e,o(s)}),(function(e){return r("throw",e,o,l)}))}l(u.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var u=E(l,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var s=d(t,r,n);if("normal"===s.type){if(i=n.done?p:f,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=p,n.method="throw",n.arg=s.arg)}}}function E(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(Z(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=s(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(M.prototype),s(M.prototype,l,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new M(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),s(S,u,"Generator"),s(S,o,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function le(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,i)}function ue(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){le(a,n,i,o,l,"next",e)}function l(e){le(a,n,i,o,l,"throw",e)}o(void 0)}))}}function se(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ce(n.key),n)}}function ce(e){var t=function(e,t){if("object"!=Z(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Z(t)?t:t+""}var de=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.currentLink=o.d.getFullLink(document.URL),this.lastCachedLink=void 0,this.pageCache={},this.initHistory()},t=[{key:"initHistory",value:function(){"scrollRestoration"in history&&(history.scrollRestoration="manual");var e=history.state;e&&(e.link||e.browserUrl)||history.replaceState({link:this.currentLink},"",this.currentLink)}},{key:"initPage",value:function(e){et.tRoot.$dom.outerHTML(e),et.tRoot.$dom=_.a.getRootDom(),"body"!==et.tRoot.$dom.getTagName()&&et.tRoot.$dom.attr("data-tj-no-slot","true"),Q.v.initPageDoms(et.tRoot.$dom)}},{key:"openLinkFromHistory",value:(u=ue(oe().mark((function e(t){var r;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.link||t.browserUrl){e.next=3;break}return e.abrupt("return");case 3:return t.browserUrl&&history.replaceState({link:r},"",r),e.next=6,this.openLink(r,!1);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"onPageClose",value:function(){et.resizeLastUpdate=o.d.now(),pt().resizeRoot(),et.manager.getAvailableDoms().forEach((function(e){xt().runEventTargets(e,["onPageClose"])}))}},{key:"openLink",value:(l=ue(oe().mark((function e(t){var r,n=arguments;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=!(n.length>1&&void 0!==n[1])||n[1],t=o.d.getFullLink(t),e.next=4,this.storePage(this.currentLink);case 4:return this.lastCachedLink=this.currentLink,e.next=7,et.reset();case 7:if(r&&history.pushState({link:t},"",t),this.currentLink=t,this.pageCache[t]){e.next=17;break}return et.tRoot.$dom.innerHTML(""),ht.oids={},ht.tmodelIdMap={},et.tRoot=et.tRootFactory(),e.next=16,et.start();case 16:return e.abrupt("return");case 17:return e.next=19,this.restorePage(t,{shouldReset:!1});case 19:St().schedule(0,"pagemanager-processOpenLink");case 20:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"back",value:function(){return history.back()}},{key:"storePage",value:(a=ue(oe().mark((function e(t){var r,i,a;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=St().getSnapshot(),t=o.d.getFullLink(t),e.next=4,et.stop();case 4:return xt().cancelCurrentCalculation(),this.onPageClose(),i=_.a.getPageDom(),a=i.innerHTML(),this.pageCache[t]={link:t,html:a,domState:_.a.captureDomState(i),oids:ie({},ht.oids),tmodelIdMap:ie({},ht.tmodelIdMap),visibleOidMap:ie({},et.manager.visibleOidMap),scrollLeft:n.J.getWindowScrollLeft()||0,scrollTop:n.J.getWindowScrollTop()||0,tRoot:et.tRoot,runSnapshot:r},e.abrupt("return",this.pageCache[t]);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"restorePage",value:(i=ue(oe().mark((function e(t){var r,n,i,a,l,u,s,c,d,h,f,v;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.pageCache[t]){e.next=3;break}return e.abrupt("return",!1);case 3:et.tRoot=r.tRoot,ht.oids=ie({},r.oids),ht.tmodelIdMap=ie({},r.tmodelIdMap),(n=_.a.getPageDom()).innerHTML(r.html),_.a.restoreDomState(n,r.domState),et.tRoot.$dom=_.a.getRootDom(),i=Object.values(r.visibleOidMap),a=Q.v.initCacheDoms(i),l=o.d.uniqueTModels([].concat(i,ee(a))),u=J(l);try{for(u.s();!(s=u.n()).done;)(c=s.value).visibilityStatus=void 0,c.hasDom()||c.markLayoutDirty("pageRestoreNoDom")}catch(e){u.e(e)}finally{u.f()}m.g.convertAnimatingTargetsToUpdating(l),et.manager.visibleOidMap={},d=J(l);try{for(d.s();!(h=d.n()).done;)(f=h.value).isIncluded()&&(et.manager.visibleOidMap[f.oid]=f)}catch(e){d.e(e)}finally{d.f()}return et.manager.activatePendingTargetsAfterDom(l,{restoredDoneTargets:!0}),et.tRoot.markLayoutDirty("pageRestore"),e.next=23,_.a.restoreScroll(r);case 23:return e.next=25,et.start();case 25:return St().restoreSnapshot(r.runSnapshot),v=_.a.getPageDom(),_.a.restoreDomState(v,r.domState),e.next=30,_.a.restoreScroll(r);case 30:return e.next=32,_.a.restoreDomInteractionState(v,r.domState);case 32:return e.abrupt("return",!0);case 33:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"getCachedPage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lastCachedLink;if(e)return e=o.d.getFullLink(e),this.pageCache[e]}},{key:"getCachedTModel",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.lastCachedLink,n=this.getCachedPage(r);return null==n||null===(t=n.tmodelIdMap)||void 0===t?void 0:t[e]}}],t&&se(e.prototype,t),r&&se(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,i,a,l,u}(),he=r(980);function fe(e){return fe="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},fe(e)}function ve(e){return function(e){if(Array.isArray(e))return me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ye(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 pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||ye(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ge(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=ye(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function ye(e,t){if(e){if("string"==typeof e)return me(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?me(e,t):void 0}}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function be(){be=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new O(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};s(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(i,a,o,l){var u=d(e[i],e,a);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==fe(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){s.value=e,o(s)}),(function(e){return r("throw",e,o,l)}))}l(u.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var u=E(l,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var s=d(t,r,n);if("normal"===s.type){if(i=n.done?p:f,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=p,n.method="throw",n.arg=s.arg)}}}function E(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(fe(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=s(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(M.prototype),s(M.prototype,l,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new M(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),s(S,u,"Generator"),s(S,o,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function Te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(r),!0).forEach((function(t){ke(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ke(e,t,r){return(t=Ce(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Se(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,i)}function xe(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){Se(a,n,i,o,l,"next",e)}function l(e){Se(a,n,i,o,l,"throw",e)}o(void 0)}))}}function Me(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ce(n.key),n)}}function Ce(e){var t=function(e,t){if("object"!=fe(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=fe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fe(t)?t:t+""}var Ee=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.stateCheckpoints={}},t=[{key:"store",value:(u=xe(be().mark((function e(){var t,r,i,a,l=arguments;return be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=l.length>0&&void 0!==l[0]?l[0]:"default",this.syncAnimationsForCheckpoint(),r=St().getSnapshot(),i=_.a.getPageDom(),e.t0=t,e.t1=o.d.now(),e.t2=i.innerHTML(),e.t3=_.a.captureDomState(i),e.t4=we({},ht.oids),e.t5=et.tRoot.createRuntimeSnapshot(),e.t6=yt().createRuntimeSnapshot(),e.t7=Object.keys(et.manager.visibleOidMap),e.t8=n.J.getWindowScrollLeft()||0,e.t9=n.J.getWindowScrollTop()||0,e.t10=r,e.next=17,this.captureGpuVisuals();case 17:return e.t11=e.sent,a={key:e.t0,capturedAt:e.t1,html:e.t2,domState:e.t3,oids:e.t4,rootSnapshot:e.t5,loaderSnapshot:e.t6,visibleOids:e.t7,scrollLeft:e.t8,scrollTop:e.t9,runSnapshot:e.t10,gpuVisuals:e.t11},this.releaseGpuVisuals(this.stateCheckpoints[t]),this.stateCheckpoints[t]=a,e.abrupt("return",a);case 22:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"restore",value:(l=xe(be().mark((function e(){var t,r,n,a,l,u,s,c,d,h,f,v=arguments;return be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=v.length>0&&void 0!==v[0]?v[0]:"default",m.g.currentTargetName=void 0,m.g.currentTModel=void 0,r=this.stateCheckpoints[t]){e.next=6;break}return e.abrupt("return",!1);case 6:return yt().clear(),e.next=9,et.stop();case 9:return xt().cancelCurrentCalculation(),e.next=12,et.reset();case 12:return ht.oids={},ht.tmodelIdMap={},n=o.d.now()-r.capturedAt,a=b.s.fromRuntimeSnapshot(r.rootSnapshot,i.c,{timeOffset:n}),l=a.root,u=a.tmodelIdMap,s=a.models,et.tRoot=l,ht.oids=we({},r.oids),ht.tmodelIdMap=u,yt().restoreRuntimeSnapshot(r.loaderSnapshot,u),(c=_.a.getPageDom()).innerHTML(r.html),_.a.restoreDomState(c,r.domState),this.showGpuRestoreVisuals(r.gpuVisuals),et.tRoot.$dom=_.a.getRootDom(),d=r.visibleOids.map((function(e){return u[e]})).filter(Boolean),h=this.connectRestoredDoms(d,s),et.manager.activatePendingTargetsAfterDom(h,{restoredDoneTargets:!0}),et.tRoot.markLayoutDirty("checkpointRestore"),e.next=31,et.start();case 31:return f=_.a.getPageDom(),_.a.restoreDomState(f,r.domState),e.next=35,_.a.restoreScroll(r);case 35:return e.next=37,_.a.restoreDomInteractionState(f,r.domState);case 37:return e.next=39,Promise.all(s.map((function(e){var t;return null===(t=e.restoreRuntimeDomDerivedState)||void 0===t?void 0:t.call(e)})));case 39:return this.hideGpuRestoreVisuals(),St().restoreSnapshot(r.runSnapshot),e.abrupt("return",!0);case 42:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"syncAnimationsForCheckpoint",value:function(){var e,t=new Map,r=ge(kt().recordMap.values());try{for(r.s();!(e=r.n()).done;){var n=e.value;if("canceled"!==n.status&&"detached"!==n.status){he.T.updateTModelFromRecord(n);var i=t.get(n.tmodel);i||(i=new Set,t.set(n.tmodel,i)),i.add(n.originalKey)}}}catch(e){r.e(e)}finally{r.f()}var a,o=ge(t);try{for(o.s();!(a=o.n()).done;){var l=pe(a.value,2),u=l[0],s=l[1];_.a.commitAnimatedStyles(u,s)}}catch(e){o.e(e)}finally{o.f()}}},{key:"normalizeRestoredModels",value:function(e){var t,r=o.d.uniqueTModels(e),n=ge(r);try{for(n.s();!(t=n.n()).done;){var i=t.value,a=new Set(i.getAnimatingTargets());a.size&&i.hasDom()&&_.a.commitAnimatedStyles(i,a),i.viewport=void 0,i.visibilityStatus=void 0,i.currentStatus="new",i.originWindowEpoch=-1,i.domHeightTimestamp=0,i.domWidthTimestamp=0,i.dirtyLayout=!1,i.markLayoutDirty("stateRestore")}}catch(e){n.e(e)}finally{n.f()}return m.g.convertAnimatingTargetsToUpdating(r),r}},{key:"connectRestoredDoms",value:function(e,t){var r=Q.v.initCacheDoms(e),n=o.d.uniqueTModels([].concat(ve(e),ve(r)));this.normalizeRestoredModels(t),et.manager.visibleOidMap={};var i,a=ge(n);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.isIncluded()&&(et.manager.visibleOidMap[l.oid]=l)}}catch(e){a.e(e)}finally{a.f()}return n}},{key:"captureGpuVisuals",value:(a=xe(be().mark((function e(){var t,r,n,i,a,o,l,u;return be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t={},r=0,n=Object.values(ht.tmodelIdMap);case 2:if(!(r<n.length)){e.next=18;break}if(i=n[r],a=i.particleRenderer,(o=null==a?void 0:a.canvas)&&i.gpuChildrenEnabled){e.next=8;break}return e.abrupt("continue",15);case 8:return l=o.getBoundingClientRect(),e.next=11,a.captureBitmap();case 11:if(u=e.sent){e.next=14;break}return e.abrupt("continue",15);case 14:t[i.oid]={bitmap:u,left:l.left,top:l.top,width:l.width,height:l.height};case 15:r++,e.next=2;break;case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e)}))),function(){return a.apply(this,arguments)})},{key:"showGpuRestoreVisuals",value:function(e){if(this.hideGpuRestoreVisuals(),Object.keys(e||{}).length){var t=document.createElement("div");t.setAttribute("data-targetjs-gpu-restore-overlay","true"),Object.assign(t.style,{position:"fixed",left:"0px",top:"0px",width:"100vw",height:"100vh",pointerEvents:"none",zIndex:"2147483647"});for(var r=0,n=Object.values(e);r<n.length;r++){var i=n[r];if(null!=i&&i.bitmap){var a=document.createElement("canvas");a.width=i.bitmap.width,a.height=i.bitmap.height,Object.assign(a.style,{position:"absolute",left:"".concat(i.left,"px"),top:"".concat(i.top,"px"),width:"".concat(i.width,"px"),height:"".concat(i.height,"px"),display:"block"}),a.getContext("2d").drawImage(i.bitmap,0,0),t.appendChild(a)}}return document.body.appendChild(t),t}}},{key:"hideGpuRestoreVisuals",value:function(){var e;null===(e=document.querySelector('[data-targetjs-gpu-restore-overlay="true"]'))||void 0===e||e.remove()}},{key:"releaseGpuVisuals",value:function(e){for(var t=0,r=Object.values((null==e?void 0:e.gpuVisuals)||{});t<r.length;t++){var n,i,a,o=r[t];null==o||null===(n=o.bitmap)||void 0===n||null===(i=(a=n).close)||void 0===i||i.call(a)}}},{key:"has",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return Boolean(this.stateCheckpoints[e])}},{key:"get",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return this.stateCheckpoints[e]}},{key:"toggle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return this.has(e)?this.restore(e):this.store(e)}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=this.stateCheckpoints[e];return!!t&&(this.releaseGpuVisuals(t),delete this.stateCheckpoints[e],!0)}},{key:"clearAll",value:function(){for(var e=0,t=Object.values(this.stateCheckpoints);e<t.length;e++){var r=t[e];this.releaseGpuVisuals(r)}this.stateCheckpoints={}}}],t&&Me(e.prototype,t),r&&Me(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,a,l,u}();function De(e){return De="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},De(e)}function Pe(e){return function(e){if(Array.isArray(e))return Ae(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Le(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 Oe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Le(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function Le(e,t){if(e){if("string"==typeof e)return Ae(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ae(e,t):void 0}}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _e(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){Ie(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ie(e,t,r){return(t=Ve(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Re(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ve(n.key),n)}}function Ve(e){var t=function(e,t){if("object"!=De(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=De(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==De(t)?t:t+""}var Ne=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()},t=[{key:"init",value:function(){this.lists={visible:[],rerender:[],restyle:[],reasyncStyle:[],reattach:[],relocation:[],deletedDom:[],noDom:[],updatingTModels:[],activeTModels:[],updatingTargets:[],activeTargets:[]},this.visibleOidMap={},this.preservedDomMap={},this.targetMethodMap={},this.noDomMap={},this.domPolicyMap=new Map,this.deletedTModelRoots=new Set}},{key:"clearFrameLists",value:function(){this.lists.visible.length=0,this.lists.rerender.length=0,this.lists.restyle.length=0,this.lists.reasyncStyle.length=0,this.lists.reattach.length=0,this.lists.relocation.length=0,this.lists.noDom.length=0,this.lists.updatingTModels.length=0,this.lists.activeTModels.length=0,this.lists.updatingTargets.length=0,this.lists.activeTargets.length=0,this.targetMethodMap={},this.noDomMap={}}},{key:"clearAll",value:function(){this.visibleOidMap={},this.preservedDomMap={},this.clearFrameLists(),this.deleteDoms(),this.domPolicyMap.clear()}},{key:"analyze",value:function(){var e=this,t=_e({},this.visibleOidMap),r=_e({},this.preservedDomMap);this.clearFrameLists(),this.collectDeletedTModels();var n,i=[],a=Oe(xt().hasLocationList);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(o.isLightweightChild)delete t[o.oid],delete r[o.oid],delete this.visibleOidMap[o.oid],delete this.preservedDomMap[o.oid],this.domPolicyMap.delete(o.oid);else if(t[o.oid]=void 0,r[o.oid]=void 0,o.exists()){var l=o.isVisible();l&&o.isIncluded()?(this.visibleOidMap[o.oid]=o,delete this.preservedDomMap[o.oid],this.lists.visible.push(o)):delete this.visibleOidMap[o.oid];var u,s,c=this.shouldPreserveDom(o);if(!l&&c&&o.hasDom()?this.preservedDomMap[o.oid]=o:delete this.preservedDomMap[o.oid],o.hasDom()&&(o.canHaveDom()&&o.isIncluded()&&(!o.canDeleteDom()||l||c)||(this.addToDeletedDom(o),o.getChildren().forEach((function(t){t.isLightweightChild||t.managesOwnScroll()||e.addToRecursiveDeletedDom(t)})))),l||o.isActivated()){var d,h,f=o.state();((null===(d=f.updatingTargetList)||void 0===d?void 0:d.length)>0||o.hasAnimatingTargets())&&(this.lists.updatingTModels.push(o),this.lists.updatingTargets=[].concat(Pe(this.lists.updatingTargets),Pe(f.updatingTargetList))),(null===(h=f.activeTargetList)||void 0===h?void 0:h.length)>0&&(this.lists.activeTModels.push(o),this.lists.activeTargets=[].concat(Pe(this.lists.activeTargets),Pe(f.activeTargetList)))}if(!c||l||o.isActivated()||this.needsRestyle(o)&&this.lists.restyle.push(o),l||o.isActivated()){this.needsRerender(o)&&this.lists.rerender.push(o),this.needsRestyle(o)&&this.lists.restyle.push(o),this.needsReasyncStyle(o)&&this.lists.reasyncStyle.push(o),this.needsReattach(o)&&this.lists.reattach.push(o),this.needsRelocation(o)&&this.lists.relocation.push(o);var v=o.state();v.targetMethodMap&&Object.keys(v.targetMethodMap).length>0&&(this.targetMethodMap[o.oid]=_e({},v.targetMethodMap),v.targetMethodMap={}),o.isActivated()&&i.push(o)}this.shouldCreateDom(o,l)&&!this.noDomMap[o.oid]&&(null!==(u=o.getDomHolder())&&void 0!==u&&u.exists()||this.noDomMap[null===(s=o.getDomParent())||void 0===s?void 0:s.oid]?(this.lists.noDom.push(o),this.noDomMap[o.oid]=!0):o.markLayoutDirty("noDomHolder"))}else o.hasDom()&&this.addToDeletedDom(o),delete this.visibleOidMap[o.oid],delete this.preservedDomMap[o.oid]}}catch(e){a.e(e)}finally{a.f()}return i.forEach((function(e){return e.deactivate()})),Object.values(_e(_e({},t),r)).filter(Boolean).forEach((function(t){var r=t.exists(),n=r&&t.isIncluded();r&&n?!t.hasDom()&&t.canHaveDom()&&(delete e.visibleOidMap[t.oid],delete e.preservedDomMap[t.oid],t.visibilityStatus=void 0,t.markLayoutDirty("noDom")):t.hasDom()?e.addToDeletedDom(t):(delete e.visibleOidMap[t.oid],delete e.preservedDomMap[t.oid],e.domPolicyMap.delete(t.oid))})),this.lists.noDom.length>0?0:this.lists.reattach.length>0?1:this.lists.relocation.length>0?2:this.lists.rerender.length>0?3:this.lists.reasyncStyle.length>0?4:this.lists.deletedDom.length>0?5:this.lists.restyle.length>0?10:-1}},{key:"shouldPreserveDom",value:function(e){if(!e.isIncluded())return!1;if("keep"===this.getDomPolicy(e))return!0;if(!e.isVisible()&&o.d.isDefined(e.targets.isVisible))return!1;for(var t=e.parent;t&&t!==vt();){if(o.d.isDefined(t.targets.canDeleteDom))return!1===t.val("canDeleteDom");if(o.d.isDefined(t.targets.isVisible))return!0===t.val("isVisible");t=t.parent}return!1}},{key:"shouldHaveDom",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.isVisible();return!(!e.canHaveDom()||!e.isIncluded())&&(t||e.requiresDom()||"keep"===this.getDomPolicy(e))}},{key:"shouldCreateDom",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.isVisible();return!e.hasDom()&&this.shouldHaveDom(e,t)}},{key:"getDomPolicy",value:function(e){if(this.domPolicyMap.has(e.oid))return this.domPolicyMap.get(e.oid);for(var t=e;t&&t!==vt();){var r=t.val("dom");if(o.d.isDefined(r))return this.domPolicyMap.set(e.oid,r),r;t=t.parent}return this.domPolicyMap.set(e.oid,"auto"),"auto"}},{key:"isBracketVisible",value:function(e){for(e=e.bracket;e&&"BI"===e.type;){if(!e.isVisible())return!1;e=e.getParent()}return!0}},{key:"addToRecursiveDeletedDom",value:function(e){var t=this;e.isLightweightChild||(delete this.visibleOidMap[e.oid],delete this.preservedDomMap[e.oid],this.lists.deletedDom.includes(e)||(e.hasDom()&&this.lists.deletedDom.push(e),e.getChildren().forEach((function(e){e.isLightweightChild||e.managesOwnScroll()||t.addToRecursiveDeletedDom(e)}))))}},{key:"addToDeletedDom",value:function(e){delete this.visibleOidMap[e.oid],delete this.preservedDomMap[e.oid],this.lists.deletedDom.includes(e)||this.lists.deletedDom.push(e)}},{key:"markTModelDeleted",value:function(e){e&&this.deletedTModelRoots.add(e)}},{key:"collectDeletedTModels",value:function(){var e,t=Oe(this.deletedTModelRoots);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.exists()||this.addDeletedTree(r)}}catch(e){t.e(e)}finally{t.f()}this.deletedTModelRoots.clear()}},{key:"addDeletedTree",value:function(e){if(!e.isLightweightChild){delete this.visibleOidMap[e.oid],delete this.preservedDomMap[e.oid],this.domPolicyMap.delete(e.oid),e.hasDom()&&!this.lists.deletedDom.includes(e)&&this.lists.deletedDom.push(e);var t,r=Oe(e.getChildren());try{for(r.s();!(t=r.n()).done;){var n=t.value;n.isLightweightChild||this.addDeletedTree(n)}}catch(e){r.e(e)}finally{r.f()}}}},{key:"getVisibles",value:function(){return Object.values(this.visibleOidMap)}},{key:"getAvailableDoms",value:function(){return Object.values(_e(_e({},this.preservedDomMap),this.visibleOidMap))}},{key:"needsRelocation",value:function(e){return!(!e.hasDom()||!o.d.isDefined(e.domOrderIndex))}},{key:"needsRerender",value:function(e){var t=e.getHtml();return!(!e.hasDom()||!o.d.isDefined(t)||e.$dom.innerHTML()===String(t)&&e.$dom.textOnly===e.isTextOnly())}},{key:"needsRestyle",value:function(e){var t;return e.hasDom()&&(null===(t=e.styleTargetMap)||void 0===t?void 0:t.size)>0}},{key:"needsReasyncStyle",value:function(e){var t;return e.hasDom()&&(null===(t=e.asyncStyleTargetMap)||void 0===t?void 0:t.size)>0}},{key:"needsReattach",value:function(e){return!(!e.hasDom()||e.reuseDomDefinition())&&(e.hasDomHolderChanged()||e.hasBaseElementChanged())}},{key:"renderTModels",value:function(){var e,t=Oe(this.lists.rerender);try{for(t.s();!(e=t.n()).done;){var r,n,i=e.value;i.isTextOnly()?null===(r=i.$dom)||void 0===r||r.text(i.getHtml()):null===(n=i.$dom)||void 0===n||n.html(i.getHtml()),i.setLastUpdate("html"),i.domHeightTimestamp=0,i.domWidthTimestamp=0}}catch(e){t.e(e)}finally{t.f()}}},{key:"reattachTModels",value:function(){var e,t=[],r=Oe(this.lists.reattach);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=n.hasBaseElementChanged(),a=n.getDomParent();a&&a.$dom&&(a.$dom.removeElement(n.$dom.element),i&&(_.a.createDom(n),_.a.patchDom(n),_.a.initStyleMaps(n),this.needsRestyle(n)&&this.lists.restyle.push(n),this.needsReasyncStyle(n)&&this.lists.reasyncStyle.push(n),t.push(n)),n.getDomHolder()&&n.getDomHolder().appendTModel$Dom(n))}}catch(e){r.e(e)}finally{r.f()}this.activatePendingTargetsAfterDom(t)}},{key:"relocateTModels",value:function(){this.lists.relocation.sort((function(e,t){return t.domOrderIndex-e.domOrderIndex}));var e,t=Oe(this.lists.relocation);try{for(t.s();!(e=t.n()).done;){var r=e.value,n=r.getDomParent();n&&n.$dom&&(n.$dom.relocate(r,r.domOrderIndex),r.domOrderIndex=void 0)}}catch(e){t.e(e)}finally{t.f()}}},{key:"resetTModelDom",value:function(e){e.styleMap={},e.tfMap={},e.actualValues.isVisible=!1,e.hasDomNow=!1,e.$dom=null}},{key:"deleteDoms",value:function(){var e,t=Oe(this.lists.deletedDom);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.val("sourceDom")||this.deleteDom(r)}}catch(e){t.e(e)}finally{t.f()}this.lists.deletedDom.length=0}},{key:"deleteDom",value:function(e){e.hasAnimatingTargets()&&he.T.detachAnimationsOnDeleteDom(e);var t=e.getDomParent();t&&t.$dom&&t.$dom.removeElement(e.$dom.element),this.resetTModelDom(e)}},{key:"fixStyles",value:function(){var e,t=Oe(this.lists.restyle);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.hasDom()&&_.a.fixStyle(r)}}catch(e){t.e(e)}finally{t.f()}}},{key:"fixAsyncStyles",value:function(){var e,t=Oe(this.lists.reasyncStyle);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.hasDom()&&_.a.fixAsyncStyle(r)}}catch(e){t.e(e)}finally{t.f()}}},{key:"activatePendingTargetsAfterDom",value:function(e){var t,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).restoredDoneTargets,n=void 0===r||r,i=Oe(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(a.hasDom()){if(a.noDomUpdatingTargets){for(var o=0,l=Pe(a.noDomUpdatingTargets);o<l.length;o++){var u=l[o];a.addTargetToStatusList(u)}a.noDomUpdatingTargets=void 0}var s=a.pendingTargets,c=new Set;if(s)for(var d=0,h=Pe(s);d<h.length;d++){var f=h[d];c.add(f),m.g.cleanupTarget(a,f),m.g.shouldActivateNextTarget(a,f)}if(n)for(var v=0,p=Object.keys(a.targetValues);v<p.length;v++){var g=p[v];"done"!==a.targetValues[g].status||c.has(g)||a.isTargetInLoop(g)||a.isTargetPassiveLoop(g)||m.g.cleanupTarget(a,g)&&m.g.shouldActivateNextTarget(a,g)}}else a.markLayoutDirty("noDom")}}catch(e){i.e(e)}finally{i.f()}}},{key:"catchupNoDomTargetsBeforeStyle",value:function(e){var t;if(null!==(t=e.noDomUpdatingTargets)&&void 0!==t&&t.size){for(var r=0,n=Pe(e.noDomUpdatingTargets);r<n.length;r++){var i=n[r],a=e.targetValues[i];if(a){wt().catchupTargetByElapsed(e,i,{fireEnd:!1}),delete a.catchupAt;var o=wt().calculateTargetStatus(e,i);e.setTargetStatus(i,o)}}e.noDomUpdatingTargets=void 0}}},{key:"createDoms",value:function(){if(0!==this.lists.noDom.length){var e=new Map,t=[],r=[],i=[];this.lists.noDom.sort((function(e,t){return e.getUIDepth()-t.getUIDepth()}));var a,o=Oe(this.lists.noDom);try{for(o.s();!(a=o.n()).done;){var l,u=a.value,s=null!==(l=u.domId)&&void 0!==l?l:u.oid;n.J.query("#".concat(s))?(u.$dom=new n.J("#".concat(s)),u.$dom.attr("tgjs","true"),u.hasDomNow=!0,u.markLayoutDirty("hasDomNow"),i.push(u),this.needsRerender(u)&&this.lists.rerender.push(u),this.needsRestyle(u)&&this.lists.restyle.push(u),this.needsReasyncStyle(u)&&this.lists.reasyncStyle.push(u)):r.push(u)}}catch(e){o.e(e)}finally{o.f()}for(var c=0,d=r;c<d.length;c++){var h=d[c],f=h.getDomHolder();if(f)if(h.$dom=void 0,h.val("$dom"))h.$dom=h.val("$dom"),h.hasDom()||f.appendTModel$Dom(h),i.push(h);else{_.a.createDom(h),_.a.patchDom(h),t.push(h),i.push(h);var v=e.get(f);v||(v={domHolder:f,fragment:n.J.createDocumentFragment(),tmodels:[]},e.set(f,v)),v.fragment.appendChild(h.$dom.element),v.tmodels.push(h)}else h.markLayoutDirty("noDomHolder")}var p,g=Oe(e.values());try{for(g.s();!(p=g.n()).done;){var y=p.value,m=y.domHolder,b=y.fragment;m.appendElement(b)}}catch(e){g.e(e)}finally{g.f()}for(var T=0,w=i;T<w.length;T++){var k=w[T];this.catchupNoDomTargetsBeforeStyle(k)}for(var S=[],x=0,M=t;x<M.length;x++){var C=M[x];C.hasDom()&&(C.hasDomNow=!0,C.markLayoutDirty("hasDomNow"),S.push(C)),_.a.initStyleMaps(C),_.a.fixStyle(C),_.a.fixAsyncStyle(C)}for(var E=0,D=S;E<D.length;E++)D[E].onDomReady();this.activatePendingTargetsAfterDom(i),pt().attachEvents(i.filter((function(e){var t;return(null===(t=e.externalEventMap)||void 0===t?void 0:t.size)>0})))}}}],t&&Re(e.prototype,t),r&&Re(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function Fe(e){return Fe="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},Fe(e)}function Be(){Be=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new O(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};s(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(i,a,o,l){var u=d(e[i],e,a);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==Fe(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){s.value=e,o(s)}),(function(e){return r("throw",e,o,l)}))}l(u.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var u=E(l,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var s=d(t,r,n);if("normal"===s.type){if(i=n.done?p:f,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=p,n.method="throw",n.arg=s.arg)}}}function E(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(Fe(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=s(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(M.prototype),s(M.prototype,l,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new M(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),s(S,u,"Generator"),s(S,o,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function He(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,i)}function Ue(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){He(a,n,i,o,l,"next",e)}function l(e){He(a,n,i,o,l,"throw",e)}o(void 0)}))}}function We(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qe(n.key),n)}}function qe(e){var t=function(e,t){if("object"!=Fe(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Fe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Fe(t)?t:t+""}var Ke,$e,Ge,Ye=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.nextRuns=[],this.domProcessing=0,this.runningFlag=!1,this.runId="",this.runStartTime=void 0,this.runDuration=0,this.rerunId="",this.delayProcess=void 0,this.resetting=!1,this.activeStartTime=void 0,this.phase=0,this.runningStep=-1,this.sliceQueued=!1,this.eventSettlePending=!1}return t=e,r=[{key:"resetRuns",value:(a=Ue(Be().mark((function e(){return Be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.resetting=!0,e.next=3,new Promise((function(e){return requestAnimationFrame(e)}));case 3:this.clearDelayProcess(),this.nextRuns=[],this.domProcessing=0,this.runningFlag=!1,this.runId="",this.runStartTime=void 0,this.runDuration=0,this.rerunId="",this.delayProcess=void 0,this.resetting=!1,this.activeStartTime=void 0,this.phase=0,this.runningStep=-1,this.sliceQueued=!1,this.eventSettlePending=!1;case 18:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"scheduleOnlyIfEarlier",value:function(e,t){var r,n=(this.runningFlag&&null!==(r=this.runStartTime)&&void 0!==r?r:o.d.now())+(null!=e?e:0);this.delayProcess&&n>=this.delayProcess.runTime||this.schedule(e,t)}},{key:"schedule",value:function(e,t){if(et.isRunning()&&!this.resetting){var r=0===et.throttle?null!=e?e:0:et.throttle,n=o.d.now();this.delayRun(r,t,n)}}},{key:"run",value:(i=Ue(Be().mark((function e(t,r){var n,i,a,l,u;return Be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(et.isRunning()&&!this.resetting){e.next=2;break}return e.abrupt("return");case 2:if(!this.runningFlag){e.next=5;break}return this.rerunId||(this.rerunId="rerun ".concat(r)),e.abrupt("return");case 5:if(this.rerunId="",this.runId=r,this.runningFlag=!0,this.runStartTime=o.d.now(),n=!1,1===et.debugLevel&&o.d.log(!0)("Request from: ".concat(r," delay: ").concat(t," runningStep:").concat(this.runningStep," dom:").concat(this.domProcessing," runs:").concat(this.nextRuns.length," D:").concat(null===(i=this.delayProcess)||void 0===i?void 0:i.delay," events:").concat(pt().eventQueue.length)),e.prev=11,0!==this.phase){e.next=19;break}return(a=pt().captureEvents())&&(l=a.eventType,this.eventSettlePending="start"===l||"end"===l||"click"===l),et.targetManager.applyTargetValues(vt()),e.next=18,xt().calculateAll();case 18:this.phase=1;case 19:if(!(o.d.now()-this.runStartTime>20)){e.next=23;break}return n=!0,this.requestNextSlice(r),e.abrupt("return");case 23:if(1===this.phase&&(this.runningStep=et.manager.analyze(),this.phase=2),!(o.d.now()-this.runStartTime>20)){e.next=28;break}return n=!0,this.requestNextSlice(r),e.abrupt("return");case 28:if(2===this.phase&&(xt().calculateActivated(),et.events.resetEventsOnTimeout(),(u=et.manager.analyze())>=0&&(this.runningStep=this.runningStep<0?u:Math.min(this.runningStep,u)),this.phase=3),!(o.d.now()-this.runStartTime>20)){e.next=33;break}return n=!0,this.requestNextSlice(r),e.abrupt("return");case 33:3===this.phase&&(this.runningStep>=0&&(0===this.domProcessing?(n=!0,this.domOperations(this.runningStep)):this.rerunId||(this.rerunId="domrun ".concat(r))),this.phase=4),this.runDuration=o.d.now()-this.runStartTime,0===this.domProcessing&&this.needsRerun(),e.next=42;break;case 38:throw e.prev=38,e.t0=e.catch(11),this.phase=0,e.t0;case 42:return e.prev=42,n||0!==this.domProcessing||(this.runningFlag=!1),e.finish(42);case 45:case"end":return e.stop()}}),e,this,[[11,38,42,45]])}))),function(e,t){return i.apply(this,arguments)})},{key:"requestNextSlice",value:function(e){var t=this;this.runningFlag=!1,this.sliceQueued||(this.sliceQueued=!0,requestAnimationFrame((function(){t.sliceQueued=!1,t.schedule(0,"slice-".concat(e))})))}},{key:"needsRerun",value:function(){this.phase=0,this.runningFlag=!1;var e=this.eventSettlePending;if(this.eventSettlePending=!1,this.rerunId){var t=this.rerunId;this.rerunId="",this.schedule(0,"rerun-".concat(t))}else if(pt().eventQueue.length>0||e)this.schedule(0,"events-".concat(pt().eventQueue.length));else{var r=this.nextRuns.length>0?this.nextRuns[0].delay-(o.d.now()-this.nextRuns[0].insertTime):void 0,n=Tt(),i=n.lists.restyle.length>0||n.lists.reasyncStyle.length>0||xt().activatedList.length>0;if(void 0===r||n.lists.activeTModels.length>0||n.lists.updatingTModels.length>0||i)if(n.lists.updatingTModels.length>0)this.schedule(1,"getManager-needsRerun-updatingTModels");else if(n.lists.activeTModels.length>0){var a=n.lists.activeTModels.find((function(e){return 0===e.targetExecutionCount||e.activeTargetList.filter((function(t){return!e.isScheduledPending(t)})).some((function(t){return e.shouldScheduleRun(t)}))}));if(a){var l=!this.activeStartTime||o.d.now()-this.activeStartTime>15?1:15;this.activeStartTime=o.d.now(),this.schedule(l,"getManager-needsRerun-".concat(a.oid,"-").concat(a.activeTargetList))}}else i&&this.schedule(1,"needsRerun-dom-work")}this.executeNextRun()}},{key:"domOperations",value:function(t){var r=this;this.domProcessing=1,10!==t?Promise.all(e.domSteps.filter((function(e,r){return r>=t})).map((function(e){return Promise.resolve().then(e)}))).then((function(){Tt().lists.restyle.length?r.domFixStyles():(r.domProcessing=0,r.needsRerun())})).catch((function(){r.domProcessing=0,r.needsRerun()})):this.domFixStyles()}},{key:"domFixStyles",value:function(){var e=this;this.domProcessing=2,requestAnimationFrame((function(){try{Tt().fixStyles()}finally{e.domProcessing=0,e.needsRerun()}}))}},{key:"clearDelayProcess",value:function(){var e;null!==(e=this.delayProcess)&&void 0!==e&&e.timeoutId&&(clearTimeout(this.delayProcess.timeoutId),this.delayProcess.timeoutId=void 0),this.delayProcess=void 0}},{key:"setDelayProcess",value:function(e,t,r,n,i){var a=this,o={runId:e,insertTime:t,runTime:n,interval:r,delay:i,timeoutId:void 0},l=function(){var t=Ue(Be().mark((function t(){return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a.delayProcess===o){t.next=2;break}return t.abrupt("return");case 2:return a.clearDelayProcess(),t.prev=3,t.next=6,a.run(i,e);case 6:return t.prev=6,a.executeNextRun(),t.finish(6);case 9:case"end":return t.stop()}}),t,null,[[3,,6,9]])})));return function(){return t.apply(this,arguments)}}();this.delayProcess=o,o.timeoutId=setTimeout(l,i)}},{key:"executeNextRun",value:function(){if(!(this.runningFlag||this.domProcessing>0)){if(this.delayProcess){if(!(this.nextRuns.length>0))return;var e=this.nextRuns[0];if(!(e.insertTime+e.delay<this.delayProcess.runTime))return;clearTimeout(this.delayProcess.timeoutId);var t=Math.max(0,this.delayProcess.runTime-o.d.now());this.insertRun(this.delayProcess.runId,o.d.now(),t),this.delayProcess=void 0}for(var r=null;this.nextRuns.length>0;){var n=this.nextRuns.shift(),i=o.d.now();if(!(n.delay-(i-n.insertTime)<=0)){this.nextRuns.unshift(n);break}r=n}if(r)this.setDelayProcess(r.runId,r.insertTime,r.delay,o.d.now(),0);else if(this.nextRuns.length>0){var a=this.nextRuns[0],l=o.d.now(),u=Math.max(0,a.delay-(l-a.insertTime));this.setDelayProcess(a.runId,a.insertTime,a.delay,l+u,u)}else this.clearDelayProcess()}}},{key:"delayRun",value:function(e,t,r){var n=r+e;this.delayProcess?this.delayProcess.timeoutId&&n<this.delayProcess.runTime?(clearTimeout(this.delayProcess.timeoutId),this.insertRun(this.delayProcess.runId,this.delayProcess.insertTime,this.delayProcess.interval),this.setDelayProcess(t,r,e,n,e)):this.insertRun(t,r,e):this.setDelayProcess(t,r,e,n,e)}},{key:"insertRun",value:function(e,t,r){for(var n=0,i=this.nextRuns.length;n<i;){var a,o=n+i>>1,l=this.nextRuns[o],u=l.insertTime+l.delay-(t+r);if(0===u)return l.count=(null!==(a=l.count)&&void 0!==a?a:1)+1,void(l.runId.length<500?l.runId+="-"+e:l.runId.endsWith("-...")||(l.runId+="-..."));u>0?i=o:n=o+1}this.nextRuns.splice(n,0,{runId:e,insertTime:t,delay:r})}},{key:"getSnapshot",value:function(){var e=o.d.now(),t=[],r=function(r){if(r){var n=o.d.isDefined(r.runTime)?r.runTime:r.insertTime+r.delay;t.push({runId:r.runId,delay:Math.max(0,n-e)})}};r(this.delayProcess),this.nextRuns.forEach(r);var n=t.filter((function(e){return 0===e.delay})),i=t.filter((function(e){return e.delay>0})),a=[];return n.length&&a.push({runId:n.map((function(e){return e.runId})).join("-"),delay:0}),i.forEach((function(e){a.push(e)})),a}},{key:"restoreSnapshot",value:function(){var e=this;(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){e.schedule(t.delay,"restore-".concat(t.runId))}))}}],r&&We(t.prototype,r),n&&We(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n,i,a}();function Xe(e){return Xe="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},Xe(e)}function ze(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Qe(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qe(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function Qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ze(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Je(n.key),n)}}function Je(e){var t=function(e,t){if("object"!=Xe(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xe(t)?t:t+""}Ke=Ye,Ge=[function(){return Tt().createDoms()},function(){return Tt().reattachTModels()},function(){return Tt().relocateTModels()},function(){return Tt().renderTModels()},function(){return Tt().fixAsyncStyles()},function(){return Tt().deleteDoms()}],($e=qe($e="domSteps"))in Ke?Object.defineProperty(Ke,$e,{value:Ge,enumerable:!0,configurable:!0,writable:!0}):Ke[$e]=Ge;var et,tt=function(){return function(e,t,r){return t&&Ze(e.prototype,t),r&&Ze(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}),[{key:"applyTargetValues",value:function(e){var t,r=ze(arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.activeTargetList.slice(0));try{for(r.s();!(t=r.n()).done;){var n=t.value;e.isTargetImperative(n)||this.applyTargetValue(e,n)}}catch(e){r.e(e)}finally{r.f()}}},{key:"applyTargetValue",value:function(e,t){var r=e.targets[t];if(o.d.isDefined(r)){if(!(I.O.shouldPauseTarget(e,t)||e.isExecuted(t)&&e.hasUpdatingImperativeTargets(t))){if(e.isExecuted(t)&&e.getTargetStep(t)===e.getTargetSteps(t)){if(e.isScheduledPending(t))return;var n=I.O.scheduleExecution(e,t);if(n>0)return void St().schedule(n,"targetSchedule__".concat(e.oid))}e.isTargetEnabled(t)?(e.resetScheduleTimeStamp(t),u.j.prepareTarget(e,t),u.j.executeDeclarativeTarget(e,t),o.d.isDefined(r.fetchAction)||m.g.shouldActivateNextTarget(e,t)):r.needsReactivation&&e.removeFromActiveTargets(t)}}else e.removeFromActiveTargets(t)}},{key:"setActualValues",value:function(e,t){if(t.length){var r,n=0,i=ze(t=t.slice(0));try{for(i.s();!(r=i.n()).done;){var a=r.value;I.O.shouldPauseTarget(e,a)||((n=I.O.scheduleExecution(e,a))>0?St().schedule(n,"setActualValues-".concat(e.oid,"-").concat(a)):(e.resetScheduleTimeStamp(a),this.setActualValue(e,a)))}}catch(e){i.e(e)}finally{i.f()}var o=e.waapiBatch;o&&e.hasDom()?(kt().animate(e,o,he.T.getAnimationHooks()),e.waapiBatch=void 0):e.waapiBatch=void 0}}},{key:"findOriginalTModel",value:function(e,t){return a.X.findParentByTarget(e,t)||Et().find((function(e){return e.targets[t]}))}},{key:"fireOnStep",value:function(e,t,r){var n=e.targetValues[t],i=e.getTargetValue(t),a=e.getTargetSteps(t),l=e.targets[t];e.setLastUpdate(t),e.setTargetMethodName(t,"value");var u=n.originalTargetName,s=e.targets[u],c=e;e.setTargetMethodName(t,"value"),!s&&u&&(s=(c=this.findOriginalTModel(e,u))?c.targets[u]:null);var d=!1;if(e.isTargetImperative(t)){if(s){var h=m.g.getTargetName(o.d.capitalizeFirstLetter(t));"function"==typeof s["on".concat(h,"Step")]?(s["on".concat(h,"Step")].call(c,c.val(t),i,r,a),c.setTargetMethodName(u,["on".concat(h,"Step")]),d=!0):"function"==typeof s.onImperativeStep&&(s.onImperativeStep.call(c,t,c.val(t),i,r,a),c.setTargetMethodName(u,"onImperativeStep"),d=!0),s.activateNextTarget&&!s.activateNextTarget.endsWith("$$")&&s.activateNextTarget.endsWith("$")&&(d=!0,m.g.shouldActivateNextTarget(e,t))}}else d=e.handleSpecialTargetStep(t,r,a)||d,d=o.d.handleValueChange(e,t)||d,null!=l&&l.activateNextTarget&&!l.activateNextTarget.endsWith("$$")&&l.activateNextTarget.endsWith("$")&&(d=!0,m.g.shouldActivateNextTarget(e,t));return d}},{key:"fireOnEnd",value:function(e,t){var r=e.targetValues[t];if(r){var n=e.getTargetValue(t),i=e.getTargetSteps(t);e.setLastUpdate(t);var a=r.originalTargetName,l=e.targets[a],s=e;!l&&a&&(l=(s=this.findOriginalTModel(e,a))?s.targets[a]:null);var c=this.calculateTargetStatus(e,t);if(e.setTargetStatus(t,c),e.handleSpecialTargetEnd(t),e.isTargetImperative(t)){var d=m.g.getTargetName(o.d.capitalizeFirstLetter(t));l&&"function"==typeof l["on".concat(d,"End")]?(l["on".concat(d,"End")].call(s,s.val(t),n,i,i),s.setTargetMethodName(a,["on".concat(d,"End")])):l&&"function"==typeof l.onImperativeEnd&&(l.onImperativeEnd.call(s,t,s.val(t)),s.setTargetMethodName(a,"onImperativeEnd")),e.getTargetCycle(t)<e.getTargetCycles(t)-1&&(e.incrementTargetCycle(t),e.resetTargetStep(t),e.resetTargetInitialValue(t),delete r.valuePointer)}else{var h;e.getTargetCycle(t)<e.getTargetCycles(t)-1&&(e.incrementTargetCycle(t),e.resetTargetStep(t),e.resetTargetInitialValue(t),e.resetTargetExecutionFlag(t),delete r.valuePointer,u.j.executeDeclarativeTarget(e,t)),"function"==typeof(null===(h=e.targets[t])||void 0===h?void 0:h.onStepsEnd)&&(e.targets[t].onStepsEnd.call(e,e.getTargetCycle(t)),e.setTargetMethodName(t,"onStepsEnd"))}m.g.shouldActivateNextTarget(e,t)}}},{key:"calculateTargetStatus",value:function(e,t){var r=e.targetValues[t];if(r){var n=e.getValueListPointer(t),i=e.getTargetCycle(t),a=e.getTargetCycles(t),o=e.getTargetStep(t),l=e.getTargetSteps(t);return Array.isArray(r.valueList)&&n<r.valueList.length||e.isTargetImperative(t)&&i<a-1||o<l?"updating":e.isTargetInLoop(t)||i<a-1?"active":"done"}}},{key:"catchupTargetByElapsed",value:function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).fireEnd,n=void 0!==r&&r,i=e.targetValues[t];if(!i)return{done:!1};var a=o.d.advanceTargetByElapsed(e,t),l=a.step,u=a.valuePointer,s=a.cycle,c=e.getTargetValue(t),d=e.getTargetSteps(t),h=e.getTargetCycles(t);if(a.done){var f,v,p,g=null!==(f=i.valueList)&&void 0!==f&&f.length?i.valueList[i.valueList.length-1]:c;return e.val(t,g),e.setActual(t,g),e.addToStyleTargetList(t),i.step=d,i.valuePointer=null!==(v=null===(p=i.valueList)||void 0===p?void 0:p.length)&&void 0!==v?v:u,i.cycle=h,delete i.catchupAt,n&&this.fireOnEnd(e,t),{done:!0,step:d,cycle:h,valuePointer:i.valuePointer}}var y=e.getTargetInitialValue(t);o.d.isDefined(y)||(y=this.resolveInitialValue(e,t,c),e.setTargetInitialValue(t,y));var m=l>0?_.a.easingMorph(e,t,y,c,l,d):y;return e.val(t,m),e.setActual(t,m),e.addToStyleTargetList(t),i.step=l,i.valuePointer=u,i.cycle=s,{done:!1,step:l,cycle:s,valuePointer:u}}},{key:"setActualValue",value:function(e,t){var r,n,i=e.targetValues[t];if(i&&this.canUpdateTarget(e,t)){var a=this.getTargetUpdateState(e,t);o.d.isDefined(a.initialValue)||(a.initialValue=this.resolveInitialValue(e,t,a.theValue),e.setTargetInitialValue(t,a.initialValue));var l=this.catchupTargetByElapsed(e,t,{fireEnd:!0});if(l.done)St().scheduleOnlyIfEarlier(1,"".concat(e.oid,"---").concat(t,"-catchup-finished"));else{var u=null!==(r=l.step)&&void 0!==r?r:0,s=null!==(n=l.valuePointer)&&void 0!==n?n:e.getValueListPointer(t);e.canBeAnimated(a.cleanKey)?this.animateActualValue(e,t,i,a,u,s):this.updateActualValue(e,t,i,a,u,s)}}}},{key:"canUpdateTarget",value:function(e,t){return!(!e.isTargetImperative(t)&&!e.isTargetEnabled(t))||(St().schedule(15,"setActualValue-postpone-".concat(e.oid)),!1)}},{key:"getTargetUpdateState",value:function(e,t){return{theValue:e.getTargetValue(t),cleanKey:m.g.getTargetName(t),steps:e.getTargetSteps(t),cycle:e.getTargetCycle(t),interval:e.getTargetInterval(t),initialValue:e.getTargetInitialValue(t),lastUpdateTime:e.getLastUpdate(t),now:o.d.now()}}},{key:"resolveInitialValue",value:function(e,t,r){return o.d.isDefined(e.val(t))?e.val(t):"number"==typeof r?0:void 0}},{key:"animateActualValue",value:function(e,t,r,n,i,a){if(e.hasDom())for(var o=i>0?_.a.easingMorph(e,t,n.initialValue,n.theValue,i,n.steps):n.initialValue,l=e.isTargetImperative(t)?e.getTargetCycles(t):0,u=he.T.handleWebAnimationAPI(e,n.cleanKey,t,r,o,n.theValue,a,i,n.steps,n.interval,0,!1,!0),s=1;s<l;s++)he.T.handleWebAnimationAPI(e,n.cleanKey,t,r,o,n.theValue,a,i,n.steps,n.interval,s*u,!0,!1);else e.addToNoDomUpdatingTargets(t)}},{key:"updateActualValue",value:function(e,t,r,n,i,a){if(i<=n.steps){e.incrementTargetStep(t,n.now,n.lastUpdateTime,n.interval,n.steps);var o=_.a.easingMorph(e,t,n.initialValue,n.theValue,i,n.steps);if(e.val(t,o),e.setActual(t,o),e.addToStyleTargetList(t),this.fireOnStep(e,t,i),e.getTargetStep(t)<n.steps)return void St().scheduleOnlyIfEarlier(n.interval,"".concat(e.oid,"---").concat(t,"-").concat(i,"/").concat(n.steps,"-").concat(n.cycle,"-").concat(n.interval))}this.finishCurrentSegment(e,t,r,n,a)}},{key:"finishCurrentSegment",value:function(e,t,r,n,i){e.val(t,n.theValue),e.setActual(t,n.theValue),e.addToStyleTargetList(t),r.step=n.steps,e.setLastUpdate(t);var a=1;if(r.valueList&&i<r.valueList.length){e.incrementValueListPointer(t);var o=e.getValueListPointer(t);e.resetTargetStep(t),r.initialValue=r.value,r.value=r.valueList[o],r.steps=r.stepList[(o-1)%r.stepList.length],r.interval=Array.isArray(r.intervalList)?r.intervalList[(o-1)%r.intervalList.length]:0,r.easing=r.easingList[(o-1)%r.easingList.length],a=n.interval}else this.fireOnEnd(e,t);St().scheduleOnlyIfEarlier(a,"".concat(e.oid,"---").concat(t,"-").concat(n.steps,"/").concat(n.steps,"-").concat(n.cycle,"-").concat(a))}}])}(),rt=r(357);r(578);function nt(e){return nt="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},nt(e)}function it(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||ot(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function at(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=ot(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function ot(e,t){if(e){if("string"==typeof e)return lt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lt(e,t):void 0}}function lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ut(){ut=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new O(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};s(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(i,a,o,l){var u=d(e[i],e,a);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==nt(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){s.value=e,o(s)}),(function(e){return r("throw",e,o,l)}))}l(u.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var u=E(l,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var s=d(t,r,n);if("normal"===s.type){if(i=n.done?p:f,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=p,n.method="throw",n.arg=s.arg)}}}function E(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(nt(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=s(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(M.prototype),s(M.prototype,l,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new M(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),s(S,u,"Generator"),s(S,o,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function st(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,i)}function ct(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){st(a,n,i,o,l,"next",e)}function l(e){st(a,n,i,o,l,"throw",e)}o(void 0)}))}}var dt=[],ht=function(e){var t;if(e){var r,n=e instanceof i.c?e:u.j.createTModel("App",e);return null!==(t=et)&&void 0!==t&&t.tRoot?(et.tRoot.addChild(n),n):"loading"===document.readyState?(dt.push(n),n):(null!==(r=et)&&void 0!==r&&r.tRoot||"loading"===document.readyState||At(),et.tRoot.addChild(n),n)}};ht.unmount=ct(ut().mark((function e(){var t;return ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(et){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,et.stop();case 4:return t=et.tRoot,t.getChildren().forEach((function(e){var r,n;e.val("sourceDom")?Q.v.restoreDomState(null===(n=e.$dom)||void 0===n?void 0:n.element,e.domState):null!==(r=e.$dom)&&void 0!==r&&r.attr("tgjs")&&t.$dom.removeElement(e.$dom.element)})),t.allChildrenList=[],t.allChildrenMap={},t.clearUpdatingChildren(),t.clearActiveChildren(),t.clearAnimatingChildren(),e.next=14,et.reset();case 14:et.loader.clearAll(),ht.oids={},ht.tmodelIdMap={},et=void 0;case 18:case"end":return e.stop()}}),e)}))),ht.oids={},ht.tmodelIdMap={},ht.getOid=function(e){var t=ht.oids;o.d.isDefined(t[e])||(t[e]=0);var r=t[e]++;return{oid:r>0||e.endsWith("_")?"".concat(e).concat(r):e,num:r}};var ft=function(){return!!et&&et.runningFlag},vt=function(){var e;return null===(e=et)||void 0===e?void 0:e.tRoot},pt=function(){var e;return null===(e=et)||void 0===e?void 0:e.events},gt=function(){var e;return null===(e=et)||void 0===e?void 0:e.pager},yt=function(){var e;return null===(e=et)||void 0===e?void 0:e.loader},mt=function(e,t,r,n){var i;return null===(i=et)||void 0===i||null===(i=i.loader)||void 0===i?void 0:i.fetch(e,t,r,n)},bt=function(e,t,r){var n;return null===(n=et)||void 0===n||null===(n=n.loader)||void 0===n?void 0:n.fetchImage(e,t,r)},Tt=function(){var e;return null===(e=et)||void 0===e?void 0:e.manager},wt=function(){var e;return null===(e=et)||void 0===e?void 0:e.targetManager},kt=function(){var e;return null===(e=et)||void 0===e?void 0:e.animationManager},St=function(){var e;return null===(e=et)||void 0===e?void 0:e.runScheduler},xt=function(){var e;return null===(e=et)||void 0===e?void 0:e.locationManager},Mt=function(){var e,t;return null!==(e=null===(t=et)||void 0===t||null===(t=t.tRoot)||void 0===t?void 0:t.val("screenWidth"))&&void 0!==e?e:0},Ct=function(){var e,t;return null!==(e=null===(t=et)||void 0===t||null===(t=t.tRoot)||void 0===t?void 0:t.val("screenHeight"))&&void 0!==e?e:0},Et=function(){var e;return null===(e=et)||void 0===e||null===(e=e.manager)||void 0===e?void 0:e.getVisibles()},Dt=function(){var e;return null===(e=et)||void 0===e?void 0:e.resizeLastUpdate},Pt=function(){var e,t=null===(e=et)||void 0===e?void 0:e.stateManager;if(!t)throw new Error("TargetJS state manager is not initialized.");return t},Ot=function(e){return ht.tmodelIdMap[e]},Lt=function(e){var t=ht.tmodelIdMap[e];return t&&t.targets.sourceDom?t:void 0};"undefined"!=typeof window&&(window.t=window.t||Ot);var At=function(){var e;et||(e={throttle:0,debugLevel:0,runningFlag:!1,resizeLastUpdate:0,init:function(){return e.$window=new n.J(window),e.loader=new A,e.pager=new de,e.stateManager=new Ee,e.events=new y,e.locationManager=new z,e.targetManager=new tt,e.animationManager=new rt._,e.manager=new Ne,e.runScheduler=new Ye,e.tRootFactory=function(){var t=new i.c("tRoot",{styling:!1,domHolder:!0,isVisible:!0,screenWidth:function(){var r=n.J.getScreenWidth();return r!==t.val("screenWidth")&&(e.resizeLastUpdate=o.d.now()),r},screenHeight:function(){var r=n.J.getScreenHeight();return r!==t.val("screenHeight")&&(e.resizeLastUpdate=o.d.now()),r},initPageDom:function(){var e=this;Q.v.initPageDoms(this.$dom),dt.length&&(dt.forEach((function(t){return e.addChild(t)})),dt.length=0)}});return t.$dom=_.a.getRootDom(),"body"!==t.$dom.getTagName()&&t.$dom.attr("data-tj-no-slot","true"),t.val("screenWidth",n.J.getScreenWidth()),t.val("screenHeight",n.J.getScreenHeight()),e.tRoot&&e.tRoot.getChildren().forEach((function(e){if(!e.val("sourceDom")){var r=u.j.createTModel(e.type,e.targets);t.addChild(r)}})),t},e.tRoot=e.tRootFactory(),e}},e.start=ct(ut().mark((function t(){return ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.runningFlag=!1,u.j.executeDeclarativeTarget(e.tRoot,"screenWidth"),u.j.executeDeclarativeTarget(e.tRoot,"screenHeight"),e.events.detachAll(),e.events.detachWindowEvents(),e.events.attachWindowEvents(),e.events.clearAll(),e.events.attachEvents(e.manager.getVisibles()),t.next=10,e.runScheduler.resetRuns();case 10:return e.runningFlag=!0,e.runScheduler.schedule(0,"appStart"),t.abrupt("return",e);case 13:case"end":return t.stop()}}),t)}))),e.stop=ct(ut().mark((function t(){return ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.runningFlag=!1,e.events.detachAll(),e.events.detachWindowEvents(),e.events.clearAll(),t.next=6,e.animationManager.deleteAll();case 6:return t.next=8,e.animationManager.flushOneFrame();case 8:return t.next=10,e.runScheduler.resetRuns();case 10:return t.abrupt("return",e);case 11:case"end":return t.stop()}}),t)}))),e.reset=ct(ut().mark((function t(){return ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.manager.getVisibles().forEach((function(e){var t;if(null!==(t=e.allStyleTargetMap)&&void 0!==t&&t.size){var r,n=at(e.allStyleTargetMap);try{for(n.s();!(r=n.n()).done;){var i=it(r.value,1)[0];o.d.isDefined(e.val(i))&&e.addToStyleTargetList(i)}}catch(e){n.e(e)}finally{n.f()}}})),t.next=3,e.runScheduler.resetRuns();case 3:e.manager.clearAll(),e.locationManager.clear(),e.loader.clear(),a.X.clear();case 7:case"end":return t.stop()}}),t)}))),e.isRunning=function(){return e.runningFlag},e.find=function(e){return a.X.find(e)},(et=e).init().start())};"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",At):At())},966:function(e,t,r){r.d(t,{d:function(){return h}});var n=r(90),i=r(530);function a(e){return a="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},a(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}function u(e,t,r){return t=c(t),function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,r||[],c(e).constructor):t.apply(e,r))}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var h=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=u(this,t,["BI"])).parent=e,r.currentBracketStatus=2,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),r=t,(n=[{key:"canHaveDom",value:function(){return!1}},{key:"shouldBeBracketed",value:function(){return!1}},{key:"excludeDefaultStyling",value:function(){return!0}},{key:"isIncluded",value:function(){return!1}},{key:"getWidth",value:function(){return this.getContentWidth()}},{key:"getHeight",value:function(){return this.getContentHeight()}},{key:"getMinWidth",value:function(){return this.bottomBaseWidth}},{key:"getBaseWidth",value:function(){return this.bottomBaseWidth}},{key:"getBaseHeight",value:function(){return this.topBaseHeight}},{key:"useContentWidth",value:function(){return this.getRealParent().useContentWidth()}},{key:"useContentHeight",value:function(){return this.getRealParent().useContentHeight()}},{key:"getContainerOverflowMode",value:function(){return this.getRealParent().getContainerOverflowMode()}},{key:"getTopBaseHeight",value:function(){return this.topBaseHeight}},{key:"isVisible",value:function(){return!!this.visibilityStatus&&this.visibilityStatus.top&&this.visibilityStatus.bottom}},{key:"getBracketThreshold",value:function(){return this.getRealParent().getBracketSize()}},{key:"createViewport",value:function(){return this.viewport=this.viewport||new i.L,this.viewport.xNext=this.x,this.viewport.xNorth=this.x,this.viewport.xEast=this.x,this.viewport.xSouth=this.x,this.viewport.xWest=this.x,this.viewport.absX=this.getRealParent().viewport.absX,this.viewport.absY=this.getRealParent().viewport.absY,this.viewport.scrollTop=this.getRealParent().viewport.scrollTop,this.viewport.scrollLeft=this.getRealParent().viewport.scrollLeft,this.viewport.xOverflowReset=this.getRealParent().viewport.xOverflowReset,this.viewport.xOverflowLimit=this.getRealParent().viewport.xOverflowLimit,this.viewport.yNext=this.y,this.viewport.yNorth=this.y,this.viewport.yWest=this.y,this.viewport.yEast=this.y,this.viewport.ySouth=this.y,this.viewport.container=this,this.viewport}},{key:"getRealParent",value:function(){return this.realParent}},{key:"calcAbsolutePosition",value:function(e,t){this.absX=e+this.getRealParent().absX,this.absY=t+this.getRealParent().absY}},{key:"shouldCalculateChildren",value:function(){var e=this.isVisible();return!!this.hasEventDirty()||(this.currentBracketStatus>=1||this.isNowVisible||this.isNowInvisible?(this.currentBracketStatus=Math.max(0,this.currentBracketStatus-1),!0):(e&&(this.currentBracketStatus=Math.min(2,this.currentBracketStatus+1)),!1!==this.getDirtyLayout()&&e))}},{key:"getDirtyLayout",value:function(){var e=!!this.getRealParent().managesOwnScroll()&&this.getRealParent().backupDirtyLayout;return this.dirtyLayout||e||!1}},{key:"validateVisibilityInParent",value:function(){return!0}},{key:"adjustViewport",value:function(){this.viewport.xEast=Math.max(this.viewport.xEast,this.getRealParent().viewport.xEast),this.viewport.ySouth=Math.max(this.viewport.ySouth,this.getRealParent().viewport.ySouth)}},{key:"getChildren",value:function(){return this.allChildrenList}}])&&o(r.prototype,n),a&&o(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,a}(n.c)},714:function(e,t,r){r.d(t,{M:function(){return f}});var n=r(966),i=r(855);function a(e){return a="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},a(e)}function o(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)||u(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 l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function d(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,a=[{key:"generate",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!e.bracketMap[t.oid]||e.pageMap[t.oid]!==t.allChildrenList||r?(e.bracketMap[t.oid]=e.buildTreeBottomUp(t,t.getChildren()),e.pageMap[t.oid]=t.allChildrenList):(t.lastChildrenUpdate.deletions.length>0&&(e.updateTreeOnDeletions(t,t.lastChildrenUpdate.deletions),e.reindexTree(t)),t.lastChildrenUpdate.additions.length>0&&e.updateTreeOnAdditions(t,t.lastChildrenUpdate.additions),(t.lastChildrenUpdate.deletions.length>0||t.lastChildrenUpdate.additions.length>0)&&e.reindexTree(t)),t.lastChildrenUpdate.additions.length=0,t.lastChildrenUpdate.deletions.length=0,e.bracketMap[t.oid]}},{key:"updateTreeOnDeletions",value:function(t,r){function i(r,a){if(r)if(a instanceof n.d&&a.parent===a.realParent){var o=e.bracketMap[t.oid],l=o.indexOf(a);l>=0&&o.splice(l,1)}else{var u=r.allChildrenList.indexOf(a);u>=0&&(r.allChildrenList.splice(u,1),e.markBracketDirty(r),0===r.allChildrenList.length&&i(r.parent,r))}}r.forEach((function(e){return i(e.bracket,e)}))}},{key:"reindexTree",value:function(t){function r(e,t){if(0===e.allChildrenList.length)return t;if(e.allChildrenList[0]instanceof n.d){e.startIndex=t;var i,a=l(e.allChildrenList);try{for(a.s();!(i=a.n()).done;)t=r(i.value,t)}catch(e){a.e(e)}finally{a.f()}e.endIndex=t}else e.startIndex=t,t+=e.allChildrenList.length,e.endIndex=t;return t}var i,a=0,o=l(e.bracketMap[t.oid]);try{for(o.s();!(i=o.n()).done;)a=r(i.value,a)}catch(e){o.e(e)}finally{o.f()}}},{key:"updateTreeOnAdditions",value:function(t,r){var i=t.getBracketSize();r.forEach((function(r){var a=r.index,o=r.child,l=e.findOrCreateBracket(t,a),u=a-l.startIndex;u<l.allChildrenList.length?l.allChildrenList.splice(u,0,o):l.allChildrenList.push(o),o.bracket=l;var s=l;for(s.startIndex=Math.min(s.startIndex,a),s.endIndex=s.startIndex+s.allChildrenList.length,s.currentBracketStatus=2,s.markLayoutDirty("update"),s=l.getParent();s instanceof n.d;)s.startIndex=Math.min(s.startIndex,a),s.endIndex=Math.max(s.endIndex,a+1),s.currentBracketStatus=2,s.markLayoutDirty("update"),s=s.getParent();l.allChildrenList.length>i&&e.splitBracket(t,l)}))}},{key:"splitBracket",value:function(t,r){for(var i=r.allChildrenList,a=t.getBracketSize(),l=[],u=r.startIndex,s=0;s<i.length;s+=a){var c=i.slice(s,s+a),d=u+c.length,h=e.createBracket(t,u,d,c);h.parent=r.parent,u=h.endIndex,l.push(h)}if(r.parent!==r.realParent){var f,v=r.parent.allChildrenList.indexOf(r);if(v>=0&&(f=r.parent.allChildrenList).splice.apply(f,[v,1].concat(l)),e.markBracketDirty(r),r.parent.allChildrenList.length>=a){var p=e.buildTreeBottomUp(t,r.parent.allChildrenList);if(r.parent.allChildrenList=p,r.parent.allChildrenList.forEach((function(t){t.parent=r.parent,e.markBracketDirty(t)})),r.parent.parent){var g,y=r.parent.parent.allChildrenList.indexOf(r.parent);y>=0&&((g=r.parent.parent.allChildrenList).splice.apply(g,[y,1].concat(o(p))),r.parent.parent.allChildrenList.forEach((function(e){e.parent=r.parent.parent})))}}}else{var m=e.bracketMap[t.oid],b=m.indexOf(r);b>=0&&m.splice.apply(m,[b,1].concat(l)),m.length>t.getBracketSize()&&(e.bracketMap[t.oid]=e.buildTreeBottomUp(t,m))}l.forEach((function(t){return e.markBracketDirty(t)})),l[0].parent instanceof n.d&&e.markBracketDirty(l[0].parent)}},{key:"findOrCreateBracket",value:function(t,r){var i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.bracketMap[t.oid],o=l(a);try{for(o.s();!(i=o.n()).done;){var u=i.value;if(u.startIndex<=r&&u.endIndex>=r)return u.getFirstChild()instanceof n.d?e.findOrCreateBracket(t,r,u.allChildrenList):u}}catch(e){o.e(e)}finally{o.f()}var s=e.createBracket(t,r,r);if(a.push(s),a.length>t.getBracketSize()){var c=e.buildTreeBottomUp(t,a);e.bracketMap[t.oid]=c}return s}},{key:"buildTreeBottomUp",value:function(t,r){for(var i=r.length,a=t.getBracketSize(),o=[],l=0;l<i;l+=a){var u=r.slice(l,l+a),s=u[0]instanceof n.d,c=s?u[0].startIndex:l,d=s?u[u.length-1].endIndex:l+u.length,h=e.createBracket(t,c,d,u);o.push(h)}return o.length>a?e.buildTreeBottomUp(t,o):o}},{key:"createBracket",value:function(t,r,a,o){var l=new n.d(t);return i.qw.tmodelIdMap[l.oid]=l,l.realParent=t,l.allChildrenList=o||l.allChildrenList,l.startIndex=r,l.endIndex=a,l.allChildrenList.forEach((function(e){e instanceof n.d?(e.realParent=t,e.parent=l):e.bracket=l})),e.all[l.oid]=l,l}},{key:"reset",value:function(){e.bracketMap={},e.pageMap={},e.all={}}},{key:"markBracketDirty",value:function(e){for(var t=e;t&&"BI"===t.type;)t.currentBracketStatus=2,t.markLayoutDirty("update"),t=t.parent}}],(r=null)&&c(t.prototype,r),a&&c(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,a}();d(f,"bracketMap",{}),d(f,"pageMap",{}),d(f,"all",{})},737:function(e,t,r){function n(e){return n="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},n(e)}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}r.d(t,{I:function(){return s}});var o,l,u,s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,n=[{key:"color2Integers",value:function(t){if(t=t?String(t):"",t=e.colors[t.toLowerCase()]||t){if(t.startsWith("#")){t=3===(t=t.slice(1)).length?t.split("").map((function(e){return e+e})).join(""):t;var r=parseInt(t,16);return[r>>16&255,r>>8&255,255&r]}var n=t.match(/\d+/g);return n&&3===n.length?n.map(Number):void 0}}}],(r=null)&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();o=s,u={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},(l=a(l="colors"))in o?Object.defineProperty(o,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):o[l]=u},260:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{v:function(){return DomInit}});var _$Dom_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(768),_TUtil_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(34),_App_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(855),_TargetData_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(585);function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _typeof(e){return _typeof="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},_typeof(e)}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var DomInit=function(){function DomInit(){_classCallCheck(this,DomInit)}return _createClass(DomInit,null,[{key:"initCacheDoms",value:function(e){var t=(0,_App_js__WEBPACK_IMPORTED_MODULE_2__.Bt)().$dom.queryAll("[tgjs]"),r=new Map;e.forEach((function(e){e.$dom=null,"BI"!==e.type&&r.set(e.oid,e)}));var n,i=[],a=_createForOfIteratorHelper(t);try{for(a.s();!(n=a.n()).done;){var o=n.value,l=o.getAttribute("id"),u=(0,_App_js__WEBPACK_IMPORTED_MODULE_2__.iP)(l);u?(u.$dom=new _$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J(o),r.has(u.oid)||i.push(u)):_$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J.detach(o)}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"mount",value:function(e,t){if(void 0!==t){var r=DomInit.normalizeElementTarget(t);if(r){var n;null!==(n=e.$dom)&&void 0!==n&&n.exists()&&(e.domState?DomInit.restoreDomState(e.$dom.element,e.domState):e.$dom.detach()),e.domState=DomInit.snapshotDomState(r.element),e.targets.$dom=r,e.val("$dom",r);var i=r.getTagName().toLowerCase(),a={};e.val("element")!==i&&(a.element=i),a.position=r.getStyleValue("position")||"relative",a.sourceDom=!0,a.domIsland=!0,_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(e.targets.reuseDomDefinition)||(a.reuseDomDefinition=!0,a.domHolder=!0,_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(e.targets.excludeXYCalc)||(a.excludeXYCalc=!0),_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(e.targets.x)||_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(e.targets.excludeX)||(a.excludeX=!0),_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(e.targets.y)||_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(e.targets.excludeY)||(a.excludeY=!0)),e.addTargets(a);var o=r.getId();if(o&&o!==e.oid)e.domId=o;else if(!o){var l="tgjs-".concat(e.oid);r.ensureId(l),e.domId=l}r.attr("tgjs-oid",e.oid),r.attr("tgjs","true"),e.$dom=void 0}}}},{key:"initPageDoms",value:function(e){var t,r=new Map,n=_createForOfIteratorHelper(e.queryAll("*"));try{for(n.s();!(t=n.n()).done;){var i=t.value,a=void 0,o=Array.from(i.attributes),l=o.some((function(e){return"tg"===e.name||e.name.startsWith("tg-")})),u={};if(l){var s,c=_createForOfIteratorHelper(o);try{for(c.s();!(s=c.n()).done;){var d=s.value;if(d.name.startsWith("tg-")){var h=d.name.slice(3),f=_TargetData_js__WEBPACK_IMPORTED_MODULE_3__.u.toCanonicalKey(h),v=d.value.trim(),p=DomInit.parseString(v);u[f]=p}else"tg"===d.name&&(u[d.name]=!0)}}catch(e){c.e(e)}finally{c.f()}}var g=i.parentElement,y=r.get(g),m=void 0;if(Object.keys(u).length>0&&((m=i.getAttribute("id"))||y||(m=_App_js__WEBPACK_IMPORTED_MODULE_2__.qw.getOid("blank").oid,i.setAttribute("id",m)),i.getAttribute("tgjs")||i.setAttribute("tgjs",!0),a=_objectSpread({id:m,baseElement:i.tagName.toLowerCase(),$dom:new _$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J(i)},u)),y){a||(a={textOnly:!1,html:i.outerHTML,$dom:new _$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J(i)});var b=DomInit.getChildrenKey(y);b?Array.isArray(y[b].value)?y[b].value.push(a):"string"==typeof y[b]?y[b]={cycles:_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isNumber(+y[b])?+y[b]:1,value:[a]}:"object"===_typeof(y[b])&&(y[b].value=[a]):y.children$={cycles:1,value:[a]},r.set(i,a)}else a&&r.set(i,a)}}catch(e){n.e(e)}finally{n.f()}var T,w=[],k=_createForOfIteratorHelper(r.values());try{for(k.s();!(T=k.n()).done;){var S=T.value,x=S.$dom.element.parentElement,M=r.get(x);M?(S.$dom.detach(),delete S.$dom,delete S.id,S.sourceDom=!0,S.otype=S.id||(M.id||_App_js__WEBPACK_IMPORTED_MODULE_2__.qw.getOid("blank").oid)+"_",S.isVisible=_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(S.isVisible)?S.isVisible:function(){return this.getParent().isVisible()},S.domParent=_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(S.domParent)?S.domParent:function(){return this.getParent()}):(S.isVisible=!_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(S.isVisible)||S.isVisible,S.domHolder=!_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(S.domHolder)||S.domHolder,S.sourceDom=!0,(0,_App_js__WEBPACK_IMPORTED_MODULE_2__.Bt)().addChild(S),S.isVisible||w.push({$dom:S.$dom,tmodel:(0,_App_js__WEBPACK_IMPORTED_MODULE_2__.Bt)().getLastChild()}))}}catch(e){k.e(e)}finally{k.f()}w.forEach((function(e){var t=e.$dom,r=e.tmodel;t.exists()&&!r.hasChildren()&&(t.detach(),r.val("requiresDom",!1))}))}},{key:"getChildrenKey",value:function(e){for(var t=0,r=Object.keys(e);t<r.length;t++){var n=r[t];if(n.toLowerCase().includes("children"))return n}return null}},{key:"parseString",value:function parseString(rawValue){if("string"!=typeof rawValue)return rawValue;var trimmed=rawValue.trim(),isFunction=/^function\s*\([\s\S]*?\)\s*\{[\s\S]*\}$/m.test(trimmed)||/^\(?[\w\s,]*\)?\s*=>\s*(\{[\s\S]*\}|\S+)/m.test(trimmed),isObject=/^(\{[\s\S]*\}|\[[\s\S]*\])$/.test(trimmed),containsCode=["return","setTarget","TargetJS.","addChild","addSibling","activateTarget","removeChild","removeAll"].some((function(e){return trimmed.includes(e)}));if(!isObject&&!isFunction&&containsCode)try{return new Function(trimmed)}catch(e){}if(isObject||isFunction)try{return eval("(".concat(trimmed,")"))}catch(e){}try{return JSON.parse(trimmed)}catch(e){}return rawValue}},{key:"snapshotDomState",value:function(e){if(e&&1===e.nodeType){for(var t={},r=0,n=Array.from(e.attributes);r<n.length;r++){var i=n[r],a=i.name,o=i.value;t[a]=o}return{attrs:t,styleAttr:e.getAttribute("style"),html:e.innerHTML}}}},{key:"restoreDomState",value:function(e,t){if(e&&1===e.nodeType&&t){for(var r=t.attrs,n=t.styleAttr,i=0,a=Array.from(e.attributes);i<a.length;i++){var o=a[i].name;o in r||e.removeAttribute(o)}for(var l=0,u=Object.entries(r);l<u.length;l++){var s=_slicedToArray(u[l],2),c=s[0],d=s[1];e.getAttribute(c)!==d&&e.setAttribute(c,d)}n?e.setAttribute("style",n):e.removeAttribute("style"),e.innerHTML=t.html}}},{key:"normalizeElementTarget",value:function(e){if(e instanceof _$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J)return e;if(e instanceof Element)return new _$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J(e);if("string"==typeof e){var t=_$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J.querySelector(e);return t?new _$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J(t):null}return null}}])}()},421:function(e,t,r){var n;function i(e){return i="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},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function o(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}r.d(t,{G:function(){return u}});var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,n=[{key:"easingFunction",value:function(t){return t&&e.easeMap.get(t)||s}},{key:"cubicBezier",value:function(e,t,r,n){var i=function(e,t,r){var n=3*t,i=3*(r-t)-n;return(((1-n-i)*e+i)*e+n)*e},a=function(e,t,r){var n=3*t,i=3*(r-t)-n;return(3*(1-n-i)*e+2*i)*e+n};return function(o){var l=function(t){for(var n=t,o=0;o<8;o++){var l=i(n,e,r)-t;if(Math.abs(l)<1e-6)return n;var u=a(n,e,r);if(Math.abs(u)<1e-6)break;(n-=l/u)<0?n=0:n>1&&(n=1)}for(var s=0,c=1,d=0,h=0;h<20;h++){var f=i(d=(s+c)/2,e,r);if(Math.abs(f-t)<1e-6)return d;f<t?s=d:c=d}return d}(o=function(e){return e<=0?0:e>=1?1:e}(o));return i(l,t,n)}}}],(r=null)&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();function s(e){return e}n=u,o(u,"LINEAR","linear"),o(u,"EASE","ease"),o(u,"EASE_IN","ease-in"),o(u,"EASE_OUT","ease-out"),o(u,"EASE_IN_OUT","ease-in-out"),o(u,"STEP_START","step-start"),o(u,"STEP_END","step-end");var c={_:n.cubicBezier(.25,.1,.25,1)},d={_:n.cubicBezier(.42,0,1,1)},h={_:n.cubicBezier(0,0,.58,1)},f={_:n.cubicBezier(.42,0,.58,1)};o(u,"easeMap",new Map([[n.LINEAR,s],[n.EASE,c._],[n.EASE_IN,d._],[n.EASE_OUT,h._],[n.EASE_IN_OUT,f._],[n.STEP_START,function(e){return e<=0?0:1}],[n.STEP_END,function(e){return e<1?0:1}]]))},969:function(e,t,r){r.d(t,{e:function(){return c}});var n=r(737);function i(e){return i="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},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",s=l.asyncIterator||"@@asyncIterator",c=l.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),l=new A(n||[]);return o(a,"_invoke",{value:D(e,r,l)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var v="suspendedStart",p="suspendedYield",g="executing",y="completed",m={};function b(){}function T(){}function w(){}var k={};d(k,u,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(j([])));x&&x!==r&&n.call(x,u)&&(k=x);var M=w.prototype=b.prototype=Object.create(k);function C(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,l,u){var s=f(e[a],e,o);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==i(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,l,u)}),(function(e){r("throw",e,l,u)})):t.resolve(d).then((function(e){c.value=e,l(c)}),(function(e){return r("throw",e,l,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function D(t,r,n){var i=v;return function(a,o){if(i===g)throw Error("Generator is already running");if(i===y){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var u=P(l,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=g;var s=f(t,r,n);if("normal"===s.type){if(i=n.done?y:p,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=y,n.method="throw",n.arg=s.arg)}}}function P(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(i(t)+" is not iterable")}return T.prototype=w,o(M,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:T,configurable:!0}),T.displayName=d(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,d(e,c,"GeneratorFunction")),e.prototype=Object.create(M),e},t.awrap=function(e){return{__await:e}},C(E.prototype),d(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(h(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(M),d(M,c,"Generator"),d(M,u,(function(){return this})),d(M,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function o(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function l(e){o(a,n,i,l,u,"next",e)}function u(e){o(a,n,i,l,u,"throw",e)}l(void 0)}))}}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}var c=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tmodel=t,this.canvas=void 0,this.device=void 0,this.context=void 0,this.format=void 0,this.pipeline=void 0,this.bindGroup=void 0,this.particleBuffer=void 0,this.targetParticleBuffer=void 0,this.uniformBuffer=void 0,this.transitionStep=0,this.transitionActive=!1,this.particleCount=0,this.canvasLayer=void 0,this.initializationPromise=void 0},t=[{key:"init",value:(h=l(a().mark((function e(){var t=this;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.device){e.next=2;break}return e.abrupt("return",!0);case 2:if(this.tmodel.hasDom()){e.next=4;break}return e.abrupt("return",!1);case 4:return this.initializationPromise||(this.initializationPromise=this.initialize().catch((function(e){throw t.initializationPromise=void 0,e}))),e.next=7,this.initializationPromise;case 7:return e.abrupt("return",!!this.device);case 8:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"initialize",value:(d=l(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.gpu){e.next=2;break}throw new Error("WebGPU is not supported by this browser.");case 2:if(globalThis.GPUBufferUsage){e.next=4;break}throw new Error("GPUBufferUsage is not available in this WebGPU environment.");case 4:return this.createCanvas(),e.next=7,navigator.gpu.requestAdapter();case 7:if(t=e.sent){e.next=10;break}throw new Error("Unable to obtain a WebGPU adapter.");case 10:return e.next=12,t.requestDevice();case 12:if(this.device=e.sent,this.context=this.canvas.getContext("webgpu"),this.context){e.next=16;break}throw new Error("Unable to obtain a WebGPU canvas context.");case 16:this.format=navigator.gpu.getPreferredCanvasFormat(),this.resizeCanvas(),this.context.configure({device:this.device,format:this.format,alphaMode:"premultiplied"}),this.createUniformBuffer(),this.createPipeline();case 21:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"createCanvas",value:function(){var e;if(!this.canvas){var t=null===(e=this.tmodel.$dom)||void 0===e?void 0:e.element;if(!t)throw new Error("Unable to create a GPU child layer without a parent DOM element.");var r=t.querySelector('[data-targetjs-gpu-layer="true"]');r&&r.remove(),this.canvasLayer=document.createElement("div"),this.canvasLayer.setAttribute("data-targetjs-gpu-layer","true"),Object.assign(this.canvasLayer.style,{position:"absolute",left:"0px",top:"0px",width:"100%",height:"100%",pointerEvents:"none",zIndex:"0"}),this.canvas=document.createElement("canvas"),this.canvas.setAttribute("data-targetjs-gpu-children","true"),Object.assign(this.canvas.style,{position:"sticky",left:"0px",top:"0px",width:"1px",height:"1px",display:"block",pointerEvents:"none"}),this.canvasLayer.appendChild(this.canvas),t.prepend(this.canvasLayer)}}},{key:"createUniformBuffer",value:function(){this.uniformBuffer=this.device.createBuffer({size:32,usage:globalThis.GPUBufferUsage.UNIFORM|globalThis.GPUBufferUsage.COPY_DST})}},{key:"createPipeline",value:function(){var e=this.device.createShaderModule({code:"\n struct Uniforms {\n viewport: vec2f,\n contentOffset: vec2f,\n step: f32,\n transitionActive: f32,\n padding: vec2f,\n }\n\n @group(0) @binding(0)\n var<uniform> uniforms: Uniforms;\n\n struct VertexOutput {\n @builtin(position) position: vec4f,\n @location(0) localPosition: vec2f,\n @location(1) backgroundColor: vec4f,\n @location(2) size: vec2f,\n @location(3) borderRadius: f32,\n }\n\n fn getProgress(step: f32, steps: f32) -> f32 {\n if (uniforms.transitionActive < 0.5) {\n return 0.0;\n }\n\n if (steps < 0.0) {\n return 0.0;\n }\n\n if (steps == 0.0) {\n return 1.0;\n }\n\n return clamp(step / steps, 0.0, 1.0);\n }\n\n @vertex\n fn vertexMain(\n @location(0) childPosition: vec2f,\n @location(1) childSize: vec2f,\n @location(2) childBackgroundColor: vec4f,\n @location(3) childGeometry: vec2f,\n @location(4) targetPosition: vec2f,\n @location(5) targetSize: vec2f,\n @location(6) targetBackgroundColor: vec4f,\n @location(7) targetGeometry: vec2f,\n @location(8) targetPositionSteps: vec2f,\n @location(9) targetSizeSteps: vec2f,\n @location(10) targetBackgroundColorSteps: f32,\n @location(11) targetGeometrySteps: vec2f,\n @builtin(vertex_index) vertexIndex: u32\n ) -> VertexOutput {\n let corners = array<vec2f, 6>(\n vec2f(-1.0, -1.0),\n vec2f( 1.0, -1.0),\n vec2f(-1.0, 1.0),\n vec2f(-1.0, 1.0),\n vec2f( 1.0, -1.0),\n vec2f( 1.0, 1.0)\n );\n\n let xProgress = getProgress(uniforms.step, targetPositionSteps.x);\n let yProgress = getProgress(uniforms.step, targetPositionSteps.y);\n let widthProgress = getProgress(uniforms.step, targetSizeSteps.x);\n let heightProgress = getProgress(uniforms.step, targetSizeSteps.y);\n let backgroundColorProgress = getProgress(uniforms.step, targetBackgroundColorSteps);\n let borderRadiusProgress = getProgress(uniforms.step, targetGeometrySteps.x);\n let rotateProgress = getProgress(uniforms.step, targetGeometrySteps.y);\n\n let position = vec2f(\n mix(childPosition.x, targetPosition.x, xProgress),\n mix(childPosition.y, targetPosition.y, yProgress)\n );\n\n let size = vec2f(\n mix(childSize.x, targetSize.x, widthProgress),\n mix(childSize.y, targetSize.y, heightProgress)\n );\n\n let backgroundColor = mix(childBackgroundColor, targetBackgroundColor, backgroundColorProgress);\n let borderRadius = mix(childGeometry.x, targetGeometry.x, borderRadiusProgress);\n let rotate = mix(childGeometry.y, targetGeometry.y, rotateProgress);\n let localPosition = corners[vertexIndex];\n let localPixelPosition = localPosition * size * 0.5;\n let angle = rotate * 3.141592653589793 / 180.0;\n let cosine = cos(angle);\n let sine = sin(angle);\n\n let rotatedPosition = vec2f(\n localPixelPosition.x * cosine - localPixelPosition.y * sine,\n localPixelPosition.x * sine + localPixelPosition.y * cosine\n );\n\n let elementCenter = position - uniforms.contentOffset + size * 0.5;\n let pixelPosition = elementCenter + rotatedPosition;\n\n let clipPosition = vec2f(\n pixelPosition.x / uniforms.viewport.x * 2.0 - 1.0,\n 1.0 - pixelPosition.y / uniforms.viewport.y * 2.0\n );\n\n var output: VertexOutput;\n\n output.position = vec4f(clipPosition, 0.0, 1.0);\n output.localPosition = localPosition;\n output.backgroundColor = backgroundColor;\n output.size = size;\n output.borderRadius = borderRadius;\n\n return output;\n }\n\n @fragment\n fn fragmentMain(input: VertexOutput) -> @location(0) vec4f {\n let halfSize = max(input.size * 0.5, vec2f(0.0001));\n let radius = clamp(input.borderRadius, 0.0, min(halfSize.x, halfSize.y));\n\n if (radius > 0.0) {\n let pixelPosition = input.localPosition * halfSize;\n let q = abs(pixelPosition) - (halfSize - vec2f(radius));\n let distance = length(max(q, vec2f(0.0))) + min(max(q.x, q.y), 0.0) - radius;\n\n if (distance > 0.0) {\n discard;\n }\n }\n\n return input.backgroundColor;\n }\n "});this.pipeline=this.device.createRenderPipeline({layout:"auto",vertex:{module:e,entryPoint:"vertexMain",buffers:[{arrayStride:80,stepMode:"instance",attributes:[{shaderLocation:0,offset:0,format:"float32x2"},{shaderLocation:1,offset:8,format:"float32x2"},{shaderLocation:2,offset:16,format:"float32x4"},{shaderLocation:3,offset:32,format:"float32x2"}]},{arrayStride:80,stepMode:"instance",attributes:[{shaderLocation:4,offset:0,format:"float32x2"},{shaderLocation:5,offset:8,format:"float32x2"},{shaderLocation:6,offset:16,format:"float32x4"},{shaderLocation:7,offset:32,format:"float32x2"},{shaderLocation:8,offset:40,format:"float32x2"},{shaderLocation:9,offset:48,format:"float32x2"},{shaderLocation:10,offset:56,format:"float32"},{shaderLocation:11,offset:60,format:"float32x2"}]}]},fragment:{module:e,entryPoint:"fragmentMain",targets:[{format:this.format}]},primitive:{topology:"triangle-list"}}),this.bindGroup=this.device.createBindGroup({layout:this.pipeline.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this.uniformBuffer}}]})}},{key:"toNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r="string"==typeof e?parseFloat(e):Number(e);return Number.isFinite(r)?r:t}},{key:"getBackgroundColor",value:function(e){if(Array.isArray(e))return[this.toNumber(e[0],1),this.toNumber(e[1],1),this.toNumber(e[2],1),this.toNumber(e[3],1)];var t=n.I.color2Integers(null!=e?e:"#fff");if(!t)return[1,1,1,1];var r=this.toNumber(t[3],1);return r>1&&(r/=255),[this.toNumber(t[0],255)/255,this.toNumber(t[1],255)/255,this.toNumber(t[2],255)/255,r]}},{key:"getTargetStep",value:function(e,t){return e&&Object.prototype.hasOwnProperty.call(e,t)?Math.max(0,this.toNumber(e[t],0)):-1}},{key:"createParticleData",value:function(e,t){for(var r=new Float32Array(20*e.length),n=0;n<e.length;n++){var i=e[n]||{},a=null==t?void 0:t[n],o=this.getBackgroundColor(i.backgroundColor),l=20*n;r[l]=this.toNumber(i.x,0),r[l+1]=this.toNumber(i.y,0),r[l+2]=this.toNumber(i.width,0),r[l+3]=this.toNumber(i.height,0),r[l+4]=o[0],r[l+5]=o[1],r[l+6]=o[2],r[l+7]=o[3],r[l+8]=Math.max(0,this.toNumber(i.borderRadius,0)),r[l+9]=this.toNumber(i.rotate,0),r[l+10]=this.getTargetStep(a,"x"),r[l+11]=this.getTargetStep(a,"y"),r[l+12]=this.getTargetStep(a,"width"),r[l+13]=this.getTargetStep(a,"height"),r[l+14]=this.getTargetStep(a,"backgroundColor"),r[l+15]=this.getTargetStep(a,"borderRadius"),r[l+16]=this.getTargetStep(a,"rotate")}return r}},{key:"uploadParticleBuffer",value:function(e,t){var r,n;if(t.length)return e&&e.size===t.byteLength||(null===(r=e)||void 0===r||r.destroy(),e=this.device.createBuffer({size:t.byteLength,usage:globalThis.GPUBufferUsage.VERTEX|globalThis.GPUBufferUsage.COPY_DST})),this.device.queue.writeBuffer(e,0,t),e;null===(n=e)||void 0===n||n.destroy()}},{key:"setParticles",value:(c=l(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Array.isArray(t)?t:[t],e.next=3,this.init();case 3:if(e.sent){e.next=6;break}return e.abrupt("return");case 6:r=this.createParticleData(t),this.particleCount=t.length,this.particleBuffer=this.uploadParticleBuffer(this.particleBuffer,r),this.targetParticleBuffer=this.uploadParticleBuffer(this.targetParticleBuffer,r),this.transitionStep=0,this.transitionActive=!1,this.render();case 13:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"updateParticles",value:(s=l(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Array.isArray(t)?t:[t],e.next=3,this.init();case 3:if(e.sent){e.next=6;break}return e.abrupt("return");case 6:r=this.createParticleData(t),this.particleCount=t.length,this.particleBuffer=this.uploadParticleBuffer(this.particleBuffer,r),this.transitionActive||(this.targetParticleBuffer=this.uploadParticleBuffer(this.targetParticleBuffer,r)),this.render();case 11:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"setTargetParticles",value:(o=l(a().mark((function e(t,r){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Array.isArray(t)?t:[t],e.next=3,this.init();case 3:if(e.sent){e.next=6;break}return e.abrupt("return");case 6:if(!this.particleCount||t.length===this.particleCount){e.next=8;break}throw new Error("GPU child transition count ".concat(t.length," does not match current child count ").concat(this.particleCount,"."));case 8:n=this.createParticleData(t,r),this.targetParticleBuffer=this.uploadParticleBuffer(this.targetParticleBuffer,n),this.transitionStep=0,this.transitionActive=!0,this.render();case 13:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"setTransitionStep",value:function(e){this.transitionStep=Math.max(0,this.toNumber(e,0)),this.render()}},{key:"getRenderWidth",value:function(){var e=Number(this.tmodel.getWidth())||1,t=Number(this.tmodel.getParent().getWidth())||window.innerWidth||1;return Math.max(1,Math.min(e,t))}},{key:"getRenderHeight",value:function(){var e,t=Number(this.tmodel.getHeight())||1,r=Number(null===(e=this.tmodel.getParent())||void 0===e?void 0:e.getHeight())||window.innerHeight||1;return Math.max(1,Math.min(t,r))}},{key:"resizeCanvas",value:function(){var e;if(this.canvas&&this.device){var t=this.getRenderWidth(),r=this.getRenderHeight(),n=window.devicePixelRatio||1,i=(null===(e=this.device.limits)||void 0===e?void 0:e.maxTextureDimension2D)||8192,a=Math.min(n,i/t,i/r),o=Math.max(1,Math.round(t*a)),l=Math.max(1,Math.round(r*a)),u="".concat(t,"px"),s="".concat(r,"px");this.canvas.style.width!==u&&(this.canvas.style.width=u),this.canvas.style.height!==s&&(this.canvas.style.height=s),this.canvas.width!==o&&(this.canvas.width=o),this.canvas.height!==l&&(this.canvas.height=l)}}},{key:"updateUniforms",value:function(){var e=this.getRenderWidth(),t=this.getRenderHeight(),r=this.tmodel.getRenderScrollLeft(),n=this.tmodel.getRenderScrollTop();this.device.queue.writeBuffer(this.uniformBuffer,0,new Float32Array([e,t,r,n,this.transitionStep,this.transitionActive?1:0,0,0]))}},{key:"waitForPresentedFrame",value:(i=l(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.device){e.next=3;break}return e.next=3,this.device.queue.onSubmittedWorkDone();case 3:return e.next=5,new Promise((function(e){requestAnimationFrame((function(){requestAnimationFrame(e)}))}));case 5:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"render",value:function(){if(this.device&&this.context&&this.pipeline&&this.particleBuffer&&this.targetParticleBuffer&&0!==this.particleCount){this.resizeCanvas(),this.updateUniforms();var e=this.device.createCommandEncoder(),t=e.beginRenderPass({colorAttachments:[{view:this.context.getCurrentTexture().createView(),clearValue:{r:0,g:0,b:0,a:0},loadOp:"clear",storeOp:"store"}]});t.setPipeline(this.pipeline),t.setBindGroup(0,this.bindGroup),t.setVertexBuffer(0,this.particleBuffer),t.setVertexBuffer(1,this.targetParticleBuffer),t.draw(6,this.particleCount),t.end(),this.device.queue.submit([e.finish()])}}},{key:"completeTransition",value:function(){if(this.targetParticleBuffer&&this.transitionActive){var e=this.particleBuffer;this.particleBuffer=this.targetParticleBuffer,this.targetParticleBuffer=e,this.transitionStep=0,this.transitionActive=!1,this.render()}}},{key:"captureBitmap",value:function(){if(this.canvas&&this.device)return this.render(),createImageBitmap(this.canvas)}},{key:"destroy",value:function(){var e,t,r,n,i;null===(e=this.particleBuffer)||void 0===e||e.destroy(),null===(t=this.targetParticleBuffer)||void 0===t||t.destroy(),null===(r=this.uniformBuffer)||void 0===r||r.destroy(),null===(n=this.context)||void 0===n||n.unconfigure(),null===(i=this.canvasLayer)||void 0===i||i.remove(),this.particleBuffer=void 0,this.targetParticleBuffer=void 0,this.uniformBuffer=void 0,this.bindGroup=void 0,this.pipeline=void 0,this.context=void 0,this.device=void 0,this.canvasLayer=void 0,this.canvas=void 0,this.format=void 0,this.transitionStep=0,this.transitionActive=!1,this.particleCount=0,this.initializationPromise=void 0}}],t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,i,o,s,c,d,h}()},720:function(e,t,r){r.d(t,{f:function(){return b}});var n=r(421),i=r(138),a=r(333),o=r(249),l=r(34),u=r(855);function s(e){return s="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},s(e)}function c(){c=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var a=t&&t.prototype instanceof b?t:b,o=Object.create(a.prototype),l=new A(n||[]);return i(o,"_invoke",{value:D(e,r,l)}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var v="suspendedStart",p="suspendedYield",g="executing",y="completed",m={};function b(){}function T(){}function w(){}var k={};d(k,o,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(j([])));x&&x!==r&&n.call(x,o)&&(k=x);var M=w.prototype=b.prototype=Object.create(k);function C(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,o,l){var u=f(e[i],e,a);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==s(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(d).then((function(e){c.value=e,o(c)}),(function(e){return r("throw",e,o,l)}))}l(u.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function D(t,r,n){var i=v;return function(a,o){if(i===g)throw Error("Generator is already running");if(i===y){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var u=P(l,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=g;var s=f(t,r,n);if("normal"===s.type){if(i=n.done?y:p,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=y,n.method="throw",n.arg=s.arg)}}}function P(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(s(t)+" is not iterable")}return T.prototype=w,i(M,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:T,configurable:!0}),T.displayName=d(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,d(e,u,"GeneratorFunction")),e.prototype=Object.create(M),e},t.awrap=function(e){return{__await:e}},C(E.prototype),d(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(h(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(M),d(M,u,"Generator"),d(M,o,(function(){return this})),d(M,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function d(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,i)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){d(a,n,i,o,l,"next",e)}function l(e){d(a,n,i,o,l,"throw",e)}o(void 0)}))}}function f(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(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 v(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function p(e,t){if(e){if("string"==typeof e)return g(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function m(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}var b=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tmodel=t,this.activeTargets=[],this.restoredMainIndexes=[],this.restoredActivationSequences=[]},t=[{key:"registerChild",value:function(e,t,r){var n,i,a=this.tmodel,o={},l=v(r.runtimeTargets);try{for(l.s();!(i=l.n()).done;){var u=i.value;"render"===u.kind&&(o[u.targetName]=!0)}}catch(e){l.e(e)}finally{l.f()}var s=r.runtimeTargets.length>0,c=null!==(n=r.layoutFunctions)&&void 0!==n?n:[];return a.childRuntimePrograms[e]=r.runtimeTargets,a.childRuntimeStates[e]={controlledTargets:o,ownerTargetName:t,programIndex:0,activationCount:0,layoutFunctions:c,layoutFunctionsResolved:0===c.length,executions:{},startRequested:!1,renderReady:!1,started:!1,done:!s,pendingCompletion:s},s&&(a.pendingGpuChildRuntimeCounts[t]=(a.pendingGpuChildRuntimeCounts[t]||0)+1),s}},{key:"hasPending",value:function(e){var t=a.g.getTargetName(e);return(this.tmodel.pendingGpuChildRuntimeCounts[t]||0)>0}},{key:"prepareRestore",value:function(){this.restoredMainIndexes=[],this.restoredActivationSequences=[];for(var e=0;e<this.tmodel.childRuntimeStates.length;e++){var t,r,n=this.tmodel.childRuntimeStates[e];if(n){null!==(t=n.executions)&&void 0!==t||(n.executions={}),null!==(r=n.activationCount)&&void 0!==r||(n.activationCount=0);var i=Object.values(n.executions),a=i.filter((function(e){return"main"===e.sequenceId}));n.done||!n.started&&!a.length||this.restoredMainIndexes.push(e);var o,l=f(new Set(i.map((function(e){return e.sequenceId})).filter((function(e){return null==e?void 0:e.startsWith("activation:")})))),u=v(l);try{for(u.s();!(o=u.n()).done;){var s=o.value;this.restoredActivationSequences.push({index:e,sequenceId:s})}}catch(e){u.e(e)}finally{u.f()}n.started=!1,n.renderReady=!1,n.startRequested=!1}}}},{key:"resumeRestored",value:function(){var e,t=this.restoredMainIndexes.splice(0),r=this.restoredActivationSequences.splice(0),n=v(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;this.resumeMainProgram(i)}}catch(e){n.e(e)}finally{n.f()}var a,o=v(r);try{for(o.s();!(a=o.n()).done;){var l=a.value,u=l.index,s=l.sequenceId;this.resumeActivationSequence(u,s)}}catch(e){o.e(e)}finally{o.f()}}},{key:"resumeActivationSequence",value:function(e,t){var r,n,i=this,a=this.tmodel.childRuntimeStates[e];if(!a)return!1;var o=Object.values(a.executions||{}).filter((function(e){return e.sequenceId===t}));if(!o.length)return!1;var l=Math.max.apply(Math,f(o.map((function(e){return e.targetIndex})))),u=t.startsWith("activation:")?t.slice(11):t,s=null!==(n=(r=this.activeTargets)[e])&&void 0!==n?n:r[e]={},c=Promise.all(o.map((function(t){return i.resumeExecution(e,t)}))).then((function(){return i.continueActivatedSequence(e,l+1,t)})).catch((function(e){console.error(e)})).finally((function(){delete s[u]}));return s[u]=c,!0}},{key:"continueActivatedSequence",value:(w=h(c().mark((function e(t,r,n){var i,a;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=this.tmodel.childRuntimePrograms[t]){e.next=3;break}return e.abrupt("return");case 3:if(!(r<i.length)){e.next=12;break}if("deferred"===(a=i[r]).mode){e.next=7;break}return e.abrupt("break",12);case 7:return e.next=9,this.runTarget(t,a,r,n);case 9:r++,e.next=3;break;case 12:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return w.apply(this,arguments)})},{key:"resumeMainProgram",value:function(e){var t=this,r=this.tmodel.childRuntimeStates[e];if(r&&!r.done&&!r.started){r.started=!0;var n=Object.values(r.executions||{}).filter((function(e){return"main"===e.sequenceId}));Promise.all(n.map((function(r){return t.resumeExecution(e,r)}))).then((function(){return t.runProgram(e)})).catch((function(e){console.error(e)})).finally((function(){t.complete(e)}))}}},{key:"resumeExecution",value:function(e,t){var r=this.tmodel.childRuntimePrograms[e],n=null==r?void 0:r[t.targetIndex];return n?"interval"===t.kind?this.runIntervalTarget(e,n,t.targetIndex,t.sequenceId):"render"===t.kind?this.runRenderTarget(e,n,t.targetIndex,t.sequenceId):Promise.resolve():Promise.resolve()}},{key:"isControlled",value:function(e,t){var r,n=this.tmodel.childRuntimeStates[e];if(!n)return!1;var a=i.D.getGpuRenderTargetName(t);return!0===(null===(r=n.controlledTargets)||void 0===r?void 0:r[a])}},{key:"complete",value:function(e){var t=this.tmodel,r=t.childRuntimeStates[e];if(r&&!r.done&&(r.done=!0,r.started=!1,r.pendingCompletion)){r.pendingCompletion=!1;var n=r.ownerTargetName,i=Math.max(0,(t.pendingGpuChildRuntimeCounts[n]||0)-1);i>0?t.pendingGpuChildRuntimeCounts[n]=i:(delete t.pendingGpuChildRuntimeCounts[n],(0,u.fB)().schedule(1,"gpuChildRuntimeComplete-".concat(t.oid)))}}},{key:"resolveLayoutFunctions",value:function(){for(var e=this.tmodel,t=!1,r=0;r<e.childRuntimeStates.length;r++){var n,a=e.childRuntimeStates[r];if(a&&!a.layoutFunctionsResolved&&null!==(n=a.layoutFunctions)&&void 0!==n&&n.length){var o,l=e.childHandles[r],u=!1,s=v(a.layoutFunctions);try{for(s.s();!(o=s.n()).done;){var c=o.value,d=i.D.resolveGpuRenderValue(c.value,l),h=i.D.getGpuInitialRenderValue(d);e.getChildValue(r,c.targetName)!==h&&(l.val(c.targetName,h),u=!0,t=!0)}}catch(e){s.e(e)}finally{s.f()}u||(a.layoutFunctionsResolved=!0)}}return t}},{key:"queueStart",value:function(e){var t=this.tmodel.childRuntimeStates[e];!t||t.done||t.started||(t.startRequested=!0,this.startReady())}},{key:"markRenderReady",value:function(e){var t,r=v(e);try{for(r.s();!(t=r.n()).done;){var n=t.value,i=this.tmodel.childRuntimeStates[n];i&&(i.renderReady=!0)}}catch(e){r.e(e)}finally{r.f()}this.startReady()}},{key:"markPendingRenderReady",value:function(){var e,t=v(this.tmodel.childRuntimeStates);try{for(t.s();!(e=t.n()).done;){var r=e.value;null==r||!r.startRequested||r.started||r.done||(r.renderReady=!0)}}catch(e){t.e(e)}finally{t.f()}this.startReady()}},{key:"startReady",value:function(){var e=this.tmodel;if(!e.hasDom()||e.completeLayoutEpoch!==e.layoutEpoch)return!1;for(var t=!1,r=0;r<e.childRuntimeStates.length;r++){var n=e.childRuntimeStates[r];n&&n.startRequested&&n.renderReady&&!n.started&&!n.done&&(n.startRequested=!1,this.start(r),t=!0)}return t}},{key:"start",value:function(e){var t=this,r=this.tmodel.childRuntimeStates[e],n=this.tmodel.childRuntimePrograms[e];r&&null!=n&&n.length&&!r.started&&!r.done&&(r.started=!0,r.programIndex=0,Promise.resolve(this.runProgram(e)).catch((function(e){console.error(e)})).finally((function(){t.complete(e)})))}},{key:"runProgram",value:(T=h(c().mark((function e(t){var r,n,i,a,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.tmodel.childRuntimeStates[t],n=this.tmodel.childRuntimePrograms[t],r&&n){e.next=4;break}return e.abrupt("return");case 4:for(i=[];r.programIndex<n.length&&"immediate"===n[r.programIndex].mode;)a=r.programIndex++,i.push(this.runTarget(t,n[a],a,"main"));if(!i.length){e.next=9;break}return e.next=9,Promise.all(i);case 9:if(!(r.programIndex<n.length)){e.next=15;break}return o=r.programIndex++,e.next=13,this.runTarget(t,n[o],o,"main");case 13:e.next=9;break;case 15:case"end":return e.stop()}}),e,this)}))),function(e){return T.apply(this,arguments)})},{key:"runTarget",value:(b=h(c().mark((function e(t,r,n){var i,a,o,l,u=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=u.length>3&&void 0!==u[3]?u[3]:"main",a=this.tmodel.childHandles[t]){e.next=4;break}return e.abrupt("return");case 4:if("interval"!==r.kind){e.next=8;break}return e.next=7,this.runIntervalTarget(t,r,n,i);case 7:case 11:return e.abrupt("return");case 8:if("render"!==r.kind){e.next=12;break}return e.next=11,this.runRenderTarget(t,r,n,i);case 12:if("function"!=typeof(o=r.target.value)){e.next=18;break}if(null==(l=o.call(a))||!l.then){e.next=18;break}return e.next=18,l;case 18:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return b.apply(this,arguments)})},{key:"getExecutionId",value:function(e,t){return"".concat(e,":").concat(t)}},{key:"getExecution",value:function(e,t,r){var n,i=this.tmodel.childRuntimeStates[e];return null==i||null===(n=i.executions)||void 0===n?void 0:n[this.getExecutionId(t,r)]}},{key:"setExecution",value:function(e,t,r,n){var i,a=this.tmodel.childRuntimeStates[e];a&&(null!==(i=a.executions)&&void 0!==i||(a.executions={}),a.executions[this.getExecutionId(t,r)]=n)}},{key:"clearExecution",value:function(e,t,r){var n=this.tmodel.childRuntimeStates[e];null!=n&&n.executions&&delete n.executions[this.getExecutionId(t,r)]}},{key:"runIntervalTarget",value:(m=h(c().mark((function e(t,r,n,i){var a,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.tmodel.childHandles[t],(o=this.getExecution(t,i,n))||(o={sequenceId:i,targetIndex:n,kind:"interval",interval:Math.max(0,Number(this.resolveOption(r.target.interval,a))||0),waiting:!1,startTime:0},this.setExecution(t,i,n,o)),e.next=5,this.waitForExecution(o);case 5:this.clearExecution(t,i,n);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return m.apply(this,arguments)})},{key:"waitForExecution",value:(g=h(c().mark((function e(t){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.interval,t.waiting&&t.startTime>0?r=Math.max(0,t.interval-(l.d.now()-t.startTime)):(t.waiting=!0,t.startTime=l.d.now()),!(r>0)){e.next=5;break}return e.next=5,this.wait(r);case 5:t.waiting=!1,t.startTime=0;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"runRenderTarget",value:(p=h(c().mark((function e(t,r,n){var i,a,o,l,u,s,d,h,f,v=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=v.length>3&&void 0!==v[3]?v[3]:"main",a=this.tmodel,o=a.childHandles[t],l=r.target,u=r.targetName,(s=this.getExecution(t,i,n))||("function"==typeof(d=l.value)&&(d=d.call(o)),h=Array.isArray(d),f=h?d:[a.getChildValue(t,u),d],s={sequenceId:i,targetIndex:n,kind:"render",targetName:u,values:f,isValueList:h,segmentIndex:0,segmentReady:!1,step:0,waiting:!1,startTime:0},this.setExecution(t,i,n,s));case 7:if(!(s.segmentIndex<s.values.length-1)){e.next=18;break}return s.segmentReady||this.prepareRenderSegment(s,r,o),e.next=11,this.animateExecution(t,s);case 11:s.segmentIndex++,s.segmentReady=!1,s.step=0,s.waiting=!1,s.startTime=0,e.next=7;break;case 18:this.clearExecution(t,i,n);case 19:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return p.apply(this,arguments)})},{key:"prepareRenderSegment",value:function(e,t,r){var n=t.target,i=e.segmentIndex;e.from=e.values[i],e.to=e.values[i+1],e.steps=Math.max(0,Number(this.resolveOption(n.steps,r,i))||0),e.interval=l.d.isDefined(n.interval)?Math.max(0,Number(this.resolveOption(n.interval,r,i))||0):e.isValueList&&e.steps>0?8:0,e.easingName=this.resolveOption(n.easing,r,i),e.segmentReady=!0}},{key:"resolveOption",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return"function"==typeof e?e.call(t,r):Array.isArray(e)?e.length?e[r%e.length]:void 0:e}},{key:"animateExecution",value:(d=h(c().mark((function e(t,r){var i,a,l,u,s,d;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=this.tmodel,!(r.steps<=0)){e.next=5;break}return i.setChildValue(t,r.targetName,r.to),i.requestParticleRender(),e.abrupt("return");case 5:a=r.easingName?n.G.easingFunction(r.easingName):void 0,l=r.step+1;case 7:if(!(l<=r.steps)){e.next=20;break}if(!(r.interval>0)){e.next=11;break}return e.next=11,this.waitForExecution(r);case 11:u=l/r.steps,s=a?a(u):u,d=o.a.morph(r.targetName,r.from,r.to,s),i.setChildValue(t,r.targetName,d),r.step=l,i.requestParticleRender();case 17:l++,e.next=7;break;case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"wait",value:function(e){return new Promise((function(t){return setTimeout(t,Math.max(0,Number(e)||0))}))}},{key:"findTargetIndex",value:function(e,t){var r=this.tmodel.childRuntimePrograms[e];if(!r)return-1;var n=a.g.getTargetName(t),i=r.findIndex((function(e){return e.key===t}));return i>=0?i:r.findIndex((function(e){return e.targetName===n&&"immediate"===e.mode}))}},{key:"runActivatedSequence",value:(s=h(c().mark((function e(t,r,n){var i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!(i=this.tmodel.childRuntimePrograms[t])||r<0||r>=i.length)){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this.runTarget(t,i[r],r,n);case 5:return e.next=7,this.continueActivatedSequence(t,r+1,n);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return s.apply(this,arguments)})},{key:"activateTarget",value:function(e,t){var r,n,i=this,a=this.tmodel.childRuntimeStates[e],o=this.tmodel.childRuntimePrograms[e];if(!a||!o)return!1;var l=this.findTargetIndex(e,t);if(l<0)throw new Error('GPU child target "'.concat(t,'" cannot be activated because it is not in the child runtime program.'));var u=o[l];if("render"!==u.kind&&"runtime"!==u.kind)throw new Error('GPU child target "'.concat(t,'" cannot be activated.'));var s="".concat(u.key,"-").concat(++a.activationCount),c="activation:".concat(s),d=null!==(n=(r=this.activeTargets)[e])&&void 0!==n?n:r[e]={},h=Promise.resolve().then((function(){return i.runActivatedSequence(e,l,c)})).catch((function(e){console.error(e)})).finally((function(){delete d[s]}));return d[s]=h,!0}}],t&&y(e.prototype,t),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,s,d,p,g,m,b,T,w}()},578:function(e,t,r){r.d(t,{G:function(){return F}});var n=r(90),i=r(611),a=r(969),o=r(720),l=r(138),u=r(690),s=r(333),c=r(34),d=r(249);function h(e){return h="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},h(e)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h(t)?t:t+""}var m=function(){return e=function e(t,r){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.parent=t,this.index=r,this.isLightweightChild=!0,this.type="".concat(t.type,"_"),this.oid="".concat(t.oid,"_gpu_").concat(r),this.x=0,this.y=0,this.absX=0,this.absY=0;var i=null!==(n=t.particleValues[r])&&void 0!==n?n:{};this.explicitX=Object.prototype.hasOwnProperty.call(i,"x"),this.explicitY=Object.prototype.hasOwnProperty.call(i,"y"),this.targets={},this.targetValues={},this.allTargetMap={};for(var a=0,o=Object.keys(i);a<o.length;a++){var l=o[a];this.allTargetMap[l]=!0}this.actualValues=v(v({},i),{},{isVisible:!0}),this.visibilityStatus=void 0,this.updatingTargetList=[],this.activeTargetList=[],this.activatedTargets=[],this.runtimeState={updatingTargetList:this.updatingTargetList,activeTargetList:this.activeTargetList,activatedTargets:this.activatedTargets,fetchActionTargetList:[],lastChildrenUpdate:{additions:[],deletions:[]}},this.noDomUpdatingTargets=!1,this.pendingTargets=!1,this.currentStatus=void 0,this.dirtyLayout=!1},t=[{key:"state",value:function(){return this.runtimeState}},{key:"isTargetImperative",value:function(){return!1}},{key:"val",value:function(e,t){return 2===arguments.length?(this.allTargetMap[e]=!0,this.actualValues[e]=t,"x"===e?this.explicitX=!0:"y"===e&&(this.explicitY=!0),this.parent.setChildValue(this.index,e,t),this):this.parent.getChildValue(this.index,e)}},{key:"getParent",value:function(){return this.parent}},{key:"getRealParent",value:function(){return this.parent}},{key:"getParentValue",value:function(e){var t;return null===(t=this.parent)||void 0===t?void 0:t.val(e)}},{key:"pval",value:function(e){return this.getParentValue(e)}},{key:"exists",value:function(){var e;return(null===(e=this.parent)||void 0===e?void 0:e.getChild(this.index))===this}},{key:"isComplete",value:function(){return!0}},{key:"hasAnimatingTargets",value:function(){return!1}},{key:"hasAnimatingChildren",value:function(){return!1}},{key:"hasUpdatingChildren",value:function(){return!1}},{key:"hasActiveChildren",value:function(){return!1}},{key:"getChildren",value:function(){return[]}},{key:"hasChildren",value:function(){return!1}},{key:"clearUpdatingChildren",value:function(){this.updatingTargetList.length=0}},{key:"clearActiveChildren",value:function(){this.activeTargetList.length=0}},{key:"clearAnimatingChildren",value:function(){}},{key:"cancelAnimation",value:function(){}},{key:"hasEventDirty",value:function(){return!1}},{key:"markEventDirty",value:function(){}},{key:"markLayoutDirty",value:function(e){var t,r;null===(t=this.parent)||void 0===t||null===(r=t.markLayoutDirty)||void 0===r||r.call(t,"gpuChild-".concat(this.index,"-").concat(e))}},{key:"removeLayoutDirty",value:function(){}},{key:"getDirtyLayout",value:function(){return!1}},{key:"getX",value:function(){return this.explicitX?this.val("x"):this.x}},{key:"getY",value:function(){return this.explicitY?this.val("y"):this.y}},{key:"getWidth",value:function(){var e;return null!==(e=this.val("width"))&&void 0!==e?e:0}},{key:"getHeight",value:function(){var e;return null!==(e=this.val("height"))&&void 0!==e?e:0}},{key:"getBaseWidth",value:function(){return this.getWidth()}},{key:"getBaseHeight",value:function(){return this.getHeight()}},{key:"getMinWidth",value:function(){return this.getWidth()}},{key:"getTopBaseHeight",value:function(){return 0}},{key:"getMeasuringScale",value:function(){var e;return null!==(e=this.val("measuringScale"))&&void 0!==e?e:1}},{key:"getMarginTop",value:function(){var e,t;return null!==(e=null!==(t=this.val("marginTop"))&&void 0!==t?t:this.val("topMargin"))&&void 0!==e?e:0}},{key:"getMarginLeft",value:function(){var e,t;return null!==(e=null!==(t=this.val("marginLeft"))&&void 0!==t?t:this.val("leftMargin"))&&void 0!==e?e:0}},{key:"getMarginRight",value:function(){var e,t,r;return(null!==(e=null!==(t=this.val("marginRight"))&&void 0!==t?t:this.val("rightMargin"))&&void 0!==e?e:0)+(null!==(r=this.getParentValue("gap"))&&void 0!==r?r:0)}},{key:"getMarginBottom",value:function(){var e,t,r;return(null!==(e=null!==(t=this.val("marginBottom"))&&void 0!==t?t:this.val("bottomMargin"))&&void 0!==e?e:0)+(null!==(r=this.getParentValue("gap"))&&void 0!==r?r:0)}},{key:"getTopMargin",value:function(){return this.getMarginTop()}},{key:"getLeftMargin",value:function(){return this.getMarginLeft()}},{key:"getRightMargin",value:function(){return this.getMarginRight()}},{key:"getBottomMargin",value:function(){return this.getMarginBottom()}},{key:"getItemOverflowMode",value:function(){var e;return null!==(e=this.val("itemOverflowMode"))&&void 0!==e?e:"auto"}},{key:"isInFlow",value:function(){var e;return null===(e=this.val("isInFlow"))||void 0===e||e}},{key:"isIncluded",value:function(){return!0}},{key:"useContentWidth",value:function(){return!1}},{key:"useContentHeight",value:function(){return!1}},{key:"getContentWidth",value:function(){return 0}},{key:"getContentHeight",value:function(){return 0}},{key:"hasDom",value:function(){return!1}},{key:"isDomIsland",value:function(){return!1}},{key:"reuseDomDefinition",value:function(){return!1}},{key:"requiresDom",value:function(){return!1}},{key:"requiresDomRelocation",value:function(){return!1}},{key:"hasDomHolderChanged",value:function(){return!1}},{key:"hasBaseElementChanged",value:function(){return!1}},{key:"getHtml",value:function(){}},{key:"excludeDefaultStyling",value:function(){return!0}},{key:"excludeStyling",value:function(){return!0}},{key:"addToStyleTargetList",value:function(){}},{key:"calcAbsolutePosition",value:function(e,t){var r,n,i,a;this.absX=(null!==(r=null===(n=this.parent)||void 0===n?void 0:n.absX)&&void 0!==r?r:0)+e,this.absY=(null!==(i=null===(a=this.parent)||void 0===a?void 0:a.absY)&&void 0!==i?i:0)+t}},{key:"isVisible",value:function(){return!1!==this.actualValues.isVisible}},{key:"calcVisibility",value:function(){var e,t,r=this.parent;if(!r)return!1;var n=null!==(e=this.getX())&&void 0!==e?e:0,i=null!==(t=this.getY())&&void 0!==t?t:0,a=this.getWidth(),o=this.getHeight(),l=r.getWidth(),u=r.getHeight();return n+a>=0&&i+o>=0&&n<=l&&i<=u}},{key:"validateVisibilityInParent",value:function(){return!0}},{key:"addToParentVisibleChildren",value:function(){this.isVisible()&&this.isInFlow()&&this.parent&&this.parent.visibleChildren.push(this)}},{key:"setLayoutX",value:function(e){this.x=e,this.explicitX||(this.actualValues.x=e,this.parent.setChildLayoutValue(this.index,"x",e))}},{key:"setLayoutY",value:function(e){this.y=e,this.explicitY||(this.actualValues.y=e,this.parent.setChildLayoutValue(this.index,"y",e))}},{key:"setTarget",value:function(e,t){return this.allTargetMap[e]=!0,"x"===e?this.explicitX=!0:"y"===e&&(this.explicitY=!0),this.parent.setChildTarget(this.index,e,t),this}},{key:"activateTarget",value:function(e){return this.parent.activateGpuChildTarget(this.index,e),this}},{key:"getLayoutHeight",value:function(){var e=this.getHeight();return this.usesContentBoxSizing()&&(e+=this.getPaddingTop()+this.getPaddingBottom()),e}},{key:"getLayoutWidth",value:function(){var e=this.getWidth();return this.usesContentBoxSizing()&&(e+=this.getPaddingLeft()+this.getPaddingRight()),e}},{key:"usesContentBoxSizing",value:function(){return"border-box"!==this.getBoxSizing()}},{key:"getBoxSizing",value:function(){var e,t,r;return null!==(e=null!==(t=null!==(r=this.val("boxSizing"))&&void 0!==r?r:this.val("box-sizing"))&&void 0!==t?t:this.getParentValue("boxSizing"))&&void 0!==e?e:"content-box"}},{key:"getPaddingTop",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingTop"))&&void 0!==t?t:this.val("topPadding"))&&void 0!==e?e:d.a.getPaddingValue(this,"top")}},{key:"getPaddingLeft",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingLeft"))&&void 0!==t?t:this.val("leftPadding"))&&void 0!==e?e:d.a.getPaddingValue(this,"left")}},{key:"getPaddingRight",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingRight"))&&void 0!==t?t:this.val("rightPadding"))&&void 0!==e?e:d.a.getPaddingValue(this,"right")}},{key:"getPaddingBottom",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingBottom"))&&void 0!==t?t:this.val("bottomPadding"))&&void 0!==e?e:d.a.getPaddingValue(this,"bottom")}}],t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function b(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(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 T(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=M(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function S(e,t,r){return(t=A(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||M(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){if(e){if("string"==typeof e)return C(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function E(e){return E="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},E(e)}function D(){D=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new A(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};s(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(j([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(i,a,o,l){var u=d(e[i],e,a);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==E(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){s.value=e,o(s)}),(function(e){return r("throw",e,o,l)}))}l(u.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var u=P(l,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var s=d(t,r,n);if("normal"===s.type){if(i=n.done?p:f,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=p,n.method="throw",n.arg=s.arg)}}}function P(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(E(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=s(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(M.prototype),s(M.prototype,l,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new M(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),s(S,u,"Generator"),s(S,o,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function P(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,i)}function O(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){P(a,n,i,o,l,"next",e)}function l(e){P(a,n,i,o,l,"throw",e)}o(void 0)}))}}function L(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,A(n.key),n)}}function A(e){var t=function(e,t){if("object"!=E(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==E(t)?t:t+""}function j(e,t,r){return t=V(t),function(e,t){if(t&&("object"==E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,r||[],V(e).constructor):t.apply(e,r))}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function I(e,t,r,n){var i=R(V(1&n?e.prototype:e),t,r);return 2&n?function(e){return i.apply(r,e)}:i}function R(){return R="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=V(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},R.apply(null,arguments)}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}var F=function(e){function t(e,r,n){var i,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=j(this,t,[e,r,n,l])).particleValues=[],i.particleValuesDirty=!1,i.particleRenderRequested=!1,i.childHandles=[],i.childTargetValues={},i.childTransitions={},i.pendingGpuChildren={},i.childRuntimePrograms=[],i.childRuntimeStates=[],i.pendingGpuChildRuntimeCounts={},i.activeChildTransitionKey=void 0,i.gpuChildrenEnabled=!1,i.layoutEpoch=0,i.completeLayoutEpoch=-1,i.layoutCompleteWaiters=[],i.particleSyncPromise=void 0,i.restoringParticleRuntime=!1,i.particleRuntime=new o.f(i),i.particleRenderer=new a.e(i),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(t,e),r=t,i=[{key:"onDomReady",value:(v=O(D().mark((function e(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.restoringParticleRuntime){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.syncParticleRenderer();case 4:this.particleRuntime.markPendingRenderReady();case 5:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"restoreRuntimeDomDerivedState",value:(f=O(D().mark((function e(){var t;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.gpuChildrenEnabled&&this.hasDom()){e.next=3;break}return this.restoringParticleRuntime=!1,e.abrupt("return",!1);case 3:return t=!1,e.prev=4,e.next=7,this.waitForLayoutComplete();case 7:return e.next=9,this.syncParticleRenderer();case 9:if(t=e.sent){e.next=12;break}return e.abrupt("return",!1);case 12:return e.next=14,this.particleRenderer.waitForPresentedFrame();case 14:return e.prev=14,this.restoringParticleRuntime=!1,e.finish(14);case 17:return t&&this.particleRuntime.resumeRestored(),e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,this,[[4,,14,17]])}))),function(){return f.apply(this,arguments)})},{key:"syncParticleRenderer",value:function(){var e=this;return this.particleSyncPromise||(this.particleSyncPromise=this.syncParticleRendererNow().finally((function(){e.particleSyncPromise=void 0}))),this.particleSyncPromise}},{key:"syncParticleRendererNow",value:(h=O(D().mark((function e(){var t,r,n;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.gpuChildrenEnabled&&this.hasDom()){e.next=2;break}return e.abrupt("return",!1);case 2:if(!this.particleValues.length){e.next=7;break}return e.next=5,this.particleRenderer.setParticles(this.particleValues);case 5:e.next=9;break;case 7:return e.next=9,this.particleRenderer.init();case 9:if(t=this.activeChildTransitionKey){e.next=12;break}return e.abrupt("return",!0);case 12:if(r=s.g.getTargetName(t),n=this.childTransitions[r]){e.next=16;break}return e.abrupt("return",!0);case 16:return e.next=18,this.particleRenderer.setTargetParticles(n.values,n.steps);case 18:return this.handleSpecialTargetStep(t),e.abrupt("return",!0);case 20:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"requestParticleRender",value:function(){var e=this;!this.restoringParticleRuntime&&this.gpuChildrenEnabled&&this.hasDom()&&!this.particleRenderRequested&&(this.particleRenderRequested=!0,requestAnimationFrame((function(){e.particleRenderRequested=!1,e.particleValuesDirty?(e.particleValuesDirty=!1,e.particleRenderer.updateParticles(e.particleValues)):e.particleRenderer.render()})))}},{key:"getChildrenRenderer",value:function(){var e=this.targets[s.g.currentTargetName];return(null==e?void 0:e.renderer)||"auto"}},{key:"canRenderChildren",value:function(e){var t=this;return(e=Array.isArray(e)?e:[e]).length>0&&e.every((function(e){return!(!e||"object"!==E(e)||Array.isArray(e))&&Object.entries(e).every((function(e){var r=x(e,2),n=r[0],i=r[1],a=s.g.getTargetName(n);return n===a&&t.supportsChildTarget(a)&&t.canRenderChildValue(i)}))}))}},{key:"canRenderChildValue",value:function(e){return"function"!=typeof e&&(!u.D.isTargetSpecObject(e)||"function"!=typeof e.value&&(!Array.isArray(e.value)||e.value.length>=2))}},{key:"supportsChildTarget",value:function(e){return l.D.isGpuRenderTarget(e)}},{key:"affectsChildLayout",value:function(e){return l.D.affectsChildLayout(e)}},{key:"getChild",value:function(e){return this.gpuChildrenEnabled&&"number"==typeof e?this.childHandles[e]:I(t,"getChild",this,3)([e])}},{key:"getChildren",value:function(){return this.gpuChildrenEnabled?this.childHandles:I(t,"getChildren",this,3)([])}},{key:"getChildValue",value:function(e,t){var r;return null===(r=this.particleValues[e])||void 0===r?void 0:r[s.g.getTargetName(t)]}},{key:"setChildTarget",value:function(e,t,r){var n,i,a,o=s.g.getTargetName(s.g.currentTargetName),l=s.g.getTargetName(t);if(o){if(t!==l||!this.supportsChildTarget(l))throw new Error('GPU child target "'.concat(t,'" is not supported yet.'));var c=null!==(i=(n=this.childTargetValues)[o])&&void 0!==i?i:n[o]=[];(null!==(a=c[e])&&void 0!==a?a:c[e]={})[l]=u.D.isTargetSpecObject(r)?k({},r):{value:r}}}},{key:"setChildValue",value:function(e,t,r){var n=s.g.getTargetName(t),i=this.particleValues[e];if(i&&i[n]!==r){i[n]=r,this.particleValuesDirty=!0,this.affectsChildLayout(n)&&this.invalidateChildrenLayout();var a=this.childHandles[e];a&&(a.actualValues[n]=r)}}},{key:"setChildLayoutValue",value:function(e,t,r){var n,i,a=this.particleValues[e];if(a&&!this.particleRuntime.isControlled(e,t)){var o=r+("x"===t?null!==(n=this.getScrollLeft())&&void 0!==n?n:0:"y"===t&&null!==(i=this.getScrollTop())&&void 0!==i?i:0);a[t]!==o&&(a[t]=o,this.particleValuesDirty=!0)}}},{key:"getChildTargetValues",value:function(e){return this.childTargetValues[s.g.getTargetName(e)]}},{key:"handleChildTargets",value:function(e,t){for(var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=s.g.getTargetName(e),a=new Array(this.particleValues.length),o=new Array(this.particleValues.length),l=Math.max(0,Number(n.steps)||0),c=l,d=0;d<this.particleValues.length;d++){var h=this.particleValues[d],f=t[d],v=k({},h),p={};if(f)for(var g=0,y=Object.entries(f);g<y.length;g++){var m=x(y[g],2),b=m[0],T=m[1],w=u.D.isTargetSpecObject(T)?T:{value:T};v[b]=w.value;var S=void 0!==w.steps?Math.max(0,Number(w.steps)||0):l;p[b]=S,c=Math.max(c,S)}a[d]=v,o[d]=p}return this.childTransitions[i]={values:a,steps:o},this.activeChildTransitionKey=e,this.hasDom()&&this.particleRenderer.setTargetParticles(a,o).then((function(){var t;(null===(t=r.childTransitions[i])||void 0===t?void 0:t.values)===a&&r.handleSpecialTargetStep(e)})),{handled:!0,steps:c}}},{key:"handleSpecialTarget",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.gpuChildrenEnabled)return!1;var n=this.getChildTargetValues(e);return!!n&&this.handleChildTargets(e,n,r)}},{key:"getRenderScrollLeft",value:function(){var e;return this.getScrollLeft()||(null===(e=this.getParent().$dom)||void 0===e?void 0:e.getScrollLeft())||0}},{key:"getRenderScrollTop",value:function(){var e;return this.getScrollTop()||(null===(e=this.getParent().$dom)||void 0===e?void 0:e.getScrollTop())||0}},{key:"addChild",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.addedChildren.length+this.allChildrenList.length;if(e&&"object"===E(e)&&!(e instanceof n.c)&&l.D.isGpuChildrenTarget(s.g.currentTargetName)){var i=this.getChildrenRenderer();if("dom"!==i){var a=c.d.cloneTargetDefinition(e);if("gpu"===i||this.canRenderChildren(a))return this.addGpuChild(a),this}}return I(t,"addChild",this,3)([e,r])}},{key:"addGpuChild",value:function(e){var t=s.g.currentTargetName,r=s.g.getTargetName(t),n=this.particleValues.length;this.gpuChildrenEnabled=!0,this.particleValues[n]={};var i=new m(this,n);this.childHandles[n]=i;try{var a,o,u=l.D.compileGpuChildDefinition(i,e),c=this.createGpuChild(u.renderDefinition);return c?(this.particleValues[n]=c.initial,Object.assign(i.actualValues,c.initial),this.particleRuntime.registerChild(n,r,u),(null!==(o=(a=this.pendingGpuChildren)[r])&&void 0!==o?o:a[r]={key:t,children:[]}).children.push(k({index:n},c)),this.childrenUpdateFlag=!0,this.markLayoutDirty("addGpuChild"),!0):(this.particleValues.pop(),this.childHandles.pop(),!1)}catch(e){throw this.particleValues.pop(),this.childHandles.pop(),this.childRuntimePrograms.pop(),this.childRuntimeStates.pop(),e}}},{key:"isTargetEnabled",value:function(e){return!(l.D.isGpuChildrenTarget(e)&&this.isExecuted(e)&&this.particleRuntime.hasPending(e))&&I(t,"isTargetEnabled",this,3)([e])}},{key:"activateGpuChildTarget",value:function(e,t){return this.particleRuntime.activateTarget(e,t)}},{key:"createGpuChild",value:function(e){for(var t={},r={},n={},i={},a={},o=!1,l=0,u=Object.entries(e);l<u.length;l++){var s,c=x(u[l],2),d=c[0],h=c[1],f=this.resolveInitialChildProperty(h);if(!f)return;t[d]=f.initialValue,r[d]=f.targetValue,void 0!==f.steps&&(n[d]=f.steps),f.valueList&&(a[d]=f.valueList),f.loop&&(i[d]=!0),((null===(s=f.valueList)||void 0===s?void 0:s.length)>1||f.initialValue!==f.targetValue)&&(o=!0)}return{initial:t,target:r,steps:n,loops:i,valueLists:a,hasTransition:o}}},{key:"finalizeChildrenTarget",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!l.D.isGpuChildrenTarget(e))return!1;var n=s.g.getTargetName(e),i=this.pendingGpuChildren[n];if(null==i||!i.children.length)return!1;this.invalidateChildrenLayout();var a=Math.max(0,Number(r.steps)||0),o=this.particleValues,u=this.getChildrenSegmentCount(i.children),c=this.buildChildTransitionSegment(i.children,0,o,a);if(delete this.pendingGpuChildren[n],!c.hasSegment||0===c.maxSteps){this.particleValues=c.values;var d,h=i.children.map((function(e){return e.index})).filter((function(e){var r;return null===(r=t.childRuntimePrograms[e])||void 0===r?void 0:r.length})),f=T(h);try{for(f.s();!(d=f.n()).done;){var v=d.value;this.particleRuntime.queueStart(v)}}catch(e){f.e(e)}finally{f.f()}return this.hasDom()&&this.particleRenderer.setParticles(c.values).then((function(){t.particleRuntime.markRenderReady(h)})),{handled:!0,steps:0}}return this.childTransitions[n]={children:i.children,segmentIndex:0,segmentCount:u,defaultSteps:a,values:c.values,steps:c.steps,loops:c.loops,hasLoop:c.hasLoop},this.activeChildTransitionKey=e,{handled:!0,steps:c.maxSteps}}},{key:"advanceChildTransitionSegment",value:function(e,t){var r=this;if(!(t&&Array.isArray(t.children)&&Number.isInteger(t.segmentIndex)&&Number.isInteger(t.segmentCount)))return!1;var n=t.segmentIndex+1;if(n>=t.segmentCount)return!1;this.particleValues=t.values,this.particleRenderer.completeTransition();var i=this.buildChildTransitionSegment(t.children,n,this.particleValues,t.defaultSteps);t.segmentIndex=n,t.values=i.values,t.steps=i.steps,t.loops=i.loops;var a=this.targetValues[e];return a&&(a.steps=i.maxSteps),this.resetTargetStep(e),this.resetTargetInitialValue(e),this.setTargetStatus(e,"updating"),this.hasDom()&&this.particleRenderer.setTargetParticles(i.values,i.steps).then((function(){r.childTransitions[s.g.getTargetName(e)]===t&&r.handleSpecialTargetStep(e)})),!0}},{key:"buildChildTransitionSegment",value:function(e,t,r,n){var i,a=r.map((function(e){return k({},e)})),o=Array.from({length:r.length},(function(){return{}})),l=Array.from({length:r.length},(function(){return{}})),u=0,s=!1,c=!1,d=T(e);try{for(d.s();!(i=d.n()).done;){for(var h=i.value,f=r[h.index],v=k({},f),p=0,g=Object.keys(h.target);p<g.length;p++){var y=g[p],m=h.valueLists[y];if(m){if(t>=m.length-1)continue;v[y]=m[t+1];var b=this.getChildPropertySteps(h,y,t,n);o[h.index][y]=b,l[h.index][y]=!0===h.loops[y],u=Math.max(u,b),s=!0,h.loops[y]&&(c=!0)}else if(0===t&&f[y]!==h.target[y]){v[y]=h.target[y];var w=this.getChildPropertySteps(h,y,t,n);o[h.index][y]=w,l[h.index][y]=!0===h.loops[y],u=Math.max(u,w),s=!0,h.loops[y]&&(c=!0)}}a[h.index]=v}}catch(e){d.e(e)}finally{d.f()}return{values:a,steps:o,loops:l,maxSteps:u,hasSegment:s,hasLoop:c}}},{key:"getChildPropertySteps",value:function(e,t,r,n){var i=e.steps[t];return Array.isArray(i)?i.length?Math.max(0,Number(i[r%i.length])||0):n:void 0!==i?Math.max(0,Number(i)||0):n}},{key:"getChildSegmentCount",value:function(e){for(var t=0,r=0,n=Object.values(e.valueLists);r<n.length;r++){var i=n[r];t=Math.max(t,i.length-1)}return t}},{key:"getChildrenSegmentCount",value:function(e){var t,r=0,n=T(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;r=Math.max(r,this.getChildSegmentCount(i))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"getActiveChildTransition",value:function(){if(this.activeChildTransitionKey){var e=s.g.getTargetName(this.activeChildTransitionKey);return this.childTransitions[e]}}},{key:"handleSpecialTargetStep",value:function(e){var t=s.g.getTargetName(e);return!!this.childTransitions[t]&&(this.particleRenderer.setTransitionStep(this.getTargetStep(e)),!0)}},{key:"handleSpecialTargetEnd",value:function(e){var t=s.g.getTargetName(e),r=this.childTransitions[t];return!(!r||!this.advanceChildTransitionSegment(e,r)&&(r.hasLoop?(this.restartChildTransition(e,r),0):(this.particleValues=r.values,this.particleRenderer.completeTransition(),delete this.childTransitions[t],delete this.childTargetValues[t],this.activeChildTransitionKey===e&&(this.activeChildTransitionKey=void 0),0)))}},{key:"resolveInitialChildProperty",value:function(e){if(!u.D.isTargetSpecObject(e))return{initialValue:e,targetValue:e,valueList:void 0,steps:void 0,loop:!1};var t=e.value,r=Array.isArray(e.steps)?e.steps.map((function(e){return Math.max(0,Number(e)||0)})):void 0!==e.steps?Math.max(0,Number(e.steps)||0):void 0,n=!0===e.loop;if(Array.isArray(t)){if(t.length<2)return;return{initialValue:t[0],targetValue:t[1],valueList:b(t),steps:r,loop:n}}return{initialValue:t,targetValue:t,valueList:void 0,steps:0,loop:n}}},{key:"restartChildTransition",value:function(e,t){return!(null==t||!t.hasLoop||(this.resetTargetStep(e),this.resetTargetInitialValue(e),this.setTargetStatus(e,"updating"),this.handleSpecialTargetStep(e),0))}},{key:"shouldCalculateChildren",value:function(){return this.gpuChildrenEnabled?this.completeLayoutEpoch!==this.layoutEpoch||this.hasChildrenLayoutStateChanged()?I(t,"shouldCalculateChildren",this,3)([]):(this.currentStatus=void 0,this.requestParticleRender(),!1):I(t,"shouldCalculateChildren",this,3)([])}},{key:"getChildrenLayoutState",value:function(){return[this.getWidth(),this.getHeight(),this.val("gap"),this.getPaddingTop(),this.getPaddingRight(),this.getPaddingBottom(),this.getPaddingLeft(),this.getContainerOverflowMode()]}},{key:"markLayoutComplete",value:function(e){var t=this;if(e===this.layoutEpoch)if(this.completeLayoutEpoch=e,this.completeChildrenLayoutState=this.getChildrenLayoutState(),this.particleRuntime.resolveLayoutFunctions())this.requestParticleRender();else{this.resolveLayoutCompleteWaiters(),this.particleRuntime.startReady();var r=this.activeChildTransitionKey;if(r){var n=s.g.getTargetName(r),i=this.childTransitions[n];i&&(i.values=i.values.map((function(e,r){return k(k({},t.particleValues[r]),e)})),!this.restoringParticleRuntime&&this.hasDom()&&this.particleRenderer.setParticles(this.particleValues).then((function(){return t.particleRenderer.setTargetParticles(i.values,i.steps)})).then((function(){t.childTransitions[n]===i&&t.handleSpecialTargetStep(r)})))}}}},{key:"hasChildrenLayoutStateChanged",value:function(){var e=this.getChildrenLayoutState(),t=this.completeChildrenLayoutState;return!t||e.length!==t.length||e.some((function(e,r){return e!==t[r]}))}},{key:"invalidateChildrenLayout",value:function(){this.layoutEpoch++}},{key:"getParticleCount",value:function(){return this.particleValues.length}},{key:"excludeRuntimeSnapshotField",value:function(e){return l.D.isTransientRuntimeField(e)}},{key:"restoreRuntimeDerivedState",value:function(){var e=this;this.childHandles=this.particleValues.map((function(t,r){return new m(e,r)})),this.particleValuesDirty=!1,this.particleRenderRequested=!1,this.pendingGpuChildren={},this.layoutEpoch=0,this.completeLayoutEpoch=0,this.completeChildrenLayoutState=this.getChildrenLayoutState(),this.layoutCompleteWaiters=[],this.particleSyncPromise=void 0,this.restoringParticleRuntime=!0,this.particleRuntime=new o.f(this),this.particleRuntime.prepareRestore(),this.particleRenderer=new a.e(this)}},{key:"waitForLayoutComplete",value:function(){var e=this;return this.completeLayoutEpoch===this.layoutEpoch?Promise.resolve():new Promise((function(t){e.layoutCompleteWaiters.push(t)}))}},{key:"resolveLayoutCompleteWaiters",value:function(){var e,t=T(this.layoutCompleteWaiters.splice(0));try{for(t.s();!(e=t.n()).done;)(0,e.value)()}catch(e){t.e(e)}finally{t.f()}}}],i&&L(r.prototype,i),d&&L(r,d),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i,d,h,f,v}(n.c);i.E.register((function(e){if(!e)return!1;for(var t=0,r=Object.entries(e);t<r.length;t++){var n=x(r[t],2),i=n[0],a=n[1];if(l.D.isGpuChildrenTarget(i)&&(a&&"object"===E(a))){if("gpu"===a.renderer)return!0;if("dom"!==a.renderer&&c.d.isDefined(a.instances))return!0}}return!1}),(function(e,t,r){return new F(e,t,r,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{})}))},138:function(e,t,r){r.d(t,{D:function(){return y}});var n=r(585),i=r(690),a=r(333),o=r(34);function l(e){return l="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},l(e)}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function p(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}var y=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,l=[{key:"isGpuChildrenTarget",value:function(t){return e.gpuChildrenTargets.has(a.g.getTargetName(t))}},{key:"getGpuRenderTargetName",value:function(t){var r=a.g.getTargetName(t);return e.gpuRenderAliases[r]||r}},{key:"isGpuRenderTarget",value:function(t){return e.gpuRenderTargets.has(e.getGpuRenderTargetName(t))}},{key:"isIgnoredGpuStyleTarget",value:function(t){var r=a.g.getTargetName(t);return n.u.styleSet.has(r)&&!e.isGpuRenderTarget(r)}},{key:"affectsChildLayout",value:function(t){return e.childLayoutTargets.has(e.getGpuRenderTargetName(t))}},{key:"getGpuTargetMode",value:function(e){return e.endsWith("$$")?"deferred":e.endsWith("$")?"reactive":"immediate"}},{key:"classifyGpuChildTarget",value:function(t,r){return i.D.isIntervalTarget(r)?"interval":e.isGpuRenderTarget(t)?"render":e.isIgnoredGpuStyleTarget(t)?"ignoredStyle":"runtime"}},{key:"isTransientRuntimeField",value:function(t){return e.transientRuntimeFields.has(t)}},{key:"isFunctionBasedGpuValue",value:function(e){return"function"==typeof e||i.D.isTargetSpecObject(e)&&"function"==typeof e.value}},{key:"resolveGpuRenderValue",value:function(e,t){if("function"==typeof e)return e.call(t);if(!i.D.isTargetSpecObject(e))return e;var r=f({},e);return"function"==typeof r.value&&(r.value=r.value.call(t)),r}},{key:"getGpuInitialRenderValue",value:function(e){return i.D.isTargetSpecObject(e)?Array.isArray(e.value)?e.value[0]:e.value:e}},{key:"setGpuInitialChildValue",value:function(e,t,r){e&&o.d.isDefined(r)&&e.val(t,r)}},{key:"createGpuRuntimeTarget",value:function(t,r){return{key:t,targetName:e.getGpuRenderTargetName(t),kind:e.classifyGpuChildTarget(t,r),mode:e.getGpuTargetMode(t),target:i.D.isTargetSpecObject(r)?f({},r):{value:r}}}},{key:"requiresGpuChildRuntime",value:function(t,r){var n=e.getGpuTargetMode(t),a=e.classifyGpuChildTarget(t,r);return"interval"===a||"runtime"===a||"immediate"!==n||!!e.isGpuRenderTarget(t)&&"function"!=typeof r&&!!i.D.isTargetSpecObject(r)&&("function"==typeof r.value||o.d.isDefined(r.interval)||o.d.isDefined(r.easing)||o.d.isDefined(r.cycles)||o.d.isDefined(r.loop))}},{key:"compileGpuChildDefinition",value:function(t,r){var n,i={},a=[],o=[],l=[],c=Object.entries(r).map((function(t){var r=s(t,2),n=r[0],i=r[1];return{key:n,value:i,kind:e.classifyGpuChildTarget(n,i),mode:e.getGpuTargetMode(n),targetName:e.getGpuRenderTargetName(n),requiresRuntime:e.requiresGpuChildRuntime(n,i)}})),d=u(c);try{for(d.s();!(n=d.n()).done;){var h=n.value;if("render"===h.kind&&"immediate"===h.mode&&!h.requiresRuntime&&!e.isFunctionBasedGpuValue(h.value)){var f=e.resolveGpuRenderValue(h.value,t);i[h.targetName]=f,e.setGpuInitialChildValue(t,h.targetName,e.getGpuInitialRenderValue(f))}}}catch(e){d.e(e)}finally{d.f()}var v,p=u(c);try{for(p.s();!(v=p.n()).done;){var g=v.value;if("render"===g.kind&&"immediate"===g.mode&&!g.requiresRuntime&&e.isFunctionBasedGpuValue(g.value)){var y=e.resolveGpuRenderValue(g.value,t);i[g.targetName]=y,e.setGpuInitialChildValue(t,g.targetName,e.getGpuInitialRenderValue(y)),e.affectsChildLayout(g.targetName)&&l.push({key:g.key,targetName:g.targetName,value:g.value})}}}catch(e){p.e(e)}finally{p.f()}var m,b=u(c);try{for(b.s();!(m=b.n()).done;){var T=m.value;if("ignoredStyle"!==T.kind){if(T.requiresRuntime&&(a.push(e.createGpuRuntimeTarget(T.key,T.value)),"render"===T.kind&&"immediate"===T.mode)){var w=e.resolveGpuRenderValue(T.value,t),k=e.getGpuInitialRenderValue(w);i[T.targetName]=k,e.setGpuInitialChildValue(t,T.targetName,k)}}else o.push(T.key)}}catch(e){b.e(e)}finally{b.f()}return{renderDefinition:i,runtimeTargets:a,ignoredStyles:o,layoutFunctions:l}}}],(r=null)&&v(t.prototype,r),l&&v(t,l),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,l}();p(y,"gpuRenderTargets",new Set(["x","y","width","height","borderRadius","backgroundColor","rotate"])),p(y,"gpuRenderAliases",{background:"backgroundColor"}),p(y,"childLayoutTargets",new Set(["x","y","width","height"])),p(y,"gpuChildrenTargets",new Set(["addChildren","children"])),p(y,"transientRuntimeFields",new Set(["particleRenderer","childHandles","particleValuesDirty","particleRenderRequested","pendingGpuChildren","layoutEpoch","completeLayoutEpoch","completeChildrenLayoutState","layoutCompleteWaiters","particleSyncPromise","restoringParticleRuntime"]))},161:function(e,t,r){r.d(t,{O:function(){return h}});var n=r(34),i=r(855);function a(e){return a="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},a(e)}function o(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)||u(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 l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function d(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,a=[{key:"scheduleExecution",value:function(e,t){var r=e.getTargetInterval(t),i=n.d.now();if(r<=0)return 0;if(e.isTargetImperative(t)&&0===e.getTargetStep(t))return e.setScheduleTimeStamp(t,i),0;var a=e.getScheduleRemainingTime(t);if(n.d.isDefined(a))return e.setScheduleTimeStamp(t,i-Math.max(r-a,0)),e.resetScheduleRemainingTime(t),a;var o=e.getScheduleTimeStamp(t);if(n.d.isDefined(o)){var l=i-o;return Math.max(r-l,0)}return e.setScheduleTimeStamp(t,i),r}},{key:"getSchedulingKeys",value:function(e){for(var t=[],r=0,i=Object.entries(e.targetValues);r<i.length;r++){var a=l(i[r],2),o=a[0],u=a[1];(n.d.isDefined(u.scheduleTimeStamp)||n.d.isDefined(u.scheduleRemainingTime))&&t.push(o)}return t}},{key:"pauseResumeSchedule",value:function(t){var r,a;if("BI"!==t.type){var l=e.getSchedulingKeys(t);if(l.length||t.animatingMap){var s=new Set(null!==(r=null===(a=t.animatingMap)||void 0===a?void 0:a.keys())&&void 0!==r?r:[]),c=new Set([].concat(o(l),o(s)));if(c.size){var d,h=new Set,f=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}(c);try{for(f.s();!(d=f.n()).done;){var v=d.value;if(e.shouldPauseTarget(t,v)){var p;n.d.isDefined(t.getScheduleTimeStamp(v))&&e.pauseSchedule(t,v),null!==(p=t.animatingMap)&&void 0!==p&&p.has(v)&&h.add(v)}else{var g=t.getScheduleRemainingTime(v);if(n.d.isDefined(g))e.resumeSchedule(t,v),t.addTargetToStatusList(v),(0,i.fB)().scheduleOnlyIfEarlier(g,"resume1-".concat(t.oid,"-").concat(v));else if(n.d.isDefined(t.getScheduleTimeStamp(v))){var y=e.scheduleExecution(t,v);t.addTargetToStatusList(v),(0,i.fB)().scheduleOnlyIfEarlier(y,"resume2-".concat(t.oid,"-").concat(v))}}}}catch(e){f.e(e)}finally{f.f()}h.size&&(0,i.s)().pauseAnimations(t,h)}}}}},{key:"pauseSchedule",value:function(e,t){var r=e.getTargetInterval(t),i=e.getScheduleTimeStamp(t);if(!(r<=0)&&n.d.isDefined(i)){var a=n.d.now()-i,o=Math.max(r-a,0);e.setScheduleRemainingTime(t,o),e.resetScheduleTimeStamp(t)}}},{key:"resumeSchedule",value:function(e,t){var r=e.getScheduleRemainingTime(t);if(n.d.isDefined(r)){var i=n.d.now(),a=e.getTargetInterval(t);e.setScheduleTimeStamp(t,i-Math.max(a-r,0)),e.resetScheduleRemainingTime(t)}}},{key:"shouldPauseTarget",value:function(e,t){if(!e.isExecuted(t))return!1;var r=e.isTargetImperative(t)?e.targetValues[t]:e.targets[t],n=null==r?void 0:r.pauseOn;return!(void 0===n||!1===n||!0!==n&&("function"==typeof n?!n.call(e,t):"hidden"===n?e.isVisible():"noDom"!==n||e.hasDom()))}}],(r=null)&&c(t.prototype,r),a&&c(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,a}()},756:function(e,t,r){r.d(t,{X:function(){return d}});var n=r(34),i=r(855);function a(e){return a="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},a(e)}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function s(e,t,r){return(t=c(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,a=[{key:"clear",value:function(){e.foundParentWithType={},e.foundParentWithTarget={},e.foundTypeMap={},e.foundTargetMap={},e.foundOids={},e.foundHandler={}}},{key:"findFirstScrollHandler",value:function(t,r,n){if(t){var i="".concat(t.oid," ").concat(r," ").concat(n);if(e.foundHandler[i])return e.foundHandler[i];var a=this.findScrollHandler(t,n,r);return a&&(e.foundHandler[i]=a),a}}},{key:"findFirstHandler",value:function(t,r){if(t){var n="".concat(t.oid," ").concat(r);if(e.foundHandler[n])return e.foundHandler[n];var i=this.findEventHandler(t,r);return i&&(e.foundHandler[n]=i),i}}},{key:"findFirstScrollTopHandler",value:function(e,t){return this.findFirstScrollHandler(e,"onScrollTop",t)}},{key:"findFirstScrollLeftHandler",value:function(e,t){return this.findFirstScrollHandler(e,"onScrollLeft",t)}},{key:"findFirstPinchHandler",value:function(e){return this.findFirstHandler(e,"onPinch")}},{key:"findFirstSwipeHandler",value:function(e){return this.findFirstHandler(e,"onSwipe")}},{key:"findFirstEnterHandler",value:function(e){return this.findFirstHandler(e,"onEnter")}},{key:"findFirstLeaveHandler",value:function(e){return this.findFirstHandler(e,"onLeave")}},{key:"findFirstStartHandler",value:function(e){return this.findFirstHandler(e,"onStart")}},{key:"findFirstEndHandler",value:function(e){return this.findFirstHandler(e,"onEnd")}},{key:"findFirstClickHandler",value:function(e){return this.findFirstHandler(e,"onClick")||this.findFirstHandler(e,"onAnyClick")}},{key:"findScrollHandler",value:function(e,t,r){for(;e&&(!e.canHandleEvent("onSwipe")||"wheel"===t);){if(e.canHandleEvent(r)||e.canHandleEvent("onScroll"))return e;e=e.getParent()}}},{key:"findEventHandler",value:function(e,t){for(;e;){if(e.canHandleEvent(t))return e;e=e.getParent()}}},{key:"findParentByType",value:function(t,r){var i="".concat(t.oid,"__").concat(r);if(!n.d.isDefined(e.foundParentWithType[i]))for(var a=t.getParent();a;){if(a.type===r){e.foundParentWithType[i]=a;break}a=a.getParent()}return e.foundParentWithType[i]}},{key:"findParentByTarget",value:function(t,r,i){var a="".concat(t.oid,"__").concat(r);if(!n.d.isDefined(e.foundParentWithTarget[a]))for(var o=t.getParent();o;){if(n.d.isDefined(o.targets[r])||n.d.isDefined(o.targetValues[r])){if(!n.d.isDefined(i)){e.foundParentWithTarget[a]=o;break}if(o.getTargetValue(r)===i){e.foundParentWithTarget[a]=o;break}}o=o.getParent()}return e.foundParentWithTarget[a]}},{key:"findByType",value:function(t){if(!n.d.isDefined(e.foundTypeMap[t])){var r=function(e){if(e.type===t)return e;var n,i=o(e.getChildren());try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a&&a.hasChildren()){var l=r(a);if(l)return l}else if(a&&a.type===t)return a}}catch(e){i.e(e)}finally{i.f()}},a=r((0,i.Bt)());a&&(e.foundTypeMap[t]=a)}return e.foundTypeMap[t]}},{key:"findByTarget",value:function(t){if(!n.d.isDefined(e.foundTargetMap[t])){var r=function(e){if(e.targets[t])return e;var n,i=o(e.getChildren());try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a&&a.hasChildren()){var l=r(a);if(l)return l}else if(a&&a.targets[t])return a}}catch(e){i.e(e)}finally{i.f()}},a=r((0,i.Bt)());a&&(e.foundTargetMap[t]=a)}return e.foundTargetMap[t]}},{key:"find",value:function(t){if(!n.d.isDefined(e.foundOids[t])){var r=function(e){if(e.oid===t)return e;var n,i=o(e.getChildren());try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a&&a.hasChildren()){var l=r(a);if(l)return l}else if(a&&a.oid===t)return a}}catch(e){i.e(e)}finally{i.f()}},a=r((0,i.Bt)());a&&(e.foundOids[t]=a)}return e.foundOids[t]}}],(r=null)&&u(t.prototype,r),a&&u(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,a}();s(d,"foundParentWithType",{}),s(d,"foundParentWithTarget",{}),s(d,"foundTypeMap",{}),s(d,"foundTargetMap",{}),s(d,"foundOids",{}),s(d,"foundHandler",{})},791:function(e,t,r){r.d(t,{s:function(){return m}});var n=r(34),i=r(611);function a(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)||u(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 o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e){return c="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},c(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function h(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}var f="__targetjsTModelRef",v=new Set(["_state","targets","targetDefinitions","restoringRuntime","restoredUsesExistingDom","type","oid","oidNum","originalId","parent","allChildrenList","allChildrenMap","$dom","viewport","visibilityStatus","currentStatus","dirtyLayout","originWindowEpoch","hasDomNow","isNowVisible","domHeightTimestamp","domWidthTimestamp","lastBatch","waapiBatch","finalKeyframe","finalRawFrame"]),p=["addedChildren","deletedChildren","movedChildren"],g=new Set(["lastUpdate","scheduleTimeStamp","completeTime","creationTime","activationTime","catchupAt","startTime","lastResizeHandledTime"]),y=["originalTargetName","originalTModel","invokerTargetName","invokerTModel","fetchAction","childAction","addChildAction"],m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,u=[{key:"rebaseRuntimeTimes",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakSet;if(t&&"object"===c(t)&&0!==r&&!e.isTModel(t)&&!n.has(t))if(n.add(t),t instanceof Map){var i,a=l(t.values());try{for(a.s();!(i=a.n()).done;){var o=i.value;e.rebaseRuntimeTimes(o,r,n)}}catch(e){a.e(e)}finally{a.f()}}else if(t instanceof Set){var u,s=l(t);try{for(s.s();!(u=s.n()).done;){var d=u.value;e.rebaseRuntimeTimes(d,r,n)}}catch(e){s.e(e)}finally{s.f()}}else for(var h=0,f=Object.keys(t);h<f.length;h++){var v=f[h],p=t[v];g.has(v)&&Number.isFinite(p)&&p>0?t[v]=p+r:e.rebaseRuntimeTimes(p,r,n)}}},{key:"isPlainObject",value:function(e){if(!e||"object"!==c(e))return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}},{key:"cloneUnboundTargets",value:function(t){for(var r=n.d.cloneTargetDefinition(t),i=0,a=Object.values(r);i<a.length;i++){var o=a[i];if(e.isPlainObject(o))for(var l=0,u=Object.keys(o);l<u.length;l++){var s=u[l],c=o[s];"function"==typeof c&&c.__isBoundTargetMethod&&(o[s]=c.__targetjsSource||c)}}return r}},{key:"isTModel",value:function(e){return Boolean(e&&"object"===c(e)&&"string"==typeof e.oid&&e.targets&&"function"==typeof e.state&&"function"==typeof e.getChildren)}},{key:"isTModelReference",value:function(t){return Boolean(e.isPlainObject(t)&&Object.prototype.hasOwnProperty.call(t,f))}},{key:"createTModelReference",value:function(e){return t={},r=f,n=e.oid,(r=h(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t;var t,r,n}},{key:"encodeValue",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakMap;if(null==t||"object"!==c(t))return t;if(e.isTModel(t))return e.createTModelReference(t);if(r.has(t))return r.get(t);if(t instanceof Date)return new Date(t.getTime());if(t instanceof Map){var n=new Map;r.set(t,n);var i,a=l(t);try{for(a.s();!(i=a.n()).done;){var u=o(i.value,2),s=u[0],d=u[1];n.set(e.encodeValue(s,r),e.encodeValue(d,r))}}catch(e){a.e(e)}finally{a.f()}return n}if(t instanceof Set){var h=new Set;r.set(t,h);var f,v=l(t);try{for(v.s();!(f=v.n()).done;){var p=f.value;h.add(e.encodeValue(p,r))}}catch(e){v.e(e)}finally{v.f()}return h}if(Array.isArray(t)){var g=[];r.set(t,g);var y,m=l(t);try{for(m.s();!(y=m.n()).done;){var b=y.value;g.push(e.encodeValue(b,r))}}catch(e){m.e(e)}finally{m.f()}return g}if(!e.isPlainObject(t))return t;var T={};r.set(t,T);for(var w=0,k=Object.entries(t);w<k.length;w++){var S=o(k[w],2),x=S[0],M=S[1];T[x]=e.encodeValue(M,r)}return T}},{key:"decodeValue",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakMap;if(null==t||"object"!==c(t))return t;if(e.isTModelReference(t))return r[t[f]];if(n.has(t))return n.get(t);if(t instanceof Date)return new Date(t.getTime());if(t instanceof Map){var i=new Map;n.set(t,i);var a,u=l(t);try{for(u.s();!(a=u.n()).done;){var s=o(a.value,2),d=s[0],h=s[1];i.set(e.decodeValue(d,r,n),e.decodeValue(h,r,n))}}catch(e){u.e(e)}finally{u.f()}return i}if(t instanceof Set){var v=new Set;n.set(t,v);var p,g=l(t);try{for(g.s();!(p=g.n()).done;){var y=p.value;v.add(e.decodeValue(y,r,n))}}catch(e){g.e(e)}finally{g.f()}return v}if(Array.isArray(t)){var m=[];n.set(t,m);var b,T=l(t);try{for(T.s();!(b=T.n()).done;){var w=b.value;m.push(e.decodeValue(w,r,n))}}catch(e){T.e(e)}finally{T.f()}return m}if(!e.isPlainObject(t))return t;var k={};n.set(t,k);for(var S=0,x=Object.entries(t);S<x.length;S++){var M=o(x[S],2),C=M[0],E=M[1];k[C]=e.decodeValue(E,r,n)}return k}},{key:"resolveTModelReferencesInPlace",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakSet;if(null==t||"object"!==c(t))return t;if(e.isTModelReference(t))return r[t[f]];if(n.has(t))return t;if(n.add(t),t instanceof Date)return t;if(t instanceof Map){var i=a(t.entries());t.clear();var u,s=l(i);try{for(s.s();!(u=s.n()).done;){var d=o(u.value,2),h=d[0],v=d[1];t.set(e.resolveTModelReferencesInPlace(h,r,n),e.resolveTModelReferencesInPlace(v,r,n))}}catch(e){s.e(e)}finally{s.f()}return t}if(t instanceof Set){var p=a(t);t.clear();var g,y=l(p);try{for(y.s();!(g=y.n()).done;){var m=g.value;t.add(e.resolveTModelReferencesInPlace(m,r,n))}}catch(e){y.e(e)}finally{y.f()}return t}if(Array.isArray(t)){for(var b=0;b<t.length;b++)t[b]=e.resolveTModelReferencesInPlace(t[b],r,n);return t}if(!e.isPlainObject(t))return t;for(var T=0,w=Object.keys(t);T<w.length;T++){var k=w[T];t[k]=e.resolveTModelReferencesInPlace(t[k],r,n)}return t}},{key:"clearMaterializedChildOperations",value:function(e){if(e){for(var t=0,r=p;t<r.length;t++){var n=r[t];Array.isArray(e[n])?e[n].length=0:e[n]=[]}e.lastChildrenUpdate?(e.lastChildrenUpdate.additions=[],e.lastChildrenUpdate.deletions=[]):e.lastChildrenUpdate={additions:[],deletions:[]}}}},{key:"exportRuntimeState",value:function(t){for(var r={},n=0,i=Object.keys(t);n<i.length;n++){var a,o=i[n];v.has(o)||null!==(a=t.excludeRuntimeSnapshotField)&&void 0!==a&&a.call(t,o)||(r[o]=t[o])}var l=e.encodeValue({state:t.state(),fields:r});return e.clearMaterializedChildOperations(l.state),l}},{key:"importRuntimeState",value:function(t,r,n){var i,a=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).timeOffset,l=void 0===a?0:a,u=e.decodeValue(r,n);e.rebaseRuntimeTimes(u,l),t._state=u.state||{};for(var s=0,c=Object.entries(u.fields||{});s<c.length;s++){var d=o(c[s],2),h=d[0],f=d[1];v.has(h)||(t[h]=f)}return e.clearMaterializedChildOperations(t._state),t.childrenUpdateFlag=!1,t.$dom=null,t.viewport=void 0,t.hasDomNow=!1,t.lastBatch=void 0,t.waapiBatch=void 0,t.finalKeyframe=void 0,t.finalRawFrame=void 0,null===(i=t.restoreRuntimeDerivedState)||void 0===i||i.call(t),t}},{key:"createRuntimeSnapshot",value:function(t){var r,i,o,l,u,s=a(null!==(r=t.allChildrenList)&&void 0!==r?r:[]),c=n.d.cloneTargetDefinition(t.targetDefinitions);return{oid:t.oid,oidNum:null!==(i=t.oidNum)&&void 0!==i?i:0,originalId:t.originalId,type:t.type,usesExistingDom:!0===(null===(o=t.targets)||void 0===o?void 0:o.domIsland)||!0===(null===(l=t.targets)||void 0===l?void 0:l.reuseDomDefinition)||(null===(u=t.originalTargetNames)||void 0===u?void 0:u.includes("$dom")),targets:e.encodeValue(c),targetRuntime:e.exportTargetRuntime(t),runtime:e.exportRuntimeState(t),children:s.map((function(t){return e.createRuntimeSnapshot(t)}))}}},{key:"createWithIdentity",value:function(t,r){var n;if("function"!=typeof r)throw new TypeError("A TModel constructor is required.");var a=e.encodeValue(t.targets),o={restoringRuntime:!0,usesExistingDom:!0===t.usesExistingDom},l=i.E.create(t.type,a,(function(e,t,n,i){return new r(e,t,n,i)}),t.oid,o);return l.type=t.type,l.oid=t.oid,l.oidNum=null!==(n=t.oidNum)&&void 0!==n?n:0,void 0!==t.originalId?l.originalId=t.originalId:delete l.originalId,l.parent=void 0,l.allChildrenList=[],l.allChildrenMap={},l}},{key:"attachRestoredChild",value:function(e,t){return t.parent=e,e.allChildrenList.push(t),e.allChildrenMap[t.oid]=t,t}},{key:"fromRuntimeSnapshot",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)throw new TypeError("A runtime snapshot is required.");for(var i={},a=[],o=[],u=function(t,n){var s=e.createWithIdentity(t,r);i[s.oid]=s,a.push(s),n&&e.attachRestoredChild(n,s),o.push({tmodel:s,runtime:t.runtime,targetRuntime:t.targetRuntime});var c,d=l(t.children||[]);try{for(d.s();!(c=d.n()).done;){var h=c.value;u(h,s)}}catch(e){d.e(e)}finally{d.f()}return s},s=u(t,void 0),c=0,d=a;c<d.length;c++){var h=d[c];e.resolveTModelReferencesInPlace(h.targets,i)}for(var f=0,v=o;f<v.length;f++){var p=v[f],g=p.tmodel,y=p.targetRuntime;e.applyTargetRuntime(g,y,i)}for(var m=0,b=o;m<b.length;m++){var T=b[m],w=T.tmodel,k=T.runtime;e.importRuntimeState(w,k,i,n)}return{root:s,tmodelIdMap:i,models:a}}},{key:"exportTargetRuntime",value:function(t){for(var r={},n=0,i=Object.entries(t.targets);n<i.length;n++){var a=o(i[n],2),l=a[0],u=a[1];if(e.isPlainObject(u)){for(var s={},c=0,d=y;c<d.length;c++){var h=d[c];Object.prototype.hasOwnProperty.call(u,h)&&(s[h]=u[h])}Object.keys(s).length&&(r[l]=e.encodeValue(s))}}return r}},{key:"applyTargetRuntime",value:function(t,r,n){for(var i=0,a=Object.entries(r||{});i<a.length;i++){var l=o(a[i],2),u=l[0],s=l[1],c=t.targets[u];if(c){var d=e.decodeValue(s,n);Object.assign(c,d)}}}}],(r=null)&&d(t.prototype,r),u&&d(t,u),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,u}()},90:function(e,t,r){r.d(t,{c:function(){return V}});var n=r(855),i=r(484),a=r(34),o=r(690),l=r(333),u=r(585),s=r(768);function c(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(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 d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=f(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return v(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e){return p="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},p(e)}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:t+""}var m=function(){return e=function e(t,r,i){var o,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"object"===p(t)&&void 0===r&&(r=t,t=""),this.restoringRuntime=!0===l.restoringRuntime,this.restoredUsesExistingDom=!0===l.usesExistingDom,this.targetDefinitions=a.d.cloneTargetDefinition(r),this.targets=Object.assign({},r),i=i||this.targets.id,a.d.isDefined(i))n.qw.getOid(i),this.type=i,this.oid=i,this.oidNum=0;else{this.type=this.targets.otype||t||"blank";var u=n.qw.getOid(this.type);this.oid=u.oid,this.oidNum=u.num}null!==(o=r)&&void 0!==o&&o.sourceDom||!a.d.isDefined(i)||(this.originalId=i),this._state={}},t=[{key:"state",value:function(){return this._state}},{key:"targetValues",get:function(){var e,t;return null!==(t=(e=this.state()).targetValues)&&void 0!==t?t:e.targetValues={}},set:function(e){this.state().targetValues=e}},{key:"actualValues",get:function(){var e,t;return null!==(t=(e=this.state()).actualValues)&&void 0!==t?t:e.actualValues={}},set:function(e){this.state().actualValues=e}},{key:"lastActualValues",get:function(){var e,t;return null!==(t=(e=this.state()).lastActualValues)&&void 0!==t?t:e.lastActualValues={}}},{key:"activeTargetList",get:function(){var e,t;return null!==(t=(e=this.state()).activeTargetList)&&void 0!==t?t:e.activeTargetList=[]},set:function(e){this.state().activeTargetList=e}},{key:"activeTargetMap",get:function(){var e,t;return null!==(t=(e=this.state()).activeTargetMap)&&void 0!==t?t:e.activeTargetMap={}},set:function(e){this.state().activeTargetMap=e}},{key:"updatingTargetList",get:function(){var e,t;return null!==(t=(e=this.state()).updatingTargetList)&&void 0!==t?t:e.updatingTargetList=[]},set:function(e){this.state().updatingTargetList=e}},{key:"updatingTargetMap",get:function(){var e,t;return null!==(t=(e=this.state()).updatingTargetMap)&&void 0!==t?t:e.updatingTargetMap={}},set:function(e){this.state().updatingTargetMap=e}},{key:"fetchActionTargetList",get:function(){var e,t;return null!==(t=(e=this.state()).fetchActionTargetList)&&void 0!==t?t:e.fetchActionTargetList=[]}},{key:"activatedTargets",get:function(){var e,t;return null!==(t=(e=this.state()).activatedTargets)&&void 0!==t?t:e.activatedTargets=[]}},{key:"targetMethodMap",get:function(){var e,t;return null!==(t=(e=this.state()).targetMethodMap)&&void 0!==t?t:e.targetMethodMap={}}},{key:"targetExecutionCount",get:function(){var e,t;return null!==(t=(e=this.state()).targetExecutionCount)&&void 0!==t?t:e.targetExecutionCount=0},set:function(e){this.state().targetExecutionCount=e}},{key:"addedChildren",get:function(){var e,t;return null!==(t=(e=this.state()).addedChildren)&&void 0!==t?t:e.addedChildren=[]}},{key:"deletedChildren",get:function(){var e,t;return null!==(t=(e=this.state()).deletedChildren)&&void 0!==t?t:e.deletedChildren=[]}},{key:"movedChildren",get:function(){var e,t;return null!==(t=(e=this.state()).movedChildren)&&void 0!==t?t:e.movedChildren=[]}},{key:"lastChildrenUpdate",get:function(){var e,t;return null!==(t=(e=this.state()).lastChildrenUpdate)&&void 0!==t?t:e.lastChildrenUpdate={additions:[],deletions:[]}}},{key:"visibleChildren",get:function(){var e,t;return null!==(t=(e=this.state()).visibleChildren)&&void 0!==t?t:e.visibleChildren=[]}},{key:"passiveTargetList",get:function(){var e,t;return null!==(t=(e=this.state()).passiveTargetList)&&void 0!==t?t:e.passiveTargetList=[]},set:function(e){this.state().passiveTargetList=e}},{key:"passiveTargetMap",get:function(){var e,t;return null!==(t=(e=this.state()).passiveTargetMap)&&void 0!==t?t:e.passiveTargetMap={}},set:function(e){this.state().passiveTargetMap=e}},{key:"getParent",value:function(){return this.parent}},{key:"initTargets",value:function(){var e=this;if(this.targetsVersion=1,this.originalTargetNames=Object.keys(this.targets).filter((function(e){return!u.u.excludedTargetKeys.has(e)})),this.functionTargetNames=[],this.allTargetMap={},!this.restoringRuntime&&a.d.isDefined(this.originalId)&&(0,n.UR)(this.originalId))return a.d.mergeTargets((0,n.UR)(this.originalId),this),void(this.toDiscard=!0);this.actualValues=u.u.defaultActualValues(),this.targetValues={},this.activeTargetMap={},this.activeTargetList=[],this.originalTargetNames=Object.keys(this.targets).filter((function(e){return!u.u.excludedTargetKeys.has(e)})).map((function(e){return e.startsWith("_")?e.slice(1):e}));var t=this.originalTargetNames.includes("$dom"),r=this.restoringRuntime?this.restoredUsesExistingDom||t:Boolean(s.J.query("#".concat(this.oid))||t);r||this.excludeDefaultStyling()?r&&(this.targets.domIsland=!0,a.d.isDefined(this.targets.reuseDomDefinition)||(this.targets.reuseDomDefinition=!0,this.targets.domHolder=!0,a.d.isDefined(this.targets.excludeXYCalc)||(this.targets.excludeXYCalc=!0),a.d.isDefined(this.targets.x)||(this.targets.excludeX=!0),a.d.isDefined(this.targets.y)||(this.targets.excludeY=!0),a.d.isDefined(this.targets.position)||(this.targets.position="relative"))):(Object.entries(u.u.defaultTargetStyles).forEach((function(t){var r=h(t,2),n=r[0],i=r[1];n in e.targets||(e.targets[n]=i)})),!1===this.targets.canHaveDom||a.d.isDefined(this.targets.domHolder)||(this.targets.domHolder=!0)),Object.keys(this.targets).filter((function(e){return!u.u.excludedTargetKeys.has(e)})).forEach((function(t,r){e.processNewTarget(t,r)}))}},{key:"processNewTarget",value:function(e,t){this.targetsVersion++;var r=l.g.getTargetName(e),n=this.targets[e];if(a.d.isDefined(n)){"passive"!==n.loop&&"function"!=typeof n.loop||this.passiveTargetMap[e]||(this.passiveTargetMap[e]=!0,this.passiveTargetList.push(e));var i=p(n),s=e.startsWith("_")||e.endsWith("$"),c=u.u.mustExecuteTargets[r]||s||"string"!==i&&"number"!==i&&"boolean"!==i,d=!!u.u.allEventMap[r],h=!!u.u.internalEventMap[r];if(("object"!==i||Array.isArray(n))&&c&&(n=l.g.wrapTarget(this,n,e)),a.d.isDefined(t)){var f=t>0?this.originalTargetNames[t-1]:void 0,v=t<this.originalTargetNames.length-1?this.originalTargetNames[t+1]:void 0;(v&&v.endsWith("$")||s||d||h||"object"===i||"function"===i)&&(a.d.isDefined(n.value)||o.D.isChildObjectTarget(e,n)||o.D.isIntervalTarget(n)||(c=!0,n=l.g.wrapTarget(this,n,e)),l.g.bindTarget(this,e,f,v,t))}if(e.startsWith("_")){var g=e.slice(1);this.targets[e]&&(this.targets[g]=this.targets[e]),delete this.targets[e],e=g,n=this.targets[g]}if(d&&(this.externalEventMap||(this.externalEventMap=new Map),this.externalEventMap.set(r,!0),n.active=!1),h&&(this.internalEventMap||(this.internalEventMap=new Map),this.internalEventMap.set(r,!0),n.active=!1),this.allTargetMap[r]=e,s&&(this.targets[e].active=!1),!u.u.bypassInitialProcessingTargetMap[r]){if(a.d.isDefined(n.initialValue)&&this.val(e,n.initialValue),(!1!==n.active||a.d.isDefined(n.initialValue))&&this.addToStyleTargetList(e),o.D.isIntervalTarget(n))n.cycles=2,n.isInterval=!0;else if(!c){var y;return void this.val(r,a.d.isDefined(null===(y=n)||void 0===y?void 0:y.value)?n.value:n)}!1!==n.active&&this.canTargetBeActivated(e)&&this.addToActiveTargets(e),this.functionTargetNames.push(e)}}else this.delVal(e)}},{key:"activate",value:function(e){(0,n.zw)().addToActivatedList(this),this.currentStatus="active",e&&this.isTargetEnabled(e)&&-1===this.activatedTargets.indexOf(e)&&this.activatedTargets.push(e)}},{key:"isActivated",value:function(){return"active"===this.currentStatus}},{key:"deactivate",value:function(){this.currentStatus=void 0}},{key:"excludeDefaultStyling",value:function(){return!1===this.targets.defaultStyling||this.excludeStyling()||this.reuseDomDefinition()&&!this.allStyleTargetMap}},{key:"canTargetBeActivated",value:function(e){var t=this.targets.onDomEvent;return!(t&&(Array.isArray(t)?t.includes(e):t===e)&&!this.hasDom())&&!this.activeTargetMap[e]}},{key:"addToStyleTargetList",value:function(e,t){var r;if(e=l.g.getTargetName(e),t||!this.excludeStyling()&&!this.targets["exclude".concat(a.d.capitalizeFirstLetter(e))]){var n,i=u.u.asyncStyleTargetMap[e],o=u.u.attributeTargetMap[e];if(i||o)null!==(n=this.asyncStyleTargetMap)&&void 0!==n&&n.has(e)||(this.asyncStyleTargetMap||(this.asyncStyleTargetMap=new Map),this.asyncStyleTargetMap.set(e,!0));else if(this.isStyleTarget(e)){var s,c=!0;if(u.u.transformMap[e])this.getParent()&&this.calcAbsolutePosition(this.getX(),this.getY());else if("width"===e||"height"===e){var d=Math.floor("width"===e?this.getWidth():this.getHeight());this.styleMap[e]===d&&(c=!1)}else"dim"===e?this.styleMap[e]===Math.floor(this.val("dim"))&&(c=!1):a.d.isDefined(this.val(e))&&this.styleMap[e]===this.val(e)&&(c=!1);!c||null!==(s=this.styleTargetMap)&&void 0!==s&&s.has(e)||(this.styleTargetMap||(this.styleTargetMap=new Map),this.styleTargetMap.set(e,!0))}!u.u.styleSet.has(e)||null!==(r=this.allStyleTargetMap)&&void 0!==r&&r.has(e)||(this.allStyleTargetMap||(this.allStyleTargetMap=new Map),this.allStyleTargetMap.set(e,!0))}}},{key:"isStyleTarget",value:function(e){return u.u.styleTargetMap[e]}},{key:"removeTarget",value:function(e){delete this.targetDefinitions[e],delete this.targets[e],this.removeFromActiveTargets(e),this.removeFromUpdatingTargets(e),delete this.targetValues[e]}},{key:"addTarget",value:function(e,t){var r,n,i;this.addTargets((r={},i=t,(n=y(n=e))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r))}},{key:"addTargets",value:function(e){for(var t,r=this,i=a.d.cloneTargetDefinition(e),o=0,l=Object.keys(i);o<l.length;o++){var u=l[o];this.targetDefinitions[u]=i[u]}Object.keys(e).forEach((function(t){r.targets[t]=e[t],r.removeFromUpdatingTargets(t),r.originalTargetNames.includes(t)||r.originalTargetNames.push(t);var n=r.originalTargetNames.indexOf(t);r.processNewTarget(t,n)})),this.hasDom()&&(0,n.kQ)().attachEvents([this]),null===(t=(0,n.fB)())||void 0===t||t.schedule(1,"addTargets-".concat(this.oid))}},{key:"getTargetStepPercent",value:function(e,t,r){return t=a.d.isDefined(t)?t:this.getTargetStep(e),r?t/r:1}},{key:"resetTargetStep",value:function(e){return this.targetValues[e]&&(this.targetValues[e].step=0),this}},{key:"resetTargetExecutionFlag",value:function(e){return this.targetValues[e]&&(this.targetValues[e].executionFlag=!1),this}},{key:"resetTargetCycle",value:function(e){return this.targetValues[e]&&(this.targetValues[e].cycle=0),this}},{key:"resetTargetInitialValue",value:function(e){return this.targetValues[e]&&(this.targetValues[e].initialValue=void 0),this}},{key:"addTargetToStatusList",value:function(e){var t=this.targetValues[e];if(t){var r;if("fetching"===t.status)return this.removeFromActiveTargets(e),this.removeFromUpdatingTargets(e),void(null===(r=this.getParent())||void 0===r||r.addToActiveChildren(this));if(this.isTargetUpdating(e))return this.addToUpdatingTargets(e),void this.removeFromActiveTargets(e);if(this.isTargetActive(e))return this.addToActiveTargets(e),void this.removeFromUpdatingTargets(e);this.removeFromActiveTargets(e),this.removeFromUpdatingTargets(e)}}},{key:"setTargetStatus",value:function(e,t){var r=this.targetValues[e];if(r){var n=r.status;"done"!==t||"done"===n||"complete"===n||r.resetFlag||(r.completeCount++,r.completeTime=a.d.now()),r.resetFlag=!1,r.status=t,this.addTargetToStatusList(e)}}},{key:"getTargetStatus",value:function(e){var t,r;return null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.status)&&void 0!==t?t:""}},{key:"isTargetActive",value:function(e){var t;return"active"===(null===(t=this.targetValues[e])||void 0===t?void 0:t.status)}},{key:"isTargetUpdating",value:function(e){var t;return"updating"===(null===(t=this.targetValues[e])||void 0===t?void 0:t.status)}},{key:"isTargetDone",value:function(e){var t;return"done"===(null===(t=this.targetValues[e])||void 0===t?void 0:t.status)}},{key:"isTargetComplete",value:function(e){var t;return"complete"===(null===(t=this.targetValues[e])||void 0===t?void 0:t.status)||void 0===this.targetValues[e]&&void 0}},{key:"isTargetTreeComplete",value:function(e,t){return!0===l.g.isTargetTreeComplete(this,e,t)}},{key:"isTargetVisibleTreeComplete",value:function(e){return this.isTargetTreeComplete(e,"visible")}},{key:"isTargetFullyCompleted",value:function(e){return!0===l.g.isTargetFullyCompleted(this,e)}},{key:"arePreviousTargetsComplete",value:function(e){return!0===l.g.arePreviousTargetsComplete(this,e)}},{key:"cleanupTarget",value:function(e){l.g.cleanupTarget(this,e)}},{key:"isComplete",value:function(){return l.g.isTModelComplete(this)}},{key:"isExecuted",value:function(e){return this.targetValues[e]&&this.targetValues[e].executionFlag}},{key:"neverExecuted",value:function(e){return!this.targetValues[e]}},{key:"isTargetImperative",value:function(e){return!!this.targetValues[e]&&this.targetValues[e].isImperative}},{key:"getTargetExecutionCount",value:function(e){return this.targetValues[e]?this.targetValues[e].executionCount:0}},{key:"setTargetComplete",value:function(e){this.targetValues[e]&&(this.targetValues[e].status="complete")}},{key:"isTargetEnabled",value:function(e){var t=this.targets[e];return!!a.d.isDefined(t)&&("function"!=typeof t.enabledOn||(this.setTargetMethodName(e,"enabledOn"),t.enabledOn.call(this)))}},{key:"doesTargetEqualActual",value:function(e){if(this.targetValues[e]){var t=!!this.targets[e]&&this.targets[e].deepEquality;return t?a.d.areEqual(this.getTargetValue(e),this.val(e),t):this.getTargetValue(e)===this.val(e)}return!1}},{key:"getTargetValue",value:function(e){var t,r=this.targetValues[e]||this.targets[e];if(r){var n=null!==(t=r.value)&&void 0!==t?t:r;return"function"==typeof n?n.call(this):n}}},{key:"getTargetStep",value:function(e){return this.targetValues[e]?this.targetValues[e].step:0}},{key:"getScheduleTimeStamp",value:function(e){var t;return null===(t=this.targetValues[e])||void 0===t?void 0:t.scheduleTimeStamp}},{key:"isScheduledPending",value:function(e){var t=this.getScheduleRemainingTime(e);if(a.d.isDefined(t))return t>0;var r=this.getScheduleTimeStamp(e),n=this.getTargetInterval(e);return a.d.isDefined(r)&&r+n>a.d.now()}},{key:"getScheduleRemainingTime",value:function(e){var t;return null===(t=this.targetValues[e])||void 0===t?void 0:t.scheduleRemainingTime}},{key:"setScheduleRemainingTime",value:function(e,t){var r=this.targetValues[e];r&&(r.scheduleRemainingTime=t)}},{key:"resetScheduleRemainingTime",value:function(e){var t=this.targetValues[e];t&&(t.scheduleRemainingTime=void 0)}},{key:"setScheduleTimeStamp",value:function(e,t){var r=this.targetValues[e];r&&(r.scheduleTimeStamp=t)}},{key:"resetScheduleTimeStamp",value:function(e){var t=this.targetValues[e];t&&(t.scheduleTimeStamp=void 0)}},{key:"isTargetInLoop",value:function(e){var t=this.targets[e];return!!t&&!0===("function"==typeof t.loop?t.loop.call(this,e):t.loop)}},{key:"isTargetPassiveLoop",value:function(e){var t=this.targets[e];return!!t&&"passive"===("function"==typeof t.loop?t.loop.call(this,e):t.loop)}},{key:"shouldScheduleRun",value:function(e){var t=this.targets[e];if(!t)return!1;if(void 0!==t.triggerRerun)return!!t.triggerRerun;if("passive"===("function"==typeof t.loop?t.loop.call(this,e):t.loop)){var r,n=o.D.getValueStepsCycles(this,e)[0],i=this.getTargetValue(e);return!a.d.areEqual(n,i,null!==(r=t.deepEquality)&&void 0!==r&&r)}return!0}},{key:"activateChangedPassiveTargets",value:function(){var e;if(null===(e=this.passiveTargetList)||void 0===e||!e.length)return!1;var t,r=!1,n=d(this.passiveTargetList);try{for(n.s();!(t=n.n()).done;){var i,a=t.value;this.isTargetPassiveLoop(a)&&(this.isTargetUpdating(a)||null!==(i=this.animatingMap)&&void 0!==i&&i.has(a)||this.shouldScheduleRun(a)&&(this.addToActiveTargets(a),r=!0))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"getTargetInitialValue",value:function(e){var t;return null===(t=this.targetValues[e])||void 0===t?void 0:t.initialValue}},{key:"getLastUpdate",value:function(e){var t;return null===(t=this.targetValues[e])||void 0===t?void 0:t.lastUpdate}},{key:"getDimLastUpdate",value:function(){var e,t,r,n,i;return Math.max(null!==(e=this.getLastUpdate("width"))&&void 0!==e?e:0,null!==(t=this.getLastUpdate("height"))&&void 0!==t?t:0,null!==(r=this.getLastUpdate("dim"))&&void 0!==r?r:0,null!==(n=this.domHeightTimestamp)&&void 0!==n?n:0,null!==(i=this.domWidthTimestamp)&&void 0!==i?i:0)}},{key:"getTargetActivationTime",value:function(e){var t,r;return null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.activationTime)&&void 0!==t?t:0}},{key:"getTargetCreationTime",value:function(e){return this.targetValues[e]?this.targetValues[e].creationTime:void 0}},{key:"incrementTargetStep",value:function(e,t,r,n,i){var a=this.targetValues[e];if(a){var o=n||8,l=t-r,u=Math.max(1,Math.floor(l/o));return a.step=Math.min(i,a.step+u),a.step}}},{key:"getTargetEasing",value:function(e){var t,r=null===(t=this.targetValues[e])||void 0===t?void 0:t.easing,n=this.targets[e];return n&&"function"==typeof n.easing?n.easing.call(this,this.getTargetCycle(e)):r}},{key:"getTargetInterval",value:function(e){var t,r,n=null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.interval)&&void 0!==t?t:0,i=this.targets[e];return i&&"function"==typeof i.interval?i.interval.call(this,this.getTargetCycle(e)):n}},{key:"getTargetSteps",value:function(e){var t,r,n=null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.steps)&&void 0!==t?t:0,i=this.targets[e];return i&&"function"==typeof i.steps?i.steps.call(this,this.getTargetCycle(e)):n}},{key:"getTargetCycles",value:function(e){var t,r,n=null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.cycles)&&void 0!==t?t:1,i=this.targets[e];return i&&"function"==typeof i.cycles?i.cycles.call(this,this.getTargetCycle(e),n):n}},{key:"getTargetCycle",value:function(e){var t,r;return null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.cycle)&&void 0!==t?t:0}},{key:"getValueListPointer",value:function(e){var t,r;return null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.valuePointer)&&void 0!==t?t:1}},{key:"incrementTargetCycle",value:function(e){this.targetValues[e]&&this.targetValues[e].cycle++}},{key:"incrementValueListPointer",value:function(e){this.targetValues[e]&&this.targetValues[e].valuePointer++}},{key:"setTargetInterval",value:function(e,t){return this.targetValues[e]&&(this.targetValues[e].interval=t),this.targetValues[e].interval}},{key:"setTargetInitialValue",value:function(e,t){this.targetValues[e]&&(this.targetValues[e].initialValue=t)}},{key:"setLastUpdate",value:function(e){this.targetValues[e]&&(this.targetValues[e].lastUpdate=a.d.now(),this.targetValues[e].updateCount++)}},{key:"setTarget",value:function(e,t,r,n,a){if("object"===p(e)&&null!==e){var o=[e,t,r,n,a];t=o[0],r=o[1],n=o[2],a=o[3],e=""}"string"==typeof e&&(e=e.endsWith("+")?e:e+"+");var u=l.g.currentTargetName,s=l.g.currentTModel;return this.getParent()===s&&l.g.markChildAction(s,u,this),this.markLayoutDirty(e),i.j.executeImperativeTarget(this,e,t,r,n,a,u,s),this}},{key:"cancelAnimation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mode,r=void 0===t?"hold":t,i=e.commitStyle,a=void 0===i||i;return(0,n.s)().cancelTModelAnimation(this,{mode:r,commitStyle:a})}},{key:"hasTargetUpdates",value:function(e){var t;return e?!0===this.updatingTargetMap[e]||(null===(t=this.animatingMap)||void 0===t?void 0:t.has(e)):this.updatingTargetList.length>0}},{key:"addToActiveTargets",value:function(e){var t;!this.activeTargetMap[e]&&this.canTargetBeActivated(e)&&(this.markLayoutDirty(e),this.activeTargetMap[e]=!0,this.activeTargetList.push(e),null===(t=this.getParent())||void 0===t||t.addToActiveChildren(this))}},{key:"removeFromActiveTargets",value:function(e){if(this.activeTargetMap[e]){delete this.activeTargetMap[e];var t=this.activeTargetList.indexOf(e);t>=0&&this.activeTargetList.splice(t,1)}var r;0===this.activeTargetList.length&&(null===(r=this.getParent())||void 0===r||r.removeFromActiveChildren(this))}},{key:"addToUpdatingTargets",value:function(e){var t;this.updatingTargetMap[e]||(this.markLayoutDirty(e),this.updatingTargetMap[e]=!0,this.updatingTargetList.push(e),null===(t=this.getParent())||void 0===t||t.addToUpdatingChildren(this))}},{key:"addToNoDomUpdatingTargets",value:function(e){var t,r=this.targetValues[e];if(!r)return!1;var n=this.noDomUpdatingTargets||(this.noDomUpdatingTargets=new Set);return!n.has(e)&&(r.catchupAt=a.d.now(),n.add(e),this.removeFromAnimatingMap(e),this.removeFromUpdatingTargets(e),this.resetScheduleTimeStamp(e),this.resetScheduleRemainingTime(e),null===(t=this.getParent())||void 0===t||t.addToUpdatingChildren(this),!0)}},{key:"removeFromUpdatingTargets",value:function(e){if(this.updatingTargetMap[e]){delete this.updatingTargetMap[e];var t=this.updatingTargetList.indexOf(e);t>=0&&this.updatingTargetList.splice(t,1)}var r;0===this.updatingTargetList.length&&(null===(r=this.getParent())||void 0===r||r.removeFromUpdatingChildren(this))}},{key:"hasUpdatingImperativeTargets",value:function(e){var t,r,n=d([].concat(c(null!==(t=this.updatingTargetList)&&void 0!==t?t:[]),c(this.hasAnimatingTargets()?c(this.animatingMap.keys()):[])));try{for(n.s();!(r=n.n()).done;){var i,a=r.value;if(this.isTargetImperative(a)&&(null===(i=this.targetValues[a])||void 0===i?void 0:i.originalTargetName)===e)return!0}}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"getUpdatingImperativeTargets",value:function(e){var t,r,n=[],i=d([].concat(c(null!==(t=this.updatingTargetList)&&void 0!==t?t:[]),c(this.hasAnimatingTargets()?c(this.animatingMap.keys()):[])));try{for(i.s();!(r=i.n()).done;){var a,o=r.value;this.isTargetImperative(o)&&(null===(a=this.targetValues[o])||void 0===a?void 0:a.originalTargetName)===e&&n.push(o)}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"hasAnyUpdates",value:function(){var e,t,r,n;return 0!==this.updatingTargetList.length||0!==this.activeTargetList.length||0!==(null!==(e=null===(t=this.animatingMap)||void 0===t?void 0:t.size)&&void 0!==e?e:0)||0!==(null!==(r=null===(n=this.noDomUpdatingTargets)||void 0===n?void 0:n.size)&&void 0!==r?r:0)}},{key:"removeFromAnimatingMap",value:function(e){var t,r;null!==(t=this.animatingMap)&&void 0!==t&&t.has(e)&&(this.animatingMap.delete(e),0===this.animatingMap.size&&(null===(r=this.getParent())||void 0===r||r.removeFromAnimatingChildren(this)))}},{key:"clearAnimatingMap",value:function(){var e,t;null===(e=this.animatingMap)||void 0===e||e.clear(),null===(t=this.getParent())||void 0===t||t.removeFromAnimatingChildren(this)}},{key:"addToAnimatingMap",value:function(e){var t,r;null!==(t=this.targetValues[e])&&void 0!==t&&t.snapAnimation||(this.animatingMap||(this.animatingMap=new Map),this.animatingMap.set(e,!0),null===(r=this.getParent())||void 0===r||r.addToAnimatingChildren(this))}},{key:"getAnimatingTargets",value:function(){return this.animatingMap?c(this.animatingMap.keys()):[]}},{key:"isKeyAnimating",value:function(e){if(!this.animatingMap)return!1;var t=l.g.getOriginalNames(this,e).originalTargetName;return this.animatingMap.has(e)&&this.animatingMap.get(e).originalTargetName===t}},{key:"addToUpdatingChildren",value:function(e){this.updatingChildrenMap||(this.updatingChildrenMap=new Map),this.updatingChildrenMap.set(e.oid,e)}},{key:"removeFromUpdatingChildren",value:function(e){var t;null===(t=this.updatingChildrenMap)||void 0===t||t.delete(e.oid)}},{key:"addToAnimatingChildren",value:function(e){this.animatingChildrenMap||(this.animatingChildrenMap=new Map),this.animatingChildrenMap.set(e.oid,e)}},{key:"removeFromAnimatingChildren",value:function(e){var t;null===(t=this.animatingChildrenMap)||void 0===t||t.delete(e.oid)}},{key:"addToActiveChildren",value:function(e){this.activeChildrenMap||(this.activeChildrenMap=new Map),this.activeChildrenMap.set(e.oid,e)}},{key:"removeFromActiveChildren",value:function(e){var t;null===(t=this.activeChildrenMap)||void 0===t||t.delete(e.oid)}},{key:"hasActiveChildren",value:function(){var e;return!(null===(e=this.activeChildrenMap)||void 0===e||!e.size)}},{key:"hasUpdatingChildren",value:function(){var e;return!(null===(e=this.updatingChildrenMap)||void 0===e||!e.size)}},{key:"hasAnimatingChildren",value:function(){var e;return!(null===(e=this.animatingChildrenMap)||void 0===e||!e.size)}},{key:"hasAnimatingTargets",value:function(){var e;return!(null===(e=this.animatingMap)||void 0===e||!e.size)}},{key:"hasValidAnimation",value:function(){return this.hasAnimatingTargets()&&this.lastBatch&&this.lastBatch.totalDuration>0}},{key:"deleteTargetValue",value:function(e){return delete this.targetValues[e],this.addToActiveTargets(e),this.removeFromUpdatingTargets(e),this}},{key:"clearAnimatingChildren",value:function(){var e;null===(e=this.animatingChildrenMap)||void 0===e||e.clear()}},{key:"clearUpdatingChildren",value:function(){var e;null===(e=this.updatingChildrenMap)||void 0===e||e.clear()}},{key:"clearActiveChildren",value:function(){var e;null===(e=this.activeChildrenMap)||void 0===e||e.clear()}},{key:"resetTarget",value:function(e){var t=this.targetValues[e];return t&&(t.isImperative=!1,t.executionFlag=!1,t.scheduleTimeStamp=void 0,t.step=0,t.cycle=0,t.steps=0,t.cycles=1,t.interval=0,t.status=""),this}},{key:"activateTargets",value:function(e){var t=this;Array.isArray(e)&&e.forEach((function(e){return t.activateTarget(e)}))}},{key:"activateTarget",value:function(e,t,r){var n=t,i=r;if(null!=t&&t.reset&&1===Object.keys(t).length&&!r&&(n=void 0,i=t),this.canTargetBeActivated(e)){var o=l.g.getResetOptions(i);o.shouldReset&&l.g.resetTargetState(this,e,o),a.d.isDefined(n)&&this.val("___".concat(e),n),this.isVisible()&&this.markLayoutDirty(e);var u,s,c=l.g.currentTModel,d=l.g.currentTargetName,h=this.targetValues[e]||l.g.emptyValue();this.getParent()===c&&l.g.markChildAction(c,d,this),h.invokerTModel=c,h.invokerTarget=d,this.targetValues[e]?(h.activationTime=a.d.now(),h.lastUpdate=a.d.now(),h.isImperative=!1,h.executionFlag=!1,h.scheduleTimeStamp=void 0,h.step=0,h.cycle=0,h.valuePointer=Array.isArray(h.valueList)?1:0,h.initialValue=void 0):(this.targetValues[e]=h,h.cycles=null!==(u=null===(s=this.targets[e])||void 0===s?void 0:s.cycles)&&void 0!==u?u:h.cycles),this.setTargetStatus(e,"active"),this.activate(e)}return this}},{key:"manageChildTargetExecution",value:function(e){return e.hasChildren()||e.addedChildren.length>0||e.dirtyLayout||0===e.targetExecutionCount}},{key:"setTargetMethodName",value:function(e,t){(!u.u.ignoreTargetMethodNameMap[e]||this.isTargetUpdating(e)||this.isTargetImperative(e))&&(this.targetMethodMap[e]||(this.targetMethodMap[e]=[]),this.targetMethodMap[e].includes(t)||this.targetMethodMap[e].push(t))}}],t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}(),b=r(530),T=r(952),w=r(756),k=r(249),S=r(260),x=r(791),M=r(611);function C(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=D(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function E(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||D(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 D(e,t){if(e){if("string"==typeof e)return P(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(e,t):void 0}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function O(e){return O="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},O(e)}function L(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,A(n.key),n)}}function A(e){var t=function(e,t){if("object"!=O(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==O(t)?t:t+""}function j(e,t,r){return t=I(t),function(e,t){if(t&&("object"==O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,r||[],I(e).constructor):t.apply(e,r))}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}var V=function(e){function t(e,r,n){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=j(this,t,[e,r,n,a])).allChildrenList=[],i.allChildrenMap={},i.childrenUpdateFlag=!1,i.$dom=null,i.x=0,i.y=0,i.absX=0,i.absY=0,i.domHeightTimestamp=0,i.domWidthTimestamp=0,i.contentWidth=0,i.contentHeight=0,i.bottomBaseWidth=0,i.topBaseHeight=0,i.styleMap={},i.tfMap={},i.visibilityStatus=void 0,i.hasDomNow=!1,i.isNowVisible=!1,i.currentStatus="new",i.dirtyLayout=!1,i.originWindowEpoch=-1,i.initTargets(),i.restoringRuntime=!1,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}(t,e),r=t,i=[{key:"createViewport",value:function(){this.viewport=this.viewport||new b.L;var e=this.getScrollTop(),t=-this.getScrollLeft(),r=-e;return this.viewport.xNext=t,this.viewport.xNorth=t,this.viewport.xEast=t,this.viewport.xSouth=t,this.viewport.xWest=t,this.viewport.scrollLeft=t,this.viewport.scrollTop=r,this.viewport.absX=this.absX,this.viewport.absY=this.absY,this.viewport.xOverflowReset=t,this.viewport.xOverflowLimit=t+this.getWidth(),this.viewport.yNext=r,this.viewport.yNorth=r,this.viewport.yWest=r,this.viewport.yEast=r,this.viewport.ySouth=r,this.calcContentWidthHeight(),this.viewport.setContainer(this),this.viewport}},{key:"calcContentWidthHeight",value:function(){this.contentHeight=this.viewport.ySouth-this.viewport.yNorth,this.contentWidth=this.viewport.xEast-this.viewport.xWest,this.topBaseHeight=this.viewport.yEast-this.viewport.yNorth,this.bottomBaseWidth=this.viewport.xSouth-this.viewport.xWest}},{key:"adjustViewport",value:function(){}},{key:"calcAbsolutePosition",value:function(e,t){this.absX=a.d.isDefined(this.val("absX"))?this.val("absX"):this.getParent().absX+e,this.absY=a.d.isDefined(this.val("absY"))?this.val("absY"):this.getParent().absY+t}},{key:"calcAbsolutePositionFromDom",value:function(){k.a.calcAbsolutePositionFromDom(this)}},{key:"removeChild",value:function(e){if(e&&this.allChildrenMap[e.oid])return l.g.resetBeforeDeletion(e),(0,n.EI)().markTModelDeleted(e),this.deletedChildren.push(e),this.removeFromUpdatingChildren(e),this.removeFromActiveChildren(e),this.removeFromAnimatingChildren(e),this.childrenUpdateFlag=!0,this.markLayoutDirty("removeChild"),(0,n.zw)().calcChildren(this),(0,n.fB)().schedule(1,"removeChild-"+e.oid),this}},{key:"moveChild",value:function(e,t){return this.movedChildren.push({index:t,child:e}),e.hasDom()&&e.requiresDomRelocation()&&(e.domOrderIndex=t,e.activate()),this.childrenUpdateFlag=!0,this.markLayoutDirty("moveChild"),(0,n.fB)().schedule(1,"moveChild-"+this.oid+"-"+e.oid),this}},{key:"addChild",value:function(e){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.addedChildren.length+this.allChildrenList.length;if(!e||"object"!==O(e))return this;if(!(e instanceof t)){var o=a.d.cloneTargetDefinition(e),u=Object.keys(this.actualValues).find((function(t){return r.actualValues[t]===e})),s=u?o.id||u:"".concat(this.oid,"_");e=M.E.create(s,o,(function(e,r){return new t(e,r)}))}return this.childrenUpdateFlag=!0,e.toDiscard||(n.qw.tmodelIdMap[e.oid]=e,this.addedChildren.push({index:i,child:e}),e.parent=this,e.markLayoutDirty("addChild"),e.updatingTargetList.length>0&&this.addToUpdatingChildren(e),e.activeTargetList.length>0&&this.addToActiveChildren(e),l.g.markChildAction(this,l.g.currentTargetName,e)),this}},{key:"addSibling",value:function(e){this.getParent().addChild(e)}},{key:"removeSibling",value:function(e){var t=this;e||(e=this.getParent().getChildren().find((function(e){return e!==t}))),this.getParent().removeChild(e)}},{key:"getChildren",value:function(){var e,t,r,n=this,i=this.state();if((null===(e=i.deletedChildren)||void 0===e?void 0:e.length)>0&&(this.deletedChildren.forEach((function(e){if(n.allChildrenMap[e.oid]){var t=n.allChildrenList.indexOf(e);n.lastChildrenUpdate.deletions.push(e),n.allChildrenList.splice(t,1),delete n.allChildrenMap[e.oid]}})),this.deletedChildren.length=0),(null===(t=i.addedChildren)||void 0===t?void 0:t.length)>0&&(this.addedChildren.sort((function(e,t){return e.index-t.index})),this.addedChildren.forEach((function(e){var t=e.index,r=e.child;n.allChildrenMap[r.oid]||(a.d.isDefined(r.val("canDeleteDom"))||!1!==n.val("canDeleteDom")||r.val("canDeleteDom",!1),t>=n.allChildrenList.length?n.allChildrenList.push(r):n.allChildrenList.splice(t,0,r),n.allChildrenMap[r.oid]=r,n.lastChildrenUpdate.additions.push({index:t,child:r}))})),this.addedChildren.length=0),(null===(r=i.movedChildren)||void 0===r?void 0:r.length)>0){this.movedChildren.sort((function(e,t){return e.index-t.index}));var o={},l={};this.movedChildren.forEach((function(e){var t=e.index,r=e.child;n.lastChildrenUpdate.deletions.push(r),n.lastChildrenUpdate.additions.push({index:t,child:r});var i=n.allChildrenList.indexOf(r);if(t!==i){l[r.oid]&&delete l[r.oid];var a=n.allChildrenList.splice(t,1,r);!o[t]&&a.length>0&&(l[a[0].oid]={child:a[0],index:t+1}),i>=0&&(o[i]={fromIndex:i<t?i:t,child:r}),o[t]&&delete o[t]}})),Object.values(l).forEach((function(e){var t=e.index,r=e.child;n.allChildrenList.splice(t,0,r)})),Object.values(o).forEach((function(e){var t=e.fromIndex,r=e.child,i=n.allChildrenList.indexOf(r,t);n.allChildrenList.splice(i,1)})),this.movedChildren.length=0}return this.allChildrenList}},{key:"removeChildren",value:function(){var e=E(this.getChildren());if(0===e.length)return this;this.markLayoutDirty("removeChildren");var t,r=(0,n.EI)(),i=C(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;l.g.resetBeforeDeletion(a),a.cancelAnimation(),delete r.visibleOidMap[a.oid],delete r.preservedDomMap[a.oid],r.domPolicyMap.delete(a.oid),r.deletedTModelRoots.delete(a)}}catch(e){i.e(e)}finally{i.f()}this.hasDom()&&this.$dom.deleteAll();var o,u=C(e);try{for(u.s();!(o=u.n()).done;){var s=o.value;r.resetTModelDom(s)}}catch(e){u.e(e)}finally{u.f()}return this.allChildrenList=[],this.allChildrenMap={},this.clearUpdatingChildren(),this.clearActiveChildren(),this.clearAnimatingChildren(),this}},{key:"exists",value:function(){var e=this.getParent();return!!e&&(e.getChildren(),e.allChildrenMap[this.oid]===this)}},{key:"markEventDirty",value:function(){this.eventDirtyEpoch=(0,n.kQ)().eventEpoch,this.bracket&&this.bracket.markEventDirty(),this.parent&&this.parent.markEventDirty()}},{key:"hasEventDirty",value:function(){var e,t;return(null!==(e=this.eventDirtyEpoch)&&void 0!==e?e:-1)>(null!==(t=this.processedEventEpoch)&&void 0!==t?t:-1)}},{key:"markLayoutDirty",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;this.dirtyLayout||(this.dirtyLayout={oids:{},count:0}),this.dirtyLayout.oids[t.oid]||(this.dirtyLayout.oids[t.oid]=t,this.dirtyLayout.count++),t===this&&(e=t.oid+"#"+e),this.dirtyLayout.lastKey=e,this.bracket&&this.bracket.markLayoutDirty(e,t),this.parent&&this.parent.markLayoutDirty(e,t)}},{key:"removeLayoutDirty",value:function(e,t){var r=this;this.dirtyLayout&&(t?t.forEach((function(e){r.dirtyLayout.oids[e]&&(r.dirtyLayout.count--,delete r.dirtyLayout.oids[e])})):this.dirtyLayout.oids[e.oid]&&(this.dirtyLayout.count--,delete this.dirtyLayout.oids[e.oid]),0===this.dirtyLayout.count&&(this.dirtyLayout=!1)),this.bracket&&this.bracket.removeLayoutDirty(e,t),this.parent&&this.parent.removeLayoutDirty(e,t)}},{key:"getDirtyLayout",value:function(){return this.dirtyLayout}},{key:"shouldCalculateChildren",value:function(){if(a.d.isDefined(this.val("calculateChildren")))return this.val("calculateChildren");if(!this.isIncluded()||this.isDomIsland()&&!this.hasDom())return!1;var e=!1!==this.dirtyLayout,t=this.hasEventDirty(),r=this.hasDom(),n=this.isVisible(),i="active"===this.currentStatus||e||n&&t||this.isNowVisible||r&&t;return this.currentStatus=void 0,i}},{key:"getFirstChild",value:function(){return this.getChildren()[0]}},{key:"hasChildren",value:function(){return this.getChildren().length>0}},{key:"findChildren",value:function(e){return this.getChildren().filter((function(t){return t.type===e}))}},{key:"getLastChild",value:function(){return this.getChildren()[this.allChildrenList.length-1]}},{key:"getChild",value:function(e){return"number"==typeof e?this.getChildren()[e]:this.findChild(e)}},{key:"getChildIndex",value:function(e){return this.getChildren().indexOf(e)}},{key:"getChildrenOids",value:function(){return this.getChildren().map((function(e){return e.oid})).join(" ")}},{key:"findChild",value:function(e){return this.getChildren().find((function(t){return t.type===e}))}},{key:"findLastChild",value:function(e){return this.getChildren().findLast((function(t){return t.type===e}))}},{key:"getChildByOid",value:function(e){return this.getChildren(),this.allChildrenMap[e]}},{key:"getParentValue",value:function(e){var t;return null===(t=this.parent)||void 0===t?void 0:t.val(e)}},{key:"pval",value:function(e){return this.getParentValue(e)}},{key:"getParentValueAtMyIndex",value:function(e){var t=this.getParentValue(e);if(Array.isArray(t)){var r,n=null===(r=this.getParent())||void 0===r?void 0:r.getChildIndex(this);if("number"==typeof n)return t[n]}return t}},{key:"getLoadedItems",value:function(e){return this.val(a.d.getLoadTargetName(e))}},{key:"delVal",value:function(e){this.markLayoutDirty("del-".concat(e)),e.startsWith("_")?delete this[e.slice(1)]:delete this.actualValues[e]}},{key:"val",value:function(e,t){var r=this.actualValues,n=this.lastActualValues;return e=l.g.getTargetName(e),2===arguments.length?(n[e]=r[e],t!==r[e]&&(r[e]=t,this.markLayoutDirty("val-".concat(e))),this):r[e]}},{key:"lastVal",value:function(e){return this.lastActualValues[e]}},{key:"setActual",value:function(e,t){this.targetValues[e]&&(this.targetValues[e].actual=t)}},{key:"floorVal",value:function(e){var t;return Math.floor(null!==(t=this.val(e))&&void 0!==t?t:0)}},{key:"getDomParent",value:function(){return this.val("domParent")||w.X.findParentByTarget(this,"domHolder",!0)}},{key:"getDomHolder",value:function(){var e=this.val("domHolder");if(e&&!0!==e&&this.$dom!==e)return e;var t=this.getDomParent();return t?t.$dom:null}},{key:"debug",value:function(){var e=this;return[{oid:this.oid},{visible:this.isVisible()},{visibilityStatus:this.visibilityStatus},{hasDom:this.hasDom()},{shouldCalculateChildren:this.shouldCalculateChildren()},{dirtyLayout:this.getDirtyLayout()},{x:this.getX()},{y:this.getY()},{width:this.getWidth()},{height:this.getHeight()},{tmodelComplete:l.g.isTModelComplete(this)},{targets:this.originalTargetNames},{activeTargetList:this.activeTargetList},{activatedTargets:this.activatedTargets},{updatingTargetList:this.updatingTargetList},{animatingMap:E(this.animatingMap?E(this.animatingMap.keys()):[])},{noDomUpdatingTargets:E(this.noDomUpdatingTargets?E(this.noDomUpdatingTargets):[])},{pendingTargets:E(this.pendingTargets?E(this.pendingTargets):[])},{styleTargetMap:E(this.styleTargetMap?E(this.styleTargetMap.keys()):[])},{passiveTargetList:this.passiveTargetList},{incompleteTargets:Object.keys(this.targetValues).filter((function(t){var r;return"complete"!==(null===(r=e.targetValues[t])||void 0===r?void 0:r.status)})).map((function(t){var r;return"".concat(t,":").concat(null===(r=e.targetValues[t])||void 0===r?void 0:r.status)}))},{updatingChildren:this.updatingChildrenMap?E(this.updatingChildrenMap.keys()):[]},{activeChildren:this.activeChildrenMap?E(this.activeChildrenMap.keys()):[]},{children:this.getChildren()},{targetValues:this.targetValues},{actualValues:this.actualValues}]}},{key:"logTree",value:function(){a.d.logTree(this)}},{key:"isVisible",value:function(){return this.val("isVisible")}},{key:"makeVisible",value:function(){this.val("isVisible",!0),this.targets.isVisible=!0}},{key:"makeInvisible",value:function(){this.val("isVisible",!1),this.targets.isVisible=!1}},{key:"managesOwnScroll",value:function(){var e,t,r,n;return a.d.isDefined(this.val("managesOwnScroll"))?!!this.val("managesOwnScroll"):!!(this.allTargetMap.onScroll||this.allTargetMap.onScrollLeft||this.allTargetMap.onScrollTop||this.allTargetMap.onWindowScroll||0!==(null!==(e=null===(t=this.$dom)||void 0===t?void 0:t.getScrollTop())&&void 0!==e?e:0)||0!==(null!==(r=null===(n=this.$dom)||void 0===n?void 0:n.getScrollLeft())&&void 0!==r?r:0))}},{key:"calcVisibility",value:function(){return T.n.calcVisibility(this)}},{key:"validateVisibilityInParent",value:function(){return a.d.isDefined(this.val("validateVisibilityInParent"))?this.val("validateVisibilityInParent"):this.parent.managesOwnScroll()}},{key:"hasDomHolderChanged",value:function(){return!this.reuseDomDefinition()&&this.getDomHolder()&&this.getDomHolder().exists()&&this.$dom.parent()!==this.getDomHolder().element}},{key:"hasBaseElementChanged",value:function(){return!!this.hasDom()&&this.getBaseElement()!==this.$dom.getTagName()}},{key:"mount",value:function(e){return S.v.mount(this,e),this}},{key:"unmount",value:function(){var e;this.hasDom()&&this.val("sourceDom")&&this.domState&&S.v.restoreDomState(this.$dom.element,this.domState),null===(e=this.parent)||void 0===e||e.removeChild(this)}},{key:"hasDom",value:function(){return!!this.$dom&&this.$dom.exists()}},{key:"isDomIsland",value:function(){return this.val("domIsland")}},{key:"getRealParent",value:function(){return this.parent}},{key:"getContentHeight",value:function(){return this.contentHeight}},{key:"getContentWidth",value:function(){return this.contentWidth}},{key:"useContentWidth",value:function(){return k.a.useContentWidth(this)}},{key:"useContentHeight",value:function(){return k.a.useContentHeight(this)}},{key:"getBaseWidth",value:function(){var e;return null!==(e=this.val("baseWidth"))&&void 0!==e?e:this.getWidth()}},{key:"getBaseHeight",value:function(){var e;return null!==(e=this.val("baseHeight"))&&void 0!==e?e:this.getHeight()}},{key:"getMinWidth",value:function(){var e;return null!==(e=this.val("minWidth"))&&void 0!==e?e:Math.min(this.getWidth(),this.getBaseWidth())}},{key:"getTopBaseHeight",value:function(){var e;return null!==(e=this.val("topBaseHeight"))&&void 0!==e?e:0}},{key:"getLayoutHeight",value:function(){var e=this.getHeight();return this.usesContentBoxSizing()&&(e+=this.getPaddingTop()+this.getPaddingBottom()),e}},{key:"getLayoutWidth",value:function(){var e=this.getWidth();return this.usesContentBoxSizing()&&(e+=this.getPaddingLeft()+this.getPaddingRight()),e}},{key:"usesContentBoxSizing",value:function(){return"border-box"!==this.getBoxSizing()}},{key:"getBoxSizing",value:function(){var e,t,r;return null!==(e=null!==(t=null!==(r=this.val("boxSizing"))&&void 0!==r?r:this.val("box-sizing"))&&void 0!==t?t:this.getParentValue("boxSizing"))&&void 0!==e?e:"content-box"}},{key:"getContainerOverflowMode",value:function(){var e;return null!==(e=this.val("containerOverflowMode"))&&void 0!==e?e:"auto"}},{key:"getItemOverflowMode",value:function(){var e=this.targets.itemOverflowMode;if(void 0!==e)return"function"==typeof e?e.call(this):e;var t=this.val("itemOverflowMode");return void 0!==t?t:"auto"}},{key:"getUIDepth",value:function(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e}},{key:"canBeAnimated",value:function(e){return u.u.isGpuPreferred(e)&&!1!==this.actualValues.webAnimation}},{key:"isTextOnly",value:function(){return a.d.isDefined(this.val("textOnly"))?this.val("textOnly"):"string"!=typeof this.getHtml()||!this.getHtml().trim().startsWith("<")}},{key:"getHtml",value:function(){return this.val("html")}},{key:"isInFlow",value:function(){return!a.d.isDefined(this.val("isInFlow"))||this.val("isInFlow")}},{key:"canHandleEvent",value:function(e){return!!this.allTargetMap[e]}},{key:"preventDefault",value:function(){return a.d.isDefined(this.val("preventDefault"))?this.val("preventDefault"):this.getParentValue("preventDefault")||!1}},{key:"canDeleteDom",value:function(){return a.d.isDefined(this.val("canDeleteDom"))?this.val("canDeleteDom"):!this.reuseDomDefinition()}},{key:"requiresDom",value:function(){return a.d.isDefined(this.val("requiresDom"))?this.val("requiresDom"):this.reuseDomDefinition()}},{key:"excludeStyling",value:function(){return!1===this.targets.styling}},{key:"getBracketThreshold",value:function(){return this.val("bracketThreshold")}},{key:"getBracketSize",value:function(){return this.val("bracketSize")}},{key:"shouldBeBracketed",value:function(){return a.d.isDefined(this.val("shouldBeBracketed"))?this.val("shouldBeBracketed"):this.getChildren().length>this.getBracketThreshold()}},{key:"isIncluded",value:function(){return this.val("isIncluded")}},{key:"canHaveDom",value:function(){return!(this.targets.$dom&&!this.val("$dom"))&&this.val("canHaveDom")}},{key:"requiresDomRelocation",value:function(){return a.d.isDefined(this.val("requiresDomRelocation"))?this.val("requiresDomRelocation"):!a.d.isDefined(this.tfMap.x)&&!a.d.isDefined(this.tfMap.y)}},{key:"getBaseElement",value:function(){var e;return this.val("baseElement")||this.val("element")||(null===(e=this.$dom)||void 0===e||null===(e=e.element)||void 0===e||null===(e=e.tagName)||void 0===e?void 0:e.toLowerCase())}},{key:"getOpacity",value:function(){return this.val("opacity")}},{key:"getCenterX",value:function(){return(this.parent.getWidth()-this.getWidth())/2}},{key:"getCenterY",value:function(){return(this.parent.getHeight()-this.getHeight())/2}},{key:"getX",value:function(){return this.val("x")}},{key:"getY",value:function(){return this.val("y")}},{key:"getZ",value:function(){return this.val("z")}},{key:"getPerspective",value:function(){return this.val("perspective")}},{key:"getRotate",value:function(){return this.val("rotate")}},{key:"getRotateX",value:function(){return this.val("rotateX")}},{key:"getRotateY",value:function(){return this.val("rotateY")}},{key:"getRotateZ",value:function(){return this.val("rotateZ")}},{key:"getScale",value:function(){return this.val("scale")}},{key:"getScaleX",value:function(){return this.val("scaleX")}},{key:"getScaleY",value:function(){return this.val("scaleY")}},{key:"getScaleZ",value:function(){return this.val("scaleZ")}},{key:"getSkewX",value:function(){return this.val("skewX")}},{key:"getSkewY",value:function(){return this.val("skewY")}},{key:"getSkewZ",value:function(){return this.val("skewZ")}},{key:"getMeasuringScale",value:function(){var e;return null!==(e=this.val("measuringScale"))&&void 0!==e?e:1}},{key:"getZIndex",value:function(){return this.val("zIndex")}},{key:"getMarginTop",value:function(){var e,t;return null!==(e=null!==(t=this.val("marginTop"))&&void 0!==t?t:this.val("topMargin"))&&void 0!==e?e:k.a.getMarginValue(this,"top")}},{key:"getMarginLeft",value:function(){var e,t;return null!==(e=null!==(t=this.val("marginLeft"))&&void 0!==t?t:this.val("leftMargin"))&&void 0!==e?e:k.a.getMarginValue(this,"left")}},{key:"getMarginRight",value:function(){var e,t,r;return(null!==(e=null!==(t=this.val("marginRight"))&&void 0!==t?t:this.val("rightMargin"))&&void 0!==e?e:k.a.getMarginValue(this,"right"))+(null!==(r=this.getParentValue("gap"))&&void 0!==r?r:0)}},{key:"getMarginBottom",value:function(){var e,t,r;return(null!==(e=null!==(t=this.val("marginBottom"))&&void 0!==t?t:this.val("bottomMargin"))&&void 0!==e?e:k.a.getMarginValue(this,"bottom"))+(null!==(r=this.getParentValue("gap"))&&void 0!==r?r:0)}},{key:"getPaddingTop",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingTop"))&&void 0!==t?t:this.val("topPadding"))&&void 0!==e?e:k.a.getPaddingValue(this,"top")}},{key:"getPaddingLeft",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingLeft"))&&void 0!==t?t:this.val("leftPadding"))&&void 0!==e?e:k.a.getPaddingValue(this,"left")}},{key:"getPaddingRight",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingRight"))&&void 0!==t?t:this.val("rightPadding"))&&void 0!==e?e:k.a.getPaddingValue(this,"right")}},{key:"getPaddingBottom",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingBottom"))&&void 0!==t?t:this.val("bottomPadding"))&&void 0!==e?e:k.a.getPaddingValue(this,"bottom")}},{key:"setLayoutX",value:function(e){this.x=e}},{key:"setLayoutY",value:function(e){this.y=e}},{key:"getWidth",value:function(){return a.d.isDefined(this.targets.width)||a.d.isDefined(this.targetValues.width)?this.val("width"):a.d.isDefined(this.targets.dim)||a.d.isDefined(this.targetValues.dim)?this.val("dim"):this.val("width")}},{key:"getHeight",value:function(){return a.d.isDefined(this.targets.height)||a.d.isDefined(this.targetValues.height)?this.val("height"):a.d.isDefined(this.targets.dim)||a.d.isDefined(this.targetValues.dim)?this.val("dim"):this.val("height")}},{key:"getScrollTop",value:function(){return this.val("scrollTop")}},{key:"getScrollLeft",value:function(){return this.val("scrollLeft")}},{key:"getCss",value:function(){return this.val("css")}},{key:"getStyle",value:function(){return this.val("style")}},{key:"getBackground",value:function(){return this.val("background")}},{key:"getBackgroundColor",value:function(){return this.val("backgroundColor")}},{key:"getAttributes",value:function(){return this.val("attributes")}},{key:"getInputValue",value:function(){return this.hasDom()?this.$dom.value():void 0}},{key:"isFormControl",value:function(){var e,t=this.getBaseElement();return"input"===t||"select"===t||"textarea"===t||(null===(e=this.$dom)||void 0===e||null===(e=e.element)||void 0===e?void 0:e.isContentEditable)}},{key:"isOverflowHidden",value:function(){return"hidden"===this.val("overflow")}},{key:"reuseDomDefinition",value:function(){return this.val("reuseDomDefinition")}},{key:"createRuntimeSnapshot",value:function(){return x.s.createRuntimeSnapshot(this)}},{key:"handleSpecialTarget",value:function(){return!1}},{key:"handleSpecialTargetStep",value:function(){return!1}},{key:"handleSpecialTargetEnd",value:function(){return!1}},{key:"finalizeChildrenTarget",value:function(){return!1}},{key:"onDomReady",value:function(){}}],i&&L(r.prototype,i),o&&L(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i,o}(m)},611:function(e,t,r){function n(e){return n="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},n(e)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){u=!0,o=e},f:function(){try{l||null==r.return||r.return()}finally{if(u)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}r.d(t,{E:function(){return d}});var u,s,c,d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,n=[{key:"register",value:function(t,r){e.factories.push({match:t,create:r})}},{key:"create",value:function(e,t,r){for(var n=arguments.length,a=new Array(n>3?n-3:0),o=3;o<n;o++)a[o-3]=arguments[o];var l,u=i(this.factories);try{for(u.s();!(l=u.n()).done;){var s=l.value;if(s.match(t))return s.create.apply(s,[e,t].concat(a))}}catch(e){u.e(e)}finally{u.f()}return r.apply(void 0,[e,t].concat(a))}}],(r=null)&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();u=d,c=[],(s=l(s="factories"))in u?Object.defineProperty(u,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):u[s]=c},249:function(e,t,r){r.d(t,{a:function(){return x}});var n=r(34),i=r(333),a=r(585),o=r(855),l=r(768),u=r(737),s=r(421);function c(e){return c="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},c(e)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return(t=S(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function g(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(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 y(e,t){if(e){if("string"==typeof e)return m(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function b(){b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,o=Object.create(a.prototype),l=new A(n||[]);return i(o,"_invoke",{value:D(e,r,l)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var f="suspendedStart",v="suspendedYield",p="executing",g="completed",y={};function m(){}function T(){}function w(){}var k={};s(k,o,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(j([])));x&&x!==r&&n.call(x,o)&&(k=x);var M=w.prototype=m.prototype=Object.create(k);function C(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,o,l){var u=h(e[i],e,a);if("throw"!==u.type){var s=u.arg,d=s.value;return d&&"object"==c(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(d).then((function(e){s.value=e,o(s)}),(function(e){return r("throw",e,o,l)}))}l(u.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function D(t,r,n){var i=f;return function(a,o){if(i===p)throw Error("Generator is already running");if(i===g){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var u=P(l,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var s=h(t,r,n);if("normal"===s.type){if(i=n.done?g:v,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=g,n.method="throw",n.arg=s.arg)}}}function P(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(c(t)+" is not iterable")}return T.prototype=w,i(M,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:T,configurable:!0}),T.displayName=s(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,s(e,u,"GeneratorFunction")),e.prototype=Object.create(M),e},t.awrap=function(e){return{__await:e}},C(E.prototype),s(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(d(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(M),s(M,u,"Generator"),s(M,o,(function(){return this})),s(M,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function T(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,i)}function w(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){T(a,n,i,o,l,"next",e)}function l(e){T(a,n,i,o,l,"throw",e)}o(void 0)}))}}function k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S(n.key),n)}}function S(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}var x=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,r=null,c=[{key:"restoreScroll",value:(f=w(b().mark((function e(t){var r,n;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.scrollLeft||0,n=t.scrollTop||0,window.scrollTo(r,n),e.next=5,new Promise(requestAnimationFrame);case 5:return window.scrollTo(r,n),e.next=8,new Promise(requestAnimationFrame);case 8:window.scrollTo(r,n);case 9:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)})},{key:"getRootDom",value:function(){return l.J.query("#tgjs-root")?new l.J("#tgjs-root"):new l.J("body")}},{key:"getPageDom",value:function(){return new l.J("body")}},{key:"captureDomState",value:function(e){if(null!=e&&e.getElement()){var t=[e.getElement()].concat(g(e.queryAll("*"))),r=[],n=[];t.forEach((function(e,t){var i,a=null===(i=e.tagName)||void 0===i?void 0:i.toLowerCase();"input"===a?"file"!==(e.type||"text").toLowerCase()&&r.push({index:t,kind:"input",value:e.value,checked:e.checked,indeterminate:e.indeterminate}):"textarea"===a?r.push({index:t,kind:"textarea",value:e.value}):"select"===a?r.push({index:t,kind:"select",selected:g(e.options).map((function(e){return e.selected}))}):"details"===a&&r.push({index:t,kind:"details",open:e.open}),(e.scrollLeft||e.scrollTop)&&n.push({index:t,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop})}));var i,a=document.activeElement,o=a&&e.contains(a)?t.indexOf(a):-1;return o>=0&&"number"==typeof a.selectionStart&&(i={start:a.selectionStart,end:a.selectionEnd,direction:a.selectionDirection}),{controls:r,scrollPositions:n,activeIndex:o,selection:i}}}},{key:"restoreDomState",value:function(e,t){if(null!=e&&e.getElement()&&t){var r,n=[e.getElement()].concat(g(e.queryAll("*"))),i=p(t.controls||[]);try{var a=function(){var e=r.value,t=n[e.index];if(!t)return 1;"input"===e.kind?(t.value=e.value,t.checked=e.checked,t.indeterminate=e.indeterminate):"textarea"===e.kind?t.value=e.value:"select"===e.kind?g(t.options).forEach((function(t,r){t.selected=!0===e.selected[r]})):"details"===e.kind&&(t.open=e.open)};for(i.s();!(r=i.n()).done;)a()}catch(e){i.e(e)}finally{i.f()}}}},{key:"restoreDomInteractionState",value:(d=w(b().mark((function e(t,r){var n,i,a,o,l,u,s;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t&&t.getElement()&&r){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,new Promise(requestAnimationFrame);case 4:n=[t.getElement()].concat(g(t.queryAll("*"))),i=p(r.scrollPositions||[]),e.prev=6,i.s();case 8:if((a=i.n()).done){e.next=17;break}if(o=a.value,l=n[o.index]){e.next=13;break}return e.abrupt("continue",15);case 13:l.scrollLeft=o.scrollLeft,l.scrollTop=o.scrollTop;case 15:e.next=8;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(6),i.e(e.t0);case 22:return e.prev=22,i.f(),e.finish(22);case 25:if(u=n[r.activeIndex]){e.next=28;break}return e.abrupt("return");case 28:try{u.focus({preventScroll:!0})}catch(e){null===(s=u.focus)||void 0===s||s.call(u)}if(r.selection&&"function"==typeof u.setSelectionRange)try{u.setSelectionRange(r.selection.start,r.selection.end,r.selection.direction)}catch(e){}case 30:case"end":return e.stop()}}),e,null,[[6,19,22,25]])}))),function(e,t){return d.apply(this,arguments)})},{key:"getMarginValue",value:function(e,t){var r=e.val("margin");if("number"==typeof r)return r;if(Array.isArray(r)){if(2===r.length){var n=v(r,2),i=n[0],a=n[1];return"top"===t||"bottom"===t?i:a}if(4===r.length){var o=v(r,4),l=o[0],u=o[1],s=o[2],c=o[3];if("top"===t)return l;if("right"===t)return u;if("bottom"===t)return s;if("left"===t)return c}}return 0}},{key:"getPaddingValue",value:function(e,t){var r=e.val("padding");if("number"==typeof r)return r;if(Array.isArray(r)){if(2===r.length){var n=v(r,2),i=n[0],a=n[1];return"top"===t||"bottom"===t?i:a}if(4===r.length){var o=v(r,4),l=o[0],u=o[1],s=o[2],c=o[3];if("top"===t)return l;if("right"===t)return u;if("bottom"===t)return s;if("left"===t)return c}}return 0}},{key:"shouldMeasureHeightFromDom",value:function(t){return!1!==t.val("heightFromDom")&&(!t.excludeDefaultStyling()&&!n.d.isDefined(t.targetValues.height)&&!t.val("heightFromDom")&&!e.isHeightDefined(t)&&!t.hasChildren()||t.val("heightFromDom"))}},{key:"shouldMeasureWidthFromDom",value:function(t){return!1!==t.val("widthFromDom")&&(!t.excludeDefaultStyling()&&!t.reuseDomDefinition()&&!t.val("widthFromDom")&&!n.d.isDefined(t.targetValues.width)&&!e.isWidthDefined(t)&&!t.hasChildren()||t.val("widthFromDom"))}},{key:"isHeightDefined",value:function(e){var t;return e.isTargetImperative("height")||!!e.allTargetMap.height||!!e.allTargetMap.dim||n.d.isDefined(null===(t=e.targets.style)||void 0===t?void 0:t.height)}},{key:"isWidthDefined",value:function(e){var t;return e.isTargetImperative("width")||!!e.allTargetMap.width||!!e.allTargetMap.dim||n.d.isDefined(null===(t=e.targets.style)||void 0===t?void 0:t.width)}},{key:"isXDefined",value:function(e){return!!e.allTargetMap.x||!!e.targetValues.x}},{key:"isYDefined",value:function(e){return!!e.allTargetMap.y||!!e.targetValues.y}},{key:"useContentWidth",value:function(t){return!e.isWidthDefined(t)&&!t.val("widthFromDom")&&t.getContentWidth()>0}},{key:"useContentHeight",value:function(t){return!e.isHeightDefined(t)&&!t.val("heightFromDom")&&t.getContentHeight()>0}},{key:"createDom",value:function(e){e.$dom=new l.J,e.$dom.create(e.getBaseElement())}},{key:"patchDom",value:function(e){e.$dom.ensureId(e.oid),e.$dom.attr("tgjs","true"),e.getHtml()&&(e.isTextOnly()?e.$dom.text(e.getHtml()):e.$dom.html(e.getHtml())),e.setLastUpdate("html")}},{key:"initStyleMaps",value:function(e){e.domHeightTimestamp=0,e.domWidthTimestamp=0,e.tfMap={},e.styleMap={};var t,r=p(e.allStyleTargetMap);try{for(r.s();!(t=r.n()).done;){var i=v(t.value,1)[0];n.d.isDefined(e.val(i))&&e.addToStyleTargetList(i)}}catch(e){r.e(e)}finally{r.f()}}},{key:"getTransformValue",value:function(e,t){var r;return"x"===t?r=Math.floor(e.getX()):"y"===t?r=Math.floor(e.getY()):a.u.transformMap[t]&&(r=a.u.rotate3D[t]?e.val(t):a.u.scaleMap[t]?n.d.formatNum(e.val(t),2):e.floorVal(t)),r}},{key:"fixStyle",value:function(t){if(t.styleTargetMap&&t.hasDom()){for(var r=!1,i=0,o=g(t.styleTargetMap);i<o.length;i++){var l=v(o[i],1)[0];if(!t.isKeyAnimating(l))if(a.u.transformMap[l]){var u=e.getTransformValue(t,l);t.tfMap[l]!==u&&(t.tfMap[l]=u,r=!0)}else if("dim"===l){var s=Math.floor(t.val("dim"));t.styleMap.height===s&&t.$dom.getStyleValue("height")===s||(t.styleMap.height=s,t.$dom.height(s)),t.styleMap.width===s&&t.$dom.getStyleValue("width")===s||(t.styleMap.width=s,t.$dom.width(s))}else if("width"===l){var c=Math.floor(t.getWidth());t.styleMap.width===c&&t.$dom.getStyleValue("width")===c||(t.styleMap.width=c,t.$dom.width(c))}else if("height"===l){var d=Math.floor(t.getHeight());t.styleMap.height===d&&t.$dom.getStyleValue("height")===d||(t.styleMap.height=d,t.$dom.height(d))}else a.u.styleWithUnitMap[l]?n.d.isDefined(t.val(l))&&t.styleMap[l]!==t.val(l)&&(t.$dom.style(l,n.d.isNumber(t.val(l))?"".concat(t.val(l),"px"):t.val(l)),t.styleMap[l]=t.val(l)):n.d.isDefined(t.val(l))&&t.styleMap[l]!==t.val(l)&&(t.$dom.style(l,"".concat(t.val(l))),t.styleMap[l]=t.val(l))}r&&t.$dom.transform(e.getTransformString(t,t.tfMap)),t.styleTargetMap.clear()}}},{key:"commitAnimatedStyles",value:function(t,r){if(t.hasDom()&&null!=r&&r.size){var o,l=!1,u=p(r);try{for(u.s();!(o=u.n()).done;){var s=o.value,c=i.g.getTargetName(s),d=t.val(c);if(n.d.isDefined(d))if(a.u.transformMap[c]){var f=e.getTransformValue(t,c);n.d.isDefined(f)&&(t.tfMap[c]=f,l=!0)}else if("dim"!==c)if("width"!==c)if("height"!==c){var v="number"==typeof d&&a.u.styleWithUnitMap[c]?"".concat(d,"px"):"".concat(d);t.styleMap[c]=d,t.$dom.style(c,v)}else{var g=Math.floor(d);t.styleMap.height=g,t.$dom.height(g)}else{var y=Math.floor(d);t.styleMap.width=y,t.$dom.width(y)}else{var m=Math.floor(d);t.styleMap.width=m,t.styleMap.height=m,t.$dom.width(m),t.$dom.height(m)}}}catch(e){u.e(e)}finally{u.f()}if(l){var b=h(h({},e.getTransformBaseFromActualValues(t)),t.tfMap),T=e.getTransformString(t,b);t.$dom.transform(T,t.val("transformOrder"))}}}},{key:"setWidthFromDom",value:function(e){var t=e.domWidthTimestamp,r=e.getParent(),i=e.getDomParent(),a=!1;if((0,o.EI)().needsRerender(e)&&(e.isTextOnly()?e.$dom.text(e.getHtml()):e.$dom.html(e.getHtml()),a=!0),a||r&&t<=r.getDimLastUpdate()||i&&t<=i.getDimLastUpdate()){e.$dom.width("auto");var l=e.$dom.width();l=l>0&&e.getHtml()?l+1:l,e.domWidthTimestamp=n.d.now(),e.val("width",l),(l>0||0===l&&e.lastVal("width")>0)&&e.addToStyleTargetList("width"),e.markLayoutDirty("width"),(0,o.fB)().schedule(15,"resize")}}},{key:"setHeightFromDom",value:function(e){var t=e.domHeightTimestamp,r=e.getParent(),i=e.getDomParent(),a=!1;if((0,o.EI)().needsRerender(e)&&(e.isTextOnly()?e.$dom.text(e.getHtml()):e.$dom.html(e.getHtml()),a=!0),a||r&&t<=r.getDimLastUpdate()||i&&t<=i.getDimLastUpdate()){e.$dom.height("auto");var l=e.$dom.height();e.domHeightTimestamp=n.d.now(),e.val("height",l),(l>0||0===l&&e.lastVal("height")>0)&&e.addToStyleTargetList("height"),e.markLayoutDirty("height"),(0,o.fB)().schedule(15,"resize")}}},{key:"easingMorph",value:function(t,r,n,i,a,o){var l=t.getTargetEasing(r),u=l?s.G.easingFunction(l):void 0,c=u?u(t.getTargetStepPercent(r,a,o)):t.getTargetStepPercent(r,a,o);return e.morph(r,n,i,c)}},{key:"morph",value:function(e,t,r,n){if(a.u.colorMap[i.g.getTargetName(e)]){var o=u.I.color2Integers(r),l=t?u.I.color2Integers(t):u.I.color2Integers("#fff");if(o&&l){var s=Math.floor(o[0]*n+l[0]*(1-n)),c=Math.floor(o[1]*n+l[1]*(1-n)),d=Math.floor(o[2]*n+l[2]*(1-n));return"rgb(".concat(s,",").concat(c,",").concat(d,")")}return r}return"number"==typeof r?t+(r-t)*n:r}},{key:"fixAsyncStyle",value:function(e){if(e.asyncStyleTargetMap){var t,r=p(e.asyncStyleTargetMap);try{var i=function(){var r=v(t.value,1)[0];if("style"===r){var i=e.getStyle();n.d.isDefined(i)&&e.styleMap.style!==i&&(e.$dom.setStyleByMap(i),i.height&&e.val("height",parseInt(i.height,10)),i.width&&e.val("width",parseInt(i.width,10)),e.styleMap.style=i)}else if("attributes"===r){var o=e.getAttributes();n.d.isDefined(o)&&e.styleMap.attributes!==o&&(Object.keys(o).forEach((function(t){e.$dom.attr(t,o[t])})),e.styleMap.attributes=o)}else if("css"===r){var l=e.getCss();e.$dom.css()!==l&&e.$dom.css(l)}else a.u.attributeTargetMap[r]?e.$dom.attr(r,e.val(r)):n.d.isDefined(e.val(r))&&e.styleMap[r]!==e.val(r)&&(e.$dom.style(r,"".concat(e.val(r))),e.styleMap[r]=e.val(r))};for(r.s();!(t=r.n()).done;)i()}catch(e){r.e(e)}finally{r.f()}e.asyncStyleTargetMap.clear()}}},{key:"getTransformBaseFromActualValues",value:function(e){var t={},r=a.u.transformMap;for(var i in e.actualValues)if(r[i]){var o=e.actualValues[i];n.d.isDefined(o)&&(t[i]=o)}return t}},{key:"num",value:function(e,t){var r=Number(e);return Number.isFinite(r)?r:t}},{key:"shouldUseImplicitTransformOrder",value:function(e){if(e.val("useTargetTransformOrder"))return!0;var t=e.originalTargetNames||[],r=function(e){return e.some((function(e){return t.indexOf(e)>=0}))},n=0;return r(["perspective"])&&n++,r(["translateX","translateY","translateZ","x","y","z"])&&n++,(r(["rotateX","rotateY","rotateZ"])||r(["rotate3DX"])&&r(["rotate3DY"])&&r(["rotate3DZ"])&&r(["rotate3DAngle"]))&&n++,r(["skewX","skewY","skew"])&&n++,(r(["scaleX","scaleY","scaleZ"])||r(["scale3DX"])&&r(["scale3DY"])&&r(["scale3DZ"]))&&n++,n>1}},{key:"buildImplicitTransformOrderMap",value:function(e){var t=function(t){return e.indexOf(t)>=0},r=function(t){var r,n=1/0,i=p(t);try{for(i.s();!(r=i.n()).done;){var a=r.value,o=e.indexOf(a);o>=0&&o<n&&(n=o)}}catch(e){i.e(e)}finally{i.f()}return n},n=t("translateX")||t("translateY")||t("translateZ"),i=t("x")||t("y")||t("z"),a=t("rotate3DX")&&t("rotate3DY")&&t("rotate3DZ")&&t("rotate3DAngle"),o=t("scale3DX")&&t("scale3DY")&&t("scale3DZ"),l=t("skewX")&&t("skewY"),u=[];if(t("perspective")&&u.push({group:"perspective",order:r(["perspective"]),outputs:["perspective"]}),n?u.push({group:"translate",order:r(["translateX","translateY","translateZ"]),outputs:["translateX","translateY","translateZ"].filter(t)}):i&&u.push({group:"translate",order:r(["x","y","z"]),outputs:["translate3d"]}),a)u.push({group:"rotate",order:r(["rotate3DX","rotate3DY","rotate3DZ","rotate3DAngle"]),outputs:["rotate3d"]});else{var s=["rotateX","rotateY","rotateZ","rotate"],c=s.filter(t);c.length&&u.push({group:"rotate",order:r(s),outputs:c})}if(l)u.push({group:"skew",order:r(["skewX","skewY"]),outputs:["skew"]});else{var d=["skewX","skewY"].filter(t);d.length&&u.push({group:"skew",order:r(["skewX","skewY"]),outputs:d})}if(o)u.push({group:"scale",order:r(["scale3DX","scale3DY","scale3DZ"]),outputs:["scale3d"]});else{var h=["scaleX","scaleY","scaleZ","scale"],f=h.filter(t);f.length&&u.push({group:"scale",order:r(h),outputs:f})}var v={perspective:0,translate:1,rotate:2,skew:3,scale:4};u.sort((function(e,t){var r,n,i=Number.isFinite(e.order)?e.order:1/0,a=Number.isFinite(t.order)?t.order:1/0;return i!==a?i-a:(null!==(r=v[e.group])&&void 0!==r?r:999)-(null!==(n=v[t.group])&&void 0!==n?n:999)}));var g=u.flatMap((function(e){return e.outputs})),y={};return g.forEach((function(e,t){return y[e]=t})),y}},{key:"getTransformString",value:function(t,r){for(var i={},o={},l=n.d.isDefined(r.translateX)||n.d.isDefined(r.translateY)||n.d.isDefined(r.translateZ),u=0,s=Object.keys(r);u<s.length;u++){var c=s[u];if(!i[c])switch(c){case"translateX":case"translateY":case"translateZ":null!==r[c]&&(o[c]="".concat(c,"(").concat(e.num(r[c],0),"px)"),i[c]=!0);break;case"x":case"y":case"z":if(l){i.x=i.y=i.z=!0;break}var d="".concat(e.num(r.x,0),"px"),h="".concat(e.num(r.y,0),"px"),f="".concat(e.num(r.z,0),"px");o.translate3d="translate3d(".concat(d,", ").concat(h,", ").concat(f,")"),i.x=i.y=i.z=!0;break;case"rotate":case"rotateX":case"rotateY":case"rotateZ":case"rotate3DX":case"rotate3DY":case"rotate3DZ":case"rotate3DAngle":n.d.isDefined(r.rotate3DX)&&n.d.isDefined(r.rotate3DY)&&n.d.isDefined(r.rotate3DZ)&&n.d.isDefined(r.rotate3DAngle)?(o.rotate3d="rotate3d(".concat(e.num(r.rotate3DX,0),", ").concat(e.num(r.rotate3DY,0),", ").concat(e.num(r.rotate3DZ,0),", ").concat(e.num(r.rotate3DAngle,0),"deg)"),i.rotate3DX=i.rotate3DY=i.rotate3DZ=i.rotate3DAngle=!0):null!==r[c]&&(o[c]="".concat(c,"(").concat(e.num(r[c],0),"deg)"),i[c]=!0);break;case"scale":case"scaleX":case"scaleY":case"scaleZ":case"scale3DX":case"scale3DY":case"scale3DZ":var v,p,g;n.d.isDefined(r.scale3DX)&&n.d.isDefined(r.scale3DY)&&n.d.isDefined(r.scale3DZ)?(o.scale3d="scale3d(".concat(Number(null!==(v=r.scale3DX)&&void 0!==v?v:1),", ").concat(Number(null!==(p=r.scale3DY)&&void 0!==p?p:1),", ").concat(Number(null!==(g=r.scale3DZ)&&void 0!==g?g:1),")"),i.scale3DX=i.scale3DY=i.scale3DZ=!0):(o[c]="".concat(c,"(").concat(e.num(r[c],1),")"),i[c]=!0);break;case"skewX":case"skewY":var y,m;if(n.d.isDefined(r.skewX)&&n.d.isDefined(r.skewY))o.skew="skew(".concat(Number(null!==(y=r.skewX)&&void 0!==y?y:0),"deg, ").concat(Number(null!==(m=r.skewY)&&void 0!==m?m:0),"deg)"),i.skewX=i.skewY=!0;else if(null!==r[c]){var b;o[c]="".concat(c,"(").concat(Number(null!==(b=r[c])&&void 0!==b?b:0),"deg)"),i[c]=!0}break;case"perspective":o[c]="perspective(".concat(e.num(r.perspective,0),"px)"),i.perspective=!0}}var T={},w=t.val("transformOrder");Array.isArray(w)&&w.length?w.forEach((function(e,t){T[e]=t})):e.shouldUseImplicitTransformOrder(t)&&(t.implicitTransformOrderVersion!==t.targetsVersion&&(t.implicitTransformOrderMap=e.buildImplicitTransformOrderMap(t.originalTargetNames),t.implicitTransformOrderVersion=t.targetsVersion),T=t.implicitTransformOrderMap),Object.keys(T).length||(T=a.u.transformOrder);var k=Object.keys(o).sort((function(e,t){var r,n;return(null!==(r=T[e])&&void 0!==r?r:999)-(null!==(n=T[t])&&void 0!==n?n:999)})).map((function(e){return o[e]}));return k.join(" ")}},{key:"calcAbsolutePositionFromDom",value:function(e){if(e.hasDom()){var t=e.$dom.getBoundingClientRect(),r=Math.floor(t.left),n=Math.floor(t.top);r===Math.floor(e.absX)&&n===Math.floor(e.absY)||(e.absX=t.left,e.absY=t.top,e.markLayoutDirty("islandAbsXY"))}}}],r&&k(t.prototype,r),c&&k(t,c),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,c,d,f}()},34:function(e,t,r){r.d(t,{d:function(){return v}});var n=r(855),i=r(333),a=r(585),o=r(90);function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function u(e){return u="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},u(e)}function s(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(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 c(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function f(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}var v=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,c=[{key:"contains",value:function(e,t){var r;return!(!e||!t||e!==t&&t.getDomParent()!==e&&(null===(r=t.getDomParent())||void 0===r?void 0:r.getDomParent())!==e)}},{key:"uniqueTModels",value:function(e){return s(new Map(e.filter(Boolean).map((function(e){return[e.oid,e]}))).values())}},{key:"list2map",value:function(t,r){return t.reduce((function(t,n){return t[n.oid]=e.isDefined(r)?r:n,t}),{})}},{key:"getDeepList",value:function(e){var t=[];return function e(r){if(r&&r.hasChildren()){var n=r.getChildren();t.push.apply(t,s(n)),n.forEach(e)}}(e),t}},{key:"areEqual",value:function(e,t,r){return r?JSON.stringify(e)===JSON.stringify(t):e===t}},{key:"momentum",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.002,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:100,a=t-e,o=r<10?Math.abs(a)/10:Math.abs(a)/r,l=o/n,u=Math.pow(o,2)/(2*n);u>i&&(u=i);var s=a>0?a+u:a-u;return{distance:Math.round(s)/5,duration:Math.round(l),momentumDistance:u}}},{key:"isDefined",value:function(e){return null!=e}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"limit",value:function(t,r,n){return t=(t=(t=e.isDefined(t)?t:r)>n?n:t)<r?r:t}},{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"getLoadTargetName",value:function(e){return"load-".concat(e)}},{key:"formatNum",value:function(e,t){return e?parseFloat(e.toString()).toFixed(t):0}},{key:"now",value:function(){return performance.now()}},{key:"log",value:function(e){return!0===e?console.log:function(){}}},{key:"distance",value:function(e,t,r,n){return Math.sqrt(Math.pow(r-e,2)+Math.pow(n-t,2))}},{key:"getFullLink",value:function(t){if(e.isDefined(t)){if(!t.startsWith("http")){var r=window.location.protocol;r+=r.endsWith(":")?"//":"://";var n="".concat(r).concat(window.location.hostname);t=t.startsWith("/")?n+t:"".concat(n,"/").concat(t)}return t.endsWith("/")?t.slice(0,-1):t}}},{key:"isStringBooleanOrNumber",value:function(e){var t=u(e);return"string"===t||"boolean"===t||"number"===t}},{key:"logTree",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,n.Bt)(),i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=l((0,n.zw)().calcChildren(r));try{for(a.s();!(t=a.n()).done;){var o,u,s,c=t.value,d=c.isVisible()?i+"| ":i+"x ";"BI"===c.type?console.log("".concat(d).concat(c.oid," v:").concat(c.isVisible()," x:").concat(Math.floor(c.getX())," y:").concat(Math.floor(c.getY()),", absX:").concat(Math.floor(c.absX),", absY:").concat(Math.floor(c.absY)," n-e-s:").concat(Math.floor(null===(o=c.viewport)||void 0===o?void 0:o.yNorth),"-").concat(Math.floor(null===(u=c.viewport)||void 0===u?void 0:u.yEast),"-").concat(Math.floor(null===(s=c.viewport)||void 0===s?void 0:s.ySouth)," w:").concat(Math.floor(c.getBaseWidth())," ww:").concat(Math.floor(c.getContentWidth())," h:").concat(Math.floor(c.getBaseHeight())," hh:").concat(Math.floor(c.getContentHeight()))):console.log("".concat(d).concat(c.oid," v:").concat(c.isVisible()," x:").concat(Math.floor(c.getX())," y:").concat(Math.floor(c.getY())," absX:").concat(Math.floor(c.absX),", absY:").concat(Math.floor(c.absY)," w:").concat(Math.floor(c.getWidth())," h:").concat(Math.floor(c.getHeight())," hc:").concat(Math.floor(c.getContentHeight()))),c.hasChildren()&&"exampleItem"!==c.type&&e.logTree(c,d)}}catch(e){a.e(e)}finally{a.f()}}},{key:"logBranch",value:function(e){for(var t=[];e;)t.unshift(e),e=e.bracket?e.bracket:e.getParent();for(var r=1;r<t.length;r++){var i=t[r-1],a=t[r];if((0,n.zw)().getChildren(i).indexOf(a)<0){console.log("branch is not valid: "+i.oid+", "+a.oid);break}}console.log(t.map((function(e){return e.oid})))}},{key:"handleValueChange",value:function(t,r){var n=t.targets[r];n||(r=i.g.getTargetName(r),n=t.targets[r]);var a=t.val(r),o=t.lastVal(r);return"object"===u(n)&&"function"==typeof n.onValueChange&&(!e.areEqual(a,o,n.deepEquality)&&(n.onValueChange.call(t,a,o,t.getTargetCycle(r)),t.setTargetMethodName(r,"onValueChange")),!0)}},{key:"runTargetValue",value:function(t,r,o,l,u){var s,c,d,h=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,f=i.g.getTargetName(o),v=a.u.allEventMap[f],p=e.isDefined(h)?[h]:[];return v?"function"==typeof r.value?(s=r.value).call.apply(s,[t].concat(p,[(0,n.kQ)().getCurrentOriginalEvent(),l,u])):e.isDefined(r.value)?r.value:r:t.val("___".concat(o))?"function"==typeof r.value?(c=r.value).call.apply(c,[t].concat(p,[t.val("___".concat(o)),l,u])):e.isDefined(r.value)?r.value:r:"function"==typeof r.value?(d=r.value).call.apply(d,[t].concat(p,[l,u])):e.isDefined(r.value)?r.value:r}},{key:"mergeTargets",value:function(t,r){var n,i=r.targets,a=r.originalTargetNames,o=t.targets,l=[];a.forEach((function(t){e.isDefined(o[t])||l.push(t)})),(n=t.originalTargetNames).push.apply(n,l),l.forEach((function(e){var r=t.originalTargetNames.indexOf(e);o[e]=i[e],t.processNewTarget(e,r)}))}},{key:"cloneTargetDefinition",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakMap;if(!e.isDefined(t)||"object"!==u(t))return t;if("function"==typeof t)return t;if(t instanceof o.c||t instanceof Element||t instanceof Node||t instanceof Date||t instanceof RegExp)return t;if(r.has(t))return r.get(t);if(Array.isArray(t)){var n=[];r.set(t,n);var i,a=l(t);try{for(a.s();!(i=a.n()).done;){var s=i.value;n.push(e.cloneTargetDefinition(s,r))}}catch(e){a.e(e)}finally{a.f()}return n}var c=Object.getPrototypeOf(t);if(c!==Object.prototype&&null!==c)return t;var d={};r.set(t,d);for(var h=0,f=Object.keys(t);h<f.length;h++){var v=f[h];d[v]=e.cloneTargetDefinition(t[v],r)}return d}},{key:"advanceTargetByElapsed",value:function(t,r){var n,i,a=t.targetValues[r];if(!a)return{step:0,cycle:0,valuePointer:1,done:!1};if(!a.catchupAt)return{step:t.getTargetStep(r),cycle:t.getTargetCycle(r),valuePointer:null!==(i=a.valueList)&&void 0!==i&&i.length?t.getValueListPointer(r):0,done:t.getTargetStep(r)>=t.getTargetSteps(r)};var o=e.now()-a.catchupAt;return null!==(n=a.valueList)&&void 0!==n&&n.length?e.advanceValueListTargetByElapsed(t,r,o):e.advanceSimpleTargetByElapsed(t,r,o)}},{key:"advanceSimpleTargetByElapsed",value:function(t,r,n){var i=t.getTargetSteps(r),a=t.getTargetInterval(r)||8,o=t.getTargetCycles(r),l=t.getTargetStep(r),u=t.getTargetCycle(r);if(i<=0)return{step:i,valuePointer:0,cycle:o,done:!0};for(var s=n;s>0&&u<o;){var c=Math.max(i-l,0),d=c*a;if(!(s>=d))return{step:l+=e.limit(Math.floor(s/a),0,c),steps:i,valuePointer:0,cycle:u,done:!1};if(s-=d,++u>=o)return{step:i,valuePointer:0,cycle:o,done:!0};l=0}return{step:l,steps:i,valuePointer:0,cycle:u,done:u>=o}}},{key:"advanceValueListTargetByElapsed",value:function(t,r,n){for(var i=t.targetValues[r],a=i.valueList,o=i.stepList||[1],l=i.intervalList||[i.interval||8],u=t.getTargetCycles(r),s=t.getTargetCycle(r),c=t.getValueListPointer(r),d=t.getTargetStep(r),h=n;h>0&&s<u;){for(;h>0&&c<a.length;){var f=o[(c-1)%o.length],v=l[(c-1)%l.length]||8;d=e.limit(d,0,f);var p=Math.max(f-d,0),g=p*v;if(!(h>=g))return{step:d+=e.limit(Math.floor(h/v),0,p),steps:f,valuePointer:c,cycle:s,done:!1};h-=g,c++,d=0}if(++s>=u){var y=a.length,m=o[Math.max(0,a.length-2)%o.length];return{step:m,steps:m,valuePointer:y,cycle:u,done:!0}}c=1,d=0}return{step:d,steps:o[(c-1)%o.length],valuePointer:c,cycle:s,done:s>=u}}}],(r=null)&&h(t.prototype,r),c&&h(t,c),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,c}()},585:function(e,t,r){r.d(t,{u:function(){return p}});var n,i=r(855),a=r(34),o=r(333);function l(e){return function(e){if(Array.isArray(e))return u(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){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e){return d="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},d(e)}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function f(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d(t)?t:t+""}var p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,n=[{key:"defaultActualValues",value:function(){return{x:0,y:0,width:0,height:0,opacity:1,scale:1,scrollLeft:0,scrollTop:0,borderRadius:0,children:[],isInFlow:!0,element:"div",canHaveDom:!0,isIncluded:!0,bracketThreshold:40,bracketSize:2,preventDefault:void 0,canDeleteDom:void 0}}},{key:"toCanonicalKey",value:function(t){var r,n=String(t),i=n.toLowerCase();return null!==(r=e.attributesToTargets[i])&&void 0!==r?r:n}},{key:"isLifeCycleMethod",value:function(t){return e.lifecycleMethodSet.has(t)||e.lifecyclePatterns.step.test(t)||e.lifecyclePatterns.end.test(t)}},{key:"isGpuPreferred",value:function(t){return!!e.gpuTargetMap[o.g.getTargetName(t)]}},{key:"isTransformKey",value:function(t){return!!e.transformMap[t]}}],(r=null)&&h(t.prototype,r),n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();n=p,f(p,"transformOrder",{perspective:0,translateX:1,translateY:1,translateZ:1,translate:1,translate3d:1,rotate:2,rotateX:2,rotateY:2,rotateZ:2,rotate3d:2,skew:3,skewX:3,skewY:3,scale:4,scaleX:4,scaleY:4,scaleZ:4,scale3DX:4,scale3DY:4,scale3DZ:4}),f(p,"defaultTargetStyles",{position:"absolute",left:0,top:0,zIndex:1}),f(p,"transformMap",{x:!0,y:!0,z:!0,translateX:!0,translateY:!0,translateZ:!0,perspective:!0,rotate:!0,rotateX:!0,rotateY:!0,rotateZ:!0,rotate3DX:!0,rotate3DY:!0,rotate3DZ:!0,rotate3DAngle:!0,scale:!0,scaleX:!0,scaleY:!0,scaleZ:!0,scale3DX:!0,scale3DY:!0,scale3DZ:!0,skew:!0,skewX:!0,skewY:!0}),f(p,"dimMap",{width:!0,height:!0,dim:!0}),f(p,"styleWithUnitMap",{width:!0,height:!0,fontSize:!0,lineHeight:!0,borderRadius:!0,padding:!0,paddingLeft:!0,paddingRight:!0,paddingTop:!0,paddingBottom:!0,left:!0,top:!0,right:!0,bottom:!0,wordSpacing:!0,letterSpacing:!0}),f(p,"colorMap",{color:!0,backgroundColor:!0,borderColor:!0,background:!0}),f(p,"styleTargetMap",c(c(c(c({},n.transformMap),n.styleWithUnitMap),n.colorMap),{},{dim:!0,color:!0,opacity:!0,zIndex:!0,border:!0,borderTop:!0,borderLeft:!0,borderRight:!0,borderBottom:!0})),f(p,"gpuTargetMap",c(c({},n.transformMap),{},{color:!0,backgroundColor:!0,borderColor:!0,opacity:!0,width:!0,height:!0})),f(p,"asyncStyleTargetMap",{position:!0,css:!0,style:!0,textAlign:!0,boxSizing:!0,transformStyle:!0,transformOrigin:!0,attributes:!0,justifyContent:!0,flexDirection:!0,alignItems:!0,display:!0,cursor:!0,fontFamily:!0,overflow:!0,overflowX:!0,overflowY:!0,textDecoration:!0,boxShadow:!0,fontWeight:!0,willChange:!0,backgroundImage:!0,backgroundSize:!0,flexWrap:!0,userSelect:!0,outline:!0,backfaceVisibility:!0,filter:!0}),f(p,"scaleMap",{scale:!0,scaleX:!0,scaleY:!0,scaleZ:!0,scale3DX:!0,scale3DY:!0,scale3DZ:!0}),f(p,"rotate3D",{rotate3DX:!0,rotate3DY:!0,rotate3DZ:!0}),f(p,"attributeTargetMap",{lang:!0,autoFocus:!0,placeholder:!0,autoComplete:!0,name:!0,type:!0,src:!0,href:!0,method:!0,size:!0,value:!0,maxLength:!0,minLength:!0,max:!0,min:!0,readOnly:!0,required:!0,alt:!0,disabled:!0,action:!0,accept:!0,selected:!0,rows:!0,cols:!0,tabIndex:!0,role:!0,ariaLabel:!0,ariaCurrent:!0,ariaPressed:!0}),f(p,"mustExecuteTargets",{width:!0,height:!0,heightFromDom:!0,widthFromDom:!0,fetch:!0,fetchImage:!0,isVisible:!0,canDeleteDom:!0}),f(p,"ignoreRerun",{isVisible:!0}),f(p,"ignoreTargetMethodNameMap",{isVisible:!0}),f(p,"cssFunctionMap",{skew:{x:0,y:0},translate3d:{x:0,y:0,z:0},rotate3d:{x:0,y:0,z:0,a:0},scale3d:{x:0,y:0,z:0}}),f(p,"bypassInitialProcessingTargetMap",{onChildrenChange:!0,onVisibleChildrenChange:!0,onPageClose:!0}),f(p,"controlTargetMap",{defaultStyling:!0,styling:!0,reuseDomDefinition:!0,useWindowFrame:!0,canDeleteDom:!0,onDomEvent:!0,canHaveDom:!0}),f(p,"events",{mouseStart:{pointerdown:{eventName:"mousedown",inputType:"pointer",eventType:"start",order:2,windowEvent:!1,queue:!0,rateLimit:0},mousedown:{eventName:"mousedown",inputType:"mouse",eventType:"start",order:3,windowEvent:!1,queue:!0,rateLimit:0}},mouseEnd:{pointerup:{eventName:"mouseup",inputType:"pointer",eventType:"end",order:2,windowEvent:!1,queue:!0,rateLimit:0},mouseup:{eventName:"mouseup",inputType:"mouse",eventType:"end",order:3,windowEvent:!1,queue:!0,rateLimit:0}},clickEvents:{click:{eventName:"click",inputType:"mouse",eventType:"click",order:1,windowEvent:!1,queue:!1,rateLimit:0}},touchStart:{touchstart:{eventName:"touchstart",inputType:"touch",eventType:"start",order:1,windowEvent:!1,queue:!0,rateLimit:0}},touchEnd:{touchend:{eventName:"touchend",inputType:"touch",eventType:"end",order:1,windowEvent:!1,queue:!0,rateLimit:0}},cancelEvents:{touchcancel:{eventName:"touchcancel",inputType:"touch",eventType:"cancel",order:1,windowEvent:!1,queue:!0,rateLimit:0},pointercancel:{eventName:"mousecancel",inputType:"pointer",eventType:"cancel",order:2,windowEvent:!1,queue:!0,rateLimit:0}},windowEvents:{keyup:{eventName:"key",inputType:"",eventType:"key",order:1,windowEvent:!0,queue:!0,rateLimit:50},keydown:{eventName:"keydown",inputType:"",eventType:"keydown",order:1,windowEvent:!0,queue:!0,rateLimit:50},blur:{eventName:"blur",inputType:"mouse",eventType:"cancel",order:2,windowEvent:!0,queue:!0,rateLimit:0},resize:{eventName:"resize",inputType:"",eventType:"resize",order:1,windowEvent:!0,queue:!0,rateLimit:50},orientationchange:{eventName:"resize",inputType:"",eventType:"resize",order:1,windowEvent:!0,queue:!0,rateLimit:50},scroll:{eventName:"scroll",inputType:"",eventType:"scroll",order:1,windowEvent:!0,queue:!0,rateLimit:50}},containerScroll:{scroll:{eventName:"scroll",inputType:"",eventType:"scroll",order:1,windowEvent:!1,queue:!0,rateLimit:50}},inputEvents:{input:{eventName:"input",inputType:"",eventType:"input",order:1,windowEvent:!1,queue:!0,rateLimit:50}},changeEvents:{change:{eventName:"change",inputType:"",eventType:"change",order:1,windowEvent:!1,queue:!0,rateLimit:0}},submitEvents:{submit:{eventName:"submit",inputType:"form",eventType:"submit",order:1,windowEvent:!1,queue:!0,rateLimit:0}},popState:{popstate:{eventName:"popstate",inputType:"",eventType:"popstate",order:1,windowEvent:!0,queue:!0,rateLimit:0}},leaveEvents:{pointerleave:{eventName:"mouseleave",inputType:"pointer",eventType:"leave",order:2,windowEvent:!1,queue:!0,rateLimit:0},mouseleave:{eventName:"mouseleave",inputType:"mouse",eventType:"leave",order:3,windowEvent:!1,queue:!0,rateLimit:0}},enterEvents:{pointerenter:{eventName:"mouseenter",inputType:"pointer",eventType:"enter",order:2,windowEvent:!1,queue:!0,rateLimit:0},mouseenter:{eventName:"mouseenter",inputType:"mouse",eventType:"enter",order:3,windowEvent:!1,queue:!0,rateLimit:0}},moveEvents:{touchmove:{eventName:"touchmove",inputType:"touch",eventType:"move",order:1,windowEvent:!1,queue:!0,rateLimit:50},pointermove:{eventName:"mousemove",inputType:"pointer",eventType:"move",order:2,windowEvent:!1,queue:!0,rateLimit:50},mousemove:{eventName:"mousemove",inputType:"mouse",eventType:"move",order:3,windowEvent:!1,queue:!0,rateLimit:50}},documentDragEvents:{pointermove:{eventName:"mousemove",inputType:"pointer",eventType:"move",order:2,windowEvent:!1,queue:!0,rateLimit:50,capture:!0},mousemove:{eventName:"mousemove",inputType:"mouse",eventType:"move",order:3,windowEvent:!1,queue:!0,rateLimit:50,capture:!0},touchmove:{eventName:"touchmove",inputType:"touch",eventType:"move",order:1,windowEvent:!1,queue:!0,rateLimit:50,capture:!0},pointerup:{eventName:"mouseup",inputType:"pointer",eventType:"end",order:2,windowEvent:!1,queue:!0,rateLimit:0,capture:!0},mouseup:{eventName:"mouseup",inputType:"mouse",eventType:"end",order:3,windowEvent:!1,queue:!0,rateLimit:0,capture:!0},touchend:{eventName:"touchend",inputType:"touch",eventType:"end",order:1,windowEvent:!1,queue:!0,rateLimit:0,capture:!0},pointercancel:{eventName:"mousecancel",inputType:"pointer",eventType:"cancel",order:2,windowEvent:!1,queue:!0,rateLimit:0,capture:!0},touchcancel:{eventName:"touchcancel",inputType:"touch",eventType:"cancel",order:1,windowEvent:!1,queue:!0,rateLimit:0,capture:!0}},wheelEvents:{wheel:{eventName:"wheel",inputType:"",eventType:"wheel",order:1,windowEvent:!1,queue:!0,rateLimit:50},mousewheel:{eventName:"wheel",inputType:"",eventType:"wheel",order:1,windowEvent:!1,queue:!0,rateLimit:50}}}),f(p,"attributesToTargets",{onstart:"onStart",onend:"onEnd",onkey:"onKey",onkeydown:"onKeyDown",onanykey:"onAnyKey",onclick:"onClick",onanyclick:"onAnyClick",onhover:"onHover",onswipe:"onSwipe",onanyswipe:"onAnySwipe",onpinch:"onPinch",onenter:"onEnter",onleave:"onLeave",onblur:"onBlur",onfocus:"onFocus",onscroll:"onScroll",onscrollleft:"onScrollLeft",onscrolltop:"onScrollTop",onscrollleftend:"onScrollLeftEnd",onscrolltopend:"onScrollTopEnd",onwindowscroll:"onWindowScroll",onwindowscrolltopend:"onWindowScrollTopEnd",onwindowscrollleftend:"onWindowScrollLeftEnd",onpopstate:"onPopState",onchange:"onChange",oninput:"onInput",onsubmit:"onSubmit",onvisible:"onVisible",oninvisible:"oInvisible",onresize:"onResize",textalign:"textAlign",preventdefault:"preventDefault",translatex:"translateX",translatey:"translateY",translatez:"translateZ",rotate3dx:"rotate3DX",rotate3dy:"rotate3DY",rotate3dz:"rotate3DZ",rotate3dangle:"rotate3DAngle",scale3dx:"scale3DX",scale3dy:"scale3DY",scale3dz:"scale3DZ",skewx:"skewX",skewy:"skewY",lineheight:"lineHeight",fontsize:"fontSize",borderradius:"borderRadius",letterspacing:"letterSpacing",backgroundcolor:"backgroundColor",backgroundimage:"backgroundImage",backgroundsize:"backgroundSize",bordertop:"borderTop",borderleft:"borderLeft",borderright:"borderRight",borderbottom:"borderBottom",boxsizing:"boxSizing",transformstyle:"transformStyle",transformorigin:"transformOrigin",justifycontent:"justifyContent",flexdirection:"flexDirection",flexwrap:"flexWrap",alignitems:"alignItems",fontfamily:"fontFamily",overflowx:"overflowX",overflowy:"overflowY",textdecoration:"textDecoration",boxshadow:"boxShadow",fontweight:"fontWeight",willchange:"willChange",domholder:"domHolder",shouldcalculatechildtargets:"shouldCalculateChildTargets",domparent:"domParent",containeroverflowmode:"containerOverflowMode",itemoverflowmode:"itemOverflowMode",onvisiblechildrenchange:"onVisibleChildrenChange",onchildrenchange:"onChildrenChange",isvisible:"isVisible",isinflow:"isInFlow",basewidth:"baseWidth",baseheight:"baseHeight",paddingleft:"paddingLeft",paddingright:"paddingRight",paddingtop:"paddingTop",paddingbottom:"paddingBottom",marginleft:"marginLeft",marginright:"marginRight",margintop:"marginTop",marginbottom:"marginBottom",userselect:"userSelect",arialabel:"ariaLabel",ariacurrent:"ariaCurrent",ariapressed:"ariaPressed",tabindex:"tabIndex",backfacevisibility:"backfaceVisibility"}),f(p,"targetToEventsMapping",{onStart:["touchStart","mouseStart"],onEnd:[],onKey:[],onKeyDown:[],onAnyKey:[],onBlur:[],onFocus:[],onClick:["clickEvents","touchStart","mouseStart"],onAnyClick:["clickEvents","touchStart","mouseStart"],onHover:["moveEvents"],onSwipe:["touchStart","mouseStart"],onAnySwipe:["touchStart","mouseStart"],onPinch:["touchStart"],onEnter:["enterEvents"],onLeave:["leaveEvents"],onScroll:["touchStart","mouseStart","wheelEvents"],onScrollLeft:["touchStart","mouseStart","wheelEvents"],onScrollTop:["touchStart","mouseStart","wheelEvents"],onScrollLeftEnd:["touchStart","mouseStart","wheelEvents"],onScrollTopEnd:["touchStart","mouseStart","wheelEvents"],onWindowScroll:["containerScroll"],onWindowScrollTopEnd:["containerScroll"],onWindowScrollLeftEnd:["containerScroll"],onPopState:["popState"],onChange:["changeEvents"],onInput:["inputEvents"],onSubmit:["submitEvents"]}),f(p,"internalEventMap",{onDomEvent:function(e){return e.hasDomNow},onVisible:function(e){return e.isNowVisible},onInvisible:function(e){return e.isNowInvisible},onResize:function(e){var t,r=e.getParent(),n=(0,i.S9)(),a=r?r.getDimLastUpdate():0,o=Math.max(n,a);return!!o&&(!((null!==(t=e.lastResizeHandledTime)&&void 0!==t?t:0)>=o)&&(e.lastResizeHandledTime=o,!0))}}),f(p,"allEventMap",{onStart:function(e){return(0,i.kQ)().isStartEvent()&&(0,i.kQ)().isStartHandler(e)},onEnd:function(e){return(0,i.kQ)().isEndEvent()&&(0,i.kQ)().isEndHandler(e)},onAnySwipe:function(){return(0,i.kQ)().isSwipeEvent()&&a.d.isDefined((0,i.kQ)().swipeStartX)},onHover:function(e){return(0,i.kQ)().isMoveEvent()&&(0,i.kQ)().isHoverHandler(e)},onClick:function(e){return(0,i.kQ)().isClickEvent()&&(0,i.kQ)().isClickHandler(e)},onAnyClick:function(){return(0,i.kQ)().isClickEvent()},onEnter:function(e){return(0,i.kQ)().isEnterHandler(e)},onLeave:function(e){return(0,i.kQ)().isLeaveHandler(e)},onSwipe:function(e){return(0,i.kQ)().isSwipeHandler(e)&&(0,i.kQ)().isSwipeEvent()&&a.d.isDefined((0,i.kQ)().swipeStartX)},onFocus:function(e){return(0,i.kQ)().onFocus(e)},onBlur:function(e){return(0,i.kQ)().onBlur(e)},onPinch:function(e){return(0,i.kQ)().isPinchHandler(e)},onKey:function(e){return"key"===(0,i.kQ)().getEventType()&&(0,i.kQ)().currentKey&&(0,i.kQ)().currentHandlers.focus===e&&(0,i.kQ)().currentHandlers.justFocused!==e},onKeyDown:function(e){return"keydown"===(0,i.kQ)().getEventType()&&(0,i.kQ)().currentKey&&(0,i.kQ)().currentHandlers.focus===e&&(0,i.kQ)().currentHandlers.justFocused!==e},onAnyKey:function(){return"key"===(0,i.kQ)().getEventType()&&(0,i.kQ)().currentKey},onScroll:function(e){return(0,i.kQ)().isScrollLeftHandler(e)&&(0,i.kQ)().deltaX()||(0,i.kQ)().isScrollTopHandler(e)&&(0,i.kQ)().deltaY()},onScrollTop:function(e){return"horizontal"!==(0,i.kQ)().getOrientation()&&(0,i.kQ)().isScrollTopHandler(e)&&(0,i.kQ)().deltaY()},onScrollLeft:function(e){return"vertical"!==(0,i.kQ)().getOrientation()&&(0,i.kQ)().isScrollLeftHandler(e)&&(0,i.kQ)().deltaX()},onScrollTopEnd:function(e){return"scrolltopend"===(0,i.kQ)().getEventType()&&(0,i.kQ)().isScrollTopEndHandler(e)},onScrollLeftEnd:function(e){return"scrollleftend"===(0,i.kQ)().getEventType()&&(0,i.kQ)().isScrollLeftEndHandler(e)},onWindowScroll:function(e){return"scroll"===(0,i.kQ)().getEventType()&&(0,i.kQ)().getEventTModel()===e},onWindowScrollTopEnd:function(e){return"windowscrolltopend"===(0,i.kQ)().getEventType()&&(0,i.kQ)().getEventTModel()===e},onWindowScrollLeftEnd:function(e){return"windowscrollleftend"===(0,i.kQ)().getEventType()&&(0,i.kQ)().getEventTModel()===e},onPopState:function(){return"popstate"===(0,i.kQ)().getEventType()},onChange:function(e){return"change"===(0,i.kQ)().getEventType()&&(0,i.kQ)().isFormHandler(e)},onInput:function(e){return"input"===(0,i.kQ)().getEventType()&&(0,i.kQ)().isFormHandler(e)},onSubmit:function(){return"submit"===(0,i.kQ)().getEventType()}}),f(p,"excludedTargetKeys",new Set(["originalTargetName","originalTModel","activateNextTarget","invokerTarget","invokerTModel","active","addChildAction","childAction","fetchAction"])),f(p,"lifecycleCallbackSet",new Set(["onComplete","onVisibleComplete","onValueChange","onImperativeEnd","onImperativeStep","onStepsEnd","onSuccess","onError"])),f(p,"lifecycleCoreSet",new Set(["value","steps","cycles","enabledOn","pauseOn","loop","interval"])),f(p,"lifecycleMethodSet",new Set([].concat(l(n.lifecycleCallbackSet),l(n.lifecycleCoreSet)))),f(p,"lifecyclePatterns",{step:/^on[A-Za-z]+Step$/,end:/^on[A-Za-z]+End$/}),f(p,"eventSet",new Set([].concat(l(Object.keys(n.allEventMap)),l(Object.keys(n.internalEventMap))))),f(p,"styleSet",new Set([].concat(l(Object.keys(n.styleTargetMap)),l(Object.keys(n.asyncStyleTargetMap)),l(Object.keys(n.attributeTargetMap))))),f(p,"reservedKeywordSet",new Set([].concat(l(n.styleSet),l(Object.keys(n.defaultActualValues())),l(Object.keys(n.allEventMap)),l(Object.keys(n.internalEventMap)),l(Object.keys(n.mustExecuteTargets)),["children","addChildren","addParticles","html","isInFlow","domHolder","domParent","gap","widthFromDom","heightFromDom","requiresDom","preventDefault","canDeleteDom","textOnly","styling","$dom","defaultStyling","reuseDomDefinition","canHaveDom","excludeXYCalc","excludeX","excludeY","containerOverflowMode","itemOverflowMode","baseElement","element","otype","calculateChildren","domIsland","bracketThreshold","bracketSize","shouldBeBracketed","sourceDom"]))),f(p,"activationKeywordSet",new Set(["originalTModel","originalTargetName","activateNextTarget"]))},484:function(e,t,r){r.d(t,{j:function(){return k}});var n=r(333),i=r(690),a=r(585),o=r(90),l=r(34),u=r(980),s=r(421),c=r(855),d=r(611);function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||m(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return f="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},f(e)}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t,r){return(t=w(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(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 m(e,t){if(e){if("string"==typeof e)return b(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function T(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,w(n.key),n)}}function w(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:t+""}var k=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,v=[{key:"prepareTarget",value:function(e,t){n.g.currentTargetName=t,n.g.currentTModel=e,e.isExecuted(t)&&(e.getTargetCycles(t)>1&&e.getTargetCycle(t)<e.getTargetCycles(t)-1?e.incrementTargetCycle(t):e.resetTargetCycle(t),e.resetTargetStep(t),e.resetTargetInitialValue(t))}},{key:"executeDeclarativeTarget",value:function(t,r){var i=n.g.getTargetName(r);t.allTargetMap[i]=r,e.resolveTargetValue(t,r),e.updateTarget(t,t.targetValues[r],r,!1)}},{key:"assignImperativeTargetValue",value:function(e,t,r,i){var a;e.targetValues[t]=e.targetValues[t]||n.g.emptyValue();var o=e.targetValues[t];return o.isImperative=!0,o.originalTargetName=r,o.originalTModel=i,(null===(a=e.animatingMap)||void 0===a?void 0:a.has(t))&&e.getTargetSteps(t)>0&&(0,c.s)().cancelKey(e,t),o}},{key:"resetImperativeProgress",value:function(e){e.step=0,e.cycle=0,Array.isArray(e.valueList)?e.valuePointer=1:e.valuePointer=0}},{key:"executeImperativeTarget",value:function(t,r,n,i,a,o,l,s){var c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1,d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:{},h=new Map;e._executeImperativeTarget(t,r,n,i,a,o,l,s,c,d,h),h.size&&u.T.overrideAnimatedKeyWithSnap(t,y(h.keys()),y(h.values()))}},{key:"_executeImperativeTarget",value:function(t,r,o,u,s,c,d,h){var v,g=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1,y=arguments.length>9&&void 0!==arguments[9]?arguments[9]:{},m=arguments.length>10?arguments[10]:void 0;if("string"==typeof r){var b=n.g.getTargetName(r);r=r.endsWith("+")?r:r+"+",t.allTargetMap[b]=r}if(i.D.isListTarget(o)){var T=l.d.isDefined(o.steps)?o.steps:u,w=l.d.isDefined(o.interval)?o.interval:s,k=l.d.isDefined(o.easing)?o.easing:c,S=l.d.isDefined(o.cycles)?o.cycles:g;v=e.assignImperativeTargetValue(t,r,d,h),e.assignListTarget(t,r,v,o.list,o.list[0],T,w,k,S)}else{if(i.D.isTargetSpecObject(o)){var x=e.getTargetOptions(o),M=i.D.getValueStepsCycles(t,r,o),C=M[0],E=l.d.isDefined(M[1])?M[1]:u,D=l.d.isDefined(M[2])?M[2]:s,P=l.d.isDefined(M[3])?M[3]:c,O=l.d.isDefined(M[4])?M[4]:g;return void e._executeImperativeTarget(t,r,C,E,D,P,d,h,O,x,m)}if(i.D.isObjectTarget(r,o)){var L=a.u.cssFunctionMap[r]?p(p({},a.u.cssFunctionMap[r]),o):o;Object.keys(L).forEach((function(r){var n=L[r],a=u,o=s,v=c,p=g,b=y;if("object"===f(n)&&!i.D.isListTarget(n)){b=e.getTargetOptions(n);var T=i.D.getValueStepsCycles(t,r,n);n=T[0],a=l.d.isDefined(T[1])?T[1]:u,o=l.d.isDefined(T[2])?T[2]:s,v=l.d.isDefined(T[3])?T[3]:c,p=l.d.isDefined(T[4])?T[4]:g}e._executeImperativeTarget(t,r,n,a,o,v,d,h,p,b,m)}))}else{if("object"===f(o)&&!i.D.isListTarget(o)){var A=i.D.getValueStepsCycles(t,r,o);if(o!==A[0])return o=A[0],u=l.d.isDefined(A[1])?A[1]:u,s=l.d.isDefined(A[2])?A[2]:s,c=l.d.isDefined(A[3])?A[3]:c,g=l.d.isDefined(A[4])?A[4]:g,void e._executeImperativeTarget(t,r,o,u,s,c,d,h,g,y,m)}v=e.assignImperativeTargetValue(t,r,d,h),e.assignSingleTarget(v,o,void 0,u,g,s,c)}}v&&(e.resetImperativeProgress(v),e.assignTargetOptions(v,y),e.updateTarget(t,v,r,!0,m),t.isTargetDone(r)&&n.g.shouldActivateNextTarget(t,r))}},{key:"updateTarget",value:function(t,r,n,i,o){t.setLastUpdate(n),0===t.getTargetSteps(n)&&e.snapActualToTarget(t,n,o),r.executionFlag=!0,r.executionCount++,r.snapAnimation||t.addToStyleTargetList(n,i),t.setTargetMethodName(n,"value");var l=e.calculateTargetStatus(t,r,n);t.setTargetStatus(n,l);var u=t.isTargetImperative(n)||t.shouldScheduleRun(n);!a.u.ignoreRerun[n]&&u&&(0,c.fB)().schedule(1,"updateTarget-".concat(t.oid,"-").concat(n))}},{key:"calculateTargetStatus",value:function(e,t,r){var n,i=e.getValueListPointer(r),a=e.getTargetCycle(r),o=e.getTargetCycles(r),l=e.getTargetStep(r),u=e.getTargetSteps(r);return t.snapAnimation?"done":l<u||Array.isArray(t.valueList)&&i<t.valueList.length-1?"updating":e.isTargetInLoop(r)||a<o-1?"active":null!==(n=e.targets[r])&&void 0!==n&&n.fetchAction&&!(0,c.qI)().isLoadingSuccessful(e,r)?"fetching":"done"}},{key:"assignListTarget",value:function(e,t,r,n,i,a,o,u,c){r.valueList=n,r.stepList=Array.isArray(a)?a:l.d.isDefined(a)?[a]:[1],r.intervalList=Array.isArray(o)?o:l.d.isDefined(o)?[o||8]:[8],r.easingList=Array.isArray(u)?u:l.d.isDefined(u)?[u]:[s.G.LINEAR],r.cycles=c,r.valuePointer=1,r.value=n[1],r.initialValue=i,r.steps=r.stepList[0],r.interval=r.intervalList[0],r.easing=r.easingList[0],r.step=0,r.snapAnimation=!1,e.val(t,i),e.setActual(t,i)}},{key:"assignSingleTarget",value:function(e,t,r,n,i,a,o){delete e.valueList,delete e.stepList,delete e.intervalList,delete e.easingList,l.d.isDefined(e.valuePointer)&&(e.valuePointer=0),e.initialValue=r,e.lastValue=e.value,e.value=t,e.steps=n||0,e.cycles=i||1,e.interval=a||0,e.easing=o,e.snapAnimation=!1}},{key:"snapActualToTarget",value:function(e,t,r){var n,i,a=e.targetValues[t];if(Array.isArray(a.valueList))a.valuePointer=a.valueList.length-1,i=a.valueList[a.valuePointer],a.value=i;else{var o=a.value;i="function"==typeof o?o.call(e):o}var s=e.val(t)!==i,c=null===(n=e.animatingMap)||void 0===n?void 0:n.has(t);(s||c)&&(s&&(e.val(t,i),e.setActual(t,i),l.d.handleValueChange(e,t)),e.hasValidAnimation()&&e.canBeAnimated(t)?(a.snapAnimation=!0,r?r.set(t,i):u.T.overrideAnimatedKeyWithSnap(e,t,i)):a.snapAnimation=!1)}},{key:"getTargetOptions",value:function(e){var t={};return e&&"object"===f(e)?(Object.prototype.hasOwnProperty.call(e,"pauseOn")&&(t.pauseOn=e.pauseOn),t):t}},{key:"assignTargetOptions",value:function(e,t){t&&(Object.prototype.hasOwnProperty.call(t,"pauseOn")?e.pauseOn=t.pauseOn:delete e.pauseOn)}},{key:"resolveTargetValue",value:function(t,r){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.getTargetCycle(r);if(!i.D.isIntervalTarget(t.targets[r])||1!==u){var s,d=!t.targetValues[r]&&l.d.isDefined(t.targets[r].initialValue)?t.targets[r].initialValue:void 0,v=t.targets[r],p=v&&"object"===f(v)&&l.d.isDefined(v.instances),g=p?i.D.getTargetInstances(t,r,v,u):1;if(p){var y=new Array(g);s=i.D.getValueStepsCycles(t,r,v,u,0),y[0]=s[0],s[0]=y;for(var m=t.val(r),b=1;b<g;b++){var T=Array.isArray(m)?m[b]:m;y[b]=i.D.getInstanceTargetValue(t,r,v,u,T,b)}}else s=i.D.getValueStepsCycles(t,r,v,u);var w=s[0],k=s[1]||0,S=s[2]||0,x=s[3],M=s[4]||1,C=t.targetValues[r]||n.g.emptyValue();t.targetValues[r]=C;var E,D=l.d.isDefined(x)?x:l.d.isDefined(t.targets[r].easing)?t.targets[r].easing:void 0;if(i.D.isIntervalTarget(w))e.assignSingleTarget(C,void 0,d,0,2,w.interval,D);else if(E=t.handleSpecialTarget(r,w,{steps:k,cycles:M,interval:S,easing:D})){var P,O,L,A,j=!0===E?{}:E;e.assignSingleTarget(C,w,void 0,null!==(P=j.steps)&&void 0!==P?P:k,null!==(O=j.cycles)&&void 0!==O?O:M,null!==(L=j.interval)&&void 0!==L?L:S,null!==(A=j.easing)&&void 0!==A?A:D)}else if(i.D.isChildTarget(r,w))t.addChild(w),e.assignSingleTarget(C,w,void 0,0,M,S,D);else if(i.D.isChildrenTarget(r,w)){var _,I,R,V;(Array.isArray(w)?w:w?[w]:[]).forEach((function(e){var r=t.addedChildren.length;if(t.addChild(e),t.addedChildren.length>r){var i=t.addedChildren[t.addedChildren.length-1].child;n.g.markAddChild(t,n.g.currentTargetName,i)}}));var N=t.finalizeChildrenTarget(r,{steps:k,cycles:M,interval:S,easing:D}),F=N&&"object"===f(N)?N:{};e.assignSingleTarget(C,w,void 0,null!==(_=F.steps)&&void 0!==_?_:0,null!==(I=F.cycles)&&void 0!==I?I:M,null!==(R=F.interval)&&void 0!==R?R:S,null!==(V=F.easing)&&void 0!==V?V:D)}else if(i.D.isChildObjectTarget(r,t.targets[r])){var B=e.createTModel(r,t.targets[r]);t.addChild(B);var H=Object.fromEntries(Object.entries(w).filter((function(e){var t=h(e,1)[0];return!a.u.excludedTargetKeys.has(t)})));e.assignSingleTarget(C,H,void 0,0,M,S,D)}else if("object"===f(w)&&!0===w.asChild){var U=new o.c(r,w);t.addChild(U),e.assignSingleTarget(C,w,void 0,0,M,S,D)}else if(i.D.isFetchTarget(r,w))e.assignSingleTarget(C,w,void 0,0,M,S,D),(0,c.qI)().fetch(t,w);else if(i.D.isFetchImageTarget(r,w))e.assignSingleTarget(C,w,void 0,0,M,S,D),(0,c.qI)().fetchImage(t,w);else if(i.D.isListTarget(w))e.assignListTarget(t,r,C,w.list,w.list[0],k,S,D,M);else{var W,q;k>0&&!l.d.areEqual(t.val(r),w,null!==(W=null===(q=t.targets[r])||void 0===q?void 0:q.deepEquality)&&void 0!==W&&W)&&t.resetTargetStep(r),e.assignSingleTarget(C,w,d,k,M,S,D)}}}},{key:"createTModel",value:function(e,t){return d.E.create(e,t,(function(e,t){return new o.c(e,t)}))}}],(r=null)&&T(t.prototype,r),v&&T(t,v),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,v}()},690:function(e,t,r){r.d(t,{D:function(){return d}});var n=r(333),i=r(585),a=r(34),o=r(90),l=r(421);function u(e){return u="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},u(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}var d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,c=[{key:"isPlainObject",value:function(e){return!!e&&"object"===u(e)&&!Array.isArray(e)&&e.constructor===Object}},{key:"hasLifecycle",value:function(e){for(var t in e)if("function"==typeof e[t]&&i.u.isLifeCycleMethod(t))return!0;return!1}},{key:"hasTargetSuffix",value:function(e){return/\${1,2}$/.test(e)||e.startsWith("_")}},{key:"isTargetKey",value:function(e){return e=n.g.getTargetName(e),i.u.reservedKeywordSet.has(e)}},{key:"scoreChild",value:function(t){var r=0,n=0;for(var a in t){var o=t[a];if(!i.u.defaultTargetStyles[a]&&!i.u.excludedTargetKeys.has(a)&&"active"!==a){if(e.hasTargetSuffix(a))return!0;if(this.hasLifecycle(o))return!0;e.isTargetKey(a)?r++:i.u.activationKeywordSet.has(a)||"function"==typeof t[a]||n++}}return r-n>=1}},{key:"classifyEntry",value:function(t,r){return e.isPlainObject(r)?e.isTargetKey(t)?"target2":"originalTModel"===t?"target3":r instanceof o.c?"children":e.isListTarget(r)||e.isFetchTarget(t,r)||e.isFetchImageTarget(t,r)?"target4":this.hasLifecycle(r)?"target5":this.scoreChild(r)?"children":"target6":"target1"}},{key:"isTargetSpecObject",value:function(e){return!(!e||"object"!==u(e)||Array.isArray(e)||Object.getPrototypeOf(e)!==Object.prototype)&&(Object.prototype.hasOwnProperty.call(e,"value")||Object.prototype.hasOwnProperty.call(e,"steps")||Object.prototype.hasOwnProperty.call(e,"interval")||Object.prototype.hasOwnProperty.call(e,"easing")||Object.prototype.hasOwnProperty.call(e,"cycles")||Object.prototype.hasOwnProperty.call(e,"instances"))}},{key:"getTargetInstances",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.targets[t],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.getTargetCycle(t);if(!r||"object"!==u(r)||!a.d.isDefined(r.instances))return 1;var i="function"==typeof r.instances?r.instances.call(e,n):r.instances;return Math.max(1,Math.floor(Number(i)||1))}},{key:"getInstanceTargetValue",value:function(e,t,r,n,i,o){return a.d.runTargetValue(e,r,t,n,i,o)}},{key:"isChildrenTarget",value:function(e,t){return("children"===n.g.getTargetName(e)||"addChildren"===n.g.getTargetName(e))&&"object"===u(t)}},{key:"isChildTarget",value:function(e,t){return"child"===n.g.getTargetName(e)&&"object"===u(t)}},{key:"isChildObjectTarget",value:function(t,r){return"children"===e.classifyEntry(t,r)}},{key:"isListTarget",value:function(e){return"object"===u(e)&&null!==e&&Array.isArray(e.list)}},{key:"isFetchTarget",value:function(e,t){return!("fetch"!==n.g.getTargetName(e)||"string"!=typeof t&&!Array.isArray(t)&&(!t||"object"!==u(t)||"string"!=typeof t.url))}},{key:"isFetchImageTarget",value:function(e,t){return"fetchImage"===n.g.getTargetName(e)&&t&&("string"==typeof t||Array.isArray(t))}},{key:"isObjectTarget",value:function(t,r){return"style"!==n.g.getTargetName(t)&&"object"===u(r)&&null!==r&&!Array.isArray(r)&&Object.getPrototypeOf(r)===Object.prototype&&!e.isTargetSpecObject(r)}},{key:"isIntervalTarget",value:function(e){return!(!e||"object"!==u(e))&&(!(!e.isInterval||!a.d.isDefined(e.interval))||a.d.isDefined(e.interval)&&!a.d.isDefined(e.loop)&&!a.d.isDefined(e.steps)&&!a.d.isDefined(e.cycles))}},{key:"isPrimitiveArray",value:function(e){return!!Array.isArray(e)&&e.every((function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}))}},{key:"isValueStepsCycleArray",value:function(t){if(!Array.isArray(t)||0===t.length||t.length>5)return!1;if("number"!=typeof t[0]&&"string"!=typeof t[0]&&!e.isListTarget(t[0]))return!1;if(t.length>=2&&"number"!=typeof t[1])return!1;if(t.length>=3&&"number"!=typeof t[2])return!1;if(t.length>=4){var r=t[3],n="number"==typeof r,i="string"==typeof r&&l.G.easeMap.has(r);if(!n&&!i)return!1}if(5===t.length){var a=t[3],o=t[4];if("string"!=typeof a||!l.G.easeMap.has(a))return!1;if("number"!=typeof o)return!1}return e.isListTarget(t[0])||t.length>=2}},{key:"getValueStepsCycles",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.targets[r],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.getTargetCycle(r),o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,l=n&&n.valueOnly,s=t.val(r),c=null,d=0,h=0,f=void 0,v=1,p=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return"function"==typeof e?e.call.apply(e,[t].concat(n)):e};return function n(g){if(Array.isArray(g))return y=g,l||!e.isValueStepsCycleArray(y)?[y,d,h,f,v]:(c=y[0],d=y.length>=2?y[1]:d,h=y.length>=3?y[2]:h,y.length>=4&&("string"==typeof y[3]?(f=y[3],v=y.length>=5?y[4]:v):v=y[3]),[c,d,h,f,v]);var y;if("object"===u(g)&&null!==g&&Object.getPrototypeOf(g)===Object.prototype){var m=a.d.runTargetValue(t,g,r,i,s,o);return e.isPrimitiveArray(m)&&(a.d.isDefined(g.steps)||a.d.isDefined(g.interval)||a.d.isDefined(g.easing)||a.d.isDefined(g.cycles))?(c={list:m},d=a.d.isDefined(g.steps)?p(g.steps,i):0,h=a.d.isDefined(g.interval)?p(g.interval,i):8,f=a.d.isDefined(g.easing)?p(g.easing,i):f,v=a.d.isDefined(g.cycles)?p(g.cycles,i,t.getTargetCycles(r)):1,[c,d,h,f,v]):"object"===u(m)&&a.d.isDefined(m.value)&&a.d.isDefined(m.steps)?n(m):(c=m,d=a.d.isDefined(g.steps)?p(g.steps,i):0,h=a.d.isDefined(g.interval)?p(g.interval,i):0,f=a.d.isDefined(g.easing)?p(g.easing,i):f,v=a.d.isDefined(g.cycles)?p(g.cycles,i,t.getTargetCycles(r)):1,Array.isArray(c)?n(c):[c,d,h,f,v])}return"function"==typeof g?n(g.call(t,i,s)):[g,d,h,f,v]}(n)}}],(r=null)&&s(t.prototype,r),c&&s(t,c),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,c}()},333:function(e,t,r){r.d(t,{g:function(){return f}});var n=r(855),i=r(34),a=r(585);function o(e){return o="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},o(e)}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(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){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function h(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,s=[{key:"emptyValue",value:function(){return{value:void 0,actual:void 0,step:0,steps:0,cycle:0,valuePointer:0,cycles:1,interval:0,initialValue:void 0,scheduleTimeStamp:void 0,lastUpdate:0,updateCount:0,completeCount:0,completeTime:0,executionCount:0,visibleCompleteCount:0,status:"",executionFlag:!1,isImperative:!1,originalTargetName:void 0,easing:void 0,creationTime:i.d.now()}}},{key:"getTargetName",value:function(e){if(e){for(var t=e.startsWith("_")?1:0,r=e.length;r>t&&"$"===e[r-1];)r--;return"+"===e[r-1]&&r--,e.slice(t,r)}}},{key:"bindTarget",value:function(t,r,i,o,l){var u=t.targets[r],s=void 0!==i?t.getLastUpdate(i):void 0,c=function(){return void 0!==i?t.getLastUpdate(i):void 0},d=function(){var e=c();return(void 0!==s||void 0!==e)&&(void 0===s&&void 0!==e||e!==s)};u.originalTargetName=e.currentTargetName,u.originalTModel=e.currentTModel;var h=r.startsWith("_")?r.slice(1):r,f=!(!o||!o.endsWith("$"));if(!u.activateNextTarget){var v;if(f)v=o;else for(var p=t.originalTargetNames,g=l+1;g<p.length;g++){var y=p[g];if(y.endsWith("$$")){v=y;break}}v&&(u.activateNextTarget=v)}Object.keys(u).forEach((function(o){var l,f=u[o],v=null!==(l=null==f?void 0:f.__targetjsSource)&&void 0!==l?l:f;if("value"===o||"function"==typeof v&&a.u.isLifeCycleMethod(o)){var p=function(){var l;a.u.lifecycleCoreSet.has(o)||(e.currentTargetName=r,e.currentTModel=t),this.key=h,this.value=this.val(h),this.prevTargetValue=function(){if(i)return(0,n.qI)().isLoading(t,i)?(0,n.qI)().getLoadingItemValue(t,i,r):t.targetValues[i]?t.targetValues[i].actual:t.val(i)}(),this.isPrevTargetUpdated=d;var u="function"==typeof v?v.apply(this,arguments):v;return s=null!==(l=c())&&void 0!==l?l:s,u};p.__targetjsSource=v,u[o]=p}}))}},{key:"shouldActivateNextTarget",value:function(t,r){var i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,l=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!(a>4)&&t){var u="update"===(arguments.length>5&&void 0!==arguments[5]?arguments[5]:"complete"),s=!u;if(t.isTargetImperative(r)){var c=t.targetValues[r],d=c.originalTModel,h=c.originalTargetName;return e.shouldActivateNextTarget(d,h,a+1,o,!0,"update"),void(s&&(e.cleanupTarget(t,r),e.isTargetFullyCompleted(t,r)&&e.shouldActivateNextTarget(d,h,a+1,o,!0,"complete")))}var f=t.targets[r],v=t.targetValues[r];if(f&&v){var p=f.activateNextTarget,g=null!==(i=null==p?void 0:p.endsWith("$$"))&&void 0!==i&&i,y=f.fetchAction;if(!u||!g){var m=!1,b=!1;if(p){if(g){var T=e.getTriggeredByCompleteCount(t,p,r);v.completeCount>T&&(b=!0)}else{var w,k=null!==(w=v.nextTargetUpdateCount)&&void 0!==w?w:0;b=v.updateCount>k}if(!g&&0===o&&(b||l)||g&&b){var S=!!g&&e.arePreviousTargetsComplete(t,p);if(y)if(g)!0===S?e.activateTargetOnce(t,p)&&(m=!0,e.clearPendingTargetsForNextTarget(t,p)):e.markPendingTargets(t,r);else for(;(0,n.qI)().isNextLoadingItemSuccessful(t,r);)t.activatedTargets.indexOf(p)>=0?t.activatedTargets.push(p):e.activateTarget(t,p),(0,n.qI)().nextActiveItem(t,r),m=!0;else g?!0===S?(e.activateTarget(t,p),m=!0,e.clearPendingTargetsForNextTarget(t,p)):e.markPendingTargets(t,r):g||(t.activatedTargets.indexOf(p)>=0&&!t.isTargetUpdating(r)?t.activatedTargets.push(p):(e.activateTarget(t,p),m=!0))}else s&&t.isTargetDone(p)&&e.cleanupTarget(t,p)}m&&(g?e.snapshotTriggeredByCompleteCounts(t,p):v.nextTargetUpdateCount=v.updateCount);var x=!1;if(g&&p){var M=e.getTriggeredByCompleteCount(t,p,r);x=v.completeCount<=M}if(!m&&s)if(p&&x&&!y)e.shouldActivateNextTarget(t,p,a,o+1,l,"complete");else if(!p){var C=f.originalTModel,E=f.originalTargetName;C&&E&&e.shouldActivateNextTarget(C,E,a+1,o,l,"complete")}s&&e.cleanupTarget(t,r)}}}}},{key:"markPendingTargets",value:function(e,t){(e.pendingTargets||(e.pendingTargets=new Set)).add(t)}},{key:"clearPendingTarget",value:function(e,t){var r=e.pendingTargets;r&&(r.delete(t),0===r.size&&(e.pendingTargets=void 0))}},{key:"clearPendingTargetsForNextTarget",value:function(e,t){var r=e.pendingTargets;if(r){for(var n=0,i=u(r);n<i.length;n++){var a,o=i[n];(null===(a=e.targets[o])||void 0===a?void 0:a.activateNextTarget)===t&&r.delete(o)}0===r.size&&(e.pendingTargets=void 0)}}},{key:"cleanupTarget",value:function(t,r){if(e.cleanupVisibleComplete(t,r),t.isTargetComplete(r)||!e.isTargetFullyCompleted(t,r))return!1;t.setTargetComplete(r);var i=t.targets[r];if("function"==typeof(null==i?void 0:i.onComplete)&&(i.onComplete.call(t),t.setTargetMethodName(r,"onComplete")),(null==i?void 0:i.fetchAction)&&(0,n.qI)().isLoadingSuccessful(t,r)){var a=t.fetchActionTargetList.indexOf(r);a>=0&&t.fetchActionTargetList.splice(a,1),i.fetchAction=!1}return e.bubbleInvokerCompletion(t,r),!0}},{key:"cleanupVisibleComplete",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.targets[r];if(!n||"function"!=typeof n.onVisibleComplete)return!1;var i=t.targetValues[r];if(!i)return!1;if(!0!==e.isTargetTreeComplete(t,r,"visible"))return!1;var a=e.getVisibleCompletionSignature(t);return i.visibleCompleteSignature!==a&&(i.visibleCompleteSignature=a,n.onVisibleComplete.call(t),t.setTargetMethodName(r,"onVisibleComplete"),!0)}},{key:"getVisibleCompletionSignature",value:function(e){return e.visibleChildren.map((function(e){return e.oid})).sort().join("|")}},{key:"bubbleInvokerCompletion",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Set,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(t&&r){var o="".concat(t.oid,":").concat(r);if(!(n.has(o)||a>4)){n.add(o);var l=t.targetValues[r];if(l){var u,s,c=function(t,r){if(t&&r){var o="".concat(t.oid,":").concat(r);i.has(o)||(i.add(o),e.cleanupTarget(t,r)),e.bubbleInvokerCompletion(t,r,n,i,a+1)}};c(l.originalTModel,l.originalTargetName),t.isTargetImperative(r)||(c(l.invokerTModel,l.invokerTargetName),c(null===(u=t.targets[r])||void 0===u?void 0:u.originalTModel,null===(s=t.targets[r])||void 0===s?void 0:s.originalTargetName))}}}}},{key:"getTriggeredByCompleteCount",value:function(e,t,r){var n,i;return null!==(n=null===(i=e.targetValues[t])||void 0===i||null===(i=i.triggeredByCompleteCountMap)||void 0===i?void 0:i.get(r))&&void 0!==n?n:0}},{key:"snapshotTriggeredByCompleteCounts",value:function(t,r){var n,i=(n=t.targetValues)[r]||(n[r]=e.emptyValue()),a=i.triggeredByCompleteCountMap||(i.triggeredByCompleteCountMap=new Map),o=t.functionTargetNames.indexOf(r);if(!(o<0))for(var l=0;l<o;l++){var u,s,c=t.functionTargetNames[l],d=t.targets[c];if((null==d?void 0:d.activateNextTarget)===r){var h=null!==(u=null===(s=t.targetValues[c])||void 0===s?void 0:s.completeCount)&&void 0!==u?u:0;a.set(c,h)}}}},{key:"activateTargetOnce",value:function(t,r){var n,i,a=(n=t.targetValues)[r]||(n[r]=e.emptyValue()),o=null!==(i=a.activationTime)&&void 0!==i?i:0;return!(o>0&&o>=t.getLastUpdate(r)||(a.activationTime=t.getLastUpdate(r)+.001,t.activateTarget(r),0))}},{key:"activateTarget",value:function(e,t){e.activateTarget(t)}},{key:"isTModelComplete",value:function(t){var r,i,a,o,l,u,s,c,d,h,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all",v=t.state();return"visible"===f?!!e.shouldIgnoreChildForCompletion(t,"visible")||!(null!==(u=v.updatingTargetList)&&void 0!==u&&u.length)&&!(null!==(s=v.activeTargetList)&&void 0!==s&&s.length)&&!(null!==(c=v.activatedTargets)&&void 0!==c&&c.length)&&!t.hasAnimatingTargets()&&e.isFetchingComplete(t)&&0===e.getUpdatingChildren(t,void 0,"visible").size&&0===e.getActiveChildren(t,"visible").size&&!(null!==(d=v.lastChildrenUpdate)&&void 0!==d&&null!==(d=d.deletions)&&void 0!==d&&d.length)&&!(null!==(h=v.lastChildrenUpdate)&&void 0!==h&&null!==(h=h.additions)&&void 0!==h&&h.length)&&!t.noDomUpdatingTargets&&!t.pendingTargets&&!(0,n.EI)().needsReattach(t):!(null!==(r=v.updatingTargetList)&&void 0!==r&&r.length)&&!(null!==(i=v.activeTargetList)&&void 0!==i&&i.length)&&!(null!==(a=v.activatedTargets)&&void 0!==a&&a.length)&&!t.hasAnimatingTargets()&&e.isFetchingComplete(t)&&!t.hasAnimatingChildren()&&!t.hasUpdatingChildren()&&!t.hasActiveChildren()&&!(null!==(o=v.lastChildrenUpdate)&&void 0!==o&&null!==(o=o.deletions)&&void 0!==o&&o.length)&&!(null!==(l=v.lastChildrenUpdate)&&void 0!==l&&null!==(l=l.additions)&&void 0!==l&&l.length)&&!t.noDomUpdatingTargets&&!t.pendingTargets&&!(0,n.EI)().needsReattach(t)}},{key:"getCompletionBlockers",value:function(t){var r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all",o=t.state(),l=[],s=function(e,t){t&&l.push({name:e,value:t})},c=function(e){return e?e instanceof Set?u(e):e instanceof Map?u(e.keys()):Array.isArray(e)?e:[e]:[]};if("visible"===a){var d,h;if(e.shouldIgnoreChildForCompletion(t,"visible"))return[];var f=e.getUpdatingChildren(t,void 0,"visible"),v=e.getActiveChildren(t,"visible");return s("updatingTargetList",c(o.updatingTargetList)),s("activeTargetList",c(o.activeTargetList)),s("activatedTargets",c(o.activatedTargets)),s("animatingTargets",t.hasAnimatingTargets()?c(t.animatingMap):[]),s("fetching",!e.isFetchingComplete(t)),s("updatingChildren",u(f.keys())),s("activeChildren",u(v.keys())),s("deletedChildren",c(null===(d=o.lastChildrenUpdate)||void 0===d?void 0:d.deletions)),s("addedChildren",c(null===(h=o.lastChildrenUpdate)||void 0===h?void 0:h.additions)),s("noDomUpdatingTargets",c(t.noDomUpdatingTargets)),s("pendingTargets",c(t.pendingTargets)),s("needsReattach",!!(0,n.EI)().needsReattach(t)),l.filter((function(e){return Array.isArray(e.value)?e.value.length>0:!!e.value}))}return s("updatingTargetList",c(o.updatingTargetList)),s("activeTargetList",c(o.activeTargetList)),s("activatedTargets",c(o.activatedTargets)),s("animatingTargets",t.hasAnimatingTargets()?c(t.animatingMap):[]),s("fetching",!e.isFetchingComplete(t)),s("animatingChildren",!!t.hasAnimatingChildren()),s("updatingChildren",t.hasUpdatingChildren()?c(t.updatingChildrenMap):[]),s("activeChildren",t.hasActiveChildren()?c(t.activeChildrenMap):[]),s("deletedChildren",c(null===(r=o.lastChildrenUpdate)||void 0===r?void 0:r.deletions)),s("addedChildren",c(null===(i=o.lastChildrenUpdate)||void 0===i?void 0:i.additions)),s("noDomUpdatingTargets",c(t.noDomUpdatingTargets)),s("pendingTargets",c(t.pendingTargets)),s("needsReattach",!!(0,n.EI)().needsReattach(t)),l.filter((function(e){return Array.isArray(e.value)?e.value.length>0:!!e.value}))}},{key:"isFetchingComplete",value:function(e){var t=e.state().fetchActionTargetList;if(!t)return!0;var r,i=l(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(!(0,n.qI)().isLoadingSuccessful(e,a))return!1}}catch(e){i.e(e)}finally{i.f()}return!0}},{key:"isTargetFullyCompleted",value:function(t,r){var n=!t.isTargetUpdating(r)&&!0===t.isTargetTreeComplete(r);return n&&!t.isTargetImperative(r)&&(n=!t.hasUpdatingImperativeTargets(r)),n&&r.endsWith("$$")&&(n=!0===e.arePreviousTargetsComplete(t,r)),n}},{key:"arePreviousTargetsComplete",value:function(e,t){for(var r=e.functionTargetNames.findIndex((function(e){return t===e}))-1;r>=0;r--){var n=e.functionTargetNames[r];if(!e.isTargetImperative(n)){if(e.activatedTargets.indexOf(n)>=0)return"activated targets";if(e.hasUpdatingImperativeTargets(n))return e.oid+"."+n+": "+e.getUpdatingImperativeTargets(n);if(!0!==e.isTargetTreeComplete(n))return!1}}return!0}},{key:"isTargetTreeComplete",value:function(t,r,i){var l=t.targets[r];if(l){var u,s,c,d=null!=i?i:l.completionScope,h=o(l.value);if(a.u.controlTargetMap[r])return!0;if(!l.fetchAction&&("string"===h||"number"===h||"boolean"===h))return!0;if((0,n.EI)().needsReattach(t))return"needs Reattach";if((0,n.EI)().shouldHaveDom(t)&&!t.hasDom())return"no dom";if(!t.isTargetComplete(r)&&!t.isTargetDone(r))return"not done";if((null===(u=l.childAction)||void 0===u?void 0:u.length)>0&&e.getUpdatingChildren(t,r,d).size>0)return"updating children";if((null===(s=l.childAction)||void 0===s?void 0:s.length)>0&&e.getActiveChildren(t,d).size>0)return"active children";if((null===(c=l.childAction)||void 0===c?void 0:c.length)>0&&!0!==e.areTargetChildrenComplete(l.childAction,d))return"incomplete children";if(l.fetchAction&&!(0,n.qI)().isLoadingSuccessful(t,r))return"incomplete loading"}return!0}},{key:"areTargetChildrenComplete",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";if(!t)return!0;var n,i=l(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(!e.shouldIgnoreChildForCompletion(a,r)){if(a.exists()&&!e.isTModelComplete(a,r))return a.oid;if(a.hasChildren()){var o=e.areTargetChildrenComplete(a.getChildren(),r);if(!0!==o)return o}}}}catch(e){i.e(e)}finally{i.f()}return!0}},{key:"getUpdatingChildren",value:function(t,r){var n,i,a,o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all",c=new Map;return[].concat(u(null!==(n=null===(i=t.updatingChildrenMap)||void 0===i?void 0:i.values())&&void 0!==n?n:[]),u(null!==(a=null===(o=t.animatingChildrenMap)||void 0===o?void 0:o.values())&&void 0!==a?a:[])).forEach((function(t){var n,i;if(!e.shouldIgnoreChildForCompletion(t,s)){var a,o=l([].concat(u(null!==(n=t.updatingTargetList)&&void 0!==n?n:[]),u(t.animatingMap?u(t.animatingMap.keys()):[]),u(null!==(i=t.noDomUpdatingTargets)&&void 0!==i?i:[])));try{for(o.s();!(a=o.n()).done;){var d,h,f=a.value;if(null===(d=t.targetValues[f])||void 0===d||!d.snapAnimation)if(t.isTargetImperative(f)){var v,p=null===(v=t.targetValues[f])||void 0===v?void 0:v.originalTargetName;if(p===r)c.set(t.oid,t);else if(p){var g,y;(null===(y=(null===(g=t.targetValues[f])||void 0===g?void 0:g.originalTModel).targets[p])||void 0===y?void 0:y.originalTargetName)===r&&c.set(t.oid,t)}}else(null===(h=t.targets[f])||void 0===h?void 0:h.invokerTargetName)===r&&c.set(t.oid,t)}}catch(e){o.e(e)}finally{o.f()}}})),c}},{key:"hasVisibleActiveChild",value:function(t){var r,n,i;if(e.shouldIgnoreChildForCompletion(t,"visible"))return!1;if((null===(r=t.activeTargetList)||void 0===r?void 0:r.length)>0)return!0;var a,o=l(null!==(n=null===(i=t.getChildren)||void 0===i?void 0:i.call(t))&&void 0!==n?n:[]);try{for(o.s();!(a=o.n()).done;){var u=a.value;if(e.hasVisibleActiveChild(u))return!0}}catch(e){o.e(e)}finally{o.f()}return!1}},{key:"getActiveChildren",value:function(t){var r,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all",a=new Map;return u(null!==(r=null===(n=t.activeChildrenMap)||void 0===n?void 0:n.values())&&void 0!==r?r:[]).forEach((function(t){"visible"!==i?e.shouldIgnoreChildForCompletion(t,i)||t.activeTargetList.length&&a.set(t.oid,t):e.hasVisibleActiveChild(t)&&a.set(t.oid,t)})),a}},{key:"shouldIgnoreChildForCompletion",value:function(e,t){return!e||!e.exists()||"none"===t||"visible"===t&&!0!==(null===(r=e.visibilityStatus)||void 0===r?void 0:r.isVisible);var r}},{key:"activateSingleTarget",value:function(e,t){e.targets[t]&&e.canTargetBeActivated(t)&&(e.isTargetEnabled(t)?e.activateTarget(t):e.addToActiveTargets(t))}},{key:"markChildAction",value:function(e,t,r){var n=e.targets[t];"object"===o(n)&&(n.childAction?n.childAction.includes(r)||n.childAction.push(r):n.childAction=[r])}},{key:"markAddChild",value:function(e,t,r){var n=e.targets[t];"object"===o(n)&&(n.addChildAction?n.addChildAction.includes(r)||n.addChildAction.push(r):n.addChildAction=[r])}},{key:"markFetchAction",value:function(t){if(t){var r=e.currentTargetName,n=t.targets[r];"object"===o(n)&&(n.fetchAction=!0,t.fetchActionTargetList.includes(r)||t.fetchActionTargetList.push(r))}}},{key:"wrapTarget",value:function(t,r,n){return a.u.controlTargetMap[n]||(t.targets[n]={value:r,originalTargetName:e.currentTargetName,originalTModel:e.currentTModel},r=t.targets[n]),r}},{key:"resetBeforeDeletion",value:function(e){var t;e.updatingTargetList.length=0,e.activeTargetList.length=0,null===(t=e.animatingMap)||void 0===t||t.clear(),e.clearUpdatingChildren(),e.clearActiveChildren(),e.clearAnimatingChildren(),(0,n.zw)().domIslandSet.delete(e),n.qw.tmodelIdMap[e.oid]===e&&delete n.qw.tmodelIdMap[e.oid]}},{key:"getOriginalNames",value:function(e,t){var r,n,i,a,o,l;return e.isTargetImperative(t)?(r=null===(i=e.targetValues[t])||void 0===i?void 0:i.originalTModel,n=null===(a=e.targetValues[t])||void 0===a?void 0:a.originalTargetName):(r=null===(o=e.targets[t])||void 0===o?void 0:o.originalTModel,n=null===(l=e.targets[t])||void 0===l?void 0:l.originalTargetName),{originalTModel:r,originalTargetName:n}}},{key:"resetTargetState",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Set;if(t&&r){e.resetSingleTargetState(t,r),e.resetTargetChildActions(t,r,n,i);var a=t.targets[r],o=null==a?void 0:a.activateNextTarget,l=t.targets[o];l&&(o.endsWith("$")||!1!==l.active)&&(e.resetTargetsBetween(t,r,o,n,i),e.resetTargetPipelineState(t,o,n,i))}}},{key:"resetTargetPipelineState",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Set;if(t&&r){e.resetSingleTargetState(t,r),e.resetTargetChildActions(t,r,n,i);var a=t.targets[r],o=null==a?void 0:a.activateNextTarget;if(o){var l=t.targets[o];l&&(o.endsWith("$")||!1!==l.active)&&(e.resetTargetsBetween(t,r,o,n,i),e.resetTargetPipelineState(t,o,n,i))}}}},{key:"resetTargetsBetween",value:function(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new Set,o=t.functionTargetNames,l=o.indexOf(r),u=o.indexOf(n);if(!(l<0||u<0||u<=l))for(var s=l+1;s<u;s++){var c=o[s];e.resetSingleTargetState(t,c),e.resetTargetChildActions(t,c,i,a)}}},{key:"resetTargetChildState",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set,i="".concat(t.oid);if(!n.has(i)){n.add(i);for(var a=Object.keys(t.targetValues),o=0;o<a.length;o++){var l=a[o];e.resetSingleTargetState(t,l),e.resetTargetChildActions(t,l,r,n)}}}},{key:"resetTargetChildActions",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Set,a=t.targets[r];if(a){var o=a.childAction?u(a.childAction):[],l=a.addChildAction?u(a.addChildAction):[];o.forEach((function(t){t&&e.resetTargetChildState(t,n,i)})),l.forEach((function(t){t&&e.resetTargetChildState(t,n,i)})),n.clearChildActions&&(Array.isArray(a.childAction)&&(a.childAction.length=0),Array.isArray(a.addChildAction)&&(a.addChildAction.length=0))}}},{key:"clearTriggeredByCompleteCount",value:function(e,t,r){var n=e.targetValues[t],i=null==n?void 0:n.triggeredByCompleteCountMap;i&&(i.delete(r),0===i.size&&(n.triggeredByCompleteCountMap=void 0))}},{key:"resetSingleTargetState",value:function(t,r){var n,i=t.targetValues[r],a=null===(n=t.targets[r])||void 0===n?void 0:n.activateNextTarget;null!=a&&a.endsWith("$$")&&e.clearTriggeredByCompleteCount(t,a,r),i&&(i.completeCount=0,i.triggeredByCompleteCountMap=void 0,i.resetFlag=!0,i.nextTargetUpdateCount=0,i.visibleCompleteSignature=void 0,i.status=""),t.cancelAnimation(),t.activatedTargets.length=0,t.removeFromActiveTargets(r),t.removeFromAnimatingMap(r),t.removeFromUpdatingTargets(r),e.clearPendingTarget(t,r)}},{key:"convertAnimatingTargetsToUpdating",value:function(e){var t,r=l(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(null!=n&&n.hasAnimatingTargets()){var i,a=l(u(n.getAnimatingTargets()));try{for(a.s();!(i=a.n()).done;){var o=i.value;n.setTargetStatus(o,"updating"),n.removeFromAnimatingMap(o)}}catch(e){a.e(e)}finally{a.f()}}}}catch(e){r.e(e)}finally{r.f()}}},{key:"getResetOptions",value:function(e){var t=null==e?void 0:e.reset;return{shouldReset:!0===t||"pipeline"===t||"tree"===t||"all"===t,clearChildActions:"tree"===t||"all"===t}}}],(r=null)&&d(t.prototype,r),s&&d(t,s),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,s}()},530:function(e,t,r){r.d(t,{L:function(){return l}});var n=r(249);function i(e){return i="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},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function o(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}var l=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.xNext=0,this.xNorth=0,this.xWest=0,this.xEast=0,this.xSouth=0,this.scrollLeft=0,this.scrollTop=0,this.absX=0,this.absY=0,this.xOverflowReset=0,this.xOverflowLimit=0,this.yNext=0,this.yNorth=0,this.yWest=0,this.yEast=0,this.ySouth=0,this.container=void 0,this.time=0},(t=[{key:"setContainer",value:function(e){this.container=e}},{key:"setCurrentChild",value:function(e){this.currentChild=e}},{key:"setLocation",value:function(){var e=this.currentChild;e.targets.excludeXYCalc||(e.setLayoutX(this.xNext+e.getMarginLeft()+this.container.getPaddingLeft()),e.setLayoutY(this.yNext+e.getMarginTop()+this.container.getPaddingTop()))}},{key:"isOverflow",value:function(){return"BI"!==this.currentChild.type&&(!("always"!==this.container.getContainerOverflowMode()&&"always"!==this.currentChild.getItemOverflowMode()&&("auto"!==this.container.getContainerOverflowMode()||"auto"!==this.currentChild.getItemOverflowMode()||this.currentChild.useContentWidth()||!this.checkChildOverflow()))||void 0)}},{key:"checkChildOverflow",value:function(){var e=this.currentChild,t=e.getMinWidth();return this.xNext+e.getMarginLeft()+t+e.getMarginRight()>this.xOverflowLimit}},{key:"overflow",value:function(){this.xNext=this.scrollLeft-this.xOverflowReset,this.yNext=Math.max(this.currentChild.getRealParent().viewport.ySouth,this.ySouth)}},{key:"appendNewLine",value:function(){var e=this.currentChild,t=e.getMeasuringScale(),r=e.getHeight()*t+this.currentChild.getMarginTop()+this.currentChild.getMarginBottom();this.xNext=this.scrollLeft-this.xOverflowReset;var n=this.yNext+r+e.val("appendNewLine");this.yEast=this.yNext,this.xSouth=this.xNext,this.ySouth=Math.max(this.ySouth,n),this.yEast=this.ySouth,this.yNext=this.ySouth,e.getRealParent().viewport.xEast=Math.max(e.getRealParent().viewport.xEast,this.xEast),e.getRealParent().viewport.ySouth=Math.max(e.getRealParent().viewport.ySouth,this.ySouth)}},{key:"computeBoundary",value:function(e,t){var r,n,i,a,o,l,u=e.getMeasuringScale(),s=e.getBaseWidth()*u,c=e.getBaseHeight()*u;return"layout"===t?(r=e.x,n=e.y,i=r-e.getMarginLeft(),a=r+s+e.getMarginRight(),o=n-e.getMarginTop(),l=n+c+e.getMarginBottom()):"absolute"===t?(r=e.absX-this.absX,n=e.absY-this.absY,i=r,a=r+s+e.getMarginRight(),o=n,l=n+c+e.getMarginBottom()):(i=r=e.getX(),a=r+s,o=n=e.getY(),l=n+c),{left:i,top:o,right:a,bottom:l}}},{key:"nextLocation",value:function(){var e=this.currentChild,t=e.getMeasuringScale(),r=e.getTopBaseHeight()*t,i=e.getLayoutHeight()*t+this.currentChild.getMarginTop()+this.currentChild.getMarginBottom(),a="always"===e.getItemOverflowMode()&&n.a.isWidthDefined(this.container)?this.container.getWidth():e.getBaseWidth()*t+this.currentChild.getMarginLeft()+this.currentChild.getMarginRight();if("BI"!==e.type&&"BI"===this.container.type){var o=this.computeBoundary(e,"layout"),l=this.computeBoundary(e,"animated");i=Math.max(i,o.bottom-l.top,l.bottom-o.top,o.bottom-o.top,l.bottom-l.top),a=Math.max(a,o.right-l.left,l.right-o.left,o.right-o.left,l.right-l.left)}var u=this.yNext+i;if(this.xNext+=a,e.isDomIsland()&&e.hasDom()){var s=this.computeBoundary(e,"absolute");u=s.bottom,this.xNext=s.right,this.xWest=s.left,this.yWest=s.top}this.yNext+=r,this.xSouth=this.xNext,this.yEast=this.yNext,this.xEast=Math.max(this.xNext,this.xEast),this.ySouth=Math.max(u,this.ySouth),e.getRealParent().viewport.xEast=Math.max(e.getRealParent().viewport.xEast,this.xEast),e.getRealParent().viewport.ySouth=Math.max(e.getRealParent().viewport.ySouth,this.ySouth),"always"!==this.container.getContainerOverflowMode()&&"always"!==this.currentChild.getItemOverflowMode()||(this.yEast=e.getRealParent().viewport.ySouth,this.yNext=e.getRealParent().viewport.ySouth,this.xNext=e.getRealParent().viewport.xWest,this.xSouth=e.getRealParent().viewport.xWest)}}])&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}()},952:function(e,t,r){r.d(t,{n:function(){return u}});var n=r(855),i=r(34);function a(e){return a="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},a(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,a=[{key:"calcVisibility",value:function(t){var r,n=t.getRealParent();if((null===(r=null==n?void 0:n.targets.onVisibleChildrenChange)||void 0===r||!r)&&t.isVisible()&&(t.isTargetUpdating(t.allTargetMap.x)||t.isTargetUpdating(t.allTargetMap.y)))return!0;var a=(t.getDomParent().getMeasuringScale()||1)*t.getMeasuringScale(),o=t.absX,l=t.absY,u=i.d.isDefined(t.getWidth())?a*t.getWidth():0,s=i.d.isDefined(t.getHeight())?a*t.getHeight():0,c={x:o-20,y:l-20,r:o+u+20,b:l+s+20},d=e.checkVisibility(t,c);return d.x=o,d.y=l,d.width=u,d.height=s,t.visibilityStatus=d,t.actualValues.isVisible=d.isVisible,d.isVisible}},{key:"checkVisibility",value:function(t,r){for(;t;){var i=t.getRealParent();if(!i||i===(0,n.Bt)())break;if(e.shouldClipByAncestor(i)){var a=e.getParentClip(i);if(!e.rectsOverlap(r,a))return{clip:a,isVisible:!1};r=e.intersectRects(i,r,a)}t=i}var o=e.getScreenViewportRect();return e.rectsOverlap(r,o)?{isVisible:!0}:{clip:o,isVisible:!1}}},{key:"getScreenViewportRect",value:function(){return{x:0,y:0,r:(0,n.r5)(),b:(0,n.c$)(),source:"screen"}}},{key:"shouldClipByAncestor",value:function(e){var t=e.val("overflow");return e.managesOwnScroll()||"hidden"===t||"auto"===t||"scroll"===t||"clip"===t}},{key:"getParentClip",value:function(e){var t,r,n=(null===(t=e.$dom)||void 0===t?void 0:t.getScrollLeft())||0,i=(null===(r=e.$dom)||void 0===r?void 0:r.getScrollTop())||0,a=e.getHeight(),o=e.getWidth();return{x:e.absX+n,y:e.absY+i,r:e.absX+o+n,b:e.absY+a+i,source:e}}},{key:"rectsOverlap",value:function(e,t){return e.x<=t.r&&e.r>=t.x&&e.y<=t.b&&e.b>=t.y}},{key:"intersectRects",value:function(e,t,r){var n,i,a=(null===(n=e.$dom)||void 0===n?void 0:n.getScrollLeft())||0,o=(null===(i=e.$dom)||void 0===i?void 0:i.getScrollTop())||0;return{x:Math.max(t.x-a,r.x-a),y:Math.max(t.y-o,r.y-o),r:Math.min(t.r-a,r.r-a),b:Math.min(t.b-o,r.b-o),source:r.source}}}],(r=null)&&o(t.prototype,r),a&&o(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,a}()}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{$Dom:function(){return $Dom.J},AnimationManager:function(){return AnimationManager._},AnimationUtil:function(){return AnimationUtil.T},App:function(){return App.qw},Bracket:function(){return Bracket.d},BracketGenerator:function(){return BracketGenerator.M},ColorUtil:function(){return ColorUtil.I},DomInit:function(){return DomInit.v},Easing:function(){return Easing.G},Moves:function(){return Moves},ParticleRenderer:function(){return ParticleRenderer.e},ParticleRuntime:function(){return ParticleRuntime.f},ParticleTModel:function(){return ParticleTModel.G},ParticleUtil:function(){return ParticleUtil.D},ScheduleUtil:function(){return ScheduleUtil.O},SearchUtil:function(){return SearchUtil.X},StateUtil:function(){return StateUtil.s},TModel:function(){return TModel.c},TModelUtil:function(){return TModelUtil.a},TUtil:function(){return TUtil.d},TargetData:function(){return TargetData.u},TargetExecutor:function(){return TargetExecutor.j},TargetParser:function(){return TargetParser.D},TargetUtil:function(){return TargetUtil.g},VisibilityUtil:function(){return VisibilityUtil.n},fetch:function(){return App.hd},fetchImage:function(){return App.aK},getAnimationManager:function(){return App.s},getDomTModelById:function(){return App.UR},getEvents:function(){return App.kQ},getLoader:function(){return App.qI},getLocationManager:function(){return App.zw},getManager:function(){return App.EI},getPager:function(){return App.cI},getResizeLastUpdate:function(){return App.S9},getRunScheduler:function(){return App.fB},getScreenHeight:function(){return App.c$},getScreenWidth:function(){return App.r5},getTModelById:function(){return App.iP},getTargetManager:function(){return App.HJ},getVisibles:function(){return App.U$},isRunning:function(){return App.W_},state:function(){return App.wk},tApp:function(){return App.E_},tRoot:function(){return App.Bt}});var App=__webpack_require__(855),TModel=__webpack_require__(90),TUtil=__webpack_require__(34);function _typeof(e){return _typeof="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},_typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Moves=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"bounce",value:function(e,t){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.yStart,i=void 0===n?void 0:n,a=r.xStart,o=void 0===a?(0,App.r5)()/2:a,l=r.widthStart,u=void 0===l?50:l,s=r.heightStart,c=void 0===s?50:s,d=r.bFactor,h=void 0===d?.6:d,f=r.cFactor,v=void 0===f?.2:f,p=r.rotationStart,g=void 0===p?0:p,y=r.rIncrement,m=void 0===y?360:y,b=Math.max(10,(t-e)*h),T=TUtil.d.isDefined(i)?[i,e]:[e],w=[o],k=[u],S=[c],x=[g];Math.abs(0|b)>1;){T.push(t),T.push(t-b);var M=u*(1+v),C=c*(1-v);k.push(M),k.push(u),S.push(C),S.push(c),w.push(o-(M-u)/2),w.push(o),x.push(x[x.length-1]+m),b*=h,m*=.8,v*=h}w.push(o),T.push(t),k.push(u),S.push(c);var E=x[x.length-1]%360;return E>0&&E<360&&x.push(360),{x:{list:w},y:{list:T},width:{list:k},height:{list:S},rotate:{list:x}}}},{key:"bounceSimple",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.from,i=void 0===n?void 0:n,a=r.to,o=void 0===a?void 0:a,l=r.widthStart,u=void 0===l?void 0:l,s=r.heightStart,c=void 0===s?void 0:s,d=r.xStart,h=void 0===d?void 0:d,f=r.yStart,v=void 0===f?void 0:f,p=r.bFactor,g=void 0===p?.5:p,y=r.cFactor,m=void 0===y?.7:y;i=TUtil.d.isDefined(i)?i:t.getY()-70,o=TUtil.d.isDefined(o)?o:t.getY(),u=TUtil.d.isDefined(u)?u:t.getWidth(),c=TUtil.d.isDefined(c)?c:t.getHeight(),v=TUtil.d.isDefined(v)?v:t.getY(),h=TUtil.d.isDefined(h)?h:t.getX();return e.bounce(i,o,{yStart:v,xStart:h,widthStart:u,heightStart:c,bFactor:g,cFactor:m,rIncrement:0})}},{key:"shake",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.xStart,i=void 0===n?void 0:n,a=r.width,o=void 0===a?void 0:a,l=r.height,u=void 0===l?void 0:l,s=r.bFactor,c=void 0===s?.6:s,d=r.cFactor,h=void 0===d?.3:d,f=r.strength,v=void 0===f?20:f,p=TUtil.d.isDefined(o)?o:t.getWidth(),g=TUtil.d.isDefined(u)?u:t.getHeight(),y=TUtil.d.isDefined(i)?i:t.getX(),m=t.getY(),b=e.bounce(m-v,m,{xStart:y,widthStart:p,heightStart:g,bFactor:c,cFactor:h,rIncrement:0});return{x:b.x,width:b.width}}},{key:"spiral",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.startAngle,r=void 0===t?0:t,n=e.endAngle,i=void 0===n?360:n,a=e.angleStep,o=void 0===a?18:a,l=e.x,u=void 0===l?0:l,s=e.y,c=void 0===s?0:s,d=e.width,h=void 0===d?100:d,f=e.height,v=void 0===f?100:f,p=[],g=[],y=[],m=r;m<=i;m+=o){var b=m*(Math.PI/180);p.push(Math.floor(u+h*Math.cos(b))),g.push(Math.floor(c+v*Math.sin(b))),y.push(90+m)}return{x:{list:p},y:{list:g},rotate:{list:y}}}}])}();_defineProperty(Moves,"shakeMap",{});var SearchUtil=__webpack_require__(756),TargetData=__webpack_require__(585),TargetUtil=__webpack_require__(333),TargetParser=__webpack_require__(690),TModelUtil=__webpack_require__(249),DomInit=__webpack_require__(260),$Dom=__webpack_require__(768),Bracket=__webpack_require__(966),BracketGenerator=__webpack_require__(714),ColorUtil=__webpack_require__(737),Easing=__webpack_require__(421),TargetExecutor=__webpack_require__(484),AnimationManager=__webpack_require__(357),AnimationUtil=__webpack_require__(980),VisibilityUtil=__webpack_require__(952),ScheduleUtil=__webpack_require__(161),StateUtil=__webpack_require__(791),ParticleTModel=__webpack_require__(578),ParticleRenderer=__webpack_require__(969),ParticleRuntime=__webpack_require__(720),ParticleUtil=__webpack_require__(138);window.TargetJS=__webpack_exports__})();
1
+ (function(){"use strict";var __webpack_modules__={768:function(e,t,r){r.d(t,{J:function(){return s}});var n=r(34),i=r(855);function a(e){return a="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},a(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var s=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"string"==typeof t)this.selector=t,this.element=e.query(t);else if(t&&(this.element=t,1===t.nodeType)){var r=this.element.getAttribute("id");this.selector="string"==typeof r?r.startsWith("#")?r:"#"+r:null}this.hasRealChildren=!1,this.slotModeEnabled=!1,this.contentSlot=null,this.originalContent=void 0,this.textOnly=!0,this.transformProp=null,this.initTransformProp(),this.restoreSlotState()}return t=e,r=[{key:"create",value:function(e){this.element=document.createElement(e),this.initTransformProp()}},{key:"initTransformProp",value:function(){if(this.element&&this.element.style){var e=this.element.style;this.transformProp="transform"in e?"transform":"webkitTransform"in e?"webkitTransform":null}else this.transformProp=null}},{key:"cloneTemplate",value:function(){var t;return new e(null===(t=this.element.content)||void 0===t?void 0:t.cloneNode(!0).children[0])}},{key:"clone",value:function(){return this.element.cloneNode(!0)}},{key:"exists",value:function(){var e;return!(null===(e=this.element)||void 0===e||!e.isConnected)}},{key:"getElement",value:function(){return this.element}},{key:"supportsWAAPI",value:function(){return!(!this.element||"function"!=typeof this.element.animate)}},{key:"restoreSlotState",value:function(){var e;if(1===(null===(e=this.element)||void 0===e?void 0:e.nodeType)&&!this.isNoSlotHost()){var t=this.element.querySelector(':scope > [data-tj-slot="content"]');t&&(this.contentSlot=t,this.slotModeEnabled=!0,this.hasRealChildren=Array.from(this.element.childNodes).some((function(e){return e!==t&&"true"===e.getAttribute("tgjs")})))}}},{key:"findContentSlot",value:function(){if(this.contentSlot&&this.contentSlot.parentNode===this.element)return this.contentSlot;if(!this.element.firstElementChild)return null;var e=this.element.querySelector(':scope > [data-tj-slot="content"]');return e&&(this.contentSlot=e),e}},{key:"isNoSlotHost",value:function(){var e;return 1!==(null===(e=this.element)||void 0===e?void 0:e.nodeType)||"body"===this.getTagName()||"true"===this.element.getAttribute("data-tj-no-slot")}},{key:"ensureContentSlotFirst",value:function(){var e=this.findContentSlot();return e?this.element.firstChild!==e&&this.element.insertBefore(e,this.element.firstChild):((e=document.createElement("div")).setAttribute("data-tj-slot","content"),this.element.insertBefore(e,this.element.firstChild),this.contentSlot=e),e}},{key:"isManagedChildNode",value:function(e){return 1===(null==e?void 0:e.nodeType)&&"true"===e.getAttribute("tgjs")}},{key:"enableSlotMode",value:function(){var e=this;if(!this.slotModeEnabled)if(this.isNoSlotHost())this.slotModeEnabled=!0;else{var t=this.findContentSlot();if(!t){var r=Array.from(this.element.childNodes);(t=document.createElement("div")).setAttribute("data-tj-slot","content"),this.element.insertBefore(t,this.element.firstChild);for(var n=0,i=r;n<i.length;n++){var a=i[n];this.isManagedChildNode(a)||t.appendChild(a)}}this.contentSlot=t,this.slotModeEnabled=!0,this.hasRealChildren=Array.from(this.element.children).some((function(r){return r!==t&&e.isManagedChildNode(r)}))}}},{key:"ensureSlotMode",value:function(){if(this.isNoSlotHost())this.slotModeEnabled=!0;else{this.enableSlotMode();var e=this.findContentSlot();e&&this.element.firstChild!==e&&this.element.insertBefore(e,this.element.firstChild)}}},{key:"getComputedStyle",value:function(e){if(this.element){var t=window.getComputedStyle(this.element);return e?t.getPropertyValue(e)||t[e]:t}}},{key:"contains",value:function(e){return e instanceof Node&&this.element.contains(e)}},{key:"getTagName",value:function(){var e;return null===(e=this.element)||void 0===e||null===(e=e.tagName)||void 0===e?void 0:e.toLowerCase()}},{key:"setSelector",value:function(e){this.selector=e}},{key:"ensureId",value:function(e){this.selector="#"===e[0]?e:"#"+e,this.attr("id",this.selector.slice(1))}},{key:"getId",value:function(){return this.attr("id")}},{key:"focus",value:function(){this.element.focus()}},{key:"blur",value:function(){this.element.blur()}},{key:"attr",value:function(e,t){if(this.element)return n.d.isDefined(t)?void this.element.setAttribute(e,t):this.element.getAttribute(e)}},{key:"value",value:function(e){if(this.element){var t=this.element.value;return n.d.isDefined(e)&&(this.element.value=e),t}}},{key:"select",value:function(){this.element&&"function"==typeof this.element.select&&this.element.select()}},{key:"width",value:function(e){if(!n.d.isDefined(e))return this.element.offsetWidth;this.element.style.width=n.d.isNumber(e)?"".concat(e,"px"):e}},{key:"height",value:function(e){if(!n.d.isDefined(e))return this.element.offsetHeight;this.element.style.height=n.d.isNumber(e)?"".concat(e,"px"):e}},{key:"css",value:function(e){if(!n.d.isDefined(e))return this.element.className;this.element.className=e}},{key:"setStyleByMap",value:function(e){var t=this;Object.keys(e).forEach((function(r){t.style(r,e[r])}))}},{key:"style",value:function(e,t){if(2!==arguments.length)return 1===arguments.length?this.element.style[e]:this.element.style;this.element.style[e]=t}},{key:"getStyleValue",value:function(e){var t=this.style(e),r=n.d.isDefined(t)?t.replace(/[^-\d.]/g,""):0;return parseFloat(r)}},{key:"getBoundingClientRect",value:function(){return this.element.getBoundingClientRect()}},{key:"isXYWithinElement",value:function(e,t){var r=this.getBoundingClientRect();return e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom}},{key:"parent",value:function(){return this.element?this.element.parentElement:null}},{key:"detach",value:function(){e.detach(this.element)}},{key:"child",value:function(e){return this.element.children[e]}},{key:"elementCount",value:function(){return this.element.children.length}},{key:"swapElements",value:function(e,t){var r=t.nextSibling;r===e?this.element.insertBefore(e,t):(this.element.insertBefore(t,e),this.element.insertBefore(e,r))}},{key:"insertAfterContentSlot",value:function(e){if(this.element)if(this.isNoSlotHost())this.element.appendChild(e);else{var t=this.ensureContentSlotFirst(),r=t?t.nextSibling:this.element.firstChild;r?this.element.insertBefore(e,r):this.element.appendChild(e)}}},{key:"insertFirst$Dom",value:function(e){this.ensureSlotMode(),this.insertAfterContentSlot(e.element),this.hasRealChildren=!0}},{key:"relocate",value:function(e,t){this.ensureSlotMode();var r=t+(this.findContentSlot()?1:0);this.element.insertBefore(e.$dom.element,this.element.children[r]||null)}},{key:"appendTModel$Dom",value:function(e){this.ensureSlotMode(),this.element.appendChild(e.$dom.element),this.hasRealChildren=!0}},{key:"append$Dom",value:function(e){this.ensureSlotMode(),this.element.appendChild(e.element),this.hasRealChildren=!0}},{key:"appendElement",value:function(e){this.ensureSlotMode(),this.element.appendChild(e),this.hasRealChildren=!0}},{key:"removeElement",value:function(e){if(e){var t=e.parentNode;return t===this.element?(this.element.removeChild(e),!0):t?(t.removeChild(e),!1):void 0}}},{key:"html",value:function(e){n.d.isDefined(e)&&(this.isNoSlotHost()||!this.hasRealChildren?this.element.innerHTML=e:this.ensureContentSlotFirst().innerHTML=e,this.originalContent=e,this.textOnly=!1)}},{key:"text",value:function(e){n.d.isDefined(e)&&(this.isNoSlotHost()||!this.hasRealChildren?this.element.textContent=e:this.ensureContentSlotFirst().textContent=e,this.originalContent=e,this.textOnly=!0)}},{key:"clearContent",value:function(){this.element&&(!this.isNoSlotHost()&&this.hasRealChildren?this.ensureContentSlotFirst().innerHTML=this.originalContent||"":this.element.innerHTML=this.originalContent||"")}},{key:"deleteAll",value:function(){this.element&&(this.element.innerHTML=this.originalContent||"",this.hasRealChildren=!1,this.contentSlot=null,this.slotModeEnabled=!1)}},{key:"outerHTML",value:function(e){this.element.outerHTML=e}},{key:"isEmpty",value:function(){return""===this.element.innerHTML}},{key:"innerHTML",value:function(e){if(!n.d.isDefined(e))return this.element.innerHTML;this.element.innerHTML=e}},{key:"innerText",value:function(e){if(!n.d.isDefined(e))return this.element.innerText;this.element.innerText=e}},{key:"addClass",value:function(e){var t=this.attr("class"),r=t?t.includes(e)?t:"".concat(t," ").concat(e):e;r!==t&&this.attr("class",r)}},{key:"addEvent",value:function(e,t,r,n){this.element.addEventListener?this.element.addEventListener(e,t,{capture:!!r,passive:!!n}):this.element.attachEvent("on".concat(e),t)}},{key:"detachEvent",value:function(e,t,r){this.element.removeEventListener?this.element.removeEventListener(e,t,r):this.element.detachEvent?this.element.detachEvent("on".concat(e),t):this.element["on".concat(e)]=null}},{key:"transform",value:function(e){this.element.style[this.transformProp]=e}},{key:"animate",value:function(e,t){return this.element.animate(e,t)}},{key:"getContext",value:function(t,r){var i=n.d.isDefined(r)?e.query(r):this.query("canvas");return i?i.getContext(t):void 0}},{key:"query",value:function(e){return this.element.querySelector(e)}},{key:"queryAll",value:function(e){return this.element.querySelectorAll(e)}},{key:"findFirstByClass",value:function(t){return e.findFirstByClass(t,this.element)}},{key:"findFirstByTag",value:function(t){return e.findFirstByTag(t,this.element)}},{key:"getScrollTop",value:function(){var e,t;return null!==(e=null===(t=this.element)||void 0===t?void 0:t.scrollTop)&&void 0!==e?e:0}},{key:"getScrollLeft",value:function(){var e,t;return null!==(e=null===(t=this.element)||void 0===t?void 0:t.scrollLeft)&&void 0!==e?e:0}}],a=[{key:"createTemplate",value:function(t){var r=new e;return r.create("template"),r.innerHTML(t.trim()),r}},{key:"createDocumentFragment",value:function(){return document.createDocumentFragment()}},{key:"query",value:function(t){return"#"===t[0]?e.findById(t):"."===t[0]?e.findFirstByClass(t):e.findFirstByTag(t)}},{key:"querySelector",value:function(e){return document.querySelector(e)}},{key:"findById",value:function(e){return document.getElementById("#"===e[0]?e.slice(1):e)}},{key:"findFirstByClass",value:function(t,r){var n=e.findByClass(t,r);return n.length>0?n[0]:null}},{key:"findFirstByTag",value:function(t,r){var n=e.findByTag(t,r);return n.length>0?n[0]:null}},{key:"findByTag",value:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).getElementsByTagName(e)}},{key:"findByClass",value:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).getElementsByClassName("."===e[0]?e.slice(1):e)}},{key:"findNearestParentWithId",value:function(e){for(;e;){var t="function"==typeof e.getAttribute&&e.getAttribute("id")?e.getAttribute("id"):null;if(t&&(0,i.EI)().visibleOidMap[t])return t;e=e.parentElement}}},{key:"detach",value:function(e){var t=n.d.isDefined(e)?e.parentElement:null;t&&t.removeChild(e)}},{key:"hasFocus",value:function(e){return e.hasDom()&&document.activeElement===e.$dom.element}},{key:"getWindowScrollTop",value:function(){return window.pageYOffset||document.documentElement.scrollTop||0}},{key:"getWindowScrollLeft",value:function(){return window.pageXOffset||document.documentElement.scrollLeft||0}},{key:"getScreenWidth",value:function(){return document.documentElement.clientWidth||document.body.clientWidth}},{key:"getScreenHeight",value:function(){return document.documentElement.clientHeight||document.body.clientHeight}},{key:"ready",value:function(t){new e(document).addEvent("DOMContentLoaded",t)}},{key:"ajax",value:function(e){var t=new XMLHttpRequest,r="";e.data&&(r=Object.keys(e.data).map((function(t){return"".concat(t,"=").concat(encodeURIComponent(e.data[t]))})).join("&")),t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status){var r="json"===e.dataType?JSON.parse(this.responseText):this.responseText;e.success(r)}else e.error(t.status)},"POST"===e.type?(t.open(e.type,e.url,!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.send(r)):(e.url+=r?e.url>""&&e.url.indexOf("?")>=0?"&".concat(r):"?".concat(r):"",t.open(e.type,e.url,!0),t.send())}}],r&&o(t.prototype,r),a&&o(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,a}()},357:function(e,t,r){r.d(t,{_:function(){return x}});var n=r(249),i=r(980),a=r(585),o=r(855),l=r(333),s=r(34),u=r(161);function c(e){return c="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},c(e)}function d(){d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var a=t&&t.prototype instanceof b?t:b,o=Object.create(a.prototype),l=new A(n||[]);return i(o,"_invoke",{value:P(e,r,l)}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var v="suspendedStart",p="suspendedYield",g="executing",y="completed",m={};function b(){}function T(){}function w(){}var k={};u(k,o,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(j([])));x&&x!==r&&n.call(x,o)&&(k=x);var E=w.prototype=b.prototype=Object.create(k);function C(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(i,a,o,l){var s=f(e[i],e,a);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==c(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(d).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function P(t,r,n){var i=v;return function(a,o){if(i===g)throw Error("Generator is already running");if(i===y){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var s=D(l,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=g;var u=f(t,r,n);if("normal"===u.type){if(i=n.done?y:p,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=y,n.method="throw",n.arg=u.arg)}}}function D(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,D(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(c(t)+" is not iterable")}return T.prototype=w,i(E,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:T,configurable:!0}),T.displayName=u(w,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,u(e,s,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},C(M.prototype),u(M.prototype,l,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new M(h(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(E),u(E,s,"Generator"),u(E,o,(function(){return this})),u(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function h(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){h(a,n,i,o,l,"next",e)}function l(e){h(a,n,i,o,l,"throw",e)}o(void 0)}))}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function g(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(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 y(e,t){if(e){if("string"==typeof e)return m(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){w(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function w(e,t,r){return(t=S(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S(n.key),n)}}function S(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}var x=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.waapiPoller={rafId:0,alive:!0},this.recordMap=new Map,this.isShuttingDown=!1,this.toid="blank"},t=[{key:"animate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.T.emptyBatch(),r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;if(!this.isShuttingDown){if(t.frames.sort((function(e,t){return e.keyTime-t.keyTime})),e.lastBatch){var o=Math.min(s.d.now()-e.lastBatch.startTime,e.lastBatch.totalDuration);if(e.lastBatch=this.cutLastBatch(e,e.lastBatch,o),i.T.rebaseCutBatchMeta(e,e.lastBatch),null!=a&&a.size){var u={styleMap:T({},e.lastBatch.frames[0].styleMap),tfMap:T({},e.lastBatch.frames[0].tfMap),keyMeta:new Map(e.lastBatch.frames[0].keyMeta)};i.T.addToUpdatingTargets(e,a),i.T.removeKeysFromBatch(e.lastBatch,a),this.callFireOnEndOnConflict(e,e.lastBatch,t),this.mergeBatches(e.lastBatch,t),this.deleteAnimation(e),this.fixTModelStyleFromFrame(e,u)}else this.callFireOnEndOnConflict(e,e.lastBatch,t),this.mergeBatches(e.lastBatch,t),this.deleteAnimation(e)}if(e.hasDom()&&t.frames.length&&Object.keys(t.keyMap).length){var c,d=e.$dom.getElement(),h=Math.max(t.totalDuration,1),f=g(new Set(Object.values(t.keyMap).flatMap((function(e){return g(e)})))),v=p(f);try{for(v.s();!(c=v.n()).done;){var y=c.value;this.backfillKeyAcrossFramesUsingMorph(e,y,t.frames)}}catch(e){v.e(e)}finally{v.f()}for(var m=!1,b={},w=0,k=Object.keys(e.tfMap);w<k.length;w++){var S=k[w];b[S]=e.val(S)}var x=t.frames.map((function(t){var r=T({},t.styleMap);if(r.offset=t.keyTime/h,Object.keys(t.tfMap).length){var a=T(T({},b),t.tfMap);r.transform=n.a.getTransformString(e,a),m=!0}return i.T.addUnitsToFrame(r),r})),E=this.filterRedundantKeyframes(x),C={duration:h,fill:"none",iterations:1,easing:t.easing||"linear"};t.startTime=s.d.now(),e.lastBatch=t,e.lastBatch.transformAnimation=m,e.finalKeyframe=E[E.length-1],e.finalRawFrame=t.frames[t.frames.length-1];var M,P=d.animate(E,C),D=p(f);try{for(D.s();!(M=D.n()).done;){var O=M.value,L=l.g.getTargetName(O),A=this.getRecordId(e,O),j=l.g.getOriginalNames(e,O),I=j.originalTModel,_=j.originalTargetName,R={recId:A,cleanKey:L,originalKey:O,tmodel:e,anim:P,originalTModel:I,originalTargetName:_,frames:this.collectFramesForKey(t,L),status:"playing",needsFireOnStep:!0,hooks:r},N=e.targetValues[O];N&&(e.addToAnimatingMap(O),N.status=N.snapAnimation?"done":"updating"),this.recordMap.set(A,R)}}catch(e){D.e(e)}finally{D.f()}this.startProgressPoller()}}}},{key:"pauseAnimations",value:function(e,t){var r,n,a;(r=t?t instanceof Map?new Set(t.keys()):new Set(t):new Set(null!==(n=null===(a=e.animatingMap)||void 0===a?void 0:a.keys())&&void 0!==n?n:[])).size&&this.animate(e,i.T.emptyBatch(),i.T.getAnimationHooks(),r)}},{key:"finalizeAnimation",value:function(e){var t,r=!1,n=p(this.recordMap);try{for(n.s();!(t=n.n()).done;){var a=v(t.value,2),l=a[0],s=a[1];if(s.anim===e&&"playing"!==s.status&&"canceled"!==s.status){r=!0;var u=s.tmodel,c=s.originalKey,d=s.cleanKey;u.removeFromAnimatingMap(c),this.recordMap.delete(l),this.completeRecord(u,s,d,c),u.hasAnimatingTargets()||(u.finalKeyframe&&u.hasDom()&&i.T.fixStyleByAnimation(u,u.finalKeyframe),u.lastBatch=void 0),s.status="complete",s.hooks.fireOnEnd(u,c),(0,o.fB)().scheduleOnlyIfEarlier(1,"animate-".concat(u.oid,"---").concat(c))}}}catch(e){n.e(e)}finally{n.f()}if(r)try{e.cancel()}catch(e){}(0,o.fB)().schedule(50,"finalizeAnimation")}},{key:"startProgressPoller",value:function(){var e=this;if(!this.waapiPoller.rafId){this.waapiPoller.alive=!0;var t=function(){var r,n=new Set,a=new Map,o=!1,l=p(e.recordMap);try{for(l.s();!(r=l.n()).done;){var s,c,d,h,f=v(r.value,2)[1];if("canceled"!==f.status&&"detached"!==f.status){var g=f.tmodel,y=f.originalKey;if("finished"!==f.status&&u.O.shouldPauseTarget(g,y)){var m=a.get(g);m||(m=new Set,a.set(g,m)),m.add(y)}else{"playing"===f.status&&(o=!0);var b=f.anim.playState,T=null===(s=f.anim.effect)||void 0===s||null===(c=(d=s).getComputedTiming)||void 0===c?void 0:c.call(d),w=null!==(h=null==T?void 0:T.progress)&&void 0!==h?h:0;if(("finished"===b||"idle"===b||w>=.999999)&&(f.status="done",n.add(f.anim)),w>0&&"finished"!==f.status){var k=i.T.updateTModelFromRecord(f);"finished"===(null==k?void 0:k.status)&&(f.status="finished")}}}}}catch(e){l.e(e)}finally{l.f()}var S,x=p(a);try{for(x.s();!(S=x.n()).done;){var E=v(S.value,2),C=E[0],M=E[1];e.pauseAnimations(C,M)}}catch(e){x.e(e)}finally{x.f()}var P,D=p(n);try{for(D.s();!(P=D.n()).done;){var O=P.value;e.finalizeAnimation(O)}}catch(e){D.e(e)}finally{D.f()}e.recordMap.size>0||o?e.waapiPoller.rafId=requestAnimationFrame(t):(e.waapiPoller.alive=!1,e.waapiPoller.rafId=0)};this.waapiPoller.rafId=requestAnimationFrame(t)}}},{key:"getAt",value:function(e,t){return a.u.isTransformKey(t)?e.tfMap[t]:e.styleMap[t]}},{key:"setAt",value:function(e,t,r){a.u.isTransformKey(t)?e.tfMap[t]=r:e.styleMap[t]=r}},{key:"completeRecord",value:function(e,t,r,n){if(e.finalRawFrame){var i=t.frames,a=i&&i[i.length-1],o=a?a.value:this.getAt(e.finalRawFrame,r);this.setAt(e,r,o),e.val(n,o);var l,s=e.targetValues[n];s&&(s.step=e.getTargetSteps(n),s.valuePointer=null!==(l=s.valueList)&&void 0!==l&&l.length?s.valueList.length:0,e.setActual(n,o),e.isTargetImperative(n)&&(s.cycle=s.cycles))}}},{key:"backfillKeyAcrossFramesUsingMorph",value:function(e,t,r){for(var i=l.g.getTargetName(t),a=[],o=0;o<r.length;o++)void 0!==this.getAt(r[o],i)&&a.push(o);if(a.length>=2)for(var u=0;u<a.length-1;u++){var c,d,h=a[u],f=a[u+1],v=r[h],p=r[f],g=this.getAt(v,i),y=this.getAt(p,i),m=null===(c=p.keyMeta)||void 0===c?void 0:c.get(i);if(m){var b=m.steps,w=m.stepOffset||0,k=null!==(d=m.segmentSteps)&&void 0!==d?d:b,S=v.keyTime,x=p.keyTime-S;if(!(!s.d.isDefined(b)||b<=0||x<=0))for(var E=w,C=h+1;C<f;C++){var M=r[C],P=s.d.limit((M.keyTime-S)/x,0,1),D=Math.round(P*b),O=s.d.limit(w+D,0,k),L=Math.max(O-E,0),A=n.a.morph(t,g,y,P);this.setAt(M,i,A),M.keyMeta.set(i,T(T({},m),{},{steps:L,stepOffset:E,segmentSteps:k,done:!1})),E=O}}}if(a.length){var j,I,_,R=a[a.length-1],N=r[R],V=this.getAt(N,i),F=null===(j=N.keyMeta)||void 0===j?void 0:j.get(i);if(!F)return;for(var B=null!==(I=null!==(_=F.segmentSteps)&&void 0!==_?_:F.steps)&&void 0!==I?I:0,H=R+1;H<r.length;H++){var U=r[H];this.setAt(U,i,V),U.keyMeta.set(i,T(T({},F),{},{steps:0,stepOffset:B,segmentSteps:B,done:!0}))}}}},{key:"fixTModelStyleFromFrame",value:function(e,t){if(e.hasDom()&&t){var r=T({},t.styleMap);if(Object.keys(t.tfMap).length>0){Object.keys(e.tfMap).forEach((function(t){e.tfMap[t]=e.val(t)}));var a=T(T({},e.tfMap),t.tfMap);t.tfMap=a,r.transform=n.a.getTransformString(e,a)}i.T.addUnitsToFrame(r),i.T.fixStyleByAnimation(e,r)}}},{key:"collectFramesForKey",value:function(e,t){var r,n=[],i=e.totalDuration,a=p(e.frames);try{for(a.s();!(r=a.n()).done;){var o=r.value,l=this.getAt(o,t);if(void 0!==l){var s=o.keyMeta.get(t);n.push({value:l,time:o.keyTime,offset:o.keyTime/i,steps:null==s?void 0:s.steps,segmentSteps:null==s?void 0:s.segmentSteps,interval:null==s?void 0:s.interval,easing:null==s?void 0:s.easing,stepOffset:(null==s?void 0:s.stepOffset)||0,valuePointer:null==s?void 0:s.valuePointer,cycle:null==s?void 0:s.cycle,done:!(null==s||!s.done)})}}}catch(e){a.e(e)}finally{a.f()}return n.sort((function(e,t){return e.time-t.time})),n.length>=2?n:void 0}},{key:"getRecordId",value:function(e,t){return"".concat(e.oid,"-").concat(t)}},{key:"delete",value:function(e){var t=e.recId,r=e.originalKey,n=e.tmodel;e.anim.cancel(),n.removeFromAnimatingMap(r),this.recordMap.delete(t)}},{key:"deleteAnimation",value:function(e){var t,r=[],i=p(this.recordMap.values());try{for(i.s();!(t=i.n()).done;){var a=t.value;a.tmodel===e&&r.push(a)}}catch(e){i.e(e)}finally{i.f()}if(!r.length)return!1;for(var o=new Set,l=new Set,s=0,u=r;s<u.length;s++){var c=u[s];o.add(c.originalKey),l.add(c.anim)}n.a.commitAnimatedStyles(e,o);for(var d=0,h=r;d<h.length;d++){var f=h[d];f.status="detached",this.recordMap.delete(f.recId)}var v,g=p(l);try{for(g.s();!(v=g.n()).done;){var y=v.value;try{y.cancel()}catch(e){}}}catch(e){g.e(e)}finally{g.f()}return e.clearAnimatingMap(),e.lastBatch=void 0,e.waapiBatch=void 0,e.finalKeyframe=void 0,e.finalRawFrame=void 0,!0}},{key:"cancelKey",value:function(e,t){var r=this.getRecordId(e,t),n=this.recordMap.get(r);n&&(n.status="canceled")}},{key:"deleteAll",value:(h=f(d().mark((function e(){var t,r,a,o,l,s,u,c,h,f,g,y,m,b,T,w,k,S,x,E,C,M,P,D,O,L=arguments;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(L.length>0&&void 0!==L[0]?L[0]:{}).discardState,r=void 0!==t&&t,this.isShuttingDown=!0,this.waapiPoller.rafId&&(cancelAnimationFrame(this.waapiPoller.rafId),this.waapiPoller.rafId=0),this.waapiPoller.alive=!1,!r){e.next=12;break}a=new Set,o=p(this.recordMap.values());try{for(o.s();!(l=o.n()).done;)(s=l.value).status="detached",s.anim&&a.add(s.anim)}catch(e){o.e(e)}finally{o.f()}this.recordMap.clear(),u=p(a);try{for(u.s();!(c=u.n()).done;){h=c.value;try{h.cancel()}catch(e){}}}catch(e){u.e(e)}finally{u.f()}return e.abrupt("return");case 12:f=new Set,g=new Map,y=p(this.recordMap.values()),e.prev=15,y.s();case 17:if((m=y.n()).done){e.next=28;break}if("canceled"!==(b=m.value).status&&"detached"!==b.status){e.next=21;break}return e.abrupt("continue",26);case 21:i.T.updateTModelFromRecord(b),f.add(b.anim),(T=g.get(b.tmodel))||(T=new Set,g.set(b.tmodel,T)),T.add(b.originalKey);case 26:e.next=17;break;case 28:e.next=33;break;case 30:e.prev=30,e.t0=e.catch(15),y.e(e.t0);case 33:return e.prev=33,y.f(),e.finish(33);case 36:w=p(g);try{for(w.s();!(k=w.n()).done;)S=v(k.value,2),x=S[0],E=S[1],n.a.commitAnimatedStyles(x,E),i.T.addToUpdatingTargets(x,E),x.lastBatch=void 0,x.waapiBatch=void 0,x.finalKeyframe=void 0,x.finalRawFrame=void 0}catch(e){w.e(e)}finally{w.f()}C=p(this.recordMap.values());try{for(C.s();!(M=C.n()).done;)M.value.status="detached"}catch(e){C.e(e)}finally{C.f()}P=p(f);try{for(P.s();!(D=P.n()).done;){O=D.value;try{O.cancel()}catch(e){}}}catch(e){P.e(e)}finally{P.f()}this.recordMap.clear();case 43:case"end":return e.stop()}}),e,this,[[15,30,33,36]])}))),function(){return h.apply(this,arguments)})},{key:"flushOneFrame",value:(c=f(d().mark((function e(){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(requestAnimationFrame);case 2:this.isShuttingDown=!1;case 3:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"cancelTModelAnimation",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.mode,o=void 0===a?"resume":a,l=r.commitStyle,s=void 0===l||l,u=[],c=p(this.recordMap.values());try{for(c.s();!(t=c.n()).done;){var d=t.value;d.tmodel===e&&u.push(d)}}catch(e){c.e(e)}finally{c.f()}if(!u.length)return!1;for(var h=new Set,f=new Set,v=0,g=u;v<g.length;v++){var y=g[v];"canceled"!==y.status&&"detached"!==y.status&&i.T.updateTModelFromRecord(y),h.add(y.originalKey),f.add(y.anim)}s&&n.a.commitAnimatedStyles(e,h);for(var m=0,b=u;m<b.length;m++){var T=b[m];T.status="detached",this.recordMap.delete(T.recId)}var w,k=p(f);try{for(k.s();!(w=k.n()).done;){var S=w.value;try{S.cancel()}catch(e){}}}catch(e){k.e(e)}finally{k.f()}return e.clearAnimatingMap(),this.applyCanceledTargetMode(e,h,o),e.lastBatch=void 0,e.waapiBatch=void 0,e.finalKeyframe=void 0,e.finalRawFrame=void 0,!0}},{key:"applyCanceledTargetMode",value:function(e,t,r){var n,i=p(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;e.targetValues[a]&&("resume"!==r?"finish"!==r||this.finishCanceledTarget(e,a):e.setTargetStatus(a,"updating"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"finishCanceledTarget",value:function(e,t){var r=this.recordMap.get(this.getRecordId(e,t));r&&(this.completeRecord(e,r,r.cleanKey,t),e.removeFromAnimatingMap(t),r.hooks.fireOnEnd(e,t))}},{key:"fillCutFrameFromRecords",value:function(e,t,r,n){var a,o=n>0?s.d.limit(r/n,0,1):1,l=p(this.recordMap);try{for(l.s();!(a=l.n()).done;){var u,c,d,h,f,g,y,m=v(a.value,2)[1];if(m.tmodel===e&&"canceled"!==m.status&&"detached"!==m.status){var b=i.T.getValueFromFrames(m,o);if(b){var T=m.cleanKey,w=m.originalKey,k=e.targetValues[w];this.setAt(t,T,b.value),t.keyMeta.set(T,{steps:null!==(u=null!==(c=null!==(d=b.remainingSteps)&&void 0!==d?d:b.steps)&&void 0!==c?c:null==k?void 0:k.steps)&&void 0!==u?u:0,segmentSteps:null!==(h=null!==(f=b.steps)&&void 0!==f?f:null==k?void 0:k.steps)&&void 0!==h?h:0,interval:null!==(g=null==k?void 0:k.interval)&&void 0!==g?g:8,stepOffset:null!==(y=b.step)&&void 0!==y?y:0,valuePointer:b.valuePointer,cycle:b.cycle,done:"finished"===b.status})}}}}catch(e){l.e(e)}finally{l.f()}}},{key:"cutLastBatch",value:function(e,t,r){for(var n=0;n<t.frames.length&&t.frames[n].keyTime<=r;)n++;var i=t.totalDuration;if(n<t.frames.length&&r!==t.frames[n].keyTime){var a={keyTime:r,tfMap:{},styleMap:{},keyMeta:new Map};t.frames.splice(n,0,a),this.fillCutFrameFromRecords(e,a,r,i);var o,l=p(g(new Set(Object.values(t.keyMap).flatMap((function(e){return g(e)})))));try{for(l.s();!(o=l.n()).done;){var s=o.value;this.backfillKeyAcrossFramesUsingMorph(e,s,t.frames)}}catch(e){l.e(e)}finally{l.f()}t.frames=t.frames.slice(n)}return t.frames.forEach((function(e){e.keyTime=Math.max(0,e.keyTime-r)})),t.totalDuration=t.frames.length?t.frames[t.frames.length-1].keyTime:0,t}},{key:"callFireOnEndOnConflict",value:function(e,t,r){for(var n=t.keyMap,i=r.keyMap,a=0,o=Object.keys(i);a<o.length;a++){var l=o[a],s=n[l],u=i[l];if(s&&u){var c,d=p(s);try{for(d.s();!(c=d.n()).done;){var h=c.value;if(!u.has(h)){var f=this.getRecordId(e,h),v=this.recordMap.get(f);v&&(this.completeRecord(e,v,l,h),v.status="complete",v.tmodel.removeFromAnimatingMap(h),this.recordMap.delete(f),v.hooks.fireOnEnd(v.tmodel,h))}}}catch(e){d.e(e)}finally{d.f()}}}}},{key:"mergeBatches",value:function(e,t){for(var r=new Set(Object.keys(t.keyMap)),n={},i=0,a=Object.entries(e.keyMap);i<a.length;i++){var o=v(a[i],2),l=o[0],u=o[1];r.has(l)||(n[l]=u)}var c=Object.keys(n),d=[];if(c.length){var h,f=p(e.frames);try{for(f.s();!(h=f.n()).done;){var y,m=h.value,b={keyTime:m.keyTime,tfMap:{},styleMap:{},keyMeta:new Map},w=p(c);try{for(w.s();!(y=w.n()).done;){var k,S=y.value;s.d.isDefined(m.tfMap[S])&&(b.tfMap[S]=m.tfMap[S]),s.d.isDefined(m.styleMap[S])&&(b.styleMap[S]=m.styleMap[S]);var x=null===(k=m.keyMeta)||void 0===k?void 0:k.get(S);x&&b.keyMeta.set(S,x)}}catch(e){w.e(e)}finally{w.f()}(Object.keys(b.tfMap).length||Object.keys(b.styleMap).length)&&d.push(b)}}catch(e){f.e(e)}finally{f.f()}}var E=[].concat(d,g(t.frames));E.sort((function(e,t){return e.keyTime-t.keyTime}));var C,M=[],P=p(E);try{for(P.s();!(C=P.n()).done;){var D=C.value,O=M[M.length-1];if(O&&Math.abs(O.keyTime-D.keyTime)<1e-4){Object.assign(O.styleMap,D.styleMap),Object.assign(O.tfMap,D.tfMap);var L,A=p(D.keyMeta);try{for(A.s();!(L=A.n()).done;){var j=v(L.value,2),I=j[0],_=j[1];O.keyMeta.set(I,_)}}catch(e){A.e(e)}finally{A.f()}}else M.push(D)}}catch(e){P.e(e)}finally{P.f()}t.frames=M,t.keyMap=T(T({},n),t.keyMap),t.totalDuration=M.reduce((function(e,t){return Math.max(e,t.keyTime)}),0)}},{key:"areFramesEqual",value:function(e,t){var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var i=0,a=r;i<a.length;i++){var o=a[i];if("offset"!==o&&e[o]!==t[o])return!1}return!0}},{key:"filterRedundantKeyframes",value:function(e){if(e.length<=2)return e;for(var t=[e[0]],r=1;r<e.length-1;r++){var n=t[t.length-1],i=e[r];this.areFramesEqual(n,i)||t.push(i)}return t.push(e[e.length-1]),t}},{key:"rebaseAutoLayoutTransform",value:function(e,t){if(!e.lastBatch)return!1;var r=Math.min(s.d.now()-e.lastBatch.startTime,e.lastBatch.totalDuration),n=this.cutLastBatch(e,e.lastBatch,r);i.T.rebaseCutBatchMeta(e,n);var a,o=p(n.frames);try{for(o.s();!(a=o.n()).done;)for(var l=a.value,u=0,c=Object.entries(t);u<c.length;u++){var d=v(c[u],2),h=d[0],f=d[1];l.tfMap[h]=f}}catch(e){o.e(e)}finally{o.f()}for(var g=0,y=Object.entries(t);g<y.length;g++){var m=v(y[g],2),b=m[0],T=m[1];e.tfMap[b]=T,e.val(b,T),e.actualValues[b]=T}return this.deleteAnimation(e),this.animate(e,n,i.T.getAnimationHooks()),!0}}],t&&k(e.prototype,t),r&&k(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,c,h}()},980:function(e,t,r){r.d(t,{T:function(){return y}});var n=r(333),i=r(585),a=r(249),o=r(855),l=r(161),s=r(34);function u(e){return u="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},u(e)}function c(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(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 d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=f(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function f(e,t){if(e){if("string"==typeof e)return v(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function g(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}var y=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,u=[{key:"emptyBatch",value:function(){return{frames:[],keyMap:{},totalDuration:0}}},{key:"overrideAnimatedKeyWithSnap",value:function(t,r,a){for(var l=Array.isArray(r)?r:[r],s=Array.isArray(a)?a:[a],u={},c={},d=new Map,h={},f={},v=new Map,p={},g=!1,y=0;y<l.length;y++){var m=l[y];g=!0;var b=s[y],T=t.targetValues[m]||n.g.emptyValue(),w=n.g.getTargetName(m);i.u.isTransformKey(w)?(u[w]=b,h[w]=b):(c[w]=b,f[w]=b),d.set(w,{steps:1,interval:1}),v.set(w,{steps:1,interval:1}),(p[w]=new Set).add(m),T.value=b,T.steps=1,T.interval=0,T.snapAnimation=!0}if(g){var k=[];k.push({keyTime:0,tfMap:u,styleMap:c,keyMeta:d}),k.push({keyTime:1,tfMap:h,styleMap:f,keyMeta:v});var S={frames:k,keyMap:p,snap:!0,totalDuration:1};(0,o.s)().animate(t,S,e.getAnimationHooks())}}},{key:"fixStyleByAnimation",value:function(e,t){if(e.hasDom())for(var r=0,n=Object.keys(t);r<n.length;r++){var a=n[r];if("offset"!==a){var o=t[a];if(null!==o){var l=o;if("string"==typeof o&&o.endsWith("px")){var s=Number(o.slice(0,-2));Number.isNaN(s)||(l=s)}"width"===a?(e.styleMap.width=l,e.$dom.width(o)):"height"===a?(e.styleMap.height=l,e.$dom.height(o)):"transform"===a?e.$dom.transform(o,e.val("transformOrder")):i.u.transformMap[a]||(e.$dom.style(a,o),e.styleMap[a]=l)}}}}},{key:"addUnitsToFrame",value:function(e){for(var t=0,r=Object.keys(e);t<r.length;t++){var n=r[t];if("offset"!==n&&"transform"!==n){var a=e[n];null==a||Number.isNaN(a)?delete e[n]:"number"==typeof a&&i.u.styleWithUnitMap[n]&&(("width"===n||"height"===n)&&a<0&&(a=0),e[n]="".concat(a,"px"))}}}},{key:"getAnimationHooks",value:function(){return{morph:function(e,t,r,n,i,o){return a.a.easingMorph(e,t,r,n,i,o)},fireOnStep:function(e,t,r){return(0,o.HJ)().fireOnStep(e,t,r)},fireOnEnd:function(e,t){return(0,o.HJ)().fireOnEnd(e,t)}}}},{key:"addToUpdatingTargets",value:function(e,t){var r,n=[],i=h((0,o.s)().recordMap);try{for(i.s();!(r=i.n()).done;){var a=d(r.value,2)[1];a.tmodel===e&&(t&&!t.has(a.originalKey)||n.push(a))}}catch(e){i.e(e)}finally{i.f()}for(var l=0,s=n;l<s.length;l++){var u,c,f=s[l].originalKey;e.targetValues[f]&&(null===(u=e.noDomUpdatingTargets)||void 0===u||u.delete(f),0===(null===(c=e.noDomUpdatingTargets)||void 0===c?void 0:c.size)&&(e.noDomUpdatingTargets=void 0),e.setTargetStatus(f,"updating"),e.removeFromAnimatingMap(f))}}},{key:"addToNODomUpdatingTargets",value:function(e,t){var r,n=[],i=h((0,o.s)().recordMap);try{for(i.s();!(r=i.n()).done;){var a=d(r.value,2)[1];a.tmodel===e&&(t&&!t.has(a.originalKey)||n.push(a))}}catch(e){i.e(e)}finally{i.f()}for(var l=0,s=n;l<s.length;l++){var u=s[l].originalKey;e.addToNoDomUpdatingTargets(u)}}},{key:"removeKeysFromBatch",value:function(e,t){if(e&&null!=t&&t.size){var r,i=h(e.frames);try{for(i.s();!(r=i.n()).done;){var a,o=r.value,l=h(t);try{for(l.s();!(a=l.n()).done;){var s=a.value,u=n.g.getTargetName(s);delete o.styleMap[u],delete o.tfMap[u],o.keyMeta&&o.keyMeta.delete(u)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}var c,d=h(t);try{for(d.s();!(c=d.n()).done;){var f=c.value,v=n.g.getTargetName(f);delete e.keyMap[v]}}catch(e){d.e(e)}finally{d.f()}e.frames=e.frames.filter((function(e){return Object.keys(e.styleMap).length||Object.keys(e.tfMap).length})),e.totalDuration=e.frames.length?e.frames[e.frames.length-1].keyTime:0}}},{key:"updateTModelFromRecord",value:function(t){var r=t.tmodel,n=t.originalKey,i=t.cleanKey;if(r.hasDom()){var a=e.getValueFromAnim(t);if(a){var l=a.value,u=a.step,c=a.steps,d=a.cycle,h=a.valuePointer,f=a.from,v=a.to,p=a.interval,g=a.easing;(0,o.s)().setAt(r,i,l),r.val(n,l);var y=r.targetValues[n];if(y){var m;null!==(m=y.valueList)&&void 0!==m&&m.length?e.syncListTargetSegment(y,a):(s.d.isDefined(f)&&(y.initialValue=f),s.d.isDefined(v)&&(y.value=v),s.d.isDefined(c)&&(y.steps=c),s.d.isDefined(p)&&(y.interval=p),s.d.isDefined(g)&&(y.easing=g)),s.d.isDefined(u)&&(y.step=u),s.d.isDefined(h)&&(y.valuePointer=h),s.d.isDefined(d)&&(y.cycle=d),y.lastUpdate=s.d.now(),r.setActual(n,l);var b="".concat(d,":").concat(h,":").concat(u);t.needsFireOnStep&&u>0&&c>0&&t.lastFireOnStepKey!==b&&(t.lastFireOnStepKey=b,t.hooks.fireOnStep(r,n,u)||(t.needsFireOnStep=!1))}return a}}}},{key:"getValueFromAnim",value:function(t){var r,n,i=null===(r=t.anim.effect)||void 0===r||null===(n=r.getComputedTiming)||void 0===n?void 0:n.call(r);if(i){var a=s.d.isDefined(i.progress)?s.d.limit(i.progress,0,1):1;return e.getValueFromFrames(t,a)}}},{key:"getValueFromFrames",value:function(e,t){var r,n,i,o,l,u=e.originalKey,c=e.frames;if(c&&!(c.length<2)){var d=s.d.limit(t,0,1),h=c.length-1,f=0;if(d<=c[0].offset)f=0;else if(d>=c[h].offset)f=h-1;else for(var v=0;v<h;v++)if(d>=c[v].offset&&d<c[v+1].offset){f=v;break}var p=c[f],g=c[f+1],y=p.value,m=g.value,b=p.offset,T=g.offset-b;if(!(T<=0)){var w,k,S,x,E=s.d.limit((d-b)/T,0,1),C=a.a.morph(u,y,m,E),M=g.steps;if(!s.d.isDefined(M)||M<=0)return{value:C,framePointer:f,step:g.segmentSteps,steps:g.segmentSteps,from:y,to:m,interval:g.interval,easing:g.easing,valuePointer:null!==(w=null!==(k=g.valuePointer)&&void 0!==k?k:p.valuePointer)&&void 0!==w?w:0,cycle:null!==(S=null!==(x=g.cycle)&&void 0!==x?x:p.cycle)&&void 0!==S?S:0,status:g.done?"finished":"playing"};var P=Math.round(E*M);P=s.d.limit(P,0,M);var D=g.stepOffset||0,O=null!==(r=g.segmentSteps)&&void 0!==r?r:D+M;return{value:C,step:s.d.limit(D+P,0,O),steps:O,from:y,to:m,interval:g.interval,easing:g.easing,valuePointer:null!==(n=null!==(i=g.valuePointer)&&void 0!==i?i:p.valuePointer)&&void 0!==n?n:0,cycle:null!==(o=null!==(l=g.cycle)&&void 0!==l?l:p.cycle)&&void 0!==o?o:0,status:g.done?"finished":"playing"}}}}},{key:"detachAnimationsOnDeleteDom",value:function(t){var r,n=(0,o.s)().recordMap,i=new Set,a=new Set,s=h(n);try{for(s.s();!(r=s.n()).done;){var u=d(r.value,2)[1];u.tmodel===t&&(l.O.shouldPauseTarget(t,u.originalKey)?i.add(u.originalKey):a.add(u.originalKey))}}catch(e){s.e(e)}finally{s.f()}i.size&&e.addToUpdatingTargets(t,i),a.size&&e.addToNODomUpdatingTargets(t,a),e.deleteDetachedRecords(t,new Set([].concat(c(i),c(a))))}},{key:"deleteDetachedRecords",value:function(e,t){var r,n=(0,o.s)().recordMap,i=h(n);try{for(i.s();!(r=i.n()).done;){var a=d(r.value,2),l=a[0],s=a[1];if(s.tmodel===e&&t.has(s.originalKey)){s.status="detached";try{s.anim.cancel()}catch(e){}e.removeFromAnimatingMap(s.originalKey),n.delete(l)}}}catch(e){i.e(e)}finally{i.f()}e.clearAnimatingMap(),e.lastBatch=void 0,e.finalKeyframe=void 0,e.finalRawFrame=void 0}},{key:"rebaseCutBatchMeta",value:function(e,t){var r;if(t&&null!==(r=t.frames)&&void 0!==r&&r.length)for(var n=0,i=Object.entries(t.keyMap);n<i.length;n++){var a,l=d(i[n],2),u=l[0],c=h(l[1]);try{for(c.s();!(a=c.n()).done;){var f=a.value,v=e.targetValues[f];if(v)for(var p=v.step||0,g=1;g<t.frames.length;g++){var y,m=t.frames[g];if(void 0!==(0,o.s)().getAt(m,u)){var b=null===(y=m.keyMeta)||void 0===y?void 0:y.get(u);if(b&&s.d.isDefined(b.steps)){var T=b.stepOffset||0,w=T+b.steps;p>T&&p<w&&(b.stepOffset=p,b.steps=w-p);break}}}}}catch(e){c.e(e)}finally{c.f()}}}},{key:"removeCleanKeyFromBatch",value:function(e,t){if(!e)return!1;var r,n=e.totalDuration||0,i=!1,a=h(e.frames);try{for(a.s();!(r=a.n()).done;){var o,l=r.value;void 0===l.tfMap[t]&&void 0===l.styleMap[t]||(i=!0),delete l.tfMap[t],delete l.styleMap[t],null===(o=l.keyMeta)||void 0===o||o.delete(t)}}catch(e){a.e(e)}finally{a.f()}return delete e.keyMap[t],e.frames=e.frames.filter((function(e){return Object.keys(e.tfMap).length||Object.keys(e.styleMap).length})),e.frames.sort((function(e,t){return e.keyTime-t.keyTime})),e.totalDuration=e.frames.length?Math.max.apply(Math,[n].concat(c(e.frames.map((function(e){return e.keyTime}))))):0,i}},{key:"syncListTargetSegment",value:function(e,t){var r,n,i,a,o,l;if(null!=e&&null!==(r=e.valueList)&&void 0!==r&&r.length){var u=e.valueList.length-1,c=s.d.limit(null!==(n=null!==(i=t.valuePointer)&&void 0!==i?i:e.valuePointer)&&void 0!==n?n:1,1,u),d=c-1;e.valuePointer=c,e.initialValue=e.valueList[d],e.value=e.valueList[c],null!==(a=e.stepList)&&void 0!==a&&a.length&&(e.steps=e.stepList[d%e.stepList.length]),null!==(o=e.intervalList)&&void 0!==o&&o.length&&(e.interval=e.intervalList[d%e.intervalList.length]),null!==(l=e.easingList)&&void 0!==l&&l.length&&(e.easing=e.easingList[d%e.easingList.length])}}},{key:"handleWebAnimationAPI",value:function(t,r,n,a,o,l,s,u,c,d,h){var f,v=arguments.length>11&&void 0!==arguments[11]&&arguments[11],p=!(arguments.length>12&&void 0!==arguments[12])||arguments[12],g=t.waapiBatch||(t.waapiBatch={frames:[],easing:void 0,keyMap:{},totalDuration:0});p&&e.removeCleanKeyFromBatch(g,r)&&(h=0);var y=i.u.isTransformKey(r),m=function(e){for(var t=Math.max(0,e+h),r=0;r<g.frames.length;r++){var n=g.frames[r];if(Math.abs(n.keyTime-t)<1e-4)return n}var i={keyTime:t,tfMap:{},styleMap:{},keyMeta:new Map};return g.frames.push(i),i},b=function(e,t){y?e.tfMap[r]=t:e.styleMap[r]=t},T=0;if(a.valueList&&a.valueList.length){var w,k,S=a.valueList,x=a.stepList||[1],E=a.intervalList||[d||8],C=null!==(w=a.cycles)&&void 0!==w?w:1,M=null!==(k=a.cycle)&&void 0!==k?k:0,P=s;if(!v){var D,O,L=m(0);b(L,o),L.keyMeta.set(r,{steps:0,segmentSteps:c||a.steps||0,interval:d||a.interval||8,stepOffset:u||0,valuePointer:null!==(D=null!=s?s:a.valuePointer)&&void 0!==D?D:1,cycle:null!==(O=a.cycle)&&void 0!==O?O:0})}for(;M<C;){for(var A=P;A<S.length;A++){var j,I=x[(A-1)%x.length],_=E[(A-1)%E.length]||8,R=M===(null!==(j=a.cycle)&&void 0!==j?j:0)&&A===s?u:0,N=Math.max(I-R,0);if(!(N<=0)){var V=m(T+=N*_);b(V,S[A]),V.keyMeta.set(r,{steps:N,segmentSteps:I,interval:_,stepOffset:R,valuePointer:A,cycle:M})}}M++,P=1}}else{var F;d=d||8;var B=Math.max(c-u,0);B<=0&&(t.val(n,l),a.step=c),T=B*d,v||b(m(0),o);var H=m(T);b(H,l),H.keyMeta.set(r,{steps:B,segmentSteps:c,interval:d,stepOffset:u,valuePointer:0,cycle:null!==(F=a.cycle)&&void 0!==F?F:0})}return T<=0?(t.removeFromUpdatingTargets(n),0):(t.getTargetEasing(n)&&(g.easing=t.getTargetEasing(n)),g.totalDuration=Math.max(0,g.totalDuration,h+T),((f=g.keyMap)[r]||(f[r]=new Set)).add(n),t.removeFromUpdatingTargets(n),t.addToAnimatingMap(n),T)}}],(r=null)&&p(t.prototype,r),u&&p(t,u),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,u}()},855:function(e,t,r){r.d(t,{qw:function(){return dt},hd:function(){return yt},aK:function(){return mt},s:function(){return wt},UR:function(){return Ot},kQ:function(){return vt},qI:function(){return gt},zw:function(){return St},EI:function(){return bt},cI:function(){return pt},S9:function(){return Mt},fB:function(){return kt},c$:function(){return Et},r5:function(){return xt},iP:function(){return Dt},HJ:function(){return Tt},U$:function(){return Ct},W_:function(){return ht},wk:function(){return Pt},E_:function(){return Je},Bt:function(){return ft}});var n=r(768),i=r(255),a=r(756),o=r(34),l=r(585),s=r(484);function u(e){return u="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},u(e)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function h(e,t){if(e){if("string"==typeof e)return f(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function p(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}var y=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$document=new n.J(document),this.currentTouch={deltaY:0,deltaX:0,prevDeltaX:0,prevDeltaY:0,pinchDelta:0,key:"",manualMomentumFlag:!1,orientation:"none",dir:"",source:""},this.lastEvent=void 0,this.touchTimeStamp=0,this.cursor={x:0,y:0},this.start0=void 0,this.start1=void 0,this.end0=void 0,this.end1=void 0,this.touchCount=0,this.canFindHandlers=!0,this.swipeStartX=0,this.swipeStartY=0,this.currentEventName="",this.currentEventType="",this.currentEventTModel=void 0,this.currentOriginalEvent=void 0,this.currentKey="",this.currentHandlers={gestureTarget:null,touch:null,click:null,scrollLeft:null,scrollTop:null,swipe:null,pinch:null,focus:null,justFocused:null,blur:null,leave:null,enter:null,start:null,endCandidate:null,end:null,hover:null},this.eventQueue=[],this.attachedEventMap={},this.eventTargetMap={},this.allEvents={},this.windowScrollX=0|window.scrollX,this.windowScrollY=0|window.scrollY,this.windowScrollEndTimer=0,this.scrollEndTimeStamp={x:0,y:0},this.windowEpoch=0,this.eventEpoch=0,Object.values(l.u.events).forEach((function(e){Object.assign(t.allEvents,e)})),this.hovered=new Set,this.bindedHandleWindowEvent=this.handleWindowEvent.bind(this),this.bindedHandleEvent=this.handleEvent.bind(this),this.bindedParentHandleEvent=this.handleDocEvent.bind(this),this.maxPointerMoveDistance=0}return t=e,r=[{key:"detachWindowEvents",value:function(){var e=this;Object.keys(l.u.events.windowEvents).forEach((function(t){Je.$window.detachEvent(t,e.bindedHandleWindowEvent)}))}},{key:"attachWindowEvents",value:function(){var e=this;Object.keys(l.u.events.windowEvents).forEach((function(t){Je.$window.addEvent(t,e.bindedHandleWindowEvent)}))}},{key:"detachDocumentEvents",value:function(e){var t=this,r=l.u.events[e];Object.keys(r).forEach((function(e){var n=r[e];t.$document.detachEvent(e,t.bindedParentHandleEvent,n.capture)}))}},{key:"attachDocumentEvents",value:function(e){var t=this,r=l.u.events[e];Object.keys(r).forEach((function(e){var n=r[e];t.$document.addEvent(e,t.bindedParentHandleEvent,n.capture,n.passive)}))}},{key:"attachEvents",value:function(e){var t,r=function(e){return"string"==typeof e&&e.split(/\s+/).some((function(e){return"scroll"===e||"auto"===e}))},n=d(e);try{for(n.s();!(t=n.n()).done;){var i,a=t.value,o=a.val("overflow"),l=a.val("overflowX"),s=a.val("overflowY");a.hasDom()&&(r(o)||r(l)||r(s))&&this.attachTargetEvents(a,"onWindowScroll",!0);var u,h=d(null!==(i=a.externalEventMap)&&void 0!==i?i:[]);try{for(h.s();!(u=h.n()).done;){var f=c(u.value,1)[0];this.attachTargetEvents(a,f,!0)}}catch(e){h.e(e)}finally{h.f()}}}catch(e){n.e(e)}finally{n.f()}}},{key:"attachTargetEvents",value:function(e,t,r){var n=this,i="".concat(e.oid," ").concat(t),a=l.u.targetToEventsMapping[t];a&&Array.isArray(a)&&0!==a.length&&a.forEach((function(t){var a=l.u.events[t];if(a){var o="undefined"!=typeof window&&!!window.PointerEvent;Object.keys(a).forEach((function(t){if(!o||!t.startsWith("mouse")){var l=a[t],s=!!l.windowEvent,u=s?Je.$window:e.hasDom()?e.$dom:null;if(!u)return!1;var c="".concat(i," ").concat(s?"win":"dom"),d=n.eventTargetMap[c]===u,h="".concat(e.oid," ").concat(t," ").concat(s?"win":"dom"),f=n.attachedEventMap[h]&&n.attachedEventMap[h].$dom===u;!r&&d&&f||(u.detachEvent(t,n.bindedHandleEvent,l.capture),u.addEvent(t,n.bindedHandleEvent,l.capture,l.passive),n.eventTargetMap[c]=u,n.attachedEventMap[h]={$dom:u,event:t,capture:!!l.capture})}}))}}))}},{key:"detachAll",value:function(){for(var e=0,t=Object.keys(this.attachedEventMap);e<t.length;e++){var r=t[e],n=this.attachedEventMap[r],i=n.$dom,a=n.event,o=n.capture;i.exists()&&i.detachEvent(a,this.bindedHandleEvent,o)}this.attachedEventMap={},this.eventTargetMap={}}},{key:"resetEventsOnTimeout",value:function(){if((this.scrollEndTimeStamp.x>0||this.scrollEndTimeStamp.y>0||0!==this.currentTouch.pinchDelta)&&!(this.touchCount>0)){var e=o.d.now(),t=Math.max(this.scrollEndTimeStamp.x-e,this.scrollEndTimeStamp.y-e);t>100&&(this.currentTouch.deltaY*=.95,this.currentTouch.deltaX*=.95,this.currentTouch.pinchDelta*=.95,Math.abs(this.currentTouch.deltaY)<.1&&(this.currentTouch.deltaY=0),Math.abs(this.currentTouch.deltaX)<.1&&(this.currentTouch.deltaX=0),Math.abs(this.currentTouch.pinchDelta)<.1&&(this.currentTouch.pinchDelta=0)),t<=0&&(this.currentTouch.deltaY=0,this.currentTouch.deltaX=0,this.currentTouch.pinchDelta=0),!this.currentTouch.deltaX&&this.scrollEndTimeStamp.x&&e>=this.scrollEndTimeStamp.x&&(this.scrollEndTimeStamp.x=0,this.queueScrollEndEvent("x",this.currentHandlers.scrollLeft)),!this.currentTouch.deltaY&&this.scrollEndTimeStamp.y&&e>=this.scrollEndTimeStamp.y&&(this.queueScrollEndEvent("y",this.currentHandlers.scrollTop),this.scrollEndTimeStamp.y=0),kt().schedule(10,"scroll decay")}}},{key:"findEventHandlers",value:function(e){var t,r,i,o,l,s,u,c,d,h,f=e.tmodel,v=e.eventType;f&&(t=a.X.findFirstClickHandler(f),r=a.X.findFirstSwipeHandler(f),d=a.X.findFirstStartHandler(f),h=a.X.findFirstEndHandler(f),u=a.X.findFirstEnterHandler(f),c=a.X.findFirstLeaveHandler(f),i=a.X.findFirstScrollLeftHandler(f,v),o=a.X.findFirstScrollTopHandler(f,v),l=a.X.findFirstPinchHandler(f),s=n.J.hasFocus(f)?f:this.currentHandlers.focus),this.currentHandlers.scrollLeft===i&&this.currentHandlers.scrollTop===o||this.clearTouch(),this.currentHandlers.focus!==s&&(this.currentHandlers.justFocused=s,this.currentHandlers.blur=this.currentHandlers.focus),this.currentHandlers.hover=null!=f&&f.canHandleEvent("onHover")?f:void 0,this.currentHandlers.click=t,this.currentHandlers.swipe=r,this.currentHandlers.start=d,this.currentHandlers.endCandidate=h,this.currentHandlers.scrollLeft=i,this.currentHandlers.scrollTop=o,this.currentHandlers.pinch=l,this.currentHandlers.focus=s,this.currentHandlers.enter=u,this.currentHandlers.leave=c}},{key:"captureEvents",value:function(){if(this.currentTouch.prevDeltaX=0,this.currentTouch.prevDeltaY=0,this.currentHandlers.enter=void 0,this.currentHandlers.leave=void 0,this.currentHandlers.justFocused=void 0,this.currentHandlers.blur=void 0,this.currentHandlers.end=void 0,this.currentKey=this.currentTouch.key,0===this.eventQueue.length)return this.currentEventName="",this.currentEventType="",this.currentEventTModel=void 0,this.currentOriginalEvent=void 0,void(this.currentKey="");var e=this.eventQueue.shift();return this.canFindHandlers&&!e.synthetic&&this.findEventHandlers(e),"end"===e.eventType&&(this.currentHandlers.end=this.currentHandlers.endCandidate,this.currentHandlers.start=void 0,this.currentHandlers.endCandidate=void 0,this.currentHandlers.gestureTarget=void 0),this.currentEventName=e.eventName,this.currentEventType=e.eventType,this.currentEventTModel=e.tmodel,this.currentOriginalEvent=e.originalEvent,this.currentTouch.key="",this.markCapturedEventDirty(e),"end"!==e.eventType&&"click"!==e.eventType||(this.canFindHandlers=!0),e}},{key:"markCapturedEventDirty",value:function(e){var t=function(e,t){e&&(e.markEventDirty(),e.markLayoutDirty(t))};switch(t(e.tmodel,"".concat(e.eventType,"-event")),e.eventType){case"click":t(this.currentHandlers.click,"click-event");break;case"start":t(this.currentHandlers.start,"start-event");break;case"end":t(this.currentHandlers.end,"end-event");break;case"move":t(this.currentHandlers.swipe,"swipe-event"),t(this.currentHandlers.scrollLeft,"scrollleft-event"),t(this.currentHandlers.scrollTop,"scrolltop-event"),t(this.currentHandlers.pinch,"pinch-event");break;case"popstate":for(var r=0,n=Object.values(bt().visibleOidMap);r<n.length;r++){var i,a=n[r];null!==(i=a.externalEventMap)&&void 0!==i&&i.has("onPopState")&&t(a,"popstate-event")}}}},{key:"handleDocEvent",value:function(e){this.handleEvent(e,!0,!1)}},{key:"handleWindowEvent",value:function(e){this.handleEvent(e,!1,!0)}},{key:"handleEvent",value:function(t,r,n){var i,l,s,u,c,d,h,f,v,p,g,y=this;if(t){var m=t.type,b=this.allEvents[m];if(b){var T,w,k=b.eventName,S=b.inputType,x=b.eventType,E=b.order,C=b.queue,M=b.rateLimit,P=o.d.now(),D={eventName:k,eventItem:b,eventType:x,originalName:m,tmodel:T="move"===x&&this.touchCount>0&&this.currentHandlers.gestureTarget?this.currentHandlers.gestureTarget:this.getTModelFromEvent(t),originalEvent:t,timeStamp:P};if(null!==(i=this.lastEvent)&&void 0!==i&&i.eventItem){var O=this.lastEvent,L=O.eventItem,A=O.timeStamp,j=P-A,I="end"===x||"cancel"===x||"start"===x,_=x===L.eventType&&P-A<60&&S&&L.inputType&&L.inputType!==S&&E>L.order;if(!I&&_)return;if(this.eventQueue.length>e.MAX_EVENT_QUEUE_SIZE&&M>0&&j<M)for(var R=0,N=this.eventQueue.length-1;N>=0;N--){var V;if((null===(V=this.eventQueue[N].eventItem)||void 0===V?void 0:V.eventType)!==x)break;if(++R>e.MAX_EVENT_TYPE_CAPACITY)return void(this.preventDefault(T,k)&&(t.preventDefault(),t.stopPropagation()))}}switch(this.eventEpoch++,null===(l=T)||void 0===l||l.markEventDirty(),null===(s=T)||void 0===s||s.markLayoutDirty("event"),this.lastEvent=D,C&&this.eventQueue.push(this.lastEvent),k){case"mousedown":case"touchstart":this.maxPointerMoveDistance=0,this.clearStart(),this.clearEnd(),this.clearTouch(),this.eventQueue.length=0,this.eventQueue.push(this.lastEvent),this.touchCount=this.countTouches(t)||1,this.preventDefault(T,k)&&t.cancelable&&t.preventDefault(),this.start0=this.getTouch(t),this.start1=this.getTouch(t,1),this.cursor.x=this.start0.x,this.cursor.y=this.start0.y,this.currentHandlers.gestureTarget=T,this.findEventHandlers(D),this.canFindHandlers=!1,this.swipeStartX=this.start0.x-(null!==(u=null===(c=this.currentHandlers.swipe)||void 0===c?void 0:c.getX())&&void 0!==u?u:0),this.swipeStartY=this.start0.y-(null!==(d=null===(h=this.currentHandlers.swipe)||void 0===h?void 0:h.getY())&&void 0!==d?d:0),t.stopPropagation(),this.detachDocumentEvents("documentDragEvents"),this.attachDocumentEvents("documentDragEvents");break;case"mousemove":case"touchmove":var F;w=this.getTouch(t),this.cursor.x=w.x,this.cursor.y=w.y,this.preventDefault(T,k)&&t.cancelable&&t.preventDefault(),this.touchCount>0?(this.scrollEndTimeStamp.x=0,this.scrollEndTimeStamp.y=0,this.move(t),t.stopPropagation(),null===(F=this.currentHandlers.swipe)||void 0===F||F.markLayoutDirty("swipe-event")):this.isCurrentSource("wheel")&&this.clearTouch();break;case"mouseup":case"touchend":this.detachDocumentEvents("documentDragEvents"),this.preventDefault(T,k)&&t.cancelable&&t.preventDefault(),this.end(t),this.clearEnd(),this.touchCount=0,t.stopPropagation();break;case"click":this.preventDefault(T,k)&&t.preventDefault(),this.end0=this.getTouch(t);var B=a.X.findFirstClickHandler(T),H=!this.start0||B===this.currentHandlers.click&&this.maxPointerMoveDistance<e.CLICK_MOVE_THRESHOLD;B&&H&&(this.eventQueue.length=0,this.eventQueue.push({eventName:k,eventItem:b,eventType:x,originalName:m,tmodel:T,originalEvent:t,timeStamp:P})),this.clearEnd(),this.clearStart(),this.maxPointerMoveDistance=0,this.touchCount=0,t.stopPropagation();break;case"wheel":this.preventDefault(T,k)&&(t.preventDefault(),t.stopPropagation()),this.touchCount=0,this.wheel(t);break;case"mouseleave":r&&this.touchCount>0&&(this.detachDocumentEvents("documentDragEvents"),w=this.getTouch(t),this.cursor.x=w.x,this.cursor.y=w.y,this.end(t),this.clearEnd(),this.touchCount=0,t.stopPropagation());break;case"mousecancel":case"touchcancel":this.canFindHandlers=!0,this.detachDocumentEvents("documentDragEvents"),this.clearStart(),this.clearEnd(),this.clearTouch(),this.maxPointerMoveDistance=0,this.touchCount=0,t.stopPropagation();break;case"key":this.currentTouch.key=t.which||t.keyCode,null===(f=this.currentHandlers.focus)||void 0===f||f.markLayoutDirty("key-event");break;case"keydown":this.currentTouch.key=t.which||t.keyCode,null===(v=this.currentHandlers.focus)||void 0===v||v.markLayoutDirty("keydown-event");break;case"resize":this.windowEpoch++,this.resizeRoot(),bt().getAvailableDoms().forEach((function(e){e.targets.onResize&&e.markLayoutDirty("resize-event")}));break;case"scroll":if(clearTimeout(this.windowScrollEndTimer),this.windowScrollEndTimer=setTimeout((function(){y.queueWindowScrollEndEvent("x",T),y.queueWindowScrollEndEvent("y",T),y.windowScrollEndTimer=0}),450),n)this.windowEpoch++,this.windowScrollX=0|window.scrollX,this.windowScrollY=0|window.scrollY,St().domIslandSet.forEach((function(e){e.markLayoutDirty("window-scroll-event")}));else if(null!==(p=T)&&void 0!==p&&p.hasDom()){var U=T.$dom.getScrollTop(),q=T.$dom.getScrollLeft();T.getScrollTop()!==U&&T.val("scrollTop",U),T.getScrollLeft()!==q&&T.val("scrollLeft",q),T.visibilityDirty=!0,T.markLayoutDirty("container-scroll-event")}}kt().schedule(0,"".concat(null===(g=T)||void 0===g?void 0:g.oid,"-").concat(m,"-").concat(k,"-").concat((t.target.tagName||"").toUpperCase()))}}}},{key:"queueScrollEndEvent",value:function(e,t){if(t){var r="x"===e?"scrollleftend":"scrolltopend";this.removeScrollEndEvents(e),this.eventQueue.push({eventName:r,eventType:r,originalName:r,tmodel:t,originalEvent:void 0,timeStamp:o.d.now(),synthetic:!0}),this.eventEpoch++,t.markEventDirty(),t.markLayoutDirty(r),kt().schedule(0,r)}}},{key:"queueWindowScrollEndEvent",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"window",n="x"===e?"windowscrollleftend":"windowscrolltopend";this.removeScrollEndEvents(e),this.eventQueue.push({eventName:n,eventType:n,originalName:n,tmodel:t,originalEvent:void 0,timeStamp:o.d.now(),synthetic:!0,scrollSource:r}),this.eventEpoch++,St().domIslandSet.forEach((function(e){e.markEventDirty(),e.markLayoutDirty(n)})),kt().schedule(0,n)}},{key:"removeScrollEndEvents",value:function(e){var t="x"===e?new Set(["scrollleftend","windowscrollleftend"]):new Set(["scrolltopend","windowscrolltopend"]);this.eventQueue=this.eventQueue.filter((function(e){return!t.has(e.eventType)}))}},{key:"resizeRoot",value:function(){s.j.executeDeclarativeTarget(ft(),"screenWidth"),s.j.executeDeclarativeTarget(ft(),"screenHeight")}},{key:"preventDefault",value:function(e,t){return!(!e||!(!0===e.preventDefault()||Array.isArray(e.preventDefault())&&e.preventDefault().includes(t)))}},{key:"getTModelFromEvent",value:function(e){var t,r=e.currentTarget||e.target;return r&&1===r.nodeType&&(t=r.getAttribute("tgjs-oid")||r.id),t&&bt().visibleOidMap[t]||(t=null==r?void 0:r.id)&&bt().visibleOidMap[t]||(t=n.J.findNearestParentWithId(e.target)),bt().visibleOidMap[t]}},{key:"clearStart",value:function(){this.start0=void 0,this.start1=void 0}},{key:"clearEnd",value:function(){this.end0=void 0,this.end1=void 0}},{key:"clearTouch",value:function(){this.currentTouch={deltaY:0,deltaX:0,prevDeltaX:0,prevDeltaY:0,pinchDelta:0,key:"",manualMomentumFlag:!1,orientation:"none",dir:"",source:""}}},{key:"clearAll",value:function(){this.clearStart(),this.clearEnd(),this.clearTouch(),this.eventQueue.length=0,this.touchCount=0,this.canFindHandlers=!0,this.lastEvent=void 0,this.attachedEventMap={},this.eventTargetMap={},this.swipeStartX=0,this.swipeStartY=0,this.hovered.clear(),clearTimeout(this.windowScrollEndTimer),this.windowScrollEndTimer=0,this.scrollEndTimeStamp.x=0,this.scrollEndTimeStamp.y=0,this.maxPointerMoveDistance=0,this.currentHandlers={touch:null,click:null,scrollLeft:null,scrollTop:null,swipe:null,pinch:null,focus:null,justFocused:null,blur:null,leave:null,enter:null,start:null,end:null,hover:null}}},{key:"deltaX",value:function(){return this.currentTouch.deltaX}},{key:"deltaY",value:function(){return this.currentTouch.deltaY}},{key:"cursorX",value:function(){return this.cursor.x}},{key:"cursorY",value:function(){return this.cursor.y}},{key:"swipeX",value:function(){return this.cursor.x-this.swipeStartX}},{key:"swipeY",value:function(){return this.cursor.y-this.swipeStartY}},{key:"pinchDelta",value:function(){return this.currentTouch.pinchDelta}},{key:"dir",value:function(){return this.currentTouch.dir}},{key:"getScrollLeftHandler",value:function(){return this.currentHandlers.scrollLeft}},{key:"getScrollTopHandler",value:function(){return this.currentHandlers.scrollTop}},{key:"getWindowScrollX",value:function(){return this.windowScrollX}},{key:"getWindowScrollY",value:function(){return this.windowScrollY}},{key:"getWindowEpoch",value:function(){return this.windowEpoch}},{key:"getPinchHandler",value:function(){return this.currentHandlers.pinch}},{key:"getClickHandler",value:function(){return this.currentHandlers.click}},{key:"getTouchCount",value:function(){return this.touchCount}},{key:"isClickEvent",value:function(){return"click"===this.getEventType()}},{key:"isMoveEvent",value:function(){return"move"===this.getEventType()}},{key:"isResizeEvent",value:function(){return"resize"===this.getEventType()}},{key:"isSwipeEvent",value:function(){return this.isMoveEvent()&&this.hasDelta()&&1===this.touchCount}},{key:"isScrollEvent",value:function(){return this.hasDelta()&&this.isCurrentSource("wheel")}},{key:"hasDelta",value:function(){return 0!==this.deltaX()||0!==this.deltaY()}},{key:"isEndEvent",value:function(){return"end"===this.getEventType()||"click"===this.getEventType()}},{key:"isStartEvent",value:function(){return"start"===this.getEventType()}},{key:"getEventName",value:function(){return this.currentEventName}},{key:"getCurrentOriginalEvent",value:function(){return this.currentOriginalEvent}},{key:"getEventType",value:function(){return this.currentEventType}},{key:"getEventTModel",value:function(){return this.currentEventTModel}},{key:"isClickHandler",value:function(e){return this.getClickHandler()===e&&this.isClickEvent()}},{key:"isEnterHandler",value:function(e){return!(!e||e!==this.currentHandlers.enter||"mouseenter"!==this.getEventName()||this.hovered.has(e.oid)||(this.hovered.add(e.oid),0))}},{key:"isLeaveHandler",value:function(e){return!(!e||e!==this.currentHandlers.leave||"mouseleave"!==this.getEventName()||!this.hovered.has(e.oid)||(this.hovered.delete(e.oid),0))}},{key:"isHoverHandler",value:function(e){return e===this.currentHandlers.hover}},{key:"isSwipeHandler",value:function(e){return e===this.currentHandlers.swipe}},{key:"isStartHandler",value:function(e){return e===this.currentHandlers.start}},{key:"isEndHandler",value:function(e){return e===this.currentHandlers.end}},{key:"onFocus",value:function(e){return this.currentHandlers.justFocused===e}},{key:"onBlur",value:function(e){return this.currentHandlers.blur===e}},{key:"hasFocus",value:function(e){return this.currentHandlers.focus===e}},{key:"isScrollLeftHandler",value:function(e){return this.currentHandlers.scrollLeft===e}},{key:"isScrollTopHandler",value:function(e){return this.currentHandlers.scrollTop===e}},{key:"isScrollLeftEndHandler",value:function(e){return this.currentHandlers.scrollLeft===e&&"scrollleftend"===this.currentEventType}},{key:"isScrollTopEndHandler",value:function(e){return this.currentHandlers.scrollTop===e&&"scrolltopend"===this.currentEventType}},{key:"isScrolling",value:function(){return this.scrollEndTimeStamp.x>0||this.scrollEndTimeStamp.y>0}},{key:"isWindowScrolling",value:function(){return this.windowScrollEndTimer>0}},{key:"isPinchHandler",value:function(e){return this.currentHandlers.pinch===e}},{key:"isCurrentSource",value:function(e){return this.currentTouch.source===e}},{key:"isFormHandler",value:function(e){var t,r,n=this.currentOriginalEvent,i=null===(t=e.$dom)||void 0===t?void 0:t.element,a=null==n?void 0:n.target;return!!(i&&a&&(a===i||null!==(r=i.contains)&&void 0!==r&&r.call(i,a)))}},{key:"getOrientation",value:function(){return this.currentTouch.orientation}},{key:"countTouches",value:function(e){var t,r;return(null===(t=e.touches)||void 0===t?void 0:t.length)||(null===(r=e.originalEvent)||void 0===r||null===(r=r.touches)||void 0===r?void 0:r.length)}},{key:"getTouch",value:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(null===(t=e.touches)||void 0===t?void 0:t[n])||(null===(r=e.originalEvent)||void 0===r||null===(r=r.touches)||void 0===r?void 0:r[n])||e,a=o.d.isDefined(i.clientX)?i.clientX:i.pageX||0,l=o.d.isDefined(i.clientY)?i.clientY:i.pageY||0;return{x:a,y:l,originalX:a,originalY:l,target:i.target,timeStamp:o.d.now()}}},{key:"move",value:function(e){if(1===this.touchCount){if(this.start0.y=this.end0?this.end0.y:this.start0.y,this.start0.x=this.end0?this.end0.x:this.start0.x,this.end0=this.getTouch(e),o.d.isDefined(this.end0)){var t=o.d.distance(this.start0.originalX,this.start0.originalY,this.end0.x,this.end0.y);this.maxPointerMoveDistance=Math.max(this.maxPointerMoveDistance,t);var r=this.start0.x-this.end0.x,n=this.start0.y-this.end0.y;this.setDeltaXDeltaY(r,n,"touch")}}else if(this.touchCount>=2){this.end0=this.getTouch(e),this.end1=this.getTouch(e,1);var i=o.d.distance(this.start0.x,this.start0.y,this.start1.x,this.start1.y),a=o.d.distance(this.end0.x,this.end0.y,this.end1.x,this.end1.y)-i;this.currentTouch.pinchDelta=a>0?.3:a<0?-.3:0}}},{key:"end",value:function(){if(this.touchCount<=1&&this.start0){var e,t=0,r=0,n=0;o.d.isDefined(this.end0)&&(t=this.start0.originalX-this.end0.x,r=this.start0.originalY-this.end0.y,n=o.d.now()-this.start0.timeStamp<250?o.d.now()-this.start0.timeStamp:0),"horizontal"===this.currentTouch.orientation&&Math.abs(t)>0&&n>0?(e=o.d.momentum(0,t,n),this.scrollEndTimeStamp.x=this.end0.timeStamp+e.duration,this.scrollEndTimeStamp.x-o.d.now()>0&&(this.currentTouch.deltaX=e.distance,this.currentTouch.manualMomentumFlag=!0)):"vertical"===this.currentTouch.orientation&&Math.abs(r)>0&&n>0&&(e=o.d.momentum(0,r,n),this.scrollEndTimeStamp.y=this.end0.timeStamp+e.duration,this.scrollEndTimeStamp.y-o.d.now()>0&&(this.currentTouch.deltaY=e.distance,this.currentTouch.manualMomentumFlag=!0))}}},{key:"setDeltaXDeltaY",value:function(e,t,r){var n=Math.abs(e)-Math.abs(t);n>=1?("none"===this.currentTouch.orientation||"vertical"===this.currentTouch.orientation&&n>=2||"horizontal"===this.currentTouch.orientation)&&(this.currentTouch.orientation="horizontal"):("none"===this.currentTouch.orientation||"horizontal"===this.currentTouch.orientation&&n<=-2||"vertical"===this.currentTouch.orientation)&&(this.currentTouch.orientation="vertical");var i=o.d.now(),a="touch"===r?0:500;"horizontal"===this.currentTouch.orientation?(this.currentTouch.dir=e<0?"left":e>0?"right":this.currentTouch.dir,this.scrollEndTimeStamp.x=i+a,this.removeScrollEndEvents("x")):(this.currentTouch.dir=t<0?"up":t>0?"down":this.currentTouch.dir,this.scrollEndTimeStamp.y=i+a,this.removeScrollEndEvents("y")),this.currentTouch.source=r,this.currentTouch.prevDeltaX+=e,this.currentTouch.prevDeltaY+=t,this.currentTouch.deltaX=this.currentTouch.prevDeltaX,this.currentTouch.deltaY=this.currentTouch.prevDeltaY,a&&(this.scrollEndTimeStamp.x>0||this.scrollEndTimeStamp.y>0)&&kt().schedule(a,"scroll-end-check")}},{key:"wheel",value:function(e){var t=0,r=0;this.currentTouch.pinchDelta=0,this.start0=this.getTouch(e),e.ctrlKey&&"deltaY"in e?this.currentTouch.pinchDelta=-e.deltaY/10:"deltaX"in e?(t=e.deltaX,r=e.deltaY):"wheelDeltaX"in e?(t=-e.wheelDeltaX/120,r=-e.wheelDeltaY/120):"wheelDelta"in e?t=-e.wheelDelta/120:"detail"in e&&(t=e.detail/3),this.setDeltaXDeltaY(t,r,"wheel")}}],r&&v(t.prototype,r),i&&v(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,i}();p(y,"MAX_EVENT_QUEUE_SIZE",10),p(y,"MAX_EVENT_TYPE_CAPACITY",2),p(y,"CLICK_MOVE_THRESHOLD",10);var m=r(333),b=r(791),T=["url","cacheId"];function w(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=x(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function k(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(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){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return E(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,t):void 0}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){P(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function P(e,t,r){return(t=L(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D(e){return D="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},D(e)}function O(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,L(n.key),n)}}function L(e){var t=function(e,t){if("object"!=D(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==D(t)?t:t+""}var A=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cacheMap={},this.tmodelKeyMap={},this.fetchingAPIMap={},this.fetchingImageMap={},this.targetPageKeyMap=new WeakMap,this.fetchSeq=0,this.runtimeEpoch=0},t=[{key:"clear",value:function(){this.runtimeEpoch++,this.fetchingAPIMap={},this.fetchingImageMap={}}},{key:"clearAll",value:function(){this.runtimeEpoch++,this.cacheMap={},this.tmodelKeyMap={},this.fetchingAPIMap={},this.fetchingImageMap={},this.targetPageKeyMap=new WeakMap,this.fetchSeq=0}},{key:"setTargetPageKey",value:function(e,t,r){var n=this.targetPageKeyMap.get(e);n||(n=new Map,this.targetPageKeyMap.set(e,n)),n.set(t,r)}},{key:"getTargetPageKey",value:function(e,t){var r,n;return null!==(r=null===(n=this.targetPageKeyMap.get(e))||void 0===n?void 0:n.get(t))&&void 0!==r?r:document.URL}},{key:"fetchCommon",value:function(e,t,r,n,i,a){m.g.markFetchAction(r);var l=document.URL,s=r.key;return this.setTargetPageKey(r,s,l),this.isFetched(t)?n[e]||(n[e]={fetchId:e,cacheId:t,request:i,startTime:o.d.now(),epoch:this.runtimeEpoch,targets:[{tmodel:r,targetName:s}],fetchMap:n}):n[e]||(n[e]={fetchId:e,cacheId:t,request:i,startTime:o.d.now(),epoch:this.runtimeEpoch,targets:[{tmodel:r,targetName:s}],fetchMap:n},a(n[e])),this.addToTModelKeyMap(r,s,e,t,n),e}},{key:"fetch",value:function(e,t,r,n){var i=this;if(!t||"object"!==D(t)||Array.isArray(t))(Array.isArray(t)?t:[t]).forEach((function(t){i.fetchOne(e,t,r,n)}));else{var a=t.url,o=t.cacheId,l=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,T);this.fetchOne(e,a,l,null!=o?o:n)}}},{key:"fetchOne",value:function(e,t,r,n){var i=this,a=this.getFetchKey(e,t,r),o={type:"api",url:t,query:b.s.encodeValue(r)};this.fetchCommon(a,n,e,this.fetchingAPIMap,o,(function(e){return i.ajaxAPI(t,r,e)}))}},{key:"fetchImage",value:function(e,t,r){var n=this;(Array.isArray(t)?t:[t]).forEach((function(t){var i=n.getFetchKey(e,t),a={type:"image",src:t};n.fetchCommon(i,r,e,n.fetchingImageMap,a,(function(e){return n.loadImage(t,e)}))}))}},{key:"getFetchKey",value:function(e,t,r){var n=r?"".concat(e.oid,"_").concat(t,"_").concat(e.getTargetCycle(e.key),"_").concat(JSON.stringify(r)):"".concat(e.oid,"_").concat(t,"_").concat(e.getTargetCycle(e.key));return"".concat(n,"_").concat(++this.fetchSeq)}},{key:"getTModelKey",value:function(e,t){var r=this.getTargetPageKey(e,t);return"".concat(r,"_").concat(e.oid,"_").concat(t)}},{key:"createTModelEntry",value:function(e,t){return{pageKey:this.getTargetPageKey(e,t),oid:e.oid,targetName:t,fetchMap:{},entryCount:0,resultCount:0,errorCount:0,activeIndex:0,accessIndex:0}}},{key:"addToTModelKeyMap",value:function(e,t,r,n,i){var a=this.getTModelKey(e,t),l=o.d.getLoadTargetName(t),s=this.isLoadingComplete(e,t),u=this.tmodelKeyMap[a];!s&&u&&Array.isArray(e.val(l))||(u=this.createTModelEntry(e,t),this.tmodelKeyMap[a]=u,e.val(l,[])),u.fetchMap[r]={fetchId:r,order:u.entryCount},u.entryCount++,e.val(l).push(void 0),n&&this.isFetched(n)&&(i[r].startTime=o.d.now(),this.handleSuccess(i[r],this.cacheMap[n].result))}},{key:"getPendingRequestSnapshots",value:function(e){var t=this;return Object.values(e).map((function(e){return{cacheId:e.cacheId,request:b.s.encodeValue(e.request),targets:e.targets.map((function(r){var n,i=r.tmodel,a=r.targetName,o=t.getTModelKey(i,a),l=t.tmodelKeyMap[o],s=null==l||null===(n=l.fetchMap)||void 0===n?void 0:n[e.fetchId];return{oid:i.oid,targetName:a,order:null==s?void 0:s.order}})).filter((function(e){return Number.isFinite(e.order)}))}}))}},{key:"removeFromTModelKeyMap",value:function(e,t){var r=this.getTModelKey(e,t);delete this.tmodelKeyMap[r]}},{key:"isLoading",value:function(e,t){var r=this.getTModelKey(e,t);return this.tmodelKeyMap[r]}},{key:"isLoadingSuccessful",value:function(e,t){var r=this.getTModelKey(e,t);return this.tmodelKeyMap[r]&&this.tmodelKeyMap[r].resultCount===this.tmodelKeyMap[r].entryCount}},{key:"isLoadingComplete",value:function(e,t){var r=this.getTModelKey(e,t);return!!this.tmodelKeyMap[r]&&this.tmodelKeyMap[r].resultCount===this.tmodelKeyMap[r].entryCount&&this.tmodelKeyMap[r].activeIndex===this.tmodelKeyMap[r].entryCount&&this.tmodelKeyMap[r].resultCount===e.getTargetCycles(t)}},{key:"resetLoadingError",value:function(e,t){var r=this.getTModelKey(e,t),n=this.tmodelKeyMap[r];n&&(n.errorCount=0)}},{key:"nextActiveItem",value:function(e,t){var r=this.getTModelKey(e,t),n=this.tmodelKeyMap[r];return!!n&&n.activeIndex++}},{key:"isNextLoadingItemSuccessful",value:function(e,t){var r=this.getTModelKey(e,t),n=this.tmodelKeyMap[r];if(!n)return!1;var i=o.d.getLoadTargetName(t),a=e.val(i);return Array.isArray(a)&&o.d.isDefined(a[n.activeIndex])&&o.d.isDefined(a[n.accessIndex])}},{key:"getLoadingItemValue",value:function(e,t,r){var n=this.getTModelKey(e,t),i=this.tmodelKeyMap[n];if(i&&!(i.accessIndex>=i.resultCount)){var a,l=o.d.getLoadTargetName(t),s=e.val(l);return s&&(null!=r&&r.endsWith("$$")?(a=s.slice(i.accessIndex,i.resultCount),i.accessIndex+=a.length):o.d.isDefined(s[i.accessIndex])&&(a=s[i.accessIndex],i.accessIndex=Math.min(i.accessIndex+1,i.entryCount))),a}}},{key:"isFetched",value:function(e){var t,r;return null!==(t=null===(r=this.cacheMap[e])||void 0===r?void 0:r.success)&&void 0!==t&&t}},{key:"getFetchingPeriod",value:function(e){return this.fetchingAPIMap[e]?o.d.now()-this.fetchingAPIMap[e].startTime:void 0}},{key:"fetchCache",value:function(e){return this.cacheMap[e]}},{key:"calculateTargetStatus",value:function(e,t){var r=e.getTargetCycle(t),n=e.getTargetCycles(t);return e.isTargetInLoop(t)||r<n-1?"active":this.isLoadingSuccessful(e,t)?"done":"fetching"}},{key:"handleSuccess",value:function(e,t){var r=this;if(e.epoch===this.runtimeEpoch){var n=o.d.now(),i=e.fetchId,a=e.cacheId,l=e.startTime,s=e.targets,u=e.fetchMap,c={fetchingPeriod:n-l,success:!0,result:t};s.forEach((function(e){var t=e.tmodel,n=e.targetName,a=r.getTModelKey(t,n),l=r.tmodelKeyMap[a],s=o.d.getLoadTargetName(n);if(l&&l.fetchMap[i]){var u=l.fetchMap[i];r.callOnSuccessHandler(t,n,M(M({},c),{},{order:u.order}));var d=t.val(s);d&&(o.d.isDefined(d[u.order])||l.resultCount++,d[u.order]=c.result),t.val(n,c.result);var h=r.calculateTargetStatus(t,n);t.setTargetStatus(n,h),t.setLastUpdate(n),m.g.shouldActivateNextTarget(t,n)}})),delete u[i],a&&(this.cacheMap[a]=c),kt().schedule(0,"api_success_".concat(i))}}},{key:"handleError",value:function(e,t){var r=this;if(e.epoch===this.runtimeEpoch){var n=o.d.now(),i=e.fetchId,a=e.cacheId,l=e.startTime,s=e.targets,u=e.fetchMap;s.forEach((function(e){var a=e.tmodel,s=e.targetName,u=r.getTModelKey(a,s),c=r.tmodelKeyMap[u],d=o.d.getLoadTargetName(s);if(c&&c.fetchMap[i]){var h=c.fetchMap[i],f={fetchingPeriod:n-l,success:!1,order:h.order,error:t},v=a.val(d);v&&(o.d.isDefined(v[h.order])||c.resultCount++,v[h.order]=f),a.val(s,f),c.errorCount++,r.callOnErrorHandler(a,s);var p=r.calculateTargetStatus(a,s);a.setTargetStatus(s,p),a.setLastUpdate(s),m.g.shouldActivateNextTarget(a,s)}})),delete u[i],a&&delete this.cacheMap[a],kt().schedule(0,"api_error_".concat(i))}}},{key:"callOnSuccessHandler",value:function(e,t,r){var n,i=null===(n=e.targets[t])||void 0===n?void 0:n.onSuccess;i&&("function"==typeof i?(e.setTargetMethodName(t,"onSuccess"),i.call(e,r)):Array.isArray(i)?i.forEach((function(t){return m.g.activateSingleTarget(e,t)})):m.g.activateSingleTarget(e,i))}},{key:"callOnErrorHandler",value:function(e,t){var r,n=null===(r=e.targets[t])||void 0===r?void 0:r.onError;n&&("function"==typeof n?(e.setTargetMethodName(t,"onError"),n.call(e,e.val(t))):Array.isArray(n)?n.forEach((function(t){return m.g.activateSingleTarget(e,t)})):m.g.activateSingleTarget(e,n))}},{key:"ajaxAPI",value:function(e,t,r){var i,a,o,l=this,s={url:e,dataType:"json",type:"GET",success:function(e){return l.handleSuccess(r,e)},error:function(e){return l.handleError(r,e)}};if((u=t)&&"object"===D(u)&&!Array.isArray(u)){for(var u,c=new Set(["data","type","method","requestType","dataType","headers","contentType","timeout","processData","cache","beforeSend","withCredentials","xhrFields"]),d={},h={},f=0,v=Object.entries(t);f<v.length;f++){var p=S(v[f],2),g=p[0],y=p[1];"requestType"===g?d.type=y:c.has(g)?d[g]=y:h[g]=y}var m=M(M(M({},s),d),{},{type:null!==(i=null!==(a=d.method)&&void 0!==a?a:d.type)&&void 0!==i?i:s.type,dataType:null!==(o=d.dataType)&&void 0!==o?o:s.dataType});!("data"in m)&&Object.keys(h).length&&(m.data=h),n.J.ajax(m)}else n.J.ajax(M(M({},s),{},{data:t}))}},{key:"loadImage",value:function(e,t){var r=this,n=new Image;n.src=e,n.onload=function(){var e={width:n.width,height:n.height,src:n.src};r.handleSuccess(t,e)},n.onerror=function(){r.handleError(t,"not found")}}},{key:"createRuntimeSnapshot",value:function(){return{cacheMap:b.s.encodeValue(this.cacheMap),entries:Object.values(this.tmodelKeyMap).map((function(e){return{pageKey:e.pageKey,oid:e.oid,targetName:e.targetName,entryCount:e.entryCount,resultCount:e.resultCount,errorCount:e.errorCount,activeIndex:e.activeIndex,accessIndex:e.accessIndex}})),pendingRequests:[].concat(k(this.getPendingRequestSnapshots(this.fetchingAPIMap)),k(this.getPendingRequestSnapshots(this.fetchingImageMap)))}}},{key:"restorePendingRequest",value:function(e,t){var r,n=b.s.decodeValue(e.request,t),i=[],a=w(e.targets||[]);try{for(a.s();!(r=a.n()).done;){var l=r.value,s=t[l.oid];if(s){var u=this.getTModelKey(s,l.targetName);this.tmodelKeyMap[u]&&i.push({tmodel:s,targetName:l.targetName,order:l.order})}}}catch(e){a.e(e)}finally{a.f()}if(i.length){var c="restored_".concat(++this.fetchSeq),d="image"===n.type?this.fetchingImageMap:this.fetchingAPIMap,h={fetchId:c,cacheId:e.cacheId,request:n,startTime:o.d.now(),epoch:this.runtimeEpoch,targets:i.map((function(e){return{tmodel:e.tmodel,targetName:e.targetName}})),fetchMap:d};d[c]=h;for(var f=0,v=i;f<v.length;f++){var p=v[f],g=p.tmodel,y=p.targetName,m=p.order,T=this.getTModelKey(g,y);this.tmodelKeyMap[T].fetchMap[c]={fetchId:c,order:m}}e.cacheId&&this.isFetched(e.cacheId)?this.handleSuccess(h,this.cacheMap[e.cacheId].result):"image"===n.type?this.loadImage(n.src,h):this.ajaxAPI(n.url,n.query,h)}}},{key:"restoreRuntimeSnapshot",value:function(e,t){this.clear(),this.cacheMap=b.s.decodeValue((null==e?void 0:e.cacheMap)||{},t),this.tmodelKeyMap={},this.targetPageKeyMap=new WeakMap;var r,n=w((null==e?void 0:e.entries)||[]);try{for(n.s();!(r=n.n()).done;){var i=r.value,a=t[i.oid];if(a){this.setTargetPageKey(a,i.targetName,i.pageKey);var o=this.getTModelKey(a,i.targetName);this.tmodelKeyMap[o]={pageKey:i.pageKey,oid:i.oid,targetName:i.targetName,fetchMap:{},entryCount:i.entryCount,resultCount:i.resultCount,errorCount:i.errorCount,activeIndex:i.activeIndex,accessIndex:i.accessIndex}}}}catch(e){n.e(e)}finally{n.f()}var l,s=w((null==e?void 0:e.pendingRequests)||[]);try{for(s.s();!(l=s.n()).done;){var u=l.value;this.restorePendingRequest(u,t)}}catch(e){s.e(e)}finally{s.f()}}}],t&&O(e.prototype,t),r&&O(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}(),j=r(714),I=r(249),_=r(161);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)}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||B(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(e){return function(e){if(Array.isArray(e))return H(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||B(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 F(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=B(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function B(e,t){if(e){if("string"==typeof e)return H(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?H(e,t):void 0}}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){W(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function W(e,t,r){return(t=Y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $(){$=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new O(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};u(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,o,l){var s=d(e[i],e,a);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==R(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var s=M(l,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var u=d(t,r,n);if("normal"===u.type){if(i=n.done?p:f,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=p,n.method="throw",n.arg=u.arg)}}}function M(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,M(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(R(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),u(S,s,"Generator"),u(S,o,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;D(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function K(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function G(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){K(a,n,i,o,l,"next",e)}function l(e){K(a,n,i,o,l,"throw",e)}o(void 0)}))}}function z(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Y(n.key),n)}}function Y(e){var t=function(e,t){if("object"!=R(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==R(t)?t:t+""}var X=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hasLocationList=[],this.hasLocationMap={},this.visibleChildrenLengthMap={},this.updatedContainerMap={},this.locationListStats=[],this.domIslandSet=new Set,this.activatedList=[],this.activatedMap={},this.calcBusy=!1,this.calcQueued=!1,this.calcEpoch=0},t=[{key:"clear",value:function(){this.visibleChildrenLengthMap={},this.updatedContainerMap={},this.activatedList=[],this.activatedMap={},this.domIslandSet.clear(),this.calcBusy=!1,this.calcQueued=!1}},{key:"calculateActivated",value:function(){var e=0,t=this.activatedList;for(this.activatedList=[],this.activatedMap={};e<t.length;){var r=t[e++],n=r.activatedTargets.slice(0);r.activatedTargets.length=0,Tt().applyTargetValues(r,n),r.updatingTargetList.length>0&&Tt().setActualValues(r,r.updatingTargetList),this.hasLocationMap[r.oid]||this.addToLocationList(r)}}},{key:"calculateAll",value:(i=G($().mark((function e(){var t,r,n,i,a,l=arguments;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=l.length>0&&void 0!==l[0]?l[0]:8,r=l.length>1&&void 0!==l[1]&&l[1],n=this.calcEpoch,!this.calcBusy){e.next=6;break}return this.calcQueued=!0,e.abrupt("return");case 6:return this.calcBusy=!0,r||(this.hasLocationList.length=0,this.hasLocationMap={},this.locationListStats=[]),i=[{container:ft(),stage:"init",children:[],viewport:void 0,index:0}],a={budgetMs:t,sliceStart:o.d.now(),calcEpoch:n},e.next=12,this.processStack(i,a);case 12:if(a.calcEpoch===this.calcEpoch){e.next=14;break}return e.abrupt("return");case 14:this.processAfterStack(),this.calcBusy=!1,this.calcQueued&&(this.calcQueued=!1,kt().schedule(1,"queuedLocationCalculation"));case 17:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"cancelCurrentCalculation",value:function(){this.calcEpoch++,this.calcBusy=!1,this.calcQueued=!1}},{key:"processStack",value:(n=G($().mark((function e(t,r){var n,i,a,l,s,u,c,d=this;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=function(e){var t,r,n=e.container;n.adjustViewport(),n.calcContentWidthHeight(),null===(t=n.markLayoutComplete)||void 0===t||t.call(n,e.layoutEpoch),d.retryPendingTargets(n),null===(r=n.requestParticleRender)||void 0===r||r.call(n),n.visibilityDirty=!1},i=function(e){var t=e.children[e.index];t&&t.getDirtyLayout()&&t.isComplete()&&t.removeLayoutDirty(t),e.stage="afterChild"},a=function(e){var t=e.container,r=e.children,n=e.viewport,i=r[e.index];i&&(i.useContentHeight()&&(i.actualValues.height!==i.getContentHeight()&&(i.actualValues.height=i.getContentHeight(),i.markLayoutDirty("contentWidthHeight")),i.addToStyleTargetList("height")),i.useContentWidth()&&(i.actualValues.width!==i.getContentWidth()&&(i.actualValues.width=i.getContentWidth(),i.markLayoutDirty("contentWidthHeight")),i.addToStyleTargetList("width")),i.isInFlow()&&(o.d.isNumber(i.val("appendNewLine"))?n.appendNewLine():n.nextLocation(),t.calcContentWidthHeight()),(i.hasEventDirty()||vt().getEventType()||vt().hasDelta())&&(d.checkExternalEvents(i),i.hasEventDirty()&&(i.processedEventEpoch=i.eventDirtyEpoch))),e.index++,e.index<e.children.length&&(e.stage="child")},l=function(e){var r,n=e.container,i=e.children,a=e.viewport,o=i[e.index];if(o){if(o.isDomIsland()&&o.originWindowEpoch!==vt().getWindowEpoch()&&o.hasDom()&&(o.calcAbsolutePositionFromDom(),o.originWindowEpoch=vt().getWindowEpoch()),a.setCurrentChild(o),o.isLightweightChild)return d.calcNextLightweightLocation(o,n,a),void e.index++;if(!(o.getDirtyLayout()||o.visibilityDirty||n.visibilityDirty||o.hasEventDirty()||o.currentStatus||0!==o.activeTargetList.length)){var l=o.absX,s=o.absY;d.calcNextLocation(o,n,a),o.isIncluded()&&o.activateChangedPassiveTargets()&&(d.calcQueued=!0);var u=o.absX!==l||o.absY!==s,c=o.visibilityDirty||o.hasChildren()&&o.isVisible()&&u;return o.getDirtyLayout()&&(d.calcQueued=!0),e.index++,void(c&&o.hasChildren()&&(o.visibilityDirty=!0,t.push({container:o,stage:"init",children:[],viewport:void 0,index:0})))}o.isDomIsland()&&d.domIslandSet.add(o);var h=o.x,f=o.y;a.setLocation(),a.isOverflow()&&(a.overflow(),a.setLocation(),o.x===h&&o.y===f||o.markLayoutDirty("overflow"));var v=Math.floor(o.actualValues.x),p=Math.floor(o.actualValues.y);o.isIncluded()&&(o.activateChangedPassiveTargets(),d.calculateTargets(o)),o.isIncluded()&&o.targets.onVisibleChildrenChange&&!d.visibleChildrenLengthMap[o.oid]&&(d.visibleChildrenLengthMap[o.oid]={tmodel:o,visibleCount:o.visibleChildren.length}),d.addToLocationList(o),I.a.isXDefined(o)||(o.actualValues.x=o.x),I.a.isYDefined(o)||(o.actualValues.y=o.y),d.catchupNoDomLayoutTargets(o),o.isDomIsland()||o.calcAbsolutePosition(o.getX(),o.getY()),o.excludeDefaultStyling()||d.fixLocation(o,v,p);var g,y,m,b,T=o.isVisible();d.calculateVisibility(o),n.visibilityDirty&&o.hasChildren()&&(T||o.isVisible())&&(o.visibilityDirty=!0),(null===(r=o.getDirtyLayout())||void 0===r?void 0:r.count)>0?d.locationListStats.push("".concat(o.oid,"|").concat(null===(g=o.getDirtyLayout())||void 0===g?void 0:g.count,"|").concat(null===(y=o.getDirtyLayout())||void 0===y?void 0:y.lastKey)):d.locationListStats.push("".concat(o.oid,"|").concat(null!==(m=null===(b=o.getDirtyLayout())||void 0===b?void 0:b.count)&&void 0!==m?m:0)),e.stage="resetDirtyLayout",o.hasChildren()&&o.shouldCalculateChildren()&&t.push({container:o,stage:"init",children:[],viewport:void 0,index:0})}else e.index++};case 4:if(!t.length){e.next=25;break}if(r.calcEpoch===this.calcEpoch){e.next=7;break}return e.abrupt("return");case 7:if(!(o.d.now()-r.sliceStart>r.budgetMs)){e.next=14;break}return e.next=10,new Promise(requestAnimationFrame);case 10:if(r.calcEpoch===this.calcEpoch){e.next=12;break}return e.abrupt("return");case 12:return r.sliceStart=o.d.now(),e.abrupt("continue",4);case 14:if("init"===(s=t[t.length-1]).stage&&(u=s.container,s.layoutEpoch=u.layoutEpoch,c=this.calcChildren(u),u.childrenUpdateFlag&&(u.childrenUpdateFlag=!1,u.targets.onChildrenChange&&(this.updatedContainerMap[u.oid]=u)),u.shouldBeBracketed()&&(u.backupDirtyLayout=q({},u.dirtyLayout)),u.visibleChildren.length=0,s.children=c.slice(0),s.index=0,s.viewport=u.createViewport(),s.stage="child"),"resetDirtyLayout"===s.stage&&i(s),"afterChild"===s.stage&&a(s),!(s.index>=s.children.length)){e.next=22;break}return n(s),t.pop(),e.abrupt("continue",4);case 22:"child"===s.stage&&l(s),e.next=4;break;case 25:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"processAfterStack",value:function(){for(var e in this.visibleChildrenLengthMap){var t=this.visibleChildrenLengthMap[e],r=t.tmodel,n=t.visibleCount;!r.isVisible()||n===r.visibleChildren.length&&0!==r.visibleChildren.length||(this.runEventTargets(r,["onVisibleChildrenChange"]),this.visibleChildrenLengthMap[e].visibleCount=r.visibleChildren.length)}for(var i in this.updatedContainerMap){var a=this.updatedContainerMap[i];a.isVisible()&&this.runEventTargets(a,["onChildrenChange"]),delete this.updatedContainerMap[i]}}},{key:"calcChildren",value:function(e){return e.getChildren(),e.shouldBeBracketed()?j.M.generate(e):(e.lastChildrenUpdate.additions.length=0,e.lastChildrenUpdate.deletions.length=0,j.M.bracketMap[e.oid]&&(delete j.M.bracketMap[e.oid],delete j.M.pageMap[e.oid]),e.getChildren())}},{key:"calcNextLocation",value:function(e,t,r){var n;if(e.isLightweightChild)this.calcNextLightweightLocation(e,t,r);else{var i=e.x,a=e.y;r.setLocation();var l=!1;r.isOverflow()&&(l=!0,r.overflow(),r.setLocation()),!l||e.x===i&&e.y===a||e.markLayoutDirty("overflow"),e.isIncluded()&&e.targets.onVisibleChildrenChange&&!this.visibleChildrenLengthMap[e.oid]&&(this.visibleChildrenLengthMap[e.oid]={tmodel:e,visibleCount:e.visibleChildren.length}),I.a.isXDefined(e)||(e.actualValues.x=e.x),I.a.isYDefined(e)||(e.actualValues.y=e.y),this.catchupNoDomLayoutTargets(e),e.isDomIsland()||e.calcAbsolutePosition(e.getX(),e.getY()),e.excludeDefaultStyling()||(this.addToTransformTargetList(e,"x"),this.addToTransformTargetList(e,"y")),((null===(n=e.styleTargetMap)||void 0===n?void 0:n.size)>0||e.updatingTargetList.length>0)&&this.addToLocationList(e),this.calculateVisibility(e);var s=bt().visibleOidMap[e.oid];(e.isVisible()&&e.isIncluded()?s!==e:void 0!==s)&&this.addToLocationList(e),e.isInFlow()&&(o.d.isNumber(e.val("appendNewLine"))?r.appendNewLine():r.nextLocation(),t.calcContentWidthHeight())}}},{key:"calcNextLightweightLocation",value:function(e,t,r){r.setLocation(),r.isOverflow()&&(r.overflow(),r.setLocation()),I.a.isXDefined(e)||(e.actualValues.x=e.x),I.a.isYDefined(e)||(e.actualValues.y=e.y),this.catchupNoDomLayoutTargets(e),e.calcAbsolutePosition(e.getX(),e.getY());var n=e.calcVisibility();e.actualValues.isVisible=n,n&&e.isInFlow()&&t.visibleChildren.push(e),e.isInFlow()&&(o.d.isNumber(e.val("appendNewLine"))?r.appendNewLine():r.nextLocation(),t.calcContentWidthHeight())}},{key:"calculateVisibility",value:function(e){var t,r,n,i,a=e.isVisible(),l=null!==(t=null===(r=e.visibilityStatus)||void 0===r?void 0:r.isVisible)&&void 0!==t?t:void 0;if(e.visibilityStatus||(e.visibilityStatus={}),e.visibilityStatus.lastIsVisible=e.visibilityStatus.isVisible,o.d.isDefined(e.targets.isVisible))n="function"==typeof e.targets.isVisible.value?e.targets.isVisible.value.call(e):!!e.targets.isVisible,e.actualValues.isVisible=n,e.isNowVisible=!a&&n,e.isNowInvisible=(a||void 0===a)&&!n;else{var s=e.calcVisibility();n=s,e.isNowVisible=!a&&n||!l&&s,e.isNowInvisible=(a||void 0===a)&&!n||l&&!s,e.actualValues.isVisible=n}(e.isNowVisible||e.isNowInvisible)&&(e.markLayoutDirty("isNowVisible"),this.addToLocationList(e),null===(i=e.onVisibilityChange)||void 0===i||i.call(e,n)),e.isNowVisible&&e.hasChildren()&&(e.visibilityDirty=!0),_.O.pauseResumeSchedule(e),"BI"!==e.type&&e.isVisible()&&e.isInFlow()&&e.getParent()&&e.getParent().visibleChildren.push(e)}},{key:"calculateTargets",value:function(e){e.hasDomNow&&this.retryDomTargets(e),this.checkInternalEvents(e);for(var t=0;e.activatedTargets.length&&t++<50;){var r=e.activatedTargets.slice(0);e.activatedTargets.length=0;var n,i=F(r);try{for(i.s();!(n=i.n()).done;){var a=n.value;Tt().applyTargetValue(e,a)}}catch(e){i.e(e)}finally{i.f()}}_.O.pauseResumeSchedule(e),Tt().applyTargetValues(e),e.updatingTargetList.length>0&&Tt().setActualValues(e,e.updatingTargetList),I.a.shouldMeasureWidthFromDom(e)&&(e.hasDom()?I.a.setWidthFromDom(e):e.markLayoutDirty("width")),I.a.shouldMeasureHeightFromDom(e)&&(e.hasDom()?I.a.setHeightFromDom(e):e.markLayoutDirty("height")),(e.isNowVisible||e.hasDomNow)&&this.retryPendingTargets(e),e.isNowVisible=!1,e.hasDomNow=!1,e.targetExecutionCount++}},{key:"retryPendingTargets",value:function(e){var t=e.pendingTargets;if(null!=t&&t.size)for(var r=0,n=V(t);r<n.length;r++){var i,a=n[r];null!==(i=e.pendingTargets)&&void 0!==i&&i.has(a)&&(m.g.cleanupTarget(e,a),m.g.shouldActivateNextTarget(e,a))}}},{key:"catchupNoDomLayoutTargets",value:function(e){var t;if(null!==(t=e.noDomUpdatingTargets)&&void 0!==t&&t.size)if(e.isLightweightChild)e.catchupNoDomLayoutTargets();else{var r,n=F(e.noDomUpdatingTargets);try{for(n.s();!(r=n.n()).done;){var i=r.value;l.u.affectsVisibility(i)&&Tt().catchupTargetByElapsed(e,i,{fireEnd:!1})}}catch(e){n.e(e)}finally{n.f()}}}},{key:"checkExternalEvents",value:function(e){var t=e.externalEventMap;if((null==t?void 0:t.size)>0){var r,n=[],i=l.u.allEventMap,a=F(t);try{for(a.s();!(r=a.n()).done;){var o=N(r.value,1)[0];i[o](e)&&n.push(e.allTargetMap[o])}}catch(e){a.e(e)}finally{a.f()}this.runEventTargets(e,n)}}},{key:"checkInternalEvents",value:function(e){var t=[],r=l.u.internalEventMap,n=e.internalEventMap;if((null==n?void 0:n.size)>0){var i,a=F(n);try{for(a.s();!(i=a.n()).done;){var o=N(i.value,1)[0];r[o](e)&&t.push(e.allTargetMap[o])}}catch(e){a.e(e)}finally{a.f()}}this.runEventTargets(e,t)}},{key:"runEventTargets",value:function(e,t){t.forEach((function(t){if(e.isTargetEnabled(t)&&!e.isTargetUpdating(t)){e.targetValues[t]&&(e.targetValues[t].status=""),s.j.prepareTarget(e,t),s.j.resolveTargetValue(e,t),s.j.updateTarget(e,e.targetValues[t],t,!1);var r=e.val(t);Array.isArray(r)?r.forEach((function(t){return m.g.activateSingleTarget(e,t)})):"string"==typeof r&&m.g.activateSingleTarget(e,r),m.g.shouldActivateNextTarget(e,t)}}))}},{key:"retryDomTargets",value:function(e){var t,r=e.targets.onDomReady,n=null!==(t=null==r?void 0:r.value)&&void 0!==t?t:r;n&&(Array.isArray(n)?n:[n]).forEach((function(t){t.endsWith("$")||m.g.activateSingleTarget(e,t)}))}},{key:"addToLocationList",value:function(e){this.hasLocationMap[e.oid]||(this.hasLocationList.push(e),this.hasLocationMap[e.oid]=e)}},{key:"addToActivatedList",value:function(e){this.activatedMap[e.oid]||(this.activatedList.push(e),this.activatedMap[e.oid]=e)}},{key:"fixLocation",value:function(e,t,r){if(e.hasValidAnimation()){var n=Math.floor(e.actualValues.x)!==t,i=Math.floor(e.actualValues.y)!==r,a={};if(n&&"updating"!==e.getTargetStatus(e.allTargetMap.x)&&(a.x=e.actualValues.x),i&&"updating"!==e.getTargetStatus(e.allTargetMap.y)&&(a.y=e.actualValues.y),Object.keys(a).length)return void wt().rebaseAutoLayoutTransform(e,a)}this.addToTransformTargetList(e,"x"),this.addToTransformTargetList(e,"y")}},{key:"addToTransformTargetList",value:function(e,t){I.a.getTransformValue(e,t)!==Math.floor(e.tfMap[t])&&e.addToStyleTargetList(t)}},{key:"isActivated",value:function(e){return this.activatedMap[e.oid]}}],t&&z(e.prototype,t),r&&z(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,n,i}(),Q=r(260);function Z(e){return Z="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},Z(e)}function J(e){return function(e){if(Array.isArray(e))return ee(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){if("string"==typeof e)return ee(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ee(e,t):void 0}}(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 ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ne(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ne(e,t,r){return(t=se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(){ie=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new O(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};u(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,o,l){var s=d(e[i],e,a);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==Z(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var s=M(l,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var u=d(t,r,n);if("normal"===u.type){if(i=n.done?p:f,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=p,n.method="throw",n.arg=u.arg)}}}function M(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,M(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(Z(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),u(S,s,"Generator"),u(S,o,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;D(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function ae(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function oe(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){ae(a,n,i,o,l,"next",e)}function l(e){ae(a,n,i,o,l,"throw",e)}o(void 0)}))}}function le(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,se(n.key),n)}}function se(e){var t=function(e,t){if("object"!=Z(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Z(t)?t:t+""}var ue=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.currentLink=o.d.getFullLink(document.URL),this.pageCache=new Map,this.initHistory()},t=[{key:"initHistory",value:function(){"scrollRestoration"in history&&(history.scrollRestoration="manual");var e=history.state;e&&(e.link||e.browserUrl)||history.replaceState({link:this.currentLink},"",this.currentLink)}},{key:"initPage",value:function(e){Je.tRoot.$dom.outerHTML(e),Je.tRoot.$dom=I.a.getRootDom(),"body"!==Je.tRoot.$dom.getTagName()&&Je.tRoot.$dom.attr("data-tj-no-slot","true"),Q.v.initPageDoms(Je.tRoot.$dom)}},{key:"openLinkFromHistory",value:(l=oe(ie().mark((function e(t){var r;return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.link||t.browserUrl){e.next=3;break}return e.abrupt("return");case 3:return t.browserUrl&&history.replaceState({link:r},"",r),e.next=6,this.openLink(r,!1);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"onPageClose",value:function(){Je.resizeLastUpdate=o.d.now(),vt().resizeRoot(),Je.manager.getAvailableDoms().forEach((function(e){St().runEventTargets(e,["onPageClose"])}))}},{key:"openLink",value:(a=oe(ie().mark((function e(t){var r,n=arguments;return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!(n.length>1&&void 0!==n[1])||n[1],(t=o.d.getFullLink(t))!==this.currentLink){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,this.storePage(this.currentLink);case 6:if(r&&history.pushState({link:t},"",t),this.currentLink=t,!this.pageCache.has(t)){e.next=12;break}return e.next=11,this.restorePage(t);case 11:return e.abrupt("return");case 12:return Je.tRoot.$dom.innerHTML(""),dt.oids={},dt.tmodelIdMap={},Je.tRoot=Je.tRootFactory(),e.next=18,Je.start({skipSchedulerReset:!0});case 18:kt().schedule(0,"pagemanager-processOpenLink");case 19:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"back",value:function(){return history.back()}},{key:"getStateKey",value:function(e){return"page:".concat(o.d.getFullLink(e))}},{key:"storePage",value:(i=oe(ie().mark((function e(t){var r;return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.d.getFullLink(t),r=kt().getSnapshot(),e.next=4,Je.stop();case 4:return St().cancelCurrentCalculation(),this.onPageClose(),this.pageCache.set(t,{html:I.a.getPageDom().innerHTML(),tRoot:Je.tRoot,oids:re({},dt.oids),tmodelIdMap:re({},dt.tmodelIdMap),visibleOidMap:re({},Je.manager.visibleOidMap),scrollLeft:window.scrollX,scrollTop:window.scrollY,runSnapshot:r}),e.next=9,Je.reset({preserveCachedModels:!0,skipSchedulerReset:!0});case 9:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"restorePage",value:(n=oe(ie().mark((function e(t){var r,n,i,a;return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.pageCache.get(o.d.getFullLink(t))){e.next=3;break}return e.abrupt("return",!1);case 3:return Je.tRoot=r.tRoot,dt.oids=re({},r.oids),dt.tmodelIdMap=re({},r.tmodelIdMap),I.a.getPageDom().innerHTML(r.html),Je.tRoot.$dom=I.a.getRootDom(),n=Object.values(r.visibleOidMap),i=Q.v.initCacheDoms(n),n.forEach((function(e){e.visibilityStatus=void 0})),Je.manager.visibleOidMap=re({},r.visibleOidMap),i.forEach((function(e){Je.manager.visibleOidMap[e.oid]=e})),a=J(new Set([].concat(n,J(i)))),Je.manager.activatePendingTargetsAfterDom(a),window.scrollTo(r.scrollLeft,r.scrollTop),Je.tRoot.markLayoutDirty("pageCacheRestore"),e.next=19,Je.start({skipSchedulerReset:!0});case 19:return kt().restoreSnapshot(r.runSnapshot),e.abrupt("return",!0);case 21:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],t&&le(e.prototype,t),r&&le(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,n,i,a,l}(),ce=r(980),de=r(599);function he(e){return he="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},he(e)}function fe(e){return function(e){if(Array.isArray(e))return ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ge(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 ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||ge(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=ge(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function ge(e,t){if(e){if("string"==typeof e)return ye(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ye(e,t):void 0}}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(){me=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new O(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};u(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,o,l){var s=d(e[i],e,a);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==he(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var s=M(l,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var u=d(t,r,n);if("normal"===u.type){if(i=n.done?p:f,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=p,n.method="throw",n.arg=u.arg)}}}function M(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,M(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(he(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),u(S,s,"Generator"),u(S,o,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;D(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){we(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function we(e,t,r){return(t=Ee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ke(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function Se(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){ke(a,n,i,o,l,"next",e)}function l(e){ke(a,n,i,o,l,"throw",e)}o(void 0)}))}}function xe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ee(n.key),n)}}function Ee(e){var t=function(e,t){if("object"!=he(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=he(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==he(t)?t:t+""}var Ce=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.stateCheckpoints={},this.restoreQueue=Promise.resolve()},t=[{key:"store",value:(u=Se(me().mark((function e(){var t,r,i,a,l,s=arguments;return me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:"default",this.syncAnimationsForCheckpoint(),r=kt().getSnapshot(),i=I.a.getPageDom(),e.t0=t,e.t1=o.d.now(),e.t2=i.innerHTML(),e.t3=I.a.captureDomState(i),e.t4=Te({},dt.oids),e.t5=Je.tRoot.createRuntimeSnapshot(),e.t6=gt().createRuntimeSnapshot(),e.t7=Object.keys(Je.manager.visibleOidMap),e.t8=n.J.getWindowScrollLeft()||0,e.t9=n.J.getWindowScrollTop()||0,e.t10=r,e.next=17,this.captureGpuVisuals();case 17:return e.t11=e.sent,e.next=20,this.captureExplodeSources();case 20:return e.t12=e.sent,a={key:e.t0,capturedAt:e.t1,html:e.t2,domState:e.t3,oids:e.t4,rootSnapshot:e.t5,loaderSnapshot:e.t6,visibleOids:e.t7,scrollLeft:e.t8,scrollTop:e.t9,runSnapshot:e.t10,gpuVisuals:e.t11,explodeSources:e.t12},(l=document.createElement("template")).innerHTML=a.html,a.domTemplate=l,this.releaseGpuResources(this.stateCheckpoints[t]),this.stateCheckpoints[t]=a,e.abrupt("return",a);case 28:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"restore",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",r=this.restoreQueue.then((function(){return e.restoreCheckpoint(t)}));return this.restoreQueue=r.catch((function(e){console.error("State restoration failed:",e)})),r}},{key:"restoreCheckpoint",value:(s=Se(me().mark((function e(){var t,r,n,a,l,s,u,c,d,h,f,v,p,g,y=arguments;return me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=y.length>0&&void 0!==y[0]?y[0]:"default",m.g.currentTargetName=void 0,m.g.currentTModel=void 0,r=this.stateCheckpoints[t]){e.next=6;break}return e.abrupt("return",!1);case 6:return gt().clear(),e.next=9,Je.stop({discardState:!0});case 9:return St().cancelCurrentCalculation(),e.next=12,Je.reset({discardState:!0,skipSchedulerReset:!0});case 12:return dt.oids={},dt.tmodelIdMap={},n=o.d.now()-r.capturedAt,a=b.s.fromRuntimeSnapshot(r.rootSnapshot,i.c,{timeOffset:n}),l=a.root,s=a.tmodelIdMap,u=a.models,Je.tRoot=l,dt.oids=Te({},r.oids),dt.tmodelIdMap=s,gt().restoreRuntimeSnapshot(r.loaderSnapshot,s),c=I.a.getPageDom(),d=r.domTemplate.content.cloneNode(!0),c.getElement().replaceChildren(d),I.a.restoreMountedDom(c,r.domState),this.showGpuRestoreVisuals(r.gpuVisuals),Je.tRoot.$dom=I.a.getRootDom(),h=r.visibleOids.map((function(e){return s[e]})).filter(Boolean),f=this.connectRestoredDoms(h,u),Je.manager.activatePendingTargetsAfterDom(f,{restoredDoneTargets:!0}),Je.tRoot.markLayoutDirty("checkpointRestore"),e.next=32,Je.start({skipSchedulerReset:!0});case 32:return v=I.a.getPageDom(),I.a.restoreMountedDom(v,r.domState),e.next=36,I.a.restoreScroll(r);case 36:return e.next=38,I.a.restoreDomInteractionState(v,r.domState);case 38:return p=u.filter((function(e){return e instanceof de.G})),e.next=41,Promise.all(p.map((function(e){return e.restoreRuntimeDomDerivedState(r.explodeSources[e.oid])})));case 41:for(g=0;g<p.length;g++)p[g].particleRuntime.resumeRestored();return this.hideGpuRestoreVisuals(),kt().restoreSnapshot(r.runSnapshot),e.abrupt("return",!0);case 45:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"syncAnimationsForCheckpoint",value:function(){var e,t=new Map,r=pe(wt().recordMap.values());try{for(r.s();!(e=r.n()).done;){var n=e.value;if("canceled"!==n.status&&"detached"!==n.status){ce.T.updateTModelFromRecord(n);var i=t.get(n.tmodel);i||(i=new Set,t.set(n.tmodel,i)),i.add(n.originalKey)}}}catch(e){r.e(e)}finally{r.f()}var a,o=pe(t);try{for(o.s();!(a=o.n()).done;){var l=ve(a.value,2),s=l[0],u=l[1];I.a.commitAnimatedStyles(s,u)}}catch(e){o.e(e)}finally{o.f()}}},{key:"normalizeRestoredModels",value:function(e){var t,r=o.d.uniqueTModels(e),n=pe(r);try{for(n.s();!(t=n.n()).done;){var i=t.value,a=new Set(i.getAnimatingTargets());a.size&&i.hasDom()&&I.a.commitAnimatedStyles(i,a),i.viewport=void 0,i.visibilityStatus=void 0,i.currentStatus="new",i.originWindowEpoch=-1,i.domHeightTimestamp=0,i.domWidthTimestamp=0,i.dirtyLayout=!1,i.markLayoutDirty("stateRestore")}}catch(e){n.e(e)}finally{n.f()}return m.g.convertAnimatingTargetsToUpdating(r),r}},{key:"connectRestoredDoms",value:function(e,t){var r=Q.v.initCacheDoms(e),n=o.d.uniqueTModels([].concat(fe(e),fe(r)));this.normalizeRestoredModels(t),Je.manager.visibleOidMap={};var i,a=pe(n);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.isIncluded()&&l.isVisible()&&(Je.manager.visibleOidMap[l.oid]=l)}}catch(e){a.e(e)}finally{a.f()}return n}},{key:"getGpuVisualClipRect",value:function(e){for(var t=e.getBoundingClientRect(),r=Math.max(0,t.left),n=Math.max(0,t.top),i=Math.min(window.innerWidth,t.right),a=Math.min(window.innerHeight,t.bottom),o=e.parentElement;o;o=o.parentElement){var l=getComputedStyle(o),s=o.getBoundingClientRect(),u=["hidden","clip","auto","scroll"].includes(l.overflowX),c=["hidden","clip","auto","scroll"].includes(l.overflowY);if(u&&(r=Math.max(r,s.left),i=Math.min(i,s.right)),c&&(n=Math.max(n,s.top),a=Math.min(a,s.bottom)),i<=r||a<=n)return{left:r,top:n,width:0,height:0}}return{left:r,top:n,width:i-r,height:a-n}}},{key:"captureGpuVisuals",value:(l=Se(me().mark((function e(){var t,r,n,i,a,o,l,s,u;return me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t={},r=0,n=Object.values(dt.tmodelIdMap);case 2:if(!(r<n.length)){e.next=21;break}if(i=n[r],a=i.particleRenderer,(o=null==a?void 0:a.canvas)&&i.gpuChildrenEnabled){e.next=8;break}return e.abrupt("continue",18);case 8:if(l=o.getBoundingClientRect(),!((s=this.getGpuVisualClipRect(o)).width<=0||s.height<=0)){e.next=12;break}return e.abrupt("continue",18);case 12:return e.next=14,a.captureBitmap();case 14:if(u=e.sent){e.next=17;break}return e.abrupt("continue",18);case 17:t[i.oid]={bitmap:u,left:l.left,top:l.top,width:l.width,height:l.height,clipLeft:s.left,clipTop:s.top,clipWidth:s.width,clipHeight:s.height};case 18:r++,e.next=2;break;case 21:return e.abrupt("return",t);case 22:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"captureExplodeSources",value:(a=Se(me().mark((function e(){var t,r,n,i,a,o,l;return me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t={},r=0,n=Object.values(dt.tmodelIdMap);case 2:if(!(r<n.length)){e.next=14;break}if(a=n[r],(o=a.particleRenderer)&&a.explodeChildrenState){e.next=7;break}return e.abrupt("continue",11);case 7:return e.next=9,null===(i=o.captureExplodeSourceBitmap)||void 0===i?void 0:i.call(o);case 9:(l=e.sent)&&(t[a.oid]=l);case 11:r++,e.next=2;break;case 14:return e.abrupt("return",t);case 15:case"end":return e.stop()}}),e)}))),function(){return a.apply(this,arguments)})},{key:"showGpuRestoreVisuals",value:function(e){if(this.hideGpuRestoreVisuals(),Object.keys(e||{}).length){var t=document.createElement("div");t.setAttribute("data-targetjs-gpu-restore-overlay","true"),Object.assign(t.style,{position:"fixed",left:"0px",top:"0px",width:"100vw",height:"100vh",pointerEvents:"none",zIndex:"2147483647"});for(var r=0,n=Object.values(e);r<n.length;r++){var i=n[r];if(!(null==i||!i.bitmap||i.clipWidth<=0||i.clipHeight<=0)){var a=document.createElement("div");Object.assign(a.style,{position:"absolute",left:"".concat(i.clipLeft,"px"),top:"".concat(i.clipTop,"px"),width:"".concat(i.clipWidth,"px"),height:"".concat(i.clipHeight,"px"),overflow:"hidden"});var o=document.createElement("canvas");o.width=i.bitmap.width,o.height=i.bitmap.height,Object.assign(o.style,{position:"absolute",left:"".concat(i.left-i.clipLeft,"px"),top:"".concat(i.top-i.clipTop,"px"),width:"".concat(i.width,"px"),height:"".concat(i.height,"px"),display:"block"}),o.getContext("2d").drawImage(i.bitmap,0,0),a.appendChild(o),t.appendChild(a)}}return document.body.appendChild(t),t}}},{key:"hideGpuRestoreVisuals",value:function(){var e;null===(e=document.querySelector('[data-targetjs-gpu-restore-overlay="true"]'))||void 0===e||e.remove()}},{key:"releaseGpuResources",value:function(e){for(var t=0,r=Object.values((null==e?void 0:e.gpuVisuals)||{});t<r.length;t++){var n,i,a,o=r[t];null==o||null===(n=o.bitmap)||void 0===n||null===(i=(a=n).close)||void 0===i||i.call(a)}for(var l=0,s=Object.values((null==e?void 0:e.explodeSources)||{});l<s.length;l++){var u,c=s[l];null==c||null===(u=c.close)||void 0===u||u.call(c)}}},{key:"has",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return Boolean(this.stateCheckpoints[e])}},{key:"get",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return this.stateCheckpoints[e]}},{key:"toggle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return this.has(e)?this.restore(e):this.store(e)}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=this.stateCheckpoints[e];return!!t&&(this.releaseGpuResources(t),delete this.stateCheckpoints[e],!0)}},{key:"clearAll",value:function(){for(var e=0,t=Object.values(this.stateCheckpoints);e<t.length;e++){var r=t[e];this.releaseGpuResources(r)}this.stateCheckpoints={}}}],t&&xe(e.prototype,t),r&&xe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,a,l,s,u}();function Me(e){return Me="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},Me(e)}function Pe(e){return function(e){if(Array.isArray(e))return Le(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Oe(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 De(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Oe(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function Oe(e,t){if(e){if("string"==typeof e)return Le(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Le(e,t):void 0}}function Le(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach((function(t){Ie(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ie(e,t,r){return(t=Re(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Re(n.key),n)}}function Re(e){var t=function(e,t){if("object"!=Me(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Me(t)?t:t+""}var Ne=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()},t=[{key:"init",value:function(){this.lists={visible:[],rerender:[],restyle:[],reasyncStyle:[],reattach:[],relocation:[],deletedDom:[],noDom:[],updatingTModels:[],activeTModels:[],noDomVisibilityTModels:[],updatingTargets:[],activeTargets:[]},this.visibleOidMap={},this.preservedDomMap={},this.targetMethodMap={},this.noDomMap={},this.domPolicyMap=new Map,this.deletedTModelRoots=new Set}},{key:"clearFrameLists",value:function(){this.lists.visible.length=0,this.lists.rerender.length=0,this.lists.restyle.length=0,this.lists.reasyncStyle.length=0,this.lists.reattach.length=0,this.lists.relocation.length=0,this.lists.noDom.length=0,this.lists.updatingTModels.length=0,this.lists.activeTModels.length=0,this.lists.noDomVisibilityTModels.length=0,this.lists.updatingTargets.length=0,this.lists.activeTargets.length=0,this.targetMethodMap={},this.noDomMap={}}},{key:"clearAll",value:function(){this.visibleOidMap={},this.preservedDomMap={},this.clearFrameLists(),this.deleteDoms(),this.domPolicyMap.clear()}},{key:"analyze",value:function(){var e=this,t=je({},this.visibleOidMap),r=je({},this.preservedDomMap);this.clearFrameLists(),this.collectDeletedTModels();var n,i=[],a=De(St().hasLocationList);try{var o=function(){var a,o=n.value;if(o.isLightweightChild)return delete t[o.oid],delete r[o.oid],delete e.visibleOidMap[o.oid],delete e.preservedDomMap[o.oid],e.domPolicyMap.delete(o.oid),0;if(t[o.oid]=void 0,r[o.oid]=void 0,!o.exists())return o.hasDom()&&e.addToDeletedDom(o),delete e.visibleOidMap[o.oid],delete e.preservedDomMap[o.oid],0;var s=o.isVisible();!s&&null!==(a=o.noDomUpdatingTargets)&&void 0!==a&&a.size&&Pe(o.noDomUpdatingTargets).some((function(e){var t=o.targetValues[e];return l.u.affectsVisibility(e)&&void 0!==(null==t?void 0:t.catchupAt)}))&&e.lists.noDomVisibilityTModels.push(o),s&&o.isIncluded()?(e.visibleOidMap[o.oid]=o,delete e.preservedDomMap[o.oid],e.lists.visible.push(o)):delete e.visibleOidMap[o.oid];var u,c,d=e.shouldPreserveDom(o);if(!s&&d&&o.hasDom()?e.preservedDomMap[o.oid]=o:delete e.preservedDomMap[o.oid],o.hasDom()&&(o.canHaveDom()&&o.isIncluded()&&(s||d)||(e.addToDeletedDom(o),o.getChildren().forEach((function(t){t.isLightweightChild||t.managesOwnScroll()||e.addToRecursiveDeletedDom(t)})))),s||o.isActivated()){var h,f,v=o.state();((null===(h=v.updatingTargetList)||void 0===h?void 0:h.length)>0||o.hasAnimatingTargets())&&(e.lists.updatingTModels.push(o),e.lists.updatingTargets=[].concat(Pe(e.lists.updatingTargets),Pe(v.updatingTargetList))),(null===(f=v.activeTargetList)||void 0===f?void 0:f.length)>0&&(e.lists.activeTModels.push(o),e.lists.activeTargets=[].concat(Pe(e.lists.activeTargets),Pe(v.activeTargetList)))}if(!d||s||o.isActivated()||e.needsRestyle(o)&&e.lists.restyle.push(o),s||o.isActivated()){e.needsRerender(o)&&e.lists.rerender.push(o),e.needsRestyle(o)&&e.lists.restyle.push(o),e.needsReasyncStyle(o)&&e.lists.reasyncStyle.push(o),e.needsReattach(o)&&e.lists.reattach.push(o),e.needsRelocation(o)&&e.lists.relocation.push(o);var p=o.state();p.targetMethodMap&&Object.keys(p.targetMethodMap).length>0&&(e.targetMethodMap[o.oid]=je({},p.targetMethodMap),p.targetMethodMap={}),o.isActivated()&&i.push(o)}e.shouldCreateDom(o,s)&&!e.noDomMap[o.oid]&&(null!==(u=o.getDomHolder())&&void 0!==u&&u.exists()||e.noDomMap[null===(c=o.getDomParent())||void 0===c?void 0:c.oid]?(e.lists.noDom.push(o),e.noDomMap[o.oid]=!0):o.markLayoutDirty("noDomHolder"))};for(a.s();!(n=a.n()).done;)o()}catch(e){a.e(e)}finally{a.f()}return i.forEach((function(e){return e.deactivate()})),Object.values(je(je({},t),r)).filter(Boolean).forEach((function(t){var r=t.exists(),n=r&&t.isIncluded();r&&n?!t.hasDom()&&t.canHaveDom()&&(delete e.visibleOidMap[t.oid],delete e.preservedDomMap[t.oid],t.visibilityStatus=void 0,t.markLayoutDirty("noDom")):t.hasDom()?e.addToDeletedDom(t):(delete e.visibleOidMap[t.oid],delete e.preservedDomMap[t.oid],e.domPolicyMap.delete(t.oid))})),this.lists.noDom.length>0?0:this.lists.reattach.length>0?1:this.lists.relocation.length>0?2:this.lists.rerender.length>0?3:this.lists.reasyncStyle.length>0?4:this.lists.deletedDom.length>0?5:this.lists.restyle.length>0?10:-1}},{key:"shouldPreserveDom",value:function(e){if(!e.isIncluded())return!1;if(e.reuseDomDefinition())return!0;var t=this.getDomPolicy(e);return"keep"===t||"required"===t}},{key:"shouldHaveDom",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.isVisible();return!(e.isLightweightChild||!e.canHaveDom()||!e.isIncluded())&&(t||e.reuseDomDefinition()||"required"===this.getDomPolicy(e))}},{key:"shouldCreateDom",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.isVisible();return!e.hasDom()&&this.shouldHaveDom(e,t)}},{key:"getDomPolicy",value:function(e){if(this.domPolicyMap.has(e.oid))return this.domPolicyMap.get(e.oid);for(var t=e;t&&t!==ft();){var r=t.val("dom");if(o.d.isDefined(r))return this.domPolicyMap.set(e.oid,r),r;t=t.parent}return this.domPolicyMap.set(e.oid,"auto"),"auto"}},{key:"isBracketVisible",value:function(e){for(e=e.bracket;e&&"BI"===e.type;){if(!e.isVisible())return!1;e=e.getParent()}return!0}},{key:"addToRecursiveDeletedDom",value:function(e){var t=this;e.isLightweightChild||(delete this.visibleOidMap[e.oid],delete this.preservedDomMap[e.oid],this.lists.deletedDom.includes(e)||(e.hasDom()&&this.lists.deletedDom.push(e),e.getChildren().forEach((function(e){e.isLightweightChild||e.managesOwnScroll()||t.addToRecursiveDeletedDom(e)}))))}},{key:"addToDeletedDom",value:function(e){delete this.visibleOidMap[e.oid],delete this.preservedDomMap[e.oid],this.lists.deletedDom.includes(e)||this.lists.deletedDom.push(e)}},{key:"markTModelDeleted",value:function(e){e&&this.deletedTModelRoots.add(e)}},{key:"collectDeletedTModels",value:function(){var e,t=De(this.deletedTModelRoots);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.exists()||this.addDeletedTree(r)}}catch(e){t.e(e)}finally{t.f()}this.deletedTModelRoots.clear()}},{key:"addDeletedTree",value:function(e){var t;if(!e.isLightweightChild){null===(t=e.disposeRuntimeDerivedState)||void 0===t||t.call(e),delete this.visibleOidMap[e.oid],delete this.preservedDomMap[e.oid],this.domPolicyMap.delete(e.oid),dt.tmodelIdMap[e.oid]===e&&delete dt.tmodelIdMap[e.oid],St().domIslandSet.delete(e),e.hasDom()&&!this.lists.deletedDom.includes(e)&&this.lists.deletedDom.push(e);var r,n=De(e.getChildren());try{for(n.s();!(r=n.n()).done;){var i=r.value;i.isLightweightChild||this.addDeletedTree(i)}}catch(e){n.e(e)}finally{n.f()}}}},{key:"getVisibles",value:function(){return Object.values(this.visibleOidMap)}},{key:"getAvailableDoms",value:function(){return Object.values(je(je({},this.preservedDomMap),this.visibleOidMap))}},{key:"needsRelocation",value:function(e){return!(!e.hasDom()||!o.d.isDefined(e.domOrderIndex))}},{key:"needsRerender",value:function(e){var t=e.getHtml();return!(!e.hasDom()||!o.d.isDefined(t)||e.$dom.innerHTML()===String(t)&&e.$dom.textOnly===e.isTextOnly())}},{key:"needsRestyle",value:function(e){var t;return e.hasDom()&&(null===(t=e.styleTargetMap)||void 0===t?void 0:t.size)>0}},{key:"needsReasyncStyle",value:function(e){var t;return e.hasDom()&&(null===(t=e.asyncStyleTargetMap)||void 0===t?void 0:t.size)>0}},{key:"needsReattach",value:function(e){return!(!e.hasDom()||e.reuseDomDefinition())&&(e.hasDomHolderChanged()||e.hasBaseElementChanged())}},{key:"renderTModels",value:function(){var e,t=De(this.lists.rerender);try{for(t.s();!(e=t.n()).done;){var r,n,i=e.value;i.isTextOnly()?null===(r=i.$dom)||void 0===r||r.text(i.getHtml()):null===(n=i.$dom)||void 0===n||n.html(i.getHtml()),i.setLastUpdate("html"),i.domHeightTimestamp=0,i.domWidthTimestamp=0}}catch(e){t.e(e)}finally{t.f()}}},{key:"reattachTModels",value:function(){var e,t=[],r=De(this.lists.reattach);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=n.hasBaseElementChanged(),a=n.getDomParent();a&&a.$dom&&(a.$dom.removeElement(n.$dom.element),i&&(I.a.createDom(n),I.a.patchDom(n),I.a.initStyleMaps(n),this.needsRestyle(n)&&this.lists.restyle.push(n),this.needsReasyncStyle(n)&&this.lists.reasyncStyle.push(n),t.push(n)),n.getDomHolder()&&n.getDomHolder().appendTModel$Dom(n))}}catch(e){r.e(e)}finally{r.f()}this.activatePendingTargetsAfterDom(t)}},{key:"relocateTModels",value:function(){this.lists.relocation.sort((function(e,t){return t.domOrderIndex-e.domOrderIndex}));var e,t=De(this.lists.relocation);try{for(t.s();!(e=t.n()).done;){var r=e.value,n=r.getDomParent();n&&n.$dom&&(n.$dom.relocate(r,r.domOrderIndex),r.domOrderIndex=void 0)}}catch(e){t.e(e)}finally{t.f()}}},{key:"resetTModelDom",value:function(e){e.styleMap={},e.tfMap={},e.actualValues.isVisible=!1,e.hasDomNow=!1,e.$dom=null}},{key:"deleteDoms",value:function(){var e,t=De(this.lists.deletedDom);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.val("sourceDom")||this.deleteDom(r)}}catch(e){t.e(e)}finally{t.f()}this.lists.deletedDom.length=0}},{key:"deleteDom",value:function(e){var t;e.hasAnimatingTargets()&&ce.T.detachAnimationsOnDeleteDom(e),null===(t=e.particleRenderer)||void 0===t||null===(t=t.canvasLayer)||void 0===t||t.remove();var r=e.getDomParent();r&&r.$dom&&r.$dom.removeElement(e.$dom.element),this.resetTModelDom(e)}},{key:"fixStyles",value:function(){var e,t=De(this.lists.restyle);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.hasDom()&&(I.a.fixStyle(r),this.retryPendingTargetsAfterStyle(r))}}catch(e){t.e(e)}finally{t.f()}}},{key:"fixAsyncStyles",value:function(){var e,t=De(this.lists.reasyncStyle);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.hasDom()&&(I.a.fixAsyncStyle(r),this.retryPendingTargetsAfterStyle(r))}}catch(e){t.e(e)}finally{t.f()}}},{key:"retryPendingTargetsAfterStyle",value:function(e){if(!m.g.hasPendingStyles(e))for(var t=0,r=Pe(null!==(n=e.pendingTargets)&&void 0!==n?n:[]);t<r.length;t++){var n,i=r[t];m.g.shouldActivateNextTarget(e,i)}}},{key:"activatePendingTargetsAfterDom",value:function(e){var t,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).restoredDoneTargets,n=void 0===r||r,i=De(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(a.hasDom()){if(a.noDomUpdatingTargets){for(var o=0,l=Pe(a.noDomUpdatingTargets);o<l.length;o++){var s=l[o];a.addTargetToStatusList(s)}a.noDomUpdatingTargets=void 0}var u=a.pendingTargets,c=new Set;if(u)for(var d=0,h=Pe(u);d<h.length;d++){var f=h[d];c.add(f),m.g.cleanupTarget(a,f),m.g.shouldActivateNextTarget(a,f)}if(n)for(var v=0,p=Object.keys(a.targetValues);v<p.length;v++){var g=p[v];"done"!==a.targetValues[g].status||c.has(g)||a.isTargetInLoop(g)||a.isTargetPassiveLoop(g)||(m.g.cleanupTarget(a,g),m.g.shouldActivateNextTarget(a,g))}}else a.markLayoutDirty("noDom")}}catch(e){i.e(e)}finally{i.f()}}},{key:"catchupNoDomTargetsBeforeStyle",value:function(e){var t;if(null!==(t=e.noDomUpdatingTargets)&&void 0!==t&&t.size){for(var r=0,n=Pe(e.noDomUpdatingTargets);r<n.length;r++){var i=n[r],a=e.targetValues[i];if(a){Tt().catchupTargetByElapsed(e,i,{fireEnd:!1}),delete a.catchupAt;var o=Tt().calculateTargetStatus(e,i);e.setTargetStatus(i,o)}}e.noDomUpdatingTargets=void 0}}},{key:"createDoms",value:function(){if(0!==this.lists.noDom.length){var e=new Map,t=[],r=[],i=[];this.lists.noDom.sort((function(e,t){return e.getUIDepth()-t.getUIDepth()}));var a,o=De(this.lists.noDom);try{for(o.s();!(a=o.n()).done;){var l,s=a.value,u=null!==(l=s.domId)&&void 0!==l?l:s.oid;n.J.query("#".concat(u))?(s.$dom=new n.J("#".concat(u)),s.$dom.attr("tgjs","true"),s.hasDomNow=!0,s.markLayoutDirty("hasDomNow"),i.push(s),this.needsRerender(s)&&this.lists.rerender.push(s),this.needsRestyle(s)&&this.lists.restyle.push(s),this.needsReasyncStyle(s)&&this.lists.reasyncStyle.push(s)):r.push(s)}}catch(e){o.e(e)}finally{o.f()}for(var c=0,d=r;c<d.length;c++){var h=d[c],f=h.getDomHolder();if(f)if(h.$dom=void 0,h.val("$dom"))h.$dom=h.val("$dom"),h.hasDom()||f.appendTModel$Dom(h),i.push(h);else{I.a.createDom(h),I.a.patchDom(h),t.push(h),i.push(h);var v=e.get(f);v||(v={domHolder:f,fragment:n.J.createDocumentFragment(),tmodels:[]},e.set(f,v)),v.fragment.appendChild(h.$dom.element),v.tmodels.push(h)}else h.markLayoutDirty("noDomHolder")}var p,g=De(e.values());try{for(g.s();!(p=g.n()).done;){var y=p.value,m=y.domHolder,b=y.fragment;m.appendElement(b)}}catch(e){g.e(e)}finally{g.f()}for(var T=0,w=i;T<w.length;T++){var k=w[T];this.catchupNoDomTargetsBeforeStyle(k)}for(var S=[],x=0,E=t;x<E.length;x++){var C=E[x];C.hasDom()&&(C.hasDomNow=!0,C.markLayoutDirty("hasDomNow"),S.push(C)),I.a.initStyleMaps(C),I.a.fixStyle(C),I.a.fixAsyncStyle(C)}for(var M=0,P=S;M<P.length;M++)P[M].onDomAvailable();this.activatePendingTargetsAfterDom(i),vt().attachEvents(i)}}}],t&&_e(e.prototype,t),r&&_e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function Ve(e){return Ve="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},Ve(e)}function Fe(){Fe=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new O(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};u(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,o,l){var s=d(e[i],e,a);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==Ve(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var s=M(l,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var u=d(t,r,n);if("normal"===u.type){if(i=n.done?p:f,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=p,n.method="throw",n.arg=u.arg)}}}function M(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,M(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(Ve(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),u(S,s,"Generator"),u(S,o,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;D(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function Be(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function He(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){Be(a,n,i,o,l,"next",e)}function l(e){Be(a,n,i,o,l,"throw",e)}o(void 0)}))}}function Ue(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qe(n.key),n)}}function qe(e){var t=function(e,t){if("object"!=Ve(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ve(t)?t:t+""}var We,$e,Ke,Ge=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.nextRuns=[],this.domProcessing=0,this.runningFlag=!1,this.runId="",this.runStartTime=void 0,this.runDuration=0,this.rerunId="",this.delayProcess=void 0,this.resetting=!1,this.activeStartTime=void 0,this.phase=0,this.runningStep=-1,this.sliceQueued=!1,this.eventSettlePending=!1}return t=e,r=[{key:"resetRuns",value:(a=He(Fe().mark((function e(){return Fe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.resetting=!0,e.next=3,new Promise((function(e){return requestAnimationFrame(e)}));case 3:this.clearDelayProcess(),this.nextRuns=[],this.domProcessing=0,this.runningFlag=!1,this.runId="",this.runStartTime=void 0,this.runDuration=0,this.rerunId="",this.delayProcess=void 0,this.resetting=!1,this.activeStartTime=void 0,this.phase=0,this.runningStep=-1,this.sliceQueued=!1,this.eventSettlePending=!1;case 18:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"scheduleOnlyIfEarlier",value:function(e,t){var r,n;if(Je.isRunning()&&!this.resetting){var i=0===Je.throttle?Math.max(0,null!=e?e:0):Je.throttle,a=o.d.now()+i,l=null!==(r=null===(n=this.delayProcess)||void 0===n?void 0:n.runTime)&&void 0!==r?r:1/0,s=this.nextRuns.length?this.nextRuns[0].insertTime+this.nextRuns[0].delay:1/0;Math.min(l,s)<=a||this.schedule(e,t)}}},{key:"schedule",value:function(e,t){if(Je.isRunning()&&!this.resetting){var r=0===Je.throttle?null!=e?e:0:Je.throttle,n=o.d.now();this.delayRun(r,t,n)}}},{key:"run",value:(i=He(Fe().mark((function e(t,r){var n,i,a,l,s;return Fe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Je.isRunning()&&!this.resetting){e.next=2;break}return e.abrupt("return");case 2:if(!this.runningFlag){e.next=5;break}return this.rerunId||(this.rerunId="rerun ".concat(r)),e.abrupt("return");case 5:if(this.rerunId="",this.runId=r,this.runningFlag=!0,this.runStartTime=o.d.now(),n=!1,1===Je.debugLevel&&o.d.log(!0)("Request from: ".concat(r," delay: ").concat(t," runningStep:").concat(this.runningStep," dom:").concat(this.domProcessing," runs:").concat(this.nextRuns.length," D:").concat(null===(i=this.delayProcess)||void 0===i?void 0:i.delay," events:").concat(vt().eventQueue.length)),e.prev=11,0!==this.phase){e.next=19;break}return(a=vt().captureEvents())&&(l=a.eventType,this.eventSettlePending="start"===l||"end"===l||"click"===l),Je.targetManager.applyTargetValues(ft()),e.next=18,St().calculateAll();case 18:this.phase=1;case 19:if(!(o.d.now()-this.runStartTime>20)){e.next=23;break}return n=!0,this.requestNextSlice(r),e.abrupt("return");case 23:if(1===this.phase&&(this.runningStep=Je.manager.analyze(),this.phase=2),!(o.d.now()-this.runStartTime>20)){e.next=28;break}return n=!0,this.requestNextSlice(r),e.abrupt("return");case 28:if(2===this.phase&&(St().calculateActivated(),Je.events.resetEventsOnTimeout(),(s=Je.manager.analyze())>=0&&(this.runningStep=this.runningStep<0?s:Math.min(this.runningStep,s)),this.phase=3),!(o.d.now()-this.runStartTime>20)){e.next=33;break}return n=!0,this.requestNextSlice(r),e.abrupt("return");case 33:3===this.phase&&(this.runningStep>=0&&(0===this.domProcessing?(n=!0,this.domOperations(this.runningStep)):this.rerunId||(this.rerunId="domrun ".concat(r))),this.phase=4),this.runDuration=o.d.now()-this.runStartTime,0===this.domProcessing&&this.needsRerun(),e.next=42;break;case 38:throw e.prev=38,e.t0=e.catch(11),this.phase=0,e.t0;case 42:return e.prev=42,n||0!==this.domProcessing||(this.runningFlag=!1),e.finish(42);case 45:case"end":return e.stop()}}),e,this,[[11,38,42,45]])}))),function(e,t){return i.apply(this,arguments)})},{key:"requestNextSlice",value:function(e){var t=this;this.runningFlag=!1,this.sliceQueued||(this.sliceQueued=!0,requestAnimationFrame((function(){t.sliceQueued=!1,t.schedule(0,"slice-".concat(e))})))}},{key:"needsRerun",value:function(){this.phase=0,this.runningFlag=!1;var e=this.eventSettlePending;if(this.eventSettlePending=!1,this.rerunId){var t=this.rerunId;this.rerunId="",this.schedule(0,"rerun-".concat(t))}else if(vt().eventQueue.length>0||e)this.schedule(0,"events-".concat(vt().eventQueue.length));else{var r=this.nextRuns.length>0?this.nextRuns[0].delay-(o.d.now()-this.nextRuns[0].insertTime):void 0,n=bt(),i=n.lists.restyle.length>0||n.lists.reasyncStyle.length>0||St().activatedList.length>0,a=n.lists.noDomVisibilityTModels.length>0;if(void 0===r||n.lists.activeTModels.length>0||n.lists.updatingTModels.length>0||i||a){if(n.lists.updatingTModels.length>0)return void this.schedule(1,"getManager-needsRerun-updatingTModels");if(n.lists.activeTModels.length>0){var l=n.lists.activeTModels.find((function(e){return 0===e.targetExecutionCount||e.activeTargetList.filter((function(t){return!e.isScheduledPending(t)})).some((function(t){return e.shouldScheduleRun(t)}))}));if(l){var s=!this.activeStartTime||o.d.now()-this.activeStartTime>15?1:15;return this.activeStartTime=o.d.now(),void this.schedule(s,"getManager-needsRerun-".concat(l.oid,"-").concat(l.activeTargetList))}}i&&this.schedule(1,"needsRerun-dom-work"),a&&this.schedule(15,"needsRerun-noDomVisibility")}}this.executeNextRun()}},{key:"domOperations",value:function(t){var r=this;this.domProcessing=1,10!==t?Promise.all(e.domSteps.filter((function(e,r){return r>=t})).map((function(e){return Promise.resolve().then(e)}))).then((function(){bt().lists.restyle.length?r.domFixStyles():(r.domProcessing=0,r.needsRerun())})).catch((function(){r.domProcessing=0,r.needsRerun()})):this.domFixStyles()}},{key:"domFixStyles",value:function(){var e=this;this.domProcessing=2,requestAnimationFrame((function(){try{bt().fixStyles()}finally{e.domProcessing=0,e.needsRerun()}}))}},{key:"clearDelayProcess",value:function(){var e;null!==(e=this.delayProcess)&&void 0!==e&&e.timeoutId&&(clearTimeout(this.delayProcess.timeoutId),this.delayProcess.timeoutId=void 0),this.delayProcess=void 0}},{key:"setDelayProcess",value:function(e,t,r,n,i){var a=this,o={runId:e,insertTime:t,runTime:n,interval:r,delay:i,timeoutId:void 0},l=function(){var t=He(Fe().mark((function t(){return Fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a.delayProcess===o){t.next=2;break}return t.abrupt("return");case 2:return a.clearDelayProcess(),t.prev=3,t.next=6,a.run(i,e);case 6:return t.prev=6,a.executeNextRun(),t.finish(6);case 9:case"end":return t.stop()}}),t,null,[[3,,6,9]])})));return function(){return t.apply(this,arguments)}}();this.delayProcess=o,o.timeoutId=setTimeout(l,i)}},{key:"executeNextRun",value:function(){if(!(this.runningFlag||this.domProcessing>0)){if(this.delayProcess){if(!(this.nextRuns.length>0))return;var e=this.nextRuns[0];if(!(e.insertTime+e.delay<this.delayProcess.runTime))return;clearTimeout(this.delayProcess.timeoutId);var t=Math.max(0,this.delayProcess.runTime-o.d.now());this.insertRun(this.delayProcess.runId,o.d.now(),t),this.delayProcess=void 0}for(var r=null;this.nextRuns.length>0;){var n=this.nextRuns.shift(),i=o.d.now();if(!(n.delay-(i-n.insertTime)<=0)){this.nextRuns.unshift(n);break}r=n}if(r)this.setDelayProcess(r.runId,r.insertTime,r.delay,o.d.now(),0);else if(this.nextRuns.length>0){var a=this.nextRuns.shift(),l=o.d.now(),s=Math.max(0,a.delay-(l-a.insertTime));this.setDelayProcess(a.runId,a.insertTime,a.delay,l+s,s)}else this.clearDelayProcess()}}},{key:"delayRun",value:function(e,t,r){var n=r+e;this.delayProcess?this.delayProcess.timeoutId&&n<this.delayProcess.runTime?(clearTimeout(this.delayProcess.timeoutId),this.insertRun(this.delayProcess.runId,this.delayProcess.insertTime,this.delayProcess.interval),this.setDelayProcess(t,r,e,n,e)):this.insertRun(t,r,e):this.setDelayProcess(t,r,e,n,e)}},{key:"insertRun",value:function(e,t,r){for(var n=0,i=this.nextRuns.length;n<i;){var a,o=n+i>>1,l=this.nextRuns[o],s=l.insertTime+l.delay-(t+r);if(0===s)return l.count=(null!==(a=l.count)&&void 0!==a?a:1)+1,void(l.runId.length<500?l.runId+="-"+e:l.runId.endsWith("-...")||(l.runId+="-..."));s>0?i=o:n=o+1}this.nextRuns.splice(n,0,{runId:e,insertTime:t,delay:r})}},{key:"getSnapshot",value:function(){var e=o.d.now(),t=[],r=function(r){if(r){var n=o.d.isDefined(r.runTime)?r.runTime:r.insertTime+r.delay;t.push({runId:r.runId,delay:Math.max(0,n-e)})}};r(this.delayProcess),this.nextRuns.forEach(r);var n=t.filter((function(e){return 0===e.delay})),i=t.filter((function(e){return e.delay>0})),a=[];return n.length&&a.push({runId:n.map((function(e){return e.runId})).join("-"),delay:0}),i.forEach((function(e){a.push(e)})),a}},{key:"restoreSnapshot",value:function(){var e=this;(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){e.schedule(t.delay,"restore-".concat(t.runId))}))}}],r&&Ue(t.prototype,r),n&&Ue(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n,i,a}();function ze(e){return ze="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},ze(e)}function Ye(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Xe(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xe(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function Xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Qe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ze(n.key),n)}}function Ze(e){var t=function(e,t){if("object"!=ze(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ze(t)?t:t+""}We=Ge,Ke=[function(){return bt().createDoms()},function(){return bt().reattachTModels()},function(){return bt().relocateTModels()},function(){return bt().renderTModels()},function(){return bt().fixAsyncStyles()},function(){return bt().deleteDoms()}],($e=qe($e="domSteps"))in We?Object.defineProperty(We,$e,{value:Ke,enumerable:!0,configurable:!0,writable:!0}):We[$e]=Ke;var Je,et=function(){return function(e,t,r){return t&&Qe(e.prototype,t),r&&Qe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}),[{key:"applyTargetValues",value:function(e){var t,r=Ye(arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.activeTargetList.slice(0));try{for(r.s();!(t=r.n()).done;){var n=t.value;e.isTargetImperative(n)||this.applyTargetValue(e,n)}}catch(e){r.e(e)}finally{r.f()}}},{key:"applyTargetValue",value:function(e,t){var r=e.targets[t];if(o.d.isDefined(r)){if(!(_.O.shouldPauseTarget(e,t)||e.isExecuted(t)&&e.hasUpdatingImperativeTargets(t))){if(e.isExecuted(t)&&e.getTargetStep(t)===e.getTargetSteps(t)){if(e.isScheduledPending(t))return;var n=_.O.scheduleExecution(e,t);if(n>0)return void kt().schedule(n,"targetSchedule__".concat(e.oid))}e.isTargetEnabled(t)?(e.resetScheduleTimeStamp(t),s.j.prepareTarget(e,t),s.j.executeDeclarativeTarget(e,t),m.g.hasFetchAction(e,t)||m.g.shouldActivateNextTarget(e,t)):r.needsReactivation&&e.removeFromActiveTargets(t)}}else e.removeFromActiveTargets(t)}},{key:"setActualValues",value:function(e,t){if(t.length){var r,n=0,i=Ye(t=t.slice(0));try{for(i.s();!(r=i.n()).done;){var a=r.value;_.O.shouldPauseTarget(e,a)||((n=_.O.scheduleExecution(e,a))>0?kt().scheduleOnlyIfEarlier(n,"setActualValues-".concat(e.oid,"-").concat(a)):(e.resetScheduleTimeStamp(a),this.setActualValue(e,a)))}}catch(e){i.e(e)}finally{i.f()}var o=e.waapiBatch;o&&e.hasDom()?(wt().animate(e,o,ce.T.getAnimationHooks()),e.waapiBatch=void 0):e.waapiBatch=void 0}}},{key:"findOriginalTModel",value:function(e,t){return a.X.findParentByTarget(e,t)||Ct().find((function(e){return e.targets[t]}))}},{key:"fireOnStep",value:function(e,t,r){var n=e.targetValues[t],i=e.getTargetValue(t),a=e.getTargetSteps(t),l=e.targets[t];e.setLastUpdate(t),e.setTargetMethodName(t,"value");var s=n.originalTargetName,u=e.targets[s],c=e;e.setTargetMethodName(t,"value"),!u&&s&&(u=(c=this.findOriginalTModel(e,s))?c.targets[s]:null);var d=!1;if(e.isTargetImperative(t)){if(u){var h=m.g.getTargetName(o.d.capitalizeFirstLetter(t));"function"==typeof u["on".concat(h,"Step")]?(u["on".concat(h,"Step")].call(c,c.val(t),i,r,a),c.setTargetMethodName(s,["on".concat(h,"Step")]),d=!0):"function"==typeof u.onImperativeStep&&(u.onImperativeStep.call(c,t,c.val(t),i,r,a),c.setTargetMethodName(s,"onImperativeStep"),d=!0),u.activateNextTarget&&!u.activateNextTarget.endsWith("$$")&&u.activateNextTarget.endsWith("$")&&(d=!0,m.g.shouldActivateNextTarget(e,t))}}else d=e.handleSpecialTargetStep(t,r,a)||d,d=o.d.handleValueChange(e,t)||d,null!=l&&l.activateNextTarget&&!l.activateNextTarget.endsWith("$$")&&l.activateNextTarget.endsWith("$")&&(d=!0,m.g.shouldActivateNextTarget(e,t));return d}},{key:"fireOnEnd",value:function(e,t){var r=e.targetValues[t];if(r){var n=e.getTargetValue(t),i=e.getTargetSteps(t);e.setLastUpdate(t);var a=r.originalTargetName,l=e.targets[a],u=e;!l&&a&&(l=(u=this.findOriginalTModel(e,a))?u.targets[a]:null);var c=this.calculateTargetStatus(e,t);if(e.setTargetStatus(t,c),e.handleSpecialTargetEnd(t),e.isTargetImperative(t)){var d=m.g.getTargetName(o.d.capitalizeFirstLetter(t));l&&"function"==typeof l["on".concat(d,"End")]?(l["on".concat(d,"End")].call(u,u.val(t),n,i,i),u.setTargetMethodName(a,["on".concat(d,"End")])):l&&"function"==typeof l.onImperativeEnd&&(l.onImperativeEnd.call(u,t,u.val(t)),u.setTargetMethodName(a,"onImperativeEnd")),e.getTargetCycle(t)<e.getTargetCycles(t)-1&&(e.incrementTargetCycle(t),e.resetTargetStep(t),e.resetTargetInitialValue(t),delete r.valuePointer)}else{var h;e.getTargetCycle(t)<e.getTargetCycles(t)-1&&(e.incrementTargetCycle(t),e.resetTargetStep(t),e.resetTargetInitialValue(t),e.resetTargetExecutionFlag(t),delete r.valuePointer,s.j.executeDeclarativeTarget(e,t)),"function"==typeof(null===(h=e.targets[t])||void 0===h?void 0:h.onStepsEnd)&&(e.targets[t].onStepsEnd.call(e,e.getTargetCycle(t)),e.setTargetMethodName(t,"onStepsEnd"))}m.g.shouldActivateNextTarget(e,t)}}},{key:"calculateTargetStatus",value:function(e,t){if(m.g.isTargetUpdating(e,t))return"updating";var r=e.getTargetCycle(t),n=e.getTargetCycles(t);return e.isTargetInLoop(t)||r<n-1?"active":"done"}},{key:"catchupTargetByElapsed",value:function(e,t){var r,n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).fireEnd,i=void 0!==n&&n,a=e.targetValues[t];if(!a)return{done:!1};var l=o.d.advanceTargetByElapsed(e,t),s=l.step,u=l.valuePointer,c=l.cycle,d=e.getTargetCycles(t);if(l.done){var h,f,v,p,g=null!==(h=a.valueList)&&void 0!==h&&h.length?a.valueList[a.valueList.length-1]:e.getTargetValue(t);return e.val(t,g),e.setActual(t,g),e.addToStyleTargetList(t),a.step=null!==(f=l.steps)&&void 0!==f?f:e.getTargetSteps(t),a.valuePointer=null!==(v=null===(p=a.valueList)||void 0===p?void 0:p.length)&&void 0!==v?v:u,a.value=g,a.cycle=d,delete a.catchupAt,i&&this.fireOnEnd(e,t),{done:!0,step:a.step,cycle:d,valuePointer:a.valuePointer}}null!==(r=a.valueList)&&void 0!==r&&r.length&&(a.valuePointer=u,a.initialValue=a.valueList[u-1],a.value=a.valueList[u],a.steps=a.stepList[(u-1)%a.stepList.length],a.interval=Array.isArray(a.intervalList)?a.intervalList[(u-1)%a.intervalList.length]:a.interval,a.easing=a.easingList[(u-1)%a.easingList.length]),a.step=s,a.cycle=c;var y=e.getTargetValue(t),m=e.getTargetSteps(t),b=e.getTargetInitialValue(t);o.d.isDefined(b)||(b=this.resolveInitialValue(e,t,y),e.setTargetInitialValue(t,b));var T=s>0?I.a.easingMorph(e,t,b,y,s,m):b;return e.val(t,T),e.setActual(t,T),e.addToStyleTargetList(t),{done:!1,step:s,cycle:c,valuePointer:u}}},{key:"setActualValue",value:function(e,t){var r,n,i=e.targetValues[t];if(i&&this.canUpdateTarget(e,t)){var a=this.getTargetUpdateState(e,t);o.d.isDefined(a.initialValue)||(a.initialValue=this.resolveInitialValue(e,t,a.theValue),e.setTargetInitialValue(t,a.initialValue));var l=this.catchupTargetByElapsed(e,t,{fireEnd:!0});if(l.done)kt().scheduleOnlyIfEarlier(1,"".concat(e.oid,"---").concat(t,"-catchup-finished"));else{var s=null!==(r=l.step)&&void 0!==r?r:0,u=null!==(n=l.valuePointer)&&void 0!==n?n:e.getValueListPointer(t);e.canBeAnimated(a.cleanKey)?this.animateActualValue(e,t,i,a,s,u):this.updateActualValue(e,t,i,a,s)}}}},{key:"canUpdateTarget",value:function(e,t){return!(!e.isTargetImperative(t)&&!e.isTargetEnabled(t))||(kt().schedule(15,"setActualValue-postpone-".concat(e.oid)),!1)}},{key:"getTargetUpdateState",value:function(e,t){return{theValue:e.getTargetValue(t),cleanKey:m.g.getTargetName(t),steps:e.getTargetSteps(t),cycle:e.getTargetCycle(t),interval:e.getTargetInterval(t),initialValue:e.getTargetInitialValue(t),lastUpdateTime:e.getLastUpdate(t),now:o.d.now()}}},{key:"resolveInitialValue",value:function(e,t,r){return o.d.isDefined(e.val(t))?e.val(t):"number"==typeof r?0:void 0}},{key:"animateActualValue",value:function(e,t,r,n,i,a){var o;if(e.hasDom()){var l=i>0?I.a.easingMorph(e,t,n.initialValue,n.theValue,i,n.steps):n.initialValue,s=ce.T.handleWebAnimationAPI(e,n.cleanKey,t,r,l,n.theValue,a,i,n.steps,n.interval,0,!1,!0);if(null===(o=r.valueList)||void 0===o||!o.length)for(var u=e.isTargetImperative(t)?e.getTargetCycles(t):1,c=1;c<u;c++)ce.T.handleWebAnimationAPI(e,n.cleanKey,t,r,l,n.theValue,a,i,n.steps,n.interval,c*s,!0,!1)}else e.addToNoDomUpdatingTargets(t)}},{key:"updateActualValue",value:function(e,t,r,n,i){if(i<=n.steps){e.incrementTargetStep(t,n.now,n.lastUpdateTime,n.interval,n.steps);var a=I.a.easingMorph(e,t,n.initialValue,n.theValue,i,n.steps);if(e.val(t,a),e.setActual(t,a),e.addToStyleTargetList(t),this.fireOnStep(e,t,i),e.getTargetStep(t)<n.steps)return void kt().scheduleOnlyIfEarlier(n.interval,"".concat(e.oid,"---").concat(t,"-").concat(i,"/").concat(n.steps,"-").concat(n.cycle,"-").concat(n.interval))}this.finishCurrentSegment(e,t,r,n)}},{key:"finishCurrentSegment",value:function(e,t,r,n){e.val(t,n.theValue),e.setActual(t,n.theValue),e.addToStyleTargetList(t),r.step=n.steps,e.setLastUpdate(t);var i=1;if(r.valueList){e.incrementValueListPointer(t);var a=e.getValueListPointer(t);a<r.valueList.length?(e.resetTargetStep(t),r.initialValue=r.value,r.value=r.valueList[a],r.steps=r.stepList[(a-1)%r.stepList.length],r.interval=Array.isArray(r.intervalList)?r.intervalList[(a-1)%r.intervalList.length]:0,r.easing=r.easingList[(a-1)%r.easingList.length],i=n.interval):this.fireOnEnd(e,t)}else this.fireOnEnd(e,t);kt().scheduleOnlyIfEarlier(i,"".concat(e.oid,"---").concat(t,"-").concat(n.steps,"/").concat(n.steps,"-").concat(n.cycle,"-").concat(i))}}])}(),tt=r(357);function rt(e){return rt="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},rt(e)}function nt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||at(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=at(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function at(e,t){if(e){if("string"==typeof e)return ot(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ot(e,t):void 0}}function ot(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function lt(){lt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new O(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};u(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,o,l){var s=d(e[i],e,a);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==rt(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var s=M(l,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var u=d(t,r,n);if("normal"===u.type){if(i=n.done?p:f,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=p,n.method="throw",n.arg=u.arg)}}}function M(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,M(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(rt(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),u(S,s,"Generator"),u(S,o,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;D(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function st(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function ut(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){st(a,n,i,o,l,"next",e)}function l(e){st(a,n,i,o,l,"throw",e)}o(void 0)}))}}var ct=[],dt=function(e){var t;if(e){var r,n=e instanceof i.c?e:s.j.createTModel("App",e);return null!==(t=Je)&&void 0!==t&&t.tRoot?(Je.tRoot.addChild(n),n):"loading"===document.readyState?(ct.push(n),n):(null!==(r=Je)&&void 0!==r&&r.tRoot||"loading"===document.readyState||Lt(),Je.tRoot.addChild(n),n)}};dt.unmount=ut(lt().mark((function e(){var t;return lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Je){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Je.stop();case 4:return t=Je.tRoot,t.getChildren().forEach((function(e){var r,n;e.val("sourceDom")?Q.v.restoreDomState(null===(n=e.$dom)||void 0===n?void 0:n.element,e.domState):null!==(r=e.$dom)&&void 0!==r&&r.attr("tgjs")&&t.$dom.removeElement(e.$dom.element)})),t.allChildrenList=[],t.allChildrenMap={},t.clearUpdatingChildren(),t.clearActiveChildren(),t.clearAnimatingChildren(),e.next=14,Je.reset();case 14:Je.loader.clearAll(),dt.oids={},dt.tmodelIdMap={},Je=void 0;case 18:case"end":return e.stop()}}),e)}))),dt.oids={},dt.tmodelIdMap={},dt.getOid=function(e){var t=dt.oids;o.d.isDefined(t[e])||(t[e]=0);var r=t[e]++;return{oid:r>0||e.endsWith("_")?"".concat(e).concat(r):e,num:r}};var ht=function(){return!!Je&&Je.runningFlag},ft=function(){var e;return null===(e=Je)||void 0===e?void 0:e.tRoot},vt=function(){var e;return null===(e=Je)||void 0===e?void 0:e.events},pt=function(){var e;return null===(e=Je)||void 0===e?void 0:e.pager},gt=function(){var e;return null===(e=Je)||void 0===e?void 0:e.loader},yt=function(e,t,r,n){var i;return null===(i=Je)||void 0===i||null===(i=i.loader)||void 0===i?void 0:i.fetch(e,t,r,n)},mt=function(e,t,r){var n;return null===(n=Je)||void 0===n||null===(n=n.loader)||void 0===n?void 0:n.fetchImage(e,t,r)},bt=function(){var e;return null===(e=Je)||void 0===e?void 0:e.manager},Tt=function(){var e;return null===(e=Je)||void 0===e?void 0:e.targetManager},wt=function(){var e;return null===(e=Je)||void 0===e?void 0:e.animationManager},kt=function(){var e;return null===(e=Je)||void 0===e?void 0:e.runScheduler},St=function(){var e;return null===(e=Je)||void 0===e?void 0:e.locationManager},xt=function(){var e,t;return null!==(e=null===(t=Je)||void 0===t||null===(t=t.tRoot)||void 0===t?void 0:t.val("screenWidth"))&&void 0!==e?e:0},Et=function(){var e,t;return null!==(e=null===(t=Je)||void 0===t||null===(t=t.tRoot)||void 0===t?void 0:t.val("screenHeight"))&&void 0!==e?e:0},Ct=function(){var e;return null===(e=Je)||void 0===e||null===(e=e.manager)||void 0===e?void 0:e.getVisibles()},Mt=function(){var e;return null===(e=Je)||void 0===e?void 0:e.resizeLastUpdate},Pt=function(){var e,t=null===(e=Je)||void 0===e?void 0:e.stateManager;if(!t)throw new Error("TargetJS state manager is not initialized.");return t},Dt=function(e){return dt.tmodelIdMap[e]},Ot=function(e){var t=dt.tmodelIdMap[e];return t&&t.targets.sourceDom?t:void 0};"undefined"!=typeof window&&(window.t=window.t||Dt);var Lt=function(){var e;Je||(e={throttle:0,debugLevel:0,runningFlag:!1,resizeLastUpdate:0,init:function(){return e.$window=new n.J(window),e.loader=new A,e.pager=new ue,e.stateManager=new Ce,e.events=new y,e.locationManager=new X,e.targetManager=new et,e.animationManager=new tt._,e.manager=new Ne,e.runScheduler=new Ge,e.tRootFactory=function(){var t=new i.c("tRoot",{styling:!1,domHolder:!0,isVisible:!0,screenWidth:function(){var r=n.J.getScreenWidth();return r!==t.val("screenWidth")&&(e.resizeLastUpdate=o.d.now()),r},screenHeight:function(){var r=n.J.getScreenHeight();return r!==t.val("screenHeight")&&(e.resizeLastUpdate=o.d.now()),r},initPageDom:function(){var e=this;Q.v.initPageDoms(this.$dom),ct.length&&(ct.forEach((function(t){return e.addChild(t)})),ct.length=0)}});return t.$dom=I.a.getRootDom(),"body"!==t.$dom.getTagName()&&t.$dom.attr("data-tj-no-slot","true"),t.val("screenWidth",n.J.getScreenWidth()),t.val("screenHeight",n.J.getScreenHeight()),e.tRoot&&e.tRoot.getChildren().forEach((function(e){if(!e.val("sourceDom")){var r=s.j.createTModel(e.type,e.targets);t.addChild(r)}})),t},e.tRoot=e.tRootFactory(),e}},e.start=ut(lt().mark((function t(){var r,n,i=arguments;return lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=(i.length>0&&void 0!==i[0]?i[0]:{}).skipSchedulerReset,n=void 0!==r&&r,e.runningFlag=!1,n){t.next=5;break}return t.next=5,e.runScheduler.resetRuns();case 5:return e.animationManager.isShuttingDown=!1,s.j.executeDeclarativeTarget(e.tRoot,"screenWidth"),s.j.executeDeclarativeTarget(e.tRoot,"screenHeight"),e.events.detachAll(),e.events.detachWindowEvents(),e.events.attachWindowEvents(),e.events.clearAll(),e.events.attachEvents(Object.values(dt.tmodelIdMap).filter((function(e){return e.hasDom()&&e.$dom.element.isConnected}))),e.runningFlag=!0,e.runScheduler.schedule(0,"appStart"),t.abrupt("return",e);case 16:case"end":return t.stop()}}),t)}))),e.stop=ut(lt().mark((function t(){var r,n,i=arguments;return lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(i.length>0&&void 0!==i[0]?i[0]:{}).discardState,n=void 0!==r&&r,e.runningFlag=!1,e.events.detachAll(),e.events.detachWindowEvents(),e.events.clearAll(),t.next=7,e.animationManager.deleteAll({discardState:n});case 7:if(n){t.next=10;break}return t.next=10,e.animationManager.flushOneFrame();case 10:return t.next=12,e.runScheduler.resetRuns();case 12:return t.abrupt("return",e);case 13:case"end":return t.stop()}}),t)}))),e.reset=ut(lt().mark((function t(){var r,n,i,l,s,u,c,d,h,f,v,p=arguments;return lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=(r=p.length>0&&void 0!==p[0]?p[0]:{}).discardState,i=void 0!==n&&n,l=r.skipSchedulerReset,s=void 0!==l&&l,u=r.preserveCachedModels,c=void 0!==u&&u,i||e.manager.getVisibles().forEach((function(e){var t;if(null!==(t=e.allStyleTargetMap)&&void 0!==t&&t.size){var r,n=it(e.allStyleTargetMap);try{for(n.s();!(r=n.n()).done;){var i=nt(r.value,1)[0];o.d.isDefined(e.val(i))&&e.addToStyleTargetList(i)}}catch(e){n.e(e)}finally{n.f()}}})),!c)for(d=0,h=Object.values(dt.tmodelIdMap);d<h.length;d++)v=h[d],null===(f=v.disposeRuntimeDerivedState)||void 0===f||f.call(v);if(s){t.next=6;break}return t.next=6,e.runScheduler.resetRuns();case 6:e.manager.clearAll(),e.locationManager.clear(),e.loader.clear(),a.X.clear();case 10:case"end":return t.stop()}}),t)}))),e.isRunning=function(){return e.runningFlag},e.find=function(e){return a.X.find(e)},(Je=e).init().start())};"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",Lt):Lt())},966:function(e,t,r){r.d(t,{d:function(){return h}});var n=r(255),i=r(530);function a(e){return a="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},a(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}function s(e,t,r){return t=c(t),function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,r||[],c(e).constructor):t.apply(e,r))}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var h=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=s(this,t,["BI"])).parent=e,r.currentBracketStatus=2,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),r=t,(n=[{key:"canHaveDom",value:function(){return!1}},{key:"shouldBeBracketed",value:function(){return!1}},{key:"excludeDefaultStyling",value:function(){return!0}},{key:"isIncluded",value:function(){return!1}},{key:"getWidth",value:function(){return this.getContentWidth()}},{key:"getHeight",value:function(){return this.getContentHeight()}},{key:"getMinWidth",value:function(){return this.bottomBaseWidth}},{key:"getBaseWidth",value:function(){return this.bottomBaseWidth}},{key:"getBaseHeight",value:function(){return this.topBaseHeight}},{key:"useContentWidth",value:function(){return this.getRealParent().useContentWidth()}},{key:"useContentHeight",value:function(){return this.getRealParent().useContentHeight()}},{key:"getContainerOverflowMode",value:function(){return this.getRealParent().getContainerOverflowMode()}},{key:"getTopBaseHeight",value:function(){return this.topBaseHeight}},{key:"isVisible",value:function(){return!!this.visibilityStatus&&this.visibilityStatus.isVisible}},{key:"getBracketThreshold",value:function(){return this.getRealParent().getBracketSize()}},{key:"createViewport",value:function(){return this.viewport=this.viewport||new i.L,this.viewport.xNext=this.x,this.viewport.xNorth=this.x,this.viewport.xEast=this.x,this.viewport.xSouth=this.x,this.viewport.xWest=this.x,this.viewport.absX=this.getRealParent().viewport.absX,this.viewport.absY=this.getRealParent().viewport.absY,this.viewport.scrollTop=this.getRealParent().viewport.scrollTop,this.viewport.scrollLeft=this.getRealParent().viewport.scrollLeft,this.viewport.xOverflowReset=this.getRealParent().viewport.xOverflowReset,this.viewport.xOverflowLimit=this.getRealParent().viewport.xOverflowLimit,this.viewport.yNext=this.y,this.viewport.yNorth=this.y,this.viewport.yWest=this.y,this.viewport.yEast=this.y,this.viewport.ySouth=this.y,this.viewport.container=this,this.viewport}},{key:"getRealParent",value:function(){return this.realParent}},{key:"calcAbsolutePosition",value:function(e,t){this.absX=e+this.getRealParent().absX,this.absY=t+this.getRealParent().absY}},{key:"shouldCalculateChildren",value:function(){var e=this.isVisible();return!!this.hasEventDirty()||!!this.visibilityDirty||(this.currentBracketStatus>=1||this.isNowVisible||this.isNowInvisible?(this.currentBracketStatus=Math.max(0,this.currentBracketStatus-1),!0):!1!==this.dirtyLayout||(e&&(this.currentBracketStatus=Math.min(2,this.currentBracketStatus+1)),!1!==this.getDirtyLayout()&&e))}},{key:"getDirtyLayout",value:function(){var e=!!this.getRealParent().managesOwnScroll()&&this.getRealParent().backupDirtyLayout;return this.dirtyLayout||e||!1}},{key:"validateVisibilityInParent",value:function(){return!0}},{key:"adjustViewport",value:function(){this.viewport.xEast=Math.max(this.viewport.xEast,this.getRealParent().viewport.xEast),this.viewport.ySouth=Math.max(this.viewport.ySouth,this.getRealParent().viewport.ySouth)}},{key:"getChildren",value:function(){return this.allChildrenList}}])&&o(r.prototype,n),a&&o(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,a}(n.c)},714:function(e,t,r){r.d(t,{M:function(){return f}});var n=r(966),i=r(855);function a(e){return a="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},a(e)}function o(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(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 l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function s(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function d(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,a=[{key:"generate",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!e.bracketMap[t.oid]||e.pageMap[t.oid]!==t.allChildrenList||r?(e.bracketMap[t.oid]=e.buildTreeBottomUp(t,t.getChildren()),e.pageMap[t.oid]=t.allChildrenList):(t.lastChildrenUpdate.deletions.length>0&&(e.updateTreeOnDeletions(t,t.lastChildrenUpdate.deletions),e.reindexTree(t)),t.lastChildrenUpdate.additions.length>0&&e.updateTreeOnAdditions(t,t.lastChildrenUpdate.additions),(t.lastChildrenUpdate.deletions.length>0||t.lastChildrenUpdate.additions.length>0)&&e.reindexTree(t)),t.lastChildrenUpdate.additions.length=0,t.lastChildrenUpdate.deletions.length=0,e.bracketMap[t.oid]}},{key:"updateTreeOnDeletions",value:function(t,r){function i(r,a){if(r)if(a instanceof n.d&&a.parent===a.realParent){var o=e.bracketMap[t.oid],l=o.indexOf(a);l>=0&&o.splice(l,1)}else{var s=r.allChildrenList.indexOf(a);s>=0&&(r.allChildrenList.splice(s,1),e.markBracketDirty(r),0===r.allChildrenList.length&&i(r.parent,r))}}r.forEach((function(e){return i(e.bracket,e)}))}},{key:"reindexTree",value:function(t){function r(e,t){if(0===e.allChildrenList.length)return t;if(e.allChildrenList[0]instanceof n.d){e.startIndex=t;var i,a=l(e.allChildrenList);try{for(a.s();!(i=a.n()).done;)t=r(i.value,t)}catch(e){a.e(e)}finally{a.f()}e.endIndex=t}else e.startIndex=t,t+=e.allChildrenList.length,e.endIndex=t;return t}var i,a=0,o=l(e.bracketMap[t.oid]);try{for(o.s();!(i=o.n()).done;)a=r(i.value,a)}catch(e){o.e(e)}finally{o.f()}}},{key:"updateTreeOnAdditions",value:function(t,r){var i=t.getBracketSize();r.forEach((function(r){var a=r.index,o=r.child,l=e.findOrCreateBracket(t,a),s=a-l.startIndex;s<l.allChildrenList.length?l.allChildrenList.splice(s,0,o):l.allChildrenList.push(o),o.bracket=l;var u=l;for(u.startIndex=Math.min(u.startIndex,a),u.endIndex=u.startIndex+u.allChildrenList.length,u.currentBracketStatus=2,u.markLayoutDirty("update"),u=l.getParent();u instanceof n.d;)u.startIndex=Math.min(u.startIndex,a),u.endIndex=Math.max(u.endIndex,a+1),u.currentBracketStatus=2,u.markLayoutDirty("update"),u=u.getParent();l.allChildrenList.length>i&&e.splitBracket(t,l)}))}},{key:"splitBracket",value:function(t,r){for(var i=r.allChildrenList,a=t.getBracketSize(),l=[],s=r.startIndex,u=0;u<i.length;u+=a){var c=i.slice(u,u+a),d=s+c.length,h=e.createBracket(t,s,d,c);h.parent=r.parent,s=h.endIndex,l.push(h)}if(r.parent!==r.realParent){var f,v=r.parent.allChildrenList.indexOf(r);if(v>=0&&(f=r.parent.allChildrenList).splice.apply(f,[v,1].concat(l)),e.markBracketDirty(r),r.parent.allChildrenList.length>=a){var p=e.buildTreeBottomUp(t,r.parent.allChildrenList);if(r.parent.allChildrenList=p,r.parent.allChildrenList.forEach((function(t){t.parent=r.parent,e.markBracketDirty(t)})),r.parent.parent){var g,y=r.parent.parent.allChildrenList.indexOf(r.parent);y>=0&&((g=r.parent.parent.allChildrenList).splice.apply(g,[y,1].concat(o(p))),r.parent.parent.allChildrenList.forEach((function(e){e.parent=r.parent.parent})))}}}else{var m=e.bracketMap[t.oid],b=m.indexOf(r);b>=0&&m.splice.apply(m,[b,1].concat(l)),m.length>t.getBracketSize()&&(e.bracketMap[t.oid]=e.buildTreeBottomUp(t,m))}l.forEach((function(t){return e.markBracketDirty(t)})),l[0].parent instanceof n.d&&e.markBracketDirty(l[0].parent)}},{key:"findOrCreateBracket",value:function(t,r){var i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.bracketMap[t.oid],o=l(a);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s.startIndex<=r&&s.endIndex>=r)return s.getFirstChild()instanceof n.d?e.findOrCreateBracket(t,r,s.allChildrenList):s}}catch(e){o.e(e)}finally{o.f()}var u=e.createBracket(t,r,r);if(a.push(u),a.length>t.getBracketSize()){var c=e.buildTreeBottomUp(t,a);e.bracketMap[t.oid]=c}return u}},{key:"buildTreeBottomUp",value:function(t,r){for(var i=r.length,a=t.getBracketSize(),o=[],l=0;l<i;l+=a){var s=r.slice(l,l+a),u=s[0]instanceof n.d,c=u?s[0].startIndex:l,d=u?s[s.length-1].endIndex:l+s.length,h=e.createBracket(t,c,d,s);o.push(h)}return o.length>a?e.buildTreeBottomUp(t,o):o}},{key:"createBracket",value:function(t,r,a,o){var l=new n.d(t);return i.qw.tmodelIdMap[l.oid]=l,l.realParent=t,l.allChildrenList=o||l.allChildrenList,l.startIndex=r,l.endIndex=a,l.allChildrenList.forEach((function(e){e instanceof n.d?(e.realParent=t,e.parent=l):e.bracket=l})),e.all[l.oid]=l,l}},{key:"reset",value:function(){e.bracketMap={},e.pageMap={},e.all={}}},{key:"markBracketDirty",value:function(e){for(var t=e;t&&"BI"===t.type;)t.currentBracketStatus=2,t.markLayoutDirty("update"),t=t.parent}}],(r=null)&&c(t.prototype,r),a&&c(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,a}();d(f,"bracketMap",{}),d(f,"pageMap",{}),d(f,"all",{})},737:function(e,t,r){function n(e){return n="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},n(e)}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}r.d(t,{I:function(){return u}});var o,l,s,u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,n=[{key:"color2Integers",value:function(t){if(t=t?String(t):"",t=e.colors[t.toLowerCase()]||t){if(t.startsWith("#")){t=3===(t=t.slice(1)).length?t.split("").map((function(e){return e+e})).join(""):t;var r=parseInt(t,16);return[r>>16&255,r>>8&255,255&r]}var n=t.match(/\d+/g);return n&&3===n.length?n.map(Number):void 0}}}],(r=null)&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();o=u,s={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},(l=a(l="colors"))in o?Object.defineProperty(o,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[l]=s},260:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{v:function(){return DomInit}});var _$Dom_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(768),_TUtil_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(34),_App_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(855),_TargetData_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(585);function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _typeof(e){return _typeof="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},_typeof(e)}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var DomInit=function(){function DomInit(){_classCallCheck(this,DomInit)}return _createClass(DomInit,null,[{key:"initCacheDoms",value:function(e){var t=(0,_App_js__WEBPACK_IMPORTED_MODULE_2__.Bt)().$dom.queryAll("[tgjs]"),r=new Map;e.forEach((function(e){e.$dom=null,"BI"!==e.type&&r.set(e.oid,e)}));var n,i=[],a=_createForOfIteratorHelper(t);try{for(a.s();!(n=a.n()).done;){var o=n.value,l=o.getAttribute("id"),s=(0,_App_js__WEBPACK_IMPORTED_MODULE_2__.iP)(l);s?(s.$dom=new _$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J(o),r.has(s.oid)||i.push(s)):_$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J.detach(o)}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"mount",value:function(e,t){if(void 0!==t){var r=DomInit.normalizeElementTarget(t);if(r){var n;null!==(n=e.$dom)&&void 0!==n&&n.exists()&&(e.domState?DomInit.restoreDomState(e.$dom.element,e.domState):e.$dom.detach()),e.domState=DomInit.snapshotDomState(r.element),e.targets.$dom=r,e.val("$dom",r);var i=r.getTagName().toLowerCase(),a={};e.val("element")!==i&&(a.element=i),a.position=r.getStyleValue("position")||"relative",a.sourceDom=!0,a.domIsland=!0,_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(e.targets.reuseDomDefinition)||(a.reuseDomDefinition=!0,a.domHolder=!0,_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(e.targets.excludeXYCalc)||(a.excludeXYCalc=!0),_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(e.targets.x)||_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(e.targets.excludeX)||(a.excludeX=!0),_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(e.targets.y)||_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(e.targets.excludeY)||(a.excludeY=!0)),e.addTargets(a);var o=r.getId();if(o&&o!==e.oid)e.domId=o;else if(!o){var l="tgjs-".concat(e.oid);r.ensureId(l),e.domId=l}r.attr("tgjs-oid",e.oid),r.attr("tgjs","true"),e.$dom=void 0}}}},{key:"initPageDoms",value:function(e){var t,r=new Map,n=_createForOfIteratorHelper(e.queryAll("*"));try{for(n.s();!(t=n.n()).done;){var i=t.value,a=void 0,o=Array.from(i.attributes),l=o.some((function(e){return"tg"===e.name||e.name.startsWith("tg-")})),s={};if(l){var u,c=_createForOfIteratorHelper(o);try{for(c.s();!(u=c.n()).done;){var d=u.value;if(d.name.startsWith("tg-")){var h=d.name.slice(3),f=_TargetData_js__WEBPACK_IMPORTED_MODULE_3__.u.toCanonicalKey(h),v=d.value.trim(),p=DomInit.parseString(v);s[f]=p}else"tg"===d.name&&(s[d.name]=!0)}}catch(e){c.e(e)}finally{c.f()}}var g=i.parentElement,y=r.get(g),m=void 0;if(Object.keys(s).length>0&&((m=i.getAttribute("id"))||y||(m=_App_js__WEBPACK_IMPORTED_MODULE_2__.qw.getOid("blank").oid,i.setAttribute("id",m)),i.getAttribute("tgjs")||i.setAttribute("tgjs",!0),a=_objectSpread({id:m,baseElement:i.tagName.toLowerCase(),$dom:new _$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J(i)},s)),y){a||(a={textOnly:!1,html:i.outerHTML,$dom:new _$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J(i)});var b=DomInit.getChildrenKey(y);b?Array.isArray(y[b].value)?y[b].value.push(a):"string"==typeof y[b]?y[b]={cycles:_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isNumber(+y[b])?+y[b]:1,value:[a]}:"object"===_typeof(y[b])&&(y[b].value=[a]):y.children$={cycles:1,value:[a]},r.set(i,a)}else a&&r.set(i,a)}}catch(e){n.e(e)}finally{n.f()}var T,w=[],k=_createForOfIteratorHelper(r.values());try{for(k.s();!(T=k.n()).done;){var S=T.value,x=S.$dom.element.parentElement,E=r.get(x);E?(S.$dom.detach(),delete S.$dom,delete S.id,S.sourceDom=!0,S.otype=S.id||(E.id||_App_js__WEBPACK_IMPORTED_MODULE_2__.qw.getOid("blank").oid)+"_",S.isVisible=_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(S.isVisible)?S.isVisible:function(){return this.getParent().isVisible()},S.domParent=_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(S.domParent)?S.domParent:function(){return this.getParent()}):(S.isVisible=!_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(S.isVisible)||S.isVisible,S.domHolder=!_TUtil_js__WEBPACK_IMPORTED_MODULE_1__.d.isDefined(S.domHolder)||S.domHolder,S.sourceDom=!0,(0,_App_js__WEBPACK_IMPORTED_MODULE_2__.Bt)().addChild(S),S.isVisible||w.push({$dom:S.$dom,tmodel:(0,_App_js__WEBPACK_IMPORTED_MODULE_2__.Bt)().getLastChild()}))}}catch(e){k.e(e)}finally{k.f()}w.forEach((function(e){var t=e.$dom,r=e.tmodel;t.exists()&&!r.hasChildren()&&(t.detach(),r.val("requiresDom",!1))}))}},{key:"getChildrenKey",value:function(e){for(var t=0,r=Object.keys(e);t<r.length;t++){var n=r[t];if(n.toLowerCase().includes("children"))return n}return null}},{key:"parseString",value:function parseString(rawValue){if("string"!=typeof rawValue)return rawValue;var trimmed=rawValue.trim(),isFunction=/^function\s*\([\s\S]*?\)\s*\{[\s\S]*\}$/m.test(trimmed)||/^\(?[\w\s,]*\)?\s*=>\s*(\{[\s\S]*\}|\S+)/m.test(trimmed),isObject=/^(\{[\s\S]*\}|\[[\s\S]*\])$/.test(trimmed),containsCode=["return","setTarget","TargetJS.","addChild","addSibling","activateTarget","removeChild","removeAll"].some((function(e){return trimmed.includes(e)}));if(!isObject&&!isFunction&&containsCode)try{return new Function(trimmed)}catch(e){}if(isObject||isFunction)try{return eval("(".concat(trimmed,")"))}catch(e){}try{return JSON.parse(trimmed)}catch(e){}return rawValue}},{key:"snapshotDomState",value:function(e){if(e&&1===e.nodeType){for(var t={},r=0,n=Array.from(e.attributes);r<n.length;r++){var i=n[r],a=i.name,o=i.value;t[a]=o}return{attrs:t,styleAttr:e.getAttribute("style"),html:e.innerHTML}}}},{key:"restoreDomState",value:function(e,t){if(e&&1===e.nodeType&&t){for(var r=t.attrs,n=t.styleAttr,i=0,a=Array.from(e.attributes);i<a.length;i++){var o=a[i].name;o in r||e.removeAttribute(o)}for(var l=0,s=Object.entries(r);l<s.length;l++){var u=_slicedToArray(s[l],2),c=u[0],d=u[1];e.getAttribute(c)!==d&&e.setAttribute(c,d)}n?e.setAttribute("style",n):e.removeAttribute("style"),e.innerHTML=t.html}}},{key:"normalizeElementTarget",value:function(e){if(e instanceof _$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J)return e;if(e instanceof Element)return new _$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J(e);if("string"==typeof e){var t=_$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J.querySelector(e);return t?new _$Dom_js__WEBPACK_IMPORTED_MODULE_0__.J(t):null}return null}}])}()},421:function(e,t,r){var n;function i(e){return i="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},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function o(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}r.d(t,{G:function(){return s}});var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,n=[{key:"isEasing",value:function(t){return e.easeMap.has(t)}},{key:"easingFunction",value:function(t){return t&&e.easeMap.get(t)||u}},{key:"cubicBezier",value:function(e,t,r,n){var i=function(e,t,r){var n=3*t,i=3*(r-t)-n;return(((1-n-i)*e+i)*e+n)*e},a=function(e,t,r){var n=3*t,i=3*(r-t)-n;return(3*(1-n-i)*e+2*i)*e+n};return function(o){var l=function(t){for(var n=t,o=0;o<8;o++){var l=i(n,e,r)-t;if(Math.abs(l)<1e-6)return n;var s=a(n,e,r);if(Math.abs(s)<1e-6)break;(n-=l/s)<0?n=0:n>1&&(n=1)}for(var u=0,c=1,d=0,h=0;h<20;h++){var f=i(d=(u+c)/2,e,r);if(Math.abs(f-t)<1e-6)return d;f<t?u=d:c=d}return d}(o=function(e){return e<=0?0:e>=1?1:e}(o));return i(l,t,n)}}}],(r=null)&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();function u(e){return e}n=s,o(s,"LINEAR","linear"),o(s,"EASE","ease"),o(s,"EASE_IN","ease-in"),o(s,"EASE_OUT","ease-out"),o(s,"EASE_IN_OUT","ease-in-out"),o(s,"STEP_START","step-start"),o(s,"STEP_END","step-end");var c={_:n.cubicBezier(.25,.1,.25,1)},d={_:n.cubicBezier(.42,0,1,1)},h={_:n.cubicBezier(0,0,.58,1)},f={_:n.cubicBezier(.42,0,.58,1)};o(s,"easeMap",new Map([[n.LINEAR,u],[n.EASE,c._],[n.EASE_IN,d._],[n.EASE_OUT,h._],[n.EASE_IN_OUT,f._],[n.STEP_START,function(e){return e<=0?0:1}],[n.STEP_END,function(e){return e<1?0:1}]]))},494:function(e,t,r){r.d(t,{$:function(){return d}});var n=r(249),i=r(333),a=r(952);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e){return s="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},s(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}var d=function(){return e=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.parent=t,this.index=r,this.isLightweightChild=!0,this.type="".concat(t.type,"_"),this.oid="".concat(t.oid,"_gpu_").concat(r),this.x=0,this.y=0,this.absX=0,this.absY=0,this.targets={},this.targetValues={},this.allTargetMap={},this.actualValues={isVisible:!0},this.visibilityStatus=void 0,this.noDomUpdatingTargets=void 0,this.updatingTargetList=[],this.activeTargetList=[],this.activatedTargets=[],this.updatingTargetMap={},this.runtimeState={updatingTargetList:this.updatingTargetList,activeTargetList:this.activeTargetList,activatedTargets:this.activatedTargets,fetchActionTargetList:[],lastChildrenUpdate:{additions:[],deletions:[]}},this.pendingTargets=!1,this.currentStatus=void 0,this.dirtyLayout=!1},t=[{key:"state",value:function(){return this.runtimeState}},{key:"isTargetImperative",value:function(e){var t;return!0===(null===(t=this.targetValues[e])||void 0===t?void 0:t.isImperative)}},{key:"isComplete",value:function(){return i.g.isTModelComplete(this)}},{key:"val",value:function(e,t){var r=i.g.getTargetName(e);return 2===arguments.length?(this.parent.setChildValue(this.index,r,t),this):this.actualValues[r]}},{key:"getParent",value:function(){return this.parent}},{key:"getRealParent",value:function(){return this.parent}},{key:"getParentValue",value:function(e){var t;return null===(t=this.parent)||void 0===t?void 0:t.val(e)}},{key:"pval",value:function(e){return this.getParentValue(e)}},{key:"exists",value:function(){var e;return this.index>=0&&(null===(e=this.parent)||void 0===e?void 0:e.childHandles[this.index])===this}},{key:"hasAnimatingTargets",value:function(){return!1}},{key:"hasAnimatingChildren",value:function(){return!1}},{key:"hasUpdatingChildren",value:function(){return!1}},{key:"hasActiveChildren",value:function(){return!1}},{key:"getChildren",value:function(){return[]}},{key:"getChild",value:function(){}},{key:"hasChildren",value:function(){return!1}},{key:"clearUpdatingChildren",value:function(){this.updatingTargetList.length=0}},{key:"clearActiveChildren",value:function(){this.activeTargetList.length=0}},{key:"clearAnimatingChildren",value:function(){}},{key:"cancelAnimation",value:function(){}},{key:"hasEventDirty",value:function(){return!1}},{key:"markEventDirty",value:function(){}},{key:"markLayoutDirty",value:function(e){var t,r;null===(t=this.parent)||void 0===t||null===(r=t.markLayoutDirty)||void 0===r||r.call(t,"gpuChild-".concat(this.index,"-").concat(e))}},{key:"removeLayoutDirty",value:function(){}},{key:"getDirtyLayout",value:function(){return!1}},{key:"getX",value:function(){var e;return null!==(e=this.actualValues.x)&&void 0!==e?e:this.x}},{key:"getY",value:function(){var e;return null!==(e=this.actualValues.y)&&void 0!==e?e:this.y}},{key:"getWidth",value:function(){var e;return null!==(e=this.val("width"))&&void 0!==e?e:0}},{key:"getHeight",value:function(){var e;return null!==(e=this.val("height"))&&void 0!==e?e:0}},{key:"getBaseWidth",value:function(){return this.getWidth()}},{key:"getBaseHeight",value:function(){return this.getHeight()}},{key:"getMinWidth",value:function(){return this.getWidth()}},{key:"getTopBaseHeight",value:function(){return 0}},{key:"getMeasuringScale",value:function(){var e;return null!==(e=this.val("measuringScale"))&&void 0!==e?e:1}},{key:"getMarginTop",value:function(){var e,t;return null!==(e=null!==(t=this.val("marginTop"))&&void 0!==t?t:this.val("topMargin"))&&void 0!==e?e:0}},{key:"getMarginLeft",value:function(){var e,t;return null!==(e=null!==(t=this.val("marginLeft"))&&void 0!==t?t:this.val("leftMargin"))&&void 0!==e?e:0}},{key:"getMarginRight",value:function(){var e,t,r;return(null!==(e=null!==(t=this.val("marginRight"))&&void 0!==t?t:this.val("rightMargin"))&&void 0!==e?e:0)+(null!==(r=this.getParentValue("gap"))&&void 0!==r?r:0)}},{key:"getMarginBottom",value:function(){var e,t,r;return(null!==(e=null!==(t=this.val("marginBottom"))&&void 0!==t?t:this.val("bottomMargin"))&&void 0!==e?e:0)+(null!==(r=this.getParentValue("gap"))&&void 0!==r?r:0)}},{key:"getTopMargin",value:function(){return this.getMarginTop()}},{key:"getLeftMargin",value:function(){return this.getMarginLeft()}},{key:"getRightMargin",value:function(){return this.getMarginRight()}},{key:"getBottomMargin",value:function(){return this.getMarginBottom()}},{key:"getItemOverflowMode",value:function(){var e;return null!==(e=this.val("itemOverflowMode"))&&void 0!==e?e:"auto"}},{key:"isInFlow",value:function(){var e;return null===(e=this.val("isInFlow"))||void 0===e||e}},{key:"isIncluded",value:function(){return!0}},{key:"useContentWidth",value:function(){return!1}},{key:"useContentHeight",value:function(){return!1}},{key:"getContentWidth",value:function(){return 0}},{key:"getContentHeight",value:function(){return 0}},{key:"hasDom",value:function(){return!1}},{key:"isDomIsland",value:function(){return!1}},{key:"reuseDomDefinition",value:function(){return!1}},{key:"requiresDom",value:function(){return!1}},{key:"requiresDomRelocation",value:function(){return!1}},{key:"hasDomHolderChanged",value:function(){return!1}},{key:"hasBaseElementChanged",value:function(){return!1}},{key:"getHtml",value:function(){return this.val("html")}},{key:"excludeDefaultStyling",value:function(){return!0}},{key:"excludeStyling",value:function(){return!0}},{key:"addToStyleTargetList",value:function(){}},{key:"calcAbsolutePosition",value:function(e,t){var r,n,i,a;this.absX=(null!==(r=null===(n=this.parent)||void 0===n?void 0:n.absX)&&void 0!==r?r:0)+e,this.absY=(null!==(i=null===(a=this.parent)||void 0===a?void 0:a.absY)&&void 0!==i?i:0)+t}},{key:"isVisible",value:function(){return!1!==this.actualValues.isVisible}},{key:"calcVisibility",value:function(){var e=this.parent;if(!e)return!1;var t=(e.getMeasuringScale()||1)*this.getMeasuringScale(),r=this.absX,n=this.absY,i=t*this.getWidth(),o=t*this.getHeight(),l=a.n.checkVisibility(this,{x:r-20,y:n-20,r:r+i+20,b:n+o+20});return this.actualValues.isVisible=l.isVisible,l.isVisible}},{key:"addToNoDomUpdatingTargets",value:function(e){var t,r=i.g.getTargetName(e),n=this.noDomUpdatingTargets||(this.noDomUpdatingTargets=new Set);return!n.has(r)&&(n.add(r),null===(t=this.parent)||void 0===t||t.addToUpdatingChildren(this),!0)}},{key:"removeFromNoDomUpdatingTargets",value:function(e){if(!this.noDomUpdatingTargets)return!1;var t,r=this.noDomUpdatingTargets.delete(i.g.getTargetName(e));return this.noDomUpdatingTargets.size||(this.noDomUpdatingTargets=void 0,null===(t=this.parent)||void 0===t||t.removeFromUpdatingChildren(this)),r}},{key:"catchupNoDomLayoutTargets",value:function(){var e;return null===(e=this.parent)||void 0===e?void 0:e.catchupChildLayoutTargets(this)}},{key:"validateVisibilityInParent",value:function(){return!0}},{key:"setLayoutX",value:function(e){this.x!==e&&(this.x=e,this.parent.particleValuesDirty=!0)}},{key:"setLayoutY",value:function(e){this.y!==e&&(this.y=e,this.parent.particleValuesDirty=!0)}},{key:"setTarget",value:function(e,t,r,n,a){var l=i.g.currentTargetName,u=i.g.currentTModel;if(this.parent===u&&l&&i.g.markChildAction(u,l,this),e&&"object"===s(e)&&!Array.isArray(e)){for(var c=e,d=t,h=r,f=n,v=0,p=Object.entries(c);v<p.length;v++){var g=o(p[v],2),y=g[0],m=g[1],b=i.g.getTargetName(y);this.allTargetMap[b]=y,this.parent.setChildTarget(this.index,y,m,d,h,f)}return this}var T=i.g.getTargetName(e);return this.allTargetMap[T]=e,this.parent.setChildTarget(this.index,e,t,r,n,a),this}},{key:"activateTarget",value:function(e){return this.parent.activateGpuChildTarget(this.index,e),this}},{key:"getLayoutHeight",value:function(){var e=this.getHeight();return this.usesContentBoxSizing()&&(e+=this.getPaddingTop()+this.getPaddingBottom()),e}},{key:"getLayoutWidth",value:function(){var e=this.getWidth();return this.usesContentBoxSizing()&&(e+=this.getPaddingLeft()+this.getPaddingRight()),e}},{key:"addToUpdatingTargets",value:function(e){var t;this.updatingTargetMap[e]||(this.updatingTargetMap[e]=!0,this.updatingTargetList.push(e),null===(t=this.parent)||void 0===t||t.addToUpdatingChildren(this))}},{key:"removeFromUpdatingTargets",value:function(e){if(this.updatingTargetMap[e]){delete this.updatingTargetMap[e];var t,r=this.updatingTargetList.indexOf(e);r>=0&&this.updatingTargetList.splice(r,1),this.updatingTargetList.length||null===(t=this.parent)||void 0===t||t.removeFromUpdatingChildren(this)}}},{key:"usesContentBoxSizing",value:function(){return"border-box"!==this.getBoxSizing()}},{key:"getBoxSizing",value:function(){var e,t,r;return null!==(e=null!==(t=null!==(r=this.val("boxSizing"))&&void 0!==r?r:this.val("box-sizing"))&&void 0!==t?t:this.getParentValue("boxSizing"))&&void 0!==e?e:"content-box"}},{key:"getPaddingTop",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingTop"))&&void 0!==t?t:this.val("topPadding"))&&void 0!==e?e:n.a.getPaddingValue(this,"top")}},{key:"getPaddingLeft",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingLeft"))&&void 0!==t?t:this.val("leftPadding"))&&void 0!==e?e:n.a.getPaddingValue(this,"left")}},{key:"getPaddingRight",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingRight"))&&void 0!==t?t:this.val("rightPadding"))&&void 0!==e?e:n.a.getPaddingValue(this,"right")}},{key:"getPaddingBottom",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingBottom"))&&void 0!==t?t:this.val("bottomPadding"))&&void 0!==e?e:n.a.getPaddingValue(this,"bottom")}}],t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}()},969:function(e,t,r){r.d(t,{e:function(){return m}});var n=r(737),i=r(34);function a(e){return a="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},a(e)}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(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){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(){f=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var a=t&&t.prototype instanceof b?t:b,o=Object.create(a.prototype),l=new A(n||[]);return i(o,"_invoke",{value:P(e,r,l)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var v="suspendedStart",p="suspendedYield",g="executing",y="completed",m={};function b(){}function T(){}function w(){}var k={};c(k,l,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(j([])));x&&x!==r&&n.call(x,l)&&(k=x);var E=w.prototype=b.prototype=Object.create(k);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(i,o,l,s){var u=h(e[i],e,o);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==a(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,l,s)}),(function(e){r("throw",e,l,s)})):t.resolve(d).then((function(e){c.value=e,l(c)}),(function(e){return r("throw",e,l,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function P(t,r,n){var i=v;return function(a,o){if(i===g)throw Error("Generator is already running");if(i===y){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var s=D(l,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=g;var u=h(t,r,n);if("normal"===u.type){if(i=n.done?y:p,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=y,n.method="throw",n.arg=u.arg)}}}function D(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,D(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return T.prototype=w,i(E,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:T,configurable:!0}),T.displayName=c(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,c(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},C(M.prototype),c(M.prototype,s,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new M(d(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(E),c(E,u,"Generator"),c(E,l,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function v(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){v(a,n,i,o,l,"next",e)}function l(e){v(a,n,i,o,l,"throw",e)}o(void 0)}))}}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var m=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tmodel=t,this.canvas=void 0,this.device=void 0,this.context=void 0,this.format=void 0,this.pipeline=void 0,this.bindGroup=void 0,this.particleBuffer=void 0,this.targetParticleBuffer=void 0,this.uniformBuffer=void 0,this.explodeFragmentBuffer=void 0,this.explodeTexture=void 0,this.explodeSampler=void 0,this.explodeSourceCanvas=void 0,this.explodeTextureReady=!1,this.transitionStep=0,this.transitionActive=!1,this.particleCount=0,this.canvasLayer=void 0,this.canvasX=0,this.canvasY=0,this.canvasBounds=void 0,this.canvasSize=void 0,this.boundsDirty=!0,this.currentParticleData=void 0,this.targetParticleData=void 0,this.initializationPromise=void 0},t=[{key:"init",value:(m=p(f().mark((function e(){var t=this;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.device){e.next=3;break}return this.mountCanvasLayer(),e.abrupt("return",!0);case 3:if(this.tmodel.hasDom()){e.next=5;break}return e.abrupt("return",!1);case 5:return this.initializationPromise||(this.initializationPromise=this.initialize().catch((function(e){throw t.initializationPromise=void 0,e}))),e.next=8,this.initializationPromise;case 8:return e.abrupt("return",!!this.device);case 9:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"initialize",value:(y=p(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.gpu){e.next=2;break}throw new Error("WebGPU is not supported by this browser.");case 2:if(globalThis.GPUBufferUsage){e.next=4;break}throw new Error("GPUBufferUsage is not available in this WebGPU environment.");case 4:return this.createCanvas(),e.next=7,navigator.gpu.requestAdapter();case 7:if(t=e.sent){e.next=10;break}throw new Error("Unable to obtain a WebGPU adapter.");case 10:return e.next=12,t.requestDevice();case 12:if(this.device=e.sent,this.context=this.canvas.getContext("webgpu"),this.context){e.next=16;break}throw new Error("Unable to obtain a WebGPU canvas context.");case 16:this.format=navigator.gpu.getPreferredCanvasFormat(),this.resizeCanvas(),this.context.configure({device:this.device,format:this.format,alphaMode:"premultiplied",usage:globalThis.GPUTextureUsage.RENDER_ATTACHMENT|globalThis.GPUTextureUsage.COPY_SRC}),this.createUniformBuffer(),this.createExplodeResources(),this.createPipeline();case 22:case"end":return e.stop()}}),e,this)}))),function(){return y.apply(this,arguments)})},{key:"createCanvas",value:function(){var e=this;if(this.canvas)this.mountCanvasLayer();else{if(this.canvasLayer=document.createElement("div"),this.canvasLayer.setAttribute("data-targetjs-gpu-layer","true"),Object.assign(this.canvasLayer.style,{position:"absolute",left:"0px",top:"0px",width:"100%",height:"100%",pointerEvents:"none",zIndex:"0"}),this.canvas=document.createElement("canvas"),this.canvas.setAttribute("data-targetjs-gpu-children","true"),this.canvas.captureBitmap=function(){return e.captureBitmap()},Object.assign(this.canvas.style,{position:"absolute",left:"0px",top:"0px",width:"1px",height:"1px",display:"block",pointerEvents:"none"}),this.canvasLayer.appendChild(this.canvas),!this.mountCanvasLayer())throw new Error("Unable to mount GPU child layer.");this.onScroll=function(){return e.tmodel.requestParticleRender()},this.updateScrollElements()}}},{key:"createUniformBuffer",value:function(){this.uniformBuffer=this.device.createBuffer({size:32,usage:globalThis.GPUBufferUsage.UNIFORM|globalThis.GPUBufferUsage.COPY_DST})}},{key:"createExplodeResources",value:function(){this.explodeSampler=this.device.createSampler({addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge",magFilter:"linear",minFilter:"linear"}),this.explodeTexture=this.device.createTexture({size:{width:1,height:1},format:"rgba8unorm",usage:globalThis.GPUTextureUsage.TEXTURE_BINDING|globalThis.GPUTextureUsage.COPY_DST}),this.device.queue.writeTexture({texture:this.explodeTexture},new Uint8Array([0,0,0,0]),{bytesPerRow:4},{width:1,height:1}),this.explodeTextureReady=!1}},{key:"createPipeline",value:function(){var e=this.device.createShaderModule({code:"\n struct Uniforms {\n viewport: vec2f,\n contentOffset: vec2f,\n step: f32,\n transitionActive: f32,\n padding: vec2f,\n }\n\n @group(0) @binding(0)\n var<uniform> uniforms: Uniforms;\n \n @group(0) @binding(1)\n var explodeSampler: sampler;\n\n @group(0) @binding(2)\n var explodeTexture: texture_2d<f32>;\n\n struct VertexOutput {\n @builtin(position) position: vec4f,\n @location(0) localPosition: vec2f,\n @location(1) backgroundColor: vec4f,\n @location(2) size: vec2f,\n @location(3) borderRadius: f32,\n @location(4) sourceUv: vec2f,\n @location(5) useImage: f32,\n @location(6) opacity: f32,\n }\n \n fn getProgress(step: f32, steps: f32) -> f32 {\n if (uniforms.transitionActive < 0.5) {\n return 0.0;\n }\n\n if (steps < 0.0) {\n return 0.0;\n }\n\n if (steps == 0.0) {\n return 1.0;\n }\n\n return clamp(step / steps, 0.0, 1.0);\n }\n\n @vertex\n fn vertexMain(\n @location(0) childPosition: vec2f,\n @location(1) childSize: vec2f,\n @location(2) childBackgroundColor: vec4f,\n @location(3) childGeometry: vec2f,\n @location(4) targetPosition: vec2f,\n @location(5) targetSize: vec2f,\n @location(6) targetBackgroundColor: vec4f,\n @location(7) targetGeometry: vec2f,\n @location(8) targetPositionSteps: vec2f,\n @location(9) targetSizeSteps: vec2f,\n @location(10) targetColorOpacitySteps: vec2f,\n @location(11) targetGeometrySteps: vec2f,\n @location(12) childScaleOpacity: vec2f,\n @location(13) targetScaleOpacity: vec2f,\n @location(14) targetScaleSteps: f32,\n @location(15) explodeData: vec4f,\n @builtin(vertex_index) vertexIndex: u32\n ) -> VertexOutput {\n let corners = array<vec2f, 6>(\n vec2f(-1.0, -1.0),\n vec2f( 1.0, -1.0),\n vec2f(-1.0, 1.0),\n vec2f(-1.0, 1.0),\n vec2f( 1.0, -1.0),\n vec2f( 1.0, 1.0)\n );\n\n let xProgress = getProgress(uniforms.step, targetPositionSteps.x);\n let yProgress = getProgress(uniforms.step, targetPositionSteps.y);\n let widthProgress = getProgress(uniforms.step, targetSizeSteps.x);\n let heightProgress = getProgress(uniforms.step, targetSizeSteps.y);\n let backgroundColorProgress = getProgress(uniforms.step, targetColorOpacitySteps.x);\n let opacityProgress = getProgress(uniforms.step, targetColorOpacitySteps.y);\n let borderRadiusProgress = getProgress(uniforms.step, targetGeometrySteps.x);\n let rotateProgress = getProgress(uniforms.step, targetGeometrySteps.y);\n let scaleProgress = getProgress(uniforms.step, targetScaleSteps);\n \n let position = vec2f(\n mix(childPosition.x, targetPosition.x, xProgress),\n mix(childPosition.y, targetPosition.y, yProgress)\n );\n\n let size = vec2f(\n mix(childSize.x, targetSize.x, widthProgress),\n mix(childSize.y, targetSize.y, heightProgress)\n );\n\n let backgroundColor = mix(childBackgroundColor, targetBackgroundColor, backgroundColorProgress);\n let borderRadius = mix(childGeometry.x, targetGeometry.x, borderRadiusProgress);\n let rotate = mix(childGeometry.y, targetGeometry.y, rotateProgress);\n let scale = mix(childScaleOpacity.x, targetScaleOpacity.x, scaleProgress);\n let opacity = mix(childScaleOpacity.y, targetScaleOpacity.y, opacityProgress);\n\n let localPosition = corners[vertexIndex];\n \n let useImage = explodeData.w >= 0.0;\n let sourceV1 = select(-explodeData.w - 1.0, explodeData.w, useImage);\n let localUv = localPosition * 0.5 + vec2f(0.5);\n let sourceUv = mix(explodeData.xy, vec2f(explodeData.z, sourceV1), localUv);\n \n let localPixelPosition = localPosition * size * 0.5 * scale;\n\n let angle = rotate * 3.141592653589793 / 180.0;\n let cosine = cos(angle);\n let sine = sin(angle);\n\n let rotatedPosition = vec2f(\n localPixelPosition.x * cosine - localPixelPosition.y * sine,\n localPixelPosition.x * sine + localPixelPosition.y * cosine\n );\n\n let elementCenter = position - uniforms.contentOffset + size * 0.5;\n let pixelPosition = elementCenter + rotatedPosition;\n\n let clipPosition = vec2f(\n pixelPosition.x / uniforms.viewport.x * 2.0 - 1.0,\n 1.0 - pixelPosition.y / uniforms.viewport.y * 2.0\n );\n\n var output: VertexOutput;\n\n output.position = vec4f(clipPosition, 0.0, 1.0);\n output.localPosition = localPosition;\n output.backgroundColor = backgroundColor;\n output.size = size;\n output.borderRadius = borderRadius;\n output.opacity = opacity;\n \n output.sourceUv = sourceUv;\n output.useImage = select(0.0, 1.0, useImage);\n\n return output;\n }\n\n @fragment\n fn fragmentMain(input: VertexOutput) -> @location(0) vec4f {\n var color = input.backgroundColor;\n\n if (input.useImage > 0.5) {\n color = textureSampleLevel(explodeTexture, explodeSampler, input.sourceUv, 0.0);\n }\n\n let halfSize = max(input.size * 0.5, vec2f(0.0001));\n let radius = clamp(input.borderRadius, 0.0, min(halfSize.x, halfSize.y));\n let pixelPosition = input.localPosition * halfSize;\n let q = abs(pixelPosition) - (halfSize - vec2f(radius));\n let distance = length(max(q, vec2f(0.0))) + min(max(q.x, q.y), 0.0) - radius;\n let aa = max(fwidth(distance), 0.0001);\n let roundedCoverage = 1.0 - smoothstep(-aa, aa, distance);\n let coverage = select(1.0, roundedCoverage, radius > 0.0);\n\n if (coverage <= 0.0) {\n discard;\n }\n\n let alpha = color.a * input.opacity * coverage;\n\n return vec4f(color.rgb * alpha, alpha);\n }\n "});this.pipeline=this.device.createRenderPipeline({layout:"auto",vertex:{module:e,entryPoint:"vertexMain",buffers:[{arrayStride:84,stepMode:"instance",attributes:[{shaderLocation:0,offset:0,format:"float32x2"},{shaderLocation:1,offset:8,format:"float32x2"},{shaderLocation:2,offset:16,format:"float32x4"},{shaderLocation:3,offset:32,format:"float32x2"},{shaderLocation:12,offset:72,format:"float32x2"}]},{arrayStride:84,stepMode:"instance",attributes:[{shaderLocation:4,offset:0,format:"float32x2"},{shaderLocation:5,offset:8,format:"float32x2"},{shaderLocation:6,offset:16,format:"float32x4"},{shaderLocation:7,offset:32,format:"float32x2"},{shaderLocation:8,offset:40,format:"float32x2"},{shaderLocation:9,offset:48,format:"float32x2"},{shaderLocation:10,offset:56,format:"float32x2"},{shaderLocation:11,offset:64,format:"float32x2"},{shaderLocation:13,offset:72,format:"float32x2"},{shaderLocation:14,offset:80,format:"float32"}]},{arrayStride:16,stepMode:"instance",attributes:[{shaderLocation:15,offset:0,format:"float32x4"}]}]},fragment:{module:e,entryPoint:"fragmentMain",targets:[{format:this.format,blend:{color:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"}}}]},primitive:{topology:"triangle-list"}}),this.createBindGroup()}},{key:"createBindGroup",value:function(){this.bindGroup=this.device.createBindGroup({layout:this.pipeline.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this.uniformBuffer}},{binding:1,resource:this.explodeSampler},{binding:2,resource:this.explodeTexture.createView()}]})}},{key:"createExplodeSourceCanvas",value:function(e){var t=null==e?void 0:e.width,r=null==e?void 0:e.height;if(t&&r){var n=document.createElement("canvas");n.width=t,n.height=r;var i=n.getContext("2d");if(!i)throw new Error("Could not create a 2D context for the explode source copy.");return i.drawImage(e,0,0,t,r),n}}},{key:"setExplodeSource",value:(v=p(f().mark((function e(t){var r,n,i,a,o,l,s,u;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=null!==(r=null==t?void 0:t.bitmap)&&void 0!==r?r:null==t?void 0:t.canvas){e.next=3;break}return e.abrupt("return",!1);case 3:if(o=null!==(n=null==t?void 0:t.canvas)&&void 0!==n?n:this.createExplodeSourceCanvas(a)){e.next=6;break}return e.abrupt("return",!1);case 6:return e.next=8,this.init();case 8:if(e.sent){e.next=11;break}return e.abrupt("return",!1);case 11:return l=o.width,s=o.height,u=this.device.createTexture({size:{width:l,height:s},format:"rgba8unorm",usage:globalThis.GPUTextureUsage.TEXTURE_BINDING|globalThis.GPUTextureUsage.COPY_DST|globalThis.GPUTextureUsage.RENDER_ATTACHMENT}),this.device.queue.copyExternalImageToTexture({source:o},{texture:u},{width:l,height:s}),null===(i=this.explodeTexture)||void 0===i||i.destroy(),this.explodeSourceCanvas=o,this.explodeTexture=u,this.explodeTextureReady=!0,this.updateExplodeFragmentBuffer(this.tmodel.childHandles),this.createBindGroup(),this.render(),e.abrupt("return",!0);case 23:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"captureExplodeSourceBitmap",value:function(){if(this.explodeSourceCanvas)return createImageBitmap(this.explodeSourceCanvas)}},{key:"createExplodeFragmentData",value:function(e){for(var t=new Float32Array(4*e.length),r=this.tmodel.explodeChildrenState,n=(null==r?void 0:r.width)||1,a=(null==r?void 0:r.height)||1,o=0;o<e.length;o++){var l=e[o],s=Number.isInteger(null==l?void 0:l.index)?l.index:o,u=this.tmodel.getExplodeFragment(s),c=4*o;if(u){var d=u.x/n,h=u.y/a,f=(u.x+u.width)/n,v=(u.y+u.height)/a,p=i.d.isDefined(l.actualValues.backgroundColor),g=this.explodeTextureReady&&!p;t[c]=d,t[c+1]=h,t[c+2]=f,t[c+3]=g?v:-(v+1)}else t[c]=0,t[c+1]=0,t[c+2]=0,t[c+3]=-1}return t}},{key:"updateExplodeFragmentBuffer",value:function(e){var t=this.createExplodeFragmentData(e);this.explodeFragmentBuffer=this.uploadParticleBuffer(this.explodeFragmentBuffer,t)}},{key:"toNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r="string"==typeof e?parseFloat(e):Number(e);return Number.isFinite(r)?r:t}},{key:"getBackgroundColor",value:function(e){if(!i.d.isDefined(e))return[0,0,0,0];if(Array.isArray(e))return[this.toNumber(e[0],0),this.toNumber(e[1],0),this.toNumber(e[2],0),this.toNumber(e[3],0)];var t=n.I.color2Integers(e);if(!t)return[0,0,0,0];var r=this.toNumber(t[3],1);return r>1&&(r/=255),[this.toNumber(t[0],0)/255,this.toNumber(t[1],0)/255,this.toNumber(t[2],0)/255,r]}},{key:"getTargetStep",value:function(e,t){return e&&Object.prototype.hasOwnProperty.call(e,t)?Math.max(0,this.toNumber(e[t],0)):-1}},{key:"writeParticleData",value:function(e,t,r,n){var i,a,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null===(i=r)||void 0===i?void 0:i.x,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null===(a=r)||void 0===a?void 0:a.y;r||(r={});var s=this.getBackgroundColor(r.backgroundColor),u=Math.max(0,Math.min(1,this.toNumber(r.opacity,1)));e[t]=this.toNumber(o,0),e[t+1]=this.toNumber(l,0),e[t+2]=this.toNumber(r.width,0),e[t+3]=this.toNumber(r.height,0),e[t+4]=s[0],e[t+5]=s[1],e[t+6]=s[2],e[t+7]=s[3],e[t+8]=Math.max(0,this.toNumber(r.borderRadius,0)),e[t+9]=this.toNumber(r.rotate,0),e[t+10]=this.getTargetStep(n,"x"),e[t+11]=this.getTargetStep(n,"y"),e[t+12]=this.getTargetStep(n,"width"),e[t+13]=this.getTargetStep(n,"height"),e[t+14]=this.getTargetStep(n,"backgroundColor"),e[t+15]=this.getTargetStep(n,"opacity"),e[t+16]=this.getTargetStep(n,"borderRadius"),e[t+17]=this.getTargetStep(n,"rotate"),e[t+18]=this.toNumber(r.scale,1),e[t+19]=u,e[t+20]=this.getTargetStep(n,"scale")}},{key:"createChildData",value:function(e){for(var t=new Float32Array(21*e.length),r=0;r<e.length;r++){var n=e[r],i=n.actualValues,a=this.getParticlePosition(n,i),o=a.x,l=a.y;this.writeParticleData(t,21*r,i,void 0,o,l)}return t}},{key:"createParticleData",value:function(e,t){for(var r=new Float32Array(21*e.length),n=0;n<e.length;n++){var i=this.tmodel.childHandles[n],a=this.getParticlePosition(i,e[n]),o=a.x,l=a.y;this.writeParticleData(r,21*n,e[n],null==t?void 0:t[n],o,l)}return r}},{key:"uploadParticleBuffer",value:function(e,t){var r,n;if(t.length)return e&&e.size===t.byteLength||(null===(r=e)||void 0===r||r.destroy(),e=this.device.createBuffer({size:t.byteLength,usage:globalThis.GPUBufferUsage.VERTEX|globalThis.GPUBufferUsage.COPY_DST})),this.device.queue.writeBuffer(e,0,t),e;null===(n=e)||void 0===n||n.destroy()}},{key:"setParticles",value:(h=p(f().mark((function e(t){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Array.isArray(t)?t:[t],e.next=3,this.init();case 3:if(e.sent){e.next=6;break}return e.abrupt("return",!1);case 6:return r=this.createChildData(t),this.updateExplodeFragmentBuffer(t),this.particleCount=t.length,this.currentParticleData=r,this.targetParticleData=r,this.particleBuffer=this.uploadParticleBuffer(this.particleBuffer,r),this.targetParticleBuffer=this.uploadParticleBuffer(this.targetParticleBuffer,r),this.transitionStep=0,this.transitionActive=!1,this.boundsDirty=!0,this.render(),e.abrupt("return",!0);case 18:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"updateParticles",value:(c=p(f().mark((function e(t){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Array.isArray(t)?t:[t],e.next=3,this.init();case 3:if(e.sent){e.next=6;break}return e.abrupt("return",!1);case 6:return r=this.createChildData(t),this.updateExplodeFragmentBuffer(t),this.particleCount=t.length,this.currentParticleData=r,this.particleBuffer=this.uploadParticleBuffer(this.particleBuffer,r),t.length&&this.transitionActive||(this.targetParticleData=r,this.targetParticleBuffer=this.uploadParticleBuffer(this.targetParticleBuffer,r)),t.length||(this.transitionStep=0,this.transitionActive=!1),this.boundsDirty=!0,this.render(),e.abrupt("return",!0);case 16:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"setTargetParticles",value:(u=p(f().mark((function e(t,r){var n,i,a,o,l=arguments;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.length>2&&void 0!==l[2]?l[2]:this.tmodel.childGeneration,t=Array.isArray(t)?t:[t],e.next=4,this.init();case 4:if(e.sent&&n===this.tmodel.childGeneration){e.next=7;break}return e.abrupt("return",!1);case 7:if(i=this.tmodel.childHandles,t.length===i.length){e.next=10;break}return e.abrupt("return",!1);case 10:return this.particleCount===i.length&&this.particleBuffer||(a=this.createChildData(i),this.particleCount=i.length,this.currentParticleData=a,this.particleBuffer=this.uploadParticleBuffer(this.particleBuffer,a)),o=this.createParticleData(t,r),this.targetParticleData=o,this.targetParticleBuffer=this.uploadParticleBuffer(this.targetParticleBuffer,o),this.transitionStep=0,this.transitionActive=!0,this.boundsDirty=!0,this.render(),e.abrupt("return",!0);case 19:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"setTransitionStep",value:function(e){(e=Math.max(0,this.toNumber(e,0)))!==this.transitionStep&&(this.transitionStep=e,this.render())}},{key:"getRenderWidth",value:function(){return Math.max(1,Number(this.tmodel.getWidth())||1)}},{key:"getRenderHeight",value:function(){return Math.max(1,Number(this.tmodel.getHeight())||1)}},{key:"getParticleBounds",value:function(){var e=this.getRenderWidth(),t=this.getRenderHeight(),r=this.tmodel.managesOwnScroll(),n=this.canvasBounds;if(!this.boundsDirty&&(null==n?void 0:n.modelWidth)===e&&(null==n?void 0:n.modelHeight)===t&&(null==n?void 0:n.viewport)===r)return n;var i=r?{x:0,y:0,width:e,height:t}:this.calculateParticleBounds();return this.canvasBounds=d(d({},i),{},{modelWidth:e,modelHeight:t,viewport:r}),this.boundsDirty=!1,this.canvasBounds}},{key:"calculateParticleBounds",value:function(){for(var e,t,r=0,n=0,i=this.getRenderWidth(),a=this.getRenderHeight(),o=this.currentParticleData,l=null!==(e=this.targetParticleData)&&void 0!==e?e:o,s=Math.min(this.particleCount,(null!==(t=null==o?void 0:o.length)&&void 0!==t?t:0)/21),u=0;u<s;u++){var c=21*u,d=o,h=l&&l.length>=c+21?l:o,f=Math.min(d[c],h[c]),v=Math.max(d[c],h[c]),p=Math.min(d[c+1],h[c+1]),g=Math.max(d[c+1],h[c+1]),y=Math.min(d[c+2],h[c+2]),m=Math.max(d[c+2],h[c+2]),b=Math.min(d[c+3],h[c+3]),T=Math.max(d[c+3],h[c+3]),w=Math.max(Math.abs(d[c+18]),Math.abs(h[c+18])),k=Math.hypot(Math.max(Math.abs(d[c+2]),Math.abs(h[c+2])),Math.max(Math.abs(d[c+3]),Math.abs(h[c+3])))*w*.5+2;r=Math.min(r,f+y/2-k),i=Math.max(i,v+m/2+k),n=Math.min(n,p+b/2-k),a=Math.max(a,g+T/2+k)}var S=Math.floor(r),x=Math.floor(n);return{x:S,y:x,width:Math.max(1,Math.ceil(i)-S),height:Math.max(1,Math.ceil(a)-x)}}},{key:"updateCanvasLayerWidthHeight",value:function(){if(this.canvasLayer){var e=this.getParticleBounds().viewport,t=this.getRenderWidth(),r=this.getRenderHeight(),n=e?Math.max(t,Number(this.tmodel.getContentWidth())||0):t,i=e?Math.max(r,Number(this.tmodel.getContentHeight())||0):r;this.canvasLayer.style.width!=="".concat(n,"px")&&(this.canvasLayer.style.width="".concat(n,"px")),this.canvasLayer.style.height!=="".concat(i,"px")&&(this.canvasLayer.style.height="".concat(i,"px"))}}},{key:"resizeCanvas",value:function(){var e;if(!this.canvas||!this.device)return!1;var t=this.getParticleBounds(),r=t.width,n=t.height,i=t.modelWidth,a=t.modelHeight,o=window.devicePixelRatio||1,l=(null===(e=this.device.limits)||void 0===e?void 0:e.maxTextureDimension2D)||8192,s=Math.min(o,l/r,l/n),u=Math.max(1,Math.round(r*s)),c=Math.max(1,Math.round(n*s)),d=this.canvasSize;return!(d&&d.width===r&&d.height===n&&d.pixelWidth===u&&d.pixelHeight===c&&d.modelWidth===i&&d.modelHeight===a||(d&&d.width===r||(this.canvas.style.width="".concat(r,"px")),d&&d.height===n||(this.canvas.style.height="".concat(n,"px")),this.canvas.width!==u&&(this.canvas.width=u),this.canvas.height!==c&&(this.canvas.height=c),d&&d.modelWidth===i&&d.modelHeight===a||this.updateCanvasLayerWidthHeight(),this.canvasSize={width:r,height:n,pixelWidth:u,pixelHeight:c,modelWidth:i,modelHeight:a},0))}},{key:"repositionCanvas",value:function(){var e,t,r,n,i,a;if(!this.canvas||!this.canvasLayer||!this.tmodel.hasDom())return!1;var o=this.getParticleBounds(),l=Number(null!==(e=null!==(t=null===(r=this.tmodel.$dom)||void 0===r?void 0:r.getScrollLeft())&&void 0!==t?t:this.tmodel.getScrollLeft())&&void 0!==e?e:0)||0,s=Number(null!==(n=null!==(i=null===(a=this.tmodel.$dom)||void 0===a?void 0:a.getScrollTop())&&void 0!==i?i:this.tmodel.getScrollTop())&&void 0!==n?n:0)||0,u=o.x+(this.tmodel.managesOwnScroll()?l:0),c=o.y+(this.tmodel.managesOwnScroll()?s:0),d=this.tmodel.managesOwnScroll()&&!this.externalCanvasHost?u:o.x,h=this.tmodel.managesOwnScroll()&&!this.externalCanvasHost?c:o.y,f=this.tmodel.managesOwnScroll()?u:o.x+(this.externalCanvasHost?l:0),v=this.tmodel.managesOwnScroll()?c:o.y+(this.externalCanvasHost?s:0),p=f!==this.canvasX||v!==this.canvasY;this.canvasX=f,this.canvasY=v;var g="".concat(d,"px"),y="".concat(h,"px");return this.canvas.style.left!==g&&(this.canvas.style.left=g,p=!0),this.canvas.style.top!==y&&(this.canvas.style.top=y,p=!0),"none"!==this.canvas.style.transform&&(this.canvas.style.transform="none",p=!0),p}},{key:"getParticlePosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==e?void 0:e.actualValues,r=Number(this.tmodel.getScrollLeft())||0,n=Number(this.tmodel.getScrollTop())||0;return{x:e.allTargetMap.x?t.x:e.x+r,y:e.allTargetMap.y?t.y:e.y+n}}},{key:"updateUniforms",value:function(){var e,t=null!==(e=this.canvasBounds)&&void 0!==e?e:this.getParticleBounds();this.device.queue.writeBuffer(this.uniformBuffer,0,new Float32Array([t.width,t.height,this.canvasX,this.canvasY,this.transitionStep,this.transitionActive?1:0,0,0]))}},{key:"waitForPresentedFrame",value:(s=p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.device){e.next=3;break}return e.next=3,this.device.queue.onSubmittedWorkDone();case 3:return e.next=5,new Promise((function(e){requestAnimationFrame((function(){requestAnimationFrame(e)}))}));case 5:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"render",value:function(){if(this.device&&this.context&&this.mountCanvasLayer()){this.resizeCanvas(),this.repositionCanvas();var e=this.device.createCommandEncoder();this.encodeRenderPass(e,this.context.getCurrentTexture().createView()),this.device.queue.submit([e.finish()])}}},{key:"completeTransition",value:function(){if(this.targetParticleBuffer&&this.transitionActive){var e=this.particleBuffer;this.particleBuffer=this.targetParticleBuffer,this.targetParticleBuffer=e,this.currentParticleData=this.targetParticleData,this.transitionStep=0,this.transitionActive=!1,this.boundsDirty=!0,this.render()}}},{key:"captureBitmap",value:(a=p(f().mark((function e(){var t,r,n,i,a,o,l,s,u,c,d,h,v,p,g,y;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.canvas&&this.device&&this.context){e.next=2;break}return e.abrupt("return");case 2:return this.resizeCanvas(),this.repositionCanvas(),t=this.canvas.width,r=this.canvas.height,n=256*Math.ceil(4*t/256),i=this.device.createBuffer({size:n*r,usage:globalThis.GPUBufferUsage.COPY_DST|globalThis.GPUBufferUsage.MAP_READ}),a=this.context.getCurrentTexture(),o=this.device.createCommandEncoder(),this.encodeRenderPass(o,a.createView()),o.copyTextureToBuffer({texture:a},{buffer:i,bytesPerRow:n},{width:t,height:r}),this.device.queue.submit([o.finish()]),e.next=15,i.mapAsync(globalThis.GPUMapMode.READ);case 15:for(l=new Uint8Array(i.getMappedRange()),s=new Uint8ClampedArray(t*r*4),u=4*t,c=0;c<r;c++)s.set(l.subarray(c*n,c*n+u),c*u);if(i.unmap(),i.destroy(),this.format.startsWith("bgra"))for(d=0;d<s.length;d+=4)h=s[d],s[d]=s[d+2],s[d+2]=h;for(v=0;v<s.length;v+=4)(p=s[v+3])>0&&p<255&&(g=255/p,s[v]=Math.min(255,Math.round(s[v]*g)),s[v+1]=Math.min(255,Math.round(s[v+1]*g)),s[v+2]=Math.min(255,Math.round(s[v+2]*g)));return(y=document.createElement("canvas")).width=t,y.height=r,y.getContext("2d").putImageData(new ImageData(s,t,r),0,0),e.abrupt("return",createImageBitmap(y));case 29:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"updateScrollElements",value:function(){var e,t,r,n,i=l(new Set([null===(e=this.tmodel.$dom)||void 0===e?void 0:e.element,null===(t=this.tmodel.getParent())||void 0===t||null===(t=t.$dom)||void 0===t?void 0:t.element].filter(Boolean))),a=o(null!==(r=this.scrollElements)&&void 0!==r?r:[]);try{for(a.s();!(n=a.n()).done;){var s=n.value;i.includes(s)||s.removeEventListener("scroll",this.onScroll)}}catch(e){a.e(e)}finally{a.f()}var u,c=o(i);try{for(c.s();!(u=c.n()).done;){var d,h=u.value;(null!==(d=this.scrollElements)&&void 0!==d?d:[]).includes(h)||h.addEventListener("scroll",this.onScroll,{passive:!0})}}catch(e){c.e(e)}finally{c.f()}this.scrollElements=i}},{key:"canHostCanvasLayer",value:function(e){return!new Set(["IMG","INPUT","CANVAS","VIDEO","IFRAME","OBJECT","EMBED"]).has(e.tagName)}},{key:"getCanvasMount",value:function(){var e,t=null===(e=this.tmodel.$dom)||void 0===e?void 0:e.element;if(t){var r=!!this.tmodel.explodeChildrenState||!this.canHostCanvasLayer(t);return{source:t,host:r?t.parentElement:t,external:r}}}},{key:"mountCanvasLayer",value:function(){if(!this.canvasLayer)return!1;var e=this.getCanvasMount();if(null==e||!e.host)return!1;var t=e.source,r=e.host,n=e.external;return this.canvasLayer.parentElement!==r&&(n?t.after(this.canvasLayer):r.prepend(this.canvasLayer)),this.canvasHost=r,this.externalCanvasHost=n,n?(this.canvasLayer.style.left=t.style.left||"0px",this.canvasLayer.style.top=t.style.top||"0px",this.canvasLayer.style.transform=t.style.transform||"none",this.canvasLayer.style.transformOrigin=t.style.transformOrigin||"50% 50%",this.canvasLayer.style.zIndex=this.tmodel.explodeChildrenState?String((Number(t.style.zIndex)||0)+1):t.style.zIndex||"0"):(this.canvasLayer.style.left="0px",this.canvasLayer.style.top="0px",this.canvasLayer.style.transform="none",this.canvasLayer.style.zIndex="0"),this.updateScrollElements(),!0}},{key:"encodeRenderPass",value:function(e,t){var r=this.pipeline&&this.bindGroup&&this.particleBuffer&&this.targetParticleBuffer&&this.explodeFragmentBuffer&&this.particleCount>0;r&&this.updateUniforms();var n=e.beginRenderPass({colorAttachments:[{view:t,clearValue:{r:0,g:0,b:0,a:0},loadOp:"clear",storeOp:"store"}]});if(r){var i;n.setPipeline(this.pipeline),n.setBindGroup(0,this.bindGroup),n.setVertexBuffer(0,this.particleBuffer),n.setVertexBuffer(1,this.targetParticleBuffer),n.setVertexBuffer(2,this.explodeFragmentBuffer);var a=this.tmodel.explodeChildrenState,o=this.explodeTextureReady&&a&&null!==(i=a.firstExplodeChild)&&void 0!==i?i:0,l=this.particleCount-o;l>0&&n.draw(6,l,0,o)}n.end()}},{key:"destroy",value:function(){var e,t,r,n,i,a,l,s,u,c=o(null!==(s=this.scrollElements)&&void 0!==s?s:[]);try{for(c.s();!(u=c.n()).done;)u.value.removeEventListener("scroll",this.onScroll)}catch(e){c.e(e)}finally{c.f()}this.canvasSize=void 0,this.canvasBounds=void 0,this.boundsDirty=!0,this.scrollElements=void 0,this.onScroll=void 0,null===(e=this.particleBuffer)||void 0===e||e.destroy(),null===(t=this.targetParticleBuffer)||void 0===t||t.destroy(),null===(r=this.uniformBuffer)||void 0===r||r.destroy(),null===(n=this.context)||void 0===n||n.unconfigure(),null===(i=this.canvasLayer)||void 0===i||i.remove(),null===(a=this.explodeFragmentBuffer)||void 0===a||a.destroy(),null===(l=this.explodeTexture)||void 0===l||l.destroy(),this.particleBuffer=void 0,this.targetParticleBuffer=void 0,this.uniformBuffer=void 0,this.bindGroup=void 0,this.pipeline=void 0,this.context=void 0,this.device=void 0,this.canvasLayer=void 0,this.canvas=void 0,this.format=void 0,this.transitionStep=0,this.transitionActive=!1,this.particleCount=0,this.canvasBounds=void 0,this.currentParticleData=void 0,this.targetParticleData=void 0,this.explodeFragmentBuffer=void 0,this.explodeTexture=void 0,this.explodeSampler=void 0,this.explodeSourceCanvas=void 0,this.explodeTextureReady=!1,this.initializationPromise=void 0}}],t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,a,s,u,c,h,v,y,m}()},720:function(e,t,r){r.d(t,{f:function(){return x}});var n=r(421),i=r(138),a=r(333),o=r(249),l=r(34),s=r(855),u=r(690);function c(e){return c="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},c(e)}function d(){d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var a=t&&t.prototype instanceof b?t:b,o=Object.create(a.prototype),l=new A(n||[]);return i(o,"_invoke",{value:P(e,r,l)}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var v="suspendedStart",p="suspendedYield",g="executing",y="completed",m={};function b(){}function T(){}function w(){}var k={};u(k,o,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(j([])));x&&x!==r&&n.call(x,o)&&(k=x);var E=w.prototype=b.prototype=Object.create(k);function C(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(i,a,o,l){var s=f(e[i],e,a);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==c(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(d).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function P(t,r,n){var i=v;return function(a,o){if(i===g)throw Error("Generator is already running");if(i===y){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var s=D(l,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=g;var u=f(t,r,n);if("normal"===u.type){if(i=n.done?y:p,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=y,n.method="throw",n.arg=u.arg)}}}function D(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,D(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(c(t)+" is not iterable")}return T.prototype=w,i(E,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:T,configurable:!0}),T.displayName=u(w,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,u(e,s,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},C(M.prototype),u(M.prototype,l,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new M(h(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(E),u(E,s,"Generator"),u(E,o,(function(){return this})),u(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function h(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){h(a,n,i,o,l,"next",e)}function l(e){h(a,n,i,o,l,"throw",e)}o(void 0)}))}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||T(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=T(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function m(e,t,r){return(t=S(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(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 T(e,t){if(e){if("string"==typeof e)return w(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S(n.key),n)}}function S(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}var x=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tmodel=t,this.activeTargets=[],this.restoredMainIndexes=[],this.restoredActivationSequences=[],this.restoredImperativeExecutions=[],this.activeRenderExecutions=new Set,this.animationFrameRequested=!1,this.startQueue=[],this.startQueueIndex=0,this.disposed=!1,this.animationFrameId=void 0,this.loopQueue=[],this.queuedLoops=new WeakMap,this.runningLoops=new WeakMap,this.imperativeCompletionFrame=void 0,this.visibilityPaused=!1,this.restorePending=!1,this.propertyOwners=new WeakMap,this.imperativeSequenceCount=0},t=[{key:"registerChild",value:function(e,t,r){var n=r.runtimeTargets.some((function(e){return!1!==e.requiresRuntime}));return this.tmodel.childRuntimePrograms[e]=r.runtimeTargets,this.tmodel.childRuntimeStates[e]={originalTargetName:t,nextTargetIndex:0,activationCount:0,executions:{},startRequested:!1,startQueued:!1,renderReady:!1,started:!1,done:!n,targetCycles:{},loopTargets:{},mainFinished:!1},n&&(this.tmodel.pendingGpuChildRuntimeCounts[t]=(this.tmodel.pendingGpuChildRuntimeCounts[t]||0)+1),n}},{key:"removeChild",value:function(e){var t=this.tmodel.childRuntimeStates[e];t&&(t.cancelled=!0,t.loopTargets={},t.done||this.complete(e));for(var r=0,n=b(this.activeRenderExecutions);r<n.length;r++){var i=n[r];if(i.index!==e)i.index>e&&i.index--;else{this.activeRenderExecutions.delete(i),i.cancelled=!0;var a=i.resolve;i.resolve=void 0,null==a||a()}}this.tmodel.childRuntimePrograms.splice(e,1),this.tmodel.childRuntimeStates.splice(e,1),this.activeTargets.splice(e,1),this.startQueue=this.startQueue.slice(this.startQueueIndex).filter((function(t){return t!==e})).map((function(t){return t>e?t-1:t})),this.startQueueIndex=0,this.restoredMainIndexes=this.restoredMainIndexes.filter((function(t){return t!==e})).map((function(t){return t>e?t-1:t})),this.restoredActivationSequences=this.restoredActivationSequences.filter((function(t){return t.index!==e})).map((function(t){return t.index>e?y(y({},t),{},{index:t.index-1}):t})),this.restoredImperativeExecutions=this.restoredImperativeExecutions.filter((function(t){return t.index!==e})).map((function(t){return t.index>e?y(y({},t),{},{index:t.index-1}):t}))}},{key:"hasPending",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";return"none"!==r&&this.tmodel.childRuntimeStates.some((function(n,i){return!(!n||void 0!==e&&n.originalTargetName!==e||"visible"===r&&a.g.shouldIgnoreChildForCompletion(t.tmodel.childHandles[i],"visible")||n.renderReady&&n.done&&!(Object.keys(t.activeTargets[i]||{}).length>0))}))}},{key:"hasPendingAny",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all";return this.hasPending(void 0,e)}},{key:"isIntervalTarget",value:function(e){return u.D.isIntervalTarget(e.target)}},{key:"prepareRestore",value:function(){this.restorePending=!0,this.restoredMainIndexes=[],this.restoredActivationSequences=[],this.restoredImperativeExecutions=[];for(var e=0;e<this.tmodel.childRuntimeStates.length;e++){var t,r,n,i,a,o=this.tmodel.childRuntimeStates[e];if(o){null!==(t=o.executions)&&void 0!==t||(o.executions={}),null!==(r=o.activationCount)&&void 0!==r||(o.activationCount=0),null!==(n=o.targetCycles)&&void 0!==n||(o.targetCycles={}),null!==(i=o.loopTargets)&&void 0!==i||(o.loopTargets={}),null!==(a=o.mainFinished)&&void 0!==a||(o.mainFinished=!1);var l=Object.values(o.executions),s=l.filter((function(e){return"main"===e.sequenceId}));o.done||!o.started&&!s.length||this.restoredMainIndexes.push(e);var u,c=b(new Set(l.map((function(e){return e.sequenceId})).filter((function(e){return null==e?void 0:e.startsWith("activation:")})))),d=p(c);try{for(d.s();!(u=d.n()).done;){var h=u.value;this.restoredActivationSequences.push({index:e,sequenceId:h})}}catch(e){d.e(e)}finally{d.f()}for(var f=0,v=l;f<v.length;f++){var g,y=v[f];if(null!==(g=y.sequenceId)&&void 0!==g&&g.startsWith("imperative:")){var m=y.sequenceId.split(":").pop(),T=Number(m);Number.isFinite(T)&&(this.imperativeSequenceCount=Math.max(this.imperativeSequenceCount,T)),this.restoredImperativeExecutions.push({index:e,execution:y})}}o.started=!1,o.renderReady=!1,o.startRequested=!1}}}},{key:"resumeRestored",value:function(){if(this.disposed||!this.restorePending||!this.tmodel.isVisible())return!1;this.restorePending=!1;var e,t=this.restoredMainIndexes.splice(0),r=this.restoredActivationSequences.splice(0),n=this.restoredImperativeExecutions.splice(0),i=p(t);try{for(i.s();!(e=i.n()).done;){var a=e.value;this.resumeMainProgram(a)}}catch(e){i.e(e)}finally{i.f()}var o,s=p(r);try{for(s.s();!(o=s.n()).done;){var u=o.value,c=u.index,d=u.sequenceId;this.resumeActivationSequence(c,d)}}catch(e){s.e(e)}finally{s.f()}var h,f=p(n);try{for(f.s();!(h=f.n()).done;){var g=h.value,y=g.index,m=g.execution;this.resumeImperativeExecution(y,m)}}catch(e){f.e(e)}finally{f.f()}for(var b=0;b<this.tmodel.childRuntimeStates.length;b++){var T=this.tmodel.childRuntimeStates[b];if(T&&!T.done)for(var w=0,k=Object.entries(T.loopTargets||{});w<k.length;w++){var S,x=v(k[w],2),E=x[0];if(x[1]){var C=Number(E),M="loop:".concat(C),P=null===(S=T.executions)||void 0===S?void 0:S[this.getExecutionId(M,C)];null!=P&&P.segmentReady&&P.interval>0&&(P.segmentStartTime=l.d.now()-P.step*P.interval,P.pausedAt=void 0),this.queueLoop(b,C)}}}this.tmodel.pendingImperativeCompletions.size&&this.queueImperativeCompletion()}},{key:"resumeActivationSequence",value:function(e,t){var r,n,i=this,a=this.tmodel.childRuntimeStates[e];if(!a)return!1;var o=Object.values(a.executions||{}).filter((function(e){return e.sequenceId===t}));if(!o.length)return!1;var l=Math.max.apply(Math,b(o.map((function(e){return e.targetIndex})))),s=t.startsWith("activation:")?t.slice(11):t,u=null!==(n=(r=this.activeTargets)[e])&&void 0!==n?n:r[e]={},c=Promise.all(o.map((function(t){return i.resumeExecution(e,t)}))).then((function(r){if(r.every(Boolean))return i.continueActivatedSequence(e,l+1,t)})).catch((function(e){console.error(e)})).finally((function(){delete u[s]}));return u[s]=c,!0}},{key:"resumeImperativeExecution",value:function(e,t){var r,n=this,i=this.tmodel.childHandles[e],a=this.tmodel.childRuntimeStates[e],o=null==t?void 0:t.imperativeTarget;if(!i||!a||!o)return!1;if("render"!==t.kind&&"runtime"!==t.kind)return!1;var s=t.imperativeKey||o.imperativeKey||"".concat(t.targetName,"+");t.segmentReady&&t.interval>0&&(t.segmentStartTime=l.d.now()-t.step*t.interval,t.pausedAt=void 0);var u={isImperative:!0,originalTargetName:o.originalTargetName,originalTModel:o.originalTargetIsParent?this.tmodel:void 0,status:"updating",value:o.target.value,steps:o.target.steps||0,interval:o.target.interval||0,easing:o.target.easing,cycles:null!==(r=o.target.cycles)&&void 0!==r?r:1};i.targetValues[s]=u,i.addToUpdatingTargets(s);var c=this.runTarget(e,o,t.targetIndex,t.sequenceId,u);return Promise.resolve(c).catch((function(e){return console.error(e),!1})).then((function(e){n.disposed||i.targetValues[s]!==u||(u.status=e?"done":"cancelled",i.removeFromUpdatingTargets(s),e&&n.queueImperativeCompletion(o.originalTargetIsParent?n.tmodel:void 0,o.originalTargetName))})),!0}},{key:"continueActivatedSequence",value:(x=f(d().mark((function e(t,r,n){var i,a;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.disposed){e.next=2;break}return e.abrupt("return");case 2:if(i=this.tmodel.childRuntimePrograms[t]){e.next=5;break}return e.abrupt("return");case 5:if(this.disposed||!(r<i.length)){e.next=17;break}if("deferred"===(a=i[r]).mode){e.next=9;break}return e.abrupt("break",17);case 9:return e.next=11,this.runTarget(t,a,r,n);case 11:if(e.sent){e.next=14;break}return e.abrupt("return");case 14:r++,e.next=5;break;case 17:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return x.apply(this,arguments)})},{key:"resumeMainProgram",value:function(e){var t=this,r=this.tmodel.childRuntimeStates[e];if(!this.disposed&&r&&!r.done&&!r.started){r.started=!0;var n=Object.values(r.executions||{}).filter((function(e){return"main"===e.sequenceId}));Promise.all(n.map((function(r){return t.resumeExecution(e,r)}))).then((function(){return t.runProgram(e)})).catch((function(e){console.error(e)})).finally((function(){t.finishMainProgram(e,r)}))}}},{key:"resumeExecution",value:function(e,t){var r=this.tmodel.childRuntimePrograms[e],n=null==r?void 0:r[t.targetIndex];return n?this.runTarget(e,n,t.targetIndex,t.sequenceId):Promise.resolve()}},{key:"complete",value:function(e){if(!this.disposed){var t=this.tmodel,r=t.childRuntimeStates[e];if(r&&!r.done){r.done=!0,r.started=!1;var n=r.originalTargetName,i=Math.max(0,(t.pendingGpuChildRuntimeCounts[n]||0)-1);i>0?t.pendingGpuChildRuntimeCounts[n]=i:(delete t.pendingGpuChildRuntimeCounts[n],(0,s.fB)().schedule(1,"gpuChildRuntimeComplete-".concat(t.oid))),a.g.cleanupVisibleComplete(t,n),this.completeOriginalTarget(n)}}}},{key:"completeOriginalTarget",value:function(e){var t=this.tmodel;return!(!t.isTargetDone(e)||!t.isTargetTreeComplete(e)||(a.g.cleanupTarget(t,e),a.g.shouldActivateNextTarget(t,e),0))}},{key:"queueStart",value:function(e){var t=this.tmodel.childRuntimeStates[e];!t||t.done||t.started||(t.startRequested=!0)}},{key:"markRenderReady",value:function(e){var t,r=new Set,n=p(e);try{for(n.s();!(t=n.n()).done;){var i=t.value,a=this.tmodel.childRuntimeStates[i];a&&(a.renderReady=!0,r.add(a.originalTargetName))}}catch(e){n.e(e)}finally{n.f()}this.startReady();var o,l=this.tmodel,u=p(r);try{for(u.s();!(o=u.n()).done;){var c=o.value;this.completeOriginalTarget(c)}}catch(e){u.e(e)}finally{u.f()}r.size>0&&(0,s.fB)().schedule(1,"gpuChildrenRenderReady-".concat(l.oid))}},{key:"markPendingRenderReady",value:function(){for(var e=[],t=0;t<this.tmodel.childRuntimeStates.length;t++){var r=this.tmodel.childRuntimeStates[t];r&&!r.renderReady&&e.push(t)}this.markRenderReady(e)}},{key:"startReady",value:function(){if(!this.disposed){var e=this.tmodel;if(!e.isVisible()||!e.hasDom()||e.completeLayoutEpoch!==e.layoutEpoch)return!1;for(var t=!1,r=0;r<e.childRuntimeStates.length;r++){var n=e.childRuntimeStates[r];n&&n.startRequested&&n.renderReady&&!n.startQueued&&!n.started&&!n.done&&(n.startQueued=!0,this.startQueue.push(r),t=!0)}return t&&this.requestAnimationFrame(),t}}},{key:"startQueuedPrograms",value:function(){for(var e=l.d.now(),t=0;this.startQueueIndex<this.startQueue.length&&t<5e3&&l.d.now()-e<4;){var r=this.startQueue[this.startQueueIndex++],n=this.tmodel.childRuntimeStates[r];n&&(n.startQueued=!1,n.startRequested&&n.renderReady&&!n.started&&!n.done&&(n.startRequested=!1,this.start(r),t++))}this.startQueueIndex>=this.startQueue.length&&(this.startQueue.length=0,this.startQueueIndex=0)}},{key:"start",value:function(e){var t=this;if(!this.disposed){var r=this.tmodel.childRuntimeStates[e],n=this.tmodel.childRuntimePrograms[e];r&&null!=n&&n.length&&!r.started&&!r.done&&(r.started=!0,r.nextTargetIndex=0,Promise.resolve(this.runProgram(e)).catch((function(e){console.error(e)})).finally((function(){t.finishMainProgram(e,r)})))}}},{key:"runProgram",value:(S=f(d().mark((function e(t){var r,n,i,a,o;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.disposed){e.next=2;break}return e.abrupt("return");case 2:if(r=this.tmodel.childRuntimeStates[t],n=this.tmodel.childRuntimePrograms[t],r&&n){e.next=6;break}return e.abrupt("return");case 6:for(i=[];!r.cancelled&&r.nextTargetIndex<n.length&&"immediate"===n[r.nextTargetIndex].mode;)a=r.nextTargetIndex++,i.push(this.runTarget(t,n[a],a,"main"));if(!i.length){e.next=11;break}return e.next=11,Promise.all(i);case 11:if(!r.cancelled){e.next=13;break}return e.abrupt("return");case 13:if(r.cancelled||!(r.nextTargetIndex<n.length)){e.next=19;break}return o=r.nextTargetIndex++,e.next=17,this.runTarget(t,n[o],o,"main");case 17:e.next=13;break;case 19:case"end":return e.stop()}}),e,this)}))),function(e){return S.apply(this,arguments)})},{key:"runTarget",value:(w=f(d().mark((function e(t,r,n){var a,o,l,s,u,c,h,f,v,p,g,y,m,b=this,T=arguments;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=T.length>3&&void 0!==T[3]?T[3]:"main",l=T.length>4?T[4]:void 0,!this.disposed&&!1!==r.requiresRuntime){e.next=4;break}return e.abrupt("return",!1);case 4:if(s=this.tmodel.childRuntimeStates[t],u=this.tmodel.childHandles[t],s&&u&&!s.cancelled){e.next=8;break}return e.abrupt("return",!1);case 8:if(c=i.D.getTargetName(r.targetName),!(h=o.startsWith("loop:"))||!this.isTargetUpdating(t,c,o,n)){e.next=13;break}return this.blockLoop(t,n),e.abrupt("return",!1);case 13:this.cancelPropertyExecutions(t,c,o,n),(f=this.propertyOwners.get(s))||(f=new Map,this.propertyOwners.set(s,f)),v={sequenceId:o,targetIndex:n},f.set(c,v),p=this.getExecutionId(o,n),null!==(a=s.targetCycles)&&void 0!==a||(s.targetCycles={}),g=function(){return b.disposed||s.cancelled||b.tmodel.childHandles[t]!==u||f.get(c)!==v||l&&u.targetValues[r.imperativeKey]!==l},e.prev=21;case 22:if(g()){e.next=44;break}if(!this.isIntervalTarget(r)){e.next=28;break}return e.next=26,this.runIntervalTarget(t,r,n,o,g);case 26:e.next=35;break;case 28:if(!r.renderable){e.next=33;break}return e.next=31,this.runRenderTarget(t,r,n,o,g);case 31:e.next=35;break;case 33:return e.next=35,this.runRuntimeTarget(t,r,n,o,g);case 35:if(!g()){e.next=37;break}return e.abrupt("return",!1);case 37:if(y=(s.targetCycles[p]||0)+1,m=this.getTargetCycles(r,u,y-1),!(y>=m)){e.next=41;break}return e.abrupt("break",44);case 41:s.targetCycles[p]=y,e.next=22;break;case 44:if(!g()){e.next=46;break}return e.abrupt("return",!1);case 46:return!o.startsWith("imperative:")&&this.isTargetInLoop(r,u)?this.queueLoop(t,n):h&&(delete s.loopTargets[n],this.completeIfReady(t)),e.abrupt("return",!0);case 48:return e.prev=48,f.get(c)===v&&(f.delete(c),this.queueBlockedLoops(t,c)),delete s.targetCycles[p],e.finish(48);case 52:case"end":return e.stop()}}),e,this,[[21,,48,52]])}))),function(e,t,r){return w.apply(this,arguments)})},{key:"isTargetUpdating",value:function(e,t,r,n){var a,o=this.tmodel.childRuntimeStates[e],l=i.D.getTargetName(t),s=null===(a=this.propertyOwners.get(o))||void 0===a?void 0:a.get(l);return!(!s||s.sequenceId===r&&s.targetIndex===n)||Object.values((null==o?void 0:o.executions)||{}).some((function(e){return!(e.cancelled||e.targetName!==l||e.sequenceId===r&&e.targetIndex===n)}))}},{key:"blockLoop",value:function(e,t){var r,n=this.tmodel.childRuntimeStates[e];n&&((null!==(r=n.blockedLoops)&&void 0!==r?r:n.blockedLoops={})[t]=!0)}},{key:"queueBlockedLoops",value:function(e,t){var r=this.tmodel.childRuntimeStates[e],n=this.tmodel.childRuntimePrograms[e];if(r&&n&&!r.cancelled&&!this.disposed&&!this.isTargetUpdating(e,t))for(var i=this.runningLoops.get(r),a=0,o=Object.keys(r.blockedLoops||{});a<o.length;a++){var l,s,u=o[a],c=Number(u);(null===(l=n[c])||void 0===l?void 0:l.targetName)!==t||null===(s=r.loopTargets)||void 0===s||!s[c]||null!=i&&i.has(c)||(delete r.blockedLoops[u],this.queueLoop(e,c))}}},{key:"cancelPropertyExecutions",value:function(e,t,r,n){var a=this,o=this.tmodel.childRuntimeStates[e],l=this.tmodel.childHandles[e],s=this.tmodel.childRuntimePrograms[e];if(o&&l){var u=i.D.getTargetName(t),c=this.propertyOwners.get(o),d=null==c?void 0:c.get(u),h=function(t,r){if(null==t||!t.startsWith("imperative:")){var n,i=null==s?void 0:s[r];(null==i?void 0:i.targetName)===u&&a.isTargetInLoop(i,l)&&(null!==(n=o.loopTargets)&&void 0!==n||(o.loopTargets={}),o.loopTargets[r]=!0,a.blockLoop(e,r))}};!d||d.sequenceId===r&&d.targetIndex===n||(h(d.sequenceId,d.targetIndex),c.delete(u));for(var f=0,p=Object.entries(o.loopTargets||{});f<p.length;f++){var g,y=v(p[f],2),m=y[0];y[1]&&(null==s||null===(g=s[Number(m)])||void 0===g?void 0:g.targetName)===u&&this.blockLoop(e,Number(m))}for(var b=0,T=Object.entries(o.executions||{});b<T.length;b++){var w,k=v(T[b],2),S=k[0],x=k[1];if(!(x.cancelled||x.targetName!==u||x.sequenceId===r&&x.targetIndex===n)){h(x.sequenceId,x.targetIndex),x.cancelled=!0,null===(w=x.cancelWait)||void 0===w||w.call(x),x.cancelWait=void 0,this.activeRenderExecutions.delete(x),delete o.executions[S];var E=x.resolve;x.resolve=void 0,null==E||E()}}}}},{key:"queueLoop",value:function(e,t){var r,n,i=this.tmodel.childRuntimeStates[e];if(!this.disposed&&i&&!i.cancelled){null!==(r=i.loopTargets)&&void 0!==r||(i.loopTargets={}),i.loopTargets[t]=!0;var a=null===(n=this.tmodel.childRuntimePrograms[e])||void 0===n||null===(n=n[t])||void 0===n?void 0:n.targetName;if(a&&this.isTargetUpdating(e,a))this.blockLoop(e,t);else{var o=this.queuedLoops.get(i);o||(o=new Set,this.queuedLoops.set(i,o)),o.has(t)||(o.add(t),this.loopQueue.push({state:i,targetIndex:t}),this.requestAnimationFrame())}}}},{key:"startQueuedLoops",value:function(){var e,t=this,r=p(this.loopQueue.splice(0));try{var n=function(){var r,n,i,a=e.value,o=a.state,l=a.targetIndex;null===(r=t.queuedLoops.get(o))||void 0===r||r.delete(l);var s=t.tmodel.childRuntimeStates.indexOf(o);if(t.disposed||s<0||o.cancelled||null===(n=o.loopTargets)||void 0===n||!n[l])return 0;var u=null===(i=t.tmodel.childRuntimePrograms[s])||void 0===i?void 0:i[l];if(!u)return delete o.loopTargets[l],t.completeIfReady(s),0;var c=t.runningLoops.get(o);if(c||(c=new Set,t.runningLoops.set(o,c)),c.has(l)||t.isTargetUpdating(s,u.targetName))return t.blockLoop(s,l),0;c.add(l),t.runTarget(s,u,l,"loop:".concat(l)).catch((function(e){console.error(e),delete o.loopTargets[l];var r=t.tmodel.childRuntimeStates.indexOf(o);r>=0&&t.completeIfReady(r)})).finally((function(){c.delete(l);var e=t.tmodel.childRuntimeStates.indexOf(o);e>=0&&t.queueBlockedLoops(e,u.targetName)}))};for(r.s();!(e=r.n()).done;)n()}catch(e){r.e(e)}finally{r.f()}}},{key:"runRuntimeTarget",value:(T=f(d().mark((function e(t,r,n){var i,a,o,s,u,c,h,f,v,p,g,m=arguments;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=m.length>3&&void 0!==m[3]?m[3]:"main",!(a=m.length>4?m[4]:void 0)()){e.next=4;break}return e.abrupt("return");case 4:if(o=this.tmodel.childHandles[t],s=r.target,u=r.targetName,c=this.getExecution(t,i,n)){e.next=28;break}if("function"!=typeof(h=s.value)){e.next=18;break}if(h=h.call(o),null===(f=h)||void 0===f||!f.then){e.next=16;break}return e.next=15,h;case 15:h=e.sent;case 16:if(!a()){e.next=18;break}return e.abrupt("return");case 18:if(!a()&&l.d.isDefined(h)){e.next=20;break}return e.abrupt("return");case 20:if(v=Array.isArray(h),p=o.actualValues[u],!((g=v?h:[l.d.isDefined(p)?p:h,h]).length<2)){e.next=26;break}return g.length&&(o.actualValues[u]=g[0]),e.abrupt("return");case 26:c={sequenceId:i,targetIndex:n,kind:"runtime",targetName:u,imperativeKey:r.imperativeKey,values:g,isValueList:v,pauseOn:s.pauseOn,segmentIndex:0,segmentReady:!1,step:0,segmentStartTime:0,waiting:!1,startTime:0,imperativeTarget:i.startsWith("imperative:")?{targetName:r.targetName,imperativeKey:r.imperativeKey,renderable:r.renderable,originalTargetName:r.originalTargetName,originalTargetIsParent:r.originalTargetIsParent,target:y({},r.target)}:void 0},this.setExecution(t,i,n,c);case 28:if(!(c.segmentIndex<c.values.length-1)){e.next=46;break}if(!c.cancelled&&!a()){e.next=31;break}return e.abrupt("return");case 31:if(c.segmentReady||this.prepareRenderSegment(c,r,o),!c.cancelled&&!a()){e.next=34;break}return e.abrupt("return");case 34:return e.next=36,this.animateExecution(t,c);case 36:if(!c.cancelled&&!a()){e.next=38;break}return e.abrupt("return");case 38:c.segmentIndex++,c.segmentReady=!1,c.step=0,c.segmentStartTime=0,c.waiting=!1,c.startTime=0,e.next=28;break;case 46:this.clearExecution(t,i,n);case 47:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return T.apply(this,arguments)})},{key:"getExecutionId",value:function(e,t){return"".concat(e,":").concat(t)}},{key:"getExecution",value:function(e,t,r){var n,i=this.tmodel.childRuntimeStates[e];return null==i||null===(n=i.executions)||void 0===n?void 0:n[this.getExecutionId(t,r)]}},{key:"setExecution",value:function(e,t,r,n){var i,a=this.tmodel.childRuntimeStates[e];a&&(null!==(i=a.executions)&&void 0!==i||(a.executions={}),a.executions[this.getExecutionId(t,r)]=n)}},{key:"clearExecution",value:function(e,t,r){var n=this.tmodel.childRuntimeStates[e];null!=n&&n.executions&&delete n.executions[this.getExecutionId(t,r)]}},{key:"runIntervalTarget",value:(m=f(d().mark((function e(t,r,n,i,a){var o,l;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.tmodel.childHandles[t],(l=this.getExecution(t,i,n))||(l={sequenceId:i,targetIndex:n,kind:"interval",targetName:r.targetName,interval:Math.max(0,Number(this.resolveOption(r.target.interval,o))||0),waiting:!1,startTime:0},this.setExecution(t,i,n,l)),e.next=5,Promise.race([this.waitForExecution(l),new Promise((function(e){l.cancelWait=e}))]);case 5:if(l.cancelWait=void 0,!a()&&!l.cancelled){e.next=8;break}return e.abrupt("return");case 8:this.clearExecution(t,i,n);case 9:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n,i){return m.apply(this,arguments)})},{key:"waitForExecution",value:(g=f(d().mark((function e(t){var r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.interval,t.waiting&&t.startTime>0?r=Math.max(0,t.interval-(l.d.now()-t.startTime)):(t.waiting=!0,t.startTime=l.d.now()),!(r>0)){e.next=5;break}return e.next=5,this.wait(r);case 5:t.waiting=!1,t.startTime=0;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"resolveInitialTargets",value:function(){for(var e=this.tmodel,t=!1,r=!1,n=0;n<e.childRuntimePrograms.length;n++){var a=e.childRuntimePrograms[n],o=e.childHandles[n];if(a&&o){var l,s=p(a);try{for(s.s();!(l=s.n()).done;){var c=l.value;if(!1===c.requiresRuntime&&i.D.affectsChildLayout(c.targetName)||c.requiresInitialResolution){var d=i.D.resolveValue(c.target,o),h=u.D.isTargetSpecObject(d)?d.value:d,f=Array.isArray(h)?h[0]:h;c.requiresInitialResolution&&(c.requiresInitialResolution=!1,c.initialResolvedValue=h),e.getChildValue(n,c.targetName)!==f&&e.setChildValue(n,c.targetName,f,!1)&&(i.D.affectsChildFlowLayout(c.targetName)&&(r=!0),t=!0)}}}catch(e){s.e(e)}finally{s.f()}}}return r&&e.invalidateLayout(),t}},{key:"runRenderTarget",value:(h=f(d().mark((function e(t,r,n,i,a){var o,s,u,c,h,f,v,p;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a()){e.next=2;break}return e.abrupt("return");case 2:if(o=this.tmodel,s=o.childHandles[t],u=r.target,c=r.targetName,h=this.getExecution(t,i,n)){e.next=15;break}if("main"===i&&l.d.hasProperty(r,"initialResolvedValue")?(f=r.initialResolvedValue,delete r.initialResolvedValue):"function"==typeof(f=u.value)&&(f=f.call(s)),v=Array.isArray(f),!a()){e.next=12;break}return e.abrupt("return");case 12:p=v?f:[o.getChildValue(t,c),f],h={sequenceId:i,targetIndex:n,kind:"render",targetName:c,imperativeKey:r.imperativeKey,values:p,isValueList:v,pauseOn:u.pauseOn,segmentIndex:0,segmentReady:!1,step:0,segmentStartTime:0,waiting:!1,startTime:0,imperativeTarget:i.startsWith("imperative:")?{targetName:r.targetName,imperativeKey:r.imperativeKey,renderable:r.renderable,originalTargetName:r.originalTargetName,originalTargetIsParent:r.originalTargetIsParent,target:y({},r.target)}:void 0},this.setExecution(t,i,n,h);case 15:if(!(h.segmentIndex<h.values.length-1)){e.next=33;break}if(!a()&&!h.cancelled){e.next=18;break}return e.abrupt("return");case 18:if(h.segmentReady||this.prepareRenderSegment(h,r,s),!a()&&!h.cancelled){e.next=21;break}return e.abrupt("return");case 21:return e.next=23,this.animateExecution(t,h);case 23:if(!a()&&!h.cancelled){e.next=25;break}return e.abrupt("return");case 25:h.segmentIndex++,h.segmentReady=!1,h.step=0,h.segmentStartTime=0,h.waiting=!1,h.startTime=0,e.next=15;break;case 33:this.clearExecution(t,i,n);case 34:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n,i){return h.apply(this,arguments)})},{key:"prepareRenderSegment",value:function(e,t,r){var n=t.target,i=e.segmentIndex;e.from=e.values[i],e.to=e.values[i+1],e.steps=Math.max(0,Number(this.resolveOption(n.steps,r,i))||0),e.interval=Math.max(0,Number(this.resolveOption(n.interval,r,i))||0),e.steps>0&&!e.interval&&(e.interval=8),e.easingName=this.resolveOption(n.easing,r,i),e.segmentReady=!0}},{key:"isTargetInLoop",value:function(e,t){var r=e.target.loop;return!0===("function"==typeof r?r.call(t,e.key):r)}},{key:"getTargetCycles",value:function(e,t,r){var n=e.target.cycles,i="function"==typeof n?n.call(t,r):n;return Math.max(1,Math.floor(Number(i)||1))}},{key:"completeIfReady",value:function(e){var t=this.tmodel.childRuntimeStates[e];t&&!t.done&&t.mainFinished&&(Object.values(t.loopTargets||{}).some(Boolean)||Object.keys(this.activeTargets[e]||{}).length>0||this.complete(e))}},{key:"resolveOption",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return"function"==typeof e?e.call(t,r):Array.isArray(e)?e.length?e[r%e.length]:void 0:e}},{key:"animateExecution",value:function(e,t){var r=this;return t.steps<=0?(this.setExecutionValue(e,t,t.to)&&"render"===t.kind&&this.tmodel.requestParticleRender(),Promise.resolve()):new Promise((function(n){t.index=e,t.resolve=n,r.activeRenderExecutions.add(t),r.requestAnimationFrame()}))}},{key:"setExecutionValue",value:function(e,t,r){if("render"===t.kind)return this.tmodel.setChildValue(e,t.targetName,r,!1);var n=this.tmodel.childHandles[e];return!(!n||n.actualValues[t.targetName]===r||(n.actualValues[t.targetName]=r,0))}},{key:"requestAnimationFrame",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=this;this.disposed||this.visibilityPaused||!this.tmodel.isVisible()||this.animationFrameRequested||(this.animationFrameRequested=!0,this.animationFrameId=requestAnimationFrame((function(){e.animationFrameId=void 0,e.animationFrameRequested=!1,e.disposed||e.updateRenderExecutions()})))}))},{key:"finishMainProgram",value:function(e,t){this.disposed||this.tmodel.childRuntimeStates[e]!==t||t.cancelled||(t.started=!1,t.mainFinished=!0,this.completeIfReady(e))}},{key:"updateRenderExecutions",value:function(){if(!this.disposed)if(this.tmodel.isVisible()){this.startQueuedPrograms(),this.startQueuedLoops();var e,t=l.d.now(),r=!1,a=!1,s=p(this.activeRenderExecutions);try{for(s.s();!(e=s.n()).done;){var u=e.value,c=this.tmodel.childHandles[u.index];if("function"==typeof u.pauseOn?u.pauseOn.call(c):!0===u.pauseOn){var d;u.segmentStartTime&&(null!==(d=u.pausedAt)&&void 0!==d||(u.pausedAt=t))}else{u.segmentStartTime?void 0!==u.pausedAt&&(u.segmentStartTime+=t-u.pausedAt,u.pausedAt=void 0):(u.segmentStartTime=t-u.step*u.interval,u.pausedAt=void 0);var h=t-u.segmentStartTime,f=u.interval>0?Math.min(Math.floor(h/u.interval),u.steps):u.steps;if(!(f<=u.step)){var v=u.easingName?n.G.easingFunction(u.easingName):void 0,g=f/u.steps,y=v?v(g):g,m=o.a.morph(u.targetName,u.from,u.to,y),b=this.setExecutionValue(u.index,u,m);if("render"===u.kind&&b&&i.D.affectsChildFlowLayout(u.targetName)&&(a=!0),"render"===u.kind&&(r||(r=b)),u.step=f,f>=u.steps){this.activeRenderExecutions.delete(u);var T=u.resolve;u.resolve=void 0,T()}}}}}catch(e){s.e(e)}finally{s.f()}a&&this.tmodel.invalidateLayout(),r&&this.tmodel.requestParticleRender(),(this.startQueueIndex<this.startQueue.length||this.loopQueue.length||this.activeRenderExecutions.size)&&this.requestAnimationFrame()}else this.pauseForVisibility()}},{key:"wait",value:function(e){var t,r=this;if(this.disposed)return Promise.resolve();var n=Math.max(0,Number(e)||0);if(0===n)return Promise.resolve();var i=4*Math.ceil((l.d.now()+n)/4);null!==(t=this.waitBuckets)&&void 0!==t||(this.waitBuckets=new Map);var a=this.waitBuckets.get(i);return a||((a={}).promise=new Promise((function(e){a.resolve=e,a.timeoutId=setTimeout((function(){r.waitBuckets.delete(i),e()}),Math.max(0,i-l.d.now()))})),this.waitBuckets.set(i,a)),a.promise}},{key:"findTargetIndex",value:function(e,t){var r=this.tmodel.childRuntimePrograms[e];if(!r)return-1;var n=i.D.getTargetName(t),a=r.findIndex((function(e){return!1!==e.requiresRuntime&&e.key===t}));return a>=0?a:r.findIndex((function(e){return!1!==e.requiresRuntime&&e.targetName===n&&"immediate"===e.mode}))}},{key:"runActivatedSequence",value:(c=f(d().mark((function e(t,r,n){var i;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.disposed){e.next=2;break}return e.abrupt("return");case 2:if(i=this.tmodel.childRuntimePrograms[t],!(this.disposed||!i||r<0||r>=i.length)){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,this.runTarget(t,i[r],r,n);case 7:if(!e.sent||this.disposed){e.next=11;break}return e.next=11,this.continueActivatedSequence(t,r+1,n);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return c.apply(this,arguments)})},{key:"setImperativeTarget",value:function(e,t,r,n,a,o,l,s){var c,d,h,f,v,p,g,m,b,T,w,k=this;if(!this.disposed){var S=this.tmodel.childHandles[e];if(S){var x=t.endsWith("+")?t:"".concat(t,"+"),E=u.D.isListTarget(r)?r:void 0,C=E?{value:E.list}:u.D.isTargetSpecObject(r)?y({},r):{value:r},M=u.D.isListTarget(C.value)?C.value:void 0,P=null!=E?E:M,D=P?P.list:C.value,O=null!==(c=null!==(d=null!==(h=C.steps)&&void 0!==h?h:null==P?void 0:P.steps)&&void 0!==d?d:n)&&void 0!==c?c:0,L=null!==(f=null!==(v=null!==(p=C.interval)&&void 0!==p?p:null==P?void 0:P.interval)&&void 0!==v?v:a)&&void 0!==f?f:0,A=null!==(g=null!==(m=C.easing)&&void 0!==m?m:null==P?void 0:P.easing)&&void 0!==g?g:o,j=null!==(b=null!==(T=C.cycles)&&void 0!==T?T:null==P?void 0:P.cycles)&&void 0!==b?b:1,I=null!==(w=C.pauseOn)&&void 0!==w?w:null==P?void 0:P.pauseOn,_={isImperative:!0,originalTargetName:l,originalTModel:s,status:"updating",value:D,steps:O||0,interval:L||0,easing:A,cycles:j};S.targetValues[x]=_,S.addToUpdatingTargets(x);var R={targetName:i.D.getTargetName(t),imperativeKey:x,renderable:i.D.isGpuTarget(t),originalTargetName:l,originalTargetIsParent:s===this.tmodel,target:{value:D,steps:O,interval:L,easing:A,cycles:j,pauseOn:I}},N="imperative:".concat(e,":").concat(x,":").concat(++this.imperativeSequenceCount),V=this.runTarget(e,R,0,N,_);return V.then((function(e){k.disposed||S.targetValues[x]!==_||(_.status=e?"done":"cancelled",S.removeFromUpdatingTargets(x),e&&k.queueImperativeCompletion(s,l))})),V}}}},{key:"queueImperativeCompletion",value:function(e,t){var r=this,n=this.tmodel.pendingImperativeCompletions;if(e&&t){var i=n.get(e);i||(i=new Set,n.set(e,i)),i.add(t)}void 0===this.imperativeCompletionFrame&&(this.imperativeCompletionFrame=requestAnimationFrame((function(){if(r.imperativeCompletionFrame=void 0,!r.disposed){var e=r.tmodel.pendingImperativeCompletions;r.tmodel.pendingImperativeCompletions=new Map;var t,n=p(e);try{for(n.s();!(t=n.n()).done;){var i,o=v(t.value,2),l=o[0],u=p(o[1]);try{for(u.s();!(i=u.n()).done;){var c=i.value;a.g.shouldActivateNextTarget(l,c,1,0,!0,"complete")}}catch(e){u.e(e)}finally{u.f()}}}catch(e){n.e(e)}finally{n.f()}(0,s.fB)().schedule(1,"gpuImperativeComplete-".concat(r.tmodel.oid))}})))}},{key:"activateTarget",value:function(e,t){var r,n,i=this,o=this.tmodel.childRuntimeStates[e],l=this.tmodel.childRuntimePrograms[e];if(!o||!l)return!1;var s=this.findTargetIndex(e,t);if(s<0)throw new Error('GPU child target "'.concat(t,'" cannot be activated because it is not in the child runtime program.'));var u=l[s];if(this.isIntervalTarget(u))throw new Error('GPU child target "'.concat(t,'" cannot be activated.'));var c="".concat(u.key,"-").concat(++o.activationCount),d="activation:".concat(c),h=null!==(n=(r=this.activeTargets)[e])&&void 0!==n?n:r[e]={};o.done&&(o.done=!1,this.tmodel.pendingGpuChildRuntimeCounts[o.originalTargetName]=(this.tmodel.pendingGpuChildRuntimeCounts[o.originalTargetName]||0)+1);var f=Promise.resolve().then((function(){return i.runActivatedSequence(e,s,d)})).catch((function(e){console.error(e)})).finally((function(){delete h[c],i.disposed||(i.completeIfReady(e),a.g.cleanupVisibleComplete(i.tmodel,o.originalTargetName))}));return h[c]=f,!0}},{key:"pauseForVisibility",value:function(){if(!this.disposed&&!this.visibilityPaused){this.visibilityPaused=!0;var e,t=l.d.now(),r=p(this.activeRenderExecutions);try{for(r.s();!(e=r.n()).done;){var n,i=e.value;i.segmentStartTime&&(null!==(n=i.pausedAt)&&void 0!==n||(i.pausedAt=t))}}catch(e){r.e(e)}finally{r.f()}void 0!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=void 0),this.animationFrameRequested=!1}}},{key:"resumeForVisibility",value:function(){!this.disposed&&this.tmodel.isVisible()&&(this.visibilityPaused=!1,this.resumeRestored(),this.startReady(),(this.startQueueIndex<this.startQueue.length||this.loopQueue.length||this.activeRenderExecutions.size)&&this.requestAnimationFrame(),(this.tmodel.particleValuesDirty||this.tmodel.activeChildTransitionKey)&&this.tmodel.requestParticleRender())}},{key:"dispose",value:function(){var e,t,r;if(!this.disposed){this.disposed=!0,void 0!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=void 0),this.animationFrameRequested=!1,this.startQueue.length=0,this.startQueueIndex=0,this.loopQueue.length=0,void 0!==this.imperativeCompletionFrame&&(cancelAnimationFrame(this.imperativeCompletionFrame),this.imperativeCompletionFrame=void 0);var n,i=p(this.tmodel.childRuntimeStates);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a){a.cancelled=!0;for(var o=0,l=Object.values(a.executions||{});o<l.length;o++)l[o].cancelled=!0}}}catch(e){i.e(e)}finally{i.f()}var s,u=p(this.activeRenderExecutions);try{for(u.s();!(s=u.n()).done;){var c=s.value;c.cancelled=!0;var d=c.resolve;c.resolve=void 0,null==d||d()}}catch(e){u.e(e)}finally{u.f()}this.activeRenderExecutions.clear();var h,f=p(null!==(t=null===(r=this.waitBuckets)||void 0===r?void 0:r.values())&&void 0!==t?t:[]);try{for(f.s();!(h=f.n()).done;){var v=h.value;clearTimeout(v.timeoutId),v.resolve()}}catch(e){f.e(e)}finally{f.f()}null===(e=this.waitBuckets)||void 0===e||e.clear()}}}],t&&k(e.prototype,t),r&&k(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,c,h,g,m,T,w,S,x}()},599:function(e,t,r){r.d(t,{G:function(){return j}});var n=r(255),i=r(611),a=r(969),o=r(720),l=r(138),s=r(494),u=r(690),c=r(333),d=r(34),h=r(855);function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=b(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t,r){return(t=C(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){return function(e){if(Array.isArray(e))return T(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(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 m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return T(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function w(e){return w="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},w(e)}function k(){k=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new A(n||[]);return i(o,"_invoke",{value:P(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};u(T,o,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(j([])));x&&x!==r&&n.call(x,o)&&(T=x);var E=b.prototype=y.prototype=Object.create(T);function C(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(i,a,o,l){var s=d(e[i],e,a);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==w(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function P(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var s=D(l,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var u=d(t,r,n);if("normal"===u.type){if(i=n.done?p:f,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=p,n.method="throw",n.arg=u.arg)}}}function D(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,D(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(w(t)+" is not iterable")}return m.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},C(M.prototype),u(M.prototype,l,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new M(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(E),u(E,s,"Generator"),u(E,o,(function(){return this})),u(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function S(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function x(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){S(a,n,i,o,l,"next",e)}function l(e){S(a,n,i,o,l,"throw",e)}o(void 0)}))}}function E(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,C(n.key),n)}}function C(e){var t=function(e,t){if("object"!=w(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==w(t)?t:t+""}function M(e,t,r){return t=L(t),function(e,t){if(t&&("object"==w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,P()?Reflect.construct(t,r||[],L(e).constructor):t.apply(e,r))}function P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(P=function(){return!!e})()}function D(e,t,r,n){var i=O(L(1&n?e.prototype:e),t,r);return 2&n?function(e){return i.apply(r,e)}:i}function O(){return O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=L(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},O.apply(null,arguments)}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}var j=function(e){function t(e,r,n){var i,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=M(this,t,[e,r,n,l])).childActualValues=[],i.childTargetMaps=[],i.particleValuesDirty=!1,i.particleRenderRequested=!1,i.childHandles=[],i.childTargetValues={},i.childTransitions={},i.pendingGpuChildren={},i.pendingImperativeCompletions=new Map,i.childRuntimePrograms=[],i.childRuntimeStates=[],i.pendingGpuChildRuntimeCounts={},i.activeChildTransitionKey=void 0,i.gpuChildrenEnabled=!1,i.childGeneration=0,i.layoutEpoch=0,i.completeLayoutEpoch=-1,i.layoutCompleteWaiters=[],i.particleSyncPromise=void 0,i.restoringParticleRuntime=!1,i.particleRuntime=new o.f(i),i.particleRenderer=new a.e(i),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(t,e),r=t,i=[{key:"onDomAvailable",value:(T=x(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.restoringParticleRuntime){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.syncParticleRenderer();case 4:e.sent&&this.particleRuntime.markPendingRenderReady();case 6:case"end":return e.stop()}}),e,this)}))),function(){return T.apply(this,arguments)})},{key:"restoreRuntimeDomDerivedState",value:(b=x(k().mark((function e(t){var r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.gpuChildrenEnabled&&this.hasDom()){e.next=3;break}return this.restoringParticleRuntime=!1,e.abrupt("return",!1);case 3:return r=!1,e.prev=4,e.next=7,this.waitForLayoutComplete();case 7:return e.next=9,this.syncParticleRenderer();case 9:if(r=e.sent){e.next=12;break}return e.abrupt("return",!1);case 12:if(!this.explodeChildrenState){e.next=18;break}return e.next=15,this.restoreExplodeTexture(t);case 15:if(r=e.sent){e.next=18;break}return e.abrupt("return",!1);case 18:return this.particleRuntime.markRenderReady(this.childHandles.map((function(e){return e.index}))),e.next=21,this.particleRenderer.waitForPresentedFrame();case 21:return e.prev=21,this.restoringParticleRuntime=!1,e.finish(21);case 24:return e.abrupt("return",r);case 25:case"end":return e.stop()}}),e,this,[[4,,21,24]])}))),function(e){return b.apply(this,arguments)})},{key:"restoreExplodeTexture",value:function(e){return this.explodeChildrenState?e?this.particleRenderer.setExplodeSource({bitmap:e}):Promise.resolve(!1):Promise.resolve(!0)}},{key:"disposeRuntimeDerivedState",value:function(){var e,t;null===(e=this.particleRuntime)||void 0===e||e.dispose(),null===(t=this.particleRenderer)||void 0===t||t.destroy()}},{key:"syncParticleRenderer",value:function(){var e=this;return this.particleSyncPromise||(this.particleSyncPromise=this.syncParticleRendererNow().finally((function(){e.particleSyncPromise=void 0}))),this.particleSyncPromise}},{key:"syncParticleRendererNow",value:(g=x(k().mark((function e(){var t,r,n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.gpuChildrenEnabled&&this.hasDom()){e.next=2;break}return e.abrupt("return",!1);case 2:if(!this.childHandles.length){e.next=7;break}return e.next=5,this.particleRenderer.setParticles(this.childHandles);case 5:e.next=9;break;case 7:return e.next=9,this.particleRenderer.init();case 9:if(t=this.activeChildTransitionKey){e.next=12;break}return e.abrupt("return",!0);case 12:if(r=c.g.getTargetName(t),n=this.childTransitions[r]){e.next=16;break}return e.abrupt("return",!0);case 16:return e.next=18,this.particleRenderer.setTargetParticles(n.values,n.steps,n.generation);case 18:return e.sent&&this.childTransitions[r]===n&&this.handleSpecialTargetStep(t),e.abrupt("return",!0);case 21:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"requestParticleRender",value:function(){var e=this;!this.restoringParticleRuntime&&this.gpuChildrenEnabled&&this.isVisible()&&this.hasDom()&&!this.particleRenderRequested&&(this.particleRenderRequested=!0,requestAnimationFrame((function(){e.particleRenderRequested=!1,e.isVisible()&&e.hasDom()&&(e.activeChildTransitionKey?e.particleRenderer.render():e.particleValuesDirty?(e.particleValuesDirty=!1,e.particleRenderer.updateParticles(e.childHandles)):e.particleRenderer.render())})))}},{key:"onVisibilityChange",value:function(e){this.restoringParticleRuntime||(e?this.particleRuntime.resumeForVisibility():this.particleRuntime.pauseForVisibility())}},{key:"getChildrenRenderer",value:function(){var e=this.targets[c.g.currentTargetName];return(null==e?void 0:e.renderer)||"auto"}},{key:"canRenderChildren",value:function(e){var t=this;return(e=Array.isArray(e)?e:[e]).length>0&&e.every((function(e){return!(!e||"object"!==w(e)||Array.isArray(e))&&Object.entries(e).every((function(e){var r=m(e,2),n=r[0],i=r[1],a=c.g.getTargetName(n);return n===a&&l.D.isGpuTarget(a)&&t.canRenderChildValue(i)}))}))}},{key:"canRenderChildValue",value:function(e){return"function"!=typeof e&&(!u.D.isTargetSpecObject(e)||"function"!=typeof e.value&&(!Array.isArray(e.value)||e.value.length>=2))}},{key:"affectsChildLayout",value:function(e){return l.D.affectsChildLayout(e)}},{key:"getChild",value:function(e){return this.gpuChildrenEnabled&&"number"==typeof e?this.childHandles[e]:D(t,"getChild",this,3)([e])}},{key:"getChildren",value:function(){var e=D(t,"getChildren",this,3)([]);return this.gpuChildrenEnabled?[].concat(y(e),y(this.childHandles)):e}},{key:"getChildValue",value:function(e,t){var r=this.childHandles[e];if(r){var n=l.D.getTargetName(t);return"x"!==n&&"y"!==n||r.allTargetMap[n]?r.actualValues[n]:r[n]}}},{key:"setChildTarget",value:function(e,t,r,n,i,a){var o,s=c.g.currentTargetName,d=c.g.currentTModel,h=l.D.getTargetName(t),f=this.childHandles[e];if(f){if(d&&s&&d!==this&&c.g.markChildAction(d,s,f),f.allTargetMap[h]=t,this.childTargetMaps[e]=f.allTargetMap,d===this&&"string"==typeof s&&s.endsWith("$$")&&this.targets[s]&&"done"!==(null===(o=this.targetValues[s])||void 0===o?void 0:o.status)){var v,g,y,m=c.g.getTargetName(s),b=null!==(g=(v=this.childTargetValues)[m])&&void 0!==g?g:v[m]=[],T=null!==(y=b[e])&&void 0!==y?y:b[e]={},w=u.D.isTargetSpecObject(r)?p({},r):{value:r};return void 0===w.steps&&void 0!==n&&(w.steps=n),void 0===w.interval&&void 0!==i&&(w.interval=i),void 0===w.easing&&void 0!==a&&(w.easing=a),void(T[h]=w)}this.particleRuntime.setImperativeTarget(e,h,r,n,i,a,s,d)}}},{key:"setChildValue",value:function(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=this.childHandles[e];if(!i)return!1;var a=l.D.getTargetName(t);return i.actualValues[a]!==r&&(i.actualValues[a]=r,l.D.isGpuTarget(a)&&(this.particleValuesDirty=!0),n&&this.affectsChildLayout(a)&&this.invalidateLayout(),!0)}},{key:"getChildTargetValues",value:function(e){return this.childTargetValues[c.g.getTargetName(e)]}},{key:"handleChildTargets",value:function(e,t){for(var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=c.g.getTargetName(e),a=Math.max(0,Number(n.steps)||0),o=[],s=!1,h=0;h<t.length;h++){var f=t[h],v=this.childHandles[h];if(f&&v){for(var p={index:h,target:{},steps:{},loops:{},valueLists:{}},g=0,y=Object.entries(f);g<y.length;g++){var b=m(y[g],2),T=b[0],w=b[1],k=l.D.getTargetName(T);if(l.D.isGpuTarget(k)){var S=m(u.D.getValueStepsCycles(v,k,w,0),2),x=S[0],E=S[1],C=d.d.isDefined(null==w?void 0:w.steps)||u.D.isValueStepsCycleArray(null==w?void 0:w.value)?E:a;u.D.isListTarget(x)?(p.valueLists[k]=x.list,p.target[k]=x.list[1]):p.target[k]=x,p.steps[k]=C,p.loops[k]=!0===(null==w?void 0:w.loop)}else{var M=m(u.D.getValueStepsCycles(v,k,w,0),2),P=M[0];M[1]||(this.setChildValue(h,k,P),s=!0)}}Object.keys(p.target).length&&o.push(p)}}if(!o.length)return!!s&&(delete this.childTargetValues[i],{handled:!0,steps:0});var D=this.getChildrenSegmentCount(o),O=this.buildChildTransitionSegment(o,0,a);if(this.commitImmediateChildTransitionValues(o,O.values,O.steps),!O.hasSegment||0===O.maxSteps)return this.commitChildTransitionSegment(o,O.values,O.steps),delete this.childTargetValues[i],this.particleValuesDirty=!0,this.requestParticleRender(),{handled:!0,steps:0};var L={children:o,segmentIndex:0,segmentCount:D,defaultSteps:a,initialValues:O.initialValues,values:O.values,steps:O.steps,loops:O.loops,hasLoop:O.hasLoop,generation:this.childGeneration};return this.childTransitions[i]=L,this.activeChildTransitionKey=e,this.addChildTransitionLayoutTargets(L),this.hasDom()&&this.particleRenderer.setTargetParticles(O.values,O.steps,L.generation).then((function(t){t&&r.childTransitions[i]===L&&r.handleSpecialTargetStep(e)})),{handled:!0,steps:O.maxSteps}}},{key:"commitChildTransitionSegment",value:function(e,t,r){var n,i=f(e);try{for(i.s();!(n=i.n()).done;){var a=n.value.index,o=this.childHandles[a],s=null==r?void 0:r[a];if(o&&s){for(var u=!1,c=0,d=Object.keys(s);c<d.length;c++){var h,v=d[c];o.actualValues[v]=null===(h=t[a])||void 0===h?void 0:h[v],l.D.affectsChildLayout(v)&&(o.removeFromNoDomUpdatingTargets(v),u=!0)}u&&(o.actualValues.isVisible=o.calcVisibility())}}}catch(e){i.e(e)}finally{i.f()}}},{key:"canBatchChildTarget",value:function(e,t){return!(!l.D.isGpuTarget(e)||!u.D.isTargetSpecObject(t))&&void 0===t.interval&&void 0===t.easing&&void 0===t.pauseOn&&void 0===t.loop&&void 0===t.cycles&&!(void 0!==t.steps&&(!Number.isFinite(t.steps)||t.steps<0))&&("backgroundColor"===e?"string"==typeof t.value:"number"==typeof t.value&&Number.isFinite(t.value))}},{key:"handleSpecialTarget",value:function(e){if(!this.gpuChildrenEnabled)return!1;var t=c.g.getTargetName(e),r=this.childTargetValues[t];if(!r)return!1;delete this.childTargetValues[t];for(var n=0;n<r.length;n++)for(var i=0,a=Object.entries(r[n]||{});i<a.length;i++){var o=m(a[i],2),l=o[0],s=o[1];this.particleRuntime.setImperativeTarget(n,l,s,void 0,void 0,void 0,e,this)}return!1}},{key:"getRenderScrollLeft",value:function(){var e;return(null===(e=this.$dom)||void 0===e?void 0:e.getScrollLeft())||this.getScrollLeft()||0}},{key:"getRenderScrollTop",value:function(){var e;return(null===(e=this.$dom)||void 0===e?void 0:e.getScrollTop())||this.getScrollTop()||0}},{key:"addChild",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.addedChildren.length+this.allChildrenList.length;if(e&&"object"===w(e)&&!(e instanceof n.c)&&l.D.isChildrenTarget(c.g.currentTargetName)){var i=this.getChildrenRenderer();if("dom"!==i){var a=d.d.cloneTargetDefinition(e);if("gpu"===i||this.canRenderChildren(a))return this.addGpuChild(a),this}}return D(t,"addChild",this,3)([e,r])}},{key:"addGpuChild",value:function(e){var t=c.g.currentTargetName,r=this.childHandles.length;this.gpuChildrenEnabled=!0;var n=new s.$(this,r);this.childHandles[r]=n,this.childActualValues[r]=n.actualValues,this.childTargetMaps[r]=n.allTargetMap;try{var i,a,o=this.prepareInitialGpuChildRuntime(l.D.compileChildDefinition(n,e),e),u=this.createGpuChild(o.renderDefinition);return u?(Object.assign(n.actualValues,u.initial),this.childActualValues[r]=n.actualValues,this.childTargetMaps[r]=n.allTargetMap,this.particleRuntime.registerChild(r,t,o),(null!==(a=(i=this.pendingGpuChildren)[t])&&void 0!==a?a:i[t]={key:t,children:[]}).children.push(p({index:r},u)),this.childGeneration++,this.childrenUpdateFlag=!0,this.markLayoutDirty("addGpuChild"),!0):(this.childHandles.pop(),this.childActualValues.pop(),this.childTargetMaps.pop(),!1)}catch(e){throw this.childHandles.pop(),this.childActualValues.pop(),this.childTargetMaps.pop(),this.childRuntimePrograms.pop(),this.childRuntimeStates.pop(),e}}},{key:"prepareInitialGpuChildRuntime",value:function(e,t){for(var r=function(){var t=m(i[n],2),r=t[0],a=t[1];if(c.g.getTargetName(r)!==r||!u.D.isTargetSpecObject(a)||!l.D.isGpuTarget(r))return 0;var o=a.value,s=Array.isArray(o)&&o.length>1,h=a.steps,f=Array.isArray(h)?h.some((function(e){return Number(e)>0})):Number(h)>0;if(!s&&!f)return 0;if("function"==typeof o)return 0;var v=l.D.getTargetName(r),g=d.d.isDefined(a.initialValue)?a.initialValue:s?o[0]:o,y=e.runtimeTargets.find((function(e){return e.key===r&&"immediate"===e.mode}));e.renderDefinition[v]=g,y?(y.requiresRuntime=!0,y.requiresInitialResolution=!1,y.renderable=!0,y.target=p({},a)):e.runtimeTargets.push({key:r,targetName:v,mode:"immediate",target:p({},a),requiresRuntime:!0,requiresInitialResolution:!1,renderable:!0})},n=0,i=Object.entries(t);n<i.length;n++)r();return e}},{key:"removeChild",value:function(e){if(!(this.gpuChildrenEnabled&&e instanceof s.$))return D(t,"removeChild",this,3)([e]);var r=this.childHandles.indexOf(e);if(!(r<0)){this.particleRuntime.removeChild(r),this.childHandles.splice(r,1),this.childActualValues.splice(r,1),this.childTargetMaps.splice(r,1),this.removeChildFromTransitions(r);for(var n=0,i=Object.values(this.childTargetValues);n<i.length;n++){var a=i[n];null==a||a.splice(r,1)}e.index=-1;for(var o=r;o<this.childHandles.length;o++)this.childHandles[o].index=o;return this.childGeneration++,this.particleValuesDirty=!0,this.invalidateLayout(),this.markLayoutDirty("removeGpuChild"),this.requestParticleRender(),this}}},{key:"removeChildFromTransitions",value:function(e){for(var t=0,r=Object.values(this.childTransitions);t<r.length;t++){var n,i,a,o,l=r[t];if(null===(n=l.initialValues)||void 0===n||n.splice(e,1),null===(i=l.values)||void 0===i||i.splice(e,1),null===(a=l.steps)||void 0===a||a.splice(e,1),null===(o=l.loops)||void 0===o||o.splice(e,1),l.children){l.children=l.children.filter((function(t){return t.index!==e}));var s,u=f(l.children);try{for(u.s();!(s=u.n()).done;){var c=s.value;c.index>e&&c.index--}}catch(e){u.e(e)}finally{u.f()}}}for(var d=0,h=Object.values(this.pendingGpuChildren);d<h.length;d++){var v=h[d];if(null!=v&&v.children){v.children=v.children.filter((function(t){return t.index!==e}));var p,g=f(v.children);try{for(g.s();!(p=g.n()).done;){var y=p.value;y.index>e&&y.index--}}catch(e){g.e(e)}finally{g.f()}}}}},{key:"isTargetEnabled",value:function(e){var r=this.targets[e];return!(l.D.isChildrenTarget(e)&&!0===(null==r?void 0:r.waitForChildren)&&this.isExecuted(e)&&this.particleRuntime.hasPending(e))&&D(t,"isTargetEnabled",this,3)([e])}},{key:"activateGpuChildTarget",value:function(e,t){return this.particleRuntime.activateTarget(e,t)}},{key:"createGpuChild",value:function(e){for(var t={},r={},n={},i={},a={},o=!1,l=0,s=Object.entries(e);l<s.length;l++){var u,c=m(s[l],2),d=c[0],h=c[1],f=this.resolveInitialChildProperty(h);if(!f)return;t[d]=f.initialValue,r[d]=f.targetValue,void 0!==f.steps&&(n[d]=f.steps),f.valueList&&(a[d]=f.valueList),f.loop&&(i[d]=!0),((null===(u=f.valueList)||void 0===u?void 0:u.length)>1||f.initialValue!==f.targetValue)&&(o=!0)}return{initial:t,target:r,steps:n,loops:i,valueLists:a,hasTransition:o}}},{key:"finalizeChildrenTarget",value:function(e){var t=this;if(!l.D.isChildrenTarget(e)&&!u.D.isExplodeChildrenTarget(e))return!1;var r=this.pendingGpuChildren[e];if(null==r||!r.children.length)return!1;this.invalidateLayout(),delete this.pendingGpuChildren[e];var n,i=r.children.map((function(e){return e.index})),a=i.filter((function(e){var r=t.childRuntimeStates[e];return r&&!r.done})),o=f(a);try{for(o.s();!(n=o.n()).done;){var s=n.value;this.particleRuntime.queueStart(s)}}catch(e){o.e(e)}finally{o.f()}if(this.hasDom()){var c=this.particleRenderer.setParticles(this.childHandles);(u.D.isExplodeChildrenTarget(e)&&this.explodeCapturePromise?Promise.all([c,this.explodeCapturePromise]):Promise.all([c])).then((function(e){e.some((function(e){return!0!==e}))||t.particleRuntime.markRenderReady(i)})).catch((function(e){return console.error(e)}))}return{handled:!0,steps:0}}},{key:"addChildTransitionLayoutTargets",value:function(e){var t,r=f(e.children);try{for(r.s();!(t=r.n()).done;){var n,i=t.value.index,a=this.childHandles[i],o=null===(n=e.steps)||void 0===n?void 0:n[i];if(a&&o)for(var s=0,u=Object.entries(o);s<u.length;s++){var c=m(u[s],2),d=c[0];c[1]>0&&l.D.affectsChildLayout(d)&&a.addToNoDomUpdatingTargets(d)}}}catch(e){r.e(e)}finally{r.f()}}},{key:"catchupChildLayoutTargets",value:function(e){var t,r,n,i;if(null==e||null===(t=e.noDomUpdatingTargets)||void 0===t||!t.size||e.index<0)return!1;var a=this.activeChildTransitionKey;if(!a)return!1;var o=c.g.getTargetName(a),s=this.childTransitions[o];if(!s||s.generation!==this.childGeneration)return!1;var u=e.index,h=null===(r=s.initialValues)||void 0===r?void 0:r[u],f=null===(n=s.values)||void 0===n?void 0:n[u],v=null===(i=s.steps)||void 0===i?void 0:i[u];if(!h||!f||!v)return!1;for(var p=Math.max(0,Number(this.getTargetStep(a))||0),g=!1,m=0,b=y(e.noDomUpdatingTargets);m<b.length;m++){var T=b[m];if(l.D.affectsChildLayout(T)){var w=h[T],k=f[T],S=Math.max(0,Number(v[T])||0);if(d.d.isDefined(w)&&d.d.isDefined(k)){var x=0===S?1:Math.min(1,p/S),E=w+(k-w)*x;e.actualValues[T]!==E&&(e.actualValues[T]=E,g=!0),1===x&&e.removeFromNoDomUpdatingTargets(T)}else e.removeFromNoDomUpdatingTargets(T)}else e.removeFromNoDomUpdatingTargets(T)}return g}},{key:"advanceChildTransitionSegment",value:function(e,t){var r=this;if(!(t&&Array.isArray(t.children)&&Number.isInteger(t.segmentIndex)&&Number.isInteger(t.segmentCount)))return!1;var n=t.segmentIndex+1;if(n>=t.segmentCount)return!1;this.commitChildTransitionSegment(t.children,t.values,t.steps),this.particleRenderer.completeTransition();var i=this.buildChildTransitionSegment(t.children,n,t.defaultSteps);t.segmentIndex=n,t.initialValues=i.initialValues,t.values=i.values,t.steps=i.steps,t.loops=i.loops,this.commitImmediateChildTransitionValues(t.children,i.values,i.steps),this.addChildTransitionLayoutTargets(t);var a=this.targetValues[e];return a&&(a.steps=i.maxSteps),this.resetTargetStep(e),this.resetTargetInitialValue(e),this.setTargetStatus(e,"updating"),this.hasDom()&&this.particleRenderer.setTargetParticles(i.values,i.steps,t.generation).then((function(n){n&&r.childTransitions[c.g.getTargetName(e)]===t&&r.handleSpecialTargetStep(e)})),!0}},{key:"buildChildTransitionSegment",value:function(e,t,r){var n,i=new Array(this.childHandles.length),a=this.childHandles.map((function(e){return null==e?void 0:e.actualValues})),o=new Array(this.childHandles.length),l=new Array(this.childHandles.length),s=0,u=!1,c=!1,d=f(e);try{for(d.s();!(n=d.n()).done;){var h=n.value,v=h.index,g=this.childHandles[v];if(g){for(var y=p(p({},g.actualValues),{},{x:this.getChildValue(v,"x"),y:this.getChildValue(v,"y")}),m=void 0,b=void 0,T=void 0,w=void 0,k=0,S=Object.keys(h.target);k<S.length;k++){var x=S[k],E=h.valueLists[x],C=void 0;if(E){if(t>=E.length-1)continue;C=E[t+1]}else{if(0!==t||y[x]===h.target[x])continue;C=h.target[x]}var M=this.getChildPropertySteps(h,x,t,r);m||(m={}),b||(b=p({},y)),T||(T={}),w||(w={}),m[x]=y[x],b[x]=C,T[x]=M,w[x]=!0===h.loops[x],s=Math.max(s,M),u=!0,w[x]&&(c=!0)}b&&(i[v]=m,a[v]=b,o[v]=T,l[v]=w)}}}catch(e){d.e(e)}finally{d.f()}return{initialValues:i,values:a,steps:o,loops:l,maxSteps:s,hasSegment:u,hasLoop:c}}},{key:"getChildPropertySteps",value:function(e,t,r,n){var i=e.steps[t];return Array.isArray(i)?i.length?Math.max(0,Number(i[r%i.length])||0):n:void 0!==i?Math.max(0,Number(i)||0):n}},{key:"getChildSegmentCount",value:function(e){for(var t=0,r=0,n=Object.values(e.valueLists);r<n.length;r++){var i=n[r];t=Math.max(t,i.length-1)}return t}},{key:"getChildrenSegmentCount",value:function(e){var t,r=0,n=f(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;r=Math.max(r,this.getChildSegmentCount(i))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"getActiveChildTransition",value:function(){if(this.activeChildTransitionKey){var e=c.g.getTargetName(this.activeChildTransitionKey);return this.childTransitions[e]}}},{key:"handleSpecialTargetStep",value:function(e){var t=c.g.getTargetName(e),r=this.childTransitions[t];return!(!r||r.generation!==this.childGeneration||(this.isVisible()&&this.particleRenderer.setTransitionStep(this.getTargetStep(e)),0))}},{key:"handleSpecialTargetEnd",value:function(e){var t=c.g.getTargetName(e),r=this.childTransitions[t];return!(!r||(r.generation!==this.childGeneration?(this.particleRenderer.completeTransition(),delete this.childTransitions[t],delete this.childTargetValues[t],this.activeChildTransitionKey===e&&(this.activeChildTransitionKey=void 0),this.particleValuesDirty=!0,this.requestParticleRender(),0):!this.advanceChildTransitionSegment(e,r)&&(r.hasLoop?(this.restartChildTransition(e,r),0):(this.commitChildTransitionSegment(r.children,r.values,r.steps),this.particleRenderer.completeTransition(),delete this.childTransitions[t],delete this.childTargetValues[t],this.activeChildTransitionKey===e&&(this.activeChildTransitionKey=void 0),0))))}},{key:"resolveInitialChildProperty",value:function(e){if(!u.D.isTargetSpecObject(e))return{initialValue:e,targetValue:e,valueList:void 0,steps:void 0,loop:!1};var t=e.value,r=Array.isArray(e.steps)?e.steps.map((function(e){return Math.max(0,Number(e)||0)})):void 0!==e.steps?Math.max(0,Number(e.steps)||0):void 0,n=!0===e.loop;if(Array.isArray(t)){if(t.length<2)return;return{initialValue:t[0],targetValue:t[1],valueList:y(t),steps:r,loop:n}}return{initialValue:t,targetValue:t,valueList:void 0,steps:0,loop:n}}},{key:"restartChildTransition",value:function(e,t){return!(null==t||!t.hasLoop||(this.resetTargetStep(e),this.resetTargetInitialValue(e),this.setTargetStatus(e,"updating"),this.addChildTransitionLayoutTargets(t),this.handleSpecialTargetStep(e),0))}},{key:"shouldBeBracketed",value:function(){return!this.gpuChildrenEnabled&&D(t,"shouldBeBracketed",this,3)([])}},{key:"shouldCalculateChildren",value:function(){return this.gpuChildrenEnabled?this.getDirtyLayout()||this.completeLayoutEpoch!==this.layoutEpoch||this.hasLayoutStateChanged()?D(t,"shouldCalculateChildren",this,3)([]):(this.currentStatus=void 0,this.requestParticleRender(),!1):D(t,"shouldCalculateChildren",this,3)([])}},{key:"getLayoutState",value:function(){return[this.getWidth(),this.getHeight(),this.val("gap"),this.getPaddingTop(),this.getPaddingRight(),this.getPaddingBottom(),this.getPaddingLeft(),this.getContainerOverflowMode()]}},{key:"markLayoutComplete",value:function(e){var t=this;if(e===this.layoutEpoch)if(this.completeLayoutEpoch=e,this.completeLayoutState=this.getLayoutState(),this.particleRuntime.resolveInitialTargets()&&(this.requestParticleRender(),this.completeLayoutEpoch!==this.layoutEpoch))(0,h.fB)().schedule(0,"particleInitialTargets-".concat(this.oid));else{this.particleRenderer.updateCanvasLayerWidthHeight(),this.resolveLayoutCompleteWaiters(),this.particleRuntime.startReady();var r=this.activeChildTransitionKey;if(r){var n=c.g.getTargetName(r),i=this.childTransitions[n];if(i){for(var a=["x","y","width","height"],o=0;o<this.childHandles.length;o++){var l,s,u,v=this.childHandles[o];if(v){var g=i.values[o];g&&g!==v.actualValues||(g=p({},v.actualValues),i.values[o]=g);var y,m=null!==(u=(l=i.steps)[s=o])&&void 0!==u?u:l[s]={},b=f(a);try{for(b.s();!(y=b.n()).done;){var T=y.value;if(!Object.prototype.hasOwnProperty.call(m,T)){var w=this.getChildValue(o,T);d.d.isDefined(w)&&(g[T]=w,m[T]=0)}}}catch(e){b.e(e)}finally{b.f()}}}i.generation===this.childGeneration&&!this.restoringParticleRuntime&&this.hasDom()&&this.particleRenderer.setTargetParticles(i.values,i.steps,i.generation).then((function(e){e&&t.activeChildTransitionKey===r&&t.childTransitions[n]===i&&i.generation===t.childGeneration&&t.handleSpecialTargetStep(r)}))}}}}},{key:"commitImmediateChildTransitionValues",value:function(e,t,r){var n,i=!1,a=f(e);try{for(a.s();!(n=a.n()).done;){var o=n.value.index,s=this.childHandles[o],u=null==r?void 0:r[o];if(s&&u){for(var c=!1,d=0,h=Object.entries(u);d<h.length;d++){var v,p=m(h[d],2),g=p[0];if(0===p[1]){var y=null===(v=t[o])||void 0===v?void 0:v[g];s.actualValues[g]!==y&&(s.actualValues[g]=y,i=!0,l.D.affectsChildLayout(g)&&(c=!0))}}c&&(s.actualValues.isVisible=s.calcVisibility())}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"hasLayoutStateChanged",value:function(){var e=this.getLayoutState(),t=this.completeLayoutState;return!t||e.length!==t.length||e.some((function(e,r){return e!==t[r]}))}},{key:"invalidateLayout",value:function(){this.layoutEpoch++}},{key:"getParticleCount",value:function(){return this.childHandles.length}},{key:"getRuntimeSnapshotFields",value:function(){return{childHandleRuntimeStates:this.childHandles.map((function(e){return{x:e.x,y:e.y,targets:e.targets,targetValues:e.targetValues,updatingTargetList:y(e.updatingTargetList),activeTargetList:y(e.activeTargetList),activatedTargets:y(e.activatedTargets),noDomUpdatingTargets:e.noDomUpdatingTargets?new Set(e.noDomUpdatingTargets):void 0,pendingTargets:e.pendingTargets}}))}}},{key:"excludeRuntimeSnapshotField",value:function(e){return l.D.isTransientRuntimeField(e)}},{key:"restoreRuntimeDerivedState",value:function(){var e=this;this.particleRenderer.destroy(),this.childActualValues||(this.childActualValues=[]),this.childTargetMaps||(this.childTargetMaps=[]);var t=this.childHandleRuntimeStates||[];this.childHandles=this.childActualValues.map((function(r,n){var i,a,o=new s.$(e,n),l=e.childTargetMaps[n]||{},u=t[n];if(Object.assign(o.actualValues,r),Object.assign(o.allTargetMap,l),o.x=null!==(i=null==u?void 0:u.x)&&void 0!==i?i:o.x,o.y=null!==(a=null==u?void 0:u.y)&&void 0!==a?a:o.y,u){var c,d,h;Object.assign(o.targets,u.targets),Object.assign(o.targetValues,u.targetValues);var v,p=f(u.updatingTargetList||[]);try{for(p.s();!(v=p.n()).done;){var g=v.value;o.updatingTargetList.push(g),o.updatingTargetMap[g]=!0}}catch(e){p.e(e)}finally{p.f()}(c=o.activeTargetList).push.apply(c,y(u.activeTargetList||[])),(d=o.activatedTargets).push.apply(d,y(u.activatedTargets||[])),o.noDomUpdatingTargets=u.noDomUpdatingTargets?new Set(u.noDomUpdatingTargets):void 0,o.pendingTargets=null!==(h=u.pendingTargets)&&void 0!==h&&h}return e.childActualValues[n]=o.actualValues,e.childTargetMaps[n]=o.allTargetMap,o})),delete this.childHandleRuntimeStates,this.childGeneration=Number.isInteger(this.childGeneration)?this.childGeneration:0,this.particleValuesDirty=!1,this.particleRenderRequested=!1,this.pendingGpuChildren={},this.layoutEpoch=0,this.completeLayoutEpoch=-1,this.completeLayoutState=void 0,this.layoutCompleteWaiters=[],this.particleSyncPromise=void 0,this.restoringParticleRuntime=!0,this.particleRuntime=new o.f(this),this.particleRuntime.prepareRestore(),this.particleRenderer=new a.e(this)}},{key:"waitForLayoutComplete",value:function(){var e=this;return this.completeLayoutEpoch===this.layoutEpoch?Promise.resolve():new Promise((function(t){e.layoutCompleteWaiters.push(t)}))}},{key:"resolveLayoutCompleteWaiters",value:function(){var e,t=f(this.layoutCompleteWaiters.splice(0));try{for(t.s();!(e=t.n()).done;)(0,e.value)()}catch(e){t.e(e)}finally{t.f()}}}],i&&E(r.prototype,i),v&&E(r,v),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i,v,g,b,T}(n.c);i.E.register((function(e){if(!e)return!1;for(var t=0,r=Object.entries(e);t<r.length;t++){var n=m(r[t],2),i=n[0],a=n[1];if(u.D.isExplodeChildrenTarget(i)){if("dom"!==(null==a?void 0:a.renderer))return!0}else if(l.D.isChildrenTarget(i)&&a&&"object"===w(a)){if("gpu"===a.renderer)return!0;if("dom"!==a.renderer&&d.d.isDefined(a.instances))return!0}}return!1}),(function(e,t,r){return new j(e,t,r,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{})}))},138:function(e,t,r){r.d(t,{D:function(){return g}});var n=r(690),i=r(333),a=r(34);function o(e){return o="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},o(e)}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){v(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function v(e,t,r){return(t=p(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}var g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,o=[{key:"affectsChildLayout",value:function(t){return["x","y","width","height"].includes(e.getTargetName(t))}},{key:"affectsChildFlowLayout",value:function(t){return["width","height"].includes(e.getTargetName(t))}},{key:"isChildrenTarget",value:function(t){return e.childrenTargets.has(i.g.getTargetName(t))}},{key:"getTargetName",value:function(t){var r=i.g.getTargetName(t);return e.gpuRenderAliases[r]||r}},{key:"isGpuTarget",value:function(t){return e.gpuRenderTargets.has(e.getTargetName(t))}},{key:"getTargetMode",value:function(e){return e.endsWith("$$")?"deferred":e.endsWith("$")?"reactive":"immediate"}},{key:"isTransientRuntimeField",value:function(t){return e.transientRuntimeFields.has(t)}},{key:"isFunctionBasedTarget",value:function(e){return"function"==typeof e||n.D.isTargetSpecObject(e)&&"function"==typeof e.value}},{key:"resolveValue",value:function(t,r){if("function"==typeof t)return e.resolveValue(t.call(r),r);if(!n.D.isTargetSpecObject(t))return t;var i=h({},t);return"function"==typeof i.value&&(i.value=e.resolveValue(i.value.call(r),r)),i}},{key:"getInitialValue",value:function(e){return n.D.isValueStepsCycleArray(e)?e[0]:n.D.isTargetSpecObject(e)?Array.isArray(e.value)?e.value[0]:e.value:e}},{key:"setInitialValue",value:function(e,t,r){e&&a.d.isDefined(r)&&e.val(t,r)}},{key:"requiresRuntime",value:function(t,r){var i=e.getTargetMode(t);return!(e.isGpuTarget(t)&&!n.D.isIntervalTarget(r))||"immediate"!==i||!!n.D.isValueStepsCycleArray(r)||!!n.D.isTargetSpecObject(r)&&("function"==typeof r.value||"function"==typeof r.steps||a.d.isDefined(r.interval)||a.d.isDefined(r.easing)||a.d.isDefined(r.cycles)||a.d.isDefined(r.loop)||a.d.isDefined(r.pauseOn))}},{key:"compileChildDefinition",value:function(t,r){var o,u={},c=[],d=Object.entries(r).map((function(t){var r=s(t,2),n=r[0],i=r[1];return{key:n,target:i,mode:e.getTargetMode(n),targetName:e.getTargetName(n),requiresRuntime:e.requiresRuntime(n,i)}})),f=l(d);try{for(f.s();!(o=f.n()).done;){var v=o.value,p=i.g.getTargetName(v.key);t.allTargetMap[p]=v.key}}catch(e){f.e(e)}finally{f.f()}var g,y=l(d);try{for(y.s();!(g=y.n()).done;){var m=g.value;if("immediate"===m.mode&&!e.isFunctionBasedTarget(m.target)){var b=e.resolveValue(m.target,t),T=e.getInitialValue(b);e.setInitialValue(t,m.targetName,T),e.isGpuTarget(m.key)&&!m.requiresRuntime&&(u[m.targetName]=b)}}}catch(e){y.e(e)}finally{y.f()}var w,k=l(d);try{for(k.s();!(w=k.n()).done;){var S=w.value;if("immediate"===S.mode&&e.isGpuTarget(S.key)&&e.isFunctionBasedTarget(S.target)){var x=e.resolveValue(S.target,t);if(S.requiresRuntime=e.requiresRuntime(S.key,x),S.requiresRuntime){var E=e.getInitialValue(x);a.d.isDefined(E)&&(u[S.targetName]=E,e.setInitialValue(t,S.targetName,E))}else{u[S.targetName]=x,e.setInitialValue(t,S.targetName,e.getInitialValue(x));var C=n.D.isTargetSpecObject(x)?x.value:x;e.affectsChildLayout(S.targetName)&&!Array.isArray(C)&&c.push({key:S.key,targetName:S.targetName,mode:S.mode,target:n.D.isTargetSpecObject(S.target)?h({},S.target):{value:S.target},requiresRuntime:!1,requiresInitialResolution:!1,renderable:!0})}}}}catch(e){k.e(e)}finally{k.f()}var M,P=l(d);try{for(P.s();!(M=P.n()).done;){var D=M.value;if(D.requiresRuntime){var O="immediate"===D.mode&&e.isGpuTarget(D.key)&&e.isFunctionBasedTarget(D.target),L={key:D.key,targetName:D.targetName,mode:D.mode,target:n.D.isTargetSpecObject(D.target)?h({},D.target):{value:D.target},requiresRuntime:!0,requiresInitialResolution:O,renderable:e.isGpuTarget(D.key)};if(c.push(L),e.isGpuTarget(D.key)&&"immediate"===D.mode&&!e.isFunctionBasedTarget(D.target)){var A=e.resolveValue(D.target,t),j=e.getInitialValue(A);u[D.targetName]=j,e.setInitialValue(t,D.targetName,j)}}}}catch(e){P.e(e)}finally{P.f()}return{renderDefinition:u,runtimeTargets:c}}}],(r=null)&&f(t.prototype,r),o&&f(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}();v(g,"gpuRenderTargets",new Set(["x","y","width","height","borderRadius","backgroundColor","rotate","opacity","scale","image"])),v(g,"gpuRenderAliases",{background:"backgroundColor"}),v(g,"childrenTargets",new Set(["addChildren","children"])),v(g,"transientRuntimeFields",new Set(["particleRenderer","childHandles","particleValuesDirty","particleRenderRequested","pendingGpuChildren","explodeCapturePromise","layoutEpoch","completeLayoutEpoch","completeLayoutState","layoutCompleteWaiters","particleSyncPromise","restoringParticleRuntime"]))},161:function(e,t,r){r.d(t,{O:function(){return h}});var n=r(34),i=r(855);function a(e){return a="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},a(e)}function o(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(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 l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function d(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,a=[{key:"scheduleExecution",value:function(e,t){var r=e.getTargetInterval(t),i=n.d.now();if(r<=0)return 0;if(e.isTargetImperative(t)&&0===e.getTargetStep(t))return e.setScheduleTimeStamp(t,i),0;var a=e.getScheduleRemainingTime(t);if(n.d.isDefined(a))return e.setScheduleTimeStamp(t,i-Math.max(r-a,0)),e.resetScheduleRemainingTime(t),a;var o=e.getScheduleTimeStamp(t);if(n.d.isDefined(o)){var l=i-o;return Math.max(r-l,0)}return e.setScheduleTimeStamp(t,i),r}},{key:"getSchedulingKeys",value:function(e){for(var t=[],r=0,i=Object.entries(e.targetValues);r<i.length;r++){var a=l(i[r],2),o=a[0],s=a[1];(n.d.isDefined(s.scheduleTimeStamp)||n.d.isDefined(s.scheduleRemainingTime))&&t.push(o)}return t}},{key:"pauseResumeSchedule",value:function(t){var r,a;if("BI"!==t.type){var l=e.getSchedulingKeys(t);if(l.length||t.animatingMap){var u=new Set(null!==(r=null===(a=t.animatingMap)||void 0===a?void 0:a.keys())&&void 0!==r?r:[]),c=new Set([].concat(o(l),o(u)));if(c.size){var d,h=new Set,f=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}(c);try{for(f.s();!(d=f.n()).done;){var v=d.value;if(e.shouldPauseTarget(t,v)){var p;n.d.isDefined(t.getScheduleTimeStamp(v))&&e.pauseSchedule(t,v),null!==(p=t.animatingMap)&&void 0!==p&&p.has(v)&&h.add(v)}else{var g=t.getScheduleRemainingTime(v);if(n.d.isDefined(g))e.resumeSchedule(t,v),t.addTargetToStatusList(v),(0,i.fB)().scheduleOnlyIfEarlier(g,"resume1-".concat(t.oid,"-").concat(v));else if(n.d.isDefined(t.getScheduleTimeStamp(v))){var y=e.scheduleExecution(t,v);t.addTargetToStatusList(v),(0,i.fB)().scheduleOnlyIfEarlier(y,"resume2-".concat(t.oid,"-").concat(v))}}}}catch(e){f.e(e)}finally{f.f()}h.size&&(0,i.s)().pauseAnimations(t,h)}}}}},{key:"pauseSchedule",value:function(e,t){var r=e.getTargetInterval(t),i=e.getScheduleTimeStamp(t);if(!(r<=0)&&n.d.isDefined(i)){var a=n.d.now()-i,o=Math.max(r-a,0);e.setScheduleRemainingTime(t,o),e.resetScheduleTimeStamp(t)}}},{key:"resumeSchedule",value:function(e,t){var r=e.getScheduleRemainingTime(t);if(n.d.isDefined(r)){var i=n.d.now(),a=e.getTargetInterval(t);e.setScheduleTimeStamp(t,i-Math.max(a-r,0)),e.resetScheduleRemainingTime(t)}}},{key:"shouldPauseTarget",value:function(e,t){if(!e.isExecuted(t))return!1;var r=e.isTargetImperative(t)?e.targetValues[t]:e.targets[t],n=null==r?void 0:r.pauseOn;return!(void 0===n||!1===n||!0!==n&&("function"==typeof n?!n.call(e,t):"hidden"===n?e.isVisible():"noDom"!==n||e.hasDom()))}}],(r=null)&&c(t.prototype,r),a&&c(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,a}()},756:function(e,t,r){r.d(t,{X:function(){return d}});var n=r(34),i=r(855);function a(e){return a="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},a(e)}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,t,r){return(t=c(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,a=[{key:"clear",value:function(){e.foundParentWithType={},e.foundParentWithTarget={},e.foundTypeMap={},e.foundTargetMap={},e.foundOids={},e.foundHandler={}}},{key:"findFirstScrollHandler",value:function(t,r,n){if(t){var i="".concat(t.oid," ").concat(r," ").concat(n);if(e.foundHandler[i])return e.foundHandler[i];var a=this.findScrollHandler(t,n,r);return a&&(e.foundHandler[i]=a),a}}},{key:"findFirstHandler",value:function(t,r){if(t){var n="".concat(t.oid," ").concat(r);if(e.foundHandler[n])return e.foundHandler[n];var i=this.findEventHandler(t,r);return i&&(e.foundHandler[n]=i),i}}},{key:"findFirstScrollTopHandler",value:function(e,t){return this.findFirstScrollHandler(e,"onScrollTop",t)}},{key:"findFirstScrollLeftHandler",value:function(e,t){return this.findFirstScrollHandler(e,"onScrollLeft",t)}},{key:"findFirstPinchHandler",value:function(e){return this.findFirstHandler(e,"onPinch")}},{key:"findFirstSwipeHandler",value:function(e){return this.findFirstHandler(e,"onSwipe")}},{key:"findFirstEnterHandler",value:function(e){return this.findFirstHandler(e,"onEnter")}},{key:"findFirstLeaveHandler",value:function(e){return this.findFirstHandler(e,"onLeave")}},{key:"findFirstStartHandler",value:function(e){return this.findFirstHandler(e,"onStart")}},{key:"findFirstEndHandler",value:function(e){return this.findFirstHandler(e,"onEnd")}},{key:"findFirstClickHandler",value:function(e){return this.findFirstHandler(e,"onClick")||this.findFirstHandler(e,"onAnyClick")}},{key:"findScrollHandler",value:function(e,t,r){for(;e&&(!e.canHandleEvent("onSwipe")||"wheel"===t);){if(e.canHandleEvent(r)||e.canHandleEvent("onScroll"))return e;e=e.getParent()}}},{key:"findEventHandler",value:function(e,t){for(;e;){if(e.canHandleEvent(t))return e;e=e.getParent()}}},{key:"findParentByType",value:function(t,r){var i="".concat(t.oid,"__").concat(r);if(!n.d.isDefined(e.foundParentWithType[i]))for(var a=t.getParent();a;){if(a.type===r){e.foundParentWithType[i]=a;break}a=a.getParent()}return e.foundParentWithType[i]}},{key:"findParentByTarget",value:function(t,r,i){var a="".concat(t.oid,"__").concat(r);if(!n.d.isDefined(e.foundParentWithTarget[a]))for(var o=t.getParent();o;){if(n.d.isDefined(o.targets[r])||n.d.isDefined(o.targetValues[r])){if(!n.d.isDefined(i)){e.foundParentWithTarget[a]=o;break}if(o.getTargetValue(r)===i){e.foundParentWithTarget[a]=o;break}}o=o.getParent()}return e.foundParentWithTarget[a]}},{key:"findByType",value:function(t){if(!n.d.isDefined(e.foundTypeMap[t])){var r=function(e){if(e.type===t)return e;var n,i=o(e.getChildren());try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a&&a.hasChildren()){var l=r(a);if(l)return l}else if(a&&a.type===t)return a}}catch(e){i.e(e)}finally{i.f()}},a=r((0,i.Bt)());a&&(e.foundTypeMap[t]=a)}return e.foundTypeMap[t]}},{key:"findByTarget",value:function(t){if(!n.d.isDefined(e.foundTargetMap[t])){var r=function(e){if(e.targets[t])return e;var n,i=o(e.getChildren());try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a&&a.hasChildren()){var l=r(a);if(l)return l}else if(a&&a.targets[t])return a}}catch(e){i.e(e)}finally{i.f()}},a=r((0,i.Bt)());a&&(e.foundTargetMap[t]=a)}return e.foundTargetMap[t]}},{key:"find",value:function(t){if(!n.d.isDefined(e.foundOids[t])){var r=function(e){if(e.oid===t)return e;var n,i=o(e.getChildren());try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a&&a.hasChildren()){var l=r(a);if(l)return l}else if(a&&a.oid===t)return a}}catch(e){i.e(e)}finally{i.f()}},a=r((0,i.Bt)());a&&(e.foundOids[t]=a)}return e.foundOids[t]}}],(r=null)&&s(t.prototype,r),a&&s(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,a}();u(d,"foundParentWithType",{}),u(d,"foundParentWithTarget",{}),u(d,"foundTypeMap",{}),u(d,"foundTargetMap",{}),u(d,"foundOids",{}),u(d,"foundHandler",{})},791:function(e,t,r){r.d(t,{s:function(){return T}});var n=r(34),i=r(611);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(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 l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function c(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function h(e){return h="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},h(e)}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function v(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h(t)?t:t+""}var p="__targetjsTModelRef",g=new Set(["_state","targets","targetDefinitions","restoringRuntime","restoredUsesExistingDom","particleRenderer","particleRuntime","particleSyncPromise","layoutCompleteWaiters","isPrevTargetUpdated","type","oid","oidNum","originalId","parent","allChildrenList","allChildrenMap","bracket","$dom","viewport","visibilityStatus","currentStatus","dirtyLayout","originWindowEpoch","hasDomNow","isNowVisible","domHeightTimestamp","domWidthTimestamp","lastBatch","waapiBatch","finalKeyframe","finalRawFrame"]),y=["addedChildren","deletedChildren","movedChildren"],m=new Set(["lastUpdate","scheduleTimeStamp","completeTime","creationTime","activationTime","catchupAt","startTime","segmentStartTime","pausedAt","lastResizeHandledTime"]),b=["originalTargetName","originalTModel","invokerTargetName","invokerTModel"],T=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,c=[{key:"rebaseRuntimeTimes",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakSet;if(t&&"object"===h(t)&&0!==r&&!e.isTModel(t)&&!n.has(t))if(n.add(t),t instanceof Map){var i,a=u(t.values());try{for(a.s();!(i=a.n()).done;){var o=i.value;e.rebaseRuntimeTimes(o,r,n)}}catch(e){a.e(e)}finally{a.f()}}else if(t instanceof Set){var l,s=u(t);try{for(s.s();!(l=s.n()).done;){var c=l.value;e.rebaseRuntimeTimes(c,r,n)}}catch(e){s.e(e)}finally{s.f()}}else for(var d=0,f=Object.keys(t);d<f.length;d++){var v=f[d],p=t[v];m.has(v)&&Number.isFinite(p)&&p>0?t[v]=p+r:e.rebaseRuntimeTimes(p,r,n)}}},{key:"isPlainObject",value:function(e){if(!e||"object"!==h(e))return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}},{key:"cloneUnboundTargets",value:function(t){for(var r=n.d.cloneTargetDefinition(t),i=0,a=Object.values(r);i<a.length;i++){var o=a[i];if(e.isPlainObject(o))for(var l=0,s=Object.keys(o);l<s.length;l++){var u=s[l],c=o[u];"function"==typeof c&&c.__isBoundTargetMethod&&(o[u]=c.__targetjsSource||c)}}return r}},{key:"isTModel",value:function(e){return Boolean(e&&"object"===h(e)&&"string"==typeof e.oid&&e.targets&&"function"==typeof e.state&&"function"==typeof e.getChildren)}},{key:"isTModelReference",value:function(t){return Boolean(e.isPlainObject(t)&&Object.prototype.hasOwnProperty.call(t,p))}},{key:"createTModelReference",value:function(e){return s({},p,e.oid)}},{key:"encodeValue",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakMap;if(null==t||"object"!==h(t))return t;if(e.isTModel(t)){var n;if((null===(n=t.getParent)||void 0===n?void 0:n.call(t))&&"function"==typeof t.exists&&!t.exists())return;return e.createTModelReference(t)}if(r.has(t))return r.get(t);if(t instanceof Date)return new Date(t.getTime());if(t instanceof Map){var i=new Map;r.set(t,i);var a,o=u(t);try{for(o.s();!(a=o.n()).done;){var s=l(a.value,2),c=s[0],d=s[1];i.set(e.encodeValue(c,r),e.encodeValue(d,r))}}catch(e){o.e(e)}finally{o.f()}return i}if(t instanceof Set){var f=new Set;r.set(t,f);var v,p=u(t);try{for(p.s();!(v=p.n()).done;){var g=v.value;f.add(e.encodeValue(g,r))}}catch(e){p.e(e)}finally{p.f()}return f}if(Array.isArray(t)){var y=[];r.set(t,y);var m,b=u(t);try{for(b.s();!(m=b.n()).done;){var T=m.value;y.push(e.encodeValue(T,r))}}catch(e){b.e(e)}finally{b.f()}return y}if(!e.isPlainObject(t))return t;var w={};r.set(t,w);for(var k=0,S=Object.entries(t);k<S.length;k++){var x=l(S[k],2),E=x[0],C=x[1];w[E]=e.encodeValue(C,r)}return w}},{key:"decodeValue",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakMap;if(null===t||"object"!==h(t))return t;if(n.has(t))return n.get(t);if(Array.isArray(t)){var i=new Array(t.length);n.set(t,i);for(var a=0;a<t.length;a++)i[a]=e.decodeValue(t[a],r,n);return i}if(t instanceof Date)return new Date(t.getTime());if(t instanceof Map){var o=new Map;n.set(t,o);var s,c=u(t);try{for(c.s();!(s=c.n()).done;){var d=l(s.value,2),f=d[0],v=d[1];o.set(e.decodeValue(f,r,n),e.decodeValue(v,r,n))}}catch(e){c.e(e)}finally{c.f()}return o}if(t instanceof Set){var g=new Set;n.set(t,g);var y,m=u(t);try{for(m.s();!(y=m.n()).done;){var b=y.value;g.add(e.decodeValue(b,r,n))}}catch(e){m.e(e)}finally{m.f()}return g}var T,w=Object.getPrototypeOf(t);if(w!==Object.prototype&&null!==w)return t;if(Object.prototype.hasOwnProperty.call(t,p))return null!==(T=r[t[p]])&&void 0!==T?T:t;var k={};n.set(t,k);for(var S=0,x=Object.keys(t);S<x.length;S++){var E=x[S];k[E]=e.decodeValue(t[E],r,n)}return k}},{key:"resolveTModelReferencesInPlace",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakSet,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(null==t||"object"!==h(t))return t;if(e.isTModelReference(t)){var a=r[t[p]];return a||(i?void 0:t)}if(n.has(t))return t;if(n.add(t),t instanceof Date)return t;if(t instanceof Map){var s=o(t.entries());t.clear();var c,d=u(s);try{for(d.s();!(c=d.n()).done;){var f=l(c.value,2),v=f[0],g=f[1],y=e.resolveTModelReferencesInPlace(v,r,n,i),m=e.resolveTModelReferencesInPlace(g,r,n,i);t.set(y,m)}}catch(e){d.e(e)}finally{d.f()}return t}if(t instanceof Set){var b=o(t);t.clear();var T,w=u(b);try{for(w.s();!(T=w.n()).done;){var k=T.value;t.add(e.resolveTModelReferencesInPlace(k,r,n,i))}}catch(e){w.e(e)}finally{w.f()}return t}if(Array.isArray(t)){for(var S=0;S<t.length;S++)t[S]=e.resolveTModelReferencesInPlace(t[S],r,n,i);return t}if(!e.isPlainObject(t))return t;for(var x=0,E=Object.keys(t);x<E.length;x++){var C=E[x];t[C]=e.resolveTModelReferencesInPlace(t[C],r,n,i)}return t}},{key:"clearMaterializedChildOperations",value:function(e){if(e){for(var t=0,r=y;t<r.length;t++){var n=r[t];Array.isArray(e[n])?e[n].length=0:e[n]=[]}e.lastChildrenUpdate?(e.lastChildrenUpdate.additions=[],e.lastChildrenUpdate.deletions=[]):e.lastChildrenUpdate={additions:[],deletions:[]}}}},{key:"exportRuntimeState",value:function(t){for(var r,n={},i=0,a=Object.keys(t);i<a.length;i++){var o,l=a[i];g.has(l)||null!==(o=t.excludeRuntimeSnapshotField)&&void 0!==o&&o.call(t,l)||(n[l]=t[l])}var s=null===(r=t.getRuntimeSnapshotFields)||void 0===r?void 0:r.call(t);s&&Object.assign(n,s);var u=e.encodeValue({state:t.state(),fields:n});return e.clearMaterializedChildOperations(u.state),u}},{key:"importRuntimeState",value:function(t,r,n){var i,a=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).timeOffset,o=void 0===a?0:a,s=e.decodeValue(r,n);e.rebaseRuntimeTimes(s,o),t._state=s.state||{};for(var u=0,c=Object.entries(s.fields||{});u<c.length;u++){var d=l(c[u],2),h=d[0],f=d[1];g.has(h)||(t[h]=f)}return e.clearMaterializedChildOperations(t._state),t.childrenUpdateFlag=!1,t.$dom=null,t.viewport=void 0,t.hasDomNow=!1,t.lastBatch=void 0,t.waapiBatch=void 0,t.finalKeyframe=void 0,t.finalRawFrame=void 0,null===(i=t.restoreRuntimeDerivedState)||void 0===i||i.call(t),t}},{key:"createRuntimeSnapshot",value:function(t){var r,i,a,l,s,u;null===(r=t.getChildren)||void 0===r||r.call(t);var c=o(null!==(i=t.allChildrenList)&&void 0!==i?i:[]),d=n.d.cloneTargetDefinition(t.targetDefinitions);return{oid:t.oid,oidNum:null!==(a=t.oidNum)&&void 0!==a?a:0,originalId:t.originalId,type:t.type,usesExistingDom:!0===(null===(l=t.targets)||void 0===l?void 0:l.domIsland)||!0===(null===(s=t.targets)||void 0===s?void 0:s.reuseDomDefinition)||(null===(u=t.originalTargetNames)||void 0===u?void 0:u.includes("$dom")),targets:e.encodeValue(d),targetRuntime:e.exportTargetRuntime(t),runtime:e.exportRuntimeState(t),children:c.map((function(t){return e.createRuntimeSnapshot(t)}))}}},{key:"createWithIdentity",value:function(t,r){var n;if("function"!=typeof r)throw new TypeError("A TModel constructor is required.");var a=e.encodeValue(t.targets),o={restoringRuntime:!0,usesExistingDom:!0===t.usesExistingDom},l=i.E.create(t.type,a,(function(e,t,n,i){return new r(e,t,n,i)}),t.oid,o);return l.type=t.type,l.oid=t.oid,l.oidNum=null!==(n=t.oidNum)&&void 0!==n?n:0,void 0!==t.originalId?l.originalId=t.originalId:delete l.originalId,l.parent=void 0,l.allChildrenList=[],l.allChildrenMap={},l}},{key:"attachRestoredChild",value:function(e,t){return t.parent=e,e.allChildrenList.push(t),e.allChildrenMap[t.oid]=t,t}},{key:"fromRuntimeSnapshot",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)throw new TypeError("A runtime snapshot is required.");for(var i={},o=[],l=[],c=function(t,n){var a=e.createWithIdentity(t,r);i[a.oid]=a,o.push(a),n&&e.attachRestoredChild(n,a),l.push({tmodel:a,runtime:t.runtime,targetRuntime:t.targetRuntime});var s,d=u(t.children||[]);try{for(d.s();!(s=d.n()).done;){var h=s.value;c(h,a)}}catch(e){d.e(e)}finally{d.f()}return a},d=c(t,void 0),h=0,f=o;h<f.length;h++){var v=f[h];e.resolveTModelReferencesInPlace(v.targets,i)}for(var p=0,g=l;p<g.length;p++){var y=g[p],m=y.tmodel,b=y.targetRuntime;e.applyTargetRuntime(m,b,i)}for(var T=0,w=l;T<w.length;T++){var k=w[T],S=k.tmodel,x=k.runtime;e.importRuntimeState(S,x,i,n)}for(var E=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},i),C=0,M=o;C<M.length;C++){var P,D,O=u(null!==(P=M[C].childHandles)&&void 0!==P?P:[]);try{for(O.s();!(D=O.n()).done;){var L=D.value;E[L.oid]=L}}catch(e){O.e(e)}finally{O.f()}}for(var A=0,j=o;A<j.length;A++){var I,_=j[A];e.resolveTModelReferencesInPlace(_.targets,E,new WeakSet,!0),_.targetValues=e.resolveTModelReferencesInPlace(_.targetValues,E,new WeakSet,!0),_._state=e.resolveTModelReferencesInPlace(_._state,E,new WeakSet,!0),_.updatingChildrenMap=e.resolveTModelReferencesInPlace(_.updatingChildrenMap,E,new WeakSet,!0),_.animatingChildrenMap=e.resolveTModelReferencesInPlace(_.animatingChildrenMap,E,new WeakSet,!0),_.activeChildrenMap=e.resolveTModelReferencesInPlace(_.activeChildrenMap,E,new WeakSet,!0);var R,N=u(null!==(I=_.childHandles)&&void 0!==I?I:[]);try{for(N.s();!(R=N.n()).done;){var V=R.value;V.targets=e.resolveTModelReferencesInPlace(V.targets,E,new WeakSet,!0),V.targetValues=e.resolveTModelReferencesInPlace(V.targetValues,E,new WeakSet,!0)}}catch(e){N.e(e)}finally{N.f()}}return{root:d,tmodelIdMap:i,models:o}}},{key:"exportTargetRuntime",value:function(t){for(var r={},n=0,i=Object.entries(t.targets);n<i.length;n++){var a=l(i[n],2),o=a[0],s=a[1];if(e.isPlainObject(s)){for(var u={},c=0,d=b;c<d.length;c++){var h=d[c];Object.prototype.hasOwnProperty.call(s,h)&&("childAction"!==h&&"addChildAction"!==h||!Array.isArray(s[h])?u[h]=s[h]:u[h]=s[h].filter((function(e){var t;return null==e||null===(t=e.exists)||void 0===t?void 0:t.call(e)})))}Object.keys(u).length&&(r[o]=e.encodeValue(u))}}return r}},{key:"applyTargetRuntime",value:function(t,r,n){for(var i=0,a=Object.entries(r||{});i<a.length;i++){var o=l(a[i],2),s=o[0],u=o[1],c=t.targets[s];if(c){var d=e.decodeValue(u,n);Object.assign(c,d)}}}}],(r=null)&&f(t.prototype,r),c&&f(t,c),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,c}()},255:function(e,t,r){r.d(t,{c:function(){return oe}});var n=r(855),i=r(484),a=r(34),o=r(690),l=r(333),s=r(585),u=r(768),c=r(421);function d(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(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 h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=v(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){if(e){if("string"==typeof e)return p(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function g(e){return g="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},g(e)}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function m(e){var t=function(e,t){if("object"!=g(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==g(t)?t:t+""}var b=function(){return e=function e(t,r,i){var o,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"object"===g(t)&&void 0===r&&(r=t,t=""),this.restoringRuntime=!0===l.restoringRuntime,this.restoredUsesExistingDom=!0===l.usesExistingDom,this.targetDefinitions=a.d.cloneTargetDefinition(r),this.targets=Object.assign({},r),i=i||this.targets.id,a.d.isDefined(i))n.qw.getOid(i),this.type=i,this.oid=i,this.oidNum=0;else{this.type=this.targets.otype||t||"blank";var s=n.qw.getOid(this.type);this.oid=s.oid,this.oidNum=s.num}null!==(o=r)&&void 0!==o&&o.sourceDom||!a.d.isDefined(i)||(this.originalId=i),this._state={}},t=[{key:"state",value:function(){return this._state}},{key:"targetValues",get:function(){var e,t;return null!==(t=(e=this.state()).targetValues)&&void 0!==t?t:e.targetValues={}},set:function(e){this.state().targetValues=e}},{key:"actualValues",get:function(){var e,t;return null!==(t=(e=this.state()).actualValues)&&void 0!==t?t:e.actualValues={}},set:function(e){this.state().actualValues=e}},{key:"lastActualValues",get:function(){var e,t;return null!==(t=(e=this.state()).lastActualValues)&&void 0!==t?t:e.lastActualValues={}}},{key:"activeTargetList",get:function(){var e,t;return null!==(t=(e=this.state()).activeTargetList)&&void 0!==t?t:e.activeTargetList=[]},set:function(e){this.state().activeTargetList=e}},{key:"activeTargetMap",get:function(){var e,t;return null!==(t=(e=this.state()).activeTargetMap)&&void 0!==t?t:e.activeTargetMap={}},set:function(e){this.state().activeTargetMap=e}},{key:"updatingTargetList",get:function(){var e,t;return null!==(t=(e=this.state()).updatingTargetList)&&void 0!==t?t:e.updatingTargetList=[]},set:function(e){this.state().updatingTargetList=e}},{key:"updatingTargetMap",get:function(){var e,t;return null!==(t=(e=this.state()).updatingTargetMap)&&void 0!==t?t:e.updatingTargetMap={}},set:function(e){this.state().updatingTargetMap=e}},{key:"fetchActionTargetList",get:function(){var e,t;return null!==(t=(e=this.state()).fetchActionTargetList)&&void 0!==t?t:e.fetchActionTargetList=[]}},{key:"activatedTargets",get:function(){var e,t;return null!==(t=(e=this.state()).activatedTargets)&&void 0!==t?t:e.activatedTargets=[]}},{key:"targetMethodMap",get:function(){var e,t;return null!==(t=(e=this.state()).targetMethodMap)&&void 0!==t?t:e.targetMethodMap={}}},{key:"targetExecutionCount",get:function(){var e,t;return null!==(t=(e=this.state()).targetExecutionCount)&&void 0!==t?t:e.targetExecutionCount=0},set:function(e){this.state().targetExecutionCount=e}},{key:"addedChildren",get:function(){var e,t;return null!==(t=(e=this.state()).addedChildren)&&void 0!==t?t:e.addedChildren=[]}},{key:"deletedChildren",get:function(){var e,t;return null!==(t=(e=this.state()).deletedChildren)&&void 0!==t?t:e.deletedChildren=[]}},{key:"movedChildren",get:function(){var e,t;return null!==(t=(e=this.state()).movedChildren)&&void 0!==t?t:e.movedChildren=[]}},{key:"lastChildrenUpdate",get:function(){var e,t;return null!==(t=(e=this.state()).lastChildrenUpdate)&&void 0!==t?t:e.lastChildrenUpdate={additions:[],deletions:[]}}},{key:"visibleChildren",get:function(){var e,t;return null!==(t=(e=this.state()).visibleChildren)&&void 0!==t?t:e.visibleChildren=[]}},{key:"passiveTargetList",get:function(){var e,t;return null!==(t=(e=this.state()).passiveTargetList)&&void 0!==t?t:e.passiveTargetList=[]},set:function(e){this.state().passiveTargetList=e}},{key:"passiveTargetMap",get:function(){var e,t;return null!==(t=(e=this.state()).passiveTargetMap)&&void 0!==t?t:e.passiveTargetMap={}},set:function(e){this.state().passiveTargetMap=e}},{key:"getParent",value:function(){return this.parent}},{key:"initTargets",value:function(){var e=this;if(this.targetsVersion=1,this.originalTargetNames=Object.keys(this.targets).filter((function(e){return!s.u.excludedTargetKeys.has(e)})),this.functionTargetNames=[],this.allTargetMap={},!this.restoringRuntime&&a.d.isDefined(this.originalId)&&(0,n.UR)(this.originalId))return a.d.mergeTargets((0,n.UR)(this.originalId),this),void(this.toDiscard=!0);this.actualValues=s.u.defaultActualValues(),this.targetValues={},this.activeTargetMap={},this.activeTargetList=[],this.originalTargetNames=Object.keys(this.targets).filter((function(e){return!s.u.excludedTargetKeys.has(e)})).map((function(e){return e.startsWith("_")?e.slice(1):e}));var t=this.originalTargetNames.includes("$dom"),r=this.restoringRuntime?this.restoredUsesExistingDom||t:Boolean(u.J.query("#".concat(this.oid))||t);r||this.excludeDefaultStyling()?r&&(this.targets.domIsland=!0,a.d.isDefined(this.targets.reuseDomDefinition)||(this.targets.reuseDomDefinition=!0,this.targets.domHolder=!0,a.d.isDefined(this.targets.excludeXYCalc)||(this.targets.excludeXYCalc=!0),a.d.isDefined(this.targets.x)||(this.targets.excludeX=!0),a.d.isDefined(this.targets.y)||(this.targets.excludeY=!0),a.d.isDefined(this.targets.position)||(this.targets.position="relative"))):(Object.entries(s.u.defaultTargetStyles).forEach((function(t){var r=f(t,2),n=r[0],i=r[1];n in e.targets||(e.targets[n]=i)})),!1===this.targets.canHaveDom||a.d.isDefined(this.targets.domHolder)||(this.targets.domHolder=!0)),Object.keys(this.targets).filter((function(e){return!s.u.excludedTargetKeys.has(e)})).forEach((function(t,r){e.processNewTarget(t,r)}))}},{key:"processNewTarget",value:function(e,t){this.targetsVersion++;var r=l.g.getTargetName(e),n=this.targets[e];if(a.d.isDefined(n)){"passive"!==n.loop&&"function"!=typeof n.loop||this.passiveTargetMap[e]||(this.passiveTargetMap[e]=!0,this.passiveTargetList.push(e));var i=g(n),u=e.startsWith("_")||e.endsWith("$"),c=s.u.mustExecuteTargets[r]||u||"string"!==i&&"number"!==i&&"boolean"!==i,d=!!s.u.allEventMap[r],h=!!s.u.internalEventMap[r];if(("object"!==i||Array.isArray(n))&&c&&(n=l.g.wrapTarget(this,n,e)),a.d.isDefined(t)){var f=t>0?this.originalTargetNames[t-1]:void 0,v=t<this.originalTargetNames.length-1?this.originalTargetNames[t+1]:void 0;(v&&v.endsWith("$")||u||d||h||"object"===i||"function"===i)&&(a.d.isDefined(n.value)||o.D.isChildObjectTarget(e,n)||o.D.isIntervalTarget(n)||(c=!0,n=l.g.wrapTarget(this,n,e)),l.g.bindTarget(this,e,f,v,t))}if(e.startsWith("_")){var p=e.slice(1);this.targets[e]&&(this.targets[p]=this.targets[e]),delete this.targets[e],e=p,n=this.targets[p]}if(d&&(this.externalEventMap||(this.externalEventMap=new Map),this.externalEventMap.set(r,!0),n.active=!1),h&&(this.internalEventMap||(this.internalEventMap=new Map),this.internalEventMap.set(r,!0),n.active=!1),this.allTargetMap[r]=e,u&&(this.targets[e].active=!1),s.u.requiresDom(r)&&(this.addOnDomTarget(e),this.targets[e].active=!1),!s.u.bypassInitialProcessingTargetMap[r]){if(a.d.isDefined(n.initialValue)&&this.val(e,n.initialValue),(!1!==n.active||a.d.isDefined(n.initialValue))&&this.addToStyleTargetList(e),o.D.isIntervalTarget(n))n.cycles=2,n.isInterval=!0;else if(!c){var y;return void this.val(r,a.d.isDefined(null===(y=n)||void 0===y?void 0:y.value)?n.value:n)}!1!==n.active&&this.canTargetBeActivated(e)&&this.addToActiveTargets(e),this.functionTargetNames.push(e)}}else this.delVal(e)}},{key:"activate",value:function(e){(0,n.zw)().addToActivatedList(this),this.currentStatus="active",e&&this.isTargetEnabled(e)&&-1===this.activatedTargets.indexOf(e)&&this.activatedTargets.push(e)}},{key:"isActivated",value:function(){return"active"===this.currentStatus}},{key:"deactivate",value:function(){this.currentStatus=void 0}},{key:"excludeDefaultStyling",value:function(){return!1===this.targets.defaultStyling||this.excludeStyling()||this.reuseDomDefinition()&&!this.allStyleTargetMap}},{key:"canTargetBeActivated",value:function(e){var t=this.targets.onDomReady;if(t){var r,n=null!==(r=t.value)&&void 0!==r?r:t;if((Array.isArray(n)?n.includes(e):n===e)&&!this.hasDom())return!1}return!this.activeTargetMap[e]}},{key:"addOnDomTarget",value:function(e){var t=this.targets.onDomReady;if(!t)return this.targets.onDomReady={value:[e],active:!1},void this.processNewTarget("onDomReady");var r=Array.isArray(t)?t:t.value;Array.isArray(r)&&!r.includes(e)&&r.push(e)}},{key:"addToStyleTargetList",value:function(e,t){var r;if(e=l.g.getTargetName(e),t||!this.excludeStyling()&&!this.targets["exclude".concat(a.d.capitalizeFirstLetter(e))]){var n,i=s.u.asyncStyleTargetMap[e],o=s.u.attributeTargetMap[e];if(i||o)null!==(n=this.asyncStyleTargetMap)&&void 0!==n&&n.has(e)||(this.asyncStyleTargetMap||(this.asyncStyleTargetMap=new Map),this.asyncStyleTargetMap.set(e,!0));else if(this.isStyleTarget(e)){var u,c=!0;if(s.u.transformMap[e])this.getParent()&&this.calcAbsolutePosition(this.getX(),this.getY());else if("width"===e||"height"===e){var d=Math.floor("width"===e?this.getWidth():this.getHeight());this.styleMap[e]===d&&(c=!1)}else"dim"===e?this.styleMap[e]===Math.floor(this.val("dim"))&&(c=!1):a.d.isDefined(this.val(e))&&this.styleMap[e]===this.val(e)&&(c=!1);!c||null!==(u=this.styleTargetMap)&&void 0!==u&&u.has(e)||(this.styleTargetMap||(this.styleTargetMap=new Map),this.styleTargetMap.set(e,!0))}!s.u.styleSet.has(e)||null!==(r=this.allStyleTargetMap)&&void 0!==r&&r.has(e)||(this.allStyleTargetMap||(this.allStyleTargetMap=new Map),this.allStyleTargetMap.set(e,!0))}}},{key:"isStyleTarget",value:function(e){return s.u.styleTargetMap[e]}},{key:"removeTarget",value:function(e){delete this.targetDefinitions[e],delete this.targets[e],this.removeFromActiveTargets(e),this.removeFromUpdatingTargets(e),delete this.targetValues[e]}},{key:"addTarget",value:function(e,t){var r,n,i;this.addTargets((r={},i=t,(n=m(n=e))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r))}},{key:"addTargets",value:function(e){for(var t,r=this,i=a.d.cloneTargetDefinition(e),o=0,l=Object.keys(i);o<l.length;o++){var s=l[o];this.targetDefinitions[s]=i[s]}Object.keys(e).forEach((function(t){r.targets[t]=e[t],r.removeFromUpdatingTargets(t),r.originalTargetNames.includes(t)||r.originalTargetNames.push(t);var n=r.originalTargetNames.indexOf(t);r.processNewTarget(t,n)})),this.hasDom()&&(0,n.kQ)().attachEvents([this]),null===(t=(0,n.fB)())||void 0===t||t.schedule(1,"addTargets-".concat(this.oid))}},{key:"getTargetStepPercent",value:function(e,t,r){return t=a.d.isDefined(t)?t:this.getTargetStep(e),r?t/r:1}},{key:"resetTargetStep",value:function(e){return this.targetValues[e]&&(this.targetValues[e].step=0),this}},{key:"resetTargetExecutionFlag",value:function(e){return this.targetValues[e]&&(this.targetValues[e].executionFlag=!1),this}},{key:"resetTargetCycle",value:function(e){return this.targetValues[e]&&(this.targetValues[e].cycle=0),this}},{key:"resetTargetInitialValue",value:function(e){return this.targetValues[e]&&(this.targetValues[e].initialValue=void 0),this}},{key:"addTargetToStatusList",value:function(e){var t=this.targetValues[e];if(t){var r;if("fetching"===t.status)return this.removeFromActiveTargets(e),this.removeFromUpdatingTargets(e),void(null===(r=this.getParent())||void 0===r||r.addToActiveChildren(this));if(this.isTargetUpdating(e))return this.addToUpdatingTargets(e),void this.removeFromActiveTargets(e);if(this.isTargetActive(e))return this.addToActiveTargets(e),void this.removeFromUpdatingTargets(e);this.removeFromActiveTargets(e),this.removeFromUpdatingTargets(e)}}},{key:"setTargetStatus",value:function(e,t){var r=this.targetValues[e];if(r){var n=r.status;"done"!==t||"done"===n||"complete"===n||r.resetFlag||(r.completeCount++,r.completeTime=a.d.now()),r.resetFlag=!1,r.status=t,this.addTargetToStatusList(e)}}},{key:"getTargetStatus",value:function(e){var t,r;return null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.status)&&void 0!==t?t:""}},{key:"isTargetActive",value:function(e){var t;return"active"===(null===(t=this.targetValues[e])||void 0===t?void 0:t.status)}},{key:"isTargetUpdating",value:function(e){var t;return"updating"===(null===(t=this.targetValues[e])||void 0===t?void 0:t.status)}},{key:"isTargetDone",value:function(e){var t;return"done"===(null===(t=this.targetValues[e])||void 0===t?void 0:t.status)}},{key:"isTargetComplete",value:function(e){var t;return"complete"===(null===(t=this.targetValues[e])||void 0===t?void 0:t.status)||void 0===this.targetValues[e]&&void 0}},{key:"isTargetTreeComplete",value:function(e,t){return!0===l.g.isTargetTreeComplete(this,e,t)}},{key:"isTargetVisibleTreeComplete",value:function(e){return this.isTargetTreeComplete(e,"visible")}},{key:"isTargetFullyCompleted",value:function(e){return!0===l.g.isTargetFullyCompleted(this,e)}},{key:"arePreviousTargetsComplete",value:function(e){return!0===l.g.arePreviousTargetsComplete(this,e)}},{key:"cleanupTarget",value:function(e){l.g.cleanupTarget(this,e)}},{key:"isComplete",value:function(){return l.g.isTModelComplete(this)}},{key:"isExecuted",value:function(e){return this.targetValues[e]&&this.targetValues[e].executionFlag}},{key:"neverExecuted",value:function(e){return!this.targetValues[e]}},{key:"isTargetImperative",value:function(e){return!!this.targetValues[e]&&this.targetValues[e].isImperative}},{key:"getTargetExecutionCount",value:function(e){return this.targetValues[e]?this.targetValues[e].executionCount:0}},{key:"setTargetComplete",value:function(e){this.targetValues[e]&&(this.targetValues[e].status="complete")}},{key:"isTargetEnabled",value:function(e){var t=this.targets[e];if(!a.d.isDefined(t))return!1;var r=t.enabledOn;return"function"==typeof r?(this.setTargetMethodName(e,"enabledOn"),!!r.call(this)):!1!==r}},{key:"doesTargetEqualActual",value:function(e){if(this.targetValues[e]){var t=!!this.targets[e]&&this.targets[e].deepEquality;return t?a.d.areEqual(this.getTargetValue(e),this.val(e),t):this.getTargetValue(e)===this.val(e)}return!1}},{key:"getTargetValue",value:function(e){var t=this.targetValues[e];if(void 0!==t){var r=t.value;return"function"==typeof r?r.call(this):r}var n=this.targets[e];if(void 0!==n){var i=n&&"object"===g(n)&&Object.prototype.hasOwnProperty.call(n,"value")?n.value:n;return"function"==typeof i?i.call(this):i}}},{key:"getTargetStep",value:function(e){return this.targetValues[e]?this.targetValues[e].step:0}},{key:"getScheduleTimeStamp",value:function(e){var t;return null===(t=this.targetValues[e])||void 0===t?void 0:t.scheduleTimeStamp}},{key:"isScheduledPending",value:function(e){var t=this.getScheduleRemainingTime(e);if(a.d.isDefined(t))return t>0;var r=this.getScheduleTimeStamp(e),n=this.getTargetInterval(e);return a.d.isDefined(r)&&r+n>a.d.now()}},{key:"getScheduleRemainingTime",value:function(e){var t;return null===(t=this.targetValues[e])||void 0===t?void 0:t.scheduleRemainingTime}},{key:"setScheduleRemainingTime",value:function(e,t){var r=this.targetValues[e];r&&(r.scheduleRemainingTime=t)}},{key:"resetScheduleRemainingTime",value:function(e){var t=this.targetValues[e];t&&(t.scheduleRemainingTime=void 0)}},{key:"setScheduleTimeStamp",value:function(e,t){var r=this.targetValues[e];r&&(r.scheduleTimeStamp=t)}},{key:"resetScheduleTimeStamp",value:function(e){var t=this.targetValues[e];t&&(t.scheduleTimeStamp=void 0)}},{key:"isTargetInLoop",value:function(e){var t=this.targets[e];return!!t&&!0===("function"==typeof t.loop?t.loop.call(this,e):t.loop)}},{key:"isTargetPassiveLoop",value:function(e){var t=this.targets[e];return!!t&&"passive"===("function"==typeof t.loop?t.loop.call(this,e):t.loop)}},{key:"shouldScheduleRun",value:function(e){var t=this.targets[e];if(!t)return!1;if(void 0!==t.triggerRerun)return!!t.triggerRerun;if("passive"===("function"==typeof t.loop?t.loop.call(this,e):t.loop)){var r,n=o.D.getValueStepsCycles(this,e)[0],i=this.getTargetValue(e);return!a.d.areEqual(n,i,null!==(r=t.deepEquality)&&void 0!==r&&r)}return!0}},{key:"activateChangedPassiveTargets",value:function(){var e;if(null===(e=this.passiveTargetList)||void 0===e||!e.length)return!1;var t,r=!1,n=h(this.passiveTargetList);try{for(n.s();!(t=n.n()).done;){var i,a=t.value;this.isTargetPassiveLoop(a)&&(this.isTargetUpdating(a)||null!==(i=this.animatingMap)&&void 0!==i&&i.has(a)||this.shouldScheduleRun(a)&&this.canTargetBeActivated(a)&&(this.resetTargetStep(a),this.addToActiveTargets(a),r=!0))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"getTargetInitialValue",value:function(e){var t;return null===(t=this.targetValues[e])||void 0===t?void 0:t.initialValue}},{key:"getLastUpdate",value:function(e){var t;return null===(t=this.targetValues[e])||void 0===t?void 0:t.lastUpdate}},{key:"getDimLastUpdate",value:function(){var e,t,r,n,i;return Math.max(null!==(e=this.getLastUpdate("width"))&&void 0!==e?e:0,null!==(t=this.getLastUpdate("height"))&&void 0!==t?t:0,null!==(r=this.getLastUpdate("dim"))&&void 0!==r?r:0,null!==(n=this.domHeightTimestamp)&&void 0!==n?n:0,null!==(i=this.domWidthTimestamp)&&void 0!==i?i:0)}},{key:"getTargetActivationTime",value:function(e){var t,r;return null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.activationTime)&&void 0!==t?t:0}},{key:"getTargetCreationTime",value:function(e){return this.targetValues[e]?this.targetValues[e].creationTime:void 0}},{key:"incrementTargetStep",value:function(e,t,r,n,i){var a=this.targetValues[e];if(a){var o=n||8,l=t-r,s=Math.max(1,Math.floor(l/o));return a.step=Math.min(i,a.step+s),a.step}}},{key:"getTargetEasing",value:function(e){var t,r=null===(t=this.targetValues[e])||void 0===t?void 0:t.easing,n=this.targets[e];return n&&"function"==typeof n.easing?n.easing.call(this,this.getTargetCycle(e)):r}},{key:"getTargetInterval",value:function(e){var t,r,n=null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.interval)&&void 0!==t?t:0,i=this.targets[e];return i&&"function"==typeof i.interval?i.interval.call(this,this.getTargetCycle(e)):n}},{key:"getTargetSteps",value:function(e){var t,r,n=null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.steps)&&void 0!==t?t:0,i=this.targets[e];return i&&"function"==typeof i.steps?i.steps.call(this,this.getTargetCycle(e)):n}},{key:"getTargetCycles",value:function(e){var t,r,n=null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.cycles)&&void 0!==t?t:1,i=this.targets[e];return i&&"function"==typeof i.cycles?i.cycles.call(this,this.getTargetCycle(e),n):n}},{key:"getTargetCycle",value:function(e){var t,r;return null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.cycle)&&void 0!==t?t:0}},{key:"getValueListPointer",value:function(e){var t,r;return null!==(t=null===(r=this.targetValues[e])||void 0===r?void 0:r.valuePointer)&&void 0!==t?t:1}},{key:"incrementTargetCycle",value:function(e){this.targetValues[e]&&this.targetValues[e].cycle++}},{key:"incrementValueListPointer",value:function(e){this.targetValues[e]&&this.targetValues[e].valuePointer++}},{key:"setTargetInterval",value:function(e,t){return this.targetValues[e]&&(this.targetValues[e].interval=t),this.targetValues[e].interval}},{key:"setTargetInitialValue",value:function(e,t){this.targetValues[e]&&(this.targetValues[e].initialValue=t)}},{key:"setLastUpdate",value:function(e){this.targetValues[e]&&(this.targetValues[e].lastUpdate=a.d.now(),this.targetValues[e].updateCount++)}},{key:"setTarget",value:function(e,t,r,n,a){if("object"===g(e)&&null!==e){var o=[e,t,r,n];t=o[0],r=o[1],n=o[2],a=o[3],e=""}void 0===a&&c.G.isEasing(n)&&(a=n,n=void 0),"string"==typeof e&&(e=e.endsWith("+")?e:e+"+");var s=l.g.currentTargetName,u=l.g.currentTModel;return"swell"===s&&console.log("setTarget: "+this.oid+", "+u.oid+", "+s),u&&s&&u!==this&&l.g.markChildAction(u,s,this),this.markLayoutDirty(e),i.j.executeImperativeTarget(this,e,t,r,n,a,s,u),this}},{key:"cancelAnimation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mode,r=void 0===t?"hold":t,i=e.commitStyle,a=void 0===i||i;return(0,n.s)().cancelTModelAnimation(this,{mode:r,commitStyle:a})}},{key:"hasTargetUpdates",value:function(e){var t;return e?!0===this.updatingTargetMap[e]||(null===(t=this.animatingMap)||void 0===t?void 0:t.has(e)):this.updatingTargetList.length>0}},{key:"addToActiveTargets",value:function(e){var t;!this.activeTargetMap[e]&&this.canTargetBeActivated(e)&&(this.markLayoutDirty(e),this.activeTargetMap[e]=!0,this.activeTargetList.push(e),null===(t=this.getParent())||void 0===t||t.addToActiveChildren(this))}},{key:"removeFromActiveTargets",value:function(e){if(this.activeTargetMap[e]){delete this.activeTargetMap[e];var t=this.activeTargetList.indexOf(e);t>=0&&this.activeTargetList.splice(t,1)}var r;0===this.activeTargetList.length&&(null===(r=this.getParent())||void 0===r||r.removeFromActiveChildren(this))}},{key:"addToUpdatingTargets",value:function(e){var t;this.updatingTargetMap[e]||(this.markLayoutDirty(e),this.updatingTargetMap[e]=!0,this.updatingTargetList.push(e),null===(t=this.getParent())||void 0===t||t.addToUpdatingChildren(this))}},{key:"addToNoDomUpdatingTargets",value:function(e){var t,r=this.targetValues[e];if(!r)return!1;var n=this.noDomUpdatingTargets||(this.noDomUpdatingTargets=new Set);return!n.has(e)&&(r.catchupAt=a.d.now(),n.add(e),this.removeFromAnimatingMap(e),this.removeFromUpdatingTargets(e),this.resetScheduleTimeStamp(e),this.resetScheduleRemainingTime(e),null===(t=this.getParent())||void 0===t||t.addToUpdatingChildren(this),!0)}},{key:"removeFromUpdatingTargets",value:function(e){if(this.updatingTargetMap[e]){delete this.updatingTargetMap[e];var t=this.updatingTargetList.indexOf(e);t>=0&&this.updatingTargetList.splice(t,1)}var r;0===this.updatingTargetList.length&&(null===(r=this.getParent())||void 0===r||r.removeFromUpdatingChildren(this))}},{key:"hasUpdatingImperativeTargets",value:function(e){var t,r,n=h([].concat(d(null!==(t=this.updatingTargetList)&&void 0!==t?t:[]),d(this.hasAnimatingTargets()?d(this.animatingMap.keys()):[])));try{for(n.s();!(r=n.n()).done;){var i,a=r.value;if(this.isTargetImperative(a)&&(null===(i=this.targetValues[a])||void 0===i?void 0:i.originalTargetName)===e)return!0}}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"getUpdatingImperativeTargets",value:function(e){var t,r,n=[],i=h([].concat(d(null!==(t=this.updatingTargetList)&&void 0!==t?t:[]),d(this.hasAnimatingTargets()?d(this.animatingMap.keys()):[])));try{for(i.s();!(r=i.n()).done;){var a,o=r.value;this.isTargetImperative(o)&&(null===(a=this.targetValues[o])||void 0===a?void 0:a.originalTargetName)===e&&n.push(o)}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"hasAnyUpdates",value:function(){var e,t,r,n;return 0!==this.updatingTargetList.length||0!==this.activeTargetList.length||0!==(null!==(e=null===(t=this.animatingMap)||void 0===t?void 0:t.size)&&void 0!==e?e:0)||0!==(null!==(r=null===(n=this.noDomUpdatingTargets)||void 0===n?void 0:n.size)&&void 0!==r?r:0)}},{key:"removeFromAnimatingMap",value:function(e){var t,r;null!==(t=this.animatingMap)&&void 0!==t&&t.has(e)&&(this.animatingMap.delete(e),0===this.animatingMap.size&&(null===(r=this.getParent())||void 0===r||r.removeFromAnimatingChildren(this)))}},{key:"clearAnimatingMap",value:function(){var e,t;null===(e=this.animatingMap)||void 0===e||e.clear(),null===(t=this.getParent())||void 0===t||t.removeFromAnimatingChildren(this)}},{key:"addToAnimatingMap",value:function(e){var t,r;null!==(t=this.targetValues[e])&&void 0!==t&&t.snapAnimation||(this.animatingMap||(this.animatingMap=new Map),this.animatingMap.set(e,!0),null===(r=this.getParent())||void 0===r||r.addToAnimatingChildren(this))}},{key:"getAnimatingTargets",value:function(){return this.animatingMap?d(this.animatingMap.keys()):[]}},{key:"isKeyAnimating",value:function(e){if(!this.animatingMap)return!1;var t=l.g.getOriginalNames(this,e).originalTargetName;return this.animatingMap.has(e)&&this.animatingMap.get(e).originalTargetName===t}},{key:"addToUpdatingChildren",value:function(e){this.updatingChildrenMap||(this.updatingChildrenMap=new Map),this.updatingChildrenMap.set(e.oid,e)}},{key:"removeFromUpdatingChildren",value:function(e){var t;null===(t=this.updatingChildrenMap)||void 0===t||t.delete(e.oid)}},{key:"addToAnimatingChildren",value:function(e){this.animatingChildrenMap||(this.animatingChildrenMap=new Map),this.animatingChildrenMap.set(e.oid,e)}},{key:"removeFromAnimatingChildren",value:function(e){var t;null===(t=this.animatingChildrenMap)||void 0===t||t.delete(e.oid)}},{key:"addToActiveChildren",value:function(e){this.activeChildrenMap||(this.activeChildrenMap=new Map),this.activeChildrenMap.set(e.oid,e)}},{key:"removeFromActiveChildren",value:function(e){var t;null===(t=this.activeChildrenMap)||void 0===t||t.delete(e.oid)}},{key:"hasActiveChildren",value:function(){var e;return!(null===(e=this.activeChildrenMap)||void 0===e||!e.size)}},{key:"hasUpdatingChildren",value:function(){var e;return!(null===(e=this.updatingChildrenMap)||void 0===e||!e.size)}},{key:"hasAnimatingChildren",value:function(){var e;return!(null===(e=this.animatingChildrenMap)||void 0===e||!e.size)}},{key:"hasAnimatingTargets",value:function(){var e;return!(null===(e=this.animatingMap)||void 0===e||!e.size)}},{key:"hasValidAnimation",value:function(){return this.hasAnimatingTargets()&&this.lastBatch&&this.lastBatch.totalDuration>0}},{key:"deleteTargetValue",value:function(e){return delete this.targetValues[e],this.addToActiveTargets(e),this.removeFromUpdatingTargets(e),this}},{key:"clearAnimatingChildren",value:function(){var e;null===(e=this.animatingChildrenMap)||void 0===e||e.clear()}},{key:"clearUpdatingChildren",value:function(){var e;null===(e=this.updatingChildrenMap)||void 0===e||e.clear()}},{key:"clearActiveChildren",value:function(){var e;null===(e=this.activeChildrenMap)||void 0===e||e.clear()}},{key:"resetTarget",value:function(e){var t=this.targetValues[e];return t&&(t.isImperative=!1,t.executionFlag=!1,t.scheduleTimeStamp=void 0,t.step=0,t.cycle=0,t.steps=0,t.cycles=1,t.interval=0,t.status=""),this}},{key:"activateTargets",value:function(e){var t=this;Array.isArray(e)&&e.forEach((function(e){return t.activateTarget(e)}))}},{key:"activateTarget",value:function(e,t,r){var n=t,i=r;if(null!=t&&t.reset&&1===Object.keys(t).length&&!r&&(n=void 0,i=t),this.canTargetBeActivated(e)){var o=l.g.getResetOptions(i);o.shouldReset&&l.g.resetTargetState(this,e,o),a.d.isDefined(n)&&this.val("___".concat(e),n),this.isVisible()&&this.markLayoutDirty(e);var s,u,c=l.g.currentTModel,d=l.g.currentTargetName,h=this.targetValues[e]||l.g.emptyValue();this.getParent()===c&&l.g.markChildAction(c,d,this),h.invokerTModel=c,h.invokerTarget=d,this.targetValues[e]?(h.activationTime=a.d.now(),h.lastUpdate=a.d.now(),h.isImperative=!1,h.executionFlag=!1,h.scheduleTimeStamp=void 0,h.step=0,h.cycle=0,h.valuePointer=Array.isArray(h.valueList)?1:0,h.initialValue=void 0):(this.targetValues[e]=h,h.cycles=null!==(s=null===(u=this.targets[e])||void 0===u?void 0:u.cycles)&&void 0!==s?s:h.cycles),this.setTargetStatus(e,"active"),this.activate(e)}return this}},{key:"manageChildTargetExecution",value:function(e){return e.hasChildren()||e.addedChildren.length>0||e.dirtyLayout||0===e.targetExecutionCount}},{key:"setTargetMethodName",value:function(e,t){(!s.u.ignoreTargetMethodNameMap[e]||this.isTargetUpdating(e)||this.isTargetImperative(e))&&(this.targetMethodMap[e]||(this.targetMethodMap[e]=[]),this.targetMethodMap[e].includes(t)||this.targetMethodMap[e].push(t))}}],t&&y(e.prototype,t),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}(),T=r(530),w=r(952),k=r(756),S=r(249),x=r(260),E=r(791),C=r(611);function M(){M=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new L(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};u(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(A([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,o,l){var s=d(e[i],e,a);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==I(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var s=P(l,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var u=d(t,r,n);if("normal"===u.type){if(i=n.done?p:f,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=p,n.method="throw",n.arg=u.arg)}}}function P(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function A(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(I(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),u(S,s,"Generator"),u(S,o,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=A,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:A(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function P(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return D(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function O(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){j(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function j(e,t,r){return(t=R(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I(e){return I="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},I(e)}function _(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,R(n.key),n)}}function R(e){var t=function(e,t){if("object"!=I(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=I(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==I(t)?t:t+""}var N=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,r=null,i=[{key:"createExplodeChildren",value:function(t,r){var n,i,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=function(e){if(!1===e.image)return!1;if(!0===e.image)return!0;var t=e.backgroundColor;return!("string"==typeof t&&""!==t.trim())},u=null!==(n=t.targets[r])&&void 0!==n?n:{},c=null!==(i=u.renderer)&&void 0!==i?i:"gpu";if("gpu"!==c&&"dom"!==c)throw new Error("Unsupported explodeChildren renderer: ".concat(c));var d="function"==typeof u.value?u.value:"function"==typeof l?l:void 0,h=d?void 0:l,f=e.resolveSource(t,u.source),v=e.resolveDomElement(f);if(!v)throw new Error("explodeChildren.source must resolve to a TModel, $Dom, or DOM element with an existing DOM.");var p=e.getSourceDimensions(f,v),g=p.width,y=p.height;if(!Number.isFinite(g)||!Number.isFinite(y)||g<=0||y<=0)throw new RangeError("explodeChildren requires positive, resolved source dimensions.");for(var m=function(e,r,n){var i="function"==typeof r?r.call(t,n):r,a=Number(o.D.getInitialTargetValue(t,e,i));if(!Number.isFinite(a)||("width"===e||"height"===e)&&a<=0)throw new RangeError("explodeChildren fragment ".concat(n," requires a valid ").concat(e,"."));return a},b="gpu"===c?t.childHandles.length:t.getChildren().length,T=a.d.isDefined(u.instances)?o.D.getTargetInstances(t,r,u):void 0,w={key:r,renderer:c,columns:void 0,rows:void 0,count:0,width:g,height:y,particleWidth:void 0,particleHeight:void 0,firstExplodeChild:b,fragments:[]},k=[],S=1e-7,x=0,E=0,C=0;void 0===T?E<y-S:k.length<T;){var M,P,D,O=k.length;if(O>=2e4)throw new RangeError("explodeChildren exceeded ".concat(2e4," fragments. Specify instances or larger dimensions."));var L=d?d.call(t,O):null!=h?h:{};if(!L||"object"!==I(L)||Array.isArray(L))throw new TypeError("explodeChildren.value(".concat(O,") must return a child definition object."));var j=a.d.cloneTargetDefinition(A(A({},L),{},{width:null!==(M=L.width)&&void 0!==M?M:20,height:null!==(P=L.height)&&void 0!==P?P:20,isInFlow:null!==(D=L.isInFlow)&&void 0!==D&&D})),_=m("width",j.width,O),R=m("height",j.height,O),N=x,V=E,F=a.d.isDefined(j.x)?m("x",j.x,O):N,B=a.d.isDefined(j.y)?m("y",j.y,O):V,H=Math.min(_,g-F),U=Math.min(R,y-B);if(H<=S||U<=S){if(void 0!==T)throw new RangeError("explodeChildren cannot fit fragment ".concat(O," within the source dimensions."));break}if(F<0||F>=g||B<0||B>=y)throw new RangeError("explodeChildren fragment ".concat(O," starts outside the source image (").concat(F,", ").concat(B,")."));var q=Math.min(_,g-F),W=Math.min(R,y-B);j.x=F,j.y=B,j.width=q,j.height=W,w.fragments.push({index:O,x:F,y:B,width:q,height:W,layoutX:N,layoutY:V}),k.push(j),x+=H,C=Math.max(C,U),x>=g-S&&(x=0,E+=C,C=0)}w.count=w.fragments.length,t.explodeChildrenState=w;for(var $=k.some(s)?t.captureExplodeSource(g,y,f):void 0,K=[],G=0;G<k.length;G++){var z,Y=k[G],X=w.fragments[G],Q=X.x,Z=X.y,J=X.layoutX,ee=X.layoutY;if("gpu"!==c){var te=s(Y);te&&(Y.backgroundImage={enabledOn:!1,value:function(){var e=this.val("backgroundColor");return a.d.isDefined(e)&&""!==e?"none":'url("'.concat(w.imageUrl,'")')}},Y.backgroundSize="".concat(g,"px ").concat(y,"px"),Y.backgroundPosition="-".concat(Q,"px -").concat(Z,"px"),Y.backgroundRepeat="no-repeat");var re=t.addedChildren.length;t.addChild(Y);var ne=null===(z=t.addedChildren[re])||void 0===z?void 0:z.child;if(!ne)throw new Error("Could not create DOM fragment ".concat(G,"."));ne.layoutX=J,ne.layoutY=ee,ne.targets.excludeXYCalc=!0,ne.setLayoutX(Q),ne.setLayoutY(Z),te&&K.push(ne)}else{if(!t.addGpuChild(Y))throw new Error("Could not create GPU fragment ".concat(G,"."));var ie=t.childHandles[b+G];ie.layoutX=J,ie.layoutY=ee,ie.targets.excludeXYCalc=!0,ie.setLayoutX(Q),ie.setLayoutY(Z)}}if(t.explodeCapturePromise=$?$.then((function(r){return e.applyExplodeCapture(t,w,r,K)})).catch((function(e){return t.explodeChildrenState===w&&(w.captureError=e),console.error("Could not prepare explode image:",e),!1})):void 0,"gpu"===c)return t.finalizeChildrenTarget(r)}},{key:"applyExplodeCapture",value:(l=M().mark((function e(t,r,i,a){var o,l,s,u,c;return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.explodeChildrenState===r){e.next=2;break}return e.abrupt("return",!1);case 2:if("gpu"!==r.renderer){e.next=4;break}return e.abrupt("return",t.particleRenderer.setExplodeSource(i));case 4:return o=i.canvas.toDataURL("image/png"),(l=new Image).src=o,e.next=9,l.decode();case 9:if(t.explodeChildrenState===r){e.next=11;break}return e.abrupt("return",!1);case 11:r.imageUrl=o,t.getChildren(),s=P(a),e.prev=14,s.s();case 16:if((u=s.n()).done){e.next=24;break}if(c=u.value,t.allChildrenMap[c.oid]===c){e.next=20;break}return e.abrupt("continue",22);case 20:c.targets.backgroundImage.enabledOn=!0,c.addToActiveTargets("backgroundImage");case 22:e.next=16;break;case 24:e.next=29;break;case 26:e.prev=26,e.t0=e.catch(14),s.e(e.t0);case 29:return e.prev=29,s.f(),e.finish(29);case 32:return t.markLayoutDirty("domExplodeImagesReady"),(0,n.fB)().schedule(1,"dom-explode-".concat(t.oid)),e.abrupt("return",!0);case 35:case"end":return e.stop()}}),e,null,[[14,26,29,32]])})),s=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=l.apply(e,t);function a(e){O(i,r,n,a,o,"next",e)}function o(e){O(i,r,n,a,o,"throw",e)}a(void 0)}))},function(e,t,r,n){return s.apply(this,arguments)})},{key:"resolveSource",value:function(e,t){var r;return"function"==typeof t&&(t=t.call(e)),null!==(r=t)&&void 0!==r?r:e}},{key:"resolveDomElement",value:function(e){return e instanceof Element?e:e instanceof oe?null===(t=e.$dom)||void 0===t?void 0:t.element:(null==e?void 0:e.element)instanceof Element?e.element:void 0;var t}},{key:"getSourceDimensions",value:function(e,t){var r,n;if(e instanceof oe&&(r=Number(e.getWidth()),n=Number(e.getHeight())),!Number.isFinite(r)||!Number.isFinite(n)||r<=0||n<=0){var i=t.getBoundingClientRect();r=i.width,n=i.height}return{width:r,height:n}}},{key:"getExplodeFragment",value:function(e,t){var r=t-e.firstExplodeChild;if(!(r<0||r>=e.count)){if(e.fragments)return e.fragments[r];var n=r%e.columns,i=Math.floor(r/e.columns),a=n*e.particleWidth,o=i*e.particleHeight;return{index:r,x:a,y:o,width:Math.min(e.particleWidth,e.width-a),height:Math.min(e.particleHeight,e.height-o)}}}}],r&&_(t.prototype,r),i&&_(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,i,l,s}();function V(e){return V="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},V(e)}function F(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return B(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function H(){H=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new O(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};u(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,o,l){var s=d(e[i],e,a);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==V(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var s=M(l,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var u=d(t,r,n);if("normal"===u.type){if(i=n.done?p:f,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=p,n.method="throw",n.arg=u.arg)}}}function M(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,M(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(V(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),u(S,s,"Generator"),u(S,o,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;D(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function U(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function q(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){U(a,n,i,o,l,"next",e)}function l(e){U(a,n,i,o,l,"throw",e)}o(void 0)}))}}function W(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$(n.key),n)}}function $(e){var t=function(e,t){if("object"!=V(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=V(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==V(t)?t:t+""}var K=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,r=null,n=[{key:"captureSource",value:(l=q(H().mark((function t(r,n,i,a){var o,l,s,u,c;return H().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=2;break}throw new Error("explodeChildren cannot capture a UI without a DOM element.");case 2:if(!(!Number.isFinite(n)||!Number.isFinite(i)||n<=0||i<=0)){t.next=4;break}throw new RangeError("explodeChildren requires positive dimensions before capturing.");case 4:if(!(r instanceof HTMLImageElement)){t.next=6;break}return t.abrupt("return",e.captureImage(r,n,i));case 6:if(null===(o=document.fonts)||void 0===o||!o.ready){t.next=9;break}return t.next=9,document.fonts.ready;case 9:if(l=window.devicePixelRatio||1,(s=document.createElement("canvas")).width=Math.max(1,Math.round(n*l)),s.height=Math.max(1,Math.round(i*l)),s.style.width="".concat(n,"px"),s.style.height="".concat(i,"px"),u=s.getContext("2d")){t.next=18;break}throw new Error("Could not create a 2D context for explodeChildren capture.");case 18:return u.scale(l,l),c=r.getBoundingClientRect(),t.next=22,e.drawElement(u,r,c,a);case 22:return t.abrupt("return",{canvas:s,width:n,height:i,pixelRatio:l});case 23:case"end":return t.stop()}}),t)}))),function(e,t,r,n){return l.apply(this,arguments)})},{key:"drawElement",value:(o=q(H().mark((function t(r,n,i,a){var o,l,s,u,c,d,h,f,v;return H().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n!==(null==a?void 0:a())){t.next=2;break}return t.abrupt("return");case 2:return o=n.getBoundingClientRect(),l=getComputedStyle(n),s=o.left-i.left,u=o.top-i.top,c=o.width,d=o.height,r.save(),e.clipBorderRadius(r,l,s,u,c,d),"rgba(0, 0, 0, 0)"!==l.backgroundColor&&(r.fillStyle=l.backgroundColor,r.fillRect(s,u,c,d)),t.next=13,e.drawBackgroundImage(r,l,s,u,c,d);case 13:if(!(n instanceof HTMLImageElement)){t.next=20;break}if(n.complete){t.next=17;break}return t.next=17,n.decode().catch((function(){}));case 17:return r.drawImage(n,s,u,c,d),r.restore(),t.abrupt("return");case 20:if(!(n instanceof HTMLCanvasElement)){t.next=25;break}return t.next=23,e.drawCanvas(r,n,s,u,c,d);case 23:return r.restore(),t.abrupt("return");case 25:r.restore(),e.drawText(r,n,i),h=F(n.children),t.prev=28,h.s();case 30:if((f=h.n()).done){t.next=36;break}return v=f.value,t.next=34,e.drawElement(r,v,i);case 34:t.next=30;break;case 36:t.next=41;break;case 38:t.prev=38,t.t0=t.catch(28),h.e(t.t0);case 41:return t.prev=41,h.f(),t.finish(41);case 44:case"end":return t.stop()}}),t,null,[[28,38,41,44]])}))),function(e,t,r,n){return o.apply(this,arguments)})},{key:"drawBackgroundImage",value:(a=q(H().mark((function t(r,n,i,a,o,l){var s,u,c,d,h,f,v,p,g,y,m;return H().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((s=n.backgroundImage)&&"none"!==s){t.next=3;break}return t.abrupt("return");case 3:if(null!=(u=s.match(/url\((['"]?)(.*?)\1\)/))&&u[2]){t.next=6;break}return t.abrupt("return");case 6:return t.next=8,e.loadBackgroundImage(u[2]);case 8:if(c=t.sent){t.next=11;break}return t.abrupt("return");case 11:if(d=c.naturalWidth,h=c.naturalHeight,d&&h){t.next=15;break}return t.abrupt("return");case 15:f=o,v=l,"cover"===n.backgroundSize?(p=Math.max(o/d,l/h),f=d*p,v=h*p):"contain"===n.backgroundSize&&(g=Math.min(o/d,l/h),f=d*g,v=h*g),y=i+e.getBackgroundPosition(n.backgroundPositionX,o,f),m=a+e.getBackgroundPosition(n.backgroundPositionY,l,v),r.save(),r.beginPath(),r.rect(i,a,o,l),r.clip(),r.drawImage(c,y,m,f,v),r.restore();case 26:case"end":return t.stop()}}),t)}))),function(e,t,r,n,i,o){return a.apply(this,arguments)})},{key:"drawCanvas",value:(i=q(H().mark((function e(t,r,n,i,a,o){var l,s;return H().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof r.captureBitmap){e.next=6;break}return e.next=3,r.captureBitmap();case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=r;case 7:if(l=e.t0){e.next=10;break}return e.abrupt("return");case 10:try{t.drawImage(l,n,i,a,o)}finally{l!==r&&(null===(s=l.close)||void 0===s||s.call(l))}case 11:case"end":return e.stop()}}),e)}))),function(e,t,r,n,a,o){return i.apply(this,arguments)})},{key:"getBackgroundPosition",value:function(e,t,r){var n=t-r;if(!e)return 0;if((e=e.trim()).endsWith("%")){var i=parseFloat(e);return Number.isFinite(i)?n*i/100:0}if(e.endsWith("px")){var a=parseFloat(e);return Number.isFinite(a)?a:0}switch(e){case"center":return n/2;case"right":case"bottom":return n;default:return 0}}},{key:"loadBackgroundImage",value:function(e){return new Promise((function(t){var r=new Image;try{new URL(e,document.baseURI).origin!==window.location.origin&&(r.crossOrigin="anonymous")}catch(e){}r.onload=function(){return t(r)},r.onerror=function(){console.warn("Could not load explodeChildren background image: ".concat(e)),t(void 0)},r.src=e}))}},{key:"clipBorderRadius",value:function(e,t,r,n,i,a){var o=[parseFloat(t.borderTopLeftRadius)||0,parseFloat(t.borderTopRightRadius)||0,parseFloat(t.borderBottomRightRadius)||0,parseFloat(t.borderBottomLeftRadius)||0];o.some((function(e){return e>0}))&&(e.beginPath(),e.roundRect(r,n,i,a,o),e.clip())}},{key:"drawText",value:function(e,t,r){var n,i=getComputedStyle(t),a=F(t.childNodes);try{for(a.s();!(n=a.n()).done;){var o,l,s,u=n.value;if(u.nodeType===Node.TEXT_NODE&&null!==(o=u.textContent)&&void 0!==o&&o.trim()){var c=document.createRange();c.selectNodeContents(u);var d=c.getBoundingClientRect();e.font=[i.fontStyle,i.fontWeight,i.fontSize,i.fontFamily].filter(Boolean).join(" "),e.fillStyle=i.color,e.textBaseline="alphabetic";var h=e.measureText(u.textContent),f=parseFloat(i.fontSize),v=null!==(l=h.fontBoundingBoxAscent)&&void 0!==l?l:.8*f,p=null!==(s=h.fontBoundingBoxDescent)&&void 0!==s?s:.2*f,g=d.left-r.left,y=d.top-r.top+(d.height-v-p)/2+v;e.fillText(u.textContent,g,y)}}}catch(e){a.e(e)}finally{a.f()}}},{key:"captureImage",value:function(e,t,r){var n=window.devicePixelRatio||1,i=document.createElement("canvas");i.width=Math.max(1,Math.round(t*n)),i.height=Math.max(1,Math.round(r*n)),i.style.width="".concat(t,"px"),i.style.height="".concat(r,"px");var a=i.getContext("2d");if(!a)throw new Error("Could not create a 2D context for explodeChildren image capture.");return a.scale(n,n),a.drawImage(e,0,0,t,r),{canvas:i,width:t,height:r,pixelRatio:n}}}],r&&W(t.prototype,r),n&&W(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n,i,a,o,l}();function G(){G=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),l=new O(n||[]);return i(o,"_invoke",{value:C(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",p="completed",g={};function y(){}function m(){}function b(){}var T={};u(T,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==r&&n.call(k,o)&&(T=k);var S=b.prototype=y.prototype=Object.create(T);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,o,l){var s=d(e[i],e,a);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==X(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var i=h;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var s=M(l,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var u=d(t,r,n);if("normal"===u.type){if(i=n.done?p:f,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=p,n.method="throw",n.arg=u.arg)}}}function M(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,M(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(X(t)+" is not iterable")}return m.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(S),u(S,s,"Generator"),u(S,o,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;D(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function z(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function Y(e){return function(e){if(Array.isArray(e))return J(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Z(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 X(e){return X="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},X(e)}function Q(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Z(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function Z(e,t){if(e){if("string"==typeof e)return J(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(e,t):void 0}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,te(n.key),n)}}function te(e){var t=function(e,t){if("object"!=X(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=X(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==X(t)?t:t+""}function re(e,t,r){return t=ie(t),function(e,t){if(t&&("object"==X(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ne()?Reflect.construct(t,r||[],ie(e).constructor):t.apply(e,r))}function ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ne=function(){return!!e})()}function ie(e){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(e)}function ae(e,t){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ae(e,t)}var oe=function(e){function t(e,r,n){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=re(this,t,[e,r,n,a])).allChildrenList=[],i.allChildrenMap={},i.childrenUpdateFlag=!1,i.$dom=null,i.x=0,i.y=0,i.absX=0,i.absY=0,i.domHeightTimestamp=0,i.domWidthTimestamp=0,i.contentWidth=0,i.contentHeight=0,i.bottomBaseWidth=0,i.topBaseHeight=0,i.styleMap={},i.tfMap={},i.visibilityStatus=void 0,i.hasDomNow=!1,i.isNowVisible=!1,i.currentStatus="new",i.dirtyLayout=!1,i.originWindowEpoch=-1,i.initTargets(),i.restoringRuntime=!1,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ae(e,t)}(t,e),r=t,i=[{key:"createViewport",value:function(){this.viewport=this.viewport||new T.L;var e=this.getScrollTop(),t=-this.getScrollLeft(),r=-e;return this.viewport.xNext=t,this.viewport.xNorth=t,this.viewport.xEast=t,this.viewport.xSouth=t,this.viewport.xWest=t,this.viewport.scrollLeft=t,this.viewport.scrollTop=r,this.viewport.absX=this.absX,this.viewport.absY=this.absY,this.viewport.xOverflowReset=t,this.viewport.xOverflowLimit=t+this.getWidth(),this.viewport.yNext=r,this.viewport.yNorth=r,this.viewport.yWest=r,this.viewport.yEast=r,this.viewport.ySouth=r,this.calcContentWidthHeight(),this.viewport.setContainer(this),this.viewport}},{key:"calcContentWidthHeight",value:function(){this.contentHeight=this.viewport.ySouth-this.viewport.yNorth,this.contentWidth=this.viewport.xEast-this.viewport.xWest,this.topBaseHeight=this.viewport.yEast-this.viewport.yNorth,this.bottomBaseWidth=this.viewport.xSouth-this.viewport.xWest}},{key:"adjustViewport",value:function(){}},{key:"calcAbsolutePosition",value:function(e,t){this.absX=a.d.isDefined(this.val("absX"))?this.val("absX"):this.getParent().absX+e,this.absY=a.d.isDefined(this.val("absY"))?this.val("absY"):this.getParent().absY+t}},{key:"calcAbsolutePositionFromDom",value:function(){S.a.calcAbsolutePositionFromDom(this)}},{key:"removeChild",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reset,r=void 0!==t&&t;if(e&&this.allChildrenMap[e.oid]){if(r){var i,a=Q(this.functionTargetNames);try{for(a.s();!(i=a.n()).done;){var o,s,u=i.value,c=this.targetValues[u];(null!=c&&null!==(o=c.childAction)&&void 0!==o&&o.includes(e)||null!=c&&null!==(s=c.addChildAction)&&void 0!==s&&s.includes(e))&&l.g.resetRemovedChildTarget(this,u,e)}}catch(e){a.e(e)}finally{a.f()}}return l.g.resetBeforeDeletion(e),(0,n.EI)().markTModelDeleted(e),this.deletedChildren.push(e),this.removeFromUpdatingChildren(e),this.removeFromActiveChildren(e),this.removeFromAnimatingChildren(e),this.childrenUpdateFlag=!0,this.markLayoutDirty("removeChild"),(0,n.zw)().calcChildren(this),(0,n.fB)().schedule(1,"removeChild-"+e.oid),this}}},{key:"moveChild",value:function(e,t){return this.movedChildren.push({index:t,child:e}),e.hasDom()&&e.requiresDomRelocation()&&(e.domOrderIndex=t,e.activate()),this.childrenUpdateFlag=!0,this.markLayoutDirty("moveChild"),(0,n.fB)().schedule(1,"moveChild-"+this.oid+"-"+e.oid),this}},{key:"addChild",value:function(e){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.addedChildren.length+this.allChildrenList.length;if(!e||"object"!==X(e))return this;if(!(e instanceof t)){var o=a.d.cloneTargetDefinition(e),s=Object.keys(this.actualValues).find((function(t){return r.actualValues[t]===e})),u=o.id||s||"".concat(this.oid,"_");e=C.E.create(u,o,(function(e,r){return new t(e,r)}))}return this.childrenUpdateFlag=!0,e.toDiscard||(n.qw.tmodelIdMap[e.oid]=e,this.addedChildren.push({index:i,child:e}),e.parent=this,e.markLayoutDirty("addChild"),e.updatingTargetList.length>0&&this.addToUpdatingChildren(e),e.activeTargetList.length>0&&this.addToActiveChildren(e),l.g.markChildAction(this,l.g.currentTargetName,e)),this}},{key:"addSibling",value:function(e){this.getParent().addChild(e)}},{key:"removeSibling",value:function(e){var t=this;e||(e=this.getParent().getChildren().find((function(e){return e!==t}))),this.getParent().removeChild(e)}},{key:"getChildren",value:function(){var e,t,r,n=this,i=this.state();if((null===(e=i.deletedChildren)||void 0===e?void 0:e.length)>0&&(this.deletedChildren.forEach((function(e){if(n.allChildrenMap[e.oid]){var t=n.allChildrenList.indexOf(e);n.lastChildrenUpdate.deletions.push(e),n.allChildrenList.splice(t,1),delete n.allChildrenMap[e.oid]}})),this.deletedChildren.length=0),(null===(t=i.addedChildren)||void 0===t?void 0:t.length)>0&&(this.addedChildren.sort((function(e,t){return e.index-t.index})),this.addedChildren.forEach((function(e){var t=e.index,r=e.child;n.allChildrenMap[r.oid]||(t>=n.allChildrenList.length?n.allChildrenList.push(r):n.allChildrenList.splice(t,0,r),n.allChildrenMap[r.oid]=r,n.lastChildrenUpdate.additions.push({index:t,child:r}))})),this.addedChildren.length=0),(null===(r=i.movedChildren)||void 0===r?void 0:r.length)>0){this.movedChildren.sort((function(e,t){return e.index-t.index}));var a={},o={};this.movedChildren.forEach((function(e){var t=e.index,r=e.child;n.lastChildrenUpdate.deletions.push(r),n.lastChildrenUpdate.additions.push({index:t,child:r});var i=n.allChildrenList.indexOf(r);if(t!==i){o[r.oid]&&delete o[r.oid];var l=n.allChildrenList.splice(t,1,r);!a[t]&&l.length>0&&(o[l[0].oid]={child:l[0],index:t+1}),i>=0&&(a[i]={fromIndex:i<t?i:t,child:r}),a[t]&&delete a[t]}})),Object.values(o).forEach((function(e){var t=e.index,r=e.child;n.allChildrenList.splice(t,0,r)})),Object.values(a).forEach((function(e){var t=e.fromIndex,r=e.child,i=n.allChildrenList.indexOf(r,t);n.allChildrenList.splice(i,1)})),this.movedChildren.length=0}return this.allChildrenList}},{key:"removeChildren",value:function(){var e=Y(this.getChildren());if(0===e.length)return this;this.markLayoutDirty("removeChildren");var t,r=(0,n.EI)(),i=Q(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;l.g.resetBeforeDeletion(a),a.cancelAnimation(),delete r.visibleOidMap[a.oid],delete r.preservedDomMap[a.oid],r.domPolicyMap.delete(a.oid),r.deletedTModelRoots.delete(a)}}catch(e){i.e(e)}finally{i.f()}this.hasDom()&&this.$dom.deleteAll();var o,s=Q(e);try{for(s.s();!(o=s.n()).done;){var u=o.value;r.resetTModelDom(u)}}catch(e){s.e(e)}finally{s.f()}return this.allChildrenList=[],this.allChildrenMap={},this.clearUpdatingChildren(),this.clearActiveChildren(),this.clearAnimatingChildren(),this}},{key:"createExplodeChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return N.createExplodeChildren(this,e,t)}},{key:"captureExplodeSource",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getWidth(),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getHeight(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,i=N.resolveDomElement(n);return K.captureSource(i,t,r,(function(){var t;return null===(t=e.particleRenderer)||void 0===t?void 0:t.canvasLayer}))}},{key:"restoreExplodeSource",value:(u=G().mark((function e(){var t,r,n,i,a;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=this.explodeChildrenState)&&this.hasDom()){e.next=3;break}return e.abrupt("return",!0);case 3:if(n=null!==(t=this.targets[r.key])&&void 0!==t?t:{},i=N.resolveSource(this,n.dom),N.resolveDomElement(i)){e.next=8;break}return e.abrupt("return",!1);case 8:return e.next=10,this.captureExplodeSource(r.width,r.height,i);case 10:return a=e.sent,e.abrupt("return",this.particleRenderer.setExplodeSource(a));case 12:case"end":return e.stop()}}),e,this)})),c=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=u.apply(e,t);function a(e){z(i,r,n,a,o,"next",e)}function o(e){z(i,r,n,a,o,"throw",e)}a(void 0)}))},function(){return c.apply(this,arguments)})},{key:"getExplodeFragment",value:function(e){var t=this.explodeChildrenState;if(t)return N.getExplodeFragment(t,e)}},{key:"exists",value:function(){var e=this.getParent();return!!e&&(e.getChildren(),e.allChildrenMap[this.oid]===this)}},{key:"markEventDirty",value:function(){this.eventDirtyEpoch=(0,n.kQ)().eventEpoch,this.bracket&&this.bracket.markEventDirty(),this.parent&&this.parent.markEventDirty()}},{key:"hasEventDirty",value:function(){var e,t;return(null!==(e=this.eventDirtyEpoch)&&void 0!==e?e:-1)>(null!==(t=this.processedEventEpoch)&&void 0!==t?t:-1)}},{key:"markLayoutDirty",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;this.dirtyLayout||(this.dirtyLayout={oids:{},count:0}),this.dirtyLayout.oids[t.oid]||(this.dirtyLayout.oids[t.oid]=t,this.dirtyLayout.count++),t===this&&(e=t.oid+"#"+e),this.dirtyLayout.lastKey=e,this.bracket&&this.bracket.markLayoutDirty(e,t),this.parent&&this.parent.markLayoutDirty(e,t)}},{key:"removeLayoutDirty",value:function(e,t){var r=this;this.dirtyLayout&&(t?t.forEach((function(e){r.dirtyLayout.oids[e]&&(r.dirtyLayout.count--,delete r.dirtyLayout.oids[e])})):this.dirtyLayout.oids[e.oid]&&(this.dirtyLayout.count--,delete this.dirtyLayout.oids[e.oid]),0===this.dirtyLayout.count&&(this.dirtyLayout=!1)),this.bracket&&this.bracket.removeLayoutDirty(e,t),this.parent&&this.parent.removeLayoutDirty(e,t)}},{key:"getDirtyLayout",value:function(){return this.dirtyLayout}},{key:"shouldCalculateChildren",value:function(){if(a.d.isDefined(this.val("calculateChildren")))return this.val("calculateChildren");if(!this.isIncluded()||this.isDomIsland()&&!this.hasDom())return!1;var e=!1!==this.dirtyLayout,t=this.hasEventDirty(),r=this.hasDom(),n=this.isVisible(),i="active"===this.currentStatus||this.visibilityDirty||e||n&&t||this.isNowVisible||r&&t;return this.currentStatus=void 0,i}},{key:"getFirstChild",value:function(){return this.getChildren()[0]}},{key:"hasChildren",value:function(){return this.getChildren().length>0}},{key:"findChildren",value:function(e){return this.getChildren().filter((function(t){return t.type===e}))}},{key:"getLastChild",value:function(){return this.getChildren()[this.allChildrenList.length-1]}},{key:"getChild",value:function(e){return"number"==typeof e?this.getChildren()[e]:this.findChild(e)}},{key:"getChildIndex",value:function(e){return this.getChildren().indexOf(e)}},{key:"getChildrenOids",value:function(){return this.getChildren().map((function(e){return e.oid})).join(" ")}},{key:"findChild",value:function(e){return this.getChildren().find((function(t){return t.type===e}))}},{key:"findLastChild",value:function(e){return this.getChildren().findLast((function(t){return t.type===e}))}},{key:"getChildByOid",value:function(e){return this.getChildren(),this.allChildrenMap[e]}},{key:"getParentValue",value:function(e){var t;return null===(t=this.parent)||void 0===t?void 0:t.val(e)}},{key:"pval",value:function(e){return this.getParentValue(e)}},{key:"getParentValueAtMyIndex",value:function(e){var t=this.getParentValue(e);if(Array.isArray(t)){var r,n=null===(r=this.getParent())||void 0===r?void 0:r.getChildIndex(this);if("number"==typeof n)return t[n]}return t}},{key:"getLoadedItems",value:function(e){return this.val(a.d.getLoadTargetName(e))}},{key:"delVal",value:function(e){this.markLayoutDirty("del-".concat(e)),e.startsWith("_")?delete this[e.slice(1)]:delete this.actualValues[e]}},{key:"val",value:function(e,t){var r=this.actualValues,n=this.lastActualValues;return e=l.g.getTargetName(e),2===arguments.length?(n[e]=r[e],t!==r[e]&&(r[e]=t,this.markLayoutDirty("val-".concat(e))),this):r[e]}},{key:"lastVal",value:function(e){return this.lastActualValues[e]}},{key:"setActual",value:function(e,t){this.targetValues[e]&&(this.targetValues[e].actual=t)}},{key:"floorVal",value:function(e){var t;return Math.floor(null!==(t=this.val(e))&&void 0!==t?t:0)}},{key:"getDomParent",value:function(){return this.val("domParent")||k.X.findParentByTarget(this,"domHolder",!0)}},{key:"getDomHolder",value:function(){var e=this.val("domHolder");if(e&&!0!==e&&this.$dom!==e)return e;var t=this.getDomParent();return t?t.$dom:null}},{key:"debug",value:function(){var e=this;return[{oid:this.oid},{visible:this.isVisible()},{visibilityStatus:this.visibilityStatus},{complete:l.g.isTModelComplete(this)},{hasDom:this.hasDom()},{shouldCalculateChildren:this.shouldCalculateChildren()},{dirtyLayout:this.getDirtyLayout()},{x:this.getX()},{y:this.getY()},{width:this.getWidth()},{height:this.getHeight()},{targets:this.originalTargetNames},{completedTargets:Object.keys(this.targetValues).filter((function(t){var r;return"complete"===(null===(r=e.targetValues[t])||void 0===r?void 0:r.status)})).length},{activeTargetList:this.activeTargetList},{activatedTargets:this.activatedTargets},{updatingTargetList:this.updatingTargetList},{animatingMap:Y(this.animatingMap?Y(this.animatingMap.keys()):[])},{noDomUpdatingTargets:Y(this.noDomUpdatingTargets?Y(this.noDomUpdatingTargets):[])},{pendingTargets:Y(this.pendingTargets?Y(this.pendingTargets):[])},{styleTargetMap:Y(this.styleTargetMap?Y(this.styleTargetMap.keys()):[])},{asyncStyleTargetMap:Y(this.asyncStyleTargetMap?Y(this.asyncStyleTargetMap.keys()):[])},{passiveTargetList:this.passiveTargetList},{incompleteTargets:Object.keys(this.targetValues).filter((function(t){var r;return"complete"!==(null===(r=e.targetValues[t])||void 0===r?void 0:r.status)})).map((function(t){var r;return"".concat(t,":").concat(null===(r=e.targetValues[t])||void 0===r?void 0:r.status)}))},{updatingChildren:this.updatingChildrenMap?Y(this.updatingChildrenMap.keys()):[]},{activeChildren:this.activeChildrenMap?Y(this.activeChildrenMap.keys()):[]},{children:this.getChildren()},{visibleChildren:this.visibleChildren},{allVisibleChildren:this.getChildren().filter((function(e){return e.isVisible()}))},{allInvisibleChilden:this.getChildren().filter((function(e){return!e.isVisible()}))},{targetValues:this.targetValues},{actualValues:this.actualValues}]}},{key:"logTree",value:function(){a.d.logTree(this)}},{key:"isVisible",value:function(){return this.val("isVisible")}},{key:"makeVisible",value:function(){this.val("isVisible",!0),this.targets.isVisible=!0}},{key:"makeInvisible",value:function(){this.val("isVisible",!1),this.targets.isVisible=!1}},{key:"managesOwnScroll",value:function(){var e,t,r,n;return a.d.isDefined(this.val("managesOwnScroll"))?!!this.val("managesOwnScroll"):!!(this.allTargetMap.onScroll||this.allTargetMap.onScrollLeft||this.allTargetMap.onScrollTop||this.allTargetMap.onWindowScroll||0!==(null!==(e=null===(t=this.$dom)||void 0===t?void 0:t.getScrollTop())&&void 0!==e?e:0)||0!==(null!==(r=null===(n=this.$dom)||void 0===n?void 0:n.getScrollLeft())&&void 0!==r?r:0))}},{key:"calcVisibility",value:function(){return w.n.calcVisibility(this)}},{key:"validateVisibilityInParent",value:function(){return a.d.isDefined(this.val("validateVisibilityInParent"))?this.val("validateVisibilityInParent"):this.parent.managesOwnScroll()}},{key:"hasDomHolderChanged",value:function(){return!this.reuseDomDefinition()&&this.getDomHolder()&&this.getDomHolder().exists()&&this.$dom.parent()!==this.getDomHolder().element}},{key:"hasBaseElementChanged",value:function(){return!!this.hasDom()&&this.getBaseElement()!==this.$dom.getTagName()}},{key:"mount",value:function(e){return x.v.mount(this,e),this}},{key:"unmount",value:function(){var e;this.hasDom()&&this.val("sourceDom")&&this.domState&&x.v.restoreDomState(this.$dom.element,this.domState),null===(e=this.parent)||void 0===e||e.removeChild(this)}},{key:"hasDom",value:function(){return!!this.$dom&&this.$dom.exists()}},{key:"isDomIsland",value:function(){return this.val("domIsland")}},{key:"getRealParent",value:function(){return this.parent}},{key:"getContentHeight",value:function(){return this.contentHeight}},{key:"getContentWidth",value:function(){return this.contentWidth}},{key:"useContentWidth",value:function(){return S.a.useContentWidth(this)}},{key:"useContentHeight",value:function(){return S.a.useContentHeight(this)}},{key:"getBaseWidth",value:function(){var e;return null!==(e=this.val("baseWidth"))&&void 0!==e?e:this.getWidth()}},{key:"getBaseHeight",value:function(){var e;return null!==(e=this.val("baseHeight"))&&void 0!==e?e:this.getHeight()}},{key:"getMinWidth",value:function(){var e;return null!==(e=this.val("minWidth"))&&void 0!==e?e:Math.min(this.getWidth(),this.getBaseWidth())}},{key:"getTopBaseHeight",value:function(){var e;return null!==(e=this.val("topBaseHeight"))&&void 0!==e?e:0}},{key:"getLayoutHeight",value:function(){var e=this.getHeight();return this.usesContentBoxSizing()&&(e+=this.getPaddingTop()+this.getPaddingBottom()),e}},{key:"getLayoutWidth",value:function(){var e=this.getWidth();return this.usesContentBoxSizing()&&(e+=this.getPaddingLeft()+this.getPaddingRight()),e}},{key:"usesContentBoxSizing",value:function(){return"border-box"!==this.getBoxSizing()}},{key:"getBoxSizing",value:function(){var e,t,r;return null!==(e=null!==(t=null!==(r=this.val("boxSizing"))&&void 0!==r?r:this.val("box-sizing"))&&void 0!==t?t:this.getParentValue("boxSizing"))&&void 0!==e?e:"content-box"}},{key:"getContainerOverflowMode",value:function(){var e;return null!==(e=this.val("containerOverflowMode"))&&void 0!==e?e:"auto"}},{key:"getItemOverflowMode",value:function(){var e=this.targets.itemOverflowMode;if(void 0!==e)return"function"==typeof e?e.call(this):e;var t=this.val("itemOverflowMode");return void 0!==t?t:"auto"}},{key:"getUIDepth",value:function(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e}},{key:"canBeAnimated",value:function(e){return s.u.isGpuPreferred(e)&&!1!==this.actualValues.webAnimation}},{key:"isTextOnly",value:function(){return a.d.isDefined(this.val("textOnly"))?this.val("textOnly"):"string"!=typeof this.getHtml()||!this.getHtml().trim().startsWith("<")}},{key:"getHtml",value:function(){return this.val("html")}},{key:"isInFlow",value:function(){return!a.d.isDefined(this.val("isInFlow"))||this.val("isInFlow")}},{key:"canHandleEvent",value:function(e){return!!this.allTargetMap[e]}},{key:"preventDefault",value:function(){return a.d.isDefined(this.val("preventDefault"))?this.val("preventDefault"):this.getParentValue("preventDefault")||!1}},{key:"excludeStyling",value:function(){return!1===this.targets.styling}},{key:"getBracketThreshold",value:function(){return this.val("bracketThreshold")}},{key:"getBracketSize",value:function(){return this.val("bracketSize")}},{key:"shouldBeBracketed",value:function(){return a.d.isDefined(this.val("shouldBeBracketed"))?this.val("shouldBeBracketed"):this.getChildren().length>this.getBracketThreshold()}},{key:"isIncluded",value:function(){return this.val("isIncluded")}},{key:"canHaveDom",value:function(){return!(this.targets.$dom&&!this.val("$dom"))&&this.val("canHaveDom")}},{key:"requiresDomRelocation",value:function(){return a.d.isDefined(this.val("requiresDomRelocation"))?this.val("requiresDomRelocation"):!a.d.isDefined(this.tfMap.x)&&!a.d.isDefined(this.tfMap.y)}},{key:"getBaseElement",value:function(){var e;return this.val("baseElement")||this.val("element")||(null===(e=this.$dom)||void 0===e||null===(e=e.element)||void 0===e||null===(e=e.tagName)||void 0===e?void 0:e.toLowerCase())}},{key:"getOpacity",value:function(){return this.val("opacity")}},{key:"getCenterX",value:function(){return(this.parent.getWidth()-this.getWidth())/2}},{key:"getCenterY",value:function(){return(this.parent.getHeight()-this.getHeight())/2}},{key:"getX",value:function(){return this.val("x")}},{key:"getY",value:function(){return this.val("y")}},{key:"getZ",value:function(){return this.val("z")}},{key:"getPerspective",value:function(){return this.val("perspective")}},{key:"getRotate",value:function(){return this.val("rotate")}},{key:"getRotateX",value:function(){return this.val("rotateX")}},{key:"getRotateY",value:function(){return this.val("rotateY")}},{key:"getRotateZ",value:function(){return this.val("rotateZ")}},{key:"getScale",value:function(){return this.val("scale")}},{key:"getScaleX",value:function(){return this.val("scaleX")}},{key:"getScaleY",value:function(){return this.val("scaleY")}},{key:"getScaleZ",value:function(){return this.val("scaleZ")}},{key:"getSkewX",value:function(){return this.val("skewX")}},{key:"getSkewY",value:function(){return this.val("skewY")}},{key:"getSkewZ",value:function(){return this.val("skewZ")}},{key:"getMeasuringScale",value:function(){var e;return null!==(e=this.val("measuringScale"))&&void 0!==e?e:1}},{key:"getZIndex",value:function(){return this.val("zIndex")}},{key:"getMarginTop",value:function(){var e,t;return null!==(e=null!==(t=this.val("marginTop"))&&void 0!==t?t:this.val("topMargin"))&&void 0!==e?e:S.a.getMarginValue(this,"top")}},{key:"getMarginLeft",value:function(){var e,t;return null!==(e=null!==(t=this.val("marginLeft"))&&void 0!==t?t:this.val("leftMargin"))&&void 0!==e?e:S.a.getMarginValue(this,"left")}},{key:"getMarginRight",value:function(){var e,t,r;return(null!==(e=null!==(t=this.val("marginRight"))&&void 0!==t?t:this.val("rightMargin"))&&void 0!==e?e:S.a.getMarginValue(this,"right"))+(null!==(r=this.getParentValue("gap"))&&void 0!==r?r:0)}},{key:"getMarginBottom",value:function(){var e,t,r;return(null!==(e=null!==(t=this.val("marginBottom"))&&void 0!==t?t:this.val("bottomMargin"))&&void 0!==e?e:S.a.getMarginValue(this,"bottom"))+(null!==(r=this.getParentValue("gap"))&&void 0!==r?r:0)}},{key:"getPaddingTop",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingTop"))&&void 0!==t?t:this.val("topPadding"))&&void 0!==e?e:S.a.getPaddingValue(this,"top")}},{key:"getPaddingLeft",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingLeft"))&&void 0!==t?t:this.val("leftPadding"))&&void 0!==e?e:S.a.getPaddingValue(this,"left")}},{key:"getPaddingRight",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingRight"))&&void 0!==t?t:this.val("rightPadding"))&&void 0!==e?e:S.a.getPaddingValue(this,"right")}},{key:"getPaddingBottom",value:function(){var e,t;return null!==(e=null!==(t=this.val("paddingBottom"))&&void 0!==t?t:this.val("bottomPadding"))&&void 0!==e?e:S.a.getPaddingValue(this,"bottom")}},{key:"setLayoutX",value:function(e){this.x=e}},{key:"setLayoutY",value:function(e){this.y=e}},{key:"getWidth",value:function(){return a.d.isDefined(this.targets.width)||a.d.isDefined(this.targetValues.width)?this.val("width"):a.d.isDefined(this.targets.dim)||a.d.isDefined(this.targetValues.dim)?this.val("dim"):this.val("width")}},{key:"getHeight",value:function(){return a.d.isDefined(this.targets.height)||a.d.isDefined(this.targetValues.height)?this.val("height"):a.d.isDefined(this.targets.dim)||a.d.isDefined(this.targetValues.dim)?this.val("dim"):this.val("height")}},{key:"getScrollTop",value:function(){return this.val("scrollTop")}},{key:"getScrollLeft",value:function(){return this.val("scrollLeft")}},{key:"getCss",value:function(){return this.val("css")}},{key:"getStyle",value:function(){return this.val("style")}},{key:"getBackground",value:function(){return this.val("background")}},{key:"getBackgroundColor",value:function(){return this.val("backgroundColor")}},{key:"getAttributes",value:function(){return this.val("attributes")}},{key:"getInputValue",value:function(){return this.hasDom()?this.$dom.value():void 0}},{key:"isFormControl",value:function(){var e,t=this.getBaseElement();return"input"===t||"select"===t||"textarea"===t||(null===(e=this.$dom)||void 0===e||null===(e=e.element)||void 0===e?void 0:e.isContentEditable)}},{key:"isOverflowHidden",value:function(){return"hidden"===this.val("overflow")}},{key:"reuseDomDefinition",value:function(){return this.val("reuseDomDefinition")}},{key:"createRuntimeSnapshot",value:function(){return E.s.createRuntimeSnapshot(this)}},{key:"handleSpecialTarget",value:function(){return!1}},{key:"handleSpecialTargetStep",value:function(){return!1}},{key:"handleSpecialTargetEnd",value:function(){return!1}},{key:"finalizeChildrenTarget",value:function(){return!1}},{key:"onDomAvailable",value:function(){}}],i&&ee(r.prototype,i),o&&ee(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i,o,u,c}(b)},611:function(e,t,r){function n(e){return n="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},n(e)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){s=!0,o=e},f:function(){try{l||null==r.return||r.return()}finally{if(s)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}r.d(t,{E:function(){return d}});var s,u,c,d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,n=[{key:"register",value:function(t,r){e.factories.push({match:t,create:r})}},{key:"create",value:function(e,t,r){for(var n=arguments.length,a=new Array(n>3?n-3:0),o=3;o<n;o++)a[o-3]=arguments[o];var l,s=i(this.factories);try{for(s.s();!(l=s.n()).done;){var u=l.value;if(u.match(t))return u.create.apply(u,[e,t].concat(a))}}catch(e){s.e(e)}finally{s.f()}return r.apply(void 0,[e,t].concat(a))}}],(r=null)&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();s=d,c=[],(u=l(u="factories"))in s?Object.defineProperty(s,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):s[u]=c},249:function(e,t,r){r.d(t,{a:function(){return x}});var n=r(34),i=r(333),a=r(585),o=r(855),l=r(768),s=r(737),u=r(421);function c(e){return c="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},c(e)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return(t=S(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(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 p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function y(e,t){if(e){if("string"==typeof e)return m(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function b(){b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,o=Object.create(a.prototype),l=new A(n||[]);return i(o,"_invoke",{value:P(e,r,l)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var f="suspendedStart",v="suspendedYield",p="executing",g="completed",y={};function m(){}function T(){}function w(){}var k={};u(k,o,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(j([])));x&&x!==r&&n.call(x,o)&&(k=x);var E=w.prototype=m.prototype=Object.create(k);function C(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(i,a,o,l){var s=h(e[i],e,a);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==c(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(d).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function P(t,r,n){var i=f;return function(a,o){if(i===p)throw Error("Generator is already running");if(i===g){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var s=D(l,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var u=h(t,r,n);if("normal"===u.type){if(i=n.done?g:v,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=g,n.method="throw",n.arg=u.arg)}}}function D(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,D(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(c(t)+" is not iterable")}return T.prototype=w,i(E,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:T,configurable:!0}),T.displayName=u(w,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,u(e,s,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},C(M.prototype),u(M.prototype,l,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new M(d(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(E),u(E,s,"Generator"),u(E,o,(function(){return this})),u(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return l.type="throw",l.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function T(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function w(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){T(a,n,i,o,l,"next",e)}function l(e){T(a,n,i,o,l,"throw",e)}o(void 0)}))}}function k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S(n.key),n)}}function S(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}var x=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,r=null,c=[{key:"restoreScroll",value:(f=w(b().mark((function e(t){var r,n;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.scrollLeft||0,n=t.scrollTop||0,window.scrollTo(r,n),0!==r||0!==n){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,new Promise(requestAnimationFrame);case 7:return window.scrollTo(r,n),e.next=10,new Promise(requestAnimationFrame);case 10:window.scrollTo(r,n);case 11:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)})},{key:"getRootDom",value:function(){return l.J.query("#tgjs-root")?new l.J("#tgjs-root"):new l.J("body")}},{key:"getPageDom",value:function(){return new l.J("body")}},{key:"captureDomState",value:function(e){var t=null==e?void 0:e.getElement();if(t){for(var r,n=[],i=[],a=t.ownerDocument,o=a.activeElement,l=o===a.body||o===a.documentElement?null:o,s=a.createTreeWalker(t,NodeFilter.SHOW_ELEMENT),u=t,c=0,d=0,h=-1;u;){var f=u.localName;switch(u===l&&(h=c),f){case"input":var v=d++;"file"!==u.type&&n.push({index:c,controlIndex:v,kind:f,value:u.value,checked:u.checked,indeterminate:u.indeterminate});break;case"textarea":n.push({index:c,controlIndex:d++,kind:f,value:u.value});break;case"select":for(var p=u.options,g=new Array(p.length),y=0;y<p.length;y++)g[y]=p[y].selected;n.push({index:c,controlIndex:d++,kind:f,selected:g});break;case"details":n.push({index:c,controlIndex:d++,kind:f,open:u.open})}var m=u.scrollLeft,b=u.scrollTop;(m||b)&&i.push({index:c,scrollLeft:m,scrollTop:b}),u=s.nextNode(),c++}return h>=0&&"number"==typeof l.selectionStart&&(r={start:l.selectionStart,end:l.selectionEnd,direction:l.selectionDirection}),{controls:n,scrollPositions:i,activeIndex:h,selection:r}}}},{key:"restoreMountedDom",value:function(e,t){var r=null==e?void 0:e.getElement(),n=null==t?void 0:t.controls;if(r&&null!=n&&n.length){var i,a="input,textarea,select,details",o=r.matches(a)?1:0,l=r.querySelectorAll(a),s=g(n);try{for(s.s();!(i=s.n()).done;){var u=i.value,c=o&&0===u.controlIndex?r:l[u.controlIndex-o];if(c&&c.localName===u.kind)switch(u.kind){case"input":c.value!==u.value&&(c.value=u.value),c.checked!==u.checked&&(c.checked=u.checked),c.indeterminate!==u.indeterminate&&(c.indeterminate=u.indeterminate);break;case"textarea":c.value!==u.value&&(c.value=u.value);break;case"select":for(var d=c.options,h=u.selected||[],f=0;f<d.length;f++){var v=!0===h[f];d[f].selected!==v&&(d[f].selected=v)}break;case"details":c.open!==u.open&&(c.open=u.open)}}}catch(e){s.e(e)}finally{s.f()}}}},{key:"restoreDomInteractionState",value:(d=w(b().mark((function e(t,r){var n,i,a,o,l,s,u,c,d,h,f,v,p,g,y,m,T,w,k,S=arguments;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(S.length>2&&void 0!==S[2]?S[2]:{}).focus,a=void 0===i?"editable":i,(o=null==t?void 0:t.getElement())&&r){e.next=4;break}return e.abrupt("return");case 4:if(l=r.scrollPositions||[],s=null!==(n=r.activeIndex)&&void 0!==n?n:-1,o===o.ownerDocument.body&&0===s&&(s=-1),l.length||!(s<0)){e.next=9;break}return e.abrupt("return");case 9:for(u=l.length?l[l.length-1].index:-1,c=Math.max(s,u),d=o.ownerDocument.createTreeWalker(o,NodeFilter.SHOW_ELEMENT),h=o,v=0,p=0;h&&p<=c;p++,h=d.nextNode())p===s&&(f=h),v<l.length&&l[v].index===p&&(g=l[v++],y=h.scrollLeft,m=h.scrollTop,y!==g.scrollLeft&&(h.scrollLeft=g.scrollLeft),m!==g.scrollTop&&(h.scrollTop=g.scrollTop));if(f&&"none"!==a){e.next=17;break}return e.abrupt("return");case 17:if("editable"!==a){e.next=22;break}if("textarea"===(T=f.localName)||"select"===T||"input"===T&&"hidden"!==f.type||f.isContentEditable){e.next=22;break}return e.abrupt("return");case 22:try{f.focus({preventScroll:!0})}catch(e){null===(w=(k=f).focus)||void 0===w||w.call(k)}if(r.selection&&"function"==typeof f.setSelectionRange)try{f.setSelectionRange(r.selection.start,r.selection.end,r.selection.direction)}catch(e){}case 24:case"end":return e.stop()}}),e)}))),function(e,t){return d.apply(this,arguments)})},{key:"getMarginValue",value:function(e,t){var r=e.val("margin");if("number"==typeof r)return r;if(Array.isArray(r)){if(2===r.length){var n=p(r,2),i=n[0],a=n[1];return"top"===t||"bottom"===t?i:a}if(4===r.length){var o=p(r,4),l=o[0],s=o[1],u=o[2],c=o[3];if("top"===t)return l;if("right"===t)return s;if("bottom"===t)return u;if("left"===t)return c}}return 0}},{key:"getPaddingValue",value:function(e,t){var r=e.val("padding");if("number"==typeof r)return r;if(Array.isArray(r)){if(2===r.length){var n=p(r,2),i=n[0],a=n[1];return"top"===t||"bottom"===t?i:a}if(4===r.length){var o=p(r,4),l=o[0],s=o[1],u=o[2],c=o[3];if("top"===t)return l;if("right"===t)return s;if("bottom"===t)return u;if("left"===t)return c}}return 0}},{key:"shouldMeasureHeightFromDom",value:function(t){return!1!==t.val("heightFromDom")&&(!t.excludeDefaultStyling()&&!n.d.isDefined(t.targetValues.height)&&!t.val("heightFromDom")&&!e.isHeightDefined(t)&&!t.hasChildren()||t.val("heightFromDom"))}},{key:"shouldMeasureWidthFromDom",value:function(t){return!1!==t.val("widthFromDom")&&(!t.excludeDefaultStyling()&&!t.reuseDomDefinition()&&!t.val("widthFromDom")&&!n.d.isDefined(t.targetValues.width)&&!e.isWidthDefined(t)&&!t.hasChildren()||t.val("widthFromDom"))}},{key:"isHeightDefined",value:function(e){var t;return e.isTargetImperative("height")||!!e.allTargetMap.height||!!e.allTargetMap.dim||n.d.isDefined(null===(t=e.targets.style)||void 0===t?void 0:t.height)}},{key:"isWidthDefined",value:function(e){var t;return e.isTargetImperative("width")||!!e.allTargetMap.width||!!e.allTargetMap.dim||n.d.isDefined(null===(t=e.targets.style)||void 0===t?void 0:t.width)}},{key:"isXDefined",value:function(e){return!!e.allTargetMap.x||!!e.targetValues.x}},{key:"isYDefined",value:function(e){return!!e.allTargetMap.y||!!e.targetValues.y}},{key:"useContentWidth",value:function(t){return!e.isWidthDefined(t)&&!t.val("widthFromDom")&&t.getContentWidth()>0}},{key:"useContentHeight",value:function(t){return!e.isHeightDefined(t)&&!t.val("heightFromDom")&&t.getContentHeight()>0}},{key:"createDom",value:function(e){e.$dom=new l.J,e.$dom.create(e.getBaseElement())}},{key:"patchDom",value:function(e){e.$dom.ensureId(e.oid),e.$dom.attr("tgjs","true"),e.getHtml()&&(e.isTextOnly()?e.$dom.text(e.getHtml()):e.$dom.html(e.getHtml())),e.setLastUpdate("html")}},{key:"initStyleMaps",value:function(e){e.domHeightTimestamp=0,e.domWidthTimestamp=0,e.tfMap={},e.styleMap={};var t,r=g(e.allStyleTargetMap);try{for(r.s();!(t=r.n()).done;){var i=p(t.value,1)[0];n.d.isDefined(e.val(i))&&e.addToStyleTargetList(i)}}catch(e){r.e(e)}finally{r.f()}}},{key:"getTransformValue",value:function(e,t){var r;return"x"===t?r=Math.floor(e.getX()):"y"===t?r=Math.floor(e.getY()):a.u.transformMap[t]&&(r=a.u.rotate3D[t]?e.val(t):a.u.scaleMap[t]?n.d.formatNum(e.val(t),2):e.floorVal(t)),r}},{key:"fixStyle",value:function(t){if(t.styleTargetMap&&t.hasDom()){for(var r=!1,i=0,o=v(t.styleTargetMap);i<o.length;i++){var l=p(o[i],1)[0];if(!t.isKeyAnimating(l))if(a.u.transformMap[l]){var s=e.getTransformValue(t,l);t.tfMap[l]!==s&&(t.tfMap[l]=s,r=!0)}else if("dim"===l){var u=Math.floor(t.val("dim"));t.styleMap.height===u&&t.$dom.getStyleValue("height")===u||(t.styleMap.height=u,t.$dom.height(u)),t.styleMap.width===u&&t.$dom.getStyleValue("width")===u||(t.styleMap.width=u,t.$dom.width(u))}else if("width"===l){var c=Math.floor(t.getWidth());t.styleMap.width===c&&t.$dom.getStyleValue("width")===c||(t.styleMap.width=c,t.$dom.width(c))}else if("height"===l){var d=Math.floor(t.getHeight());t.styleMap.height===d&&t.$dom.getStyleValue("height")===d||(t.styleMap.height=d,t.$dom.height(d))}else a.u.styleWithUnitMap[l]?n.d.isDefined(t.val(l))&&t.styleMap[l]!==t.val(l)&&(t.$dom.style(l,n.d.isNumber(t.val(l))?"".concat(t.val(l),"px"):t.val(l)),t.styleMap[l]=t.val(l)):n.d.isDefined(t.val(l))&&t.styleMap[l]!==t.val(l)&&(t.$dom.style(l,"".concat(t.val(l))),t.styleMap[l]=t.val(l))}r&&t.$dom.transform(e.getTransformString(t,t.tfMap)),t.styleTargetMap.clear()}}},{key:"commitAnimatedStyles",value:function(t,r){if(t.hasDom()&&null!=r&&r.size){var o,l=!1,s=g(r);try{for(s.s();!(o=s.n()).done;){var u=o.value,c=i.g.getTargetName(u),d=t.val(c);if(n.d.isDefined(d))if(a.u.transformMap[c]){var f=e.getTransformValue(t,c);n.d.isDefined(f)&&(t.tfMap[c]=f,l=!0)}else if("dim"!==c)if("width"!==c)if("height"!==c){var v="number"==typeof d&&a.u.styleWithUnitMap[c]?"".concat(d,"px"):"".concat(d);t.styleMap[c]=d,t.$dom.style(c,v)}else{var p=Math.floor(d);t.styleMap.height=p,t.$dom.height(p)}else{var y=Math.floor(d);t.styleMap.width=y,t.$dom.width(y)}else{var m=Math.floor(d);t.styleMap.width=m,t.styleMap.height=m,t.$dom.width(m),t.$dom.height(m)}}}catch(e){s.e(e)}finally{s.f()}if(l){var b=h(h({},e.getTransformBaseFromActualValues(t)),t.tfMap),T=e.getTransformString(t,b);t.$dom.transform(T,t.val("transformOrder"))}}}},{key:"setWidthFromDom",value:function(e){var t=e.domWidthTimestamp,r=e.getParent(),i=e.getDomParent(),a=!1;if((0,o.EI)().needsRerender(e)&&(e.isTextOnly()?e.$dom.text(e.getHtml()):e.$dom.html(e.getHtml()),a=!0),a||r&&t<=r.getDimLastUpdate()||i&&t<=i.getDimLastUpdate()){e.$dom.width("auto");var l=e.$dom.width();l=l>0&&e.getHtml()?l+1:l,e.domWidthTimestamp=n.d.now(),e.val("width",l),(l>0||0===l&&e.lastVal("width")>0)&&e.addToStyleTargetList("width"),e.markLayoutDirty("width"),(0,o.fB)().schedule(15,"resize")}}},{key:"setHeightFromDom",value:function(e){var t=e.domHeightTimestamp,r=e.getParent(),i=e.getDomParent(),a=!1;if((0,o.EI)().needsRerender(e)&&(e.isTextOnly()?e.$dom.text(e.getHtml()):e.$dom.html(e.getHtml()),a=!0),a||r&&t<=r.getDimLastUpdate()||i&&t<=i.getDimLastUpdate()){e.$dom.height("auto");var l=e.$dom.height();e.domHeightTimestamp=n.d.now(),e.val("height",l),(l>0||0===l&&e.lastVal("height")>0)&&e.addToStyleTargetList("height"),e.markLayoutDirty("height"),(0,o.fB)().schedule(15,"resize")}}},{key:"easingMorph",value:function(t,r,n,i,a,o){var l=t.getTargetEasing(r),s=l?u.G.easingFunction(l):void 0,c=s?s(t.getTargetStepPercent(r,a,o)):t.getTargetStepPercent(r,a,o);return e.morph(r,n,i,c)}},{key:"morph",value:function(e,t,r,n){if(a.u.colorMap[i.g.getTargetName(e)]){var o=s.I.color2Integers(r),l=t?s.I.color2Integers(t):s.I.color2Integers("#fff");if(o&&l){var u=Math.floor(o[0]*n+l[0]*(1-n)),c=Math.floor(o[1]*n+l[1]*(1-n)),d=Math.floor(o[2]*n+l[2]*(1-n));return"rgb(".concat(u,",").concat(c,",").concat(d,")")}return r}return"number"==typeof r?t+(r-t)*n:r}},{key:"fixAsyncStyle",value:function(e){if(e.asyncStyleTargetMap){var t,r=g(e.asyncStyleTargetMap);try{var i=function(){var r=p(t.value,1)[0];if("style"===r){var i=e.getStyle();n.d.isDefined(i)&&e.styleMap.style!==i&&(e.$dom.setStyleByMap(i),i.height&&e.val("height",parseInt(i.height,10)),i.width&&e.val("width",parseInt(i.width,10)),e.styleMap.style=i)}else if("attributes"===r){var o=e.getAttributes();n.d.isDefined(o)&&e.styleMap.attributes!==o&&(Object.keys(o).forEach((function(t){e.$dom.attr(t,o[t])})),e.styleMap.attributes=o)}else if("css"===r){var l=e.getCss();e.$dom.css()!==l&&e.$dom.css(l)}else a.u.attributeTargetMap[r]?e.$dom.attr(r,e.val(r)):n.d.isDefined(e.val(r))&&e.styleMap[r]!==e.val(r)&&(e.$dom.style(r,"".concat(e.val(r))),e.styleMap[r]=e.val(r))};for(r.s();!(t=r.n()).done;)i()}catch(e){r.e(e)}finally{r.f()}e.asyncStyleTargetMap.clear()}}},{key:"getTransformBaseFromActualValues",value:function(e){var t={},r=a.u.transformMap;for(var i in e.actualValues)if(r[i]){var o=e.actualValues[i];n.d.isDefined(o)&&(t[i]=o)}return t}},{key:"num",value:function(e,t){var r=Number(e);return Number.isFinite(r)?r:t}},{key:"shouldUseImplicitTransformOrder",value:function(e){if(e.val("useTargetTransformOrder"))return!0;var t=e.originalTargetNames||[],r=function(e){return e.some((function(e){return t.indexOf(e)>=0}))},n=0;return r(["perspective"])&&n++,r(["translateX","translateY","translateZ","x","y","z"])&&n++,(r(["rotateX","rotateY","rotateZ"])||r(["rotate3DX"])&&r(["rotate3DY"])&&r(["rotate3DZ"])&&r(["rotate3DAngle"]))&&n++,r(["skewX","skewY","skew"])&&n++,(r(["scaleX","scaleY","scaleZ"])||r(["scale3DX"])&&r(["scale3DY"])&&r(["scale3DZ"]))&&n++,n>1}},{key:"buildImplicitTransformOrderMap",value:function(e){var t=function(t){return e.indexOf(t)>=0},r=function(t){var r,n=1/0,i=g(t);try{for(i.s();!(r=i.n()).done;){var a=r.value,o=e.indexOf(a);o>=0&&o<n&&(n=o)}}catch(e){i.e(e)}finally{i.f()}return n},n=t("translateX")||t("translateY")||t("translateZ"),i=t("x")||t("y")||t("z"),a=t("rotate3DX")&&t("rotate3DY")&&t("rotate3DZ")&&t("rotate3DAngle"),o=t("scale3DX")&&t("scale3DY")&&t("scale3DZ"),l=t("skewX")&&t("skewY"),s=[];if(t("perspective")&&s.push({group:"perspective",order:r(["perspective"]),outputs:["perspective"]}),n?s.push({group:"translate",order:r(["translateX","translateY","translateZ"]),outputs:["translateX","translateY","translateZ"].filter(t)}):i&&s.push({group:"translate",order:r(["x","y","z"]),outputs:["translate3d"]}),a)s.push({group:"rotate",order:r(["rotate3DX","rotate3DY","rotate3DZ","rotate3DAngle"]),outputs:["rotate3d"]});else{var u=["rotateX","rotateY","rotateZ","rotate"],c=u.filter(t);c.length&&s.push({group:"rotate",order:r(u),outputs:c})}if(l)s.push({group:"skew",order:r(["skewX","skewY"]),outputs:["skew"]});else{var d=["skewX","skewY"].filter(t);d.length&&s.push({group:"skew",order:r(["skewX","skewY"]),outputs:d})}if(o)s.push({group:"scale",order:r(["scale3DX","scale3DY","scale3DZ"]),outputs:["scale3d"]});else{var h=["scaleX","scaleY","scaleZ","scale"],f=h.filter(t);f.length&&s.push({group:"scale",order:r(h),outputs:f})}var v={perspective:0,translate:1,rotate:2,skew:3,scale:4};s.sort((function(e,t){var r,n,i=Number.isFinite(e.order)?e.order:1/0,a=Number.isFinite(t.order)?t.order:1/0;return i!==a?i-a:(null!==(r=v[e.group])&&void 0!==r?r:999)-(null!==(n=v[t.group])&&void 0!==n?n:999)}));var p=s.flatMap((function(e){return e.outputs})),y={};return p.forEach((function(e,t){return y[e]=t})),y}},{key:"getTransformString",value:function(t,r){for(var i={},o={},l=n.d.isDefined(r.translateX)||n.d.isDefined(r.translateY)||n.d.isDefined(r.translateZ),s=0,u=Object.keys(r);s<u.length;s++){var c=u[s];if(!i[c])switch(c){case"translateX":case"translateY":case"translateZ":null!==r[c]&&(o[c]="".concat(c,"(").concat(e.num(r[c],0),"px)"),i[c]=!0);break;case"x":case"y":case"z":if(l){i.x=i.y=i.z=!0;break}var d="".concat(e.num(r.x,0),"px"),h="".concat(e.num(r.y,0),"px"),f="".concat(e.num(r.z,0),"px");o.translate3d="translate3d(".concat(d,", ").concat(h,", ").concat(f,")"),i.x=i.y=i.z=!0;break;case"rotate":case"rotateX":case"rotateY":case"rotateZ":case"rotate3DX":case"rotate3DY":case"rotate3DZ":case"rotate3DAngle":n.d.isDefined(r.rotate3DX)&&n.d.isDefined(r.rotate3DY)&&n.d.isDefined(r.rotate3DZ)&&n.d.isDefined(r.rotate3DAngle)?(o.rotate3d="rotate3d(".concat(e.num(r.rotate3DX,0),", ").concat(e.num(r.rotate3DY,0),", ").concat(e.num(r.rotate3DZ,0),", ").concat(e.num(r.rotate3DAngle,0),"deg)"),i.rotate3DX=i.rotate3DY=i.rotate3DZ=i.rotate3DAngle=!0):null!==r[c]&&(o[c]="".concat(c,"(").concat(e.num(r[c],0),"deg)"),i[c]=!0);break;case"scale":case"scaleX":case"scaleY":case"scaleZ":case"scale3DX":case"scale3DY":case"scale3DZ":var v,p,g;n.d.isDefined(r.scale3DX)&&n.d.isDefined(r.scale3DY)&&n.d.isDefined(r.scale3DZ)?(o.scale3d="scale3d(".concat(Number(null!==(v=r.scale3DX)&&void 0!==v?v:1),", ").concat(Number(null!==(p=r.scale3DY)&&void 0!==p?p:1),", ").concat(Number(null!==(g=r.scale3DZ)&&void 0!==g?g:1),")"),i.scale3DX=i.scale3DY=i.scale3DZ=!0):(o[c]="".concat(c,"(").concat(e.num(r[c],1),")"),i[c]=!0);break;case"skewX":case"skewY":var y,m;if(n.d.isDefined(r.skewX)&&n.d.isDefined(r.skewY))o.skew="skew(".concat(Number(null!==(y=r.skewX)&&void 0!==y?y:0),"deg, ").concat(Number(null!==(m=r.skewY)&&void 0!==m?m:0),"deg)"),i.skewX=i.skewY=!0;else if(null!==r[c]){var b;o[c]="".concat(c,"(").concat(Number(null!==(b=r[c])&&void 0!==b?b:0),"deg)"),i[c]=!0}break;case"perspective":o[c]="perspective(".concat(e.num(r.perspective,0),"px)"),i.perspective=!0}}var T={},w=t.val("transformOrder");Array.isArray(w)&&w.length?w.forEach((function(e,t){T[e]=t})):e.shouldUseImplicitTransformOrder(t)&&(t.implicitTransformOrderVersion!==t.targetsVersion&&(t.implicitTransformOrderMap=e.buildImplicitTransformOrderMap(t.originalTargetNames),t.implicitTransformOrderVersion=t.targetsVersion),T=t.implicitTransformOrderMap),Object.keys(T).length||(T=a.u.transformOrder);var k=Object.keys(o).sort((function(e,t){var r,n;return(null!==(r=T[e])&&void 0!==r?r:999)-(null!==(n=T[t])&&void 0!==n?n:999)})).map((function(e){return o[e]}));return k.join(" ")}},{key:"calcAbsolutePositionFromDom",value:function(e){if(e.hasDom()){var t=e.$dom.getBoundingClientRect(),r=Math.floor(t.left),n=Math.floor(t.top);r===Math.floor(e.absX)&&n===Math.floor(e.absY)||(e.absX=t.left,e.absY=t.top,e.markLayoutDirty("islandAbsXY"))}}}],r&&k(t.prototype,r),c&&k(t,c),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,c,d,f}()},34:function(e,t,r){r.d(t,{d:function(){return f}});var n=r(855),i=r(333),a=r(255);function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function l(e){return l="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},l(e)}function s(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(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 u(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function h(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,u=[{key:"contains",value:function(e,t){var r;return!(!e||!t||e!==t&&t.getDomParent()!==e&&(null===(r=t.getDomParent())||void 0===r?void 0:r.getDomParent())!==e)}},{key:"uniqueTModels",value:function(e){return s(new Map(e.filter(Boolean).map((function(e){return[e.oid,e]}))).values())}},{key:"list2map",value:function(t,r){return t.reduce((function(t,n){return t[n.oid]=e.isDefined(r)?r:n,t}),{})}},{key:"getDeepList",value:function(e){var t=[];return function e(r){if(r&&r.hasChildren()){var n=r.getChildren();t.push.apply(t,s(n)),n.forEach(e)}}(e),t}},{key:"areEqual",value:function(e,t,r){return r?JSON.stringify(e)===JSON.stringify(t):e===t}},{key:"momentum",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.002,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:100,a=t-e,o=r<10?Math.abs(a)/10:Math.abs(a)/r,l=o/n,s=Math.pow(o,2)/(2*n);s>i&&(s=i);var u=a>0?a+s:a-s;return{distance:Math.round(u)/5,duration:Math.round(l),momentumDistance:s}}},{key:"isDefined",value:function(e){return null!=e}},{key:"hasProperty",value:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"limit",value:function(t,r,n){return t=(t=(t=e.isDefined(t)?t:r)>n?n:t)<r?r:t}},{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"getLoadTargetName",value:function(e){return"load-".concat(e)}},{key:"formatNum",value:function(e,t){return e?parseFloat(e.toString()).toFixed(t):0}},{key:"now",value:function(){return performance.now()}},{key:"log",value:function(e){return!0===e?console.log:function(){}}},{key:"distance",value:function(e,t,r,n){return Math.sqrt(Math.pow(r-e,2)+Math.pow(n-t,2))}},{key:"getFullLink",value:function(t){if(e.isDefined(t)){if(!t.startsWith("http")){var r=window.location.protocol;r+=r.endsWith(":")?"//":"://";var n="".concat(r).concat(window.location.hostname);t=t.startsWith("/")?n+t:"".concat(n,"/").concat(t)}return t.endsWith("/")?t.slice(0,-1):t}}},{key:"isStringBooleanOrNumber",value:function(e){var t=l(e);return"string"===t||"boolean"===t||"number"===t}},{key:"logTree",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,n.Bt)(),i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=o((0,n.zw)().calcChildren(r));try{for(a.s();!(t=a.n()).done;){var l,s,u,c=t.value,d=c.isVisible()?i+"| ":i+"x ";"BI"===c.type?console.log("".concat(d).concat(c.oid," v:").concat(c.isVisible()," x:").concat(Math.floor(c.getX())," y:").concat(Math.floor(c.getY()),", absX:").concat(Math.floor(c.absX),", absY:").concat(Math.floor(c.absY)," n-e-s:").concat(Math.floor(null===(l=c.viewport)||void 0===l?void 0:l.yNorth),"-").concat(Math.floor(null===(s=c.viewport)||void 0===s?void 0:s.yEast),"-").concat(Math.floor(null===(u=c.viewport)||void 0===u?void 0:u.ySouth)," w:").concat(Math.floor(c.getBaseWidth())," ww:").concat(Math.floor(c.getContentWidth())," h:").concat(Math.floor(c.getBaseHeight())," hh:").concat(Math.floor(c.getContentHeight()))):console.log("".concat(d).concat(c.oid," v:").concat(c.isVisible()," x:").concat(Math.floor(c.getX())," y:").concat(Math.floor(c.getY())," absX:").concat(Math.floor(c.absX),", absY:").concat(Math.floor(c.absY)," w:").concat(Math.floor(c.getWidth())," h:").concat(Math.floor(c.getHeight())," hc:").concat(Math.floor(c.getContentHeight()))),c.hasChildren()&&"exampleItem"!==c.type&&e.logTree(c,d)}}catch(e){a.e(e)}finally{a.f()}}},{key:"logBranch",value:function(e){for(var t=[];e;)t.unshift(e),e=e.bracket?e.bracket:e.getParent();for(var r=1;r<t.length;r++){var i=t[r-1],a=t[r];if((0,n.zw)().getChildren(i).indexOf(a)<0){console.log("branch is not valid: "+i.oid+", "+a.oid);break}}console.log(t.map((function(e){return e.oid})))}},{key:"handleValueChange",value:function(t,r){var n=t.targets[r];n||(r=i.g.getTargetName(r),n=t.targets[r]);var a=t.val(r),o=t.lastVal(r);return"object"===l(n)&&"function"==typeof n.onValueChange&&(!e.areEqual(a,o,n.deepEquality)&&(n.onValueChange.call(t,a,o,t.getTargetCycle(r)),t.setTargetMethodName(r,"onValueChange")),!0)}},{key:"mergeTargets",value:function(t,r){var n,i=r.targets,a=r.originalTargetNames,o=t.targets,l=[];a.forEach((function(t){e.isDefined(o[t])||l.push(t)})),(n=t.originalTargetNames).push.apply(n,l),l.forEach((function(e){var r=t.originalTargetNames.indexOf(e);o[e]=i[e],t.processNewTarget(e,r)}))}},{key:"cloneTargetDefinition",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakMap;if(!e.isDefined(t)||"object"!==l(t))return t;if("function"==typeof t)return t;if(t instanceof a.c||t instanceof Element||t instanceof Node||t instanceof Date||t instanceof RegExp)return t;if(r.has(t))return r.get(t);if(Array.isArray(t)){var n=[];r.set(t,n);var i,s=o(t);try{for(s.s();!(i=s.n()).done;){var u=i.value;n.push(e.cloneTargetDefinition(u,r))}}catch(e){s.e(e)}finally{s.f()}return n}var c=Object.getPrototypeOf(t);if(c!==Object.prototype&&null!==c)return t;var d={};r.set(t,d);for(var h=0,f=Object.keys(t);h<f.length;h++){var v=f[h];d[v]=e.cloneTargetDefinition(t[v],r)}return d}},{key:"advanceTargetByElapsed",value:function(t,r){var n,a=t.targetValues[r];if(!a)return{step:0,cycle:0,valuePointer:1,done:!1};if(!e.isDefined(a.catchupAt)){var o,l=t.getTargetStep(r),s=null!==(o=a.valueList)&&void 0!==o&&o.length?t.getValueListPointer(r):0;return{step:l,cycle:t.getTargetCycle(r),valuePointer:s,done:!i.g.isTargetUpdating(t,r)}}var u=e.now(),c=u-a.catchupAt,d=null!==(n=a.valueList)&&void 0!==n&&n.length?e.advanceValueListTargetByElapsed(t,r,c):e.advanceSimpleTargetByElapsed(t,r,c);return d.done||(a.catchupAt=u-d.remainingMs),d}},{key:"advanceSimpleTargetByElapsed",value:function(t,r,n){var i=t.getTargetSteps(r),a=t.getTargetInterval(r)||8,o=t.getTargetCycles(r),l=t.getTargetStep(r),s=t.getTargetCycle(r),u=n;if(i<=0)return{step:i,valuePointer:0,cycle:o,done:!0,remainingMs:0};for(;u>0&&s<o;){var c=Math.max(i-l,0),d=c*a;if(!(u>=d)){var h=e.limit(Math.floor(u/a),0,c);return{step:l+=h,steps:i,valuePointer:0,cycle:s,done:!1,remainingMs:u-=h*a}}if(u-=d,++s>=o)return{step:i,valuePointer:0,cycle:o,done:!0,remainingMs:u};l=0}return{step:l,steps:i,valuePointer:0,cycle:s,done:s>=o,remainingMs:u}}},{key:"advanceValueListTargetByElapsed",value:function(t,r,n){for(var i=t.targetValues[r],a=i.valueList,o=i.stepList||[1],l=i.intervalList||[i.interval||8],s=t.getTargetCycles(r),u=t.getTargetCycle(r),c=t.getValueListPointer(r),d=t.getTargetStep(r),h=n;u<s;){for(;h>0&&c<a.length;){var f=o[(c-1)%o.length],v=l[(c-1)%l.length]||8;d=e.limit(d,0,f);var p=Math.max(f-d,0),g=p*v;if(!(h>=g)){var y=e.limit(Math.floor(h/v),0,p);return{step:d+=y,steps:f,valuePointer:c,cycle:u,done:!1,remainingMs:h-=y*v}}h-=g,c++,d=0}if(!(c>=a.length))break;if(++u>=s){var m=a.length,b=o[Math.max(0,a.length-2)%o.length];return{step:b,steps:b,valuePointer:m,cycle:s,done:!0,remainingMs:h}}if(c=1,d=0,h<=0)break}return{step:d,steps:o[(c-1)%o.length],valuePointer:c,cycle:u,remainingMs:h,done:u>=s}}}],(r=null)&&d(t.prototype,r),u&&d(t,u),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,u}()},585:function(e,t,r){r.d(t,{u:function(){return p}});var n,i=r(855),a=r(34),o=r(333);function l(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){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(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 r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e){return d="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},d(e)}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function f(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d(t)?t:t+""}var p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,n=[{key:"defaultActualValues",value:function(){return{x:0,y:0,width:0,height:0,opacity:1,scale:1,scrollLeft:0,scrollTop:0,borderRadius:0,children:[],isInFlow:!0,element:"div",canHaveDom:!0,isIncluded:!0,bracketThreshold:40,bracketSize:2,preventDefault:void 0}}},{key:"toCanonicalKey",value:function(t){var r,n=String(t),i=n.toLowerCase();return null!==(r=e.attributesToTargets[i])&&void 0!==r?r:n}},{key:"isLifeCycleMethod",value:function(t){return e.lifecycleMethodSet.has(t)||e.lifecyclePatterns.step.test(t)||e.lifecyclePatterns.end.test(t)}},{key:"isGpuPreferred",value:function(t){return!!e.gpuTargetMap[o.g.getTargetName(t)]}},{key:"isTransformKey",value:function(t){return!!e.transformMap[t]}},{key:"affectsVisibility",value:function(e){return e=o.g.getTargetName(e),["x","y","width","height","dim"].includes(o.g.getTargetName(e))}},{key:"requiresDom",value:function(t){return e.onDomTargets.has(t)}}],(r=null)&&h(t.prototype,r),n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();n=p,f(p,"onDomTargets",new Set(["explodeChildren"])),f(p,"transformOrder",{perspective:0,translateX:1,translateY:1,translateZ:1,translate:1,translate3d:1,rotate:2,rotateX:2,rotateY:2,rotateZ:2,rotate3d:2,skew:3,skewX:3,skewY:3,scale:4,scaleX:4,scaleY:4,scaleZ:4,scale3DX:4,scale3DY:4,scale3DZ:4}),f(p,"defaultTargetStyles",{position:"absolute",left:0,top:0,zIndex:1}),f(p,"transformMap",{x:!0,y:!0,z:!0,translateX:!0,translateY:!0,translateZ:!0,perspective:!0,rotate:!0,rotateX:!0,rotateY:!0,rotateZ:!0,rotate3DX:!0,rotate3DY:!0,rotate3DZ:!0,rotate3DAngle:!0,scale:!0,scaleX:!0,scaleY:!0,scaleZ:!0,scale3DX:!0,scale3DY:!0,scale3DZ:!0,skew:!0,skewX:!0,skewY:!0}),f(p,"dimMap",{width:!0,height:!0,dim:!0}),f(p,"styleWithUnitMap",{width:!0,height:!0,fontSize:!0,lineHeight:!0,borderRadius:!0,padding:!0,paddingLeft:!0,paddingRight:!0,paddingTop:!0,paddingBottom:!0,left:!0,top:!0,right:!0,bottom:!0,wordSpacing:!0,letterSpacing:!0}),f(p,"colorMap",{color:!0,backgroundColor:!0,borderColor:!0,background:!0}),f(p,"styleTargetMap",c(c(c(c({},n.transformMap),n.styleWithUnitMap),n.colorMap),{},{dim:!0,color:!0,opacity:!0,zIndex:!0,border:!0,borderTop:!0,borderLeft:!0,borderRight:!0,borderBottom:!0})),f(p,"gpuTargetMap",c(c({},n.transformMap),{},{color:!0,backgroundColor:!0,borderColor:!0,opacity:!0,width:!0,height:!0})),f(p,"asyncStyleTargetMap",{position:!0,css:!0,style:!0,textAlign:!0,boxSizing:!0,transformStyle:!0,transformOrigin:!0,attributes:!0,justifyContent:!0,flexDirection:!0,alignItems:!0,display:!0,cursor:!0,pointerEvents:!0,fontFamily:!0,overflow:!0,overflowX:!0,overflowY:!0,textDecoration:!0,boxShadow:!0,fontWeight:!0,willChange:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,flexWrap:!0,userSelect:!0,outline:!0,backfaceVisibility:!0,filter:!0,whiteSpace:!0}),f(p,"scaleMap",{scale:!0,scaleX:!0,scaleY:!0,scaleZ:!0,scale3DX:!0,scale3DY:!0,scale3DZ:!0}),f(p,"rotate3D",{rotate3DX:!0,rotate3DY:!0,rotate3DZ:!0}),f(p,"attributeTargetMap",{lang:!0,autoFocus:!0,placeholder:!0,autoComplete:!0,name:!0,type:!0,src:!0,href:!0,method:!0,size:!0,value:!0,maxLength:!0,minLength:!0,max:!0,min:!0,readOnly:!0,required:!0,alt:!0,disabled:!0,action:!0,accept:!0,selected:!0,rows:!0,cols:!0,tabIndex:!0,role:!0,ariaLabel:!0,ariaCurrent:!0,ariaPressed:!0}),f(p,"mustExecuteTargets",{width:!0,height:!0,heightFromDom:!0,widthFromDom:!0,fetch:!0,fetchImage:!0,isVisible:!0}),f(p,"ignoreRerun",{isVisible:!0}),f(p,"ignoreTargetMethodNameMap",{isVisible:!0}),f(p,"cssFunctionMap",{skew:{x:0,y:0},translate3d:{x:0,y:0,z:0},rotate3d:{x:0,y:0,z:0,a:0},scale3d:{x:0,y:0,z:0}}),f(p,"bypassInitialProcessingTargetMap",{onChildrenChange:!0,onVisibleChildrenChange:!0,onPageClose:!0}),f(p,"controlTargetMap",{defaultStyling:!0,styling:!0,reuseDomDefinition:!0,useWindowFrame:!0,onDomReady:!0,canHaveDom:!0}),f(p,"events",{mouseStart:{pointerdown:{eventName:"mousedown",inputType:"pointer",eventType:"start",order:2,windowEvent:!1,queue:!0,rateLimit:0},mousedown:{eventName:"mousedown",inputType:"mouse",eventType:"start",order:3,windowEvent:!1,queue:!0,rateLimit:0}},mouseEnd:{pointerup:{eventName:"mouseup",inputType:"pointer",eventType:"end",order:2,windowEvent:!1,queue:!0,rateLimit:0},mouseup:{eventName:"mouseup",inputType:"mouse",eventType:"end",order:3,windowEvent:!1,queue:!0,rateLimit:0}},clickEvents:{click:{eventName:"click",inputType:"mouse",eventType:"click",order:1,windowEvent:!1,queue:!1,rateLimit:0}},touchStart:{touchstart:{eventName:"touchstart",inputType:"touch",eventType:"start",order:1,windowEvent:!1,queue:!0,rateLimit:0}},touchEnd:{touchend:{eventName:"touchend",inputType:"touch",eventType:"end",order:1,windowEvent:!1,queue:!0,rateLimit:0}},cancelEvents:{touchcancel:{eventName:"touchcancel",inputType:"touch",eventType:"cancel",order:1,windowEvent:!1,queue:!0,rateLimit:0},pointercancel:{eventName:"mousecancel",inputType:"pointer",eventType:"cancel",order:2,windowEvent:!1,queue:!0,rateLimit:0}},windowEvents:{keyup:{eventName:"key",inputType:"",eventType:"key",order:1,windowEvent:!0,queue:!0,rateLimit:50},keydown:{eventName:"keydown",inputType:"",eventType:"keydown",order:1,windowEvent:!0,queue:!0,rateLimit:50},blur:{eventName:"blur",inputType:"mouse",eventType:"cancel",order:2,windowEvent:!0,queue:!0,rateLimit:0},resize:{eventName:"resize",inputType:"",eventType:"resize",order:1,windowEvent:!0,queue:!0,rateLimit:50},orientationchange:{eventName:"resize",inputType:"",eventType:"resize",order:1,windowEvent:!0,queue:!0,rateLimit:50},scroll:{eventName:"scroll",inputType:"",eventType:"scroll",order:1,windowEvent:!0,queue:!0,rateLimit:50}},containerScroll:{scroll:{eventName:"scroll",inputType:"",eventType:"scroll",order:1,windowEvent:!1,queue:!0,rateLimit:50}},inputEvents:{input:{eventName:"input",inputType:"",eventType:"input",order:1,windowEvent:!1,queue:!0,rateLimit:50}},changeEvents:{change:{eventName:"change",inputType:"",eventType:"change",order:1,windowEvent:!1,queue:!0,rateLimit:0}},submitEvents:{submit:{eventName:"submit",inputType:"form",eventType:"submit",order:1,windowEvent:!1,queue:!0,rateLimit:0}},popState:{popstate:{eventName:"popstate",inputType:"",eventType:"popstate",order:1,windowEvent:!0,queue:!0,rateLimit:0}},leaveEvents:{pointerleave:{eventName:"mouseleave",inputType:"pointer",eventType:"leave",order:2,windowEvent:!1,queue:!0,rateLimit:0},mouseleave:{eventName:"mouseleave",inputType:"mouse",eventType:"leave",order:3,windowEvent:!1,queue:!0,rateLimit:0}},enterEvents:{pointerenter:{eventName:"mouseenter",inputType:"pointer",eventType:"enter",order:2,windowEvent:!1,queue:!0,rateLimit:0},mouseenter:{eventName:"mouseenter",inputType:"mouse",eventType:"enter",order:3,windowEvent:!1,queue:!0,rateLimit:0}},moveEvents:{touchmove:{eventName:"touchmove",inputType:"touch",eventType:"move",order:1,windowEvent:!1,queue:!0,rateLimit:50},pointermove:{eventName:"mousemove",inputType:"pointer",eventType:"move",order:2,windowEvent:!1,queue:!0,rateLimit:50},mousemove:{eventName:"mousemove",inputType:"mouse",eventType:"move",order:3,windowEvent:!1,queue:!0,rateLimit:50}},documentDragEvents:{pointermove:{eventName:"mousemove",inputType:"pointer",eventType:"move",order:2,windowEvent:!1,queue:!0,rateLimit:50,capture:!0},mousemove:{eventName:"mousemove",inputType:"mouse",eventType:"move",order:3,windowEvent:!1,queue:!0,rateLimit:50,capture:!0},touchmove:{eventName:"touchmove",inputType:"touch",eventType:"move",order:1,windowEvent:!1,queue:!0,rateLimit:50,capture:!0},pointerup:{eventName:"mouseup",inputType:"pointer",eventType:"end",order:2,windowEvent:!1,queue:!0,rateLimit:0,capture:!0},mouseup:{eventName:"mouseup",inputType:"mouse",eventType:"end",order:3,windowEvent:!1,queue:!0,rateLimit:0,capture:!0},touchend:{eventName:"touchend",inputType:"touch",eventType:"end",order:1,windowEvent:!1,queue:!0,rateLimit:0,capture:!0},pointercancel:{eventName:"mousecancel",inputType:"pointer",eventType:"cancel",order:2,windowEvent:!1,queue:!0,rateLimit:0,capture:!0},touchcancel:{eventName:"touchcancel",inputType:"touch",eventType:"cancel",order:1,windowEvent:!1,queue:!0,rateLimit:0,capture:!0}},wheelEvents:{wheel:{eventName:"wheel",inputType:"",eventType:"wheel",order:1,windowEvent:!1,queue:!0,rateLimit:50},mousewheel:{eventName:"wheel",inputType:"",eventType:"wheel",order:1,windowEvent:!1,queue:!0,rateLimit:50}}}),f(p,"attributesToTargets",{onstart:"onStart",onend:"onEnd",onkey:"onKey",onkeydown:"onKeyDown",onanykey:"onAnyKey",onclick:"onClick",onanyclick:"onAnyClick",onhover:"onHover",onswipe:"onSwipe",onanyswipe:"onAnySwipe",onpinch:"onPinch",onenter:"onEnter",onleave:"onLeave",onblur:"onBlur",onfocus:"onFocus",onscroll:"onScroll",onscrollleft:"onScrollLeft",onscrolltop:"onScrollTop",onscrollleftend:"onScrollLeftEnd",onscrolltopend:"onScrollTopEnd",onwindowscroll:"onWindowScroll",onwindowscrolltopend:"onWindowScrollTopEnd",onwindowscrollleftend:"onWindowScrollLeftEnd",onpopstate:"onPopState",onchange:"onChange",oninput:"onInput",onsubmit:"onSubmit",onvisible:"onVisible",oninvisible:"oInvisible",onresize:"onResize",textalign:"textAlign",preventdefault:"preventDefault",translatex:"translateX",translatey:"translateY",translatez:"translateZ",rotate3dx:"rotate3DX",rotate3dy:"rotate3DY",rotate3dz:"rotate3DZ",rotate3dangle:"rotate3DAngle",scale3dx:"scale3DX",scale3dy:"scale3DY",scale3dz:"scale3DZ",skewx:"skewX",skewy:"skewY",lineheight:"lineHeight",fontsize:"fontSize",borderradius:"borderRadius",letterspacing:"letterSpacing",backgroundcolor:"backgroundColor",backgroundimage:"backgroundImage",backgroundsize:"backgroundSize",backgroundposition:"backgroundPosition",backgroundrepeat:"backgroundRepeat",bordertop:"borderTop",borderleft:"borderLeft",borderright:"borderRight",borderbottom:"borderBottom",boxsizing:"boxSizing",transformstyle:"transformStyle",transformorigin:"transformOrigin",justifycontent:"justifyContent",flexdirection:"flexDirection",flexwrap:"flexWrap",alignitems:"alignItems",fontfamily:"fontFamily",overflowx:"overflowX",overflowy:"overflowY",textdecoration:"textDecoration",boxshadow:"boxShadow",fontweight:"fontWeight",willchange:"willChange",domholder:"domHolder",shouldcalculatechildtargets:"shouldCalculateChildTargets",domparent:"domParent",containeroverflowmode:"containerOverflowMode",itemoverflowmode:"itemOverflowMode",onvisiblechildrenchange:"onVisibleChildrenChange",onchildrenchange:"onChildrenChange",isvisible:"isVisible",isinflow:"isInFlow",basewidth:"baseWidth",baseheight:"baseHeight",paddingleft:"paddingLeft",paddingright:"paddingRight",paddingtop:"paddingTop",paddingbottom:"paddingBottom",marginleft:"marginLeft",marginright:"marginRight",margintop:"marginTop",marginbottom:"marginBottom",userselect:"userSelect",arialabel:"ariaLabel",ariacurrent:"ariaCurrent",ariapressed:"ariaPressed",tabindex:"tabIndex",backfacevisibility:"backfaceVisibility",whitespace:"whiteSpace",pointerevents:"pointerEvents"}),f(p,"targetToEventsMapping",{onStart:["touchStart","mouseStart"],onEnd:[],onKey:[],onKeyDown:[],onAnyKey:[],onBlur:[],onFocus:[],onClick:["clickEvents","touchStart","mouseStart"],onAnyClick:["clickEvents","touchStart","mouseStart"],onHover:["moveEvents"],onSwipe:["touchStart","mouseStart"],onAnySwipe:["touchStart","mouseStart"],onPinch:["touchStart"],onEnter:["enterEvents"],onLeave:["leaveEvents"],onScroll:["touchStart","mouseStart","wheelEvents"],onScrollLeft:["touchStart","mouseStart","wheelEvents"],onScrollTop:["touchStart","mouseStart","wheelEvents"],onScrollLeftEnd:["touchStart","mouseStart","wheelEvents"],onScrollTopEnd:["touchStart","mouseStart","wheelEvents"],onWindowScroll:["containerScroll"],onWindowScrollTopEnd:["containerScroll"],onWindowScrollLeftEnd:["containerScroll"],onPopState:["popState"],onChange:["changeEvents"],onInput:["inputEvents"],onSubmit:["submitEvents"]}),f(p,"internalEventMap",{onVisible:function(e){return e.isNowVisible},onInvisible:function(e){return e.isNowInvisible},onResize:function(e){var t,r=e.getParent(),n=(0,i.S9)(),a=r?r.getDimLastUpdate():0,o=Math.max(n,a);return!!o&&(!((null!==(t=e.lastResizeHandledTime)&&void 0!==t?t:0)>=o)&&(e.lastResizeHandledTime=o,!0))}}),f(p,"allEventMap",{onStart:function(e){return(0,i.kQ)().isStartEvent()&&(0,i.kQ)().isStartHandler(e)},onEnd:function(e){return(0,i.kQ)().isEndEvent()&&(0,i.kQ)().isEndHandler(e)},onAnySwipe:function(){return(0,i.kQ)().isSwipeEvent()&&a.d.isDefined((0,i.kQ)().swipeStartX)},onHover:function(e){return(0,i.kQ)().isMoveEvent()&&(0,i.kQ)().isHoverHandler(e)},onClick:function(e){return(0,i.kQ)().isClickEvent()&&(0,i.kQ)().isClickHandler(e)},onAnyClick:function(){return(0,i.kQ)().isClickEvent()},onEnter:function(e){return(0,i.kQ)().isEnterHandler(e)},onLeave:function(e){return(0,i.kQ)().isLeaveHandler(e)},onSwipe:function(e){return(0,i.kQ)().isSwipeHandler(e)&&(0,i.kQ)().isSwipeEvent()&&a.d.isDefined((0,i.kQ)().swipeStartX)},onFocus:function(e){return(0,i.kQ)().onFocus(e)},onBlur:function(e){return(0,i.kQ)().onBlur(e)},onPinch:function(e){return(0,i.kQ)().isPinchHandler(e)},onKey:function(e){return"key"===(0,i.kQ)().getEventType()&&(0,i.kQ)().currentKey&&(0,i.kQ)().currentHandlers.focus===e&&(0,i.kQ)().currentHandlers.justFocused!==e},onKeyDown:function(e){return"keydown"===(0,i.kQ)().getEventType()&&(0,i.kQ)().currentKey&&(0,i.kQ)().currentHandlers.focus===e&&(0,i.kQ)().currentHandlers.justFocused!==e},onAnyKey:function(){return"key"===(0,i.kQ)().getEventType()&&(0,i.kQ)().currentKey},onScroll:function(e){return(0,i.kQ)().isScrollLeftHandler(e)&&(0,i.kQ)().deltaX()||(0,i.kQ)().isScrollTopHandler(e)&&(0,i.kQ)().deltaY()},onScrollTop:function(e){return"horizontal"!==(0,i.kQ)().getOrientation()&&(0,i.kQ)().isScrollTopHandler(e)&&(0,i.kQ)().deltaY()},onScrollLeft:function(e){return"vertical"!==(0,i.kQ)().getOrientation()&&(0,i.kQ)().isScrollLeftHandler(e)&&(0,i.kQ)().deltaX()},onScrollTopEnd:function(e){return"scrolltopend"===(0,i.kQ)().getEventType()&&(0,i.kQ)().isScrollTopEndHandler(e)},onScrollLeftEnd:function(e){return"scrollleftend"===(0,i.kQ)().getEventType()&&(0,i.kQ)().isScrollLeftEndHandler(e)},onWindowScroll:function(e){return"scroll"===(0,i.kQ)().getEventType()&&(0,i.kQ)().getEventTModel()===e},onWindowScrollTopEnd:function(e){return"windowscrolltopend"===(0,i.kQ)().getEventType()&&(0,i.kQ)().getEventTModel()===e},onWindowScrollLeftEnd:function(e){return"windowscrollleftend"===(0,i.kQ)().getEventType()&&(0,i.kQ)().getEventTModel()===e},onPopState:function(){return"popstate"===(0,i.kQ)().getEventType()},onChange:function(e){return"change"===(0,i.kQ)().getEventType()&&(0,i.kQ)().isFormHandler(e)},onInput:function(e){return"input"===(0,i.kQ)().getEventType()&&(0,i.kQ)().isFormHandler(e)},onSubmit:function(){return"submit"===(0,i.kQ)().getEventType()}}),f(p,"excludedTargetKeys",new Set(["originalTargetName","originalTModel","activateNextTarget","invokerTarget","invokerTModel","active","addChildAction","childAction","fetchAction"])),f(p,"lifecycleCallbackSet",new Set(["onComplete","onVisibleComplete","onValueChange","onImperativeEnd","onImperativeStep","onStepsEnd","onSuccess","onError"])),f(p,"lifecycleCoreSet",new Set(["value","steps","cycles","enabledOn","pauseOn","loop","interval"])),f(p,"lifecycleMethodSet",new Set([].concat(l(n.lifecycleCallbackSet),l(n.lifecycleCoreSet)))),f(p,"lifecyclePatterns",{step:/^on[A-Za-z]+Step$/,end:/^on[A-Za-z]+End$/}),f(p,"eventSet",new Set([].concat(l(Object.keys(n.allEventMap)),l(Object.keys(n.internalEventMap))))),f(p,"styleSet",new Set([].concat(l(Object.keys(n.styleTargetMap)),l(Object.keys(n.asyncStyleTargetMap)),l(Object.keys(n.attributeTargetMap))))),f(p,"reservedKeywordSet",new Set([].concat(l(n.styleSet),l(Object.keys(n.defaultActualValues())),l(Object.keys(n.allEventMap)),l(Object.keys(n.internalEventMap)),l(Object.keys(n.mustExecuteTargets)),["children","addChildren","explodeChildren","html","isInFlow","domHolder","domParent","gap","widthFromDom","heightFromDom","preventDefault","textOnly","styling","$dom","defaultStyling","reuseDomDefinition","canHaveDom","excludeXYCalc","excludeX","excludeY","containerOverflowMode","itemOverflowMode","baseElement","element","otype","calculateChildren","domIsland","bracketThreshold","bracketSize","shouldBeBracketed","sourceDom"]))),f(p,"activationKeywordSet",new Set(["originalTModel","originalTargetName","activateNextTarget"]))},484:function(e,t,r){r.d(t,{j:function(){return k}});var n=r(333),i=r(690),a=r(585),o=r(255),l=r(34),s=r(980),u=r(421),c=r(855),d=r(611);function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||m(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return f="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},f(e)}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t,r){return(t=w(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(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 m(e,t){if(e){if("string"==typeof e)return b(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function T(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,w(n.key),n)}}function w(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:t+""}var k=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,v=[{key:"prepareTarget",value:function(e,t){n.g.currentTargetName=t,n.g.currentTModel=e,e.isExecuted(t)&&(e.getTargetCycles(t)>1&&e.getTargetCycle(t)<e.getTargetCycles(t)-1?e.incrementTargetCycle(t):e.resetTargetCycle(t),e.resetTargetStep(t),e.resetTargetInitialValue(t))}},{key:"executeDeclarativeTarget",value:function(t,r){var i=n.g.getTargetName(r);t.allTargetMap[i]=r,e.resolveTargetValue(t,r),e.updateTarget(t,t.targetValues[r],r,!1)}},{key:"assignImperativeTargetValue",value:function(e,t,r,i){var a;e.targetValues[t]=e.targetValues[t]||n.g.emptyValue();var o=e.targetValues[t];return o.isImperative=!0,o.originalTargetName=r,o.originalTModel=i,(null===(a=e.animatingMap)||void 0===a?void 0:a.has(t))&&e.getTargetSteps(t)>0&&(0,c.s)().cancelKey(e,t),o}},{key:"resetImperativeProgress",value:function(e){e.step=0,e.cycle=0,Array.isArray(e.valueList)?e.valuePointer=1:e.valuePointer=0}},{key:"executeImperativeTarget",value:function(t,r,n,i,a,o,l,u){var c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1,d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:{},h=new Map;e._executeImperativeTarget(t,r,n,i,a,o,l,u,c,d,h),h.size&&s.T.overrideAnimatedKeyWithSnap(t,y(h.keys()),y(h.values()))}},{key:"_executeImperativeTarget",value:function(t,r,o,s,u,c,d,h){var v,g,y=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1,m=arguments.length>9&&void 0!==arguments[9]?arguments[9]:{},b=arguments.length>10?arguments[10]:void 0;if("string"==typeof r){var T=n.g.getTargetName(r);r=r.endsWith("+")?r:r+"+",t.allTargetMap[T]=r}if(i.D.isListTarget(o)){var w=l.d.isDefined(o.steps)?o.steps:s,k=l.d.isDefined(o.interval)?o.interval:u,S=l.d.isDefined(o.easing)?o.easing:c,x=l.d.isDefined(o.cycles)?o.cycles:y;v=e.assignImperativeTargetValue(t,r,d,h),e.assignListTarget(t,r,v,o.list,o.list[0],w,k,S,x)}else{if(i.D.isTargetSpecObject(o)){var E=e.getTargetOptions(o),C=i.D.getValueStepsCycles(t,r,o),M=C[0],P=l.d.isDefined(C[1])?C[1]:s,D=l.d.isDefined(C[2])?C[2]:u,O=l.d.isDefined(C[3])?C[3]:c,L=l.d.isDefined(C[4])?C[4]:y;return void e._executeImperativeTarget(t,r,M,P,D,O,d,h,L,E,b)}if(i.D.isObjectTarget(r,o)){var A=a.u.cssFunctionMap[r]?p(p({},a.u.cssFunctionMap[r]),o):o;Object.keys(A).forEach((function(r){var n=A[r],a=s,o=u,v=c,p=y,g=m;if("object"===f(n)&&!i.D.isListTarget(n)){g=e.getTargetOptions(n);var T=i.D.getValueStepsCycles(t,r,n);n=T[0],a=l.d.isDefined(T[1])?T[1]:s,o=l.d.isDefined(T[2])?T[2]:u,v=l.d.isDefined(T[3])?T[3]:c,p=l.d.isDefined(T[4])?T[4]:y}e._executeImperativeTarget(t,r,n,a,o,v,d,h,p,g,b)}))}else{if("object"===f(o)&&!i.D.isListTarget(o)){var j=i.D.getValueStepsCycles(t,r,o);if(o!==j[0])return o=j[0],s=l.d.isDefined(j[1])?j[1]:s,u=l.d.isDefined(j[2])?j[2]:u,c=l.d.isDefined(j[3])?j[3]:c,y=l.d.isDefined(j[4])?j[4]:y,void e._executeImperativeTarget(t,r,o,s,u,c,d,h,y,m,b)}v=e.assignImperativeTargetValue(t,r,d,h),e.assignSingleTarget(v,o,void 0,s,y,u,c)}}v&&(e.resetImperativeProgress(v),e.assignTargetOptions(v,m),v.steps>0&&null!==(g=t.noDomUpdatingTargets)&&void 0!==g&&g.has(r)&&(v.catchupAt=l.d.now()),e.updateTarget(t,v,r,!0,b),t.isTargetDone(r)&&n.g.shouldActivateNextTarget(t,r))}},{key:"updateTarget",value:function(t,r,n,i,o){t.setLastUpdate(n),0===t.getTargetSteps(n)&&e.snapActualToTarget(t,n,o),r.executionFlag=!0,r.executionCount++,r.snapAnimation||t.addToStyleTargetList(n,i),t.setTargetMethodName(n,"value");var l=e.calculateTargetStatus(t,r,n);t.setTargetStatus(n,l);var s=t.isTargetImperative(n)||t.shouldScheduleRun(n);!a.u.ignoreRerun[n]&&s&&(0,c.fB)().schedule(1,"updateTarget-".concat(t.oid,"-").concat(n))}},{key:"calculateTargetStatus",value:function(e,t,r){var i=e.getValueListPointer(r),a=e.getTargetCycle(r),o=e.getTargetCycles(r),l=e.getTargetStep(r),s=e.getTargetSteps(r);return t.snapAnimation?"done":l<s||Array.isArray(t.valueList)&&i<t.valueList.length-1?"updating":e.isTargetInLoop(r)||a<o-1?"active":n.g.hasFetchAction(e,r)&&!(0,c.qI)().isLoadingSuccessful(e,r)?"fetching":"done"}},{key:"assignListTarget",value:function(e,t,r,n,i,a,o,s,c){r.valueList=n,r.stepList=Array.isArray(a)?a:l.d.isDefined(a)?[a]:[1],r.intervalList=Array.isArray(o)?o:l.d.isDefined(o)?[o||8]:[8],r.easingList=Array.isArray(s)?s:l.d.isDefined(s)?[s]:[u.G.LINEAR],r.cycles=c,r.valuePointer=1,r.value=n[1],r.initialValue=i,r.steps=r.stepList[0],r.interval=r.intervalList[0],r.easing=r.easingList[0],r.step=0,r.snapAnimation=!1,e.val(t,i),e.setActual(t,i)}},{key:"assignSingleTarget",value:function(e,t,r,n,i,a,o){delete e.valueList,delete e.stepList,delete e.intervalList,delete e.easingList,l.d.isDefined(e.valuePointer)&&(e.valuePointer=0),e.initialValue=r,e.lastValue=e.value,e.value=t,e.steps=n||0,e.cycles=i||1,e.interval=a||0,e.easing=o,e.snapAnimation=!1}},{key:"snapActualToTarget",value:function(e,t,r){var i,a,o,u=e.targetValues[t];if(Array.isArray(u.valueList))u.valuePointer=u.valueList.length-1,o=u.valueList[u.valuePointer],u.value=o;else{var c=u.value;o="function"==typeof c?c.call(e):c}var d=e.val(t)!==o,h=n.g.getTargetName(t),f=!!y(null!==(i=null===(a=e.animatingMap)||void 0===a?void 0:a.keys())&&void 0!==i?i:[]).find((function(e){return n.g.getTargetName(e)===h}));(d||f)&&(d&&(e.val(t,o),e.setActual(t,o),l.d.handleValueChange(e,t)),f&&e.hasValidAnimation()&&e.canBeAnimated(t)?(u.snapAnimation=!0,r?r.set(t,o):s.T.overrideAnimatedKeyWithSnap(e,t,o)):u.snapAnimation=!1)}},{key:"getTargetOptions",value:function(e){var t={};return e&&"object"===f(e)?(Object.prototype.hasOwnProperty.call(e,"pauseOn")&&(t.pauseOn=e.pauseOn),t):t}},{key:"assignTargetOptions",value:function(e,t){t&&(Object.prototype.hasOwnProperty.call(t,"pauseOn")?e.pauseOn=t.pauseOn:delete e.pauseOn)}},{key:"resolveTargetValue",value:function(t,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.getTargetCycle(r);if(!i.D.isIntervalTarget(t.targets[r])||1!==o){var s,u=!t.targetValues[r]&&l.d.isDefined(t.targets[r].initialValue)?t.targets[r].initialValue:void 0,d=t.targets[r],v=i.D.isExplodeChildrenTarget(r),g=!v&&d&&"object"===f(d)&&l.d.isDefined(d.instances),y=g?i.D.getTargetInstances(t,r,d,o):1,m=v&&"function"==typeof(null==d?void 0:d.value)?p(p({},d),{},{value:{}}):d;if(g){var b=new Array(y);s=i.D.getValueStepsCycles(t,r,m,o,0),b[0]=s[0],s[0]=b;for(var T=t.val(r),w=1;w<y;w++){var k=Array.isArray(T)?T[w]:T;b[w]=i.D.getInstanceTargetValue(t,r,d,o,k,w)}}else s=i.D.getValueStepsCycles(t,r,m,o);var S=s[0],x=s[1]||0,E=s[2]||0,C=s[3],M=s[4]||1,P=t.targetValues[r]||n.g.emptyValue();t.targetValues[r]=P;var D,O=l.d.isDefined(C)?C:l.d.isDefined(t.targets[r].easing)?t.targets[r].easing:void 0;if(i.D.isIntervalTarget(S))e.assignSingleTarget(P,void 0,u,0,2,S.interval,O);else if(D=t.handleSpecialTarget(r,S,{steps:x,cycles:M,interval:E,easing:O})){var L,A,j,I=!0===D?{}:D;e.assignSingleTarget(P,S,void 0,0,null!==(L=I.cycles)&&void 0!==L?L:M,null!==(A=I.interval)&&void 0!==A?A:E,null!==(j=I.easing)&&void 0!==j?j:O)}else if(i.D.isChildTarget(r,S))t.addChild(S),e.assignSingleTarget(P,S,void 0,0,M,E,O);else if(i.D.isExplodeChildrenTarget(r)){var _,R,N,V,F,B="function"==typeof(null==d?void 0:d.value)?{}:i.D.getExplodeChildrenDefinition(S===d?void 0:S);if("function"!=typeof t.createExplodeChildren)throw new Error("explodeChildren requires a createExplodeChildren() implementation on the TModel.");var H=t.createExplodeChildren(r,B,{renderer:null!==(_=null==d?void 0:d.renderer)&&void 0!==_?_:"gpu",steps:x,cycles:M,interval:E,easing:O});if(!1===H)throw new Error("explodeChildren could not create its fragment children.");var U=H&&"object"===f(H)?H:{};e.assignSingleTarget(P,B,void 0,null!==(R=U.steps)&&void 0!==R?R:0,null!==(N=U.cycles)&&void 0!==N?N:M,null!==(V=U.interval)&&void 0!==V?V:E,null!==(F=U.easing)&&void 0!==F?F:O)}else if(i.D.isChildrenTarget(r,S)){var q,W,$,K;(Array.isArray(S)?S:S?[S]:[]).forEach((function(e){var r=t.addedChildren.length;if(t.addChild(e),t.addedChildren.length>r){var i=t.addedChildren[t.addedChildren.length-1].child;n.g.markAddChild(t,n.g.currentTargetName,i)}}));var G=t.finalizeChildrenTarget(r,{steps:x,cycles:M,interval:E,easing:O}),z=G&&"object"===f(G)?G:{};e.assignSingleTarget(P,S,void 0,null!==(q=z.steps)&&void 0!==q?q:0,null!==(W=z.cycles)&&void 0!==W?W:M,null!==($=z.interval)&&void 0!==$?$:E,null!==(K=z.easing)&&void 0!==K?K:O)}else if(i.D.isChildObjectTarget(r,t.targets[r])){var Y=e.createTModel(r,t.targets[r]);t.addChild(Y);var X=Object.fromEntries(Object.entries(S).filter((function(e){var t=h(e,1)[0];return!a.u.excludedTargetKeys.has(t)})));e.assignSingleTarget(P,X,void 0,0,M,E,O)}else if("object"===f(S)&&!0===S.asChild){var Q=e.createTModel(r,S);t.addChild(Q),e.assignSingleTarget(P,S,void 0,0,M,E,O)}else if(i.D.isFetchTarget(r,S))e.assignSingleTarget(P,S,void 0,0,M,E,O),(0,c.qI)().fetch(t,S);else if(i.D.isFetchImageTarget(r,S))e.assignSingleTarget(P,S,void 0,0,M,E,O),(0,c.qI)().fetchImage(t,S);else if(i.D.isListTarget(S))e.assignListTarget(t,r,P,S.list,S.list[0],x,E,O,M);else{var Z,J;x>0&&!l.d.areEqual(t.val(r),S,null!==(Z=null===(J=t.targets[r])||void 0===J?void 0:J.deepEquality)&&void 0!==Z&&Z)&&t.resetTargetStep(r),e.assignSingleTarget(P,S,u,x,M,E,O)}}}},{key:"createTModel",value:function(e,t){var r;return e=null===(r=e)||void 0===r?void 0:r.replace(/\${1,2}$/,""),d.E.create(e,t,(function(e,t){return new o.c(e,t)}))}}],(r=null)&&T(t.prototype,r),v&&T(t,v),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,v}()},690:function(e,t,r){r.d(t,{D:function(){return v}});var n=r(333),i=r(585),a=r(34),o=r(255),l=r(421),s=r(855);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e){return d="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},d(e)}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function f(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d(t)?t:t+""}var v=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,c=[{key:"isPlainObject",value:function(e){return!!e&&"object"===d(e)&&!Array.isArray(e)&&e.constructor===Object}},{key:"hasLifecycle",value:function(e){for(var t in e)if(!i.u.eventSet.has(t)&&"function"==typeof e[t]&&i.u.isLifeCycleMethod(t))return!0;return!1}},{key:"hasTargetSuffix",value:function(e){return/\${1,2}$/.test(e)||e.startsWith("_")}},{key:"isTargetKey",value:function(e){return e=n.g.getTargetName(e),i.u.reservedKeywordSet.has(e)}},{key:"scoreChild",value:function(t){var r=0,n=0;for(var a in t){var o=t[a];if(!i.u.defaultTargetStyles[a]&&!i.u.excludedTargetKeys.has(a)&&"active"!==a){if(e.hasTargetSuffix(a))return!0;if(this.hasLifecycle(o))return!0;e.isTargetKey(a)?r++:i.u.activationKeywordSet.has(a)||"function"==typeof t[a]||n++}}return r-n>=1}},{key:"classifyEntry",value:function(t,r){return e.isPlainObject(r)?e.isTargetKey(t)?"target2":"originalTModel"===t?"target3":r instanceof o.c?"children":e.isListTarget(r)||e.isFetchTarget(t,r)||e.isFetchImageTarget(t,r)?"target4":this.hasLifecycle(r)?"target5":this.scoreChild(r)?"children":"target6":"target1"}},{key:"isTargetSpecObject",value:function(e){return!(!e||"object"!==d(e)||Array.isArray(e)||Object.getPrototypeOf(e)!==Object.prototype)&&(Object.prototype.hasOwnProperty.call(e,"value")||Object.prototype.hasOwnProperty.call(e,"steps")||Object.prototype.hasOwnProperty.call(e,"interval")||Object.prototype.hasOwnProperty.call(e,"easing")||Object.prototype.hasOwnProperty.call(e,"cycles")||Object.prototype.hasOwnProperty.call(e,"instances"))}},{key:"getTargetInstances",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.targets[t],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.getTargetCycle(t);if(!r||"object"!==d(r)||!a.d.isDefined(r.instances))return 1;var i="function"==typeof r.instances?r.instances.call(e,n):r.instances;return Math.max(1,Math.floor(Number(i)||1))}},{key:"getInstanceTargetValue",value:function(t,r,n,i,a,o){return e.runTargetValue(t,n,r,i,a,o)}},{key:"runTargetValue",value:function(e,t,r,o,l){var u,c,d,h=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,f=n.g.getTargetName(r),v=i.u.allEventMap[f],p=a.d.isDefined(h)?[h]:[];return v?"function"==typeof t.value?(u=t.value).call.apply(u,[e].concat(p,[(0,s.kQ)().getCurrentOriginalEvent(),o,l])):a.d.isDefined(t.value)?t.value:t:e.val("___".concat(r))?"function"==typeof t.value?(c=t.value).call.apply(c,[e].concat(p,[e.val("___".concat(r)),o,l])):a.d.isDefined(t.value)?t.value:t:"function"==typeof t.value?(d=t.value).call.apply(d,[e].concat(p,[o,l])):a.d.isDefined(t.value)?t.value:t}},{key:"isChildrenTarget",value:function(e,t){return("children"===n.g.getTargetName(e)||"addChildren"===n.g.getTargetName(e))&&"object"===d(t)}},{key:"isChildTarget",value:function(e,t){return"child"===n.g.getTargetName(e)&&"object"===d(t)}},{key:"isChildObjectTarget",value:function(t,r){return"children"===e.classifyEntry(t,r)}},{key:"isListTarget",value:function(e){return"object"===d(e)&&null!==e&&Array.isArray(e.list)}},{key:"isFetchTarget",value:function(e,t){return!("fetch"!==n.g.getTargetName(e)||"string"!=typeof t&&!Array.isArray(t)&&(!t||"object"!==d(t)||"string"!=typeof t.url))}},{key:"isFetchImageTarget",value:function(e,t){return"fetchImage"===n.g.getTargetName(e)&&t&&("string"==typeof t||Array.isArray(t))}},{key:"isObjectTarget",value:function(t,r){return"style"!==n.g.getTargetName(t)&&"object"===d(r)&&null!==r&&!Array.isArray(r)&&Object.getPrototypeOf(r)===Object.prototype&&!e.isTargetSpecObject(r)}},{key:"isIntervalTarget",value:function(e){return!(!e||"object"!==d(e))&&(!(!e.isInterval||!a.d.isDefined(e.interval))||a.d.isDefined(e.interval)&&!a.d.isDefined(e.loop)&&!a.d.isDefined(e.steps)&&!a.d.isDefined(e.cycles))}},{key:"isPrimitiveArray",value:function(e){return!!Array.isArray(e)&&e.every((function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}))}},{key:"isValueStepsCycleArray",value:function(t){if(!Array.isArray(t)||0===t.length||t.length>5)return!1;if("number"!=typeof t[0]&&"string"!=typeof t[0]&&!e.isListTarget(t[0]))return!1;if(t.length>=2&&"number"!=typeof t[1])return!1;if(t.length>=3&&"number"!=typeof t[2])return!1;if(t.length>=4){var r=t[3],n="number"==typeof r,i="string"==typeof r&&l.G.easeMap.has(r);if(!n&&!i)return!1}if(5===t.length){var a=t[3],o=t[4];if("string"!=typeof a||!l.G.easeMap.has(a))return!1;if("number"!=typeof o)return!1}return e.isListTarget(t[0])||t.length>=2}},{key:"getValueStepsCycles",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.targets[r],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.getTargetCycle(r),o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,l=n&&n.valueOnly,s=t.val(r),u=null,c=0,h=0,f=void 0,v=1,p=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return"function"==typeof e?e.call.apply(e,[t].concat(n)):e};return function n(g){if(Array.isArray(g))return y=g,l||!e.isValueStepsCycleArray(y)?[y,c,h,f,v]:(u=y[0],c=y.length>=2?y[1]:c,h=y.length>=3?y[2]:h,y.length>=4&&("string"==typeof y[3]?(f=y[3],v=y.length>=5?y[4]:v):v=y[3]),[u,c,h,f,v]);var y;if("object"===d(g)&&null!==g&&Object.getPrototypeOf(g)===Object.prototype){var m=e.runTargetValue(t,g,r,i,s,o);return e.isPrimitiveArray(m)&&(a.d.isDefined(g.steps)||a.d.isDefined(g.interval)||a.d.isDefined(g.easing)||a.d.isDefined(g.cycles))?(u={list:m},c=a.d.isDefined(g.steps)?p(g.steps,i):0,h=a.d.isDefined(g.interval)?p(g.interval,i):8,f=a.d.isDefined(g.easing)?p(g.easing,i):f,v=a.d.isDefined(g.cycles)?p(g.cycles,i,t.getTargetCycles(r)):1,[u,c,h,f,v]):"object"===d(m)&&a.d.isDefined(m.value)&&a.d.isDefined(m.steps)?n(m):(u=m,c=a.d.isDefined(g.steps)?p(g.steps,i):0,h=a.d.isDefined(g.interval)?p(g.interval,i):0,f=a.d.isDefined(g.easing)?p(g.easing,i):f,v=a.d.isDefined(g.cycles)?p(g.cycles,i,t.getTargetCycles(r)):1,Array.isArray(u)?n(u):[u,c,h,f,v])}return"function"==typeof g?n(g.call(t,i,s)):[g,c,h,f,v]}(n)}},{key:"getInitialTargetValue",value:function(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("function"==typeof n)return e.getInitialTargetValue(t,r,n.call(t,i,t.val(r)),i);if(e.isPlainObject(n)){if(a.d.isDefined(n.initialValue))return e.getInitialTargetValue(t,r,n.initialValue,i);if("function"==typeof n.value)return e.getInitialTargetValue(t,r,n.value.call(t,i,t.val(r)),i)}var o=u(e.getValueStepsCycles(t,r,n,i),1)[0];return e.isListTarget(o)?o.list[0]:o}},{key:"isExplodeChildrenTarget",value:function(e){return"explodeChildren"===n.g.getTargetName(e)}}],(r=null)&&h(t.prototype,r),c&&h(t,c),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,c}()},333:function(e,t,r){r.d(t,{g:function(){return f}});var n=r(855),i=r(34),a=r(585);function o(e){return o="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},o(e)}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function s(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(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 u(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function h(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,u=[{key:"emptyValue",value:function(){return{value:void 0,actual:void 0,step:0,steps:0,cycle:0,valuePointer:0,cycles:1,interval:0,initialValue:void 0,scheduleTimeStamp:void 0,lastUpdate:0,updateCount:0,completeCount:0,completeTime:0,executionCount:0,visibleCompleteCount:0,status:"",executionFlag:!1,isImperative:!1,originalTargetName:void 0,easing:void 0,creationTime:i.d.now()}}},{key:"getTargetName",value:function(e){if(e){for(var t=e.startsWith("_")?1:0,r=e.length;r>t&&"$"===e[r-1];)r--;return"+"===e[r-1]&&r--,e.slice(t,r)}}},{key:"bindTarget",value:function(t,r,i,o,l){var s=t.targets[r],u=void 0!==i?t.getLastUpdate(i):void 0,c=function(){return void 0!==i?t.getLastUpdate(i):void 0},d=function(){var e=c();return(void 0!==u||void 0!==e)&&(void 0===u&&void 0!==e||e!==u)};s.originalTargetName=e.currentTargetName,s.originalTModel=e.currentTModel;var h=r.startsWith("_")?r.slice(1):r,f=!(!o||!o.endsWith("$"));if(!s.activateNextTarget){var v;if(f)v=o;else for(var p=t.originalTargetNames,g=l+1;g<p.length;g++){var y=p[g];if(y.endsWith("$$")){v=y;break}}v&&(s.activateNextTarget=v)}Object.keys(s).forEach((function(o){var l,f=s[o],v=null!==(l=null==f?void 0:f.__targetjsSource)&&void 0!==l?l:f;if("value"===o||"function"==typeof v&&a.u.isLifeCycleMethod(o)){var p=function(){var l;a.u.lifecycleCoreSet.has(o)||(e.currentTargetName=r,e.currentTModel=t),this.key=h,this.value=this.val(h),this.prevTargetValue=function(){if(i)return(0,n.qI)().isLoading(t,i)?(0,n.qI)().getLoadingItemValue(t,i,r):t.targetValues[i]?t.targetValues[i].actual:t.val(i)}(),this.isPrevTargetUpdated=d;var s="function"==typeof v?v.apply(this,arguments):v;return u=null!==(l=c())&&void 0!==l?l:u,s};p.__targetjsSource=v,s[o]=p}}))}},{key:"shouldActivateNextTarget",value:function(t,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!(o>4)&&t){var u="update"===(arguments.length>5&&void 0!==arguments[5]?arguments[5]:"complete"),c=!u;if(t.isTargetImperative(r)){var d=t.targetValues[r],h=d.originalTModel,f=d.originalTargetName;return e.shouldActivateNextTarget(h,f,o+1,l,!0,"update"),void(c&&(e.cleanupTarget(t,r),e.isTargetFullyCompleted(t,r)&&e.shouldActivateNextTarget(h,f,o+1,l,!0,"complete")))}var v=t.targets[r],p=t.targetValues[r];if(v&&p){var g=v.activateNextTarget,y=null!==(i=null==g?void 0:g.endsWith("$$"))&&void 0!==i&&i,m=e.hasFetchAction(t,r);if(!u||!y){var b=!1,T=!1;if(g){var w=a.u.requiresDom(e.getTargetName(g))&&!t.hasDom();if(y){var k=e.getTriggeredByCompleteCount(t,g,r);p.completeCount>k&&(T=!0)}else{var S,x=null!==(S=p.nextTargetUpdateCount)&&void 0!==S?S:0;T=p.updateCount>x}if(!y&&0===l&&(T||s)||y&&T){var E,C,M=!!y&&e.arePreviousTargetsComplete(t,g);if(y&&((null!==(C=(E=t.targetValues)[g])&&void 0!==C?C:E[g]=e.emptyValue()).previousTargetsStatus=M),w)e.markPendingTargets(t,r);else if(m)if(y)!0===M?e.activateTargetOnce(t,g)&&(b=!0,e.clearPendingTargetsForNextTarget(t,g)):e.markPendingTargets(t,r);else for(;(0,n.qI)().isNextLoadingItemSuccessful(t,r);)t.activatedTargets.indexOf(g)>=0?t.activatedTargets.push(g):e.activateTarget(t,g),(0,n.qI)().nextActiveItem(t,r),b=!0;else y?!0===M?(e.activateTarget(t,g),b=!0,e.clearPendingTargetsForNextTarget(t,g)):e.markPendingTargets(t,r):t.activatedTargets.indexOf(g)>=0&&!t.isTargetUpdating(r)?t.activatedTargets.push(g):(e.activateTarget(t,g),b=!0)}else c&&t.isTargetDone(g)&&e.cleanupTarget(t,g)}b&&(y?e.snapshotTriggeredByCompleteCounts(t,g):p.nextTargetUpdateCount=p.updateCount);var P=!1;if(y&&g){var D=e.getTriggeredByCompleteCount(t,g,r);P=p.completeCount<=D}if(!b&&c)if(g&&P&&!m)e.shouldActivateNextTarget(t,g,o,l+1,s,"complete");else if(!g){var O=v.originalTModel,L=v.originalTargetName;if(O&&L){var A,j,I=null!==(A=null===(j=O.targets[L])||void 0===j?void 0:j.completionScope)&&void 0!==A?A:"all";"none"!==I&&e.isTModelComplete(t,I)&&e.shouldActivateNextTarget(O,L,o+1,l,s,"complete")}}c&&e.cleanupTarget(t,r)}}}}},{key:"markPendingTargets",value:function(e,t){(e.pendingTargets||(e.pendingTargets=new Set)).add(t)}},{key:"clearPendingTarget",value:function(e,t){var r=e.pendingTargets;r&&(r.delete(t),0===r.size&&(e.pendingTargets=void 0))}},{key:"clearPendingTargetsForNextTarget",value:function(e,t){var r=e.pendingTargets;if(r){for(var n=0,i=s(r);n<i.length;n++){var a,o=i[n];(null===(a=e.targets[o])||void 0===a?void 0:a.activateNextTarget)===t&&r.delete(o)}0===r.size&&(e.pendingTargets=void 0)}}},{key:"cleanupTarget",value:function(t,r){if(e.cleanupVisibleComplete(t,r),t.isTargetComplete(r)||!e.isTargetFullyCompleted(t,r))return!1;t.setTargetComplete(r);var i=t.targets[r];if("function"==typeof(null==i?void 0:i.onComplete)&&(i.onComplete.call(t),t.setTargetMethodName(r,"onComplete")),e.hasFetchAction(t,r)&&(0,n.qI)().isLoadingSuccessful(t,r)){var a=t.fetchActionTargetList.indexOf(r);a>=0&&t.fetchActionTargetList.splice(a,1)}return e.bubbleInvokerCompletion(t,r),!0}},{key:"cleanupVisibleComplete",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.targets[r];if(!n||"function"!=typeof n.onVisibleComplete)return!1;var i=t.targetValues[r];if(!i)return!1;if(!0!==e.isTargetTreeComplete(t,r,"visible"))return!1;var a=e.getVisibleCompletionSignature(t);return i.visibleCompleteSignature!==a&&(i.visibleCompleteSignature=a,n.onVisibleComplete.call(t),t.setTargetMethodName(r,"onVisibleComplete"),!0)}},{key:"getVisibleCompletionSignature",value:function(e){return e.visibleChildren.map((function(e){return e.oid})).sort().join("|")}},{key:"bubbleInvokerCompletion",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Set,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(t&&r){var o="".concat(t.oid,":").concat(r);if(!(n.has(o)||a>4)){n.add(o);var l=t.targetValues[r];if(l){var s,u,c=function(t,r){if(t&&r){var o="".concat(t.oid,":").concat(r);i.has(o)||(i.add(o),e.cleanupTarget(t,r)),e.bubbleInvokerCompletion(t,r,n,i,a+1)}};c(l.originalTModel,l.originalTargetName),t.isTargetImperative(r)||(c(l.invokerTModel,l.invokerTargetName),c(null===(s=t.targets[r])||void 0===s?void 0:s.originalTModel,null===(u=t.targets[r])||void 0===u?void 0:u.originalTargetName))}}}}},{key:"getTriggeredByCompleteCount",value:function(e,t,r){var n,i;return null!==(n=null===(i=e.targetValues[t])||void 0===i||null===(i=i.triggeredByCompleteCountMap)||void 0===i?void 0:i.get(r))&&void 0!==n?n:0}},{key:"snapshotTriggeredByCompleteCounts",value:function(t,r){var n,i=(n=t.targetValues)[r]||(n[r]=e.emptyValue()),a=i.triggeredByCompleteCountMap||(i.triggeredByCompleteCountMap=new Map),o=t.functionTargetNames.indexOf(r);if(!(o<0))for(var l=0;l<o;l++){var s,u,c=t.functionTargetNames[l],d=t.targets[c];if((null==d?void 0:d.activateNextTarget)===r){var h=null!==(s=null===(u=t.targetValues[c])||void 0===u?void 0:u.completeCount)&&void 0!==s?s:0;a.set(c,h)}}}},{key:"activateTargetOnce",value:function(t,r){var n,i,a=(n=t.targetValues)[r]||(n[r]=e.emptyValue()),o=null!==(i=a.activationTime)&&void 0!==i?i:0;return!(o>0&&o>=t.getLastUpdate(r)||(a.activationTime=t.getLastUpdate(r)+.001,t.activateTarget(r),0))}},{key:"activateTarget",value:function(e,t){e.activateTarget(t)}},{key:"isTModelComplete",value:function(t){var r,i,a,o,l,s,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";if("visible"===u&&e.shouldIgnoreChildForCompletion(t,"visible"))return!0;if(null!==(r=t.particleRuntime)&&void 0!==r&&r.hasPendingAny(u))return!1;var c,d,h,f,v,p=!t.isLightweightChild&&(0,n.EI)().shouldHaveDom(t)&&!t.hasDom(),g=t.state(),y=!t.isLightweightChild&&e.hasPendingStyles(t),m=!t.isLightweightChild&&(0,n.EI)().needsReattach(t);return"visible"===u?!p&&!(null!==(c=g.updatingTargetList)&&void 0!==c&&c.length)&&!(null!==(d=g.activeTargetList)&&void 0!==d&&d.length)&&!(null!==(h=g.activatedTargets)&&void 0!==h&&h.length)&&!t.hasAnimatingTargets()&&e.isFetchingComplete(t)&&0===e.getUpdatingChildren(t,void 0,"visible").size&&0===e.getActiveChildren(t,"visible").size&&!(null!==(f=g.lastChildrenUpdate)&&void 0!==f&&null!==(f=f.deletions)&&void 0!==f&&f.length)&&!(null!==(v=g.lastChildrenUpdate)&&void 0!==v&&null!==(v=v.additions)&&void 0!==v&&v.length)&&!t.noDomUpdatingTargets&&!t.pendingTargets&&!y&&!m:!p&&!(null!==(i=g.updatingTargetList)&&void 0!==i&&i.length)&&!(null!==(a=g.activeTargetList)&&void 0!==a&&a.length)&&!(null!==(o=g.activatedTargets)&&void 0!==o&&o.length)&&!t.hasAnimatingTargets()&&e.isFetchingComplete(t)&&!t.hasAnimatingChildren()&&!t.hasUpdatingChildren()&&!t.hasActiveChildren()&&!(null!==(l=g.lastChildrenUpdate)&&void 0!==l&&null!==(l=l.deletions)&&void 0!==l&&l.length)&&!(null!==(s=g.lastChildrenUpdate)&&void 0!==s&&null!==(s=s.additions)&&void 0!==s&&s.length)&&!t.noDomUpdatingTargets&&!t.pendingTargets&&!y&&!m}},{key:"getCompletionBlockers",value:function(t){var r,i,a="visible"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all");if(a&&e.shouldIgnoreChildForCompletion(t,"visible"))return[];var o=t.state(),l=[],u=function(e,t){t&&(!Array.isArray(t)||t.length>0)&&l.push({name:e,value:t})},c=function(e){return e?e instanceof Set?s(e):e instanceof Map?s(e.keys()):Array.isArray(e)?e:[e]:[]};return u("waitingForDom",!t.isLightweightChild&&(0,n.EI)().shouldHaveDom(t)&&!t.hasDom()),u("updatingTargetList",c(o.updatingTargetList)),u("activeTargetList",c(o.activeTargetList)),u("activatedTargets",c(o.activatedTargets)),u("animatingTargets",t.hasAnimatingTargets()?c(t.animatingMap):[]),u("fetching",!e.isFetchingComplete(t)),a?(u("updatingChildren",s(e.getUpdatingChildren(t,void 0,"visible").keys())),u("activeChildren",s(e.getActiveChildren(t,"visible").keys()))):(u("animatingChildren",t.hasAnimatingChildren()),u("updatingChildren",t.hasUpdatingChildren()?c(t.updatingChildrenMap):[]),u("activeChildren",t.hasActiveChildren()?c(t.activeChildrenMap):[])),u("deletedChildren",c(null===(r=o.lastChildrenUpdate)||void 0===r?void 0:r.deletions)),u("addedChildren",c(null===(i=o.lastChildrenUpdate)||void 0===i?void 0:i.additions)),u("noDomUpdatingTargets",c(t.noDomUpdatingTargets)),u("pendingTargets",c(t.pendingTargets)),t.hasDom()&&(u("styleTargetMap",c(t.styleTargetMap)),u("asyncStyleTargetMap",c(t.asyncStyleTargetMap))),u("needsReattach",(0,n.EI)().needsReattach(t)),l}},{key:"hasPendingStyles",value:function(e){var t,r;return e.hasDom()&&((null===(t=e.styleTargetMap)||void 0===t?void 0:t.size)>0||(null===(r=e.asyncStyleTargetMap)||void 0===r?void 0:r.size)>0)}},{key:"isFetchingComplete",value:function(e){var t=e.state().fetchActionTargetList;if(!t)return!0;var r,i=l(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(!(0,n.qI)().isLoadingSuccessful(e,a))return!1}}catch(e){i.e(e)}finally{i.f()}return!0}},{key:"isTargetFullyCompleted",value:function(t,r){var n=!t.isTargetUpdating(r)&&!0===t.isTargetTreeComplete(r);return n&&!t.isTargetImperative(r)&&(n=!t.hasUpdatingImperativeTargets(r)),n&&r.endsWith("$$")&&(n=!0===e.arePreviousTargetsComplete(t,r)),n}},{key:"arePreviousTargetsComplete",value:function(t,r){var n=t.functionTargetNames.findIndex((function(e){return r===e}));if(e.hasPendingStyles(t))return"pending styles";for(var i=n-1;i>=0;i--){var a=t.functionTargetNames[i];if(!t.isTargetImperative(a)&&!t.isTargetComplete(a)){if(t.activatedTargets.indexOf(a)>=0)return"activated targets";if(t.hasUpdatingImperativeTargets(a))return t.oid+"."+a+": "+t.getUpdatingImperativeTargets(a);if(!0!==t.isTargetTreeComplete(a)){var o,l=null!==(o=t.targets[a].completionScope)&&void 0!==o?o:"all",u=e.isTargetTreeComplete(t,a),c=s(e.getActiveChildren(t,l).keys()),d=s(e.getUpdatingChildren(t,a,l).keys());return"".concat(t.oid,".").concat(a,": ").concat(u,"; active=[").concat(c.join(", "),"]; updating=[").concat(d.join(", "),"]")}}}return!0}},{key:"isTargetTreeComplete",value:function(t,r,i){var l=t.targets[r],u=t.targetValues[r],c=null==u?void 0:u.childAction;if(l){var d,h,f=null!=i?i:l.completionScope;if(null!==(d=t.particleRuntime)&&void 0!==d&&d.hasPending(r,null!=f?f:"all"))return"pending GPU children";var v,p=o(l.value);if(a.u.controlTargetMap[r])return!0;if(!e.hasFetchAction(t,r)&&("string"===p||"number"===p||"boolean"===p))return!0;if((0,n.EI)().needsReattach(t))return"needs Reattach";if((0,n.EI)().shouldHaveDom(t)&&!t.hasDom())return"no dom";if(!t.isTargetComplete(r)&&!t.isTargetDone(r))return"not done";if((null==c?void 0:c.length)>0&&(v=e.getUpdatingChildren(t,r,f)).size>0)return"updating children: "+s(v.keys()).join(", ");if((null==c?void 0:c.length)>0&&(v=e.getActiveChildren(t,f)).size>0)return"active children: "+s(v.keys()).join(", ");if((null==c?void 0:c.length)>0&&!0!==(v=e.areTargetChildrenComplete(c,f)))return"incomplete children: "+v;if(e.hasFetchAction(t,r)&&!(0,n.qI)().isLoadingSuccessful(t,r))return"incomplete loading";if(null!==(h=t.particleRuntime)&&void 0!==h&&h.hasPending(r,f))return"pending GPU children"}return!0}},{key:"areTargetChildrenComplete",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";if(!t)return!0;var n,i=l(t);try{for(i.s();!(n=i.n()).done;){var a,o=n.value;if(o){if("visible"===r&&!o.isLightweightChild&&void 0===(null===(a=o.visibilityStatus)||void 0===a?void 0:a.isVisible))return"visibility not calculated";if(!e.shouldIgnoreChildForCompletion(o,r)){if(o.exists()&&!e.isTModelComplete(o,r))return o.oid;if(o.hasChildren()){var s=e.areTargetChildrenComplete(o.getChildren(),r);if(!0!==s)return s}}}}}catch(e){i.e(e)}finally{i.f()}return!0}},{key:"getUpdatingChildren",value:function(t,r){var n,i,a,o,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all",c=new Map;return[].concat(s(null!==(n=null===(i=t.updatingChildrenMap)||void 0===i?void 0:i.values())&&void 0!==n?n:[]),s(null!==(a=null===(o=t.animatingChildrenMap)||void 0===o?void 0:o.values())&&void 0!==a?a:[])).forEach((function(t){var n,i;if(!e.shouldIgnoreChildForCompletion(t,u)){var a,o=l([].concat(s(null!==(n=t.updatingTargetList)&&void 0!==n?n:[]),s(t.animatingMap?s(t.animatingMap.keys()):[]),s(null!==(i=t.noDomUpdatingTargets)&&void 0!==i?i:[])));try{for(o.s();!(a=o.n()).done;){var d,h,f=a.value;if(null===(d=t.targetValues[f])||void 0===d||!d.snapAnimation)if(t.isTargetImperative(f)){var v,p=null===(v=t.targetValues[f])||void 0===v?void 0:v.originalTargetName;if(p===r)c.set(t.oid,t);else if(p){var g,y;(null===(y=(null===(g=t.targetValues[f])||void 0===g?void 0:g.originalTModel).targets[p])||void 0===y?void 0:y.originalTargetName)===r&&c.set(t.oid,t)}}else(null===(h=t.targets[f])||void 0===h?void 0:h.invokerTargetName)===r&&c.set(t.oid,t)}}catch(e){o.e(e)}finally{o.f()}}})),c}},{key:"hasVisibleActiveChild",value:function(t){var r,n,i;if(e.shouldIgnoreChildForCompletion(t,"visible"))return!1;if((null===(r=t.activeTargetList)||void 0===r?void 0:r.length)>0)return!0;var a,o=l(null!==(n=null===(i=t.getChildren)||void 0===i?void 0:i.call(t))&&void 0!==n?n:[]);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(e.hasVisibleActiveChild(s))return!0}}catch(e){o.e(e)}finally{o.f()}return!1}},{key:"getActiveChildren",value:function(t){var r,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all",a=new Map;return s(null!==(r=null===(n=t.activeChildrenMap)||void 0===n?void 0:n.values())&&void 0!==r?r:[]).forEach((function(t){"visible"!==i?e.shouldIgnoreChildForCompletion(t,i)||t.activeTargetList.length&&a.set(t.oid,t):e.hasVisibleActiveChild(t)&&a.set(t.oid,t)})),a}},{key:"shouldIgnoreChildForCompletion",value:function(e,t){return e&&"function"!=typeof e.exists?(console.warn("Invalid child reference",JSON.stringify(e)),!0):!e||!e.exists()||"none"===t||"visible"===t&&(e.visibilityStatus?!0!==e.visibilityStatus.isVisible:"function"!=typeof e.isVisible||!0!==e.isVisible())}},{key:"activateSingleTarget",value:function(e,t){e.targets[t]&&e.canTargetBeActivated(t)&&(e.isTargetEnabled(t)?e.activateTarget(t):e.addToActiveTargets(t))}},{key:"markTargetChildAction",value:function(t,r,n,i){var a,l,s;if(n&&null!=t&&t.targets[r]&&"object"===o(t.targets[r])){var u=null!==(l=(a=t.targetValues)[r])&&void 0!==l?l:a[r]=e.emptyValue(),c=null!==(s=u[i])&&void 0!==s?s:u[i]=[];c.includes(n)||c.push(n)}}},{key:"markChildAction",value:function(t,r,n){e.markTargetChildAction(t,r,n,"childAction")}},{key:"markAddChild",value:function(t,r,n){e.markTargetChildAction(t,r,n,"addChildAction")}},{key:"markFetchAction",value:function(t){var r=e.currentTargetName;null!=t&&t.targets[r]&&(t.fetchActionTargetList.includes(r)||t.fetchActionTargetList.push(r))}},{key:"hasFetchAction",value:function(e,t){return e.fetchActionTargetList.includes(t)}},{key:"wrapTarget",value:function(t,r,n){return a.u.controlTargetMap[n]||(t.targets[n]={value:r,originalTargetName:e.currentTargetName,originalTModel:e.currentTModel},r=t.targets[n]),r}},{key:"resetBeforeDeletion",value:function(e){var t;e.updatingTargetList.length=0,e.activeTargetList.length=0,null===(t=e.animatingMap)||void 0===t||t.clear(),e.clearUpdatingChildren(),e.clearActiveChildren(),e.clearAnimatingChildren(),(0,n.zw)().domIslandSet.delete(e),n.qw.tmodelIdMap[e.oid]===e&&delete n.qw.tmodelIdMap[e.oid]}},{key:"getOriginalNames",value:function(e,t){var r,n,i,a,o,l;return e.isTargetImperative(t)?(r=null===(i=e.targetValues[t])||void 0===i?void 0:i.originalTModel,n=null===(a=e.targetValues[t])||void 0===a?void 0:a.originalTargetName):(r=null===(o=e.targets[t])||void 0===o?void 0:o.originalTModel,n=null===(l=e.targets[t])||void 0===l?void 0:l.originalTargetName),{originalTModel:r,originalTargetName:n}}},{key:"resetTargetState",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Set;if(t&&r){e.resetSingleTargetState(t,r),e.resetTargetChildActions(t,r,n,i);var a=t.targets[r],o=null==a?void 0:a.activateNextTarget,l=t.targets[o];l&&(o.endsWith("$")||!1!==l.active)&&(e.resetTargetsBetween(t,r,o,n,i),e.resetTargetPipelineState(t,o,n,i))}}},{key:"resetTargetPipelineState",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Set;if(t&&r){e.resetSingleTargetState(t,r),e.resetTargetChildActions(t,r,n,i);var a=t.targets[r],o=null==a?void 0:a.activateNextTarget;if(o){var l=t.targets[o];l&&(o.endsWith("$")||!1!==l.active)&&(e.resetTargetsBetween(t,r,o,n,i),e.resetTargetPipelineState(t,o,n,i))}}}},{key:"resetTargetsBetween",value:function(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new Set,o=t.functionTargetNames,l=o.indexOf(r),s=o.indexOf(n);if(!(l<0||s<0||s<=l))for(var u=l+1;u<s;u++){var c=o[u];e.resetSingleTargetState(t,c),e.resetTargetChildActions(t,c,i,a)}}},{key:"resetTargetChildState",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;if(!t.isLightweightChild){var i="".concat(t.oid);if(!n.has(i)){n.add(i);for(var a=Object.keys(t.targetValues),o=0;o<a.length;o++){var l=a[o];e.resetSingleTargetState(t,l),e.resetTargetChildActions(t,l,r,n)}}}}},{key:"resetTargetChildActions",value:function(t,r){var n,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Set,l=t.targetValues[r];if(l){var u=s(null!==(n=l.childAction)&&void 0!==n?n:[]),c=s(null!==(i=l.addChildAction)&&void 0!==i?i:[]);u.forEach((function(t){t&&e.resetTargetChildState(t,a,o)})),c.forEach((function(t){t&&e.resetTargetChildState(t,a,o)})),a.clearChildActions&&(Array.isArray(l.childAction)&&(l.childAction=[]),Array.isArray(l.addChildAction)&&(l.addChildAction=[]))}}},{key:"clearTriggeredByCompleteCount",value:function(e,t,r){var n=e.targetValues[t],i=null==n?void 0:n.triggeredByCompleteCountMap;i&&(i.delete(r),0===i.size&&(n.triggeredByCompleteCountMap=void 0))}},{key:"resetTargetStateOnly",value:function(t,r){var n,i=t.targetValues[r],a=null===(n=t.targets[r])||void 0===n?void 0:n.activateNextTarget;null!=a&&a.endsWith("$$")&&e.clearTriggeredByCompleteCount(t,a,r),i&&(i.completeCount=0,i.triggeredByCompleteCountMap=void 0,i.resetFlag=!0,i.nextTargetUpdateCount=0,i.visibleCompleteSignature=void 0,i.status=""),t.removeFromActiveTargets(r),t.removeFromAnimatingMap(r),t.removeFromUpdatingTargets(r),e.clearPendingTarget(t,r)}},{key:"resetSingleTargetState",value:function(t,r){e.resetTargetStateOnly(t,r),t.cancelAnimation(),t.activatedTargets.length=0}},{key:"resetRemovedChildTarget",value:function(t,r,n){var i=t.targetValues[r];if(i){e.resetTargetStateOnly(t,r);for(var a=0,o=["childAction","addChildAction"];a<o.length;a++){var l,s=i[o[a]],u=null!==(l=null==s?void 0:s.indexOf(n))&&void 0!==l?l:-1;u>=0&&s.splice(u,1)}}}},{key:"convertAnimatingTargetsToUpdating",value:function(e){var t,r=l(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(null!=n&&n.hasAnimatingTargets()){var i,a=l(s(n.getAnimatingTargets()));try{for(a.s();!(i=a.n()).done;){var o=i.value;n.setTargetStatus(o,"updating"),n.removeFromAnimatingMap(o)}}catch(e){a.e(e)}finally{a.f()}}}}catch(e){r.e(e)}finally{r.f()}}},{key:"getResetOptions",value:function(e){var t=null==e?void 0:e.reset;return{shouldReset:!0===t||"pipeline"===t||"tree"===t||"all"===t,clearChildActions:"tree"===t||"all"===t}}},{key:"isTargetUpdating",value:function(e,t){var r=e.targetValues[t];if(!r)return!1;var n=e.getValueListPointer(t),i=e.getTargetCycle(t),a=e.getTargetCycles(t),o=e.getTargetStep(t),l=e.getTargetSteps(t);return!!(Array.isArray(r.valueList)&&n<r.valueList.length)||!!(e.isTargetImperative(t)&&i<a-1)||o<l}}],(r=null)&&d(t.prototype,r),u&&d(t,u),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,u}()},530:function(e,t,r){r.d(t,{L:function(){return l}});var n=r(249);function i(e){return i="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},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function o(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}var l=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.xNext=0,this.xNorth=0,this.xWest=0,this.xEast=0,this.xSouth=0,this.scrollLeft=0,this.scrollTop=0,this.absX=0,this.absY=0,this.xOverflowReset=0,this.xOverflowLimit=0,this.yNext=0,this.yNorth=0,this.yWest=0,this.yEast=0,this.ySouth=0,this.container=void 0,this.time=0},(t=[{key:"setContainer",value:function(e){this.container=e}},{key:"setCurrentChild",value:function(e){this.currentChild=e}},{key:"setLocation",value:function(){var e=this.currentChild;e.targets.excludeXYCalc||(e.setLayoutX(this.xNext+e.getMarginLeft()+this.container.getPaddingLeft()),e.setLayoutY(this.yNext+e.getMarginTop()+this.container.getPaddingTop()))}},{key:"isOverflow",value:function(){return"BI"!==this.currentChild.type&&(!("always"!==this.container.getContainerOverflowMode()&&"always"!==this.currentChild.getItemOverflowMode()&&("auto"!==this.container.getContainerOverflowMode()||"auto"!==this.currentChild.getItemOverflowMode()||this.currentChild.useContentWidth()||!this.checkChildOverflow()))||void 0)}},{key:"checkChildOverflow",value:function(){var e=this.currentChild,t=e.getMinWidth();return this.xNext+e.getMarginLeft()+t+e.getMarginRight()>this.xOverflowLimit}},{key:"overflow",value:function(){this.xNext=this.scrollLeft-this.xOverflowReset,this.yNext=Math.max(this.currentChild.getRealParent().viewport.ySouth,this.ySouth)}},{key:"appendNewLine",value:function(){var e=this.currentChild,t=e.getMeasuringScale(),r=e.getHeight()*t+this.currentChild.getMarginTop()+this.currentChild.getMarginBottom();this.xNext=this.scrollLeft-this.xOverflowReset;var n=this.yNext+r+e.val("appendNewLine");this.yEast=this.yNext,this.xSouth=this.xNext,this.ySouth=Math.max(this.ySouth,n),this.yEast=this.ySouth,this.yNext=this.ySouth,e.getRealParent().viewport.xEast=Math.max(e.getRealParent().viewport.xEast,this.xEast),e.getRealParent().viewport.ySouth=Math.max(e.getRealParent().viewport.ySouth,this.ySouth)}},{key:"computeBoundary",value:function(e,t){var r,n,i,a,o,l,s=e.getMeasuringScale(),u=e.getBaseWidth()*s,c=e.getBaseHeight()*s;return"layout"===t?(r=e.x,n=e.y,i=r-e.getMarginLeft(),a=r+u+e.getMarginRight(),o=n-e.getMarginTop(),l=n+c+e.getMarginBottom()):"absolute"===t?(r=e.absX-this.absX,n=e.absY-this.absY,i=r,a=r+u+e.getMarginRight(),o=n,l=n+c+e.getMarginBottom()):(i=r=e.getX(),a=r+u,o=n=e.getY(),l=n+c),{left:i,top:o,right:a,bottom:l}}},{key:"nextLocation",value:function(){var e=this.currentChild,t=e.getMeasuringScale(),r=e.getTopBaseHeight()*t,i=e.getLayoutHeight()*t+this.currentChild.getMarginTop()+this.currentChild.getMarginBottom(),a="always"===e.getItemOverflowMode()&&n.a.isWidthDefined(this.container)?this.container.getWidth():e.getBaseWidth()*t+this.currentChild.getMarginLeft()+this.currentChild.getMarginRight();if("BI"!==e.type&&"BI"===this.container.type){var o=this.computeBoundary(e,"layout"),l=this.computeBoundary(e,"animated");i=Math.max(i,o.bottom-l.top,l.bottom-o.top,o.bottom-o.top,l.bottom-l.top),a=Math.max(a,o.right-l.left,l.right-o.left,o.right-o.left,l.right-l.left)}var s=this.yNext+i;if(this.xNext+=a,e.isDomIsland()&&e.hasDom()){var u=this.computeBoundary(e,"absolute");s=u.bottom,this.xNext=u.right,this.xWest=u.left,this.yWest=u.top}this.yNext+=r,this.xSouth=this.xNext,this.yEast=this.yNext,this.xEast=Math.max(this.xNext,this.xEast),this.ySouth=Math.max(s,this.ySouth),e.getRealParent().viewport.xEast=Math.max(e.getRealParent().viewport.xEast,this.xEast),e.getRealParent().viewport.ySouth=Math.max(e.getRealParent().viewport.ySouth,this.ySouth),"always"!==this.container.getContainerOverflowMode()&&"always"!==this.currentChild.getItemOverflowMode()||(this.yEast=e.getRealParent().viewport.ySouth,this.yNext=e.getRealParent().viewport.ySouth,this.xNext=e.getRealParent().viewport.xWest,this.xSouth=e.getRealParent().viewport.xWest)}}])&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}()},952:function(e,t,r){r.d(t,{n:function(){return s}});var n=r(855),i=r(34);function a(e){return a="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},a(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,a=[{key:"calcVisibility",value:function(t){var r,n=t.getRealParent();if((null===(r=null==n?void 0:n.targets.onVisibleChildrenChange)||void 0===r||!r)&&t.isVisible()&&(t.isTargetUpdating(t.allTargetMap.x)||t.isTargetUpdating(t.allTargetMap.y)))return!0;var a=(t.getDomParent().getMeasuringScale()||1)*t.getMeasuringScale(),o=t.absX,l=t.absY,s=i.d.isDefined(t.getWidth())?a*t.getWidth():0,u=i.d.isDefined(t.getHeight())?a*t.getHeight():0,c={x:o-20,y:l-20,r:o+s+20,b:l+u+20},d=e.checkVisibility(t,c);return d.x=o,d.y=l,d.width=s,d.height=u,t.visibilityStatus=d,t.actualValues.isVisible=d.isVisible,d.isVisible}},{key:"checkVisibility",value:function(t,r){for(;t;){var i=t.getRealParent();if(!i||i===(0,n.Bt)())break;if(e.shouldClipByAncestor(i)){var a=e.getParentClip(i);if(!e.rectsOverlap(r,a))return{clip:a,isVisible:!1};r=e.intersectRects(i,r,a)}t=i}var o=e.getScreenViewportRect(),l="BI"===t.type;return e.rectsOverlap(r,o,l)?{isVisible:!0}:{clip:o,isVisible:!1}}},{key:"getScreenViewportRect",value:function(){return{x:0,y:0,r:(0,n.r5)(),b:(0,n.c$)(),source:"screen"}}},{key:"shouldClipByAncestor",value:function(e){var t=e.val("overflow");return e.managesOwnScroll()||"hidden"===t||"auto"===t||"scroll"===t||"clip"===t}},{key:"getParentClip",value:function(e){var t,r,n=(null===(t=e.$dom)||void 0===t?void 0:t.getScrollLeft())||0,i=(null===(r=e.$dom)||void 0===r?void 0:r.getScrollTop())||0,a=e.getHeight(),o=e.getWidth();return{x:e.absX+n,y:e.absY+i,r:e.absX+o+n,b:e.absY+a+i,source:e}}},{key:"rectsOverlap",value:function(e,t){return(arguments.length>2&&void 0!==arguments[2]&&arguments[2]||e.x<=t.r&&e.r>=t.x)&&e.y<=t.b&&e.b>=t.y}},{key:"intersectRects",value:function(e,t,r){var n,i,a=(null===(n=e.$dom)||void 0===n?void 0:n.getScrollLeft())||0,o=(null===(i=e.$dom)||void 0===i?void 0:i.getScrollTop())||0;return{x:Math.max(t.x-a,r.x-a),y:Math.max(t.y-o,r.y-o),r:Math.min(t.r-a,r.r-a),b:Math.min(t.b-o,r.b-o),source:r.source}}}],(r=null)&&o(t.prototype,r),a&&o(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,a}()}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{$Dom:function(){return $Dom.J},AnimationManager:function(){return AnimationManager._},AnimationUtil:function(){return AnimationUtil.T},App:function(){return App.qw},Bracket:function(){return Bracket.d},BracketGenerator:function(){return BracketGenerator.M},ColorUtil:function(){return ColorUtil.I},DomInit:function(){return DomInit.v},Easing:function(){return Easing.G},Moves:function(){return Moves},ParticleChild:function(){return ParticleChild.$},ParticleRenderer:function(){return ParticleRenderer.e},ParticleRuntime:function(){return ParticleRuntime.f},ParticleTModel:function(){return ParticleTModel.G},ParticleUtil:function(){return ParticleUtil.D},ScheduleUtil:function(){return ScheduleUtil.O},SearchUtil:function(){return SearchUtil.X},StateUtil:function(){return StateUtil.s},TModel:function(){return TModel.c},TModelUtil:function(){return TModelUtil.a},TUtil:function(){return TUtil.d},TargetData:function(){return TargetData.u},TargetExecutor:function(){return TargetExecutor.j},TargetParser:function(){return TargetParser.D},TargetUtil:function(){return TargetUtil.g},VisibilityUtil:function(){return VisibilityUtil.n},fetch:function(){return App.hd},fetchImage:function(){return App.aK},getAnimationManager:function(){return App.s},getDomTModelById:function(){return App.UR},getEvents:function(){return App.kQ},getLoader:function(){return App.qI},getLocationManager:function(){return App.zw},getManager:function(){return App.EI},getPager:function(){return App.cI},getResizeLastUpdate:function(){return App.S9},getRunScheduler:function(){return App.fB},getScreenHeight:function(){return App.c$},getScreenWidth:function(){return App.r5},getTModelById:function(){return App.iP},getTargetManager:function(){return App.HJ},getVisibles:function(){return App.U$},isRunning:function(){return App.W_},state:function(){return App.wk},tApp:function(){return App.E_},tRoot:function(){return App.Bt}});var App=__webpack_require__(855),TModel=__webpack_require__(255),TUtil=__webpack_require__(34);function _typeof(e){return _typeof="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},_typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Moves=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"bounce",value:function(e,t){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.yStart,i=void 0===n?void 0:n,a=r.xStart,o=void 0===a?(0,App.r5)()/2:a,l=r.widthStart,s=void 0===l?50:l,u=r.heightStart,c=void 0===u?50:u,d=r.bFactor,h=void 0===d?.6:d,f=r.cFactor,v=void 0===f?.2:f,p=r.rotationStart,g=void 0===p?0:p,y=r.rIncrement,m=void 0===y?360:y,b=Math.max(10,(t-e)*h),T=TUtil.d.isDefined(i)?[i,e]:[e],w=[o],k=[s],S=[c],x=[g];Math.abs(0|b)>1;){T.push(t),T.push(t-b);var E=s*(1+v),C=c*(1-v);k.push(E),k.push(s),S.push(C),S.push(c),w.push(o-(E-s)/2),w.push(o),x.push(x[x.length-1]+m),b*=h,m*=.8,v*=h}w.push(o),T.push(t),k.push(s),S.push(c);var M=x[x.length-1]%360;return M>0&&M<360&&x.push(360),{x:{list:w},y:{list:T},width:{list:k},height:{list:S},rotate:{list:x}}}},{key:"bounceSimple",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.from,i=void 0===n?void 0:n,a=r.to,o=void 0===a?void 0:a,l=r.widthStart,s=void 0===l?void 0:l,u=r.heightStart,c=void 0===u?void 0:u,d=r.xStart,h=void 0===d?void 0:d,f=r.yStart,v=void 0===f?void 0:f,p=r.bFactor,g=void 0===p?.5:p,y=r.cFactor,m=void 0===y?.7:y;i=TUtil.d.isDefined(i)?i:t.getY()-70,o=TUtil.d.isDefined(o)?o:t.getY(),s=TUtil.d.isDefined(s)?s:t.getWidth(),c=TUtil.d.isDefined(c)?c:t.getHeight(),v=TUtil.d.isDefined(v)?v:t.getY(),h=TUtil.d.isDefined(h)?h:t.getX();return e.bounce(i,o,{yStart:v,xStart:h,widthStart:s,heightStart:c,bFactor:g,cFactor:m,rIncrement:0})}},{key:"shake",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.xStart,i=void 0===n?void 0:n,a=r.width,o=void 0===a?void 0:a,l=r.height,s=void 0===l?void 0:l,u=r.bFactor,c=void 0===u?.6:u,d=r.cFactor,h=void 0===d?.3:d,f=r.strength,v=void 0===f?20:f,p=TUtil.d.isDefined(o)?o:t.getWidth(),g=TUtil.d.isDefined(s)?s:t.getHeight(),y=TUtil.d.isDefined(i)?i:t.getX(),m=t.getY(),b=e.bounce(m-v,m,{xStart:y,widthStart:p,heightStart:g,bFactor:c,cFactor:h,rIncrement:0});return{x:b.x,width:b.width}}},{key:"spiral",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.startAngle,r=void 0===t?0:t,n=e.endAngle,i=void 0===n?360:n,a=e.angleStep,o=void 0===a?18:a,l=e.x,s=void 0===l?0:l,u=e.y,c=void 0===u?0:u,d=e.width,h=void 0===d?100:d,f=e.height,v=void 0===f?100:f,p=[],g=[],y=[],m=r;m<=i;m+=o){var b=m*(Math.PI/180);p.push(Math.floor(s+h*Math.cos(b))),g.push(Math.floor(c+v*Math.sin(b))),y.push(90+m)}return{x:{list:p},y:{list:g},rotate:{list:y}}}}])}();_defineProperty(Moves,"shakeMap",{});var SearchUtil=__webpack_require__(756),TargetData=__webpack_require__(585),TargetUtil=__webpack_require__(333),TargetParser=__webpack_require__(690),TModelUtil=__webpack_require__(249),DomInit=__webpack_require__(260),$Dom=__webpack_require__(768),Bracket=__webpack_require__(966),BracketGenerator=__webpack_require__(714),ColorUtil=__webpack_require__(737),Easing=__webpack_require__(421),TargetExecutor=__webpack_require__(484),AnimationManager=__webpack_require__(357),AnimationUtil=__webpack_require__(980),VisibilityUtil=__webpack_require__(952),ScheduleUtil=__webpack_require__(161),StateUtil=__webpack_require__(791),ParticleTModel=__webpack_require__(599),ParticleChild=__webpack_require__(494),ParticleRenderer=__webpack_require__(969),ParticleRuntime=__webpack_require__(720),ParticleUtil=__webpack_require__(138);window.TargetJS=__webpack_exports__})();