@webqit/oohtml 1.8.35 → 1.9.2

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/main.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e){var t={};function r(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)r.d(n,s,function(t){return e[t]}.bind(null,s));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=81)}([function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i.a})),r.d(t,"d",(function(){return o.a})),r.d(t,"e",(function(){return c.a})),r.d(t,"f",(function(){return l.a})),r.d(t,"g",(function(){return u.a})),r.d(t,"h",(function(){return n.a})),r.d(t,"i",(function(){return h.a})),r.d(t,"j",(function(){return p.a})),r.d(t,"k",(function(){return f.a}));var n=r(2),s=function(e){return typeof e};function a(e,...t){globalThis.WebQitInternalsRegistry||(globalThis.WebQitInternalsRegistry=new Map);var r,n,s=globalThis.WebQitInternalsRegistry.get(e);if(!s){if(s=new Map,!1===t[0])return s;globalThis.WebQitInternalsRegistry.set(e,s)}for(;r=t.shift();)if((n=s)&&!(s=s.get(r))){if(s=new Map,!1===t[0])return s;n.set(r,s)}return s}var i=r(1),o=(r(25),r(50)),c=(r(41),r(3)),l=(r(24),r(18)),u=r(10),h=(r(33),r(14)),p=(r(42),r(21),r(5)),f=r(6);r(7),r(9),r(20);new Map;r(19)},function(e,t,r){"use strict";t.a=function(e){return Array.isArray(e)}},function(e,t,r){"use strict";t.a=function(e){return!Array.isArray(e)&&"object"==typeof e&&e}},function(e,t,r){"use strict";var n=r(21);t.a=function(e){return Object(n.a)(e)||e&&"[object function]"==={}.toString.call(e)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n.a})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return i.a})),r.d(t,"d",(function(){return o})),r.d(t,"e",(function(){return a.a})),r.d(t,"f",(function(){return l.a})),r.d(t,"g",(function(){return u.a})),r.d(t,"h",(function(){return c.a})),r.d(t,"i",(function(){return h.a})),r.d(t,"j",(function(){return p.a}));var n=r(36);var s=function(e,t){return e.reduce((e,r,n)=>e||t(r,n),!1)};r(32),r(22);r(6),r(3),r(28);var a=r(8),i=r(55);function o(e,t,r=null){return r||!1!==r&&e.dotSafe&&t.dotSafe?e.join(".")===t.join("."):e.length===t.length&&e.reduce((e,r,n)=>e&&r===t[n],!0)}var c=r(37),l=(r(16),r(29),r(1),r(2),r(25),r(18),r(52)),u=r(7);r(34),r(20),r(14);var h=r(48),p=r(47)},function(e,t,r){"use strict";var n=r(21);t.a=function(e){return Array.isArray(e)||"object"==typeof e&&e||Object(n.a)(e)}},function(e,t,r){"use strict";t.a=function(e){return arguments.length&&(void 0===e||void 0===e)}},function(e,t,r){"use strict";var n=r(16);t.a=function(e,t=1){return arguments.length>1?Object(n.a)(e.slice().reverse(),t).reverse():Object(n.a)(e.slice().reverse())}},function(e,t,r){"use strict";var n=r(1),s=r(42),a=r(41),i=r(2);t.a=function(e,t=!0){return Object(n.a)(e)?e:!t&&Object(i.a)(e)?[e]:!1!==e&&0!==e&&Object(a.a)(e)?[]:Object(s.a)(e)?Array.prototype.slice.call(e):Object(i.a)(e)?Object.values(e):[e]}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(1),s=r(3),a=r(2),i=r(5),o=r(10),c=r(43);function l(e,t,r=!1,u=!1,h=!1){var p=0,f=e.shift();if((Object(o.a)(f)||!0===f||!1===f)&&(p=f,f=e.shift()),!e.length)throw new Error("_merge() requires two or more array/objects.");return e.forEach((e,d)=>{(Object(i.a)(e)||Object(s.a)(e))&&(r?Object(c.a)(e):Object.getOwnPropertyNames(e)).forEach(s=>{if(t(s,f,e,d)){var i=f[s],c=e[s];if((Object(n.a)(i)&&Object(n.a)(c)||Object(a.a)(i)&&Object(a.a)(c))&&(!0===p||p>0))f[s]=Object(n.a)(i)&&Object(n.a)(c)?[]:{},l([Object(o.a)(p)?p-1:p,f[s],i,c],t,r,u,h);else if(Object(n.a)(f)&&Object(n.a)(e))u?f[s]=c:f.push(c);else try{h?Object.defineProperty(f,s,Object.getOwnPropertyDescriptor(e,s)):f[s]=e[s]}catch(e){}}})}),f}},function(e,t,r){"use strict";var n=r(18);t.a=function(e){return Object(n.a)(e)||!0!==e&&!1!==e&&null!==e&&""!==e&&!isNaN(1*e)}},function(e,t,r){"use strict";var n=r(0),s=r(4);function a(e){return(o(e)?e:Object(s.e)(e).length?[e]:[]).reduce((e,t)=>e.concat([Object(s.e)(t)]),[]).map(e=>i.resolve(e))}class i extends Array{static resolve(e){return e.every(e=>!(e+"").includes("."))?(new i).concat(e):e}get dotSafe(){return!0}}function o(e){return Object(s.e)(e).reduce((e,t)=>e||Object(n.c)(t),!1)}function c(e){return e.filter(e=>e||0===e).length!==e.length}class l{constructor(e){this.target=e,this.fireables=[],this.currentlyFiring=[]}add(e){return this.fireables.push(e),e}remove(e){this.fireables=this.fireables.filter(t=>t!==e)}removeMatches(e){this.match(e).forEach(e=>{this.fireables=this.fireables.filter(t=>t!==e)})}match(e){return this.fireables.filter(t=>{var r=a(t.filter),n=Object(s.e)((t.params||{}).tags),i=a(e.filter),o=Object(s.e)((e.params||{}).tags);return(!e.originalHandler||t.handler===e.originalHandler)&&(!i.length||Object(s.d)(i,r))&&(!o.length||o.length===n.length&&Object(s.f)(n,o).length===o.length)})}static _getFirebase(e,t,r=!0,s=this.__namespace){if(!Object(n.j)(t))throw new Error('Subject must be of type object; "'+Object(n.a)(t)+'" given!');var a=this;return s&&globalThis.WebQitObserverNamespaceRegistry.has(e+"-"+s)&&(a=globalThis.WebQitObserverNamespaceRegistry.get(e+"-"+s),e+="-"+s),!Object(n.b)(t,"firebases").has(e)&&r&&Object(n.b)(t,"firebases").set(e,new a(t)),Object(n.b)(t,"firebases").get(e)}static _namespace(e,t,r=null){if(e+="-"+t,2===arguments.length)return globalThis.WebQitObserverNamespaceRegistry.get(e);if(!(r.prototype instanceof this))throw new Error(`The implementation of the namespace ${this.name}.${t} must be a subclass of ${this.name}.`);globalThis.WebQitObserverNamespaceRegistry.set(e,r),r.__namespace=t}}globalThis.WebQitObserverNamespaceRegistry||(globalThis.WebQitObserverNamespaceRegistry=new Map);class u{constructor(e,t){this.target=e,this.handler=t.handler,this.filter=t.filter,this.params=t.params}disconnect(){this.disconnected=!0}}class h extends u{fire(e,t,r){return this.disconnected||this.filter&&!Object(s.f)(Object(s.e)(this.filter),[e.type]).length?t(...Array.prototype.slice.call(arguments,2)):this.handler(e,r,t)}}var p=r(12);class f{constructor(e,t){if(this.target=e,!t.type)throw new Error("Action type must be given in definition!");Object(p.b)(t,(e,t)=>{Object.defineProperty(this,e,{value:t,enumerable:!0})}),Object.seal(this)}}class d extends l{add(e){return super.add(new h(this.target,e))}fire(e,t=null){if(e instanceof f||(e=new f(this.target,e)),this.currentlyFiring.filter(t=>t.type===e.type&&t.name===e.name).length)return t?t():void 0;this.currentlyFiring.push(e);const r=(n,...s)=>{var a=this.fireables[n];return a?a.fire(e,(...e)=>r(n+1,...e),...s):t?t(...s):s[0]};var n=r(0);return this.currentlyFiring.pop(),n}static getFirebase(e,t=!0,r=null){return super._getFirebase("interceptor",...arguments)}static namespace(e,t=null){return super._namespace("interceptor",...arguments)}}var b=function(e){return Object(n.b)(e,!1).get(e)||e},m=function(e,t,r={},s={}){if(!t||!Object(n.j)(t))throw new Error("Target must be of type object!");t=b(t);var a,i=function(n){return arguments.length?n:Reflect[e](t,...Object.values(r))};return(a=d.getFirebase(t,!1,s.namespace))?a.fire({type:e,...r},i):i()},g=function(e,t,r,n={}){return m("apply",e,{thisArgument:t,argumentsList:r},n)},v=function(e,t,r=null,n={}){return m("construct",e,arguments.length>2?{argumentsList:t,newTarget:r}:{argumentsList:t},n)};r(26);class O{constructor(e,t=!1){this._={},this._.target=e,this._.cancellable=t,this._.propagationStopped=!1,this._.defaultPrevented=!1,this._.promisesInstance=null,this._.promises=[]}get target(){return this._.target}get cancellable(){return this._.cancellable}stopPropagation(){this._.propagationStopped=!0}get propagationStopped(){return this._.propagationStopped}preventDefault(){this._.defaultPrevented=!0}get defaultPrevented(){return this._.defaultPrevented}waitUntil(e){e instanceof Promise&&(this._.promises.push(e),this._.promisesInstance=null)}get promises(){return!this._.promisesInstance&&this._.promises.length&&(this._.promisesInstance=Promise.all(this._.promises)),this._.promisesInstance}respondWith(e){var t,r=Object(n.h)(e)&&!Object(n.k)(e.propagationStopped)&&!Object(n.k)(e.defaultPrevented);!1===e||r&&e.propagationStopped?this.stopPropagation():!1===e||r&&e.defaultPrevented?this.preventDefault():(e instanceof Promise&&(t=e)||r&&(t=e.promises))&&this.waitUntil(t)}}class j extends u{constructor(e,t){if(super(e,t),this.filters2D=a(this.filter),this.filtersIsOriginally2D=o(this.filter),this.filtersIsDynamic=this.filters2D.filter(e=>c(Object(s.e)(e))).length>0,this.filtersIsDynamic&&this.filters2D.length>1)throw new Error('Only one "Dynamic Filter" must be observed at a time! "'+this.filters2D.map(e=>"["+e.join(", ")+"]").join(", ")+'" have been bound together.')}fire(e){if(this.disconnected||this.params.type&&!Object(s.b)(e,e=>this.params.type===e.type))return;const t=e=>!["set","def"].includes(e.type)||!this.params.diff||(Object(n.e)(this.params.diff)?this.params.diff(e.value,e.oldValue):e.value!==e.oldValue);var r=new O(this.target);if(this.filters2D.length){var a=e.filter(e=>this.filters2D.filter((r,a)=>{var i=r.slice();return this.filtersIsDynamic&&e.path.forEach((e,t)=>{i[t]=i[t]||0===i[t]?i[t]:e}),(!this.filtersIsDynamic||!c(i))&&t(e)&&(!this.params.subtree&&Object(s.d)(i,e.path)||this.params.suptree&&Object(s.i)(i,e.path)&&(!Object(n.g)(this.params.suptree)||Object(s.a)(i,e.path).length<=this.params.suptree)||this.params.subtree&&e.path.length>=i.length&&Object(s.i)(e.path,i)&&(!Object(n.g)(this.params.subtree)||Object(s.a)(e.path,i).length<=this.params.subtree))}).length);if(a.length)if(this.filtersIsOriginally2D||this.params.subtree){var i=a;Object(n.h)(this.filter)&&(i={...this.filter},a.forEach((e,t)=>{i[e.name]=e})),r.respondWith(this.handler(i,r))}else a.forEach((e,t)=>{r.respondWith(this.handler(e,r))})}else(this.params.subtree||e.filter(e=>Object(s.d)(e.path,[e.name])).length===e.length)&&e.filter(e=>t(e)).length&&r.respondWith(this.handler(e,r));return r}}class y{constructor(e,t){if(this.target=e,t.originalSubject||(this.originalSubject=e),!("type"in t))throw new Error("Mutation type must be given in definition!");if(!("name"in t))throw new Error("Property name must be given in definition!");Object(p.b)(t,(e,t)=>{"path"===e&&(t=i.resolve(t)),Object.defineProperty(this,e,{value:t,enumerable:!0})}),this.path||Object.defineProperty(this,"path",{value:i.resolve([t.name]),enumerable:!0}),Object.seal(this)}}class w extends l{constructor(e){super(e),this.buffers=[]}add(e){return super.add(new j(this.target,e))}fire(e,t){var r=new O(this.target,t);return e=Object(s.e)(e,!1).map(e=>e instanceof y?e:new y(this.target,e)),this.buffers.length?(Object(s.g)(this.buffers)(e),r):(this.currentlyFiring.filter(t=>e.filter(e=>t.type===e.type&&t.name===e.name).length).length,this.fireables.forEach(n=>{if(r.propagationStopped&&t)return r;r.respondWith(n.fire(e))}),r)}static getFirebase(e,t=!0,r=null){return super._getFirebase("observer",...arguments)}static namespace(e,t=null){return super._namespace("observer",...arguments)}}var x=function(e,t,r=null,a={}){if(!(e=r||e)||!Object(n.j)(e))throw new Error("Target must be of type object!");e=b(e);var i=Object(s.e)(t),o=i.map(t=>{var s,o=function(s){return arguments.length?s:Object(n.b)(e,"accessorizedProps").has(t)&&Object(n.b)(e,"accessorizedProps").get(t).touch(!0)?Object(n.b)(e,"accessorizedProps").get(t).get():r?Reflect.get(e,t,r):Reflect.get(e,t)};return(s=d.getFirebase(e,!0,a.namespace))?s.fire({type:"get",name:t,related:i,receiver:r},o):o()});return Object(n.c)(t)?o:o[0]},E=function(e,t,r=null,s={}){if(!(e=b(e))||!Object(n.j)(e))throw new Error('Observable subjects must be of type object; "'+Object(n.a)(e)+'" given!');if(Object(n.e)(t)&&(s=arguments.length>2?r:{},r=t,t=null),!Object(n.e)(r))throw new Error('Handler must be a function; "'+Object(n.a)(r)+'" given!');var a,i=w.getFirebase(e,!0,s.namespace),o={filter:t,handler:r,params:s};if((o.filter||"*"===o.params.subtree||o.params.subtree&&C(e))&&S(e,o.filter,o.params.subtree,s.namespace),o.params.unique&&(a=i.match({filter:t,params:s})).length){if("replace"!==o.params.unique)return a[0];i.remove(a[0])}return i.add(o)},k=function(e,t,r,s=null,a={}){var i;if(e!==r&&(E(r,(r,n)=>{if(i=w.getFirebase(e,!1,a.namespace)){var s=r.map(r=>{var n=r;do{if(n.target===e)return}while(n=n.src);var s={};return Object(p.b)(r,(e,t)=>{"target"!==e&&"name"!==e&&"path"!==e&&"src"!==e&&(s[e]=t)}),s.name=t,s.path=[t].concat(r.path),s.originalSubject=r.originalSubject,s.src=r,new y(e,s)}).filter(e=>e);if(s.length)return i.fire(s,n.cancellable)}},{subtree:!0,...a,unique:!0,tags:[P,t,e]}),Object(n.h)(s)&&(i=w.getFirebase(e,!1,a.namespace)))){var o=Object(p.d)({name:t,type:"set",value:r,related:[t]},s);let e=i.fire(o,a.cancellable);if(a.eventTypeReturn)return e}};const P={};function S(e,t=null,r=!1,s=null){if(!e||!Object(n.j)(e))throw new Error("Target must be of type object!");var i=w.getFirebase(e,!0,s);if(i&&!i.build){i.build=r;var o=a(t),c=!o.length||o.filter(e=>!e[0]&&0!==e[0]).length?Object.keys(e):o.map(e=>e[0]),l=o.length?o.map(e=>e.slice(1)).filter(e=>e.length):null;i.subBuild=l&&l.length?l:null,c.forEach(t=>{var a=x(e,t,null,{namespace:s});try{Object(n.j)(a)&&(k(e,t,a,null,params),(i.subBuild&&C(a)||(_isFunction(r)?r(a):r&&C(a)))&&S(a,i.subBuild,r,s))}catch(e){}})}}const C=e=>(e instanceof Object||e instanceof Array||e instanceof Function)&&("undefined"==typeof window||e!==window);var T=function(e,t,r=null,s={}){if(!(e=b(e))||!Object(n.j)(e))throw new Error('Observable subjects must be of type object; "'+Object(n.a)(e)+'" given!');if(Object(n.e)(t)&&(s=arguments.length>2?r:{},r=t,t=null),r&&!Object(n.e)(r))throw new Error('Handler must be a function; "'+Object(n.a)(r)+'" given!');var a;if(a=w.getFirebase(e,!1,s.namespace))return a.removeMatches({filter:t,originalHandler:r,params:s})},A=function(e,t,r,s=null,a={}){var i;if(T(r,null,null,{...a,tags:[P,t,e]}),Object(n.h)(s)&&(i=w.getFirebase(e,!1,a.namespace))){var o=Object(p.d)({name:t,type:"del",oldValue:r,related:[t]},s);i.fire(o,a.cancellable)}},M=function(e,t,r={}){return m("has",e,{name:t},r)},_=function(e,t,r,a={}){t=r.receiver||t;var i=r.keysOrPayload,o=r.value;if(!t||!Object(n.j)(t))throw new Error("Target must be of type object!");Object(n.h)(i)&&(a=o||{},o=null),t=b(t);var c=d.getFirebase(t,!1,a.namespace),l=w.getFirebase(t,!1,a.namespace);const u=(s,i,o,u)=>{var h,p="set";e&&(p="defineProperty",i=(h=i||{}).value);var f,d=!1;M(t,s,a)&&(d=!0,f=x(t,s,r.receiver,a));var b={name:s,type:p,value:i,receiver:r.receiver,related:o,detail:u,isUpdate:d,oldValue:f},m=function(e){return arguments.length&&(h?h=e:i=e),h?!(Object(n.b)(t,"accessorizedProps",!1).has(s)&&!Object(n.b)(t,"accessorizedProps").get(s).restore())&&(Object.defineProperty(t,s,h),!0):Object(n.b)(t,"accessorizedProps",!1).has(s)?Object(n.b)(t,"accessorizedProps").get(s).set(i):(t[s]=i,!0)};if(c){var g=h?{type:"defineProperty",name:s,descriptor:h,receiver:r.receiver,related:o,detail:u,isUpdate:d,oldValue:f}:{type:"set",name:s,value:i,receiver:r.receiver,related:o,detail:u,isUpdate:d,oldValue:f};b.success=c.fire(g,m)}else b.success=m();return b.success&&b.value!==b.oldValue&&(Object(n.j)(b.oldValue)&&A(t,s,b.oldValue,null,a),Object(n.j)(b.value)&&(k(t,s,b.value,null,a),l&&(l.subBuild||l.build&&C(b.value))&&S(b.value,l.subBuild,l.build,a.namespace))),b};var h,p=[];Object(n.c)(i)||(Object(n.i)(i)||Object(n.f)(i))&&(h=Object(s.e)(i))?p=h.map(e=>u(e,o,h,a.detail)):Object(n.h)(i)&&(h=Object.keys(i))&&(p=h.map(e=>u(e,i[e],h,a.detail)));var f,m=p.filter(e=>!1!==e.success);return l?(f=l.fire(m,a.cancellable)).successCount=m.length:a.eventTypeReturn&&(f=new O(t)),a.eventTypeReturn?f:m.length>0},D=function(e,t,r=null,n={}){return _(!0,e,{keysOrPayload:t,value:r},n)},$=function(e,t,r={}){if(!e||!Object(n.j)(e))throw new Error("Target must be of type object!");e=b(e);var a,i,o=Object(s.e)(t),c=o.map(t=>{var s;M(e,t,r)&&(s=x(e,t,null,r));var a,i={name:t,type:"deleteProperty",related:o,detail:r.detail,oldValue:s},c=function(r){return arguments.length?r:!(Object(n.b)(e,"accessorizedProps",!1).has(t)&&!Object(n.b)(e,"accessorizedProps").get(t).restore())&&(delete e[t],!0)};return(a=d.getFirebase(e,!1,r.namespace))?i.success=a.fire({type:"deleteProperty",name:t,oldValue:s,related:o},c):i.success=c(),i.success&&Object(n.j)(i.oldValue)&&A(e,t,i.oldValue,null,r),i}).filter(e=>!1!==e.success);return(a=w.getFirebase(e,!1,r.namespace))?(i=a.fire(c,r.cancellable)).successCount=c.length:r.eventTypeReturn&&(i=new O(e)),r.eventTypeReturn?i:c.length>0},N=function(e,t,r={}){return m("getOwnPropertyDescriptor",e,{name:t},r)},W=function(e,t={}){return m("getPrototypeOf",e,{},t)},I=function(e,t={}){return m("isExtensible",e,{},t)},F=function(e,t={}){return m("ownKeys",e,{},t)},R=function(e,t={}){return m("preventExtensions",e,{},t)},L=function(e,t,r=null,n=null,s={}){return _(!1,e,arguments.length>3?{keysOrPayload:t,value:r,receiver:n}:{keysOrPayload:t,value:r},s)},B=function(e,t,r={}){return m("setPrototypeOf",e,{prototype:t},r)};t.a={apply:g,construct:v,defineProperty:D,deleteProperty:$,get:x,getOwnPropertyDescriptor:N,getPrototypeOf:W,has:M,isExtensible:I,ownKeys:F,preventExtensions:R,set:L,setPrototypeOf:B,accessorize:function(e,t=[],r={}){r=Object(n.h)(t)?t:r;var a=(1===arguments.length?Object.keys(e):Object(s.e)(t)).map(t=>{if(Object(n.b)(e,"accessorizedProps").has(t)&&Object(n.b)(e,"accessorizedProps").get(t).touch(!0))return!1;const s=()=>{for(var r,n=e;!r&&(n=Object.getPrototypeOf(n));)r=Object.getOwnPropertyDescriptor(n,t);return r};var a,i,o=Object.getOwnPropertyDescriptor(e,t);o||(a={writable:!0,enumerable:!(t in e),configurable:!1!==r.configurable});var c={...o||a};"value"in c&&delete c.value,"writable"in c&&delete c.writable,c.get=()=>{if(l.ongoingGets.length)return l.get();l.ongoingGets.push(1);var n=x(e,t,null,r);return l.ongoingGets.pop(),n},c.set=n=>{if(l.ongoingSets.length)return l.set(n);l.ongoingSets.push(1);var s=L(e,t,n,null,r);return l.ongoingSets.pop(),s};var l={ongoingGets:[],ongoingSets:[],get:function(){var t=o;return t||(t=i?a:s()||a),t.get?t.get.call(e):t.value},set:function(t){var r=o;return r||(i?r=a:(r=s())?"value"in r&&(r=a,i=!0):(r=a,i=!0)),r.set||r.get?!!r.set&&r.set.call(e,t):(r.value=t,!0)},restore:function(){try{return this.intact()&&(o||i?Object.defineProperty(e,t,o||a):delete e[t],Object(n.b)(e,"accessorizedProps").delete(t)),!0}catch(e){}return!1},intact:function(){return(Object.getOwnPropertyDescriptor(e,t)||{}).get===c.get},touch:function(e=!1){return this.intact()||!!e&&!this.restore()}};try{return Object.defineProperty(e,t,c),Object(n.b)(e,"accessorizedProps").set(t,l),!0}catch(e){}return!1});return Object(n.c)(t)?a:a[0]},unaccessorize:function(e,t=[],r={}){r=Object(n.h)(t)?t:r;var a=(1===arguments.length?Object.keys(e):Object(s.e)(t)).map(t=>!Object(n.b)(e,"accessorizedProps",!1).has(t)||Object(n.b)(e,"accessorizedProps").get(t).restore());return Object(n.c)(t)?a:a[0]},proxy:function(e,t={}){if(!Object(n.j)(e))throw new Error('Object must be of type target; "'+Object(n.a)(e)+'" given!');var r=new Proxy(e,{apply:(e,r,n)=>g(e,r,n,t),construct:(e,r,n=null)=>v(e,r,n,t),defineProperty:(e,r,n)=>D(e,r,n,t),deleteProperty:(e,r)=>$(e,r,t),get:(e,s,a=null)=>{var i=x(e,s,a,t);return!1!==t.proxyAutoBinding&&Object(n.e)(i)&&!Object(n.d)(i)?i.bind(r):i},getOwnPropertyDescriptor:(e,r)=>N(e,r,t),getPrototypeOf:e=>W(e,t),has:(e,r)=>M(e,r,t),isExtensible:e=>I(e,t),ownKeys:e=>F(e,t),preventExtensions:e=>R(e,t),set:(e,r,n,s=null)=>L(e,r,n,s,t),setPrototypeOf:(e,r)=>B(e,r,t)});return Object(n.b)(r).set(r,e),r},unproxy:b,observe:E,unobserve:T,intercept:function(e,t,r={}){if(e=b(e),!Object(n.j)(e))throw new Error('Object must be of type target; "'+Object(n.a)(handler)+'" given!');var s={},a=!0;Object(n.h)(t)||(Object(n.e)(t)?t={"":t}:Object(n.e)(r)&&(t={[t]:r},r=arguments.length>3?arguments[3]:{}),a=!1);var i=d.getFirebase(e,!0,r.namespace);return Object.keys(t).forEach(e=>{if(!Object(n.e)(t[e]))throw new Error("Callback"+(null===e?"":" for "+e)+' must be a function; "'+Object(n.a)(t[e])+'" given!');var o,c={filter:e,handler:t[e],params:r};if(c.params.unique&&(o=i.match(c)).length){if("replace"!==c.params.unique)return o[0];i.remove(o[0])}a?s[e]=i.add(c):s=i.add(c)}),s},unintercept:function(e,t=null,r={}){if(!(e=b(e))||!Object(n.j)(e))throw new Error('Object must be of type target; "'+Object(n.a)(e)+'" given!');var s=d.getFirebase(e,!1,r.namespace);_isObject(t)||(Object(n.e)(t)?t={[null]:t}:Object(n.e)(r)&&(t={[t]:r},r=arguments.length>3?arguments[3]:{}),isOriginallyObj=!1),(s=d.getFirebase(e,!1,r.namespace))&&Object.keys(t).forEach(e=>{if(!Object(n.e)(t[e]))throw new Error("Callback"+(null===e?"":" for "+e)+' must be a function; "'+Object(n.a)(t[e])+'" given!');var a={filter:e,originalHandler:t[e],params:r};return s.removeMatches(a)})},closure:function(e,...t){var r=t.map(e=>{if(e=b(e),!Object(n.j)(e))throw new Error("Target must be of type object!");return{target:e,subjectCopy:Object(n.c)(e)?e.slice(0):Object(p.a)(e)}}),a=e(...t);const i=()=>{r.map(e=>{var t,r=Object.keys(e.subjectCopy),a=Object.keys(e.target),i=[],o=Object(s.j)(r.concat(a)).map(t=>{if(e.subjectCopy[t]!==e.target[t]){i.push(t);var s={name:t,related:i,buffered:!0};return a.includes(t)?(s.type="set",s.value=e.target[t],r.includes(t)&&(s.isUpdate=!0)):s.type="del",r.includes(t)&&(s.oldValue=e.subjectCopy[t]),Object(n.j)(e.subjectCopy[t])&&A(e.target,t,e.subjectCopy[t]),Object(n.j)(e.target[t])&&k(e.target,t,e.target[t]),s}}).filter(e=>e);if(o.length&&(t=w.getFirebase(e.target,!1)))return t.fire(o)})};return a instanceof Promise?a.then(i):i(),a},build:S,link:k,unlink:A,Observers:w,Interceptors:d}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n.a})),r.d(t,"b",(function(){return s.a})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return u.a}));r(17);var n=r(40);r(35),r(1),r(2),r(3);var s=r(20),a=(r(38),r(5)),i=r(8);r(16),r(14);var o=r(6),c=r(24),l=function(e,t,r={},n={}){t=Object(i.a)(t).slice();for(var s=e;!Object(o.a)(s)&&!Object(c.a)(s)&&t.length;){var l=t.shift();if(!(r.get?r.get(s,l):Object(a.a)(s)?l in s:s[l]))return void(n.exists=!1);s=r.get?r.get(s,l):s[l]}return n.exists=!0,s};r(43),r(44),r(9),r(7);var u=r(19);r(34),r(10)},function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(14),s=r(6),a=r(3),i=r(8),o=r(29),c=r(16),l=r(7),u=r(19),h=r(38),p=r(35);class f{static lex(e,t,r={}){if(!Object(n.a)(e+=""))throw new Error("Argument1 must be a string!");var s=e=>({delims:e.delims.slice(),options:Object(p.a)(e.options),nesting:e.nesting.slice(),maxDepth:e.maxDepth,comments:e.comments.slice(),tokens:e.tokens.slice(),matches:e.matches.slice(),matchesi:Object(p.a)(e.matchesi)});if(f.$cache[e]&&!1!==r.cache)for(var a=0;a<f.$cache[e].length;a++){var i=f.$cache[e][a];if(Object(h.a)(i.delims,t))return s(i)}var o=new f(e,r).lex(t);return!1!==r.cache&&(f.$cache[e]=f.$cache[e]||[],f.$cache[e].push(o)),s(o)}static split(e,t,r){return f.lex(e,t,r).tokens}static match(e,t,r){return f.lex(e,t,r).matches}constructor(e,t){if(!Object(n.a)(e))throw new Error("Lexer requires the first argument to be a string.");this.$str=e,this.$options=t||{},this.$options.blocks||(this.$options.blocks=f.$blocks),this.$options.quotes||(this.$options.quotes=f.$quotes),this.$options.comments||(this.$options.comments=f.$comments)}lex(e,t){for(var r={delims:Object(i.a)(e),options:Object(u.a)(!0,{},this.$options,t||{}),nesting:[],maxDepth:0,comments:[],tokens:[],matches:[],matchesi:{}},n=0;"number"==typeof n;)n=this._evalCharsAt(r,n);if(r.nesting.length)throw new Error("Error parsing the string: "+this.$str+". Unterminated blocks: "+Object(o.a)(r.nesting).join(", "));return r}_evalCharsAt(e,t){if(!(t>=this.$str.length)){var r=1,n={},s={},a={};if(e.openComment||(s=this._testQuotes(e,t)),e.openQuote||(n=this._testComments(e,t)),e.openComment||n.ending)if(e.nesting.length||a.ending)this._push(e,this.$str[t]);else r=(o=n.starting||n.ending||this.$str[t]).length,this._push(e,o,"comments",n.starting);else if(e.openQuote||s.ending)this._push(e,this.$str[t]);else{if(e.options.limit&&e.matches.length===e.options.limit)return this._push(e,this.$str[t]),t+1;a=this._testNesting(e,t);a=this._testNesting(e,t);var i=this._testChars(e.options.stopChars||[],e,t);if(!e.nesting.length&&!1!==i)return e.options.stopChar=i,void(e.options.stopCharForward=this.$str.substr(t));if(e.delims.length)if(e.nesting.length||a.ending){var o;r=(o=a.starting||a.ending||this.$str[t]).length,this._push(e,o)}else{this._push(e,"");var c=this._testChars(e.delims,e,t);if(!1!==c&&(e.matches.push(c),e.matchesi[t]=c,r=c.length||1,!e.options.preserveDelims)){var l=t+(c.length||1);return l===this.$str.length&&this._push(e,""),l}this._push(e,c||this.$str[t])}else 2===e.nesting.length&&a.starting?(e.matches.push(null),this._push(e,a.starting),r=a.starting.length):!e.nesting.length&&a.ending?(this._push(e,a.ending),r=a.ending.length,e.matches.push(null)):this._push(e,this.$str[t])}return t+r}}_testQuotes(e,t){var r={};return(e.options.quotes||[]).forEach(n=>{this.$str.substr(t,1)===n&&(e.openQuote?n===e.openQuote&&(e.openQuote=!1,r.ending=n):(e.openQuote=n,r.starting=n))}),r}_testComments(e,t){var r={};return(e.options.comments||[]).forEach(n=>{if(e.openComment){if(Object(l.a)(n)===Object(l.a)(e.openComment)){var s=Object(l.a)(n);this.$str.substr(t).startsWith(s)&&(e.openComment=!1,r.ending=s)}}else{var a=Object(c.a)(n);this.$str.substr(t).startsWith(a)&&(e.openComment=n,r.starting=a)}}),r}_testNesting(e,t){var r={};return(e.options.blocks||[]).forEach(n=>{var s=Object(c.a)(n);if(this.$str.substr(t).startsWith(s))e.nesting=e.nesting.concat([n]),r.starting=s;else if(e.nesting.length&&Object(l.a)(n)===Object(l.a)(Object(l.a)(e.nesting))){var a=Object(l.a)(n);this.$str.substr(t).startsWith(a)&&(e.nesting=e.nesting.slice(0,-1),r.ending=a)}}),e.maxDepth=Math.max(e.maxDepth,e.nesting.length),r}_testChars(e,t,r){for(var n=0;n<e.length;n++){var s=e[n];if(Object(a.a)(s)){var i=s(this.$str.substr(0,r),this.$str.substr(r),t.tokens.slice());if(!1!==i)return i}if(t.options.useRegex){var o=this.$str.substr(r).match(new RegExp("^"+s,!0!==t.options.useRegex?t.options.useRegex:""));if(o)return o[0]}if(!t.options.ci&&this.$str.substr(r,s.length)===s||t.options.ci&&this.$str.substr(r,s.length).toLowerCase()===s.toLowerCase())return s}return!1}_push(e,t,r="tokens",n=!1){var a=e.matches.length;if(Object(s.a)(e.tokens[a])&&(e.tokens[a]=""),"comments"===r){e.tokens[a].comments||(e.tokens[a]=new String(e.tokens[a]),e.tokens[a].comments=[]);var i=e.tokens[a].comments.length-(!e.tokens[a].comments.length||n?0:1);e.tokens[a].comments[i]=(e.tokens[a].comments[i]||"")+t}else{e.tokens[a].comments;e.tokens[a]=e.tokens[a]+t}}split(e,t,r){return this.lex(t,r).tokens}match(e,t,r){return this.lex(t,r).matches}regParse(e,t){return this.lex(e,Object(u.a)({useRegex:!0},t||{}))}regSplit(e,t){return this.regParse(e,t).tokens}regMatch(e,t){return this.regParse(e,t).matches}}f.$blocks=[["(",")"],["[","]"],["{","}"]],f.$quotes=['"',"'","`"],f.$comments=[["/*","*/"],["//","\n"]],f.$cache=Object.create(null)},function(e,t,r){"use strict";t.a=function(e){return e instanceof String||"string"==typeof e&&null!==e}},function(e,t,r){"use strict";var n=r(2),s=r(38);t.a=class{even(e){return!(!Object(n.a)(e)||e.jsenType!==this.jsenType)&&Object(s.a)(e,this)}inherit(e){return this}withComments(e){return this.meta||(this.meta={}),this.meta.comments=e,this}withVars(e){return this.meta||(this.meta={}),this.meta.vars=e,this}}},function(e,t,r){"use strict";t.a=function(e,t=1){var r=0;e.forEach(e=>{r++});var n=e.slice(e.length-r,t);return arguments.length>1?n:n[0]}},function(e,t,r){"use strict";var n=r(1),s=r(2),a=r(5),i=r(25),o=r(20);t.a=function(e,t,r=!0,c=!0,l=!1,u=!1){if(Object(n.a)(e)&&Object(n.a)(t)){var h=[],p=!0;return e.forEach(e=>{if(p){var f=!1;Object(o.a)(t,(t,i)=>{(!f||c&&Object(a.a)(e))&&(f=r(e,i),(Object(n.a)(f)&&!f.length||Object(s.a)(f)&&!Object.keys(f).length)&&(f=!1),Object(a.a)(f)&&c&&(e=f))}),Object(a.a)(f)?h.push(c?f:e):Object(i.a)(f)?l&&!f||!l&&f?h.push(e):u&&(p=!1):h.push(f)}}),h}if(Object(s.a)(e)&&Object(s.a)(t)){h={},p=!0;return Object.keys(e).forEach(o=>{if(p){var f=r(e[o],t[o]);(Object(n.a)(f)&&!f.length||Object(s.a)(f)&&!Object.keys(f).length)&&(f=!1),Object(a.a)(f)?h[o]=c?f:e[o]:Object(i.a)(f)?l&&!f||!l&&f?h[o]=e[o]:u&&(p=!1):h[o]=f}}),h}}},function(e,t,r){"use strict";t.a=function(e){return e instanceof Number||"number"==typeof e}},function(e,t,r){"use strict";var n=r(9);t.a=function(...e){return Object(n.a)(e,(e,t,r)=>!0,!1,!1,!1)}},function(e,t,r){"use strict";var n=r(5),s=r(10);t.a=function(e,t){var r=void 0;return Object(n.a)(e)&&Object.keys(e).forEach((n,a)=>{!1!==r&&(r=t(Object(s.a)(n)?parseFloat(n):n,e[n],a))}),r}},function(e,t,r){"use strict";t.a=function(e){return"function"==typeof e}},function(e,t,r){"use strict";function n(e,t,r=null,n=!1){return t.length>e.length?-1:("number"==typeof r?n?e.slice(0,r+1+(r<0?e.length:0)):e.slice(r):e).reduce((e,r,s)=>{var[a,i,o]=e;if(!n&&a>-1)return[a,i,o];var c=o+1,l=r===t[c]?0===c?[s,0]:[i,c]:[-1,-1];return l[1]===t.length-1&&(l[1]=-1,l[0]>-1)?[l[0]].concat(l):[a].concat(l)},[-1,-1,-1])[0]+(n||"number"!=typeof r?0:r>-1?r:e.length-r)}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";t.a=function(e,t,r=!1){if(""==t)return e;var n=r?e.lastIndexOf(t):e.indexOf(t);return-1===n?"":e.substr(n+t.length)}},function(e,t,r){"use strict";t.a=function(e){return null===e||""===e}},function(e,t,r){"use strict";t.a=function(e){return!0===e||!1===e}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n.a})),r.d(t,"b",(function(){return s.a})),r.d(t,"c",(function(){return a.a})),r.d(t,"d",(function(){return i.a})),r.d(t,"e",(function(){return o.a}));var n=r(23),s=r(32),a=r(45),i=r(30),o=r(27)},function(e,t,r){"use strict";t.a=function(e,t,r){return e.startsWith(t)&&e.endsWith(r)}},function(e,t,r){"use strict";t.a=function(e,...t){return t.forEach(t=>{e.indexOf(t)<0&&e.push(t)}),e}},function(e,t,r){"use strict";var n=r(1),s=r(2),a=r(10);const i=function(e,t=1,r=!0){return!Object(a.a)(t)||t<=0?e:(!Object(n.a)(e)&&Object(s.a)(e)&&r&&(e=Object.values(e)),Object(n.a)(e)?e.reduce((e,a)=>Object(n.a)(a)||Object(s.a)(a)&&r?e.concat(i(Object(n.a)(a)?a:Object.values(a),t-1,r)):e.concat(a),[]):e)};t.a=i},function(e,t,r){"use strict";var n=r(23),s=r(45);t.a=function(e,t,r){return Object(s.a)(Object(n.a)(e,t),r)}},function(e,t,r){"use strict";var n=function(e){return!Array.isArray(e)&&"object"==typeof e&&e};var s=function(){if(!(n(this)&&this.window||"undefined"!=typeof window))throw new Error("A window context is required.");const e=n(this)&&this.window?this.window:window;if(e.WebQit||(e.WebQit={}),!e.WebQit.window){let t,r;Object.defineProperty(e.WebQit,"window",{get:()=>e}),Object.defineProperty(e.WebQit,"vendor",{value:{getName:()=>(t||(t=function(e){if(void 0!==e.InstallTrigger)return"firefox";if(/constructor/i.test(e.HTMLElement)||"[object SafariRemoteNotification]"===(!e.safari||void 0!==e.safari&&e.safari.pushNotification).toString())return"safari";var t=!(!e.chrome||!e.chrome.webstore&&!e.chrome.runtime),r=t&&-1!=e.navigator.userAgent.indexOf("Edg"),n=!!e.opr&&!!e.opr.addons||!!e.opera||e.navigator.userAgent.indexOf(" OPR/")>=0,s=!!e.document.documentMode,a=!s&&!!e.StyleMedia;return(t||n)&&e.CSS,a?"edge":s?"ie":n?"opera":r?"ie-chromium":t?"chrome":"unknown"}(e)),t),getPrefix:()=>(r||(r=function(e){var t=e.getComputedStyle(e.document.documentElement,""),r=(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.Olink&&["","o"])[1];return{api:("WebKit|Moz|Ms|O".match(new RegExp("("+r+")","i"))||[])[1],prefix:r,css:"-"+r+"-"}}(e)),r)}})}return e.WebQit},a=function(e){return"function"==typeof e},i=function(e){return Array.isArray(e)||"object"==typeof e&&e||a(e)},o=function(e){return function(e){return e instanceof Number||"number"==typeof e}(e)||!0!==e&&!1!==e&&null!==e&&""!==e&&!isNaN(1*e)};class c{constructor(e,t=!0){this.window=e,this.async=t,this.readCallbacks=[],this.writeCallbacks=[],this._run()}_run(){this.window.requestAnimationFrame(()=>{this.readCallbacks.forEach((e,t)=>{e&&!e()&&(this.readCallbacks[t]=null)}),this.writeCallbacks.forEach((e,t)=>{e&&!e()&&(this.writeCallbacks[t]=null)}),this._run()})}onread(e,t=!1){if(t)return new Promise((t,r)=>{!1===this.async?e(t,r):this.readCallbacks.push(()=>{e(t,r)})});!1===this.async?e():this.readCallbacks.push(e)}onwrite(e,t=!1){if(t)return new Promise((t,r)=>{!1===this.async?e(t,r):this.writeCallbacks.push(()=>{e(t,r)})});!1===this.async?e():this.writeCallbacks.push(e)}cycle(e,t,r){this.onread(()=>{var n=e(r);if(n){var s=n=>{this.onwrite(()=>{var s=t(n,r);if(s){var a=r=>{this.cycle(e,t,r)};s instanceof Promise?s.then(a):a()}})};n instanceof Promise?n.then(s):s()}})}}var l=function(e){return e instanceof String||"string"==typeof e&&null!==e},u=function(e){return Array.isArray(e)},h=function(e){return arguments.length&&(void 0===e||void 0===e)},p=function(e){return null===e||""===e},f=function(e,t=!0){return u(e)?e:!t&&n(e)?[e]:!1!==e&&0!==e&&function(e){return p(e)||h(e)||!1===e||0===e||i(e)&&!Object.keys(e).length}(e)?[]:function(e){return!l(e)&&!h(e.length)}(e)?Array.prototype.slice.call(e):n(e)?Object.values(e):[e]},d=function(e){const t=s.call(this);t.DOM.isDOMReady||"complete"===t.window.document.readyState?e(t.window):(t.window.domReadyCallbacks||(t.window.domReadyCallbacks=[],t.window.document.addEventListener("DOMContentLoaded",()=>{t.DOM.isDOMReady=!0,t.window.domReadyCallbacks.splice(0).forEach(e=>e(t.window))},!1)),t.window.domReadyCallbacks.push(e))};class b{constructor(e){this.window=e}onAdded(e,t,r={}){return r.on="added",this.onPresenceChange(e,(e,r,n,s,a)=>{t(e,r,n,s,a)},r)}onRemoved(e,t,r={}){return r.on="removed",this.onPresenceChange(e,(e,r,n,s,a)=>{t(e,r,n,s,a)},r)}onPresent(e,t,r={}){d.call(this.window,()=>{this.window.MutationObserver&&this.onAdded(e,(e,r)=>{e.forEach(e=>t(e,r))},r),l(e)?f(this.window.document.querySelectorAll(e)).forEach(e=>t(e,1)):e.parentNode&&t(e,1)})}onAbsent(e,t,r={}){d.call(this.window,()=>{this.window.MutationObserver&&onRemoved(e,(e,r)=>{e.forEach(e=>t(e,r))},r),l(e)?0===f(this.window.document.querySelectorAll(e)).length&&t(null,0):e.parentNode||t(e,0)})}onPresenceChange(e,t,r={}){e=f(e,!1);var n=(e,t)=>(t.$$searchCache||(t.$$searchCache=new Map),e.reduce((e,n)=>{var s;return t.$$searchCache.has(n)?s=t.$$searchCache.get(n):(s=((e,t)=>{if(t=t.filter(e=>e.matches),l(e)){var n=t.filter(t=>t.matches(e));if(!1!==r.observeIndirectMutation&&(n=t.reduce((t,r)=>t.concat(f(r.querySelectorAll(e))),n)).length)return n}else{if(t.includes(e))return[e];if(!1!==r.observeIndirectMutation&&t.length)for(var s=e;s=s.parentNode;)if(t.includes(s))return[e]}})(n,t,l(n))||[],t.$$searchCache.set(n,s)),e.concat(s)},[])),s=new Set,a=new Set,i=(i,o,c)=>{o&&"removed"===r.on||!o&&"added"===r.on||(i=n(e,i)).length&&(r.maintainCallState?(i.forEach(e=>{o?(s.add(e),a.delete(e)):(s.delete(e),a.add(e))}),t(i,o,c,s,a)):t(i,o,c))},o=r.context||this.window.document.documentElement;return this._observe(o,(e,t,n,s)=>{r.ignoreTransients||(i(e,0,!0),i(e.concat(t),1,!0),i(t,0,!0)),i(s,0),i(n,1)})}onAttrChange(e,t,r=[]){var n=new this.window.MutationObserver(t),s={attributes:!0,attributeOldValue:!0};return r&&(s.attributeFilter=r),n.observe(e,s),n}onTreeChange(e,t,r=!1){var n=new this.window.MutationObserver(t),s={childList:!0,subtree:r};return n.observe(e,s),n}onMutation(e,t,r){var n=new this.window.MutationObserver(t);return n.observe(e,r),n}_observe(e,t){if(!m.has(e)){const t=new Set,r=new this.window.MutationObserver(e=>{if(t.size){var r=e.reduce((e,t)=>e.concat(f(t.addedNodes)),[]),n=e.reduce((e,t)=>e.concat(f(t.removedNodes)),[]),s=[],a=[];r=new Set(r),n=new Set(n),r.forEach(e=>{n.has(e)&&(n.delete(e),r.delete(e),e.isConnected?s.push(e):a.push(e))}),r=[...r],n=[...n],t.forEach(e=>e(s,a,r,n))}});r.observe(e,{childList:!0,subtree:!0}),m.set(e,{callbacks:t,observer:r})}const r=m.get(e);return r.callbacks.add(t),{disconnect(){r.callbacks.delete(t)},reconnect(){r.callbacks.add(t)}}}}const m=new Map;var g=function(e){!function(e){e.CSS||(e.CSS={});e.CSS.escape||(e.CSS.escape=e=>e.replace(/([\:@\~\$\&])/g,"\\$1"))}(e),function(e){"isConnected"in e.Node.prototype||Object.defineProperty(e.Node.prototype,"isConnected",{get:function(){return!(this.ownerDocument&&this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}})}(e),function(e){e.Element.prototype.matches||(e.Element.prototype.matches=e.Element.prototype.matchesSelector||e.Element.prototype.mozMatchesSelector||e.Element.prototype.msMatchesSelector||e.Element.prototype.oMatchesSelector||e.Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),r=t.length;--r>=0&&t.item(r)!==this;);return r>-1})}(e)};function v(e,t=null,r=!1){const n=s.call(this);if(l(e)){var a;if(e.trim().startsWith("<")){var i=n.window.document.createElement("div");i.innerHTML=e,a=r?f(i.children):i.firstChild}else a=r?f(y.call(this,e,t)):j.call(this,e,t);return a}return e instanceof n.window.Element?r?[e]:e:r?f(e):e}function O(e,t=null){return v.call(this,e,t,!0)}function j(e,t=null,r=!1){const n=s.call(this);t=t||n.window.document;var a,i=r?"querySelectorAll":"querySelector";try{a=t[i](e)}catch(r){try{a=t[i](e.replace(/\:is\(/g,":matches("))}catch(r){try{a=t[i](e.replace(/\:is\(/g,":-webkit-any("))}catch(r){try{a=t[i](e.replace(/\:is\(/g,":-moz-any("))}catch(e){throw e}}}}return a}function y(e,t=null){return j.call(this,e,t,!0)}var w=function(e){return a(e)||e&&"[object function]"==={}.toString.call(e)};var x=function(e,t,r={},n={}){t=f(t).slice();for(var s=e;!h(s)&&!p(s)&&t.length;){var a=t.shift();if(!(r.get?r.get(s,a):i(s)?a in s:s[a]))return void(n.exists=!1);s=r.get?r.get(s,a):s[a]}return n.exists=!0,s},E=function(e,t,r,n={},s={}){const a=(e,r,n)=>s.set?s.set(e,r,n):(o(t[l])&&u(e)?e.push(n):e[r]=n,!0);t=f(t);for(var c=e,l=0;l<t.length;l++){if(!(l<t.length-1))return a(c,t[l],r);if(!c||!i(c)&&!w(c))return!1;var h=x(c,t[l],s);if(!i(h)){if(!1===s.buildTree)return!1;if(h=w(s.buildTree)?s.buildTree(l):o(t[l+1])?[]:{},!a(c,t[l],h))return!1}c=h}},k=function(e,t,r=!1,n={}){t=f(t);var s=!1;do{var a=""===(a=t.pop())?0:a,o=e;t.length&&(o=x(e,t,{},n)),(i(o)||w(o))&&(n.has?n.has(o,a):a in o)&&(n.deleteProperty?s=n.deleteProperty(o,a):n.del?s=n.del(o,a):(delete o[a],s=!0))}while(s&&r&&t.length&&(i(o)||w(o))&&!(n.keys?n.keys(o):Object.keys(o)).length);return s},P=function(e,t,r={}){var n={};return x(e,t,r,n),n.exists};function S(e,t=!1){const r=s.call(this);var a={};return!(a.el=r.window.document.head.querySelector('meta[name="oohtml"]'))&&t&&(a.el=r.window.document.createElement("meta"),a.el.setAttribute("name",e),r.window.document.head.append(a.el)),a.el&&(a.vars=(a.el.getAttribute("content")||"").split(";").filter(e=>e).reduce((e,t)=>{var r=t.split("=").map(e=>e.trim());return E(e,r[0].split("."),"true"===r[1]||"false"!==r[1]&&(o(r[1])?parseInt(r[1]):r[1])),e},{})),a.get=function(e){return x(this.vars,e.split("."))},a.set=function(e,r=null,s=!1){var a=n(e)?e:{[e]:!0===r?"true":r};if(s=arguments.length<3?r:s,Object.keys(a).forEach(e=>{if(!1===a[e])k(this.vars,e.split("."));else if(n(a[e]))Object.keys(a[e]).forEach(t=>{var r=(e+"."+t).split(".");s&&P(this.vars,r)||E(this.vars,r,a[e][t])});else{var t=e.split(".");s&&P(this.vars,t)||E(this.vars,t,a[e])}}),t){const e=(t,r)=>Object.keys(r).reduce((s,a)=>{var i=(t?t+".":"")+a;return n(r[a])?s.push(...e(i,r[a])):s.push(i+"="+r[a]),s},[]);this.el.setAttribute("content",e("",this.vars).join(";"))}return!0},a.defaults=function(e,t=null){return this.set(e,t,!0)},a}t.a=function(){const e=s.call(this);return e.DOM||(e.DOM={},g(e.window),e.DOM.reflow=new c(e.window),e.DOM.mutations=new b(e.window),e.DOM.meta=S.bind(e.window),e.DOM.query=v.bind(e.window),e.DOM.queryAll=O.bind(e.window),e.DOM.ready=d.bind(e.window)),e}},function(e,t,r){"use strict";t.a=function(e,t,r=!1){if(""==t)return e;var n=r?e.lastIndexOf(t):e.indexOf(t);return-1===n?e:e.substr(0,n)}},function(e,t,r){"use strict";var n=r(2);t.a=function(e){return Object(n.a)(e)&&Object.getPrototypeOf(e)===Object.prototype}},function(e,t,r){"use strict";t.a=function(e,t=1){for(var r=[],n=null;r.length<t&&(n=e[Math.floor(Math.random()*e.length)])&&-1===r.indexOf(n);)r.push(n);return arguments.length>1?r:r[0]}},function(e,t,r){"use strict";var n=r(1),s=r(3),a=r(9);t.a=function(e,t=[]){return Object(a.a)([{},e],(e,r,a)=>{if(!Object(s.a)(a[e]))return Object(s.a)(t)?t(e):!Object(n.a)(t)||!t.length||t.indexOf(e)>-1},!1,!1,!1)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));r(23);var n=r(22);function s(e,t,r=null,s=!1){var a=Object(n.a)(e,t,r,s);return-1===a?[]:e.slice(a+t.length)}},function(e,t,r){"use strict";t.a=function(e,t,r=!1){for(var n=e.indexOf(t);n>-1&&(r||!1===r);)e.splice(n,1),r>0&&r--,n=e.indexOf(t);return e}},function(e,t,r){"use strict";var n=r(18),s=r(1),a=r(2),i=(r(5),r(3)),o=r(33),c=r(17);const l=function(e,t,r=!0,u=1){if(Object(s.a)(e)&&Object(s.a)(t)&&e.length!==t.length)return!r;if(Object(a.a)(e)&&Object(a.a)(t)){var h=Object.keys(e),p=Object.keys(t);if(!h.length&&!p.length)return Object(o.a)(e)&&Object(o.a)(t)?r:e===t===r;if(!l(h,p))return!r}if(u>0&&(Object(s.a)(e)&&Object(s.a)(t)||Object(a.a)(e)&&Object(a.a)(t))){var f=Object(c.a)(e,t,(e,t)=>l(e,t,r,u-1),!1,!1,!0);return Object(s.a)(f)?f.length===e.length&&f.length===t.length:Object(a.a)(f)&&Object(a.a)(e)?Object.keys(f).length===Object.keys(e).length&&Object.keys(f).length===Object.keys(t).length:f}return Object(i.a)(r)?r(e,t):Object(n.a)(e)&&Object(n.a)(t)&&isNaN(e)&&isNaN(t)?r:e===t===r};t.a=l},function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"d",(function(){return l})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return h}));var n=r(31),s=r(26),a=r(4),i=(r(0),r(12)),o=r(13);function c(e,t={}){const r=n.a.call(this);return r.OOHTML||(r.OOHTML={}),r.OOHTML.meta||(r.OOHTML.meta=r.DOM.meta("oohtml",!0)),r.OOHTML.meta.defaults(Object(i.d)(3,e,t)),r.OOHTML.meta}function l(e,t,r,n=null){var s=t.split("#")[0].split("/").map(e=>e.trim()).filter(e=>e);return d(e,s,r,n)}function u(e){var t=o.a.split(e.trim(),[":"]);return[e=t.shift(),t.reduce((e,t)=>{var[r,n]=o.a.split(t.trim(),[]);return e[r]=Object(s.d)(n,"(",")"),e},{})]}function h(e,t){return t=t.split("#")[0].split("/").map(e=>e.trim()).filter(e=>e),!!(e=e.split("#")[0].split("/").map(e=>e.trim()).filter(e=>e)).length&&e.reduce((e,r,n)=>!!e&&o.a.split(r.trim(),["|","+"]).reduce((e,r)=>{var[r,s]=u(r),a=(r=r.trim())===t[n];if(!a&&("deep"in s||"deepest"in s)){var i=t.slice(n+1).reduce((e,t,n)=>e>-1&&"deep"in s?e:t===r?n:e,-1);if(i>-1){t.splice(n,i+1);a=!0}}return e||a},!1),!0)}const p=(e,t)=>o.a.split(e.trim(),["|","+"],{preserveDelims:!0}).reduce((e,r)=>{var n;return(r.startsWith("|")||r.startsWith("+"))&&(n=r.substr(0,1),r=r.substr(1).trim()),e.theEnd||"|"===n&&e.length?(e.theEnd=!0,e):e.concat(t(r.trim()))},[]).filter(e=>e),f=(e,t,r)=>{const n=e=>e.reduce((e,t)=>e.concat(...r(t).values()),[]);return p(t,t=>{var[t,i]=u(t);return e.reduce((e,o)=>{var c=r(o);"*"===t&&(t="("+c.keys().join("+")+")");var l=Object(s.e)(t,"(",")")?f([o],Object(s.d)(t,"(",")"),r):Object(a.e)(c.get(t),!1),u=[];return Object.keys(i).forEach(e=>{if("deep"===e||"deepest"===e)for(var s=[o];("deepest"===e||!l.length)&&(s=n(s)).length;){var a=f(s,`${t}${u.map(e=>`:${e}(${i[e]})`).join("")}`,r);a.length&&(l=a)}else"having"!==e&&"not-having"!==e||(l=l.filter(t=>{var n=p(i[e],e=>r(t,e));return"not-having"===e?!n.length:n.length})),u.push(e)}),e.concat(l)},[])})},d=function(e,t,r,n=null,s=0){if(!t.length)return[];var a,i=t.shift();i.endsWith(".")&&(a=!0,i=i.substr(0,i.length-1).trim());var o=f(e,i,r);if(o.length&&a)return o;if(t.length){var c=d(o,t.slice(),r,n,s+1);return-1===c?n(o,s,!0):c}return n?n(o,s):o}},function(e,t,r){"use strict";var n=r(1),s=r(3),a=r(10),i=r(5),o=r(9);t.a=function(e,t=[],r=!0){var c=0;return Object(a.a)(arguments[0])&&Object(i.a)(arguments[1])&&(c=arguments[0],e=arguments[1],t=arguments[2]||[]),Object(o.a)([c,{},e],(e,r,a)=>Object(s.a)(t)?t(e):!Object(n.a)(t)||!t.length||t.indexOf(e)>-1,!1,!1,r)}},function(e,t,r){"use strict";var n=r(24),s=r(6),a=r(5);t.a=function(e){return Object(n.a)(e)||Object(s.a)(e)||!1===e||0===e||Object(a.a)(e)&&!Object.keys(e).length}},function(e,t,r){"use strict";var n=r(14),s=r(6);t.a=function(e){return!Object(n.a)(e)&&!Object(s.a)(e.length)}},function(e,t,r){"use strict";var n=r(28),s=r(44);t.a=function(e,t){var r=[];return Object(s.a)(e,t).forEach(e=>{Object(n.a)(r,...Object.getOwnPropertyNames(e))}),r}},function(e,t,r){"use strict";var n=r(1);t.a=function(e,t){t=(t=t||Object.prototype)&&!Object(n.a)(t)?[t]:t;var r=[];for(e=e;e&&(!t||t.indexOf(e)<0)&&"default"!==e.name;)r.push(e),e=e?Object.getPrototypeOf(e):null;return r}},function(e,t,r){"use strict";var n=r(32);t.a=function(e,t){return Object(n.a)(e,t,!0)}},function(e,t,r){"use strict";t.a=class extends Error{constructor(...e){super(...e),this.name="Reference Error"}}},function(e,t,r){"use strict";t.a=function(e){return e.filter((e,t,r)=>r.indexOf(e)===t)}},function(e,t,r){"use strict";function n(e,t,r=null){return r||!1!==r&&e.dotSafe&&t.dotSafe?(e.join(".")+".").startsWith(t.join(".")+"."):t.reduce((t,r,n)=>t&&r===e[n],!0)}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var n=r(5),s=r(6),a=r(3),i=r(50),o=(r(14),r(24)),c=(r(18),r(23),r(32),r(47)),l=r(46),u=r(54);class h{constructor(e,t={}){if(!("main"in e))throw new Error('A "main" context must be provided!');Object.defineProperty(this,"stack",{value:e||{},enumerable:!1}),Object.defineProperty(this,"params",{value:t||{},enumerable:!1}),e.super&&Object.defineProperty(this.stack,"super",{value:h.create(e.super,{errorLevel:t.errorLevel}),enumerable:!1}),Object.defineProperty(this.stack,"local",{value:e.local||{},enumerable:!1}),Object.defineProperty(this.stack,"$local",{value:e.$local||{},enumerable:!1})}observe(e,t,r={}){this.stack.super&&this.stack.super.observe(e,r=>{if(r.props.filter(t=>!f(this.stack.local,t,e)&&!f(this.stack.main,t,e)).length)return r.scope="super",t(r)},r);var s={...r};s.subtree=s.subtree||!0,s.tags=(s.tags||[]).slice(0),s.tags.push(this,"jsen-context"),s.diff=!0,e.observe(this.stack,r=>{var s=[];if(r.forEach(e=>{if("main"===e.name)if(e.path.length>1)s.push(u.a.resolve(e.path.slice(1)));else{var t=Object(c.a)((Object(n.a)(e.value)?Object.keys(e.value):[]).concat(e.oldValue&&Object(n.a)(e.oldValue)?Object.keys(e.oldValue):[]));s.push(...t.map(e=>u.a.resolve([e])))}}),(s=s.filter(t=>!f(this.stack.local,t[0],e))).length){var a=s.map(e=>e[0]);return t({props:a,references:s,scope:"local"})}},s)}unobserve(e,t={}){this.stack.super&&this.stack.super.unobserve(e,t);var r={...t};r.tags=(r.tags||[]).slice(0),r.tags.push(this,"jsen-context"),e.unobserve(this.stack,null,null,r)}handle(e,t,r,n=0){var s=()=>t(this.stack.main,null,()=>this.stack.super?this.stack.super.handle(e,t,r,n+1):r?r():void 0,n);return"toString"===e&&this.stack.local.toString===Object.prototype.toString?s():t(this.stack.local,this.stack.$local,s,n)}get(e,t={},r=!0){return e instanceof String&&(e+=""),this.handle(e,(n,o,c,l)=>{var u=p(n,e,t);return!Object(s.a)(u)||f(n,e,t)?Object(a.a)(u)&&!Object(i.a)(u)&&r?u.bind(n):u:c()})}set(e,t,r={},n=!1,s=!0){if(2===this.params.scopeType&&"var"===n&&this.stack.super)return this.stack.super.set(e,t,r,n);e instanceof String&&(e+="");const a=(e,t,r,n)=>n.set?n.set(e,t,r):(e[t]=r,!0);return this.handle(!!n||e,(i,o,c,u)=>{if(o&&"const"===o[e])throw new LogicalError("CONST "+e+" cannot be modified!");if(n)return o[e]=n,a(i,e,t,r);if(f(i,e,r))return a(i,e,t,r);try{return c()}catch(n){if(n instanceof l.a&&i&&(!s||!1===this.params.strictMode)&&!o&&0===u)return a(i,e,t,r);throw n}},()=>{throw new l.a('"'+e+'" does not exist in scope!')})}del(e,t={}){return e instanceof String&&(e+=""),this.handle(e,(r,n,s)=>f(r,e,t)?(n&&delete n[e],t.deleteProperty||t.del?(t.deleteProperty||t.del)(r,e):(delete r[e],!0)):s())}has(e,t,r={}){return e instanceof String&&(e+=""),t instanceof String&&(t+=""),this.handle(e,(n,s,a)=>{if(f(n,e,r)){var i=p(n,e,r);return f(i,t,r)}return a()},()=>{throw new l.a('"'+e+'" is undefined!')})}exec(e,t,r={}){return e instanceof String&&(e+=""),this.handle(e,(n,i,o)=>{var c=p(n,e,r);if(!Object(s.a)(c)||f(n,e,r)){if(!Object(a.a)(c)){if(r.exec)return r.exec(n,e,t);throw new l.a('"'+e+'" is not a function! (Called on type: '+typeof n+".)")}return r.apply?r.apply(c,n,t):c.apply(n,t)}return o()},()=>{if(r.execUnknown)return r.execUnknown(this,e,t);throw new l.a('"'+e+'()" is undefined!')})}static create(e,t={},r={}){if(e instanceof h)return e;var n=t.scopeObj||{};return r.set?r.set(n,"main",e):n.main=e,new h(n,t)}static createStack(e,t={},r={}){return e.reverse().reduce((e,n,s)=>{if(n instanceof h){if(0===s)return n;throw new Error("Only the top-most context is allowed to be an instance of Scope.")}var a={};return r.set?r.set(a,"main",n):a.main=n,a.super=e,new h(a,t)},null)}}const p=(e,t,r)=>{if(!Object(o.a)(e)&&!Object(s.a)(e))return r.get&&Object(n.a)(e)?r.get(e,t):e[t]},f=(e,t,r)=>!Object(o.a)(e)&&!Object(s.a)(e)&&(r.has&&Object(n.a)(e)?r.has(e,t):Object(n.a)(e)?t in e:!Object(s.a)(e[t]))},function(e,t,r){"use strict";var n=r(21);t.a=function(e){return Object(n.a)(e)&&/^class\s?/.test(Function.prototype.toString.call(e))}},function(e,t,r){"use strict";var n=r(15);const s=class extends n.a{};Object.defineProperty(s.prototype,"jsenType",{get:()=>"Reference"}),t.a=s},function(e,t,r){"use strict";var n=r(1);t.a=function(e,t,r=null){return Object(n.a)(t)?e.filter(e=>r?t.filter(t=>r(e,t)).length:-1!==t.indexOf(e)):[]}},function(e,t,r){"use strict";var n=r(15);const s=class extends n.a{};Object.defineProperty(s.prototype,"jsenType",{get:()=>"CallExpression"}),t.a=s},function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return c}));var n=r(14),s=r(53),a=r(63),i=r(60);function o(e){return e.map(e=>{var t=e,r=[];r.dotSafe=!0;do{t instanceof s.a&&(r.splice(0),t=t.reference),Object(n.a)(t.name)?(r.unshift(t.name),r.dotSafe=r.dotSafe&&!t.name.includes(".")):t.name instanceof a.a?(r.unshift(t.name.int),r.dotSafe=r.dotSafe&&!(t.name.int+"").includes(".")):t.name instanceof i.a?(r.unshift(t.name.expr),r.dotSafe=r.dotSafe&&!t.name.expr.includes(".")):r.splice(0)}while(t=t.context);return r.dotSafe?(new c).concat(r):r})}class c extends Array{static resolve(e){return e.every(e=>!(e+"").includes("."))?(new c).concat(e):e}get dotSafe(){return!0}}},function(e,t,r){"use strict";var n=r(1);t.a=function(e,t,r=null){return Object(n.a)(t)?e.filter(e=>r?t.filter(t=>r(e,t)).length:-1===t.indexOf(e)):[]}},function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var n=r(13),s=(r(40),r(29),r(36)),a=r(48),i=r(67),o=r(58),c=r(61),l=r(59),u=r(65),h=r(51),p=r(62),f=r(54),d=r(49);class b extends i.a{constructor(e,t){super(),this.stmts=e||[],this.delims=t}eval(e=null,t={}){var r,n=(t={...t}).returnCallback;t.returnCallback=e=>{r=e},e=d.a.create(e,t);for(var i=(e,t,r)=>{try{return e.eval(t,r)}catch(e){r.catch&&r.catch(e)}},b=[],g=0;g<this.stmts.length;g++){var v=this.stmts[g],O=m(v),j=m(v,!0),y=(t.references||[]).filter(e=>O.filter(t=>Object(a.a)(t,e)).length),w=(t.references||[]).filter(e=>j.filter(t=>Object(a.a)(t,e)).length),x=!t.references||!t.references.length||(y=y.length)||(w=w.length),E=(t.references&&2===e.params.scopeType&&v instanceof l.a&&v.initKeyword,[]);if(x){var k=t;if(y&&delete(k={...t}).references,b[g]=i(v,e,k),v instanceof c.a||r)return n&&n(!0),b[g];(v instanceof o.a&&v.abortive||!1===r)&&(!0,n&&n(!1)),t.references&&((v instanceof l.a||v instanceof u.a)&&(E=[v])||v instanceof p.a&&(E=v.declarations))&&(t.references=t.references.concat(Object(f.b)(E.map(e=>e.reference))))}else t.references&&(v instanceof l.a&&(E=[v])||v instanceof p.a&&(E=v.declarations))&&E.forEach(e=>{if(e.val instanceof h.a){t.references=t.references.slice(0);let r=Object(f.b)([e.reference])[0],n=Object(f.b)([e.val])[0];t.references.forEach(e=>{Object(a.a)(e,n)&&t.references.push(r.concat(Object(s.a)(e,n)))})}})}return","===this.delims[this.delims.length-1]?b.pop():b}toString(){return this.stringify()}stringify(e={}){return this.stmts.map((t,r)=>t.stringify(e)+(this.delims[r]||"")).join(" ")}static parse(e,t,r={}){var s;if(","===r.delim?(delete(r={...r}).delim,s=n.a.lex(e,[","])):s=n.a.lex(e+";",[b.testBlockEnd]),s.matches.length){var a=[],i=[];return s.tokens.forEach((e,t)=>{(e=e.trim())&&(a.push(e),i.push(s.matches[t]))}),i.pop(),new this(a.map(e=>t(e,null,r)),i)}}static parseSingleOrMultiple(e,t,r={}){var n=t(e,[this],{...r,delim:",",assert:!1});return n?1===n.stmts.length&&(n=n.stmts[0]):n=t(e,null,r),n}static testBlockEnd(e,t,r){if(e.endsWith("}")&&!t.trim().startsWith("else"))return"";if(t.startsWith("\r\n"))return"\r\n";if(t.startsWith(";"))return";";if(t.startsWith(",")){var n=r.length&&r[r.length-1];return!(n.startsWith("var")||n.startsWith("let")||n.startsWith("const")||n.startsWith("return"))&&","}return!1}}b.operators=[];const m=(e,t=!1)=>(e.$readPaths||(e.$readPaths=Object(f.b)(e.meta.reads||[]),e.$deepReadPaths=Object(f.b)(e.meta.deep.reads||[])),t?e.$deepReadPaths:e.$readPaths)},function(e,t,r){"use strict";t.a=class extends Error{constructor(...e){super(...e),this.name="Syntax Error"}}},function(e,t,r){"use strict";var n=r(15);const s=class extends n.a{};Object.defineProperty(s.prototype,"jsenType",{get:()=>"IfConstruct"}),t.a=s},function(e,t,r){"use strict";var n=r(15);const s=class extends n.a{};Object.defineProperty(s.prototype,"jsenType",{get:()=>"AssignmentExpression"}),t.a=s},function(e,t,r){"use strict";var n=r(15);const s=class extends n.a{};Object.defineProperty(s.prototype,"jsenType",{get:()=>"StringType"}),t.a=s},function(e,t,r){"use strict";var n=r(15);const s=class extends n.a{};Object.defineProperty(s.prototype,"jsenType",{get:()=>"ReturnDirective"}),t.a=s},function(e,t,r){"use strict";var n=r(15);const s=class extends n.a{};Object.defineProperty(s.prototype,"jsenType",{get:()=>"VariableDeclarations"}),t.a=s},function(e,t,r){"use strict";var n=r(15);const s=class extends n.a{};Object.defineProperty(s.prototype,"jsenType",{get:()=>"NumberType"}),t.a=s},function(e,t,r){"use strict";var n=r(15);t.a=class extends n.a{}},function(e,t,r){"use strict";var n=r(15);const s=class extends n.a{};Object.defineProperty(s.prototype,"jsenType",{get:()=>"DeleteExpression"}),t.a=s},function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));r(19),r(41);var n=r(37),s=r(1),a=r(51),i=r(53),o=r(64),c=r(58),l=r(57);const u={};class h{static parse(e,t,r={}){if(e.length){var n;if(u[e]&&!t&&!1!==r.allowCache)if(n=this.parseOne(e,u[e],r))return n;for(var s=Object.values(t||this.grammar),a=0;a<s.length;a++){var i=this.parseOne(e,s[a],r);if(i)return t||!1===r.allowCache||(u[e]=s[a]),i}if(!1===r.assert)return;throw new l.a(e)}}static parseOne(e,t,r={}){var l={reads:[],writes:[],deletes:[],calls:[],_calls:[],deep:{}},u=t.parse(e,(e,t,n=null)=>{var s=this.parse(e,t,n||r);if(s instanceof a.a){for(var o,c=s;c=c.context;)c instanceof i.a&&(o=!0);if(s.role=n.role,!o&&"CONTEXT"!==n.role){var u="ASSIGNMENT_SPECIFIER"===n.role?"writes":"DELETION_SPECIFIER"===n.role?"deletes":"CALL_SPECIFIER"===n.role?"_calls":"reads";l[u].push(s)}}else s instanceof i.a&&l.calls.push(s);return s&&(Object.keys(s.meta).forEach(e=>{"deep"!==e&&s.meta[e].forEach(t=>l[e].push(t))}),Object.keys(s.meta.deep).forEach(e=>{l.deep[e]||(l.deep[e]=[]),s.meta.deep[e].forEach(t=>l.deep[e].push(t))})),s},r);return u&&(u instanceof o.a?u.meta={reads:[],writes:[],deletes:[],calls:[],_calls:[],deep:{}}:u.meta=l,u instanceof i.a?!u.reference.context||u.reference.context instanceof i.a||u.meta.reads.push(u.reference.context):u instanceof c.a&&["onTrue","onFalse"].forEach(e=>{u[e]&&Object.keys({reads:[],writes:[],deletes:[],calls:[],_calls:[],deep:{}}).forEach(e=>{"deep"!==e&&u.onTrue.meta[e].concat(u.onTrue.meta.deep[e]||[]).forEach(t=>{Object(n.a)(u.meta[e],t),u.meta.deep[e]||(u.meta.deep[e]=[]),u.meta.deep[e].push(t)})})}),Object(s.a)(r.explain)&&r.explain.push(e+" >>-------------\x3e> "+u.jsenType)),u}}},function(e,t,r){"use strict";var n=r(15);const s=class extends n.a{};Object.defineProperty(s.prototype,"jsenType",{get:()=>"Block"}),t.a=s},function(e,t,r){"use strict";r.r(t);var n=r(66);r.d(t,"Parser",(function(){return n.a}));var s=r(75),a=r(74);r.d(t,"Runtime",(function(){return a.a}));var i=r(49);r.d(t,"Scope",(function(){return i.a})),n.a.grammar=s.a},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),s=r(4),a=(r(12),r(31)),i=r(39);function o(e=null,t=!1){const r=a.a.call(this);if(t)return void r.DOM.ready(()=>{o.call(this,e,!1)});const c=r.window,l=r.window.document,u=r.DOM.mutations,h=i.a.call(this,{element:{template:"",export:"export",import:"import"},attr:{moduleid:"name",moduleref:"template",exportid:"name",exportgroup:"exportgroup"},api:{templateClass:"",templates:"templates",exports:"exports",moduleref:"template"}},e),p="template"+(h.get("element.template")?'[is="'+h.get("element.template")+'"]':"")+"["+c.CSS.escape(h.get("attr.moduleid"))+"]";var f=c.HTMLTemplateElement;if(h.get("api.templateClass")){if(!c[h.get("api.templateClass")])throw new Error('The custom element class "'+h.get("api.templateClass")+'" is not defined!');f=c[h.get("api.templateClass")]}const d=(e,t,r)=>{"templatemutation"===e&&(["addedExports","removedExports"].forEach(e=>{Object.defineProperty(t,e,{value:Object.keys(t[e]).map(r=>({name:r,items:t[e][r]}))})}),["addedTemplates","removedTemplates"].forEach(e=>{Object.defineProperty(t,e,{value:Object.keys(t[e]).map(r=>({name:r,item:t[e][r]}))})})),Object.defineProperty(t,"path",{value:r}),l.dispatchEvent(new c.CustomEvent(e,{detail:t}))},b=(e,t)=>{const r=r=>{e.dispatchEvent(new c.CustomEvent(r,{detail:{path:t}}))};var n=e.getAttribute("src");return new Promise((s,a)=>{c.fetch?c.fetch(n).then(e=>e.ok?e.text():Promise.reject(e.statusText)).then(n=>{e.innerHTML=n,r("load"),d("templatecontentloaded",{template:e},t),s(e)}).catch(a=>{console.error("Error fetching the bundle at "+n+". ("+a+")"),e.innerHTML="",r("loaderror"),d("templatecontentloaderror",{template:e},t),s(e)}):(s(),console.error("Error fetching the bundle at "+n+". (window.fetch() not supported by browser.)"))})},m=(e,t,r,a=null,i=!0)=>{const o=(e,a,i,o)=>{var c;if(e.matches)if(e.matches(p)&&(c=e.getAttribute(h.get("attr.moduleid")))&&O(c)){var l=(r?r+"/":"")+c;"removed"===i?(Object(n.b)(t,"oohtml","templates").delete(c),Object(n.b)(t,"oohtml").get("parentTemplate")===t&&Object(n.b)(t,"oohtml").delete("parentTemplate"),a&&(a.removedTemplates[c]=e)):"added"===i&&(Object(n.b)(t,"oohtml","templates").set(c,e),Object(n.b)(e,"oohtml").set("parentTemplate",t),a&&(a.addedTemplates[c]=e)),m(e.content,e,l,i,o)}else{const r=e=>{var r=e.getAttribute(h.get("attr.exportgroup"))||"default";"removed"===i?Object(n.b)(t,"oohtml","exports").has(r)&&(Object(s.h)(Object(n.b)(t,"oohtml","exports").get(r),e),Object(n.b)(t,"oohtml","exports").has(r).length||Object(n.b)(t,"oohtml","exports").delete(r),a&&(a.removedExports[r]||(a.removedExports[r]=[]),a.removedExports[r].push(e))):"added"===i&&(Object(n.b)(t,"oohtml","exports").has(r)||Object(n.b)(t,"oohtml","exports").set(r,[]),Object(n.b)(t,"oohtml","exports").get(r).push(e),a&&(a.addedExports[r]||(a.addedExports[r]=[]),a.addedExports[r].push(e)))};if(e.matches(h.get("element.export"))){var u=e.getAttribute(h.get("attr.exportid"))||"default";Object(s.e)(e.children).forEach(e=>{e.setAttribute(h.get("attr.exportgroup"),u),r(e)})}else r(e)}};t.modulemutationsType=a;const l={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};(Object(s.e)(e.children).forEach(e=>o(e,l,a,i)),i&&d("templatemutation",l,r),"added"!==a||Object(n.b)(t,"oohtml").get("onLiveMode"))||(Object(n.b)(t,"oohtml").set("onLiveMode",!0),t.getAttribute("src")&&!t.content.children.length&&g.push(b(t,r)),u.onAttrChange(t,e=>{e[0].target.getAttribute(e[0].attributeName)!==e[0].oldValue&&b(t,r)},["src"]),new c.MutationObserver(e=>{const t={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};e.forEach(e=>{e.addedNodes.forEach(e=>o(e,t,"added",!0)),e.removedNodes.forEach(e=>o(e,t,"removed",!0))}),d("templatemutation",t,r)}).observe(e,{childList:!0}))};if(h.get("api.templates")in l)throw new Error('document already has a "'+h.get("api.templates")+'" property!');const g=[];if(Object.defineProperty(l,h.get("api.templates"),{get:function(){return v(Object(n.b)(l,"oohtml","templates"))}}),h.get("api.templates")in f.prototype)throw new Error('The "HTMLTemplateElement" class already has a "'+h.get("api.templates")+'" property!');if(Object.defineProperty(f.prototype,h.get("api.templates"),{get:function(){return v(Object(n.b)(this,"oohtml","templates"))}}),h.get("api.exports")in f.prototype)throw new Error('The "HTMLTemplateElement" class already has a "'+h.get("api.exports")+'" property!');Object.defineProperty(f.prototype,h.get("api.exports"),{get:function(){return v(Object(n.b)(this,"oohtml","exports"))}});const v=e=>Object.defineProperties({},Array.from(e.keys()).reduce((t,r)=>(t[r]={get:()=>e.get(r)},t),{})),O=e=>{var t;return!(t=e.match(/([^a-zA-Z0-9\_\-\@])/))||(console.error(`Invalid character "${t}" in the module name: ${e}.`),!1)};if(Object(s.e)(l.querySelectorAll(p)).forEach(async e=>{var t=e.getAttribute(h.get("attr.moduleid"));!e.closest(h.get("element.import"))&&O(t)&&(Object(n.b)(l,"oohtml","templates").set(t,e),m(e.content,e,t,"added",!1))}),u.onPresenceChange(p,async(e,t)=>{const r={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};e.forEach(e=>{var s=e.getAttribute(h.get("attr.moduleid"));!e.closest(h.get("element.import"))&&O(s)&&(t?(Object(n.b)(l,"oohtml","templates").set(s,e),m(e.content,e,s,"added"),r.addedTemplates[s]=e):(Object(n.b)(l,"oohtml","templates").get(s)===e&&Object(n.b)(l,"oohtml","templates").delete(s),m(e.content,e,s,"removed"),r.removedTemplates[s]=e))}),d("templatemutation",r,"")}),u.onPresent(h.get("element.import"),e=>{m(e,e,"","added",!1)}),h.get("api.moduleref")in c.Element.prototype)throw new Error('The "Element" class already has a "'+h.get("api.moduleref")+'" property!');Object.defineProperty(c.Element.prototype,h.get("api.moduleref"),{get:function(){var e;if(!Object(n.b)(this,"oohtml").has("module")&&(e=this.getAttribute(h.get("attr.moduleref")))){var t=(e=>{var t=l.createElement("template");return Object(i.d)([l],e,(function(e,t){var r=Object(n.b)(e,"oohtml","templates");return 1===arguments.length?r:t.startsWith(":")?Object(n.b)(e,"oohtml","exports").get(t.substr(1)):r.get(t)})).forEach(e=>{Object(n.b)(e,"oohtml","templates").forEach((e,r)=>{Object(n.b)(t,"oohtml","templates").set(r,e)}),Object(n.b)(e,"oohtml","exports").forEach((e,r)=>{Object(n.b)(t,"oohtml","exports").has(r)||Object(n.b)(t,"oohtml","exports").set(r,[]),Object(n.b)(t,"oohtml","exports").get(r).push(...e)})}),t})(e);Object(n.b)(this,"oohtml").set("module",t)}return Object(n.b)(this,"oohtml").get("module")}});var j=g.length?"loading":"indeterminate";Object.defineProperty(l,"templatesReadyState",{get:()=>j}),r.DOM.ready.call(r,()=>(g.forEach(e=>{e.catch(e=>{console.warn(e)})}),Promise.all(g).then(()=>{j="complete",l.dispatchEvent(new c.Event("templatesreadystatechange"))})))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(4),s=r(0),a=(r(12),r(31)),i=r(39);function o(e=null,t=!1){const r=a.a.call(this);if(t)return void r.DOM.ready(()=>{o.call(this,e,!1)});const h=r.window,p=r.window.document,f=r.DOM.mutations,d=[],b=i.a.call(this,{element:{import:"import"},attr:{importid:"name",exportsearch:"exportsearch"}},e);c.push(b.get("attr.importid"),b.get("attr.moduleref"));const m="["+h.CSS.escape(b.get("attr.moduleref"))+"]",g="["+h.CSS.escape(b.get("attr.exportgroup"))+"]",v=class{static create(e){return new v(e)}constructor(e){this.el=e;const[t,r]=Object(i.b)(e.getAttribute(b.get("attr.importid"))||"default");Object(s.b)(this.el,"oohtml").set("importID",t),Object(s.b)(this.el,"oohtml").set("importModifiers",r)}hydrate(e,t,r){Object(s.b)(this.el,"oohtml").set("anchorNode",e),Object(s.b)(this.el,"oohtml").set("slottedElements",t),Object(s.b)(this.el,"oohtml").set("compositionBlock",r),this._bindSlotted(t),this._connectToCompositionBlock()}connectedCallback(){Object(s.b)(this.el,"oohtml").has("anchorNode")||(Object(s.b)(this.el,"oohtml").set("anchorNode",b.get("isomorphic")?p.createComment(this.el.outerHTML):p.createTextNode("")),Object(s.b)(this.el,"oohtml").set("compositionBlock",this.el.hasAttribute(b.get("attr.moduleref"))?this.el.getAttribute(b.get("attr.moduleref")).trim().startsWith("~")?this.el.parentNode.closest(g):null:this.el.parentNode.closest(m)),this._connectToCompositionBlock()),r.DOM.ready.call(r,()=>{this.resolve()})}_connectToCompositionBlock(){this.compositionBlock&&Object(s.b)(this.compositionBlock,"oohtml","imports").set(this.importID,this.el)}_bindSlotted(e){e.forEach(e=>{e.importReference=this.el}),Object(s.b)(this.el,"oohtml").set("slottedObserver",f.onRemoved(e,(t,r,a,i,o)=>{o&&o.size===e.length&&Object(s.b)(this.el,"oohtml").get("slottedObserver").disconnect(),t.forEach(e=>{e.parentNode||Object(n.h)(this.slottedElements,e),e.importReference===this.el&&delete e.importReference}),this.slottedElements.length||this.anchorNode.isConnected&&this.anchorNode.replaceWith(this.el)},{maintainCallState:!0,ignoreTransients:!0}))}resolve(){if(!Object(n.b)(d,e=>this.el.closest(e))){var e,t;if(this.el.hasAttribute(b.get("attr.moduleref")))this.compositionBlock&&Object(s.b)(this.compositionBlock,"oohtml","imports").get(this.importID)===this.el&&Object(s.b)(this.compositionBlock,"oohtml","imports").delete(this.importID),e=this.el;else{if(!this.compositionBlock)return void console.warn("Scoped slots must be found within template contexts. ["+this.importID+"]",this.el);e=this.compositionBlock}var r=e.getAttribute(b.get("attr.moduleref")).trim(),a=this.el.getAttribute(b.get("attr.exportsearch"));e&&(t=((e,t,r)=>{var n=this.importID,a=this.importModifiers,[o,c]="search"in a||null!==r?("search"in a?a.search:r).split("-").filter(e=>e).map(e=>parseInt(e||0)).concat([0,1e3]):[0,0];return Object(i.d)(e,t,(function(e,t){var r=Object(s.b)(e,"oohtml","templates");return 1===arguments.length?r:t.startsWith(":")?Object(s.b)(e,"oohtml","exports").get(t.substr(1)):r.get(t)}),(function(e,t,r){var a=e.reduce((e,t)=>e.concat(Object(s.b)(t,"oohtml","exports").get(n)||[]),[]);return!a.length&&t>o&&c?(c--,-1):a}))})([r.startsWith("~")?this.compositionBlock:p],r,a)).length?Object(n.c)(t,Object(s.b)(this.el,"oohtml").get("originalSlottedElements")||[]).length&&(Object(s.b)(this.el,"oohtml").set("originalSlottedElements",t),this.fill(t)):(Object(s.b)(this.el,"oohtml").set("originalSlottedElements",null),this.empty())}}fill(e){e=Object(n.e)(e,!1).map(e=>e.cloneNode(!0)),this.empty(!0),this.el.isConnected&&this.el.replaceWith(this.anchorNode),e.forEach(e=>{Object(s.b)(e,"oohtml","templates").set("~",this.el),function(e,t,r=[],s=!0){r=r.concat(c),e.hasAttribute("noinherit")&&(r=r.concat((e.getAttribute("noinherit")||"*").split(" ").map(e=>e.trim())));var a=u.concat(["role","class"]);if(Object(n.j)(a).forEach(a=>{var i,o;if(!r.includes(a)&&!r.includes("*")&&(i=t.getAttribute(a))){if(o=e.getAttribute(a))var c=s?[o,i]:[i,o];else c=[i];e.setAttribute(a,Object(n.j)(c.join(" ").split(" ").map(e=>e.trim())).join(" ")),r.push(a)}}),Object(n.j)(l.concat("style")).forEach(n=>{var a,i;if(!r.includes(n)&&!r.includes("*")&&(a=t.getAttribute(n))){if(i=e.getAttribute(n))(o=s?[i,a]:[a,i])[0].trim().endsWith(";")||(o[0]=o[0]+";");else var o=[a];e.setAttribute(n,o.join(" ")),r.push(n)}}),!r.includes("*"))for(var i=0;i<t.attributes.length;i++){var o=t.attributes[i];r.includes(o.name)||e.hasAttribute(o.name)&&!s||e.setAttribute(o.name,o.value)}}(e,this.el),e.getAttribute(b.get("attr.exportgroup"))||e.setAttribute(b.get("attr.exportgroup"),this.importID),this.anchorNode.before(e)}),this._bindSlotted(e),this.slottedElements.push(...e)}empty(e=!1){if(this.slottedElements){var t=this.slottedElements;e&&Object(s.b)(this.el,"oohtml").has("slottedObserver")&&(Object(s.b)(this.el,"oohtml").get("slottedObserver").disconnect(),t=this.slottedElements.splice(0)),t.forEach(e=>e.remove())}}get importID(){return Object(s.b)(this.el,"oohtml").get("importID")}get importModifiers(){return Object(s.b)(this.el,"oohtml").get("importModifiers")}get anchorNode(){return Object(s.b)(this.el,"oohtml").get("anchorNode")}get compositionBlock(){return Object(s.b)(this.el,"oohtml").get("compositionBlock")}get slottedElements(){return Object(s.b)(this.el,"oohtml").has("slottedElements")||Object(s.b)(this.el,"oohtml").set("slottedElements",[]),Object(s.b)(this.el,"oohtml").get("slottedElements")}get exports(){return Object(s.b)(this.el,"oohtml").get("exports")}static get observedAttributes(){return[b.get("attr.importid")]}};f.onPresent(b.get("element.import"),e=>{v.create(e).connectedCallback()});const O=(e,t)=>{const r=(e,r)=>!t||r===t||!0===t&&(this.importModifiers&&"search"in this.importModifiers||e.getAttribute(b.get("attr.exportsearch")));if(e.matches(b.get("element.import"))){var n=v.create(e);n.connectedCallback(),r(e,n.importID)&&n.resolve()}else Object(s.b)(e,"oohtml","imports").forEach((e,t)=>{r(e,t)&&v.create(e).resolve()})};f.onPresent(m,e=>{Object(n.b)(d,t=>e.closest(t))||f.onAttrChange(e,t=>{t[0].target.getAttribute(t[0].attributeName)!==t[0].oldValue&&O(e)},[b.get("attr.moduleref"),b.get("attr.importid")])}),p.addEventListener("templatemutation",e=>{e.detail.path&&Object(n.e)(p.querySelectorAll("["+h.CSS.escape(b.get("attr.moduleref"))+"]")).forEach(t=>{Object(i.c)(t.getAttribute(b.get("attr.moduleref")),e.detail.path)&&(O(t,!0),e.detail.addedExports.concat(e.detail.removedExports).forEach(e=>{O(t,e.name)}))})});r.DOM.ready.call(r,()=>{b.get("isomorphic")&&Object(n.e)(p.querySelectorAll(g)).forEach(e=>{if(!Object(s.b)(e.parentNode,"oohtml").get("importsCan")){var t=[];e.parentNode.childNodes.forEach(e=>{var r;if(1===e.nodeType&&e.matches(g))t.push(e);else if(8===e.nodeType&&(r=e.nodeValue.trim())&&r.startsWith("<"+b.get("element.import"))&&r.endsWith("</"+b.get("element.import")+">")){var n,s=p.createElement("div");if(s.innerHTML=r,(n=s.firstChild).matches(b.get("element.import"))){var a=n.hasAttribute(b.get("attr.moduleref"))?n.getAttribute(b.get("attr.moduleref")).trim().startsWith("~")?e.parentNode.closest(g):null:e.parentNode.closest(m);v.create(n).hydrate(e,t,a),t=[]}}}),Object(s.b)(e.parentNode,"oohtml").set("importsCan",!0)}})})}const c=["nocompose"],l=[],u=[]},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(11),s=r(4),a=r(0),i=r(31),o=r(39);function c(e=null,t=!1){const r=i.a.call(this);if(t)return void r.DOM.ready(()=>{c.call(this,e,!1)});const l=r.window,u=r.window.document,h=r.DOM.mutations,p=[],f=o.a.call(this,{attr:{namespace:"namespace",id:"id"},api:{namespace:"namespace"},eagermode:!0},e),d=function(e){if(!Object(a.b)(e,"oohtml").has("namespace")){const t=Object.create(null);Object(a.b)(e,"oohtml").set("namespace",t),n.a.link&&n.a.link(e,f.get("api.namespace"),t)}return Object(a.b)(e,"oohtml").get("namespace")},b=function(e){if(!Object(a.b)(e,"oohtml").has("publicNamespace")){const t=d(e);Object(a.b)(e,"oohtml").set("publicNamespace",f.get("eagermode")?new Proxy(t,{get(r,i){if(Object(a.i)(i)&&!t[i]){var o=Object(s.e)(e.querySelectorAll("["+l.CSS.escape(f.get("attr.id"))+'="'+i+'"]')).filter(t=>{var r=t.parentNode.closest("["+l.CSS.escape(f.get("attr.namespace"))+"]");return e===u?!r:r===e})[0];o&&n.a.set(t,i,o)}return t[i]}}):t)}return Object(a.b)(e,"oohtml").get("publicNamespace")};if(f.get("api.namespace")in l.Element.prototype)throw new Error('The "Element" class already has a "'+f.get("api.namespace")+'" property!');if(Object.defineProperty(l.Element.prototype,f.get("api.namespace"),{get:function(){return b(this)}}),f.get("api.namespace")in u)throw new Error('The "document" object already has a "'+f.get("api.namespace")+'" property!');Object.defineProperty(u,f.get("api.namespace"),{get:function(){return b(u)}}),h.onPresent("["+l.CSS.escape(f.get("attr.id"))+"]",e=>{var t=Object(a.b)(e,"oohtml");if(!t.get("idAlreadyBeingWatched")&&!Object(s.b)(p,t=>e.closest(t))){var r=e.getAttribute(f.get("attr.id")),i=e.parentNode.closest("["+l.CSS.escape(f.get("attr.namespace"))+"]");i||(i=u);var o=d(i);o[r]!==e&&n.a.set(o,r,e),t.set("idAlreadyBeingWatched",!0),h.onPresenceChange(e,(t,s)=>{s?o[r]!==e&&n.a.set(o,r,e):o[r]===e&&n.a.deleteProperty(o,r)})}})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(11),s=r(4),a=r(0),i=r(31),o=r(39);function c(e=null,t=!1){const r=i.a.call(this);if(t)return void r.DOM.ready(()=>{c.call(this,e,!1)});const l=r.window,u=r.window.document,h=o.a.call(this,{api:{state:"state",setState:"setState",clearState:"clearState"}},e),p=function(e,t=null){if(!Object(a.b)(e,"oohtml").has("state")||t){const r=t||Object.create(null),s=Object(a.b)(e,"oohtml").get("state");if(Object(a.b)(e,"oohtml").set("state",r),s&&n.a.unlink&&n.a.unlink(e,h.get("api.state"),s),n.a.link){let a=t?{isUpdate:!!s,oldValue:s}:null;n.a.link(e,h.get("api.state"),r,a)}}return Object(a.b)(e,"oohtml").get("state")};if(h.get("api.state")in l.Element.prototype)throw new Error('The "Element" class already has a "'+h.get("api.state")+'" property!');if(Object.defineProperty(l.Element.prototype,h.get("api.state"),{get:function(){return n.a.proxy(p(this))}}),h.get("api.setState")in l.Element.prototype)throw new Error('The "Element" class already has a "'+h.get("api.setState")+'" property!');if(Object.defineProperty(l.Element.prototype,h.get("api.setState"),{value:function(e,t={}){if(t.update){var r=p(this);if("merge"!==t.update){var a=Object(s.c)(Object.keys(r),Object.keys(e));n.a.deleteProperty(r,a)}n.a.set(r,e)}else p(this,e)}}),h.get("api.clearState")in l.Element.prototype)throw new Error('The "Element" class already has a "'+h.get("api.clearState")+'" property!');if(Object.defineProperty(l.Element.prototype,h.get("api.clearState"),{value:function(){p(this,{})}}),h.get("api.state")in u)throw new Error('The "document" object already has a "'+h.get("api.state")+'" property!');if(Object.defineProperty(u,h.get("api.state"),{get:function(){return n.a.proxy(p(u))}}),h.get("api.setState")in u)throw new Error('The "document" object already has a "'+h.get("api.setState")+'" property!');if(Object.defineProperty(u,h.get("api.setState"),{value:function(e,t={}){if(t.update){var r=p(u);if("merge"!==t.update){var a=Object(s.c)(Object.keys(r),Object.keys(e));n.a.deleteProperty(r,a)}n.a.set(r,e)}else p(u,e)}}),h.get("api.clearState")in u)throw new Error('The "document" object already has a "'+h.get("api.clearState")+'" property!');Object.defineProperty(u,h.get("api.clearState"),{value:function(){p(u,{})}})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(11),s=r(26),a=r(12),i=r(4),o=r(0),c=r(31),l=r(49),u=r(74),h=r(66),p=r(56),f=r(39);function d(e=null,t=!1){const r=c.a.call(this);if(t)return void r.DOM.ready(()=>{d.call(this,e,!1)});const h=r.window,p=r.window.document,b=r.DOM.mutations,g=[],v=f.a.call(this,{selectors:{script:'script[type="subscript"]'},api:{bind:"bind",unbind:"unbind"},script:{}},e);var O=!1!==v.get("script.autorun");const j={errorLevel:v.get("script.errlevel")},y={};n.a.set(y,"document",p);const w=l.a.createStack([y,l.a.create(h)],j,{set:n.a.set}),x=function(e){var t=Object(o.b)(e,"oohtml");if(!t.has("subscript")){const r={},s={scope:l.a.createStack([{},r,w],j,{set:n.a.set})};n.a.set(r,"this",e),t.set("subscript",s),s.console={errors:[],infos:[],warnings:[],logs:[],exceptions:[]}}return t.get("subscript")},E=function(e){var t=x(e);if(t.handler||(t.handler=r=>{t.inWaitlist||k(t.srcCodes1,e,r)},t.connected=e=>{t.isConnected=e,e?t.scope.observe(n.a,t.handler,{tags:[t.handler]}):t.scope.unobserve(n.a,{tags:[t.handler]})}),!t.isConnected){var r=b.onRemoved(e,()=>{t.connected(!1),r.disconnect()},{ignoreTransients:!0});t.connected(!0)}return t},k=function(e,t,r){var s=x(t);s.inWaitlist=!1;var a={references:(r||{}).references,catch:s.catch?s.catch:e=>{2===s.errorLevel?(console.error(t,e),s.console.errors.push(e)):0!==s.errorLevel&&(console.warn(t,e.message),s.console.warnings.push(e.message))},trap:n.a};e.forEach(e=>{u.a.eval(e,s.scope,a)})};if(b.onPresent(v.get("selectors.script"),(e,t)=>{if(e.parentNode){var r=e.parentNode,n=E(r);if(v.get("isomorphic")||e.remove(),n.scriptElements=n.scriptElements||[],n.srcCodes1=n.srcCodes1||[],!n.scriptElements.includes(e)){n.scriptElements.push(e);var s=(e.textContent||"").trim();if(s){var a=[],i=e.hasAttribute("explain")||v.get("script.explain"),o=m(s,{explain:i?a:null});n.srcCodes1.push(o),e.hasAttribute("scoped"),i&&(n.console.logs.push(a),console.log(r,a)),n.errorLevel=e.getAttribute("errors")?parseInt(e.getAttribute("errors")):v.get("script.errors"),O||n.hasBindings||e.hasAttribute("autorun")?k([o],r):(n.inWaitlist=!0,g.push(r))}}}}),"subscript"in h.Element.prototype)throw new Error('The "Element" class already has a "subscript" property!');if(Object.defineProperty(h.Element.prototype,"subscript",{get:function(){let e=E(this);if(!("bindings"in e)){var t=this;Object.defineProperty(e,"bindings",{get:function(){return e.scopeInstanceProxy||(e.scopeInstanceProxy=new Proxy(e.scope.stack.main,{set:(r,s,a)=>(n.a.set(e.scope.stack.main,s,a),e.hasBindings=!0,g.includes(t)&&(Object(i.h)(g,t),k((e.srcCodes1||[]).concat(e.srcCodes2||[]),t)),!0),get:(t,r)=>n.a.get(e.scope.stack.main,r),deleteProperty:(t,r)=>n.a.deleteProperty(e.scope.stack.main,r)})),e.scopeInstanceProxy}}),Object.defineProperty(e,"bind",{value:function(r,s={}){s.update?n.a.set(e.scope.stack.main,r):n.a.set(e.scope.stack,"main",r),e.hasBindings=!0,g.includes(t)&&(Object(i.h)(g,t),k((e.srcCodes1||[]).concat(e.srcCodes2||[]),t))}}),Object.defineProperty(e,v.get("api.unbind"),{value:function(){n.a.set(e.scope.stack,"main",{})}})}return e}}),"subscript"in p)throw new Error('The "document" object already has a "subscript" property!');var P,S={};Object.defineProperty(p,"subscript",{get:function(){return"bindings"in S||(Object.defineProperty(S,"bindings",{get:function(){return P||(P=new Proxy(w.stack.main,{set:(e,t,r)=>{var s;for(n.a.set(w.stack.main,t,r);s=g.shift();){var a=E(s);k((a.srcCodes1||[]).concat(a.srcCodes2||[]),s)}return O=!0,!0},get:(e,t)=>n.a.get(w.stack.main,t),deleteProperty:(e,t)=>n.a.deleteProperty(w.stack.main,t)})),P}}),Object.defineProperty(S,"bind",{value:function(e,t={}){var r;for(t.update?n.a.set(w.stack.main,e):n.a.set(w.stack,"main",e);r=g.shift();){var s=E(r);k((s.srcCodes1||[]).concat(s.srcCodes2||[]),r)}O=!0}}),Object.defineProperty(S,"unbind",{value:function(){n.a.set(w.stack,"main",{})}})),S}}),r.SubscriptElement=e=>class extends e{constructor(){super(),this._parametersContextGroups={},this._parametersDefaultValsRefs={},(this.constructor.subscriptParameterBlocks||[]).forEach(e=>{if(e.replaceAll(" ","").endsWith("()")&&(e=e.replaceAll("(","").replaceAll("}","")),"constructor"===e)throw new Error("Constructors cannot be reactive methods.");if(!Object(o.e)(this[e]))throw new Error(`The implied reactive method "${e}" is not a function.`);var t=this[e].toString().trim(),r=Object(s.b)(Object(s.a)(t,"("),")").split(",").map(e=>e.trim()).filter(e=>e);if(!r.length)throw new Error(`[${e}()]: Reactive methods must have parameters.`);this._parametersContextGroups[e]={},this._parametersDefaultValsRefs[e]=r.map(t=>{if(!t.includes("="))throw new Error(`[${e}(${t})]: All parameters must have a default value.`);var r=t.split("=").map(e=>e.trim());if(!r[1].includes("."))throw new Error(`[${e}(${t})]: Parameter's default value must be a path reference.`);var n=r[1].replaceAll("?.",".").split("."),s=n.shift(),a="this"===s?this:"document"===s?p:"window"===s?h:globalThis[s];if(!Object(o.j)(a))throw new Error(`[${e}(${t})]: Parameter's default value does not reference an object in scope.`);return this._parametersContextGroups[e][s]||(this._parametersContextGroups[e][s]={context:a,refs:[]}),this._parametersContextGroups[e][s].refs.push(n),r[1]})});var e=[],t=v.get("script.explain"),r=x(this);r.srcCodes2=(this.constructor.subscriptBlocks||[]).map(e=>{if("constructor"===e)throw new Error("Constructors cannot be reactive blocks.");if(!Object(o.e)(this[e]))throw new Error(`The implied reactive block "${e}" is not a function.`);var t=this[e].toString().trim();if(!t.replaceAll(" ","").startsWith(e+"(){"))throw new Error(`[${e}()]: Reactive blocks cannot have parameters.`);return Object(s.c)(Object(s.a)(t,"{"),"}")}).filter(e=>e),r.srcCodes2=r.srcCodes2.map(r=>m(r,{explain:t?e:null})),t&&(r.console.logs.push(e),console.log(this,e)),r.handler2=e=>{r.inWaitlist||k(r.srcCodes2,this,e)}}connectedCallback(){Object(a.b)(this._parametersContextGroups,(e,t)=>{const r=this._parametersDefaultValsRefs[e];Object(a.b)(t,(s,i)=>{n.a.observe(i.context,i.refs,i=>{var o={};i.forEach(e=>{o[`${s}.${e.path.join(".")}`]=e.value});var c=r.map(e=>{if(!o[e]){var r=e.split("."),s=r.shift();o[e]=Object(a.c)(t[s].context,r,n.a)}return o[e]});try{this[e](...c)}catch(e){console.error(e)}},{diff:!0,suptree:!0,tags:[this,"subscriptParameterBlocks"]})});try{this[e]()}catch(e){}});const e=x(this);O||e.hasBindings?k(e.srcCodes2,this):(e.inWaitlist=!0,g.push(this)),e.scope.observe(n.a,e.handler2,{tags:[e.handler2]})}disconnectedCallback(){Object(a.b)(this._parametersContextGroups,(e,t)=>{Object(a.b)(t,(e,t)=>{n.a.unobserve(t.context,null,null,{tags:[this,"subscriptParameterBlocks"]})})});const e=x(this);e.scope.unobserve(n.a,{tags:[e.handler2]})}}}const b={};function m(e,t={}){return b[e]||(b[e]=h.a.parse(e,[p.a],Object(a.d)({assert:!1},t)))||(b[e]=new p.a([h.a.parse(e,null,t)])),b[e]}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));class n{static eval(e,...t){return e.eval(...t)}}},function(e,t,r){"use strict";var n=r(27),s=r(30),a=r(13),i=r(15);const o=class extends i.a{};Object.defineProperty(o.prototype,"jsenType",{get:()=>"Abstraction"});var c=o,l=r(56);var u=class extends c{constructor(e){super(),this.expr=e}eval(e=null,t={}){return this.expr.eval(e,t)}toString(){return this.stringify()}stringify(e={}){return"("+this.expr.stringify(e)+")"}static parse(e,t,r={}){if(Object(n.a)(e,"(",")")&&!a.a.match(e,[" "]).length&&2===a.a.split(e,[]).length)return new this(l.a.parseSingleOrMultiple(Object(s.a)(e,"(",")"),t,r))}};const h=class extends i.a{};Object.defineProperty(h.prototype,"jsenType",{get:()=>"ArrayType"});var p=h;var f=class extends p{constructor(e){super(),this.exprs=e||[]}inherit(e){if(e instanceof p){var t=e.exprs.filter(e=>this.exprs.reduce((t,r)=>t&&!e.even(r),!0));this.exprs=t.concat(this.exprs)}return this}eval(e=null,t={}){return this.exprs.map(r=>r.eval(e,t))}toString(){return this.stringify()}stringify(e={}){return"["+this.exprs.map(t=>t.stringify(e)).join(", ")+"]"}static parse(e,t,r={}){if(Object(n.a)(e,"[","]")&&!a.a.match(e.trim(),[" "]).length)return new this(a.a.split(Object(s.a)(e,"[","]"),[","]).map(e=>e.trim()).filter(e=>e).map(e=>t(e,null,r)))}},d=r(16),b=r(29),m=r(47);const g=class extends i.a{};Object.defineProperty(g.prototype,"jsenType",{get:()=>"AssertionExpression"});var v=g;const O=class extends v{constructor(e,t){super(),this.exprs=e,this.logic=t}eval(e=null,t={}){var r=this.constructor;if(this.logic.toLowerCase()===r.negation.toLowerCase())return!Object(d.a)(this.exprs).eval(e,t);Object(b.a)(r.operators);for(var n=(this.logic||"").trim().toUpperCase(),s=n===(r.operators.or||"").trim().toUpperCase(),a=n===(r.operators.nor||"").trim().toUpperCase(),i=n===(r.operators.and||"").trim().toUpperCase(),o=n===(r.operators.nand||"").trim().toUpperCase(),c=!0,l=0,u=0;u<this.exprs.length;u++){if(c=this.exprs[u].eval(e,t),i&&!c)return!1;if(o&&!c)return!0;if(s&&c)return c;l+=c?1:0}return s?c:i||o?i:a&&0===l}toString(){return this.stringify()}stringify(e={}){var t=this.constructor;return this.logic.toLowerCase()===t.negation.toLowerCase()?this.logic+Object(d.a)(this.exprs).stringify(e):this.exprs.map(t=>t.stringify(e)).join(" "+this.logic.trim()+" ")}static parse(e,t,r={}){if(e.toUpperCase().startsWith(this.negation.toUpperCase()))return new this([t(e.substr(this.negation.length),null,r)],this.negation);var n=a.a.lex(e,Object(b.a)(this.operators));if(n.tokens.length>1){var s=Object(m.a)(n.matches);if(s.length>1)throw new Error('"AND" and "OR" logic cannot be asserted in the same expression: '+e+"!");return new this(n.tokens.map(e=>t(e.trim(),null,r)),Object(d.a)(s))}}};O.negation="!",O.operators={and:"&&",or:"||"};var j=O,y=r(18),w=r(1),x=r(59),E=r(51),k=r(57),P=r(46);const S=class extends x.a{constructor(e,t,r="=",n=!1){super(),this.reference=e,this.val=t,this.operator=r,this.incrDecrIsPost=n}eval(e=null,t={}){var r,n,s,a=this.reference.getEval(e,t);if(["++","--"].includes(this.operator)){if(s=this.reference.eval(e,t),!Object(y.a)(s))throw new Error(this.reference+" must be a number!");r="++"===this.operator?s+1:s-1}else if(["+=","-=","*=","/="].includes(this.operator)){var i=a.get(),o=this.val.eval(e,t);if(!("+="===this.operator||Object(y.a)(i)&&Object(y.a)(o)))throw new Error(this+" - operands must each be a number!");r="*="===this.operator?i*o:"/="===this.operator?i/o:"-="===this.operator?i-o:i+o}else n=t.initKeyword,r=this.val?this.val.eval(e,t):void 0;try{return a.set(r,n),t&&Object(w.a)(t.references)&&_pushUnique(t.references,this.reference.toString()),this.incrDecrIsPost?s:r}catch(e){throw e instanceof P.a?new P.a("["+this+"]: "+e.message):e}}toString(){return this.stringify()}stringify(e={}){return["++","--"].includes(this.operator)?this.incrDecrIsPost?this.reference.stringify(e)+this.operator:this.operator+this.reference.stringify(e):[this.reference.stringify(e),this.operator.trim(),this.val?this.val.stringify(e):""].filter(e=>e).join(" ")}static parse(e,t,r={}){e=e.trim();var n,s=a.a.lex(e,this.operators.concat([C]));if(r.isDeclaration&&(delete(r={...r}).isDeclaration,n=!0),s.matches.length||n){var i,o,c,l=(s.matches[0]||"").trim(),u=["++","--"].includes(l);if(u?(c=e.trim().endsWith("++")||e.trim().endsWith("--"),i=s.tokens[c?"shift":"pop"]().trim()):(i=s.tokens.shift().trim(),o=(s.tokens.shift()||"").trim()),!((i=t(i,null,{...r,role:"ASSIGNMENT_SPECIFIER"}))instanceof E.a)||!u&&o&&!(o=t(o,null,r))&&!n)throw new k.a(e);return new this(i,o,l,c)}}};S.operators=["+=","-=","*=","/=","++","--"];const C=(e,t)=>!(e.endsWith("=")||!t.startsWith("=")||t.startsWith("=>")||t.startsWith("==")||t.startsWith("==="))&&"=";var T=S;const A=class extends i.a{};Object.defineProperty(A.prototype,"jsenType",{get:()=>"BooleanType"});var M=A;var _=class extends M{constructor(e){super(),this.state=e}eval(){return"true"===this.state.toLowerCase().trim()}toString(){return this.stringify()}stringify(e={}){return this.state}static parse(e,t,r={}){if("true"===(e=e.toLowerCase().trim())||"false"===e)return new this(e)}},D=(r(6),r(53));const $=class extends i.a{};Object.defineProperty($.prototype,"jsenType",{get:()=>"Arguments"});var N=$;var W=class extends N{constructor(e=[]){super(),this.list=e}eval(e=null,t={}){return this.list.map(r=>r.eval(e,t))}toString(){return this.stringify()}stringify(e={}){return"("+this.list.map(t=>t.stringify(e)).join(", ")+")"}static parse(e,t,r={}){if(e=e.trim(),Object(n.a)(e,"(",")")&&!a.a.match(e,[" "]).length)return new this(a.a.split(Object(s.a)(e,"(",")"),[","]).map(e=>t(e.trim(),null,r)))}};var I=class extends D.a{constructor(e,t){super(),this.reference=e,this.args=t}eval(e=null,t={}){try{var r=this.args.eval(e,t);return this.reference.getEval(e,t).exec(r)}catch(e){throw e instanceof P.a?new P.a("["+this+"]: "+e.message):e}}toString(){return this.stringify()}stringify(e={}){return this.reference.stringify(e)+this.args.stringify(e)}static parse(e,t,r={}){if(e.endsWith(")")&&!a.a.match(e,[" "]).length){var n,s=a.a.split(e,[]),i=s.pop();if(!((n=t(s.join(""),null,{...r,role:"CALL_SPECIFIER"}))instanceof E.a&&(i=t(i,[W],r))))throw new k.a(e);return new this(n,i)}}},F=r(7),R=(r(55),r(2),r(14)),L=r(20);const B=class extends i.a{};Object.defineProperty(B.prototype,"jsenType",{get:()=>"ComparisonExpression"});var q=B;class V extends q{constructor(e,t,r){super(),this.operand1=e,this.operand2=t,this.operator=r}eval(e=null,t={}){return this.constructor.compare(this.operand1.eval(e,t),this.operand2.eval(e,t),this.operator)}toString(){return this.stringify()}stringify(e={}){return[this.operand1.stringify(e),this.operator,this.operand2.stringify(e)].join(" ")}static parse(e,t,r={}){var n=Object(b.a)(this.operators),s=a.a.lex(e,n);if(s.tokens.length>1){if(s.tokens.length>2)throw new Error('Malformed "Comparison" expression: '+e+"!");return new this(t(Object(d.a)(s.tokens).trim(),null,r),t(Object(F.a)(s.tokens).trim(),null,r),s.matches[0].trim())}}static compare(e,t,r="=="){if(-1===Object(b.a)(this.operators).indexOf(r))throw new Error('The operator "'+r+'" is not recognized.');switch(r){case"===":return e===t;case"==":case"=":return e==t;case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t;case"!=":return e!=t;case"<>":case"!==":return e!==t;case"^=":return Object(R.a)(e)&&e.startsWith(t);case"$=":return Object(R.a)(e)&&e.endsWith(t);case"*=":return!(!Object(w.a)(t)&&!Object(R.a)(t))&&e.indexOf(t)>-1;case"~=":return Object(R.a)(e)&&Object(R.a)(t)&&(" "+e+" ").indexOf(" "+t+" ")>-1;case">=<":if(!Object(w.a)(t)||2!==t.length)throw new Error("A 'Between' comparison requires argument 2 to be an array of exactly 2 values.");return e>=t[0]&&e<=t[1];case"/**/":return t.match(new RegExp(e));default:return!1}}static diff(e,t,r){return!this.compare(e,t,r?"===":"==")}}V.operators={exact:{is:"===",isNull:"===",equalsTo:"==",strictlyNotEqualsTo:"!==",notEqualsTo:"!="},relative:{lesserThan:"<",greaterThan:">",lesserThanOrEqualsTo:"<=",greaterThanOrEqualsTo:">=",between:">=<"},partial:{startsWith:"^=",endsWith:"$=",contains:"*=",any:"~=",in:"~=",matches:"/**/"}};const z=class extends i.a{};Object.defineProperty(z.prototype,"jsenType",{get:()=>"TernaryConditional"});var Q=z;class H extends Q{constructor(e,t,r){super(),this.assertion=e,this.onTrue=t,this.onFalse=r}eval(e=null,t={}){return this.assertion.eval(e,t)?this.onTrue.eval(e,t):this.onFalse.eval(e,t)}toString(){return this.stringify()}stringify(e={}){return[this.assertion.stringify(e),this.constructor.operators[0],this.onTrue.stringify(e),this.constructor.operators[1],this.onFalse.stringify(e)].join(" ")}static parse(e,t,r={}){var n=a.a.split(e,this.operators);if(n.length>1){if(2===n.length)throw new Error("Malformed ternary expression: "+e+"!");return new this(t(n[0].trim(),null,r),t(n[1].trim(),null,r),t(n[2].trim(),null,r))}}}H.operators=["?",":"];var U=r(65);const G=class extends U.a{constructor(e,t="delete"){super(),this.reference=e,this.operator=t}eval(e=null,t={}){try{return this.reference.getEval(e,t).del()}catch(e){throw e instanceof P.a?new P.a("["+this+"]: "+e.message):e}}toString(){return this.stringify()}stringify(e={}){return this.operator+" "+this.reference.stringify(e)}static parse(e,t,r={}){var n=a.a.lex(e,Object.values(this.operators));if(1===n.matches.length&&e.startsWith(n.matches[0]+" ")){var s;if(!((s=t(n.tokens.pop().trim(),null,{...r,role:"DELETION_SPECIFIER"}))instanceof E.a))throw new k.a(e);return new this(s,n.matches[0].trim())}}};G.operators={red:"reduce",del:"delete"};var K=G,X=(r(40),r(64));const Z=class extends X.a{};Object.defineProperty(Z.prototype,"jsenType",{get:()=>"FunctionType"});var J=Z,Y=r(49);const ee=class extends J{constructor(e,t,r={}){super(),this.paramters=e||{},this.statements=t,this.statements.isIndependent=!0,this.arrowFunctionFormatting=r}inherit(e){if(e instanceof J){for(var t=Object.keys(e.paramters),r=Object.keys(this.paramters),n=0;n<Math.max(r.length,t.length);n++){var s=t[n],a=r[n];if(!a&&s)throw new Error("Parameter #"+n+" ("+s+") in parent function must be implemented.");if(a&&s){var i=e.paramters[s],o=this.paramters[a];if(o&&!i)throw new Error("Parameter #"+n+" ("+a+") must not have a default value as established in parent function.");if(o&&i&&o.jsenType!==i.jsenType)throw new Error("Default value for parameter #"+n+" ("+a+") must be of type "+i.jsenType+" as established in parent function.")}}this.sup=e}return this}eval(e=null,t={}){var r=this;return delete(t={...t}).returnCallback,function(...n){var s={};Object(L.a)(Object.keys(r.paramters),(a,i)=>{var o=r.paramters[i];if(n.length-1<a&&!o)throw new Error('The parameter "'+i+'" is required.');s[i]=n.length>a?n[a]:r.paramters[i]?r.paramters[i].eval(e,t):null}),r.arrowFunctionFormatting||(s.this=this);var a=e instanceof Y.a?e.params.errorLevel:void 0,i={main:s,super:e,local:{},$local:{}};t.scopeObj&&(t.scopeObj.subscopes||(t.scopeObj.subscopes=[]),t.scopeObj.subscopes.push(i));var o=new Y.a(i,{errorLevel:a}),c=r.statements.eval(o,t);return!1===r.arrowFunctionFormatting.body?c[0]:c}}toString(){return this.stringify()}stringify(e={}){var t=[];if(Object(L.a)(this.paramters,(r,n)=>{t.push(r+(n?"="+n.stringify(e):""))}),this.arrowFunctionFormatting){var r=!1===this.arrowFunctionFormatting.head||1===t.length&&-1===t[0].indexOf("="),n=!1===this.arrowFunctionFormatting.body;return(r?t[0]:"("+t.join(", ")+")")+" => "+(n?this.statements.stringify(e):"{"+this.statements.stringify(e)+"}")}return"function ("+t.join(", ")+") {"+this.statements.stringify(e)+"}"}static parse(e,t,r={}){var i;if((e=e.trim()).startsWith("function")&&(i=a.a.split(e,[]).slice(1).filter(e=>e.trim()))&&2===i.length)var o=!1,c=Object(s.a)(i.shift().trim(),"(",")"),u=Object(s.a)(i.shift().trim(),"{","}");else{if(e.startsWith("function")||!(i=a.a.split(e,["=>"]))||2!==i.length)return;c=i.shift().trim(),u=i.shift().trim(),o={};Object(n.a)(c,"(",")")?c=Object(s.a)(c,"(",")"):o.head=!1,Object(n.a)(u,"{","}")?u=Object(s.a)(u,"{","}"):o.body=!1}var h={};a.a.split(c,[","]).forEach(e=>{var n=e.split("=");n[1]?h[n[0].trim()]=t(n[1].trim(),null,{...r,meta:null}):h[e.trim()]=null});var p=t(u,[l.a],{assert:!1})||t(u,null,{...r,meta:null});return new this(h,"Block"===p.jsenType?p:new l.a([p]),o)}};ee.operators=["=>"];var te=ee,re=r(58),ne=r(61);var se=class extends re.a{constructor(e,t,r,n={}){super(),this.assertion=e,this.onTrue=t,this.onFalse=r,this.params=n}eval(e=null,t={}){var r=e instanceof Y.a?e.params.errorLevel:void 0,n={main:{},super:e,local:{},$local:{}};t.scopeObj&&(t.scopeObj.subscopes||(t.scopeObj.subscopes=[]),t.scopeObj.subscopes.push(n));var s=new Y.a(n,{scopeType:2,errorLevel:r});return this.assertion.eval(e,t)?this.onTrue?this.onTrue.eval(s,t):void 0:this.onFalse?this.onFalse.eval(s,t):void 0}toString(){return this.stringify()}stringify(e={}){var t=this.onTrue&&this.params.onTrueIsBlock?"{"+this.onTrue.stringify(e)+"}":this.onTrue?this.onTrue.stringify(e):"",r=this.onFalse&&this.params.onFalseIsBlock?"{"+this.onFalse.stringify(e)+"}":this.onFalse?this.onFalse.stringify(e):"";return"if ("+this.assertion.stringify(e)+")"+t+(r?" else "+r:"")}static parse(e,t,r={}){var i;if((e=e.trim()).startsWith("if")&&(i=a.a.split(e,[],{limit:2}).slice(1).filter(e=>e.trim()))&&2===i.length){var o,c,u,h=t(Object(s.a)(i.shift().trim(),"(",")").trim(),null,r),p=a.a.split(i.shift().trim(),["else"],{limit:1}),f=p.shift().trim(),d=(p.shift()||"").trim();Object(n.a)(f,"{","}")&&(c=!0,f=Object(s.a)(f,"{","}").trim()),f=t(f,[l.a],{...r,assert:!1,meta:null})||t(f,null,{...r,meta:null}),d?(Object(n.a)(d,"{","}")&&(u=!0,d=Object(s.a)(d,"{","}").trim()),d=t(d,[l.a],{...r,assert:!1,meta:null})||t(d,null,{...r,meta:null})):f&&(o=f.stmts.filter(e=>e instanceof ne.a).length);const e=new this(h,f,d,{onTrueIsBlock:c,onFalseIsBlock:u});return e.abortive=o,e}}},ae=r(10),ie=r(52);const oe=class extends i.a{};Object.defineProperty(oe.prototype,"jsenType",{get:()=>"MathExpression"});var ce=oe;const le=class extends ce{constructor(e,t){super(),this.val=e,this.exprs=t}eval(e=null,t={}){return this.exprs.reduce((r,n)=>{var s=n.val.eval(e,t),a=n.operator.trim();if(!(Object(ae.a)(r)&&Object(ae.a)(s)||"+"===a))throw new Error("Invalid Math expression: "+this.toString()+"!");switch(a){case"+":return r+s;case"-":return r-s;case"*":return r*s;case"/":return r/s}},this.val.eval(e,t))}toString(){return this.stringify()}stringify(e={}){return[this.val.stringify(e)].concat(this.exprs.map(t=>t.operator+" "+t.val.stringify(e))).join(" ")}static parse(e,t,r={}){var n=a.a.lex(e,Object(b.a)(this.operators));if(n.tokens.filter(e=>e).length>1&&n.matches.length===n.tokens.length-1){var s=Object(m.a)(n.matches);if(Object(ie.a)(s,this.operators.sup).length&&Object(ie.a)(s,this.operators.sub).length)throw new Error('"Addition/subtraction" and "multiplication/division" operators cannot be used in the same expression: '+e+"!");return new this(t(n.tokens.shift().trim(),null,r),n.tokens.map((e,s)=>({operator:n.matches[s],val:t(e.trim(),null,r)})))}}};le.operators={sup:["*","/"],sub:["+","-"]};var ue=le,he=r(63);var pe=class extends he.a{constructor(e,t=0){super(),this.int=e,this.dec=t}eval(){return parseFloat(this.int+(this.dec?"."+this.dec:null))}toString(){return this.stringify()}stringify(e={}){return this.int+(this.dec?"."+this.dec:null)}static parse(e,t,r={}){if(Object(ae.a)(e)){e=e.split(".");return new this(parseInt(e.shift()),parseInt(e.shift()))}}},fe=r(0);const de=class extends i.a{};Object.defineProperty(de.prototype,"jsenType",{get:()=>"ObjectType"});var be=de,me=r(60);const ge=class extends be{constructor(e){super(),this.entries=e||new Map}inherit(e){return e instanceof be&&Array.from(e.entries.keys()).forEach(t=>{this.entries.has(t)||this.entries.set(t,e.entries.get(t))}),this}eval(e=null,t={}){var r={};return Array.from(this.entries.keys()).forEach(n=>{var s=Object(fe.i)(n)?n:n.eval(e,t),a=this.entries.get(n);a=a?a.eval(e,t):s,r[s]=a}),r}toString(){return this.stringify()}stringify(e={}){var t=[];return Array.from(this.entries.keys()).forEach(r=>{var n=r,s=this.entries.get(r);Object(fe.i)(n)||(n=r.stringify(e),r instanceof me.a||(n=`[${n}]`)),s&&!s.byShorthand?t.push(n+ge.operators.sub+" "+s.stringify(e)):t.push(n)}),"{ "+t.join(ge.operators.sup+" ")+" }"}static parse(e,t,r={}){if(Object(n.a)(e,"{","}")&&!a.a.match(e.trim(),[" "]).length){var i=new Map,o=a.a.split(Object(s.a)(e,"{","}"),[ge.operators.sup]).map(e=>e.trim()).filter(e=>e);return Object(L.a)(o,(e,s)=>{var o,c=a.a.split(s,[ge.operators.sub],{limit:1}),l=c.shift().trim();if(Object(n.a)(l,'"','"')||Object(n.a)(l,"'","'")||Object(n.a)(l,"[","]")){if(Object(n.a)(l,"[","]"))l=l.slice(1,-1);else if(!c.length)return;l=t(l,null,r)}if(c.length){if(!c[0])return;o=t(c[0].trim(),null,r)}else Object(fe.i)(l)&&((o=t(l,null,r)).byShorthand=!0);i.set(l,o)}),new this(i)}}};ge.operators={sup:",",sub:":"};var ve=ge;const Oe=class extends i.a{};Object.defineProperty(Oe.prototype,"jsenType",{get:()=>"PresenceOperator"});var je=Oe;const ye=class extends je{constructor(e,t,r="in"){super(),this.prop=e,this.reference=t,this.operator=r}eval(e=null,t={}){var r=this.prop.eval(e,t);try{return this.reference.getEval(e,t).has(r)}catch(e){throw e instanceof P.a?new P.a("["+this+"]: "+e.message):e}}toString(){return this.stringify()}stringify(e={}){return[this.prop.stringify(e),this.operator,this.reference.stringify(e)].join(" ")}static parse(e,t,r={}){var n=a.a.lex(e,this.operators);if(2===n.tokens.length){var s,i;if(!((s=t(n.tokens.shift().trim(),null,r))&&(i=t(n.tokens.shift().trim(),null,r))instanceof E.a))throw new k.a(e);return new this(s,i,n.matches[0].trim())}}};ye.operators=[" in "];var we=ye;class xe extends E.a{constructor(e,t,r=!1){super(),this.context=e,this.name=t,this.backticks=r}getEval(e=null,t={}){var r=e,n=this.name;this.context&&(n instanceof i.a&&(n=n.eval(e,t)),r=this.context.eval(e,t));var s=!this.context;return{get:()=>Y.a.create(r,t).get(n,t.trap),del:()=>Y.a.create(r,t).del(n,t.trap),has:e=>Y.a.create(r,t).has(n,e,t.trap),set:(e,a=null)=>Y.a.create(r,t).set(n,e,t.trap,a,s),exec:e=>Y.a.create(r,t).exec(n,e,t.trap)}}eval(e=null,t={}){try{return this.getEval(e,t).get()}catch(e){throw e instanceof P.a?new P.a("["+this+"]: "+e.message):e}}toString(){return this.stringify()}stringify(e={}){var t=this.name;if(this.context){var r=this.context.stringify(e);t instanceof i.a?t="["+t.stringify(e)+"]":this.backticks&&(t="`"+t+"`")}else{r=e.context;this.backticks&&(t="`"+t+"`")}return(r||"")+(r&&!t.startsWith("[")?xe.separator:"")+t}static parse(e,t,r={}){if(!a.a.match(e.trim(),[" "]).length){var i,o,c=a.a.split(e,[]),l=c.pop(),u=a.a.split(l.trim(),[this.separator],{preserveDelims:!0});if(u.length>1&&(l=u.pop().substr(1),c=c.concat(u)),Object(n.a)(l,"`","`")&&(l=Object(s.a)(l,"`","`"),o=!0),c.length&&(i=t(c.join(""),null,{...r,role:"CONTEXT"})),Object(n.a)(l,"[","]")){if(!i)throw new k.a(e);l=t(Object(s.a)(l,"[","]"),null,r)}return new this(i,l,o)}}}xe.separator=".";var Ee=class extends ne.a{constructor(e){super(),this.expr=e}eval(e=null,t={}){return this.expr?this.expr.eval(e,t):void 0}toString(){return this.stringify()}stringify(e={}){return this.expr?"return "+this.expr.stringify(e):"return"}static parse(e,t,r={}){var n=e.toLowerCase();if(n.startsWith("return ")||"return"===n)return new this(l.a.parseSingleOrMultiple(e.substr(6).trim(),t,r))}};var ke=class extends me.a{constructor(e,t){super(),this.expr=e,this.quote=t}eval(){return this.expr}toString(){return this.stringify()}stringify(e={}){return this.quote+this.expr+this.quote}static parse(e,t,r={}){if(e=e.trim(),(Object(n.a)(e,'"','"')||Object(n.a)(e,"'","'"))&&!a.a.match(e,[" "]).length){var i=Object(n.a)(e,'"','"')?'"':"'";return new this(Object(s.a)(e,i,i),i)}}},Pe=r(23),Se=r(62);var Ce=class extends Se.a{constructor(e,t){super(),this.initKeyword=e,this.declarations=t}eval(e=null,t={}){this.declarations.map(r=>r.eval(e,{...t,initKeyword:this.initKeyword}))}toString(){return this.stringify()}stringify(e={}){return this.initKeyword+" "+this.declarations.join(", ")}static parse(e,t,r={}){var n=(e=e.trim()).match(/^(var|let|const)/);if(n&&(n=n[0])){for(var s=[],i=a.a.split(Object(Pe.a)(e,n),[","]).map(e=>e.trim()),o=0;o<i.length;o++){var c=t(i[o],[T],{...r,isDeclaration:!0});if(c.operator&&"="!==c.operator||c.reference.context)return;s.push(c)}return new this(n,s)}}};const Te=class extends i.a{};Object.defineProperty(Te.prototype,"jsenType",{get:()=>"Void"});var Ae=Te;var Me=class extends Ae{constructor(e){super(),this.val=e}eval(){return"null"===this.val.toLowerCase().trim()?null:void 0}toString(){return this.stringify()}stringify(e={}){return this.val}static parse(e,t,r={}){if("null"===(e=e.toLowerCase().trim())||"undefined"===e)return new this(e)}};t.a={If:se,Return:Ee,Deletion:K,VariableDec:Ce,Assignment:T,Presence:we,Func:te,Abstraction:u,Condition:H,Assertion:j,Comparison:V,Math:ue,Arr:f,Obj:ve,Num:pe,Str:ke,Bool:_,Void:Me,Call:I,Reference:xe}},,,,,,function(e,t,r){"use strict";r.r(t);var n=r(11),s=r(68),a=r(31),i=r(69),o=r(70),c=r(71),l=r(72),u=r(73);(function(e=null,t=!1){const r=a.a.call(this);r.OOHTML||(r.OOHTML={},i.a.call(this,e,t),o.a.call(this,e,t),c.a.call(this,e,t),l.a.call(this,e,t),u.a.call(this,e,t),r.Observer=n.a,r.Subscript=s)}).call(window)}]);
1
+ (()=>{"use strict";var e={d:(t,i)=>{for(var s in i)e.o(i,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:i[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function i(e){return typeof e}function s(e,...t){globalThis.WebQitInternalsRegistry||(globalThis.WebQitInternalsRegistry=new Map);var i,s,r=globalThis.WebQitInternalsRegistry.get(e);if(!r){if(r=new Map,!1===t[0])return r;globalThis.WebQitInternalsRegistry.set(e,r)}for(;i=t.shift();)if((s=r)&&!(r=r.get(i))){if(r=new Map,!1===t[0])return r;s.set(i,r)}return r}function r(e){return Array.isArray(e)}function n(e){return"function"==typeof e}function a(e){return n(e)||e&&"[object function]"==={}.toString.call(e)}function o(e){return e instanceof Number||"number"==typeof e}function h(e){return o(e)||!0!==e&&!1!==e&&null!==e&&""!==e&&!isNaN(1*e)}function c(e){return!Array.isArray(e)&&"object"==typeof e&&e}function l(e){return e instanceof String||"string"==typeof e&&null!==e}function p(e){return Array.isArray(e)||"object"==typeof e&&e||n(e)}function u(e){return arguments.length&&(void 0===e||void 0===e)}function d(e,t=!0){return r(e)?e:!t&&c(e)?[e]:!1!==e&&0!==e&&function(e){return function(e){return null===e||""===e}(e)||u(e)||!1===e||0===e||p(e)&&!Object.keys(e).length}(e)?[]:function(e){return!l(e)&&!u(e.length)}(e)?Array.prototype.slice.call(e):c(e)?Object.values(e):[e]}function f(e,t,i=null){return i||!1!==i&&e.dotSafe&&t.dotSafe?e.join(".")===t.join("."):e.length===t.length&&e.reduce(((e,i,s)=>e&&i===t[s]),!0)}function m(e,t,i=null){return r(t)?e.filter((e=>i?t.filter((t=>i(e,t))).length:-1!==t.indexOf(e))):[]}function g(e){return(b(e)?e:d(e).length?[e]:[]).reduce(((e,t)=>e.concat([d(t)])),[]).map((e=>y.resolve(e)))}e.r(t),e.d(t,{Compiler:()=>Fe,Runtime:()=>He,default:()=>Ni}),new Map;class y extends Array{static resolve(e){return e.every((e=>!(e+"").includes(".")))?(new y).concat(e):e}get dotSafe(){return!0}}function b(e){return d(e).reduce(((e,t)=>e||r(t)),!1)}function x(e){return e.filter((e=>e||0===e)).length!==e.length}class v{constructor(e){this.target=e,this.fireables=[],this.currentlyFiring=[]}add(e){return this.fireables.push(e),e}remove(e){this.fireables=this.fireables.filter((t=>t!==e))}removeMatches(e){this.match(e).forEach((e=>{this.fireables=this.fireables.filter((t=>t!==e))}))}match(e){return this.fireables.filter((t=>{var i=g(t.filter),s=d((t.params||{}).tags),r=g(e.filter),n=d((e.params||{}).tags);return(!e.originalHandler||t.handler===e.originalHandler)&&(!r.length||f(r,i))&&(!n.length||n.length===s.length&&m(s,n).length===n.length)}))}static _getFirebase(e,t,r=!0,n=this.__namespace){if(!p(t))throw new Error('Subject must be of type object; "'+i(t)+'" given!');var a=this;return n&&globalThis.WebQitObserverNamespaceRegistry.has(e+"-"+n)&&(a=globalThis.WebQitObserverNamespaceRegistry.get(e+"-"+n),e+="-"+n),!s(t,"firebases").has(e)&&r&&s(t,"firebases").set(e,new a(t)),s(t,"firebases").get(e)}static _namespace(e,t,i=null){if(e+="-"+t,2===arguments.length)return globalThis.WebQitObserverNamespaceRegistry.get(e);if(!(i.prototype instanceof this))throw new Error(`The implementation of the namespace ${this.name}.${t} must be a subclass of ${this.name}.`);globalThis.WebQitObserverNamespaceRegistry.set(e,i),i.__namespace=t}}globalThis.WebQitObserverNamespaceRegistry||(globalThis.WebQitObserverNamespaceRegistry=new Map);class w{constructor(e,t){this.target=e,this.handler=t.handler,this.filter=t.filter,this.params=t.params}disconnect(){this.disconnected=!0}}class E extends w{fire(e,t,i){return this.disconnected||this.filter&&!m(d(this.filter),[e.type]).length?t(...Array.prototype.slice.call(arguments,2)):this.handler(e,i,t)}}function S(e,t){var i=void 0;return p(e)&&Object.keys(e).forEach(((s,r)=>{!1!==i&&(i=t(h(s)?parseFloat(s):s,e[s],r))})),i}class k{constructor(e,t){if(this.target=e,!t.type)throw new Error("Action type must be given in definition!");S(t,((e,t)=>{Object.defineProperty(this,e,{value:t,enumerable:!0})})),Object.seal(this)}}class _ extends v{add(e){return super.add(new E(this.target,e))}fire(e,t=null){if(e instanceof k||(e=new k(this.target,e)),this.currentlyFiring.filter((t=>t.type===e.type&&t.name===e.name)).length)return t?t():void 0;this.currentlyFiring.push(e);const i=(s,...r)=>{var n=this.fireables[s];return n?n.fire(e,((...e)=>i(s+1,...e)),...r):t?t(...r):r[0]};var s=i(0);return this.currentlyFiring.pop(),s}static getFirebase(e,t=!0,i=null){return super._getFirebase("interceptor",...arguments)}static namespace(e,t=null){return super._namespace("interceptor",...arguments)}}function C(e){return s(e,!1).get(e)||e}function P(e,t,i={},s={}){if(!t||!p(t))throw new Error("Target must be of type object!");t=C(t);var r,n=function(s){return arguments.length?s:Reflect[e](t,...Object.values(i))};return(r=_.getFirebase(t,!1,s.namespace))?r.fire({type:e,...i},n):n()}function A(e,t,i,s={}){return P("apply",e,{thisArgument:t,argumentsList:i},s)}function I(e,t,i=null,s={}){return P("construct",e,arguments.length>2?{argumentsList:t,newTarget:i}:{argumentsList:t},s)}function O(e,t=1){var i=0;e.forEach((e=>{i++}));var s=e.slice(e.length-i,t);return arguments.length>1?s:s[0]}function T(e,t=1){return arguments.length>1?O(e.slice().reverse(),t).reverse():O(e.slice().reverse())}function N(e,t){return e.reduce(((e,i,s)=>e||t(i,s)),!1)}function L(e,t,i=null){return i||!1!==i&&e.dotSafe&&t.dotSafe?(e.join(".")+".").startsWith(t.join(".")+"."):t.reduce(((t,i,s)=>t&&i===e[s]),!0)}function M(e,t,i=null,s=!1){var r=function(e,t,i=null,s=!1){return t.length>e.length?-1:("number"==typeof i?s?e.slice(0,i+1+(i<0?e.length:0)):e.slice(i):e).reduce(((e,i,r)=>{var[n,a,o]=e;if(!s&&n>-1)return[n,a,o];var h=o+1,c=i===t[h]?0===h?[r,0]:[a,h]:[-1,-1];return c[1]===t.length-1&&(c[1]=-1,c[0]>-1)?[c[0]].concat(c):[n].concat(c)}),[-1,-1,-1])[0]+(s||"number"!=typeof i?0:i>-1?i:e.length-i)}(e,t,i,s);return-1===r?[]:e.slice(r+t.length)}class D{constructor(e,t=!1){this._={},this._.target=e,this._.cancellable=t,this._.propagationStopped=!1,this._.defaultPrevented=!1,this._.promisesInstance=null,this._.promises=[]}get target(){return this._.target}get cancellable(){return this._.cancellable}stopPropagation(){this._.propagationStopped=!0}get propagationStopped(){return this._.propagationStopped}preventDefault(){this._.defaultPrevented=!0}get defaultPrevented(){return this._.defaultPrevented}waitUntil(e){e instanceof Promise&&(this._.promises.push(e),this._.promisesInstance=null)}get promises(){return!this._.promisesInstance&&this._.promises.length&&(this._.promisesInstance=Promise.all(this._.promises)),this._.promisesInstance}respondWith(e){var t,i=c(e)&&!u(e.propagationStopped)&&!u(e.defaultPrevented);!1===e||i&&e.propagationStopped?this.stopPropagation():!1===e||i&&e.defaultPrevented?this.preventDefault():(e instanceof Promise&&(t=e)||i&&(t=e.promises))&&this.waitUntil(t)}}class V extends w{constructor(e,t){if(super(e,t),this.filters2D=g(this.filter),this.filtersIsOriginally2D=b(this.filter),this.filtersIsDynamic=this.filters2D.filter((e=>x(d(e)))).length>0,this.filtersIsDynamic&&this.filters2D.length>1)throw new Error('Only one "Dynamic Filter" must be observed at a time! "'+this.filters2D.map((e=>"["+e.join(", ")+"]")).join(", ")+'" have been bound together.')}fire(e){if(this.disconnected||this.params.type&&!N(e,(e=>this.params.type===e.type)))return;const t=e=>!["set","def"].includes(e.type)||!this.params.diff||(a(this.params.diff)?this.params.diff(e.value,e.oldValue):e.value!==e.oldValue);var i=new D(this.target);if(this.filters2D.length){var s=e.filter((e=>this.filters2D.filter(((i,s)=>{var r=i.slice();return this.filtersIsDynamic&&e.path.forEach(((e,t)=>{r[t]=r[t]||0===r[t]?r[t]:e})),(!this.filtersIsDynamic||!x(r))&&t(e)&&(!this.params.subtree&&f(r,e.path)||this.params.suptree&&L(r,e.path)&&(!h(this.params.suptree)||M(r,e.path).length<=this.params.suptree)||this.params.subtree&&e.path.length>=r.length&&L(e.path,r)&&(!h(this.params.subtree)||M(e.path,r).length<=this.params.subtree))})).length));if(s.length)if(this.filtersIsOriginally2D||this.params.subtree){var r=s;c(this.filter)&&(r={...this.filter},s.forEach(((e,t)=>{r[e.name]=e}))),i.respondWith(this.handler(r,i))}else s.forEach(((e,t)=>{i.respondWith(this.handler(e,i))}))}else(this.params.subtree||e.filter((e=>f(e.path,[e.name]))).length===e.length)&&e.filter((e=>t(e))).length&&i.respondWith(this.handler(e,i));return i}}class j{constructor(e,t){if(this.target=e,t.originalSubject||(this.originalSubject=e),!("type"in t))throw new Error("Mutation type must be given in definition!");if(!("name"in t))throw new Error("Property name must be given in definition!");S(t,((e,t)=>{"path"===e&&(t=y.resolve(t)),Object.defineProperty(this,e,{value:t,enumerable:!0})})),this.path||Object.defineProperty(this,"path",{value:y.resolve([t.name]),enumerable:!0}),Object.seal(this)}}class R extends v{constructor(e){super(e),this.buffers=[]}add(e){return super.add(new V(this.target,e))}fire(e,t){var i=new D(this.target,t);return e=d(e,!1).map((e=>e instanceof j?e:new j(this.target,e))),this.buffers.length?(T(this.buffers)(e),i):(this.currentlyFiring.filter((t=>e.filter((e=>t.type===e.type&&t.name===e.name)).length)).length,this.fireables.forEach((s=>{if(i.propagationStopped&&t)return i;i.respondWith(s.fire(e))})),i)}static getFirebase(e,t=!0,i=null){return super._getFirebase("observer",...arguments)}static namespace(e,t=null){return super._namespace("observer",...arguments)}}function B(e,t,i=null,n={}){if(!(e=i||e)||!p(e))throw new Error("Target must be of type object!");e=C(e);var a=d(t),o=a.map((t=>{var r,o=function(r){return arguments.length?r:s(e,"accessorizedProps").has(t)&&s(e,"accessorizedProps").get(t).touch(!0)?s(e,"accessorizedProps").get(t).get():i?Reflect.get(e,t,i):Reflect.get(e,t)};return(r=_.getFirebase(e,!0,n.namespace))?r.fire({type:"get",name:t,related:a,receiver:i},o):o()}));return r(t)?o:o[0]}function F(e,t,i=!1,s=!1,n=!1){var o=0,l=e.shift();if((h(l)||!0===l||!1===l)&&(o=l,l=e.shift()),!e.length)throw new Error("_merge() requires two or more array/objects.");return e.forEach(((e,u)=>{var d,f,m;(p(e)||a(e))&&(i?(d=e,m=[],function(e,t){t=(t=t||Object.prototype)&&!r(t)?[t]:t;var i=[];for(e=e;e&&(!t||t.indexOf(e)<0)&&"default"!==e.name;)i.push(e),e=e?Object.getPrototypeOf(e):null;return i}(d,f).forEach((e=>{!function(e,...t){t.forEach((t=>{e.indexOf(t)<0&&e.push(t)}))}(m,...Object.getOwnPropertyNames(e))})),m):Object.getOwnPropertyNames(e)).forEach((a=>{if(t(a,l,e,u)){var p=l[a],d=e[a];if((r(p)&&r(d)||c(p)&&c(d))&&(!0===o||o>0))l[a]=r(p)&&r(d)?[]:{},F([h(o)?o-1:o,l[a],p,d],t,i,s,n);else if(r(l)&&r(e))s?l[a]=d:l.push(d);else try{n?Object.defineProperty(l,a,Object.getOwnPropertyDescriptor(e,a)):l[a]=e[a]}catch(e){}}}))})),l}function W(...e){return F(e,((e,t,i)=>!0),!1,!1,!1)}function U(e,t,s=null,r={}){if(!(e=C(e))||!p(e))throw new Error('Observable subjects must be of type object; "'+i(e)+'" given!');if(a(t)&&(r=arguments.length>2?s:{},s=t,t=null),!a(s))throw new Error('Handler must be a function; "'+i(s)+'" given!');var n,o=R.getFirebase(e,!0,r.namespace),h={filter:t,handler:s,params:r};if((h.filter||"*"===h.params.subtree||h.params.subtree&&G(e))&&q(e,h.filter,h.params.subtree,r.namespace),h.params.unique&&(n=o.match({filter:t,params:r})).length){if("replace"!==h.params.unique)return n[0];o.remove(n[0])}return o.add(h)}function $(e,t,i,s=null,r={}){var n;if(e!==i&&(U(i,((i,s)=>{if(n=R.getFirebase(e,!1,r.namespace)){var a=i.map((i=>{var s=i;do{if(s.target===e)return}while(s=s.src);var r={};return S(i,((e,t)=>{"target"!==e&&"name"!==e&&"path"!==e&&"src"!==e&&(r[e]=t)})),r.name=t,r.path=[t].concat(i.path),r.originalSubject=i.originalSubject,r.src=i,new j(e,r)})).filter((e=>e));if(a.length)return n.fire(a,s.cancellable)}}),{subtree:!0,...r,unique:!0,tags:[H,t,e]}),c(s)&&(n=R.getFirebase(e,!1,r.namespace)))){var a=W({name:t,type:"set",value:i,related:[t]},s);let e=n.fire(a,r.cancellable);if(r.eventTypeReturn)return e}}const H={};function q(e,t=null,i=!1,s=null){if(!e||!p(e))throw new Error("Target must be of type object!");var r=R.getFirebase(e,!0,s);if(r&&!r.build){r.build=i;var n=g(t),a=!n.length||n.filter((e=>!e[0]&&0!==e[0])).length?Object.keys(e):n.map((e=>e[0])),o=n.length?n.map((e=>e.slice(1))).filter((e=>e.length)):null;r.subBuild=o&&o.length?o:null,a.forEach((t=>{var n=B(e,t,null,{namespace:s});try{p(n)&&($(e,t,n,null,params),(r.subBuild&&G(n)||(_isFunction(i)?i(n):i&&G(n)))&&q(n,r.subBuild,i,s))}catch(e){}}))}}const G=e=>(e instanceof Object||e instanceof Array||e instanceof Function)&&("undefined"==typeof window||e!==window);function z(e,t,s=null,r={}){if(!(e=C(e))||!p(e))throw new Error('Observable subjects must be of type object; "'+i(e)+'" given!');if(a(t)&&(r=arguments.length>2?s:{},s=t,t=null),s&&!a(s))throw new Error('Handler must be a function; "'+i(s)+'" given!');var n;if(n=R.getFirebase(e,!1,r.namespace))return n.removeMatches({filter:t,originalHandler:s,params:r})}function K(e,t,i,s=null,r={}){var n;if(z(i,null,null,{...r,tags:[H,t,e]}),c(s)&&(n=R.getFirebase(e,!1,r.namespace))){var a=W({name:t,type:"del",oldValue:i,related:[t]},s);n.fire(a,r.cancellable)}}function Q(e,t,i={}){return P("has",e,{name:t},i)}function J(e,t,i,n={}){t=i.receiver||t;var a=i.keysOrPayload,h=i.value;if(!t||!p(t))throw new Error("Target must be of type object!");c(a)&&(n=h||{},h=null),t=C(t);var u=_.getFirebase(t,!1,n.namespace),f=R.getFirebase(t,!1,n.namespace);const m=(r,a,o,h)=>{var c,l="set";e&&(l="defineProperty",a=(c=a||{}).value);var d,m=!1;Q(t,r,n)&&(m=!0,d=B(t,r,i.receiver,n));var g={name:r,type:l,value:a,receiver:i.receiver,related:o,detail:h,isUpdate:m,oldValue:d},y=function(e){return arguments.length&&(c?c=e:a=e),c?!(s(t,"accessorizedProps",!1).has(r)&&!s(t,"accessorizedProps").get(r).restore()||(Object.defineProperty(t,r,c),0)):s(t,"accessorizedProps",!1).has(r)?s(t,"accessorizedProps").get(r).set(a):(t[r]=a,!0)};if(u){var b=c?{type:"defineProperty",name:r,descriptor:c,receiver:i.receiver,related:o,detail:h,isUpdate:m,oldValue:d}:{type:"set",name:r,value:a,receiver:i.receiver,related:o,detail:h,isUpdate:m,oldValue:d};g.success=u.fire(b,y)}else g.success=y();return g.success&&g.value!==g.oldValue&&(p(g.oldValue)&&K(t,r,g.oldValue,null,n),p(g.value)&&($(t,r,g.value,null,n),f&&(f.subBuild||f.build&&G(g.value))&&q(g.value,f.subBuild,f.build,n.namespace))),g};var g,y=[];r(a)||(l(a)||o(a))&&(g=d(a))?y=g.map((e=>m(e,h,g,n.detail))):c(a)&&(g=Object.keys(a))&&(y=g.map((e=>m(e,a[e],g,n.detail))));var b,x=y.filter((e=>!1!==e.success));return f?(b=f.fire(x,n.cancellable)).successCount=x.length:n.eventTypeReturn&&(b=new D(t)),n.eventTypeReturn?b:x.length>0}function X(e,t,i=null,s={}){return J(!0,e,{keysOrPayload:t,value:i},s)}function Y(e,t,i={}){if(!e||!p(e))throw new Error("Target must be of type object!");e=C(e);var r,n,a=d(t),o=a.map((t=>{var r;Q(e,t,i)&&(r=B(e,t,null,i));var n,o={name:t,type:"deleteProperty",related:a,detail:i.detail,oldValue:r},h=function(i){return arguments.length?i:!(s(e,"accessorizedProps",!1).has(t)&&!s(e,"accessorizedProps").get(t).restore()||(delete e[t],0))};return(n=_.getFirebase(e,!1,i.namespace))?o.success=n.fire({type:"deleteProperty",name:t,oldValue:r,related:a},h):o.success=h(),o.success&&p(o.oldValue)&&K(e,t,o.oldValue,null,i),o})),h=o.filter((e=>!1!==e.success));return(r=R.getFirebase(e,!1,i.namespace))?(n=r.fire(h,i.cancellable)).successCount=h.length:i.eventTypeReturn&&(n=new D(e)),i.eventTypeReturn?n:h.length>0}function Z(e,t,i={}){return P("getOwnPropertyDescriptor",e,{name:t},i)}function ee(e,t={}){return P("getPrototypeOf",e,{},t)}function te(e,t={}){return P("isExtensible",e,{},t)}function ie(e,t={}){return P("ownKeys",e,{},t)}function se(e,t={}){return P("preventExtensions",e,{},t)}function re(e,t,i=null,s=null,r={}){return J(!1,e,arguments.length>3?{keysOrPayload:t,value:i,receiver:s}:{keysOrPayload:t,value:i},r)}function ne(e,t,i={}){return P("setPrototypeOf",e,{prototype:t},i)}function ae(e,t=[],i=!0){var s=0;return h(arguments[0])&&p(arguments[1])&&(s=arguments[0],e=arguments[1],t=arguments[2]||[]),F([s,{},e],((e,i,s)=>a(t)?t(e):!r(t)||!t.length||t.indexOf(e)>-1),!1,!1,i)}function oe(e){return e.filter(((e,t,i)=>i.indexOf(e)===t))}const he={apply:A,construct:I,defineProperty:X,deleteProperty:Y,get:B,getOwnPropertyDescriptor:Z,getPrototypeOf:ee,has:Q,isExtensible:te,ownKeys:ie,preventExtensions:se,set:re,setPrototypeOf:ne,accessorize:function(e,t=[],i={}){i=c(t)?t:i;var n=(1===arguments.length?Object.keys(e):d(t)).map((t=>{if(s(e,"accessorizedProps").has(t)&&s(e,"accessorizedProps").get(t).touch(!0))return!1;const r=()=>{for(var i,s=e;!i&&(s=Object.getPrototypeOf(s));)i=Object.getOwnPropertyDescriptor(s,t);return i};var n,a,o=Object.getOwnPropertyDescriptor(e,t);o||(n={writable:!0,enumerable:!(t in e),configurable:!1!==i.configurable});var h={...o||n};"value"in h&&delete h.value,"writable"in h&&delete h.writable,h.get=()=>{if(c.ongoingGets.length)return c.get();c.ongoingGets.push(1);var s=B(e,t,null,i);return c.ongoingGets.pop(),s},h.set=s=>{if(c.ongoingSets.length)return c.set(s);c.ongoingSets.push(1);var r=re(e,t,s,null,i);return c.ongoingSets.pop(),r};var c={ongoingGets:[],ongoingSets:[],get:function(){var t=o;return t||(t=a?n:r()||n),t.get?t.get.call(e):t.value},set:function(t){var i=o;return i||(a?i=n:(i=r())?"value"in i&&(i=n,a=!0):(i=n,a=!0)),i.set||i.get?!!i.set&&i.set.call(e,t):(i.value=t,!0)},restore:function(){try{return this.intact()&&(o||a?Object.defineProperty(e,t,o||n):delete e[t],s(e,"accessorizedProps").delete(t)),!0}catch(e){}return!1},intact:function(){return(Object.getOwnPropertyDescriptor(e,t)||{}).get===h.get},touch:function(e=!1){return this.intact()||!!e&&!this.restore()}};try{return Object.defineProperty(e,t,h),s(e,"accessorizedProps").set(t,c),!0}catch(e){}return!1}));return r(t)?n:n[0]},unaccessorize:function(e,t=[],i={}){i=c(t)?t:i;var n=(1===arguments.length?Object.keys(e):d(t)).map((t=>!s(e,"accessorizedProps",!1).has(t)||s(e,"accessorizedProps").get(t).restore()));return r(t)?n:n[0]},proxy:function(e,t={}){if(!p(e))throw new Error('Object must be of type target; "'+i(e)+'" given!');var r=new Proxy(e,{apply:(e,i,s)=>A(e,i,s,t),construct:(e,i,s=null)=>I(e,i,s,t),defineProperty:(e,i,s)=>X(e,i,s,t),deleteProperty:(e,i)=>Y(e,i,t),get:(e,i,s=null)=>{var o=B(e,i,s,t);return!1!==t.proxyAutoBinding&&a(o)&&!function(e){return n(e)&&/^class\s?/.test(Function.prototype.toString.call(e))}(o)?o.bind(r):o},getOwnPropertyDescriptor:(e,i)=>Z(e,i,t),getPrototypeOf:e=>ee(e,t),has:(e,i)=>Q(e,i,t),isExtensible:e=>te(e,t),ownKeys:e=>ie(e,t),preventExtensions:e=>se(e,t),set:(e,i,s,r=null)=>re(e,i,s,r,t),setPrototypeOf:(e,i)=>ne(e,i,t)});return s(r).set(r,e),r},unproxy:C,observe:U,unobserve:z,intercept:function(e,t,s={}){if(!p(e=C(e)))throw new Error('Object must be of type target; "'+i(handler)+'" given!');var r={},n=!0;c(t)||(a(t)?t={"":t}:a(s)&&(t={[t]:s},s=arguments.length>3?arguments[3]:{}),n=!1);var o=_.getFirebase(e,!0,s.namespace);return Object.keys(t).forEach((e=>{if(!a(t[e]))throw new Error("Callback"+(null===e?"":" for "+e)+' must be a function; "'+i(t[e])+'" given!');var h,c={filter:e,handler:t[e],params:s};if(c.params.unique&&(h=o.match(c)).length){if("replace"!==c.params.unique)return h[0];o.remove(h[0])}n?r[e]=o.add(c):r=o.add(c)})),r},unintercept:function(e,t=null,s={}){if(!(e=C(e))||!p(e))throw new Error('Object must be of type target; "'+i(e)+'" given!');var r=_.getFirebase(e,!1,s.namespace);_isObject(t)||(a(t)?t={[null]:t}:a(s)&&(t={[t]:s},s=arguments.length>3?arguments[3]:{}),isOriginallyObj=!1),(r=_.getFirebase(e,!1,s.namespace))&&Object.keys(t).forEach((e=>{if(!a(t[e]))throw new Error("Callback"+(null===e?"":" for "+e)+' must be a function; "'+i(t[e])+'" given!');var n={filter:e,originalHandler:t[e],params:s};return r.removeMatches(n)}))},closure:function(e,...t){var i=t.map((e=>{if(!p(e=C(e)))throw new Error("Target must be of type object!");return{target:e,subjectCopy:r(e)?e.slice(0):ae(e)}})),s=e(...t);const n=()=>{i.map((e=>{var t,i=Object.keys(e.subjectCopy),s=Object.keys(e.target),r=[],n=oe(i.concat(s)).map((t=>{if(e.subjectCopy[t]!==e.target[t]){r.push(t);var n={name:t,related:r,buffered:!0};return s.includes(t)?(n.type="set",n.value=e.target[t],i.includes(t)&&(n.isUpdate=!0)):n.type="del",i.includes(t)&&(n.oldValue=e.subjectCopy[t]),p(e.subjectCopy[t])&&K(e.target,t,e.subjectCopy[t]),p(e.target[t])&&$(e.target,t,e.target[t]),n}})).filter((e=>e));if(n.length&&(t=R.getFirebase(e.target,!1)))return t.fire(n)}))};return s instanceof Promise?s.then(n):n(),s},build:q,link:$,unlink:K,Observers:R,Interceptors:_},{stringify:ce}=JSON;if(!String.prototype.repeat)throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation");if(!String.prototype.endsWith)throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation");const le={"||":3,"&&":4,"|":5,"??":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},pe=17,ue={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:pe,ClassExpression:pe,FunctionExpression:pe,ObjectExpression:pe,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function de(e,t){const{generator:i}=e;if(e.write("("),null!=t&&t.length>0){i[t[0].type](t[0],e);const{length:s}=t;for(let r=1;r<s;r++){const s=t[r];e.write(", "),i[s.type](s,e)}}e.write(")")}function fe(e,t,i,s){const r=e.expressionsPrecedence[t.type];if(r===pe)return!0;const n=e.expressionsPrecedence[i.type];return r!==n?!s&&15===r&&14===n&&"**"===i.operator||r<n:(13===r||14===r)&&("**"===t.operator&&"**"===i.operator?!s:s?le[t.operator]<=le[i.operator]:le[t.operator]<le[i.operator])}function me(e,t,i,s){const{generator:r}=e;fe(e,t,i,s)?(e.write("("),r[t.type](t,e),e.write(")")):r[t.type](t,e)}function ge(e,t,i,s){const r=t.split("\n"),n=r.length-1;if(e.write(r[0].trim()),n>0){e.write(s);for(let t=1;t<n;t++)e.write(i+r[t].trim()+s);e.write(i+r[n].trim())}}function ye(e,t,i,s){const{length:r}=t;for(let n=0;n<r;n++){const r=t[n];e.write(i),"L"===r.type[0]?e.write("// "+r.value.trim()+"\n",r):(e.write("/*"),ge(e,r.value,i,s),e.write("*/"+s))}}function be(e,t){const{generator:i}=e,{declarations:s}=t;e.write(t.kind+" ");const{length:r}=s;if(r>0){i.VariableDeclarator(s[0],e);for(let t=1;t<r;t++)e.write(", "),i.VariableDeclarator(s[t],e)}}let xe,ve,we,Ee,Se,ke;const _e={Program(e,t){const i=t.indent.repeat(t.indentLevel),{lineEnd:s,writeComments:r}=t;r&&null!=e.comments&&ye(t,e.comments,i,s);const n=e.body,{length:a}=n;for(let e=0;e<a;e++){const a=n[e];r&&null!=a.comments&&ye(t,a.comments,i,s),t.write(i),this[a.type](a,t),t.write(s)}r&&null!=e.trailingComments&&ye(t,e.trailingComments,i,s)},BlockStatement:ke=function(e,t){const i=t.indent.repeat(t.indentLevel++),{lineEnd:s,writeComments:r}=t,n=i+t.indent;t.write("{");const a=e.body;if(null!=a&&a.length>0){t.write(s),r&&null!=e.comments&&ye(t,e.comments,n,s);const{length:o}=a;for(let e=0;e<o;e++){const i=a[e];r&&null!=i.comments&&ye(t,i.comments,n,s),t.write(n),this[i.type](i,t),t.write(s)}t.write(i)}else r&&null!=e.comments&&(t.write(s),ye(t,e.comments,n,s),t.write(i));r&&null!=e.trailingComments&&ye(t,e.trailingComments,n,s),t.write("}"),t.indentLevel--},ClassBody:ke,StaticBlock(e,t){t.write("static "),this.BlockStatement(e,t)},EmptyStatement(e,t){t.write(";")},ExpressionStatement(e,t){const i=t.expressionsPrecedence[e.expression.type];i===pe||3===i&&"O"===e.expression.left.type[0]?(t.write("("),this[e.expression.type](e.expression,t),t.write(")")):this[e.expression.type](e.expression,t),t.write(";")},IfStatement(e,t){t.write("if ("),this[e.test.type](e.test,t),t.write(") "),this[e.consequent.type](e.consequent,t),null!=e.alternate&&(t.write(" else "),this[e.alternate.type](e.alternate,t))},LabeledStatement(e,t){this[e.label.type](e.label,t),t.write(": "),this[e.body.type](e.body,t)},BreakStatement(e,t){t.write("break"),null!=e.label&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},ContinueStatement(e,t){t.write("continue"),null!=e.label&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},WithStatement(e,t){t.write("with ("),this[e.object.type](e.object,t),t.write(") "),this[e.body.type](e.body,t)},SwitchStatement(e,t){const i=t.indent.repeat(t.indentLevel++),{lineEnd:s,writeComments:r}=t;t.indentLevel++;const n=i+t.indent,a=n+t.indent;t.write("switch ("),this[e.discriminant.type](e.discriminant,t),t.write(") {"+s);const{cases:o}=e,{length:h}=o;for(let e=0;e<h;e++){const i=o[e];r&&null!=i.comments&&ye(t,i.comments,n,s),i.test?(t.write(n+"case "),this[i.test.type](i.test,t),t.write(":"+s)):t.write(n+"default:"+s);const{consequent:h}=i,{length:c}=h;for(let e=0;e<c;e++){const i=h[e];r&&null!=i.comments&&ye(t,i.comments,a,s),t.write(a),this[i.type](i,t),t.write(s)}}t.indentLevel-=2,t.write(i+"}")},ReturnStatement(e,t){t.write("return"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t)),t.write(";")},ThrowStatement(e,t){t.write("throw "),this[e.argument.type](e.argument,t),t.write(";")},TryStatement(e,t){if(t.write("try "),this[e.block.type](e.block,t),e.handler){const{handler:i}=e;null==i.param?t.write(" catch "):(t.write(" catch ("),this[i.param.type](i.param,t),t.write(") ")),this[i.body.type](i.body,t)}e.finalizer&&(t.write(" finally "),this[e.finalizer.type](e.finalizer,t))},WhileStatement(e,t){t.write("while ("),this[e.test.type](e.test,t),t.write(") "),this[e.body.type](e.body,t)},DoWhileStatement(e,t){t.write("do "),this[e.body.type](e.body,t),t.write(" while ("),this[e.test.type](e.test,t),t.write(");")},ForStatement(e,t){if(t.write("for ("),null!=e.init){const{init:i}=e;"V"===i.type[0]?be(t,i):this[i.type](i,t)}t.write("; "),e.test&&this[e.test.type](e.test,t),t.write("; "),e.update&&this[e.update.type](e.update,t),t.write(") "),this[e.body.type](e.body,t)},ForInStatement:xe=function(e,t){t.write(`for ${e.await?"await ":""}(`);const{left:i}=e;"V"===i.type[0]?be(t,i):this[i.type](i,t),t.write("I"===e.type[3]?" in ":" of "),this[e.right.type](e.right,t),t.write(") "),this[e.body.type](e.body,t)},ForOfStatement:xe,DebuggerStatement(e,t){t.write("debugger;",e)},FunctionDeclaration:ve=function(e,t){t.write((e.async?"async ":"")+(e.generator?"function* ":"function ")+(e.id?e.id.name:""),e),de(t,e.params),t.write(" "),this[e.body.type](e.body,t)},FunctionExpression:ve,VariableDeclaration(e,t){be(t,e),t.write(";")},VariableDeclarator(e,t){this[e.id.type](e.id,t),null!=e.init&&(t.write(" = "),this[e.init.type](e.init,t))},ClassDeclaration(e,t){if(t.write("class "+(e.id?`${e.id.name} `:""),e),e.superClass){t.write("extends ");const{superClass:i}=e,{type:s}=i,r=t.expressionsPrecedence[s];"C"===s[0]&&"l"===s[1]&&"E"===s[5]||!(r===pe||r<t.expressionsPrecedence.ClassExpression)?this[i.type](i,t):(t.write("("),this[e.superClass.type](i,t),t.write(")")),t.write(" ")}this.ClassBody(e.body,t)},ImportDeclaration(e,t){t.write("import ");const{specifiers:i}=e,{length:s}=i;let r=0;if(s>0){for(;r<s;){r>0&&t.write(", ");const e=i[r],s=e.type[6];if("D"===s)t.write(e.local.name,e),r++;else{if("N"!==s)break;t.write("* as "+e.local.name,e),r++}}if(r<s){for(t.write("{");;){const e=i[r],{name:n}=e.imported;if(t.write(n,e),n!==e.local.name&&t.write(" as "+e.local.name),!(++r<s))break;t.write(", ")}t.write("}")}t.write(" from ")}this.Literal(e.source,t),t.write(";")},ImportExpression(e,t){t.write("import("),this[e.source.type](e.source,t),t.write(")")},ExportDefaultDeclaration(e,t){t.write("export default "),this[e.declaration.type](e.declaration,t),null!=t.expressionsPrecedence[e.declaration.type]&&"F"!==e.declaration.type[0]&&t.write(";")},ExportNamedDeclaration(e,t){if(t.write("export "),e.declaration)this[e.declaration.type](e.declaration,t);else{t.write("{");const{specifiers:i}=e,{length:s}=i;if(s>0)for(let e=0;;){const r=i[e],{name:n}=r.local;if(t.write(n,r),n!==r.exported.name&&t.write(" as "+r.exported.name),!(++e<s))break;t.write(", ")}t.write("}"),e.source&&(t.write(" from "),this.Literal(e.source,t)),t.write(";")}},ExportAllDeclaration(e,t){null!=e.exported?t.write("export * as "+e.exported.name+" from "):t.write("export * from "),this.Literal(e.source,t),t.write(";")},MethodDefinition(e,t){e.static&&t.write("static ");const i=e.kind[0];"g"!==i&&"s"!==i||t.write(e.kind+" "),e.value.async&&t.write("async "),e.value.generator&&t.write("*"),e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),de(t,e.value.params),t.write(" "),this[e.value.body.type](e.value.body,t)},ClassExpression(e,t){this.ClassDeclaration(e,t)},ArrowFunctionExpression(e,t){t.write(e.async?"async ":"",e);const{params:i}=e;null!=i&&(1===i.length&&"I"===i[0].type[0]?t.write(i[0].name,i[0]):de(t,e.params)),t.write(" => "),"O"===e.body.type[0]?(t.write("("),this.ObjectExpression(e.body,t),t.write(")")):this[e.body.type](e.body,t)},ThisExpression(e,t){t.write("this",e)},Super(e,t){t.write("super",e)},RestElement:we=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:we,YieldExpression(e,t){t.write(e.delegate?"yield*":"yield"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t))},AwaitExpression(e,t){t.write("await ",e),me(t,e.argument,e)},TemplateLiteral(e,t){const{quasis:i,expressions:s}=e;t.write("`");const{length:r}=s;for(let e=0;e<r;e++){const r=s[e],n=i[e];t.write(n.value.raw,n),t.write("${"),this[r.type](r,t),t.write("}")}const n=i[i.length-1];t.write(n.value.raw,n),t.write("`")},TemplateElement(e,t){t.write(e.value.raw,e)},TaggedTemplateExpression(e,t){me(t,e.tag,e),this[e.quasi.type](e.quasi,t)},ArrayExpression:Se=function(e,t){if(t.write("["),e.elements.length>0){const{elements:i}=e,{length:s}=i;for(let e=0;;){const r=i[e];if(null!=r&&this[r.type](r,t),!(++e<s)){null==r&&t.write(", ");break}t.write(", ")}}t.write("]")},ArrayPattern:Se,ObjectExpression(e,t){const i=t.indent.repeat(t.indentLevel++),{lineEnd:s,writeComments:r}=t,n=i+t.indent;if(t.write("{"),e.properties.length>0){t.write(s),r&&null!=e.comments&&ye(t,e.comments,n,s);const a=","+s,{properties:o}=e,{length:h}=o;for(let e=0;;){const i=o[e];if(r&&null!=i.comments&&ye(t,i.comments,n,s),t.write(n),this[i.type](i,t),!(++e<h))break;t.write(a)}t.write(s),r&&null!=e.trailingComments&&ye(t,e.trailingComments,n,s),t.write(i+"}")}else r?null!=e.comments?(t.write(s),ye(t,e.comments,n,s),null!=e.trailingComments&&ye(t,e.trailingComments,n,s),t.write(i+"}")):null!=e.trailingComments?(t.write(s),ye(t,e.trailingComments,n,s),t.write(i+"}")):t.write("}"):t.write("}");t.indentLevel--},Property(e,t){e.method||"i"!==e.kind[0]?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),t.write(": ")),this[e.value.type](e.value,t))},PropertyDefinition(e,t){e.static&&t.write("static "),this[e.key.type](e.key,t),t.write(" = "),this[e.value.type](e.value,t)},ObjectPattern(e,t){if(t.write("{"),e.properties.length>0){const{properties:i}=e,{length:s}=i;for(let e=0;this[i[e].type](i[e],t),++e<s;)t.write(", ")}t.write("}")},SequenceExpression(e,t){de(t,e.expressions)},UnaryExpression(e,t){if(e.prefix){const{operator:i,argument:s,argument:{type:r}}=e;t.write(i);const n=fe(t,s,e);n||!(i.length>1)&&("U"!==r[0]||"n"!==r[1]&&"p"!==r[1]||!s.prefix||s.operator[0]!==i||"+"!==i&&"-"!==i)||t.write(" "),n?(t.write(i.length>1?" (":"("),this[r](s,t),t.write(")")):this[r](s,t)}else this[e.argument.type](e.argument,t),t.write(e.operator)},UpdateExpression(e,t){e.prefix?(t.write(e.operator),this[e.argument.type](e.argument,t)):(this[e.argument.type](e.argument,t),t.write(e.operator))},AssignmentExpression(e,t){this[e.left.type](e.left,t),t.write(" "+e.operator+" "),this[e.right.type](e.right,t)},AssignmentPattern(e,t){this[e.left.type](e.left,t),t.write(" = "),this[e.right.type](e.right,t)},BinaryExpression:Ee=function(e,t){const i="in"===e.operator;i&&t.write("("),me(t,e.left,e,!1),t.write(" "+e.operator+" "),me(t,e.right,e,!0),i&&t.write(")")},LogicalExpression:Ee,ConditionalExpression(e,t){const{test:i}=e,s=t.expressionsPrecedence[i.type];s===pe||s<=t.expressionsPrecedence.ConditionalExpression?(t.write("("),this[i.type](i,t),t.write(")")):this[i.type](i,t),t.write(" ? "),this[e.consequent.type](e.consequent,t),t.write(" : "),this[e.alternate.type](e.alternate,t)},NewExpression(e,t){t.write("new ");const i=t.expressionsPrecedence[e.callee.type];i===pe||i<t.expressionsPrecedence.CallExpression||function(e){let t=e;for(;null!=t;){const{type:e}=t;if("C"===e[0]&&"a"===e[1])return!0;if("M"!==e[0]||"e"!==e[1]||"m"!==e[2])return!1;t=t.object}}(e.callee)?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),de(t,e.arguments)},CallExpression(e,t){const i=t.expressionsPrecedence[e.callee.type];i===pe||i<t.expressionsPrecedence.CallExpression?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),e.optional&&t.write("?."),de(t,e.arguments)},ChainExpression(e,t){this[e.expression.type](e.expression,t)},MemberExpression(e,t){const i=t.expressionsPrecedence[e.object.type];i===pe||i<t.expressionsPrecedence.MemberExpression?(t.write("("),this[e.object.type](e.object,t),t.write(")")):this[e.object.type](e.object,t),e.computed?(e.optional&&t.write("?."),t.write("["),this[e.property.type](e.property,t),t.write("]")):(e.optional?t.write("?."):t.write("."),this[e.property.type](e.property,t))},MetaProperty(e,t){t.write(e.meta.name+"."+e.property.name,e)},Identifier(e,t){t.write(e.name,e)},PrivateIdentifier(e,t){t.write(`#${e.name}`,e)},Literal(e,t){null!=e.raw?t.write(e.raw,e):null!=e.regex?this.RegExpLiteral(e,t):null!=e.bigint?t.write(e.bigint+"n",e):t.write(ce(e.value),e)},RegExpLiteral(e,t){const{regex:i}=e;t.write(`/${i.pattern}/${i.flags}`,e)}},Ce={};class Pe{constructor(e){const t=null==e?Ce:e;this.output="",null!=t.output?(this.output=t.output,this.write=this.writeToStream):this.output="",this.generator=null!=t.generator?t.generator:_e,this.expressionsPrecedence=null!=t.expressionsPrecedence?t.expressionsPrecedence:ue,this.indent=null!=t.indent?t.indent:" ",this.lineEnd=null!=t.lineEnd?t.lineEnd:"\n",this.indentLevel=null!=t.startingIndentLevel?t.startingIndentLevel:0,this.writeComments=!!t.comments&&t.comments,null!=t.sourceMap&&(this.write=null==t.output?this.writeAndMap:this.writeToStreamAndMap,this.sourceMap=t.sourceMap,this.line=1,this.column=0,this.lineEndSize=this.lineEnd.split("\n").length-1,this.mapping={original:null,generated:this,name:void 0,source:t.sourceMap.file||t.sourceMap._file})}write(e){this.output+=e}writeToStream(e){this.output.write(e)}writeAndMap(e,t){this.output+=e,this.map(e,t)}writeToStreamAndMap(e,t){this.output.write(e),this.map(e,t)}map(e,t){if(null!=t){const{type:i}=t;if("L"===i[0]&&"n"===i[2])return this.column=0,void this.line++;if(null!=t.loc){const{mapping:e}=this;e.original=t.loc.start,e.name=t.name,this.sourceMap.addMapping(e)}if("T"===i[0]&&"E"===i[8]||"L"===i[0]&&"i"===i[1]&&"string"==typeof t.value){const{length:t}=e;let{column:i,line:s}=this;for(let r=0;r<t;r++)"\n"===e[r]?(i=0,s++):i++;return this.column=i,void(this.line=s)}}const{length:i}=e,{lineEnd:s}=this;i>0&&(this.lineEndSize>0&&(1===s.length?e[i-1]===s:e.endsWith(s))?(this.line+=this.lineEndSize,this.column=0):this.column+=i)}toString(){return this.output}}const Ae={tryStmt:(e,t,i,s)=>({type:"TryStatement",block:e,handler:t,finalizer:i,guardedHandlers:s}),catchClause:(e,t)=>({type:"CatchClause",param:e,body:t}),throwStmt:e=>({type:"ThrowStatement",argument:e}),returnStmt:e=>({type:"ReturnStatement",argument:e}),exprStmt:e=>({type:"ExpressionStatement",expression:e}),blockStmt:e=>({type:"BlockStatement",body:e}),labeledStmt:(e,t)=>({type:"LabeledStatement",label:e,body:t}),withStmt:(e,t)=>({type:"WithStatement",object:e,body:t}),ifStmt(e,t,i){return this.condExpr(e,t,i,"IfStatement")},switchStmt:(e,t,i=!1)=>({type:"SwitchStatement",discriminant:e,cases:t,lexical:i}),switchCase:(e,t)=>({type:"SwitchCase",test:e,consequent:t}),whileStmt:(e,t)=>({type:"WhileStatement",test:e,body:t}),doWhileStmt:(e,t)=>({type:"DoWhileStatement",test:e,body:t}),forStmt:(e,t,i,s)=>({type:"ForStatement",init:e,test:t,update:i,body:s}),forInStmt:(e,t,i)=>({type:"ForInStatement",left:e,right:t,body:i}),forOfStmt:(e,t,i)=>({type:"ForOfStatement",left:e,right:t,body:i}),breakStmt:(e=null)=>({type:"BreakStatement",label:e}),continueStmt:(e=null)=>({type:"ContinueStatement",label:e}),varDeclaration:(e,t)=>({type:"VariableDeclaration",kind:e,declarations:t}),varDeclarator:(e,t=null)=>({type:"VariableDeclarator",id:e,init:t}),funcDeclaration(e,t,i=!1,s=null,r=!1,n=!1){return this.func("FunctionDeclaration",...arguments)},sequenceExpr:e=>({type:"SequenceExpression",expressions:e}),parensExpr:e=>({type:"ParenthesizedExpression",expression:e}),logicalExpr:(e,t,i)=>({type:"LogicalExpression",operator:e,left:t,right:i}),binaryExpr:(e,t,i)=>({type:"BinaryExpression",operator:e,left:t,right:i}),unaryExpr:(e,t,i=!0)=>({type:"UnaryExpression",operator:e,argument:t,prefix:i}),updateExpr:(e,t,i=!1)=>({type:"UpdateExpression",operator:e,argument:t,prefix:i}),assignmentExpr:(e,t,i="=")=>({type:"AssignmentExpression",operator:i,left:e,right:t}),assignmentPattern:(e,t)=>({type:"AssignmentPattern",left:e,right:t}),thisExpr:()=>({type:"ThisExpression"}),condExpr:(e,t,i,s="ConditionalExpression")=>({type:s,test:e,consequent:t,alternate:i}),arrayExpr:e=>({type:"ArrayExpression",elements:e}),arrayPattern:e=>({type:"ArrayPattern",elements:e}),objectExpr:e=>({type:"ObjectExpression",properties:e}),objectPattern:e=>({type:"ObjectPattern",properties:e}),chainExpr:e=>({type:"ChainExpression",expression:e}),callExpr:(e,t,i=!1)=>({type:"CallExpression",callee:e,arguments:t,optional:i}),newExpr:(e,t)=>({type:"NewExpression",callee:e,arguments:t}),awaitExpr:e=>({type:"AwaitExpression",argument:e}),taggedTemplateExpr:(e,t)=>({type:"TaggedTemplateExpression",tag:e,quasi:t}),memberExpr:(e,t,i=!1,s=!1)=>({type:"MemberExpression",object:e,property:t,computed:i,optional:s}),funcExpr(e,t,i=!1,s=null,r=!1,n=!1){return this.func("FunctionExpression",...arguments)},arrowFuncExpr:(e,t,i=!1,s=null,r=!1,n=!1)=>({type:"ArrowFunctionExpression",params:e,body:t,async:i,id:s,expression:r,generator:n}),func:(e,t,i,s=!1,r=null,n=!1,a=!1)=>({type:e,params:t,body:i,async:s,id:r,expression:n,generator:a}),identifier:e=>({type:"Identifier",name:e}),property:(e,t,i="init",s=!1,r=!1,n=!1)=>({type:"Property",key:e,value:t,kind:i,shorthand:s,computed:r,method:n}),spreadElem:e=>({type:"SpreadElement",argument:e}),literal:e=>({type:"Literal",value:e}),templateLiteral:(e,t)=>({type:"TemplateLiteral",quasis:e,expressions:t}),invert(e){return this.unaryExpr("!",e)},clone:e=>(delete(e={...e}).start,delete e.end,e)};class Ie{constructor(e,t){this.id=e,Object.assign(this,t),this.dependencies=0}with(e,t){let i={};Object.keys(e).forEach((t=>{i[t]=this[t],this[t]=e[t]}));let s=t();return Object.keys(e).forEach((e=>{this[e]=i[e]})),s}inUse(e){return arguments.length?(e?this.dependencies++:this.dependencies--,this):this.dependencies>0}}class Oe extends Ie{constructor(e,t,i={}){super(t,i),this.ownerEffect=e,this.effects=[],this.effectsStack=[]}get parentScope(){return this.ownerEffect&&this.ownerEffect.ownerScope}get $params(){return this.params||this.ownerEffect&&this.ownerEffect.$params}get url(){let e=this.ownerEffect&&this.ownerEffect.url;return`${e?e+"/":""}${this.id}`}createEffect(e,t){let i=new Be(this,this.ownerEffect.nextId,e);this.effects.unshift(i),this.effectsStack.unshift(i);let s=t(i);return this.effectsStack.shift(),s}get currentEffect(){return this.effectsStack[0]||(this.parentScope||{}).currentEffect}createBlock(e){let t={type:"BlockStatement"};return this.createEffect(t,(i=>i.createScope(t,e)))}static(e){return arguments.length?(this._static=e,this):this._static||this.parentScope&&this.parentScope.static()}doSubscribe(e,t=null){let i=this.effects.some((i=>i.affecteds.some((i=>i.doSubscribe(e,t)))));if(this.parentScope)i=i||this.parentScope.doSubscribe(e,t);else if(!i&&this.ownerEffect)return this.ownerEffect.affectedsProduction({},(i=>(e.refs.forEach((e=>{this.canObserveGlobal(e)&&i.addRef().push(...e.path)})),e.inUse(!0),e.ownerEffect.inUse(!0),i.doSubscribe(e,t))),!1);return i}doUpdate(e,t=null){let i=this.effects.some((i=>i.affecteds.some((i=>{let s=i.doUpdate(e,t);return s&&"VariableDeclaration"===i.type&&Array.isArray(t)&&t.push("lexical-update"),s}))));if(this.parentScope)i=i||this.parentScope.doUpdate(e,t);else if(!i&&this.ownerEffect)return this.ownerEffect.affecteds.push(e),Array.isArray(t)&&t.push("globalization"),!0;return i}canObserveGlobal(e){return(!this.$params.globalsOnlyPaths||e.path.length>1)&&!(this.$params.globalsNoObserve||[]).includes(e.path[0].name)}}class Te extends Ie{constructor(e,t,i){super(t,i),this.ownerEffect=e}compose(){if(!this.expr)return[this.expr,this];let e=Ae.identifier(this.ownerEffect.getSubscriptIdentifier("$construct",!0)),t=Ae.memberExpr(Ae.memberExpr(e,Ae.identifier("memo")),Ae.literal(this.id),!0);return this.composed=Ae.assignmentExpr(t,this.expr),[this.composed,this]}dispose(){this.composed&&(Object.keys(this.composed).forEach((e=>{delete this.composed[e]})),Object.keys(this.expr).forEach((e=>{this.composed[e]=this.expr[e]})),this.composed=null)}toJson(e=!1){return{id:this.id}}}class Ne extends Ie{constructor(e,t,i,s){super(i,s),this.ownerEffect=e,this.parent=t}inUse(e){let t=super.inUse(...arguments),i=[];return this.switch?i.push(this.switch,...this.cases):(this.when||this.whenNot)&&i.push(this.when||this.whenNot),i.forEach((e=>e.inUse(...arguments))),t}toJson(e=!1){let t={id:this.id};return this.switch?(t.switch=this.switch.id,t.cases=this.cases.map((e=>e.id))):this.whenNot?t.whenNot=this.whenNot.id:this.when&&(t.when=this.when.id),this.parent&&(this.parent.ownerEffect.id===this.ownerEffect.id?t.parent=this.parent.id:t.parent=`${this.parent.ownerEffect.lineage}:${this.parent.id}`),t}}class Le extends Ie{constructor(e,t,i={}){super(t,i),this.ownerEffect=e,this.refs=new Set,this.params={},this.propertyStack=[]}withProperty(e,t){this.propertyStack.unshift(e);let i=this.contextProduction?this.contextProduction.withProperty(e,t):t();return this.propertyStack.shift(),i}toJson(e=!1){return{id:this.id,refs:Array.from(this.refs).map((t=>t.toJson(e))),effectId:this.ownerEffect.id}}}class Me extends Ie{constructor(e,t,i){super(t,i),this.ownerProduction=e,this.test=this.ownerEffect.currentCondition,this.path=[],this.isDotSafe=!0}get ownerEffect(){return this.ownerProduction.ownerEffect}push(...e){return this.doIsDotSafe(e),this.path.push(...e),this}unshift(...e){return this.doIsDotSafe(e),this.path.unshift(...e),this}doIsDotSafe(e){e.some((e=>e instanceof Te||e.name.includes(".")))&&(this.isDotSafe=!1)}match(e){let t=this.path,i=Array.isArray(e)?e:e.path,s=t.length-i.length;return s>0&&([t,i]=[i,t]),[t.reduce(((e,t,s)=>{return e&&(r=t,n=i[s],!(!r||!n)&&(r instanceof Te&&n instanceof Te?r.id===n.id:r.name===n.name));var r,n}),!0),s]}toJson(e=!1){return{id:this.id,path:this.path.map((e=>e instanceof Te?{memoId:e.id}:e)),$path:this.isDotSafe?this.path.map((e=>e.name)).join("."):void 0,conditionId:(this.test||{}).id,productionId:this.ownerProduction.id}}}class De extends Me{}class Ve extends Le{addRef(e){let t=new De(this,this.refs.size,{...e,test:this.test});return t.push(...this.propertyStack),this.refs.add(t),t}setAssignee(e){this.assignee=e}toJson(e=!1){let t=super.toJson(e);return this.assignee&&(t.assignee=this.assignee.id),t}}class je extends Me{constructor(e,t,i){super(e,t,i),this.subscriptions=new Map,this.updates=new Map}subscribe(e,t){let i=this.subscriptions.get(e);i||(i=new Set,this.subscriptions.set(e,i)),i.add(t),this.updates.forEach((i=>{i.forEach((i=>{i.subscribe(e,t)}))}))}update(e,t){let i=this.updates.get(e);i||(i=new Set,this.updates.set(e,i)),i.add(t)}toJson(e=!1){let{id:t,conditionId:i,productionId:s,...r}=super.toJson(e),n=Array.from(this.subscriptions.keys()).reduce(((e,t)=>({...e,[`${t.ownerEffect.lineage}:${t.id}`]:Array.from(this.subscriptions.get(t)).map((e=>e.id))})),{});return{id:t,type:this.type,kind:this.kind,...r,depth:this.depth.map((e=>e instanceof Te?{memoId:e.id}:e)),conditionId:i,productionId:s,subscriptions:n}}}class Re extends Le{constructor(e,t,i){super(e,t,i),this.destructuringStack=[]}withDestructure(e,t){this.destructuringStack.push(e);let i=t();return this.destructuringStack.pop(),i}addRef(e={}){let t=new je(this,this.refs.size,{...e,test:this.test,depth:this.destructuringStack.slice(0)});return t.push(...this.propertyStack),this.refs.add(t),t}doSubscribe(e,t=null){let i=[];return this.refs.forEach(((t,s)=>{e.refs.forEach((r=>{let[n,a]=t.match(r);if(n&&a<=0){if("const"===this.kind)return void i.push("const");t.subscribe(e,r),i.push(`${this.id}:${s}`),this.inUse(!0),t.test&&t.test.inUse(!0)}}))})),Array.isArray(t)&&t.push(...i),i.length>0}doUpdate(e,t=null){if(e===this)return!1;let i=[];return this.refs.forEach(((t,s)=>{e.refs.forEach((r=>{let[n,a]=t.match(r);if(n&&a>=0){if("const"===this.kind)throw new Error("Assignment to a constant declaration.");t.update(e,r),i.push(`${this.id}:${s}`)}}))})),Array.isArray(t)&&t.push(...i),i.length>0}inUse(e){let t=super.inUse(...arguments);return this.ownerEffect.inUse(...arguments),t}}class Be extends Ie{constructor(e,t,i){if(super(t,i),this.ownerScope=e,this.scopes=[],this.scopesStack=[],this.conditions=[],this.conditionsStack=[],this.parentEffect&&this.parentEffect.currentCondition){let e=new Ne(this,this.parentEffect.currentCondition,this.nextId,{});this.conditions.unshift(e),this.conditionsStack.unshift(e)}this.causes=[],this.affecteds=[],this.productionsStack=[],this.memos=[],this.subscriptIdentifiers={},this._hoistedExitStatements=new Map}get parentEffect(){return this.ownerScope&&this.ownerScope.ownerEffect}get $params(){return this.params||this.ownerScope&&this.ownerScope.$params}get nextId(){return this.parentEffect?this.parentEffect.nextId:(void 0===this._nextId&&(this._nextId=0),this._nextId++)}get lineage(){if(this.isIntermediateInstance)return this.parentEffect.lineage;let e=this.parentEffect&&this.parentEffect.lineage;return`${e?e+"/":""}${this.id}`}inContext(e,t=-1){let i=t+1;return"function"==typeof e?e(this,i)||this.parentEffect&&this.parentEffect.inContext(e,i):this.type===e?i:this.parentEffect&&this.parentEffect.inContext(e,i)||-1}createScope(e,t){let i=new Oe(this,this.scopes.length,e);this.scopes.unshift(i),this.scopesStack.unshift(i);let s=t(i);return this.scopesStack.shift(),s}get currentScope(){return this.scopesStack[0]}createCondition(e,t){let i=new Ne(this,this.currentCondition,this.nextId,e);this.conditions.unshift(i),this.conditionsStack.unshift(i);let s=t();return this.conditionsStack.shift(),s}get currentCondition(){return this.conditionsStack[0]}hoistAwaitKeyword(){this._hoistedAwaitKeyword=!0,this.ownerScope&&"Function"===this.ownerScope.type||this.parentEffect&&this.parentEffect.hoistAwaitKeyword()}get hoistedAwaitKeyword(){return this._hoistedAwaitKeyword}hoistExitStatement(e,t){if(["break","continue"].includes(e.value)){let i=this.getLabelInfo();if("Iteration"===i.type?"BlockStatement"!==i.target&&(t.value===i.label||!t.value):t.value&&t.value===i.label)return this._hoistedExitStatements.set(e,{...i,arg:t}),i}if(this._hoistedExitStatements.set(e,t),this.parentEffect)return this.parentEffect.hoistExitStatement(e,t)}get hoistedExitStatements(){return this._hoistedExitStatements}getLabelInfo(){let e,t,i=this.type;return(this.ownerScope||{}).label?({label:{name:e},type:t}=this.ownerScope):"Iteration"===i&&this.parentEffect.ownerScope.label&&({label:{name:e},type:t}=this.parentEffect.ownerScope),{type:i,label:e,target:t}}createMemo(e){let t=new Te(this,this.memos.length,e);return this.memos.unshift(t),t}defineSubscriptIdentifier(e,t,i=[]){this.subscriptIdentifiers[e]={whitelist:t,blacklist:i,toString(){return this.whitelist[0]}}}getSubscriptIdentifier(e,t=!1){return this.subscriptIdentifiers[e]||t&&this.parentEffect&&this.parentEffect.getSubscriptIdentifier(e,t)}subscriptIdentifiersNoConflict(e){if("Identifier"!==e.type)throw new Error(`An implied Identifier is of type ${e.type}`);for(let t in this.subscriptIdentifiers){let i=this.subscriptIdentifiers[t],s=i.whitelist.indexOf(e.name);-1!==s&&(i.blacklist.push(i.whitelist.splice(s,1)),i.whitelist.length||(i.whitelist=i.blacklist.map((e=>{let t;do{t=`${e}${String.fromCharCode(0|26*Math.random()+97)}`}while(i.blacklist.includes(t));return t}))))}this.parentEffect&&this.parentEffect.subscriptIdentifiersNoConflict(e)}causesProduction(e,t,i=!0){let s=new Ve(this,this.causes.length,e);return this.causes.unshift(s),e.static&&(i=!1),this._runProduction(s,t,i)}affectedsProduction(e,t,i=!0){let s=new Re(this,this.affecteds.length,e);return this.affecteds.unshift(s),e.static&&(i=!1),this._runProduction(s,t,i)}chainableCausesProduction(e,t){return this.currentProduction.refs.size&&!this.currentProduction.propertyStack.length?this.causesProduction(e,t):t()}embeddableCausesProduction(e,t){return this.causesProduction(e,((e,i)=>(e.contextProduction=i,t(e,i))))}embeddableAffectedsProduction(e,t){return this.affectedsProduction(e,((e,i)=>(e.contextProduction=i,t(e,i))))}get currentProduction(){return this.productionsStack[0]}_runProduction(e,t,i){let s=this.currentProduction;this.productionsStack.unshift(e);let r=t(e,s);if(this.productionsStack.shift()!==e)throw new Error("Production stack corrupted.");return i&&this.ownerScope?(e instanceof Re?e.refs.size?"VariableDeclaration"===e.type&&"var"!==e.kind||this.ownerScope.doUpdate(e):this.affecteds=this.affecteds.filter((t=>t!==e)):e.refs.size&&this.ownerScope.doSubscribe(e)||(this.causes=this.causes.filter((t=>t!==e))),r):r}compose(e,t=null){return this._createNode(e,{disposeCallback:t,block:!0})}composeWith(e,t=[],i=null){return this._createNode(e,{block:!0,$args:t,disposeCallback:i})}_createNode(e,t){if(!e)return e;let i;this.originalExpr=e,this.nodeParams=t,i=Array.isArray(e)?Ae.blockStmt(e):Ae.blockStmt([e]);let s=Ae.identifier(this.getSubscriptIdentifier("$construct",!0)),r=Ae.arrowFuncExpr([s],i,this.hoistedAwaitKeyword),n=[Ae.literal(this.id),...t.$args||[],r],a=Ae.callExpr(s,n);this.hoistedAwaitKeyword&&(a=Ae.awaitExpr(a)),a=Ae.exprStmt(a),a.comments=[{type:"Line",value:`${this.lineage}`}];let o=[a];if(this.hookExpr=o,(this.getLabelInfo()||{}).name,!(this.ownerScope||{}).singleStatementScope){let e,t,i=[],r=(e,i)=>{let s=Ae.ifStmt(e,i);t?t.alternate=s:(t=s,o.push(s))};if(this.hoistedExitStatements.forEach(((t,n)=>{if(["break","continue"].includes(n.value)&&!i.includes(n.value)&&t.arg){let e=t.arg,a=Ae.callExpr(Ae.memberExpr(s,Ae.identifier("exiting")),[n,e]),o=Ae.exprStmt(Ae.identifier("Iteration"!==t.type&&e.value?n.value+" "+e.value:n.value));r(a,o),i.push(n.value)}else e=!0})),e){let e=Ae.callExpr(Ae.memberExpr(s,Ae.identifier("exiting"))),t=Ae.exprStmt(Ae.identifier("return"));r(e,t)}}return o}dispose(){if(this.hookExpr){if(this.nodeParams&&this.nodeParams.disposeCallback)return this.nodeParams.disposeCallback();Object.keys(this.hookExpr).forEach((e=>{delete this.hookExpr[e]})),Object.keys(this.originalExpr).forEach((e=>{this.hookExpr[e]=this.originalExpr[e]})),this.hookExpr=null}}toJson(e=!1){return{id:this.id,type:this.type,causes:this.causes.reduce(((t,i)=>(t[i.id]=i.toJson(e),t)),{}),affecteds:this.affecteds.reduce(((t,i)=>(e&&!i.inUse()||(t[i.id]=i.toJson(e)),t)),{}),conditions:this.conditions.reduce(((t,i)=>(e&&!i.inUse()||(t[i.id]=i.toJson(e)),t)),{}),hoistedAwaitKeyword:this.hoistedAwaitKeyword,lineage:this.lineage,childEffects:this.scopes.reduce(((t,i)=>i.effects.reduce(((t,i)=>{if(e&&!i.inUse())return t;let s=i.toJson(e);return i.isIntermediateInstance?t={...t,...s.childEffects}:t[i.id]=s,t}),t)),{}),loc:this.loc}}get isIntermediateInstance(){return"BlockStatement"===this.type||"FunctionDeclaration"===this.type||"LabeledStatement"===this.type&&this.scopes.length}}class Fe{constructor(e={}){this.params=e,this.locations=[],this._locStart=this.params.locStart||0}setLocation(e,t){if(!1===this.params.locations||!t)return;let i=[t.start+this._locStart,t.end+this._locStart];"detached"===this.params.locations?(this.locations.push(i),e.loc=this.locations.length-1):e.loc=i}generate(e){let t=new Be(null,"Program",{type:"Program",params:this.params});t.defineSubscriptIdentifier("$construct",["$x"]);let[i]=this._transform([e],t);return{source:this.serialize(i),graph:t.toJson(!1),identifier:t.getSubscriptIdentifier("$construct"),locations:this.locations,ast:i}}serialize(e,t={}){return function(e,t){const i=new Pe(t);return i.generator[e.type](e,i),i.output}(e,{comments:!0,...t})}_transform(e,t,i){return e.reduce(((e,s)=>{const r=(e,s=t,r=i)=>this._transform(e,s,r),n=(...t)=>e.concat(t),a=(e,i=t)=>Object.keys(e).reduce(((t,s)=>{let r=e[s];return r&&"Identifier"===r.type?i.subscriptIdentifiersNoConflict(r):Array.isArray(r)?r=r.map((e=>a(e))):"object"==typeof r&&r&&(r=a(r)),{...t,[s]:r}}),{});if(!s)return n(s);if("Program"===s.type){let e={type:"Program"};return t.createScope(e,(e=>{let t=r(s.body,null,e);return n({...s,body:t})}))}if("ArrowFunctionExpression"===s.type||"FunctionExpression"===s.type||"FunctionDeclaration"===s.type)return Ae["ArrowFunctionExpression"===s.type?"arrowFuncExpr":"FunctionExpression"===s.type?"funcExpr":"funcDeclaration"].bind(Ae),s="FunctionDeclaration"===s.type?a(s,i.ownerEffect):a(s,t),n(s);if("VariableDeclaration"===s.type){let e={type:s.type,kind:s.kind},a=[],o=t&&["ForStatement","ForInStatement","ForOfStatement"].includes(t.type),h=(t,i)=>{let n,h,[c]=t.causesProduction(e,(e=>(n=e,r([i.init],t)))),[l]=t.affectedsProduction(e,(e=>(h=e,r([i.id],t))));if(n.setAssignee(h),this.setLocation(t,i),!o&&"const"!==s.kind&&i.init&&n.refs.size){let e=["ObjectPattern","ArrayPattern"].includes(i.id.type);i=Array.from(h.refs).map((e=>Ae.varDeclarator(Ae.identifier(e.path[0].name),null)));let s=Ae.assignmentExpr(l,c);e&&(s=Ae.sequenceExpr([s])),a.push(...t.compose(Ae.exprStmt(s)))}else i=Ae.varDeclarator(l,c);return i},c=s.declarations.reduce(((s,r)=>o?s.concat(h(t,r)):s.concat(i.createEffect(e,(e=>h(e,r))))),[]);return n(Ae.varDeclaration(s.kind,c),...a)}if("IfStatement"===s.type){let e={type:s.type};return i.createEffect(e,(t=>{let{consequent:i,alternate:a}=s,[o]=t.causesProduction(e,(()=>r([s.test],t))),[h,c]=t.createMemo({expr:o}).compose();return i=t.createCondition({when:c},(()=>r([s.consequent],t))),i="BlockStatement"!==i[0].type&&i.length>1?Ae.blockStmt(i):i[0],s.alternate&&(a=t.createCondition({whenNot:c},(()=>r([s.alternate],t))),a=a[0]&&"BlockStatement"!==a[0].type&&a.length>1?Ae.blockStmt(a):a[0]),this.setLocation(t,s),this.setLocation(c,s.test),n(...t.compose(Ae.ifStmt(h,i,a)))}))}if("SwitchStatement"===s.type){let e={type:s.type};return i.createEffect(e,(t=>{let[i]=t.causesProduction(e,(()=>r([s.discriminant],t))),[a,o]=t.createMemo({expr:i}).compose(),h=t.createScope(e,(e=>s.cases.reduce(((e,i)=>{let s=e.slice(-1)[0],n=i.consequent.some((e=>"BreakStatement"===e.type)),[a]=t.causesProduction({type:i.type},(()=>r([i.test],t))),[h,c]=t.createMemo({expr:a}).compose(),l={switch:o,cases:[c]};return s&&!s.hasBreak&&l.cases.push(...s.condition.cases),this.setLocation(c,i.test),e.concat({caseNode:i,$test:h,condition:l,hasBreak:n})}),[]).map((({caseNode:i,$test:s,condition:n})=>{let a=t.createCondition(n,(()=>r(i.consequent,null,e)));return Ae.switchCase(s,a)}))));return this.setLocation(t,s),this.setLocation(o,s.discriminant),n(...t.compose(Ae.switchStmt(a,h)))}))}if("ForStatement"===s.type||"WhileStatement"===s.type||"DoWhileStatement"===s.type){let e={type:s.type},t=Ae["ForStatement"===s.type?"forStmt":"WhileStatement"===s.type?"whileStmt":"doWhileStmt"].bind(Ae);return We(s,i,((i,a,o)=>{let h,c,l,p,u,d;this.setLocation(a,s),this.setLocation(o,s.body),"ForStatement"===s.type?([c,l,p]=a.causesProduction(e,(()=>r([s.init,s.test,s.update],a,i))),[u]=r([s.body],o),h=e=>t(c,l,p,e)):([l]=a.causesProduction(e,(()=>r([s.test],$effect,i))),[u]=r([s.body],o),h=e=>t(l,e)),u.body.length&&([d,u]=Ue(o,u));let f=[].concat(d||[]).concat(h(Ae.blockStmt(u)));return n(...a.composeWith(f,[],(()=>o.dispose())))}))}if("ForInStatement"===s.type||"ForOfStatement"===s.type){let e={type:s.type},t=Ae["ForInStatement"===s.type?"forInStmt":"forOfStmt"].bind(Ae);return We(s,i,((i,a,o)=>{let h,c;this.setLocation(a,s),this.setLocation(o,s.body),"VariableDeclaration"===s.left.type?([h]=r([s.left],a,i),c=h.declarations[0].id):([h]=a.affectedsProduction(e,(()=>r([s.left],a,i))),c=h);let[l]=a.causesProduction(e,(()=>r([s.right],a,i))),[p]=r([s.body],o),u=t(h,l,p),d=[];if(p.body.length){let e=e=>Ue(o,p,{disposeCallback:()=>{u.left=h},...e}),r=h,n=p;if("ForOfStatement"===s.type)[d,n]=e({});else if("Identifier"===c.type)[d,n]=e({iterationId:c});else{let t,a=Ae.identifier(i.getSubscriptIdentifier("$counter"));[d,n]=e({iterationId:a}),r=Ae.varDeclaration("let",[Ae.varDeclarator(Ae.clone(a),null)]),t="VariableDeclaration"===s.left.type?Ae.varDeclaration(h.kind,[Ae.varDeclarator(c,Ae.clone(a))]):Ae.exprStmt(Ae.sequenceExpr([Ae.assignmentExpr(c,Ae.clone(a),"=")])),n=[t].concat(n)}u=t(r,l,Ae.blockStmt(n))}return n(...a.composeWith([].concat(d||[]).concat(u),[],(()=>o.dispose())))}))}if("LabeledStatement"===s.type){let e={type:s.type,label:s.label};return i.createEffect(e,(e=>{if(e.subscriptIdentifiersNoConflict(s.label),!s.body.type.endsWith("Statement")){this.setLocation(e,s.body);let[t]=r([s.body],e);return n(Ae.labeledStmt(s.label,e.compose(t)))}return e.createScope({type:s.body.type,label:s.label},(e=>{if("BlockStatement"===s.body.type){let t=r(s.body.body,null,e);return n(Ae.labeledStmt(s.label,Ae.blockStmt(t)))}let[t]=r([s.body],null,e);return n(Ae.labeledStmt(s.label,t))}))}))}if("BreakStatement"===s.type||"ContinueStatement"===s.type){let e=Ae["BreakStatement"===s.type?"breakStmt":"continueStmt"].bind(Ae),[t,r]=["Iteration","SwitchStatement","LabeledStatement"].reduce((([e,t],s)=>{let r=i.currentEffect.inContext(s);return!e||r>-1&&r<t?[s,r]:[e,t]}),[]);if("SwitchStatement"===t&&"BreakStatement"===s.type&&!s.label)return n(e(null));let a=Ae.identifier(i.currentEffect.getSubscriptIdentifier("$construct",!0)),o=Ae.literal("BreakStatement"===s.type?"break":"continue"),h=s.label?Ae.literal(s.label.name):Ae.identifier("null"),c=Ae.exprStmt(Ae.callExpr(Ae.memberExpr(a,Ae.identifier("exit")),[o,h]));return i.currentEffect.hoistExitStatement(o,h),n(c,Ae.returnStmt())}if("ReturnStatement"===s.type){i.static();let e={type:s.type};return i.createEffect(e,(t=>{let[i]=t.causesProduction(e,(()=>r([s.argument],t))),a=Ae.identifier(t.getSubscriptIdentifier("$construct",!0)),o=Ae.literal("return"),h=i||Ae.identifier("undefined"),c=Ae.exprStmt(Ae.callExpr(Ae.memberExpr(a,Ae.identifier("exit")),[o,h]));return t.hoistExitStatement(o,Ae.identifier("true")),n(...t.compose([c,Ae.returnStmt()]))}))}if("BlockStatement"===s.type){let e=e=>{let t=r(s.body,null,e);return n(Ae.blockStmt(t))};if(t){let i={type:s.type};return t.createScope(i,e)}return i.createBlock((t=>e(t)))}if("ExpressionStatement"===s.type){let e={type:s.type};return i.createEffect(e,(t=>{let[i]=t.causesProduction(e,(()=>r([s.expression],t)));return this.setLocation(t,s.expression),n(...t.compose(Ae.exprStmt(i)))}))}if("AssignmentExpression"===s.type){let e,i,a={type:s.type,kind:s.operator},[o]=t.causesProduction(a,(t=>(e=t,r([s.right])))),[h]=t.embeddableAffectedsProduction(a,(e=>(i=e,r([s.left]))));return e.setAssignee(i),n(Ae.assignmentExpr(h,o,s.operator))}if("UpdateExpression"===s.type||"UnaryExpression"===s.type&&"delete"===s.operator){let e={type:s.type,kind:s.operator},i=Ae["UpdateExpression"===s.type?"updateExpr":"unaryExpr"].bind(Ae),[a]=t.affectedsProduction(e,(()=>r([s.argument])));return n(i(s.operator,a,s.prefix))}if("LogicalExpression"===s.type){let e={type:s.type,kind:s.operator},[i]=t.chainableCausesProduction(e,(()=>r([s.left]))),[a,o]=t.createMemo({expr:i}).compose(),h="||"===s.operator?{whenNot:o}:{when:o},[c]=t.createCondition(h,(()=>t.chainableCausesProduction(e,(()=>r([s.right])))));return this.setLocation(o,s.left),n(Ae.logicalExpr(s.operator,a,c))}if("ConditionalExpression"===s.type){let e={type:s.type},[i]=t.causesProduction(e,(()=>r([s.test]))),[a,o]=t.createMemo({expr:i}).compose(),[h]=t.createCondition({when:o},(()=>t.chainableCausesProduction(e,(()=>r([s.consequent]))))),[c]=t.createCondition({whenNot:o},(()=>t.chainableCausesProduction(e,(()=>r([s.alternate])))));return this.setLocation(o,s.test),n(Ae.condExpr(a,h,c))}if("SequenceExpression"===s.type){let e=s.expressions.map(((e,i)=>{let n={type:e.type};return i===s.expressions.length-1?[e]=t.chainableCausesProduction(n,(()=>r([e]))):[e]=t.causesProduction(n,(()=>r([e]))),e}));return n(Ae.sequenceExpr(e))}if("ArrayPattern"===s.type){let e=s.elements.map(((e,i)=>([e]=t.currentProduction.withDestructure({name:i},(()=>r([e]))),e)));return n(Ae.arrayPattern(e))}if("ObjectPattern"===s.type){let e=s.properties.map((e=>{let{key:i,value:s}=e;e.computed&&([i]=t.causesProduction({type:i.type},(()=>r([i]))));let n={name:e.key.name};return e.computed&&("Literal"===e.key.type?n={name:e.key.value}:[i,n]=t.createMemo({expr:i}).compose()),[s]=t.currentProduction.withDestructure(n,(()=>r([s]))),this.setLocation(n,e.key),Ae.property(i,s,e.kind,e.shorthand,e.computed,e.method)}));return n(Ae.objectPattern(e))}if("MemberExpression"===s.type){let{property:e}=s;s.computed&&([e]=t.causesProduction({type:e.type},(()=>r([e]))));let i={name:s.property.name};s.computed&&("Literal"===s.property.type?i={name:s.property.value}:[e,i]=t.createMemo({expr:e}).compose());let[a]=t.currentProduction.withProperty(i,(()=>r([s.object])));return this.setLocation(i,s.property),n(Ae.memberExpr(a,e,s.computed,s.optional))}if("Identifier"===s.type||"ThisExpression"===s.type){let e=()=>"Identifier"===s.type?Ae.identifier(s.name):Ae.thisExpr();"Identifier"===s.type&&t.subscriptIdentifiersNoConflict(s);let i={name:"Identifier"===s.type?s.name:"this"};if(this.setLocation(i,s),t){let e=t.currentProduction;if(e)do{e.addRef().unshift(i)}while(e=e.contextProduction)}return n(e())}let o=s;if("TryStatement"===s.type){let[e,t,n]=r([s.block,s.handler,s.finalizer],i.currentEffect);o=Ae.tryStmt(e,t,n)}else if("CatchClause"===s.type){let[e]=r([s.body],i.currentEffect);o=Ae.catchClause(s.param,e)}else if(["ThrowStatement","AwaitExpression","SpreadElement","UnaryExpression"].includes(s.type)){let[e]=t.causesProduction({type:s.type},(()=>r([s.argument],i.currentEffect||i.ownerEffect)));"ThrowStatement"===s.type?o=Ae.throwStmt(e):"AwaitExpression"===s.type?(o=Ae.awaitExpr(e),t.hoistAwaitKeyword()):o="SpreadElement"===s.type?Ae.spreadElem(e):Ae.unaryExpr(s.operator,e,s.prefix)}else if("BinaryExpression"===s.type){let[e]=t.causesProduction({type:s.type},(()=>r([s.left]))),[i]=t.causesProduction({type:s.type},(()=>r([s.right])));o=Ae.binaryExpr(s.operator,e,i)}else if(["CallExpression","NewExpression"].includes(s.type)){let[e]=t.currentProduction.with({isCallee:!0,callType:s.type},(()=>r([s.callee]))),i=s.arguments.map((e=>t.causesProduction({type:e.type},(()=>r([e])[0]))));o="CallExpression"===s.type?Ae.callExpr(e,i,s.optional):Ae.newExpr(e,i)}else if(["ParenthesizedExpression","ChainExpression"].includes(s.type)){let[e]=r([s.expression]);o="ParenthesizedExpression"===s.type?Ae.parensExpr(e):Ae.chainExpr(e)}else if("ArrayExpression"===s.type){let e=s.elements.map((e=>t.causesProduction({type:e.type},(()=>r([e])[0]))));o=Ae.arrayExpr(e)}else if("ObjectExpression"===s.type){let e=r(s.properties);o=Ae.objectExpr(e)}else if("Property"===s.type){let{key:e,value:i}=s;s.computed&&([e]=t.causesProduction({type:e.type},(()=>r([e])))),[i]=t.causesProduction({type:i.type},(()=>r([i]))),o=Ae.property(e,i,s.kind,s.shorthand,s.computed,s.method)}else if("TaggedTemplateExpression"===s.type){let[e,i]=t.causesProduction({type:s.type},(()=>r([s.tag,s.quasi])));o=Ae.taggedTemplateExpr(e,i)}else if("TemplateLiteral"===s.type){let e=s.expressions.map((e=>t.causesProduction({type:s.type},(()=>r([e])[0]))));o=Ae.templateLiteral(s.quasis,e)}else"Literal"===s.type&&(o=Ae.clone(s));return n(o)}),[])}}function We(e,t,i){return t.createEffect({type:e.type},(t=>(t.defineSubscriptIdentifier("$counter",["ForInStatement"===e.type?"$x_key":"$x_index"]),t.createScope({type:"Iteration"},(e=>e.createEffect({type:"Iteration"},(s=>(s.inUse(!0),i(e,t,s)))))))))}function Ue(e,t,i={}){let s=[i.disposeCallback],r=[],n=[],a=[],o=t.body.slice(0);if(!i.iterationId){i.iterationId=Ae.identifier(e.getSubscriptIdentifier("$counter",!0));let t=Ae.varDeclarator(Ae.clone(i.iterationId),Ae.literal(-1)),n=Ae.updateExpr("++",Ae.clone(i.iterationId),!1);r.push(t),a.push(n),s.push((()=>a.pop()))}return n.length&&(a.push(Ae.varDeclaration("let",n)),s.push((()=>a.splice(-1)))),a.push(...e.composeWith(o,[i.iterationId],(()=>s.forEach((e=>e&&e()))))),r=r.length?Ae.varDeclaration("let",r):null,[r,a]}class $e{constructor(e,t,i,s={},r=null){this.parentEffect=e,this.graph=t,this.callee=i,this.params=s,this.exits=r||new Map,this.childEffects=new Map,this.construct=function(e,t,i=null){let s=this.graph.childEffects[e];if(!s)throw new Error(`[${this.graph.type}|${this.graph.lineage}]: Graph not found for child effect ${e}.`);if(3===arguments.length){let r=t,n=new $e(this,s,i,{...this.params,iterationId:r},this.exits),a=this.childEffects.get(e);return a||(a=new Map,this.childEffects.set(e,a)),a.has(r)&&a.get(r).dispose(),a.set(r,n),n.call()}let r=t,n=s.childEffects[Object.keys(s.childEffects)[0]],a=n&&"FunctionExpression"===n.type,o=new $e(this,s,r,{...this.params,isFunctionExpression:a},a?null:this.exits);return this.childEffects.has(e)&&this.childEffects.get(e).dispose(),this.childEffects.set(e,o),o.call()}.bind(this),this.construct.exiting=function(e,t){if(!arguments.length)return this.exits.size;let i=this.exits.get(e)===t;return i&&this.exits.clear(),i}.bind(this),this.construct.exit=function(e,t){this.exits.set(e,t)}.bind(this),this.construct.memo=Object.create(null)}call(e,...t){if(this.disposed)throw new Error("Instance not runable after disposal.");let i=this.callee.call(e,this.construct,...t);if(!this.parentEffect||this.params.isFunctionExpression){let e=this.exits.get("return");this.exits.clear(),i=i instanceof Promise?i.then((()=>e)):e}return i}iterate(e=[]){if(this.disposed)return!1;if(!["ForOfStatement","ForInStatement"].includes(this.graph.type)||1!==this.childEffects.size)throw new Error(`Effect ${this.graph.lineage} is not an iterator.`);let t,[[,i]]=this.childEffects,s=(e,t)=>e instanceof Promise?e.then(t):t();if(!e.length||e.includes("length")&&"ForOfStatement"===this.graph.type)for(let[,e]of i)t=s(t,(()=>e.call()));else for(let r of e){let e=i.get(r)||i.get(parseInt(r));e&&(t=s(t,(()=>e.call())))}return t}fire(e,t,i){if(this.parentEffect)return this.parentEffect.fire(e,t,i)}signal(...e){if(this.disposed)return!1;let t={entries:new Map,sequence:[]};for(let i in this.graph.affecteds)for(let s of this.graph.affecteds[i].refs)for(let i of e){let[e,r,n]=this.matchRefs(i,s);e&&this.buildThread(t,i,s,n,r)}let i,s,r,n=(e,t)=>{if(["ForOfStatement","ForInStatement"].includes(e.graph.type)&&t.every((e=>e.executionPlan.isIterationTarget))){let i=t.map((e=>e.executionPlan.iterationTarget));return this.fire(e.graph.lineage,"iterating",t),e.iterate(i)}return this.fire(e.graph.lineage,"executing",t),e.call()},a=(e,t)=>e instanceof Promise?e.then(t):t();for(;(s=t.sequence.shift())&&(r=[...t.entries.get(s)]);)i=a(i,(()=>{if(s.disposed||!s.filterRefs(r).length)return;let e=n(s,r);return a(e,(()=>{for(let e of r)[].concat(e.executionPlan.assigneeRef||e.executionPlan.assigneeRefs||[]).forEach((e=>{s.buildThread(t,[],e,[],0)}))})),e}));return a(i,(()=>{let e=this.exits.get("return");return this.exits.clear(),e}))}buildThread(e,t,i,s,r=0){let n=r>0;if(this.parentEffect){if(!this.compute(s))return;if(void 0!==i.conditionId&&!this.assert(i.conditionId))return}else n||(n=s.length||void 0!==i.conditionId);Object.keys(i.subscriptions).forEach((s=>{let[r,a]=s.split(":"),o=r=>{r&&r.selectRefs(e,a,i.subscriptions[s],n?t:null)},h=this.locate(r);Array.isArray(h)?h.forEach(o):o(h)}))}selectRefs(e,t,i,s=null){let r=this.graph.causes[t],n="assignee"in r?this.graph.affecteds[r.assignee]:null,a=(t,i=[],s={})=>{let r=e.entries.get(this);r||(r=new Set,e.entries.set(this,r),e.sequence.push(this),e.sequence.sort(((e,t)=>e.graph.lineage.localeCompare(t.graph.lineage,void 0,{numeric:!0})))),r.add({...t,computes:i,executionPlan:s}),!s.assigneeRef&&n&&(s.assigneeRefs=n.refs)};for(let t of i){let i=r.refs[t];if(!s){a(i);continue}let[o,h,c]=this.matchRefs(s,i);if(!o)continue;if(h<=0){a(i,c);continue}let l=s.slice(-h);n?n.refs.forEach((t=>{if(t.depth.length){let[s,r,n]=this.matchRefs(l,t.depth),o=c.concat(n);if(s&&r>0){let i=t.path.concat(l.slice(-r));this.buildThread(e,i,t,o,r)}else s&&a(i,o,{assigneeRef:t})}else{let i=t.path.concat(l);this.buildThread(e,i,t,c,h)}})):(1!==h||"ForOfStatement"!==this.graph.type)&&(1!==h||"ForInStatement"!==this.graph.type)||a(i,c,{isIterationTarget:!0,iterationTarget:l[0]})}}filterRefs(e){return e.filter((e=>{if(this.compute(e.computes)&&(void 0===e.conditionId||this.assert(e.conditionId)))return!0}))}matchRefs(e,t){let i,s,r,n;Array.isArray(e)?(i=e,s=e.dotSafe?e.join("."):void 0):(i=e.path,s=e.$path),Array.isArray(t)?(r=t,n=t.dotSafe?t.join("."):void 0):(r=t.path,n=t.$path);let a=i.length-r.length;if(a>0&&([i,r,s,n]=[r,i,n,s]),s&&n)return[`${n}.`.startsWith(`${s}.`),a,[]];let o=[],h=e=>"object"==typeof e?e.name:e;return[i.reduce(((e,t,i)=>e&&((e,t)=>{if(!e||!t)return!1;let i="object"==typeof e&&"memoId"in e,s="object"==typeof t&&"memoId"in t;return i||s?(o.push((r=>(i?r[e.memoId]:h(e))===(s?r[t.memoId]:h(t)))),!0):h(e)===h(t)})(t,r[i])),!0),a,o]}locate(e){let t=this.graph.lineage+"/",i=e+"/";if(i===t)return this;if(i.startsWith(t)){let i=e.slice(t.length).split("/"),s=this.childEffects.get(parseInt(i.shift()));return i.length?s instanceof Map?Array.from(s).reduce(((t,[i,s])=>t.concat(s.locate(e))),[]):s.locate(e):s}return this.parentEffect?this.parentEffect.locate(e):void 0}compute(e){return!e.some((e=>!1===e(this.construct.memo)))}assert(e){if("string"==typeof e&&e.includes(":")){let[t,i]=e.split(":");return this.locate(t).assert(i)}let t=this.graph.conditions[e],i=this.construct.memo;return!("parent"in t&&!this.assert(t.parent))&&("switch"in t?t.cases.some((e=>i[e]===i[t.switch])):"whenNot"in t?i[t.whenNot]:!("when"in t)||i[t.when])}dispose(){this.childEffects.forEach(((e,t)=>{e instanceof Map?(e.forEach((e=>e.dispose())),e.clear()):e.dispose()})),this.childEffects.clear(),delete this.parentEffect,delete this.graph,delete this.callee,delete this.params,delete this.construct.memo,this.disposed=!0}}class He extends $e{static create(e,t=[],i={}){const s=new(e.graph.hoistedAwaitKeyword?Object.getPrototypeOf((async function(){})).constructor:Function)(e.identifier,...t,e.source);return new this(null,e.graph,s,i)}constructor(e,t,i,s={},r=null){super(e,t,i,{},r),this.observers=[]}observe(e,t){this.params.devMode,this.observers.push({effectUrl:e,callback:t})}fire(e,t,i){(this.observers||[]).forEach((s=>{s.effectUrl===e&&s.callback(t,i)}))}}function qe(e){let t=e.split(/\n/g);if(t.length>1){let e=t[1].split(/[^\s]/)[0].length;if(e)return t.map(((i,s)=>{if(!s)return i;let r=i.substring(0,e);return r.trim().length?"}"===r.trim()&&s===t.length-1?"}":i:i.substring(e)})).join("\n")}return e}var Ge={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},ze="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Ke={5:ze,"5module":ze+" export import",6:ze+" const class extends export import super"},Qe=/^in(stanceof)?$/,Je="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Xe="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",Ye=new RegExp("["+Je+"]"),Ze=new RegExp("["+Je+Xe+"]");Je=Xe=null;var et=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938],tt=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];function it(e,t){for(var i=65536,s=0;s<t.length;s+=2){if((i+=t[s])>e)return!1;if((i+=t[s+1])>=e)return!0}}function st(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Ye.test(String.fromCharCode(e)):!1!==t&&it(e,et)))}function rt(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Ze.test(String.fromCharCode(e)):!1!==t&&(it(e,et)||it(e,tt)))))}var nt=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function at(e,t){return new nt(e,{beforeExpr:!0,binop:t})}var ot={beforeExpr:!0},ht={startsExpr:!0},ct={};function lt(e,t){return void 0===t&&(t={}),t.keyword=e,ct[e]=new nt(e,t)}var pt={num:new nt("num",ht),regexp:new nt("regexp",ht),string:new nt("string",ht),name:new nt("name",ht),privateId:new nt("privateId",ht),eof:new nt("eof"),bracketL:new nt("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new nt("]"),braceL:new nt("{",{beforeExpr:!0,startsExpr:!0}),braceR:new nt("}"),parenL:new nt("(",{beforeExpr:!0,startsExpr:!0}),parenR:new nt(")"),comma:new nt(",",ot),semi:new nt(";",ot),colon:new nt(":",ot),dot:new nt("."),question:new nt("?",ot),questionDot:new nt("?."),arrow:new nt("=>",ot),template:new nt("template"),invalidTemplate:new nt("invalidTemplate"),ellipsis:new nt("...",ot),backQuote:new nt("`",ht),dollarBraceL:new nt("${",{beforeExpr:!0,startsExpr:!0}),eq:new nt("=",{beforeExpr:!0,isAssign:!0}),assign:new nt("_=",{beforeExpr:!0,isAssign:!0}),incDec:new nt("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new nt("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:at("||",1),logicalAND:at("&&",2),bitwiseOR:at("|",3),bitwiseXOR:at("^",4),bitwiseAND:at("&",5),equality:at("==/!=/===/!==",6),relational:at("</>/<=/>=",7),bitShift:at("<</>>/>>>",8),plusMin:new nt("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:at("%",10),star:at("*",10),slash:at("/",10),starstar:new nt("**",{beforeExpr:!0}),coalesce:at("??",1),_break:lt("break"),_case:lt("case",ot),_catch:lt("catch"),_continue:lt("continue"),_debugger:lt("debugger"),_default:lt("default",ot),_do:lt("do",{isLoop:!0,beforeExpr:!0}),_else:lt("else",ot),_finally:lt("finally"),_for:lt("for",{isLoop:!0}),_function:lt("function",ht),_if:lt("if"),_return:lt("return",ot),_switch:lt("switch"),_throw:lt("throw",ot),_try:lt("try"),_var:lt("var"),_const:lt("const"),_while:lt("while",{isLoop:!0}),_with:lt("with"),_new:lt("new",{beforeExpr:!0,startsExpr:!0}),_this:lt("this",ht),_super:lt("super",ht),_class:lt("class",ht),_extends:lt("extends",ot),_export:lt("export"),_import:lt("import",ht),_null:lt("null",ht),_true:lt("true",ht),_false:lt("false",ht),_in:lt("in",{beforeExpr:!0,binop:7}),_instanceof:lt("instanceof",{beforeExpr:!0,binop:7}),_typeof:lt("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:lt("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:lt("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},ut=/\r\n?|\n|\u2028|\u2029/,dt=new RegExp(ut.source,"g");function ft(e){return 10===e||13===e||8232===e||8233===e}function mt(e,t,i){void 0===i&&(i=e.length);for(var s=t;s<i;s++){var r=e.charCodeAt(s);if(ft(r))return s<i-1&&13===r&&10===e.charCodeAt(s+1)?s+2:s+1}return-1}var gt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,yt=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,bt=Object.prototype,xt=bt.hasOwnProperty,vt=bt.toString,wt=Object.hasOwn||function(e,t){return xt.call(e,t)},Et=Array.isArray||function(e){return"[object Array]"===vt.call(e)};function St(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var kt=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,_t=function(e,t){this.line=e,this.column=t};_t.prototype.offset=function(e){return new _t(this.line,this.column+e)};var Ct=function(e,t,i){this.start=t,this.end=i,null!==e.sourceFile&&(this.source=e.sourceFile)};function Pt(e,t){for(var i=1,s=0;;){var r=mt(e,s,t);if(r<0)return new _t(i,t-s);++i,s=r}}var At={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},It=!1;function Ot(e,t){return 2|(e?4:0)|(t?8:0)}var Tt=function(e,t,i){this.options=e=function(e){var t={};for(var i in At)t[i]=e&&wt(e,i)?e[i]:At[i];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!It&&"object"==typeof console&&console.warn&&(It=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),Et(t.onToken)){var s=t.onToken;t.onToken=function(e){return s.push(e)}}return Et(t.onComment)&&(t.onComment=function(e,t){return function(i,s,r,n,a,o){var h={type:i?"Block":"Line",value:s,start:r,end:n};e.locations&&(h.loc=new Ct(this,a,o)),e.ranges&&(h.range=[r,n]),t.push(h)}}(t,t.onComment)),t}(e),this.sourceFile=e.sourceFile,this.keywords=St(Ke[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var s="";!0!==e.allowReserved&&(s=Ge[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(s+=" await")),this.reservedWords=St(s);var r=(s?s+" ":"")+Ge.strict;this.reservedWordsStrict=St(r),this.reservedWordsStrictBind=St(r+" "+Ge.strictBind),this.input=String(t),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(ut).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=pt.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},Nt={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Tt.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},Nt.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Nt.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Nt.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Nt.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||256&t.flags)return!1;if(2&t.flags)return(4&t.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Nt.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(64&t)>0||i||this.options.allowSuperOutsideMethod},Nt.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Nt.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Nt.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(258&t)>0||i},Nt.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},Tt.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var i=this,s=0;s<e.length;s++)i=e[s](i);return i},Tt.parse=function(e,t){return new this(t,e).parse()},Tt.parseExpressionAt=function(e,t,i){var s=new this(i,e,t);return s.nextToken(),s.parseExpression()},Tt.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(Tt.prototype,Nt);var Lt=Tt.prototype,Mt=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;function Dt(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}Lt.strictDirective=function(e){for(;;){yt.lastIndex=e,e+=yt.exec(this.input)[0].length;var t=Mt.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){yt.lastIndex=e+t[0].length;var i=yt.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return";"===r||"}"===r||ut.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||"!"===r&&"="===this.input.charAt(s+1))}e+=t[0].length,yt.lastIndex=e,e+=yt.exec(this.input)[0].length,";"===this.input[e]&&e++}},Lt.eat=function(e){return this.type===e&&(this.next(),!0)},Lt.isContextual=function(e){return this.type===pt.name&&this.value===e&&!this.containsEsc},Lt.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Lt.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Lt.canInsertSemicolon=function(){return this.type===pt.eof||this.type===pt.braceR||ut.test(this.input.slice(this.lastTokEnd,this.start))},Lt.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Lt.semicolon=function(){this.eat(pt.semi)||this.insertSemicolon()||this.unexpected()},Lt.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Lt.expect=function(e){this.eat(e)||this.unexpected()},Lt.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},Lt.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,"Parenthesized pattern")}},Lt.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,s=e.doubleProto;if(!t)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")},Lt.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},Lt.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var Vt=Tt.prototype;Vt.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==pt.eof;){var i=this.parseStatement(null,!0,t);e.body.push(i)}if(this.inModule)for(var s=0,r=Object.keys(this.undefinedExports);s<r.length;s+=1){var n=r[s];this.raiseRecoverable(this.undefinedExports[n].start,"Export '"+n+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var jt={kind:"loop"},Rt={kind:"switch"};Vt.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;yt.lastIndex=this.pos;var t=yt.exec(this.input),i=this.pos+t[0].length,s=this.input.charCodeAt(i);if(91===s||92===s||s>55295&&s<56320)return!0;if(e)return!1;if(123===s)return!0;if(st(s,!0)){for(var r=i+1;rt(s=this.input.charCodeAt(r),!0);)++r;if(92===s||s>55295&&s<56320)return!0;var n=this.input.slice(i,r);if(!Qe.test(n))return!0}return!1},Vt.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;yt.lastIndex=this.pos;var e,t=yt.exec(this.input),i=this.pos+t[0].length;return!(ut.test(this.input.slice(this.pos,i))||"function"!==this.input.slice(i,i+8)||i+8!==this.input.length&&(rt(e=this.input.charCodeAt(i+8))||e>55295&&e<56320))},Vt.parseStatement=function(e,t,i){var s,r=this.type,n=this.startNode();switch(this.isLet(e)&&(r=pt._var,s="let"),r){case pt._break:case pt._continue:return this.parseBreakContinueStatement(n,r.keyword);case pt._debugger:return this.parseDebuggerStatement(n);case pt._do:return this.parseDoStatement(n);case pt._for:return this.parseForStatement(n);case pt._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(n,!1,!e);case pt._class:return e&&this.unexpected(),this.parseClass(n,!0);case pt._if:return this.parseIfStatement(n);case pt._return:return this.parseReturnStatement(n);case pt._switch:return this.parseSwitchStatement(n);case pt._throw:return this.parseThrowStatement(n);case pt._try:return this.parseTryStatement(n);case pt._const:case pt._var:return s=s||this.value,e&&"var"!==s&&this.unexpected(),this.parseVarStatement(n,s);case pt._while:return this.parseWhileStatement(n);case pt._with:return this.parseWithStatement(n);case pt.braceL:return this.parseBlock(!0,n);case pt.semi:return this.parseEmptyStatement(n);case pt._export:case pt._import:if(this.options.ecmaVersion>10&&r===pt._import){yt.lastIndex=this.pos;var a=yt.exec(this.input),o=this.pos+a[0].length,h=this.input.charCodeAt(o);if(40===h||46===h)return this.parseExpressionStatement(n,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===pt._import?this.parseImport(n):this.parseExport(n,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(n,!0,!e);var c=this.value,l=this.parseExpression();return r===pt.name&&"Identifier"===l.type&&this.eat(pt.colon)?this.parseLabeledStatement(n,c,l,e):this.parseExpressionStatement(n,l)}},Vt.parseBreakContinueStatement=function(e,t){var i="break"===t;this.next(),this.eat(pt.semi)||this.insertSemicolon()?e.label=null:this.type!==pt.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var s=0;s<this.labels.length;++s){var r=this.labels[s];if(null==e.label||r.name===e.label.name){if(null!=r.kind&&(i||"loop"===r.kind))break;if(e.label&&i)break}}return s===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,i?"BreakStatement":"ContinueStatement")},Vt.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},Vt.parseDoStatement=function(e){return this.next(),this.labels.push(jt),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(pt._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(pt.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},Vt.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(jt),this.enterScope(0),this.expect(pt.parenL),this.type===pt.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===pt._var||this.type===pt._const||i){var s=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),(this.type===pt._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===s.declarations.length?(this.options.ecmaVersion>=9&&(this.type===pt._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,s)):(t>-1&&this.unexpected(t),this.parseFor(e,s))}var n=this.isContextual("let"),a=!1,o=new Dt,h=this.parseExpression(!(t>-1)||"await",o);return this.type===pt._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===pt._in?t>-1&&this.unexpected(t):e.await=t>-1),n&&a&&this.raise(h.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(h,!1,o),this.checkLValPattern(h),this.parseForIn(e,h)):(this.checkExpressionErrors(o,!0),t>-1&&this.unexpected(t),this.parseFor(e,h))},Vt.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,Ft|(i?0:Wt),!1,t)},Vt.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(pt._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},Vt.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(pt.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},Vt.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(pt.braceL),this.labels.push(Rt),this.enterScope(0);for(var i=!1;this.type!==pt.braceR;)if(this.type===pt._case||this.type===pt._default){var s=this.type===pt._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),s?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(pt.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},Vt.parseThrowStatement=function(e){return this.next(),ut.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Bt=[];Vt.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===pt._catch){var t=this.startNode();if(this.next(),this.eat(pt.parenL)){t.param=this.parseBindingAtom();var i="Identifier"===t.param.type;this.enterScope(i?32:0),this.checkLValPattern(t.param,i?4:2),this.expect(pt.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(pt._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},Vt.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},Vt.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(jt),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},Vt.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},Vt.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},Vt.parseLabeledStatement=function(e,t,i,s){for(var r=0,n=this.labels;r<n.length;r+=1)n[r].name===t&&this.raise(i.start,"Label '"+t+"' is already declared");for(var a=this.type.isLoop?"loop":this.type===pt._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var h=this.labels[o];if(h.statementStart!==e.start)break;h.statementStart=this.start,h.kind=a}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(s?-1===s.indexOf("label")?s+"label":s:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")},Vt.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},Vt.parseBlock=function(e,t,i){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(pt.braceL),e&&this.enterScope(0);this.type!==pt.braceR;){var s=this.parseStatement(null);t.body.push(s)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},Vt.parseFor=function(e,t){return e.init=t,this.expect(pt.semi),e.test=this.type===pt.semi?null:this.parseExpression(),this.expect(pt.semi),e.update=this.type===pt.parenR?null:this.parseExpression(),this.expect(pt.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},Vt.parseForIn=function(e,t){var i=this.type===pt._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!i||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(pt.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")},Vt.parseVar=function(e,t,i){for(e.declarations=[],e.kind=i;;){var s=this.startNode();if(this.parseVarId(s,i),this.eat(pt.eq)?s.init=this.parseMaybeAssign(t):"const"!==i||this.type===pt._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===s.id.type||t&&(this.type===pt._in||this.isContextual("of"))?s.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(s,"VariableDeclarator")),!this.eat(pt.comma))break}return e},Vt.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var Ft=1,Wt=2;function Ut(e,t){var i=t.key.name,s=e[i],r="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(r=(t.static?"s":"i")+t.kind),"iget"===s&&"iset"===r||"iset"===s&&"iget"===r||"sget"===s&&"sset"===r||"sset"===s&&"sget"===r?(e[i]="true",!1):!!s||(e[i]=r,!1)}function $t(e,t){var i=e.computed,s=e.key;return!i&&("Identifier"===s.type&&s.name===t||"Literal"===s.type&&s.value===t)}Vt.parseFunction=function(e,t,i,s,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===pt.star&&t&Wt&&this.unexpected(),e.generator=this.eat(pt.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&Ft&&(e.id=4&t&&this.type!==pt.name?null:this.parseIdent(),!e.id||t&Wt||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var n=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ot(e.async,e.generator)),t&Ft||(e.id=this.type===pt.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,r),this.yieldPos=n,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,t&Ft?"FunctionDeclaration":"FunctionExpression")},Vt.parseFunctionParams=function(e){this.expect(pt.parenL),e.params=this.parseBindingList(pt.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Vt.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var s=this.enterClassBody(),r=this.startNode(),n=!1;for(r.body=[],this.expect(pt.braceL);this.type!==pt.braceR;){var a=this.parseClassElement(null!==e.superClass);a&&(r.body.push(a),"MethodDefinition"===a.type&&"constructor"===a.kind?(n&&this.raise(a.start,"Duplicate constructor in the same class"),n=!0):a.key&&"PrivateIdentifier"===a.key.type&&Ut(s,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},Vt.parseClassElement=function(e){if(this.eat(pt.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),s="",r=!1,n=!1,a="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(pt.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===pt.star?o=!0:s="static"}if(i.static=o,!s&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==pt.star||this.canInsertSemicolon()?s="async":n=!0),!s&&(t>=9||!n)&&this.eat(pt.star)&&(r=!0),!s&&!n&&!r){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=h:s=h)}if(s?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===pt.parenL||"method"!==a||r||n){var c=!i.static&&$t(i,"constructor"),l=c&&e;c&&"method"!==a&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=c?"constructor":a,this.parseClassMethod(i,r,n,l)}else this.parseClassField(i);return i},Vt.isClassElementNameStart=function(){return this.type===pt.name||this.type===pt.privateId||this.type===pt.num||this.type===pt.string||this.type===pt.bracketL||this.type.keyword},Vt.parseClassElementName=function(e){this.type===pt.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},Vt.parseClassMethod=function(e,t,i,s){var r=e.key;"constructor"===e.kind?(t&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):e.static&&$t(e,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,i,s);return"get"===e.kind&&0!==n.params.length&&this.raiseRecoverable(n.start,"getter should have no params"),"set"===e.kind&&1!==n.params.length&&this.raiseRecoverable(n.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===n.params[0].type&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},Vt.parseClassField=function(e){if($t(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&$t(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(pt.eq)){var t=this.currentThisScope(),i=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=i}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},Vt.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==pt.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},Vt.parseClassId=function(e,t){this.type===pt.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},Vt.parseClassSuper=function(e){e.superClass=this.eat(pt._extends)?this.parseExprSubscripts(!1):null},Vt.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},Vt.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,i=e.used,s=this.privateNameStack.length,r=0===s?null:this.privateNameStack[s-1],n=0;n<i.length;++n){var a=i[n];wt(t,a.name)||(r?r.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}},Vt.parseExport=function(e,t){if(this.next(),this.eat(pt.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==pt.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(pt._default)){var i;if(this.checkExport(t,"default",this.lastTokStart),this.type===pt._function||(i=this.isAsyncFunction())){var s=this.startNode();this.next(),i&&this.next(),e.declaration=this.parseFunction(s,4|Ft,!1,i)}else if(this.type===pt._class){var r=this.startNode();e.declaration=this.parseClass(r,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==pt.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var n=0,a=e.specifiers;n<a.length;n+=1){var o=a[n];this.checkUnreserved(o.local),this.checkLocalExport(o.local),"Literal"===o.local.type&&this.raise(o.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},Vt.checkExport=function(e,t,i){e&&(wt(e,t)&&this.raiseRecoverable(i,"Duplicate export '"+t+"'"),e[t]=!0)},Vt.checkPatternExport=function(e,t){var i=t.type;if("Identifier"===i)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===i)for(var s=0,r=t.properties;s<r.length;s+=1){var n=r[s];this.checkPatternExport(e,n)}else if("ArrayPattern"===i)for(var a=0,o=t.elements;a<o.length;a+=1){var h=o[a];h&&this.checkPatternExport(e,h)}else"Property"===i?this.checkPatternExport(e,t.value):"AssignmentPattern"===i?this.checkPatternExport(e,t.left):"RestElement"===i?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"===i&&this.checkPatternExport(e,t.expression)},Vt.checkVariableExport=function(e,t){if(e)for(var i=0,s=t;i<s.length;i+=1){var r=s[i];this.checkPatternExport(e,r.id)}},Vt.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Vt.parseExportSpecifiers=function(e){var t=[],i=!0;for(this.expect(pt.braceL);!this.eat(pt.braceR);){if(i)i=!1;else if(this.expect(pt.comma),this.afterTrailingComma(pt.braceR))break;var s=this.startNode();s.local=this.parseModuleExportName(),s.exported=this.eatContextual("as")?this.parseModuleExportName():s.local,this.checkExport(e,s.exported["Identifier"===s.exported.type?"name":"value"],s.exported.start),t.push(this.finishNode(s,"ExportSpecifier"))}return t},Vt.parseImport=function(e){return this.next(),this.type===pt.string?(e.specifiers=Bt,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===pt.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},Vt.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===pt.name){var i=this.startNode();if(i.local=this.parseIdent(),this.checkLValSimple(i.local,2),e.push(this.finishNode(i,"ImportDefaultSpecifier")),!this.eat(pt.comma))return e}if(this.type===pt.star){var s=this.startNode();return this.next(),this.expectContextual("as"),s.local=this.parseIdent(),this.checkLValSimple(s.local,2),e.push(this.finishNode(s,"ImportNamespaceSpecifier")),e}for(this.expect(pt.braceL);!this.eat(pt.braceR);){if(t)t=!1;else if(this.expect(pt.comma),this.afterTrailingComma(pt.braceR))break;var r=this.startNode();r.imported=this.parseModuleExportName(),this.eatContextual("as")?r.local=this.parseIdent():(this.checkUnreserved(r.imported),r.local=r.imported),this.checkLValSimple(r.local,2),e.push(this.finishNode(r,"ImportSpecifier"))}return e},Vt.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===pt.string){var e=this.parseLiteral(this.value);return kt.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},Vt.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},Vt.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var Ht=Tt.prototype;Ht.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s=0,r=e.properties;s<r.length;s+=1){var n=r[s];this.toAssignable(n,t),"RestElement"!==n.type||"ArrayPattern"!==n.argument.type&&"ObjectPattern"!==n.argument.type||this.raise(n.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,i);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return e},Ht.toAssignableList=function(e,t){for(var i=e.length,s=0;s<i;s++){var r=e[s];r&&this.toAssignable(r,t)}if(i){var n=e[i-1];6===this.options.ecmaVersion&&t&&n&&"RestElement"===n.type&&"Identifier"!==n.argument.type&&this.unexpected(n.argument.start)}return e},Ht.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},Ht.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==pt.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},Ht.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case pt.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(pt.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case pt.braceL:return this.parseObj(!0)}return this.parseIdent()},Ht.parseBindingList=function(e,t,i){for(var s=[],r=!0;!this.eat(e);)if(r?r=!1:this.expect(pt.comma),t&&this.type===pt.comma)s.push(null);else{if(i&&this.afterTrailingComma(e))break;if(this.type===pt.ellipsis){var n=this.parseRestBinding();this.parseBindingListItem(n),s.push(n),this.type===pt.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var a=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(a),s.push(a)}return s},Ht.parseBindingListItem=function(e){return e},Ht.parseMaybeDefault=function(e,t,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(pt.eq))return i;var s=this.startNodeAt(e,t);return s.left=i,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")},Ht.checkLValSimple=function(e,t,i){void 0===t&&(t=0);var s=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(s?"Binding ":"Assigning to ")+e.name+" in strict mode"),s&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),i&&(wt(i,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),i[e.name]=!0),5!==t&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":s&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return s&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(s?"Binding":"Assigning to")+" rvalue")}},Ht.checkLValPattern=function(e,t,i){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var s=0,r=e.properties;s<r.length;s+=1){var n=r[s];this.checkLValInnerPattern(n,t,i)}break;case"ArrayPattern":for(var a=0,o=e.elements;a<o.length;a+=1){var h=o[a];h&&this.checkLValInnerPattern(h,t,i)}break;default:this.checkLValSimple(e,t,i)}},Ht.checkLValInnerPattern=function(e,t,i){switch(void 0===t&&(t=0),e.type){case"Property":this.checkLValInnerPattern(e.value,t,i);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,i);break;case"RestElement":this.checkLValPattern(e.argument,t,i);break;default:this.checkLValPattern(e,t,i)}};var qt=function(e,t,i,s,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!i,this.override=s,this.generator=!!r},Gt={b_stat:new qt("{",!1),b_expr:new qt("{",!0),b_tmpl:new qt("${",!1),p_stat:new qt("(",!1),p_expr:new qt("(",!0),q_tmpl:new qt("`",!0,!0,(function(e){return e.tryReadTemplateToken()})),f_stat:new qt("function",!1),f_expr:new qt("function",!0),f_expr_gen:new qt("function",!0,!1,null,!0),f_gen:new qt("function",!1,!1,null,!0)},zt=Tt.prototype;zt.initialContext=function(){return[Gt.b_stat]},zt.curContext=function(){return this.context[this.context.length-1]},zt.braceIsBlock=function(e){var t=this.curContext();return t===Gt.f_expr||t===Gt.f_stat||(e!==pt.colon||t!==Gt.b_stat&&t!==Gt.b_expr?e===pt._return||e===pt.name&&this.exprAllowed?ut.test(this.input.slice(this.lastTokEnd,this.start)):e===pt._else||e===pt.semi||e===pt.eof||e===pt.parenR||e===pt.arrow||(e===pt.braceL?t===Gt.b_stat:e!==pt._var&&e!==pt._const&&e!==pt.name&&!this.exprAllowed):!t.isExpr)},zt.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},zt.updateContext=function(e){var t,i=this.type;i.keyword&&e===pt.dot?this.exprAllowed=!1:(t=i.updateContext)?t.call(this,e):this.exprAllowed=i.beforeExpr},zt.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},pt.parenR.updateContext=pt.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===Gt.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},pt.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?Gt.b_stat:Gt.b_expr),this.exprAllowed=!0},pt.dollarBraceL.updateContext=function(){this.context.push(Gt.b_tmpl),this.exprAllowed=!0},pt.parenL.updateContext=function(e){var t=e===pt._if||e===pt._for||e===pt._with||e===pt._while;this.context.push(t?Gt.p_stat:Gt.p_expr),this.exprAllowed=!0},pt.incDec.updateContext=function(){},pt._function.updateContext=pt._class.updateContext=function(e){!e.beforeExpr||e===pt._else||e===pt.semi&&this.curContext()!==Gt.p_stat||e===pt._return&&ut.test(this.input.slice(this.lastTokEnd,this.start))||(e===pt.colon||e===pt.braceL)&&this.curContext()===Gt.b_stat?this.context.push(Gt.f_stat):this.context.push(Gt.f_expr),this.exprAllowed=!1},pt.backQuote.updateContext=function(){this.curContext()===Gt.q_tmpl?this.context.pop():this.context.push(Gt.q_tmpl),this.exprAllowed=!1},pt.star.updateContext=function(e){if(e===pt._function){var t=this.context.length-1;this.context[t]===Gt.f_expr?this.context[t]=Gt.f_expr_gen:this.context[t]=Gt.f_gen}this.exprAllowed=!0},pt.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==pt.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var Kt=Tt.prototype;function Qt(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&Qt(e.expression)}Kt.checkPropClash=function(e,t,i){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var s,r=e.key;switch(r.type){case"Identifier":s=r.name;break;case"Literal":s=String(r.value);break;default:return}var n=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===s&&"init"===n&&(t.proto&&(i?i.doubleProto<0&&(i.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),t.proto=!0);else{var a=t[s="$"+s];a?("init"===n?this.strict&&a.init||a.get||a.set:a.init||a[n])&&this.raiseRecoverable(r.start,"Redefinition of property"):a=t[s]={init:!1,get:!1,set:!1},a[n]=!0}}},Kt.parseExpression=function(e,t){var i=this.start,s=this.startLoc,r=this.parseMaybeAssign(e,t);if(this.type===pt.comma){var n=this.startNodeAt(i,s);for(n.expressions=[r];this.eat(pt.comma);)n.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(n,"SequenceExpression")}return r},Kt.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var s=!1,r=-1,n=-1,a=-1;t?(r=t.parenthesizedAssign,n=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Dt,s=!0);var o=this.start,h=this.startLoc;this.type!==pt.parenL&&this.type!==pt.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var c=this.parseMaybeConditional(e,t);if(i&&(c=i.call(this,c,o,h)),this.type.isAssign){var l=this.startNodeAt(o,h);return l.operator=this.value,this.type===pt.eq&&(c=this.toAssignable(c,!1,t)),s||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===pt.eq?this.checkLValPattern(c):this.checkLValSimple(c),l.left=c,this.next(),l.right=this.parseMaybeAssign(e),a>-1&&(t.doubleProto=a),this.finishNode(l,"AssignmentExpression")}return s&&this.checkExpressionErrors(t,!0),r>-1&&(t.parenthesizedAssign=r),n>-1&&(t.trailingComma=n),c},Kt.parseMaybeConditional=function(e,t){var i=this.start,s=this.startLoc,r=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return r;if(this.eat(pt.question)){var n=this.startNodeAt(i,s);return n.test=r,n.consequent=this.parseMaybeAssign(),this.expect(pt.colon),n.alternate=this.parseMaybeAssign(e),this.finishNode(n,"ConditionalExpression")}return r},Kt.parseExprOps=function(e,t){var i=this.start,s=this.startLoc,r=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||r.start===i&&"ArrowFunctionExpression"===r.type?r:this.parseExprOp(r,i,s,-1,e)},Kt.parseExprOp=function(e,t,i,s,r){var n=this.type.binop;if(null!=n&&(!r||this.type!==pt._in)&&n>s){var a=this.type===pt.logicalOR||this.type===pt.logicalAND,o=this.type===pt.coalesce;o&&(n=pt.logicalAND.binop);var h=this.value;this.next();var c=this.start,l=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),c,l,n,r),u=this.buildBinary(t,i,e,p,h,a||o);return(a&&this.type===pt.coalesce||o&&(this.type===pt.logicalOR||this.type===pt.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(u,t,i,s,r)}return e},Kt.buildBinary=function(e,t,i,s,r,n){"PrivateIdentifier"===s.type&&this.raise(s.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=i,a.operator=r,a.right=s,this.finishNode(a,n?"LogicalExpression":"BinaryExpression")},Kt.parseMaybeUnary=function(e,t,i,s){var r,n=this.start,a=this.startLoc;if(this.isContextual("await")&&this.canAwait)r=this.parseAwait(s),t=!0;else if(this.type.prefix){var o=this.startNode(),h=this.type===pt.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,h,s),this.checkExpressionErrors(e,!0),h?this.checkLValSimple(o.argument):this.strict&&"delete"===o.operator&&"Identifier"===o.argument.type?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):"delete"===o.operator&&Qt(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):t=!0,r=this.finishNode(o,h?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==pt.privateId){if(r=this.parseExprSubscripts(e,s),this.checkExpressionErrors(e))return r;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(n,a);c.operator=this.value,c.prefix=!1,c.argument=r,this.checkLValSimple(r),this.next(),r=this.finishNode(c,"UpdateExpression")}}else(s||0===this.privateNameStack.length)&&this.unexpected(),r=this.parsePrivateIdent(),this.type!==pt._in&&this.unexpected();return i||!this.eat(pt.starstar)?r:t?void this.unexpected(this.lastTokStart):this.buildBinary(n,a,r,this.parseMaybeUnary(null,!1,!1,s),"**",!1)},Kt.parseExprSubscripts=function(e,t){var i=this.start,s=this.startLoc,r=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return r;var n=this.parseSubscripts(r,i,s,!1,t);return e&&"MemberExpression"===n.type&&(e.parenthesizedAssign>=n.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=n.start&&(e.parenthesizedBind=-1),e.trailingComma>=n.start&&(e.trailingComma=-1)),n},Kt.parseSubscripts=function(e,t,i,s,r){for(var n=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,a=!1;;){var o=this.parseSubscript(e,t,i,s,n,a,r);if(o.optional&&(a=!0),o===e||"ArrowFunctionExpression"===o.type){if(a){var h=this.startNodeAt(t,i);h.expression=o,o=this.finishNode(h,"ChainExpression")}return o}e=o}},Kt.parseSubscript=function(e,t,i,s,r,n,a){var o=this.options.ecmaVersion>=11,h=o&&this.eat(pt.questionDot);s&&h&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(pt.bracketL);if(c||h&&this.type!==pt.parenL&&this.type!==pt.backQuote||this.eat(pt.dot)){var l=this.startNodeAt(t,i);l.object=e,c?(l.property=this.parseExpression(),this.expect(pt.bracketR)):this.type===pt.privateId&&"Super"!==e.type?l.property=this.parsePrivateIdent():l.property=this.parseIdent("never"!==this.options.allowReserved),l.computed=!!c,o&&(l.optional=h),e=this.finishNode(l,"MemberExpression")}else if(!s&&this.eat(pt.parenL)){var p=new Dt,u=this.yieldPos,d=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(pt.parenR,this.options.ecmaVersion>=8,!1,p);if(r&&!h&&!this.canInsertSemicolon()&&this.eat(pt.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=u,this.awaitPos=d,this.awaitIdentPos=f,this.parseArrowExpression(this.startNodeAt(t,i),m,!0,a);this.checkExpressionErrors(p,!0),this.yieldPos=u||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var g=this.startNodeAt(t,i);g.callee=e,g.arguments=m,o&&(g.optional=h),e=this.finishNode(g,"CallExpression")}else if(this.type===pt.backQuote){(h||n)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var y=this.startNodeAt(t,i);y.tag=e,y.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(y,"TaggedTemplateExpression")}return e},Kt.parseExprAtom=function(e,t){this.type===pt.slash&&this.readRegexp();var i,s=this.potentialArrowAt===this.start;switch(this.type){case pt._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),i=this.startNode(),this.next(),this.type!==pt.parenL||this.allowDirectSuper||this.raise(i.start,"super() call outside constructor of a subclass"),this.type!==pt.dot&&this.type!==pt.bracketL&&this.type!==pt.parenL&&this.unexpected(),this.finishNode(i,"Super");case pt._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case pt.name:var r=this.start,n=this.startLoc,a=this.containsEsc,o=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!a&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(pt._function))return this.overrideContext(Gt.f_expr),this.parseFunction(this.startNodeAt(r,n),0,!1,!0,t);if(s&&!this.canInsertSemicolon()){if(this.eat(pt.arrow))return this.parseArrowExpression(this.startNodeAt(r,n),[o],!1,t);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===pt.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return o=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(pt.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,n),[o],!0,t)}return o;case pt.regexp:var h=this.value;return(i=this.parseLiteral(h.value)).regex={pattern:h.pattern,flags:h.flags},i;case pt.num:case pt.string:return this.parseLiteral(this.value);case pt._null:case pt._true:case pt._false:return(i=this.startNode()).value=this.type===pt._null?null:this.type===pt._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case pt.parenL:var c=this.start,l=this.parseParenAndDistinguishExpression(s,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(l)&&(e.parenthesizedAssign=c),e.parenthesizedBind<0&&(e.parenthesizedBind=c)),l;case pt.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(pt.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case pt.braceL:return this.overrideContext(Gt.b_expr),this.parseObj(!1,e);case pt._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case pt._class:return this.parseClass(this.startNode(),!1);case pt._new:return this.parseNew();case pt.backQuote:return this.parseTemplate();case pt._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},Kt.parseExprImport=function(){var e=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var t=this.parseIdent(!0);switch(this.type){case pt.parenL:return this.parseDynamicImport(e);case pt.dot:return e.meta=t,this.parseImportMeta(e);default:this.unexpected()}},Kt.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(pt.parenR)){var t=this.start;this.eat(pt.comma)&&this.eat(pt.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},Kt.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},Kt.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},Kt.parseParenExpression=function(){this.expect(pt.parenL);var e=this.parseExpression();return this.expect(pt.parenR),e},Kt.parseParenAndDistinguishExpression=function(e,t){var i,s=this.start,r=this.startLoc,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a,o=this.start,h=this.startLoc,c=[],l=!0,p=!1,u=new Dt,d=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==pt.parenR;){if(l?l=!1:this.expect(pt.comma),n&&this.afterTrailingComma(pt.parenR,!0)){p=!0;break}if(this.type===pt.ellipsis){a=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===pt.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,u,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(pt.parenR),e&&!this.canInsertSemicolon()&&this.eat(pt.arrow))return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=f,this.parseParenArrowList(s,r,c,t);c.length&&!p||this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(u,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,c.length>1?((i=this.startNodeAt(o,h)).expressions=c,this.finishNodeAt(i,"SequenceExpression",m,g)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(s,r);return y.expression=i,this.finishNode(y,"ParenthesizedExpression")}return i},Kt.parseParenItem=function(e){return e},Kt.parseParenArrowList=function(e,t,i,s){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,s)};var Jt=[];Kt.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(pt.dot)){e.meta=t;var i=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var s=this.start,r=this.startLoc,n=this.type===pt._import;return e.callee=this.parseSubscripts(this.parseExprAtom(),s,r,!0,!1),n&&"ImportExpression"===e.callee.type&&this.raise(s,"Cannot use new with import()"),this.eat(pt.parenL)?e.arguments=this.parseExprList(pt.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Jt,this.finishNode(e,"NewExpression")},Kt.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===pt.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value,cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),i.tail=this.type===pt.backQuote,this.finishNode(i,"TemplateElement")},Kt.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(i.quasis=[s];!s.tail;)this.type===pt.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(pt.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(pt.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")},Kt.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===pt.name||this.type===pt.num||this.type===pt.string||this.type===pt.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===pt.star)&&!ut.test(this.input.slice(this.lastTokEnd,this.start))},Kt.parseObj=function(e,t){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(pt.braceR);){if(s)s=!1;else if(this.expect(pt.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(pt.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,r,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")},Kt.parseProperty=function(e,t){var i,s,r,n,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(pt.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===pt.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(this.type===pt.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),a.argument=this.parseMaybeAssign(!1,t),this.type===pt.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(a,"SpreadElement"));this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(e||t)&&(r=this.start,n=this.startLoc),e||(i=this.eat(pt.star)));var o=this.containsEsc;return this.parsePropertyName(a),!e&&!o&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(a)?(s=!0,i=this.options.ecmaVersion>=9&&this.eat(pt.star),this.parsePropertyName(a,t)):s=!1,this.parsePropertyValue(a,e,i,s,r,n,t,o),this.finishNode(a,"Property")},Kt.parsePropertyValue=function(e,t,i,s,r,n,a,o){if((i||s)&&this.type===pt.colon&&this.unexpected(),this.eat(pt.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===pt.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,s);else if(t||o||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===pt.comma||this.type===pt.braceR||this.type===pt.eq)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=r),e.kind="init",t?e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key)):this.type===pt.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected();else{(i||s)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var h="get"===e.kind?0:1;if(e.value.params.length!==h){var c=e.value.start;"get"===e.kind?this.raiseRecoverable(c,"getter should have no params"):this.raiseRecoverable(c,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},Kt.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(pt.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(pt.bracketR),e.key;e.computed=!1}return e.key=this.type===pt.num||this.type===pt.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},Kt.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Kt.parseMethod=function(e,t,i){var s=this.startNode(),r=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Ot(t,s.generator)|(i?128:0)),this.expect(pt.parenL),s.params=this.parseBindingList(pt.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(s,"FunctionExpression")},Kt.parseArrowExpression=function(e,t,i,s){var r=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(16|Ot(i,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")},Kt.parseFunctionBody=function(e,t,i,s){var r=t&&this.type!==pt.braceL,n=this.strict,a=!1;if(r)e.body=this.parseMaybeAssign(s),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);n&&!o||(a=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var h=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!n&&!a&&!t&&!i&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,a&&!n),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=h}this.exitScope()},Kt.isSimpleParamList=function(e){for(var t=0,i=e;t<i.length;t+=1)if("Identifier"!==i[t].type)return!1;return!0},Kt.checkParams=function(e,t){for(var i=Object.create(null),s=0,r=e.params;s<r.length;s+=1){var n=r[s];this.checkLValInnerPattern(n,1,t?null:i)}},Kt.parseExprList=function(e,t,i,s){for(var r=[],n=!0;!this.eat(e);){if(n)n=!1;else if(this.expect(pt.comma),t&&this.afterTrailingComma(e))break;var a=void 0;i&&this.type===pt.comma?a=null:this.type===pt.ellipsis?(a=this.parseSpread(s),s&&this.type===pt.comma&&s.trailingComma<0&&(s.trailingComma=this.start)):a=this.parseMaybeAssign(!1,s),r.push(a)}return r},Kt.checkUnreserved=function(e){var t=e.start,i=e.end,s=e.name;this.inGenerator&&"yield"===s&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===s&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&"arguments"===s&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==s&&"await"!==s||this.raise(t,"Cannot use "+s+" in class static initialization block"),this.keywords.test(s)&&this.raise(t,"Unexpected keyword '"+s+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,i).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(s)&&(this.inAsync||"await"!==s||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+s+"' is reserved"))},Kt.parseIdent=function(e,t){var i=this.startNode();return this.type===pt.name?i.name=this.value:this.type.keyword?(i.name=this.type.keyword,"class"!==i.name&&"function"!==i.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(!!e),this.finishNode(i,"Identifier"),e||(this.checkUnreserved(i),"await"!==i.name||this.awaitIdentPos||(this.awaitIdentPos=i.start)),i},Kt.parsePrivateIdent=function(){var e=this.startNode();return this.type===pt.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),0===this.privateNameStack.length?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e),e},Kt.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===pt.semi||this.canInsertSemicolon()||this.type!==pt.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(pt.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},Kt.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Xt=Tt.prototype;Xt.raise=function(e,t){var i=Pt(this.input,e);t+=" ("+i.line+":"+i.column+")";var s=new SyntaxError(t);throw s.pos=e,s.loc=i,s.raisedAt=this.pos,s},Xt.raiseRecoverable=Xt.raise,Xt.curPosition=function(){if(this.options.locations)return new _t(this.curLine,this.pos-this.lineStart)};var Yt=Tt.prototype,Zt=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};Yt.enterScope=function(e){this.scopeStack.push(new Zt(e))},Yt.exitScope=function(){this.scopeStack.pop()},Yt.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},Yt.declareName=function(e,t,i){var s=!1;if(2===t){var r=this.currentScope();s=r.lexical.indexOf(e)>-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&1&r.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var n=this.currentScope();s=this.treatFunctionsAsVar?n.lexical.indexOf(e)>-1:n.lexical.indexOf(e)>-1||n.var.indexOf(e)>-1,n.functions.push(e)}else for(var a=this.scopeStack.length-1;a>=0;--a){var o=this.scopeStack[a];if(o.lexical.indexOf(e)>-1&&!(32&o.flags&&o.lexical[0]===e)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(e)>-1){s=!0;break}if(o.var.push(e),this.inModule&&1&o.flags&&delete this.undefinedExports[e],259&o.flags)break}s&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")},Yt.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Yt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Yt.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags)return t}},Yt.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags&&!(16&t.flags))return t}};var ei=function(e,t,i){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new Ct(e,i)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},ti=Tt.prototype;function ii(e,t,i,s){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=s),this.options.ranges&&(e.range[1]=i),e}ti.startNode=function(){return new ei(this,this.start,this.startLoc)},ti.startNodeAt=function(e,t){return new ei(this,e,t)},ti.finishNode=function(e,t){return ii.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},ti.finishNodeAt=function(e,t,i,s){return ii.call(this,e,t,i,s)},ti.copyNode=function(e){var t=new ei(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};var si,ri,ni="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",ai=ni+" Extended_Pictographic",oi={9:ni,10:ai,11:ai,12:"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS Extended_Pictographic EBase EComp EMod EPres ExtPict",13:"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS Extended_Pictographic EBase EComp EMod EPres ExtPict"},hi="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",ci="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",li=ci+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",pi=li+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",ui={9:ci,10:li,11:pi,12:"Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",13:"Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith"},di={};for(var fi=0,mi=[9,10,11,12,13];fi<mi.length;fi+=1)ri=void 0,(ri=di[si=mi[fi]]={binary:St(oi[si]+" "+hi),nonBinary:{General_Category:St(hi),Script:St(ui[si])}}).nonBinary.Script_Extensions=ri.nonBinary.Script,ri.nonBinary.gc=ri.nonBinary.General_Category,ri.nonBinary.sc=ri.nonBinary.Script,ri.nonBinary.scx=ri.nonBinary.Script_Extensions;var gi=Tt.prototype,yi=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":""),this.unicodeProperties=di[e.options.ecmaVersion>=13?13:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function bi(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function xi(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function vi(e){return e>=65&&e<=90||e>=97&&e<=122}function wi(e){return vi(e)||95===e}function Ei(e){return wi(e)||Si(e)}function Si(e){return e>=48&&e<=57}function ki(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function _i(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Ci(e){return e>=48&&e<=55}yi.prototype.reset=function(e,t,i){var s=-1!==i.indexOf("u");this.start=0|e,this.source=t+"",this.flags=i,this.switchU=s&&this.parser.options.ecmaVersion>=6,this.switchN=s&&this.parser.options.ecmaVersion>=9},yi.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},yi.prototype.at=function(e,t){void 0===t&&(t=!1);var i=this.source,s=i.length;if(e>=s)return-1;var r=i.charCodeAt(e);if(!t&&!this.switchU||r<=55295||r>=57344||e+1>=s)return r;var n=i.charCodeAt(e+1);return n>=56320&&n<=57343?(r<<10)+n-56613888:r},yi.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var i=this.source,s=i.length;if(e>=s)return s;var r,n=i.charCodeAt(e);return!t&&!this.switchU||n<=55295||n>=57344||e+1>=s||(r=i.charCodeAt(e+1))<56320||r>57343?e+1:e+2},yi.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},yi.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},yi.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},yi.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},gi.validateRegExpFlags=function(e){for(var t=e.validFlags,i=e.flags,s=0;s<i.length;s++){var r=i.charAt(s);-1===t.indexOf(r)&&this.raise(e.start,"Invalid regular expression flag"),i.indexOf(r,s+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},gi.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},gi.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,i=e.backReferenceNames;t<i.length;t+=1){var s=i[t];-1===e.groupNames.indexOf(s)&&e.raise("Invalid named capture referenced")}},gi.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},gi.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},gi.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!!(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},gi.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!i,!0}return e.pos=t,!1},gi.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},gi.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},gi.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var s=0,r=-1;if(this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue),e.eat(125)))return-1!==r&&r<s&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=i}return!1},gi.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},gi.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},gi.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1},gi.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},gi.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},gi.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},gi.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!xi(t)&&(e.lastIntValue=t,e.advance(),!0)},gi.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;-1!==(i=e.current())&&!xi(i);)e.advance();return e.pos!==t},gi.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t||(e.advance(),0))},gi.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},gi.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},gi.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=bi(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=bi(e.lastIntValue);return!0}return!1},gi.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,s=e.current(i);return e.advance(i),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(s=e.lastIntValue),function(e){return st(e,!0)||36===e||95===e}(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)},gi.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,s=e.current(i);return e.advance(i),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(s=e.lastIntValue),function(e){return rt(e,!0)||36===e||95===e||8204===e||8205===e}(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)},gi.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},gi.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU)return i>e.maxBackReference&&(e.maxBackReference=i),!0;if(i<=e.numCapturingParens)return!0;e.pos=t}return!1},gi.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},gi.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},gi.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},gi.regexp_eatZero=function(e){return 48===e.current()&&!Si(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},gi.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},gi.regexp_eatControlLetter=function(e){var t=e.current();return!!vi(t)&&(e.lastIntValue=t%32,e.advance(),!0)},gi.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var i,s=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(r&&n>=55296&&n<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=1024*(n-55296)+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=n}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&(i=e.lastIntValue)>=0&&i<=1114111)return!0;r&&e.raise("Invalid unicode escape"),e.pos=s}return!1},gi.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t||(e.lastIntValue=t,e.advance(),0))},gi.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1},gi.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(80===t||112===t)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1},gi.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,s),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,r),!0}return!1},gi.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){wt(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value")},gi.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},gi.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";wi(t=e.current());)e.lastStringValue+=bi(t),e.advance();return""!==e.lastStringValue},gi.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Ei(t=e.current());)e.lastStringValue+=bi(t),e.advance();return""!==e.lastStringValue},gi.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},gi.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},gi.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;!e.switchU||-1!==t&&-1!==i||e.raise("Invalid character class"),-1!==t&&-1!==i&&t>i&&e.raise("Range out of order in character class")}}},gi.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var i=e.current();(99===i||Ci(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var s=e.current();return 93!==s&&(e.lastIntValue=s,e.advance(),!0)},gi.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},gi.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!Si(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},gi.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},gi.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Si(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t},gi.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;ki(i=e.current());)e.lastIntValue=16*e.lastIntValue+_i(i),e.advance();return e.pos!==t},gi.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*i+e.lastIntValue:e.lastIntValue=8*t+i}else e.lastIntValue=t;return!0}return!1},gi.regexp_eatOctalDigit=function(e){var t=e.current();return Ci(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},gi.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var s=0;s<t;++s){var r=e.current();if(!ki(r))return e.pos=i,!1;e.lastIntValue=16*e.lastIntValue+_i(r),e.advance()}return!0};var Pi=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new Ct(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Ai=Tt.prototype;function Ii(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}function Oi(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}Ai.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Pi(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Ai.getToken=function(){return this.next(),new Pi(this)},"undefined"!=typeof Symbol&&(Ai[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===pt.eof,value:t}}}}),Ai.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(pt.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Ai.readToken=function(e){return st(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Ai.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},Ai.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var s=void 0,r=t;(s=mt(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())},Ai.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!ft(s);)s=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,i,this.curPosition())},Ai.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&gt.test(String.fromCharCode(e))))break e;++this.pos}}},Ai.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=e,this.value=t,this.updateContext(i)},Ai.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(pt.ellipsis)):(++this.pos,this.finishToken(pt.dot))},Ai.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(pt.assign,2):this.finishOp(pt.slash,1)},Ai.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,s=42===e?pt.star:pt.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++i,s=pt.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(pt.assign,i+1):this.finishOp(s,i)},Ai.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(pt.assign,3):this.finishOp(124===e?pt.logicalOR:pt.logicalAND,2):61===t?this.finishOp(pt.assign,2):this.finishOp(124===e?pt.bitwiseOR:pt.bitwiseAND,1)},Ai.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(pt.assign,2):this.finishOp(pt.bitwiseXOR,1)},Ai.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!ut.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(pt.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(pt.assign,2):this.finishOp(pt.plusMin,1)},Ai.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),i=1;return t===e?(i=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+i)?this.finishOp(pt.assign,i+1):this.finishOp(pt.bitShift,i)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(i=2),this.finishOp(pt.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Ai.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(pt.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(pt.arrow)):this.finishOp(61===e?pt.eq:pt.prefix,1)},Ai.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(pt.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(pt.assign,3):this.finishOp(pt.coalesce,2)}return this.finishOp(pt.question,1)},Ai.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,st(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(pt.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Oi(e)+"'")},Ai.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(pt.parenL);case 41:return++this.pos,this.finishToken(pt.parenR);case 59:return++this.pos,this.finishToken(pt.semi);case 44:return++this.pos,this.finishToken(pt.comma);case 91:return++this.pos,this.finishToken(pt.bracketL);case 93:return++this.pos,this.finishToken(pt.bracketR);case 123:return++this.pos,this.finishToken(pt.braceL);case 125:return++this.pos,this.finishToken(pt.braceR);case 58:return++this.pos,this.finishToken(pt.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(pt.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(pt.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Oi(e)+"'")},Ai.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)},Ai.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(ut.test(s)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if("["===s)t=!0;else if("]"===s&&t)t=!1;else if("/"===s&&!t)break;e="\\"===s}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var n=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(n);var o=this.regexpState||(this.regexpState=new yi(this));o.reset(i,r,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var h=null;try{h=new RegExp(r,a)}catch(e){}return this.finishToken(pt.regexp,{pattern:r,flags:a,value:h})},Ai.readInt=function(e,t,i){for(var s=this.options.ecmaVersion>=12&&void 0===t,r=i&&48===this.input.charCodeAt(this.pos),n=this.pos,a=0,o=0,h=0,c=null==t?1/0:t;h<c;++h,++this.pos){var l=this.input.charCodeAt(this.pos),p=void 0;if(s&&95===l)r&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===o&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===h&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=l;else{if((p=l>=97?l-97+10:l>=65?l-65+10:l>=48&&l<=57?l-48:1/0)>=e)break;o=l,a=a*e+p}}return s&&95===o&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===n||null!=t&&this.pos-n!==t?null:a},Ai.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);return null==i&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(i=Ii(this.input.slice(t,this.pos)),++this.pos):st(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(pt.num,i)},Ai.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var i=this.pos-t>=2&&48===this.input.charCodeAt(t);i&&this.strict&&this.raise(t,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&110===s){var r=Ii(this.input.slice(t,this.pos));return++this.pos,st(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(pt.num,r)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=!1),46!==s||i||(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||i||(43!==(s=this.input.charCodeAt(++this.pos))&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),st(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n,a=(n=this.input.slice(t,this.pos),i?parseInt(n,8):parseFloat(n.replace(/_/g,"")));return this.finishToken(pt.num,a)},Ai.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Ai.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===e)break;92===s?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(!1),i=this.pos):8232===s||8233===s?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(ft(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(i,this.pos++),this.finishToken(pt.string,t)};var Ti={};function Ni(...e){var t=qe(e.pop()||"");let i=Di(t),s=new Fe(Ni.compilerParams).generate(i);return Li(this,s,e,{},t)}Ai.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Ti)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Ai.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Ti;this.raise(e,t)},Ai.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==pt.template&&this.type!==pt.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(pt.template,e)):36===i?(this.pos+=2,this.finishToken(pt.dollarBraceL)):(++this.pos,this.finishToken(pt.backQuote));if(92===i)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(ft(i)){switch(e+=this.input.slice(t,this.pos),++this.pos,i){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(i)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Ai.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(pt.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Ai.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Oi(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;return this.invalidStringToken(i,"Invalid escape sequence in template string"),null}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),"0"===s&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return ft(t)?"":String.fromCharCode(t)}},Ai.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return null===i&&this.invalidStringToken(t,"Bad character escape sequence"),i},Ai.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(rt(r,s))this.pos+=r<=65535?1:2;else{if(92!==r)break;this.containsEsc=!0,e+=this.input.slice(i,this.pos);var n=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?st:rt)(a,s)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=Oi(a),i=this.pos}t=!1}return e+this.input.slice(i,this.pos)},Ai.readWord=function(){var e=this.readWord1(),t=pt.name;return this.keywords.test(e)&&(t=ct[e]),this.finishToken(t,e)},Tt.acorn={Parser:Tt,version:"8.7.0",defaultOptions:At,Position:_t,SourceLocation:Ct,getLineInfo:Pt,Node:ei,TokenType:nt,tokTypes:pt,keywordTypes:ct,TokContext:qt,tokContexts:Gt,isIdentifierChar:rt,isIdentifierStart:st,Token:Pi,isNewLine:ft,lineBreak:ut,lineBreakG:dt,nonASCIIwhitespace:gt},Ni.parserParams={ecmaVersion:"2020",allowReturnOutsideFunction:!0,allowAwaitOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveParens:!1},Ni.compilerParams={globalsNoObserve:[],globalsOnlyPaths:!1,compact:2},Ni.runtimeParams={},Ni.clone=function(e,t=null,i={},s={}){if("function"!=typeof e)throw new Error(`Expected argument 1 to be of type 'function' but got ${typeof e}.`);if(!e.name)throw new Error("Function must have a name.");let r,n=qe(e.toString().trim()),a=n;if(n.startsWith("async ")&&(r=!0,a=a.substring(6)),!a.startsWith("function ")&&!a.startsWith("function(")){if(a.trim().startsWith("[")){let t,i=a.split(/\](?:[\s]+)?\(/g).filter((e=>e));[t,a]=i.reduce(((t,s,r)=>{if(Array.isArray(t))return t;s=`${t}${s||""}]`;try{return Di(s),[s,`${e.name}(${i.slice(r+1).join("] (")}`]}catch(e){return`${s} (`}}),"")}a="function "+a}let o=Di(a).body[0],h=o.body.start+1;"\n"===a.substr(h,1)&&(h+=1);let c=new Fe({...i,...Ni.compilerParams,locStart:-h}),l=o.params.map((e=>c.serialize(e))),p=c.generate({type:"Program",body:o.body.body});!p.graph.hoistedAwaitKeyword&&r&&(p.graph.hoistedAwaitKeyword=!0);let u=a.substring(h,o.body.end-1);return Li(t,p,l,s,u,e.name)};const Li=function(e,t,i=[],s={},r=null,n=null){let a=He.create(t,i,{...s,...Ni.runtimeParams}),o=function(...t){return a.call(this||e,...t)};o.signal=a.signal.bind(a),o.dispose=a.dispose.bind(a),Object.defineProperty(o,"runtime",{value:a}),Object.defineProperty(o,"subscriptSource",{configurable:!0,value:t.source}),Object.defineProperty(o,"originalSource",{configurable:!0,value:r}),Object.defineProperty(o,"length",{configurable:!0,value:i.length}),Object.defineProperty(o,"name",{configurable:!0,value:n});let h=(t.graph.hoistedAwaitKeyword?"async ":"")+"function"+(n?" "+n:"");return o.toString=()=>`${h}(${i.join(", ")}) {${r}}`,o},Mi=new Map,Di=function(e,t={}){let i=Mi.get(e);var s,r;return i||(s=e,r={...Ni.parserParams,...t},i=Tt.parse(s,r),Mi.set(e,i)),i};function Vi(e){return!Array.isArray(e)&&"object"==typeof e&&e}function ji(){if(!(Vi(this)&&this.window||"undefined"!=typeof window))throw new Error("A window context is required.");const e=Vi(this)&&this.window?this.window:window;if(e.WebQit||(e.WebQit={}),!e.WebQit.window){let t,i;Object.defineProperty(e.WebQit,"window",{get:()=>e}),Object.defineProperty(e.WebQit,"vendor",{value:{getName:()=>(t||(t=function(e){if(void 0!==e.InstallTrigger)return"firefox";if(/constructor/i.test(e.HTMLElement)||"[object SafariRemoteNotification]"===(!e.safari||void 0!==e.safari&&e.safari.pushNotification).toString())return"safari";var t=!(!e.chrome||!e.chrome.webstore&&!e.chrome.runtime),i=t&&-1!=e.navigator.userAgent.indexOf("Edg"),s=!!e.opr&&!!e.opr.addons||!!e.opera||e.navigator.userAgent.indexOf(" OPR/")>=0,r=!!e.document.documentMode,n=!r&&!!e.StyleMedia;return(t||s)&&e.CSS,n?"edge":r?"ie":s?"opera":i?"ie-chromium":t?"chrome":"unknown"}(e)),t),getPrefix:()=>(i||(i=function(e){var t=e.getComputedStyle(e.document.documentElement,""),i=(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.Olink&&["","o"])[1];return{api:("WebKit|Moz|Ms|O".match(new RegExp("("+i+")","i"))||[])[1],prefix:i,css:"-"+i+"-"}}(e)),i)}})}return e.WebQit}class Ri{constructor(e,t=!0){this.window=e,this.async=t,this.readCallbacks=[],this.writeCallbacks=[],this._run()}_run(){this.window.requestAnimationFrame((()=>{this.readCallbacks.forEach(((e,t)=>{e&&!e()&&(this.readCallbacks[t]=null)})),this.writeCallbacks.forEach(((e,t)=>{e&&!e()&&(this.writeCallbacks[t]=null)})),this._run()}))}onread(e,t=!1){if(t)return new Promise(((t,i)=>{!1===this.async?e(t,i):this.readCallbacks.push((()=>{e(t,i)}))}));!1===this.async?e():this.readCallbacks.push(e)}onwrite(e,t=!1){if(t)return new Promise(((t,i)=>{!1===this.async?e(t,i):this.writeCallbacks.push((()=>{e(t,i)}))}));!1===this.async?e():this.writeCallbacks.push(e)}cycle(e,t,i){this.onread((()=>{var s=e(i);if(s){var r=s=>{this.onwrite((()=>{var r=t(s,i);if(r){var n=i=>{this.cycle(e,t,i)};r instanceof Promise?r.then(n):n()}}))};s instanceof Promise?s.then(r):r()}}))}}function Bi(e){return e instanceof String||"string"==typeof e&&null!==e}function Fi(e){return Array.isArray(e)}function Wi(e){return arguments.length&&(void 0===e||void 0===e)}function Ui(e){return null===e||""===e}function $i(e){return"function"==typeof e}function Hi(e){return Array.isArray(e)||"object"==typeof e&&e||$i(e)}function qi(e,t=!0){return Fi(e)?e:!t&&Vi(e)?[e]:!1!==e&&0!==e&&function(e){return Ui(e)||Wi(e)||!1===e||0===e||Hi(e)&&!Object.keys(e).length}(e)?[]:function(e){return!Bi(e)&&!Wi(e.length)}(e)?Array.prototype.slice.call(e):Vi(e)?Object.values(e):[e]}function Gi(e){const t=ji.call(this);t.DOM.isDOMReady||"complete"===t.window.document.readyState?e(t.window):(t.window.domReadyCallbacks||(t.window.domReadyCallbacks=[],t.window.document.addEventListener("DOMContentLoaded",(()=>{t.DOM.isDOMReady=!0,t.window.domReadyCallbacks.splice(0).forEach((e=>e(t.window)))}),!1)),t.window.domReadyCallbacks.push(e))}class zi{constructor(e){this.window=e}onAdded(e,t,i={}){return i.on="added",this.onPresenceChange(e,((e,i,s,r,n)=>{t(e,i,s,r,n)}),i)}onRemoved(e,t,i={}){return i.on="removed",this.onPresenceChange(e,((e,i,s,r,n)=>{t(e,i,s,r,n)}),i)}onPresent(e,t,i={}){Gi.call(this.window,(()=>{this.window.MutationObserver&&this.onAdded(e,((e,i)=>{e.forEach((e=>t(e,i)))}),i),Bi(e)?qi(this.window.document.querySelectorAll(e)).forEach((e=>t(e,1))):e.parentNode&&t(e,1)}))}onAbsent(e,t,i={}){Gi.call(this.window,(()=>{this.window.MutationObserver&&onRemoved(e,((e,i)=>{e.forEach((e=>t(e,i)))}),i),Bi(e)?0===qi(this.window.document.querySelectorAll(e)).length&&t(null,0):e.parentNode||t(e,0)}))}onPresenceChange(e,t,i={}){e=qi(e,!1);var s=new Set,r=new Set,n=(n,a,o)=>{a&&"removed"===i.on||!a&&"added"===i.on||(n=((e,t)=>(t.$$searchCache||(t.$$searchCache=new Map),e.reduce(((e,s)=>{var r;return t.$$searchCache.has(s)?r=t.$$searchCache.get(s):(r=((e,t)=>{if(t=t.filter((e=>e.matches)),Bi(e)){var s=t.filter((t=>t.matches(e)));if(!1!==i.observeIndirectMutation&&(s=t.reduce(((t,i)=>t.concat(qi(i.querySelectorAll(e)))),s)).length)return s}else{if(t.includes(e))return[e];if(!1!==i.observeIndirectMutation&&t.length)for(var r=e;r=r.parentNode;)if(t.includes(r))return[e]}})(s,t,Bi(s))||[],t.$$searchCache.set(s,r)),e.concat(r)}),[])))(e,n)).length&&(i.maintainCallState?(n.forEach((e=>{a?(s.add(e),r.delete(e)):(s.delete(e),r.add(e))})),t(n,a,o,s,r)):t(n,a,o))},a=i.context||this.window.document.documentElement;return this._observe(a,((e,t,s,r)=>{i.ignoreTransients||(n(e,0,!0),n(e.concat(t),1,!0),n(t,0,!0)),n(r,0),n(s,1)}))}onAttrChange(e,t,i=[]){var s=new this.window.MutationObserver(t),r={attributes:!0,attributeOldValue:!0};return i&&(r.attributeFilter=i),s.observe(e,r),s}onTreeChange(e,t,i=!1){var s=new this.window.MutationObserver(t),r={childList:!0,subtree:i};return s.observe(e,r),s}onMutation(e,t,i){var s=new this.window.MutationObserver(t);return s.observe(e,i),s}_observe(e,t){if(!Ki.has(e)){const t=new Set,i=new this.window.MutationObserver((e=>{if(t.size){var i=e.reduce(((e,t)=>e.concat(qi(t.addedNodes))),[]),s=e.reduce(((e,t)=>e.concat(qi(t.removedNodes))),[]),r=[],n=[];i=new Set(i),s=new Set(s),i.forEach((e=>{s.has(e)&&(s.delete(e),i.delete(e),e.isConnected?r.push(e):n.push(e))})),i=[...i],s=[...s],t.forEach((e=>e(r,n,i,s)))}}));i.observe(e,{childList:!0,subtree:!0}),Ki.set(e,{callbacks:t,observer:i})}const i=Ki.get(e);return i.callbacks.add(t),{disconnect(){i.callbacks.delete(t)},reconnect(){i.callbacks.add(t)}}}}const Ki=new Map;function Qi(e,t=null,i=!1){const s=ji.call(this);if(Bi(e)){var r;if(e.trim().startsWith("<")){var n=s.window.document.createElement("div");n.innerHTML=e,r=i?qi(n.children):n.firstChild}else r=i?qi(Yi.call(this,e,t)):Xi.call(this,e,t);return r}return e instanceof s.window.Element?i?[e]:e:i?qi(e):e}function Ji(e,t=null){return Qi.call(this,e,t,!0)}function Xi(e,t=null,i=!1){const s=ji.call(this);t=t||s.window.document;var r,n=i?"querySelectorAll":"querySelector";try{r=t[n](e)}catch(i){try{r=t[n](e.replace(/\:is\(/g,":matches("))}catch(i){try{r=t[n](e.replace(/\:is\(/g,":-webkit-any("))}catch(i){try{r=t[n](e.replace(/\:is\(/g,":-moz-any("))}catch(e){throw e}}}}return r}function Yi(e,t=null){return Xi.call(this,e,t,!0)}function Zi(e){return function(e){return e instanceof Number||"number"==typeof e}(e)||!0!==e&&!1!==e&&null!==e&&""!==e&&!isNaN(1*e)}function es(e){return $i(e)||e&&"[object function]"==={}.toString.call(e)}function ts(e,t,i={},s={}){t=qi(t).slice();for(var r=e;!Wi(r)&&!Ui(r)&&t.length;){var n=t.shift();if(!(i.get?i.get(r,n):Hi(r)?n in r:r[n]))return void(s.exists=!1);r=i.get?i.get(r,n):r[n]}return s.exists=!0,r}function is(e,t,i,s={},r={}){const n=(e,i,s)=>r.set?r.set(e,i,s):(Zi(t[o])&&Fi(e)?e.push(s):e[i]=s,!0);t=qi(t);for(var a=e,o=0;o<t.length;o++){if(!(o<t.length-1))return n(a,t[o],i);if(!a||!Hi(a)&&!es(a))return!1;var h=ts(a,t[o],r);if(!Hi(h)){if(!1===r.buildTree)return!1;if(h=es(r.buildTree)?r.buildTree(o):Zi(t[o+1])?[]:{},!n(a,t[o],h))return!1}a=h}}function ss(e,t,i=!1,s={}){t=qi(t);var r=!1;do{var n=""===(n=t.pop())?0:n,a=e;t.length&&(a=ts(e,t,{},s)),(Hi(a)||es(a))&&(s.has?s.has(a,n):n in a)&&(s.deleteProperty?r=s.deleteProperty(a,n):s.del?r=s.del(a,n):(delete a[n],r=!0))}while(r&&i&&t.length&&(Hi(a)||es(a))&&!(s.keys?s.keys(a):Object.keys(a)).length);return r}function rs(e,t,i={}){var s={};return ts(e,t,i,s),s.exists}function ns(e,t=!1){const i=ji.call(this);var s={};return!(s.el=i.window.document.head.querySelector('meta[name="oohtml"]'))&&t&&(s.el=i.window.document.createElement("meta"),s.el.setAttribute("name",e),i.window.document.head.append(s.el)),s.el&&(s.vars=(s.el.getAttribute("content")||"").split(";").filter((e=>e)).reduce(((e,t)=>{var i=t.split("=").map((e=>e.trim()));return is(e,i[0].split("."),"true"===i[1]||"false"!==i[1]&&(Zi(i[1])?parseInt(i[1]):i[1])),e}),{})),s.get=function(e){return ts(this.vars,e.split("."))},s.set=function(e,i=null,s=!1){var r=Vi(e)?e:{[e]:!0===i?"true":i};if(s=arguments.length<3?i:s,Object.keys(r).forEach((e=>{if(!1===r[e])ss(this.vars,e.split("."));else if(Vi(r[e]))Object.keys(r[e]).forEach((t=>{var i=(e+"."+t).split(".");s&&rs(this.vars,i)||is(this.vars,i,r[e][t])}));else{var t=e.split(".");s&&rs(this.vars,t)||is(this.vars,t,r[e])}})),t){const e=(t,i)=>Object.keys(i).reduce(((s,r)=>{var n=(t?t+".":"")+r;return Vi(i[r])?s.push(...e(n,i[r])):s.push(n+"="+i[r]),s}),[]);this.el.setAttribute("content",e("",this.vars).join(";"))}return!0},s.defaults=function(e,t=null){return this.set(e,t,!0)},s}function as(){const e=ji.call(this);return e.DOM||(e.DOM={},function(e){!function(e){e.CSS||(e.CSS={}),e.CSS.escape||(e.CSS.escape=e=>e.replace(/([\:@\~\$\&])/g,"\\$1"))}(e),function(e){"isConnected"in e.Node.prototype||Object.defineProperty(e.Node.prototype,"isConnected",{get:function(){return!(this.ownerDocument&&this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}})}(e),function(e){e.Element.prototype.matches||(e.Element.prototype.matches=e.Element.prototype.matchesSelector||e.Element.prototype.mozMatchesSelector||e.Element.prototype.msMatchesSelector||e.Element.prototype.oMatchesSelector||e.Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),i=t.length;--i>=0&&t.item(i)!==this;);return i>-1})}(e)}(e.window),e.DOM.reflow=new Ri(e.window),e.DOM.mutations=new zi(e.window),e.DOM.meta=ns.bind(e.window),e.DOM.query=Qi.bind(e.window),e.DOM.queryAll=Ji.bind(e.window),e.DOM.ready=Gi.bind(e.window)),e}function os(e,t,i=!1){for(var s=e.indexOf(t);s>-1&&(i||!1===i);)e.splice(s,1),i>0&&i--,s=e.indexOf(t);return e}function hs(e,t,i){return function(e,t){return function(e,t,i=!1){if(""==t)return e;var s=i?e.lastIndexOf(t):e.indexOf(t);return-1===s?e:e.substr(0,s)}(e,t,!0)}(function(e,t,i=!1){if(""==t)return e;var s=i?e.lastIndexOf(t):e.indexOf(t);return-1===s?"":e.substr(s+t.length)}(e,t),i)}const cs=function(e,t=1,i=!0){return!h(t)||t<=0?e:(!r(e)&&c(e)&&i&&(e=Object.values(e)),r(e)?e.reduce(((e,s)=>r(s)||c(s)&&i?e.concat(cs(r(s)?s:Object.values(s),t-1,i)):e.concat(s)),[]):e)},ls=cs;function ps(e){return c(e)&&Object.getPrototypeOf(e)===Object.prototype}function us(e){return!0===e||!1===e}const ds=function(e,t,i=!0,s=1){if(r(e)&&r(t)&&e.length!==t.length)return!i;if(c(e)&&c(t)){var n=Object.keys(e),h=Object.keys(t);if(!n.length&&!h.length)return ps(e)&&ps(t)?i:e===t===i;if(!ds(n,h))return!i}if(s>0&&(r(e)&&r(t)||c(e)&&c(t))){var l=function(e,t,i=!0,s=!0,n=!1,a=!1){if(r(e)&&r(t)){var o=[],h=!0;return e.forEach((e=>{if(h){var l=!1;S(t,((t,n)=>{(!l||s&&p(e))&&((r(l=i(e,n))&&!l.length||c(l)&&!Object.keys(l).length)&&(l=!1),p(l)&&s&&(e=l))})),p(l)?o.push(s?l:e):us(l)?n&&!l||!n&&l?o.push(e):a&&(h=!1):o.push(l)}})),o}if(c(e)&&c(t))return o={},h=!0,Object.keys(e).forEach((l=>{if(h){var u=i(e[l],t[l]);(r(u)&&!u.length||c(u)&&!Object.keys(u).length)&&(u=!1),p(u)?o[l]=s?u:e[l]:us(u)?n&&!u||!n&&u?o[l]=e[l]:a&&(h=!1):o[l]=u}})),o}(e,t,((e,t)=>ds(e,t,i,s-1)),!1,!1,!0);return r(l)?l.length===e.length&&l.length===t.length:c(l)&&c(e)?Object.keys(l).length===Object.keys(e).length&&Object.keys(l).length===Object.keys(t).length:l}return a(i)?i(e,t):o(e)&&o(t)&&isNaN(e)&&isNaN(t)?i:e===t===i},fs=ds;function ms(e,t=[]){return F([{},e],((e,i,s)=>{if(!a(s[e]))return a(t)?t(e):!r(t)||!t.length||t.indexOf(e)>-1}),!1,!1,!1)}class gs{static lex(e,t,i={}){if(!l(e+=""))throw new Error("Argument1 must be a string!");var s=e=>({delims:e.delims.slice(),options:ms(e.options),nesting:e.nesting.slice(),maxDepth:e.maxDepth,comments:e.comments.slice(),tokens:e.tokens.slice(),matches:e.matches.slice(),matchesi:ms(e.matchesi)});if(gs.$cache[e]&&!1!==i.cache)for(var r=0;r<gs.$cache[e].length;r++){var n=gs.$cache[e][r];if(fs(n.delims,t))return s(n)}var a=new gs(e,i).lex(t);return!1!==i.cache&&(gs.$cache[e]=gs.$cache[e]||[],gs.$cache[e].push(a)),s(a)}static split(e,t,i){return gs.lex(e,t,i).tokens}static match(e,t,i){return gs.lex(e,t,i).matches}constructor(e,t){if(!l(e))throw new Error("Lexer requires the first argument to be a string.");this.$str=e,this.$options=t||{},this.$options.blocks||(this.$options.blocks=gs.$blocks),this.$options.quotes||(this.$options.quotes=gs.$quotes),this.$options.comments||(this.$options.comments=gs.$comments)}lex(e,t){for(var i={delims:d(e),options:W(!0,{},this.$options,t||{}),nesting:[],maxDepth:0,comments:[],tokens:[],matches:[],matchesi:{}},s=0;"number"==typeof s;)s=this._evalCharsAt(i,s);if(i.nesting.length)throw new Error("Error parsing the string: "+this.$str+". Unterminated blocks: "+ls(i.nesting).join(", "));return i}_evalCharsAt(e,t){if(!(t>=this.$str.length)){var i=1,s={},r={},n={};if(e.openComment||(r=this._testQuotes(e,t)),e.openQuote||(s=this._testComments(e,t)),e.openComment||s.ending)e.nesting.length||n.ending?this._push(e,this.$str[t]):(i=(o=s.starting||s.ending||this.$str[t]).length,this._push(e,o,"comments",s.starting));else if(e.openQuote||r.ending)this._push(e,this.$str[t]);else{if(e.options.limit&&e.matches.length===e.options.limit)return this._push(e,this.$str[t]),t+1;n=this._testNesting(e,t),n=this._testNesting(e,t);var a=this._testChars(e.options.stopChars||[],e,t);if(!e.nesting.length&&!1!==a)return e.options.stopChar=a,void(e.options.stopCharForward=this.$str.substr(t));if(e.delims.length)if(e.nesting.length||n.ending){var o;i=(o=n.starting||n.ending||this.$str[t]).length,this._push(e,o)}else{this._push(e,"");var h=this._testChars(e.delims,e,t);if(!1!==h&&(e.matches.push(h),e.matchesi[t]=h,i=h.length||1,!e.options.preserveDelims)){var c=t+(h.length||1);return c===this.$str.length&&this._push(e,""),c}this._push(e,h||this.$str[t])}else 2===e.nesting.length&&n.starting?(e.matches.push(null),this._push(e,n.starting),i=n.starting.length):!e.nesting.length&&n.ending?(this._push(e,n.ending),i=n.ending.length,e.matches.push(null)):this._push(e,this.$str[t])}return t+i}}_testQuotes(e,t){var i={};return(e.options.quotes||[]).forEach((s=>{this.$str.substr(t,1)===s&&(e.openQuote?s===e.openQuote&&(e.openQuote=!1,i.ending=s):(e.openQuote=s,i.starting=s))})),i}_testComments(e,t){var i={};return(e.options.comments||[]).forEach((s=>{if(e.openComment){if(T(s)===T(e.openComment)){var r=T(s);this.$str.substr(t).startsWith(r)&&(e.openComment=!1,i.ending=r)}}else{var n=O(s);this.$str.substr(t).startsWith(n)&&(e.openComment=s,i.starting=n)}})),i}_testNesting(e,t){var i={};return(e.options.blocks||[]).forEach((s=>{var r=O(s);if(this.$str.substr(t).startsWith(r))e.nesting=e.nesting.concat([s]),i.starting=r;else if(e.nesting.length&&T(s)===T(T(e.nesting))){var n=T(s);this.$str.substr(t).startsWith(n)&&(e.nesting=e.nesting.slice(0,-1),i.ending=n)}})),e.maxDepth=Math.max(e.maxDepth,e.nesting.length),i}_testChars(e,t,i){for(var s=0;s<e.length;s++){var r=e[s];if(a(r)){var n=r(this.$str.substr(0,i),this.$str.substr(i),t.tokens.slice());if(!1!==n)return n}if(t.options.useRegex){var o=this.$str.substr(i).match(new RegExp("^"+r,!0!==t.options.useRegex?t.options.useRegex:""));if(o)return o[0]}if(!t.options.ci&&this.$str.substr(i,r.length)===r||t.options.ci&&this.$str.substr(i,r.length).toLowerCase()===r.toLowerCase())return r}return!1}_push(e,t,i="tokens",s=!1){var r=e.matches.length;if(u(e.tokens[r])&&(e.tokens[r]=""),"comments"===i){e.tokens[r].comments||(e.tokens[r]=new String(e.tokens[r]),e.tokens[r].comments=[]);var n=e.tokens[r].comments.length-(!e.tokens[r].comments.length||s?0:1);e.tokens[r].comments[n]=(e.tokens[r].comments[n]||"")+t}else e.tokens[r].comments,e.tokens[r]=e.tokens[r]+t}split(e,t,i){return this.lex(t,i).tokens}match(e,t,i){return this.lex(t,i).matches}regParse(e,t){return this.lex(e,W({useRegex:!0},t||{}))}regSplit(e,t){return this.regParse(e,t).tokens}regMatch(e,t){return this.regParse(e,t).matches}}function ys(e,t={}){const i=as.call(this);return i.OOHTML||(i.OOHTML={}),i.OOHTML.meta||(i.OOHTML.meta=i.DOM.meta("oohtml",!0)),i.OOHTML.meta.defaults(W(3,e,t)),i.OOHTML.meta}function bs(e,t,i,s=null){var r=t.split("#")[0].split("/").map((e=>e.trim())).filter((e=>e));return Es(e,r,i,s)}function xs(e){var t=gs.split(e.trim(),[":"]);return[e=t.shift(),t.reduce(((e,t)=>{var[i,s]=gs.split(t.trim(),[]);return e[i]=hs(s,"(",")"),e}),{})]}gs.$blocks=[["(",")"],["[","]"],["{","}"]],gs.$quotes=['"',"'","`"],gs.$comments=[["/*","*/"],["//","\n"]],gs.$cache=Object.create(null);const vs=(e,t)=>gs.split(e.trim(),["|","+"],{preserveDelims:!0}).reduce(((e,i)=>{var s;return(i.startsWith("|")||i.startsWith("+"))&&(s=i.substr(0,1),i=i.substr(1).trim()),e.theEnd||"|"===s&&e.length?(e.theEnd=!0,e):e.concat(t(i.trim()))}),[]).filter((e=>e)),ws=(e,t,i)=>{const s=e=>e.reduce(((e,t)=>e.concat(...i(t).values())),[]);return vs(t,(t=>{var[t,r]=xs(t);return e.reduce(((e,n)=>{var a=i(n);"*"===t&&(t="("+a.keys().join("+")+")");var o,h=("(",")",(o=t).startsWith("(")&&o.endsWith(")")?ws([n],hs(t,"(",")"),i):d(a.get(t),!1)),c=[];return Object.keys(r).forEach((e=>{if("deep"===e||"deepest"===e)for(var a=[n];("deepest"===e||!h.length)&&(a=s(a)).length;){var o=ws(a,`${t}${c.map((e=>`:${e}(${r[e]})`)).join("")}`,i);o.length&&(h=o)}else"having"!==e&&"not-having"!==e||(h=h.filter((t=>{var s=vs(r[e],(e=>i(t,e)));return"not-having"===e?!s.length:s.length}))),c.push(e)})),e.concat(h)}),[])}))},Es=function(e,t,i,s=null,r=0){if(!t.length)return[];var n,a=t.shift();a.endsWith(".")&&(n=!0,a=a.substr(0,a.length-1).trim());var o=ws(e,a,i);if(o.length&&n)return o;if(t.length){var h=Es(o,t.slice(),i,s,r+1);return-1===h?s(o,r,!0):h}return s?s(o,r):o};function Ss(e=null,t=!1){const i=as.call(this);if(t)return void i.DOM.ready((()=>{Ss.call(this,e,!1)}));const r=i.window,n=i.window.document,a=i.DOM.mutations,o=ys.call(this,{element:{template:"",export:"export",import:"import"},attr:{moduleid:"name",moduleref:"template",exportid:"name",exportgroup:"exportgroup"},api:{templateClass:"",templates:"templates",exports:"exports",moduleref:"template"}},e),h="template"+(o.get("element.template")?'[is="'+o.get("element.template")+'"]':"")+"["+r.CSS.escape(o.get("attr.moduleid"))+"]";var c=r.HTMLTemplateElement;if(o.get("api.templateClass")){if(!r[o.get("api.templateClass")])throw new Error('The custom element class "'+o.get("api.templateClass")+'" is not defined!');c=r[o.get("api.templateClass")]}const l=(e,t,i)=>{"templatemutation"===e&&(["addedExports","removedExports"].forEach((e=>{Object.defineProperty(t,e,{value:Object.keys(t[e]).map((i=>({name:i,items:t[e][i]})))})})),["addedTemplates","removedTemplates"].forEach((e=>{Object.defineProperty(t,e,{value:Object.keys(t[e]).map((i=>({name:i,item:t[e][i]})))})}))),Object.defineProperty(t,"path",{value:i}),n.dispatchEvent(new r.CustomEvent(e,{detail:t}))},p=(e,t)=>{const i=i=>{e.dispatchEvent(new r.CustomEvent(i,{detail:{path:t}}))};var s=e.getAttribute("src");return new Promise(((n,a)=>{r.fetch?r.fetch(s).then((e=>e.ok?e.text():Promise.reject(e.statusText))).then((s=>{e.innerHTML=s,i("load"),l("templatecontentloaded",{template:e},t),n(e)})).catch((r=>{console.error("Error fetching the bundle at "+s+". ("+r+")"),e.innerHTML="",i("loaderror"),l("templatecontentloaderror",{template:e},t),n(e)})):(n(),console.error("Error fetching the bundle at "+s+". (window.fetch() not supported by browser.)"))}))},u=(e,t,i,n=null,c=!0)=>{const m=(e,r,n,a)=>{var c;if(e.matches)if(e.matches(h)&&(c=e.getAttribute(o.get("attr.moduleid")))&&g(c)){var l=(i?i+"/":"")+c;"removed"===n?(s(t,"oohtml","templates").delete(c),s(t,"oohtml").get("parentTemplate")===t&&s(t,"oohtml").delete("parentTemplate"),r&&(r.removedTemplates[c]=e)):"added"===n&&(s(t,"oohtml","templates").set(c,e),s(e,"oohtml").set("parentTemplate",t),r&&(r.addedTemplates[c]=e)),u(e.content,e,l,n,a)}else{const i=e=>{var i=e.getAttribute(o.get("attr.exportgroup"))||"default";"removed"===n?s(t,"oohtml","exports").has(i)&&(os(s(t,"oohtml","exports").get(i),e),s(t,"oohtml","exports").has(i).length||s(t,"oohtml","exports").delete(i),r&&(r.removedExports[i]||(r.removedExports[i]=[]),r.removedExports[i].push(e))):"added"===n&&(s(t,"oohtml","exports").has(i)||s(t,"oohtml","exports").set(i,[]),s(t,"oohtml","exports").get(i).push(e),r&&(r.addedExports[i]||(r.addedExports[i]=[]),r.addedExports[i].push(e)))};if(e.matches(o.get("element.export"))){var p=e.getAttribute(o.get("attr.exportid"))||"default";d(e.children).forEach((e=>{e.setAttribute(o.get("attr.exportgroup"),p),i(e)}))}else i(e)}};t.modulemutationsType=n;const y={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};if(d(e.children).forEach((e=>m(e,y,n,c))),c&&l("templatemutation",y,i),"added"===n&&!s(t,"oohtml").get("onLiveMode")){s(t,"oohtml").set("onLiveMode",!0),t.getAttribute("src")&&!t.content.children.length&&f.push(p(t,i)),a.onAttrChange(t,(e=>{e[0].target.getAttribute(e[0].attributeName)!==e[0].oldValue&&p(t,i)}),["src"]);var b=new r.MutationObserver((e=>{const t={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};e.forEach((e=>{e.addedNodes.forEach((e=>m(e,t,"added",!0))),e.removedNodes.forEach((e=>m(e,t,"removed",!0)))})),l("templatemutation",t,i)}));b.observe(e,{childList:!0})}};if(o.get("api.templates")in n)throw new Error('document already has a "'+o.get("api.templates")+'" property!');const f=[];if(Object.defineProperty(n,o.get("api.templates"),{get:function(){return m(s(n,"oohtml","templates"))}}),o.get("api.templates")in c.prototype)throw new Error('The "HTMLTemplateElement" class already has a "'+o.get("api.templates")+'" property!');if(Object.defineProperty(c.prototype,o.get("api.templates"),{get:function(){return m(s(this,"oohtml","templates"))}}),o.get("api.exports")in c.prototype)throw new Error('The "HTMLTemplateElement" class already has a "'+o.get("api.exports")+'" property!');Object.defineProperty(c.prototype,o.get("api.exports"),{get:function(){return m(s(this,"oohtml","exports"))}});const m=e=>Object.defineProperties({},Array.from(e.keys()).reduce(((t,i)=>(t[i]={get:()=>e.get(i)},t)),{})),g=e=>{var t;return!(t=e.match(/([^a-zA-Z0-9\_\-\@])/))||(console.error(`Invalid character "${t}" in the module name: ${e}.`),!1)};if(d(n.querySelectorAll(h)).forEach((async e=>{var t=e.getAttribute(o.get("attr.moduleid"));!e.closest(o.get("element.import"))&&g(t)&&(s(n,"oohtml","templates").set(t,e),u(e.content,e,t,"added",!1))})),a.onPresenceChange(h,(async(e,t)=>{const i={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};e.forEach((e=>{var r=e.getAttribute(o.get("attr.moduleid"));!e.closest(o.get("element.import"))&&g(r)&&(t?(s(n,"oohtml","templates").set(r,e),u(e.content,e,r,"added"),i.addedTemplates[r]=e):(s(n,"oohtml","templates").get(r)===e&&s(n,"oohtml","templates").delete(r),u(e.content,e,r,"removed"),i.removedTemplates[r]=e))})),l("templatemutation",i,"")})),a.onPresent(o.get("element.import"),(e=>{u(e,e,"","added",!1)})),o.get("api.moduleref")in r.Element.prototype)throw new Error('The "Element" class already has a "'+o.get("api.moduleref")+'" property!');Object.defineProperty(r.Element.prototype,o.get("api.moduleref"),{get:function(){var e;if(!s(this,"oohtml").has("module")&&(e=this.getAttribute(o.get("attr.moduleref")))){var t=(e=>{var t=n.createElement("template");return bs([n],e,(function(e,t){var i=s(e,"oohtml","templates");return 1===arguments.length?i:t.startsWith(":")?s(e,"oohtml","exports").get(t.substr(1)):i.get(t)})).forEach((e=>{s(e,"oohtml","templates").forEach(((e,i)=>{s(t,"oohtml","templates").set(i,e)})),s(e,"oohtml","exports").forEach(((e,i)=>{s(t,"oohtml","exports").has(i)||s(t,"oohtml","exports").set(i,[]),s(t,"oohtml","exports").get(i).push(...e)}))})),t})(e);s(this,"oohtml").set("module",t)}return s(this,"oohtml").get("module")}});var y=f.length?"loading":"indeterminate";Object.defineProperty(n,"templatesReadyState",{get:()=>y}),i.DOM.ready.call(i,(()=>(f.forEach((e=>{e.catch((e=>{console.warn(e)}))})),Promise.all(f).then((()=>{y="complete",n.dispatchEvent(new r.Event("templatesreadystatechange"))})))))}function ks(e,t,i=null){return r(t)?e.filter((e=>i?t.filter((t=>i(e,t))).length:-1===t.indexOf(e))):[]}function _s(e=null,t=!1){const i=as.call(this);if(t)return void i.DOM.ready((()=>{_s.call(this,e,!1)}));const r=i.window,n=i.window.document,a=i.DOM.mutations,o=[],h=ys.call(this,{element:{import:"import"},attr:{importid:"name",exportsearch:"exportsearch"}},e);Cs.push(h.get("attr.importid"),h.get("attr.moduleref"));const c="["+r.CSS.escape(h.get("attr.moduleref"))+"]",l="["+r.CSS.escape(h.get("attr.exportgroup"))+"]",p=class{static create(e){return new p(e)}constructor(e){this.el=e;const[t,i]=xs(e.getAttribute(h.get("attr.importid"))||"default");s(this.el,"oohtml").set("importID",t),s(this.el,"oohtml").set("importModifiers",i)}hydrate(e,t,i){s(this.el,"oohtml").set("anchorNode",e),s(this.el,"oohtml").set("slottedElements",t),s(this.el,"oohtml").set("compositionBlock",i),this._bindSlotted(t),this._connectToCompositionBlock()}connectedCallback(){s(this.el,"oohtml").has("anchorNode")||(s(this.el,"oohtml").set("anchorNode",h.get("isomorphic")?n.createComment(this.el.outerHTML):n.createTextNode("")),s(this.el,"oohtml").set("compositionBlock",this.el.hasAttribute(h.get("attr.moduleref"))?this.el.getAttribute(h.get("attr.moduleref")).trim().startsWith("~")?this.el.parentNode.closest(l):null:this.el.parentNode.closest(c)),this._connectToCompositionBlock()),i.DOM.ready.call(i,(()=>{this.resolve()}))}_connectToCompositionBlock(){this.compositionBlock&&s(this.compositionBlock,"oohtml","imports").set(this.importID,this.el)}_bindSlotted(e){e.forEach((e=>{e.importReference=this.el})),s(this.el,"oohtml").set("slottedObserver",a.onRemoved(e,((t,i,r,n,a)=>{a&&a.size===e.length&&s(this.el,"oohtml").get("slottedObserver").disconnect(),t.forEach((e=>{e.parentNode||os(this.slottedElements,e),e.importReference===this.el&&delete e.importReference})),this.slottedElements.length||this.anchorNode.isConnected&&this.anchorNode.replaceWith(this.el)}),{maintainCallState:!0,ignoreTransients:!0}))}resolve(){if(!N(o,(e=>this.el.closest(e)))){var e,t;if(this.el.hasAttribute(h.get("attr.moduleref")))this.compositionBlock&&s(this.compositionBlock,"oohtml","imports").get(this.importID)===this.el&&s(this.compositionBlock,"oohtml","imports").delete(this.importID),e=this.el;else{if(!this.compositionBlock)return void console.warn("Scoped slots must be found within template contexts. ["+this.importID+"]",this.el);e=this.compositionBlock}var i=e.getAttribute(h.get("attr.moduleref")).trim(),r=this.el.getAttribute(h.get("attr.exportsearch"));e&&(t=((e,t,i)=>{var r=this.importID,n=this.importModifiers,[a,o]="search"in n||null!==i?("search"in n?n.search:i).split("-").filter((e=>e)).map((e=>parseInt(e||0))).concat([0,1e3]):[0,0];return bs(e,t,(function(e,t){var i=s(e,"oohtml","templates");return 1===arguments.length?i:t.startsWith(":")?s(e,"oohtml","exports").get(t.substr(1)):i.get(t)}),(function(e,t,i){var n=e.reduce(((e,t)=>e.concat(s(t,"oohtml","exports").get(r)||[])),[]);return!n.length&&t>a&&o?(o--,-1):n}))})([i.startsWith("~")?this.compositionBlock:n],i,r)).length?ks(t,s(this.el,"oohtml").get("originalSlottedElements")||[]).length&&(s(this.el,"oohtml").set("originalSlottedElements",t),this.fill(t)):(s(this.el,"oohtml").set("originalSlottedElements",null),this.empty())}}fill(e){e=d(e,!1).map((e=>e.cloneNode(!0))),this.empty(!0),this.el.isConnected&&this.el.replaceWith(this.anchorNode),e.forEach((e=>{s(e,"oohtml","templates").set("~",this.el),function(e,t,i=[],s=!0){if(i=i.concat(Cs),e.hasAttribute("noinherit")&&(i=i.concat((e.getAttribute("noinherit")||"*").split(" ").map((e=>e.trim())))),oe(As.concat(["role","class"])).forEach((r=>{var n,a;if(!i.includes(r)&&!i.includes("*")&&(n=t.getAttribute(r))){if(a=e.getAttribute(r))var o=s?[a,n]:[n,a];else o=[n];e.setAttribute(r,oe(o.join(" ").split(" ").map((e=>e.trim()))).join(" ")),i.push(r)}})),oe(Ps.concat("style")).forEach((r=>{var n,a;if(!i.includes(r)&&!i.includes("*")&&(n=t.getAttribute(r))){if(a=e.getAttribute(r))(o=s?[a,n]:[n,a])[0].trim().endsWith(";")||(o[0]=o[0]+";");else var o=[n];e.setAttribute(r,o.join(" ")),i.push(r)}})),!i.includes("*"))for(var r=0;r<t.attributes.length;r++){var n=t.attributes[r];i.includes(n.name)||e.hasAttribute(n.name)&&!s||e.setAttribute(n.name,n.value)}}(e,this.el),e.getAttribute(h.get("attr.exportgroup"))||e.setAttribute(h.get("attr.exportgroup"),this.importID),this.anchorNode.before(e)})),this._bindSlotted(e),this.slottedElements.push(...e)}empty(e=!1){if(this.slottedElements){var t=this.slottedElements;e&&s(this.el,"oohtml").has("slottedObserver")&&(s(this.el,"oohtml").get("slottedObserver").disconnect(),t=this.slottedElements.splice(0)),t.forEach((e=>e.remove()))}}get importID(){return s(this.el,"oohtml").get("importID")}get importModifiers(){return s(this.el,"oohtml").get("importModifiers")}get anchorNode(){return s(this.el,"oohtml").get("anchorNode")}get compositionBlock(){return s(this.el,"oohtml").get("compositionBlock")}get slottedElements(){return s(this.el,"oohtml").has("slottedElements")||s(this.el,"oohtml").set("slottedElements",[]),s(this.el,"oohtml").get("slottedElements")}get exports(){return s(this.el,"oohtml").get("exports")}static get observedAttributes(){return[h.get("attr.importid")]}};a.onPresent(h.get("element.import"),(e=>{p.create(e).connectedCallback()}));const u=(e,t)=>{const i=(e,i)=>!t||i===t||!0===t&&(this.importModifiers&&"search"in this.importModifiers||e.getAttribute(h.get("attr.exportsearch")));if(e.matches(h.get("element.import"))){var r=p.create(e);r.connectedCallback(),i(e,r.importID)&&r.resolve()}else s(e,"oohtml","imports").forEach(((e,t)=>{i(e,t)&&p.create(e).resolve()}))};a.onPresent(c,(e=>{N(o,(t=>e.closest(t)))||a.onAttrChange(e,(t=>{t[0].target.getAttribute(t[0].attributeName)!==t[0].oldValue&&u(e)}),[h.get("attr.moduleref"),h.get("attr.importid")])})),n.addEventListener("templatemutation",(e=>{e.detail.path&&d(n.querySelectorAll("["+r.CSS.escape(h.get("attr.moduleref"))+"]")).forEach((t=>{(function(e,t){return t=t.split("#")[0].split("/").map((e=>e.trim())).filter((e=>e)),!!(e=e.split("#")[0].split("/").map((e=>e.trim())).filter((e=>e))).length&&e.reduce(((e,i,s)=>!!e&&gs.split(i.trim(),["|","+"]).reduce(((e,i)=>{var[i,r]=xs(i),n=(i=i.trim())===t[s];if(!n&&("deep"in r||"deepest"in r)){var a=t.slice(s+1).reduce(((e,t,s)=>e>-1&&"deep"in r?e:t===i?s:e),-1);a>-1&&(t.splice(s,a+1),n=!0)}return e||n}),!1)),!0)})(t.getAttribute(h.get("attr.moduleref")),e.detail.path)&&(u(t,!0),e.detail.addedExports.concat(e.detail.removedExports).forEach((e=>{u(t,e.name)})))}))})),i.DOM.ready.call(i,(()=>{h.get("isomorphic")&&d(n.querySelectorAll(l)).forEach((e=>{if(!s(e.parentNode,"oohtml").get("importsCan")){var t=[];e.parentNode.childNodes.forEach((e=>{var i;if(1===e.nodeType&&e.matches(l))t.push(e);else if(8===e.nodeType&&(i=e.nodeValue.trim())&&i.startsWith("<"+h.get("element.import"))&&i.endsWith("</"+h.get("element.import")+">")){var s,r=n.createElement("div");if(r.innerHTML=i,(s=r.firstChild).matches(h.get("element.import"))){var a=s.hasAttribute(h.get("attr.moduleref"))?s.getAttribute(h.get("attr.moduleref")).trim().startsWith("~")?e.parentNode.closest(l):null:e.parentNode.closest(c);p.create(s).hydrate(e,t,a),t=[]}}})),s(e.parentNode,"oohtml").set("importsCan",!0)}}))}))}const Cs=["nocompose"],Ps=[],As=[];function Is(e=null,t=!1){const i=as.call(this);if(t)return void i.DOM.ready((()=>{Is.call(this,e,!1)}));const r=i.window,n=i.window.document,a=i.DOM.mutations,o=[],h=ys.call(this,{attr:{namespace:"namespace",id:"id"},api:{namespace:"namespace"},eagermode:!0},e),c=function(e){if(!s(e,"oohtml").has("namespace")){const t=Object.create(null);s(e,"oohtml").set("namespace",t),he.link&&he.link(e,h.get("api.namespace"),t)}return s(e,"oohtml").get("namespace")},p=function(e){if(!s(e,"oohtml").has("publicNamespace")){const t=c(e);s(e,"oohtml").set("publicNamespace",h.get("eagermode")?new Proxy(t,{get(i,s){if(l(s)&&!t[s]){var a=d(e.querySelectorAll("["+r.CSS.escape(h.get("attr.id"))+'="'+s+'"]')).filter((t=>{var i=t.parentNode.closest("["+r.CSS.escape(h.get("attr.namespace"))+"]");return e===n?!i:i===e}))[0];a&&he.set(t,s,a)}return t[s]}}):t)}return s(e,"oohtml").get("publicNamespace")};if(h.get("api.namespace")in r.Element.prototype)throw new Error('The "Element" class already has a "'+h.get("api.namespace")+'" property!');if(Object.defineProperty(r.Element.prototype,h.get("api.namespace"),{get:function(){return p(this)}}),h.get("api.namespace")in n)throw new Error('The "document" object already has a "'+h.get("api.namespace")+'" property!');Object.defineProperty(n,h.get("api.namespace"),{get:function(){return p(n)}}),a.onPresent("["+r.CSS.escape(h.get("attr.id"))+"]",(e=>{var t=s(e,"oohtml");if(!t.get("idAlreadyBeingWatched")&&!N(o,(t=>e.closest(t)))){var i=e.getAttribute(h.get("attr.id")),l=e.parentNode.closest("["+r.CSS.escape(h.get("attr.namespace"))+"]");l||(l=n);var p=c(l);p[i]!==e&&he.set(p,i,e),t.set("idAlreadyBeingWatched",!0),a.onPresenceChange(e,((t,s)=>{s?p[i]!==e&&he.set(p,i,e):p[i]===e&&he.deleteProperty(p,i)}))}}))}function Os(e=null,t=!1){const i=as.call(this);if(t)return void i.DOM.ready((()=>{Os.call(this,e,!1)}));const r=i.window,n=i.window.document,a=ys.call(this,{api:{state:"state",setState:"setState",clearState:"clearState"}},e),o=function(e,t=null){if(!s(e,"oohtml").has("state")||t){const i=t||Object.create(null),r=s(e,"oohtml").get("state");if(s(e,"oohtml").set("state",i),r&&he.unlink&&he.unlink(e,a.get("api.state"),r),he.link){let s=t?{isUpdate:!!r,oldValue:r}:null;he.link(e,a.get("api.state"),i,s)}}return s(e,"oohtml").get("state")};if(a.get("api.state")in r.Element.prototype)throw new Error('The "Element" class already has a "'+a.get("api.state")+'" property!');if(Object.defineProperty(r.Element.prototype,a.get("api.state"),{get:function(){return he.proxy(o(this))}}),a.get("api.setState")in r.Element.prototype)throw new Error('The "Element" class already has a "'+a.get("api.setState")+'" property!');if(Object.defineProperty(r.Element.prototype,a.get("api.setState"),{value:function(e,t={}){if(t.update){var i=o(this);if("merge"!==t.update){var s=ks(Object.keys(i),Object.keys(e));he.deleteProperty(i,s)}he.set(i,e)}else o(this,e)}}),a.get("api.clearState")in r.Element.prototype)throw new Error('The "Element" class already has a "'+a.get("api.clearState")+'" property!');if(Object.defineProperty(r.Element.prototype,a.get("api.clearState"),{value:function(){o(this,{})}}),a.get("api.state")in n)throw new Error('The "document" object already has a "'+a.get("api.state")+'" property!');if(Object.defineProperty(n,a.get("api.state"),{get:function(){return he.proxy(o(n))}}),a.get("api.setState")in n)throw new Error('The "document" object already has a "'+a.get("api.setState")+'" property!');if(Object.defineProperty(n,a.get("api.setState"),{value:function(e,t={}){if(t.update){var i=o(n);if("merge"!==t.update){var s=ks(Object.keys(i),Object.keys(e));he.deleteProperty(i,s)}he.set(i,e)}else o(n,e)}}),a.get("api.clearState")in n)throw new Error('The "document" object already has a "'+a.get("api.clearState")+'" property!');Object.defineProperty(n,a.get("api.clearState"),{value:function(){o(n,{})}})}const Ts=e=>class extends e{static get subscriptMethods(){return["render"]}static get subscriptParams(){return{globalsAutoObserve:["document"]}}static implement(e,t){let i=s(e,"oohtml","subscript","console"),r=t.name;return r||(r=[...i.keys()].filter((e=>h(e))).length),i.set(r,t),t}static implementScript(e,t){let i=(t.textContent||"").trim();return this.implement(e,Ni.call(e,i))}static implementMethod(e,t){if("constructor"===t.name)throw new Error("Constructors cannot be subscript methods.");return this.implement(e,Ni.clone(t,e))}constructor(){super();const e=this.constructor;e.subscriptMethods.forEach((t=>{if(!this[t])return;let i=e.implementMethod(this,this[t]);this[t]=i})),"undefined"!=typeof WebQit&&WebQit.Observer&&(e.subscriptParams.globalsAutoObserve||[]).forEach((e=>{WebQit.Observer.link(globalThis,e,globalThis[e])}))}connectedCallback(){if("undefined"==typeof WebQit||!WebQit.Observer)return;const e=(e,t,i=[])=>{s(this,"oohtml","subscript","console").forEach((t=>t.signal(...e.map((e=>({...e,path:i.concat(e.path)}))))))};WebQit.Observer.observe(globalThis,e,{subtree:!0,tags:[this,"subscript-element","globals"],unique:!0}),WebQit.Observer.observe(this,(t=>e(t,0,["this"])),{subtree:!0,tags:[this,"subscript-element","this"],unique:!0}),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){s(this,"oohtml","subscript","console").forEach((e=>e.dispose())),"undefined"!=typeof WebQit&&WebQit.Observer&&(WebQit.Observer.unobserve(globalThis,null,null,{subtree:!0,tags:[this,"subscript-element","globals"]}),WebQit.Observer.unobserve(this,null,null,{subtree:!0,tags:[this,"subscript-element","this"]}),super.disconnectedCallback&&super.disconnectedCallback())}get subscriptConsole(){return s(this,"oohtml","subscript","console")}render(){}};function Ns(e=null,t=!1){const i=as.call(this);if(t)return void i.DOM.ready((()=>{Ns.call(this,e,!1)}));const r=i.DOM.mutations,n=ys.call(this,{selectors:{script:'script[type="subscript"]'},api:{bind:"bind",unbind:"unbind"},script:{}},e),a=Ts(class{}),o=new a;r.onPresent(n.get("selectors.script"),(e=>{let t=e.parentNode;if(!t)return;let i=s(t,"oohtml","subscript").get("embeds");if(i||(i=new WeakSet,s(t,"oohtml","subscript").set("embeds",i)),i.has(e))return;a.implementScript(t,e)(),o.connectedCallback.call(t),i.add(e);let n=r.onRemoved(t,(()=>{o.disconnectedCallback.call(t),i.delete(e),n.disconnect()}),{ignoreTransients:!0})})),i.SubscriptElement=Ts}(function(e=null,i=!1){const s=as.call(this);s.OOHTML||(s.OOHTML={},Ss.call(this,e,i),_s.call(this,e,i),Is.call(this,e,i),Os.call(this,e,i),Ns.call(this,e,i),s.Observer=he,s.Subscript=t)}).call(window)})();
2
2
  //# sourceMappingURL=main.js.map